@v587d/capital-generation 2.13.0 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +77 -78
- package/automation/calendar-source.js +361 -0
- package/automation/client.js +351 -58
- package/automation/client.src.cjs +2510 -429
- package/automation/defaults.js +4 -0
- package/automation/index.js +7 -2
- package/automation/package.json +2 -1
- package/automation/runner.js +68 -14
- package/automation/scheduler.js +20 -2
- package/automation/schema.js +16 -0
- package/automation/store.js +37 -12
- package/chart-ui/package.json +1 -1
- package/config/package.json +1 -1
- package/lib/sources/wind-mcp.js +3 -3
- package/lib/web-retriever/local-fetch.d.ts +1 -1
- package/lib/web-retriever/local-fetch.js +1 -1
- package/lib/web-retriever/wind-client.d.ts +1 -1
- package/lib/web-retriever/wind-client.js +1 -1
- package/package.json +2 -1
- package/watchlist/package.json +1 -1
package/automation/client.js
CHANGED
|
@@ -5,64 +5,357 @@ window.__ModuleLoader__.load({
|
|
|
5
5
|
var module = { exports: {} }
|
|
6
6
|
var exports = module.exports
|
|
7
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' })
|
|
8
|
-
"use strict";var{createElement:a,useEffect:M,useRef:I,useState:w}=require("react"),{IconChecklistOutlineRegular:Y,Modal:J,Switch:P}=require("@deepseek-ai/dsh-client-ui-primitives"),O="capital-automation",Q="/capital-automation",U="capital-automation",j="capital-automation-css",t={panel:"CapGen \u6295\u7814\u81EA\u52A8\u5316",title:"CapGen \u6295\u7814\u81EA\u52A8\u5316",subtitle:"\u72EC\u7ACB\u4E8E\u5B98\u65B9\u300C\u81EA\u52A8\u5316\u4EFB\u52A1\u300D\u7684\u5B9A\u65F6\u6295\u7814\u4EFB\u52A1\u3001\u8FD0\u884C\u8BB0\u5F55\u4E0E\u901A\u77E5",profile:"\u5F53\u524D profile",scheduler:"\u8C03\u5EA6\u5668",schedulerActive:"\u8FD0\u884C\u6743\u5DF2\u53D6\u5F97",schedulerStandby:"\u672A\u53D6\u5F97\u8FD0\u884C\u6743\uFF08\u53EA\u8BFB\uFF09",schedulerStarting:"\u542F\u52A8\u4E2D",schedulerStopped:"\u5DF2\u505C\u6B62",calendar:"\u4EA4\u6613\u65E5\u5386",calendarOk:"\u53EF\u7528",calendarMissing:"\u4E0D\u53EF\u7528\uFF08\u4EA4\u6613\u65E5\u4EFB\u52A1\u4F1A\u8DF3\u8FC7\uFF09",storageUnavailable:"\u5B58\u50A8\u4E0D\u53EF\u7528\uFF0C\u9875\u9762\u53EA\u8BFB",loading:"\u8BFB\u53D6\u4E2D\u2026",empty:"\u8FD8\u6CA1\u6709\u4EFB\u52A1\u3002",noSelection:"\u4ECE\u5DE6\u4FA7\u9009\u62E9\u4E00\u4E2A\u4EFB\u52A1\u3002",newTask:"\u65B0\u5EFA\u4EFB\u52A1",groups:{running:"\u8FD0\u884C\u4E2D",news:"\u8D44\u8BAF",market:"\u884C\u60C5",review:"\u590D\u76D8",research:"\u7814\u7A76",custom:"\u6211\u7684\u4EFB\u52A1"},stateLabel:"\u72B6\u6001",state:{dormant:"\u4F11\u7720",active:"\u542F\u7528",paused:"\u6682\u505C"},status:{queued:"\u6392\u961F\u4E2D",starting:"\u542F\u52A8\u4E2D",running:"\u8FD0\u884C\u4E2D",succeeded:"\u6210\u529F",failed:"\u5931\u8D25",canceled:"\u5DF2\u53D6\u6D88",timed_out:"\u8D85\u65F6",blocked_requires_user:"\u9700\u8981\u7528\u6237\u786E\u8BA4",unknown_after_restart:"\u91CD\u542F\u540E\u672A\u77E5",skipped_overlap:"\u91CD\u53E0\u8DF3\u8FC7",skipped_calendar_unavailable:"\u65E5\u5386\u4E0D\u53EF\u7528\u8DF3\u8FC7",missed:"\u9519\u8FC7"},mode:{news:"\u8D44\u8BAF",market:"\u884C\u60C5",review:"\u590D\u76D8",research:"\u7814\u7A76"},cadence:{daily:"\u6BCF\u5929",weekly:"\u6BCF\u5468",monthly:"\u6BCF\u6708"},nextRun:"\u4E0B\u6B21\u8FD0\u884C",lastResult:"\u4E0A\u6B21\u7ED3\u679C",unread:"\u672A\u8BFB",never:"\u6682\u65E0",overview:"\u6982\u89C8",config:"\u914D\u7F6E",runs:"\u8FD0\u884C\u8BB0\u5F55",policy:"\u6267\u884C\u7B56\u7565",notifications:"\u901A\u77E5",titleField:"\u6807\u9898",descriptionField:"\u8BF4\u660E",instructionField:"\u4EFB\u52A1\u6307\u4EE4",triggerField:"\u89E6\u53D1",timeField:"\u65F6\u95F4",timezoneField:"\u65F6\u533A",weekdayField:"\u661F\u671F\uFF08ISO 1\u20137\uFF09",dayField:"\u6BCF\u6708\u51E0\u53F7\uFF081\u201328\uFF09",tradingDaysField:"\u4EC5\u4EA4\u6613\u65E5",modeField:"\u8F93\u51FA\u4FA7\u91CD",modeHint:"\u53EA\u5F71\u54CD\u8F93\u51FA\u7ED3\u6784\uFF0C\u4E0D\u6539\u53D8 Agent preset\uFF1B\u6240\u6709\u8FD0\u884C\u56FA\u5B9A\u4F7F\u7528 Capital \u81EA\u52A8\u6A21\u5F0F\u3002",presetLabel:"Agent preset",presetValue:"capital-generation\uFF08\u81EA\u52A8\u6A21\u5F0F\uFF09",workspaceField:"\u5DE5\u4F5C\u533A",workspaceDefault:"\u8DDF\u968F\u9ED8\u8BA4\u5DE5\u4F5C\u533A",workspaceMissing:"\u5DF2\u79FB\u9664\u7684\u5DE5\u4F5C\u533A\uFF08\u8BF7\u91CD\u65B0\u9009\u62E9\uFF09",workspaceUnavailable:"\u5DE5\u4F5C\u533A\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8FD0\u884C\u4F1A\u9000\u56DE\u9ED8\u8BA4\u76EE\u5F55\u3002",limitsField:"\u8FD0\u884C\u4E0A\u9650",runTimeout:"wall-clock\uFF08\u5206\u949F\uFF09",idleTimeout:"\u7A7A\u95F2\u8D85\u65F6\uFF08\u5206\u949F\uFF09",maxSteps:"\u6700\u5927\u6B65\u9AA4",maxToolCalls:"\u6700\u5927\u5DE5\u5177\u8C03\u7528",notifyField:"\u901A\u77E5",notifyInApp:"\u5E94\u7528\u5185\u901A\u77E5",notifyFailure:"\u5931\u8D25\u65F6\u901A\u77E5",notifySuccess:"\u6210\u529F\u65F6\u901A\u77E5",save:"\u4FDD\u5B58",saving:"\u4FDD\u5B58\u4E2D\u2026",saved:"\u5DF2\u4FDD\u5B58",activate:"\u542F\u7528",pause:"\u6682\u505C",hibernate:"\u4F11\u7720\u5E76\u6062\u590D\u9ED8\u8BA4",copy:"\u590D\u5236\u4E3A\u6211\u7684\u4EFB\u52A1",remove:"\u5220\u9664",runNow:"\u624B\u52A8\u8FD0\u884C",cancelRun:"\u53D6\u6D88\u8FD0\u884C",openSession:"\u6253\u5F00 session",detail:"\u8BE6\u60C5",close:"\u5173\u95ED",create:"\u521B\u5EFA",back:"\u4E0A\u4E00\u6B65",next:"\u4E0B\u4E00\u6B65",step1:"\u57FA\u672C\u4FE1\u606F",step2:"\u89E6\u53D1",step3:"\u6267\u884C",required:"\u6807\u9898\u3001\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A\u3002",inboxEmpty:"\u6CA1\u6709\u901A\u77E5\u3002",markRead:"\u5168\u90E8\u5DF2\u8BFB",noRuns:"\u8FD8\u6CA1\u6709\u8FD0\u884C\u8BB0\u5F55\u3002",duration:"\u8017\u65F6",steps:"\u6B65\u9AA4",tools:"\u5DE5\u5177\u8C03\u7528",errorTitle:"\u9519\u8BEF",policyText:"\u56FA\u5B9A preset\uFF1Acapital-generation\uFF08Capital \u81EA\u52A8\u6A21\u5F0F\uFF09\uFF1Bcwd\uFF1A\u4EFB\u52A1\u9009\u5B9A\u7684\u5DE5\u4F5C\u533A\uFF0C\u672A\u9009\u62E9\u65F6\u4F7F\u7528 CapGen \u6295\u7814\u81EA\u52A8\u5316\u5DE5\u4F5C\u533A\uFF1B\u53EA\u5141\u8BB8 Capital \u89D2\u8272\u5DE5\u5177\u65CF\uFF1B\u65E0\u4EBA\u503C\u5B88\u8FD0\u884C\u7981\u6B62\u63D0\u95EE\u3001\u5199\u6587\u4EF6\u4E0E shell \u63D0\u6743\u3002",budgetHint:"\u5DE5\u5177\u8C03\u7528\u4E0E\u6B65\u9AA4\u9884\u7B97\u8986\u76D6\u6574\u68F5\u8FD0\u884C\u5B50\u6811\uFF1A\u5B50 Agent \u4E0E PTC \u6D3E\u53D1\u90FD\u8BA1\u5165\u3002",errorGeneric:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",needConfirm:"\u9700\u8981\u7528\u6237\u786E\u8BA4"};function X(){if(typeof document>"u"||document.querySelector(`style[data-${j}]`))return()=>{};let n=document.createElement("style");return n.setAttribute(`data-${j}`,"true"),n.textContent=`
|
|
9
|
-
.capital-automation-page {
|
|
10
|
-
.capital-automation-
|
|
11
|
-
.capital-automation-
|
|
12
|
-
.capital-automation-
|
|
13
|
-
.capital-automation-
|
|
14
|
-
.capital-automation-
|
|
15
|
-
.capital-automation-
|
|
16
|
-
.capital-automation-
|
|
17
|
-
.capital-automation-
|
|
18
|
-
.capital-automation-
|
|
19
|
-
.capital-automation-
|
|
20
|
-
.capital-automation-
|
|
21
|
-
.capital-automation-
|
|
22
|
-
.capital-automation-
|
|
23
|
-
.capital-automation-
|
|
24
|
-
.capital-automation-
|
|
25
|
-
.capital-automation-
|
|
26
|
-
.capital-automation-
|
|
27
|
-
.capital-automation-
|
|
28
|
-
.capital-automation-
|
|
29
|
-
.capital-automation-
|
|
30
|
-
.capital-automation-
|
|
31
|
-
.capital-automation-
|
|
32
|
-
.capital-automation-
|
|
33
|
-
.capital-automation-
|
|
34
|
-
.capital-automation-
|
|
35
|
-
.capital-automation-
|
|
36
|
-
.capital-automation-
|
|
37
|
-
.capital-automation-
|
|
38
|
-
.capital-automation-
|
|
39
|
-
.capital-automation-
|
|
40
|
-
.capital-automation-
|
|
41
|
-
.capital-automation-
|
|
42
|
-
.capital-automation-
|
|
43
|
-
.capital-automation-
|
|
44
|
-
.capital-automation-
|
|
45
|
-
.capital-automation-
|
|
46
|
-
.capital-automation-
|
|
47
|
-
.capital-automation-
|
|
48
|
-
.capital-automation-
|
|
49
|
-
.capital-automation-
|
|
50
|
-
.capital-automation-
|
|
51
|
-
.capital-automation-
|
|
52
|
-
.capital-automation-
|
|
53
|
-
.capital-automation-
|
|
54
|
-
.capital-automation-
|
|
55
|
-
.capital-automation-
|
|
56
|
-
.capital-automation-
|
|
57
|
-
.capital-automation-
|
|
58
|
-
.capital-automation-
|
|
59
|
-
.capital-automation-
|
|
60
|
-
.capital-automation-
|
|
61
|
-
.capital-automation-
|
|
62
|
-
.capital-automation-
|
|
63
|
-
.capital-automation-
|
|
64
|
-
|
|
65
|
-
`,document.head.appendChild(n),()=>n.remove()}function Z(){async function n(e,p={}){let s=typeof AbortController=="function"?new AbortController:void 0,c=setTimeout(()=>s?.abort(),2e4),u,d;try{u=await fetch(`${Q}${e}`,{method:p.method??"GET",credentials:"same-origin",headers:p.body===void 0?{}:{"content-type":"application/json"},body:p.body===void 0?void 0:JSON.stringify(p.body),...s===void 0?{}:{signal:s.signal}});try{d=await u.json()}catch{throw new Error(t.errorGeneric)}}finally{clearTimeout(c)}if(!u.ok||d?.ok===!1){let x=new Error(d?.message??t.errorGeneric);throw x.code=d?.code,x}return d}return{meta:()=>n("/meta"),tasks:()=>n("/tasks"),detail:e=>n(`/tasks/${encodeURIComponent(e)}`),create:e=>n("/tasks",{method:"POST",body:e}),patch:(e,p)=>n(`/tasks/${encodeURIComponent(e)}`,{method:"PATCH",body:p}),remove:e=>n(`/tasks/${encodeURIComponent(e)}`,{method:"DELETE"}),action:(e,p)=>n(`/tasks/${encodeURIComponent(e)}/${p}`,{method:"POST"}),run:e=>n(`/tasks/${encodeURIComponent(e)}/run`,{method:"POST"}),cancel:e=>n(`/runs/${encodeURIComponent(e)}/cancel`,{method:"POST"}),runs:(e="")=>n(`/runs${e}`),notifications:()=>n("/notifications"),markRead:e=>n("/notifications/read",{method:"POST",body:e})}}function q(n){return t.status[n]??n}function H(n){return t.state[n]??n}function V(n,e){let p=[{id:"",title:t.workspaceDefault}],s=Array.isArray(n?.workspaces)?n.workspaces:[];for(let c of s)typeof c?.id!="string"||c.id.length===0||p.push({id:c.id,title:c.default===!0?`${c.title}\uFF08\u9ED8\u8BA4\uFF09`:c.title});return typeof e=="string"&&e.length>0&&!p.some(c=>c.id===e)&&p.push({id:e,title:t.workspaceMissing}),p}function G(n){if(typeof n!="string"||n.length===0)return t.never;let e=new Date(n);return Number.isNaN(e.getTime())?n:new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(e)}function aa(n){if(typeof n!="number"||n<0)return t.never;let e=Math.round(n/1e3);return e<60?`${e}s`:`${Math.floor(e/60)}m ${e%60}s`}function ta(n){let e=new Map,p=n.filter(c=>c.lastRun&&["queued","starting","running"].includes(c.lastRun.status));p.length>0&&e.set("running",p);let s=new Set(p.map(c=>c.id));for(let c of n){if(s.has(c.id))continue;let u=c.origin==="custom"?"custom":c.category==="market"?"market":c.category==="review"?"review":c.category==="research"?"research":"news",d=e.get(u)??[];d.push(c),e.set(u,d)}return e}function ea(n){let{task:e,selected:p,onSelect:s}=n,c=e.lastRun,u=c&&["queued","starting","running"].includes(c.status);return a("button",{type:"button",className:"capital-automation-task","aria-selected":p?"true":"false",onClick:()=>s(e.id)},a("span",{className:"capital-automation-task-row"},a("span",{className:"capital-automation-dot","data-run":u?"true":"false"}),a("span",{className:"capital-automation-task-title"},e.title),e.unread>0?a("span",{className:"capital-automation-count"},String(e.unread)):null,a("span",{className:"capital-automation-task-meta"},H(e.state))),a("span",{className:"capital-automation-task-meta"},a("span",null,`${t.nextRun}: ${e.nextRunLocal??(e.nextRunUnavailable?t.calendarMissing:t.never)}`),a("span",null,`${t.lastResult}: ${c?q(c.status):t.never}`)))}function F(n){return a("div",{className:"capital-automation-switch-row"},a("span",null,n.label),a(P,{checked:n.checked===!0,onChange:n.onChange,label:n.label,disabled:n.disabled}))}function W(n){let{trigger:e,onChange:p,disabled:s}=n,c=u=>p({...e,...u});return a("div",{className:"capital-automation-grid"},a("label",{className:"capital-automation-field"},a("span",null,"\u8282\u594F"),a("select",{value:e.cadence,disabled:s,onChange:u=>{let d=u.target.value;c({cadence:d,...d==="weekly"?{weekdays:e.weekdays??[1,3,5]}:{weekdays:void 0},...d==="monthly"?{dayOfMonth:e.dayOfMonth??1}:{dayOfMonth:void 0}})}},Object.entries(t.cadence).map(([u,d])=>a("option",{key:u,value:u},d)))),a("label",{className:"capital-automation-field"},a("span",null,t.timeField),a("input",{type:"time",value:e.time,disabled:s,onChange:u=>c({time:u.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.timezoneField),a("input",{type:"text",value:e.timezone,disabled:s,onChange:u=>c({timezone:u.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.tradingDaysField),a(P,{checked:e.tradingDaysOnly===!0,onChange:u=>c({tradingDaysOnly:u}),label:t.tradingDaysField,disabled:s})),e.cadence==="weekly"?a("label",{className:"capital-automation-field"},a("span",null,t.weekdayField),a("input",{type:"text",value:(e.weekdays??[]).join(","),disabled:s,onChange:u=>c({weekdays:u.target.value.split(",").map(d=>Number(d.trim())).filter(d=>Number.isInteger(d)&&d>=1&&d<=7)})})):null,e.cadence==="monthly"?a("label",{className:"capital-automation-field"},a("span",null,t.dayField),a("input",{type:"number",min:1,max:28,value:e.dayOfMonth??1,disabled:s,onChange:u=>c({dayOfMonth:Number(u.target.value)})})):null)}function ia(n){let{detail:e,meta:p,api:s,onChanged:c,openSession:u}=n,[d,x]=w(null),[m,T]=w(""),[k,S]=w(""),[g,$]=w("");if(M(()=>{x(e.task?{...e.task,trigger:{...e.task.trigger},limits:{...e.task.limits},notifications:{...e.task.notifications}}:null),S(""),$("")},[e]),d===null)return a("p",{className:"capital-automation-empty"},t.loading);let l=d,y=p?.storage?.state!=="unavailable",o=e.runs.some(i=>["queued","starting","running"].includes(i.status)),r=i=>x(f=>({...f,...typeof i=="function"?i(f):i}));async function v(i,f){if(!m){T(i),$(""),S("");try{await f(),S(t.saved),await c(e.task.id)}catch(R){$(R.message??t.errorGeneric)}finally{T("")}}}async function N(){await v("save",async()=>{let i={title:l.title.trim(),description:l.description??"",instruction:l.instruction,category:l.category,trigger:l.trigger,mode:l.mode,workspaceId:l.workspaceId??"",limits:l.limits,notifications:l.notifications};if(i.title.length===0||i.instruction.trim().length===0)throw new Error(t.required);await s.patch(l.id,i)})}return a("div",{className:"capital-automation-detail"},a("section",{className:"capital-automation-card"},a("h3",null,t.overview),a("div",{className:"capital-automation-grid"},a("div",{className:"capital-automation-field"},a("span",null,t.stateLabel),a("strong",null,H(l.state))),a("div",{className:"capital-automation-field"},a("span",null,t.nextRun),a("strong",null,e.task.nextRunLocal??t.never)),a("div",{className:"capital-automation-field"},a("span",null,t.lastResult),a("strong",null,e.runs[0]?q(e.runs[0].status):t.never)),a("div",{className:"capital-automation-field"},a("span",null,"\u6765\u6E90"),a("strong",null,l.origin==="builtin"?"\u5185\u7F6E\u6A21\u677F":"\u6211\u7684\u4EFB\u52A1"))),a("div",{className:"capital-automation-actions"},a("button",{type:"button",className:"capital-automation-btn","data-primary":"true",disabled:m||!y,onClick:()=>v("run",async()=>{await s.run(l.id)})},t.runNow),l.state==="active"?a("button",{type:"button",className:"capital-automation-btn",disabled:m||!y,onClick:()=>v("pause",async()=>{await s.action(l.id,"pause")})},t.pause):a("button",{type:"button",className:"capital-automation-btn",disabled:m||!y,onClick:()=>v("activate",async()=>{await s.action(l.id,"activate")})},t.activate),l.origin==="builtin"&&l.state!=="dormant"?a("button",{type:"button",className:"capital-automation-btn",disabled:m||o||!y,onClick:()=>v("hibernate",async()=>{await s.action(l.id,"hibernate")})},t.hibernate):null,l.origin==="builtin"?a("button",{type:"button",className:"capital-automation-btn",disabled:m||!y,onClick:()=>v("copy",async()=>{await s.action(l.id,"copy")})},t.copy):a("button",{type:"button",className:"capital-automation-btn","data-danger":"true",disabled:m||o||!y,onClick:()=>v("remove",async()=>{await s.remove(l.id)})},t.remove)),k.length>0?a("p",{className:"capital-automation-notice"},k):null,g.length>0?a("p",{className:"capital-automation-error"},g):null),a("section",{className:"capital-automation-card"},a("h3",null,t.config),a("label",{className:"capital-automation-field"},a("span",null,t.titleField),a("input",{value:l.title,disabled:m,onChange:i=>r({title:i.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.descriptionField),a("textarea",{value:l.description??"",disabled:m,onChange:i=>r({description:i.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.instructionField),a("textarea",{value:l.instruction,disabled:m,onChange:i=>r({instruction:i.target.value})})),a("h3",null,t.triggerField),a(W,{trigger:l.trigger,disabled:m,onChange:i=>r({trigger:i})}),a("div",{className:"capital-automation-grid"},a("label",{className:"capital-automation-field"},a("span",null,t.workspaceField),a("select",{value:l.workspaceId??"",disabled:m,onChange:i=>r({workspaceId:i.target.value})},V(p,l.workspaceId).map(i=>a("option",{key:i.id,value:i.id},i.title)))),a("label",{className:"capital-automation-field"},a("span",null,t.modeField),a("select",{value:l.mode,disabled:m,onChange:i=>r({mode:i.target.value})},Object.entries(t.mode).map(([i,f])=>a("option",{key:i,value:i},f)))),a("label",{className:"capital-automation-field"},a("span",null,t.runTimeout),a("input",{type:"number",min:5,max:120,value:l.limits.runTimeoutMinutes,disabled:m,onChange:i=>r(f=>({limits:{...f.limits,runTimeoutMinutes:Number(i.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.idleTimeout),a("input",{type:"number",min:1,max:30,value:l.limits.idleTimeoutMinutes,disabled:m,onChange:i=>r(f=>({limits:{...f.limits,idleTimeoutMinutes:Number(i.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.maxSteps),a("input",{type:"number",min:10,max:2e3,value:l.limits.maxSteps,disabled:m,onChange:i=>r(f=>({limits:{...f.limits,maxSteps:Number(i.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.maxToolCalls),a("input",{type:"number",min:10,max:6e3,value:l.limits.maxToolCalls,disabled:m,onChange:i=>r(f=>({limits:{...f.limits,maxToolCalls:Number(i.target.value)}}))}))),a("p",{className:"capital-automation-hint"},t.modeHint),p?.workspaceError?a("p",{className:"capital-automation-error"},t.workspaceUnavailable):null,a("h3",null,t.notifyField),a(F,{label:t.notifyInApp,checked:l.notifications.inApp,disabled:m,onChange:i=>r(f=>({notifications:{...f.notifications,inApp:i}}))}),a(F,{label:t.notifyFailure,checked:l.notifications.onFailure,disabled:m,onChange:i=>r(f=>({notifications:{...f.notifications,onFailure:i}}))}),a(F,{label:t.notifySuccess,checked:l.notifications.onSuccess,disabled:m,onChange:i=>r(f=>({notifications:{...f.notifications,onSuccess:i}}))}),a("div",{className:"capital-automation-actions"},a("button",{type:"button",className:"capital-automation-btn","data-primary":"true",disabled:m||!y,onClick:N},m==="save"?t.saving:t.save))),a("section",{className:"capital-automation-card"},a("h3",null,t.runs),e.runs.length===0?a("p",{className:"capital-automation-hint"},t.noRuns):null,e.runs.map(i=>a("div",{key:i.id,className:"capital-automation-run"},a("div",{className:"capital-automation-run-head"},a("span",{className:"capital-automation-run-status","data-status":i.status},q(i.status)),a("span",{className:"capital-automation-run-meta"},`${G(i.queuedAt)} \xB7 ${i.trigger==="manual"?"\u624B\u52A8":"\u5B9A\u65F6"}`),typeof i.durationMs=="number"?a("span",{className:"capital-automation-run-meta"},`${t.duration} ${aa(i.durationMs)}`):null,a("span",{className:"capital-automation-run-meta"},`${t.steps} ${i.steps} \xB7 ${t.tools} ${i.toolCalls}`),["queued","starting","running"].includes(i.status)?a("button",{type:"button",className:"capital-automation-btn","data-danger":"true",disabled:m,onClick:()=>v(`cancel-${i.id}`,async()=>{await s.cancel(i.id)})},t.cancelRun):i.sessionId&&u?a("button",{type:"button",className:"capital-automation-btn",onClick:()=>u(i.sessionId)},t.openSession):null),i.sessionTitle?a("span",{className:"capital-automation-run-meta"},i.sessionTitle):null,i.summary?a("span",{className:"capital-automation-run-meta"},i.summary):null,i.errors.map((f,R)=>a("span",{key:`${i.id}-${R}`,className:"capital-automation-error-item"},`${f.code}: ${f.message}`)))),a("section",{className:"capital-automation-card"},a("h3",null,t.policy),a("p",{className:"capital-automation-hint"},t.policyText),a("p",{className:"capital-automation-hint"},t.budgetHint),a("p",{className:"capital-automation-hint"},`profileKey: ${p?.profile?.key??"-"} \xB7 ${t.presetLabel}: ${t.presetValue} \xB7 cwdKind: profile`)),a("section",{className:"capital-automation-card"},a("div",{className:"capital-automation-actions"},a("h3",null,t.notifications),e.notifications.some(i=>i.readAt===void 0)?a("button",{type:"button",className:"capital-automation-btn",disabled:m,onClick:()=>v("read-notifications",async()=>{await s.markRead({all:!0})})},t.markRead):null),e.notifications.length===0?a("p",{className:"capital-automation-hint"},t.inboxEmpty):null,e.notifications.map(i=>a("div",{key:i.id,className:"capital-automation-run"},a("div",{className:"capital-automation-run-head"},a("strong",null,i.title),a("span",{className:"capital-automation-run-meta"},G(i.createdAt))),a("span",{className:"capital-automation-run-meta"},i.message))))))}function na(n){let{open:e,onClose:p,api:s,onCreated:c,meta:u}=n,[d,x]=w(0),[m,T]=w(!1),[k,S]=w(""),[g,$]=w({title:"",description:"",instruction:"",category:"research",trigger:{kind:"schedule",cadence:"daily",time:"09:00",timezone:"Asia/Shanghai",tradingDaysOnly:!0},mode:"research",workspaceId:"",limits:{runTimeoutMinutes:30,idleTimeoutMinutes:5,maxSteps:300,maxToolCalls:1200},notifications:{inApp:!0,onFailure:!0,onSuccess:!1}});M(()=>{e&&(x(0),S(""),T(!1),$({title:"",description:"",instruction:"",category:"research",trigger:{kind:"schedule",cadence:"daily",time:"09:00",timezone:"Asia/Shanghai",tradingDaysOnly:!0},mode:"research",workspaceId:"",limits:{runTimeoutMinutes:30,idleTimeoutMinutes:5,maxSteps:300,maxToolCalls:1200},notifications:{inApp:!0,onFailure:!0,onSuccess:!1}}))},[e]);let l=o=>$(r=>({...r,...typeof o=="function"?o(r):o}));async function y(){if(g.title.trim().length===0||g.instruction.trim().length===0){S(t.required);return}T(!0),S("");try{await s.create({title:g.title.trim(),description:g.description,instruction:g.instruction,category:g.category,trigger:g.trigger,mode:g.mode,workspaceId:g.workspaceId??"",limits:g.limits,notifications:g.notifications}),c()}catch(o){S(o.message??t.errorGeneric)}finally{T(!1)}}return e?a(J,{open:e,onClose:p,title:t.newTask,closeLabel:t.close,footer:a("div",{className:"capital-automation-actions"},d>0?a("button",{type:"button",className:"capital-automation-btn",onClick:()=>x(d-1),disabled:m},t.back):null,d<2?a("button",{type:"button",className:"capital-automation-btn","data-primary":"true",onClick:()=>x(d+1),disabled:m},t.next):a("button",{type:"button",className:"capital-automation-btn","data-primary":"true",onClick:y,disabled:m||u?.storage?.state==="unavailable"},m?t.saving:t.create))},a("div",{className:"capital-automation-wizard"},a("div",{className:"capital-automation-steps"},[t.step1,t.step2,t.step3].map((o,r)=>a("span",{key:o,className:"capital-automation-step","data-active":r===d?"true":"false"},`${r+1}. ${o}`))),d===0?a("div",{className:"capital-automation-grid"},a("label",{className:"capital-automation-field"},a("span",null,t.titleField),a("input",{value:g.title,onChange:o=>l({title:o.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.descriptionField),a("textarea",{value:g.description,onChange:o=>l({description:o.target.value})})),a("label",{className:"capital-automation-field"},a("span",null,t.instructionField),a("textarea",{value:g.instruction,onChange:o=>l({instruction:o.target.value})}))):null,d===1?a("div",null,a(W,{trigger:g.trigger,onChange:o=>l({trigger:o})}),a("p",{className:"capital-automation-hint"},"\u4EA4\u6613\u65E5\u5386\u4E0D\u53EF\u7528\u65F6\u4EFB\u52A1\u4F1A\u8BB0\u4E3A skipped_calendar_unavailable\uFF0C\u4E0D\u6309\u5468\u4E00\u81F3\u5468\u4E94\u731C\u6D4B\u8FD0\u884C\u3002")):null,d===2?a("div",null,a("div",{className:"capital-automation-grid"},a("label",{className:"capital-automation-field"},a("span",null,t.workspaceField),a("select",{value:g.workspaceId??"",onChange:o=>l({workspaceId:o.target.value})},V(u,g.workspaceId).map(o=>a("option",{key:o.id,value:o.id},o.title)))),a("label",{className:"capital-automation-field"},a("span",null,t.modeField),a("select",{value:g.mode,onChange:o=>l({mode:o.target.value})},Object.entries(t.mode).map(([o,r])=>a("option",{key:o,value:o},r)))),a("label",{className:"capital-automation-field"},a("span",null,t.runTimeout),a("input",{type:"number",min:5,max:120,value:g.limits.runTimeoutMinutes,onChange:o=>l(r=>({limits:{...r.limits,runTimeoutMinutes:Number(o.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.idleTimeout),a("input",{type:"number",min:1,max:30,value:g.limits.idleTimeoutMinutes,onChange:o=>l(r=>({limits:{...r.limits,idleTimeoutMinutes:Number(o.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.maxSteps),a("input",{type:"number",min:10,max:2e3,value:g.limits.maxSteps,onChange:o=>l(r=>({limits:{...r.limits,maxSteps:Number(o.target.value)}}))})),a("label",{className:"capital-automation-field"},a("span",null,t.maxToolCalls),a("input",{type:"number",min:10,max:6e3,value:g.limits.maxToolCalls,onChange:o=>l(r=>({limits:{...r.limits,maxToolCalls:Number(o.target.value)}}))}))),a("p",{className:"capital-automation-hint"},t.modeHint),u?.workspaceError?a("p",{className:"capital-automation-error"},t.workspaceUnavailable):null,a(F,{label:t.notifyInApp,checked:g.notifications.inApp,onChange:o=>l(r=>({notifications:{...r.notifications,inApp:o}}))}),a(F,{label:t.notifyFailure,checked:g.notifications.onFailure,onChange:o=>l(r=>({notifications:{...r.notifications,onFailure:o}}))}),a(F,{label:t.notifySuccess,checked:g.notifications.onSuccess,onChange:o=>l(r=>({notifications:{...r.notifications,onSuccess:o}}))})):null,k.length>0?a("p",{className:"capital-automation-error"},k):null)):null}function la(n){let{api:e,openSession:p}=n,[s,c]=w(null),[u,d]=w([]),[x,m]=w(null),[T,k]=w(null),[S,g]=w(!1),[$,l]=w(""),y=I(!1),o=I(null),r=I(null),v=I(0),N=I(0);async function i(){if(r.current!==null)return r.current;let b=v.current+1;v.current=b;let h=(async()=>{try{let[C,L]=await Promise.all([e.meta(),e.tasks()]);if(!y.current||b!==v.current)return;let _=Array.isArray(L.tasks)?L.tasks:[];c(C),d(_),l("");let A=o.current,E=A!==null&&_.some(K=>K.id===A)?A:_[0]?.id??null;E!==A&&(o.current=E,N.current+=1,k(null),m(E))}catch(C){y.current&&b===v.current&&l(C.message??t.errorGeneric)}})();r.current=h;try{await h}finally{r.current===h&&(r.current=null)}}async function f(b){let h=N.current+1;N.current=h;try{let C=await e.detail(b);if(!y.current||h!==N.current||o.current!==b)return;k(C)}catch(C){y.current&&h===N.current&&o.current===b&&l(C.message??t.errorGeneric)}}function R(b){o.current!==b&&(o.current=b,N.current+=1,k(null),m(b))}M(()=>{y.current=!0,i();let b=setInterval(()=>{document.visibilityState!=="hidden"&&i()},15e3),h=()=>{document.visibilityState==="visible"&&i()};return document.addEventListener?.("visibilitychange",h),()=>{y.current=!1,v.current+=1,N.current+=1,r.current=null,clearInterval(b),document.removeEventListener?.("visibilitychange",h)}},[]),M(()=>{if(x===null){k(null),N.current+=1;return}return k(null),f(x),()=>{N.current+=1}},[x]);let B=ta(u),z=s?.scheduler?.state,D=s?.storage?.state!=="unavailable";return a("div",{className:"capital-automation-page"},a("header",{className:"capital-automation-head"},a("div",null,a("h1",{className:"capital-automation-title"},t.title),a("p",{className:"capital-automation-sub"},t.subtitle)),a("div",{className:"capital-automation-meta"},a("span",{className:"capital-automation-badge"},`${t.profile}: ${s?.profile?.name??"\u2014"}`),a("span",{className:"capital-automation-badge","data-ok":z==="active"?"true":"false"},`${t.scheduler}: ${z==="active"?t.schedulerActive:z==="standby"?t.schedulerStandby:z==="stopped"?t.schedulerStopped:t.schedulerStarting}`),a("span",{className:"capital-automation-badge","data-ok":s?.calendar?.available===!0?"true":"false"},`${t.calendar}: ${s?.calendar?.available===!0?t.calendarOk:t.calendarMissing}`),a("span",{className:"capital-automation-badge"},`v${s?.version??"\u2014"}`),a("button",{type:"button",className:"capital-automation-btn","data-primary":"true",disabled:!D,onClick:()=>g(!0)},t.newTask))),!D&&s?a("div",{className:"capital-automation-banner"},`${t.storageUnavailable}${s.storage?.error?`\uFF1A${s.storage.error}`:""}`):null,$.length>0?a("p",{className:"capital-automation-error"},$):null,a("div",{className:"capital-automation-body"},a("aside",{className:"capital-automation-list"},u.length===0?a("p",{className:"capital-automation-empty"},t.empty):null,[...B.entries()].map(([b,h])=>a("section",{key:b,className:"capital-automation-group"},a("h2",{className:"capital-automation-group-title"},t.groups[b]??b),h.map(C=>a(ea,{key:C.id,task:C,selected:C.id===x,onSelect:R}))))),a("main",{className:"capital-automation-detail"},T===null?a("p",{className:"capital-automation-empty"},t.noSelection):null,T!==null?a(ia,{detail:T,meta:s,api:e,openSession:p,onChanged:async b=>{await i();let h=b??o.current;h!==null&&o.current===h&&await f(h)}}):null)),a(na,{open:S,onClose:()=>g(!1),api:e,meta:s,onCreated:async()=>{g(!1),await i()}}))}function oa(){return a(Y,{width:18,height:18})}function sa(n){let e=Z(),p=s=>{try{n.get("uiWorkspace")?.openSession?.(s)}catch{}};n.effect(()=>X(),`${O}: styles`),n.slots.inject("main",()=>n.slots.register({name:"main",key:U,inject:()=>({api:e,openSession:p})},la)),n.slots.inject("sidebar.panellist",()=>n.slots.register({name:"sidebar.panellist",id:U,order:11,label:()=>t.panel},oa)),n.logger?.info?.(`${O}: \u5BA2\u6237\u7AEF\u534A\u8FB9\u5DF2\u6302\u8F7D\uFF08\u9875\u9762 + \u4FA7\u680F\u5165\u53E3\uFF09`)}exports.name=O;exports.inject=["slots"];exports.apply=sa;
|
|
8
|
+
"use strict";var{createElement:a,useEffect:W,useRef:H,useState:C}=require("react"),{IconAlarmClockOutlineRegular:va,IconChecklistOutlineRegular:Fa,IconChevronDownOutlineRegular:Ot,IconChevronLeftOutlineRegular:$t,IconChevronRightOutlineRegular:Aa,IconClockOutlineRegular:Ia,IconCopyOutlineRegular:Dt,IconEditOutlineRegular:Et,IconEllipsisOutlineRegular:Mt,IconFolderOpenOutlineRegular:Lt,IconGaugeOutlineRegular:_t,IconGlobeOutlineRegular:Bt,IconInfoOutlineRegular:Xa,IconLightOutlineMedium:Ht,IconListPenOutlineRegular:Pt,IconPauseOutlineRegular:qt,IconPlayOutlineRegular:Oa,IconPlusOutlineRegular:$a,IconRefreshOutlineRegular:Ut,IconRightUpOutlineRegular:jt,IconSearchOutlineRegular:at,IconSparkleRegular:tt,IconTrashOutlineRegular:Gt,IconWarningOutlineRegular:et,Menu:it,MenuItemButton:Ya,Modal:Da,Switch:nt}=require("@deepseek-ai/dsh-client-ui-primitives"),Ra="capital-automation",Vt="/capital-automation",Wa="capital-automation",Za="capital-automation-css",Kt=["queued","starting","running"],Yt=["failed","timed_out","blocked_requires_user","unknown_after_restart"],Wt=["skipped_overlap","skipped_calendar_unavailable","missed"],Zt={runTimeoutMinutes:30,idleTimeoutMinutes:5,maxSteps:300,maxToolCalls:1200},Ea=[{value:1,label:"\u4E00"},{value:2,label:"\u4E8C"},{value:3,label:"\u4E09"},{value:4,label:"\u56DB"},{value:5,label:"\u4E94"},{value:6,label:"\u516D"},{value:7,label:"\u65E5"}],Jt=["Asia/Shanghai","Asia/Hong_Kong","Asia/Singapore","Asia/Tokyo","UTC","Europe/London","America/New_York","America/Los_Angeles"],ha=30,Ja=3,e={panel:"CapGen \u6295\u7814\u81EA\u52A8\u5316",title:"CapGen \u6295\u7814\u81EA\u52A8\u5316",subtitle:"\u5B9A\u65F6\u6295\u7814\uFF0C\u81EA\u52A8\u6267\u884C\uFF0C\u7ED3\u679C\u53EF\u8FFD\u6EAF",tabs:{tasks:"\u4EFB\u52A1",runs:"\u8FD0\u884C"},storageUnavailable:"\u5B58\u50A8\u4E0D\u53EF\u7528\uFF0C\u9875\u9762\u53EA\u8BFB",standbyBanner:"\u8C03\u5EA6\u5668\u672A\u53D6\u5F97\u8FD0\u884C\u6743\uFF1A\u5B9A\u65F6\u89E6\u53D1\u4E0E\u624B\u52A8\u8FD0\u884C\u5DF2\u6682\u505C\uFF0C\u4EFB\u52A1\u914D\u7F6E\u4ECD\u53EF\u67E5\u770B\u548C\u7F16\u8F91\u3002",storageBanner:"\u6295\u7814\u81EA\u52A8\u5316\u5B58\u50A8\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A\u9875\u9762\u53EA\u8BFB\uFF0C\u8C03\u5EA6\u5668\u4E0D\u4F1A\u542F\u52A8\u3002",calendarBanner:"\u4EA4\u6613\u65E5\u5386\u6682\u65F6\u4E0D\u53EF\u7528\uFF1A\u4EC5\u4EA4\u6613\u65E5\u7684\u4EFB\u52A1\u4F1A\u8DF3\u8FC7\uFF0C\u5176\u4ED6\u4EFB\u52A1\u4ECD\u6309\u8BBE\u5B9A\u65F6\u95F4\u8FD0\u884C\u3002",calendarCoverageBanner:"\u4EA4\u6613\u65E5\u5386\u53EA\u8986\u76D6\u5230 {through}\uFF1A\u4E4B\u540E\u4EC5\u4EA4\u6613\u65E5\u7684\u4EFB\u52A1\u4F1A\u6309 fail-closed \u8DF3\u8FC7\uFF1B\u4EA4\u6613\u6240\u516C\u5E03\u65B0\u4E00\u5E74\u5B89\u6392\u540E\u4F1A\u81EA\u52A8\u63A5\u4E0A\u3002",calendarField:"\u4EA4\u6613\u65E5\u5386",calendarSourceSzse:"\u6DF1\u4EA4\u6240\u5B98\u65B9\u65E5\u5386",calendarSourceBundled:"\u5185\u7F6E\u8868",calendarSourceNone:"\u4E0D\u53EF\u7528",calendarThrough:"\u8986\u76D6\u81F3 {date}",calendarUnknown:"\u672A\u77E5",loadRetry:"\u91CD\u65B0\u8BFB\u53D6",loading:"\u8BFB\u53D6\u4E2D\u2026",empty:"\u8FD8\u6CA1\u6709\u4EFB\u52A1\u3002",emptyTasksTitle:"\u8FD8\u6CA1\u6709\u6DFB\u52A0\u7684\u4EFB\u52A1",emptyTasksBody:"\u4ECE\u4E0B\u65B9\u6DFB\u52A0\u4E00\u4E2A\u5185\u7F6E\u6A21\u677F\uFF0C\u6216\u65B0\u5EFA\u4E00\u4E2A\u81EA\u5DF1\u7684\u6295\u7814\u4EFB\u52A1\u3002",emptyNoTemplates:"\u8FD8\u6CA1\u6709\u4EFB\u52A1",emptyNoTemplatesBody:"\u70B9\u51FB\u53F3\u4E0A\u89D2\u300C\u65B0\u5EFA\u4EFB\u52A1\u300D\uFF0C\u521B\u5EFA\u7B2C\u4E00\u4E2A\u5B9A\u65F6\u6295\u7814\u4EFB\u52A1\u3002",emptyFiltered:"\u6CA1\u6709\u5339\u914D\u7684\u4EFB\u52A1\u3002",clearFilter:"\u6E05\u9664\u7B5B\u9009",newTask:"\u65B0\u5EFA\u4EFB\u52A1",newTaskTitle:"\u65B0\u5EFA\u6295\u7814\u4EFB\u52A1",newTaskHint:"\u4EFB\u52A1\u4F1A\u5728\u540E\u53F0\u65B0\u5EFA\u4E00\u4E2A session \u6267\u884C\uFF0C\u4E0D\u9700\u8981\u4F60\u5B88\u5728\u9875\u9762\u4E0A\u3002",editTask:"\u7F16\u8F91\u4EFB\u52A1",allTasks:"\u5168\u90E8\u4EFB\u52A1",backToTasks:"\u6240\u6709\u4EFB\u52A1",taskSection:"\u4EFB\u52A1",taskSectionHint:"\u70B9\u51FB\u4EFB\u52A1\u884C\u67E5\u770B\u8BE6\u60C5\u3001\u8FD0\u884C\u8BB0\u5F55\u548C\u914D\u7F6E\u3002",templateSection:"\u6A21\u677F",templateAdd:"\u6DFB\u52A0",templateAdding:"\u6DFB\u52A0\u4E2D\u2026",templateMeta:"\u5185\u7F6E\u6A21\u677F",runningSection:"\u6B63\u5728\u8FD0\u884C",runningSince:"\u5F00\u59CB\u4E8E",cancelRun:"\u53D6\u6D88\u8FD0\u884C",searchPlaceholder:"\u641C\u7D22\u4EFB\u52A1",filterAll:"\u5168\u90E8",filterCustom:"\u6211\u7684\u4EFB\u52A1",filterNews:"\u8D44\u8BAF",filterMarket:"\u884C\u60C5",filterReview:"\u590D\u76D8",filterResearch:"\u7814\u7A76",filterLabel:"\u7B5B\u9009\u4EFB\u52A1",category:{news:"\u8D44\u8BAF",market:"\u884C\u60C5",review:"\u590D\u76D8",research:"\u7814\u7A76"},categoryField:"\u4EFB\u52A1\u5206\u7C7B",categoryFixed:"\u5185\u7F6E\u6A21\u677F\u7684\u5206\u7C7B\u56FA\u5B9A\uFF1B\u590D\u5236\u4E3A\u6211\u7684\u4EFB\u52A1\u540E\u53EF\u4EE5\u8C03\u6574\u3002",modeField:"\u8F93\u51FA\u4FA7\u91CD",modeHint:"\u53EA\u5F71\u54CD\u8F93\u51FA\u7ED3\u6784\uFF1B\u6240\u6709\u8FD0\u884C\u56FA\u5B9A\u4F7F\u7528\u81EA\u52A8\u6A21\u5F0F\u3002",mode:{news:"\u8D44\u8BAF",market:"\u884C\u60C5",review:"\u590D\u76D8",research:"\u7814\u7A76"},cadence:{daily:"\u6BCF\u5929",weekly:"\u6BCF\u5468",monthly:"\u6BCF\u6708"},stateLabel:"\u72B6\u6001",state:{dormant:"\u672A\u6DFB\u52A0",active:"\u5DF2\u542F\u7528",paused:"\u5DF2\u6682\u505C"},origin:{builtin:"\u5185\u7F6E\u6A21\u677F",custom:"\u6211\u7684\u4EFB\u52A1"},status:{queued:"\u6392\u961F\u4E2D",starting:"\u542F\u52A8\u4E2D",running:"\u8FD0\u884C\u4E2D",succeeded:"\u6210\u529F",failed:"\u5931\u8D25",canceled:"\u5DF2\u53D6\u6D88",timed_out:"\u8D85\u65F6",blocked_requires_user:"\u9700\u8981\u7528\u6237\u786E\u8BA4",unknown_after_restart:"\u91CD\u542F\u540E\u672A\u77E5",skipped_overlap:"\u91CD\u53E0\u8DF3\u8FC7",skipped_calendar_unavailable:"\u65E5\u5386\u4E0D\u53EF\u7528\u8DF3\u8FC7",missed:"\u9519\u8FC7"},runNow:"\u7ACB\u5373\u8FD0\u884C",runStarted:"\u5DF2\u63D0\u4EA4\u8FD0\u884C",pause:"\u6682\u505C",activate:"\u542F\u7528",add:"\u6DFB\u52A0",hibernate:"\u4F11\u7720\u5E76\u6062\u590D\u9ED8\u8BA4",copy:"\u590D\u5236\u4E3A\u6211\u7684\u4EFB\u52A1",remove:"\u5220\u9664\u4EFB\u52A1",edit:"\u7F16\u8F91",more:"\u66F4\u591A\u64CD\u4F5C",save:"\u4FDD\u5B58",saving:"\u4FDD\u5B58\u4E2D\u2026",processing:"\u5904\u7406\u4E2D\u2026",saved:"\u5DF2\u4FDD\u5B58",cancel:"\u53D6\u6D88",create:"\u521B\u5EFA\u4EFB\u52A1",creating:"\u521B\u5EFA\u4E2D\u2026",required:"\u6807\u9898\u548C\u4EFB\u52A1\u6307\u4EE4\u4E0D\u80FD\u4E3A\u7A7A\u3002",dirty:"\u6709\u672A\u4FDD\u5B58\u7684\u4FEE\u6539",noDirty:"\u914D\u7F6E\u5DF2\u540C\u6B65",nextRun:"\u4E0B\u6B21\u8FD0\u884C",nextRunDormant:"\u6DFB\u52A0\u540E\u5F00\u59CB\u8C03\u5EA6",nextRunPaused:"\u542F\u7528\u540E\u6062\u590D\u8C03\u5EA6",notScheduled:"\u5F53\u524D\u4E0D\u4F1A\u81EA\u52A8\u8FD0\u884C",lastResult:"\u4E0A\u6B21\u7ED3\u679C",lastRunEmpty:"\u8FD0\u884C\u540E\u53EF\u5728\u8FD9\u91CC\u67E5\u770B\u7ED3\u679C",never:"\u6682\u65E0",calendarUnavailable:"\u65E5\u5386\u4E0D\u53EF\u7528",unread:"\u672A\u8BFB",overview:"\u6982\u89C8",config:"\u914D\u7F6E",runs:"\u8FD0\u884C\u8BB0\u5F55",notifications:"\u901A\u77E5",descriptionField:"\u8BF4\u660E",titleField:"\u6807\u9898",instructionField:"\u4EFB\u52A1\u6307\u4EE4",instructionPlaceholder:"\u4F8B\u5982\uFF1A\u8BFB\u53D6\u4ECA\u65E5\u81EA\u9009\u80A1\u884C\u60C5\u3001\u516C\u544A\u4E0E\u76F8\u5173\u65B0\u95FB\uFF0C\u6309\u300C\u7ED3\u8BBA\u2014\u8BC1\u636E\u2014\u98CE\u9669\u300D\u6574\u7406\u6210\u4E00\u4EFD\u53EF\u590D\u6838\u7684\u76D8\u540E\u590D\u76D8\u3002",titlePlaceholder:"\u7ED9\u8FD9\u4E2A\u4EFB\u52A1\u8D77\u4E2A\u540D\u5B57",descriptionPlaceholder:"\u4E00\u53E5\u8BDD\u8BF4\u660E\u4EFB\u52A1\u76EE\u6807\uFF08\u53EF\u9009\uFF09",triggerField:"\u89E6\u53D1\u5668",triggerHint:"\u6309\u672C\u5730\u5899\u949F\u65F6\u95F4\u8BA1\u7B97\uFF1B\u4EC5\u4EA4\u6613\u65E5\u4EFB\u52A1\u7531\u4EA4\u6613\u65E5\u5386\u5224\u65AD\u5468\u672B\u4E0E\u8282\u5047\u65E5\u3002",triggerHintNatural:"\u6309\u672C\u5730\u5899\u949F\u65F6\u95F4\u8BA1\u7B97\uFF1A\u6BCF\u5929\u90FD\u89E6\u53D1\uFF0C\u5468\u672B\u4E0E\u8282\u5047\u65E5\u4E5F\u8FD0\u884C\u3002",timeField:"\u65F6\u95F4",timezoneField:"\u65F6\u533A",weekdayField:"\u661F\u671F",dayField:"\u65E5\u671F",tradingDaysField:"\u4EC5\u4EA4\u6613\u65E5",weekdayRequired:"\u6BCF\u5468\u81F3\u5C11\u9009\u62E9\u4E00\u5929\u3002",invalidTime:"\u8FD0\u884C\u65F6\u95F4\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u9009\u62E9 HH:mm\u3002",invalidTimezone:"\u65F6\u533A\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u586B\u5199 IANA \u65F6\u533A\u3002",invalidTimezoneValue:"\u65F6\u533A\u4E0D\u88AB\u8BC6\u522B\uFF0C\u8BF7\u586B\u5199\u6709\u6548\u7684 IANA \u65F6\u533A\u3002",invalidLimits:"\u8FD0\u884C\u4E0A\u9650\u5FC5\u987B\u662F\u6709\u6548\u6570\u5B57\u3002",filterNoRuns:"\u6CA1\u6709\u7B26\u5408\u7B5B\u9009\u6761\u4EF6\u7684\u8FD0\u884C\u8BB0\u5F55\u3002",schedulePrefix:"\u4E0B\u6B21",workspaceField:"\u5DE5\u4F5C\u533A",workspaceDefault:"\u8DDF\u968F\u9ED8\u8BA4\u5DE5\u4F5C\u533A",workspaceMissing:"\u5DF2\u79FB\u9664\u7684\u5DE5\u4F5C\u533A\uFF08\u8BF7\u91CD\u65B0\u9009\u62E9\uFF09",workspaceUnavailable:"\u5DE5\u4F5C\u533A\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8FD0\u884C\u4F1A\u9000\u56DE\u9ED8\u8BA4\u76EE\u5F55\u3002",limitsField:"\u8FD0\u884C\u4E0A\u9650",advanced:"\u9AD8\u7EA7\u8BBE\u7F6E",advancedHint:"\u9884\u7B97\u8986\u76D6\u6574\u68F5\u8FD0\u884C\u5B50\u6811\uFF1A\u5B50 Agent \u4E0E PTC \u6D3E\u53D1\u90FD\u8BA1\u5165\u3002",runTimeout:"\u6700\u957F\u8FD0\u884C\uFF08\u5206\u949F\uFF09",idleTimeout:"\u7A7A\u95F2\u8D85\u65F6\uFF08\u5206\u949F\uFF09",maxSteps:"\u6700\u5927\u6B65\u9AA4",maxToolCalls:"\u6700\u5927\u5DE5\u5177\u8C03\u7528",notifyField:"\u901A\u77E5",notifyInApp:"\u5E94\u7528\u5185\u901A\u77E5",notifyFailure:"\u5931\u8D25\u65F6\u901A\u77E5",notifySuccess:"\u6210\u529F\u65F6\u901A\u77E5",notifyHint:"\u901A\u77E5\u53EA\u8BB0\u5F55\u5728\u5F53\u524D profile\uFF1B\u4E0D\u4F1A\u53D1\u9001\u90AE\u4EF6\u6216\u5916\u90E8\u6D88\u606F\u3002",presetLabel:"\u8FD0\u884C\u6A21\u5F0F",presetValue:"\u81EA\u52A8\u6A21\u5F0F",budgetHint:"\u5DE5\u5177\u8C03\u7528\u4E0E\u6B65\u9AA4\u9884\u7B97\u8986\u76D6\u6574\u68F5\u8FD0\u884C\u5B50\u6811\uFF1A\u5B50 Agent \u4E0E PTC \u6D3E\u53D1\u90FD\u8BA1\u5165\u3002",environment:"\u6267\u884C\u73AF\u5883",policyField:"\u65E0\u4EBA\u503C\u5B88\u7B56\u7565",cwdKind:"\u5DE5\u4F5C\u533A\u6765\u6E90",techInfo:"\u6280\u672F\u4FE1\u606F",profileKey:"profileKey",runHistory:"\u8FD0\u884C\u5386\u53F2",last30Days:"\u6700\u8FD1 30 \u5929",runCount:"{n} \u6B21\u8FD0\u884C",successCount:"{n} \u6210\u529F",failureCount:"{n} \u5931\u8D25",historyEmpty:"\u6700\u8FD1 30 \u5929\u8FD8\u6CA1\u6709\u8FD0\u884C\u8BB0\u5F55\u3002",historyViewAll:"\u67E5\u770B\u5168\u90E8\u8FD0\u884C",runFilterAll:"\u5168\u90E8",runFilterActive:"\u8FDB\u884C\u4E2D",runFilterSucceeded:"\u6210\u529F",runFilterFailed:"\u5931\u8D25",runFilterLabel:"\u7B5B\u9009\u8FD0\u884C\u8BB0\u5F55",runsTitle:"\u8FD0\u884C",runsHint:"\u6BCF\u6B21\u8FD0\u884C\u90FD\u4F7F\u7528\u65B0\u7684 session\uFF1B\u7EC8\u6001\u540E\u624D\u80FD\u6253\u5F00 session\u3002",runsEmptyTitle:"\u5C1A\u672A\u8FD0\u884C",runsEmptyBody:"\u4EFB\u52A1\u8FD0\u884C\u540E\uFF0C\u8FD9\u91CC\u4F1A\u663E\u793A\u72B6\u6001\u3001\u8017\u65F6\u4E0E\u9519\u8BEF\u6761\u6570\uFF1B\u7ED3\u679C\u4E0E\u8FC7\u7A0B\u5728 session \u91CC\u3002",runsEmptyAction:"\u53BB\u6DFB\u52A0\u6A21\u677F",runsLimitHint:"\u4EC5\u663E\u793A\u6700\u8FD1 {n} \u6761\u8FD0\u884C\u8BB0\u5F55\u3002",cancelRunConfirmTitle:"\u53D6\u6D88\u8FD9\u6B21\u8FD0\u884C\uFF1F",cancelRunConfirmBody:"\u53D6\u6D88\u4F1A\u5411\u5F53\u524D\u8FD0\u884C\u53D1\u9001\u505C\u6B62\u4FE1\u53F7\uFF1B\u5DF2\u7ECF\u4EA7\u751F\u7684\u4E2D\u95F4\u7ED3\u679C\u4F1A\u7559\u5728 session \u91CC\u3002",cancelRunConfirm:"\u786E\u8BA4\u53D6\u6D88",duration:"\u8017\u65F6",steps:"\u6B65\u9AA4",tools:"\u5DE5\u5177\u8C03\u7528",errorTitle:"\u9519\u8BEF",errorDetailsLabel:"\u9519\u8BEF\u8BE6\u60C5",showErrorDetails:"\u67E5\u770B\u9519\u8BEF\u8BE6\u60C5",hideErrorDetails:"\u6536\u8D77\u9519\u8BEF\u8BE6\u60C5",triggerManual:"\u624B\u52A8",triggerScheduled:"\u5B9A\u65F6",openSession:"\u6253\u5F00 session",runSummaryFallback:"\u8FD0\u884C\u7ED3\u675F\u4F46\u6CA1\u6709\u6458\u8981\u3002",notificationsEmpty:"\u6CA1\u6709\u901A\u77E5\u3002",markRead:"\u5168\u90E8\u6807\u4E3A\u5DF2\u8BFB",markTaskRead:"\u672C\u4EFB\u52A1\u6807\u4E3A\u5DF2\u8BFB",notificationsTitle:"\u901A\u77E5",notificationsHint:"\u8FD0\u884C\u5931\u8D25\u3001\u8D85\u65F6\u3001\u8C03\u5EA6\u5668\u5F85\u547D\u4E0E\u4EA4\u6613\u65E5\u5386\u95EE\u9898\u4F1A\u51FA\u73B0\u5728\u8FD9\u91CC\u3002",notificationsUnread:"{n} \u6761\u672A\u8BFB",allRead:"\u5168\u90E8\u5DF2\u8BFB",noNotifications:"\u6CA1\u6709\u672A\u8BFB\u6216\u5386\u53F2\u901A\u77E5\u3002",notificationOpenTask:"\u67E5\u770B\u4EFB\u52A1",close:"\u5173\u95ED",confirmDeleteTitle:"\u5220\u9664\u8FD9\u4E2A\u4EFB\u52A1\uFF1F",confirmDeleteBody:"\u4EFB\u52A1\u914D\u7F6E\u3001\u8FD0\u884C\u8BB0\u5F55\u4E0E\u76F8\u5173\u901A\u77E5\u4F1A\u4E00\u8D77\u5220\u9664\uFF0C\u65E0\u6CD5\u6062\u590D\u3002",confirmHibernateTitle:"\u4F11\u7720\u5E76\u6062\u590D\u9ED8\u8BA4\uFF1F",confirmHibernateBody:"\u5F53\u524D\u5BF9\u5185\u7F6E\u6A21\u677F\u7684\u4FEE\u6539\u4F1A\u88AB\u6E05\u7A7A\uFF0C\u4EFB\u52A1\u56DE\u5230\u6A21\u677F\u533A\uFF1B\u5386\u53F2\u8FD0\u884C\u8BB0\u5F55\u4FDD\u7559\u3002",confirmDelete:"\u786E\u8BA4\u5220\u9664",confirmHibernate:"\u786E\u8BA4\u4F11\u7720",actionDone:"\u64CD\u4F5C\u5B8C\u6210",created:"\u4EFB\u52A1\u5DF2\u521B\u5EFA",activated:"\u5DF2\u542F\u7528\u300C{title}\u300D",added:"\u5DF2\u6DFB\u52A0\u300C{title}\u300D",paused:"\u5DF2\u6682\u505C\u300C{title}\u300D",copied:"\u5DF2\u590D\u5236\u4E3A\u300C{title}\u300D",deleted:"\u5DF2\u5220\u9664\u300C{title}\u300D",hibernated:"\u5DF2\u4F11\u7720\u300C{title}\u300D",runSubmitted:"\u5DF2\u63D0\u4EA4\u300C{title}\u300D\u8FD0\u884C",runCanceled:"\u5DF2\u53D6\u6D88\u8FD0\u884C",markReadDone:"\u5DF2\u6807\u4E3A\u5DF2\u8BFB",errorGeneric:"\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002",needConfirm:"\u9700\u8981\u7528\u6237\u786E\u8BA4",schedulerBlocked:"\u8C03\u5EA6\u5668\u672A\u53D6\u5F97\u8FD0\u884C\u6743\uFF0C\u6682\u65F6\u4E0D\u80FD\u624B\u52A8\u8FD0\u884C\u3002",runBlocked:"\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF0C\u7ED3\u675F\u6216\u53D6\u6D88\u540E\u624D\u80FD\u518D\u6B21\u8FD0\u884C\u3002",configWhileRunning:"\u4EFB\u52A1\u6B63\u5728\u8FD0\u884C\uFF1B\u4FEE\u6539\u4F1A\u5728\u4E0B\u4E00\u6B21\u8FD0\u884C\u65F6\u751F\u6548\u3002",configBuiltinHint:"\u8FD9\u662F\u5185\u7F6E\u6A21\u677F\uFF1B\u4FEE\u6539\u53EA\u8986\u76D6\u5F53\u524D profile\uFF0C\u4F11\u7720\u540E\u4F1A\u6062\u590D\u9ED8\u8BA4\u3002",detailRecentRuns:"\u6700\u8FD1 {n} \u6B21\u8FD0\u884C",detailNoRuns:"\u8FD8\u6CA1\u6709\u8FD0\u884C\u8BB0\u5F55\u3002",detailAllRuns:"\u5B8C\u6574\u8BB0\u5F55",detailTaskNotifications:"\u4EFB\u52A1\u901A\u77E5",taskRunsLimit:"\u8FD9\u91CC\u663E\u793A\u5F53\u524D\u4EFB\u52A1\u6700\u8FD1 20 \u6B21\u8FD0\u884C\uFF1B\u5168\u90E8\u8FD0\u884C\u89C1\u300C\u8FD0\u884C\u300D\u9875\u3002",runErrors:"{n} \u6761\u9519\u8BEF",runNoErrors:"\u65E0\u9519\u8BEF",notificationFallbackFailed:"\u8FD0\u884C\u5931\u8D25\uFF1B\u6253\u5F00\u5BF9\u5E94\u4EFB\u52A1\u6216 session \u67E5\u770B\u8BE6\u60C5\u3002",notificationFallbackTimeout:"\u8FD0\u884C\u8D85\u65F6\uFF1B\u6253\u5F00\u5BF9\u5E94\u4EFB\u52A1\u6216 session \u67E5\u770B\u8BE6\u60C5\u3002",notificationFallbackSuccess:"\u8FD0\u884C\u5B8C\u6210\u3002",notificationFallbackStandby:"\u8C03\u5EA6\u5668\u672A\u53D6\u5F97\u8FD0\u884C\u6743\uFF0C\u5B9A\u65F6\u89E6\u53D1\u6682\u505C\u3002",notificationFallbackCalendar:"\u4EA4\u6613\u65E5\u5386\u4E0D\u53EF\u7528\uFF0C\u4EA4\u6613\u65E5\u4EFB\u52A1\u5DF2\u8DF3\u8FC7\u3002",notificationFallbackSkipped:"\u672C\u6B21\u8BA1\u5212\u5DF2\u8DF3\u8FC7\u3002",statusLabel:"\u72B6\u6001",triggerSummary:"\u65E5\u7A0B",lastRun:"\u4E0A\u6B21\u8FD0\u884C",neverRun:"\u5C1A\u672A\u8FD0\u884C",relativeNow:"\u521A\u521A",timezoneHint:"IANA \u65F6\u533A\uFF0C\u4F8B\u5982 Asia/Shanghai\u3002",nextRunUnavailable:"\u4EA4\u6613\u65E5\u5386\u4E0D\u53EF\u7528\uFF0C\u65E0\u6CD5\u8BA1\u7B97\u4E0B\u4E00\u6B21\u8FD0\u884C\u3002",copyHint:"\u590D\u5236\u540E\u4F1A\u751F\u6210\u4E00\u4E2A\u6682\u505C\u72B6\u6001\u7684\u81EA\u5B9A\u4E49\u4EFB\u52A1\u3002",notificationTaskGone:"\u4EFB\u52A1\u5DF2\u4E0D\u5B58\u5728",noSelection:"\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u4E00\u4E2A\u4EFB\u52A1\u3002",details:"\u8BE6\u60C5",actions:"\u64CD\u4F5C",rosterCount:"{n} \u4E2A\u4EFB\u52A1",dayOfMonth:"{n} \u65E5",everyPrefix:"\u6BCF",weeklyPrefix:"\u6BCF\u5468",monthlyPrefix:"\u6BCF\u6708",dailyPrefix:"\u6BCF\u5929",tradingSuffix:"\uFF08\u4EC5\u4EA4\u6613\u65E5\uFF09",sessionMissing:"\u6CA1\u6709\u53EF\u6253\u5F00\u7684 session"};function Qt(){if(typeof document>"u"||document.querySelector(`style[data-${Za}]`))return()=>{};let i=document.createElement("style");return i.setAttribute(`data-${Za}`,"true"),i.textContent=`
|
|
9
|
+
.capital-automation-page, .capital-automation-modal { --ca-card: var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1)); --ca-line: var(--dsw-alias-border-l3, var(--dsw-alias-border-l1)); --ca-line-soft: var(--dsw-alias-border-l2, var(--dsw-alias-border-l1)); --ca-table-line: var(--ca-line); --ca-muted: var(--dsw-alias-label-tertiary); --ca-caption: var(--dsw-alias-label-caption, var(--dsw-alias-label-tertiary)); --ca-hover: var(--dsw-alias-interactive-bg-hover); --ca-field: var(--dsw-alias-bg-module-platform); --ca-business: var(--dsw-alias-state-business-primary, var(--dsw-alias-brand-primary)); --ca-success: var(--dsw-alias-state-success-primary); --ca-error: var(--dsw-alias-state-error-primary); --ca-warn: var(--dsw-alias-state-warn-label); --ca-business-text: var(--ca-business); --ca-success-text: var(--ca-success); --ca-error-text: var(--ca-error); --ca-warn-text: var(--ca-warn); }
|
|
10
|
+
body:not([data-ds-dark-theme]) .capital-automation-page, body:not([data-ds-dark-theme]) .capital-automation-modal { --ca-line: #0000001f; --ca-line-soft: #0000001a; --ca-table-line: #00000026; --ca-muted: #5d626a; --ca-caption: #6a6f77; --ca-hover: #eef1f5; --ca-field: #f7f8fa; --ca-business: #2f63d6; --ca-success: #16a34a; --ca-error: #dc2626; --ca-warn: #d97706; --ca-business-text: #2f63d6; --ca-success-text: #15803d; --ca-error-text: #c81e1e; --ca-warn-text: #b45309; --ca-tag-news: #2f6fd0; --ca-tag-market: #a85a08; --ca-tag-review: #6d4ac4; --ca-tag-research: #0f766e; --ca-tag-custom: #b3246d; }
|
|
11
|
+
.capital-automation-page { display: flex; flex-direction: column; min-height: 0; height: 100%; color: var(--dsw-alias-label-primary); }
|
|
12
|
+
.capital-automation-head { flex: none; padding: 18px 0 0; }
|
|
13
|
+
.capital-automation-headinner { box-sizing: border-box; width: min(1080px, 100%); margin: 0 auto; padding: 0 clamp(20px, 3vw, 36px); }
|
|
14
|
+
.capital-automation-topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px 18px; min-width: 0; }
|
|
15
|
+
.capital-automation-brand { display: flex; align-items: center; gap: 10px; min-width: 0; justify-self: start; }
|
|
16
|
+
.capital-automation-brandmark { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #4f8cff, #7c3aed); box-shadow: inset 0 1px 0 rgba(255,255,255,.24); }
|
|
17
|
+
.capital-automation-brand h1 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: .1px; white-space: nowrap; }
|
|
18
|
+
.capital-automation-tabs { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: .5px solid var(--ca-line-soft); border-radius: 999px; background: color-mix(in srgb, var(--dsw-alias-label-primary) 5%, var(--ca-card)); box-shadow: inset 0 1px 2px color-mix(in srgb, var(--dsw-alias-label-primary) 4%, transparent); justify-self: center; }
|
|
19
|
+
.capital-automation-tab { height: 28px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ca-muted); font: inherit; font-size: 12.5px; font-weight: 500; line-height: 28px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
|
|
20
|
+
.capital-automation-tab:hover:not([aria-selected="true"]) { background: color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent); color: var(--dsw-alias-label-primary); }
|
|
21
|
+
.capital-automation-tab[aria-selected="true"] { background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.18), 0 2px 8px color-mix(in srgb, var(--dsw-alias-label-primary) 12%, transparent); }
|
|
22
|
+
.capital-automation-tab:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: 2px; }
|
|
23
|
+
.capital-automation-topactions { display: flex; align-items: center; gap: 8px; justify-self: end; }
|
|
24
|
+
.capital-automation-btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: .5px solid var(--ca-line-soft); border-radius: 999px; background: transparent; color: var(--dsw-alias-label-secondary); font: inherit; font-size: 12.5px; line-height: 20px; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s, opacity .15s; }
|
|
25
|
+
.capital-automation-btn:hover:not(:disabled) { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
26
|
+
.capital-automation-btn[data-variant="primary"] { border-color: transparent; background: var(--ca-business); color: var(--dsw-alias-bg-base); }
|
|
27
|
+
.capital-automation-btn[data-variant="primary"]:hover:not(:disabled) { background: var(--ca-business); color: var(--dsw-alias-bg-base); filter: brightness(1.08); }
|
|
28
|
+
.capital-automation-templatefoot .capital-automation-btn[data-variant="primary"] { min-width: 54px; padding: 0 12px; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 2px rgba(0,0,0,.16); }
|
|
29
|
+
.capital-automation-templatefoot .capital-automation-btn[data-variant="primary"]:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 2px 8px color-mix(in srgb, var(--ca-business) 32%, transparent); }
|
|
30
|
+
.capital-automation-btn[data-variant="contrast"] { border-color: transparent; background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); }
|
|
31
|
+
.capital-automation-btn[data-variant="contrast"]:hover:not(:disabled) { background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); opacity: .88; }
|
|
32
|
+
.capital-automation-btn[data-variant="ghost"] { border-color: transparent; background: transparent; color: var(--ca-muted); }
|
|
33
|
+
.capital-automation-btn[data-variant="ghost"]:hover:not(:disabled) { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
34
|
+
.capital-automation-btn[data-variant="danger"] { border-color: transparent; background: var(--ca-error); color: var(--dsw-alias-bg-base); }
|
|
35
|
+
.capital-automation-btn[data-variant="danger"]:hover:not(:disabled) { background: var(--ca-error); color: var(--dsw-alias-bg-base); filter: brightness(1.08); }
|
|
36
|
+
.capital-automation-btn[data-size="sm"] { height: 28px; padding: 0 10px; font-size: 12px; }
|
|
37
|
+
.capital-automation-btn[data-size="icon"] { width: 30px; height: 30px; padding: 0; border-radius: 9px; }
|
|
38
|
+
.capital-automation-btn:disabled { opacity: .42; cursor: not-allowed; }
|
|
39
|
+
.capital-automation-iconbtn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ca-muted); cursor: pointer; }
|
|
40
|
+
.capital-automation-iconbtn:hover:not(:disabled) { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
41
|
+
.capital-automation-iconbtn:disabled { opacity: .4; cursor: not-allowed; }
|
|
42
|
+
.capital-automation-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--ca-business); color: var(--dsw-alias-bg-base); font-size: 10px; line-height: 16px; }
|
|
43
|
+
.capital-automation-banner { box-sizing: border-box; width: min(1080px, 100%); margin: 12px auto 0; padding: 10px 13px; border: .5px solid var(--ca-line-soft); border-radius: 12px; background: var(--ca-card); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 19px; }
|
|
44
|
+
.capital-automation-banner[data-tone="warn"] { border-color: color-mix(in srgb, var(--ca-warn) 38%, var(--ca-line-soft)); color: var(--ca-warn-text); }
|
|
45
|
+
.capital-automation-banner[data-tone="error"] { border-color: color-mix(in srgb, var(--ca-error) 38%, var(--ca-line-soft)); color: var(--ca-error-text); }
|
|
46
|
+
.capital-automation-banner .capital-automation-btn { margin-left: 8px; vertical-align: middle; }
|
|
47
|
+
.capital-automation-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
48
|
+
.capital-automation-container { box-sizing: border-box; width: min(1080px, 100%); margin: 0 auto; padding: 20px clamp(20px, 3vw, 36px) 72px; }
|
|
49
|
+
.capital-automation-card { box-sizing: border-box; border: .5px solid var(--ca-line); border-radius: 16px; background: var(--ca-card); }
|
|
50
|
+
.capital-automation-history { padding: 18px 20px 14px; }
|
|
51
|
+
.capital-automation-historyhead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 18px; }
|
|
52
|
+
.capital-automation-historytitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
|
|
53
|
+
.capital-automation-historytitle h2 { margin: 0; font-size: 14px; line-height: 22px; font-weight: 600; }
|
|
54
|
+
.capital-automation-historytitle span { color: var(--ca-muted); font-size: 12px; line-height: 20px; }
|
|
55
|
+
.capital-automation-historystats { display: flex; align-items: center; gap: 14px; color: var(--ca-muted); font-size: 12px; line-height: 20px; }
|
|
56
|
+
.capital-automation-historystat { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
|
|
57
|
+
.capital-automation-historystat[data-tone="ok"] { color: var(--ca-success-text); }
|
|
58
|
+
.capital-automation-historystat[data-tone="error"] { color: var(--ca-error-text); }
|
|
59
|
+
.capital-automation-statusdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
|
|
60
|
+
.capital-automation-historylink { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; color: var(--ca-muted); font: inherit; font-size: 12px; cursor: pointer; }
|
|
61
|
+
.capital-automation-historylink:hover { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
62
|
+
.capital-automation-timeline { display: grid; grid-template-columns: repeat(${ha}, minmax(0, 1fr)); align-items: end; gap: 2px; height: 28px; margin-top: 18px; border-bottom: 1px dashed var(--ca-line); }
|
|
63
|
+
.capital-automation-timeline-day { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; padding-bottom: 3px; }
|
|
64
|
+
.capital-automation-timeline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ca-caption); box-shadow: 0 0 0 2px var(--ca-card); }
|
|
65
|
+
.capital-automation-timeline-dot[data-tone="ok"] { background: var(--ca-success); }
|
|
66
|
+
.capital-automation-timeline-dot[data-tone="error"] { background: var(--ca-error); }
|
|
67
|
+
.capital-automation-timeline-dot[data-tone="active"] { background: var(--ca-business); }
|
|
68
|
+
.capital-automation-timeline-dot[data-tone="warn"] { background: var(--ca-warn); }
|
|
69
|
+
.capital-automation-timelinelabels { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
70
|
+
.capital-automation-historyempty { margin-top: 12px; text-align: center; color: var(--ca-muted); font-size: 12px; line-height: 18px; }
|
|
71
|
+
.capital-automation-section { margin-top: 26px; }
|
|
72
|
+
.capital-automation-sectionhead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
|
|
73
|
+
.capital-automation-sectionhead h2 { margin: 0; font-size: 14px; line-height: 22px; font-weight: 600; }
|
|
74
|
+
.capital-automation-sectionhead > span { color: var(--ca-muted); font-size: 12px; line-height: 18px; }
|
|
75
|
+
.capital-automation-sectiontools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
|
|
76
|
+
.capital-automation-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
|
|
77
|
+
.capital-automation-filter { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ca-muted); font: inherit; font-size: 12px; line-height: 28px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
|
|
78
|
+
.capital-automation-filtercount { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, currentColor 13%, transparent); font-size: 10.5px; line-height: 17px; font-variant-numeric: tabular-nums; }
|
|
79
|
+
.capital-automation-filter[aria-pressed="true"] .capital-automation-filtercount { background: var(--ca-business); color: var(--dsw-alias-bg-base); }
|
|
80
|
+
.capital-automation-filter:hover { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
81
|
+
.capital-automation-filter[aria-pressed="true"] { background: color-mix(in srgb, var(--ca-business) 11%, var(--ca-card)); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--ca-business) 28%, transparent); color: var(--ca-business-text); font-weight: 600; }
|
|
82
|
+
.capital-automation-filter:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: 1px; }
|
|
83
|
+
.capital-automation-search { box-sizing: border-box; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: .5px solid var(--ca-line-soft); border-radius: 999px; background: var(--ca-card); color: var(--ca-muted); }
|
|
84
|
+
.capital-automation-search:focus-within { border-color: var(--ca-business); }
|
|
85
|
+
.capital-automation-search input { width: 128px; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--dsw-alias-label-primary); font: inherit; font-size: 12px; }
|
|
86
|
+
.capital-automation-search input::placeholder { color: var(--ca-caption); }
|
|
87
|
+
.capital-automation-running { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; padding: 12px 14px; border: .5px solid color-mix(in srgb, var(--ca-business) 30%, var(--ca-line)); border-radius: 14px; background: color-mix(in srgb, var(--ca-business) 7%, var(--ca-card)); }
|
|
88
|
+
.capital-automation-runningrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; min-width: 0; }
|
|
89
|
+
.capital-automation-runningactions { display: flex; flex: none; align-items: center; gap: 8px; margin-left: auto; }
|
|
90
|
+
.capital-automation-live { display: inline-flex; align-items: center; gap: 6px; color: var(--ca-business-text); font-size: 12px; }
|
|
91
|
+
.capital-automation-livedot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: capital-automation-pulse 1.6s ease-in-out infinite; }
|
|
92
|
+
@keyframes capital-automation-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 30%, transparent); } 50% { opacity: .55; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 0%, transparent); } }
|
|
93
|
+
@media (prefers-reduced-motion: reduce) { .capital-automation-livedot { animation: none; } .capital-automation-skeleton { animation: none; } }
|
|
94
|
+
.capital-automation-table { overflow: hidden; border: .5px solid var(--ca-table-line); border-radius: 16px; background: var(--ca-card); }
|
|
95
|
+
.capital-automation-thead { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: center; padding-right: 18px; border-bottom: .5px solid var(--ca-table-line); background: color-mix(in srgb, var(--dsw-alias-label-primary) 3.5%, var(--ca-card)); color: var(--ca-muted); font-size: 11.5px; font-weight: 500; letter-spacing: .02em; line-height: 16px; }
|
|
96
|
+
.capital-automation-theadmain { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(110px, .85fr) minmax(128px, .95fr) 88px; gap: 14px; padding: 9px 0 9px 16px; }
|
|
97
|
+
.capital-automation-trow { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: stretch; padding-right: 18px; border-top: .5px solid var(--ca-table-line); transition: background .15s; }
|
|
98
|
+
.capital-automation-trow:first-of-type { border-top: 0; }
|
|
99
|
+
.capital-automation-trow:hover { background: color-mix(in srgb, var(--dsw-alias-label-primary) 5%, var(--ca-card)); }
|
|
100
|
+
.capital-automation-trowmain { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(110px, .85fr) minmax(128px, .95fr) 88px; align-items: center; gap: 14px; min-width: 0; padding: 11px 0 11px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
101
|
+
.capital-automation-trowmain:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: -2px; }
|
|
102
|
+
.capital-automation-trowmenu { display: flex; align-items: center; justify-content: center; }
|
|
103
|
+
.capital-automation-cell { min-width: 0; }
|
|
104
|
+
.capital-automation-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
105
|
+
.capital-automation-glyph { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
|
|
106
|
+
.capital-automation-glyph[data-tone="news"] { background: linear-gradient(135deg, #5b9dff, #2563eb); }
|
|
107
|
+
.capital-automation-glyph[data-tone="market"] { background: linear-gradient(135deg, #ffbd4a, #f97316); }
|
|
108
|
+
.capital-automation-glyph[data-tone="review"] { background: linear-gradient(135deg, #b18cff, #7c3aed); }
|
|
109
|
+
.capital-automation-glyph[data-tone="research"] { background: linear-gradient(135deg, #39d7a8, #0d9488); }
|
|
110
|
+
.capital-automation-glyph[data-tone="custom"] { background: linear-gradient(135deg, #f472b6, #db2777); }
|
|
111
|
+
.capital-automation-identitytext { min-width: 0; }
|
|
112
|
+
.capital-automation-tasktitlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
|
|
113
|
+
.capital-automation-tasktitlerow .capital-automation-tasktags { flex: 0 1 auto; flex-wrap: wrap; max-width: 100%; margin-top: 0; }
|
|
114
|
+
.capital-automation-tasktitle { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--dsw-alias-label-primary); font-size: 13.5px; line-height: 20px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
|
|
115
|
+
.capital-automation-taskdesc { display: block; overflow: hidden; margin-top: 1px; color: var(--ca-muted); font-size: 11.5px; line-height: 17px; text-overflow: ellipsis; white-space: nowrap; }
|
|
116
|
+
.capital-automation-tasktags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; }
|
|
117
|
+
.capital-automation-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 13em; overflow: hidden; padding: 1px 6px; border-radius: 999px; background: var(--dsw-alias-bg-module-platform); color: var(--ca-muted); font-size: 11px; font-weight: 500; line-height: 17px; white-space: nowrap; }
|
|
118
|
+
.capital-automation-tag[data-tone="news"] { color: #6ba6ff; }
|
|
119
|
+
.capital-automation-tag[data-tone="market"] { color: #ffb45c; }
|
|
120
|
+
.capital-automation-tag[data-tone="review"] { color: #b79aff; }
|
|
121
|
+
.capital-automation-tag[data-tone="research"] { color: #56d9b4; }
|
|
122
|
+
.capital-automation-tag[data-tone="custom"] { color: #f79bc3; }
|
|
123
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag { background: color-mix(in srgb, currentColor 9%, var(--ca-card)); }
|
|
124
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag[data-tone="news"] { color: var(--ca-tag-news); }
|
|
125
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag[data-tone="market"] { color: var(--ca-tag-market); }
|
|
126
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag[data-tone="review"] { color: var(--ca-tag-review); }
|
|
127
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag[data-tone="research"] { color: var(--ca-tag-research); }
|
|
128
|
+
body:not([data-ds-dark-theme]) .capital-automation-tag[data-tone="custom"] { color: var(--ca-tag-custom); }
|
|
129
|
+
.capital-automation-schedule { display: block; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
|
|
130
|
+
.capital-automation-schedulesub { display: block; margin-top: 1px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
131
|
+
.capital-automation-nextmain { display: block; color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
|
|
132
|
+
.capital-automation-nextsub { display: block; margin-top: 1px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
133
|
+
.capital-automation-state { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--dsw-alias-bg-module-platform); color: var(--ca-muted); font-size: 11px; line-height: 22px; white-space: nowrap; }
|
|
134
|
+
.capital-automation-state[data-state="active"] { color: var(--ca-success-text); }
|
|
135
|
+
.capital-automation-state[data-state="paused"] { color: var(--ca-warn-text); }
|
|
136
|
+
.capital-automation-state[data-state="running"] { color: var(--ca-business-text); }
|
|
137
|
+
.capital-automation-state[data-state="dormant"] { color: var(--ca-muted); }
|
|
138
|
+
body:not([data-ds-dark-theme]) .capital-automation-state { background: color-mix(in srgb, currentColor 9%, var(--ca-card)); }
|
|
139
|
+
.capital-automation-statedot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
|
|
140
|
+
.capital-automation-state[data-state="running"] .capital-automation-statedot, .capital-automation-runstatus[data-status="running"] .capital-automation-rundot { animation: capital-automation-pulse 1.6s ease-in-out infinite; }
|
|
141
|
+
.capital-automation-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; border: .5px dashed var(--ca-line); border-radius: 16px; color: var(--ca-muted); text-align: center; }
|
|
142
|
+
.capital-automation-emptyicon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border-radius: 12px; background: var(--dsw-alias-bg-module-platform); color: var(--ca-caption); }
|
|
143
|
+
.capital-automation-empty h3 { margin: 0; color: var(--dsw-alias-label-secondary); font-size: 13.5px; font-weight: 500; line-height: 20px; }
|
|
144
|
+
.capital-automation-empty p { max-width: 460px; margin: 0; font-size: 12px; line-height: 18px; }
|
|
145
|
+
.capital-automation-empty .capital-automation-btn { margin-top: 8px; }
|
|
146
|
+
.capital-automation-loading { display: flex; flex-direction: column; pointer-events: none; }
|
|
147
|
+
.capital-automation-skeletonlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
148
|
+
.capital-automation-skeleton { display: block; flex: none; max-width: 100%; border-radius: 6px; background: var(--dsw-alias-bg-skeleton); animation: capital-automation-breathe 1.8s ease-in-out infinite; }
|
|
149
|
+
.capital-automation-skeletontimeline { display: flex; align-items: flex-end; gap: 2px; height: 28px; margin-top: 18px; border-bottom: 1px dashed var(--ca-line); }
|
|
150
|
+
.capital-automation-skeletontimeline > .capital-automation-skeleton { flex: 1 1 0; min-width: 0; }
|
|
151
|
+
.capital-automation-skeletonstack { display: flex; flex: 1 1 auto; flex-direction: column; gap: 6px; min-width: 0; }
|
|
152
|
+
.capital-automation-skeletonrow .capital-automation-trowmain { min-height: 57px; cursor: default; }
|
|
153
|
+
.capital-automation-skeletonrow .capital-automation-cell[data-cell] { display: flex; flex-direction: column; gap: 5px; }
|
|
154
|
+
.capital-automation-skeletonrun .capital-automation-runline { min-height: 20px; }
|
|
155
|
+
.capital-automation-skeletonrun .capital-automation-runmetaline { min-height: 17px; }
|
|
156
|
+
.capital-automation-skeletontemplatemain { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
|
|
157
|
+
@keyframes capital-automation-breathe { 0% { opacity: 1; } 40% { opacity: .55; } 80%, 100% { opacity: 1; } }
|
|
158
|
+
.capital-automation-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
|
|
159
|
+
.capital-automation-template { box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; min-height: 152px; padding: 15px 16px 13px; border: .5px solid var(--ca-line); border-radius: 16px; background: var(--ca-card); transition: border-color .15s, background .15s; }
|
|
160
|
+
.capital-automation-template:hover { border-color: color-mix(in srgb, var(--ca-business) 28%, var(--ca-line)); background: color-mix(in srgb, var(--ca-hover) 55%, var(--ca-card)); }
|
|
161
|
+
.capital-automation-templatemain { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
162
|
+
.capital-automation-templatemain:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: 4px; border-radius: 8px; }
|
|
163
|
+
.capital-automation-templatebody { min-width: 0; }
|
|
164
|
+
.capital-automation-templatetitlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
|
|
165
|
+
.capital-automation-templatetitlerow .capital-automation-tag { flex: none; }
|
|
166
|
+
.capital-automation-templatebody strong { display: block; min-width: 0; color: var(--dsw-alias-label-primary); font-size: 13.5px; line-height: 20px; font-weight: 500; }
|
|
167
|
+
.capital-automation-templatedesc { display: -webkit-box; overflow: hidden; margin-top: 3px; color: var(--ca-muted); font-size: 12px; line-height: 18px; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
168
|
+
.capital-automation-templatefoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
|
|
169
|
+
.capital-automation-templatemeta { display: inline-flex; align-items: center; gap: 4px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
170
|
+
.capital-automation-detailbar { display: flex; align-items: center; min-height: 34px; margin: 0 0 6px; }
|
|
171
|
+
.capital-automation-back { display: inline-flex; align-items: center; gap: 2px; height: 30px; margin-left: -8px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ca-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
|
|
172
|
+
.capital-automation-back:hover { background: var(--ca-hover); color: var(--dsw-alias-label-primary); }
|
|
173
|
+
.capital-automation-hero { display: flex; align-items: flex-start; gap: 14px; padding: 2px 0 18px; border-bottom: .5px solid var(--ca-line); }
|
|
174
|
+
.capital-automation-herobody { flex: 1 1 auto; min-width: 0; }
|
|
175
|
+
.capital-automation-herotitle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
176
|
+
.capital-automation-herotitle h2 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 600; letter-spacing: .1px; overflow-wrap: anywhere; }
|
|
177
|
+
.capital-automation-herodesc { max-width: 760px; margin: 5px 0 0; color: var(--ca-muted); font-size: 12.5px; line-height: 19px; }
|
|
178
|
+
.capital-automation-heroactions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; flex: none; padding-top: 2px; }
|
|
179
|
+
.capital-automation-detailtabs { display: flex; align-items: center; gap: 26px; overflow-x: auto; overflow-y: hidden; border-bottom: .5px solid var(--ca-line); }
|
|
180
|
+
.capital-automation-detailtab { position: relative; flex: none; height: 42px; padding: 0 1px; border: 0; background: transparent; color: var(--ca-muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
|
|
181
|
+
.capital-automation-detailtab:hover { color: var(--dsw-alias-label-primary); }
|
|
182
|
+
.capital-automation-detailtab[aria-selected="true"] { color: var(--ca-business-text); font-weight: 600; }
|
|
183
|
+
.capital-automation-detailtab[aria-selected="true"]:after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--ca-business-text); }
|
|
184
|
+
.capital-automation-detailtab:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: -2px; border-radius: 4px; }
|
|
185
|
+
.capital-automation-detailbody { display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }
|
|
186
|
+
.capital-automation-overview { display: flex; flex-direction: column; gap: 16px; }
|
|
187
|
+
.capital-automation-statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
|
|
188
|
+
.capital-automation-stat { display: flex; flex-direction: column; gap: 4px; min-height: 78px; padding: 13px 14px; border: .5px solid var(--ca-line); border-radius: 14px; background: var(--ca-card); }
|
|
189
|
+
body:not([data-ds-dark-theme]) .capital-automation-card, body:not([data-ds-dark-theme]) .capital-automation-table, body:not([data-ds-dark-theme]) .capital-automation-template, body:not([data-ds-dark-theme]) .capital-automation-stat { box-shadow: 0 1px 2px rgba(15,17,21,.035), 0 10px 28px rgba(15,17,21,.025); }
|
|
190
|
+
.capital-automation-runmeta, .capital-automation-statvalue, .capital-automation-notificationtime { font-variant-numeric: tabular-nums; }
|
|
191
|
+
.capital-automation-statlabel { color: var(--ca-muted); font-size: 11px; line-height: 16px; }
|
|
192
|
+
.capital-automation-statvalue { color: var(--dsw-alias-label-primary); font-size: 15px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
|
|
193
|
+
.capital-automation-statvalue[data-tone="ok"] { color: var(--ca-success-text); }
|
|
194
|
+
.capital-automation-statvalue[data-tone="error"] { color: var(--ca-error-text); }
|
|
195
|
+
.capital-automation-statvalue[data-tone="running"] { color: var(--ca-business-text); }
|
|
196
|
+
.capital-automation-statvalue[data-tone="warn"] { color: var(--ca-warn-text); }
|
|
197
|
+
.capital-automation-statsub { color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
198
|
+
.capital-automation-panel { padding: 16px 18px; }
|
|
199
|
+
.capital-automation-panelhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
|
|
200
|
+
.capital-automation-panelhead h3 { margin: 0; font-size: 13.5px; line-height: 20px; font-weight: 600; }
|
|
201
|
+
.capital-automation-panelhead .capital-automation-btn { margin-left: auto; }
|
|
202
|
+
.capital-automation-panelhead .capital-automation-btn[data-variant="ghost"] { padding-right: 0; }
|
|
203
|
+
.capital-automation-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; }
|
|
204
|
+
.capital-automation-kvitem { min-width: 0; }
|
|
205
|
+
.capital-automation-kvlabel { display: block; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
206
|
+
.capital-automation-kvvalue { display: block; margin-top: 2px; color: var(--dsw-alias-label-secondary); font-size: 12.5px; line-height: 19px; overflow-wrap: anywhere; }
|
|
207
|
+
.capital-automation-policy { color: var(--ca-muted); font-size: 12px; line-height: 19px; }
|
|
208
|
+
.capital-automation-policy p { margin: 0; }
|
|
209
|
+
.capital-automation-policy p + p { margin-top: 5px; }
|
|
210
|
+
.capital-automation-hint { margin: 0; color: var(--ca-muted); font-size: 11.5px; line-height: 18px; }
|
|
211
|
+
.capital-automation-hint[data-tone="error"] { color: var(--ca-error-text); }
|
|
212
|
+
.capital-automation-notice { margin: 0; color: var(--ca-success-text); font-size: 12px; line-height: 18px; }
|
|
213
|
+
.capital-automation-error { margin: 0; color: var(--ca-error-text); font-size: 12px; line-height: 18px; }
|
|
214
|
+
.capital-automation-toast { position: fixed; bottom: 26px; left: 50%; z-index: 1300; max-width: min(520px, calc(100vw - 40px)); transform: translateX(-50%); padding: 8px 15px; border: .5px solid var(--ca-line-soft); border-radius: 999px; background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); box-shadow: 0 8px 26px rgba(0,0,0,.22); font-size: 12px; line-height: 18px; }
|
|
215
|
+
.capital-automation-form { display: flex; flex-direction: column; gap: 16px; }
|
|
216
|
+
.capital-automation-formnote { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; border: .5px solid var(--ca-line); border-radius: 10px; background: var(--ca-field); color: var(--ca-muted); font-size: 11.5px; line-height: 18px; }
|
|
217
|
+
.capital-automation-formnote svg { flex: none; margin-top: 2px; }
|
|
218
|
+
.capital-automation-formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
|
|
219
|
+
.capital-automation-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
|
|
220
|
+
.capital-automation-field > span { color: var(--ca-muted); font-size: 11.5px; line-height: 17px; }
|
|
221
|
+
.capital-automation-field input, .capital-automation-field textarea { box-sizing: border-box; width: 100%; padding: 0 10px; border: .5px solid var(--ca-line-soft); border-radius: 10px; background: var(--ca-field); color: var(--dsw-alias-label-primary); font: inherit; font-size: 12.5px; line-height: 32px; }
|
|
222
|
+
.capital-automation-field input { height: 34px; }
|
|
223
|
+
.capital-automation-field textarea { min-height: 110px; padding: 9px 10px; line-height: 19px; resize: vertical; }
|
|
224
|
+
.capital-automation-field input:hover, .capital-automation-field textarea:hover { border-color: var(--ca-line); }
|
|
225
|
+
.capital-automation-field input:focus-visible, .capital-automation-field textarea:focus-visible { border-color: var(--ca-business); outline: 2px solid color-mix(in srgb, var(--ca-business) 22%, transparent); outline-offset: 0; }
|
|
226
|
+
.capital-automation-field input:disabled, .capital-automation-field textarea:disabled { color: var(--ca-muted); opacity: .8; }
|
|
227
|
+
.capital-automation-select { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; height: 34px; padding: 0 10px 0 12px; border: 0; border-radius: 10px; background: var(--ca-field); color: var(--dsw-alias-label-primary); font: inherit; font-size: 12.5px; line-height: 20px; text-align: left; cursor: pointer; transition: background .15s, opacity .15s; }
|
|
228
|
+
.capital-automation-select:hover:not(:disabled) { background: var(--ca-hover); }
|
|
229
|
+
.capital-automation-select[data-block="true"] { width: 100%; }
|
|
230
|
+
.capital-automation-select[data-size="sm"] { height: 28px; padding: 0 8px 0 9px; border-radius: 8px; font-size: 11.5px; }
|
|
231
|
+
.capital-automation-select:focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: 0; }
|
|
232
|
+
.capital-automation-select:disabled { opacity: .5; cursor: not-allowed; }
|
|
233
|
+
.capital-automation-selectvalue { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
234
|
+
.capital-automation-select > svg { flex: none; color: var(--ca-muted); }
|
|
235
|
+
.capital-automation-formactions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: .5px solid var(--ca-line); }
|
|
236
|
+
.capital-automation-formactions[data-sticky="true"] { position: sticky; bottom: -1px; z-index: 2; margin-top: 2px; padding: 12px 0 4px; background: var(--dsw-alias-bg-base); }
|
|
237
|
+
.capital-automation-formstatus { margin-right: auto; color: var(--ca-caption); font-size: 11.5px; line-height: 18px; }
|
|
238
|
+
.capital-automation-triggerbox { display: flex; flex-direction: column; gap: 12px; padding: 13px 14px; border: .5px solid var(--ca-line); border-radius: 14px; background: var(--ca-field); }
|
|
239
|
+
.capital-automation-triggerrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
240
|
+
.capital-automation-triggerclock { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #5b9dff, #2563eb); color: #fff; flex: none; }
|
|
241
|
+
.capital-automation-triggerrow label, .capital-automation-triggerfield { display: inline-flex; align-items: center; gap: 6px; color: var(--ca-muted); font-size: 12px; }
|
|
242
|
+
.capital-automation-triggerrow input { box-sizing: border-box; height: 32px; padding: 0 9px; border: .5px solid var(--ca-line-soft); border-radius: 9px; background: var(--ca-card); color: var(--dsw-alias-label-primary); font: inherit; font-size: 12px; }
|
|
243
|
+
.capital-automation-triggerrow input[type="time"] { width: 112px; }
|
|
244
|
+
.capital-automation-triggerrow .capital-automation-select { max-width: 190px; height: 32px; background: var(--ca-card); }
|
|
245
|
+
.capital-automation-weekdays { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
246
|
+
.capital-automation-weekday { width: 30px; height: 30px; padding: 0; border: .5px solid var(--ca-line-soft); border-radius: 999px; background: transparent; color: var(--ca-muted); font: inherit; font-size: 11.5px; cursor: pointer; }
|
|
247
|
+
.capital-automation-weekday:hover:not(:disabled) { border-color: var(--ca-line); color: var(--dsw-alias-label-primary); }
|
|
248
|
+
.capital-automation-weekday[aria-pressed="true"] { border-color: transparent; background: var(--dsw-alias-label-primary); color: var(--dsw-alias-bg-base); }
|
|
249
|
+
.capital-automation-weekday:disabled { opacity: .45; cursor: not-allowed; }
|
|
250
|
+
.capital-automation-switch { display: inline-flex; align-items: center; gap: 7px; color: var(--ca-muted); font-size: 12px; }
|
|
251
|
+
.capital-automation-triggersummary { margin: 0; color: var(--ca-caption); font-size: 11.5px; line-height: 18px; }
|
|
252
|
+
.capital-automation-advanced { border-top: .5px solid var(--ca-line); padding-top: 12px; }
|
|
253
|
+
.capital-automation-advanced summary { color: var(--ca-muted); font-size: 12px; line-height: 18px; cursor: pointer; user-select: none; }
|
|
254
|
+
.capital-automation-advanced summary:hover { color: var(--dsw-alias-label-primary); }
|
|
255
|
+
.capital-automation-advancedbody { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
|
|
256
|
+
.capital-automation-switchlist { display: flex; flex-direction: column; }
|
|
257
|
+
.capital-automation-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; padding: 3px 0; border-bottom: .5px solid var(--ca-line); }
|
|
258
|
+
.capital-automation-switchrow:last-child { border-bottom: 0; }
|
|
259
|
+
.capital-automation-switchrow span { color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
|
|
260
|
+
.capital-automation-switchrow small { display: block; margin-top: 1px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
261
|
+
.capital-automation-runs { display: flex; flex-direction: column; }
|
|
262
|
+
.capital-automation-run { padding: 13px 0; border-bottom: .5px solid var(--ca-line); }
|
|
263
|
+
.capital-automation-run:first-child { padding-top: 0; }
|
|
264
|
+
.capital-automation-run:last-child { padding-bottom: 0; border-bottom: 0; }
|
|
265
|
+
.capital-automation-runhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; min-width: 0; }
|
|
266
|
+
.capital-automation-runmain { min-width: 0; }
|
|
267
|
+
.capital-automation-runline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
|
|
268
|
+
.capital-automation-runtitle { color: var(--dsw-alias-label-primary); font-size: 12.5px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
|
|
269
|
+
.capital-automation-runmaintitle { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
|
|
270
|
+
.capital-automation-runmaintitle:hover { color: var(--ca-business-text); }
|
|
271
|
+
.capital-automation-runmetaline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; }
|
|
272
|
+
.capital-automation-runmeta { color: var(--ca-caption); font-size: 11px; line-height: 17px; }
|
|
273
|
+
.capital-automation-runactions { display: flex; align-items: center; gap: 8px; flex: none; }
|
|
274
|
+
.capital-automation-runstatus { display: inline-flex; align-items: center; gap: 5px; color: var(--ca-muted); font-size: 11.5px; font-weight: 500; line-height: 18px; }
|
|
275
|
+
.capital-automation-runstatus[data-status="succeeded"] { color: var(--ca-success-text); }
|
|
276
|
+
.capital-automation-runstatus[data-status="failed"], .capital-automation-runstatus[data-status="timed_out"], .capital-automation-runstatus[data-status="blocked_requires_user"], .capital-automation-runstatus[data-status="unknown_after_restart"] { color: var(--ca-error-text); }
|
|
277
|
+
.capital-automation-runstatus[data-status="queued"], .capital-automation-runstatus[data-status="starting"], .capital-automation-runstatus[data-status="running"] { color: var(--ca-business-text); }
|
|
278
|
+
.capital-automation-runstatus[data-status="skipped_overlap"], .capital-automation-runstatus[data-status="skipped_calendar_unavailable"], .capital-automation-runstatus[data-status="missed"] { color: var(--ca-warn-text); }
|
|
279
|
+
.capital-automation-rundot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
|
|
280
|
+
.capital-automation-runspacer { flex: 1 1 auto; }
|
|
281
|
+
.capital-automation-runerrorbadge { box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border: .5px solid color-mix(in srgb, currentColor 38%, var(--ca-line)); border-radius: 999px; background: color-mix(in srgb, currentColor 8%, var(--ca-card)); color: var(--ca-warn-text); font: inherit; font-size: 11px; font-weight: 500; line-height: 18px; white-space: nowrap; cursor: pointer; }
|
|
282
|
+
.capital-automation-runerrorbadge:hover { background: color-mix(in srgb, currentColor 14%, var(--ca-card)); }
|
|
283
|
+
.capital-automation-runerrorbadge[data-tone="error"] { color: var(--ca-error-text); }
|
|
284
|
+
.capital-automation-runerrorbadge svg:last-child { transition: transform .15s; }
|
|
285
|
+
.capital-automation-runerrorbadge[aria-expanded="true"] svg:last-child { transform: rotate(90deg); }
|
|
286
|
+
.capital-automation-runerrors { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding: 9px 11px; border: .5px solid var(--ca-line); border-radius: 10px; background: var(--ca-field); }
|
|
287
|
+
.capital-automation-runerror { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: start; gap: 8px; color: var(--ca-muted); font-size: 11.5px; line-height: 17px; }
|
|
288
|
+
.capital-automation-runerrordot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--ca-warn); flex: none; }
|
|
289
|
+
.capital-automation-runerror[data-severity="error"] .capital-automation-runerrordot { background: var(--ca-error); }
|
|
290
|
+
.capital-automation-runerrormessage { min-width: 0; overflow-wrap: anywhere; }
|
|
291
|
+
.capital-automation-runerrorcode { max-width: 220px; overflow: hidden; color: var(--ca-caption); font-size: 10.5px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
|
|
292
|
+
.capital-automation-notification { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 11px 0; border: 0; border-bottom: .5px solid var(--ca-line); background: transparent; color: inherit; font: inherit; text-align: left; }
|
|
293
|
+
.capital-automation-notification:last-child { border-bottom: 0; }
|
|
294
|
+
.capital-automation-notification[data-clickable="true"] { cursor: pointer; }
|
|
295
|
+
.capital-automation-notification[data-clickable="true"]:hover { color: var(--dsw-alias-label-primary); }
|
|
296
|
+
.capital-automation-notificationicon { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-top: 1px; border-radius: 9px; background: var(--dsw-alias-bg-module-platform); color: var(--ca-muted); flex: none; }
|
|
297
|
+
.capital-automation-notificationicon[data-tone="error"] { color: var(--ca-error-text); }
|
|
298
|
+
.capital-automation-notificationicon[data-tone="warn"] { color: var(--ca-warn-text); }
|
|
299
|
+
.capital-automation-notificationbody { min-width: 0; }
|
|
300
|
+
.capital-automation-notificationtitle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--dsw-alias-label-primary); font-size: 12.5px; line-height: 19px; font-weight: 500; }
|
|
301
|
+
.capital-automation-notificationmessage { display: -webkit-box; overflow: hidden; margin-top: 2px; color: var(--ca-muted); font-size: 11.5px; line-height: 18px; overflow-wrap: anywhere; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
|
|
302
|
+
.capital-automation-notificationtime { display: block; margin-top: 3px; color: var(--ca-caption); font-size: 11px; line-height: 16px; }
|
|
303
|
+
.capital-automation-modal { width: min(720px, calc(100vw - 32px)); max-width: min(720px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); }
|
|
304
|
+
.capital-automation-modal-content { max-height: calc(100dvh - 128px); overflow: auto; }
|
|
305
|
+
.capital-automation-modal-narrow { width: min(480px, calc(100vw - 32px)); max-width: min(480px, calc(100vw - 32px)); }
|
|
306
|
+
.capital-automation-wizard { display: flex; flex-direction: column; gap: 14px; }
|
|
307
|
+
.capital-automation-modalheadline { display: flex; align-items: center; gap: 10px; }
|
|
308
|
+
.capital-automation-modaltitleinput { flex: 1 1 auto; min-width: 0; height: 42px; padding: 0 12px; border: .5px solid var(--ca-line-soft); border-radius: 12px; background: var(--dsw-alias-bg-module-platform); color: var(--dsw-alias-label-primary); font: inherit; font-size: 15px; font-weight: 500; }
|
|
309
|
+
.capital-automation-modaltitleinput:focus-visible { border-color: var(--ca-business); outline: 2px solid color-mix(in srgb, var(--ca-business) 22%, transparent); outline-offset: 0; }
|
|
310
|
+
.capital-automation-formlabel { display: block; margin-bottom: 6px; color: var(--ca-muted); font-size: 11.5px; line-height: 17px; }
|
|
311
|
+
.capital-automation-promptbox { overflow: hidden; border: .5px solid var(--ca-line); border-radius: 16px; background: var(--dsw-alias-bg-module-platform); }
|
|
312
|
+
.capital-automation-promptbox textarea { box-sizing: border-box; width: 100%; min-height: 120px; max-height: 320px; padding: 13px 14px; border: 0; outline: 0; background: transparent; color: var(--dsw-alias-label-primary); font: inherit; font-size: 13px; line-height: 21px; resize: vertical; }
|
|
313
|
+
.capital-automation-promptbox textarea::placeholder { color: var(--ca-caption); }
|
|
314
|
+
.capital-automation-prompttoolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-top: .5px solid var(--ca-line); }
|
|
315
|
+
.capital-automation-prompttoolbar label, .capital-automation-toolbarfield { display: inline-flex; align-items: center; gap: 5px; color: var(--ca-muted); font-size: 11.5px; }
|
|
316
|
+
.capital-automation-prompttoolbar .capital-automation-select { max-width: 168px; background: var(--ca-card); }
|
|
317
|
+
.capital-automation-prompttoolbar .capital-automation-presetchip { margin-left: auto; }
|
|
318
|
+
.capital-automation-presetchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; background: color-mix(in srgb, var(--ca-business) 12%, var(--ca-card)); color: var(--ca-business-text); font-size: 11px; font-weight: 500; white-space: nowrap; }
|
|
319
|
+
.capital-automation-checklist { display: flex; flex-direction: column; gap: 2px; }
|
|
320
|
+
.capital-automation-technical { margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--ca-line); color: var(--ca-caption); font-size: 11px; line-height: 17px; }
|
|
321
|
+
.capital-automation-technicaltitle { margin: 0 0 7px; color: var(--ca-muted); font-size: 11.5px; line-height: 17px; font-weight: 500; }
|
|
322
|
+
.capital-automation-technical dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; }
|
|
323
|
+
.capital-automation-technical dt { color: var(--ca-caption); }
|
|
324
|
+
.capital-automation-technical dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--ca-muted); }
|
|
325
|
+
.capital-automation-page :focus-visible { outline: 2px solid var(--dsw-focus-ring-color, var(--ca-business)); outline-offset: 2px; }
|
|
326
|
+
.capital-automation-trowmain:focus-visible, .capital-automation-template .capital-automation-btn:focus-visible { outline-offset: 2px; }
|
|
327
|
+
@media (max-width: 1000px) {
|
|
328
|
+
.capital-automation-theadmain, .capital-automation-trowmain { grid-template-columns: minmax(0, 1.7fr) minmax(110px, .9fr) 88px; }
|
|
329
|
+
.capital-automation-theadmain > :nth-child(3), .capital-automation-cell[data-cell="next"] { display: none; }
|
|
330
|
+
.capital-automation-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
331
|
+
}
|
|
332
|
+
@media (max-width: 760px) {
|
|
333
|
+
.capital-automation-head { padding-top: 14px; }
|
|
334
|
+
.capital-automation-topbar { display: flex; flex-wrap: wrap; gap: 10px; }
|
|
335
|
+
.capital-automation-brand { flex: 1 1 auto; }
|
|
336
|
+
.capital-automation-tabs { order: 3; width: 100%; max-width: 320px; margin: 0 auto; justify-content: center; }
|
|
337
|
+
.capital-automation-topactions { margin-left: auto; }
|
|
338
|
+
.capital-automation-theadmain, .capital-automation-trowmain { grid-template-columns: minmax(0, 1fr) 80px; gap: 10px; }
|
|
339
|
+
.capital-automation-theadmain > :nth-child(2), .capital-automation-theadmain > :nth-child(3), .capital-automation-cell[data-cell="schedule"], .capital-automation-cell[data-cell="next"] { display: none; }
|
|
340
|
+
.capital-automation-tasktitlerow .capital-automation-tasktags { gap: 3px; }
|
|
341
|
+
.capital-automation-tasktitlerow .capital-automation-tag { padding: 0 5px; font-size: 10px; line-height: 16px; }
|
|
342
|
+
.capital-automation-hero { flex-wrap: wrap; }
|
|
343
|
+
.capital-automation-heroactions { width: 100%; padding-left: 58px; }
|
|
344
|
+
.capital-automation-runhead { grid-template-columns: minmax(0, 1fr); }
|
|
345
|
+
.capital-automation-runactions { justify-content: flex-start; }
|
|
346
|
+
.capital-automation-templates { grid-template-columns: 1fr; }
|
|
347
|
+
.capital-automation-sectiontools { width: 100%; margin-left: 0; }
|
|
348
|
+
}
|
|
349
|
+
@media (max-width: 520px) {
|
|
350
|
+
.capital-automation-brand h1 { font-size: 16px; }
|
|
351
|
+
.capital-automation-topactions .capital-automation-btn:not([data-variant="contrast"]) { width: auto; min-width: 32px; padding: 0 8px; }
|
|
352
|
+
.capital-automation-topactions .capital-automation-btn[data-variant="contrast"] { width: 32px; padding: 0; }
|
|
353
|
+
.capital-automation-topactions .capital-automation-btn .capital-automation-btnlabel { display: none; }
|
|
354
|
+
.capital-automation-statgrid { grid-template-columns: 1fr; }
|
|
355
|
+
.capital-automation-heroactions { padding-left: 0; }
|
|
356
|
+
.capital-automation-modal-content { max-height: calc(100dvh - 112px); }
|
|
357
|
+
}
|
|
358
|
+
`,document.head.appendChild(i),()=>i.remove()}function Xt(){async function i(t,n={}){let o=typeof AbortController=="function"?new AbortController:void 0,l=setTimeout(()=>o?.abort(),2e4),s,u;try{s=await fetch(`${Vt}${t}`,{method:n.method??"GET",credentials:"same-origin",headers:n.body===void 0?{}:{"content-type":"application/json"},body:n.body===void 0?void 0:JSON.stringify(n.body),...o===void 0?{}:{signal:o.signal}});try{u=await s.json()}catch{throw new Error(e.errorGeneric)}}finally{clearTimeout(l)}if(!s.ok||u?.ok===!1){let m=new Error(u?.message??e.errorGeneric);throw m.code=u?.code,m}return u}return{meta:()=>i("/meta"),tasks:()=>i("/tasks"),detail:t=>i(`/tasks/${encodeURIComponent(t)}`),create:t=>i("/tasks",{method:"POST",body:t}),patch:(t,n)=>i(`/tasks/${encodeURIComponent(t)}`,{method:"PATCH",body:n}),remove:t=>i(`/tasks/${encodeURIComponent(t)}`,{method:"DELETE"}),action:(t,n)=>i(`/tasks/${encodeURIComponent(t)}/${n}`,{method:"POST"}),run:t=>i(`/tasks/${encodeURIComponent(t)}/run`,{method:"POST"}),cancel:t=>i(`/runs/${encodeURIComponent(t)}/cancel`,{method:"POST"}),runs:(t="")=>i(`/runs${t}`),notifications:()=>i("/notifications"),markRead:t=>i("/notifications/read",{method:"POST",body:t})}}function ot(i){return e.status[i]??i}function lt(i){return e.state[i]??i}function rt(i){return i?.state==="active"?e.pause:i?.state==="dormant"?e.add:e.activate}function st(i){return i?.state==="active"?qt:i?.state==="dormant"?$a:Oa}function ct(i){return(i?.state==="dormant"?e.added:e.activated).replace("{title}",i?.title??"")}function la(i){return e.category[i]??i}function ut(i,t=12){let n=String(i??""),o=Array.from(n);return o.length>t?`${o.slice(0,t).join("")}\u2026`:n}function ae(i){return e.mode[i]??i}function te(i){if(i==null||i.available===!1)return e.calendarSourceNone;let t=i.source==="szse"?e.calendarSourceSzse:i.source==="bundled"?e.calendarSourceBundled:e.calendarSourceNone,n=i.through??e.calendarUnknown;return`${t} \xB7 ${e.calendarThrough.replace("{date}",n)}`}function $(i){return i!=null&&Kt.includes(i.status)}function aa(i){return Yt.includes(i)}function Ma(i){return i?.origin==="custom"?"custom":i?.category??"news"}function ee(i){return i?.origin==="custom"?tt:i?.sourceBuiltinId==="morning-brief"?Ht:i?.category==="market"?_t:i?.category==="review"?Pt:i?.category==="research"?at:Bt}function sa(i){let{task:t,size:n=34,large:o=!1}=i,l=ee(t),s=o?44:n;return a("span",{className:"capital-automation-glyph","data-tone":Ma(t),style:{width:s,height:s,borderRadius:o?13:10}},a(l,{size:o?22:17}))}function pt(i){let{state:t,running:n}=i,o=n?e.status.running:lt(t);return a("span",{className:"capital-automation-state","data-state":n?"running":t},a("span",{className:"capital-automation-statedot"}),o)}function ie(i,t={}){if(typeof i!="string"||i.length===0)return e.never;let n=new Date(i);return Number.isNaN(n.getTime())?i:new Intl.DateTimeFormat("zh-CN",{year:t.short===!0?void 0:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23",...typeof t.timeZone=="string"&&t.timeZone.length>0?{timeZone:t.timeZone}:{}}).format(n)}function La(i,t){return ie(i,{short:!0,timeZone:t})}function dt(i){if(typeof i!="number"||i<0)return e.never;let t=Math.round(i/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function mt(i){if(typeof i!="string"||i.length===0)return"";let t=Date.parse(i);if(Number.isNaN(t))return"";let n=t-Date.now(),o=Math.abs(n);if(o<45e3)return e.relativeNow;let l=[[864e5,"day"],[36e5,"hour"],[6e4,"minute"]],s=new Intl.RelativeTimeFormat("zh-CN",{numeric:"auto"});for(let[u,m]of l)if(o>=u||m==="minute")return s.format(Math.round(n/u),m);return""}function Na(i){return new Intl.DateTimeFormat("zh-CN",{month:"short",day:"numeric"}).format(i)}function _a(i){if(i==null)return e.never;let t=i.tradingDaysOnly===!0?e.tradingSuffix:"";if(i.cadence==="weekly"){let n=(i.weekdays??[]).slice().sort((o,l)=>o-l).map(o=>Ea.find(l=>l.value===o)?.label??"").join("\u3001");return`${e.weeklyPrefix}${n} ${i.time}${t}`}return i.cadence==="monthly"?`${e.monthlyPrefix} ${i.dayOfMonth??1} \u65E5 ${i.time}${t}`:`${e.dailyPrefix} ${i.time}${t}`}function ne(i){return i?.cadence==="weekly"?`\u6BCF\u5468 ${(i.weekdays??[]).slice().sort((n,o)=>n-o).map(n=>Ea.find(o=>o.value===n)?.label??"").join("\u3001")}`:i?.cadence==="monthly"?`\u6BCF\u6708 ${i.dayOfMonth??1} \u65E5`:"\u6BCF\u5929"}function gt(i){if(i?.state==="dormant")return{value:e.nextRunDormant,sub:e.notScheduled};if(i?.state==="paused")return{value:e.nextRunPaused,sub:e.notScheduled};let t=i?.nextRunLocal??(i?.nextRunUnavailable?e.calendarUnavailable:e.never),n=i?.nextRunAt?mt(i.nextRunAt):i?.nextRunUnavailable?e.nextRunUnavailable:e.never;return{value:t,sub:n}}function oe(i,t){if(i==null)return{value:e.neverRun,sub:e.lastRunEmpty};let n=$(i),o=[La(i.queuedAt,t)];!n&&typeof i.durationMs=="number"&&o.push(dt(i.durationMs));let l=Array.isArray(i.errors)?i.errors.length:0;l>0&&o.push(e.runErrors.replace("{n}",String(l)));let s;return i.status==="succeeded"?s="ok":aa(i.status)?s="error":n?s="running":Wt.includes(i.status)&&(s="warn"),{value:ot(i.status),sub:o.filter(Boolean).join(" \xB7 "),tone:s}}function Ba(i,t){let n=[{id:"",title:e.workspaceDefault}],o=Array.isArray(i?.workspaces)?i.workspaces:[];for(let l of o)typeof l?.id!="string"||l.id.length===0||n.push({id:l.id,title:l.default===!0?`${l.title}\uFF08\u9ED8\u8BA4\uFF09`:l.title});return typeof t=="string"&&t.length>0&&!n.some(l=>l.id===t)&&n.push({id:t,title:e.workspaceMissing}),n}function le(i,t){return typeof t!="string"||t.length===0?e.workspaceDefault:Ba(i,t).find(n=>n.id===t)?.title??e.workspaceMissing}function ra(i){let t={kind:"schedule",cadence:i?.cadence??"daily",time:i?.time??"09:00",timezone:i?.timezone??"Asia/Shanghai",tradingDaysOnly:i?.tradingDaysOnly===!0};return t.cadence==="weekly"&&(t.weekdays=(i?.weekdays??[1,3,5]).slice().sort((n,o)=>n-o)),t.cadence==="monthly"&&(t.dayOfMonth=i?.dayOfMonth??1),t}function re(i,t){let n=ra({...t,cadence:i});return i==="weekly"&&(n.weekdays??[]).length===0&&(n.weekdays=[1,3,5]),n}function Qa(){return{title:"\u6211\u7684\u6295\u7814\u4EFB\u52A1",description:"",instruction:"",category:"research",trigger:{kind:"schedule",cadence:"daily",time:"09:00",timezone:"Asia/Shanghai",tradingDaysOnly:!0},mode:"research",workspaceId:"",limits:{...Zt},notifications:{inApp:!0,onFailure:!0,onSuccess:!1}}}function xa(i){return{title:String(i.title??"").trim(),description:i.description??"",instruction:i.instruction??"",category:i.category,trigger:ra(i.trigger),mode:i.mode,workspaceId:i.workspaceId??"",limits:i.limits,notifications:i.notifications}}function se(i,t){return JSON.stringify(xa(i))===JSON.stringify(xa(t))}function ce(i){let t=new Date;t.setHours(0,0,0,0),t.setDate(t.getDate()-(ha-1));let n=[],o=new Map;for(let m=0;m<ha;m+=1){let r=new Date(t);r.setDate(t.getDate()+m);let c=`${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`,f={date:r,key:c,runs:[]};n.push(f),o.set(c,f)}let l=0,s=0,u=0;for(let m of i){let r=new Date(m.queuedAt);if(Number.isNaN(r.getTime())||r<t)continue;m.status==="succeeded"&&(l+=1),aa(m.status)&&(s+=1),u+=1;let c=`${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`,f=o.get(c);f!==void 0&&f.runs.push(m)}return{days:n,success:l,failure:s,total:u}}function ue(i){return i.runs.some(t=>$(t))?"active":i.runs.some(t=>aa(t.status))?"error":i.runs.some(t=>t.status==="succeeded")?"ok":i.runs.length>0?"warn":null}function Ta(i){return i==="run_failed"||i==="run_timeout"?"error":i==="scheduler_standby"||i==="calendar_unavailable"?"warn":"neutral"}function pe(i){return typeof i.message=="string"&&i.message.length>0?i.message:i.kind==="run_failed"?e.notificationFallbackFailed:i.kind==="run_timeout"?e.notificationFallbackTimeout:i.kind==="run_succeeded"?e.notificationFallbackSuccess:i.kind==="scheduler_standby"?e.notificationFallbackStandby:i.kind==="calendar_unavailable"?e.notificationFallbackCalendar:i.kind==="skipped"?e.notificationFallbackSkipped:""}function de(i,t){return!se(i,t)}function ft(i){if(String(i.title??"").trim().length===0||String(i.instruction??"").trim().length===0)return e.required;if(!/^([01]\d|2[0-3]):[0-5]\d$/.test(i.trigger?.time??""))return e.invalidTime;if(String(i.trigger?.timezone??"").trim().length===0)return e.invalidTimezone;try{new Intl.DateTimeFormat("zh-CN",{timeZone:i.trigger.timezone})}catch{return e.invalidTimezoneValue}if(i.trigger?.cadence==="weekly"&&(i.trigger.weekdays??[]).length===0)return e.weekdayRequired;let t=i.limits??{};return[t.runTimeoutMinutes,t.idleTimeoutMinutes,t.maxSteps,t.maxToolCalls].every(n=>Number.isFinite(n))?"":e.invalidLimits}function j(i,t,n){let o=i?.execution?.limits?.[t];return Array.isArray(o)&&o.length===2?o:n}function bt(i){let{runs:t,onViewAll:n,showLink:o=!0}=i,{days:l,success:s,failure:u,total:m}=ce(t);return a("section",{className:"capital-automation-card capital-automation-history","aria-label":e.runHistory},a("div",{className:"capital-automation-historyhead"},a("div",{className:"capital-automation-historytitle"},a("h2",null,e.runHistory),a("span",null,e.last30Days)),a("div",{className:"capital-automation-historystats"},a("span",{className:"capital-automation-historystat","data-tone":"ok"},a("span",{className:"capital-automation-statusdot"}),e.successCount.replace("{n}",String(s))),a("span",{className:"capital-automation-historystat","data-tone":"error"},a("span",{className:"capital-automation-statusdot"}),e.failureCount.replace("{n}",String(u))),o&&n!==void 0?a("button",{type:"button",className:"capital-automation-historylink",onClick:n},e.runCount.replace("{n}",String(m)),a(Aa,{size:13})):a("span",{className:"capital-automation-historystat"},e.runCount.replace("{n}",String(m))))),a("div",{className:"capital-automation-timeline","aria-hidden":"true"},l.map(r=>{let c=ue(r);return a("div",{key:r.key,className:"capital-automation-timeline-day",title:`${Na(r.date)}\uFF1A${r.runs.length} \u6B21\u8FD0\u884C`},c===null?null:a("span",{className:"capital-automation-timeline-dot","data-tone":c}))})),a("div",{className:"capital-automation-timelinelabels"},a("span",null,Na(l[0].date)),a("span",null,Na(l[l.length-1].date))),m===0?a("p",{className:"capital-automation-historyempty"},e.historyEmpty):null)}function me(i){let{status:t}=i;return a("span",{className:"capital-automation-runstatus","data-status":t},a("span",{className:"capital-automation-rundot"}),ot(t))}function ge(i){let{run:t,task:n,onCancel:o,onOpenSession:l,onOpenTask:s,busy:u}=i,m=$(t),r=Array.isArray(t.errors)?t.errors.length:0,[c,f]=C(!1),T=`capital-automation-run-errors-${t.id}`,x=r>0?a("button",{type:"button",className:"capital-automation-runerrorbadge","data-tone":aa(t.status)?"error":"warn","aria-expanded":c?"true":"false","aria-controls":T,"aria-label":`${e.runErrors.replace("{n}",String(r))}\uFF0C${c?e.hideErrorDetails:e.showErrorDetails}`,title:c?e.hideErrorDetails:e.showErrorDetails,onClick:()=>f(h=>!h)},a(et,{size:12}),e.runErrors.replace("{n}",String(r)),a(Aa,{size:12})):null;return a("div",{className:"capital-automation-run"},a("div",{className:"capital-automation-runhead"},a("div",{className:"capital-automation-runmain"},a("div",{className:"capital-automation-runline"},n!==void 0&&s!==void 0?a("button",{type:"button",className:"capital-automation-runtitle capital-automation-runmaintitle",onClick:()=>s(n.id)},n.title):a("span",{className:"capital-automation-runtitle"},t.taskTitle),a(me,{status:t.status})),a("div",{className:"capital-automation-runmetaline"},a("span",{className:"capital-automation-runmeta"},`${La(t.queuedAt,n?.trigger?.timezone)} \xB7 ${t.trigger==="manual"?e.triggerManual:e.triggerScheduled}`),typeof t.durationMs=="number"?a("span",{className:"capital-automation-runmeta"},`${e.duration} ${dt(t.durationMs)}`):null,a("span",{className:"capital-automation-runmeta"},`${e.steps} ${t.steps} \xB7 ${e.tools} ${t.toolCalls}`),x)),a("div",{className:"capital-automation-runactions"},m&&typeof o=="function"?a("button",{type:"button",className:"capital-automation-btn","data-size":"sm","data-variant":"danger",disabled:u,onClick:()=>o(t)},e.cancelRun):t.sessionId&&l?a("button",{type:"button",className:"capital-automation-btn","data-size":"sm","data-variant":"primary",onClick:()=>l(t.sessionId)},a(jt,{size:13}),e.openSession):null)),c&&r>0?a("div",{id:T,className:"capital-automation-runerrors",role:"region","aria-label":e.errorDetailsLabel},t.errors.map((h,w)=>a("div",{key:`${t.id}-error-${w}`,className:"capital-automation-runerror","data-severity":h.severity},a("span",{className:"capital-automation-runerrordot"}),a("span",{className:"capital-automation-runerrormessage"},h.message),h.code?a("code",{className:"capital-automation-runerrorcode",title:h.code},h.code):null))):null)}function Ha(i){let{runs:t,tasks:n,onCancel:o,onOpenSession:l,onOpenTask:s,busy:u,compact:m}=i,r=new Map(n.map(c=>[c.id,c]));return t.length===0?m?a("p",{className:"capital-automation-hint"},e.detailNoRuns):a("div",{className:"capital-automation-empty"},a("span",{className:"capital-automation-emptyicon"},a(Ia,{size:19})),a("h3",null,e.detailNoRuns),a("p",null,e.runsEmptyBody)):a("div",{className:"capital-automation-runs"},t.map(c=>a(ge,{key:c.id,run:c,task:r.get(c.taskId),onCancel:o,onOpenSession:l,onOpenTask:s,busy:u})))}function fe(i){let{unread:t,onClick:n}=i;return a("button",{type:"button",className:"capital-automation-btn","data-variant":"ghost",onClick:n,title:e.notificationsTitle,"aria-label":e.notificationsTitle},a(va,{size:14}),a("span",{className:"capital-automation-btnlabel"},e.notifications),t>0?a("span",{className:"capital-automation-count"},String(t>99?"99+":t)):null)}function be(i){let{tab:t,onTab:n,onNewTask:o,unread:l,onOpenInbox:s}=i;return a("header",{className:"capital-automation-head"},a("div",{className:"capital-automation-headinner"},a("div",{className:"capital-automation-topbar"},a("div",{className:"capital-automation-brand"},a("span",{className:"capital-automation-brandmark","aria-hidden":"true"},a(Fa,{size:16})),a("h1",null,e.title)),a("div",{className:"capital-automation-tabs",role:"tablist","aria-label":e.title},["tasks","runs"].map(u=>a("button",{key:u,type:"button",role:"tab",className:"capital-automation-tab","aria-selected":t===u?"true":"false",onClick:()=>n(u)},e.tabs[u]))),a("div",{className:"capital-automation-topactions"},a(fe,{unread:l,onClick:s}),a("button",{type:"button",className:"capital-automation-btn","data-variant":"contrast",onClick:o,title:e.newTask,"aria-label":e.newTask},a($a,{size:14}),a("span",{className:"capital-automation-btnlabel"},e.newTask))))))}function he(i){let{meta:t,loadError:n,onRetry:o}=i,l=[];t?.storage?.state==="unavailable"&&l.push(a("div",{key:"storage",className:"capital-automation-banner","data-tone":"error",role:"alert"},`${e.storageBanner}${t.storage.error?`\uFF1A${t.storage.error}`:""}`));let s=t?.scheduler?.state;t!=null&&t.storage?.state!=="unavailable"&&(s==="standby"||s==="stopped")&&l.push(a("div",{key:"standby",className:"capital-automation-banner","data-tone":"warn",role:"status"},e.standbyBanner));let u=t!=null&&t.calendar?.available===!1;t!=null&&t.storage?.state!=="unavailable"&&u&&l.push(a("div",{key:"calendar",className:"capital-automation-banner","data-tone":"warn",role:"status"},e.calendarBanner));let m=t?.calendar?.coverageDays;return t!=null&&t.storage?.state!=="unavailable"&&!u&&typeof m=="number"&&m>=0&&m<30&&l.push(a("div",{key:"calendar-coverage",className:"capital-automation-banner","data-tone":"warn",role:"status"},e.calendarCoverageBanner.replace("{through}",t.calendar.through??e.calendarUnknown))),n.length>0&&l.push(a("div",{key:"load",className:"capital-automation-banner","data-tone":"error",role:"alert"},n,a("button",{type:"button",className:"capital-automation-btn","data-size":"sm",onClick:o},e.loadRetry))),l.length===0?null:a("div",{className:"capital-automation-headinner",style:{paddingBottom:0}},l)}function ht(i){let{active:t,count:n,label:o,onClick:l}=i;return a("button",{type:"button",className:"capital-automation-filter","aria-pressed":t?"true":"false",onClick:l},a("span",{className:"capital-automation-filterlabel"},o),n>0?a("span",{className:"capital-automation-filtercount"},String(n)):null)}function xe(i){let{task:t}=i,n=[[la(t.category),Ma(t)]];return t.origin==="builtin"&&n.push([e.origin.builtin,void 0]),t.origin==="custom"&&n.push([e.origin.custom,void 0]),a("span",{className:"capital-automation-tasktags"},n.map(([o,l])=>a("span",{key:o,className:"capital-automation-tag","data-tone":l,title:o},ut(o))))}function xt(i){let{task:t,open:n,onToggle:o,onClose:l,onEdit:s,onAction:u,onRequestConfirm:m,canRun:r,running:c,busy:f,disabled:T,align:x="end"}=i,h=t.state==="active"?"pause":"activate",w=f||T===!0,S=[{id:"edit",label:e.edit,icon:a(Et,{size:14}),disabled:f},{id:h,label:rt(t),icon:a(st(t),{size:14}),disabled:w},{id:"run",label:e.runNow,icon:a(Oa,{size:14}),disabled:w||!r||c},...t.origin==="builtin"?[{id:"copy",label:e.copy,icon:a(Dt,{size:14}),disabled:w}]:[]],R=[];return t.origin==="builtin"&&t.state!=="dormant"&&R.push(a(Ya,{key:"hibernate",separatorBefore:!0,icon:a(Ut,{size:14}),disabled:w||c,onSelect:()=>{l(),m("hibernate",t)}},e.hibernate)),t.origin==="custom"&&R.push(a(Ya,{key:"remove",danger:!0,separatorBefore:!0,icon:a(Gt,{size:14}),disabled:w||c,onSelect:()=>{l(),m("delete",t)}},e.remove)),a(it,{open:n,anchor:a("button",{type:"button",className:"capital-automation-iconbtn",disabled:f,title:e.more,"aria-label":`${e.more}\uFF1A${t.title}`,"aria-haspopup":"menu","aria-expanded":n?"true":"false",onClick:o},a(Mt,{size:16})),items:S,children:R,onSelect:b=>{if(l(),b==="edit"){s(t.id);return}u(t,b)},onClose:l,align:x,portal:!0})}function ve(i){let{task:t,onOpen:n,menuOpen:o,onMenuToggle:l,onMenuClose:s,onEdit:u,onAction:m,onRequestConfirm:r,canRun:c,busy:f,mutationsDisabled:T}=i,x=t.lastRun,h=$(x),w=gt(t);return a("div",{className:"capital-automation-trow"},a("button",{type:"button",className:"capital-automation-trowmain",onClick:()=>n(t.id)},a("span",{className:"capital-automation-cell capital-automation-identity"},a(sa,{task:t}),a("span",{className:"capital-automation-identitytext"},a("span",{className:"capital-automation-tasktitlerow"},a("span",{className:"capital-automation-tasktitle"},t.title),a(xe,{task:t}),(t.unread??0)>0?a("span",{className:"capital-automation-count",title:e.unread},String(t.unread)):null),a("span",{className:"capital-automation-taskdesc"},t.description||e.subtitle))),a("span",{className:"capital-automation-cell","data-cell":"schedule"},a("span",{className:"capital-automation-schedule"},_a(t.trigger)),a("span",{className:"capital-automation-schedulesub"},t.trigger?.timezone??"")),a("span",{className:"capital-automation-cell","data-cell":"next"},a("span",{className:"capital-automation-nextmain"},w.value),a("span",{className:"capital-automation-nextsub"},w.sub)),a("span",{className:"capital-automation-cell"},a(pt,{state:t.state,running:h}))),a("div",{className:"capital-automation-trowmenu"},a(xt,{task:t,open:o,onToggle:l,onClose:s,onEdit:u,onAction:m,onRequestConfirm:r,canRun:c,running:h,busy:f,disabled:T})))}function ye(i){let{tasks:t,onOpen:n,onAction:o,onRequestConfirm:l,onEdit:s,schedulerActive:u,storageReady:m,busyTaskId:r}=i,[c,f]=C(null),T=m&&u;return a("div",{className:"capital-automation-table","aria-label":e.taskSection},a("div",{className:"capital-automation-thead"},a("div",{className:"capital-automation-theadmain"},a("span",null,e.taskSection),a("span",null,e.triggerSummary),a("span",null,e.nextRun),a("span",null,e.stateLabel)),a("span",null)),t.map(x=>a(ve,{key:x.id,task:x,onOpen:n,menuOpen:c===x.id,onMenuToggle:()=>f(h=>h===x.id?null:x.id),onMenuClose:()=>f(null),onEdit:s,onAction:o,onRequestConfirm:l,canRun:T,busy:r===x.id,mutationsDisabled:!m})))}function we(i){let{task:t,onOpen:n,onEnable:o,busy:l,disabled:s}=i;return a("article",{className:"capital-automation-template"},a("button",{type:"button",className:"capital-automation-templatemain",onClick:()=>n(t.id)},a(sa,{task:t,size:38}),a("span",{className:"capital-automation-templatebody"},a("span",{className:"capital-automation-templatetitlerow"},a("strong",null,t.title),a("span",{className:"capital-automation-tag","data-tone":Ma(t),title:la(t.category)},ut(la(t.category)))),a("span",{className:"capital-automation-templatedesc"},t.description||e.subtitle))),a("div",{className:"capital-automation-templatefoot"},a("span",{className:"capital-automation-templatemeta"},a(Ia,{size:12}),`${e.templateMeta} \xB7 ${_a(t.trigger)}`),a("button",{type:"button",className:"capital-automation-btn","data-size":"sm","data-variant":"primary",onClick:()=>o(t),disabled:l||s},a($a,{size:12}),l?e.templateAdding:e.templateAdd)))}function za(i){let{title:t,body:n,action:o,actionLabel:l,icon:s}=i;return a("div",{className:"capital-automation-empty"},a("span",{className:"capital-automation-emptyicon"},a(s??Fa,{size:19})),a("h3",null,t),a("p",null,n),o&&l?a("button",{type:"button",className:"capital-automation-btn",onClick:o},l):null)}function k(i){let{width:t="100%",height:n=10,radius:o=6}=i;return a("span",{className:"capital-automation-skeleton",style:{width:t,height:n,borderRadius:o},"aria-hidden":"true"})}function vt(){return a("section",{className:"capital-automation-card capital-automation-history","aria-hidden":"true"},a("div",{className:"capital-automation-historyhead"},a("div",{className:"capital-automation-historytitle"},a(k,{width:92,height:14}),a(k,{width:52,height:11})),a("div",{className:"capital-automation-historystats"},a(k,{width:64,height:12}),a(k,{width:64,height:12}),a(k,{width:56,height:12}))),a("div",{className:"capital-automation-skeletontimeline"},Array.from({length:ha},(i,t)=>a(k,{key:t,height:6+t*11%22,radius:2}))),a("div",{className:"capital-automation-timelinelabels"},a(k,{width:34,height:9}),a(k,{width:34,height:9})))}function Sa(i){let{trailing:t=[210,132]}=i;return a("div",{className:"capital-automation-sectionhead"},a(k,{width:78,height:14}),a(k,{width:210,height:11}),t.length===0?null:a("div",{className:"capital-automation-sectiontools"},t.map((n,o)=>a(k,{key:o,width:n,height:o===0?28:30,radius:999}))))}function ke(){return a("div",{className:"capital-automation-trow capital-automation-skeletonrow","aria-hidden":"true"},a("div",{className:"capital-automation-trowmain"},a("span",{className:"capital-automation-cell capital-automation-identity"},a(k,{width:34,height:34,radius:10}),a("span",{className:"capital-automation-skeletonstack"},a(k,{width:"52%",height:12}),a(k,{width:"82%",height:9}),a(k,{width:92,height:16,radius:999}))),a("span",{className:"capital-automation-cell","data-cell":"schedule"},a(k,{width:"64%",height:10}),a(k,{width:"42%",height:8})),a("span",{className:"capital-automation-cell","data-cell":"next"},a(k,{width:"58%",height:10}),a(k,{width:"36%",height:8})),a("span",{className:"capital-automation-cell"},a(k,{width:52,height:22,radius:999}))),a("div",{className:"capital-automation-trowmenu"},a(k,{width:18,height:18,radius:6})))}function Ne(i){let{rows:t=4}=i;return a("div",{className:"capital-automation-table","aria-hidden":"true"},a("div",{className:"capital-automation-thead"},a("div",{className:"capital-automation-theadmain"},a(k,{width:"52%",height:9}),a(k,{width:"58%",height:9}),a(k,{width:"56%",height:9}),a(k,{width:44,height:9})),a("span",null)),Array.from({length:t},(n,o)=>a(ke,{key:o})))}function Te(){return a("div",{className:"capital-automation-template capital-automation-skeletontemplate","aria-hidden":"true"},a("div",{className:"capital-automation-skeletontemplatemain"},a(k,{width:38,height:38,radius:11}),a("div",{className:"capital-automation-skeletonstack"},a(k,{width:"58%",height:11}),a(k,{width:"100%",height:9}),a(k,{width:"76%",height:9}))),a("div",{className:"capital-automation-templatefoot"},a(k,{width:118,height:11}),a(k,{width:64,height:28,radius:999})))}function Ce(){return a("div",{className:"capital-automation-run capital-automation-skeletonrun","aria-hidden":"true"},a("div",{className:"capital-automation-runhead"},a("div",{className:"capital-automation-runmain"},a("div",{className:"capital-automation-runline"},a(k,{width:168,height:11}),a(k,{width:54,height:10,radius:999})),a("div",{className:"capital-automation-runmetaline"},a(k,{width:86,height:9}),a(k,{width:58,height:9}),a(k,{width:104,height:9}))),a("div",{className:"capital-automation-runactions"},a(k,{width:64,height:26,radius:999}))))}function yt(i){let{children:t}=i;return a("div",{className:"capital-automation-loading","aria-busy":"true"},a("span",{className:"capital-automation-skeletonlabel",role:"status","aria-live":"polite"},e.loading),t)}function Re(){return a(yt,null,a(vt),a("section",{className:"capital-automation-section"},a(Sa),a(Ne,{rows:4})),a("section",{className:"capital-automation-section"},a(Sa,{trailing:[64]}),a("div",{className:"capital-automation-templates"},[0,1,2].map(i=>a(Te,{key:i})))))}function ze(){return a(yt,null,a(vt),a("section",{className:"capital-automation-section"},a(Sa,{trailing:[260]}),a("section",{className:"capital-automation-card capital-automation-panel"},a("div",{className:"capital-automation-runs"},[0,1,2,3].map(i=>a(Ce,{key:i}))))))}function Se(i){let{tasks:t,templates:n,runs:o,onOpenTask:l,onNewTask:s,onEnableTemplate:u,onAction:m,onRequestConfirm:r,onEdit:c,onGoRuns:f,onRequestCancelRun:T,schedulerActive:x,storageReady:h,busyTaskId:w}=i,[S,R]=C("all"),[b,p]=C(""),N=t.filter(g=>$(g.lastRun)),O=n.filter(g=>!$(g.lastRun)),A=t.filter(g=>!$(g.lastRun)&&!(g.origin==="builtin"&&g.state==="dormant")),D=A.filter(g=>{if(S==="custom"&&g.origin!=="custom"||S!=="all"&&S!=="custom"&&g.category!==S)return!1;if(b.trim().length===0)return!0;let B=b.trim().toLowerCase();return`${g.title} ${g.description??""} ${g.instruction??""}`.toLowerCase().includes(B)}),V={all:A.length,custom:A.filter(g=>g.origin==="custom").length,news:A.filter(g=>g.category==="news").length,market:A.filter(g=>g.category==="market").length,review:A.filter(g=>g.category==="review").length,research:A.filter(g=>g.category==="research").length},E=["all","custom","news","market","review","research"];return a("div",null,a(bt,{runs:o,onViewAll:f}),a("section",{className:"capital-automation-section"},a("div",{className:"capital-automation-sectionhead"},a("h2",null,e.taskSection),a("span",null,e.taskSectionHint),a("div",{className:"capital-automation-sectiontools"},a("div",{className:"capital-automation-filters",role:"group","aria-label":e.filterLabel},E.map(g=>a(ht,{key:g,label:g==="all"?e.filterAll:g==="custom"?e.filterCustom:la(g),count:V[g],active:S===g,onClick:()=>R(g)}))),a("label",{className:"capital-automation-search"},a(at,{size:13}),a("input",{type:"search",value:b,placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder,onChange:g=>p(g.target.value)})))),N.length>0?a("div",{className:"capital-automation-running",role:"status"},N.map(g=>a("div",{key:g.id,className:"capital-automation-runningrow"},a("span",{className:"capital-automation-live"},a("span",{className:"capital-automation-livedot"}),e.status.running),a(sa,{task:g,size:28}),a("button",{type:"button",className:"capital-automation-tasktitle",style:{padding:0,border:0,background:"transparent",cursor:"pointer"},onClick:()=>l(g.id)},g.title),a("span",{className:"capital-automation-runmeta"},`${e.runningSince} ${mt(g.lastRun.startedAt??g.lastRun.queuedAt)} \xB7 ${e.steps} ${g.lastRun.steps} \xB7 ${e.tools} ${g.lastRun.toolCalls}`),a("span",{className:"capital-automation-runningactions"},a("button",{type:"button",className:"capital-automation-btn","data-size":"sm","data-variant":"danger",onClick:()=>T(g,g.lastRun)},e.cancelRun),a("button",{type:"button",className:"capital-automation-btn","data-size":"sm",onClick:()=>l(g.id)},e.details))))):null,D.length>0?a(ye,{tasks:D,onOpen:l,onAction:m,onRequestConfirm:r,onEdit:c,schedulerActive:x,storageReady:h,busyTaskId:w}):A.length===0?N.length>0?null:a(za,{title:O.length>0?e.emptyTasksTitle:e.emptyNoTemplates,body:O.length>0?e.emptyTasksBody:e.emptyNoTemplatesBody,action:O.length===0?s:void 0,actionLabel:O.length===0?e.newTask:void 0}):a(za,{title:e.emptyFiltered,body:e.emptyTasksBody,action:()=>{R("all"),p("")},actionLabel:e.clearFilter})),O.length>0?a("section",{className:"capital-automation-section"},a("div",{className:"capital-automation-sectionhead"},a("h2",null,e.templateSection)),a("div",{className:"capital-automation-templates"},O.map(g=>a(we,{key:g.id,task:g,onOpen:l,onEnable:u,busy:w===g.id,disabled:!h})))):null)}function wt(i){let{trigger:t,onChange:n,disabled:o,meta:l}=i,s=r=>n(ra({...t,...r})),u=r=>{let c=re(r,t);n(c)},m=r=>{let c=new Set(t.weekdays??[]);if(c.has(r)){if(c.size<=1)return;c.delete(r)}else c.add(r);s({weekdays:[...c].sort((f,T)=>f-T)})};return a("div",{className:"capital-automation-triggerbox"},a("div",{className:"capital-automation-triggerrow"},a("span",{className:"capital-automation-triggerclock","aria-hidden":"true"},a(va,{size:16})),a("div",{className:"capital-automation-triggerfield"},a("span",null,"\u91CD\u590D"),a(X,{value:t.cadence,options:Object.entries(e.cadence).map(([r,c])=>({value:r,label:c})),onChange:u,disabled:o,label:"\u91CD\u590D"})),a("label",{className:"capital-automation-triggerfield"},a("span",null,e.timeField),a("input",{type:"time",value:t.time,disabled:o,onChange:r=>s({time:r.target.value})})),a("label",{className:"capital-automation-triggerfield"},a("span",null,e.timezoneField),a("input",{type:"text",list:"capital-automation-timezones",value:t.timezone,disabled:o,onChange:r=>s({timezone:r.target.value}),title:e.timezoneHint}))),a("div",{className:"capital-automation-triggerrow"},t.cadence==="weekly"?a("div",{className:"capital-automation-weekdays",role:"group","aria-label":e.weekdayField},Ea.map(r=>a("button",{key:r.value,type:"button",className:"capital-automation-weekday","aria-pressed":(t.weekdays??[]).includes(r.value)?"true":"false",disabled:o,onClick:()=>m(r.value)},r.label))):null,t.cadence==="monthly"?a("div",{className:"capital-automation-triggerfield"},a("span",null,e.dayField),a(X,{value:String(t.dayOfMonth??1),options:Array.from({length:28},(r,c)=>{let f=c+1;return{value:String(f),label:e.dayOfMonth.replace("{n}",String(f))}}),onChange:r=>s({dayOfMonth:Number(r)}),disabled:o,label:e.dayField})):null,t.cadence==="daily"?a("span",{className:"capital-automation-hint"},t.tradingDaysOnly===!0?e.triggerHint:e.triggerHintNatural):null,a("label",{className:"capital-automation-switch",style:{marginLeft:"auto"}},a(nt,{checked:t.tradingDaysOnly===!0,onChange:r=>s({tradingDaysOnly:r}),label:e.tradingDaysField,disabled:o}),a("span",null,e.tradingDaysField))),a("p",{className:"capital-automation-triggersummary"},`${_a(t)} \xB7 ${t.timezone}`),l?.calendar?.available===!1?a("p",{className:"capital-automation-hint"},e.nextRunUnavailable):null)}function Q(i){let{label:t,hint:n,checked:o,onChange:l,disabled:s}=i;return a("div",{className:"capital-automation-switchrow"},a("div",null,a("span",null,t),n?a("small",null,n):null),a(nt,{checked:o===!0,onChange:l,label:t,disabled:s}))}function oa(i){let{label:t,hint:n,children:o}=i;return a("label",{className:"capital-automation-field"},a("span",null,t),o,n?a("span",{className:"capital-automation-hint"},n):null)}function X(i){let{value:t,options:n,onChange:o,disabled:l,label:s,block:u,size:m,align:r="start"}=i,[c,f]=C(!1),T=H(null),x=n.map(p=>({id:String(p.value),label:p.label,disabled:p.disabled===!0})),h=String(t??""),w=x.find(p=>p.id===h)??x[0];W(()=>{l===!0&&c&&f(!1)},[l,c]);let S=()=>f(!1),R=p=>{f(!1),T.current?.focus?.({preventScroll:!0}),p!==h&&o(p)},b=a("button",{ref:T,type:"button",className:"capital-automation-select","data-block":u===!0?"true":void 0,"data-size":m,disabled:l,"aria-label":w?.label?`${s}\uFF1A${w.label}`:s,"aria-haspopup":"menu","aria-expanded":c?"true":"false",onClick:()=>f(p=>!p)},a("span",{className:"capital-automation-selectvalue",title:w?.label},w?.label??""),a(Ot,{size:m==="sm"?12:14}));return a(it,{open:c,anchor:b,items:x,selectedId:h,onSelect:R,onClose:S,align:r,portal:!0})}function Ca(i){let{label:t,hint:n,ariaLabel:o,block:l=!0,...s}=i;return a("div",{className:"capital-automation-field"},a("span",null,t),a(X,{...s,label:o??t,block:l}),n?a("span",{className:"capital-automation-hint"},n):null)}function G(i){let{label:t,value:n,min:o,max:l,disabled:s,onChange:u}=i;return a(oa,{label:t},a("input",{type:"number",min:o,max:l,value:n,disabled:s,onChange:m=>u(Number(m.target.value))}))}function Fe(i){let{value:t,counts:n,onChange:o}=i,l=[["all",e.runFilterAll],["active",e.runFilterActive],["succeeded",e.runFilterSucceeded],["failed",e.runFilterFailed]];return a("div",{className:"capital-automation-filters",role:"group","aria-label":e.runFilterLabel},l.map(([s,u])=>a(ht,{key:s,label:u,count:n[s],active:t===s,onClick:()=>o(s)})))}function Ae(i){let{runs:t,tasks:n,onCancel:o,onOpenSession:l,onOpenTask:s,onGoTasks:u,onNewTask:m,busy:r}=i,[c,f]=C("all"),T={all:t.length,active:t.filter(h=>$(h)).length,succeeded:t.filter(h=>h.status==="succeeded").length,failed:t.filter(h=>aa(h.status)).length},x=t.filter(h=>c==="active"?$(h):c==="succeeded"?h.status==="succeeded":c==="failed"?aa(h.status):!0);return a("div",null,a(bt,{runs:t,showLink:!1}),a("section",{className:"capital-automation-section"},a("div",{className:"capital-automation-sectionhead"},a("h2",null,e.runsTitle),a("span",null,e.runsHint),a("div",{className:"capital-automation-sectiontools"},a(Fe,{value:c,counts:T,onChange:f}))),t.length===0?a("div",{className:"capital-automation-empty"},a("span",{className:"capital-automation-emptyicon"},a(Ia,{size:19})),a("h3",null,e.runsEmptyTitle),a("p",null,e.runsEmptyBody),a("div",{style:{display:"flex",gap:8,marginTop:8}},a("button",{type:"button",className:"capital-automation-btn",onClick:u},e.runsEmptyAction),a("button",{type:"button",className:"capital-automation-btn","data-variant":"primary",onClick:m},e.newTask))):x.length===0?a(za,{title:e.emptyFiltered,body:e.filterNoRuns,action:()=>f("all"),actionLabel:e.clearFilter}):a("section",{className:"capital-automation-card capital-automation-panel"},a(Ha,{runs:x,tasks:n,onCancel:o,onOpenSession:l,onOpenTask:s,busy:r}),t.length>=200?a("p",{className:"capital-automation-hint",style:{paddingTop:10}},e.runsLimitHint.replace("{n}","200")):null)))}function Ie(i){let{detail:t,meta:n,onGoRuns:o,onCancelRun:l,onOpenSession:s}=i,u=t.runs[0],m=gt(t.task),r=oe(u,t.task.trigger.timezone),c=t.runs.some(w=>$(w)),f=c?e.status.running:lt(t.task.state),T=t.task.origin==="builtin"?e.origin.builtin:e.origin.custom,x=`${ne(t.task.trigger)}${t.task.trigger.tradingDaysOnly===!0?` \xB7 ${e.tradingDaysField}`:""}`,h=t.task.trigger.tradingDaysOnly===!0?e.triggerHint:e.triggerHintNatural;return a("div",{className:"capital-automation-overview"},a("div",{className:"capital-automation-statgrid"},a("div",{className:"capital-automation-stat"},a("span",{className:"capital-automation-statlabel"},e.stateLabel),a("span",{className:"capital-automation-statvalue","data-tone":c?"running":void 0},f),a("span",{className:"capital-automation-statsub",title:t.task.origin==="builtin"?e.configBuiltinHint:void 0},T)),a("div",{className:"capital-automation-stat"},a("span",{className:"capital-automation-statlabel"},e.nextRun),a("span",{className:"capital-automation-statvalue"},m.value),a("span",{className:"capital-automation-statsub"},m.sub)),a("div",{className:"capital-automation-stat"},a("span",{className:"capital-automation-statlabel"},e.lastResult),a("span",{className:"capital-automation-statvalue","data-tone":r.tone},r.value),a("span",{className:"capital-automation-statsub"},r.sub)),a("div",{className:"capital-automation-stat",title:h},a("span",{className:"capital-automation-statlabel"},e.triggerSummary),a("span",{className:"capital-automation-statvalue"},x),a("span",{className:"capital-automation-statsub"},`${t.task.trigger.time} \xB7 ${t.task.trigger.timezone}`))),a("section",{className:"capital-automation-card capital-automation-panel"},a("div",{className:"capital-automation-panelhead"},a("h3",null,e.detailRecentRuns.replace("{n}",String(Ja))),a("button",{type:"button",className:"capital-automation-btn","data-size":"sm","data-variant":"ghost",onClick:o},e.detailAllRuns,a(Aa,{size:13}))),a(Ha,{runs:t.runs.slice(0,Ja),tasks:[t.task],onCancel:l,onOpenSession:s,compact:!0})),a("section",{className:"capital-automation-card capital-automation-panel"},a("div",{className:"capital-automation-panelhead"},a("h3",null,e.environment)),a("div",{className:"capital-automation-kv"},a("div",{className:"capital-automation-kvitem"},a("span",{className:"capital-automation-kvlabel"},e.presetLabel),a("span",{className:"capital-automation-kvvalue"},e.presetValue)),a("div",{className:"capital-automation-kvitem"},a("span",{className:"capital-automation-kvlabel"},e.workspaceField),a("span",{className:"capital-automation-kvvalue"},le(n,t.task.workspaceId))),a("div",{className:"capital-automation-kvitem"},a("span",{className:"capital-automation-kvlabel"},e.categoryField),a("span",{className:"capital-automation-kvvalue"},la(t.task.category))),a("div",{className:"capital-automation-kvitem"},a("span",{className:"capital-automation-kvlabel"},e.modeField),a("span",{className:"capital-automation-kvvalue"},ae(t.task.mode)))),a("section",{className:"capital-automation-technical"},a("h4",{className:"capital-automation-technicaltitle"},e.techInfo),a("dl",null,a("dt",null,e.profileKey),a("dd",{title:"profileKey \u662F profile \u540D\u79F0\u7684\u7A33\u5B9A\u54C8\u5E0C\uFF1B\u4E0E session \u6807\u9898\u91CC\u7684 run id \u65E0\u5173\u3002"},n?.profile?.key??"\u2014"),a("dt",null,e.presetLabel),a("dd",null,e.presetValue),a("dt",null,e.policyField),a("dd",null,n?.execution?.policy??"automation-v1"),a("dt",null,e.cwdKind),a("dd",{title:"\u5F53\u524D\u56FA\u5B9A\u4E3A profile\uFF08\u4E13\u5C5E\u81EA\u52A8\u5316\u5DE5\u4F5C\u533A\uFF09\uFF1B\u6CA1\u6709 storage \u7B49\u5176\u4ED6\u6765\u6E90\u3002"},n?.execution?.cwdKind??"profile"),a("dt",null,"profile \u540D\u79F0"),a("dd",null,n?.profile?.name??"\u2014"),a("dt",null,e.calendarField),a("dd",null,te(n?.calendar))))))}function Oe(i){let{draft:t,setDraft:n,meta:o,busy:l,dirty:s,save:u,reset:m,disabled:r}=i,c=t,f=b=>n(p=>({...p,...typeof b=="function"?b(p):b})),T=j(o,"runTimeoutMinutes",[5,120]),x=j(o,"idleTimeoutMinutes",[1,30]),h=j(o,"maxSteps",[10,2e3]),w=j(o,"maxToolCalls",[10,6e3]),S=a("details",{className:"capital-automation-advanced"},a("summary",null,e.advanced),a("div",{className:"capital-automation-advancedbody"},a("div",{className:"capital-automation-formgrid"},a(Ca,{label:e.workspaceField,value:c.workspaceId??"",options:Ba(o,c.workspaceId).map(b=>({value:b.id,label:b.title})),disabled:l||r,onChange:b=>f({workspaceId:b})}),a(Ca,{label:e.modeField,hint:e.modeHint,value:c.mode,options:Object.entries(e.mode).map(([b,p])=>({value:b,label:p})),disabled:l||r,onChange:b=>f({mode:b})})),a("div",{className:"capital-automation-formgrid"},a(G,{label:e.runTimeout,value:c.limits.runTimeoutMinutes,min:T[0],max:T[1],disabled:l||r,onChange:b=>f(p=>({limits:{...p.limits,runTimeoutMinutes:b}}))}),a(G,{label:e.idleTimeout,value:c.limits.idleTimeoutMinutes,min:x[0],max:x[1],disabled:l||r,onChange:b=>f(p=>({limits:{...p.limits,idleTimeoutMinutes:b}}))}),a(G,{label:e.maxSteps,value:c.limits.maxSteps,min:h[0],max:h[1],disabled:l||r,onChange:b=>f(p=>({limits:{...p.limits,maxSteps:b}}))}),a(G,{label:e.maxToolCalls,value:c.limits.maxToolCalls,min:w[0],max:w[1],disabled:l||r,onChange:b=>f(p=>({limits:{...p.limits,maxToolCalls:b}}))})),a("p",{className:"capital-automation-hint"},e.budgetHint),o?.workspaceError?a("p",{className:"capital-automation-hint","data-tone":"error"},e.workspaceUnavailable):null)),R=a("div",null,a("span",{className:"capital-automation-formlabel"},e.notifyField),a("div",{className:"capital-automation-switchlist"},a(Q,{label:e.notifyInApp,checked:c.notifications.inApp,disabled:l||r,onChange:b=>f(p=>({notifications:{...p.notifications,inApp:b}}))}),a(Q,{label:e.notifyFailure,checked:c.notifications.onFailure,disabled:l||r,onChange:b=>f(p=>({notifications:{...p.notifications,onFailure:b}}))}),a(Q,{label:e.notifySuccess,checked:c.notifications.onSuccess,disabled:l||r,onChange:b=>f(p=>({notifications:{...p.notifications,onSuccess:b}}))})),a("p",{className:"capital-automation-hint"},e.notifyHint));return a("div",{className:"capital-automation-form"},c.origin==="builtin"?a("div",{className:"capital-automation-formnote"},a(Xa,{size:13}),a("span",null,e.configBuiltinHint)):null,a(oa,{label:e.titleField},a("input",{value:c.title,disabled:l||r,onChange:b=>f({title:b.target.value})})),a(oa,{label:e.descriptionField},a("textarea",{value:c.description??"",disabled:l||r,rows:3,onChange:b=>f({description:b.target.value})})),a(Ca,{label:e.categoryField,hint:c.origin==="builtin"?e.categoryFixed:void 0,value:c.category,options:Object.entries(e.category).map(([b,p])=>({value:b,label:p})),disabled:l||r||c.origin==="builtin",onChange:b=>f({category:b})}),a(oa,{label:e.instructionField},a("textarea",{value:c.instruction,disabled:l||r,rows:14,onChange:b=>f({instruction:b.target.value})})),a("div",null,a("span",{className:"capital-automation-formlabel"},e.triggerField),a(wt,{trigger:c.trigger,disabled:l||r,onChange:b=>f({trigger:b}),meta:o})),S,R,a("div",{className:"capital-automation-formactions","data-sticky":"true"},a("span",{className:"capital-automation-formstatus"},r?e.storageUnavailable:s?e.dirty:e.noDirty),a("button",{type:"button",className:"capital-automation-btn",disabled:l||!s,onClick:m},e.cancel),a("button",{type:"button",className:"capital-automation-btn","data-variant":"primary",disabled:l||!s||r,onClick:u},l==="save"?e.saving:e.save)))}function $e(i){let{detail:t,busy:n,onMarkTaskRead:o}=i,l=t.notifications,s=l.filter(u=>u.readAt===void 0).length;return a("section",{className:"capital-automation-card capital-automation-panel"},a("div",{className:"capital-automation-panelhead"},a("h3",null,e.detailTaskNotifications),s>0?a("button",{type:"button",className:"capital-automation-btn","data-size":"sm",disabled:n,onClick:o},e.markTaskRead):null),l.length===0?a("p",{className:"capital-automation-hint"},e.notificationsEmpty):a("div",null,l.map(u=>a(kt,{key:u.id,item:u}))))}function kt(i){let{item:t,onClick:n,onOpenTask:o}=i,l=typeof n=="function"&&t.taskId!==void 0;return a(l?"button":"div",{type:l?"button":void 0,className:"capital-automation-notification","data-clickable":l?"true":"false",onClick:l?n:void 0},a("span",{className:"capital-automation-notificationicon","data-tone":Ta(t.kind)},Ta(t.kind)==="error"?a(et,{size:15}):Ta(t.kind)==="warn"?a(Xa,{size:15}):a(va,{size:15})),a("span",{className:"capital-automation-notificationbody"},a("span",{className:"capital-automation-notificationtitle"},t.title,t.readAt===void 0?a("span",{className:"capital-automation-count"},e.unread):null),a("span",{className:"capital-automation-notificationmessage"},pe(t)),a("span",{className:"capital-automation-notificationtime"},La(t.createdAt))),o!==void 0&&t.taskId!==void 0?a("span",{className:"capital-automation-hint"},e.notificationOpenTask):null)}function De(i){return a("div",{className:"capital-automation-detailbar"},a("button",{type:"button",className:"capital-automation-back",onClick:i.onBack},a($t,{size:14}),e.backToTasks))}function Ee(i){let{detail:t,meta:n,api:o,onChanged:l,openSession:s,tab:u,onTab:m,onRequestConfirm:r,onRequestCancelRun:c,schedulerActive:f,storageReady:T}=i,[x,h]=C(null),[w,S]=C(""),[R,b]=C(""),[p,N]=C(""),[O,A]=C(!1),D=H(null);if(W(()=>{h(t.task?{...t.task,trigger:ra(t.task.trigger),limits:{...t.task.limits},notifications:{...t.task.notifications}}:null)},[t]),W(()=>{let v=t.task?.id??null;D.current!==v&&(D.current=v,b(""),N(""))},[t]),x===null)return a("p",{className:"capital-automation-empty"},e.loading);let V=x,E=T!==!1,g=t.runs.some(v=>$(v)),B=t.runs.find(v=>$(v)),K=t.notifications.filter(v=>v.readAt===void 0).length,ca=de(x,t.task),ua=E&&f===!0&&!g,Z=v=>h(z=>({...z,...typeof v=="function"?v(z):v}));async function P(v,z,I){if(!w){S(v),N("");try{await z(),await l(t.task.id),b(I)}catch(U){N(U.message??e.errorGeneric)}finally{S("")}}}async function pa(){let v=ft(V);if(v.length>0){N(v);return}await P("save",async()=>{await o.patch(t.task.id,xa(V))},e.saved)}async function ta(){let v=t.task.state==="active"?"pause":"activate";await P(v,async()=>{await o.action(t.task.id,v)},v==="pause"?e.paused.replace("{title}",t.task.title):ct(t.task))}async function ea(){await P("run",async()=>{await o.run(t.task.id)},e.runSubmitted.replace("{title}",t.task.title))}async function J(){let v=t.notifications.filter(z=>z.readAt===void 0).map(z=>z.id);v.length!==0&&await P("read-notifications",async()=>{await o.markRead({ids:v})},e.markReadDone)}async function M(){await P("copy",async()=>{await o.action(t.task.id,"copy")},e.copied.replace("{title}",t.task.title))}let da=g?a("button",{type:"button",className:"capital-automation-btn","data-variant":"danger",disabled:w||!E||B===void 0,onClick:()=>{B!==void 0&&c(B)}},e.cancelRun):a("button",{type:"button",className:"capital-automation-btn","data-variant":t.task.state==="active"?"primary":void 0,disabled:w||!ua,title:f===!1?e.schedulerBlocked:g?e.runBlocked:void 0,onClick:()=>{ea()}},a(Oa,{size:14}),e.runNow),q=()=>{h({...t.task,trigger:ra(t.task.trigger),limits:{...t.task.limits},notifications:{...t.task.notifications}}),N(""),b("")};return a("div",null,a("div",{className:"capital-automation-hero"},a(sa,{task:V,large:!0}),a("div",{className:"capital-automation-herobody"},a("div",{className:"capital-automation-herotitle"},a("h2",null,t.task.title),a(pt,{state:t.task.state,running:g}),K>0?a("span",{className:"capital-automation-count",title:e.unread},String(K)):null),a("p",{className:"capital-automation-herodesc"},t.task.description||e.subtitle)),a("div",{className:"capital-automation-heroactions"},da,g?null:a("button",{type:"button",className:"capital-automation-btn","data-variant":t.task.state==="active"?void 0:"primary",disabled:w||!E,onClick:()=>{ta()}},a(st(t.task),{size:14}),rt(t.task)),a(xt,{task:t.task,open:O,onToggle:()=>A(v=>!v),onClose:()=>A(!1),onEdit:()=>{A(!1),m("config")},onAction:(v,z)=>{z==="run"?ea():z==="copy"?M():(z==="activate"||z==="pause")&&ta()},onRequestConfirm:(v,z)=>{A(!1),r(v,z)},canRun:ua,running:g,busy:w.length>0,disabled:!E,align:"end"}))),a("div",{className:"capital-automation-detailtabs",role:"tablist","aria-label":e.details},[["overview",e.overview],["config",e.config],["runs",e.runs],["notifications",e.notifications]].map(([v,z])=>a("button",{key:v,type:"button",role:"tab",className:"capital-automation-detailtab","aria-selected":u===v?"true":"false",onClick:()=>m(v)},z))),R.length>0||p.length>0?a("div",{style:{paddingTop:12}},R.length>0?a("p",{className:"capital-automation-notice",role:"status"},R):null,p.length>0?a("p",{className:"capital-automation-error",role:"alert"},p):null):null,g?a("p",{className:"capital-automation-hint",style:{paddingTop:10}},e.configWhileRunning):null,a("div",{className:"capital-automation-detailbody"},u==="overview"?a(Ie,{detail:t,meta:n,onGoRuns:()=>m("runs"),onCancelRun:c,onOpenSession:s}):null,u==="config"?a(Oe,{draft:x,setDraft:h,meta:n,busy:w,dirty:ca,save:pa,reset:q,disabled:!E}):null,u==="runs"?a("section",{className:"capital-automation-card capital-automation-panel"},a("div",{className:"capital-automation-panelhead"},a("h3",null,e.runs),a("span",{className:"capital-automation-hint"},e.taskRunsLimit)),a(Ha,{runs:t.runs,tasks:[t.task],onCancel:v=>c(v),onOpenSession:s,busy:w.length>0})):null,u==="notifications"?a($e,{detail:t,busy:w.length>0,onMarkTaskRead:()=>{J()}}):null))}function Me(i){let{open:t,onClose:n,api:o,onCreated:l,meta:s}=i,[u,m]=C(Qa),[r,c]=C(!1),[f,T]=C("");W(()=>{t&&(m(Qa()),c(!1),T(""))},[t]);let x=p=>m(N=>({...N,...typeof p=="function"?p(N):p})),h=j(s,"runTimeoutMinutes",[5,120]),w=j(s,"idleTimeoutMinutes",[1,30]),S=j(s,"maxSteps",[10,2e3]),R=j(s,"maxToolCalls",[10,6e3]);async function b(){let p=ft(u);if(p.length>0){T(p);return}c(!0),T("");try{let N=await o.create(xa(u));l(N?.task?.id??null)}catch(N){T(N.message??e.errorGeneric)}finally{c(!1)}}return t?a(Da,{open:t,onClose:()=>{r||n()},title:e.newTaskTitle,closeLabel:e.close,className:"capital-automation-modal",contentClassName:"capital-automation-modal-content",footer:a("div",{className:"capital-automation-formactions",style:{borderTop:0,paddingTop:0}},a("button",{type:"button",className:"capital-automation-btn",disabled:r,onClick:n},e.cancel),a("button",{type:"button",className:"capital-automation-btn","data-variant":"primary",disabled:r||s?.storage?.state==="unavailable",onClick:b},r?e.creating:e.create))},a("div",{className:"capital-automation-wizard"},a("div",{className:"capital-automation-modalheadline"},a(sa,{task:u,size:42}),a("input",{className:"capital-automation-modaltitleinput",value:u.title,placeholder:e.titlePlaceholder,"aria-label":e.titleField,onChange:p=>x({title:p.target.value})})),a("p",{className:"capital-automation-hint"},e.newTaskHint),a(oa,{label:e.descriptionField},a("input",{value:u.description,placeholder:e.descriptionPlaceholder,onChange:p=>x({description:p.target.value})})),a("div",null,a("span",{className:"capital-automation-formlabel"},e.triggerField),a(wt,{trigger:u.trigger,onChange:p=>x({trigger:p}),meta:s})),a("div",null,a("span",{className:"capital-automation-formlabel"},e.instructionField),a("div",{className:"capital-automation-promptbox"},a("textarea",{value:u.instruction,placeholder:e.instructionPlaceholder,"aria-label":e.instructionField,onChange:p=>x({instruction:p.target.value})}),a("div",{className:"capital-automation-prompttoolbar"},a("div",{className:"capital-automation-toolbarfield"},a(Lt,{size:13}),a("span",null,e.workspaceField),a(X,{value:u.workspaceId??"",options:Ba(s,u.workspaceId).map(p=>({value:p.id,label:p.title})),onChange:p=>x({workspaceId:p}),label:e.workspaceField,size:"sm",align:"end"})),a("div",{className:"capital-automation-toolbarfield"},a("span",null,e.categoryField),a(X,{value:u.category,options:Object.entries(e.category).map(([p,N])=>({value:p,label:N})),onChange:p=>x({category:p}),label:e.categoryField,size:"sm",align:"end"})),a("div",{className:"capital-automation-toolbarfield"},a("span",null,e.modeField),a(X,{value:u.mode,options:Object.entries(e.mode).map(([p,N])=>({value:p,label:N})),onChange:p=>x({mode:p}),label:e.modeField,size:"sm",align:"end"})),a("span",{className:"capital-automation-presetchip",title:e.modeHint},a(tt,{size:12}),e.presetValue)))),a("p",{className:"capital-automation-hint"},e.modeHint),s?.workspaceError?a("p",{className:"capital-automation-hint","data-tone":"error"},e.workspaceUnavailable):null,a("details",{className:"capital-automation-advanced"},a("summary",null,e.advanced),a("div",{className:"capital-automation-advancedbody"},a("div",{className:"capital-automation-formgrid"},a(G,{label:e.runTimeout,value:u.limits.runTimeoutMinutes,min:h[0],max:h[1],onChange:p=>x(N=>({limits:{...N.limits,runTimeoutMinutes:p}}))}),a(G,{label:e.idleTimeout,value:u.limits.idleTimeoutMinutes,min:w[0],max:w[1],onChange:p=>x(N=>({limits:{...N.limits,idleTimeoutMinutes:p}}))}),a(G,{label:e.maxSteps,value:u.limits.maxSteps,min:S[0],max:S[1],onChange:p=>x(N=>({limits:{...N.limits,maxSteps:p}}))}),a(G,{label:e.maxToolCalls,value:u.limits.maxToolCalls,min:R[0],max:R[1],onChange:p=>x(N=>({limits:{...N.limits,maxToolCalls:p}}))})),a("p",{className:"capital-automation-hint"},e.advancedHint))),a("div",null,a("span",{className:"capital-automation-formlabel"},e.notifyField),a("div",{className:"capital-automation-switchlist"},a(Q,{label:e.notifyInApp,checked:u.notifications.inApp,onChange:p=>x(N=>({notifications:{...N.notifications,inApp:p}}))}),a(Q,{label:e.notifyFailure,checked:u.notifications.onFailure,onChange:p=>x(N=>({notifications:{...N.notifications,onFailure:p}}))}),a(Q,{label:e.notifySuccess,checked:u.notifications.onSuccess,onChange:p=>x(N=>({notifications:{...N.notifications,onSuccess:p}}))})),a("p",{className:"capital-automation-hint"},e.notifyHint)),f.length>0?a("p",{className:"capital-automation-error",role:"alert"},f):null)):null}function Le(i){let{confirm:t,busy:n,error:o,onCancel:l,onConfirm:s}=i,u=t!==null,m=t?.kind==="cancel-run",r=t?.kind==="delete",c=m?e.cancelRunConfirmTitle:r?e.confirmDeleteTitle:e.confirmHibernateTitle,f=m?e.cancelRunConfirmBody:r?e.confirmDeleteBody:e.confirmHibernateBody,T=m?e.cancelRunConfirm:r?e.confirmDelete:e.confirmHibernate;return a(Da,{open:u,onClose:()=>{n||l()},title:c,closeLabel:e.close,className:"capital-automation-modal capital-automation-modal-narrow",footer:a("div",{className:"capital-automation-formactions",style:{borderTop:0,paddingTop:0}},a("button",{type:"button",className:"capital-automation-btn",disabled:n,onClick:l},e.cancel),a("button",{type:"button",className:"capital-automation-btn","data-variant":"danger",disabled:n,onClick:s},n?e.processing:T))},a("div",null,a("p",{className:"capital-automation-policy"},f),o.length>0?a("p",{className:"capital-automation-error",role:"alert",style:{marginTop:8}},o):null))}function _e(i){let{open:t,onClose:n,notifications:o,onMarkAllRead:l,onOpenTask:s,busy:u}=i,m=o.filter(r=>r.readAt===void 0).length;return a(Da,{open:t,onClose:n,title:e.notificationsTitle,closeLabel:e.close,className:"capital-automation-modal",contentClassName:"capital-automation-modal-content",footer:a("div",{className:"capital-automation-formactions",style:{borderTop:0,paddingTop:0}},a("span",{className:"capital-automation-formstatus"},m>0?e.notificationsUnread.replace("{n}",String(m)):o.length>0?e.allRead:e.notificationsEmpty),a("button",{type:"button",className:"capital-automation-btn",disabled:u||m===0,onClick:l},e.markRead),a("button",{type:"button",className:"capital-automation-btn","data-variant":"primary",onClick:n},e.close))},o.length===0?a("div",{className:"capital-automation-empty"},a("span",{className:"capital-automation-emptyicon"},a(va,{size:19})),a("h3",null,e.notificationsEmpty),a("p",null,e.notificationsHint)):a("div",null,a("p",{className:"capital-automation-hint",style:{marginBottom:4}},e.notificationsHint),o.map(r=>a(kt,{key:r.id,item:r,onOpenTask:s,onClick:r.taskId===void 0?void 0:()=>s(r.taskId)}))))}function Be(i){let{api:t,openSession:n}=i,[o,l]=C(null),[s,u]=C([]),[m,r]=C([]),[c,f]=C([]),[T,x]=C(0),[h,w]=C(null),[S,R]=C(null),[b,p]=C("tasks"),[N,O]=C("overview"),[A,D]=C(!1),[V,E]=C(!1),[g,B]=C(null),[K,ca]=C(!1),[ua,Z]=C(""),[P,pa]=C(null),[ta,ea]=C(!1),[J,M]=C(""),[da,q]=C(""),v=H(!1),z=H([]),I=H(null),U=H(null),ia=H(0),L=H(0),Pa=H(null);W(()=>{if(J.length===0)return;let d=setTimeout(()=>M(""),3200);return()=>clearTimeout(d)},[J]);async function _(){if(U.current!==null)return U.current;let d=ia.current+1;ia.current=d;let y=(async()=>{try{let[F,Va,Ka,ga]=await Promise.all([t.meta(),t.tasks(),t.runs("?limit=200"),t.notifications()]);if(!v.current||d!==ia.current)return;let ka=Array.isArray(Va.tasks)?Va.tasks:[];l(F),z.current=ka,u(ka),r(Array.isArray(Ka.runs)?Ka.runs:[]),f(Array.isArray(ga.notifications)?ga.notifications:[]),x(typeof ga.unread=="number"?ga.unread:0),q("");let fa=I.current,ba=fa!==null&&ka.some(It=>It.id===fa)?fa:null;ba!==fa&&(I.current=ba,L.current+=1,R(null),w(ba),ba===null&&O("overview"))}catch(F){v.current&&d===ia.current&&q(F.message??e.errorGeneric)}})();U.current=y;try{await y}finally{U.current===y&&(U.current=null)}}async function ma(d){let y=L.current+1;L.current=y;try{let F=await t.detail(d);if(!v.current||y!==L.current||I.current!==d)return;R(F)}catch(F){v.current&&y===L.current&&I.current===d&&q(F.message??e.errorGeneric)}}function ya(){let d=Pa.current;d!==null&&typeof d.scrollTo=="function"&&d.scrollTo({top:0,behavior:"auto"})}function Y(d,y="overview"){I.current=d,L.current+=1,O(y),R(null),w(d),p("tasks"),ya()}function Nt(){I.current=null,L.current+=1,R(null),w(null),O("overview"),ya()}function wa(d){d===b&&d==="tasks"&&I.current!==null||(d==="runs"&&I.current!==null&&(I.current=null,L.current+=1,R(null),w(null)),p(d),ya())}function na(d,y,F){Z(""),B({kind:d,task:y,run:F})}async function qa(d,y){if(P===null){pa(d.id),q("");try{if(y==="run")await t.run(d.id),M(e.runSubmitted.replace("{title}",d.title));else if(y==="copy"){let F=await t.action(d.id,"copy");if(M(e.copied.replace("{title}",d.title)),F?.task?.id){await _(),Y(F.task.id,"config");return}}else await t.action(d.id,y),M(y==="pause"?e.paused.replace("{title}",d.title):ct(d));await _(),I.current===d.id&&await ma(d.id)}catch(F){q(F.message??e.errorGeneric)}finally{pa(null)}}}async function Tt(d){await qa(d,"activate")}async function Ct(){if(g===null||K)return;let{kind:d,task:y}=g;ca(!0),Z("");try{d==="cancel-run"?(await t.cancel(g.run.id),M(e.runCanceled)):d==="delete"?(await t.remove(y.id),M(e.deleted.replace("{title}",y.title))):(await t.action(y.id,"hibernate"),M(e.hibernated.replace("{title}",y.title))),B(null),Z(""),await _(),I.current===y.id&&await ma(y.id)}catch(F){Z(F.message??e.errorGeneric)}finally{ca(!1)}}async function Rt(){if(!ta){ea(!0);try{await t.markRead({all:!0}),M(e.markReadDone),await _()}catch(d){q(d.message??e.errorGeneric)}finally{ea(!1)}}}async function zt(d){if(E(!1),z.current.some(y=>y.id===d)){Y(d);return}await _(),z.current.some(y=>y.id===d)&&Y(d)}W(()=>{v.current=!0,_();let d=setInterval(()=>{document.visibilityState!=="hidden"&&_()},15e3),y=()=>{document.visibilityState==="visible"&&_()};return document.addEventListener?.("visibilitychange",y),()=>{v.current=!1,ia.current+=1,L.current+=1,U.current=null,clearInterval(d),document.removeEventListener?.("visibilitychange",y)}},[]),W(()=>{if(h===null){R(null),L.current+=1;return}return R(null),ma(h),()=>{L.current+=1}},[h]);let Ua=o?.scheduler?.state==="active",ja=o?.storage?.state!=="unavailable",St=s.filter(d=>d.origin==="builtin"&&d.state==="dormant"),Ft=s.find(d=>d.id===h),At=b==="tasks"&&h!==null,Ga=o===null&&da.length===0;return a("div",{className:"capital-automation-page"},a("datalist",{id:"capital-automation-timezones"},Jt.map(d=>a("option",{key:d,value:d}))),At?null:a(be,{tab:b,onTab:wa,onNewTask:()=>D(!0),unread:T,onOpenInbox:()=>E(!0)}),a(he,{meta:o,loadError:da,onRetry:()=>{_()}}),a("div",{className:"capital-automation-scroll",ref:Pa},a("div",{className:"capital-automation-container"},b==="tasks"?h!==null?a("div",null,a(De,{onBack:Nt}),S===null?a("div",{className:"capital-automation-empty"},e.loading):a(Ee,{detail:S,meta:o,api:t,openSession:n,tab:N,onTab:O,onRequestConfirm:na,onRequestCancelRun:d=>na("cancel-run",Ft??{id:d.taskId,title:d.taskTitle},d),schedulerActive:Ua,storageReady:ja,onChanged:async d=>{await _();let y=d??I.current;y!==null&&I.current===y&&await ma(y)}})):Ga?a(Re):a(Se,{tasks:s,templates:St,runs:m,onOpenTask:Y,onNewTask:()=>D(!0),onEnableTemplate:d=>{Tt(d)},onAction:(d,y)=>{qa(d,y)},onRequestConfirm:na,onEdit:d=>Y(d,"config"),onGoRuns:()=>wa("runs"),onRequestCancelRun:(d,y)=>na("cancel-run",d,y),schedulerActive:Ua,storageReady:ja,busyTaskId:P}):Ga?a(ze):a(Ae,{runs:m,tasks:s,onCancel:d=>na("cancel-run",{id:d.taskId,title:d.taskTitle},d),onOpenSession:n,onOpenTask:d=>{z.current.some(y=>y.id===d)&&Y(d)},onGoTasks:()=>wa("tasks"),onNewTask:()=>D(!0),busy:K}))),a(Me,{open:A,onClose:()=>D(!1),api:t,meta:o,onCreated:async d=>{D(!1),M(e.created),await _(),d!==null&&z.current.some(y=>y.id===d)&&Y(d)}}),a(_e,{open:V,onClose:()=>E(!1),notifications:c,onMarkAllRead:()=>{Rt()},onOpenTask:d=>{zt(d)},busy:ta}),a(Le,{confirm:g,busy:K,error:ua,onCancel:()=>{K||(B(null),Z(""))},onConfirm:()=>{Ct()}}),J.length>0?a("div",{className:"capital-automation-toast",role:"status"},J):null)}function He(){return a(Fa,{width:18,height:18})}function Pe(i){let t=Xt(),n=o=>{try{i.get("uiWorkspace")?.openSession?.(o)}catch{}};i.effect(()=>Qt(),`${Ra}: styles`),i.slots.inject("main",()=>i.slots.register({name:"main",key:Wa,inject:()=>({api:t,openSession:n})},Be)),i.slots.inject("sidebar.panellist",()=>i.slots.register({name:"sidebar.panellist",id:Wa,order:11,label:()=>e.panel},He)),i.logger?.info?.(`${Ra}: \u5BA2\u6237\u7AEF\u534A\u8FB9\u5DF2\u6302\u8F7D\uFF08\u9875\u9762 + \u4FA7\u680F\u5165\u53E3\uFF09`)}exports.name=Ra;exports.inject=["slots"];exports.apply=Pe;
|
|
66
359
|
return module.exports
|
|
67
360
|
},
|
|
68
361
|
})
|