sealclaw 2026.5.96 → 2026.5.97

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,5 +1,5 @@
1
1
  {
2
- "version": "2026.5.96",
3
- "commit": "9389dbe4fedc0e59056f14bb486ed9332291c3b7",
4
- "builtAt": "2026-05-22T05:24:09.452Z"
2
+ "version": "2026.5.97",
3
+ "commit": "2557bc38ec88b40082939e8031fe03423a314372",
4
+ "builtAt": "2026-05-22T05:56:06.715Z"
5
5
  }
@@ -28,6 +28,6 @@
28
28
  "channelCatalogSignature": "2caae4c55233549d9d23dd838fe15f6d8b5fbe75",
29
29
  "rootHelpBundleSignature": "567b77d8dc4e14617199f09625020a483ca65964",
30
30
  "browserHelpSourceSignature": "1f7bbffe49f0c0428665fdf75e65285043d08b0e",
31
- "browserHelpText": "\n🦞 SealClaw 0.0.0 (9389dbe) — Your task has been queued; your dignity has been deprecated.\n\nUsage: openclaw browser [options] [command]\n\nManage OpenClaw's dedicated browser (Chrome/Chromium)\n\nOptions:\n --browser-profile <name> Browser profile name (default from config)\n --expect-final Wait for final response (agent) (default: false)\n -h, --help Display help for command\n --json Output machine-readable JSON (default: false)\n --timeout <ms> Timeout in ms (default: \"30000\")\n --token <token> Gateway token (if required)\n --url <url> Gateway WebSocket URL (defaults to\n gateway.remote.url when configured)\n\nCommands:\n click Click an element by ref from snapshot\n click-coords Click viewport coordinates\n close Close a tab (target id optional)\n console Get recent console messages\n cookies Read/write cookies\n create-profile Create a new browser profile\n delete-profile Delete a browser profile\n dialog Arm the next modal dialog (alert/confirm/prompt)\n doctor Check browser plugin readiness\n download Click a ref and save the resulting download\n drag Drag from one ref to another\n errors Get recent page errors\n evaluate Evaluate a function against the page or a ref\n fill Fill a form with JSON field descriptors\n focus Focus a tab by target id, tab id, label, or unique\n target id prefix\n highlight Highlight an element by ref\n hover Hover an element by ai ref\n navigate Navigate the current tab to a URL\n open Open a URL in a new tab\n pdf Save page as PDF\n press Press a key\n profiles List all browser profiles\n requests Get recent network requests (best-effort)\n reset-profile Reset browser profile (moves it to Trash)\n resize Resize the viewport\n responsebody Wait for a network response and return its body\n screenshot Capture a screenshot (MEDIA:<path>)\n scrollintoview Scroll an element into view by ref from snapshot\n select Select option(s) in a select element\n set Browser environment settings\n snapshot Capture a snapshot (default: ai; aria is the\n accessibility tree)\n start Start the browser (no-op if already running)\n status Show browser status\n stop Stop the browser (best-effort)\n storage Read/write localStorage/sessionStorage\n tab Tab shortcuts (index-based)\n tabs List open tabs\n trace Record a Playwright trace\n type Type into an element by ref from snapshot\n upload Arm file upload for the next file chooser\n wait Wait for time, selector, URL, load state, or JS\n conditions\n waitfordownload Wait for the next download (and save it)\n\nExamples:\n openclaw browser status\n openclaw browser start\n openclaw browser start --headless\n openclaw browser stop\n openclaw browser tabs\n openclaw browser open https://example.com\n openclaw browser focus abcd1234\n openclaw browser close abcd1234\n openclaw browser screenshot\n openclaw browser screenshot --full-page\n openclaw browser screenshot --ref 12\n openclaw browser snapshot\n openclaw browser snapshot --format aria --limit 200\n openclaw browser snapshot --efficient\n openclaw browser snapshot --labels\n openclaw browser navigate https://example.com\n openclaw browser resize 1280 720\n openclaw browser click 12 --double\n openclaw browser click-coords 120 340\n openclaw browser type 23 \"hello\" --submit\n openclaw browser press Enter\n openclaw browser hover 44\n openclaw browser drag 10 11\n openclaw browser select 9 OptionA OptionB\n openclaw browser upload /tmp/openclaw/uploads/file.pdf\n openclaw browser fill --fields '[{\"ref\":\"1\",\"value\":\"Ada\"}]'\n openclaw browser dialog --accept\n openclaw browser wait --text \"Done\"\n openclaw browser evaluate --fn '(el) => el.textContent' --ref 7\n openclaw browser console --level error\n openclaw browser pdf\n\nDocs: https://docs.openclaw.ai/cli/browser\n\n",
32
- "rootHelpText": "\n🦞 SealClaw 2026.5.96 (9389dbe)\n I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).\n\nUsage: openclaw [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env OPENCLAW_CONTAINER)\n --dev Dev profile: isolate state under ~/.openclaw-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under\n ~/.openclaw-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for OpenClaw\n state\n capability * Run provider-backed inference commands (fallback alias:\n infer)\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n chat Open a local terminal UI (alias for tui --local)\n clawbot * Legacy clawbot command aliases\n commitments * List and manage inferred follow-up commitments\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n crestodian Open the ring-zero setup and repair helper\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live OpenClaw docs\n doctor Health checks + quick fixes for the gateway and channels\n exec-policy * Show or synchronize requested exec policy with host\n approvals\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed inference commands\n logs Tail gateway file logs via RPC\n mcp * Manage OpenClaw MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage messages\n migrate * Import state from another agent system\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage OpenClaw plugins\n proxy * Run the OpenClaw debug proxy and inspect captured traffic\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tasks * Inspect durable background task state\n terminal Open a local terminal UI (alias for tui --local)\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update OpenClaw and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n openclaw models --help\n Show detailed help for the models command.\n openclaw channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n openclaw message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n openclaw gateway --port 18789\n Run the WebSocket Gateway locally.\n openclaw --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n openclaw gateway --force\n Kill anything bound to the default gateway port, then start it.\n openclaw gateway ...\n Gateway control via WebSocket.\n openclaw agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n openclaw message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://docs.openclaw.ai/cli\n\n"
31
+ "browserHelpText": "\n🦞 SealClaw 0.0.0 (2557bc3) — Greetings, Professor Falken\n\nUsage: openclaw browser [options] [command]\n\nManage OpenClaw's dedicated browser (Chrome/Chromium)\n\nOptions:\n --browser-profile <name> Browser profile name (default from config)\n --expect-final Wait for final response (agent) (default: false)\n -h, --help Display help for command\n --json Output machine-readable JSON (default: false)\n --timeout <ms> Timeout in ms (default: \"30000\")\n --token <token> Gateway token (if required)\n --url <url> Gateway WebSocket URL (defaults to\n gateway.remote.url when configured)\n\nCommands:\n click Click an element by ref from snapshot\n click-coords Click viewport coordinates\n close Close a tab (target id optional)\n console Get recent console messages\n cookies Read/write cookies\n create-profile Create a new browser profile\n delete-profile Delete a browser profile\n dialog Arm the next modal dialog (alert/confirm/prompt)\n doctor Check browser plugin readiness\n download Click a ref and save the resulting download\n drag Drag from one ref to another\n errors Get recent page errors\n evaluate Evaluate a function against the page or a ref\n fill Fill a form with JSON field descriptors\n focus Focus a tab by target id, tab id, label, or unique\n target id prefix\n highlight Highlight an element by ref\n hover Hover an element by ai ref\n navigate Navigate the current tab to a URL\n open Open a URL in a new tab\n pdf Save page as PDF\n press Press a key\n profiles List all browser profiles\n requests Get recent network requests (best-effort)\n reset-profile Reset browser profile (moves it to Trash)\n resize Resize the viewport\n responsebody Wait for a network response and return its body\n screenshot Capture a screenshot (MEDIA:<path>)\n scrollintoview Scroll an element into view by ref from snapshot\n select Select option(s) in a select element\n set Browser environment settings\n snapshot Capture a snapshot (default: ai; aria is the\n accessibility tree)\n start Start the browser (no-op if already running)\n status Show browser status\n stop Stop the browser (best-effort)\n storage Read/write localStorage/sessionStorage\n tab Tab shortcuts (index-based)\n tabs List open tabs\n trace Record a Playwright trace\n type Type into an element by ref from snapshot\n upload Arm file upload for the next file chooser\n wait Wait for time, selector, URL, load state, or JS\n conditions\n waitfordownload Wait for the next download (and save it)\n\nExamples:\n openclaw browser status\n openclaw browser start\n openclaw browser start --headless\n openclaw browser stop\n openclaw browser tabs\n openclaw browser open https://example.com\n openclaw browser focus abcd1234\n openclaw browser close abcd1234\n openclaw browser screenshot\n openclaw browser screenshot --full-page\n openclaw browser screenshot --ref 12\n openclaw browser snapshot\n openclaw browser snapshot --format aria --limit 200\n openclaw browser snapshot --efficient\n openclaw browser snapshot --labels\n openclaw browser navigate https://example.com\n openclaw browser resize 1280 720\n openclaw browser click 12 --double\n openclaw browser click-coords 120 340\n openclaw browser type 23 \"hello\" --submit\n openclaw browser press Enter\n openclaw browser hover 44\n openclaw browser drag 10 11\n openclaw browser select 9 OptionA OptionB\n openclaw browser upload /tmp/openclaw/uploads/file.pdf\n openclaw browser fill --fields '[{\"ref\":\"1\",\"value\":\"Ada\"}]'\n openclaw browser dialog --accept\n openclaw browser wait --text \"Done\"\n openclaw browser evaluate --fn '(el) => el.textContent' --ref 7\n openclaw browser console --level error\n openclaw browser pdf\n\nDocs: https://docs.openclaw.ai/cli/browser\n\n",
32
+ "rootHelpText": "\n🦞 SealClaw 2026.5.97 (2557bc3)\n I don't just autocomplete—I auto-commit (emotionally), then ask you to review (logically).\n\nUsage: openclaw [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env OPENCLAW_CONTAINER)\n --dev Dev profile: isolate state under ~/.openclaw-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n OPENCLAW_STATE_DIR/OPENCLAW_CONFIG_PATH under\n ~/.openclaw-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for OpenClaw\n state\n capability * Run provider-backed inference commands (fallback alias:\n infer)\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n chat Open a local terminal UI (alias for tui --local)\n clawbot * Legacy clawbot command aliases\n commitments * List and manage inferred follow-up commitments\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n crestodian Open the ring-zero setup and repair helper\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live OpenClaw docs\n doctor Health checks + quick fixes for the gateway and channels\n exec-policy * Show or synchronize requested exec policy with host\n approvals\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed inference commands\n logs Tail gateway file logs via RPC\n mcp * Manage OpenClaw MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage messages\n migrate * Import state from another agent system\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for gateway, workspace, and skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage OpenClaw plugins\n proxy * Run the OpenClaw debug proxy and inspect captured traffic\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tasks * Inspect durable background task state\n terminal Open a local terminal UI (alias for tui --local)\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update OpenClaw and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n openclaw models --help\n Show detailed help for the models command.\n openclaw channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n openclaw message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n openclaw gateway --port 18789\n Run the WebSocket Gateway locally.\n openclaw --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n openclaw gateway --force\n Kill anything bound to the default gateway port, then start it.\n openclaw gateway ...\n Gateway control via WebSocket.\n openclaw agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n openclaw message send --channel telegram --target @mychat --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://docs.openclaw.ai/cli\n\n"
33
33
  }
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{t as n}from"./string-coerce-CuNcS1Hz.js";import{n as r,t as i}from"./directive-CUxOzvVj.js";import{A as a,C as o,D as s,E as c,G as l,H as u,J as d,L as f,M as p,N as m,O as h,P as g,S as _,T as v,_ as y,a as b,b as x,j as S,k as C,m as w,n as T,p as E,r as D,t as ee,u as O,v as k,w as te,x as ne,y as re}from"./index-CnaJ1Ys6.js";import{r as ie}from"./channel-config-extras-D50yz0bl.js";import{i as A,n as j,r as M,t as ae}from"./skills-shared-Cl6n1FJQ.js";var oe=i(class extends r{constructor(){super(...arguments),this.key=t}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(l(e),this.key=t),n}});function se(n){var r,i,o,l,u,d,f,p,m,g,_,y,b;let{agent:x,configForm:S,agentFilesList:w,configLoading:T,configSaving:E,configDirty:D,onConfigReload:ee,onConfigSave:O,onModelChange:k,onModelFallbacksChange:ne,onSelectPanel:ie}=n,A=!!(n.defaultId&&x.id===n.defaultId),j=c(S,x.id),M=x.model,ae=(w&&w.agentId===x.id?w.workspace:null)||((r=j.entry)==null?void 0:r.workspace)||((i=j.defaults)==null?void 0:i.workspace)||x.workspace||`default`,oe=(o=j.entry)!=null&&o.model?C((l=j.entry)==null?void 0:l.model):(u=j.defaults)!=null&&u.model?C((d=j.defaults)==null?void 0:d.model):C(M),se=s(x.agentRuntime),ce=C(((f=j.defaults)==null?void 0:f.model)??M),le=a((p=j.entry)==null?void 0:p.model),N=a((m=j.defaults)==null?void 0:m.model)||(ce===`-`?null:te(ce))||(S?null:a(M)),ue=le??N??null,P=A?ue:le,F=h((g=j.entry)==null?void 0:g.model)??h((_=j.defaults)==null?void 0:_.model)??(S?null:h(M))??[],I=Array.isArray((y=j.entry)==null?void 0:y.skills)?(b=j.entry)==null?void 0:b.skills:null,de=(I==null?void 0:I.length)??null,L=!S||T||E,fe=e=>{let t=F.filter((t,n)=>n!==e);ne(x.id,t)};return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{t as n}from"./string-coerce-CuNcS1Hz.js";import{n as r,t as i}from"./directive-CUxOzvVj.js";import{A as a,C as o,D as s,E as c,G as l,H as u,J as d,L as f,M as p,N as m,O as h,P as g,S as _,T as v,_ as y,a as b,b as x,j as S,k as C,m as w,n as T,p as E,r as D,t as ee,u as O,v as k,w as te,x as ne,y as re}from"./index-BGKsGXZK.js";import{r as ie}from"./channel-config-extras-D50yz0bl.js";import{i as A,n as j,r as M,t as ae}from"./skills-shared-Cl6n1FJQ.js";var oe=i(class extends r{constructor(){super(...arguments),this.key=t}render(e,t){return this.key=e,t}update(e,[t,n]){return t!==this.key&&(l(e),this.key=t),n}});function se(n){var r,i,o,l,u,d,f,p,m,g,_,y,b;let{agent:x,configForm:S,agentFilesList:w,configLoading:T,configSaving:E,configDirty:D,onConfigReload:ee,onConfigSave:O,onModelChange:k,onModelFallbacksChange:ne,onSelectPanel:ie}=n,A=!!(n.defaultId&&x.id===n.defaultId),j=c(S,x.id),M=x.model,ae=(w&&w.agentId===x.id?w.workspace:null)||((r=j.entry)==null?void 0:r.workspace)||((i=j.defaults)==null?void 0:i.workspace)||x.workspace||`default`,oe=(o=j.entry)!=null&&o.model?C((l=j.entry)==null?void 0:l.model):(u=j.defaults)!=null&&u.model?C((d=j.defaults)==null?void 0:d.model):C(M),se=s(x.agentRuntime),ce=C(((f=j.defaults)==null?void 0:f.model)??M),le=a((p=j.entry)==null?void 0:p.model),N=a((m=j.defaults)==null?void 0:m.model)||(ce===`-`?null:te(ce))||(S?null:a(M)),ue=le??N??null,P=A?ue:le,F=h((g=j.entry)==null?void 0:g.model)??h((_=j.defaults)==null?void 0:_.model)??(S?null:h(M))??[],I=Array.isArray((y=j.entry)==null?void 0:y.skills)?(b=j.entry)==null?void 0:b.skills:null,de=(I==null?void 0:I.length)??null,L=!S||T||E,fe=e=>{let t=F.filter((t,n)=>n!==e);ne(x.id,t)};return e`
2
2
  <section class="card">
3
3
  <div class="card-title">Overview</div>
4
4
  <div class="card-sub">Workspace paths and identity metadata.</div>
@@ -999,4 +999,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
999
999
  `)}
1000
1000
  </div>
1001
1001
  `}export{wn as renderAgents};
1002
- //# sourceMappingURL=agents-EXiyiWcj.js.map
1002
+ //# sourceMappingURL=agents-D0yWE6FD.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{H as n,K as r,U as i,c as a,l as o,q as s}from"./index-CnaJ1Ys6.js";import{n as c,t as l}from"./channel-config-extras-D50yz0bl.js";function u(e,t){let n=e;for(let e of t){if(!n)return null;let t=s(n);if(t===`object`){let t=n.properties??{};if(typeof e==`string`&&t[e]){n=t[e];continue}let r=n.additionalProperties;if(typeof e==`string`&&r&&typeof r==`object`){n=r;continue}return null}if(t===`array`){if(typeof e!=`number`)return null;n=(Array.isArray(n.items)?n.items[0]:n.items)??null;continue}return null}return n}function d(e,t){return c(e,t)??{}}var f=[`groupPolicy`,`streamMode`,`dmPolicy`];function p(t){let n=f.flatMap(e=>e in t?[[e,t[e]]]:[]);return n.length===0?null:e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{H as n,K as r,U as i,c as a,l as o,q as s}from"./index-BGKsGXZK.js";import{n as c,t as l}from"./channel-config-extras-D50yz0bl.js";function u(e,t){let n=e;for(let e of t){if(!n)return null;let t=s(n);if(t===`object`){let t=n.properties??{};if(typeof e==`string`&&t[e]){n=t[e];continue}let r=n.additionalProperties;if(typeof e==`string`&&r&&typeof r==`object`){n=r;continue}return null}if(t===`array`){if(typeof e!=`number`)return null;n=(Array.isArray(n.items)?n.items[0]:n.items)??null;continue}return null}return n}function d(e,t){return c(e,t)??{}}var f=[`groupPolicy`,`streamMode`,`dmPolicy`];function p(t){let n=f.flatMap(e=>e in t?[[e,t[e]]]:[]);return n.length===0?null:e`
2
2
  <div class="status-list" style="margin-top: 12px;">
3
3
  ${n.map(([t,n])=>e`
4
4
  <div>
@@ -346,4 +346,4 @@ ${r.snapshot?JSON.stringify(r.snapshot,null,2):`尚无快照。`}
346
346
  </div>
347
347
  </div>
348
348
  `}export{P as renderChannels};
349
- //# sourceMappingURL=channels-EaU0sKIP.js.map
349
+ //# sourceMappingURL=channels-Dmn0V4l-.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6.js";var r={weixin:`微信`,wecom:`企业微信`,feishu:`飞书`,dingtalk:`钉钉`},i={weixin:`接入微信对话`,wecom:`接入企业微信对话`,feishu:`接入飞书对话`,dingtalk:`接入钉钉对话`},a={weixin:`https://gw.alicdn.com/imgextra/i4/O1CN01GsAob11fkfDWVIb3R_!!6000000004045-2-tps-400-400.png`,wecom:`https://gw.alicdn.com/imgextra/i1/O1CN01HWtzmr1hkK9beQICJ_!!6000000004315-2-tps-400-400.png`,dingtalk:`https://gw.alicdn.com/imgextra/i4/O1CN01g1u9vB1KdEreWzDdv_!!6000000001186-2-tps-400-400.png`,feishu:`https://gw.alicdn.com/imgextra/i4/O1CN01jsn08m225euyUoaFN_!!6000000007069-2-tps-400-400.png`},o={weixin:{successStatus:`confirmed`,successCredentialKey:`bot_token`,pollInterval:2e3,credentialFields:[`bot_token`]},wecom:{successStatus:`success`,successCredentialKey:`bot_id`,pollInterval:3e3,credentialFields:[`bot_id`,`secret`]},dingtalk:{successStatus:`success`,successCredentialKey:`client_id`,pollInterval:5e3,credentialFields:[`client_id`,`client_secret`]},feishu:{successStatus:``,successCredentialKey:``,pollInterval:0,credentialFields:[]}},s=[`weixin`,`wecom`,`feishu`,`dingtalk`];async function c(e,t){if(!(!e.client||!e.connected)){e.cnChannelsLoading=!0,e.cnChannelsError=null,t==null||t();try{e.cnChannelsData=(await e.client.request(`channels.cn.config.list`,{})).channels??null}catch(t){e.cnChannelsError=String(t)}finally{e.cnChannelsLoading=!1,t==null||t()}}}async function l(e,t,n,r){e.client&&(await e.client.request(`channels.cn.config.set`,{channel:t,config:n}),await c(e,r))}async function u(e,t,n){if(e.client){f(e),e.cnQrcodeChannel=t,e.cnQrcodeImg=null,e.cnQrcodeToken=null,e.cnQrcodeLoading=!0,n==null||n();try{let r=await e.client.request(`channels.cn.qrcode.get`,{channel:t});if(!r.qrcode_img){e.cnQrcodeLoading=!1,n==null||n();return}e.cnQrcodeImg=r.qrcode_img,e.cnQrcodeToken=r.poll_token,d(e,t,r.poll_token,n)}catch{e.cnQrcodeImg=null}finally{e.cnQrcodeLoading=!1,n==null||n()}}}function d(e,t,n,r){let i=o[t],a=async()=>{if(!(!e.client||e.cnQrcodeChannel!==t||e.cnQrcodeToken!==n)){try{let a=await e.client.request(`channels.cn.qrcode.status`,{channel:t,token:n});if(a.status===i.successStatus&&a.credentials[i.successCredentialKey]){e.cnQrcodeImg=null,e.cnQrcodeToken=null,e.cnQrcodeChannel=null;let n={enabled:!0};for(let e of i.credentialFields)a.credentials[e]!==void 0&&(n[e]=a.credentials[e]);e.cnConnecting=t,r==null||r();try{await l(e,t,n,r)}finally{e.cnConnecting=null,r==null||r()}return}if(a.status===`expired`){e.cnQrcodeImg=null,e.cnQrcodeToken=null,r==null||r();return}}catch{}e.cnQrcodePollTimer=setTimeout(a,i.pollInterval)}};e.cnQrcodePollTimer=setTimeout(a,i.pollInterval)}function f(e){e.cnQrcodePollTimer!==null&&(clearTimeout(e.cnQrcodePollTimer),e.cnQrcodePollTimer=null)}function p(t,o,s){var c;let d=!!(((c=o.cnChannelsData)==null?void 0:c[t])??{enabled:!1}).enabled,f=o.cnConnecting===t,p=r[t],m=i[t];return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-BGKsGXZK.js";var r={weixin:`微信`,wecom:`企业微信`,feishu:`飞书`,dingtalk:`钉钉`},i={weixin:`接入微信对话`,wecom:`接入企业微信对话`,feishu:`接入飞书对话`,dingtalk:`接入钉钉对话`},a={weixin:`https://gw.alicdn.com/imgextra/i4/O1CN01GsAob11fkfDWVIb3R_!!6000000004045-2-tps-400-400.png`,wecom:`https://gw.alicdn.com/imgextra/i1/O1CN01HWtzmr1hkK9beQICJ_!!6000000004315-2-tps-400-400.png`,dingtalk:`https://gw.alicdn.com/imgextra/i4/O1CN01g1u9vB1KdEreWzDdv_!!6000000001186-2-tps-400-400.png`,feishu:`https://gw.alicdn.com/imgextra/i4/O1CN01jsn08m225euyUoaFN_!!6000000007069-2-tps-400-400.png`},o={weixin:{successStatus:`confirmed`,successCredentialKey:`bot_token`,pollInterval:2e3,credentialFields:[`bot_token`]},wecom:{successStatus:`success`,successCredentialKey:`bot_id`,pollInterval:3e3,credentialFields:[`bot_id`,`secret`]},dingtalk:{successStatus:`success`,successCredentialKey:`client_id`,pollInterval:5e3,credentialFields:[`client_id`,`client_secret`]},feishu:{successStatus:``,successCredentialKey:``,pollInterval:0,credentialFields:[]}},s=[`weixin`,`wecom`,`feishu`,`dingtalk`];async function c(e,t){if(!(!e.client||!e.connected)){e.cnChannelsLoading=!0,e.cnChannelsError=null,t==null||t();try{e.cnChannelsData=(await e.client.request(`channels.cn.config.list`,{})).channels??null}catch(t){e.cnChannelsError=String(t)}finally{e.cnChannelsLoading=!1,t==null||t()}}}async function l(e,t,n,r){e.client&&(await e.client.request(`channels.cn.config.set`,{channel:t,config:n}),await c(e,r))}async function u(e,t,n){if(e.client){f(e),e.cnQrcodeChannel=t,e.cnQrcodeImg=null,e.cnQrcodeToken=null,e.cnQrcodeLoading=!0,n==null||n();try{let r=await e.client.request(`channels.cn.qrcode.get`,{channel:t});if(!r.qrcode_img){e.cnQrcodeLoading=!1,n==null||n();return}e.cnQrcodeImg=r.qrcode_img,e.cnQrcodeToken=r.poll_token,d(e,t,r.poll_token,n)}catch{e.cnQrcodeImg=null}finally{e.cnQrcodeLoading=!1,n==null||n()}}}function d(e,t,n,r){let i=o[t],a=async()=>{if(!(!e.client||e.cnQrcodeChannel!==t||e.cnQrcodeToken!==n)){try{let a=await e.client.request(`channels.cn.qrcode.status`,{channel:t,token:n});if(a.status===i.successStatus&&a.credentials[i.successCredentialKey]){e.cnQrcodeImg=null,e.cnQrcodeToken=null,e.cnQrcodeChannel=null;let n={enabled:!0};for(let e of i.credentialFields)a.credentials[e]!==void 0&&(n[e]=a.credentials[e]);e.cnConnecting=t,r==null||r();try{await l(e,t,n,r)}finally{e.cnConnecting=null,r==null||r()}return}if(a.status===`expired`){e.cnQrcodeImg=null,e.cnQrcodeToken=null,r==null||r();return}}catch{}e.cnQrcodePollTimer=setTimeout(a,i.pollInterval)}};e.cnQrcodePollTimer=setTimeout(a,i.pollInterval)}function f(e){e.cnQrcodePollTimer!==null&&(clearTimeout(e.cnQrcodePollTimer),e.cnQrcodePollTimer=null)}function p(t,o,s){var c;let d=!!(((c=o.cnChannelsData)==null?void 0:c[t])??{enabled:!1}).enabled,f=o.cnConnecting===t,p=r[t],m=i[t];return e`
2
2
  <div class="cn-channel-card">
3
3
  <div class="cn-channel-card__top">
4
4
  <div class="cn-channel-card__icon-wrap">
@@ -126,4 +126,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6
126
126
  ${m(r,i)}
127
127
  ${h(r,i)}
128
128
  `):t}export{c as loadCnChannels,g as renderCnChannelsPanel,u as startCnQrcode,f as stopCnQrcodePoll};
129
- //# sourceMappingURL=channels.cn-BmuE_4-S.js.map
129
+ //# sourceMappingURL=channels.cn-4thW_D4s.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{B as n,F as r,H as i,a,f as o,g as s,h as c,m as l,n as u}from"./index-CnaJ1Ys6.js";function d(){return[{value:`ok`,label:`成功`},{value:`error`,label:`错误`},{value:`skipped`,label:`已跳过`}]}function f(){return[{value:`delivered`,label:`已投递`},{value:`not-delivered`,label:`未投递`},{value:`unknown`,label:`未知`},{value:`not-requested`,label:`未请求`}]}function p(e,t,n){let r=new Set(e);return n?r.add(t):r.delete(t),Array.from(r)}function m(e,t){return e.length===0?t:e.length<=2?e.join(`, `):`${e[0]} +${e.length-1}`}function h(e){var t;let n=[`last`,...e.channels.filter(Boolean)],r=(t=e.form.deliveryChannel)==null?void 0:t.trim();r&&!n.includes(r)&&n.push(r);let i=new Set;return n.filter(e=>i.has(e)?!1:(i.add(e),!0))}function g(e,t){var n,r;if(t===`last`)return`last`;let i=(n=e.channelMeta)==null?void 0:n.find(e=>e.id===t);return i!=null&&i.label?i.label:((r=e.channelLabels)==null?void 0:r[t])??t}function _(t){return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{B as n,F as r,H as i,a,f as o,g as s,h as c,m as l,n as u}from"./index-BGKsGXZK.js";function d(){return[{value:`ok`,label:`成功`},{value:`error`,label:`错误`},{value:`skipped`,label:`已跳过`}]}function f(){return[{value:`delivered`,label:`已投递`},{value:`not-delivered`,label:`未投递`},{value:`unknown`,label:`未知`},{value:`not-requested`,label:`未请求`}]}function p(e,t,n){let r=new Set(e);return n?r.add(t):r.delete(t),Array.from(r)}function m(e,t){return e.length===0?t:e.length<=2?e.join(`, `):`${e[0]} +${e.length-1}`}function h(e){var t;let n=[`last`,...e.channels.filter(Boolean)],r=(t=e.form.deliveryChannel)==null?void 0:t.trim();r&&!n.includes(r)&&n.push(r);let i=new Set;return n.filter(e=>i.has(e)?!1:(i.add(e),!0))}function g(e,t){var n,r;if(t===`last`)return`last`;let i=(n=e.channelMeta)==null?void 0:n.find(e=>e.id===t);return i!=null&&i.label?i.label:((r=e.channelLabels)==null?void 0:r[t])??t}function _(t){return e`
2
2
  <div class="field cron-filter-dropdown" data-filter=${t.id}>
3
3
  <span>${t.title}</span>
4
4
  <details class="cron-filter-dropdown__details">
@@ -960,4 +960,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{B as n,F as r,H as i,a,f as
960
960
  </div>
961
961
  </div>
962
962
  `}export{T as renderCron};
963
- //# sourceMappingURL=cron-tZQOlNT8.js.map
963
+ //# sourceMappingURL=cron-CCSk92JU.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{i as n}from"./index-CnaJ1Ys6.js";function r(r){let i=r.status&&typeof r.status==`object`?r.status.securityAudit:null,a=(i==null?void 0:i.summary)??null,o=(a==null?void 0:a.critical)??0,s=(a==null?void 0:a.warn)??0,c=(a==null?void 0:a.info)??0,l=o>0?`danger`:s>0?`warn`:`success`,u=o>0?`${String(o)} 个严重问题`:s>0?`${String(s)} 个警告`:`无严重问题`;return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{i as n}from"./index-BGKsGXZK.js";function r(r){let i=r.status&&typeof r.status==`object`?r.status.securityAudit:null,a=(i==null?void 0:i.summary)??null,o=(a==null?void 0:a.critical)??0,s=(a==null?void 0:a.warn)??0,c=(a==null?void 0:a.info)??0,l=o>0?`danger`:s>0?`warn`:`success`,u=o>0?`${String(o)} 个严重问题`:s>0?`${String(s)} 个警告`:`无严重问题`;return e`
2
2
  <section class="grid">
3
3
  <div class="card">
4
4
  <div class="row" style="justify-content: space-between;">
@@ -93,4 +93,4 @@ ${n(t.payload)}</pre
93
93
  `}
94
94
  </section>
95
95
  `}export{r as renderDebug};
96
- //# sourceMappingURL=debug-Bos7BVqr.js.map
96
+ //# sourceMappingURL=debug-B_m-XQVY.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6.js";function r(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function i(e){let t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return`刚刚`;if(n<60)return`${n} 分钟前`;let r=Math.floor(n/60);if(r<24)return`${r} 小时前`;let i=Math.floor(r/24);if(i<7)return`${i} 天前`;let a=new Date(e);return`${a.getMonth()+1}/${a.getDate()}`}function a(e){let t=e.lastIndexOf(`.`),n=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(n)?`filespace__file-icon--image`:[`ts`,`tsx`,`js`,`jsx`].includes(n)?`filespace__file-icon--js`:[`py`].includes(n)?`filespace__file-icon--py`:[`md`,`txt`].includes(n)?`filespace__file-icon--doc`:[`json`,`yaml`,`yml`,`toml`].includes(n)?`filespace__file-icon--config`:[`csv`].includes(n)?`filespace__file-icon--csv`:[`rs`,`go`,`sh`,`bash`,`zsh`].includes(n)?`filespace__file-icon--code`:`filespace__file-icon--default`}function o(e){let t=e.lastIndexOf(`.`),r=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(r)?n.image:[`ts`,`tsx`,`js`,`jsx`,`py`,`rs`,`go`,`sh`,`bash`,`json`,`yaml`,`yml`,`toml`].includes(r)?n.fileCode:n.fileText}function s(s){let{loading:c,error:l,data:u,search:d,collapsed:f,connected:p}=s,m=d.trim().toLowerCase(),h=m?(u??[]).map(e=>({...e,files:e.files.filter(t=>t.name.toLowerCase().includes(m)||t.path.toLowerCase().includes(m)||e.sessionLabel.toLowerCase().includes(m))})).filter(e=>e.files.length>0):u??[],g=h.reduce((e,t)=>e+t.files.length,0),_=()=>e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-BGKsGXZK.js";function r(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function i(e){let t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return`刚刚`;if(n<60)return`${n} 分钟前`;let r=Math.floor(n/60);if(r<24)return`${r} 小时前`;let i=Math.floor(r/24);if(i<7)return`${i} 天前`;let a=new Date(e);return`${a.getMonth()+1}/${a.getDate()}`}function a(e){let t=e.lastIndexOf(`.`),n=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(n)?`filespace__file-icon--image`:[`ts`,`tsx`,`js`,`jsx`].includes(n)?`filespace__file-icon--js`:[`py`].includes(n)?`filespace__file-icon--py`:[`md`,`txt`].includes(n)?`filespace__file-icon--doc`:[`json`,`yaml`,`yml`,`toml`].includes(n)?`filespace__file-icon--config`:[`csv`].includes(n)?`filespace__file-icon--csv`:[`rs`,`go`,`sh`,`bash`,`zsh`].includes(n)?`filespace__file-icon--code`:`filespace__file-icon--default`}function o(e){let t=e.lastIndexOf(`.`),r=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(r)?n.image:[`ts`,`tsx`,`js`,`jsx`,`py`,`rs`,`go`,`sh`,`bash`,`json`,`yaml`,`yml`,`toml`].includes(r)?n.fileCode:n.fileText}function s(s){let{loading:c,error:l,data:u,search:d,collapsed:f,connected:p}=s,m=d.trim().toLowerCase(),h=m?(u??[]).map(e=>({...e,files:e.files.filter(t=>t.name.toLowerCase().includes(m)||t.path.toLowerCase().includes(m)||e.sessionLabel.toLowerCase().includes(m))})).filter(e=>e.files.length>0):u??[],g=h.reduce((e,t)=>e+t.files.length,0),_=()=>e`
2
2
  <div class="filespace__empty">
3
3
  <div class="filespace__empty-icon-wrap">
4
4
  <span class="filespace__empty-icon">${n.folder}</span>
@@ -104,4 +104,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6
104
104
  </div>
105
105
  </div>
106
106
  `}export{s as renderFileSpace};
107
- //# sourceMappingURL=filespace-BJ6ekAUx.js.map
107
+ //# sourceMappingURL=filespace-CW07HTK7.js.map
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/channels.cn-BmuE_4-S.js","assets/lit-BrYIQVuc.js","assets/agents-EXiyiWcj.js","assets/string-coerce-CuNcS1Hz.js","assets/directive-CUxOzvVj.js","assets/channel-config-extras-D50yz0bl.js","assets/skills-shared-Cl6n1FJQ.js","assets/channels-EaU0sKIP.js","assets/cron-tZQOlNT8.js","assets/debug-Bos7BVqr.js","assets/instances-CxttD6fs.js","assets/logs-DoHkFjmj.js","assets/nodes-Ct8gvuAJ.js","assets/sessions-EG_sUxo9.js","assets/skills-BimtDTP5.js","assets/skill-center-8t3ZKaZ1.js","assets/filespace-BJ6ekAUx.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/channels.cn-4thW_D4s.js","assets/lit-BrYIQVuc.js","assets/agents-D0yWE6FD.js","assets/string-coerce-CuNcS1Hz.js","assets/directive-CUxOzvVj.js","assets/channel-config-extras-D50yz0bl.js","assets/skills-shared-Cl6n1FJQ.js","assets/channels-Dmn0V4l-.js","assets/cron-CCSk92JU.js","assets/debug-B_m-XQVY.js","assets/instances-vA_eAzPP.js","assets/logs-DoHkFjmj.js","assets/nodes-DEB4eQvc.js","assets/sessions-DLqvgv8s.js","assets/skills-Bi5UTneM.js","assets/skill-center-CFgH06BO.js","assets/filespace-CW07HTK7.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./lit-BrYIQVuc.js";import{n as l,r as u,t as d}from"./string-coerce-CuNcS1Hz.js";import{n as f,r as p,t as m}from"./directive-CUxOzvVj.js";var h=Object.create,g=Object.defineProperty,_=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,y=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty,x=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),S=(e,t)=>{let n={};for(var r in e)g(n,r,{get:e[r],enumerable:!0});return t||g(n,Symbol.toStringTag,{value:`Module`}),n},C=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=v(t),a=0,o=i.length,s;a<o;a++)s=i[a],!b.call(e,s)&&s!==n&&g(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=_(t,s))||r.enumerable});return e},w=(e,t,n)=>(n=e==null?{}:h(y(e)),C(t||!e||!e.__esModule?g(n,`default`,{value:e,enumerable:!0}):n,e));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),typeof Array.prototype.toSorted!=`function`&&Object.defineProperty(Array.prototype,`toSorted`,{value:function(e){return[...this].sort(e)},writable:!0,configurable:!0}),typeof Array.prototype.toReversed!=`function`&&Object.defineProperty(Array.prototype,`toReversed`,{value:function(){return[...this].reverse()},writable:!0,configurable:!0}),typeof Array.prototype.toSpliced!=`function`&&Object.defineProperty(Array.prototype,`toSpliced`,{value:function(e,t,...n){let r=[...this];return t===void 0?r.splice(e):r.splice(e,t,...n),r},writable:!0,configurable:!0}),typeof Array.prototype.with!=`function`&&Object.defineProperty(Array.prototype,`with`,{value:function(e,t){let n=[...this],r=e<0?n.length+e:e;if(r<0||r>=n.length)throw RangeError(`Invalid index`);return n[r]=t,n},writable:!0,configurable:!0});var T={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:s},ee=(e=T,t,n)=>{let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),r===`setter`&&((e=Object.create(e)).wrapped=!0),a.set(n.name,e),r===`accessor`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function E(e){return(t,n)=>typeof n==`object`?ee(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}function D(e){return E({...e,state:!0,attribute:!1})}var te=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&typeof t!=`object`&&Object.defineProperty(e,t,n),n);function ne(e,t){return(n,r,i)=>{let a=t=>{var n;return((n=t.renderRoot)==null?void 0:n.querySelector(e))??null};if(t){let{get:e,set:t}=typeof r==`object`?n:i??(()=>{let e=Symbol();return{get(){return this[e]},set(t){this[e]=t}}})();return te(n,r,{get(){let n=e.call(this);return n===void 0&&(n=a(this),(n!==null||this.hasUpdated)&&t.call(this,n)),n}})}return te(n,r,{get(){return a(this)}})}}var re=window.location.hostname.includes(`test`)||window.location.hostname.includes(`localhost`)||window.location.hostname.includes(`127.0.0.1`)?`https://gatewaytest.sealseek.cn`:`https://gateway.sealseek.cn`,O=async(e,t)=>{if(t!=null&&t.params){let n=new URLSearchParams(t.params).toString();e+=`?${n}`}e=re+e;let n=localStorage.getItem(`jwt`)??``,r=await fetch(e,{...t,headers:{Authorization:`Bearer ${n}`,token:n,...t==null?void 0:t.headers}});if(!r.ok){let e=await r.text().catch(()=>``);throw Error(`Request failed: ${r.status} ${r.statusText}${e?` - ${e}`:``}`)}return await r.json()},k=e=>O(`/api/sealclaw/api-keys`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),A=()=>O(`/api/sealclaw/api-keys`),j=e=>O(`/api/sealclaw/api-keys/${e}`,{method:`DELETE`}),ie=e=>O(`/api/sealclaw/v1/models`,e?{headers:{Authorization:`Bearer ${e}`,token:e}}:void 0);function M(e){return e?/[\r\n]/.test(e)?null:e:null}function ae(e){var t,n;return M(u((t=e.hello)==null||(t=t.auth)==null?void 0:t.deviceToken)??null)??M(u((n=e.settings)==null?void 0:n.token)??null)??M(u(e.password)??null)??null}function N(e){let t=ae(e);return t?`Bearer ${t}`:null}function oe(e){var t,n;let r=new Set,i=[];for(let a of[u((t=e.hello)==null||(t=t.auth)==null?void 0:t.deviceToken),u((n=e.settings)==null?void 0:n.token),u(e.password)]){let e=M(a??null);e&&!r.has(e)&&(r.add(e),i.push(e))}return i}var P={AUTH_REQUIRED:`AUTH_REQUIRED`,AUTH_UNAUTHORIZED:`AUTH_UNAUTHORIZED`,AUTH_TOKEN_MISSING:`AUTH_TOKEN_MISSING`,AUTH_TOKEN_MISMATCH:`AUTH_TOKEN_MISMATCH`,AUTH_TOKEN_NOT_CONFIGURED:`AUTH_TOKEN_NOT_CONFIGURED`,AUTH_PASSWORD_MISSING:`AUTH_PASSWORD_MISSING`,AUTH_PASSWORD_MISMATCH:`AUTH_PASSWORD_MISMATCH`,AUTH_PASSWORD_NOT_CONFIGURED:`AUTH_PASSWORD_NOT_CONFIGURED`,AUTH_BOOTSTRAP_TOKEN_INVALID:`AUTH_BOOTSTRAP_TOKEN_INVALID`,AUTH_DEVICE_TOKEN_MISMATCH:`AUTH_DEVICE_TOKEN_MISMATCH`,AUTH_RATE_LIMITED:`AUTH_RATE_LIMITED`,AUTH_TAILSCALE_IDENTITY_MISSING:`AUTH_TAILSCALE_IDENTITY_MISSING`,AUTH_TAILSCALE_PROXY_MISSING:`AUTH_TAILSCALE_PROXY_MISSING`,AUTH_TAILSCALE_WHOIS_FAILED:`AUTH_TAILSCALE_WHOIS_FAILED`,AUTH_TAILSCALE_IDENTITY_MISMATCH:`AUTH_TAILSCALE_IDENTITY_MISMATCH`,CONTROL_UI_ORIGIN_NOT_ALLOWED:`CONTROL_UI_ORIGIN_NOT_ALLOWED`,CONTROL_UI_DEVICE_IDENTITY_REQUIRED:`CONTROL_UI_DEVICE_IDENTITY_REQUIRED`,DEVICE_IDENTITY_REQUIRED:`DEVICE_IDENTITY_REQUIRED`,DEVICE_AUTH_INVALID:`DEVICE_AUTH_INVALID`,DEVICE_AUTH_DEVICE_ID_MISMATCH:`DEVICE_AUTH_DEVICE_ID_MISMATCH`,DEVICE_AUTH_SIGNATURE_EXPIRED:`DEVICE_AUTH_SIGNATURE_EXPIRED`,DEVICE_AUTH_NONCE_REQUIRED:`DEVICE_AUTH_NONCE_REQUIRED`,DEVICE_AUTH_NONCE_MISMATCH:`DEVICE_AUTH_NONCE_MISMATCH`,DEVICE_AUTH_SIGNATURE_INVALID:`DEVICE_AUTH_SIGNATURE_INVALID`,DEVICE_AUTH_PUBLIC_KEY_INVALID:`DEVICE_AUTH_PUBLIC_KEY_INVALID`,PAIRING_REQUIRED:`PAIRING_REQUIRED`},F={NOT_PAIRED:`not-paired`,ROLE_UPGRADE:`role-upgrade`,SCOPE_UPGRADE:`scope-upgrade`,METADATA_UPGRADE:`metadata-upgrade`},se=new Set([`retry_with_device_token`,`update_auth_configuration`,`update_auth_credentials`,`wait_then_retry`,`review_auth_configuration`]),ce=new Set([`not-paired`,`role-upgrade`,`scope-upgrade`,`metadata-upgrade`]),I=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/,le={"not-paired":{requirement:`device is not approved yet`,remediationHint:`Approve this device from the pending pairing requests.`,recoveryTitle:`Gateway pairing approval required.`},"role-upgrade":{requirement:`device is asking for a higher role than currently approved`,remediationHint:`Review the requested role upgrade, then approve the pending request.`,recoveryTitle:`Gateway role upgrade approval required.`},"scope-upgrade":{requirement:`device is asking for more scopes than currently approved`,remediationHint:`Review the requested scopes, then approve the pending upgrade.`,recoveryTitle:`Gateway scope upgrade approval required.`},"metadata-upgrade":{requirement:`device identity changed and must be re-approved`,remediationHint:`Review the refreshed device details, then approve the pending request.`,recoveryTitle:`Gateway device refresh approval required.`}},ue={"not-paired":`device pairing required`,"role-upgrade":`role upgrade pending approval`,"scope-upgrade":`scope upgrade pending approval`,"metadata-upgrade":`device metadata change pending approval`};function de(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.code;return typeof t==`string`&&t.trim().length>0?t:null}function fe(e){if(!e||typeof e!=`object`||Array.isArray(e))return{};let t=e,n=typeof t.canRetryWithDeviceToken==`boolean`?t.canRetryWithDeviceToken:void 0,r=u(t.recommendedNextStep)??``;return{canRetryWithDeviceToken:n,recommendedNextStep:se.has(r)?r:void 0}}function pe(e){let t=u(e)??``;return ce.has(t)?t:void 0}function me(e){let t=u(e);return t&&I.test(t)?t:void 0}function L(e){if(!Array.isArray(e))return;let t=e.map(e=>u(e)).filter(e=>!!e);return t.length>0?t:[]}function R(e){return{code:P.PAIRING_REQUIRED,...e.reason?{reason:e.reason}:{},...e.requestId?{requestId:e.requestId}:{},...e.remediationHint?{remediationHint:e.remediationHint}:{},...e.deviceId?{deviceId:e.deviceId}:{},...e.requestedRole?{requestedRole:e.requestedRole}:{},...e.requestedScopes?{requestedScopes:e.requestedScopes}:{},...e.approvedRoles?{approvedRoles:e.approvedRoles}:{},...e.approvedScopes?{approvedScopes:e.approvedScopes}:{}}}function he(e){return e?le[e].requirement:`device approval is required`}function ge(e){return e?le[e].remediationHint:`Approve the pending device request before retrying.`}function z(e){if(de(e)!==P.PAIRING_REQUIRED||!e||typeof e!=`object`||Array.isArray(e))return null;let t=e,n=pe(t.reason);return R({reason:n,requestId:me(t.requestId),remediationHint:u(t.remediationHint)??ge(n),deviceId:u(t.deviceId),requestedRole:u(t.requestedRole),requestedScopes:L(t.requestedScopes),approvedRoles:L(t.approvedRoles),approvedScopes:L(t.approvedScopes)})}function _e(e){var t;let n=u(e);if(!n)return null;let r=n.trim().toLowerCase(),i;for(let[e,t]of Object.entries(ue))if(r.includes(t)){i=e;break}if(!i&&r.includes(`pairing required`)&&(i=F.NOT_PAIRED),!i)return null;let a=me((t=n.match(/\(requestId:\s*([^\s)]+)\)/i))==null?void 0:t[1]);return{...a?{requestId:a}:{},reason:i}}function ve(e){let t=z(e),n=ue[(t==null?void 0:t.reason)??F.NOT_PAIRED];return t!=null&&t.requestId?`${n} (requestId: ${t.requestId})`:n}function B(e){return de(e.details)===P.PAIRING_REQUIRED?ve(e.details):u(e.message)??`gateway request failed`}function ye(e){let t=e.scopes.join(`,`),n=e.token??``;return[`v2`,e.deviceId,e.clientId,e.clientMode,e.role,t,String(e.signedAtMs),n,e.nonce].join(`|`)}var V={WEBCHAT_UI:`webchat-ui`,CONTROL_UI:`openclaw-control-ui`,TUI:`openclaw-tui`,WEBCHAT:`webchat`,CLI:`cli`,GATEWAY_CLIENT:`gateway-client`,MACOS_APP:`openclaw-macos`,IOS_APP:`openclaw-ios`,ANDROID_APP:`openclaw-android`,NODE_HOST:`node-host`,TEST:`test`,FINGERPRINT:`fingerprint`,PROBE:`openclaw-probe`},be=V,xe={WEBCHAT:`webchat`,CLI:`cli`,UI:`ui`,BACKEND:`backend`,NODE:`node`,PROBE:`probe`,TEST:`test`};new Set(Object.values(V)),new Set(Object.values(xe));var Se=100,Ce=2e3;function we(e){return typeof e==`object`&&!!e&&e.reason===`startup-sidecars`}function Te(e){if(!e||typeof e!=`object`)return!1;let t=e;return(t.gatewayCode??t.code)===`UNAVAILABLE`&&t.retryable===!0&&we(t.details)}function Ee(e){if(!Te(e))return null;let t=e.retryAfterMs;return Math.min(Math.max(Math.floor(typeof t==`number`&&Number.isFinite(t)?t:500),Se),Ce)}function De(e){return e.trim()}function Oe(e){if(!Array.isArray(e))return[];let t=new Set;for(let n of e){let e=n.trim();e&&t.add(e)}return t.has(`operator.admin`)?(t.add(`operator.read`),t.add(`operator.write`)):t.has(`operator.write`)&&t.add(`operator.read`),[...t].toSorted()}function ke(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return null;let n=De(e.role),r=t.tokens[n];return!r||typeof r.token!=`string`?null:r}function Ae(e){let t=De(e.role),n=e.adapter.readStore(),r={version:1,deviceId:e.deviceId,tokens:n&&n.deviceId===e.deviceId&&n.tokens?{...n.tokens}:{}},i={token:e.token,role:t,scopes:Oe(e.scopes),updatedAtMs:Date.now()};return r.tokens[t]=i,e.adapter.writeStore(r),i}function je(e){let t=e.adapter.readStore();if(!t||t.deviceId!==e.deviceId)return;let n=De(e.role);if(!t.tokens[n])return;let r={version:1,deviceId:t.deviceId,tokens:{...t.tokens}};delete r.tokens[n],e.adapter.writeStore(r)}function Me(e){return!!e&&typeof e.getItem==`function`&&typeof e.setItem==`function`}function Ne(e){var t;let n=Object.getOwnPropertyDescriptor(globalThis,e);if(typeof process<`u`&&(t={})!=null&&t.VITEST)return n&&!n.get&&Me(n.value)?n.value:null;if(typeof window<`u`&&typeof document<`u`)try{let t=window[e];return Me(t)?t:null}catch{return null}return n&&!n.get&&Me(n.value)?n.value:null}function Pe(){return Ne(`localStorage`)}function Fe(){return Ne(`sessionStorage`)}var Ie=`openclaw.device.auth.v1`;function Le(){try{var e;let t=(e=Pe())==null?void 0:e.getItem(Ie);if(!t)return null;let n=JSON.parse(t);return!n||n.version!==1||!n.deviceId||typeof n.deviceId!=`string`||!n.tokens||typeof n.tokens!=`object`?null:n}catch{return null}}function Re(e){try{var t;(t=Pe())==null||t.setItem(Ie,JSON.stringify(e))}catch{}}function ze(e){return ke({adapter:{readStore:Le,writeStore:Re},deviceId:e.deviceId,role:e.role})}function Be(e){return Ae({adapter:{readStore:Le,writeStore:Re},deviceId:e.deviceId,role:e.role,token:e.token,scopes:e.scopes})}function Ve(e){je({adapter:{readStore:Le,writeStore:Re},deviceId:e.deviceId,role:e.role})}function He(e){"@babel/helpers - typeof";return He=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},He(e)}function Ue(e,t){if(He(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(He(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function We(e){var t=Ue(e,`string`);return He(t)==`symbol`?t:t+``}function Ge(e,t,n){return(t=We(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ke=Object.freeze({p:57896044618658097711785492504343953926634992332820282019728792003956564819949n,n:7237005577332262213973186563042994240857116359379907606001950938285454250989n,h:8n,a:57896044618658097711785492504343953926634992332820282019728792003956564819948n,d:37095705934669439343138083508754565189542113879843219016388785533085940283555n,Gx:15112221349535400772501151409588531511454012693041857206046113283949847762202n,Gy:46316835694926478169428394003475163141307993866256225615783033603165251855960n}),{p:qe,n:Je,Gx:Ye,Gy:Xe,a:Ze,d:Qe,h:$e}=Ke,et=32,tt=(...e)=>{`captureStackTrace`in Error&&typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(...e)},nt=(e=``)=>{let t=Error(e);throw tt(t,nt),t},rt=e=>typeof e==`bigint`,it=e=>typeof e==`string`,at=e=>e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1,ot=(e,t,n=``)=>{let r=at(e),i=e==null?void 0:e.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`,l=o+`expected Uint8Array`+s+`, got `+c;throw r?RangeError(l):TypeError(l)}return e},st=e=>new Uint8Array(e),ct=e=>Uint8Array.from(e),lt=(e,t)=>e.toString(16).padStart(t,`0`),ut=e=>Array.from(ot(e)).map(e=>lt(e,2)).join(``),dt={_0:48,_9:57,A:65,F:70,a:97,f:102},ft=e=>{if(e>=dt._0&&e<=dt._9)return e-dt._0;if(e>=dt.A&&e<=dt.F)return e-(dt.A-10);if(e>=dt.a&&e<=dt.f)return e-(dt.a-10)},pt=e=>{let t=`hex invalid`;if(!it(e))return nt(t);let n=e.length,r=n/2;if(n%2)return nt(t);let i=st(r);for(let n=0,a=0;n<r;n++,a+=2){let r=ft(e.charCodeAt(a)),o=ft(e.charCodeAt(a+1));if(r===void 0||o===void 0)return nt(t);i[n]=r*16+o}return i},mt=()=>{var e;return(e=globalThis)==null?void 0:e.crypto},ht=()=>{var e;return((e=mt())==null?void 0:e.subtle)??nt(`crypto.subtle must be defined, consider polyfill`)},gt=(...e)=>{let t=0;for(let n of e)t+=ot(n).length;let n=st(t),r=0;return e.forEach(e=>{n.set(e,r),r+=e.length}),n},_t=(e=et)=>mt().getRandomValues(st(e)),vt=BigInt,yt=(e,t,n,r=`bad number: out of range`)=>{if(!rt(e))throw TypeError(r);if(t<=e&&e<n)return e;throw RangeError(r)},bt=(e,t=qe)=>{let n=e%t;return n>=0n?n:t+n},xt=(1n<<255n)-1n,H=e=>{e<0n&&nt(`negative coordinate`);let t=(e>>255n)*19n+(e&xt);return t=(t>>255n)*19n+(t&xt),t%qe},St=e=>bt(e,Je),Ct=(e,t)=>{(e===0n||t<=0n)&&nt(`no inverse n=`+e+` mod=`+t);let n=bt(e,t),r=t,i=0n,a=1n,o=1n,s=0n;for(;n!==0n;){let e=r/n,t=r%n,c=i-o*e,l=a-s*e;r=n,n=t,i=o,a=s,o=c,s=l}return r===1n?bt(i,t):nt(`no inverse`)},wt=e=>{let t=qt[e];return typeof t!=`function`&&nt(`hashes.`+e+` not set`),t},Tt=e=>ot(e,64,`digest`),Et=e=>e instanceof Ot?e:nt(`Point expected`),Dt=2n**256n,Ot=class e{constructor(e,t,n,r){Ge(this,`X`,void 0),Ge(this,`Y`,void 0),Ge(this,`Z`,void 0),Ge(this,`T`,void 0);let i=Dt;this.X=yt(e,0n,i),this.Y=yt(t,0n,i),this.Z=yt(n,1n,i),this.T=yt(r,0n,i),Object.freeze(this)}static CURVE(){return Ke}static fromAffine(t){return new e(t.x,t.y,1n,H(t.x*t.y))}static fromBytes(t,n=!1){let r=Qe,i=ct(ot(t,et)),a=t[31];i[31]=a&-129;let o=Mt(i);yt(o,0n,n?Dt:qe);let s=H(o*o),{isValid:c,value:l}=It(bt(s-1n),H(r*s+1n));c||nt(`bad point: y not sqrt`);let u=(l&1n)==1n,d=(a&128)!=0;return!n&&l===0n&&d&&nt(`bad point: x==0, isLastByteOdd`),d!==u&&(l=bt(-l)),new e(l,o,1n,H(l*o))}static fromHex(t,n){return e.fromBytes(pt(t),n)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}assertValidity(){let e=Ze,t=Qe,n=this;if(n.is0())return nt(`bad point: ZERO`);let{X:r,Y:i,Z:a,T:o}=n,s=H(r*r),c=H(i*i),l=H(a*a),u=H(l*l);return H(l*(H(s*e)+c))===bt(u+H(t*H(s*c)))?H(r*i)===H(a*o)?this:nt(`bad point: equation left != right (2)`):nt(`bad point: equation left != right (1)`)}equals(e){let{X:t,Y:n,Z:r}=this,{X:i,Y:a,Z:o}=Et(e),s=H(t*o),c=H(i*r),l=H(n*o),u=H(a*r);return s===c&&l===u}is0(){return this.equals(At)}negate(){return new e(bt(-this.X),this.Y,this.Z,bt(-this.T))}double(){let{X:t,Y:n,Z:r}=this,i=Ze,a=H(t*t),o=H(n*n),s=H(2n*r*r),c=H(i*a),l=bt(t+n),u=bt(H(l*l)-a-o),d=bt(c+o),f=bt(d-s),p=bt(c-o),m=H(u*f),h=H(d*p),g=H(u*p);return new e(m,h,H(f*d),g)}add(t){let{X:n,Y:r,Z:i,T:a}=this,{X:o,Y:s,Z:c,T:l}=Et(t),u=Ze,d=Qe,f=H(n*o),p=H(r*s),m=H(H(a*d)*l),h=H(i*c),g=bt(H(bt(n+r)*bt(o+s))-f-p),_=bt(h-m),v=bt(h+m),y=bt(p-H(u*f)),b=H(g*_),x=H(v*y),S=H(g*y);return new e(b,x,H(_*v),S)}subtract(e){return this.add(Et(e).negate())}multiply(e,t=!0){if(!t&&e===0n||(yt(e,1n,Je),!t&&this.is0()))return At;if(e===1n)return this;if(this.equals(kt))return tn(e).p;let n=At,r=kt;for(let i=this;e>0n;i=i.double(),e>>=1n)e&1n?n=n.add(i):t&&(r=r.add(i));return n}multiplyUnsafe(e){return this.multiply(e,!1)}toAffine(){let{X:e,Y:t,Z:n}=this;if(this.equals(At))return{x:0n,y:1n};let r=Ct(n,qe);return H(n*r)!==1n&&nt(`invalid inverse`),{x:H(e*r),y:H(t*r)}}toBytes(){let{x:e,y:t}=this.toAffine(),n=jt(t);return n[31]|=e&1n?128:0,n}toHex(){return ut(this.toBytes())}clearCofactor(){return this.multiply(vt($e),!1)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){let e=this.multiply(Je/2n,!1).double();return Je%2n&&(e=e.add(this)),e.is0()}};Ge(Ot,`BASE`,void 0),Ge(Ot,`ZERO`,void 0);var kt=new Ot(Ye,Xe,1n,bt(Ye*Xe)),At=new Ot(0n,1n,1n,0n);Ot.BASE=kt,Ot.ZERO=At;var jt=e=>pt(lt(yt(e,0n,Dt),64)).reverse(),Mt=e=>vt(`0x`+ut(ct(ot(e)).reverse())),Nt=(e,t)=>{let n=e;for(;t-- >0n;)n=H(n*n);return n},Pt=e=>{let t=H(H(e*e)*e),n=H(Nt(H(Nt(t,2n)*t),1n)*e),r=H(Nt(n,5n)*n),i=H(Nt(r,10n)*r),a=H(Nt(i,20n)*i),o=H(Nt(a,40n)*a);return{pow_p_5_8:H(Nt(H(Nt(H(Nt(H(Nt(o,80n)*o),80n)*o),10n)*r),2n)*e),b2:t}},Ft=19681161376707505956807079304988542015446066515923890162744021073123829784752n,It=(e,t)=>{let n=H(t*H(t*t)),r=Pt(H(e*H(H(n*n)*t))).pow_p_5_8,i=H(e*H(n*r)),a=H(t*H(i*i)),o=i,s=H(i*Ft),c=a===e,l=a===bt(-e),u=a===bt(-e*Ft);return c&&(i=o),(l||u)&&(i=s),(bt(i)&1n)==1n&&(i=bt(-i)),{isValid:c||l,value:i}},Lt=e=>St(Mt(e)),Rt=(...e)=>Promise.resolve(wt(`sha512Async`)(gt(...e))).then(Tt),zt=(...e)=>Tt(wt(`sha512`)(gt(...e))),Bt=e=>{let t=ct(e),n=t.slice(0,32);n[0]&=248,n[31]&=127,n[31]|=64;let r=t.slice(32,64),i=Lt(n),a=kt.multiply(i);return{head:n,prefix:r,scalar:i,point:a,pointBytes:a.toBytes()}},Vt=e=>Rt(ot(e,et)).then(Bt),Ht=e=>Bt(zt(ot(e,et))),Ut=e=>Vt(e).then(e=>e.pointBytes),Wt=e=>Rt(e.hashable).then(e.finish),Gt=(e,t,n)=>{let{pointBytes:r,scalar:i}=e,a=Lt(t),o=kt.multiply(a).toBytes();return{hashable:gt(o,r,n),finish:e=>ot(gt(o,jt(St(a+Lt(e)*i))),64)}},Kt=async(e,t)=>{let n=ot(e),r=await Vt(t);return Wt(Gt(r,await Rt(r.prefix,n),n))},qt={sha512Async:async e=>{let t=ht(),n=gt(e);return st(await t.digest(`SHA-512`,n.buffer))},sha512:void 0},Jt=Object.freeze({getExtendedPublicKeyAsync:Vt,getExtendedPublicKey:Ht,randomSecretKey:e=>(e=e===void 0?_t(et):e,ot(e,et))}),Yt=8,Xt=Math.ceil(256/Yt)+1,Zt=2**(Yt-1),Qt=()=>{let e=[],t=kt,n=t;for(let r=0;r<Xt;r++){n=t,e.push(n);for(let r=1;r<Zt;r++)n=n.add(t),e.push(n);t=n.double()}return e},$t=void 0,en=(e,t)=>{let n=t.negate();return e?n:t},tn=e=>{let t=$t||($t=Qt()),n=At,r=kt,i=2**Yt,a=i,o=vt(i-1),s=vt(Yt);for(let i=0;i<Xt;i++){let c=Number(e&o);e>>=s,c>Zt&&(c-=a,e+=1n);let l=i*Zt,u=l,d=l+Math.abs(c)-1,f=i%2!=0,p=c<0;c===0?r=r.add(en(f,t[u])):n=n.add(en(p,t[d]))}return e!==0n&&nt(`invalid wnaf`),{p:n,f:r}},nn=`openclaw-device-identity-v1`;function rn(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``)}function an(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)i[e]=r.charCodeAt(e);return i}function on(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}async function sn(e){let t=await crypto.subtle.digest(`SHA-256`,e.slice().buffer);return on(new Uint8Array(t))}async function cn(){let e=Jt.randomSecretKey(),t=await Ut(e);return{deviceId:await sn(t),publicKey:rn(t),privateKey:rn(e)}}async function ln(){let e=Pe();try{let t=e==null?void 0:e.getItem(nn);if(t){let n=JSON.parse(t);if((n==null?void 0:n.version)===1&&typeof n.deviceId==`string`&&typeof n.publicKey==`string`&&typeof n.privateKey==`string`){let t=await sn(an(n.publicKey));if(t!==n.deviceId){let r={...n,deviceId:t};return e==null||e.setItem(nn,JSON.stringify(r)),{deviceId:t,publicKey:n.publicKey,privateKey:n.privateKey}}return{deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey}}}}catch{}let t=await cn(),n={version:1,deviceId:t.deviceId,publicKey:t.publicKey,privateKey:t.privateKey,createdAtMs:Date.now()};return e==null||e.setItem(nn,JSON.stringify(n)),t}async function un(e,t){let n=an(e);return rn(await Kt(new TextEncoder().encode(t),n))}var dn=!1;function fn(e){e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=``;for(let n=0;n<e.length;n++)t+=e[n].toString(16).padStart(2,`0`);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function pn(){dn||(dn=!0,console.warn(`[uuid] crypto API missing; refusing insecure UUID generation`))}function mn(e=globalThis.crypto){if(e&&typeof e.randomUUID==`function`)return e.randomUUID();if(e&&typeof e.getRandomValues==`function`){let t=new Uint8Array(16);return e.getRandomValues(t),fn(t)}throw pn(),Error(`Web Crypto is required for UUID generation`)}var hn=class extends Error{constructor(e){super(B({message:e.message,details:e.details})),this.name=`GatewayRequestError`,this.gatewayCode=e.code,this.details=e.details,this.retryable=e.retryable===!0,this.retryAfterMs=e.retryAfterMs}};function gn(e){return de(e==null?void 0:e.details)}function _n(e){if(!e)return!1;let t=gn(e);return t===P.AUTH_TOKEN_MISSING||t===P.AUTH_BOOTSTRAP_TOKEN_INVALID||t===P.AUTH_PASSWORD_MISSING||t===P.AUTH_PASSWORD_MISMATCH||t===P.AUTH_RATE_LIMITED||t===P.AUTH_DEVICE_TOKEN_MISMATCH||t===P.PAIRING_REQUIRED||t===P.CONTROL_UI_DEVICE_IDENTITY_REQUIRED||t===P.DEVICE_IDENTITY_REQUIRED}function vn(e){try{let t=new URL(e,window.location.href),n=t.hostname.trim().toLowerCase(),r=n===`localhost`||n===`::1`||n===`[::1]`||n===`127.0.0.1`,i=n.startsWith(`127.`);if(r||i)return!0;let a=new URL(window.location.href);return t.host===a.host}catch{return!1}}var yn=`operator`,bn=[`operator.admin`,`operator.read`,`operator.write`,`operator.approvals`,`operator.pairing`],xn=4008,Sn=4013;function Cn(e){let t=e.authToken;if(t||e.authPassword)return{token:t,deviceToken:e.authDeviceToken??e.resolvedDeviceToken,password:e.authPassword}}async function wn(e){let{deviceIdentity:t}=e;if(!t)return;let n=Date.now(),r=e.connectNonce??``,i=ye({deviceId:t.deviceId,clientId:e.client.id,clientMode:e.client.mode,role:e.role,scopes:e.scopes,signedAtMs:n,token:e.authToken??null,nonce:r}),a=await un(t.privateKey,i);return{id:t.deviceId,publicKey:t.publicKey,signature:a,signedAt:n,nonce:r}}function Tn(e){return!e.deviceTokenRetryBudgetUsed&&!e.authDeviceToken&&!!e.explicitGatewayToken&&!!e.deviceIdentity&&!!e.storedToken&&e.canRetryWithDeviceTokenHint&&vn(e.url)}var En=class{constructor(e){this.opts=e,this.ws=null,this.pending=new Map,this.closed=!1,this.lastSeq=null,this.connectNonce=null,this.connectSent=!1,this.connectTimer=null,this.connectGeneration=0,this.backoffMs=800,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,this.eventListeners=new Set}start(){this.closed=!1,this.connect()}stop(){var e;this.closed=!0,this.clearConnectTimer(),(e=this.ws)==null||e.close(),this.ws=null,this.pendingConnectError=void 0,this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,this.flushPending(Error(`gateway client stopped`))}get connected(){var e;return((e=this.ws)==null?void 0:e.readyState)===WebSocket.OPEN}connect(){if(this.closed)return;let e=new WebSocket(this.opts.url),t=++this.connectGeneration;this.ws=e,e.addEventListener(`open`,()=>this.queueConnect(e,t)),e.addEventListener(`message`,n=>{this.isActiveSocket(e,t)&&this.handleMessage(e,t,String(n.data??``))}),e.addEventListener(`close`,t=>{var n,r;if(this.ws!==e)return;let i=t.reason??``,a=this.pendingConnectError;if(this.pendingConnectError=void 0,this.ws=null,this.pendingStartupReconnectDelayMs!==null){this.flushPending(Error(`gateway closed (${t.code}): ${i}`)),this.scheduleReconnect();return}this.flushPending(Error(`gateway closed (${t.code}): ${i}`)),(n=(r=this.opts).onClose)==null||n.call(r,{code:t.code,reason:i,error:a}),!(gn(a)===P.AUTH_TOKEN_MISMATCH&&this.deviceTokenRetryBudgetUsed&&!this.pendingDeviceTokenRetry)&&(_n(a)||this.scheduleReconnect())}),e.addEventListener(`error`,()=>{})}scheduleReconnect(){if(this.closed)return;let e=this.pendingStartupReconnectDelayMs;this.pendingStartupReconnectDelayMs=null;let t=e??this.backoffMs;e===null&&(this.backoffMs=Math.min(this.backoffMs*1.7,15e3)),this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.connect()},t)}flushPending(e){for(let[t,n]of this.pending)this.emitRequestTiming(t,n,!1,`CLIENT_CLOSED`),n.reject(e);this.pending.clear()}nowMs(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}emitRequestTiming(e,t,n,r){let i=this.nowMs();try{var a,o;(a=(o=this.opts).onRequestTiming)==null||a.call(o,{id:e,method:t.method,ok:n,durationMs:Math.max(0,i-t.startedAtMs),startedAtMs:t.startedAtMs,endedAtMs:i,errorCode:r})}catch(e){console.error(`[gateway] request timing handler error:`,e)}}buildConnectClient(){return{id:this.opts.clientName??be.CONTROL_UI,version:this.opts.clientVersion??`control-ui`,platform:this.opts.platform??navigator.platform??`web`,mode:this.opts.mode??xe.WEBCHAT,instanceId:this.opts.instanceId}}buildConnectParams(e){return{minProtocol:3,maxProtocol:3,client:e.client,role:e.role,scopes:e.scopes,device:e.device,caps:[`tool-events`],auth:e.auth,userAgent:navigator.userAgent,locale:navigator.language}}async buildConnectPlan(e){var t,n;let r=yn,i=[...bn],a=this.buildConnectClient(),o=((t=this.opts.token)==null?void 0:t.trim())||void 0,s=((n=this.opts.password)==null?void 0:n.trim())||void 0,c=typeof crypto<`u`&&!!crypto.subtle,l=null,u={authToken:o,authPassword:s,canFallbackToShared:!1};return c&&(l=await ln(),u=this.selectConnectAuth({role:r,deviceId:l.deviceId})),{role:r,scopes:i,client:a,explicitGatewayToken:o,selectedAuth:u,auth:Cn(u),deviceIdentity:l,device:await wn({deviceIdentity:l,client:a,role:r,scopes:i,authToken:u.authToken,connectNonce:e})}}handleConnectHello(e,t,n,r){var i,a,o;this.isActiveSocket(n,r)&&(this.pendingDeviceTokenRetry=!1,this.deviceTokenRetryBudgetUsed=!1,this.pendingStartupReconnectDelayMs=null,!(e==null||(i=e.auth)==null)&&i.deviceToken&&t.deviceIdentity&&Be({deviceId:t.deviceIdentity.deviceId,role:e.auth.role??t.role,token:e.auth.deviceToken,scopes:e.auth.scopes??[]}),this.backoffMs=800,(a=(o=this.opts).onHello)==null||a.call(o,e))}handleConnectFailure(e,t,n,r){if(!this.isActiveSocket(n,r))return;let i=e instanceof hn?gn(e):null,a=e instanceof hn?fe(e.details):{},o=a.recommendedNextStep===`retry_with_device_token`,s=a.canRetryWithDeviceToken===!0||o||i===P.AUTH_TOKEN_MISMATCH;Tn({deviceTokenRetryBudgetUsed:this.deviceTokenRetryBudgetUsed,authDeviceToken:t.selectedAuth.authDeviceToken,explicitGatewayToken:t.explicitGatewayToken,deviceIdentity:t.deviceIdentity,storedToken:t.selectedAuth.storedToken,canRetryWithDeviceTokenHint:s,url:this.opts.url})&&(this.pendingDeviceTokenRetry=!0,this.deviceTokenRetryBudgetUsed=!0),e instanceof hn?this.pendingConnectError={code:e.gatewayCode,message:e.message,details:e.details,retryable:e.retryable,retryAfterMs:e.retryAfterMs}:this.pendingConnectError=void 0,t.selectedAuth.storedToken&&(t.selectedAuth.resolvedDeviceToken===t.selectedAuth.storedToken||t.selectedAuth.authDeviceToken===t.selectedAuth.storedToken)&&t.deviceIdentity&&i===P.AUTH_DEVICE_TOKEN_MISMATCH&&Ve({deviceId:t.deviceIdentity.deviceId,role:t.role});let c=Ee(e);if(c!==null&&(this.pendingStartupReconnectDelayMs=c),Te(e)){n.close(Sn,`gateway starting`);return}n.close(xn,`connect failed`)}isActiveSocket(e,t){return!this.closed&&this.ws===e&&this.connectGeneration===t}async sendConnect(e,t){if(!this.isActiveSocket(e,t)||e.readyState!==WebSocket.OPEN||this.connectSent)return;this.connectSent=!0,this.clearConnectTimer();let n=await this.buildConnectPlan(this.connectNonce);!this.isActiveSocket(e,t)||e.readyState!==WebSocket.OPEN||(this.pendingDeviceTokenRetry&&n.selectedAuth.authDeviceToken&&(this.pendingDeviceTokenRetry=!1),this.requestOnSocket(e,`connect`,this.buildConnectParams(n)).then(r=>this.handleConnectHello(r,n,e,t)).catch(r=>this.handleConnectFailure(r,n,e,t)))}handleMessage(e,t,n){let r;try{r=JSON.parse(n)}catch{return}let i=r;if(i.type===`event`){let n=r;if(n.event===`connect.challenge`){let r=n.payload,i=r&&typeof r.nonce==`string`?r.nonce:null;i&&(this.connectNonce=i,this.sendConnect(e,t));return}let i=typeof n.seq==`number`?n.seq:null;if(i!==null){if(this.lastSeq!==null&&i>this.lastSeq+1){var a,o;(a=(o=this.opts).onGap)==null||a.call(o,{expected:this.lastSeq+1,received:i})}this.lastSeq=i}try{var s,c;(s=(c=this.opts).onEvent)==null||s.call(c,n);for(let e of this.eventListeners)e(n)}catch(e){console.error(`[gateway] event handler error:`,e)}return}if(i.type===`res`){let e=r,t=this.pending.get(e.id);if(!t)return;if(this.pending.delete(e.id),e.ok)this.emitRequestTiming(e.id,t,!0),t.resolve(e.payload);else{var l,u,d,f,p,m;this.emitRequestTiming(e.id,t,!1,(l=e.error)==null?void 0:l.code),t.reject(new hn({code:((u=e.error)==null?void 0:u.code)??`UNAVAILABLE`,message:((d=e.error)==null?void 0:d.message)??`request failed`,details:(f=e.error)==null?void 0:f.details,retryable:(p=e.error)==null?void 0:p.retryable,retryAfterMs:(m=e.error)==null?void 0:m.retryAfterMs}))}return}}selectConnectAuth(e){var t,n;let r=((t=this.opts.token)==null?void 0:t.trim())||void 0,i=((n=this.opts.password)==null?void 0:n.trim())||void 0,a=ze({deviceId:e.deviceId,role:e.role}),o=(a==null?void 0:a.scopes)??[],s=e.role!==yn||o.includes(`operator.read`)||o.includes(`operator.write`)||o.includes(`operator.admin`)?a==null?void 0:a.token:void 0,c=this.pendingDeviceTokenRetry&&!!r&&!!s&&vn(this.opts.url),l=r||i?void 0:s??void 0;return{authToken:r??l,authDeviceToken:c?s??void 0:void 0,authPassword:i,resolvedDeviceToken:l,storedToken:s??void 0,canFallbackToShared:!!(s&&r)}}request(e,t){return!this.ws||this.ws.readyState!==WebSocket.OPEN?Promise.reject(Error(`gateway not connected`)):this.requestOnSocket(this.ws,e,t)}requestOnSocket(e,t,n){if(this.ws!==e||e.readyState!==WebSocket.OPEN)return Promise.reject(Error(`gateway not connected`));let r=mn(),i={type:`req`,id:r,method:t,params:n},a=this.nowMs(),o=new Promise((e,n)=>{this.pending.set(r,{resolve:t=>e(t),reject:n,method:t,startedAtMs:a})});return e.send(JSON.stringify(i)),o}addEventListener(e){return this.eventListeners.add(e),()=>{this.eventListeners.delete(e)}}queueConnect(e,t){this.isActiveSocket(e,t)&&(this.connectNonce=null,this.connectSent=!1,this.clearConnectTimer(),this.connectTimer=window.setTimeout(()=>{this.connectTimer=null,this.sendConnect(e,t)},750))}clearConnectTimer(){this.connectTimer!==null&&(window.clearTimeout(this.connectTimer),this.connectTimer=null)}};function Dn(e){return e instanceof hn?gn(e)===P.AUTH_UNAUTHORIZED?!0:e.message.includes(`missing scope: operator.read`):!1}function On(e){return`This connection is missing operator.read, so ${e} cannot be loaded yet.`}async function kn(e,t){if(!(!e.client||!e.connected)&&!e.channelsLoading){e.channelsLoading=!0,e.channelsError=null;try{e.channelsSnapshot=await e.client.request(`channels.status`,{probe:t,timeoutMs:8e3}),e.channelsLastSuccess=Date.now()}catch(t){Dn(t)?(e.channelsSnapshot=null,e.channelsError=On(`channel status`)):e.channelsError=String(t)}finally{e.channelsLoading=!1}}}async function An(e,t){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let n=await e.client.request(`web.login.start`,{force:t,timeoutMs:3e4});e.whatsappLoginMessage=n.message??null,e.whatsappLoginQrDataUrl=n.qrDataUrl??null,e.whatsappLoginConnected=typeof n.connected==`boolean`?n.connected:null}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function jn(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{let t=await e.client.request(`web.login.wait`,{timeoutMs:12e4,currentQrDataUrl:e.whatsappLoginQrDataUrl??void 0});e.whatsappLoginMessage=t.message??null,e.whatsappLoginConnected=t.connected??null,t.qrDataUrl?e.whatsappLoginQrDataUrl=t.qrDataUrl:t.connected&&(e.whatsappLoginQrDataUrl=null)}catch(t){e.whatsappLoginMessage=String(t),e.whatsappLoginConnected=null}finally{e.whatsappBusy=!1}}}async function Mn(e){if(!(!e.client||!e.connected||e.whatsappBusy)){e.whatsappBusy=!0;try{await e.client.request(`channels.logout`,{channel:`whatsapp`}),e.whatsappLoginMessage=`Logged out.`,e.whatsappLoginQrDataUrl=null,e.whatsappLoginConnected=null}catch(t){e.whatsappLoginMessage=String(t)}finally{e.whatsappBusy=!1}}}function Nn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.prototype.toString.call(e)===`[object Object]`}var Pn=new Set([`__proto__`,`prototype`,`constructor`]);function Fn(e){return Pn.has(e)}function In(e){return Nn(e)?typeof e.id==`string`&&e.id.length>0:!1}function Ln(e,t,n){if(!e.every(In))return;let r=[...e],i=new Map;for(let[e,t]of r.entries()){if(!In(t))return;i.set(t.id,e)}for(let e of t){if(!In(e)){r.push(structuredClone(e));continue}let t=i.get(e.id);if(t===void 0){r.push(structuredClone(e)),i.set(e.id,r.length-1);continue}r[t]=Rn(r[t],e,n)}return r}function Rn(e,t,n={}){if(!Nn(t))return t;let r=Nn(e)?{...e}:{};for(let[e,i]of Object.entries(t))if(!Fn(e)){if(i===null){delete r[e];continue}if(n.mergeObjectArraysById&&Array.isArray(r[e])&&Array.isArray(i)){let t=Ln(r[e],i,n);if(t){r[e]=t;continue}}if(Nn(i)){let t=r[e];r[e]=Rn(Nn(t)?t:{},i,n);continue}r[e]=i}return r}function zn(e){if(e)return Array.isArray(e.type)?e.type.find(e=>e!==`null`)??e.type[0]:e.type}function Bn(e){if(!e)return``;if(e.default!==void 0)return e.default;switch(zn(e)){case`object`:return{};case`array`:return[];case`boolean`:return!1;case`number`:case`integer`:return 0;case`string`:return``;default:return``}}function Vn(e){return e.filter(e=>typeof e==`string`).join(`.`)}function Hn(e,t){let n=t[Vn(e)];if(n)return n;let r=e.map(String);for(let[e,n]of Object.entries(t)){if(!e.includes(`*`))continue;let t=e.split(`.`);if(t.length!==r.length)continue;let i=!0;for(let e=0;e<r.length;e+=1)if(t[e]!==`*`&&t[e]!==r[e]){i=!1;break}if(i)return n}}function Un(e){return e.replace(/_/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/\s+/g,` `).replace(/^./,e=>e.toUpperCase())}var Wn=[`maxtokens`,`maxoutputtokens`,`maxinputtokens`,`maxcompletiontokens`,`contexttokens`,`totaltokens`,`tokencount`,`tokenlimit`,`tokenbudget`,`passwordfile`],Gn=[/token$/i,/password/i,/secret/i,/api.?key/i,/serviceaccount(?:ref)?$/i],Kn=/^\$\{[^}]*\}$/,qn=`[redacted - click reveal to view]`,Jn=64,Yn=2e4;function Xn(){return{visited:0}}function Zn(e,t){return!(t>Jn||(e.visited+=1,e.visited>Yn))}function Qn(e){return Kn.test(e.trim())}function $n(e){let t=d(e);return!Wn.some(e=>t.endsWith(e))&&Gn.some(t=>t.test(e))}function er(e){return typeof e==`string`?e.trim().length>0&&!Qn(e):e!=null}function tr(e){return(e==null?void 0:e.sensitive)??!1}function nr(e,t,n){return rr(e,t,n,Xn(),0)}function rr(e,t,n,r,i){if(!Zn(r,i))return!0;let a=Vn(t);return(tr(Hn(t,n))||$n(a))&&er(e)?!0:Array.isArray(e)?e.some((e,a)=>rr(e,[...t,a],n,r,i+1)):e&&typeof e==`object`?Object.entries(e).some(([e,a])=>rr(a,[...t,e],n,r,i+1)):!1}function ir(e,t,n){return ar(e,t,n,Xn(),0)}function ar(e,t,n,r,i){if(!Zn(r,i))return 1;if(e==null)return 0;let a=Vn(t);return(tr(Hn(t,n))||$n(a))&&er(e)?1:Array.isArray(e)?e.reduce((e,a,o)=>e+ar(a,[...t,o],n,r,i+1),0):e&&typeof e==`object`?Object.entries(e).reduce((e,[a,o])=>e+ar(o,[...t,a],n,r,i+1),0):0}function or(e,t){let n=e.trim();if(n===``)return;let r=Number(n);return!Number.isFinite(r)||t&&!Number.isInteger(r)?e:r}function sr(e){let t=e.trim();return t===`true`?!0:t===`false`?!1:e}function cr(e,t){if(e==null)return e;if(t.allOf&&t.allOf.length>0){let n=e;for(let e of t.allOf)n=cr(n,e);return n}let n=zn(t);if(t.anyOf||t.oneOf){let n=(t.anyOf??t.oneOf??[]).filter(e=>!(e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)));if(n.length===1)return cr(e,n[0]);if(typeof e==`string`)for(let t of n){let n=zn(t);if(n===`number`||n===`integer`){let t=or(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}if(n===`boolean`){let t=sr(e);if(typeof t==`boolean`)return t}}for(let t of n){let n=zn(t);if(n===`object`&&typeof e==`object`&&!Array.isArray(e)||n===`array`&&Array.isArray(e))return cr(e,t)}return e}if(n===`number`||n===`integer`){if(typeof e==`string`){let t=or(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}return e}if(n===`boolean`){if(typeof e==`string`){let t=sr(e);if(typeof t==`boolean`)return t}return e}if(n===`object`){if(typeof e!=`object`||Array.isArray(e))return e;let n=e,r=t.properties??{},i=t.additionalProperties&&typeof t.additionalProperties==`object`?t.additionalProperties:null,a={};for(let[e,t]of Object.entries(n)){let n=r[e]??i,o=n?cr(t,n):t;o!==void 0&&(a[e]=o)}return a}if(n===`array`){if(!Array.isArray(e))return e;if(Array.isArray(t.items)){let n=t.items;return e.map((e,t)=>{let r=t<n.length?n[t]:void 0;return r?cr(e,r):e})}let n=t.items;return n?e.map(e=>cr(e,n)).filter(e=>e!==void 0):e}return e}function lr(e){return structuredClone(e)}function ur(e){return`${JSON.stringify(e,null,2).trimEnd()}\n`}var dr=new Set([`__proto__`,`prototype`,`constructor`]);function fr(e){return typeof e==`string`&&dr.has(e)}function pr(e,t,n){if(t.length===0||t.some(fr))return null;let r=e;for(let e=0;e<t.length-1;e+=1){let i=t[e],a=t[e+1];if(typeof i==`number`){if(!Array.isArray(r))return null;if(r[i]==null){if(!n)return null;r[i]=typeof a==`number`?[]:{}}r=r[i];continue}if(typeof r!=`object`||!r)return null;let o=r;if(o[i]==null){if(!n)return null;o[i]=typeof a==`number`?[]:{}}r=o[i]}return{current:r,lastKey:t[t.length-1]}}function mr(e,t,n){let r=pr(e,t,!0);if(r){if(typeof r.lastKey==`number`){Array.isArray(r.current)&&(r.current[r.lastKey]=n);return}typeof r.current==`object`&&r.current!=null&&(r.current[r.lastKey]=n)}}function hr(e,t){let n=pr(e,t,!1);if(n){if(typeof n.lastKey==`number`){Array.isArray(n.current)&&n.current.splice(n.lastKey,1);return}typeof n.current==`object`&&n.current!=null&&delete n.current[n.lastKey]}}async function gr(e,t={}){if(!(!e.client||!e.connected)){e.configLoading=!0,e.lastError=null;try{yr(e,await e.client.request(`config.get`,{}),t)}catch(t){e.lastError=String(t)}finally{e.configLoading=!1}}}async function _r(e){if(!(!e.client||!e.connected)&&!e.configSchemaLoading){e.configSchemaLoading=!0;try{vr(e,await e.client.request(`config.schema`,{}))}catch(t){e.lastError=String(t)}finally{e.configSchemaLoading=!1}}}function vr(e,t){e.configSchema=t.schema??null,e.configUiHints=t.uiHints??{},e.configSchemaVersion=t.version??null}function yr(e,t,n={}){var r;let i=e.configFormDirty&&n.discardPendingChanges!==!0,a=e.configDraftBaseHash??((r=e.configSnapshot)==null?void 0:r.hash)??null;e.configSnapshot=t,typeof t.raw!=`string`&&e.configFormMode===`raw`&&(e.configFormMode=`form`);let o=typeof t.raw==`string`?t.raw:t.config&&typeof t.config==`object`?ur(t.config):e.configRaw;!i||e.configFormMode===`raw`?e.configRaw=o:e.configForm?e.configRaw=ur(e.configForm):e.configRaw=o,e.configValid=typeof t.valid==`boolean`?t.valid:null,e.configIssues=Array.isArray(t.issues)?t.issues:[],i?e.configDraftBaseHash=a:(e.configForm=lr(t.config??{}),e.configFormOriginal=lr(t.config??{}),e.configRawOriginal=o,e.configFormDirty=!1,e.configDraftBaseHash=t.hash??null)}function br(e){return!e||typeof e!=`object`||Array.isArray(e)?null:e}function xr(e){var t;if(e.configFormMode===`raw`&&typeof((t=e.configSnapshot)==null?void 0:t.raw)!=`string`)throw Error(`Raw config editing is unavailable for this snapshot. Switch to Form mode.`);if(e.configFormMode!==`form`||!e.configForm)return e.configRaw;let n=br(e.configSchema);return ur(n?cr(e.configForm,n):e.configForm)}function Sr(e){let t=(e.status??`error`).trim()||`error`,n=(e.reason??`unexpected-error`).trim()||`unexpected-error`;return{tone:t===`skipped`?`warn`:`danger`,text:`Update ${t}: ${n}. ${{dirty:`Commit or stash changes, then retry.`,"no-upstream":`Set an upstream branch, then retry.`,"not-git-install":"Not a git checkout. Run `openclaw update` from the CLI for a global reinstall.","not-openclaw-root":`Run the update from a 玺虾 checkout or use the CLI global reinstall path.`,"deps-install-failed":`Dependency install failed. Fix the install error and retry.`,"build-failed":`Build failed. Fix the build error and retry.`,"ui-build-failed":`The control UI rebuild failed. Fix the UI build error and retry.`,"global-install-failed":`The global package install did not verify on disk. Retry or reinstall from the CLI.`,"restart-disabled":"The update was not applied because gateway restarts are disabled. Enable restarts in config, then retry — or run `openclaw update` from the CLI.","restart-unavailable":`This global install cannot be safely replaced while restarts are disabled and no supervisor is present.`,"restart-unhealthy":`The replacement process never became healthy. The previous process stayed up so you can recover.`,"doctor-failed":"Doctor repair failed. Run `openclaw doctor --non-interactive` and retry."}[n]??`See the gateway logs for the exact failure and retry once the cause is fixed.`}`}}async function Cr(e,t,n,r={}){if(!e.client||!e.connected)return!1;e[n]=!0,e.lastError=null;try{var i;let n=xr(e),a=e.configDraftBaseHash??((i=e.configSnapshot)==null?void 0:i.hash);return a?(await e.client.request(t,{raw:n,baseHash:a,...r}),e.configFormDirty=!1,e.configDraftBaseHash=null,await gr(e),!0):(e.lastError=`Config hash missing; reload and retry.`,!1)}catch(t){return e.lastError=String(t),!1}finally{e[n]=!1}}function wr(e,t){var n;let r=lr(e.configFormOriginal??((n=e.configSnapshot)==null?void 0:n.config)??{}),i=ur(t),a=ur(r);e.configForm=t,e.configRaw=i,e.configFormDirty=i!==a}async function Tr(e){return Cr(e,`config.set`,`configSaving`)}async function Er(e){return Cr(e,`config.apply`,`configApplying`,{sessionKey:e.applySessionKey})}async function Dr(e){if(!(!e.client||!e.connected)){e.updateRunning=!0,e.lastError=null,e.updateStatusBanner=null;try{var t,n;let i=await e.client.request(`update.run`,{sessionKey:e.applySessionKey}),a=((t=i.result)==null?void 0:t.status)??(i.ok===!0?`ok`:`error`);if(a===`ok`&&i.ok===!0){var r;e.pendingUpdateExpectedVersion=((r=i.result)==null||(r=r.after)==null?void 0:r.version)??null;return}e.pendingUpdateExpectedVersion=null,e.updateStatusBanner=Sr({status:a,reason:(n=i.result)==null?void 0:n.reason})}catch(t){e.lastError=String(t),e.pendingUpdateExpectedVersion=null}finally{e.updateRunning=!1}}}function Or(e,t){var n;let r=lr(e.configForm??((n=e.configSnapshot)==null?void 0:n.config)??{});t(r),wr(e,r)}function kr(e,t,n){Or(e,e=>mr(e,t,n))}function Ar(e,t){var n,r;let i=(n=e.configSnapshot)!=null&&n.config&&typeof e.configSnapshot.config==`object`&&!Array.isArray(e.configSnapshot.config)?e.configSnapshot.config:null,a=e.configForm??i;if(!a||!e.configForm&&!((r=e.configSnapshot)!=null&&r.hash))return;let o=Rn(lr(a),t);!o||typeof o!=`object`||Array.isArray(o)||wr(e,lr(o))}function jr(e){var t,n,r;e.configForm=lr(e.configFormOriginal??((t=e.configSnapshot)==null?void 0:t.config)??{}),e.configRaw=e.configRawOriginal??ur(e.configFormOriginal??((n=e.configSnapshot)==null?void 0:n.config)??{}),e.configFormDirty=!1,e.configDraftBaseHash=((r=e.configSnapshot)==null?void 0:r.hash)??null}function Mr(e,t){Or(e,e=>hr(e,t))}function Nr(e,t){var n;let r=t.trim();if(!r)return-1;let i=e==null||(n=e.agents)==null?void 0:n.list;return Array.isArray(i)?i.findIndex(e=>e&&typeof e==`object`&&`id`in e&&e.id===r):-1}function Pr(e,t){var n,r;let i=t.trim();if(!i)return-1;let a=e.configForm??((n=e.configSnapshot)==null?void 0:n.config),o=Nr(a,i);if(o>=0)return o;let s=a==null||(r=a.agents)==null?void 0:r.list,c=Array.isArray(s)?s.length:0;return kr(e,[`agents`,`list`,c,`id`],i),c}function Fr(e,t){var n;let r=t.trim();if(!r)return!1;let i=Nr(e.configForm??((n=e.configSnapshot)==null?void 0:n.config),r);return i<0?!1:(Or(e,e=>{var t;let n=e==null||(t=e.agents)==null?void 0:t.list;if(Array.isArray(n))for(let e=0;e<n.length;e++){let t=n[e];if(!t||typeof t!=`object`||Array.isArray(t))continue;let r=t;e===i?r.default=!0:delete r.default}}),!0)}async function Ir(e){if(!(!e.client||!e.connected))try{await e.client.request(`config.openFile`,{})}catch{var t;let n=(t=e.configSnapshot)==null?void 0:t.path;if(n)try{await navigator.clipboard.writeText(n)}catch{}}}function Lr(e){let{values:t,original:n}=e;return t.name!==n.name||t.displayName!==n.displayName||t.about!==n.about||t.picture!==n.picture||t.banner!==n.banner||t.website!==n.website||t.nip05!==n.nip05||t.lud16!==n.lud16}function Rr(e){let{state:t,callbacks:r,accountId:a}=e,o=Lr(t),s=(e,a,o={})=>{let{type:s=`text`,placeholder:c,maxLength:l,help:u}=o,d=t.values[e]??``,f=t.fieldErrors[e],p=`nostr-profile-${e}`;return s===`textarea`?n`
3
3
  <div class="form-field" style="margin-bottom: 12px;">
4
4
  <label for="${p}" style="display: block; margin-bottom: 4px; font-weight: 500;">
@@ -2462,7 +2462,7 @@ ${e.outputText}</pre
2462
2462
  title=${`消息渠道`}
2463
2463
  aria-label=${`消息渠道(微信/企业微信/飞书/钉钉)`}
2464
2464
  aria-pressed=${r}
2465
- @click=${()=>{let n=e.activePanelId!==`cnChannels`;e.activePanelId=n?`cnChannels`:null,n&&!e.cnChannelsData&&Az(async()=>{let{loadCnChannels:e}=await import(`./channels.cn-BmuE_4-S.js`);return{loadCnChannels:e}},__vite__mapDeps([0,1])).then(({loadCnChannels:n})=>{n(e,t)}),t==null||t()}}
2465
+ @click=${()=>{let n=e.activePanelId!==`cnChannels`;e.activePanelId=n?`cnChannels`:null,n&&!e.cnChannelsData&&Az(async()=>{let{loadCnChannels:e}=await import(`./channels.cn-4thW_D4s.js`);return{loadCnChannels:e}},__vite__mapDeps([0,1])).then(({loadCnChannels:n})=>{n(e,t)}),t==null||t()}}
2466
2466
  >
2467
2467
  ${U.messageSquare}
2468
2468
  </button>
@@ -7045,7 +7045,7 @@ ${e.pluginDescription}</pre
7045
7045
  </div>
7046
7046
  `:i}
7047
7047
  </div>
7048
- `}var YK=!1;window.toggleProModeSwitch=()=>{var e;YK=!YK;let t=document.querySelector(`openclaw-app`);t==null||(e=t.requestUpdate)==null||e.call(t)};var XK=rH(()=>Az(()=>import(`./agents-EXiyiWcj.js`),__vite__mapDeps([2,3,1,4,5,6])),BK),ZK=rH(()=>Az(()=>import(`./channels-EaU0sKIP.js`),__vite__mapDeps([7,1,5])),BK),QK=rH(()=>Az(()=>import(`./cron-tZQOlNT8.js`),__vite__mapDeps([8,1])),BK),$K=rH(()=>Az(()=>import(`./debug-Bos7BVqr.js`),__vite__mapDeps([9,1])),BK),eq=rH(()=>Az(()=>import(`./instances-CxttD6fs.js`),__vite__mapDeps([10,1])),BK),tq=rH(()=>Az(()=>import(`./logs-DoHkFjmj.js`),__vite__mapDeps([11,3,1])),BK),nq=rH(()=>Az(()=>import(`./nodes-Ct8gvuAJ.js`),__vite__mapDeps([12,3,1])),BK),rq=rH(()=>Az(()=>import(`./sessions-EG_sUxo9.js`),__vite__mapDeps([13,3,1])),BK),iq=rH(()=>Az(()=>import(`./skills-BimtDTP5.js`),__vite__mapDeps([14,3,1,6])),BK),aq=rH(()=>Az(()=>import(`./skill-center-8t3ZKaZ1.js`),__vite__mapDeps([15,1])),BK),oq=rH(()=>Az(()=>import(`./filespace-BJ6ekAUx.js`),__vite__mapDeps([16,1])),BK),sq=rH(()=>Az(()=>import(`./channels.cn-BmuE_4-S.js`),__vite__mapDeps([0,1])),BK);function cq(e){return typeof e!=`number`||!Number.isFinite(e)?null:new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function lq(e){if(!(e!=null&&e.phases))return null;let t;for(let n of Object.values(e.phases))!n.enabled||typeof n.nextRunAtMs!=`number`||(t===void 0||n.nextRunAtMs<t)&&(t=n.nextRunAtMs);return cq(t)}var uq=null,dq=`openclaw:control-ui:update-banner-dismissed:v1`,fq=[`off`,`minimal`,`low`,`medium`,`high`],pq=[`UTC`,`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`];function mq(e){return/^https?:\/\//i.test(e.trim())}function hq(e){return typeof e==`string`?e.trim():``}function gq(e){let t=new Set,n=[];for(let r of e){let e=r.trim();if(!e)continue;let i=e.toLowerCase();t.has(i)||(t.add(i),n.push(e))}return n}function _q(){try{var e;let t=(e=Pe())==null?void 0:e.getItem(dq);if(!t)return null;let n=JSON.parse(t);return!n||typeof n.latestVersion!=`string`?null:{latestVersion:n.latestVersion,channel:typeof n.channel==`string`?n.channel:null,dismissedAtMs:typeof n.dismissedAtMs==`number`?n.dismissedAtMs:Date.now()}}catch{return null}}function vq(e){let t=_q();if(!t)return!1;let n=e,r=n&&typeof n.latestVersion==`string`?n.latestVersion:null,i=n&&typeof n.channel==`string`?n.channel:null;return!!(r&&t.latestVersion===r&&t.channel===i)}function yq(e){let t=e,n=t&&typeof t.latestVersion==`string`?t.latestVersion:null;if(!n)return;let r={latestVersion:n,channel:t&&typeof t.channel==`string`?t.channel:null,dismissedAtMs:Date.now()};try{var i;(i=Pe())==null||i.setItem(dq,JSON.stringify(r))}catch{}}var bq=[`channels`,`messages`,`broadcast`,`__notifications__`,`talk`,`audio`],xq=[`__appearance__`,`ui`,`wizard`],Sq=[`commands`,`hooks`,`bindings`,`cron`,`approvals`,`plugins`],Cq=[`gateway`,`web`,`browser`,`nodeHost`,`canvasHost`,`discovery`,`media`,`acp`,`mcp`],wq=[`agents`,`models`,`skills`,`tools`,`memory`,`session`],Tq=new Set([...bq,...xq,...Sq,...Cq,...wq]);function Eq(e,t){return e&&Tq.has(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function Dq(e,t,n){return e&&!n.includes(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function Oq(e){var t,n;let r=((t=e.agentsList)==null?void 0:t.agents)??[],i=Zi(e.sessionKey),a=(i==null?void 0:i.agentId)??((n=e.agentsList)==null?void 0:n.defaultId)??`main`,o=r.find(e=>e.id===a),s=o==null?void 0:o.identity,c=(s==null?void 0:s.avatarUrl)??(s==null?void 0:s.avatar);if(c&&qf(c))return c}function kq(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.ui;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.assistant;return!n||typeof n!=`object`||Array.isArray(n)?null:u(n.avatar)??null}function Aq(e,t){let n=uf(e??``),r=encodeURIComponent(t);return n?`${n}/avatar/${r}`:`/avatar/${r}`}var jq=[{id:`telegram`,label:`Telegram`},{id:`discord`,label:`Discord`},{id:`slack`,label:`Slack`},{id:`whatsapp`,label:`WhatsApp`},{id:`signal`,label:`Signal`},{id:`imessage`,label:`iMessage`}];function Mq(e){let t=e.trim();return t?t.split(/[-_]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function Nq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return[];let r=`channels`in n&&n.channels&&typeof n.channels==`object`?n.channels:{},i=Object.keys(r).filter(e=>e.trim().length>0),a=i.length>0?i.toSorted((e,t)=>e.localeCompare(t)):jq.map(({id:e})=>e),o=new Map(jq.map(({id:e,label:t})=>[e,t])),s=[];for(let e of a){let t=r[e],n=typeof t==`object`&&!!t&&Object.keys(t).length>0;s.push({id:e,label:o.get(e)??Mq(e),connected:n,detail:n?`Configured`:void 0})}return s}function Pq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return 0;let r=n.mcp;if(!r||typeof r!=`object`)return 0;let i=`servers`in r&&r.servers&&typeof r.servers==`object`?r.servers:{};return Object.keys(i).length}function Fq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return{gatewayAuth:`unknown`,execPolicy:`unknown`,deviceAuth:!1};let r=n,i=`gateway`in r&&r.gateway&&typeof r.gateway==`object`?r.gateway:null,a=i&&`auth`in i&&i.auth&&typeof i.auth==`object`?i.auth:null,o=`unknown`;a&&(o=(typeof a.mode==`string`?a.mode.trim():``)||(a.password?`password`:a.token?`token`:a.trustedProxy?`trusted-proxy`:`none`));let s=r.agents,c=`allowlist`;if(s&&typeof s==`object`){let e=s.defaults;if(e&&typeof e==`object`){let t=e.exec;if(t&&typeof t==`object`){let e=t.security;typeof e==`string`&&(c=e)}}}let l=!0;if(i){let e=`controlUi`in i&&i.controlUi&&typeof i.controlUi==`object`?i.controlUi:null;(e==null?void 0:e.dangerouslyDisableDeviceAuth)===!0&&(l=!1)}return{gatewayAuth:o,execPolicy:c,deviceAuth:l}}function Iq(e){var t;return(t=e.sessionsResult)==null||(t=t.sessions)==null?void 0:t.find(t=>t.key===e.sessionKey)}function Lq(e,t){return WW({open:e.cronQuickCreateOpen,step:e.cronQuickCreateStep,draft:e.cronQuickCreateDraft??FW(),onDraftChange:n=>{e.cronQuickCreateDraft={...e.cronQuickCreateDraft??FW(),...n},t==null||t()},onStepChange:n=>{e.cronQuickCreateStep=n,t==null||t()},onCreate:()=>{let n=LW(e.cronQuickCreateDraft??FW());e.cronEditingJobId=null,e.cronForm={...hm,...n},t==null||t(),(async()=>{if(await zh(e),e.cronError||xh(e.cronFieldErrors)){t==null||t();return}e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t==null||t()})()},onCancel:()=>{e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t==null||t()}})}function Rq(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function zq(e){let t=e.lastIndexOf(`.`),n=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(n)?{iconClass:`file-tree-panel__item-icon--image`,icon:U.image,ext:n}:[`ts`,`tsx`,`js`,`jsx`,`py`,`rs`,`go`,`sh`,`json`,`yaml`,`yml`,`toml`].includes(n)?{iconClass:`file-tree-panel__item-icon--code`,icon:U.fileCode,ext:n}:[`md`,`txt`,`pdf`,`docx`,`csv`].includes(n)?{iconClass:`file-tree-panel__item-icon--doc`,icon:U.fileText,ext:n}:{iconClass:`file-tree-panel__item-icon--default`,icon:U.fileText,ext:n}}function Bq(e){var t;let n=new Map;for(let r of((t=e.sessionsResult)==null?void 0:t.sessions)??[])r.sessionId&&n.set(r.sessionId,r.displayName??r.label??r.key);return n}function Vq(e,t,r,a,o,s){let c=o*16;return a.map(a=>{if(a.isDir){let l=e.fileTreeExpandedDirs.includes(a.path),u=e.fileTreeDirLoading.includes(a.path),d=e.fileTreeDirChildren[a.path];return n`
7048
+ `}var YK=!1;window.toggleProModeSwitch=()=>{var e;YK=!YK;let t=document.querySelector(`openclaw-app`);t==null||(e=t.requestUpdate)==null||e.call(t)};var XK=rH(()=>Az(()=>import(`./agents-D0yWE6FD.js`),__vite__mapDeps([2,3,1,4,5,6])),BK),ZK=rH(()=>Az(()=>import(`./channels-Dmn0V4l-.js`),__vite__mapDeps([7,1,5])),BK),QK=rH(()=>Az(()=>import(`./cron-CCSk92JU.js`),__vite__mapDeps([8,1])),BK),$K=rH(()=>Az(()=>import(`./debug-B_m-XQVY.js`),__vite__mapDeps([9,1])),BK),eq=rH(()=>Az(()=>import(`./instances-vA_eAzPP.js`),__vite__mapDeps([10,1])),BK),tq=rH(()=>Az(()=>import(`./logs-DoHkFjmj.js`),__vite__mapDeps([11,3,1])),BK),nq=rH(()=>Az(()=>import(`./nodes-DEB4eQvc.js`),__vite__mapDeps([12,3,1])),BK),rq=rH(()=>Az(()=>import(`./sessions-DLqvgv8s.js`),__vite__mapDeps([13,3,1])),BK),iq=rH(()=>Az(()=>import(`./skills-Bi5UTneM.js`),__vite__mapDeps([14,3,1,6])),BK),aq=rH(()=>Az(()=>import(`./skill-center-CFgH06BO.js`),__vite__mapDeps([15,1])),BK),oq=rH(()=>Az(()=>import(`./filespace-CW07HTK7.js`),__vite__mapDeps([16,1])),BK),sq=rH(()=>Az(()=>import(`./channels.cn-4thW_D4s.js`),__vite__mapDeps([0,1])),BK);function cq(e){return typeof e!=`number`||!Number.isFinite(e)?null:new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}function lq(e){if(!(e!=null&&e.phases))return null;let t;for(let n of Object.values(e.phases))!n.enabled||typeof n.nextRunAtMs!=`number`||(t===void 0||n.nextRunAtMs<t)&&(t=n.nextRunAtMs);return cq(t)}var uq=null,dq=`openclaw:control-ui:update-banner-dismissed:v1`,fq=[`off`,`minimal`,`low`,`medium`,`high`],pq=[`UTC`,`America/Los_Angeles`,`America/Denver`,`America/Chicago`,`America/New_York`,`Europe/London`,`Europe/Berlin`,`Asia/Tokyo`];function mq(e){return/^https?:\/\//i.test(e.trim())}function hq(e){return typeof e==`string`?e.trim():``}function gq(e){let t=new Set,n=[];for(let r of e){let e=r.trim();if(!e)continue;let i=e.toLowerCase();t.has(i)||(t.add(i),n.push(e))}return n}function _q(){try{var e;let t=(e=Pe())==null?void 0:e.getItem(dq);if(!t)return null;let n=JSON.parse(t);return!n||typeof n.latestVersion!=`string`?null:{latestVersion:n.latestVersion,channel:typeof n.channel==`string`?n.channel:null,dismissedAtMs:typeof n.dismissedAtMs==`number`?n.dismissedAtMs:Date.now()}}catch{return null}}function vq(e){let t=_q();if(!t)return!1;let n=e,r=n&&typeof n.latestVersion==`string`?n.latestVersion:null,i=n&&typeof n.channel==`string`?n.channel:null;return!!(r&&t.latestVersion===r&&t.channel===i)}function yq(e){let t=e,n=t&&typeof t.latestVersion==`string`?t.latestVersion:null;if(!n)return;let r={latestVersion:n,channel:t&&typeof t.channel==`string`?t.channel:null,dismissedAtMs:Date.now()};try{var i;(i=Pe())==null||i.setItem(dq,JSON.stringify(r))}catch{}}var bq=[`channels`,`messages`,`broadcast`,`__notifications__`,`talk`,`audio`],xq=[`__appearance__`,`ui`,`wizard`],Sq=[`commands`,`hooks`,`bindings`,`cron`,`approvals`,`plugins`],Cq=[`gateway`,`web`,`browser`,`nodeHost`,`canvasHost`,`discovery`,`media`,`acp`,`mcp`],wq=[`agents`,`models`,`skills`,`tools`,`memory`,`session`],Tq=new Set([...bq,...xq,...Sq,...Cq,...wq]);function Eq(e,t){return e&&Tq.has(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function Dq(e,t,n){return e&&!n.includes(e)?{activeSection:null,activeSubsection:null}:{activeSection:e,activeSubsection:t}}function Oq(e){var t,n;let r=((t=e.agentsList)==null?void 0:t.agents)??[],i=Zi(e.sessionKey),a=(i==null?void 0:i.agentId)??((n=e.agentsList)==null?void 0:n.defaultId)??`main`,o=r.find(e=>e.id===a),s=o==null?void 0:o.identity,c=(s==null?void 0:s.avatarUrl)??(s==null?void 0:s.avatar);if(c&&qf(c))return c}function kq(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e.ui;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t.assistant;return!n||typeof n!=`object`||Array.isArray(n)?null:u(n.avatar)??null}function Aq(e,t){let n=uf(e??``),r=encodeURIComponent(t);return n?`${n}/avatar/${r}`:`/avatar/${r}`}var jq=[{id:`telegram`,label:`Telegram`},{id:`discord`,label:`Discord`},{id:`slack`,label:`Slack`},{id:`whatsapp`,label:`WhatsApp`},{id:`signal`,label:`Signal`},{id:`imessage`,label:`iMessage`}];function Mq(e){let t=e.trim();return t?t.split(/[-_]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function Nq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return[];let r=`channels`in n&&n.channels&&typeof n.channels==`object`?n.channels:{},i=Object.keys(r).filter(e=>e.trim().length>0),a=i.length>0?i.toSorted((e,t)=>e.localeCompare(t)):jq.map(({id:e})=>e),o=new Map(jq.map(({id:e,label:t})=>[e,t])),s=[];for(let e of a){let t=r[e],n=typeof t==`object`&&!!t&&Object.keys(t).length>0;s.push({id:e,label:o.get(e)??Mq(e),connected:n,detail:n?`Configured`:void 0})}return s}function Pq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return 0;let r=n.mcp;if(!r||typeof r!=`object`)return 0;let i=`servers`in r&&r.servers&&typeof r.servers==`object`?r.servers:{};return Object.keys(i).length}function Fq(e){var t;let n=e.configForm??((t=e.configSnapshot)==null?void 0:t.config);if(!n||typeof n!=`object`)return{gatewayAuth:`unknown`,execPolicy:`unknown`,deviceAuth:!1};let r=n,i=`gateway`in r&&r.gateway&&typeof r.gateway==`object`?r.gateway:null,a=i&&`auth`in i&&i.auth&&typeof i.auth==`object`?i.auth:null,o=`unknown`;a&&(o=(typeof a.mode==`string`?a.mode.trim():``)||(a.password?`password`:a.token?`token`:a.trustedProxy?`trusted-proxy`:`none`));let s=r.agents,c=`allowlist`;if(s&&typeof s==`object`){let e=s.defaults;if(e&&typeof e==`object`){let t=e.exec;if(t&&typeof t==`object`){let e=t.security;typeof e==`string`&&(c=e)}}}let l=!0;if(i){let e=`controlUi`in i&&i.controlUi&&typeof i.controlUi==`object`?i.controlUi:null;(e==null?void 0:e.dangerouslyDisableDeviceAuth)===!0&&(l=!1)}return{gatewayAuth:o,execPolicy:c,deviceAuth:l}}function Iq(e){var t;return(t=e.sessionsResult)==null||(t=t.sessions)==null?void 0:t.find(t=>t.key===e.sessionKey)}function Lq(e,t){return WW({open:e.cronQuickCreateOpen,step:e.cronQuickCreateStep,draft:e.cronQuickCreateDraft??FW(),onDraftChange:n=>{e.cronQuickCreateDraft={...e.cronQuickCreateDraft??FW(),...n},t==null||t()},onStepChange:n=>{e.cronQuickCreateStep=n,t==null||t()},onCreate:()=>{let n=LW(e.cronQuickCreateDraft??FW());e.cronEditingJobId=null,e.cronForm={...hm,...n},t==null||t(),(async()=>{if(await zh(e),e.cronError||xh(e.cronFieldErrors)){t==null||t();return}e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t==null||t()})()},onCancel:()=>{e.cronQuickCreateOpen=!1,e.cronQuickCreateStep=`what`,e.cronQuickCreateDraft=null,t==null||t()}})}function Rq(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function zq(e){let t=e.lastIndexOf(`.`),n=t>=0?e.slice(t+1).toLowerCase():``;return[`png`,`jpg`,`jpeg`,`gif`,`webp`,`svg`,`ico`,`bmp`].includes(n)?{iconClass:`file-tree-panel__item-icon--image`,icon:U.image,ext:n}:[`ts`,`tsx`,`js`,`jsx`,`py`,`rs`,`go`,`sh`,`json`,`yaml`,`yml`,`toml`].includes(n)?{iconClass:`file-tree-panel__item-icon--code`,icon:U.fileCode,ext:n}:[`md`,`txt`,`pdf`,`docx`,`csv`].includes(n)?{iconClass:`file-tree-panel__item-icon--doc`,icon:U.fileText,ext:n}:{iconClass:`file-tree-panel__item-icon--default`,icon:U.fileText,ext:n}}function Bq(e){var t;let n=new Map;for(let r of((t=e.sessionsResult)==null?void 0:t.sessions)??[])r.sessionId&&n.set(r.sessionId,r.displayName??r.label??r.key);return n}function Vq(e,t,r,a,o,s){let c=o*16;return a.map(a=>{if(a.isDir){let l=e.fileTreeExpandedDirs.includes(a.path),u=e.fileTreeDirLoading.includes(a.path),d=e.fileTreeDirChildren[a.path];return n`
7049
7049
  <li
7050
7050
  class="file-tree-panel__item file-tree-panel__item--dir"
7051
7051
  style="padding-left: ${10+c}px"
@@ -7394,5 +7394,5 @@ ${e.pluginDescription}</pre
7394
7394
 
7395
7395
  `).trim()}function nJ(e){return new Promise((t,n)=>{var r,i;if((r=e.signal)!=null&&r.aborted){n(new DOMException(`OpenClaw tool call aborted`,`AbortError`));return}let a=window.setTimeout(()=>{c(),n(Error(`OpenClaw tool call timed out`))},e.timeoutMs),o=()=>{c(),n(new DOMException(`OpenClaw tool call aborted`,`AbortError`))};(i=e.signal)==null||i.addEventListener(`abort`,o,{once:!0});let s=()=>void 0;s=e.client.addEventListener(r=>{if(r.event!==`chat`)return;let i=r.payload;!i||i.runId!==e.runId||(i.state===`final`?(c(),t(tJ(i.message)||`OpenClaw finished with no text.`)):i.state===`aborted`?(c(),n(new DOMException(i.errorMessage??`OpenClaw tool call aborted`,`AbortError`))):i.state===`error`&&(c(),n(Error(i.errorMessage??`OpenClaw tool call failed`))))});function c(){var t;window.clearTimeout(a),(t=e.signal)==null||t.removeEventListener(`abort`,o),s()}})}async function rJ(e){var t,n,r,i;let{ctx:a,callId:o,submit:s}=e;(t=(n=a.callbacks).onStatus)==null||t.call(n,`thinking`);let c,l=!1,u=()=>{l=!0,c&&a.client.request(`chat.abort`,{sessionKey:a.sessionKey,runId:c})};if(!((r=e.signal)!=null&&r.aborted)){(i=e.signal)==null||i.addEventListener(`abort`,u,{once:!0});try{var d;let t=typeof e.args==`string`?JSON.parse(e.args||`{}`):e.args??{},n=await a.client.request(`talk.client.toolCall`,{sessionKey:a.sessionKey,callId:o,name:Zq,args:t,...e.relaySessionId?{relaySessionId:e.relaySessionId}:{}});if(c=n.runId??n.idempotencyKey,!c)throw Error(`OpenClaw realtime tool call did not return a run id`);if((d=e.signal)!=null&&d.aborted){u();return}s(o,{result:await nJ({client:a.client,runId:c,timeoutMs:12e4,signal:e.signal})})}catch(t){var f;if(l||(f=e.signal)!=null&&f.aborted||iJ(t))return;s(o,{error:t instanceof Error?t.message:String(t)})}finally{var p,m;if((p=e.signal)==null||p.removeEventListener(`abort`,u),!l&&!((m=e.signal)!=null&&m.aborted)){var h,g;(h=(g=a.callbacks).onStatus)==null||h.call(g,`listening`)}}}}function iJ(e){return typeof DOMException<`u`&&e instanceof DOMException&&e.name===`AbortError`}var aJ=.02,oJ=.08,sJ=2,cJ=class{constructor(e,t){this.session=e,this.ctx=t,this.media=null,this.inputContext=null,this.outputContext=null,this.inputSource=null,this.inputProcessor=null,this.unsubscribe=null,this.playhead=0,this.closed=!1,this.sources=new Set,this.consultAbortControllers=new Set,this.cancelRequestedForPlayback=!1,this.speechFramesDuringPlayback=0}async start(){var e;if(!((e=navigator.mediaDevices)!=null&&e.getUserMedia))throw Error(`Realtime Talk requires browser microphone access`);if(this.session.audio.inputEncoding!==`pcm16`||this.session.audio.outputEncoding!==`pcm16`)throw Error(`Gateway-relay realtime Talk currently requires PCM16 audio`);this.closed=!1,this.unsubscribe=this.ctx.client.addEventListener(e=>{e.event===`talk.event`&&this.handleRelayEvent(e.payload)}),this.media=await navigator.mediaDevices.getUserMedia({audio:{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}}),this.inputContext=new AudioContext({sampleRate:this.session.audio.inputSampleRateHz}),this.outputContext=new AudioContext({sampleRate:this.session.audio.outputSampleRateHz}),this.startMicrophonePump()}stop(){var e,t,n,r,i,a;this.closed=!0,(e=this.unsubscribe)==null||e.call(this),this.unsubscribe=null,(t=this.inputProcessor)==null||t.disconnect(),this.inputProcessor=null,(n=this.inputSource)==null||n.disconnect(),this.inputSource=null,this.abortConsults(),(r=this.media)==null||r.getTracks().forEach(e=>e.stop()),this.media=null,this.stopOutput(),(i=this.inputContext)==null||i.close(),this.inputContext=null,(a=this.outputContext)==null||a.close(),this.outputContext=null,this.ctx.client.request(`talk.session.close`,{sessionId:this.session.relaySessionId})}startMicrophonePump(){!this.media||!this.inputContext||(this.inputSource=this.inputContext.createMediaStreamSource(this.media),this.inputProcessor=this.inputContext.createScriptProcessor(4096,1,1),this.inputProcessor.onaudioprocess=e=>{var t;if(this.closed)return;let n=e.inputBuffer.getChannelData(0),r=Yq(n);this.detectBargeInSpeech(n)&&this.cancelOutputForBargeIn(),this.ctx.client.request(`talk.session.appendAudio`,{sessionId:this.session.relaySessionId,audioBase64:qq(r),timestamp:Math.round((((t=this.inputContext)==null?void 0:t.currentTime)??0)*1e3)})},this.inputSource.connect(this.inputProcessor),this.inputProcessor.connect(this.inputContext.destination))}handleRelayEvent(e){if(!(e.relaySessionId!==this.session.relaySessionId||this.closed)){if(e.talkEvent){var t,n;(t=(n=this.ctx.callbacks).onTalkEvent)==null||t.call(n,e.talkEvent)}switch(e.type){case`ready`:var r,i;(r=(i=this.ctx.callbacks).onStatus)==null||r.call(i,`listening`);return;case`audio`:e.audioBase64&&(this.cancelRequestedForPlayback=!1,this.speechFramesDuringPlayback=0,this.playPcm16(e.audioBase64));return;case`clear`:this.stopOutput();return;case`mark`:this.scheduleMarkAck();return;case`transcript`:if(e.role&&e.text){var a,o;(a=(o=this.ctx.callbacks).onTranscript)==null||a.call(o,{role:e.role,text:e.text,final:e.final??!1})}return;case`toolCall`:this.handleToolCall(e);return;case`error`:var s,c;(s=(c=this.ctx.callbacks).onStatus)==null||s.call(c,`error`,e.message??`Realtime relay failed`);return;case`close`:if(this.abortConsults(),!this.closed){var l,u;(l=(u=this.ctx.callbacks).onStatus)==null||l.call(u,e.reason===`error`?`error`:`idle`,e.reason===`error`?`Realtime relay closed`:void 0)}return;default:return}}}playPcm16(e){if(!this.outputContext)return;let t=Xq(Jq(e));if(t.length===0)return;let n=this.outputContext.createBuffer(1,t.length,this.session.audio.outputSampleRateHz);n.getChannelData(0).set(t);let r=this.outputContext.createBufferSource();this.sources.add(r),r.addEventListener(`ended`,()=>this.sources.delete(r)),r.buffer=n,r.connect(this.outputContext.destination);let i=Math.max(this.outputContext.currentTime,this.playhead);r.start(i),this.playhead=i+n.duration}stopOutput(){var e;for(let e of this.sources)try{e.stop()}catch{}this.sources.clear(),this.playhead=((e=this.outputContext)==null?void 0:e.currentTime)??0,this.speechFramesDuringPlayback=0}scheduleMarkAck(){var e,t;let n=Math.max(0,Math.ceil(((this.playhead||((e=this.outputContext)==null?void 0:e.currentTime)||0)-(((t=this.outputContext)==null?void 0:t.currentTime)??0))*1e3));window.setTimeout(()=>{this.closed},n)}async handleToolCall(e){var t,n;let r=(t=e.callId)==null?void 0:t.trim(),i=(n=e.name)==null?void 0:n.trim();if(!r||!i)return;if(i!==`openclaw_agent_consult`){this.submitToolResult(r,{error:`Tool "${i}" not available in browser Talk`});return}let a=new AbortController;this.consultAbortControllers.add(a);try{await rJ({ctx:this.ctx,callId:r,args:e.args??{},relaySessionId:this.session.relaySessionId,signal:a.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(a)}}submitToolResult(e,t){this.ctx.client.request(`talk.session.submitToolResult`,{sessionId:this.session.relaySessionId,callId:e,result:t})}cancelOutputForBargeIn(){this.sources.size===0||this.cancelRequestedForPlayback||(this.cancelRequestedForPlayback=!0,this.stopOutput(),this.ctx.client.request(`talk.session.cancelOutput`,{sessionId:this.session.relaySessionId,reason:`barge-in`}))}abortConsults(){for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear()}detectBargeInSpeech(e){if(this.sources.size===0||this.cancelRequestedForPlayback||e.length===0)return this.speechFramesDuringPlayback=0,!1;let t=0,n=0;for(let r of e)n=Math.max(n,Math.abs(r)),t+=r*r;return Math.sqrt(t/e.length)>=aJ&&n>=oJ?this.speechFramesDuringPlayback+=1:this.speechFramesDuringPlayback=0,this.speechFramesDuringPlayback>=sJ}},lJ=`generativelanguage.googleapis.com`,uJ=/^\/ws\/google\.ai\.generativelanguage\.v[0-9a-z]+\.GenerativeService\.BidiGenerateContent(?:Constrained)?$/;function dJ(e){let t;try{t=new URL(e.websocketUrl)}catch{throw Error(`Invalid Google Live WebSocket URL`)}if(t.protocol!==`wss:`)throw Error(`Google Live WebSocket URL must use wss://`);if(t.hostname.toLowerCase()!==lJ)throw Error(`Untrusted Google Live WebSocket host`);if(t.username||t.password)throw Error(`Google Live WebSocket URL must not include credentials`);if(!uJ.test(t.pathname))throw Error(`Untrusted Google Live WebSocket path`);return t.search=``,t.searchParams.set(`access_token`,e.clientSecret),t.toString()}var fJ=class{constructor(e,t){this.session=e,this.ctx=t,this.ws=null,this.media=null,this.inputContext=null,this.outputContext=null,this.inputSource=null,this.inputProcessor=null,this.playhead=0,this.closed=!1,this.pendingCalls=new Map,this.consultAbortControllers=new Set,this.sources=new Set,this.emitTalkEvent=Qq(t,e)}async start(){var e;if(!((e=navigator.mediaDevices)!=null&&e.getUserMedia)||typeof WebSocket>`u`)throw Error(`Realtime Talk requires browser WebSocket and microphone access`);if(this.session.protocol!==`google-live-bidi`)throw Error(`Unsupported realtime WebSocket protocol: ${this.session.protocol}`);let t=dJ(this.session);this.closed=!1,this.media=await navigator.mediaDevices.getUserMedia({audio:!0}),this.inputContext=new AudioContext({sampleRate:this.session.audio.inputSampleRateHz}),this.outputContext=new AudioContext({sampleRate:this.session.audio.outputSampleRateHz}),this.ws=new WebSocket(t),this.ws.binaryType=`arraybuffer`,this.ws.addEventListener(`open`,()=>{this.closed||(this.send(this.session.initialMessage??{setup:{}}),this.startMicrophonePump())}),this.ws.addEventListener(`message`,e=>{this.handleMessage(e.data)}),this.ws.addEventListener(`close`,()=>{if(!this.closed){var e,t;(e=(t=this.ctx.callbacks).onStatus)==null||e.call(t,`error`,`Realtime connection closed`)}}),this.ws.addEventListener(`error`,()=>{if(!this.closed){var e,t;(e=(t=this.ctx.callbacks).onStatus)==null||e.call(t,`error`,`Realtime connection failed`)}})}stop(){var e,t,n,r,i,a;this.closed||this.emitTalkEvent({type:`session.closed`,final:!0}),this.closed=!0;for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear(),this.pendingCalls.clear(),(e=this.inputProcessor)==null||e.disconnect(),this.inputProcessor=null,(t=this.inputSource)==null||t.disconnect(),this.inputSource=null,(n=this.media)==null||n.getTracks().forEach(e=>e.stop()),this.media=null,this.stopOutput(),(r=this.inputContext)==null||r.close(),this.inputContext=null,(i=this.outputContext)==null||i.close(),this.outputContext=null,(a=this.ws)==null||a.close(),this.ws=null}startMicrophonePump(){this.closed||!this.media||!this.inputContext||(this.inputSource=this.inputContext.createMediaStreamSource(this.media),this.inputProcessor=this.inputContext.createScriptProcessor(4096,1,1),this.inputProcessor.onaudioprocess=e=>{var t,n;if(((t=this.ws)==null?void 0:t.readyState)!==WebSocket.OPEN)return;let r=Yq(e.inputBuffer.getChannelData(0));this.send({realtimeInput:{audio:{data:qq(r),mimeType:`audio/pcm;rate=${((n=this.inputContext)==null?void 0:n.sampleRate)??16e3}`}}})},this.inputSource.connect(this.inputProcessor),this.inputProcessor.connect(this.inputContext.destination))}send(e){var t;!this.closed&&((t=this.ws)==null?void 0:t.readyState)===WebSocket.OPEN&&this.ws.send(JSON.stringify(e))}async handleMessage(e){var t,n,r,i;if(this.closed)return;let a;try{a=JSON.parse(await pJ(e))}catch{return}if(this.closed)return;if(a.setupComplete){var o,s;(o=(s=this.ctx.callbacks).onStatus)==null||o.call(s,`listening`),this.emitTalkEvent({type:`session.ready`})}let c=a.serverContent;if(c!=null&&c.interrupted&&(this.stopOutput(),this.emitTalkEvent({type:`turn.cancelled`,final:!0,payload:{reason:`provider-interrupted`}})),!(c==null||(t=c.inputTranscription)==null)&&t.text){var l,u;(l=(u=this.ctx.callbacks).onTranscript)==null||l.call(u,{role:`user`,text:c.inputTranscription.text,final:c.inputTranscription.finished??!1}),this.emitTalkEvent({type:c.inputTranscription.finished?`transcript.done`:`transcript.delta`,final:c.inputTranscription.finished??!1,payload:{role:`user`,text:c.inputTranscription.text}})}if(!(c==null||(n=c.outputTranscription)==null)&&n.text){var d,f;(d=(f=this.ctx.callbacks).onTranscript)==null||d.call(f,{role:`assistant`,text:c.outputTranscription.text,final:c.outputTranscription.finished??!1}),this.emitTalkEvent({type:c.outputTranscription.finished?`output.text.done`:`output.text.delta`,final:c.outputTranscription.finished??!1,payload:{text:c.outputTranscription.text}})}for(let e of(c==null||(r=c.modelTurn)==null?void 0:r.parts)??[]){var p;if((p=e.inlineData)!=null&&p.data)this.emitTalkEvent({type:`output.audio.delta`,payload:{byteLength:Jq(e.inlineData.data).byteLength,mimeType:e.inlineData.mimeType}}),this.playPcm16(e.inlineData.data);else if(!e.thought&&typeof e.text==`string`&&e.text.trim()){var m,h;(m=(h=this.ctx.callbacks).onTranscript)==null||m.call(h,{role:`assistant`,text:e.text,final:(c==null?void 0:c.turnComplete)??!1}),this.emitTalkEvent({type:c!=null&&c.turnComplete?`output.text.done`:`output.text.delta`,final:(c==null?void 0:c.turnComplete)??!1,payload:{text:e.text}})}}c!=null&&c.turnComplete&&this.emitTalkEvent({type:`turn.ended`,final:!0});for(let e of((i=a.toolCall)==null?void 0:i.functionCalls)??[])this.handleToolCall(e)}playPcm16(e){if(!this.outputContext)return;let t=Xq(Jq(e));if(t.length===0)return;let n=this.outputContext.createBuffer(1,t.length,this.session.audio.outputSampleRateHz);n.getChannelData(0).set(t);let r=this.outputContext.createBufferSource();this.sources.add(r),r.addEventListener(`ended`,()=>this.sources.delete(r)),r.buffer=n,r.connect(this.outputContext.destination);let i=Math.max(this.outputContext.currentTime,this.playhead);r.start(i),this.playhead=i+n.duration}stopOutput(){var e;for(let e of this.sources)try{e.stop()}catch{}this.sources.clear(),this.playhead=((e=this.outputContext)==null?void 0:e.currentTime)??0}async handleToolCall(e){var t,n;let r=(t=e.name)==null?void 0:t.trim(),i=(n=e.id)==null?void 0:n.trim();if(!r||!i||(this.pendingCalls.set(i,{name:r,args:e.args??{}}),this.emitTalkEvent({type:`tool.call`,callId:i,payload:{name:r,args:e.args??{}}}),r!==`openclaw_agent_consult`))return;let a=new AbortController;this.consultAbortControllers.add(a);try{await rJ({ctx:this.createActiveContext(),callId:i,args:e.args??{},signal:a.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(a)}}createActiveContext(){return{...this.ctx,callbacks:{onStatus:(e,t)=>{if(!this.closed){var n,r;(n=(r=this.ctx.callbacks).onStatus)==null||n.call(r,e,t)}},onTranscript:e=>{if(!this.closed){var t,n;(t=(n=this.ctx.callbacks).onTranscript)==null||t.call(n,e)}}}}}submitToolResult(e,t){let n=this.pendingCalls.get(e);n&&(this.pendingCalls.delete(e),this.send({toolResponse:{functionResponses:[{id:e,name:n.name,scheduling:`WHEN_IDLE`,response:t&&typeof t==`object`&&!Array.isArray(t)?t:{output:t}}]}}))}};async function pJ(e){return typeof e==`string`?e:(typeof Blob<`u`&&e instanceof Blob&&(e=await e.arrayBuffer()),mJ(e)?new TextDecoder().decode(new Uint8Array(e)):ArrayBuffer.isView(e)?new TextDecoder().decode(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):String(e))}function mJ(e){return e instanceof ArrayBuffer||Object.prototype.toString.call(e)===`[object ArrayBuffer]`}var hJ=class{constructor(e,t){this.session=e,this.ctx=t,this.peer=null,this.channel=null,this.media=null,this.audio=null,this.closed=!1,this.toolBuffers=new Map,this.consultAbortControllers=new Set,this.emitTalkEvent=Qq(t,e)}async start(){var e;if(!((e=navigator.mediaDevices)!=null&&e.getUserMedia)||typeof RTCPeerConnection>`u`)throw Error(`Realtime Talk requires browser WebRTC and microphone access`);this.closed=!1,this.peer=new RTCPeerConnection,this.audio=document.createElement(`audio`),this.audio.autoplay=!0,this.audio.style.display=`none`,document.body.append(this.audio),this.peer.addEventListener(`track`,e=>{this.audio&&(this.audio.srcObject=e.streams[0])}),this.media=await navigator.mediaDevices.getUserMedia({audio:!0});for(let e of this.media.getAudioTracks())this.peer.addTrack(e,this.media);this.channel=this.peer.createDataChannel(`oai-events`),this.channel.addEventListener(`open`,()=>{var e,t;(e=(t=this.ctx.callbacks).onStatus)==null||e.call(t,`listening`),this.emitTalkEvent({type:`session.ready`})}),this.channel.addEventListener(`message`,e=>this.handleRealtimeEvent(e.data)),this.peer.addEventListener(`connectionstatechange`,()=>{var e,t;if(!this.closed&&(((e=this.peer)==null?void 0:e.connectionState)===`failed`||((t=this.peer)==null?void 0:t.connectionState)===`closed`)){var n,r;(n=(r=this.ctx.callbacks).onStatus)==null||n.call(r,`error`,`Realtime connection closed`)}});let t=await this.peer.createOffer();await this.peer.setLocalDescription(t);let n=await fetch(this.session.offerUrl??`https://api.openai.com/v1/realtime/calls`,{method:`POST`,body:t.sdp,headers:{...this.session.offerHeaders,Authorization:`Bearer ${this.session.clientSecret}`,"Content-Type":`application/sdp`}});if(!n.ok)throw Error(`Realtime WebRTC setup failed (${n.status})`);await this.peer.setRemoteDescription({type:`answer`,sdp:await n.text()})}stop(){var e,t,n,r;this.closed||this.emitTalkEvent({type:`session.closed`,final:!0}),this.closed=!0,(e=this.channel)==null||e.close(),this.channel=null,(t=this.peer)==null||t.close(),this.peer=null,(n=this.media)==null||n.getTracks().forEach(e=>e.stop()),this.media=null,(r=this.audio)==null||r.remove(),this.audio=null;for(let e of this.consultAbortControllers)e.abort();this.consultAbortControllers.clear(),this.toolBuffers.clear()}send(e){var t;((t=this.channel)==null?void 0:t.readyState)===`open`&&this.channel.send(JSON.stringify(e))}handleRealtimeEvent(e){if(this.closed)return;let t;try{t=JSON.parse(String(e))}catch{return}switch(t.type){case`conversation.item.input_audio_transcription.completed`:if(t.transcript){var n,r;(n=(r=this.ctx.callbacks).onTranscript)==null||n.call(r,{role:`user`,text:t.transcript,final:!0}),this.emitTalkEvent({type:`transcript.done`,final:!0,itemId:t.item_id,payload:{role:`user`,text:t.transcript}})}return;case`response.audio_transcript.done`:if(t.transcript){var i,a;(i=(a=this.ctx.callbacks).onTranscript)==null||i.call(a,{role:`assistant`,text:t.transcript,final:!0}),this.emitTalkEvent({type:`output.text.done`,final:!0,itemId:t.item_id,payload:{text:t.transcript}})}return;case`response.function_call_arguments.delta`:this.bufferToolDelta(t);return;case`response.function_call_arguments.done`:this.handleToolCall(t);return;case`input_audio_buffer.speech_started`:var o,s;(o=(s=this.ctx.callbacks).onStatus)==null||o.call(s,`listening`,`Speech detected`),this.emitTalkEvent({type:`turn.started`,payload:{source:t.type}});return;case`input_audio_buffer.speech_stopped`:var c,l;(c=(l=this.ctx.callbacks).onStatus)==null||c.call(l,`thinking`,`Processing speech`),this.emitTalkEvent({type:`input.audio.committed`,final:!0});return;case`response.created`:var u,d;(u=(d=this.ctx.callbacks).onStatus)==null||u.call(d,`thinking`,`Generating response`);return;case`response.done`:var f,p,m;(f=(p=this.ctx.callbacks).onStatus)==null||f.call(p,`listening`,this.extractResponseStatus(t)),this.emitTalkEvent({type:`turn.ended`,final:!0,payload:{status:((m=t.response)==null?void 0:m.status)??`completed`}});return;case`error`:var h,g;(h=(g=this.ctx.callbacks).onStatus)==null||h.call(g,`error`,this.extractErrorDetail(t.error)),this.emitTalkEvent({type:`session.error`,final:!0,payload:{message:this.extractErrorDetail(t.error)}});return;default:return}}extractResponseStatus(e){var t;let n=(t=e.response)==null?void 0:t.status;return n&&n!==`completed`?`Response ${n}`:void 0}extractErrorDetail(e){if(!e||typeof e!=`object`)return`Realtime provider error`;let t=e,n=typeof t.message==`string`?t.message.trim():``,r=typeof t.code==`string`?t.code.trim():``,i=typeof t.type==`string`?t.type.trim():``;return n||r||i||`Realtime provider error`}bufferToolDelta(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);if(n){n.args+=e.delta??``;return}this.toolBuffers.set(t,{name:e.name??``,callId:e.call_id??``,args:e.delta??``})}async handleToolCall(e){let t=e.item_id??`unknown`,n=this.toolBuffers.get(t);this.toolBuffers.delete(t);let r=(n==null?void 0:n.name)||e.name||``,i=(n==null?void 0:n.callId)||e.call_id||``;if(r!==`openclaw_agent_consult`||!i)return;this.emitTalkEvent({type:`tool.call`,callId:i,itemId:t,payload:{name:r,args:(n==null?void 0:n.args)||e.arguments||`{}`}});let a=new AbortController;this.consultAbortControllers.add(a);try{await rJ({ctx:this.ctx,callId:i,args:(n==null?void 0:n.args)||e.arguments||`{}`,signal:a.signal,submit:(e,t)=>this.submitToolResult(e,t)})}finally{this.consultAbortControllers.delete(a)}}submitToolResult(e,t){this.send({type:`conversation.item.create`,item:{type:`function_call_output`,call_id:e,output:JSON.stringify(t)}}),this.send({type:`response.create`})}};function gJ(e,t){let n=_J(e);if(n===`webrtc`)return new hJ(e,t);if(n===`provider-websocket`)return new fJ(e,t);if(n===`gateway-relay`)return new cJ(e,t);if(n===`managed-room`)throw Error(`Managed-room realtime Talk sessions are not available in this UI yet`);let r=e.transport??`unknown`;throw Error(`Unsupported realtime Talk transport: ${r}`)}function _J(e){return Gq(e.transport)??`webrtc`}var vJ=class{constructor(e,t,n={}){this.client=e,this.sessionKey=t,this.callbacks=n,this.transport=null,this.closed=!1}async start(){var e,t;this.closed=!1,(e=(t=this.callbacks).onStatus)==null||e.call(t,`connecting`);let n=await this.createSession();this.closed||(this.transport=gJ(n,{client:this.client,sessionKey:this.sessionKey,callbacks:this.callbacks}),await this.transport.start())}async createSession(){try{return await this.client.request(`talk.client.create`,{sessionKey:this.sessionKey})}catch(e){try{return await this.client.request(`talk.session.create`,{sessionKey:this.sessionKey,mode:`realtime`,transport:`gateway-relay`,brain:`agent-consult`})}catch{throw e}}}stop(){var e,t,n;this.closed=!0,(e=(t=this.callbacks).onStatus)==null||e.call(t,`idle`),(n=this.transport)==null||n.stop(),this.transport=null}},yJ=Bf({}),bJ=oT();function xJ(){if(!window.location.search)return!1;let e=new URLSearchParams(window.location.search).get(`onboarding`);if(!e)return!1;let t=e.trim().toLowerCase();return t===`1`||t===`true`||t===`yes`||t===`on`}var $=class extends c{constructor(){super(),this.clientInstanceId=mn(),this.connectGeneration=0,this.settings=iT(),this.password=``,this.loginShowGatewayToken=!1,this.loginShowGatewayPassword=!1,this.tab=`chat`,this.onboarding=xJ(),this.connected=!1,this.theme=this.settings.theme??`claw`,this.themeMode=this.settings.themeMode??`system`,this.themeResolved=`dark`,this.themeOrder=this.buildThemeOrder(this.theme),this.customThemeImportUrl=``,this.customThemeImportBusy=!1,this.customThemeImportMessage=null,this.customThemeImportExpanded=!1,this.customThemeImportFocusToken=0,this.customThemeImportSelectOnSuccess=!1,this.hello=null,this.lastError=null,this.lastErrorCode=null,this.eventLog=[],this.eventLogBuffer=[],this.toolStreamSyncTimer=null,this.sidebarCloseTimer=null,this.assistantName=yJ.name,this.assistantAvatar=yJ.avatar,this.assistantAvatarSource=yJ.avatarSource??null,this.assistantAvatarStatus=yJ.avatarStatus??null,this.assistantAvatarReason=yJ.avatarReason??null,this.assistantAvatarUploadBusy=!1,this.assistantAvatarUploadError=null,this.assistantAgentId=yJ.agentId??null,this.userName=bJ.name,this.userAvatar=bJ.avatar,this.localMediaPreviewRoots=[],this.embedSandboxMode=`scripts`,this.allowExternalEmbedUrls=!1,this.chatMessageMaxWidth=null,this.serverVersion=null,this.sessionKey=this.settings.sessionKey,this.currentSessionId=null,this.chatLoading=!1,this.chatSending=!1,this.chatMessage=``,this.chatMessages=[],this.chatToolMessages=[],this.chatStreamSegments=[],this.chatStream=null,this.chatStreamStartedAt=null,this.chatRunId=null,this.chatSideResult=null,this.compactionStatus=null,this.fallbackStatus=null,this.chatAvatarUrl=null,this.chatAvatarSource=null,this.chatAvatarStatus=null,this.chatAvatarReason=null,this.chatThinkingLevel=null,this.chatModelOverrides={},this.chatModelsLoading=!1,this.chatModelCatalog=[],this.sessionSwitchNotice=null,this.sessionSwitchFlashKey=null,this.sessionSwitchNoticeSeq=0,this.sessionSwitchNoticeTimer=null,this.sessionSwitchFlashTimer=null,this.chatQueue=[],this.chatQueueBySession={},this.chatAttachments=[],this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null,this.skillStoreOpen=!1,this.storeSkills=null,this.storeSkillsLoading=!1,this.storeSkillsRegistry=new Map,this.storeItemLoading=null,this.storeItemError=null,this.realtimeTalkSession=null,this.chatManualRefreshInFlight=!1,this.chatHeaderControlsHidden=!1,this.chatMobileControlsOpen=!1,this.chatMobileControlsTrigger=null,this.navDrawerOpen=!1,this.chatLocalInputHistoryBySession={},this.chatInputHistorySessionKey=null,this.chatInputHistoryItems=null,this.chatInputHistoryIndex=-1,this.chatDraftBeforeHistory=null,this.chatDraftMode=!1,this.chatDraftParentSessionKey=null,this.sidebarOpen=!1,this.sidebarContent=null,this.sidebarError=null,this.sidebarEditingSessionKey=null,this.sidebarEditingSessionLabel=``,this.sidebarMoreMenuKey=null,this.sidebarDeleteConfirmKey=null,this.splitRatio=this.settings.splitRatio,this.nodesLoading=!1,this.nodes=[],this.devicesLoading=!1,this.devicesError=null,this.devicesList=null,this.execApprovalsLoading=!1,this.execApprovalsSaving=!1,this.execApprovalsDirty=!1,this.execApprovalsSnapshot=null,this.execApprovalsForm=null,this.execApprovalsSelectedAgent=null,this.execApprovalsTarget=`gateway`,this.execApprovalsTargetNodeId=null,this.execApprovalQueue=[],this.execApprovalBusy=!1,this.execApprovalError=null,this.pendingGatewayUrl=null,this.pendingGatewayToken=null,this.configLoading=!1,this.configRaw=`{
7396
7396
  }
7397
- `,this.configRawOriginal=``,this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamingRestartConfirmOpen=!1,this.dreamingRestartConfirmLoading=!1,this.dreamingPendingEnabled=null,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.pendingUpdateExpectedVersion=null,this.updateStatusBanner=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=mm.activeMinutes,this.sessionsFilterLimit=mm.limit,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsShowArchived=!1,this.sessionsFiltersCollapsed=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.activePanelId=null,this.sidebarStatusPopoverOpen=!1,this.fileTreeLoading=!1,this.fileTreeError=null,this.fileTreeResult=null,this.fileTreeSessionId=void 0,this.fileTreeExpandedDirs=[],this.fileTreeDirChildren={},this.fileTreeDirLoading=[],this.cnChannelsLoading=!1,this.cnChannelsData=null,this.cnChannelsError=null,this.cnConnecting=null,this.cnQrcodeChannel=null,this.cnQrcodeImg=null,this.cnQrcodeToken=null,this.cnQrcodeLoading=!1,this.cnQrcodePollTimer=null,this.cnFeishuOpen=!1,this.cnFeishuSaving=!1,this.cnFeishuFormAppId=``,this.cnFeishuFormAppSecret=``,this.skillCenterTab=`center`,this.skillCenterCategory=null,this.skillCenterSearch=``,this.skillCenterCategories=null,this.skillCenterCategoriesLoading=!1,this.skillCenterItemBusy=null,this.skillCenterItemError=null,this.fileSpaceLoading=!1,this.fileSpaceError=null,this.fileSpaceData=null,this.fileSpaceSearch=``,this.fileSpaceCollapsed=[],this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...hm},this.cronFormCollapsed=!1,this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.sessionSwitcherOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod=``,this.debugCallParams=`{}`,this.debugCallResult=null,this.debugCallError=null,this.apiKeys=[],this.sealclawModels=[],this.webPushSupported=!1,this.webPushPermission=`unsupported`,this.webPushSubscribed=!1,this.webPushLoading=!1,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText=``,this.logsLevelFilters={...pm},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatLastScrollTop=0,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.logsScrollFrame=null,this.controlUiResponsivenessObserver=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>iR(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.chatMobileControlsKeydownHandler=e=>{e.key!==`Escape`||!this.chatMobileControlsOpen||(e.preventDefault(),this.setChatMobileControlsOpen(!1,{restoreFocus:!0}))},this.chatMobileControlsPointerdownHandler=e=>{if(!this.chatMobileControlsOpen)return;let t=this.querySelector(`.chat-mobile-controls-wrapper`);t&&e.composedPath().includes(t)||this.setChatMobileControlsOpen(!1)},this.sealclawInitDone=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=async e=>{switch(e){case`new-session`:Hz(this);break;case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:qO(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:await ua(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),document.addEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.addEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),lz(this),this.initWebPushState(),this.loadApiKeys()}firstUpdated(){uz(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),document.removeEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.removeEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),this.sessionSwitchNoticeTimer!==null&&(window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchNoticeTimer=null),this.sessionSwitchFlashTimer!==null&&(window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchFlashTimer=null),this.chatMobileControlsTrigger=null,pz(this),super.disconnectedCallback()}updated(e){if(mz(this,e),e.has(`connected`)&&this.connected&&(this.sealclawInitDone?Xp(this,{scheduleScroll:!1,force:!0}):(this.sealclawInitDone=!0,this.initCreateApiKey())),e.has(`tab`)&&this.tab!==`chat`&&this.chatMobileControlsOpen&&this.setChatMobileControlsOpen(!1),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=ta(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){sa(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){tz(this)}handleChatScroll(e){Vs(this,e)}handleLogsScroll(e){Hs(this,e)}exportLogs(e,t){Ws(e,t)}resetToolStream(){sc(this)}resetChatScroll(){Us(this)}scrollToBottom(e){Us(this),zs(this,!0,!!(e!=null&&e.smooth))}async loadAssistantIdentity(){await wR(this)}applySettings(e){FL(this,e)}applyLocalUserIdentity(e){IL(this,e)}setTab(e){e===`filespace`&&(this.fileSpaceData=null,this.fileSpaceError=null),WL(this,e),e!==`chat`&&(this.setChatMobileControlsOpen(!1),this.sidebarOpen&&this.handleCloseSidebar()),this.navDrawerOpen=!1}setChatMobileControlsOpen(e,t){if(e){this.chatMobileControlsTrigger=(t==null?void 0:t.trigger)??this.chatMobileControlsTrigger,this.chatMobileControlsOpen=!0;return}let n=t!=null&&t.restoreFocus?this.chatMobileControlsTrigger:null;this.chatMobileControlsOpen=!1,this.chatMobileControlsTrigger=null,!(!(n instanceof HTMLElement)||!n.isConnected)&&requestAnimationFrame(()=>{n.isConnected&&n.focus()})}setTheme(e,t){KL(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){qL(this,e,t)}setCustomThemeImportUrl(e){var t;this.customThemeImportUrl=e,((t=this.customThemeImportMessage)==null?void 0:t.kind)===`error`&&(this.customThemeImportMessage=null)}openCustomThemeImport(){this.customThemeImportExpanded=!0,this.customThemeImportFocusToken+=1,this.settings.customTheme||(this.customThemeImportSelectOnSuccess=!0)}async importCustomTheme(){if(!this.customThemeImportBusy){this.customThemeImportExpanded=!0,this.customThemeImportBusy=!0,this.customThemeImportMessage=null;try{let e=await bw(this.customThemeImportUrl),t=this.theme===`custom`||!this.settings.customTheme||this.customThemeImportSelectOnSuccess;FL(this,{...this.settings,theme:t?`custom`:this.settings.theme,customTheme:e}),this.themeOrder=this.buildThemeOrder(t?`custom`:this.theme),this.customThemeImportUrl=``,this.customThemeImportSelectOnSuccess=!1,this.customThemeImportMessage={kind:`success`,text:`Imported ${e.label}.`}}catch(e){this.customThemeImportMessage={kind:`error`,text:e instanceof Error?e.message:`Failed to import tweakcn theme.`}}finally{this.customThemeImportBusy=!1}}}clearCustomTheme(){let e=this.theme===`custom`?`claw`:this.theme;this.customThemeImportExpanded=!0,this.customThemeImportSelectOnSuccess=!1,FL(this,{...this.settings,theme:e,customTheme:void 0}),this.themeOrder=this.buildThemeOrder(e),this.customThemeImportMessage={kind:`success`,text:`Cleared custom theme.`}}setBorderRadius(e){FL(this,{...this.settings,borderRadius:e}),this.requestUpdate()}announceSessionSwitch(e,t){let n=++this.sessionSwitchNoticeSeq;this.sessionSwitchNoticeTimer!==null&&window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchFlashTimer!==null&&window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchNotice={id:n,text:`已切换到 ${t}`},this.sessionSwitchFlashKey=e,this.sessionSwitchFlashTimer=window.setTimeout(()=>{var e;((e=this.sessionSwitchNotice)==null?void 0:e.id)===n&&(this.sessionSwitchFlashKey=null),this.sessionSwitchFlashTimer=null},200),this.sessionSwitchNoticeTimer=window.setTimeout(()=>{var e;((e=this.sessionSwitchNotice)==null?void 0:e.id)===n&&(this.sessionSwitchNotice=null),this.sessionSwitchNoticeTimer=null},2800)}buildThemeOrder(e){return[e,...[...ww].filter(t=>t!==e)]}async loadOverview(e){await uR(this,e)}async loadCron(){await gR(this)}async handleAbortChat(){await jp(this)}handleChatDraftChange(e){xl(this,e)}handleChatInputHistoryKey(e){return Tl(this,e)}resetChatInputHistoryNavigation(){bl(this)}removeQueuedMessage(e){Vp(this,e)}async handleSendChat(e,t){let n=(e??this.chatMessage).trim();await Wz(this,n)&&await Up(this,e,t)}async toggleRealtimeTalk(){if(this.realtimeTalkSession)if(this.realtimeTalkStatus===`error`)this.realtimeTalkSession.stop(),this.realtimeTalkSession=null;else{this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;let e=new vJ(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`你`:`万能玺虾`}: ${e.text}`}});this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}async steerQueuedChatMessage(e){await zp(this,e)}async handleWhatsAppStart(e){await Br(this,e)}async handleWhatsAppWait(){await Vr(this)}async handleWhatsAppLogout(){await Hr(this)}async handleChannelConfigSave(){await Ur(this)}async handleChannelConfigReload(){await Wr(this)}handleNostrProfileEdit(e,t){Yr(this,e,t)}handleNostrProfileCancel(){Xr(this)}handleNostrProfileFieldChange(e,t){Zr(this,e,t)}async handleNostrProfileSave(){await $r(this)}async handleNostrProfileImport(){await ei(this)}handleNostrProfileToggleAdvanced(){Qr(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){var e;let t=this.pendingGatewayUrl;if(!t)return;let n=((e=this.pendingGatewayToken)==null?void 0:e.trim())||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,FL(this,{...this.settings,gatewayUrl:t,token:n}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}getUserUuidFromJwt(){let e=localStorage.getItem(`jwt`)??``;if(!e)return``;try{let t=e.split(`.`);if(t.length<2)return``;let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`);for(;n.length%4;)n+=`=`;return JSON.parse(atob(n)).userUuid||``}catch{return``}}isPageReload(){try{var e;return((e=performance.getEntriesByType(`navigation`)[0])==null?void 0:e.type)===`reload`}catch{return!1}}async initCreateApiKey(){try{var e,t;let i=this.getUserUuidFromJwt(),a=localStorage.getItem(`sealclaw_user_uuid`),o=!!i&&i!==a,s=this.isPageReload();this.configSnapshot||await gr(this);let c=(e=this.configSnapshot)==null||(e=e.config)==null?void 0:e.models,l=!!(!(c==null||(t=c.providers)==null||(t=t.sealseek)==null)&&t.apiKey),u;if(!s||!l||o){var n,r;let e=await k({name:`default`});if(!((n=e.data)!=null&&n.key)){let t=(await A()).data??[];for(let e of t)await j(e.id);e=await k({name:`default`})}if(u=(r=e.data)==null?void 0:r.key,!u)return;i&&localStorage.setItem(`sealclaw_user_uuid`,i),await this.loadSealclawModels(u)}}catch(e){console.error(`[sealclaw] initCreateApiKey error:`,e)}}async loadSealclawModels(e){try{var t;let n=(await ie(e)).data??[];if(this.sealclawModels=n,!this.client||!this.configSnapshot){console.warn(`[sealclaw] client or configSnapshot not ready`);return}let r=window.location.hostname.includes(`test`)||window.location.hostname.includes(`localhost`)||window.location.hostname.includes(`127.0.0.1`)?`https://gatewaytest.sealseek.cn/api/sealclaw/v1`:`https://gateway.sealseek.cn/api/sealclaw/v1`;if(!((t=this.configSnapshot.config)==null||(t=t.models)==null||(t=t.providers)==null)&&t.sealseek&&(await this.client.request(`config.patch`,{baseHash:this.configSnapshot.hash,raw:JSON.stringify({models:{providers:{sealseek:null}}})}),await gr(this)),!this.configSnapshot)return;let i=JSON.stringify({models:{providers:{sealseek:{baseUrl:r,api:`openai-completions`,...e?{apiKey:e}:{},models:n.map(e=>({id:e.id,name:e.id,input:[`text`,`image`]}))}}}});await this.client.request(`config.patch`,{baseHash:this.configSnapshot.hash,raw:i});let a=new Set(n.map(e=>e.id));for(let e=0;e<10&&this.client;e++){let e=await rf(this.client),t=new Set(e.filter(e=>e.provider===`sealseek`).map(e=>e.id));if(t.size===a.size&&[...a].every(e=>t.has(e))){this.chatModelCatalog=e;break}await new Promise(e=>setTimeout(e,200))}await Xp(this,{scheduleScroll:!1,force:!0})}catch(e){console.error(`[sealclaw] config.patch failed`,e)}}async loadApiKeys(){try{let e=await A();e.data&&(this.apiKeys=e.data)}catch{}}async initWebPushState(){let e=`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window;if(this.webPushSupported=e,this.webPushPermission=e?Notification.permission:`unsupported`,e)try{let{getExistingSubscription:e}=await Az(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-GEdjvonj.js`);return{getExistingSubscription:e}},[]),t=await e();this.webPushSubscribed=t!==null}catch{}}async reconcileWebPushState(){if(this.client)try{var e,t;let{getExistingSubscription:n}=await Az(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-GEdjvonj.js`);return{getExistingSubscription:e}},[]),r=await n();if(!r)return;this.webPushSubscribed=!0;let i=r.toJSON();i.endpoint&&(e=i.keys)!=null&&e.p256dh&&(t=i.keys)!=null&&t.auth&&await this.client.request(`push.web.subscribe`,{endpoint:i.endpoint,keys:{p256dh:i.keys.p256dh,auth:i.keys.auth}})}catch{}}async handleWebPushSubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{subscribeToWebPush:e}=await Az(async()=>{let{subscribeToWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{subscribeToWebPush:e}},[]);await e(this.client),this.webPushSubscribed=!0,this.webPushPermission=Notification.permission}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1,`Notification`in window&&(this.webPushPermission=Notification.permission)}}}async handleWebPushUnsubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{unsubscribeFromWebPush:e}=await Az(async()=>{let{unsubscribeFromWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{unsubscribeFromWebPush:e}},[]);await e(this.client),this.webPushSubscribed=!1}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1}}}async handleWebPushTest(){if(this.client)try{let{sendTestWebPush:e}=await Az(async()=>{let{sendTestWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{sendTestWebPush:e}},[]);await e(this.client)}catch(e){this.lastError=String(e)}}render(){return Wq(this)}};Q([D()],$.prototype,`settings`,void 0),Q([D()],$.prototype,`password`,void 0),Q([D()],$.prototype,`loginShowGatewayToken`,void 0),Q([D()],$.prototype,`loginShowGatewayPassword`,void 0),Q([D()],$.prototype,`tab`,void 0),Q([D()],$.prototype,`onboarding`,void 0),Q([D()],$.prototype,`connected`,void 0),Q([D()],$.prototype,`theme`,void 0),Q([D()],$.prototype,`themeMode`,void 0),Q([D()],$.prototype,`themeResolved`,void 0),Q([D()],$.prototype,`themeOrder`,void 0),Q([D()],$.prototype,`customThemeImportUrl`,void 0),Q([D()],$.prototype,`customThemeImportBusy`,void 0),Q([D()],$.prototype,`customThemeImportMessage`,void 0),Q([D()],$.prototype,`customThemeImportExpanded`,void 0),Q([D()],$.prototype,`customThemeImportFocusToken`,void 0),Q([D()],$.prototype,`hello`,void 0),Q([D()],$.prototype,`lastError`,void 0),Q([D()],$.prototype,`lastErrorCode`,void 0),Q([D()],$.prototype,`eventLog`,void 0),Q([D()],$.prototype,`assistantName`,void 0),Q([D()],$.prototype,`assistantAvatar`,void 0),Q([D()],$.prototype,`assistantAvatarSource`,void 0),Q([D()],$.prototype,`assistantAvatarStatus`,void 0),Q([D()],$.prototype,`assistantAvatarReason`,void 0),Q([D()],$.prototype,`assistantAvatarUploadBusy`,void 0),Q([D()],$.prototype,`assistantAvatarUploadError`,void 0),Q([D()],$.prototype,`assistantAgentId`,void 0),Q([D()],$.prototype,`userName`,void 0),Q([D()],$.prototype,`userAvatar`,void 0),Q([D()],$.prototype,`localMediaPreviewRoots`,void 0),Q([D()],$.prototype,`embedSandboxMode`,void 0),Q([D()],$.prototype,`allowExternalEmbedUrls`,void 0),Q([D()],$.prototype,`chatMessageMaxWidth`,void 0),Q([D()],$.prototype,`serverVersion`,void 0),Q([D()],$.prototype,`sessionKey`,void 0),Q([D()],$.prototype,`chatLoading`,void 0),Q([D()],$.prototype,`chatSending`,void 0),Q([D()],$.prototype,`chatMessage`,void 0),Q([D()],$.prototype,`chatMessages`,void 0),Q([D()],$.prototype,`chatToolMessages`,void 0),Q([D()],$.prototype,`chatStreamSegments`,void 0),Q([D()],$.prototype,`chatStream`,void 0),Q([D()],$.prototype,`chatStreamStartedAt`,void 0),Q([D()],$.prototype,`chatRunId`,void 0),Q([D()],$.prototype,`chatSideResult`,void 0),Q([D()],$.prototype,`compactionStatus`,void 0),Q([D()],$.prototype,`fallbackStatus`,void 0),Q([D()],$.prototype,`chatAvatarUrl`,void 0),Q([D()],$.prototype,`chatAvatarSource`,void 0),Q([D()],$.prototype,`chatAvatarStatus`,void 0),Q([D()],$.prototype,`chatAvatarReason`,void 0),Q([D()],$.prototype,`chatThinkingLevel`,void 0),Q([D()],$.prototype,`chatModelOverrides`,void 0),Q([D()],$.prototype,`chatModelsLoading`,void 0),Q([D()],$.prototype,`chatModelCatalog`,void 0),Q([D()],$.prototype,`sessionSwitchNotice`,void 0),Q([D()],$.prototype,`sessionSwitchFlashKey`,void 0),Q([D()],$.prototype,`chatQueue`,void 0),Q([D()],$.prototype,`chatQueueBySession`,void 0),Q([D()],$.prototype,`chatAttachments`,void 0),Q([D()],$.prototype,`realtimeTalkActive`,void 0),Q([D()],$.prototype,`realtimeTalkStatus`,void 0),Q([D()],$.prototype,`realtimeTalkDetail`,void 0),Q([D()],$.prototype,`realtimeTalkTranscript`,void 0),Q([D()],$.prototype,`skillStoreOpen`,void 0),Q([D()],$.prototype,`storeSkills`,void 0),Q([D()],$.prototype,`storeSkillsLoading`,void 0),Q([D()],$.prototype,`storeItemLoading`,void 0),Q([D()],$.prototype,`storeItemError`,void 0),Q([D()],$.prototype,`chatManualRefreshInFlight`,void 0),Q([D()],$.prototype,`chatHeaderControlsHidden`,void 0),Q([D()],$.prototype,`chatMobileControlsOpen`,void 0),Q([D()],$.prototype,`navDrawerOpen`,void 0),Q([D()],$.prototype,`chatInputHistoryIndex`,void 0),Q([D()],$.prototype,`chatDraftMode`,void 0),Q([D()],$.prototype,`sidebarOpen`,void 0),Q([D()],$.prototype,`sidebarContent`,void 0),Q([D()],$.prototype,`sidebarError`,void 0),Q([D()],$.prototype,`sidebarEditingSessionKey`,void 0),Q([D()],$.prototype,`sidebarEditingSessionLabel`,void 0),Q([D()],$.prototype,`sidebarMoreMenuKey`,void 0),Q([D()],$.prototype,`sidebarDeleteConfirmKey`,void 0),Q([D()],$.prototype,`splitRatio`,void 0),Q([D()],$.prototype,`nodesLoading`,void 0),Q([D()],$.prototype,`nodes`,void 0),Q([D()],$.prototype,`devicesLoading`,void 0),Q([D()],$.prototype,`devicesError`,void 0),Q([D()],$.prototype,`devicesList`,void 0),Q([D()],$.prototype,`execApprovalsLoading`,void 0),Q([D()],$.prototype,`execApprovalsSaving`,void 0),Q([D()],$.prototype,`execApprovalsDirty`,void 0),Q([D()],$.prototype,`execApprovalsSnapshot`,void 0),Q([D()],$.prototype,`execApprovalsForm`,void 0),Q([D()],$.prototype,`execApprovalsSelectedAgent`,void 0),Q([D()],$.prototype,`execApprovalsTarget`,void 0),Q([D()],$.prototype,`execApprovalsTargetNodeId`,void 0),Q([D()],$.prototype,`execApprovalQueue`,void 0),Q([D()],$.prototype,`execApprovalBusy`,void 0),Q([D()],$.prototype,`execApprovalError`,void 0),Q([D()],$.prototype,`pendingGatewayUrl`,void 0),Q([D()],$.prototype,`configLoading`,void 0),Q([D()],$.prototype,`configRaw`,void 0),Q([D()],$.prototype,`configRawOriginal`,void 0),Q([D()],$.prototype,`configValid`,void 0),Q([D()],$.prototype,`configIssues`,void 0),Q([D()],$.prototype,`configSaving`,void 0),Q([D()],$.prototype,`configApplying`,void 0),Q([D()],$.prototype,`updateRunning`,void 0),Q([D()],$.prototype,`applySessionKey`,void 0),Q([D()],$.prototype,`configSnapshot`,void 0),Q([D()],$.prototype,`configSchema`,void 0),Q([D()],$.prototype,`configSchemaVersion`,void 0),Q([D()],$.prototype,`configSchemaLoading`,void 0),Q([D()],$.prototype,`configUiHints`,void 0),Q([D()],$.prototype,`configForm`,void 0),Q([D()],$.prototype,`configFormOriginal`,void 0),Q([D()],$.prototype,`dreamingStatusLoading`,void 0),Q([D()],$.prototype,`dreamingStatusError`,void 0),Q([D()],$.prototype,`dreamingStatus`,void 0),Q([D()],$.prototype,`dreamingModeSaving`,void 0),Q([D()],$.prototype,`dreamingRestartConfirmOpen`,void 0),Q([D()],$.prototype,`dreamingRestartConfirmLoading`,void 0),Q([D()],$.prototype,`dreamingPendingEnabled`,void 0),Q([D()],$.prototype,`dreamDiaryLoading`,void 0),Q([D()],$.prototype,`dreamDiaryActionLoading`,void 0),Q([D()],$.prototype,`dreamDiaryActionMessage`,void 0),Q([D()],$.prototype,`dreamDiaryActionArchivePath`,void 0),Q([D()],$.prototype,`dreamDiaryError`,void 0),Q([D()],$.prototype,`dreamDiaryPath`,void 0),Q([D()],$.prototype,`dreamDiaryContent`,void 0),Q([D()],$.prototype,`wikiImportInsightsLoading`,void 0),Q([D()],$.prototype,`wikiImportInsightsError`,void 0),Q([D()],$.prototype,`wikiImportInsights`,void 0),Q([D()],$.prototype,`wikiMemoryPalaceLoading`,void 0),Q([D()],$.prototype,`wikiMemoryPalaceError`,void 0),Q([D()],$.prototype,`wikiMemoryPalace`,void 0),Q([D()],$.prototype,`configFormDirty`,void 0),Q([D()],$.prototype,`configSettingsMode`,void 0),Q([D()],$.prototype,`configFormMode`,void 0),Q([D()],$.prototype,`configSearchQuery`,void 0),Q([D()],$.prototype,`configActiveSection`,void 0),Q([D()],$.prototype,`configActiveSubsection`,void 0),Q([D()],$.prototype,`pendingUpdateExpectedVersion`,void 0),Q([D()],$.prototype,`updateStatusBanner`,void 0),Q([D()],$.prototype,`communicationsFormMode`,void 0),Q([D()],$.prototype,`communicationsSearchQuery`,void 0),Q([D()],$.prototype,`communicationsActiveSection`,void 0),Q([D()],$.prototype,`communicationsActiveSubsection`,void 0),Q([D()],$.prototype,`appearanceFormMode`,void 0),Q([D()],$.prototype,`appearanceSearchQuery`,void 0),Q([D()],$.prototype,`appearanceActiveSection`,void 0),Q([D()],$.prototype,`appearanceActiveSubsection`,void 0),Q([D()],$.prototype,`automationFormMode`,void 0),Q([D()],$.prototype,`automationSearchQuery`,void 0),Q([D()],$.prototype,`automationActiveSection`,void 0),Q([D()],$.prototype,`automationActiveSubsection`,void 0),Q([D()],$.prototype,`infrastructureFormMode`,void 0),Q([D()],$.prototype,`infrastructureSearchQuery`,void 0),Q([D()],$.prototype,`infrastructureActiveSection`,void 0),Q([D()],$.prototype,`infrastructureActiveSubsection`,void 0),Q([D()],$.prototype,`aiAgentsFormMode`,void 0),Q([D()],$.prototype,`aiAgentsSearchQuery`,void 0),Q([D()],$.prototype,`aiAgentsActiveSection`,void 0),Q([D()],$.prototype,`aiAgentsActiveSubsection`,void 0),Q([D()],$.prototype,`channelsLoading`,void 0),Q([D()],$.prototype,`channelsSnapshot`,void 0),Q([D()],$.prototype,`channelsError`,void 0),Q([D()],$.prototype,`channelsLastSuccess`,void 0),Q([D()],$.prototype,`whatsappLoginMessage`,void 0),Q([D()],$.prototype,`whatsappLoginQrDataUrl`,void 0),Q([D()],$.prototype,`whatsappLoginConnected`,void 0),Q([D()],$.prototype,`whatsappBusy`,void 0),Q([D()],$.prototype,`nostrProfileFormState`,void 0),Q([D()],$.prototype,`nostrProfileAccountId`,void 0),Q([D()],$.prototype,`presenceLoading`,void 0),Q([D()],$.prototype,`presenceEntries`,void 0),Q([D()],$.prototype,`presenceError`,void 0),Q([D()],$.prototype,`presenceStatus`,void 0),Q([D()],$.prototype,`agentsLoading`,void 0),Q([D()],$.prototype,`agentsList`,void 0),Q([D()],$.prototype,`agentsError`,void 0),Q([D()],$.prototype,`agentsSelectedId`,void 0),Q([D()],$.prototype,`toolsCatalogLoading`,void 0),Q([D()],$.prototype,`toolsCatalogError`,void 0),Q([D()],$.prototype,`toolsCatalogResult`,void 0),Q([D()],$.prototype,`toolsEffectiveLoading`,void 0),Q([D()],$.prototype,`toolsEffectiveLoadingKey`,void 0),Q([D()],$.prototype,`toolsEffectiveResultKey`,void 0),Q([D()],$.prototype,`toolsEffectiveError`,void 0),Q([D()],$.prototype,`toolsEffectiveResult`,void 0),Q([D()],$.prototype,`agentsPanel`,void 0),Q([D()],$.prototype,`agentFilesLoading`,void 0),Q([D()],$.prototype,`agentFilesError`,void 0),Q([D()],$.prototype,`agentFilesList`,void 0),Q([D()],$.prototype,`agentFileContents`,void 0),Q([D()],$.prototype,`agentFileDrafts`,void 0),Q([D()],$.prototype,`agentFileActive`,void 0),Q([D()],$.prototype,`agentFileSaving`,void 0),Q([D()],$.prototype,`agentIdentityLoading`,void 0),Q([D()],$.prototype,`agentIdentityError`,void 0),Q([D()],$.prototype,`agentIdentityById`,void 0),Q([D()],$.prototype,`agentSkillsLoading`,void 0),Q([D()],$.prototype,`agentSkillsError`,void 0),Q([D()],$.prototype,`agentSkillsReport`,void 0),Q([D()],$.prototype,`agentSkillsAgentId`,void 0),Q([D()],$.prototype,`sessionsLoading`,void 0),Q([D()],$.prototype,`sessionsResult`,void 0),Q([D()],$.prototype,`sessionsError`,void 0),Q([D()],$.prototype,`sessionsFilterActive`,void 0),Q([D()],$.prototype,`sessionsFilterLimit`,void 0),Q([D()],$.prototype,`sessionsIncludeGlobal`,void 0),Q([D()],$.prototype,`sessionsIncludeUnknown`,void 0),Q([D()],$.prototype,`sessionsShowArchived`,void 0),Q([D()],$.prototype,`sessionsFiltersCollapsed`,void 0),Q([D()],$.prototype,`sessionsHideCron`,void 0),Q([D()],$.prototype,`sessionsSearchQuery`,void 0),Q([D()],$.prototype,`sessionsSortColumn`,void 0),Q([D()],$.prototype,`sessionsSortDir`,void 0),Q([D()],$.prototype,`sessionsPage`,void 0),Q([D()],$.prototype,`sessionsPageSize`,void 0),Q([D()],$.prototype,`sessionsSelectedKeys`,void 0),Q([D()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointBusyKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),Q([D()],$.prototype,`usageLoading`,void 0),Q([D()],$.prototype,`usageResult`,void 0),Q([D()],$.prototype,`usageCostSummary`,void 0),Q([D()],$.prototype,`usageError`,void 0),Q([D()],$.prototype,`usageStartDate`,void 0),Q([D()],$.prototype,`usageEndDate`,void 0),Q([D()],$.prototype,`usageSelectedSessions`,void 0),Q([D()],$.prototype,`usageSelectedDays`,void 0),Q([D()],$.prototype,`usageSelectedHours`,void 0),Q([D()],$.prototype,`usageChartMode`,void 0),Q([D()],$.prototype,`usageDailyChartMode`,void 0),Q([D()],$.prototype,`usageTimeSeriesMode`,void 0),Q([D()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),Q([D()],$.prototype,`usageTimeSeries`,void 0),Q([D()],$.prototype,`usageTimeSeriesLoading`,void 0),Q([D()],$.prototype,`usageTimeSeriesCursorStart`,void 0),Q([D()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),Q([D()],$.prototype,`usageSessionLogs`,void 0),Q([D()],$.prototype,`usageSessionLogsLoading`,void 0),Q([D()],$.prototype,`usageSessionLogsExpanded`,void 0),Q([D()],$.prototype,`usageQuery`,void 0),Q([D()],$.prototype,`usageQueryDraft`,void 0),Q([D()],$.prototype,`usageSessionSort`,void 0),Q([D()],$.prototype,`usageSessionSortDir`,void 0),Q([D()],$.prototype,`usageRecentSessions`,void 0),Q([D()],$.prototype,`usageTimeZone`,void 0),Q([D()],$.prototype,`usageContextExpanded`,void 0),Q([D()],$.prototype,`usageHeaderPinned`,void 0),Q([D()],$.prototype,`usageSessionsTab`,void 0),Q([D()],$.prototype,`usageVisibleColumns`,void 0),Q([D()],$.prototype,`usageLogFilterRoles`,void 0),Q([D()],$.prototype,`usageLogFilterTools`,void 0),Q([D()],$.prototype,`usageLogFilterHasTools`,void 0),Q([D()],$.prototype,`usageLogFilterQuery`,void 0),Q([D()],$.prototype,`activePanelId`,void 0),Q([D()],$.prototype,`sidebarStatusPopoverOpen`,void 0),Q([D()],$.prototype,`fileTreeLoading`,void 0),Q([D()],$.prototype,`fileTreeError`,void 0),Q([D()],$.prototype,`fileTreeResult`,void 0),Q([D()],$.prototype,`fileTreeSessionId`,void 0),Q([D()],$.prototype,`fileTreeExpandedDirs`,void 0),Q([D()],$.prototype,`fileTreeDirChildren`,void 0),Q([D()],$.prototype,`fileTreeDirLoading`,void 0),Q([D()],$.prototype,`cnChannelsLoading`,void 0),Q([D()],$.prototype,`cnChannelsData`,void 0),Q([D()],$.prototype,`cnChannelsError`,void 0),Q([D()],$.prototype,`cnConnecting`,void 0),Q([D()],$.prototype,`cnQrcodeChannel`,void 0),Q([D()],$.prototype,`cnQrcodeImg`,void 0),Q([D()],$.prototype,`cnQrcodeToken`,void 0),Q([D()],$.prototype,`cnQrcodeLoading`,void 0),Q([D()],$.prototype,`cnFeishuOpen`,void 0),Q([D()],$.prototype,`cnFeishuSaving`,void 0),Q([D()],$.prototype,`skillCenterTab`,void 0),Q([D()],$.prototype,`skillCenterCategory`,void 0),Q([D()],$.prototype,`skillCenterSearch`,void 0),Q([D()],$.prototype,`skillCenterCategories`,void 0),Q([D()],$.prototype,`skillCenterCategoriesLoading`,void 0),Q([D()],$.prototype,`skillCenterItemBusy`,void 0),Q([D()],$.prototype,`skillCenterItemError`,void 0),Q([D()],$.prototype,`fileSpaceLoading`,void 0),Q([D()],$.prototype,`fileSpaceError`,void 0),Q([D()],$.prototype,`fileSpaceData`,void 0),Q([D()],$.prototype,`fileSpaceSearch`,void 0),Q([D()],$.prototype,`fileSpaceCollapsed`,void 0),Q([D()],$.prototype,`cronLoading`,void 0),Q([D()],$.prototype,`cronQuickCreateOpen`,void 0),Q([D()],$.prototype,`cronQuickCreateStep`,void 0),Q([D()],$.prototype,`cronQuickCreateDraft`,void 0),Q([D()],$.prototype,`cronJobsLoadingMore`,void 0),Q([D()],$.prototype,`cronJobs`,void 0),Q([D()],$.prototype,`cronJobsTotal`,void 0),Q([D()],$.prototype,`cronJobsHasMore`,void 0),Q([D()],$.prototype,`cronJobsNextOffset`,void 0),Q([D()],$.prototype,`cronJobsLimit`,void 0),Q([D()],$.prototype,`cronJobsQuery`,void 0),Q([D()],$.prototype,`cronJobsEnabledFilter`,void 0),Q([D()],$.prototype,`cronJobsScheduleKindFilter`,void 0),Q([D()],$.prototype,`cronJobsLastStatusFilter`,void 0),Q([D()],$.prototype,`cronJobsSortBy`,void 0),Q([D()],$.prototype,`cronJobsSortDir`,void 0),Q([D()],$.prototype,`cronStatus`,void 0),Q([D()],$.prototype,`cronError`,void 0),Q([D()],$.prototype,`cronForm`,void 0),Q([D()],$.prototype,`cronFormCollapsed`,void 0),Q([D()],$.prototype,`cronFieldErrors`,void 0),Q([D()],$.prototype,`cronEditingJobId`,void 0),Q([D()],$.prototype,`cronRunsJobId`,void 0),Q([D()],$.prototype,`cronRunsLoadingMore`,void 0),Q([D()],$.prototype,`cronRuns`,void 0),Q([D()],$.prototype,`cronRunsTotal`,void 0),Q([D()],$.prototype,`cronRunsHasMore`,void 0),Q([D()],$.prototype,`cronRunsNextOffset`,void 0),Q([D()],$.prototype,`cronRunsLimit`,void 0),Q([D()],$.prototype,`cronRunsScope`,void 0),Q([D()],$.prototype,`cronRunsStatuses`,void 0),Q([D()],$.prototype,`cronRunsDeliveryStatuses`,void 0),Q([D()],$.prototype,`cronRunsStatusFilter`,void 0),Q([D()],$.prototype,`cronRunsQuery`,void 0),Q([D()],$.prototype,`cronRunsSortDir`,void 0),Q([D()],$.prototype,`cronModelSuggestions`,void 0),Q([D()],$.prototype,`cronBusy`,void 0),Q([D()],$.prototype,`updateAvailable`,void 0),Q([D()],$.prototype,`attentionItems`,void 0),Q([D()],$.prototype,`paletteOpen`,void 0),Q([D()],$.prototype,`sessionSwitcherOpen`,void 0),Q([D()],$.prototype,`paletteQuery`,void 0),Q([D()],$.prototype,`paletteActiveIndex`,void 0),Q([D()],$.prototype,`overviewShowGatewayToken`,void 0),Q([D()],$.prototype,`overviewShowGatewayPassword`,void 0),Q([D()],$.prototype,`overviewLogLines`,void 0),Q([D()],$.prototype,`overviewLogCursor`,void 0),Q([D()],$.prototype,`skillsLoading`,void 0),Q([D()],$.prototype,`skillsReport`,void 0),Q([D()],$.prototype,`skillsError`,void 0),Q([D()],$.prototype,`skillsFilter`,void 0),Q([D()],$.prototype,`skillsStatusFilter`,void 0),Q([D()],$.prototype,`skillEdits`,void 0),Q([D()],$.prototype,`skillsBusyKey`,void 0),Q([D()],$.prototype,`skillMessages`,void 0),Q([D()],$.prototype,`skillsDetailKey`,void 0),Q([D()],$.prototype,`clawhubSearchQuery`,void 0),Q([D()],$.prototype,`clawhubSearchResults`,void 0),Q([D()],$.prototype,`clawhubSearchLoading`,void 0),Q([D()],$.prototype,`clawhubSearchError`,void 0),Q([D()],$.prototype,`clawhubDetail`,void 0),Q([D()],$.prototype,`clawhubDetailSlug`,void 0),Q([D()],$.prototype,`clawhubDetailLoading`,void 0),Q([D()],$.prototype,`clawhubDetailError`,void 0),Q([D()],$.prototype,`clawhubInstallSlug`,void 0),Q([D()],$.prototype,`clawhubInstallMessage`,void 0),Q([D()],$.prototype,`healthLoading`,void 0),Q([D()],$.prototype,`healthResult`,void 0),Q([D()],$.prototype,`healthError`,void 0),Q([D()],$.prototype,`modelAuthStatusLoading`,void 0),Q([D()],$.prototype,`modelAuthStatusResult`,void 0),Q([D()],$.prototype,`modelAuthStatusError`,void 0),Q([D()],$.prototype,`debugLoading`,void 0),Q([D()],$.prototype,`debugStatus`,void 0),Q([D()],$.prototype,`debugHealth`,void 0),Q([D()],$.prototype,`debugModels`,void 0),Q([D()],$.prototype,`debugHeartbeat`,void 0),Q([D()],$.prototype,`debugCallMethod`,void 0),Q([D()],$.prototype,`debugCallParams`,void 0),Q([D()],$.prototype,`debugCallResult`,void 0),Q([D()],$.prototype,`debugCallError`,void 0),Q([D()],$.prototype,`apiKeys`,void 0),Q([D()],$.prototype,`sealclawModels`,void 0),Q([D()],$.prototype,`webPushSupported`,void 0),Q([D()],$.prototype,`webPushPermission`,void 0),Q([D()],$.prototype,`webPushSubscribed`,void 0),Q([D()],$.prototype,`webPushLoading`,void 0),Q([D()],$.prototype,`logsLoading`,void 0),Q([D()],$.prototype,`logsError`,void 0),Q([D()],$.prototype,`logsFile`,void 0),Q([D()],$.prototype,`logsEntries`,void 0),Q([D()],$.prototype,`logsFilterText`,void 0),Q([D()],$.prototype,`logsLevelFilters`,void 0),Q([D()],$.prototype,`logsAutoFollow`,void 0),Q([D()],$.prototype,`logsTruncated`,void 0),Q([D()],$.prototype,`logsCursor`,void 0),Q([D()],$.prototype,`logsLastFetchAt`,void 0),Q([D()],$.prototype,`logsLimit`,void 0),Q([D()],$.prototype,`logsMaxBytes`,void 0),Q([D()],$.prototype,`logsAtBottom`,void 0),Q([D()],$.prototype,`chatNewMessagesBelow`,void 0),customElements.get(`openclaw-app`)||customElements.define(`openclaw-app`,$);var SJ=x((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=typeof window<`u`?window.proxy||window:{};e.qiankunWindow=t,e.renderWithQiankun=function(e){t!=null&&t.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),t.qiankunName&&(window.moudleQiankunAppLifeCycles[t.qiankunName]=e))}}))();function CJ(){`serviceWorker`in navigator&&navigator.serviceWorker.register(`./sw.js`)}var wJ=null;(0,SJ.renderWithQiankun)({bootstrap(){return Promise.resolve()},mount(e){CJ(),window.__OPENCLAW_CONTROL_UI_BASE_PATH__=`/sealclaw`;let t=(e==null?void 0:e.container)??document.body;return wJ=document.createElement(`openclaw-app`),t.appendChild(wJ),Promise.resolve()},unmount(){return wJ==null||wJ.remove(),wJ=null,Promise.resolve()},update(){return Promise.resolve()}}),SJ.qiankunWindow.__POWERED_BY_QIANKUN__||CJ();export{lp as A,mo as B,Gf as C,op as D,ip as E,ff as F,li as G,ha as H,Yo as I,Ge as J,Rr as K,U as L,Wf as M,Uf as N,up as O,Df as P,go as R,Cp as S,gp as T,ma as U,xo as V,bi as W,Oe as Y,np as _,_K as a,rp as b,GU as c,UP as d,LP as f,hh as g,pT as h,yK as i,wp as j,sp as k,kU as l,XO as m,xK as n,gK as o,fA as p,zn as q,bK as r,vK as s,SK as t,Az as u,ap as v,cp as w,Sp as x,vp as y,ho as z};
7398
- //# sourceMappingURL=index-CnaJ1Ys6.js.map
7397
+ `,this.configRawOriginal=``,this.configValid=null,this.configIssues=[],this.configSaving=!1,this.configApplying=!1,this.updateRunning=!1,this.applySessionKey=this.settings.lastActiveSessionKey,this.configSnapshot=null,this.configSchema=null,this.configSchemaVersion=null,this.configSchemaLoading=!1,this.configUiHints={},this.configForm=null,this.configFormOriginal=null,this.dreamingStatusLoading=!1,this.dreamingStatusError=null,this.dreamingStatus=null,this.dreamingModeSaving=!1,this.dreamingRestartConfirmOpen=!1,this.dreamingRestartConfirmLoading=!1,this.dreamingPendingEnabled=null,this.dreamDiaryLoading=!1,this.dreamDiaryActionLoading=!1,this.dreamDiaryActionMessage=null,this.dreamDiaryActionArchivePath=null,this.dreamDiaryError=null,this.dreamDiaryPath=null,this.dreamDiaryContent=null,this.wikiImportInsightsLoading=!1,this.wikiImportInsightsError=null,this.wikiImportInsights=null,this.wikiMemoryPalaceLoading=!1,this.wikiMemoryPalaceError=null,this.wikiMemoryPalace=null,this.configFormDirty=!1,this.configSettingsMode=`quick`,this.configFormMode=`form`,this.configSearchQuery=``,this.configActiveSection=null,this.configActiveSubsection=null,this.pendingUpdateExpectedVersion=null,this.updateStatusBanner=null,this.communicationsFormMode=`form`,this.communicationsSearchQuery=``,this.communicationsActiveSection=null,this.communicationsActiveSubsection=null,this.appearanceFormMode=`form`,this.appearanceSearchQuery=``,this.appearanceActiveSection=null,this.appearanceActiveSubsection=null,this.automationFormMode=`form`,this.automationSearchQuery=``,this.automationActiveSection=null,this.automationActiveSubsection=null,this.infrastructureFormMode=`form`,this.infrastructureSearchQuery=``,this.infrastructureActiveSection=null,this.infrastructureActiveSubsection=null,this.aiAgentsFormMode=`form`,this.aiAgentsSearchQuery=``,this.aiAgentsActiveSection=null,this.aiAgentsActiveSubsection=null,this.channelsLoading=!1,this.channelsSnapshot=null,this.channelsError=null,this.channelsLastSuccess=null,this.whatsappLoginMessage=null,this.whatsappLoginQrDataUrl=null,this.whatsappLoginConnected=null,this.whatsappBusy=!1,this.nostrProfileFormState=null,this.nostrProfileAccountId=null,this.presenceLoading=!1,this.presenceEntries=[],this.presenceError=null,this.presenceStatus=null,this.agentsLoading=!1,this.agentsList=null,this.agentsError=null,this.agentsSelectedId=null,this.toolsCatalogLoading=!1,this.toolsCatalogError=null,this.toolsCatalogResult=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveResult=null,this.agentsPanel=`files`,this.agentFilesLoading=!1,this.agentFilesError=null,this.agentFilesList=null,this.agentFileContents={},this.agentFileDrafts={},this.agentFileActive=null,this.agentFileSaving=!1,this.agentIdentityLoading=!1,this.agentIdentityError=null,this.agentIdentityById={},this.agentSkillsLoading=!1,this.agentSkillsError=null,this.agentSkillsReport=null,this.agentSkillsAgentId=null,this.sessionsLoading=!1,this.sessionsResult=null,this.sessionsError=null,this.sessionsFilterActive=mm.activeMinutes,this.sessionsFilterLimit=mm.limit,this.sessionsIncludeGlobal=!0,this.sessionsIncludeUnknown=!1,this.sessionsShowArchived=!1,this.sessionsFiltersCollapsed=!1,this.sessionsHideCron=!0,this.sessionsSearchQuery=``,this.sessionsSortColumn=`updated`,this.sessionsSortDir=`desc`,this.sessionsPage=0,this.sessionsPageSize=25,this.sessionsSelectedKeys=new Set,this.sessionsExpandedCheckpointKey=null,this.sessionsCheckpointItemsByKey={},this.sessionsCheckpointLoadingKey=null,this.sessionsCheckpointBusyKey=null,this.sessionsCheckpointErrorByKey={},this.usageLoading=!1,this.usageResult=null,this.usageCostSummary=null,this.usageError=null,this.usageStartDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageEndDate=(()=>{let e=new Date;return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`})(),this.usageSelectedSessions=[],this.usageSelectedDays=[],this.usageSelectedHours=[],this.usageChartMode=`tokens`,this.usageDailyChartMode=`by-type`,this.usageTimeSeriesMode=`per-turn`,this.usageTimeSeriesBreakdownMode=`by-type`,this.usageTimeSeries=null,this.usageTimeSeriesLoading=!1,this.usageTimeSeriesCursorStart=null,this.usageTimeSeriesCursorEnd=null,this.usageSessionLogs=null,this.usageSessionLogsLoading=!1,this.usageSessionLogsExpanded=!1,this.usageQuery=``,this.usageQueryDraft=``,this.usageSessionSort=`recent`,this.usageSessionSortDir=`desc`,this.usageRecentSessions=[],this.usageTimeZone=`local`,this.usageContextExpanded=!1,this.usageHeaderPinned=!1,this.usageSessionsTab=`all`,this.usageVisibleColumns=[`channel`,`agent`,`provider`,`model`,`messages`,`tools`,`errors`,`duration`],this.usageLogFilterRoles=[],this.usageLogFilterTools=[],this.usageLogFilterHasTools=!1,this.usageLogFilterQuery=``,this.activePanelId=null,this.sidebarStatusPopoverOpen=!1,this.fileTreeLoading=!1,this.fileTreeError=null,this.fileTreeResult=null,this.fileTreeSessionId=void 0,this.fileTreeExpandedDirs=[],this.fileTreeDirChildren={},this.fileTreeDirLoading=[],this.cnChannelsLoading=!1,this.cnChannelsData=null,this.cnChannelsError=null,this.cnConnecting=null,this.cnQrcodeChannel=null,this.cnQrcodeImg=null,this.cnQrcodeToken=null,this.cnQrcodeLoading=!1,this.cnQrcodePollTimer=null,this.cnFeishuOpen=!1,this.cnFeishuSaving=!1,this.cnFeishuFormAppId=``,this.cnFeishuFormAppSecret=``,this.skillCenterTab=`center`,this.skillCenterCategory=null,this.skillCenterSearch=``,this.skillCenterCategories=null,this.skillCenterCategoriesLoading=!1,this.skillCenterItemBusy=null,this.skillCenterItemError=null,this.fileSpaceLoading=!1,this.fileSpaceError=null,this.fileSpaceData=null,this.fileSpaceSearch=``,this.fileSpaceCollapsed=[],this.usageQueryDebounceTimer=null,this.cronLoading=!1,this.cronQuickCreateOpen=!1,this.cronQuickCreateStep=`what`,this.cronQuickCreateDraft=null,this.cronJobsLoadingMore=!1,this.cronJobs=[],this.cronJobsTotal=0,this.cronJobsHasMore=!1,this.cronJobsNextOffset=null,this.cronJobsLimit=50,this.cronJobsQuery=``,this.cronJobsEnabledFilter=`all`,this.cronJobsScheduleKindFilter=`all`,this.cronJobsLastStatusFilter=`all`,this.cronJobsSortBy=`nextRunAtMs`,this.cronJobsSortDir=`asc`,this.cronStatus=null,this.cronError=null,this.cronForm={...hm},this.cronFormCollapsed=!1,this.cronFieldErrors={},this.cronEditingJobId=null,this.cronRunsJobId=null,this.cronRunsLoadingMore=!1,this.cronRuns=[],this.cronRunsTotal=0,this.cronRunsHasMore=!1,this.cronRunsNextOffset=null,this.cronRunsLimit=50,this.cronRunsScope=`all`,this.cronRunsStatuses=[],this.cronRunsDeliveryStatuses=[],this.cronRunsStatusFilter=`all`,this.cronRunsQuery=``,this.cronRunsSortDir=`desc`,this.cronModelSuggestions=[],this.cronBusy=!1,this.updateAvailable=null,this.attentionItems=[],this.paletteOpen=!1,this.sessionSwitcherOpen=!1,this.paletteQuery=``,this.paletteActiveIndex=0,this.overviewShowGatewayToken=!1,this.overviewShowGatewayPassword=!1,this.overviewLogLines=[],this.overviewLogCursor=0,this.skillsLoading=!1,this.skillsReport=null,this.skillsError=null,this.skillsFilter=``,this.skillsStatusFilter=`all`,this.skillEdits={},this.skillsBusyKey=null,this.skillMessages={},this.skillsDetailKey=null,this.clawhubSearchQuery=``,this.clawhubSearchResults=null,this.clawhubSearchLoading=!1,this.clawhubSearchError=null,this.clawhubDetail=null,this.clawhubDetailSlug=null,this.clawhubDetailLoading=!1,this.clawhubDetailError=null,this.clawhubInstallSlug=null,this.clawhubInstallMessage=null,this.healthLoading=!1,this.healthResult=null,this.healthError=null,this.modelAuthStatusLoading=!1,this.modelAuthStatusResult=null,this.modelAuthStatusError=null,this.debugLoading=!1,this.debugStatus=null,this.debugHealth=null,this.debugModels=[],this.debugHeartbeat=null,this.debugCallMethod=``,this.debugCallParams=`{}`,this.debugCallResult=null,this.debugCallError=null,this.apiKeys=[],this.sealclawModels=[],this.webPushSupported=!1,this.webPushPermission=`unsupported`,this.webPushSubscribed=!1,this.webPushLoading=!1,this.logsLoading=!1,this.logsError=null,this.logsFile=null,this.logsEntries=[],this.logsFilterText=``,this.logsLevelFilters={...pm},this.logsAutoFollow=!0,this.logsTruncated=!1,this.logsCursor=null,this.logsLastFetchAt=null,this.logsLimit=500,this.logsMaxBytes=25e4,this.logsAtBottom=!0,this.client=null,this.chatScrollFrame=null,this.chatScrollTimeout=null,this.chatLastScrollTop=0,this.chatHasAutoScrolled=!1,this.chatUserNearBottom=!0,this.chatNewMessagesBelow=!1,this.nodesPollInterval=null,this.logsPollInterval=null,this.debugPollInterval=null,this.logsScrollFrame=null,this.controlUiResponsivenessObserver=null,this.toolStreamById=new Map,this.toolStreamOrder=[],this.refreshSessionsAfterChat=new Set,this.chatSideResultTerminalRuns=new Set,this.basePath=``,this.popStateHandler=()=>iR(this),this.topbarObserver=null,this.globalKeydownHandler=e=>{(e.metaKey||e.ctrlKey)&&!e.shiftKey&&e.key===`k`&&(e.preventDefault(),this.paletteOpen=!this.paletteOpen,this.paletteOpen&&(this.paletteQuery=``,this.paletteActiveIndex=0))},this.chatMobileControlsKeydownHandler=e=>{e.key!==`Escape`||!this.chatMobileControlsOpen||(e.preventDefault(),this.setChatMobileControlsOpen(!1,{restoreFocus:!0}))},this.chatMobileControlsPointerdownHandler=e=>{if(!this.chatMobileControlsOpen)return;let t=this.querySelector(`.chat-mobile-controls-wrapper`);t&&e.composedPath().includes(t)||this.setChatMobileControlsOpen(!1)},this.sealclawInitDone=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.onSlashAction=async e=>{switch(e){case`new-session`:Hz(this);break;case`toggle-focus`:this.applySettings({...this.settings,chatFocusMode:!this.settings.chatFocusMode});break;case`export`:qO(this.chatMessages,this.assistantName);break;case`refresh-tools-effective`:await ua(this);break}},document.addEventListener(`keydown`,this.globalKeydownHandler),document.addEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.addEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),lz(this),this.initWebPushState(),this.loadApiKeys()}firstUpdated(){uz(this)}disconnectedCallback(){document.removeEventListener(`keydown`,this.globalKeydownHandler),document.removeEventListener(`keydown`,this.chatMobileControlsKeydownHandler),document.removeEventListener(`pointerdown`,this.chatMobileControlsPointerdownHandler),this.sessionSwitchNoticeTimer!==null&&(window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchNoticeTimer=null),this.sessionSwitchFlashTimer!==null&&(window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchFlashTimer=null),this.chatMobileControlsTrigger=null,pz(this),super.disconnectedCallback()}updated(e){if(mz(this,e),e.has(`connected`)&&this.connected&&(this.sealclawInitDone?Xp(this,{scheduleScroll:!1,force:!0}):(this.sealclawInitDone=!0,this.initCreateApiKey())),e.has(`tab`)&&this.tab!==`chat`&&this.chatMobileControlsOpen&&this.setChatMobileControlsOpen(!1),!e.has(`sessionKey`)||this.agentsPanel!==`tools`)return;let t=ta(this.sessionKey);if(this.agentsSelectedId&&this.agentsSelectedId===t){sa(this,{agentId:this.agentsSelectedId,sessionKey:this.sessionKey});return}this.toolsEffectiveResult=null,this.toolsEffectiveResultKey=null,this.toolsEffectiveError=null,this.toolsEffectiveLoading=!1,this.toolsEffectiveLoadingKey=null}connect(){tz(this)}handleChatScroll(e){Vs(this,e)}handleLogsScroll(e){Hs(this,e)}exportLogs(e,t){Ws(e,t)}resetToolStream(){sc(this)}resetChatScroll(){Us(this)}scrollToBottom(e){Us(this),zs(this,!0,!!(e!=null&&e.smooth))}async loadAssistantIdentity(){await wR(this)}applySettings(e){FL(this,e)}applyLocalUserIdentity(e){IL(this,e)}setTab(e){e===`filespace`&&(this.fileSpaceData=null,this.fileSpaceError=null),WL(this,e),e!==`chat`&&(this.setChatMobileControlsOpen(!1),this.sidebarOpen&&this.handleCloseSidebar()),this.navDrawerOpen=!1}setChatMobileControlsOpen(e,t){if(e){this.chatMobileControlsTrigger=(t==null?void 0:t.trigger)??this.chatMobileControlsTrigger,this.chatMobileControlsOpen=!0;return}let n=t!=null&&t.restoreFocus?this.chatMobileControlsTrigger:null;this.chatMobileControlsOpen=!1,this.chatMobileControlsTrigger=null,!(!(n instanceof HTMLElement)||!n.isConnected)&&requestAnimationFrame(()=>{n.isConnected&&n.focus()})}setTheme(e,t){KL(this,e,t),this.themeOrder=this.buildThemeOrder(e)}setThemeMode(e,t){qL(this,e,t)}setCustomThemeImportUrl(e){var t;this.customThemeImportUrl=e,((t=this.customThemeImportMessage)==null?void 0:t.kind)===`error`&&(this.customThemeImportMessage=null)}openCustomThemeImport(){this.customThemeImportExpanded=!0,this.customThemeImportFocusToken+=1,this.settings.customTheme||(this.customThemeImportSelectOnSuccess=!0)}async importCustomTheme(){if(!this.customThemeImportBusy){this.customThemeImportExpanded=!0,this.customThemeImportBusy=!0,this.customThemeImportMessage=null;try{let e=await bw(this.customThemeImportUrl),t=this.theme===`custom`||!this.settings.customTheme||this.customThemeImportSelectOnSuccess;FL(this,{...this.settings,theme:t?`custom`:this.settings.theme,customTheme:e}),this.themeOrder=this.buildThemeOrder(t?`custom`:this.theme),this.customThemeImportUrl=``,this.customThemeImportSelectOnSuccess=!1,this.customThemeImportMessage={kind:`success`,text:`Imported ${e.label}.`}}catch(e){this.customThemeImportMessage={kind:`error`,text:e instanceof Error?e.message:`Failed to import tweakcn theme.`}}finally{this.customThemeImportBusy=!1}}}clearCustomTheme(){let e=this.theme===`custom`?`claw`:this.theme;this.customThemeImportExpanded=!0,this.customThemeImportSelectOnSuccess=!1,FL(this,{...this.settings,theme:e,customTheme:void 0}),this.themeOrder=this.buildThemeOrder(e),this.customThemeImportMessage={kind:`success`,text:`Cleared custom theme.`}}setBorderRadius(e){FL(this,{...this.settings,borderRadius:e}),this.requestUpdate()}announceSessionSwitch(e,t){let n=++this.sessionSwitchNoticeSeq;this.sessionSwitchNoticeTimer!==null&&window.clearTimeout(this.sessionSwitchNoticeTimer),this.sessionSwitchFlashTimer!==null&&window.clearTimeout(this.sessionSwitchFlashTimer),this.sessionSwitchNotice={id:n,text:`已切换到 ${t}`},this.sessionSwitchFlashKey=e,this.sessionSwitchFlashTimer=window.setTimeout(()=>{var e;((e=this.sessionSwitchNotice)==null?void 0:e.id)===n&&(this.sessionSwitchFlashKey=null),this.sessionSwitchFlashTimer=null},200),this.sessionSwitchNoticeTimer=window.setTimeout(()=>{var e;((e=this.sessionSwitchNotice)==null?void 0:e.id)===n&&(this.sessionSwitchNotice=null),this.sessionSwitchNoticeTimer=null},2800)}buildThemeOrder(e){return[e,...[...ww].filter(t=>t!==e)]}async loadOverview(e){await uR(this,e)}async loadCron(){await gR(this)}async handleAbortChat(){await jp(this)}handleChatDraftChange(e){xl(this,e)}handleChatInputHistoryKey(e){return Tl(this,e)}resetChatInputHistoryNavigation(){bl(this)}removeQueuedMessage(e){Vp(this,e)}async handleSendChat(e,t){let n=(e??this.chatMessage).trim();await Wz(this,n)&&await Up(this,e,t)}async toggleRealtimeTalk(){if(this.realtimeTalkSession)if(this.realtimeTalkStatus===`error`)this.realtimeTalkSession.stop(),this.realtimeTalkSession=null;else{this.realtimeTalkSession.stop(),this.realtimeTalkSession=null,this.realtimeTalkActive=!1,this.realtimeTalkStatus=`idle`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;return}if(!this.client||!this.connected){this.lastError=`Gateway not connected`;return}this.realtimeTalkActive=!0,this.realtimeTalkStatus=`connecting`,this.realtimeTalkDetail=null,this.realtimeTalkTranscript=null;let e=new vJ(this.client,this.sessionKey,{onStatus:(e,t)=>{this.realtimeTalkStatus=e,this.realtimeTalkDetail=t??null,(e===`idle`||e===`error`)&&(this.realtimeTalkActive=e!==`idle`)},onTranscript:e=>{this.realtimeTalkTranscript=`${e.role===`user`?`你`:`万能玺虾`}: ${e.text}`}});this.realtimeTalkSession=e;try{await e.start()}catch(t){e.stop(),this.realtimeTalkSession===e&&(this.realtimeTalkSession=null),this.realtimeTalkActive=!1,this.realtimeTalkStatus=`error`,this.realtimeTalkDetail=t instanceof Error?t.message:String(t),this.lastError=this.realtimeTalkDetail}}async steerQueuedChatMessage(e){await zp(this,e)}async handleWhatsAppStart(e){await Br(this,e)}async handleWhatsAppWait(){await Vr(this)}async handleWhatsAppLogout(){await Hr(this)}async handleChannelConfigSave(){await Ur(this)}async handleChannelConfigReload(){await Wr(this)}handleNostrProfileEdit(e,t){Yr(this,e,t)}handleNostrProfileCancel(){Xr(this)}handleNostrProfileFieldChange(e,t){Zr(this,e,t)}async handleNostrProfileSave(){await $r(this)}async handleNostrProfileImport(){await ei(this)}handleNostrProfileToggleAdvanced(){Qr(this)}async handleExecApprovalDecision(e){let t=this.execApprovalQueue[0];if(!(!t||!this.client||this.execApprovalBusy)){this.execApprovalBusy=!0,this.execApprovalError=null;try{let n=t.kind===`plugin`?`plugin.approval.resolve`:`exec.approval.resolve`;await this.client.request(n,{id:t.id,decision:e}),this.execApprovalQueue=this.execApprovalQueue.filter(e=>e.id!==t.id)}catch(e){this.execApprovalError=`Approval failed: ${String(e)}`}finally{this.execApprovalBusy=!1}}}handleGatewayUrlConfirm(){var e;let t=this.pendingGatewayUrl;if(!t)return;let n=((e=this.pendingGatewayToken)==null?void 0:e.trim())||``;this.pendingGatewayUrl=null,this.pendingGatewayToken=null,FL(this,{...this.settings,gatewayUrl:t,token:n}),this.connect()}handleGatewayUrlCancel(){this.pendingGatewayUrl=null,this.pendingGatewayToken=null}handleOpenSidebar(e){this.sidebarCloseTimer!=null&&(window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=null),this.sidebarContent=e,this.sidebarError=null,this.sidebarOpen=!0}handleCloseSidebar(){this.sidebarOpen=!1,this.sidebarCloseTimer!=null&&window.clearTimeout(this.sidebarCloseTimer),this.sidebarCloseTimer=window.setTimeout(()=>{this.sidebarOpen||(this.sidebarContent=null,this.sidebarError=null,this.sidebarCloseTimer=null)},200)}handleSplitRatioChange(e){let t=Math.max(.4,Math.min(.7,e));this.splitRatio=t,this.applySettings({...this.settings,splitRatio:t})}getUserUuidFromJwt(){let e=localStorage.getItem(`jwt`)??``;if(!e)return``;try{let t=e.split(`.`);if(t.length<2)return``;let n=t[1].replace(/-/g,`+`).replace(/_/g,`/`);for(;n.length%4;)n+=`=`;return JSON.parse(atob(n)).userUuid||``}catch{return``}}isPageReload(){try{var e;return((e=performance.getEntriesByType(`navigation`)[0])==null?void 0:e.type)===`reload`}catch{return!1}}async initCreateApiKey(){try{var e,t;let i=this.getUserUuidFromJwt(),a=localStorage.getItem(`sealclaw_user_uuid`),o=!!i&&i!==a,s=this.isPageReload();this.configSnapshot||await gr(this);let c=(e=this.configSnapshot)==null||(e=e.config)==null?void 0:e.models,l=!!(!(c==null||(t=c.providers)==null||(t=t.sealseek)==null)&&t.apiKey),u;if(!s||!l||o){var n,r;let e=await k({name:`default`});if(!((n=e.data)!=null&&n.key)){let t=(await A()).data??[];for(let e of t)await j(e.id);e=await k({name:`default`})}if(u=(r=e.data)==null?void 0:r.key,!u)return;i&&localStorage.setItem(`sealclaw_user_uuid`,i),await this.loadSealclawModels(u)}}catch(e){console.error(`[sealclaw] initCreateApiKey error:`,e)}}async loadSealclawModels(e){try{var t;let n=(await ie(e)).data??[];if(this.sealclawModels=n,!this.client||!this.configSnapshot){console.warn(`[sealclaw] client or configSnapshot not ready`);return}let r=window.location.hostname.includes(`test`)||window.location.hostname.includes(`localhost`)||window.location.hostname.includes(`127.0.0.1`)?`https://gatewaytest.sealseek.cn/api/sealclaw/v1`:`https://gateway.sealseek.cn/api/sealclaw/v1`;if(!((t=this.configSnapshot.config)==null||(t=t.models)==null||(t=t.providers)==null)&&t.sealseek&&(await this.client.request(`config.patch`,{baseHash:this.configSnapshot.hash,raw:JSON.stringify({models:{providers:{sealseek:null}}})}),await gr(this)),!this.configSnapshot)return;let i=JSON.stringify({models:{providers:{sealseek:{baseUrl:r,api:`openai-completions`,...e?{apiKey:e}:{},models:n.map(e=>({id:e.id,name:e.id,input:[`text`,`image`]}))}}}});await this.client.request(`config.patch`,{baseHash:this.configSnapshot.hash,raw:i});let a=new Set(n.map(e=>e.id));for(let e=0;e<10&&this.client;e++){let e=await rf(this.client),t=new Set(e.filter(e=>e.provider===`sealseek`).map(e=>e.id));if(t.size===a.size&&[...a].every(e=>t.has(e))){this.chatModelCatalog=e;break}await new Promise(e=>setTimeout(e,200))}await Xp(this,{scheduleScroll:!1,force:!0})}catch(e){console.error(`[sealclaw] config.patch failed`,e)}}async loadApiKeys(){try{let e=await A();e.data&&(this.apiKeys=e.data)}catch{}}async initWebPushState(){let e=`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window;if(this.webPushSupported=e,this.webPushPermission=e?Notification.permission:`unsupported`,e)try{let{getExistingSubscription:e}=await Az(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-GEdjvonj.js`);return{getExistingSubscription:e}},[]),t=await e();this.webPushSubscribed=t!==null}catch{}}async reconcileWebPushState(){if(this.client)try{var e,t;let{getExistingSubscription:n}=await Az(async()=>{let{getExistingSubscription:e}=await import(`./push-subscription-GEdjvonj.js`);return{getExistingSubscription:e}},[]),r=await n();if(!r)return;this.webPushSubscribed=!0;let i=r.toJSON();i.endpoint&&(e=i.keys)!=null&&e.p256dh&&(t=i.keys)!=null&&t.auth&&await this.client.request(`push.web.subscribe`,{endpoint:i.endpoint,keys:{p256dh:i.keys.p256dh,auth:i.keys.auth}})}catch{}}async handleWebPushSubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{subscribeToWebPush:e}=await Az(async()=>{let{subscribeToWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{subscribeToWebPush:e}},[]);await e(this.client),this.webPushSubscribed=!0,this.webPushPermission=Notification.permission}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1,`Notification`in window&&(this.webPushPermission=Notification.permission)}}}async handleWebPushUnsubscribe(){if(!(!this.client||this.webPushLoading)){this.webPushLoading=!0;try{let{unsubscribeFromWebPush:e}=await Az(async()=>{let{unsubscribeFromWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{unsubscribeFromWebPush:e}},[]);await e(this.client),this.webPushSubscribed=!1}catch(e){this.lastError=String(e)}finally{this.webPushLoading=!1}}}async handleWebPushTest(){if(this.client)try{let{sendTestWebPush:e}=await Az(async()=>{let{sendTestWebPush:e}=await import(`./push-subscription-GEdjvonj.js`);return{sendTestWebPush:e}},[]);await e(this.client)}catch(e){this.lastError=String(e)}}render(){return Wq(this)}};Q([D()],$.prototype,`settings`,void 0),Q([D()],$.prototype,`password`,void 0),Q([D()],$.prototype,`loginShowGatewayToken`,void 0),Q([D()],$.prototype,`loginShowGatewayPassword`,void 0),Q([D()],$.prototype,`tab`,void 0),Q([D()],$.prototype,`onboarding`,void 0),Q([D()],$.prototype,`connected`,void 0),Q([D()],$.prototype,`theme`,void 0),Q([D()],$.prototype,`themeMode`,void 0),Q([D()],$.prototype,`themeResolved`,void 0),Q([D()],$.prototype,`themeOrder`,void 0),Q([D()],$.prototype,`customThemeImportUrl`,void 0),Q([D()],$.prototype,`customThemeImportBusy`,void 0),Q([D()],$.prototype,`customThemeImportMessage`,void 0),Q([D()],$.prototype,`customThemeImportExpanded`,void 0),Q([D()],$.prototype,`customThemeImportFocusToken`,void 0),Q([D()],$.prototype,`hello`,void 0),Q([D()],$.prototype,`lastError`,void 0),Q([D()],$.prototype,`lastErrorCode`,void 0),Q([D()],$.prototype,`eventLog`,void 0),Q([D()],$.prototype,`assistantName`,void 0),Q([D()],$.prototype,`assistantAvatar`,void 0),Q([D()],$.prototype,`assistantAvatarSource`,void 0),Q([D()],$.prototype,`assistantAvatarStatus`,void 0),Q([D()],$.prototype,`assistantAvatarReason`,void 0),Q([D()],$.prototype,`assistantAvatarUploadBusy`,void 0),Q([D()],$.prototype,`assistantAvatarUploadError`,void 0),Q([D()],$.prototype,`assistantAgentId`,void 0),Q([D()],$.prototype,`userName`,void 0),Q([D()],$.prototype,`userAvatar`,void 0),Q([D()],$.prototype,`localMediaPreviewRoots`,void 0),Q([D()],$.prototype,`embedSandboxMode`,void 0),Q([D()],$.prototype,`allowExternalEmbedUrls`,void 0),Q([D()],$.prototype,`chatMessageMaxWidth`,void 0),Q([D()],$.prototype,`serverVersion`,void 0),Q([D()],$.prototype,`sessionKey`,void 0),Q([D()],$.prototype,`chatLoading`,void 0),Q([D()],$.prototype,`chatSending`,void 0),Q([D()],$.prototype,`chatMessage`,void 0),Q([D()],$.prototype,`chatMessages`,void 0),Q([D()],$.prototype,`chatToolMessages`,void 0),Q([D()],$.prototype,`chatStreamSegments`,void 0),Q([D()],$.prototype,`chatStream`,void 0),Q([D()],$.prototype,`chatStreamStartedAt`,void 0),Q([D()],$.prototype,`chatRunId`,void 0),Q([D()],$.prototype,`chatSideResult`,void 0),Q([D()],$.prototype,`compactionStatus`,void 0),Q([D()],$.prototype,`fallbackStatus`,void 0),Q([D()],$.prototype,`chatAvatarUrl`,void 0),Q([D()],$.prototype,`chatAvatarSource`,void 0),Q([D()],$.prototype,`chatAvatarStatus`,void 0),Q([D()],$.prototype,`chatAvatarReason`,void 0),Q([D()],$.prototype,`chatThinkingLevel`,void 0),Q([D()],$.prototype,`chatModelOverrides`,void 0),Q([D()],$.prototype,`chatModelsLoading`,void 0),Q([D()],$.prototype,`chatModelCatalog`,void 0),Q([D()],$.prototype,`sessionSwitchNotice`,void 0),Q([D()],$.prototype,`sessionSwitchFlashKey`,void 0),Q([D()],$.prototype,`chatQueue`,void 0),Q([D()],$.prototype,`chatQueueBySession`,void 0),Q([D()],$.prototype,`chatAttachments`,void 0),Q([D()],$.prototype,`realtimeTalkActive`,void 0),Q([D()],$.prototype,`realtimeTalkStatus`,void 0),Q([D()],$.prototype,`realtimeTalkDetail`,void 0),Q([D()],$.prototype,`realtimeTalkTranscript`,void 0),Q([D()],$.prototype,`skillStoreOpen`,void 0),Q([D()],$.prototype,`storeSkills`,void 0),Q([D()],$.prototype,`storeSkillsLoading`,void 0),Q([D()],$.prototype,`storeItemLoading`,void 0),Q([D()],$.prototype,`storeItemError`,void 0),Q([D()],$.prototype,`chatManualRefreshInFlight`,void 0),Q([D()],$.prototype,`chatHeaderControlsHidden`,void 0),Q([D()],$.prototype,`chatMobileControlsOpen`,void 0),Q([D()],$.prototype,`navDrawerOpen`,void 0),Q([D()],$.prototype,`chatInputHistoryIndex`,void 0),Q([D()],$.prototype,`chatDraftMode`,void 0),Q([D()],$.prototype,`sidebarOpen`,void 0),Q([D()],$.prototype,`sidebarContent`,void 0),Q([D()],$.prototype,`sidebarError`,void 0),Q([D()],$.prototype,`sidebarEditingSessionKey`,void 0),Q([D()],$.prototype,`sidebarEditingSessionLabel`,void 0),Q([D()],$.prototype,`sidebarMoreMenuKey`,void 0),Q([D()],$.prototype,`sidebarDeleteConfirmKey`,void 0),Q([D()],$.prototype,`splitRatio`,void 0),Q([D()],$.prototype,`nodesLoading`,void 0),Q([D()],$.prototype,`nodes`,void 0),Q([D()],$.prototype,`devicesLoading`,void 0),Q([D()],$.prototype,`devicesError`,void 0),Q([D()],$.prototype,`devicesList`,void 0),Q([D()],$.prototype,`execApprovalsLoading`,void 0),Q([D()],$.prototype,`execApprovalsSaving`,void 0),Q([D()],$.prototype,`execApprovalsDirty`,void 0),Q([D()],$.prototype,`execApprovalsSnapshot`,void 0),Q([D()],$.prototype,`execApprovalsForm`,void 0),Q([D()],$.prototype,`execApprovalsSelectedAgent`,void 0),Q([D()],$.prototype,`execApprovalsTarget`,void 0),Q([D()],$.prototype,`execApprovalsTargetNodeId`,void 0),Q([D()],$.prototype,`execApprovalQueue`,void 0),Q([D()],$.prototype,`execApprovalBusy`,void 0),Q([D()],$.prototype,`execApprovalError`,void 0),Q([D()],$.prototype,`pendingGatewayUrl`,void 0),Q([D()],$.prototype,`configLoading`,void 0),Q([D()],$.prototype,`configRaw`,void 0),Q([D()],$.prototype,`configRawOriginal`,void 0),Q([D()],$.prototype,`configValid`,void 0),Q([D()],$.prototype,`configIssues`,void 0),Q([D()],$.prototype,`configSaving`,void 0),Q([D()],$.prototype,`configApplying`,void 0),Q([D()],$.prototype,`updateRunning`,void 0),Q([D()],$.prototype,`applySessionKey`,void 0),Q([D()],$.prototype,`configSnapshot`,void 0),Q([D()],$.prototype,`configSchema`,void 0),Q([D()],$.prototype,`configSchemaVersion`,void 0),Q([D()],$.prototype,`configSchemaLoading`,void 0),Q([D()],$.prototype,`configUiHints`,void 0),Q([D()],$.prototype,`configForm`,void 0),Q([D()],$.prototype,`configFormOriginal`,void 0),Q([D()],$.prototype,`dreamingStatusLoading`,void 0),Q([D()],$.prototype,`dreamingStatusError`,void 0),Q([D()],$.prototype,`dreamingStatus`,void 0),Q([D()],$.prototype,`dreamingModeSaving`,void 0),Q([D()],$.prototype,`dreamingRestartConfirmOpen`,void 0),Q([D()],$.prototype,`dreamingRestartConfirmLoading`,void 0),Q([D()],$.prototype,`dreamingPendingEnabled`,void 0),Q([D()],$.prototype,`dreamDiaryLoading`,void 0),Q([D()],$.prototype,`dreamDiaryActionLoading`,void 0),Q([D()],$.prototype,`dreamDiaryActionMessage`,void 0),Q([D()],$.prototype,`dreamDiaryActionArchivePath`,void 0),Q([D()],$.prototype,`dreamDiaryError`,void 0),Q([D()],$.prototype,`dreamDiaryPath`,void 0),Q([D()],$.prototype,`dreamDiaryContent`,void 0),Q([D()],$.prototype,`wikiImportInsightsLoading`,void 0),Q([D()],$.prototype,`wikiImportInsightsError`,void 0),Q([D()],$.prototype,`wikiImportInsights`,void 0),Q([D()],$.prototype,`wikiMemoryPalaceLoading`,void 0),Q([D()],$.prototype,`wikiMemoryPalaceError`,void 0),Q([D()],$.prototype,`wikiMemoryPalace`,void 0),Q([D()],$.prototype,`configFormDirty`,void 0),Q([D()],$.prototype,`configSettingsMode`,void 0),Q([D()],$.prototype,`configFormMode`,void 0),Q([D()],$.prototype,`configSearchQuery`,void 0),Q([D()],$.prototype,`configActiveSection`,void 0),Q([D()],$.prototype,`configActiveSubsection`,void 0),Q([D()],$.prototype,`pendingUpdateExpectedVersion`,void 0),Q([D()],$.prototype,`updateStatusBanner`,void 0),Q([D()],$.prototype,`communicationsFormMode`,void 0),Q([D()],$.prototype,`communicationsSearchQuery`,void 0),Q([D()],$.prototype,`communicationsActiveSection`,void 0),Q([D()],$.prototype,`communicationsActiveSubsection`,void 0),Q([D()],$.prototype,`appearanceFormMode`,void 0),Q([D()],$.prototype,`appearanceSearchQuery`,void 0),Q([D()],$.prototype,`appearanceActiveSection`,void 0),Q([D()],$.prototype,`appearanceActiveSubsection`,void 0),Q([D()],$.prototype,`automationFormMode`,void 0),Q([D()],$.prototype,`automationSearchQuery`,void 0),Q([D()],$.prototype,`automationActiveSection`,void 0),Q([D()],$.prototype,`automationActiveSubsection`,void 0),Q([D()],$.prototype,`infrastructureFormMode`,void 0),Q([D()],$.prototype,`infrastructureSearchQuery`,void 0),Q([D()],$.prototype,`infrastructureActiveSection`,void 0),Q([D()],$.prototype,`infrastructureActiveSubsection`,void 0),Q([D()],$.prototype,`aiAgentsFormMode`,void 0),Q([D()],$.prototype,`aiAgentsSearchQuery`,void 0),Q([D()],$.prototype,`aiAgentsActiveSection`,void 0),Q([D()],$.prototype,`aiAgentsActiveSubsection`,void 0),Q([D()],$.prototype,`channelsLoading`,void 0),Q([D()],$.prototype,`channelsSnapshot`,void 0),Q([D()],$.prototype,`channelsError`,void 0),Q([D()],$.prototype,`channelsLastSuccess`,void 0),Q([D()],$.prototype,`whatsappLoginMessage`,void 0),Q([D()],$.prototype,`whatsappLoginQrDataUrl`,void 0),Q([D()],$.prototype,`whatsappLoginConnected`,void 0),Q([D()],$.prototype,`whatsappBusy`,void 0),Q([D()],$.prototype,`nostrProfileFormState`,void 0),Q([D()],$.prototype,`nostrProfileAccountId`,void 0),Q([D()],$.prototype,`presenceLoading`,void 0),Q([D()],$.prototype,`presenceEntries`,void 0),Q([D()],$.prototype,`presenceError`,void 0),Q([D()],$.prototype,`presenceStatus`,void 0),Q([D()],$.prototype,`agentsLoading`,void 0),Q([D()],$.prototype,`agentsList`,void 0),Q([D()],$.prototype,`agentsError`,void 0),Q([D()],$.prototype,`agentsSelectedId`,void 0),Q([D()],$.prototype,`toolsCatalogLoading`,void 0),Q([D()],$.prototype,`toolsCatalogError`,void 0),Q([D()],$.prototype,`toolsCatalogResult`,void 0),Q([D()],$.prototype,`toolsEffectiveLoading`,void 0),Q([D()],$.prototype,`toolsEffectiveLoadingKey`,void 0),Q([D()],$.prototype,`toolsEffectiveResultKey`,void 0),Q([D()],$.prototype,`toolsEffectiveError`,void 0),Q([D()],$.prototype,`toolsEffectiveResult`,void 0),Q([D()],$.prototype,`agentsPanel`,void 0),Q([D()],$.prototype,`agentFilesLoading`,void 0),Q([D()],$.prototype,`agentFilesError`,void 0),Q([D()],$.prototype,`agentFilesList`,void 0),Q([D()],$.prototype,`agentFileContents`,void 0),Q([D()],$.prototype,`agentFileDrafts`,void 0),Q([D()],$.prototype,`agentFileActive`,void 0),Q([D()],$.prototype,`agentFileSaving`,void 0),Q([D()],$.prototype,`agentIdentityLoading`,void 0),Q([D()],$.prototype,`agentIdentityError`,void 0),Q([D()],$.prototype,`agentIdentityById`,void 0),Q([D()],$.prototype,`agentSkillsLoading`,void 0),Q([D()],$.prototype,`agentSkillsError`,void 0),Q([D()],$.prototype,`agentSkillsReport`,void 0),Q([D()],$.prototype,`agentSkillsAgentId`,void 0),Q([D()],$.prototype,`sessionsLoading`,void 0),Q([D()],$.prototype,`sessionsResult`,void 0),Q([D()],$.prototype,`sessionsError`,void 0),Q([D()],$.prototype,`sessionsFilterActive`,void 0),Q([D()],$.prototype,`sessionsFilterLimit`,void 0),Q([D()],$.prototype,`sessionsIncludeGlobal`,void 0),Q([D()],$.prototype,`sessionsIncludeUnknown`,void 0),Q([D()],$.prototype,`sessionsShowArchived`,void 0),Q([D()],$.prototype,`sessionsFiltersCollapsed`,void 0),Q([D()],$.prototype,`sessionsHideCron`,void 0),Q([D()],$.prototype,`sessionsSearchQuery`,void 0),Q([D()],$.prototype,`sessionsSortColumn`,void 0),Q([D()],$.prototype,`sessionsSortDir`,void 0),Q([D()],$.prototype,`sessionsPage`,void 0),Q([D()],$.prototype,`sessionsPageSize`,void 0),Q([D()],$.prototype,`sessionsSelectedKeys`,void 0),Q([D()],$.prototype,`sessionsExpandedCheckpointKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointItemsByKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointLoadingKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointBusyKey`,void 0),Q([D()],$.prototype,`sessionsCheckpointErrorByKey`,void 0),Q([D()],$.prototype,`usageLoading`,void 0),Q([D()],$.prototype,`usageResult`,void 0),Q([D()],$.prototype,`usageCostSummary`,void 0),Q([D()],$.prototype,`usageError`,void 0),Q([D()],$.prototype,`usageStartDate`,void 0),Q([D()],$.prototype,`usageEndDate`,void 0),Q([D()],$.prototype,`usageSelectedSessions`,void 0),Q([D()],$.prototype,`usageSelectedDays`,void 0),Q([D()],$.prototype,`usageSelectedHours`,void 0),Q([D()],$.prototype,`usageChartMode`,void 0),Q([D()],$.prototype,`usageDailyChartMode`,void 0),Q([D()],$.prototype,`usageTimeSeriesMode`,void 0),Q([D()],$.prototype,`usageTimeSeriesBreakdownMode`,void 0),Q([D()],$.prototype,`usageTimeSeries`,void 0),Q([D()],$.prototype,`usageTimeSeriesLoading`,void 0),Q([D()],$.prototype,`usageTimeSeriesCursorStart`,void 0),Q([D()],$.prototype,`usageTimeSeriesCursorEnd`,void 0),Q([D()],$.prototype,`usageSessionLogs`,void 0),Q([D()],$.prototype,`usageSessionLogsLoading`,void 0),Q([D()],$.prototype,`usageSessionLogsExpanded`,void 0),Q([D()],$.prototype,`usageQuery`,void 0),Q([D()],$.prototype,`usageQueryDraft`,void 0),Q([D()],$.prototype,`usageSessionSort`,void 0),Q([D()],$.prototype,`usageSessionSortDir`,void 0),Q([D()],$.prototype,`usageRecentSessions`,void 0),Q([D()],$.prototype,`usageTimeZone`,void 0),Q([D()],$.prototype,`usageContextExpanded`,void 0),Q([D()],$.prototype,`usageHeaderPinned`,void 0),Q([D()],$.prototype,`usageSessionsTab`,void 0),Q([D()],$.prototype,`usageVisibleColumns`,void 0),Q([D()],$.prototype,`usageLogFilterRoles`,void 0),Q([D()],$.prototype,`usageLogFilterTools`,void 0),Q([D()],$.prototype,`usageLogFilterHasTools`,void 0),Q([D()],$.prototype,`usageLogFilterQuery`,void 0),Q([D()],$.prototype,`activePanelId`,void 0),Q([D()],$.prototype,`sidebarStatusPopoverOpen`,void 0),Q([D()],$.prototype,`fileTreeLoading`,void 0),Q([D()],$.prototype,`fileTreeError`,void 0),Q([D()],$.prototype,`fileTreeResult`,void 0),Q([D()],$.prototype,`fileTreeSessionId`,void 0),Q([D()],$.prototype,`fileTreeExpandedDirs`,void 0),Q([D()],$.prototype,`fileTreeDirChildren`,void 0),Q([D()],$.prototype,`fileTreeDirLoading`,void 0),Q([D()],$.prototype,`cnChannelsLoading`,void 0),Q([D()],$.prototype,`cnChannelsData`,void 0),Q([D()],$.prototype,`cnChannelsError`,void 0),Q([D()],$.prototype,`cnConnecting`,void 0),Q([D()],$.prototype,`cnQrcodeChannel`,void 0),Q([D()],$.prototype,`cnQrcodeImg`,void 0),Q([D()],$.prototype,`cnQrcodeToken`,void 0),Q([D()],$.prototype,`cnQrcodeLoading`,void 0),Q([D()],$.prototype,`cnFeishuOpen`,void 0),Q([D()],$.prototype,`cnFeishuSaving`,void 0),Q([D()],$.prototype,`skillCenterTab`,void 0),Q([D()],$.prototype,`skillCenterCategory`,void 0),Q([D()],$.prototype,`skillCenterSearch`,void 0),Q([D()],$.prototype,`skillCenterCategories`,void 0),Q([D()],$.prototype,`skillCenterCategoriesLoading`,void 0),Q([D()],$.prototype,`skillCenterItemBusy`,void 0),Q([D()],$.prototype,`skillCenterItemError`,void 0),Q([D()],$.prototype,`fileSpaceLoading`,void 0),Q([D()],$.prototype,`fileSpaceError`,void 0),Q([D()],$.prototype,`fileSpaceData`,void 0),Q([D()],$.prototype,`fileSpaceSearch`,void 0),Q([D()],$.prototype,`fileSpaceCollapsed`,void 0),Q([D()],$.prototype,`cronLoading`,void 0),Q([D()],$.prototype,`cronQuickCreateOpen`,void 0),Q([D()],$.prototype,`cronQuickCreateStep`,void 0),Q([D()],$.prototype,`cronQuickCreateDraft`,void 0),Q([D()],$.prototype,`cronJobsLoadingMore`,void 0),Q([D()],$.prototype,`cronJobs`,void 0),Q([D()],$.prototype,`cronJobsTotal`,void 0),Q([D()],$.prototype,`cronJobsHasMore`,void 0),Q([D()],$.prototype,`cronJobsNextOffset`,void 0),Q([D()],$.prototype,`cronJobsLimit`,void 0),Q([D()],$.prototype,`cronJobsQuery`,void 0),Q([D()],$.prototype,`cronJobsEnabledFilter`,void 0),Q([D()],$.prototype,`cronJobsScheduleKindFilter`,void 0),Q([D()],$.prototype,`cronJobsLastStatusFilter`,void 0),Q([D()],$.prototype,`cronJobsSortBy`,void 0),Q([D()],$.prototype,`cronJobsSortDir`,void 0),Q([D()],$.prototype,`cronStatus`,void 0),Q([D()],$.prototype,`cronError`,void 0),Q([D()],$.prototype,`cronForm`,void 0),Q([D()],$.prototype,`cronFormCollapsed`,void 0),Q([D()],$.prototype,`cronFieldErrors`,void 0),Q([D()],$.prototype,`cronEditingJobId`,void 0),Q([D()],$.prototype,`cronRunsJobId`,void 0),Q([D()],$.prototype,`cronRunsLoadingMore`,void 0),Q([D()],$.prototype,`cronRuns`,void 0),Q([D()],$.prototype,`cronRunsTotal`,void 0),Q([D()],$.prototype,`cronRunsHasMore`,void 0),Q([D()],$.prototype,`cronRunsNextOffset`,void 0),Q([D()],$.prototype,`cronRunsLimit`,void 0),Q([D()],$.prototype,`cronRunsScope`,void 0),Q([D()],$.prototype,`cronRunsStatuses`,void 0),Q([D()],$.prototype,`cronRunsDeliveryStatuses`,void 0),Q([D()],$.prototype,`cronRunsStatusFilter`,void 0),Q([D()],$.prototype,`cronRunsQuery`,void 0),Q([D()],$.prototype,`cronRunsSortDir`,void 0),Q([D()],$.prototype,`cronModelSuggestions`,void 0),Q([D()],$.prototype,`cronBusy`,void 0),Q([D()],$.prototype,`updateAvailable`,void 0),Q([D()],$.prototype,`attentionItems`,void 0),Q([D()],$.prototype,`paletteOpen`,void 0),Q([D()],$.prototype,`sessionSwitcherOpen`,void 0),Q([D()],$.prototype,`paletteQuery`,void 0),Q([D()],$.prototype,`paletteActiveIndex`,void 0),Q([D()],$.prototype,`overviewShowGatewayToken`,void 0),Q([D()],$.prototype,`overviewShowGatewayPassword`,void 0),Q([D()],$.prototype,`overviewLogLines`,void 0),Q([D()],$.prototype,`overviewLogCursor`,void 0),Q([D()],$.prototype,`skillsLoading`,void 0),Q([D()],$.prototype,`skillsReport`,void 0),Q([D()],$.prototype,`skillsError`,void 0),Q([D()],$.prototype,`skillsFilter`,void 0),Q([D()],$.prototype,`skillsStatusFilter`,void 0),Q([D()],$.prototype,`skillEdits`,void 0),Q([D()],$.prototype,`skillsBusyKey`,void 0),Q([D()],$.prototype,`skillMessages`,void 0),Q([D()],$.prototype,`skillsDetailKey`,void 0),Q([D()],$.prototype,`clawhubSearchQuery`,void 0),Q([D()],$.prototype,`clawhubSearchResults`,void 0),Q([D()],$.prototype,`clawhubSearchLoading`,void 0),Q([D()],$.prototype,`clawhubSearchError`,void 0),Q([D()],$.prototype,`clawhubDetail`,void 0),Q([D()],$.prototype,`clawhubDetailSlug`,void 0),Q([D()],$.prototype,`clawhubDetailLoading`,void 0),Q([D()],$.prototype,`clawhubDetailError`,void 0),Q([D()],$.prototype,`clawhubInstallSlug`,void 0),Q([D()],$.prototype,`clawhubInstallMessage`,void 0),Q([D()],$.prototype,`healthLoading`,void 0),Q([D()],$.prototype,`healthResult`,void 0),Q([D()],$.prototype,`healthError`,void 0),Q([D()],$.prototype,`modelAuthStatusLoading`,void 0),Q([D()],$.prototype,`modelAuthStatusResult`,void 0),Q([D()],$.prototype,`modelAuthStatusError`,void 0),Q([D()],$.prototype,`debugLoading`,void 0),Q([D()],$.prototype,`debugStatus`,void 0),Q([D()],$.prototype,`debugHealth`,void 0),Q([D()],$.prototype,`debugModels`,void 0),Q([D()],$.prototype,`debugHeartbeat`,void 0),Q([D()],$.prototype,`debugCallMethod`,void 0),Q([D()],$.prototype,`debugCallParams`,void 0),Q([D()],$.prototype,`debugCallResult`,void 0),Q([D()],$.prototype,`debugCallError`,void 0),Q([D()],$.prototype,`apiKeys`,void 0),Q([D()],$.prototype,`sealclawModels`,void 0),Q([D()],$.prototype,`webPushSupported`,void 0),Q([D()],$.prototype,`webPushPermission`,void 0),Q([D()],$.prototype,`webPushSubscribed`,void 0),Q([D()],$.prototype,`webPushLoading`,void 0),Q([D()],$.prototype,`logsLoading`,void 0),Q([D()],$.prototype,`logsError`,void 0),Q([D()],$.prototype,`logsFile`,void 0),Q([D()],$.prototype,`logsEntries`,void 0),Q([D()],$.prototype,`logsFilterText`,void 0),Q([D()],$.prototype,`logsLevelFilters`,void 0),Q([D()],$.prototype,`logsAutoFollow`,void 0),Q([D()],$.prototype,`logsTruncated`,void 0),Q([D()],$.prototype,`logsCursor`,void 0),Q([D()],$.prototype,`logsLastFetchAt`,void 0),Q([D()],$.prototype,`logsLimit`,void 0),Q([D()],$.prototype,`logsMaxBytes`,void 0),Q([D()],$.prototype,`logsAtBottom`,void 0),Q([D()],$.prototype,`chatNewMessagesBelow`,void 0),customElements.get(`openclaw-app`)||customElements.define(`openclaw-app`,$);var SJ=x((e=>{Object.defineProperty(e,`__esModule`,{value:!0});var t=typeof window<`u`?window.proxy||window:{};e.qiankunWindow=t,e.renderWithQiankun=function(e){t!=null&&t.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),t.qiankunName&&(window.moudleQiankunAppLifeCycles[t.qiankunName]=e))}}))();function CJ(){`serviceWorker`in navigator&&navigator.serviceWorker.register(`./sw.js`)}var wJ=null;(0,SJ.renderWithQiankun)({bootstrap(){return Promise.resolve()},mount(e){CJ(),window.__OPENCLAW_CONTROL_UI_BASE_PATH__=`/sealclaw`;let t=(e==null?void 0:e.container)??document.body,n=t.querySelector(`openclaw-app`);return wJ=n??document.createElement(`openclaw-app`),n||t.appendChild(wJ),Promise.resolve()},unmount(){return wJ==null||wJ.remove(),wJ=null,Promise.resolve()},update(){return Promise.resolve()}}),SJ.qiankunWindow.__POWERED_BY_QIANKUN__||CJ();export{lp as A,mo as B,Gf as C,op as D,ip as E,ff as F,li as G,ha as H,Yo as I,Ge as J,Rr as K,U as L,Wf as M,Uf as N,up as O,Df as P,go as R,Cp as S,gp as T,ma as U,xo as V,bi as W,Oe as Y,np as _,_K as a,rp as b,GU as c,UP as d,LP as f,hh as g,pT as h,yK as i,wp as j,sp as k,kU as l,XO as m,xK as n,gK as o,fA as p,zn as q,bK as r,vK as s,SK as t,Az as u,ap as v,cp as w,Sp as x,vp as y,ho as z};
7398
+ //# sourceMappingURL=index-BGKsGXZK.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n,o as r}from"./index-CnaJ1Ys6.js";var i=!1;function a(r){let a=!i;return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n,o as r}from"./index-BGKsGXZK.js";var i=!1;function a(r){let a=!i;return e`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between;">
4
4
  <div>
@@ -54,4 +54,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n,o as r}from"./index-C
54
54
  </div>
55
55
  </div>
56
56
  `}export{a as renderInstances};
57
- //# sourceMappingURL=instances-CxttD6fs.js.map
57
+ //# sourceMappingURL=instances-vA_eAzPP.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n}from"./string-coerce-CuNcS1Hz.js";import{H as r,R as i,Y as a,z as o}from"./index-CnaJ1Ys6.js";function s(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}return[...t].toSorted()}function c(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function l(e){return{roles:s(e.roles,e.role),scopes:a(e.scopes)}}function u(e){let t=s(e.roles,e.role),n=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:n===void 0?t:s(n.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>t.includes(e)),scopes:a(e.scopes)}}function d(e,t){let n=l(e),r=t?u(t):null;return r?c(r.roles,n.roles)?c(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function f(e){let t=(e==null?void 0:e.agents)??{},r=Array.isArray(t.list)?t.list:[],i=[];return r.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let r=e,a=n(r.id)??``;if(!a)return;let o=n(r.name),s=r.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:r})}),i}function p(e,t){let r=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>r.has(String(e))))continue;let e=n(t.nodeId)??``;if(!e)continue;let a=n(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var m=`__defaults__`,h=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],g=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function _(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function v(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function y(e){let t=(e==null?void 0:e.defaults)??{};return{security:_(t.security),ask:v(t.ask),askFallback:_(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function b(e){return f(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function x(e,t){let n=b(e),r=Object.keys((t==null?void 0:t.agents)??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{var n,r;if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let i=(n=e.name)!=null&&n.trim()?e.name:e.id,a=(r=t.name)!=null&&r.trim()?t.name:t.id;return i.localeCompare(a)}),a}function S(e,t){return e===m?m:e&&t.some(t=>t.id===e)?e:m}function C(e){var t;let n=e.execApprovalsForm??((t=e.execApprovalsSnapshot)==null?void 0:t.file)??null,r=!!n,i=y(n),a=x(e.configForm,n),o=A(e.nodes),s=e.execApprovalsTarget,c=s===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;s===`node`&&c&&!o.some(e=>e.id===c)&&(c=null);let l=S(e.execApprovalsSelectedAgent,a),u=l===m?null:((n==null?void 0:n.agents)??{})[l]??null,d=Array.isArray(u==null?void 0:u.allowlist)?u.allowlist??[]:[];return{ready:r,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:n,defaults:i,selectedScope:l,selectedAgent:u,agents:a,allowlist:d,target:s,targetNodeId:c,targetNodes:o,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function w(n){let r=n.ready,i=n.target!==`node`||!!n.targetNodeId;return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n}from"./string-coerce-CuNcS1Hz.js";import{H as r,R as i,Y as a,z as o}from"./index-BGKsGXZK.js";function s(...e){let t=new Set;for(let n of e){if(!n)continue;if(Array.isArray(n)){for(let e of n){let n=e.trim();n&&t.add(n)}continue}let e=n.trim();e&&t.add(e)}return[...t].toSorted()}function c(e,t){let n=new Set(e);return t.every(e=>n.has(e))}function l(e){return{roles:s(e.roles,e.role),scopes:a(e.scopes)}}function u(e){let t=s(e.roles,e.role),n=Array.isArray(e.tokens)?e.tokens:e.tokens?Object.values(e.tokens):void 0;return{roles:n===void 0?t:s(n.filter(e=>!e.revokedAtMs).flatMap(e=>e.role??[])).filter(e=>t.includes(e)),scopes:a(e.scopes)}}function d(e,t){let n=l(e),r=t?u(t):null;return r?c(r.roles,n.roles)?c(r.scopes,n.scopes)?{kind:`re-approval`,requested:n,approved:r}:{kind:`scope-upgrade`,requested:n,approved:r}:{kind:`role-upgrade`,requested:n,approved:r}:{kind:`new-pairing`,requested:n,approved:null}}function f(e){let t=(e==null?void 0:e.agents)??{},r=Array.isArray(t.list)?t.list:[],i=[];return r.forEach((e,t)=>{if(!e||typeof e!=`object`)return;let r=e,a=n(r.id)??``;if(!a)return;let o=n(r.name),s=r.default===!0;i.push({id:a,name:o,isDefault:s,index:t,record:r})}),i}function p(e,t){let r=new Set(t),i=[];for(let t of e){if(!(Array.isArray(t.commands)?t.commands:[]).some(e=>r.has(String(e))))continue;let e=n(t.nodeId)??``;if(!e)continue;let a=n(t.displayName)??e;i.push({id:e,label:a===e?e:`${a} · ${e}`})}return i.sort((e,t)=>e.label.localeCompare(t.label)),i}var m=`__defaults__`,h=[{value:`deny`,label:`Deny`},{value:`allowlist`,label:`Allowlist`},{value:`full`,label:`Full`}],g=[{value:`off`,label:`Off`},{value:`on-miss`,label:`On miss`},{value:`always`,label:`Always`}];function _(e){return e===`allowlist`||e===`full`||e===`deny`?e:`deny`}function v(e){return e===`always`||e===`off`||e===`on-miss`?e:`on-miss`}function y(e){let t=(e==null?void 0:e.defaults)??{};return{security:_(t.security),ask:v(t.ask),askFallback:_(t.askFallback??`deny`),autoAllowSkills:t.autoAllowSkills??!1}}function b(e){return f(e).map(e=>({id:e.id,name:e.name,isDefault:e.isDefault}))}function x(e,t){let n=b(e),r=Object.keys((t==null?void 0:t.agents)??{}),i=new Map;n.forEach(e=>i.set(e.id,e)),r.forEach(e=>{i.has(e)||i.set(e,{id:e})});let a=Array.from(i.values());return a.length===0&&a.push({id:`main`,isDefault:!0}),a.sort((e,t)=>{var n,r;if(e.isDefault&&!t.isDefault)return-1;if(!e.isDefault&&t.isDefault)return 1;let i=(n=e.name)!=null&&n.trim()?e.name:e.id,a=(r=t.name)!=null&&r.trim()?t.name:t.id;return i.localeCompare(a)}),a}function S(e,t){return e===m?m:e&&t.some(t=>t.id===e)?e:m}function C(e){var t;let n=e.execApprovalsForm??((t=e.execApprovalsSnapshot)==null?void 0:t.file)??null,r=!!n,i=y(n),a=x(e.configForm,n),o=A(e.nodes),s=e.execApprovalsTarget,c=s===`node`&&e.execApprovalsTargetNodeId?e.execApprovalsTargetNodeId:null;s===`node`&&c&&!o.some(e=>e.id===c)&&(c=null);let l=S(e.execApprovalsSelectedAgent,a),u=l===m?null:((n==null?void 0:n.agents)??{})[l]??null,d=Array.isArray(u==null?void 0:u.allowlist)?u.allowlist??[]:[];return{ready:r,disabled:e.execApprovalsSaving||e.execApprovalsLoading,dirty:e.execApprovalsDirty,loading:e.execApprovalsLoading,saving:e.execApprovalsSaving,form:n,defaults:i,selectedScope:l,selectedAgent:u,agents:a,allowlist:d,target:s,targetNodeId:c,targetNodes:o,onSelectScope:e.onExecApprovalsSelectAgent,onSelectTarget:e.onExecApprovalsTargetChange,onPatch:e.onExecApprovalsPatch,onRemove:e.onExecApprovalsRemove,onLoad:e.onLoadExecApprovals,onSave:e.onSaveExecApprovals}}function w(n){let r=n.ready,i=n.target!==`node`||!!n.targetNodeId;return e`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between; align-items: center;">
4
4
  <div>
@@ -433,4 +433,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n}from"./string-coerce-
433
433
  </div>
434
434
  </div>
435
435
  `}export{j as renderNodes};
436
- //# sourceMappingURL=nodes-Ct8gvuAJ.js.map
436
+ //# sourceMappingURL=nodes-DEB4eQvc.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n,t as r}from"./string-coerce-CuNcS1Hz.js";import{D as i,F as a,H as o,I as s,L as c,V as l,s as u}from"./index-CnaJ1Ys6.js";var d=[`off`,`minimal`,`low`,`medium`,`high`],f=[``,`off`,`on`,`full`],p=[``,`on`,`off`],m=[``,`off`,`on`,`stream`],h=[10,25,50,100];function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]??null:null}function _(e){return s(e)??r(e)}function v(e){var t,n;let r=e.thinkingDefault?`默认(${e.thinkingDefault})`:`继承`,i=(t=e.thinkingLevels)!=null&&t.length?e.thinkingLevels:((n=e.thinkingOptions)!=null&&n.length?e.thinkingOptions:d).map(e=>({id:_(e),label:e}));return[{value:``,label:r},...i.map(e=>({value:_(e.id),label:e.label}))]}function y(e,t){return!t||e.includes(t)?[...e]:[...e,t]}function b(e,t){return!t||e.some(e=>e.value===t)?[...e]:[...e,{value:t,label:`${t}(自定义)`}]}function x(){return f.map(e=>({value:e,label:e===``?`继承`:e===`off`?`关闭(显式)`:e===`on`?`开启`:e===`full`?`完整`:e}))}var S={on:`开启`,off:`关闭`};function C(){return p.map(e=>({value:e,label:e===``?`继承`:S[e]??e}))}function w(e){return e||null}function T(e,t,n){let a=r(t);return a?e.filter(e=>{var t;let o=r(e.key),s=r(e.label),c=r(e.kind),u=r(e.displayName),d=r(i(e.agentRuntime));if(o.includes(a)||s.includes(a)||c.includes(a)||u.includes(a)||d.includes(a))return!0;let f=l(e.key);return(f?r((t=g(n,f.agentId))==null?void 0:t.name):``).includes(a)}):e}function E(e,t,n){let r=n===`asc`?1:-1;return[...e].toSorted((e,n)=>{let i=0;switch(t){case`key`:i=(e.key??``).localeCompare(n.key??``);break;case`kind`:i=(e.kind??``).localeCompare(n.kind??``);break;case`updated`:i=(e.updatedAt??0)-(n.updatedAt??0);break;case`tokens`:i=(e.totalTokens??e.inputTokens??e.outputTokens??0)-(n.totalTokens??n.inputTokens??n.outputTokens??0);break}return i*r})}function D(e,t,n){let r=t*n;return e.slice(r,r+n)}function O(e){let t=Number(e.trim());return Number.isFinite(t)&&t>0}function k(e){return r(e.searchQuery).length>0||O(e.activeMinutes)||O(e.limit)||!e.includeGlobal||!e.includeUnknown||!e.showArchived}function A(e){switch(e){case`manual`:return`手动`;case`auto-threshold`:return`自动阈值`;case`overflow-retry`:return`溢出重试`;case`timeout-retry`:return`超时重试`;default:return e}}function j(e){return typeof e.tokensBefore==`number`&&typeof e.tokensAfter==`number`&&Number.isFinite(e.tokensBefore)&&Number.isFinite(e.tokensAfter)?`${e.tokensBefore.toLocaleString()} → ${e.tokensAfter.toLocaleString()} 个 token`:typeof e.tokensBefore==`number`&&Number.isFinite(e.tokensBefore)?`之前 ${e.tokensBefore.toLocaleString()} 个 token`:`token 增量不可用`}function M(e){return e instanceof Element&&!!e.closest(`a, button, input, label, select, textarea`)}function N(t){return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n,t as r}from"./string-coerce-CuNcS1Hz.js";import{D as i,F as a,H as o,I as s,L as c,V as l,s as u}from"./index-BGKsGXZK.js";var d=[`off`,`minimal`,`low`,`medium`,`high`],f=[``,`off`,`on`,`full`],p=[``,`on`,`off`],m=[``,`off`,`on`,`stream`],h=[10,25,50,100];function g(e,t){return Object.prototype.hasOwnProperty.call(e,t)?e[t]??null:null}function _(e){return s(e)??r(e)}function v(e){var t,n;let r=e.thinkingDefault?`默认(${e.thinkingDefault})`:`继承`,i=(t=e.thinkingLevels)!=null&&t.length?e.thinkingLevels:((n=e.thinkingOptions)!=null&&n.length?e.thinkingOptions:d).map(e=>({id:_(e),label:e}));return[{value:``,label:r},...i.map(e=>({value:_(e.id),label:e.label}))]}function y(e,t){return!t||e.includes(t)?[...e]:[...e,t]}function b(e,t){return!t||e.some(e=>e.value===t)?[...e]:[...e,{value:t,label:`${t}(自定义)`}]}function x(){return f.map(e=>({value:e,label:e===``?`继承`:e===`off`?`关闭(显式)`:e===`on`?`开启`:e===`full`?`完整`:e}))}var S={on:`开启`,off:`关闭`};function C(){return p.map(e=>({value:e,label:e===``?`继承`:S[e]??e}))}function w(e){return e||null}function T(e,t,n){let a=r(t);return a?e.filter(e=>{var t;let o=r(e.key),s=r(e.label),c=r(e.kind),u=r(e.displayName),d=r(i(e.agentRuntime));if(o.includes(a)||s.includes(a)||c.includes(a)||u.includes(a)||d.includes(a))return!0;let f=l(e.key);return(f?r((t=g(n,f.agentId))==null?void 0:t.name):``).includes(a)}):e}function E(e,t,n){let r=n===`asc`?1:-1;return[...e].toSorted((e,n)=>{let i=0;switch(t){case`key`:i=(e.key??``).localeCompare(n.key??``);break;case`kind`:i=(e.kind??``).localeCompare(n.kind??``);break;case`updated`:i=(e.updatedAt??0)-(n.updatedAt??0);break;case`tokens`:i=(e.totalTokens??e.inputTokens??e.outputTokens??0)-(n.totalTokens??n.inputTokens??n.outputTokens??0);break}return i*r})}function D(e,t,n){let r=t*n;return e.slice(r,r+n)}function O(e){let t=Number(e.trim());return Number.isFinite(t)&&t>0}function k(e){return r(e.searchQuery).length>0||O(e.activeMinutes)||O(e.limit)||!e.includeGlobal||!e.includeUnknown||!e.showArchived}function A(e){switch(e){case`manual`:return`手动`;case`auto-threshold`:return`自动阈值`;case`overflow-retry`:return`溢出重试`;case`timeout-retry`:return`超时重试`;default:return e}}function j(e){return typeof e.tokensBefore==`number`&&typeof e.tokensAfter==`number`&&Number.isFinite(e.tokensBefore)&&Number.isFinite(e.tokensAfter)?`${e.tokensBefore.toLocaleString()} → ${e.tokensAfter.toLocaleString()} 个 token`:typeof e.tokensBefore==`number`&&Number.isFinite(e.tokensBefore)?`之前 ${e.tokensBefore.toLocaleString()} 个 token`:`token 增量不可用`}function M(e){return e instanceof Element&&!!e.closest(`a, button, input, label, select, textarea`)}function N(t){return e`
2
2
  <label class=${[`session-filter-check`,`session-filter-toggle`,t.extraClass??``,t.checked?`session-filter-check--active`:``].filter(Boolean).join(` `)} data-tooltip=${t.title}>
3
3
  <input
4
4
  name=${t.name}
@@ -362,4 +362,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{r as n,t as r}from"./string-
362
362
  </div>
363
363
  </td>
364
364
  </tr>`]:[]]}export{P as renderSessions};
365
- //# sourceMappingURL=sessions-EG_sUxo9.js.map
365
+ //# sourceMappingURL=sessions-DLqvgv8s.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6.js";var r=new Set([`openclaw-workspace`,`openclaw-extra`]);function i(i){var s;let c=(((s=i.mySkillsReport)==null?void 0:s.skills)??[]).filter(e=>e.extra!==void 0||r.has(e.source)),l=c.filter(e=>!e.disabled),u=c.filter(e=>e.disabled);return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-BGKsGXZK.js";var r=new Set([`openclaw-workspace`,`openclaw-extra`]);function i(i){var s;let c=(((s=i.mySkillsReport)==null?void 0:s.skills)??[]).filter(e=>e.extra!==void 0||r.has(e.source)),l=c.filter(e=>!e.disabled),u=c.filter(e=>e.disabled);return e`
2
2
  <div class="sc">
3
3
  <!-- 技能中心 tab -->
4
4
  ${i.tab===`center`?e`
@@ -236,4 +236,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{L as n}from"./index-CnaJ1Ys6
236
236
  </div>
237
237
  </div>
238
238
  `}export{i as renderSkillCenter};
239
- //# sourceMappingURL=skill-center-8t3ZKaZ1.js.map
239
+ //# sourceMappingURL=skill-center-CFgH06BO.js.map
@@ -1,4 +1,4 @@
1
- import{i as e,n as t}from"./lit-BrYIQVuc.js";import{t as n}from"./string-coerce-CuNcS1Hz.js";import{R as r,W as i,d as a}from"./index-CnaJ1Ys6.js";import{i as o,n as s,r as c,t as l}from"./skills-shared-Cl6n1FJQ.js";function u(e){return e?a(e,window.location.href):null}function d(e){!(e instanceof HTMLDialogElement)||e.open||(e.isConnected?e.showModal():queueMicrotask(()=>{e.isConnected&&!e.open&&e.showModal()}))}var f=[{id:`all`,label:`All`},{id:`ready`,label:`Ready`},{id:`needs-setup`,label:`Needs Setup`},{id:`disabled`,label:`Disabled`}];function p(e,t){switch(t){case`all`:return!0;case`ready`:return!e.disabled&&e.eligible;case`needs-setup`:return!e.disabled&&!e.eligible;case`disabled`:return e.disabled}throw Error(`Unsupported skills status filter`)}function m(e){return e.disabled?`muted`:e.eligible?`ok`:`warn`}function h(r){var i;let a=((i=r.report)==null?void 0:i.skills)??[],s={all:a.length,ready:0,"needs-setup":0,disabled:0};for(let e of a)e.disabled?s.disabled++:e.eligible?s.ready++:s[`needs-setup`]++;let c=r.statusFilter===`all`?a:a.filter(e=>p(e,r.statusFilter)),l=n(r.filter),u=l?c.filter(e=>n([e.name,e.description,e.source].join(` `)).includes(l)):c,d=o(u),m=r.detailKey?a.find(e=>e.skillKey===r.detailKey)??null:null;return e`
1
+ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{t as n}from"./string-coerce-CuNcS1Hz.js";import{R as r,W as i,d as a}from"./index-BGKsGXZK.js";import{i as o,n as s,r as c,t as l}from"./skills-shared-Cl6n1FJQ.js";function u(e){return e?a(e,window.location.href):null}function d(e){!(e instanceof HTMLDialogElement)||e.open||(e.isConnected?e.showModal():queueMicrotask(()=>{e.isConnected&&!e.open&&e.showModal()}))}var f=[{id:`all`,label:`All`},{id:`ready`,label:`Ready`},{id:`needs-setup`,label:`Needs Setup`},{id:`disabled`,label:`Disabled`}];function p(e,t){switch(t){case`all`:return!0;case`ready`:return!e.disabled&&e.eligible;case`needs-setup`:return!e.disabled&&!e.eligible;case`disabled`:return e.disabled}throw Error(`Unsupported skills status filter`)}function m(e){return e.disabled?`muted`:e.eligible?`ok`:`warn`}function h(r){var i;let a=((i=r.report)==null?void 0:i.skills)??[],s={all:a.length,ready:0,"needs-setup":0,disabled:0};for(let e of a)e.disabled?s.disabled++:e.eligible?s.ready++:s[`needs-setup`]++;let c=r.statusFilter===`all`?a:a.filter(e=>p(e,r.statusFilter)),l=n(r.filter),u=l?c.filter(e=>n([e.name,e.description,e.source].join(` `)).includes(l)):c,d=o(u),m=r.detailKey?a.find(e=>e.skillKey===r.detailKey)??null:null;return e`
2
2
  <section class="card">
3
3
  <div class="row" style="justify-content: space-between;">
4
4
  <div>
@@ -311,4 +311,4 @@ import{i as e,n as t}from"./lit-BrYIQVuc.js";import{t as n}from"./string-coerce-
311
311
  </div>
312
312
  </dialog>
313
313
  `}export{h as renderSkills};
314
- //# sourceMappingURL=skills-BimtDTP5.js.map
314
+ //# sourceMappingURL=skills-Bi5UTneM.js.map
@@ -70,7 +70,7 @@
70
70
  window.__OPENCLAW_CONTROL_UI_BASE_PATH__ = "/sealclaw";
71
71
  }
72
72
  </script>
73
- <script crossorigin="">import('/sealclaw/assets/index-CnaJ1Ys6.js').finally(() => {
73
+ <script crossorigin="">import('/sealclaw/assets/index-BGKsGXZK.js').finally(() => {
74
74
 
75
75
  const qiankunLifeCycle = window.moudleQiankunAppLifeCycles && window.moudleQiankunAppLifeCycles['sealclaw-entry'];
76
76
  if (qiankunLifeCycle) {
@@ -1 +1 @@
1
- 2026-05-22T05:24:09.132Z
1
+ 2026-05-22T05:56:06.261Z
@@ -907,25 +907,25 @@
907
907
  "dist/control-ui-links-B6qRpNRl.js",
908
908
  "dist/control-ui-shared-BX1OulBJ.js",
909
909
  "dist/control-ui/apple-touch-icon.png",
910
- "dist/control-ui/assets/agents-EXiyiWcj.js",
910
+ "dist/control-ui/assets/agents-D0yWE6FD.js",
911
911
  "dist/control-ui/assets/channel-config-extras-D50yz0bl.js",
912
- "dist/control-ui/assets/channels-EaU0sKIP.js",
913
- "dist/control-ui/assets/channels.cn-BmuE_4-S.js",
914
- "dist/control-ui/assets/cron-tZQOlNT8.js",
915
- "dist/control-ui/assets/debug-Bos7BVqr.js",
912
+ "dist/control-ui/assets/channels-Dmn0V4l-.js",
913
+ "dist/control-ui/assets/channels.cn-4thW_D4s.js",
914
+ "dist/control-ui/assets/cron-CCSk92JU.js",
915
+ "dist/control-ui/assets/debug-B_m-XQVY.js",
916
916
  "dist/control-ui/assets/directive-CUxOzvVj.js",
917
- "dist/control-ui/assets/filespace-BJ6ekAUx.js",
918
- "dist/control-ui/assets/index-CnaJ1Ys6.js",
917
+ "dist/control-ui/assets/filespace-CW07HTK7.js",
918
+ "dist/control-ui/assets/index-BGKsGXZK.js",
919
919
  "dist/control-ui/assets/index-YeCYEjfR.css",
920
- "dist/control-ui/assets/instances-CxttD6fs.js",
920
+ "dist/control-ui/assets/instances-vA_eAzPP.js",
921
921
  "dist/control-ui/assets/lit-BrYIQVuc.js",
922
922
  "dist/control-ui/assets/logs-DoHkFjmj.js",
923
- "dist/control-ui/assets/nodes-Ct8gvuAJ.js",
923
+ "dist/control-ui/assets/nodes-DEB4eQvc.js",
924
924
  "dist/control-ui/assets/preview-B-FKxvdf.js",
925
925
  "dist/control-ui/assets/push-subscription-GEdjvonj.js",
926
- "dist/control-ui/assets/sessions-EG_sUxo9.js",
927
- "dist/control-ui/assets/skill-center-8t3ZKaZ1.js",
928
- "dist/control-ui/assets/skills-BimtDTP5.js",
926
+ "dist/control-ui/assets/sessions-DLqvgv8s.js",
927
+ "dist/control-ui/assets/skill-center-CFgH06BO.js",
928
+ "dist/control-ui/assets/skills-Bi5UTneM.js",
929
929
  "dist/control-ui/assets/skills-shared-Cl6n1FJQ.js",
930
930
  "dist/control-ui/assets/string-coerce-CuNcS1Hz.js",
931
931
  "dist/control-ui/favicon-32.png",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sealclaw",
3
- "version": "2026.5.96",
3
+ "version": "2026.5.97",
4
4
  "description": "Multi-channel AI gateway with extensible messaging integrations",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/openclaw/openclaw#readme",