progon-agent 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/supervisor/cli.js +44 -44
- package/extension-bundle.json +3 -3
- package/extension-dist/background/background.js +88 -89
- package/extension-dist/card/card.css +1 -1
- package/extension-dist/card/card.html +8 -9
- package/extension-dist/card/card.js +3 -9
- package/extension-dist/chunks/shared-73iHxv_g.js +1 -0
- package/extension-dist/chunks/shared-BRaGK72I.css +1 -0
- package/extension-dist/chunks/shared-Beih6ywL.js +1 -0
- package/extension-dist/chunks/shared-BgEO6Nif.js +39 -0
- package/extension-dist/chunks/shared-ByZxg79I.js +1 -0
- package/extension-dist/chunks/shared-C7IWMwZY.js +1 -0
- package/extension-dist/chunks/shared-CFEBqIm7.js +21 -0
- package/extension-dist/chunks/shared-CKtbh_44.js +199 -0
- package/extension-dist/chunks/shared-CSBwVLDL.js +1 -0
- package/extension-dist/chunks/shared-CeI71eLt.js +134 -0
- package/extension-dist/chunks/shared-CfjrOLG1.js +336 -0
- package/extension-dist/chunks/shared-CgUMEof2.js +1 -0
- package/extension-dist/chunks/{shared-BgsXTfSV.js → shared-CwsTFlbT.js} +1 -1
- package/extension-dist/chunks/shared-D-c-eSoI.js +1 -0
- package/extension-dist/chunks/shared-DXp1f_Ub.css +1 -0
- package/extension-dist/chunks/shared-RcZD4SR-.js +1 -0
- package/extension-dist/chunks/shared-lM00HeT6.js +98 -0
- package/extension-dist/chunks/shared-t8TH2XkL.js +239 -0
- package/extension-dist/content/content.css +1 -1
- package/extension-dist/content/content.js +216 -231
- package/extension-dist/manifest.json +29 -30
- package/extension-dist/offscreen/offscreen.html +2 -3
- package/extension-dist/offscreen/offscreen.js +1 -1
- package/extension-dist/popup/popup.html +8 -8
- package/extension-dist/popup/popup.js +3 -3
- package/extension-dist/sidepanel/sidepanel.html +11 -10
- package/extension-dist/sidepanel/sidepanel.js +1 -1
- package/extension-dist/workspace/workspace.html +11 -11
- package/extension-dist/workspace/workspace.js +46 -83
- package/package.json +2 -2
- package/extension-dist/chunks/shared-B4EisBUi.js +0 -1
- package/extension-dist/chunks/shared-B7QwPadt.js +0 -98
- package/extension-dist/chunks/shared-BEB011Tg.js +0 -1
- package/extension-dist/chunks/shared-BQF2LG1p.js +0 -377
- package/extension-dist/chunks/shared-BpcMA-xb.js +0 -135
- package/extension-dist/chunks/shared-BvwA-cm2.css +0 -1
- package/extension-dist/chunks/shared-BwS34Mep.js +0 -111
- package/extension-dist/chunks/shared-CAKh7jnb.css +0 -1
- package/extension-dist/chunks/shared-CCOKrUJ3.js +0 -1
- package/extension-dist/chunks/shared-COCbj3mN.js +0 -1
- package/extension-dist/chunks/shared-Co5HfH-n.js +0 -1
- package/extension-dist/chunks/shared-Cs6uBr12.js +0 -1
- package/extension-dist/chunks/shared-D7SUgUlB.js +0 -1
- package/extension-dist/chunks/shared-DGDE0AeD.js +0 -1
- package/extension-dist/chunks/shared-DjlOTYdL.js +0 -1
- package/extension-dist/chunks/shared-LK5ScAJA.js +0 -227
- package/extension-dist/chunks/shared-_8sSdh22.js +0 -21
- package/extension-dist/chunks/shared-sY-POWsC.js +0 -51
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./shared-hePW80VL.js";import{$a as t,$n as n,$r as r,Aa as i,Ai as a,Ao as o,Bo as s,Cr as c,D as l,Do as u,E as d,Fa as f,Fr as p,Gn as m,Ha as h,Ia as g,Io as _,Ja as v,Ji as y,Jn as b,Jr as x,Ka as S,Ki as C,Kr as w,La as T,Li as E,M as D,Ma as O,Mi as ee,N as k,Na as A,No as j,O as M,Oa as N,Oo as te,P as ne,Pa as re,Po as ie,Qa as ae,Qn as oe,Qr as se,Si as ce,Ua as le,Un as ue,Ur as P,Wi as de,Wr as fe,Xa as pe,Xn as me,Xr as he,Ya as ge,Yr as _e,Za as ve,Zr as ye,_a as be,ai as xe,ao as Se,ci as F,ei as Ce,eo as we,ga as Te,ha as Ee,hr as De,ii as Oe,io as ke,j as Ae,ja as je,ji as Me,jo as Ne,k as Pe,ka as Fe,ki as Ie,ko as Le,li as Re,no as ze,oi as Be,qa as Ve,qi as He,qr as Ue,ri as We,ro as Ge,si as Ke,t as qe,ti as Je,to as Ye,ui as Xe,va as Ze,xi as Qe,ya as $e,zr as I}from"./shared-LK5ScAJA.js";import{$n as et,C as tt,Dt as nt,E as rt,Ft as it,It as at,J as ot,Jn as st,K as ct,Nt as lt,Ot as ut,Qn as dt,Qt as ft,Rt as pt,S as mt,St as ht,Tt as gt,Xn as _t,Yn as vt,Zn as yt,_n as bt,_r as xt,br as St,bt as Ct,dn as wt,dr as L,en as Tt,er as Et,fn as Dt,gn as Ot,hn as kt,hr as At,in as jt,ir as Mt,kt as Nt,ln as Pt,lr as Ft,mn as It,mr as Lt,or as R,pr as Rt,rr as zt,sr as z,ur as Bt,vn as Vt,vr as Ht,yr as Ut}from"./shared-B7QwPadt.js";import{$ as Wt,A as Gt,C as Kt,D as qt,E as Jt,F as Yt,G as Xt,H as Zt,J as Qt,M as $t,N as en,O as tn,P as nn,Q as rn,R as an,S as on,T as sn,U as cn,V as ln,W as un,X as dn,Y as fn,Z as pn,_ as mn,et as hn,g as gn,it as _n,j as vn,k as yn,nt as bn,q as xn,rt as Sn,tt as Cn,v as wn,w as Tn,x as En,y as Dn}from"./shared-BwS34Mep.js";import{C as On,D as kn,E as An,O as jn,S as Mn,T as Nn,a as Pn,c as Fn,d as In,f as Ln,h as Rn,i as zn,k as Bn,l as Vn,m as Hn,n as Un,o as Wn,p as Gn,r as Kn,s as qn,t as Jn,u as Yn,w as Xn}from"./shared-sY-POWsC.js";import{n as Zn,t as Qn}from"./shared-BgsXTfSV.js";var $n={NORMAL_CLOSURE:1e3,SERVER_RESTART:1001,AUTH_FAILED:4001,PROTOCOL_VIOLATION:4002,BACKPRESSURE:4003,CHANNEL_NOT_FOUND:4004,RATE_LIMIT:4005,HEARTBEAT_TIMEOUT:4006},er={queued:{tone:`active`,blockState:`active`},launching:{tone:`active`,blockState:`active`},link_pending:{tone:`active`,blockState:`active`},crawling:{tone:`active`,blockState:`active`},running_batch:{tone:`active`,blockState:`active`},completed:{tone:`success`,blockState:`terminal`},failed:{tone:`error`,blockState:`terminal`},cancelled:{tone:`neutral`,blockState:`terminal`}};function tr(e){return er[e]}function nr(e){return tr(e.stage).blockState}function rr(e){return{cancel:nr(e)!==`terminal`,kill:e.status===`launching`||e.status===`in_progress`}}function ir(e){return e.mine?e.lifecycle===`active`?e.online?null:`offline`:`notEnrolled`:`notOwner`}function ar(e){return e.activeRun!==null||e.activeJob!=null}async function or(e,t,{pageSize:n,route:r}){let i=[],a=0,o=null;for(;o===null||a<o;){t.throwIfAborted();let s=await e({limit:n,offset:a},t);if(s.offset!==a||s.total<0||!Number.isInteger(s.total))throw Error(`${r} returned invalid pagination metadata`);if(s.items.length===0&&a<s.total)throw Error(`${r} returned an empty page before total was satisfied`);i.push(...s.items),a+=s.items.length,o=s.total}return i}async function sr(e,t){return or(e,t,{pageSize:100,route:`GET /agents`})}var cr=`://`,lr=`https://`;function ur(e){let t=e.trim();if(t===``)return{ok:!1,reason:`empty`};if(t.includes(`*`))return{ok:!1,reason:`host_invalid`};let n=dr(t);return n===null?{ok:!1,reason:`not_parsable`}:fr(n)}function dr(e){try{return new URL(e.includes(cr)?e:`${lr}${e}`)}catch{return null}}function fr(e){if(!le(e.protocol))return{ok:!1,reason:`scheme_not_navigable`};if(e.username!==``||e.password!==``)return{ok:!1,reason:`carries_credentials`};if(e.pathname!==`/`||e.search!==``||e.hash!==``)return{ok:!1,reason:`not_bare_origin`};let t=S(e.hostname),n=h(t)&&t.includes(`:`)?`[${t}]`:t,r=e.port===``?``:`:${e.port}`;return{ok:!0,baseUrl:`${e.protocol}//${n}${r}`}}
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.574.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
var pr=F(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),mr=F(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),hr=F(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),gr=F(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),_r=F(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),vr=F(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),yr=F(`ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]),br=F(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),xr=F(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Sr=F(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Cr=F(`chart-pie`,[[`path`,{d:`M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z`,key:`pzmjnu`}],[`path`,{d:`M21.21 15.89A10 10 0 1 1 8 2.83`,key:`k2fpak`}]]),wr=F(`circle-minus`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),Tr=F(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Er=F(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),Dr=F(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Or=F(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),kr=F(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),Ar=F(`fast-forward`,[[`path`,{d:`M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z`,key:`b19h5q`}],[`path`,{d:`M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z`,key:`h7h5ge`}]]),jr=F(`file-check`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]),Mr=F(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),Nr=F(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),Pr=F(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Fr=F(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Ir=F(`hand`,[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]),Lr=F(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]),Rr=F(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),zr=F(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Br=F(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),Vr=F(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Hr=F(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),Ur=F(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Wr=F(`lock-keyhole-open`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{width:`18`,height:`12`,x:`3`,y:`10`,rx:`2`,key:`l0tzu3`}],[`path`,{d:`M7 10V7a5 5 0 0 1 9.33-2.5`,key:`car5b7`}]]),Gr=F(`map`,[[`path`,{d:`M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z`,key:`169xi5`}],[`path`,{d:`M15 5.764v15`,key:`1pn4in`}],[`path`,{d:`M9 3.236v15`,key:`1uimfh`}]]),Kr=F(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),qr=F(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),Jr=F(`monitor-play`,[[`path`,{d:`M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.645.645 0 0 1 .967-.56z`,key:`vbtd3f`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,key:`x3v2xh`}]]),Yr=F(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Xr=F(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Zr=F(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Qr=F(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),$r=F(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),ei=F(`radar`,[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]),ti=F(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ni=F(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),ri=F(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),ii=F(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),ai=F(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),oi=F(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),si=F(`square-check-big`,[[`path`,{d:`M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344`,key:`2acyp4`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ci=F(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),li=F(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ui=F(`trending-up`,[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]),di=F(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),fi=F(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),pi=F(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),mi=F(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),hi=F(`wand`,[[`path`,{d:`M15 4V2`,key:`z1p9b7`}],[`path`,{d:`M15 16v-2`,key:`px0unx`}],[`path`,{d:`M8 9h2`,key:`1g203m`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M17.8 11.8 19 13`,key:`yihg8r`}],[`path`,{d:`M15 9h.01`,key:`x1ddxp`}],[`path`,{d:`M17.8 6.2 19 5`,key:`fd4us0`}],[`path`,{d:`m3 21 9-9`,key:`1jfql5`}],[`path`,{d:`M12.2 6.2 11 5`,key:`i3da3b`}]]),gi=F(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),B=/* @__PURE__ */ e(y(),1),_i=/* @__PURE__ */ new Set([`https:`,`http:`,`mailto:`]),vi=`\0LINK_HREF`,yi=`target="_blank" rel="noopener noreferrer"`
|
|
9
|
-
/**
|
|
10
|
-
* @license lucide-react v0.574.0 - ISC
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the ISC license.
|
|
13
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v0.574.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* @license lucide-react v0.574.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* @license lucide-react v0.574.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* @license lucide-react v0.574.0 - ISC
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the ISC license.
|
|
37
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* @license lucide-react v0.574.0 - ISC
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the ISC license.
|
|
43
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* @license lucide-react v0.574.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/
|
|
51
|
-
/**
|
|
52
|
-
* @license lucide-react v0.574.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/
|
|
57
|
-
/**
|
|
58
|
-
* @license lucide-react v0.574.0 - ISC
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the ISC license.
|
|
61
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* @license lucide-react v0.574.0 - ISC
|
|
65
|
-
*
|
|
66
|
-
* This source code is licensed under the ISC license.
|
|
67
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
-
*/
|
|
69
|
-
/**
|
|
70
|
-
* @license lucide-react v0.574.0 - ISC
|
|
71
|
-
*
|
|
72
|
-
* This source code is licensed under the ISC license.
|
|
73
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* @license lucide-react v0.574.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/
|
|
81
|
-
/**
|
|
82
|
-
* @license lucide-react v0.574.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* @license lucide-react v0.574.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/
|
|
93
|
-
/**
|
|
94
|
-
* @license lucide-react v0.574.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/
|
|
99
|
-
/**
|
|
100
|
-
* @license lucide-react v0.574.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* This source code is licensed under the ISC license.
|
|
103
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* @license lucide-react v0.574.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/
|
|
111
|
-
/**
|
|
112
|
-
* @license lucide-react v0.574.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/
|
|
117
|
-
/**
|
|
118
|
-
* @license lucide-react v0.574.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/
|
|
123
|
-
/**
|
|
124
|
-
* @license lucide-react v0.574.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/
|
|
129
|
-
/**
|
|
130
|
-
* @license lucide-react v0.574.0 - ISC
|
|
131
|
-
*
|
|
132
|
-
* This source code is licensed under the ISC license.
|
|
133
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/
|
|
135
|
-
/**
|
|
136
|
-
* @license lucide-react v0.574.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/
|
|
141
|
-
/**
|
|
142
|
-
* @license lucide-react v0.574.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/
|
|
147
|
-
/**
|
|
148
|
-
* @license lucide-react v0.574.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/
|
|
153
|
-
/**
|
|
154
|
-
* @license lucide-react v0.574.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/
|
|
159
|
-
/**
|
|
160
|
-
* @license lucide-react v0.574.0 - ISC
|
|
161
|
-
*
|
|
162
|
-
* This source code is licensed under the ISC license.
|
|
163
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/
|
|
165
|
-
/**
|
|
166
|
-
* @license lucide-react v0.574.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/
|
|
171
|
-
/**
|
|
172
|
-
* @license lucide-react v0.574.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/
|
|
177
|
-
/**
|
|
178
|
-
* @license lucide-react v0.574.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/
|
|
183
|
-
/**
|
|
184
|
-
* @license lucide-react v0.574.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/
|
|
189
|
-
/**
|
|
190
|
-
* @license lucide-react v0.574.0 - ISC
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the ISC license.
|
|
193
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/
|
|
195
|
-
/**
|
|
196
|
-
* @license lucide-react v0.574.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/
|
|
201
|
-
/**
|
|
202
|
-
* @license lucide-react v0.574.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/
|
|
207
|
-
/**
|
|
208
|
-
* @license lucide-react v0.574.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/
|
|
213
|
-
/**
|
|
214
|
-
* @license lucide-react v0.574.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/
|
|
219
|
-
/**
|
|
220
|
-
* @license lucide-react v0.574.0 - ISC
|
|
221
|
-
*
|
|
222
|
-
* This source code is licensed under the ISC license.
|
|
223
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/
|
|
225
|
-
/**
|
|
226
|
-
* @license lucide-react v0.574.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/
|
|
231
|
-
/**
|
|
232
|
-
* @license lucide-react v0.574.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/
|
|
237
|
-
/**
|
|
238
|
-
* @license lucide-react v0.574.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/
|
|
243
|
-
/**
|
|
244
|
-
* @license lucide-react v0.574.0 - ISC
|
|
245
|
-
*
|
|
246
|
-
* This source code is licensed under the ISC license.
|
|
247
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
-
*/
|
|
249
|
-
/**
|
|
250
|
-
* @license lucide-react v0.574.0 - ISC
|
|
251
|
-
*
|
|
252
|
-
* This source code is licensed under the ISC license.
|
|
253
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
-
*/
|
|
255
|
-
/**
|
|
256
|
-
* @license lucide-react v0.574.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/
|
|
261
|
-
/**
|
|
262
|
-
* @license lucide-react v0.574.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/
|
|
267
|
-
/**
|
|
268
|
-
* @license lucide-react v0.574.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/
|
|
273
|
-
/**
|
|
274
|
-
* @license lucide-react v0.574.0 - ISC
|
|
275
|
-
*
|
|
276
|
-
* This source code is licensed under the ISC license.
|
|
277
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
-
*/
|
|
279
|
-
/**
|
|
280
|
-
* @license lucide-react v0.574.0 - ISC
|
|
281
|
-
*
|
|
282
|
-
* This source code is licensed under the ISC license.
|
|
283
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
-
*/
|
|
285
|
-
/**
|
|
286
|
-
* @license lucide-react v0.574.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/
|
|
291
|
-
/**
|
|
292
|
-
* @license lucide-react v0.574.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/
|
|
297
|
-
/**
|
|
298
|
-
* @license lucide-react v0.574.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/
|
|
303
|
-
/**
|
|
304
|
-
* @license lucide-react v0.574.0 - ISC
|
|
305
|
-
*
|
|
306
|
-
* This source code is licensed under the ISC license.
|
|
307
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
-
*/
|
|
309
|
-
/**
|
|
310
|
-
* @license lucide-react v0.574.0 - ISC
|
|
311
|
-
*
|
|
312
|
-
* This source code is licensed under the ISC license.
|
|
313
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
-
*/
|
|
315
|
-
/**
|
|
316
|
-
* @license lucide-react v0.574.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/
|
|
321
|
-
/**
|
|
322
|
-
* @license lucide-react v0.574.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/
|
|
327
|
-
/**
|
|
328
|
-
* @license lucide-react v0.574.0 - ISC
|
|
329
|
-
*
|
|
330
|
-
* This source code is licensed under the ISC license.
|
|
331
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
332
|
-
*/
|
|
333
|
-
/**
|
|
334
|
-
* @license lucide-react v0.574.0 - ISC
|
|
335
|
-
*
|
|
336
|
-
* This source code is licensed under the ISC license.
|
|
337
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
-
*/
|
|
339
|
-
/**
|
|
340
|
-
* @license lucide-react v0.574.0 - ISC
|
|
341
|
-
*
|
|
342
|
-
* This source code is licensed under the ISC license.
|
|
343
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
-
*/
|
|
345
|
-
/**
|
|
346
|
-
* @license lucide-react v0.574.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/
|
|
351
|
-
;function bi(e){let t=/(!?)\[([^[\]<]+)\]\(/g,n=[],r=[],i=0,a=t.exec(e);for(;a!==null;){let o=a.index+a[0].length,s=Si(e,o);if(s!==-1){t.lastIndex=s+1;let c=e.slice(o,s).trim();a[1]!==`!`&&Ci(c)&&(n.push(wi(c)),r.push(e.slice(i,a.index)),r.push(`<a href="${vi}${n.length-1}\x00" ${yi}>${a[2]}</a>`),i=s+1)}a=t.exec(e)}return r.push(e.slice(i)),{html:r.join(``),hrefs:n}}function xi(e,t){return e.replace(/\x00LINK_HREF(\d+)\x00/g,(e,n)=>{let r=t[Number.parseInt(n,10)];return r===void 0?e:r})}function Si(e,t){let n=1;for(let r=t;r<e.length;r++){let t=e[r];if(t===`<`)return-1;if(t===`(`)n++;else if(t===`)`&&(n--,n===0))return r}return-1}function Ci(e){if(e.includes(`\0`))return!1;let t;try{t=new URL(e)}catch{return!1}return _i.has(t.protocol)}function wi(e){return e.replace(/"/g,`"`).replace(/'/g,`'`)}var Ti=200,Ei=/* @__PURE__ */ new Map,Di=/^[A-Za-z0-9][A-Za-z0-9+#._-]{0,19}$/,Oi=/\n[ \t]*$/;function ki(e){let t=e.indexOf(`
|
|
352
|
-
`);if(t===-1)return{code:e.trim(),language:null};let n=e.slice(0,t).trim();return{code:e.slice(t+1).replace(Oi,``),language:Di.test(n)?n.toLowerCase():null}}var Ai="```",ji=`````;function Mi(e,t){return`${e.slice(t+3)}\n`}function Ni(e){let t=ki(e);return t.code.trim()!==``||t.language!==null||e.trim()===``?t:null}function Pi(e,t){let n=e.lastIndexOf(`
|
|
353
|
-
`,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}function Fi(e){let t=e.indexOf(Ai);for(;t!==-1;){if(Pi(e,t)){let n=Ni(Mi(e,t));if(n!==null)return{index:t,block:n}}t=e.indexOf(Ai,t+3)}return null}var Ii=`\0CODE_BLOCK`,Li=/(\x00CODE_BLOCK\d+\x00)/,Ri=`\0INLINE_CODE`;function zi(e,t){let n=e.split(Li);if(n.length===1)return null;let r=[],i=``,a=()=>{let e=i.trim();e!==``&&r.push({kind:`prose`,text:e}),i=``};return n.forEach((e,n)=>{if(n%2==0){i+=e;return}if(Number.parseInt(e.slice(11,-1),10)>=t){i+=e;return}a(),r.push({kind:`placeholder`,text:e})}),a(),r.some(e=>e.kind===`placeholder`)?r:null}var Bi=/^:?-+:?$/;function Vi(e){var t,n;let r=e.trim();if(!r.includes(`|`))return null;let i=r.split(/(?<!\\)\|/);return((t=i[0])==null?void 0:t.trim())===``&&i.shift(),((n=i[i.length-1])==null?void 0:n.trim())===``&&i.pop(),i.length===0?null:i.map(e=>e.trim().replace(/\\\|/g,`|`))}function Hi(e){return e.every(e=>Bi.test(e))}function Ui(e,t){let n=`<thead><tr>${e.map(e=>`<th>${e}</th>`).join(``)}</tr></thead>`,r=t.map(e=>`<tr>${e.map(e=>`<td>${e}</td>`).join(``)}</tr>`).join(``);return`<div class="qa-ai-chat-table-scroll" tabindex="0"><table>${n}${r===``?``:`<tbody>${r}</tbody>`}</table></div>`}function Wi(e,t){let n=(t==null?void 0:t.cache)??!0;if(n){let t=Ei.get(e);if(t!==void 0)return t}let r=e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),i=[];r=r.replace(/```([\s\S]*?)```/g,(e,t)=>{let n=Ni(t);return n===null?`${ji}${t}${ji}`:(i.push(n),`${Ii}${i.length-1}\x00`)});let a=Fi(r);a!==null&&(i.push(a.block),r=`${r.slice(0,a.index)}${Ii}${i.length-1}\x00`);let o=r.split(`
|
|
354
|
-
`),s=[],c=[],l=0,u=()=>{c.length!==0&&(s.push(`<p>${c.join(`<br>`)}</p>`),c.length=0)};for(;l<o.length;){let e=o[l];if(e.trim()===``){u(),l++;continue}let t=Vi(e),n=o[l+1],r=n===void 0?null:Vi(n);if(t&&r&&r.length===t.length&&Hi(r)){u(),l+=2;let e=[];for(;l<o.length;){let t=Vi(o[l]);if(!t)break;e.push(t),l++}s.push(Ui(t,e));continue}let a=e.match(/^(#{1,3})\s+(.+)$/);if(a){let e=a[1].length;u(),s.push(`<h${e}>${a[2]}</h${e}>`),l++;continue}if(e.match(/^[-*]\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^[-*]\s+(.+)$/);if(!t)break;e.push(`<li>${t[1]}</li>`),l++}s.push(`<ul>${e.join(``)}</ul>`);continue}if(e.match(/^(\d+)\.\s+(.+)$/)){u();let e=[];for(;l<o.length;){let t=o[l].match(/^(\d+)\.\s+(.+)$/);if(!t)break;e.push(`<li>${t[2]}</li>`),l++}s.push(`<ol>${e.join(``)}</ol>`);continue}if(e.includes(Ii)){let t=zi(e,i.length);if(t!==null){for(let e of t){if(e.kind===`prose`){c.push(e.text);continue}u(),s.push(e.text)}l++;continue}}c.push(e),l++}u(),r=s.join(``);let d=[];r=r.replace(/`([^`]+)`/g,(e,t)=>(d.push(t),`<code>${Ri}${d.length-1}\x00</code>`));let f=bi(r);if(r=f.html,r=r.replace(/\x00INLINE_CODE(\d+)\x00/g,(e,t)=>{let n=d[Number.parseInt(t,10)];return n===void 0?e:n}),r=r.replace(/\*\*([^*]+)\*\*/g,`<strong>$1</strong>`),r=r.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,`<em>$1</em>`),r=xi(r,f.hrefs),r=r.replace(/\x00CODE_BLOCK(\d+)\x00/g,(e,t)=>{let n=i[parseInt(t,10)];return n===void 0?e:`<pre><code${n.language===null?``:` class="language-${n.language}"`}>${n.code}</code></pre>`}),n){if(Ei.size>=Ti){let e=Ei.keys().next().value;e!==void 0&&Ei.delete(e)}Ei.set(e,r)}return r}var Gi=`wfl:`;function Ki(e){return e.startsWith(Gi)}function qi(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ji(e){return typeof e==`string`&&e.length>0}function Yi(e){if(!qi(e))return null;let t=e.key;if(!Ji(t))return null;let n=e.label;if(!qi(n)||typeof n.ru!=`string`||n.ru.trim().length===0||typeof n.en!=`string`||n.en.trim().length===0)return null;let r={ru:n.ru,en:n.en};switch(e.kind){case`text`:{let n=e.text;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`text`,text:n}}case`token`:{let n=e.token;return typeof n!=`string`||n.length===0?null:{key:t,label:r,kind:`token`,token:n}}case`list`:{let n=e.items;if(!Array.isArray(n)||n.length===0)return null;let i=[];for(let e of n){if(typeof e!=`string`||e.length===0)return null;i.push(e)}return{key:t,label:r,kind:`list`,items:i}}case`workflow`:{let n=e.workflowId,i=e.topic;if(typeof n!=`string`||n.length===0||!qi(i)||i.kind!==`preset`)return null;let a=i.presetId;return typeof a!=`string`||a.length===0?null:{key:t,label:r,kind:`workflow`,workflowId:n,topic:{...i,kind:`preset`,presetId:a}}}default:return null}}function Xi(e){if(!qi(e))return null;let t=e.facts;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=Yi(e);if(t===null)return null;n.push(t)}return{facts:n}}function Zi(e){if(typeof e!=`object`||!e)return null;let t=e;return typeof t.ru==`string`&&t.ru.trim().length>0&&typeof t.en==`string`&&t.en.trim().length>0?{ru:t.ru,en:t.en}:null}function Qi(e,t){return e.includes(t)?e.filter(e=>e!==t):e}function $i(e,t){return e.includes(t)?e:[...e,t]}function ea(e,t){return{answeredToolCallIds:$i(e.answeredToolCallIds,t),answeredByPageOnly:Qi(e.answeredByPageOnly,t),reofferedToolCallIds:Qi(e.reofferedToolCallIds,t)}}var ta={pendingConfirmations:[],confirmationAnchors:{},confirmationStepAnchorId:null,answeredToolCallIds:[],answeredByPageOnly:[],reofferedToolCallIds:[],confirmationAnswerInFlight:!1};function na(e,t,n){return t.answeredToolCallIds===void 0||!t.answeredToolCallIds.includes(n)?!1:!e.reofferedToolCallIds.includes(n)||t.reofferedBeforeRead!==void 0&&t.reofferedBeforeRead.includes(n)}function ra(e,t){var n;if(e.conversationId===null)return!1;let r=e.messages.find(e=>e.id===t);return(r==null?void 0:r.role)===`assistant`&&((n=r.toolCalls)==null?void 0:n.some(t=>e.pendingConfirmations.some(e=>e.toolCallId===t.toolCallId)||e.answeredToolCallIds.includes(t.toolCallId)))===!0}function ia(e){return e.isStreaming||e.confirmationAnswerInFlight||e.permissionModeLane!==null}function aa(e,t){return Ki(t)?e.confirmationAnswerInFlight||e.permissionModeLane!==null:ia(e)}function oa(e,t){let{toolCallId:n}=t,r=e.answeredByPageOnly.includes(n);if(e.answeredToolCallIds.includes(n)&&!r||e.pendingConfirmations.some(e=>e.toolCallId===n))return{kind:`redelivered`};let i=sa(e);return{kind:`offered`,confirmation:{pendingConfirmations:[...e.pendingConfirmations,ca(t,i)],confirmationAnchors:{...e.confirmationAnchors,[n]:i},confirmationStepAnchorId:i,...r?{answeredToolCallIds:Qi(e.answeredToolCallIds,n),answeredByPageOnly:Qi(e.answeredByPageOnly,n),reofferedToolCallIds:$i(e.reofferedToolCallIds,n),pendingRefetch:!0}:{answeredToolCallIds:e.answeredToolCallIds,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds}}}}function sa(e){return e.streamingMessageId===null?e.confirmationStepAnchorId:e.streamingMessageId}function ca(e,t){let n=Zi(e.title);return{toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,description:e.description,display:Xi(e.display),...n!==null&&{title:n},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},status:`open`,anchorMessageId:t}}function la(e){let t=e.pendingConfirmations;return t.some(e=>e.status===`open`)?{pendingConfirmations:t.map(e=>e.status===`open`?{...e,status:`rejecting`}:e)}:{pendingConfirmations:t}}function ua(e,t){let n=e.pendingConfirmations.find(e=>e.toolCallId===t);return n===void 0||n.status!==`open`?e:{...e,pendingConfirmations:e.pendingConfirmations.map(e=>e.toolCallId===t?{...e,status:`resolving`}:e),confirmationAnswerInFlight:!0}}function da(e){return e.role===`assistant`&&e.content===``&&e.pendingActionStatus!==void 0}function fa(e,t){let{messageId:n,status:r,anchorMessageId:i}=t;if(e.some(e=>e.id===n))return e.map(e=>e.id===n?{...e,pendingActionStatus:r}:e);let a={id:n,role:`assistant`,content:``,pendingActionStatus:r},o=i===null?-1:e.findIndex(e=>e.id===i);if(o===-1)return[...e,a];let s=o+1;for(;s<e.length;){let t=e[s];if(t===void 0||!da(t))break;s+=1}return[...e.slice(0,s),a,...e.slice(s)]}function pa(e,t){let{messageId:n,toolCallId:r,status:i}=t,a=e.confirmationAnchors[r],o=fa(e.messages,{messageId:n,status:i,anchorMessageId:a===void 0?null:a}),s=e.pendingConfirmations;return{messages:o,pendingConfirmations:s.some(e=>e.toolCallId===r)?s.filter(e=>e.toolCallId!==r):s,confirmationAnchors:Object.fromEntries(Object.entries(e.confirmationAnchors).filter(([e])=>e!==r)),...ea(e,r)}}function ma(e){let t=e.pendingConfirmations,n=t.some(e=>e.status===`resolving`&&Ki(e.toolCallId))&&e.confirmationAnswerInFlight;return t.every(e=>e.status===`open`||e.status===`resolving`&&Ki(e.toolCallId))?{pendingConfirmations:t,pendingRefetch:e.pendingRefetch,confirmationAnswerInFlight:n}:{pendingConfirmations:t.flatMap(e=>e.status===`resolving`&&Ki(e.toolCallId)?[e]:e.status===`resolving`?[]:e.status===`rejecting`?[{...e,status:`open`}]:[e]),pendingRefetch:t.some(e=>e.status===`resolving`&&!Ki(e.toolCallId))?!0:e.pendingRefetch,confirmationAnswerInFlight:n}}function ha(e,t){let n=e.pendingConfirmations;return{pendingConfirmations:n.some(e=>e.toolCallId===t&&e.status===`resolving`)?n.map(e=>e.toolCallId===t&&e.status===`resolving`?{...e,status:`open`}:e):n,confirmationAnswerInFlight:!1}}function ga(e){return e.pendingConfirmations===void 0?ta.pendingConfirmations:e.pendingConfirmations}function _a(e,t){let n=ga(t);return!n.some(t=>e.answeredToolCallIds.includes(t.toolCallId))&&e.pendingConfirmations.every(r=>na(e,t,r.toolCallId)?!0:r.status===`open`&&n.some(e=>e.toolCallId===r.toolCallId))}function va(e,t){let n=e.answeredToolCallIds,r=t.answeredToolCallIds,i={answeredToolCallIds:n,answeredByPageOnly:e.answeredByPageOnly,reofferedToolCallIds:e.reofferedToolCallIds};if(r===void 0)return i;let a=r.filter(r=>!n.includes(r)&&na(e,t,r));return a.length===0?i:{answeredToolCallIds:[...n,...a],answeredByPageOnly:[...e.answeredByPageOnly,...a],reofferedToolCallIds:e.reofferedToolCallIds.filter(e=>!a.includes(e))}}function ya(e,t){return{pendingConfirmations:ga(t),confirmationAnchors:ta.confirmationAnchors,confirmationStepAnchorId:ta.confirmationStepAnchorId,...va(e,t),confirmationAnswerInFlight:e.confirmationAnswerInFlight}}function ba(e){return e.kind===`question`&&e.payload.origin===`assistant`}function xa(e){return(e.blocks??[]).flatMap(e=>{if(!ba(e))return[];let t=e.payload;return t.id!==e.id||!Array.isArray(t.questions)||![`pending`,`answered`,`cancelled`,`superseded`].includes(String(t.status))?[]:[e.payload]})}function Sa(e){let t=/* @__PURE__ */ new Map;for(let n of e)for(let e of xa(n)){if(e.status!==`answered`)continue;let n=t.get(e.continuationTurnId);(n===void 0||e.continuationAttempt>n)&&t.set(e.continuationTurnId,e.continuationAttempt)}let n=!1,r=e.map(e=>{if(e.role!==`assistant`)return e;let r=t.get(e.id);return r===void 0||e.continuationAttempt===r||e.continuationAttempt!==void 0&&e.continuationAttempt>r?e:(n=!0,{...e,continuationAttempt:r})});return n?r:e}function Ca(e,t){var n;let r=(n=e.find(e=>e.id===t))==null?void 0:n.continuationAttempt;for(let n of e)for(let e of xa(n))e.status===`answered`&&e.continuationTurnId===t&&(r===void 0||e.continuationAttempt>r)&&(r=e.continuationAttempt);return r}function wa(e,t){return{id:e.id,role:`assistant`,content:``,continuationAttempt:t,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}}function Ta(e,t){let n=e.find(e=>e.id===t.messageId),r=Ca(e,t.messageId);return r!==void 0&&t.continuationAttempt<r?{kind:`lower-attempt`}:n!==void 0&&r===t.continuationAttempt&&t.replaceExisting!==!0?{kind:`same-attempt-replay`}:n===void 0?{kind:`accepted`,messages:[...e,{id:t.messageId,role:`assistant`,content:``,continuationAttempt:t.continuationAttempt,...t.effort!==void 0&&{effort:t.effort}}]}:{kind:`accepted`,messages:e.map(e=>e.id===t.messageId?wa(e,t.continuationAttempt):e)}}function Ea(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(!n||n.blocks===void 0)continue;let r=n.blocks.filter(e=>e.state===`active`);for(let e of xa({blocks:r}))if(e.status===`pending`)return e}return null}function Da(e){return e.role===`assistant`||e.role===`agent`&&e.agentOrigin===`agent_question`}function Oa(e,t){let n=[...e];for(let e of t){let t=n.findIndex(t=>t.id===e.id);t<0?n.push(e):e.revision>n[t].revision&&(n[t]=e)}return n}function ka(e,t){let n=new Map(t.messages.map(e=>[e.id,e]));return Sa(e.map(e=>{if(!Da(e))return e;let r=n.get(e.id),i=Oa(Oa((r==null?void 0:r.blocks)??[],t.pendingMessageBlocks[e.id]??[]),e.blocks??[]);return i.length===0&&e.blocks===void 0?e:{...e,blocks:i}}))}function Aa(e){let t={...e.pendingMessageBlocks},n=Sa(e.messages.map(e=>{let n=t[e.id];return!n||!Da(e)?e:(delete t[e.id],{...e,blocks:Oa(e.blocks??[],n)})})),r=Ea(n)??Ea(Object.entries(t).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...e,messages:n,pendingMessageBlocks:t,pendingQuestionBatch:r}}function ja(e,t){if(e.conversationId!==t.conversationId)return e;let{block:n,messageId:r}=t;if(!Number.isSafeInteger(n.revision)||n.revision<1)return e;let i=e.messages.find(e=>e.id===r);if(i&&!Da(i))return e;let a=((i==null?void 0:i.blocks)??e.pendingMessageBlocks[r]??[]).find(e=>e.id===n.id);if(a&&a.revision>=n.revision)return e;if(ba(n)){let i=xa({blocks:[n]})[0];if(!i||i.assistantMessageId!==r||i.conversationId!==t.conversationId)return e;if(i.status===`pending`&&e.pendingQuestionBatch&&e.pendingQuestionBatch.id!==i.id)return e.pendingRefetch?e:{...e,pendingRefetch:!0}}let o=Oa(e.pendingMessageBlocks[r]??[],[n]);return Aa({...e,pendingMessageBlocks:{...e.pendingMessageBlocks,[r]:o},pendingRefetch:!i||e.pendingRefetch})}var Ma={drawnFromMessageId:null,olderCursor:null,filesBefore:[],revision:0};function Na(e){let{drawnFromMessageId:t}=e.historyWindow;if(t===null)return 0;let n=e.messages.findIndex(e=>e.id===t);if(n<0)throw Error(`Chat history window: drawnFromMessageId ${t} is not among the held messages`);return n}function Pa(e){let t=Na(e);return t===0?e.messages:e.messages.slice(t)}function Fa(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>Fa(e,t[n]));if(Array.isArray(t))return!1;let n=e,r=t,i=Ia(n),a=Ia(r);return i.length===a.length&&i.every(e=>Fa(n[e],r[e]))}function Ia(e){return Object.keys(e).filter(t=>e[t]!==void 0)}function La(e,t){return e===void 0||t===void 0?e===t:e.length===t.length&&e.every((e,n)=>{let r=t[n];return r!==void 0&&e.id===r.id&&e.revision===r.revision&&e.state===r.state})}function Ra(e,t){if(e===t)return!0;if(!La(e.blocks,t.blocks))return!1;let n={...e},r={...t},i=Ia(n).filter(e=>e!==`blocks`);return i.length===Ia(r).filter(e=>e!==`blocks`).length&&i.every(e=>Fa(n[e],r[e]))}function za(e,t){let n=new Map(e.map(e=>[e.id,e])),r=!1,i=t.map(e=>{let t=n.get(e.id);return t===void 0||t===e||!Ra(t,e)?e:(r=!0,t)});return r?i:t}var Ba=/* @__PURE__ */ new Set;function Va(e,t){let n=e.historyWindow.revision+1,{windowFirstMessageId:r}=t;if(r===null)return{messages:[...t.messages],historyWindow:{drawnFromMessageId:null,olderCursor:t.olderCursor,filesBefore:t.filesBefore,revision:n},unvouchedMessageIds:Ba};let i=t.messages.findIndex(e=>e.id===r);if(i<0)throw Error(`Chat history page: windowFirstMessageId ${r} is not among its messages`);let a=t.messages.slice(0,i),o=t.messages.slice(i),s=Pa(e),c=s.findIndex(e=>e.id===r);if(c<=0)return Ha(a,o,t,r,n);let l=new Map(a.map(e=>[e.id,e])),u=s.slice(0,c).map(e=>{let t=l.get(e.id);return t===void 0?e:t}),d=new Set(u.filter(e=>!l.has(e.id)&&Ua(e)).map(e=>e.id)),f=new Set(u.map(e=>e.id)),p=u[0];if(p===void 0)throw Error(`unreachable: heldAt > 0`);return{messages:[...a.filter(e=>!f.has(e.id)),...u,...o],historyWindow:{drawnFromMessageId:p.id,olderCursor:e.historyWindow.olderCursor,filesBefore:t.filesBefore,revision:n},unvouchedMessageIds:d}}function Ha(e,t,n,r,i){return{messages:[...e,...t],historyWindow:{drawnFromMessageId:r,olderCursor:n.olderCursor,filesBefore:n.filesBefore,revision:i},unvouchedMessageIds:Ba}}function Ua(e){return e.blocks!==void 0&&e.blocks.some(e=>e.state===`active`)}function Wa(e,t){return t.size===0?e:e.map(e=>!t.has(e.id)||e.blocks===void 0?e:{...e,blocks:e.blocks.map(e=>e.state===`active`?{...e,state:`superseded`}:e)})}function Ga(e){return{drawnFromMessageId:null,olderCursor:null,filesBefore:[],revision:e.historyWindow.revision+1}}function Ka(e){let t=Object.entries(e),n=t.filter(([,e])=>e.some(e=>e.state===`active`));return n.length===t.length?e:Object.fromEntries(n)}function qa(e,t){if(t.conversationId!==e.conversationId||t.windowRevision!==e.historyWindow.revision||t.cursor!==e.historyWindow.olderCursor)return{kind:`stale`};let n=new Set(Pa(e).map(e=>e.id)),r=t.messages.map(e=>e.id).filter(e=>n.has(e));return r.length>0?{kind:`overlap`,overlappingIds:r}:{kind:`apply`}}function Ja(e,t){let n=Na(e),r=e.messages.slice(0,n),i=e.messages.slice(n),a=new Map(r.map(e=>[e.id,e])),o=new Set(t.messages.map(e=>e.id)),s=t.messages.map(e=>{let t=a.get(e.id);if(t===void 0)return e;let n=t.blocks??[],r=Oa(n,e.blocks??[]);return La(r,n)?t:{...t,blocks:r}}),c=Sa([...r.filter(e=>!o.has(e.id)),...s,...i]),l=t.messages[0];return{messages:za(e.messages,c),historyWindow:{...e.historyWindow,drawnFromMessageId:l===void 0?e.historyWindow.drawnFromMessageId:l.id,olderCursor:t.olderCursor}}}function Ya(e,t){return t.type!==`message-appended`&&t.type!==`block-upsert`||e.conversationId!==t.conversationId?!1:t.type===`message-appended`||!Xa(e,t.messageId)}function Xa(e,t){return e.messages.some(e=>e.id===t)}function Za(e,t){if(!Ya(e,t))return e;if(Xa(e,t.messageId))return e.pendingRefetch?e:{...e,pendingRefetch:!0};let n=e.appendedRowsOwed.includes(t.messageId)?e.appendedRowsOwed:[...e.appendedRowsOwed,t.messageId];return e.pendingRefetch&&n===e.appendedRowsOwed?e:{...e,pendingRefetch:!0,appendedRowsOwed:n}}function Qa(e,t){if(e.appendedRowsOwed.length===0)return null;let n=new Set(e.messages.map(e=>e.id)),r=new Set(e.appendedRowsOwed),i=t.messages.filter(e=>r.has(e.id)&&!n.has(e.id));if(i.length===0)return null;let a=new Map(t.messages.map((e,t)=>[e.id,t])),o=i.reduce((t,n)=>$a(t,n,a,e.streamingMessageId),e.messages),s=/* @__PURE__ */ new Set([...e.pendingConfirmations.map(e=>e.toolCallId),...e.answeredToolCallIds]),c=(t.pendingConfirmations??[]).filter(e=>Ki(e.toolCallId)&&!s.has(e.toolCallId)),l=new Set(i.map(e=>e.id));return{...e,messages:o,pendingConfirmations:c.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...c],appendedRowsOwed:e.appendedRowsOwed.filter(e=>!l.has(e)),pendingRefetch:!0}}function $a(e,t,n,r){let i=n.get(t.id);if(i===void 0)return[...e,t];let a=e.findIndex(e=>{let t=n.get(e.id);return t!==void 0&&t>i}),o=r!==null&&!n.has(r)?e.findIndex(e=>e.id===r):-1,s=a>=0?a:o;return s<0?[...e,t]:[...e.slice(0,s),t,...e.slice(s)]}var eo=/\S/,to={content:e=>eo.test(e.content),thinkingText:e=>e.effort!==void 0&&ut(e.effort)&&e.thinkingText!==void 0&&e.thinkingText.length>0,toolCalls:e=>e.toolCalls!==void 0&&e.toolCalls.length>0,toolResults:(e,t)=>e.toolResults!==void 0&&e.toolResults.some(e=>t.isRenderableToolResult(e.result)),blocks:e=>e.blocks!==void 0&&e.blocks.length>0,pendingActionStatus:e=>e.pendingActionStatus!==void 0,attachments:e=>e.attachments!==void 0&&e.attachments.length>0};function no(e,t){return Object.values(to).some(n=>n(e,t))}var ro={conversationPermissionMode:null,permissionModeLane:null,completedPermissionModeLaneIds:/* @__PURE__ */ new Set};function io(e){return e.isStreaming||e.permissionModeLane!==null}function ao(e,t){return e===null||t.permissionModeVersion>e.permissionModeVersion}function oo(e,t){return t.conversationId!==e.conversationId||!ao(e.conversationPermissionMode,t)?e:{...e,conversationPermissionMode:{permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion}}}function so(e,t){return e===null?void 0:e.calls.find(e=>e.toolCallId===t)}function co(e,t){let n=e.completedPermissionModeLaneIds;return n.has(t)?n:new Set(n).add(t)}function lo(e,t){let{decisionLaneId:n,toolCallId:r}=t;if(e.completedPermissionModeLaneIds.has(n))return e;let i=e.permissionModeLane,a=i!==null&&i.decisionLaneId!==n,o=i===null||a?{decisionLaneId:n,calls:[]}:i,s=a&&i!==null?co(e,i.decisionLaneId):e.completedPermissionModeLaneIds;if(e.answeredToolCallIds.includes(r)||o.calls.some(e=>e.toolCallId===r))return o===i?e:{...e,permissionModeLane:o,completedPermissionModeLaneIds:s};let c=sa(e);return{...e,permissionModeLane:{decisionLaneId:o.decisionLaneId,calls:[...o.calls,{toolCallId:r,offer:t,outcome:null,handedBack:!1}]},completedPermissionModeLaneIds:s,confirmationAnchors:{...e.confirmationAnchors,[r]:c},confirmationStepAnchorId:c}}function uo(e,t){let n=e.permissionModeLane,r=so(n,t);return n===null||r===void 0||r.handedBack?e:{...e,permissionModeLane:{...n,calls:n.calls.map(e=>e.toolCallId===t?{...e,handedBack:!0}:e)}}}function fo(e,t,n){let r=e.permissionModeLane,i=so(r,t);return r===null||i===void 0||i.outcome===n?e:{...e,permissionModeLane:{...r,calls:r.calls.map(e=>e.toolCallId===t?{...e,outcome:n}:e)}}}function po(e,t){let n=e.permissionModeLane;return n===null||n.decisionLaneId!==t?e:{...e,permissionModeLane:null,completedPermissionModeLaneIds:co(e,t)}}function mo(e){let t=e.permissionModeLane;if(t===null)return e;let n=new Set(e.pendingConfirmations.map(e=>e.toolCallId)),r=t.calls.filter(t=>t.outcome===null&&!t.handedBack&&!n.has(t.toolCallId)&&!e.answeredToolCallIds.includes(t.toolCallId)).map(t=>{let n=e.confirmationAnchors[t.toolCallId];return ca(t.offer,n===void 0?null:n)});return{...e,pendingConfirmations:r.length===0?e.pendingConfirmations:[...e.pendingConfirmations,...r],permissionModeLane:null,completedPermissionModeLaneIds:co(e,t.decisionLaneId)}}function ho(e,t){var n;let r=e.conversationPermissionMode;if(t.permissionMode!==void 0&&t.permissionModeVersion!==void 0){if(t.permissionMode===null||t.permissionModeVersion===null)r=null;else{let e={permissionMode:t.permissionMode,permissionModeVersion:t.permissionModeVersion};ao(r,e)&&(r=e)}}let i=e.permissionModeLane,a=i!==null&&((n=t.decisionLaneCompletedIds)==null?void 0:n.includes(i.decisionLaneId))===!0;return{conversationPermissionMode:r,permissionModeLane:a?null:i,completedPermissionModeLaneIds:a&&i!==null?co(e,i.decisionLaneId):e.completedPermissionModeLaneIds}}function go(e){return!e.pendingSend&&!e.isStreaming}var _o=[`agent_question`,`workflow_lead`],vo={messages:[],isStreaming:!1,thinkingText:``,...ta,...ro,pendingQuestionBatch:null,pendingMessageBlocks:{},error:null,conversationId:null,streamingMessageId:null,thinkingStartedAt:null,pendingSend:!1,pendingRefetch:!1,appendedRowsOwed:[],ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,historyWindow:Ma},yo={thinkingText:``,thinkingStartedAt:null};function bo(e,t){if(e.streamingMessageId===null)return e;let n=e.streamingMessageId;return{...e,messages:e.messages.map(e=>e.id===n?t(e):e)}}function xo(e){return typeof e==`object`&&!!e&&`mode`in e&&e.mode===`preview_confirm`&&`changeSetId`in e&&typeof e.changeSetId==`string`&&`projectId`in e&&typeof e.projectId==`string`}function So(e,t){return e.kind===`run_wait`&&typeof e.payload==`object`&&e.payload!==null&&`toolCallId`in e.payload&&e.payload.toolCallId===t}function Co(e,t,n){for(let r=e.length-1;r>=0;--r){let i=e[r];if((i==null?void 0:i.id)===t&&n(i))return!0}return!1}function wo(e,t){let n=e[t];return typeof n==`string`?n:void 0}function To(e,t){let n=e[t];return typeof n==`number`&&Number.isInteger(n)&&n>=0?n:void 0}function Eo(e){return e.pendingRefetch?e:{...e,pendingRefetch:!0}}function Do(e,t){switch(t.type){case`conversation-permission-mode`:return oo(e,t);case`action-required`:{if(t.decidedBy!==`permission_mode`)return null;let n=e.ignoredHydratedReplayMessageId,r=n===null?e:{...e,confirmationStepAnchorId:n},i=lo(r,t);return i===r?e:{...i,...yo,isStreaming:!1,streamingMessageId:null,pendingSend:!1}}case`decision-complete`:return e.permissionModeLane!==null&&e.permissionModeLane.decisionLaneId===t.decisionLaneId?po(e,t.decisionLaneId):null;default:return null}}function Oo(e,t,n){let r=Do(e,t);if(r!==null)return r;if(e.ignoredContinuationGeneration&&t.type!==`message-start`&&t.type!==`block-upsert`&&t.type!==`message-appended`&&(e.ignoredHydratedReplayMessageId===null||t.type!==`action-required`&&t.type!==`action-resolved`))return t.type===`done`?{...e,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null}:e;switch(t.type){case`text-delta`:return bo(e,e=>({...e,content:e.content+t.text}));case`reasoning-delta`:return{...e,thinkingText:e.thinkingText+t.text,thinkingStartedAt:e.thinkingStartedAt??Date.now()};case`reasoning-done`:{let t=e.thinkingStartedAt?Math.round((Date.now()-e.thinkingStartedAt)/1e3):0;return{...bo(e,n=>({...n,thinkingText:e.thinkingText,thinkingDuration:t})),thinkingText:``,thinkingStartedAt:null}}case`conversation-started`:return{...e,conversationId:t.conversationId};case`message-start`:{if(t.continuationAttempt!==void 0){let n=t.continuationAttempt,r=[...e.messages].reverse().find(e=>e.role===`user`),i=Ta(e.messages,{messageId:t.messageId,continuationAttempt:n,replaceExisting:t.replaceExisting,effort:r==null?void 0:r.effort});return i.kind===`lower-attempt`?{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:null}:i.kind===`same-attempt-replay`?e:{...e,...yo,isStreaming:!0,streamingMessageId:t.messageId,error:null,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:i.messages}}if(ra(e,t.messageId))return!go(e)||e.confirmationAnswerInFlight?e:{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:t.messageId};let n=e.messages.findIndex(e=>e.id===t.messageId);if(n>=0&&!e.isStreaming){let r=e.messages[n];if(r.content.length>0)return{...e,ignoredContinuationGeneration:!0,ignoredHydratedReplayMessageId:t.messageId};if(r.role===`assistant`)return{...e,...yo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map((e,t)=>t===n?{id:e.id,role:`assistant`,content:``,...e.effort!==void 0&&{effort:e.effort},...e.blocks!==void 0&&{blocks:e.blocks}}:e)}}if(e.streamingMessageId&&e.messages.some(t=>t.id===e.streamingMessageId))return{...e,...yo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:e.messages.map(n=>n.id===e.streamingMessageId?{...n,id:t.messageId}:n)};let r=(()=>{let t=[...e.messages].reverse().find(e=>e.role===`user`);return t==null?void 0:t.effort})();return{...e,...yo,isStreaming:!0,streamingMessageId:t.messageId,ignoredContinuationGeneration:!1,ignoredHydratedReplayMessageId:null,messages:[...e.messages,{id:t.messageId,role:`assistant`,content:``,...r!==void 0&&{effort:r}}]}}case`tool-call-complete`:{let n=To(t,`contentOffset`);return bo(e,e=>({...e,toolCalls:[...e.toolCalls??[],{toolCallId:t.toolCallId,toolName:t.toolName,...t.title!==void 0&&{title:t.title},...t.effect!==void 0&&{effect:t.effect},...t.operationTitles!==void 0&&{operationTitles:t.operationTitles},args:t.args,...n===void 0?{}:{contentOffset:n}}]}))}case`tool-result`:{let n=bo(e,e=>({...e,toolResults:[...e.toolResults??[],{toolCallId:t.toolCallId,result:t.result}]}));return!xo(t.result)||e.streamingMessageId===null?n:{...n,confirmationAnchors:{...n.confirmationAnchors,[t.toolCallId]:e.streamingMessageId}}}case`action-required`:{let n=uo(e,t.toolCallId),r=n.ignoredHydratedReplayMessageId,i=oa(r===null?n:{...n,confirmationStepAnchorId:r},t);return i.kind===`redelivered`?n:{...n,...yo,...i.confirmation,isStreaming:!1,streamingMessageId:null,pendingSend:!1,confirmationAnswerInFlight:n.confirmationAnswerInFlight}}case`action-resolved`:{let n=fo(e,t.toolCallId,t.status);if(t.status===`applied`||t.status===`partially_applied`||(n.pendingMessageBlocks[t.messageId]??[]).some(e=>So(e,t.toolCallId))||Co(n.messages,t.messageId,e=>{var n,r;return((n=e.toolResults)==null?void 0:n.some(e=>e.toolCallId===t.toolCallId&&xo(e.result)))===!0||((r=e.blocks)==null?void 0:r.some(e=>So(e,t.toolCallId)))===!0})){let e={...n.confirmationAnchors};return delete e[t.toolCallId],{...n,confirmationAnchors:e,...ea(n,t.toolCallId)}}return{...n,...pa(n,t)}}case`block-upsert`:return ja(e,t);case`message-appended`:return Za(e,t);case`done`:return{...e,...yo,isStreaming:!1,streamingMessageId:null,pendingSend:!1,...ma(e)};case`error`:{let r=wo(t,`errorCode`),i=wo(t,`providerErrorCode`);return{...e,...yo,error:{code:t.code,message:t.message,...r===void 0?{}:{errorCode:r},...i===void 0?{}:{providerErrorCode:i}},isStreaming:!1,streamingMessageId:null,pendingSend:!1,...ma(e),messages:e.messages.filter(t=>!(t.id===e.streamingMessageId&&t.role===`assistant`&&!no(t,n)))}}default:return e}}function ko(e){return function(t,n){switch(n.type){case`EVENT`:{let r=Oo(t,n.payload,e);return n.payload.type===`message-start`&&r!==t?Aa(r):r}case`USER_MESSAGE`:{let{id:e,content:r,effort:i,attachments:a}=n.payload;return{...t,error:null,pendingSend:!0,...la(t),messages:[...t.messages,{id:e,role:`user`,content:r,...i!==void 0&&{effort:i},...a.length>0&&{attachments:a}}]}}case`ASSISTANT_PLACEHOLDER`:{let{id:e,effort:r}=n.payload,i=t.messages[t.messages.length-1],a=r===void 0?(i==null?void 0:i.role)===`user`?i.effort:void 0:r;return{...t,error:null,...yo,messages:[...t.messages,{id:e,role:`assistant`,content:``,...a!==void 0&&{effort:a}}],isStreaming:!0,streamingMessageId:e}}case`CONFIRM_ACTION`:case`REJECT_ACTION`:return ua(t,n.toolCallId);case`LEAD_DECISION_REFUSED`:return{...t,...ha(t,n.toolCallId)};case`DECISION_LANE_COMPLETE`:return t.confirmationAnswerInFlight?{...t,confirmationAnswerInFlight:!1}:t;case`CONVERSATION_PERMISSION_MODE`:return oo(t,n.payload);case`PERMISSION_MODE_LANE_EXPIRED`:return mo(t);case`HYDRATE_HISTORY`:{if(n.payload.conversationId!==t.conversationId)return t;if(!go(t)||n.payload.readDuringTurn===!0)return Qa(t,n.payload)??Eo(t);if(!_a(t,n.payload))return Eo(t);let{historyWindow:e}=n.payload,r=e===void 0?{messages:n.payload.messages,historyWindow:Ga(t),unvouchedMessageIds:/* @__PURE__ */ new Set}:Va(t,{messages:n.payload.messages,...e}),i=za(t.messages,Wa(ka(r.messages,t),r.unvouchedMessageIds)),a=new Set(i.map(e=>e.id)),o=Object.fromEntries(Object.entries(t.pendingMessageBlocks).filter(([e])=>!a.has(e))),s=e===void 0?o:Ka(o),c=Ea(i)??Ea(Object.entries(s).map(([e,t])=>({id:e,role:`assistant`,blocks:t})));return{...vo,conversationId:t.conversationId,...ya(t,n.payload),...ho(t,n.payload),messages:i,pendingQuestionBatch:c,pendingMessageBlocks:s,appendedRowsOwed:t.appendedRowsOwed.filter(e=>!a.has(e)),historyWindow:r.historyWindow}}case`PREPEND_OLDER_HISTORY`:return qa(t,n.payload).kind===`apply`?{...t,...Ja(t,n.payload)}:t;case`BIND_CONVERSATION`:return t.conversationId===n.payload.conversationId?t:{...vo,conversationId:n.payload.conversationId};case`ADOPT_CONVERSATION`:return t.conversationId===null?{...t,conversationId:n.payload.conversationId}:t;case`RESET`:{let e=n.payload===void 0?null:n.payload.conversationId;return{...vo,conversationId:e}}default:return t}}}function Ao(e){return e.selectedOptionIds===void 0?e.customText===void 0?{questionId:e.questionId,skip:!0}:{questionId:e.questionId,customText:e.customText}:{questionId:e.questionId,selectedOptionIds:[...e.selectedOptionIds].sort()}}function jo(e,t,n){return JSON.stringify({kind:`answer`,batchId:e,revision:t,answers:[...n].sort((e,t)=>e.questionId.localeCompare(t.questionId)).map(Ao)})}function Mo(e,t){return JSON.stringify({kind:`cancel`,batchId:e,revision:t})}async function No(e,t){if(!e)throw Error(`Question retry identity requires a conversation`);let n=JSON.stringify([`chat-question-command-v1`,e,t]),r=new Uint8Array(await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(n)));r[6]=r[6]&15|128,r[8]=r[8]&63|128;let i=Array.from(r.slice(0,16),e=>e.toString(16).padStart(2,`0`)).join(``);return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}function Po(){return{watched:{},hidden:!1}}function Fo(e){let t=e.type;throw Error(`jobStatusWatch: unhandled action type ${String(t)}`)}function Io(e,t){return Math.min(e.baseIntervalMs*e.backoffFactor**t,e.maxIntervalMs)}function Lo(e,t){return!e.terminal&&e.nextDueAt<=t}function Ro(e,t,n){return{...e,watched:{...e.watched,[t]:n}}}function zo(e,t){return e.hidden?[]:Object.entries(e.watched).filter(([,e])=>Lo(e,t)).map(([e])=>e)}function Bo(e){if(e.hidden)return null;let t=null;for(let n of Object.values(e.watched))n.terminal||(t===null||n.nextDueAt<t)&&(t=n.nextDueAt);return t}function Vo(e){return function(t,n){switch(n.type){case`WATCH`:{let{agentJobId:r,seed:i,now:a}=n,o=t.watched[r];return o===void 0?{...t,watched:{...t.watched,[r]:{view:i,attempt:0,nextDueAt:a,terminal:i!==null&&e.isTerminal(i),error:null}}}:i===null||o.view!==null?t:Ro(t,r,{...o,view:i,terminal:e.isTerminal(i)})}case`UNWATCH`:{let{agentJobId:e}=n;if(t.watched[e]===void 0)return t;let r={};for(let[n,i]of Object.entries(t.watched))n!==e&&(r[n]=i);return{...t,watched:r}}case`READ_OK`:{let{agentJobId:r,view:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(e.isTerminal(i))return Ro(t,r,{view:i,attempt:0,nextDueAt:a,terminal:!0,error:null});let s=o.view,c=s===null||e.activityStamp(s)!==e.activityStamp(i)?0:o.attempt+1;return Ro(t,r,{view:i,attempt:c,nextDueAt:a+Io(e,c),terminal:!1,error:null})}case`READ_FAIL`:{let{agentJobId:r,error:i,now:a}=n,o=t.watched[r];if(o===void 0)return t;if(o.terminal)return Ro(t,r,{...o,error:i});let s=o.attempt+1;return Ro(t,r,{...o,attempt:s,nextDueAt:a+Io(e,s),error:i})}case`TICK`:{let{now:r}=n;if(t.hidden)return t;let i=Object.entries(t.watched).filter(([,e])=>Lo(e,r));if(i.length===0)return t;let a={...t.watched};for(let[t,n]of i)a[t]={...n,nextDueAt:r+Io(e,n.attempt)};return{...t,watched:a}}case`VISIBILITY`:{let{hidden:e,now:r}=n;if(e===t.hidden)return t;if(e)return{...t,hidden:!0};let i={};for(let[e,n]of Object.entries(t.watched))i[e]=n.terminal?n:{...n,nextDueAt:r};return{watched:i,hidden:!1}}default:return Fo(n)}}}var Ho=class extends Error{constructor(e,t){super(`Chat command ${t} failed: ${e}`),this.name=`ChatTransportError`,this.code=e,this.requestId=t}};function Uo(e){return e instanceof Ho}var Wo=3e4,Go=class extends Error{constructor(e){super(`Chat capability load exceeded ${e}ms`),this.name=`CapabilityLoadTimeoutError`,this.timeoutMs=e}};function Ko(e){return e instanceof Go}function qo(e,t,n){let r=null,i=new Promise((e,i)=>{r=t.setTimeout(()=>i(new Go(n)),n)});return Promise.race([e,i]).finally(()=>{r!==null&&t.clearTimeout(r)})}function Jo(e){return e.status===`ready`}function Yo(e){return e.connectionStatus===`lost`||e.connectionStatus===`failed`?!1:e.isStreaming||Jo(e.capabilityLoad)}function Xo(){return globalThis.crypto.randomUUID()}function Zo(e){return e instanceof Error?e.message:String(e)}var Qo=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},V=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps={status:`idle`};function ms(e,t){return e.status===`idle`||e.conversationId!==t?{status:`idle`}:e.status===`writing`?{status:`writing`}:{status:`failed`,attempted:e.attempted}}function hs(e){let{conversationId:t,permissionModeWrite:n}=e,r=ms(n,t),i=r.status===`writing`&&n.status===`writing`?n.target:null;if(t!==null){let n=e.conversationPermissionMode;return n===null?{kind:`unknown`,read:`loading`}:{kind:`known`,scope:`conversation`,conversationId:t,value:i===null?n.permissionMode:i,version:n.permissionModeVersion,write:r}}let a=e.lastPermissionMode;return a===null?{kind:`unknown`,read:e.lastPermissionModeReadFailed?`failed`:`loading`}:{kind:`known`,scope:`last-choice`,conversationId:null,value:i===null?a:i,version:null,write:r}}var gs=class{constructor(e){$o.add(this),es.set(this,void 0),ts.set(this,0),ns.set(this,0),rs.set(this,null),is.set(this,0),as.set(this,null),Qo(this,es,e,`f`)}view(){return V(this,es,`f`).store.getSnapshot().permissionMode}async settledNewConversationMode(e){if(V(this,as,`f`)===null)return e;for(;V(this,as,`f`)!==null;)await V(this,as,`f`);let t=this.view();return t.kind===`known`&&t.scope===`last-choice`?t.value:null}refresh(){let{store:e}=V(this,es,`f`);if(V(this,es,`f`).isDisposed()||e.state.conversationId!==null)return;let t=V(this,rs,`f`);(t===null||t.epoch!==V(this,ts,`f`))&&V(this,$o,`m`,os).call(this)}rereadStale(){let{store:e}=V(this,es,`f`);V(this,es,`f`).isDisposed()||e.state.conversationId!==null||(e.update({lastPermissionMode:null}),V(this,$o,`m`,os).call(this))}set(e){if(V(this,es,`f`).isDisposed())return;let t=this.view();if(t.kind===`unknown`||t.write.status===`writing`)return;if(t.value===e){t.write.status===`failed`&&this.dismissFailure();return}Qo(this,is,V(this,is,`f`)+1,`f`);let n=V(this,is,`f`),{conversationId:r}=t;V(this,es,`f`).store.update({permissionModeWrite:{status:`writing`,seq:n,conversationId:r,target:e}}),r===null?V(this,$o,`m`,cs).call(this,n,e):V(this,$o,`m`,ss).call(this,n,r,e)}retry(){let e=V(this,es,`f`).store.state.permissionModeWrite;e.status===`failed`&&e.conversationId===V(this,es,`f`).store.state.conversationId&&(V(this,es,`f`).store.update({permissionModeWrite:ps}),this.set(e.attempted))}dismissFailure(){V(this,es,`f`).store.state.permissionModeWrite.status===`failed`&&V(this,es,`f`).store.update({permissionModeWrite:ps})}};es=/* @__PURE__ */ new WeakMap,ts=/* @__PURE__ */ new WeakMap,ns=/* @__PURE__ */ new WeakMap,rs=/* @__PURE__ */ new WeakMap,is=/* @__PURE__ */ new WeakMap,as=/* @__PURE__ */ new WeakMap,$o=/* @__PURE__ */ new WeakSet,os=function(){let{store:e,deps:t}=V(this,es,`f`);Qo(this,ts,V(this,ts,`f`)+1,`f`);let n=V(this,ts,`f`);e.state.lastPermissionModeReadFailed&&e.update({lastPermissionModeReadFailed:!1});let r=()=>!V(this,es,`f`).isDisposed()&&n===V(this,ts,`f`),i={epoch:n,done:t.permissionModes.readLastChoice().then(e=>{r()&&V(this,$o,`m`,ds).call(this,e)},n=>{t.logger.warn(`ChatSession: last permission mode read failed`,{error:Zo(n)}),r()&&e.update({lastPermissionMode:null,lastPermissionModeReadFailed:!0})}).finally(()=>{V(this,rs,`f`)===i&&Qo(this,rs,null,`f`)})};Qo(this,rs,i,`f`)},ss=function(e,t,n){let{deps:r}=V(this,es,`f`),i=V(this,$o,`m`,ls).call(this);r.permissionModes.setConversationMode(t,n).then(n=>{V(this,es,`f`).isDisposed()||(V(this,es,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:t,...n}}),V(this,$o,`m`,us).call(this,i,n.permissionMode),V(this,$o,`m`,fs).call(this,e,ps))},i=>{V(this,es,`f`).isDisposed()||(r.logger.warn(`ChatSession: conversation permission mode write failed`,{conversationId:t,error:Zo(i)}),V(this,$o,`m`,fs).call(this,e,{status:`failed`,conversationId:t,attempted:n}))})},cs=function(e,t){let{deps:n}=V(this,es,`f`),r=V(this,$o,`m`,ls).call(this),i=n.permissionModes.writeLastChoice(t).then(t=>{V(this,es,`f`).isDisposed()||(V(this,$o,`m`,us).call(this,r,t),V(this,$o,`m`,fs).call(this,e,ps))},r=>{V(this,es,`f`).isDisposed()||(n.logger.warn(`ChatSession: last permission mode write failed`,{error:Zo(r)}),V(this,$o,`m`,fs).call(this,e,{status:`failed`,conversationId:null,attempted:t}),V(this,es,`f`).store.state.conversationId===null&&V(this,$o,`m`,os).call(this))}).finally(()=>{V(this,as,`f`)===i&&Qo(this,as,null,`f`)});Qo(this,as,i,`f`)},ls=function(){return Qo(this,ns,V(this,ns,`f`)+1,`f`),V(this,ns,`f`)},us=function(e,t){Qo(this,ts,V(this,ts,`f`)+1,`f`),e===V(this,ns,`f`)&&V(this,$o,`m`,ds).call(this,t)},ds=function(e){let{state:t}=V(this,es,`f`).store;(t.lastPermissionMode!==e||t.lastPermissionModeReadFailed)&&V(this,es,`f`).store.update({lastPermissionMode:e,lastPermissionModeReadFailed:!1})},fs=function(e,t){let n=V(this,es,`f`).store.state.permissionModeWrite;n.status===`writing`&&n.seq===e&&V(this,es,`f`).store.update({permissionModeWrite:t})};function _s(e,t){return e===t}function vs(e,t){return t!==null&&t===e}function ys(e,t){return e!==t&&e!==null}function bs(e,t,n){return e||t?!1:n!==void 0&&n.role===`user`&&n.content.trim()!==``}var xs=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Ss=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs=class{constructor(e,t,n,r){Cs.add(this),ws.set(this,void 0),Ts.set(this,void 0),Es.set(this,void 0),Ds.set(this,void 0),Os.set(this,0),ks.set(this,null),As.set(this,0),js.set(this,0),Ms.set(this,0),Ns.set(this,null),xs(this,ws,e,`f`),xs(this,Ts,t,`f`),xs(this,Es,n,`f`),xs(this,Ds,r,`f`)}get generation(){return Ss(this,Os,`f`)}get catchUpInFlight(){return Ss(this,As,`f`)>0}noteRowAnnounced(){xs(this,Ns,Ss(this,js,`f`),`f`)}get rowsOwed(){return Ss(this,Ns,`f`)!==null&&Ss(this,Ns,`f`)>=Ss(this,Ms,`f`)}select(e,t){let{store:n,stallGuard:r,deps:i}=Ss(this,ws,`f`),a=n.state.conversationId;if(e!==null&&e===a)return;let o=n.state.projectId;if(e!==null&&o===null){i.logger.error(`ChatSession: selection of a conversation with no project`,{conversationId:e});return}r.disarm(),xs(this,Os,Ss(this,Os,`f`)+1,`f`),xs(this,As,0,`f`),xs(this,Ns,null,`f`),Ss(this,Ts,`f`).call(this);let s={historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],permissionModeWrite:ps,olderHistoryRead:`idle`};if(e===null){xs(this,ks,null,`f`),Ss(this,ws,`f`).dispatch({type:`RESET`,payload:{conversationId:null}}),n.update({conversationId:null,...s}),i.transport.close(),Ss(this,Ds,`f`).call(this);return}xs(this,ks,t===`stream-created`?e:null,`f`),Ss(this,ws,`f`).dispatch(t===`stream-created`?{type:`ADOPT_CONVERSATION`,payload:{conversationId:e}}:{type:`BIND_CONVERSATION`,payload:{conversationId:e}}),n.update({conversationId:e,...s}),o!==null&&i.transport.open({conversationId:e,projectId:o,...i.open}).catch(t=>{i.logger.error(`ChatSession: transport.open failed`,{conversationId:e,error:Zo(t)})}),t===`load-history`&&!vs(e,Ss(this,ks,`f`))&&this.readHistory(e,`selection`)}async readHistory(e,t){let{store:n,deps:r}=Ss(this,ws,`f`),i=Ss(this,Os,`f`);xs(this,js,Ss(this,js,`f`)+1,`f`);let a=Ss(this,js,`f`),o=()=>!Ss(this,ws,`f`).isDisposed()&&i===Ss(this,Os,`f`)&&_s(e,n.state.conversationId);t===`selection`?n.update({historyLoad:{status:`loading`,conversationId:e}}):xs(this,As,Ss(this,As,`f`)+1,`f`);let s=n.state.chat.reofferedToolCallIds,c=!go(n.state.chat),l;try{l=await r.conversations.loadLatest(e,{decisionLaneId:Ss(this,Es,`f`).currentLaneId(),outstandingCallIds:n.state.chat.pendingConfirmations.map(e=>e.toolCallId)})}catch(i){return o()?(r.logger.error(`ChatSession: history read failed`,{conversationId:e,mode:t,error:Zo(i)}),Ss(this,Cs,`m`,Ps).call(this,a,e,t,null)?`superseded`:t===`catch-up`?`failed`:(this.select(null,`load-history`),n.update({historyLoad:{status:`failed`,conversationId:e,notFound:!1}}),`failed`)):`left`}finally{t===`catch-up`&&i===Ss(this,Os,`f`)&&xs(this,As,Ss(this,As,`f`)-1,`f`)}if(!o())return`left`;if(l.kind===`not-found`)return this.conversationGone(e),`failed`;let{page:u}=l;if(Ss(this,Cs,`m`,Ps).call(this,a,e,t,u))return`superseded`;xs(this,Ms,a,`f`),t===`selection`&&n.update({historyLoad:{status:`idle`},restoredQuestionBatchIds:u.messages.flatMap(xa).map(e=>e.id)});let{windowFirstMessageId:d,olderCursor:f,filesBefore:p,...m}=u;return Ss(this,ws,`f`).dispatch({type:`HYDRATE_HISTORY`,payload:{...m,historyWindow:{windowFirstMessageId:d,olderCursor:f,filesBefore:p},conversationId:e,reofferedBeforeRead:s,readDuringTurn:c}}),Ss(this,Es,`f`).onHistory(u),`applied`}conversationGone(e){let{store:t,deps:n}=Ss(this,ws,`f`);n.logger.warn(`ChatSession: conversation no longer exists \u2014 forgotten`,{conversationId:e});let r=t.state.projectId;r!==null&&n.memory.forget(r).catch(e=>{n.logger.error(`ChatSession: memory.forget failed`,{projectId:r,error:Zo(e)})}),this.select(null,`load-history`),t.update({historyLoad:{status:`failed`,conversationId:e,notFound:!0}})}};ws=/* @__PURE__ */ new WeakMap,Ts=/* @__PURE__ */ new WeakMap,Es=/* @__PURE__ */ new WeakMap,Ds=/* @__PURE__ */ new WeakMap,Os=/* @__PURE__ */ new WeakMap,ks=/* @__PURE__ */ new WeakMap,As=/* @__PURE__ */ new WeakMap,js=/* @__PURE__ */ new WeakMap,Ms=/* @__PURE__ */ new WeakMap,Ns=/* @__PURE__ */ new WeakMap,Cs=/* @__PURE__ */ new WeakSet,Ps=function(e,t,n,r){return e>=Ss(this,Ms,`f`)?!1:(Ss(this,ws,`f`).deps.logger.debug(`ChatSession: history page superseded by a newer read`,{conversationId:t,mode:n,read:e,newestLandedRead:Ss(this,Ms,`f`)}),n===`selection`&&Ss(this,ws,`f`).store.update({historyLoad:{status:`idle`},...r===null?{}:{restoredQuestionBatchIds:r.messages.flatMap(xa).map(e=>e.id)}}),!0)};var Is=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Ls=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Rs,zs,Bs=class{constructor(e,t){Rs.set(this,void 0),zs.set(this,void 0),Is(this,Rs,e,`f`),Is(this,zs,t,`f`)}load(){let{store:e,deps:t}=Ls(this,Rs,`f`),{conversationId:n,chat:r,olderHistoryRead:i}=e.state;if(Ls(this,Rs,`f`).isDisposed()||n===null||i===`loading`)return;let a=r.historyWindow.olderCursor;if(a===null)return;let o=Ls(this,zs,`f`).generation,s=r.historyWindow.revision,c=()=>!Ls(this,Rs,`f`).isDisposed()&&o===Ls(this,zs,`f`).generation&&e.state.conversationId===n;e.update({olderHistoryRead:`loading`}),t.conversations.loadOlder(n,a).then(r=>{if(!c())return;if(r.kind===`not-found`){Ls(this,zs,`f`).conversationGone(n);return}let i={conversationId:n,windowRevision:s,cursor:a,messages:r.page.messages,olderCursor:r.page.olderCursor},o=qa(e.state.chat,i);if(o.kind===`overlap`){t.logger.error(`ChatSession: older history page overlaps the drawn rows \u2014 dropped`,{conversationId:n,overlappingIds:o.overlappingIds}),e.update({olderHistoryRead:`failed`});return}o.kind===`stale`?t.logger.debug(`ChatSession: older history page predates the window \u2014 dropped`,{conversationId:n,windowRevision:s,currentRevision:e.state.chat.historyWindow.revision}):Ls(this,Rs,`f`).dispatch({type:`PREPEND_OLDER_HISTORY`,payload:i}),e.update({olderHistoryRead:`idle`})},r=>{c()&&(t.logger.error(`ChatSession: older history read failed`,{conversationId:n,error:Zo(r)}),e.update({olderHistoryRead:`failed`}))})}};Rs=/* @__PURE__ */ new WeakMap,zs=/* @__PURE__ */ new WeakMap;function Vs(e,t){return e.runnerType===`extension`&&e.panelId===t}var Hs={streamStalled:`client.stream_stalled`,connectionLostDuringStream:`client.connection_lost_during_stream`,turnHeldUnsent:`client.turn_held_unsent`,permissionModeChanged:`client.permission_mode_changed`,browserApiActionFailed:`client.browser_api_action_failed`,atlasHostActionFailed:`client.atlas_host_action_failed`,aiRunHostActionFailed:`client.ai_run_host_action_failed`,workflowHostActionFailed:`client.workflow_host_action_failed`};function Us(e){return e}function Ws(e,t){return Us({type:`error`,code:`internal`,message:t,fatal:!1,category:e===Hs.streamStalled?`transient`:`persistent`,errorCode:e})}function Gs(){return Ws(Hs.streamStalled,`stream made no progress`)}function Ks(e){return Us({type:`error`,code:e.errorCode,message:e.errorMessage===null?`chat-send rejected: ${e.errorCode}`:e.errorMessage,fatal:!1,category:`persistent`,errorCode:e.errorCode})}function qs(){return{type:`done`,totalCreditsUsed:0}}var Js=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},Ys=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Xs,Zs,Qs,$s,ec,tc,nc;function rc(e,t){let{conversationId:n,toolCallId:r}=t;switch(t.kind){case`api-request-in-browser`:case`api-step-in-browser`:{var i;let a=(i=e.executeApiHostAction)==null?void 0:i.bind(e);return a===void 0?null:async()=>{let e=await a(t);return e===null?null:{name:`chat-host-action-complete`,conversationId:n,toolCallId:r,historyId:e}}}case`atlas-crawl-in-tab`:{var a;let i=(a=e.executeAtlasHostAction)==null?void 0:a.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-atlas-host-action-complete`,conversationId:n,toolCallId:r,atlasRunId:e}}}case`ai-run-in-browser`:{var o;let i=(o=e.executeAiRunHostAction)==null?void 0:o.bind(e);return i===void 0?null:async()=>{let e=await i(t);return e===null?null:{name:`chat-ai-host-action-complete`,conversationId:n,toolCallId:r,aiRunId:e}}}case`workflow-host-in-browser`:{var s;let n=(s=e.executeWorkflowHostAction)==null?void 0:s.bind(e);return n===void 0?null:async()=>(await n(t),null)}}}function ic(e){switch(e.kind){case`api-request-in-browser`:case`api-step-in-browser`:return Hs.browserApiActionFailed;case`atlas-crawl-in-tab`:return Hs.atlasHostActionFailed;case`ai-run-in-browser`:return Hs.aiRunHostActionFailed;case`workflow-host-in-browser`:return Hs.workflowHostActionFailed}}var ac=class{constructor(e,t){Xs.add(this),Zs.set(this,void 0),Qs.set(this,void 0),$s.set(this,/* @__PURE__ */ new Set),Js(this,Zs,e,`f`),Js(this,Qs,t,`f`)}reset(){Ys(this,$s,`f`).clear()}handle(e){let{deps:t,store:n}=Ys(this,Zs,`f`),r=e.hostAction;if(r.toolCallId!==e.toolCallId||n.state.conversationId!==r.conversationId){t.logger.error(`ChatSession: deferred host action identity mismatch`,{toolCallId:e.toolCallId,conversationId:r.conversationId});return}if(!Vs(t.open,r.executorPanelId)){t.logger.debug(`ChatSession: deferred host action for another panel \u2014 not executed here`,{toolCallId:r.toolCallId,kind:r.kind});return}let i=t.browser===null?null:rc(t.browser,r);if(i===null){t.logger.error(`ChatSession: deferred action on a host without a browser port`,{toolCallId:r.toolCallId,kind:r.kind});return}let a=`${r.conversationId}:${r.toolCallId}`;Ys(this,$s,`f`).has(a)||(Ys(this,$s,`f`).add(a),Ys(this,Xs,`m`,tc).call(this,r,i).finally(()=>Ys(this,$s,`f`).delete(a)))}};Zs=/* @__PURE__ */ new WeakMap,Qs=/* @__PURE__ */ new WeakMap,$s=/* @__PURE__ */ new WeakMap,Xs=/* @__PURE__ */ new WeakSet,ec=function(e){return!Ys(this,Zs,`f`).isDisposed()&&Ys(this,Zs,`f`).store.state.conversationId===e.conversationId},tc=async function(e,t){let n;try{n=await t()}catch(t){Ys(this,Zs,`f`).deps.logger.error(`ChatSession: deferred host action failed`,{toolCallId:e.toolCallId,kind:e.kind,errorType:t instanceof Error?t.name:typeof t}),Ys(this,Xs,`m`,ec).call(this,e)&&Ys(this,Zs,`f`).feedLocalEvent(Ws(ic(e),`deferred host action did not finish`));return}n!==null&&Ys(this,Xs,`m`,ec).call(this,e)&&await Ys(this,Xs,`m`,nc).call(this,e,n)},nc=async function(e,t){let{deps:n}=Ys(this,Zs,`f`),r;try{r=await n.transport.send({...t,requestId:Ys(this,Zs,`f`).newId()})}catch(t){n.logger.warn(`ChatSession: host action completion was not delivered`,{toolCallId:e.toolCallId,kind:e.kind,error:Zo(t)});return}r.status!==`accepted`&&(n.logger.warn(`ChatSession: host action completion was rejected`,{toolCallId:e.toolCallId,kind:e.kind,errorCode:r.errorCode}),Ys(this,Xs,`m`,ec).call(this,e)&&Ys(this,Qs,`f`).refetchHistory())};var oc={phase:`idle`},sc=`chat.busy`,cc=1;function lc(e,t){if(t.type===`ABORTED`)return oc;if(t.type===`CAPTURE_REQUESTED`)return{phase:`awaiting_turn_end`,req:t.req};switch(e.phase){case`idle`:return e;case`awaiting_turn_end`:return t.type===`TURN_SETTLED`?{phase:`capturing`,req:e.req}:e;case`capturing`:return t.type===`CAPTURE_DONE`&&t.captureRequestId===e.req.captureRequestId?{phase:`delivering`,req:e.req}:e;case`delivering`:return t.type===`DELIVERY_SETTLED`||t.type===`DELIVERY_REJECTED`?oc:e;default:return e}}function uc(e,t){return e===sc&&t<cc}function dc(e){switch(e.phase){case`idle`:return`idle`;case`awaiting_turn_end`:case`capturing`:return`scanning`;case`delivering`:return`delivering`;default:return e}}var fc=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},H=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc=class{constructor(e){pc.add(this),mc.set(this,void 0),hc.set(this,oc),gc.set(this,null),_c.set(this,0),vc.set(this,!1),yc.set(this,!1),bc.set(this,null),fc(this,mc,e,`f`)}get phase(){return H(this,hc,`f`)}get failureReason(){let e=H(this,gc,`f`);return H(this,hc,`f`).phase!==`delivering`||e===null?null:e.status===`failed`?e.reason:null}request(e){H(this,pc,`m`,xc).call(this),H(this,pc,`m`,Cc).call(this,{type:`CAPTURE_REQUESTED`,req:e})}onEvent(e){let t=H(this,hc,`f`);if(t.phase===`delivering`&&H(this,yc,`f`)){(e.type===`done`||e.type===`error`)&&(fc(this,yc,!1,`f`),H(this,pc,`m`,Cc).call(this,{type:`DELIVERY_SETTLED`}));return}if(e.type===`done`){if(t.phase===`awaiting_turn_end`){H(this,pc,`m`,Cc).call(this,{type:`TURN_SETTLED`}),H(this,pc,`m`,Tc).call(this,t.req);return}t.phase===`delivering`&&H(this,vc,`f`)&&(fc(this,vc,!1,`f`),H(this,pc,`m`,Ec).call(this,t.req))}}abort(){H(this,pc,`m`,xc).call(this),H(this,pc,`m`,Cc).call(this,{type:`ABORTED`})}};mc=/* @__PURE__ */ new WeakMap,hc=/* @__PURE__ */ new WeakMap,gc=/* @__PURE__ */ new WeakMap,_c=/* @__PURE__ */ new WeakMap,vc=/* @__PURE__ */ new WeakMap,yc=/* @__PURE__ */ new WeakMap,bc=/* @__PURE__ */ new WeakMap,pc=/* @__PURE__ */ new WeakSet,xc=function(){var e;(e=H(this,bc,`f`))==null||e.abort(),fc(this,bc,null,`f`),fc(this,gc,null,`f`),fc(this,_c,0,`f`),fc(this,vc,!1,`f`),fc(this,yc,!1,`f`)},Sc=function(){return H(this,hc,`f`).phase},Cc=function(e){let t=lc(H(this,hc,`f`),e);t!==H(this,hc,`f`)&&(fc(this,hc,t,`f`),H(this,mc,`f`).onChange())},wc=function(e){let t=H(this,hc,`f`);return t.phase!==`idle`&&t.req.captureRequestId===e.captureRequestId},Tc=function(e){H(this,mc,`f`).browser.capturePage({toolCallId:e.toolCallId,captureRequestId:e.captureRequestId}).then(t=>{if(H(this,hc,`f`).phase===`capturing`&&H(this,pc,`m`,wc).call(this,e)){if(H(this,pc,`m`,Cc).call(this,{type:`CAPTURE_DONE`,captureRequestId:t.captureRequestId}),H(this,pc,`m`,Sc).call(this)!==`delivering`){H(this,mc,`f`).logger.error(`page analysis: capture answered for another request`,{expected:e.captureRequestId,received:t.captureRequestId}),this.abort();return}t.status===`failed`&&H(this,mc,`f`).logger.warn(`page analysis: capture failed \u2014 delivered as a failure report`,{captureRequestId:e.captureRequestId,reason:t.reason}),fc(this,gc,t,`f`),fc(this,_c,0,`f`),H(this,mc,`f`).onChange(),H(this,pc,`m`,Ec).call(this,e)}},t=>{H(this,pc,`m`,wc).call(this,e)&&(H(this,mc,`f`).logger.error(`page analysis: capture rejected`,{captureRequestId:e.captureRequestId,error:t instanceof Error?t.message:String(t)}),this.abort())})},Ec=function(e){let t=H(this,gc,`f`);if(t===null||t.captureRequestId!==e.captureRequestId){H(this,mc,`f`).logger.error(`page analysis: delivering without the matching snapshot`,{captureRequestId:e.captureRequestId}),this.abort();return}let n=new AbortController;fc(this,bc,n,`f`),H(this,mc,`f`).deliver(t,n.signal).then(t=>{if(H(this,hc,`f`).phase===`delivering`&&H(this,pc,`m`,wc).call(this,e))switch(t.kind){case`accepted`:fc(this,yc,!0,`f`);return;case`rejected`:if(uc(t.ack.errorCode,H(this,_c,`f`))){fc(this,_c,H(this,_c,`f`)+1,`f`),fc(this,vc,!0,`f`);return}H(this,mc,`f`).logger.warn(`page analysis: delivery rejected \u2014 dropped`,{captureRequestId:e.captureRequestId,errorCode:t.ack.errorCode}),H(this,pc,`m`,xc).call(this),H(this,pc,`m`,Cc).call(this,{type:`DELIVERY_REJECTED`}),H(this,mc,`f`).onDeliveryDropped(t.ack);return;case`transport-failed`:this.abort();return;case`abandoned`:return;default:return t}})};function Oc(e){if(typeof e!=`object`||!e||!(`defaultSelectionId`in e))return null;let t=e.defaultSelectionId;return t===null||typeof t==`string`?{defaultSelectionId:t}:null}var kc=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},U=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc;function $c(e,t){return e===null||t===null?e===t:e.confirmAll===t.confirmAll?e.current===null||t.current===null?e.current===t.current:e.current.toolCallId===t.current.toolCallId&&e.current.verdict===t.current.verdict:!1}function el(e){let t=e.errorCode;return typeof t==`string`?t:e.code}function tl(e){let t=e.toolCallId;return typeof t==`string`?t:null}function nl(e){if(typeof e!=`object`||!e)return null;let t=e;return t.accepted===!0&&typeof t.decisionLaneId==`string`?t.decisionLaneId:null}var rl=class{constructor(e,t,n,r){Ac.add(this),jc.set(this,void 0),Mc.set(this,void 0),Nc.set(this,void 0),Pc.set(this,void 0),Fc.set(this,null),Ic.set(this,[]),Lc.set(this,/* @__PURE__ */ new Set),kc(this,jc,e,`f`),kc(this,Mc,t,`f`),kc(this,Nc,n,`f`),kc(this,Pc,r,`f`)}get hasPendingDecision(){return U(this,Fc,`f`)!==null}get pendingDecisionLaneId(){var e;return((e=U(this,Fc,`f`))==null?void 0:e.decisionLaneId)??null}consumeHistoryCompletion(e){let t=U(this,Fc,`f`);t!==null&&t.decisionLaneId!==null&&e!=null&&e.includes(t.decisionLaneId)&&U(this,Ac,`m`,Rc).call(this)}stop(){U(this,jc,`f`).isDisposed()||(kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),U(this,Ac,`m`,Yc).call(this),U(this,Pc,`f`).abortPageAnalysis(),U(this,Nc,`f`).stopAwaitingTurns(),U(this,jc,`f`).store.state.conversationId!==null&&(U(this,jc,`f`).stallGuard.noteCommand(`chat-stop`),U(this,Ac,`m`,Jc).call(this,{name:`chat-stop`,requestId:U(this,jc,`f`).newId()},`chat-stop`,null)))}answerConfirmation(e,t,n){U(this,Ac,`m`,zc).call(this,e,t,!1,!1,t===`confirm`?n:null)}answerChangeSet(e,t){U(this,Ac,`m`,zc).call(this,e,t,!0,!1,null)}rejectRunWait(e){U(this,Ac,`m`,zc).call(this,e,`reject`,!0,!1,null)}confirmAll(e,t=[]){if(U(this,jc,`f`).isDisposed()||U(this,Fc,`f`)!==null||U(this,Ic,`f`).length>0)return;let n=new Set(U(this,jc,`f`).store.state.chat.pendingConfirmations.filter(e=>e.status===`open`).map(e=>e.toolCallId));kc(this,Lc,new Set(t),`f`),kc(this,Ic,[...new Set(e)].filter(e=>n.has(e)||U(this,Lc,`f`).has(e)),`f`),this.maybeSendBulkConfirmation()}maybeSendBulkConfirmation(){U(this,Ac,`m`,Hc).call(this),U(this,Ac,`m`,Yc).call(this)}consumeDecisionOutcome(e){let t=U(this,Ac,`m`,Uc).call(this,e);return U(this,Ac,`m`,Yc).call(this),t}abandonPendingDecision(){let e=U(this,Fc,`f`);e!==null&&(kc(this,Fc,null,`f`),kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),U(this,jc,`f`).deps.logger.warn(`ChatSession: tool decision abandoned \u2014 its lane ended locally`,{command:e.command,toolCallId:e.toolCallId,resolved:e.resolved}),e.resolved||U(this,Pc,`f`).refetchHistory(),U(this,Ac,`m`,Yc).call(this))}forgetPendingDecision(){kc(this,Fc,null,`f`),kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),U(this,Ac,`m`,Yc).call(this)}answerQuestion(e){return U(this,Ac,`m`,Zc).call(this,{name:`chat-question-answer`,requestId:U(this,jc,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey,answers:e.answers,modelSelectionId:U(this,jc,`f`).store.state.modelSelectionId})}cancelQuestion(e){return U(this,Ac,`m`,Zc).call(this,{name:`chat-question-cancel`,requestId:U(this,jc,`f`).newId(),batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey})}};jc=/* @__PURE__ */ new WeakMap,Mc=/* @__PURE__ */ new WeakMap,Nc=/* @__PURE__ */ new WeakMap,Pc=/* @__PURE__ */ new WeakMap,Fc=/* @__PURE__ */ new WeakMap,Ic=/* @__PURE__ */ new WeakMap,Lc=/* @__PURE__ */ new WeakMap,Ac=/* @__PURE__ */ new WeakSet,Rc=function(){kc(this,Fc,null,`f`),U(this,jc,`f`).dispatch({type:`DECISION_LANE_COMPLETE`}),U(this,Ac,`m`,Yc).call(this)},zc=function(e,t,n,r,i){if(U(this,jc,`f`).isDisposed()||U(this,Fc,`f`)!==null)return;let a=U(this,jc,`f`).store.state.chat;if(aa(a,e)||!n&&!a.pendingConfirmations.some(t=>t.toolCallId===e&&t.status===`open`))return;let o=t===`confirm`?`chat-tool-confirm`:`chat-tool-reject`;kc(this,Fc,{command:o,verdict:t,toolCallId:e,requestId:U(this,jc,`f`).newId(),edits:i,decisionLaneId:null,bulk:r,expiredResend:!1,resolved:!1},`f`),U(this,Ac,`m`,Yc).call(this),n||U(this,jc,`f`).dispatch({type:t===`confirm`?`CONFIRM_ACTION`:`REJECT_ACTION`,toolCallId:e}),U(this,Ac,`m`,Bc).call(this,U(this,jc,`f`).store.state.modelSelectionId)},Bc=function(e){let t=U(this,Fc,`f`);if(t===null)return;Ki(t.toolCallId)||U(this,jc,`f`).stallGuard.noteCommand(t.command);let n={requestId:t.requestId,toolCallId:t.toolCallId,modelSelectionId:e};U(this,Ac,`m`,Jc).call(this,t.command===`chat-tool-confirm`?{name:`chat-tool-confirm`,...n,edits:t.edits}:{name:`chat-tool-reject`,...n},t.command,t.toolCallId)},Vc=function(e,t,n,r,i){let a=U(this,Fc,`f`);return n.errorCode!==`selection_expired`||a===null||a.command!==e||a.toolCallId!==t||a.expiredResend?!1:(U(this,Pc,`f`).recoverSelection(n.result,{command:e,toolCallId:t}).then(o=>{if(r()&&U(this,Fc,`f`)===a){if(o===null){i({command:e,toolCallId:t,reason:`rejected`,errorCode:n.errorCode});return}kc(this,Fc,{...a,requestId:U(this,jc,`f`).newId(),expiredResend:!0},`f`),U(this,Ac,`m`,Bc).call(this,o)}}),!0)},Hc=function(){if(U(this,Fc,`f`)!==null||U(this,Ic,`f`).length===0)return;let e=U(this,jc,`f`).store.state.chat;kc(this,Ic,U(this,Ic,`f`).filter(t=>U(this,Lc,`f`).has(t)||e.pendingConfirmations.some(e=>e.toolCallId===t&&e.status===`open`)),`f`);let t=U(this,Ic,`f`).find(t=>!aa(e,t));t!==void 0&&(kc(this,Ic,U(this,Ic,`f`).filter(e=>e!==t),`f`),U(this,Ac,`m`,zc).call(this,t,`confirm`,U(this,Lc,`f`).has(t),!0,null))},Uc=function(e){if(e.type===`error`){let t=tl(e);if(t!==null)return U(this,Ac,`m`,Gc).call(this,e,t)}let t=U(this,Fc,`f`);if(t===null)return!1;if(e.type===`decision-complete`&&e.toolCallId===t.toolCallId&&e.decisionLaneId===t.decisionLaneId)return U(this,Ac,`m`,Rc).call(this),!1;if(Ki(t.toolCallId))return U(this,Ac,`m`,Wc).call(this,e);if((e.type===`error`||e.type===`done`)&&t.decisionLaneId===null)return U(this,jc,`f`).deps.logger.debug(`ChatSession: pre-ack frame of a tool decision \u2014 ack decides`,{command:t.command,toolCallId:t.toolCallId,type:e.type}),!0;if(e.type===`error`&&t.resolved)return kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),!1;if(e.type===`error`&&!t.resolved){kc(this,Fc,null,`f`);let n=el(e);return U(this,jc,`f`).deps.logger.warn(`ChatSession: tool decision failed before it resolved`,{command:t.command,toolCallId:t.toolCallId,errorCode:n}),U(this,Ac,`m`,Kc).call(this,{command:t.command,toolCallId:t.toolCallId,reason:`rejected`,errorCode:n}),!0}return e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),e.type===`action-required`&&t.resolved||e.type===`done`&&(t.resolved||(kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),U(this,Pc,`f`).refetchHistory())),!1},Wc=function(e){let t=U(this,Fc,`f`);return t===null||e.type===`action-resolved`&&e.toolCallId===t.toolCallId&&(t.resolved=!0),!1},Gc=function(e,t){let n=U(this,Fc,`f`),r=el(e);return n===null||n.toolCallId!==t?(U(this,jc,`f`).deps.logger.debug(`ChatSession: refusal of a card this client is not answering \u2014 dropped`,{toolCallId:t,errorCode:r,pendingToolCallId:n===null?null:n.toolCallId}),!0):(kc(this,Fc,null,`f`),U(this,jc,`f`).deps.logger.warn(`ChatSession: card decision refused`,{command:n.command,toolCallId:n.toolCallId,errorCode:r}),U(this,Ac,`m`,Kc).call(this,{command:n.command,toolCallId:n.toolCallId,reason:`rejected`,errorCode:r}),!0)},Kc=function(e){if(kc(this,Ic,[],`f`),U(this,Lc,`f`).clear(),U(this,Ac,`m`,Yc).call(this),U(this,Ac,`m`,Xc).call(this,e.command,e.toolCallId,e),e.toolCallId!==null&&Ki(e.toolCallId)){U(this,jc,`f`).dispatch({type:`LEAD_DECISION_REFUSED`,toolCallId:e.toolCallId});return}U(this,jc,`f`).store.state.chat.isStreaming||U(this,jc,`f`).feedLocalEvent(qs())},qc=function(e,t){return Uo(e)?e.code:(U(this,jc,`f`).deps.logger.error(`ChatSession: transport.send broke its rejection contract`,{command:t,error:Zo(e)}),`connection_closed`)},Jc=function(e,t,n){let r=U(this,Mc,`f`).generation,i=()=>!U(this,jc,`f`).isDisposed()&&r===U(this,Mc,`f`).generation,a=e=>{let r=U(this,Fc,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){kc(this,Fc,null,`f`),U(this,Ac,`m`,Kc).call(this,e);return}U(this,Ac,`m`,Xc).call(this,t,n,e)};U(this,jc,`f`).deps.transport.send(e).then(e=>{if(i()){if(e.status===`accepted`){let r=U(this,Fc,`f`);if(r!==null&&r.command===t&&r.toolCallId===n){let i=nl(e.result);if(i===null){a({command:t,toolCallId:n,reason:`rejected`,errorCode:`invalid_decision_ack`});return}r.decisionLaneId=i}U(this,Ac,`m`,Xc).call(this,t,n,null);return}(t!==`chat-tool-confirm`&&t!==`chat-tool-reject`||n===null||!U(this,Ac,`m`,Vc).call(this,t,n,e,i,a))&&a({command:t,toolCallId:n,reason:`rejected`,errorCode:e.errorCode})}},e=>{i()&&a({command:t,toolCallId:n,reason:U(this,Ac,`m`,qc).call(this,e,t),errorCode:null})})},Yc=function(){let e=U(this,Fc,`f`),t=U(this,Ic,`f`).length>0||e!==null&&e.bulk,n=e===null&&!t?null:{current:e===null?null:{toolCallId:e.toolCallId,verdict:e.verdict},confirmAll:t};$c(U(this,jc,`f`).store.state.decisionProgress,n)||U(this,jc,`f`).store.update({decisionProgress:n})},Xc=function(e,t,n){let{store:r}=U(this,jc,`f`),i=r.state.commandFailures,a=i.filter(n=>n.command!==e||n.toolCallId!==t);(n!==null||a.length!==i.length)&&r.update({commandFailures:n===null?a:[...a,n]})},Zc=async function(e){let{deps:t}=U(this,jc,`f`),n=U(this,Mc,`f`).generation,r=null,i=new Promise(e=>{r=t.clock.setTimeout(()=>e({kind:`failed`,reason:`deadline`}),t.policy.questionActionDeadlineMs)}),a=U(this,Ac,`m`,Qc).call(this,e,n,!1),o=await Promise.race([a,i]);return r!==null&&t.clock.clearTimeout(r),!U(this,jc,`f`).isDisposed()&&n===U(this,Mc,`f`).generation&&U(this,Pc,`f`).refetchHistory(),o},Qc=async function e(t,n,r){let{deps:i}=U(this,jc,`f`),a;try{a=await i.transport.send(t)}catch(e){return{kind:`failed`,reason:U(this,Ac,`m`,qc).call(this,e,t.name)}}if(a.status===`accepted`)return{kind:`accepted`};let o=()=>!U(this,jc,`f`).isDisposed()&&n===U(this,Mc,`f`).generation;if(a.errorCode===`selection_expired`&&t.name===`chat-question-answer`&&!r&&o()){let r=await U(this,Pc,`f`).recoverSelection(a.result,{command:t.name,batchId:t.batchId});if(r!==null&&o())return U(this,Ac,`m`,e).call(this,{...t,requestId:U(this,jc,`f`).newId(),modelSelectionId:r},n,!0)}return{kind:`rejected`,errorCode:a.errorCode}};function il(e){let{logger:t}=e;return async(n,r)=>{let i=await e.reloadCapabilities();if(i.status===`disposed`)return null;if(i.status===`failed`)return t.warn(`ChatSession: selection expired and the capability re-read failed`,{...r}),null;let a=e.resolveSelection(i.value);if(a!==null)return t.warn(`ChatSession: selection expired \u2014 the picked model resent under a fresh id`,{...r}),e.setModelSelection(a),a;let o=Oc(n);return o===null?(t.error(`ChatSession: selection_expired ack without a readable default`,{...r}),null):o.defaultSelectionId===null?null:(t.warn(`ChatSession: selection expired \u2014 the picked model is gone, server default used`,{...r}),e.setModelSelection(o.defaultSelectionId),o.defaultSelectionId)}}var al=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},ol=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},sl,cl,ll,ul,dl,fl;function pl(e){return{chat:vo,projectId:null,conversationId:null,connectionStatus:e,capabilityLoad:{status:`loading`},modelSelectionId:null,modelSelectionRejected:null,unsentTurns:[],historyLoad:{status:`idle`},restoredQuestionBatchIds:[],browserRunFailures:{},commandFailures:[],decisionProgress:null,turnAckPending:!1,turnCreatePending:!1,lastPermissionMode:null,lastPermissionModeReadFailed:!1,permissionModeWrite:ps,olderHistoryRead:`idle`}}var ml=class{constructor(e,t){sl.add(this),cl.set(this,void 0),ll.set(this,null),ul.set(this,/* @__PURE__ */ new Set),dl.set(this,void 0),al(this,cl,e,`f`),al(this,dl,t,`f`)}get state(){return ol(this,cl,`f`)}update(e){al(this,cl,{...ol(this,cl,`f`),...e},`f`),this.invalidate()}invalidate(){al(this,ll,null,`f`);for(let e of ol(this,ul,`f`))e()}subscribe(e){return ol(this,ul,`f`).add(e),()=>{ol(this,ul,`f`).delete(e)}}clearListeners(){ol(this,ul,`f`).clear()}getSnapshot(){return ol(this,ll,`f`)===null&&al(this,ll,ol(this,sl,`m`,fl).call(this),`f`),ol(this,ll,`f`)}};cl=/* @__PURE__ */ new WeakMap,ll=/* @__PURE__ */ new WeakMap,ul=/* @__PURE__ */ new WeakMap,dl=/* @__PURE__ */ new WeakMap,sl=/* @__PURE__ */ new WeakSet,fl=function(){let e=ol(this,cl,`f`),t=hl(e.chat.messages);return{chat:e.chat,projectId:e.projectId,conversationId:e.conversationId,connectionStatus:e.connectionStatus,capabilityLoad:e.capabilityLoad,canSendChatTurn:Jo(e.capabilityLoad),isComposerInteractive:Yo({capabilityLoad:e.capabilityLoad,connectionStatus:e.connectionStatus,isStreaming:e.chat.isStreaming}),modelSelectionId:e.modelSelectionId,modelSelectionRejected:e.modelSelectionRejected,unsentTurns:e.unsentTurns,holdsUnacceptedTurns:e.unsentTurns.length>0||e.turnAckPending||e.turnCreatePending,canRecoverDanglingTurn:e.historyLoad.status!==`loading`&&!e.turnAckPending&&!e.chat.pendingSend&&bs(e.chat.isStreaming,e.chat.error!==null,t),historyLoad:e.historyLoad,olderHistory:{status:e.chat.historyWindow.olderCursor===null?`none`:e.olderHistoryRead},restoredQuestionBatchIds:e.restoredQuestionBatchIds,pageAnalysis:ol(this,dl,`f`).call(this),browserRunFailures:e.browserRunFailures,commandFailures:e.commandFailures,decisionProgress:e.decisionProgress,permissionMode:hs({conversationId:e.conversationId,conversationPermissionMode:e.chat.conversationPermissionMode,lastPermissionMode:e.lastPermissionMode,lastPermissionModeReadFailed:e.lastPermissionModeReadFailed,permissionModeWrite:e.permissionModeWrite})}};function hl(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return n}}var gl=/* @__PURE__ */ new Set([`text-delta`,`text-done`,`reasoning-delta`,`reasoning-done`,`tool-call-start`,`tool-call-input-progress`,`tool-call-complete`,`tool-result`,`tool-running`,`object-partial`,`object-complete`,`step-start`,`step-finish`,`stage`,`progress`,`usage`]);function _l(e){let{clock:t,timeoutMs:n,onStall:r}=e,i=`idle`,a=null;function o(){a!==null&&(t.clearTimeout(a),a=null)}function s(){o(),i=`armed`,a=t.setTimeout(()=>{a=null,i=`idle`,r()},n)}function c(){i=`idle`,o()}return{get phase(){return i},observe(e){if(e.type===`message-start`){s();return}if(e.type===`done`||e.type===`error`){c();return}if(e.type===`action-required`){i!==`idle`&&(i=`paused`,o());return}gl.has(e.type)&&i!==`idle`&&s()},noteCommand(){i!==`idle`&&s()},disarm:c,arm:s,pause(){i=`paused`,o()}}}var vl=`chat_attachments.`;function yl(e,t){return e.startsWith(vl)?{errorCode:e,params:qi(t)?t:null}:null}function bl(e){return e.map(e=>e.id)}function xl(e,t){return e.length===t.length&&e.every((e,n)=>{var r;return e.id===((r=t[n])==null?void 0:r.id)})}var Sl={stallTimeoutMs:6e4,capabilityLoadDeadlineMs:2e4,questionActionDeadlineMs:35e3,sendReceiptWindowMs:6e5},Cl=`chat`,wl=class extends Error{constructor(e){super(e),this.name=`ChatPermissionModeStaleError`}};function Tl(e){let{clock:t,receiptWindowMs:n,onDeadline:r}=e,i=null;function a(){i!==null&&(t.clearTimeout(i),i=null)}function o(e){a();let o=null;for(let t of e)t.release===`on-reconnect`&&(o===null||t.firstSentAt<o)&&(o=t.firstSentAt);if(o===null)return;let s=Math.max(0,o+n-t.now());i=t.setTimeout(()=>{i=null,r()},s)}return{arm:o,disarm:a}}function El(e,t){return e===null||t===null?e===t:e.kind===t.kind&&e.id===t.id}function Dl(e,t){return e.text===t.text&&xl(e.attachments,t.attachments)&&e.launchEffort.effort===t.launchEffort.effort&&e.launchEffort.maxAgents===t.launchEffort.maxAgents&&o(e.place,t.place)&&El(e.activeObject,t.activeObject)}function Ol(e,t){let n=e[e.length-1];return n!==void 0&&Dl(n,t)?e:[...e,t]}function kl(e,t){return[...e,t]}function Al(e,t){return e.filter(e=>e.id!==t)}function jl(e){for(let t of e)if(t.release===`on-reconnect`)return t;return null}function Ml(e,t,n){let r=e=>e.release===`on-reconnect`&&t-e.firstSentAt>=n;return e.some(r)?e.map(e=>r(e)?{id:e.id,text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:null}:e):e}var Nl=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},W=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},G,K,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du=`cmd.handler_error`,fu=class extends Error{constructor(){super(`no permission mode shown on the new-conversation screen`),this.name=`NoPermissionModeError`}},pu=class{constructor(e,t,n){G.add(this),K.set(this,void 0),Pl.set(this,void 0),Fl.set(this,void 0),Il.set(this,/* @__PURE__ */ new Set),Ll.set(this,/* @__PURE__ */ new Set),Rl.set(this,!1),zl.set(this,!1),Bl.set(this,0),Vl.set(this,void 0),Hl.set(this,0),Ul.set(this,null),Nl(this,K,e,`f`),Nl(this,Pl,t,`f`),Nl(this,Fl,n,`f`),Nl(this,Vl,Tl({clock:e.deps.clock,receiptWindowMs:e.deps.policy.sendReceiptWindowMs,onDeadline:()=>this.flushUndelivered()}),`f`)}dispose(){W(this,Vl,`f`).disarm()}get isCreatingConversation(){return W(this,Rl,`f`)}get hasTurnAwaitingAck(){return W(this,Il,`f`).size>0}get lastTurnUnboundAttachments(){let e=W(this,Ul,`f`);return e===null||e.selectionGeneration!==W(this,Pl,`f`).generation?[]:e.attachments}resetForProject(){Nl(this,Ul,null,`f`),Nl(this,Bl,W(this,Bl,`f`)+1,`f`),W(this,G,`m`,lu).call(this,!1),Nl(this,zl,!1,`f`),W(this,Il,`f`).clear(),W(this,Ll,`f`).clear(),W(this,G,`m`,uu).call(this),W(this,Vl,`f`).disarm()}submit(e){let{store:t,deps:n}=W(this,K,`f`);if(W(this,K,`f`).isDisposed()||e.text.trim()===``)return{kind:`ignored`};let r=t.state;if(r.projectId===null)return n.logger.warn(`ChatSession: send refused \u2014 no project`),{kind:`refused`,reason:`no-project`,held:!1};if(!Jo(r.capabilityLoad))return n.logger.warn(`ChatSession: send refused \u2014 model capability set is not readable`,{capabilityStatus:r.capabilityLoad.status}),e.holdOnRefusal&&!e.resend&&W(this,G,`m`,Kl).call(this,e),{kind:`refused`,reason:`capabilities-not-ready`,held:e.holdOnRefusal&&!e.resend};let i=r.conversationId;if(i===null&&W(this,Rl,`f`))return{kind:`ignored`};let a=null;if(i===null&&(a=W(this,Fl,`f`).newConversationPermissionMode(),a===null))return n.logger.warn(`ChatSession: send refused \u2014 no permission mode to create the chat in`),W(this,Fl,`f`).refreshLastPermissionMode(),e.holdOnRefusal&&!e.resend&&W(this,G,`m`,Kl).call(this,e),{kind:`refused`,reason:`permission-mode-unknown`,held:e.holdOnRefusal&&!e.resend};Nl(this,Hl,W(this,Hl,`f`)+1,`f`);let o=W(this,Hl,`f`);return Nl(this,Ul,null,`f`),W(this,G,`m`,Xl).call(this,e),a===null?(W(this,G,`m`,$l).call(this,e,o),W(this,G,`m`,tu).call(this,e,o)):W(this,G,`m`,Ql).call(this,e,o,r.projectId,a),{kind:`sent`}}stopAwaitingTurns(){let e=W(this,Rl,`f`)&&!W(this,zl,`f`);if(W(this,Il,`f`).size===0&&!e)return!1;e&&Nl(this,zl,!0,`f`);for(let e of W(this,Il,`f`))W(this,Ll,`f`).add(e);return W(this,Il,`f`).clear(),W(this,G,`m`,uu).call(this),W(this,K,`f`).feedLocalEvent(qs()),!0}flushUndelivered(){W(this,K,`f`).isDisposed()||(W(this,G,`m`,Wl).call(this),W(this,Vl,`f`).arm(W(this,K,`f`).store.state.unsentTurns))}async deliverPageSnapshot(e,t){let{deps:n,store:r}=W(this,K,`f`);if(r.state.conversationId===null)return n.logger.error(`ChatSession: page snapshot with no conversation bound`),{kind:`transport-failed`};let i=W(this,Pl,`f`).generation,a=W(this,Bl,`f`),o=W(this,K,`f`).newId(),s=await W(this,G,`m`,Gl).call(this,e,o,r.state.modelSelectionId);if(s.kind!==`rejected`||s.ack.errorCode!==`selection_expired`)return s;let c=await W(this,Fl,`f`).recoverSelection(s.ack.result,{command:`chat-send`,requestId:o,pageSnapshot:!0});if(W(this,K,`f`).isDisposed())return{kind:`abandoned`};let l=i!==W(this,Pl,`f`).generation||a!==W(this,Bl,`f`);return t.aborted||l?(n.logger.warn(`ChatSession: page snapshot resend abandoned \u2014 delivery no longer current`,{requestId:o,reason:l?`chat-moved`:`aborted`}),{kind:`abandoned`}):c===null?s:W(this,G,`m`,Gl).call(this,e,W(this,K,`f`).newId(),c)}};K=/* @__PURE__ */ new WeakMap,Pl=/* @__PURE__ */ new WeakMap,Fl=/* @__PURE__ */ new WeakMap,Il=/* @__PURE__ */ new WeakMap,Ll=/* @__PURE__ */ new WeakMap,Rl=/* @__PURE__ */ new WeakMap,zl=/* @__PURE__ */ new WeakMap,Bl=/* @__PURE__ */ new WeakMap,Vl=/* @__PURE__ */ new WeakMap,Hl=/* @__PURE__ */ new WeakMap,Ul=/* @__PURE__ */ new WeakMap,G=/* @__PURE__ */ new WeakSet,Wl=function(){let{store:e,deps:t}=W(this,K,`f`),n=Ml(e.state.unsentTurns,t.clock.now(),t.policy.sendReceiptWindowMs);n!==e.state.unsentTurns&&(t.logger.warn(`ChatSession: undelivered turn outlived the server receipt \u2014 needs a Send`),e.update({unsentTurns:n}));let r=e.state;if(r.connectionStatus!==`connected`&&r.connectionStatus!==`restored`||r.conversationId===null||r.chat.isStreaming||r.chat.pendingSend||W(this,Il,`f`).size>0)return;let i=jl(r.unsentTurns);i!==null&&(e.update({unsentTurns:Al(r.unsentTurns,i.id)}),W(this,K,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:W(this,K,`f`).newId(),effort:i.launchEffort.effort}}),W(this,G,`m`,nu).call(this,{requestId:i.requestId,text:i.text,attachments:i.attachments,launchEffort:i.launchEffort,place:i.place,activeObject:i.activeObject,modelSelectionId:i.modelSelectionId,expiredResend:!1,firstSentAt:i.firstSentAt,turnSeq:null}))},Gl=async function(e,t,n){let{deps:r}=W(this,K,`f`);try{let i=await r.transport.send({name:`chat-send`,requestId:t,message:``,mode:Cl,launchEffort:{effort:nt,maxAgents:null},place:te,modelSelectionId:n,policyVersion:null,pageSnapshot:e,attachmentIds:[],activeObject:null});return i.status===`accepted`?{kind:`accepted`}:{kind:`rejected`,ack:i}}catch(e){return r.logger.warn(`ChatSession: page snapshot delivery failed`,{error:Zo(e)}),{kind:`transport-failed`}}},Kl=function(e){let{store:t}=W(this,K,`f`);t.update({unsentTurns:Ol(t.state.unsentTurns,{id:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!1,refusal:null})})},ql=function(e,t,n,r=Hs.turnHeldUnsent){let{store:i}=W(this,K,`f`);i.update({unsentTurns:kl(i.state.unsentTurns,{id:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:n})}),W(this,K,`f`).feedLocalEvent(Ws(r,t))},Jl=function(e,t,n,r){let{store:i,deps:a}=W(this,K,`f`);a.logger.warn(`ChatSession: stopped turn the server never ran \u2014 held unsent`,{reason:n,attachmentCount:e.attachments.length}),W(this,G,`m`,eu).call(this,t),i.update({unsentTurns:kl(i.state.unsentTurns,{id:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`manual`,inTranscript:!0,refusal:r})})},Yl=function(e,t){t.status!==`accepted`&&W(this,G,`m`,Jl).call(this,e,e.turnSeq,`stopped, then chat-send rejected: ${t.errorCode}`,yl(t.errorCode,t.result))},Xl=function(e){e.resend||W(this,K,`f`).dispatch({type:`USER_MESSAGE`,payload:{id:W(this,K,`f`).newId(),content:e.text,effort:e.launchEffort.effort,attachments:e.attachments}}),W(this,K,`f`).dispatch({type:`ASSISTANT_PLACEHOLDER`,payload:{id:W(this,K,`f`).newId(),effort:e.launchEffort.effort}})},Zl=async function(e,t,n){let r=await W(this,Fl,`f`).settledNewConversationPermissionMode(t);if(!n())return{kind:`left`};if(r===null)throw new fu;return{kind:`created`,created:await W(this,K,`f`).deps.conversations.create(e,r)}},Ql=function(e,t,n,r){let{deps:i}=W(this,K,`f`),a=W(this,Bl,`f`),o=W(this,Pl,`f`).generation,s=()=>!W(this,K,`f`).isDisposed()&&a===W(this,Bl,`f`)&&o===W(this,Pl,`f`).generation;W(this,G,`m`,lu).call(this,!0),Nl(this,zl,!1,`f`);let c=()=>{if(a!==W(this,Bl,`f`))return!1;let e=W(this,zl,`f`);return W(this,G,`m`,lu).call(this,!1),Nl(this,zl,!1,`f`),e};W(this,G,`m`,Zl).call(this,n,r,s).then(r=>{let a=c();if(r.kind===`left`){i.logger.warn(`ChatSession: chat left before the conversation create \u2014 turn dropped`,{projectId:n});return}let{created:o}=r,l=o.id;if(!s()){i.logger.warn(`ChatSession: chat left during conversation create \u2014 turn dropped`,{conversationId:l});return}if(i.memory.remember(n,l).catch(e=>{i.logger.error(`ChatSession: memory.remember failed`,{projectId:n,error:Zo(e)})}),W(this,Pl,`f`).select(l,`stream-created`),W(this,K,`f`).dispatch({type:`CONVERSATION_PERMISSION_MODE`,payload:{conversationId:l,permissionMode:o.permissionMode,permissionModeVersion:o.permissionModeVersion}}),a){W(this,G,`m`,Jl).call(this,e,null,`stopped during conversation create \u2014 never sent`,null);return}W(this,G,`m`,$l).call(this,e,t),W(this,G,`m`,tu).call(this,e,t)},t=>{let r=c();if(s()){if(r){i.logger.warn(`ChatSession: conversation create failed for a stopped turn`,{projectId:n,error:Zo(t)}),W(this,G,`m`,Jl).call(this,e,null,`stopped during a failed conversation create \u2014 never sent`,null);return}if(t instanceof fu){i.logger.warn(`ChatSession: conversation not created \u2014 no permission mode shown`,{projectId:n}),W(this,G,`m`,ql).call(this,e,`conversation create skipped: no permission mode shown`,null),W(this,Fl,`f`).refreshLastPermissionMode();return}if(t instanceof wl){i.logger.warn(`ChatSession: conversation not created \u2014 permission mode was stale`,{projectId:n}),W(this,G,`m`,ql).call(this,e,`conversation create refused: permission mode stale`,null,Hs.permissionModeChanged),W(this,Fl,`f`).rereadStaleLastPermissionMode();return}i.logger.error(`ChatSession: conversation create failed \u2014 turn held`,{projectId:n,error:Zo(t)}),W(this,G,`m`,ql).call(this,e,`conversation create failed`,null)}})},$l=function(e,t){Nl(this,Ul,{turnSeq:t,attachments:e.attachments,selectionGeneration:W(this,Pl,`f`).generation},`f`)},eu=function(e){var t;e!==null&&((t=W(this,Ul,`f`))==null?void 0:t.turnSeq)===e&&Nl(this,Ul,null,`f`)},tu=function(e,t){W(this,G,`m`,nu).call(this,{requestId:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,modelSelectionId:W(this,K,`f`).store.state.modelSelectionId,expiredResend:!1,firstSentAt:W(this,K,`f`).deps.clock.now(),turnSeq:t})},nu=async function(e){let{deps:t}=W(this,K,`f`),n=W(this,Pl,`f`).generation,r=W(this,Bl,`f`);W(this,Il,`f`).add(e.requestId),W(this,G,`m`,uu).call(this);let i;try{i={kind:`ack`,ack:await t.transport.send({name:`chat-send`,requestId:e.requestId,message:e.text,mode:Cl,launchEffort:e.launchEffort,place:e.place,modelSelectionId:e.modelSelectionId,policyVersion:null,pageSnapshot:null,attachmentIds:bl(e.attachments),activeObject:e.activeObject})}}catch(n){Uo(n)?i={kind:`failed`,code:n.code}:(t.logger.error(`ChatSession: transport.send broke its rejection contract`,{requestId:e.requestId,error:Zo(n)}),i={kind:`failed`,code:`connection_closed`})}if(r!==W(this,Bl,`f`)||W(this,K,`f`).isDisposed())return;let a=W(this,Il,`f`).delete(e.requestId);try{W(this,G,`m`,ru).call(this,e,i,a,n)}finally{W(this,G,`m`,uu).call(this)}},ru=function(e,t,n,r){let{deps:i}=W(this,K,`f`);if(t.kind===`ack`&&t.ack.status===`accepted`&&W(this,G,`m`,eu).call(this,e.turnSeq),W(this,Ll,`f`).delete(e.requestId)){t.kind===`ack`&&r===W(this,Pl,`f`).generation&&W(this,G,`m`,Yl).call(this,e,t.ack);return}if(!n)return;if(r!==W(this,Pl,`f`).generation){i.logger.debug(`ChatSession: ack for a conversation no longer selected \u2014 ignored`,{requestId:e.requestId});return}if(t.kind===`failed`){W(this,G,`m`,iu).call(this,e,t.code);return}let{ack:a}=t;if(a.status===`accepted`){a.duplicate&&(i.logger.warn(`ChatSession: chat-send acked as duplicate \u2014 turn ended locally`,{requestId:e.requestId}),W(this,K,`f`).feedLocalEvent(qs()),W(this,Fl,`f`).refetchHistory());return}W(this,G,`m`,au).call(this,e,a)},iu=function(e,t){let{store:n,deps:r}=W(this,K,`f`);if(r.logger.warn(`ChatSession: chat-send undelivered \u2014 held for resend`,{requestId:e.requestId,code:t}),W(this,G,`m`,eu).call(this,e.turnSeq),n.update({unsentTurns:kl(n.state.unsentTurns,{id:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,release:`on-reconnect`,requestId:e.requestId,modelSelectionId:e.modelSelectionId,firstSentAt:e.firstSentAt})}),W(this,K,`f`).feedLocalEvent(Ws(Hs.turnHeldUnsent,`chat-send ${t}`)),t===`ack_timeout`){this.flushUndelivered();return}W(this,Vl,`f`).arm(n.state.unsentTurns)},au=function(e,t){if(t.errorCode===`selection_expired`&&!e.expiredResend){W(this,G,`m`,ou).call(this,e,t);return}W(this,G,`m`,cu).call(this,e,t)},ou=async function(e,t){let n=W(this,Pl,`f`).generation,r=W(this,Bl,`f`);W(this,Il,`f`).add(e.requestId),W(this,G,`m`,uu).call(this);let i=await W(this,Fl,`f`).recoverSelection(t.result,{command:`chat-send`,requestId:e.requestId});if(r!==W(this,Bl,`f`)||W(this,K,`f`).isDisposed())return;let a=W(this,Il,`f`).delete(e.requestId);try{W(this,G,`m`,su).call(this,e,t,i,a,n)}finally{W(this,G,`m`,uu).call(this)}},su=function(e,t,n,r,i){let{deps:a}=W(this,K,`f`);if(W(this,Ll,`f`).delete(e.requestId)){i===W(this,Pl,`f`).generation&&W(this,G,`m`,Yl).call(this,e,t);return}if(r&&i===W(this,Pl,`f`).generation){if(n===null){W(this,G,`m`,cu).call(this,e,t);return}W(this,G,`m`,nu).call(this,{requestId:W(this,K,`f`).newId(),text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,modelSelectionId:n,expiredResend:!0,firstSentAt:a.clock.now(),turnSeq:e.turnSeq})}},cu=function(e,t){let{deps:n}=W(this,K,`f`);if(t.errorCode===du){n.logger.warn(`ChatSession: chat-send refused before it ran \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode}),W(this,G,`m`,eu).call(this,e.turnSeq),W(this,G,`m`,ql).call(this,e,`chat-send rejected: ${t.errorCode}`,null);return}let r=yl(t.errorCode,t.result);if(r!==null){n.logger.warn(`ChatSession: chat-send refused for its files \u2014 turn held`,{requestId:e.requestId,errorCode:t.errorCode,attachmentCount:e.attachments.length}),W(this,G,`m`,eu).call(this,e.turnSeq),W(this,G,`m`,ql).call(this,e,`chat-send rejected: ${t.errorCode}`,r);return}if(W(this,K,`f`).feedLocalEvent(Ks(t)),t.errorCode===`model_not_allowed`){let r=Oc(t.result);r===null&&n.logger.error(`ChatSession: model_not_allowed ack without a readable default`,{requestId:e.requestId}),W(this,Fl,`f`).onModelNotAllowed(r===null?null:r.defaultSelectionId)}},lu=function(e){Nl(this,Rl,e,`f`),W(this,K,`f`).store.state.turnCreatePending!==e&&W(this,K,`f`).store.update({turnCreatePending:e})},uu=function(){let e=W(this,Il,`f`).size>0;W(this,K,`f`).store.state.turnAckPending!==e&&W(this,K,`f`).store.update({turnAckPending:e})};function mu(e){if(e.questionActionDeadlineMs<=3e4)throw Error(`ChatSession policy: questionActionDeadlineMs (${e.questionActionDeadlineMs}) must exceed the command ack window (${Wo})`);if(e.stallTimeoutMs<=3e4)throw Error(`ChatSession policy: stallTimeoutMs (${e.stallTimeoutMs}) must exceed the command ack window (${Wo})`)}function hu(e,t,n){return n.type===`message-start`?t!==e&&t.isStreaming&&t.streamingMessageId===n.messageId:n.type===`action-required`?t.pendingConfirmations!==e.pendingConfirmations:!e.ignoredContinuationGeneration||n.type===`block-upsert`||e.ignoredHydratedReplayMessageId!==null&&n.type===`action-resolved`}function gu(e){mu(e.policy);let t=ko(e.tools),n=!1,r=0,i=null,a=/* @__PURE__ */ new Set,o=null,s=e.browser===null?null:new Dc({browser:e.browser,deliver:(e,t)=>y.deliverPageSnapshot(e,t),logger:e.logger,onDeliveryDropped:e=>m.feedLocalEvent(Ks(e)),onChange:()=>c.invalidate()}),c=new ml(pl(e.transport.getStatus()),()=>s===null?{status:`idle`,failureReason:null}:{status:dc(s.phase),failureReason:s.failureReason}),l=_l({clock:e.clock,timeoutMs:e.policy.stallTimeoutMs,onStall:()=>{if(c.state.chat.permissionModeLane!==null){p();return}e.logger.warn(`ChatSession: stream stalled \u2014 no progress within the window`,{conversationId:c.state.conversationId}),S(Gs())}});function u(e,n){let r=c.state.chat,i=t(r,e);e.type===`EVENT`&&(n===`local`||n===`live`&&hu(r,i,e.payload))&&l.observe(e.payload),i!==r&&c.update({chat:i});let a=r.permissionModeLane;i.permissionModeLane!==a&&f(),T()}function d(e,t){u({type:`EVENT`,payload:e},t),c.state.chat.permissionModeLane!==null&&l.arm()}function f(){let{chat:e}=c.state;e.permissionModeLane!==null||e.isStreaming||e.pendingSend?l.arm():e.pendingConfirmations.some(e=>e.status===`open`)?l.pause():l.disarm()}function p(){var t;let{chat:n}=c.state;e.logger.warn(`ChatSession: permission-mode lane stalled \u2014 its calls go back to the user`,{conversationId:c.state.conversationId,decisionLaneId:(t=n.permissionModeLane)==null?void 0:t.decisionLaneId}),n.isStreaming||n.pendingSend?S(Gs()):b.hasPendingDecision&&(b.abandonPendingDecision(),m.feedLocalEvent(qs())),u({type:`PERMISSION_MODE_LANE_EXPIRED`},null),E()}let m={deps:e,store:c,stallGuard:l,dispatch:e=>u(e,null),feedLocalEvent:e=>d(e,`local`),newId:Xo,isDisposed:()=>n},h=new gs(m),g=new Fs(m,()=>{s==null||s.abort(),a.clear(),x.reset(),o=null,b.forgetPendingDecision()},{currentLaneId:()=>{let e=b.pendingDecisionLaneId;if(e!==null)return e;let t=c.state.chat.permissionModeLane;return t===null?null:t.decisionLaneId},onHistory:e=>b.consumeHistoryCompletion(e.decisionLaneCompletedIds)},()=>h.refresh()),_=new Bs(m,g),v=il({reloadCapabilities:te,resolveSelection:t=>e.capabilities.resolveSelection(t),setModelSelection:ne,logger:e.logger}),y=new pu(m,g,{onModelNotAllowed:D,refetchHistory:E,recoverSelection:v,newConversationPermissionMode:()=>{let e=h.view();return e.kind===`known`&&e.scope===`last-choice`?e.value:null},settledNewConversationPermissionMode:e=>h.settledNewConversationMode(e),refreshLastPermissionMode:()=>h.refresh(),rereadStaleLastPermissionMode:()=>h.rereadStale()}),b=new rl(m,g,y,{abortPageAnalysis:()=>s==null?void 0:s.abort(),refetchHistory:E,recoverSelection:v}),x=new ac(m,{refetchHistory:E});function S(e){b.abandonPendingDecision(),m.feedLocalEvent(e)}function C(){let{chat:e,conversationId:t}=c.state,n=go(e),r=e.pendingRefetch||g.rowsOwed,i=!n&&e.appendedRowsOwed.length>0;if(t===null||!r||!(n||i)){o=null;return}let a=`${t}|${n?`quiet`:e.appendedRowsOwed.join(`,`)}|${e.pendingConfirmations.map(e=>`${e.toolCallId}:${e.status}`).join(`,`)}`;a===o||g.catchUpInFlight||(o=a,w(t))}function w(e){let t=!go(c.state.chat);g.readHistory(e,`catch-up`).then(e=>{!n&&e===`applied`&&(g.rowsOwed||t)&&(o=null,C())})}function T(){n||(C(),b.maybeSendBulkConfirmation())}function E(){let e=c.state.conversationId;e!==null&&w(e)}function D(e){c.update({modelSelectionId:null,modelSelectionRejected:{defaultSelectionId:e}}),te()}function O(t){let n=t.hostAction;if(n!==void 0){if(!Vs(e.open,n.executorPanelId)){e.logger.debug(`ChatSession: host action for another panel \u2014 not executed here`,{toolCallId:t.toolCallId,kind:n.kind});return}if(!a.has(t.toolCallId))switch(a.add(t.toolCallId),n.kind){case`capture-page`:if(s===null){e.logger.error(`ChatSession: capture-page action on a host without a browser port`,{toolCallId:t.toolCallId});return}s.request({captureRequestId:n.captureRequestId,toolCallId:t.toolCallId});return;case`run-launch-in-tab`:ee(t.toolCallId,n.kind,e=>e.runLaunchInTab({launchId:n.launchId,testRunId:n.testRunId}));return}}}function ee(t,r,i){let o=e.browser;if(o===null){e.logger.error(`ChatSession: ${r} action on a host without a browser port`,{toolCallId:t});return}let s=g.generation,l=e=>{n||s!==g.generation||(a.delete(t),c.update({browserRunFailures:{...c.state.browserRunFailures,[t]:e}}))};Promise.resolve().then(()=>i(o)).then(e=>{if(!e.ok)l(e.reason);else if(!n&&s===g.generation){let e={...c.state.browserRunFailures};t in e&&(delete e[t],c.update({browserRunFailures:e}))}},n=>{e.logger.error(`ChatSession: ${r} request failed`,{toolCallId:t,error:Zo(n)}),l(`no_response`)})}function k(t){if(Ya(c.state.chat,t)&&g.noteRowAnnounced(),t.type===`conversation-started`&&t.conversationId!==c.state.conversationId){e.logger.error(`ChatSession: conversation-started names a conversation not bound`,{bound:c.state.conversationId,named:t.conversationId});return}b.consumeDecisionOutcome(t)||(d(t,`live`),t.type===`error`&&t.code===`model_not_allowed`&&D(null),t.type===`tool-result`&&O(t),t.type===`host-action`&&x.handle(t),s==null||s.onEvent(t),t.type===`done`&&y.flushUndelivered())}function A(e){if(c.update({connectionStatus:e}),e===`connected`||e===`restored`){y.flushUndelivered(),(b.pendingDecisionLaneId!==null||c.state.chat.permissionModeLane!==null)&&E();return}if(e!==`lost`&&e!==`failed`)return;if(e===`failed`&&b.pendingDecisionLaneId!==null){let{chat:t}=c.state;t.isStreaming||t.pendingSend?S(Ws(Hs.connectionLostDuringStream,`socket ${e}`)):(b.abandonPendingDecision(),m.feedLocalEvent(qs())),E();return}let{chat:t}=c.state;if(!y.hasTurnAwaitingAck&&(t.isStreaming||t.pendingSend)){if(b.hasPendingDecision){m.feedLocalEvent(Ws(Hs.connectionLostDuringStream,`socket ${e}`));return}S(Ws(Hs.connectionLostDuringStream,`socket ${e}`))}}function j(t){if(!n)switch(t.kind){case`event`:k(t.event);return;case`task-card`:return;case`status`:A(t.status);return;case`resync-required`:e.logger.warn(`ChatSession: transport asked for a resync \u2014 re-reading history`),E();return;default:return t}}let M=e.transport.subscribe(j);function N(){if(i===null)throw Error(`ChatSession: a capability read was superseded with no newer read`);return i}function te(){if(n)return Promise.resolve({status:`disposed`});r+=1;let t=r;c.update({capabilityLoad:{status:`loading`}});let a=qo(e.capabilities.load(),e.clock,e.policy.capabilityLoadDeadlineMs).then(e=>n?{status:`disposed`}:t===r?(c.update({capabilityLoad:{status:`ready`,value:e}}),{status:`ready`,value:e}):N(),i=>n?{status:`disposed`}:t===r?(e.logger.warn(`ChatSession: capability load failed`,{error:Zo(i)}),c.update({capabilityLoad:{status:`failed`,cause:i}}),{status:`failed`}):N());return i=a,a}function ne(e){n||c.update({modelSelectionId:e,modelSelectionRejected:null})}function re(t){if(n)return;let r=c.state.projectId;if(r!==t){if(ys(r,t)&&(g.select(null,`load-history`),y.resetForProject(),c.update({unsentTurns:[],modelSelectionRejected:null})),c.update({projectId:t}),t===null){e.transport.close();return}h.refresh(),e.memory.read(t).then(r=>{if(n||c.state.projectId!==t||r===null)return;let{conversationId:i,chat:a}=c.state;if(i!==null||y.isCreatingConversation||a.messages.length>0){e.logger.debug(`ChatSession: remembered conversation not opened \u2014 chat already in use`,{projectId:t,remembered:r});return}g.select(r,`load-history`)},n=>{e.logger.error(`ChatSession: memory.read failed \u2014 empty state`,{projectId:t,error:Zo(n)})})}}function ie(t){if(n)return;let r=c.state.projectId;if(r===null){e.logger.error(`ChatSession: openConversation with no project`,{conversationId:t});return}t!==c.state.conversationId&&(c.state.chat.isStreaming&&b.stop(),e.memory.remember(r,t).catch(t=>{e.logger.error(`ChatSession: memory.remember failed`,{projectId:r,error:Zo(t)})}),c.update({unsentTurns:[]}),g.select(t,`load-history`))}function ae(){if(n)return;let t=c.state.projectId;t!==null&&e.memory.forget(t).catch(n=>{e.logger.error(`ChatSession: memory.forget failed`,{projectId:t,error:Zo(n)})}),c.update({unsentTurns:[]}),g.select(null,`load-history`)}function oe(t,r){let{chat:i}=c.state;if(n||i.isStreaming||i.pendingSend||y.hasTurnAwaitingAck)return{kind:`ignored`};let a;for(let e=i.messages.length-1;e>=0&&a===void 0;--e){var o;((o=i.messages[e])==null?void 0:o.role)===`user`&&(a=i.messages[e])}return a===void 0||a.content.trim()===``?{kind:`ignored`}:y.submit({text:a.content,attachments:y.lastTurnUnboundAttachments,launchEffort:t,place:r,activeObject:e.activeObject(),holdOnRefusal:!1,resend:!0})}function se(t){return{...t,activeObject:e.activeObject()}}function ce(e){return y.submit({text:e.text,attachments:e.attachments,launchEffort:e.launchEffort,place:e.place,activeObject:e.activeObject,holdOnRefusal:e.source===`external`,resend:!1})}function le(e){let t=c.state.unsentTurns.find(t=>t.id===e);if(n||t===void 0)return{kind:`ignored`};if(t.release===`on-reconnect`)return y.flushUndelivered(),c.state.unsentTurns.some(t=>t.id===e)?{kind:`ignored`}:{kind:`sent`};let r=y.submit({text:t.text,attachments:t.attachments,launchEffort:t.launchEffort,place:t.place,activeObject:t.activeObject,holdOnRefusal:!1,resend:t.inTranscript});return r.kind===`sent`&&c.update({unsentTurns:Al(c.state.unsentTurns,e)}),r}return{getSnapshot:()=>c.getSnapshot(),subscribe:e=>c.subscribe(e),setProject:re,openConversation:ie,startNewConversation:ae,loadOlderHistory:()=>_.load(),send:e=>ce(se(e)),prepareSend:se,sendPrepared:ce,retryLastTurn:oe,stop:()=>b.stop(),confirm:(e,t)=>b.answerConfirmation(e,`confirm`,t===void 0?null:t),confirmAll:(e,t)=>b.confirmAll(e,t),reject:e=>b.answerConfirmation(e,`reject`,null),confirmChangeSet:e=>b.answerChangeSet(e,`confirm`),rejectChangeSet:e=>b.answerChangeSet(e,`reject`),rejectRunWait:e=>b.rejectRunWait(e),answerQuestion:e=>b.answerQuestion(e),cancelQuestion:e=>b.cancelQuestion(e),sendUnsentTurn:le,discardUnsentTurn:e=>{n||c.update({unsentTurns:Al(c.state.unsentTurns,e)})},retryUnsent:()=>{let e=c.state.unsentTurns[0];return e===void 0?{kind:`ignored`}:le(e.id)},setModelSelection:ne,setPermissionMode:e=>h.set(e),retryPermissionModeWrite:()=>h.retry(),dismissPermissionModeWriteFailure:()=>h.dismissFailure(),refreshLastPermissionMode:()=>h.refresh(),reloadCapabilities:()=>{te()},dispose:()=>{n||(n=!0,l.disarm(),y.dispose(),s==null||s.abort(),M(),e.transport.close(),c.clearListeners())}}}function _u(){return{now:()=>Date.now(),setTimeout:(e,t)=>globalThis.setTimeout(e,t),clearTimeout:e=>globalThis.clearTimeout(e)}}var vu=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},q=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},yu,bu,xu,Su,Cu,wu,Tu,Eu,Du,Ou=5e3,ku=2e3,Au=/* @__PURE__ */ new Set([$n.AUTH_FAILED,$n.PROTOCOL_VIOLATION,$n.HEARTBEAT_TIMEOUT]),ju=5,Mu=class{constructor(e){yu.add(this),bu.set(this,void 0),xu.set(this,`connecting`),Su.set(this,/* @__PURE__ */ new Set),Cu.set(this,null),wu.set(this,null),Tu.set(this,0),vu(this,bu,e,`f`)}get status(){return q(this,xu,`f`)}onStatusChange(e){return q(this,Su,`f`).add(e),()=>{q(this,Su,`f`).delete(e)}}onConnected(){if(q(this,xu,`f`)!==`failed`){if(q(this,yu,`m`,Du).call(this),vu(this,Tu,0,`f`),q(this,xu,`f`)===`lost`){q(this,yu,`m`,Eu).call(this,`restored`),vu(this,wu,q(this,bu,`f`).setTimeout(()=>{vu(this,wu,null,`f`),q(this,yu,`m`,Eu).call(this,`connected`)},ku),`f`);return}q(this,yu,`m`,Eu).call(this,`connected`)}}onDisconnected(e){if(q(this,xu,`f`)!==`failed`){if(e===$n.CHANNEL_NOT_FOUND){q(this,yu,`m`,Du).call(this),q(this,yu,`m`,Eu).call(this,`failed`);return}if(Au.has(e)){if(vu(this,Tu,q(this,Tu,`f`)+1,`f`),q(this,Tu,`f`)>=ju){q(this,yu,`m`,Du).call(this),q(this,yu,`m`,Eu).call(this,`failed`);return}}else vu(this,Tu,0,`f`);if(e===$n.NORMAL_CLOSURE){q(this,yu,`m`,Du).call(this),q(this,yu,`m`,Eu).call(this,`connecting`);return}q(this,yu,`m`,Eu).call(this,`reconnecting`),q(this,Cu,`f`)===null&&q(this,xu,`f`)!==`lost`&&vu(this,Cu,q(this,bu,`f`).setTimeout(()=>{vu(this,Cu,null,`f`),q(this,xu,`f`)===`reconnecting`&&q(this,yu,`m`,Eu).call(this,`lost`)},Ou),`f`)}}onReconnectStopped(){q(this,xu,`f`)!==`failed`&&(q(this,yu,`m`,Du).call(this),q(this,yu,`m`,Eu).call(this,`failed`))}reset(){q(this,xu,`f`)!==`failed`&&(q(this,yu,`m`,Du).call(this),vu(this,Tu,0,`f`),q(this,yu,`m`,Eu).call(this,`connecting`))}dispose(){q(this,yu,`m`,Du).call(this),q(this,Su,`f`).clear()}};bu=/* @__PURE__ */ new WeakMap,xu=/* @__PURE__ */ new WeakMap,Su=/* @__PURE__ */ new WeakMap,Cu=/* @__PURE__ */ new WeakMap,wu=/* @__PURE__ */ new WeakMap,Tu=/* @__PURE__ */ new WeakMap,yu=/* @__PURE__ */ new WeakSet,Eu=function(e){if(e===q(this,xu,`f`))return;let t=q(this,xu,`f`);vu(this,xu,e,`f`);for(let n of q(this,Su,`f`))n(e,t)},Du=function(){q(this,Cu,`f`)!==null&&(q(this,bu,`f`).clearTimeout(q(this,Cu,`f`)),vu(this,Cu,null,`f`)),q(this,wu,`f`)!==null&&(q(this,bu,`f`).clearTimeout(q(this,wu,`f`)),vu(this,wu,null,`f`))};var Nu=Hs.permissionModeChanged,Pu=/* @__PURE__ */ new Set([`client.turn_held_unsent`,Nu,`reports.projection_not_initialized`,`assistant.recover_last_message`]),Fu=/* @__PURE__ */ new Set([`workflows.agents_over_max`,`ai.reasoning_unsupported`]);function Iu(e){return{code:e.code,message:e.message,errorCode:e.errorCode??null,providerErrorCode:e.providerErrorCode??null}}function Lu(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`user`)return n.id}return null}function Ru(e,t,n,r){if(e.kind===`needs-sign-in`)return n.placeholderSignIn;if(e.kind===`needs-project`||t.projectId===null)return n.placeholderNoProject;if(t.capabilityLoad.status===`failed`)return n.placeholderNoModels;switch(t.connectionStatus){case`reconnecting`:case`lost`:case`failed`:return n.placeholderOffline;case`connecting`:case`connected`:case`restored`:return r===null?n.placeholder:r}}function zu(e){return e.status===`failed`?Ko(e.cause)?{kind:`timed-out`}:{kind:`failed`}:null}function Bu(e,t){return e.upload({path:qn.attachmentUpload.path(t.projectId,t.fileName),contentType:t.mediaType,bytes:t.bytes,schema:Yn,signal:t.signal,onProgress:t.onProgress})}var Vu=z({success:zt(!0)});async function Hu(e,t){await e.request({method:qn.attachmentDelete.method,path:qn.attachmentDelete.path(t),schema:Vu})}function Uu(e,t,n){return e.download({path:qn.attachmentContent.path(t),signal:n})}var Wu={status:`idle`},Gu={status:`loading`},Ku={status:`failed`};function qu(e){return Rn(e)?`text/plain; charset=utf-8`:e}function Ju(e){let{http:t,logger:n}=e,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Set,o=new AbortController,s=(e,t)=>{r.set(e,t);for(let e of a)e()};return{get(e){let t=r.get(e);return t===void 0?Wu:t},load(e){let a=i.get(e.id);if(a!==void 0)return a;let c=r.get(e.id);if(c!==void 0&&c.status===`ready`)return Promise.resolve(c);let{signal:l}=o;s(e.id,Gu);let u=Uu(t,e.id,l).then(t=>{if(l.aborted)return Wu;let n=new Blob([t.bytes.slice()],{type:qu(e.mediaType)}),r={status:`ready`,url:URL.createObjectURL(n)};return i.delete(e.id),s(e.id,r),r},t=>l.aborted?Wu:(n.warn(`chat attachment content read failed`,{attachmentId:e.id,status:t instanceof Jn?t.status:null,errorCode:t instanceof Jn?t.errorCode:null}),i.delete(e.id),s(e.id,Ku),Ku));return i.set(e.id,u),u},subscribe(e){return a.add(e),()=>a.delete(e)},clear(){o.abort(),o=new AbortController,i.clear();for(let e of r.values())e.status===`ready`&&URL.revokeObjectURL(e.url);r.clear();for(let e of a)e()}}}var Yu=new Intl.PluralRules(`ru`),Xu=new Intl.PluralRules(`en`);function J(e,t){switch(Yu.select(e)){case`one`:return t.one;case`few`:case`other`:return t.few;default:return t.many}}function Zu(e,t){return Xu.select(e)===`one`?t.one:t.other}var Qu=e=>Zu(e,{one:`file`,other:`files`}),$u=e=>e===null?`The selected model`:`Model ${e}`,ed={units:{b:`B`,kb:`KB`,mb:`MB`},facts:{pdf:(e,t)=>`${e} ${Zu(e,{one:`page`,other:`pages`})}, ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`Message files`,view:e=>`View \u201C${e}\u201D`,open:e=>`Open \u201C${e}\u201D in a new tab`,thumbnailLoading:e=>`Loading the thumbnail of \u201C${e}\u201D`,thumbnailFailed:`The thumbnail did not load`,openFailed:`Could not open.`,retry:`Retry`},viewer:{label:e=>`Viewing: ${e}`,openInTab:`Open in a new tab`,close:`Close the viewer`,previous:`Previous image`,next:`Next image`,position:(e,t)=>`${e} of ${t}`,loading:e=>`Loading \u201C${e}\u201D`,failed:`The image did not load`},conversation:{text:(e,t)=>`Model ${e} will not read the files of this conversation (${t}) \u2014 `,pick:`switch to another model`},unsent:{files:e=>`${e} ${Qu(e)}`,unsupported:(e,t)=>`${$u(e)} does not take these files: ${t} \u2014 switch to another`,noFiles:e=>`${$u(e)} does not take files \u2014 switch to another`,types:(e,t)=>`${$u(e)} does not take ${t} \u2014 switch to another`,reason:{fileBytes:e=>`a file is over ${e}`,imageBytes:e=>`an image is over ${e}`,requestBytes:e=>`the request is over ${e}`,filesBytes:e=>`the files together are over ${e}`,imageEdge:e=>`an image side is over ${e} px`,imagePatches:e=>`an image is over ${e} million pixels`,pdfPages:e=>`the PDF has over ${e} pages`,imagesCount:e=>`over ${e} images`,manyImagesEdge:e=>`with many images each side must be at most ${e} px`,contextWindow:`the files do not fit the model\u2019s window`,unknownSize:`the files are larger than the model takes`},notFound:`The files of this message are no longer available: an unsent file is kept for a day. Delete the message and attach the files again.`,alreadySent:`These files were already sent with another message. Delete the message and attach the files again.`}},td=new Intl.NumberFormat(`en`),nd=e=>td.format(e),rd=e=>Zu(e,{one:`change`,other:`changes`}),id=(e,t,n)=>`${nd(e)} ${Zu(e,{one:t,other:n})}`,ad=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e.slice(-1).join(``)}`,od={title:`Changes`,cardAria:e=>`Changes: ${e.toLocaleLowerCase(`en`)}`,phaseAnnouncement:e=>`Change status: ${e.toLocaleLowerCase(`en`)}`,contextScenario:e=>`Scenario \u201C${e}\u201D`,contextProject:e=>`Project \u201C${e}\u201D`,contextObject:e=>`\u201C${e}\u201D`,marker:{inspecting:`Inspecting`,proposed:`Proposed`,awaiting:`Awaiting decision`,applying:`Applying`,applied:`Applied`,rejected:`Rejected`,partial:`Partially applied`,failed:`Not applied`,undone:`Undone`,superseded:`Superseded`,closed:`Closed`},earlyTitle:{searching:`Searching for a matching scenario\u2026`,search_results_shown:`Found several matches`,no_results:`Nothing matched`,item_selected:`Target selected`,inspecting:`Inspecting details\u2026`,ambiguity_choose_target:`Choose a target`},preparing:`The assistant is preparing a change\u2026`,changesCount:e=>`${nd(e)} ${rd(e)}`,noResults:`Nothing matched.`,chooseTargetHint:`Choose which target was meant:`,selected:`Selected`,nothingChanged:`Nothing has changed yet.`,evidenceHeading:`Evidence`,entityLabelMissing:`label missing`,open:`Open`,openAria:e=>`Open: ${e}`,searchingAria:`Searching`,whatChanges:`What will change`,proposalEmpty:`No changes proposed yet.`,secretChip:`secret`,evidence:`Rationale`,cascadeTitle:`Also will be deleted`,cascadeEntity:{step:`Steps`,scenario_run:`Scenario runs`,api_folder:`Folders`,api_saved_request:`Saved requests`,checklist_item:`Checklist items`,checklist_item_step:`Checklist item steps`,test_run_result:`Test run results`,scenario:`Scenarios`,environment:`Environments`,environment_variable:`Environment variables`,environment_preference:`Users' environment choices`,checklist:`Checklists`,api_collection:`API collections`},cascadeUnknown:e=>`Unknown entities (${e})`,cascadeCount:{step:e=>id(e,`step`,`steps`),scenario_run:e=>id(e,`scenario run`,`scenario runs`),api_folder:e=>id(e,`folder`,`folders`),api_saved_request:e=>id(e,`saved request`,`saved requests`),checklist_item:e=>id(e,`checklist item`,`checklist items`),checklist_item_step:e=>id(e,`item step`,`item steps`),test_run_result:e=>id(e,`run result`,`run results`),scenario:e=>id(e,`scenario`,`scenarios`),environment:e=>id(e,`environment`,`environments`),environment_variable:e=>id(e,`environment variable`,`environment variables`),environment_preference:e=>id(e,`environment choice`,`environment choices`),checklist:e=>id(e,`checklist`,`checklists`),api_collection:e=>id(e,`API collection`,`API collections`)},cascadeCountUnknown:(e,t)=>`${e}: ${nd(t)}`,dock:{factScenario:`Scenario`,factProject:`Project`,factObject:`What`,factWithIt:`Along with it`,factEdits:`Edits`,recordWithIt:e=>`along with it ${e}`,editsCount:e=>id(e,`edit`,`edits`),showInFeed:`Show in the feed`,showInFeedAria:e=>`Show in the feed: ${e}`,blockedUnworded:`Cannot confirm yet \u2014 see the record in the feed`,decided:{confirmDelete:`Deletion confirmed`,confirm:`Changes confirmed`,reject:`Rejected`},secretSaved:(e,t)=>t===null?`${ad(e)} saved`:`${ad(e)} saved to ${t}`},secretInput:{titleTail:` \u2014 secret for environment`,countTitle:e=>id(e,`secret`,`secrets`),countTitleTail:` for environment`,placeholder:`Secret value`,fieldLabel:e=>`Value of ${e}`,fieldLabelReplace:e=>`New value of ${e}`,show:`Show value`,hide:`Hide value`,save:`Save`,saveMany:e=>`Save ${id(e,`value`,`values`)}`,saving:`Saving`,replace:`Replace`,replacing:`Replacing`,retry:`Retry`,privacy:`The model and the chat will not see the value`,tooLong:(e,t)=>`At most ${nd(e)} characters \u2014 now ${nd(t)}`,failed:{network:`Could not save the value \u2014 no connection to the server.`,server:`Could not save the value \u2014 the server did not respond.`,refused:`Could not save the value \u2014 the server refused it.`},closed:`The change is already closed \u2014 the value was not saved`,confirmFailed:`The value was received, but the change could not be confirmed. \u201CRetry\u201D sends it again.`,current:`Now`,currentAria:`Current value hidden, will be replaced`,willReplace:`Will be replaced`,whyName:`Why it waits for you`,whyText:e=>`${e} already has a value \u2014 the new one replaces it. You confirm the replacement, even in \u201Cno confirmation\u201D mode.`,hiddenAria:`Value hidden`,savedIn:e=>`Saved to ${e}`,saved:`Saved`,declined:`Rejected \u2014 the value was not saved`,reenter:`Enter again`,reenterAria:e=>`Enter the value of ${e} again`,setByYou:e=>`set by you at ${e}`,setAt:e=>`set at ${e}`,notSet:`value not set`,savingAnnouncement:`Saving the value`},killSwitch:{title:`Progon writes are turned off for this company.`,body:`A company admin can enable them in Settings \u2192 AI. You can review this plan, but it cannot be applied.`},disabledReason:{still_composing:`The proposal is being updated \u2014 confirm will be available shortly.`,awaiting_secret_value:`Waiting for the secret value \u2014 enter it in the card above the message field.`},confirm:`Confirm changes`,confirmDelete:`Confirm deletion`,reject:`Reject`,bugFiling:{title:`File a bug?`,confirm:`File bug`,capture:{ready:`Screenshot`,awaiting:`Screenshot still uploading`,unavailable:`No screenshot`,no_screen:`Request and response, no screen to capture`},address:e=>`address ${e}`,severity:e=>`Severity: ${e}`,factFinding:`Finding`,factSeverity:`Severity`,factWithIt:`With it`,severityWord:{critical:`critical`,high:`high`,medium:`medium`,low:`low`}},closedBy:{line:{launch_stopped:`Closed \u2014 the launch stopped`,finding_filed:`Closed \u2014 you filed this bug yourself`},launchStoppedNote:`An answer would change nothing now`,findingFiledNote:(e,t)=>`You filed bug #${String(e)} from this finding at ${t} \u2014 no answer needed`},rejectPlain:`Just reject`,rejectWithReason:`Reject with a comment`,reasonLabel:`Why?`,reasonHint:`(optional \u2014 helps the assistant propose a better option)`,commandFailed:{confirm:`Failed to confirm \u2014 try again.`,reject:`Failed to reject \u2014 try again.`,retry:`Retry failed \u2014 try again.`},applyingSubject:e=>`Applying ${nd(e)} ${rd(e)}`,applyingGeneric:`Applying\u2026`,applyDuration:e=>`Apply time: ${nd(e)} ms`,applyAria:`Changes are being applied`,applyDisclaimer:`Do not assume success until the server confirms. You can navigate away \u2014 this task will continue and update when you return.`,attempt:e=>`attempt ${nd(e)}`,verified:`confirmed by the server`,appliedGroup:e=>`Applied (${nd(e)})`,failedGroup:e=>`Failed or blocked (${nd(e)})`,row:{applied:`Applied`,failed:`Failed to apply`,batch_aborted:`Rolled back`,pending:`Not attempted`,skipped:`Skipped`},applyError:{stale_guard:`The item changed after this proposal was composed.`,secret_expired_or_consumed:`The secret value has already been used or has expired.`,"assistant.change_set.batch_aborted":`Rolled back: another item in the same confirmation failed to apply.`,"assistant.change_set.apply_unexpected_error":`Unexpected error while applying.`,"assistant.ai_write_disabled":`Progon writes are turned off for this company.`,"variables.duplicate_name":`A variable with this name already exists.`},whatNext:`What to do next: retry the failed items, review any blocked ones, or revise your request.`,applyMissing:`Apply summary missing from snapshot.`,retryRemaining:e=>`Retry remaining (${nd(e)})`,importParts:{title:`Case import`,counts:(e,t,n,r)=>`Total ${nd(e)} \u00B7 written ${nd(t)} \u00B7 failed ${nd(n)} \u00B7 skipped ${nd(r)}`,page:(e,t)=>`${nd(e)} of ${nd(t)} on this page`,previous:`Previous`,next:`Next`,open:`Open import`,unnamed:`Name missing`,rowStatus:{pending:`Queued`,applied:`Written`,failed:`Write failed`,rolled_back:`Undone`,create:`Will be created`,replace:`Will be replaced`,copy:`Will be copied`,skip_existing:`Already imported`,skip_error:`Source error`,blocked:`Blocked`,pending_decision:`Awaiting a choice`}},revise:`Revise request`,reviseDraftScenario:e=>`Propose a different change for \u201C${e}\u201D`,reviseDraftProject:e=>`Propose a different change in project \u201C${e}\u201D`,rejectedTitle:`No changes made.`,rejectedLead:`The proposal was rejected before apply. Your project data is unchanged.`,undoneTitle:`Changes undone`,undoneLead:`The applied changes were reverted to their previous state.`,superseded:`Superseded by a newer proposal.`,unknownState:`Task status not supported by this version`,undo:{action:`Undo changes`,until:e=>`Undo available until ${e}`,busy:`Undoing\u2026`,blocked:{stale:`Undo unavailable: the data changed after apply.`,expired:`Undo unavailable: the undo window has elapsed.`,kill_switch:`Undo unavailable: Progon writes are disabled for this company.`},unavailable:`Undo unavailable.`,error:{"change_sets.undo_stale":`Undo unavailable: the data changed after apply.`,"change_sets.undo_expired":`Undo unavailable: the undo window has elapsed.`,"change_sets.undo_not_eligible":`Undo unavailable.`,"assistant.ai_write_disabled":`Undo unavailable: Progon writes are disabled for this company.`},failed:`Failed to undo the changes. Try again.`,unknown:`Undo status unknown \u2014 reload the card.`,sideEffectsTitle:`Not reversed automatically:`,sideEffect:{test_plan_assignment_advance:`Test-plan assignment advancement`}},loadingAria:`Loading task status`,loadError:`Couldn't load task status.`,loadErrorText:`Nothing changed on the server.`,retry:`Retry`,unavailable:`Card unavailable`,unavailableText:`You have no access to this change, or it was deleted.`,unsupported:{title:`Changes card not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension.`},turn:{title:`Changes`,awaiting:e=>`awaiting decision ${nd(e)}`,proposals:e=>`${nd(e)} ${Zu(e,{one:`proposal`,other:`proposals`})}`,remaining:(e,t)=>`${nd(e)} of ${nd(t)} left`,applying:(e,t)=>`Applying ${nd(e)} of ${nd(t)}\u2026`,done:(e,t)=>`Done: ${nd(e)} of ${nd(t)}`,applied:e=>`${nd(e)} applied`,rejected:e=>`${nd(e)} rejected`,errors:e=>`${nd(e)} ${Zu(e,{one:`error`,other:`errors`})}`,superseded:e=>`${nd(e)} superseded`,closed:e=>`${nd(e)} closed`,undone:e=>`${nd(e)} undone`,loadFailed:e=>`${nd(e)} failed to load`,confirmAll:e=>`Confirm all (${nd(e)})`,rejectAll:`Reject all`,passFailures:e=>Zu(e,{one:`${nd(e)} action failed \u2014 that card is unchanged`,other:`${nd(e)} actions failed \u2014 those cards are unchanged`})}},sd=new Intl.NumberFormat(`en`),cd=new Intl.NumberFormat(`en`,{style:`percent`,maximumFractionDigits:0}),ld={title:`Coverage check`,caption:e=>`\u201C${e}\u201D`,cardAria:e=>`Coverage check: ${e}`,covered:`Fully covered`,partial:`Partially covered`,gaps:`Gaps`,tagWarningPill:`Tag filter caveat`,unknownItem:`Unknown`,similarity:e=>`${cd.format(e)} match`,steps:e=>`${sd.format(e)} ${Zu(e,{one:`step`,other:`steps`})}`,unsupported:{title:`Coverage card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},ud=new Intl.NumberFormat(`en`),dd=e=>ud.format(e),fd={kind:{atlas_crawl:`Site crawl`,make_auto:`Scenario run`},stage:{queued:`Queued`,launching:`Launching`,link_pending:`Linking to the map`,crawling:`Exploring the site`,running_batch:`Running scenarios`,completed:`Completed`,failed:`Failed`,cancelled:`Stopped`},machineMissing:`Machine name not received`,activity:e=>`Active ${e}`,activityNone:`no activity`,foundCaption:`On the map`,found:{screens:e=>Zu(e,{one:`screen`,other:`screens`}),edges:e=>Zu(e,{one:`transition`,other:`transitions`}),notes:e=>Zu(e,{one:`note`,other:`notes`}),unexplored:e=>Zu(e,{one:`unexplored`,other:`unexplored`})},degraded:`The map cannot be read right now \u2014 counters are unavailable. The work continues.`,terminalPrefix:`Finished because`,terminalReason:{claim_timeout:`the agent never picked up the job`,launch_timeout:`the browser did not start in time`,launch_error:`the browser failed to start`,browser_gone:`the browser disappeared`,agent_lost:`the agent stopped responding`,max_duration:`the time limit was reached`,killed:`the agent browser was closed manually`,stalled:`the work made no progress`,capability_mismatch:`the agent does not support automatic mapping`,subject_rejected:`the server rejected the run`,model_timeout:`the model did not answer in time`,runs_not_started:`the runs did not start`,credits_exhausted:`credits ran out`,tab_closed:`the run tab was closed`,slot_taken:`another run took the machine slot`,ai_disabled:`an administrator turned Progon off`},openMap:`Open map`,openMapAria:e=>`Open the map of project \u201C${e}\u201D`,cancel:{atlas_crawl:`Stop`,make_auto:`Cancel batch`},kill:`Close agent browser`,cancelConfirm:{atlas_crawl:{question:`Stop the exploration?`,body:`The exploration will stop.`,bodyKept:`Everything the agent has already seen stays on the map.`,bodyQueued:`The job will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep exploring`,confirm:`Stop`},make_auto:{question:`Cancel the batch?`,body:`The whole batch stops: the current run is interrupted and the scenarios still in the queue will not start. Mapping collected so far is kept.`,bodyKept:null,bodyQueued:`The batch will be removed from the queue \u2014 nothing has started yet.`,keep:`Keep batch`,confirm:`Cancel batch`}},killConfirm:{question:`Close the agent browser?`,body:{atlas_crawl:`The browser on the agent machine will be force-closed and the exploration will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Stop.`,make_auto:`The browser on the agent machine will be force-closed and the batch will end as \u201Cbrowser closed manually\u201D. Use it if the agent did not stop after Cancel.`},keep:`Keep open`,confirm:`Close browser`},failed:{cancel:{atlas_crawl:`Could not stop the exploration.`,make_auto:`Could not cancel the batch.`},kill:`Could not close the agent browser.`,conflict:`The job has already changed \u2014 status refreshed.`},cardAria:e=>`Job: ${e}`,unsupported:{title:`Job status is not supported`,body:`The status came in a format this version cannot show. Reload the page or the extension.`},collection:{collectionAria:e=>`Jobs: ${dd(e)}`,roleCarousel:`job track`,roleSlide:`job`,previous:`Previous job`,next:`Next job`,goToSlide:`Job {index} of {total}`}},pd={explore_app:{id:`explore_app`,title:{ru:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u044C`,en:`Explore`},chip:{hint:{ru:`\u041E\u0431\u043E\u0439\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432`,en:`Walk through the app and build the screen map`},briefTemplate:{ru:`\u041E\u0431\u043E\u0439\u0434\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u0442\u0440\u043E\u0439 \u043A\u0430\u0440\u0442\u0443 \u044D\u043A\u0440\u0430\u043D\u043E\u0432.
|
|
355
|
-
\u0411\u0430\u0433 \u2014 \u0432\u0441\u0451, \u0447\u0442\u043E \u043B\u043E\u043C\u0430\u0435\u0442 \u043F\u0443\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.
|
|
356
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Walk through the app and build the screen map.
|
|
357
|
-
A bug is anything that breaks the user's path or answers with an error.
|
|
358
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`],browserSuggested:!0},find_bugs:{id:`find_bugs`,title:{ru:`\u041D\u0430\u0439\u0442\u0438 \u0431\u0430\u0433\u0438`,en:`Find bugs`},chip:{hint:{ru:`\u0418\u0441\u043A\u0430\u0442\u044C \u0434\u0435\u0444\u0435\u043A\u0442\u044B \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u0447\u0430\u0441\u0442\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,en:`Hunt for defects in the part of the app you name`},briefTemplate:{ru:`\u041D\u0430\u0439\u0434\u0438 \u0431\u0430\u0433\u0438 \u0432:
|
|
359
|
-
\u0411\u0430\u0433 \u2014 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u043F\u0440\u0438\u043D\u044F\u0442\u044B\u0439 \u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434, \u043E\u0448\u0438\u0431\u043A\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.
|
|
360
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Find bugs in:
|
|
361
|
-
A bug is wrong data, accepted invalid input, a server error.
|
|
362
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},create_tests:{id:`create_tests`,title:{ru:`\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0442\u0435\u0441\u0442\u044B`,en:`Create tests`},chip:{hint:{ru:`\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u043F\u043E \u0442\u043E\u043C\u0443, \u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438`,en:`Write scenarios and checklists from what the app has`},briefTemplate:{ru:`\u041D\u0430\u043F\u0438\u0448\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B \u0434\u043B\u044F:
|
|
363
|
-
\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u2014 \u043F\u043E \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044E: \u0447\u0442\u043E \u0434\u0435\u043B\u0430\u0435\u0442 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0438 \u0447\u0442\u043E \u043C\u043E\u0436\u0435\u0442 \u043F\u043E\u0439\u0442\u0438 \u043D\u0435 \u0442\u0430\u043A, \u0441 \u0433\u0440\u0430\u043D\u0438\u0446\u0430\u043C\u0438 \u0438 \u043E\u0448\u0438\u0431\u043E\u0447\u043D\u044B\u043C\u0438 \u043F\u0443\u0442\u044F\u043C\u0438.
|
|
364
|
-
\u041D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439: `,en:`Write scenarios and checklists for:
|
|
365
|
-
Checks follow behaviour: what the user does and what can go wrong, with limits and error paths.
|
|
366
|
-
Do not touch: `}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`],browserSuggested:!0},automate_scenarios:{id:`automate_scenarios`,title:{ru:`\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,en:`Automate`},chip:{hint:{ru:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438`,en:`Make scenarios automated`},briefTemplate:{ru:`\u0421\u0434\u0435\u043B\u0430\u0439 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u043C\u0438.
|
|
367
|
-
\u0415\u0441\u043B\u0438 \u0448\u0430\u0433 \u0443\u0441\u0442\u0430\u0440\u0435\u043B \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C \u0435\u0433\u043E \u0438 \u043D\u0430\u043F\u0438\u0448\u0438 \u0432 \u043E\u0442\u0447\u0451\u0442\u0435, \u0447\u0442\u043E \u043F\u043E\u043C\u0435\u043D\u044F\u043B.`,en:`Make the chosen scenarios automated.
|
|
368
|
-
If a step is outdated, fix it and say in the report what you changed.`}},defaultAllowedChanges:[`file_bugs`,`write_tests`],defaultCaptureApi:!1,suggestedScopeKinds:[`scenarios`],browserSuggested:!0},run_scenarios:{id:`run_scenarios`,title:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,en:`Run scenarios`},chip:{hint:{ru:`\u041F\u0440\u043E\u0433\u043D\u0430\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E`,en:`Run scenarios and sort out what failed`},briefTemplate:{ru:`\u041F\u0440\u043E\u0433\u043E\u043D\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0438, \u0447\u0442\u043E \u0443\u043F\u0430\u043B\u043E: \u0431\u0430\u0433 \u0432 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0438\u043B\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0448\u0430\u0433.
|
|
369
|
-
\u0411\u0430\u0433\u0438 \u0437\u0430\u0432\u043E\u0434\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u0431\u0430\u0433\u0430\u043C \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F.`,en:`Run the scenarios and sort out what failed: a bug in the app or an outdated step.
|
|
370
|
-
File bugs only for bugs of the app.`}},defaultAllowedChanges:[`file_bugs`],defaultCaptureApi:!1,suggestedScopeKinds:[`test_run`,`test_plan`,`scenarios`],browserSuggested:!1},custom:{id:`custom`,title:{ru:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`,en:`AI task`},chip:null,defaultAllowedChanges:null,defaultCaptureApi:!0,suggestedScopeKinds:[`project`,`scenarios`,`test_run`,`test_plan`],browserSuggested:!1}},md=[`explore_app`,`find_bugs`,`create_tests`,`automate_scenarios`,`run_scenarios`];function hd(e){return md.some(t=>Object.values(pd[t].chip.briefTemplate).includes(e))}function gd(e){return pd[e]}function _d(e){return e.name===null?e.briefLine:e.name}var vd={web_runs_prompt:`from Launches`,web_test_run_dialog:`from a test run`,web_map_dialog:`from the map`,web_scenarios_dialog:`from Scenarios`,chat:`from a chat`},yd=e=>Zu(e,{one:`agent`,other:`agents`}),bd={title:{make_auto:`Swarm \u00B7 Make Auto`,atlas:`Swarm \u00B7 Atlas`,preset:`AI task`},subtitle:(e,t,n)=>`${e} \u00B7 Max \u00B7 up to ${t} ${yd(t)} \u00B7 since ${n}`,preset:{stopConfirm:{question:`Stop the task?`,body:`The agent window closes and running runs are cancelled. The report is marked \u00ABPartial\u00BB. What is done \u2014 bugs, findings, scenarios \u2014 stays.`,keep:`Keep running`,confirm:`Stop the task`,failed:`Could not stop the task`},scope:e=>{switch(e.kind){case`project`:return`Whole app`;case`scenarios`:return`${e.count} ${Zu(e.count,{one:`scenario`,other:`scenarios`})}`;case`test_run`:return e.name===null?`Test run #TR-${String(e.number).padStart(3,`0`)}`:`Test run \u201C${e.name}\u201D`;case`test_plan`:return`Test plan \u201C${e.name}\u201D`}},level:e=>e.effort===`max`?`Max \u00B7 ${e.maxAgents} ${yd(e.maxAgents)}`:e.effort===`thinking`?`Thinking`:`Normal`,since:e=>`since ${e}`,counts:{findings:e=>Zu(e,{one:`finding`,other:`findings`}),bugs:e=>Zu(e,{one:`bug`,other:`bugs`}),undecided:e=>Zu(e,{one:`awaits a decision`,other:`await a decision`}),notDone:`not done`},awaitingBrowser:{sidePanel:`Connect this browser \u2014 the lead starts at once`,web:`You can continue from the Progon side panel in Chrome`},startingRunner:`Waiting for the runner to take the task`,pillAwaitingBrowser:`Waiting for a browser`,stripAwaitingBrowser:`The task is waiting for a browser`,panelWait:{title:e=>`\u201C${e}\u201D is waiting for a browser`,lostTitle:e=>`The browser disconnected \u2014 \u201C${e}\u201D is waiting`,lostDetail:e=>`The agent window closed at ${e}, the work done is saved`,origin:(e,t,n)=>`Launched ${vd[e]} at ${t} \u00B7 ${n}`,resume:`Continue in this browser`,openLaunch:`Launch page`},stripChatLeadAwaitingAnswer:`The assistant awaits your reply`,stripChatLeadAwaitingMessage:`The assistant awaits your message`,chatLeadIdle:`The assistant wakes up when the run ends`,partialCancelled:e=>`Incomplete: stopped at ${e}.`,partialFailed:e=>`Incomplete: ${e}.`,failureReason:{credits:`the company ran out of AI credits`,turnShape:`the lead answered outside the rules`,internal:`internal error of the lead`,initiatorUnavailable:`the initiator is unavailable`,other:e=>`the lead stopped with the error \u201C${e}\u201D`},beforeStop:(e,t)=>t===null?`Before the stop \u2014 ${e}.`:`Before the stop \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?_d(e):e.scenarioName===null?`${e.scenarioCount} ${Zu(e.scenarioCount,{one:`scenario`,other:`scenarios`})}`:e.scenarioName.trim()===``?`Untitled scenario`:e.scenarioName,pill:{startingBrowser:`Connecting`,startingRunner:`Connecting`,running:`Running`,awaiting:`Awaiting reply`,browserLost:`Waiting for browser`,runnerLost:`Waiting for runner`,pausing:`Pausing`,paused:`Paused`,stopping:`Stopping`,finalizing:`Final analysis`,completed:`Done`,failed:`Failed`,cancelled:`Stopped`},pauseCause:{user:`manual`,credits:`credits`},lead:{startingBrowser:`Waiting for the browser to take the swarm`,startingRunner:`Waiting for the runner to take the swarm`,active:`The lead is handing out work`,idle:`The agents are working, the lead awaits their reports`,awaiting:`The lead awaits your reply \u2014 the question is below`,stopping:`Closing the windows and stopping the tasks. What is done stays.`},startingRow:{browser:`Windows open in the background \u2014 focus stays with you`,runner:`Windows open in the runner's browser`},hostLost:{sidePanel:`The browser was closed \u2014 the agents' windows are closed, the queues are paused.`,web:`The browser is disconnected. You can continue from the Progon side panel in Chrome.`,runner:`The runner's job ended. Why \u2014 on the launch page, with \u00ABContinue on a runner\u00BB.`},worker:{name:e=>`Agent ${e}`,kind:{make_auto:`Make Auto`,atlas:`Atlas`,run:`Run`},task:e=>`task ${e}`,opening:`Window opening`,idle:`Awaiting a task`,busy:`Taking a task`,closing:`Window closing`,untitledScenario:`Untitled scenario`,crawl:e=>e===null?`Crawl`:`Crawl \u201C${e}\u201D`,progress:(e,t)=>`${e} of ${t}`,steps:e=>`${e} ${Zu(e,{one:`step`,other:`steps`})}`},end:{tally:(e,t)=>`Done ${e} of ${t}`,tallyBeforeStop:(e,t)=>`Done before the stop: ${e} of ${t}`,screens:e=>`${e} ${Zu(e,{one:`screen`,other:`screens`})} on the map`,cancelledBy:(e,t)=>`Stopped by ${e}, ${t}.`,reportPartial:`The report is marked \u00ABIncomplete\u00BB.`,failureReason:{credits:`The company ran out of AI credits.`,turnShape:`The lead answered outside the swarm\u2019s rules.`,internal:`Internal error of the lead.`,initiatorUnavailable:`The swarm stopped: the initiator is unavailable.`,other:e=>`The lead stopped with the error \u201C${e}\u201D.`}},actions:{open:`Swarm page`,openLaunch:`Launch page`,openReport:`Open report`,stop:`Stop`,resume:`Continue in this browser`,stopConfirm:{question:`Stop the swarm?`,body:`The windows close and the tasks stop. What is done \u2014 scenarios and screens on the map \u2014 stays.`,keep:`Keep running`,confirm:`Stop the swarm`},stopFailed:`Could not stop the swarm`},strip:{awaiting:`The lead awaits your reply`,toQuestion:`To the question`,lostBrowser:`Browser disconnected`,lostRunner:`Waiting for runner`,resume:`Continue`,startingBrowser:`Connecting the browser`,startingRunner:`Connecting the runner`,active:`The lead is handing out work`,idle:`The agents are working`,stopping:`The swarm is stopping`,toBlock:`To the swarm`,toBlockLabel:`Show the swarm block`,windows:e=>`${e} ${Zu(e,{one:`window`,other:`windows`})}`}},xd={failed:e=>`Could not start the scenario: ${e}`,failedBatch:e=>`Could not start the scenarios: ${e}`,reason:{no_active_tab:`no active tab. Open the project page first.`,content_not_loaded:`the extension is not loaded on this page. Refresh it and try again.`,launch_refused:`the tab did not start the run: another run is in progress there, or it could not be prepared.`,no_response:`the extension did not answer the run request. Try again.`,test_run_tab_missing:`the tab with this run's test run is closed, or its test run has ended.`},unsupported:{title:`Run in tab not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},Sd=new Intl.NumberFormat(`en`),Cd=e=>Sd.format(e),wd={title:`Run on agent`,cardAria:e=>`Run on agent: ${e}`,outcome:{refused:`Rejected`,refusedWithReason:e=>`Rejected: ${e}`,launched:(e,t)=>`Launched ${Cd(e)} of ${Cd(t)}`},confirmed:`Confirmed`,refusedHead:`Rejected`,refusedList:`Rejected scenarios`,launchedSummary:`Launched`,launchedList:`Launched scenarios`,unsupported:{title:`Run card not supported`,body:`The answer came in a format this version cannot show. Reload the page or update the extension.`}},Td={listLabel:(e,t)=>`${e} \u00B7 ${Cd(t)}`,token:{"stand.main":`Safe`,"stand.dangerous":`Full`,"onExisting.skip":`Skip`,"onExisting.replace":`Replace`,"onExisting.duplicate":`Create a copy`,"scenarios.ad_hoc_batch":`A one-off batch of steps, not a saved scenario`,"environment.projectDefault":`The project's default`,"status.running":`Running`,"status.finished":`Finished`,"status.aborted":`Aborted`,"aiRunMode.mapping":`Bind steps to page elements`,"aiRunMode.agentic":`The agent walks through the scenario`,"window.headful":`With browser window`,"window.headless":`Without browser window`,"executor.extension":`Browser extension`,"executor.agent":`Runner`,"billingPeriod.monthly":`Monthly`,"billingPeriod.yearly":`Yearly`,"requestType.plan_change":`Plan change`,"requestType.topup":`Credit top-up`,"requestType.seats":`Additional seats`,"role.user":`User`,"allowedChange.file_bugs":`File bugs`,"allowedChange.write_tests":`Create and change scenarios and checklists`,"allowedChange.edit_project":`Other changes`,"scope.project":`Whole application`},warning:{"stand.dangerous":`Full access on an unattended machine: the agent will be able to change and delete any data, with nobody next to it. Enable this on a test stand only.`},unrecognized:`Value not recognized`},Ed=new Intl.NumberFormat(`en`),Dd=e=>Ed.format(e),Od={title:`Scenario`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`Scenario ${e}: ${t}`,lifecycle:{draft:`Draft`,ready:`Live`,outdated:`Outdated`,archived:`Archived`},steps:e=>Zu(e,{one:`step`,other:`steps`}),runs:e=>Zu(e,{one:`run`,other:`runs`}),mapping:{label:{none:`Mapping: none`,partial:`Mapping: partial`,full:`Mapping: full`},hint:{none:`no step is linked yet`,partial:`some steps are linked to pages and elements`,full:`every step is linked`},hintNoSteps:`no steps`,tip:e=>`Steps mapped to pages and elements: ${e}`},open:`Open in workspace`,openShort:`Open`,openAria:e=>`Open in workspace: ${e}`,run:`Run`,runAria:e=>`Run: ${e}`,runCommand:e=>`Run scenario ${e}`,runNoSteps:`No steps to run \u2014 add steps in the workspace.`,expand:`Expand \u2014 steps and history`,expandShort:`Expand`,collapse:`Collapse`,tabsAria:`Scenario sections`,tabSteps:`Steps`,tabRuns:`Run history`,step:{aria:(e,t)=>`Step ${Dd(e)}: ${t}`,missingLabel:`step text is missing`,moreExpected:e=>`+${Dd(e)}`,expectedHeading:`Expected results`},stepsEmptyTitle:`No steps yet`,stepsEmptyHint:`Add steps in the workspace \u2014 record them in the extension, type them or import them.`,stepsShown:(e,t)=>`Showing ${Dd(e)} of ${Dd(t)}`,stepsLoadMore:e=>`Load ${Dd(e)} more`,stepsLoading:`Loading steps\u2026`,stepsLoadFailed:(e,t)=>`Could not load steps \u00B7 showing ${Dd(e)} of ${Dd(t)}`,runsEmptyTitle:`Never run`,runsEmptyHint:`Run the scenario \u2014 its run history appears here.`,runsEmptyHintNoSteps:`Add steps and run the scenario \u2014 its run history appears here.`,runsLoading:`Loading run history\u2026`,runsLoadFailed:`Could not load the run history`,runsShown:(e,t)=>`Showing ${Dd(e)} of ${Dd(t)}`,runsLoadMore:e=>`Show ${Dd(e)} more`,runStatus:{queued:`Queued`,launching:`Launching`,in_progress:`In progress`,completed:`Completed`,failed:`Failed`,cancelled:`Cancelled`},runMode:{manual:`Manual`,semi_auto:`Semi-auto`,auto:`Auto`},runProgress:(e,t)=>`step ${Dd(e)} of ${Dd(t)}`,runDurationUnavailable:`Duration unavailable`,runMomentUnavailable:`\u2014`,unsupported:{title:`Scenario card is not supported`,body:`The answer came in a format this version cannot show. Reload the page or the extension and ask in the chat again.`},collection:{collectionAria:e=>`Scenarios: ${Dd(e)}`,roleCarousel:`scenario track`,roleSlide:`scenario`,previous:`Previous scenario`,next:`Next scenario`,goToSlide:`Scenario {index} of {total}`}},kd=new Intl.NumberFormat(`en`),Y=e=>kd.format(e),Ad=e=>Zu(e,{one:`run`,other:`runs`}),jd=e=>Zu(e,{one:`failure`,other:`failures`}),Md=e=>Zu(e,{one:`pass`,other:`passes`}),Nd=e=>Zu(e,{one:`day`,other:`days`}),Pd=e=>Zu(e,{one:`page`,other:`pages`}),Fd={not_enrolled:()=>`No machine is connected yet.`,none_ready:e=>`None of your machines (${Y(e)}) is ready for this work.`,one_ready:e=>`One machine is ready. Machines in total: ${Y(e)}.`,many_ready:e=>`Several machines are ready. Machines in total: ${Y(e)}.`},Id={playback:`No playback`,atlas_crawl:`No site crawl`,make_auto:`No scenario auto-build`,scenario_launch:`No scenario launch`},Ld={common:{missingName:`name is missing`,open:`Open`,newTabSuffix:` (new tab)`,noOpenTarget:`no open target`,noOpenTargetHint:`There is no open target for this entity type`,moreActions:`More actions`,retry:`Retry`,commandFailure:{confirm:`Could not confirm \u2014`,reject:`Could not reject \u2014`,reason:{rejected:`the server did not accept the decision. Try again.`,ack_timeout:`the server did not answer. Try again.`,not_open:`the connection is not open yet. Try again.`,connection_closed:`the connection dropped. Try again.`}},entityType:{scenario:`Scenario`,bug:`Bug`,"checklist-item":`Checklist item`,checklist:`Checklist`,"saved-request":`API request`,collection:`Collection`,"shared-step":`Shared step`,run:`Test run`,"test-run":`Test run`,page:`Page`,"test-plan":`Test plan`,environment:`Environment`,variable:`Variable`,incident:`Incident`,"atlas-fact":`Map`,"api-folder":`API folder`,"api-endpoint":`API endpoint`,section:`Section`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`More`,scrubberAria:`Position in the track`,slideAria:`{index} of {total}`,slideAriaAtLeast:`{index} of {total}+`,slideAriaUnknown:`{index}, set size unknown`,loadedOf:`{loaded} of {total} shown`,loadedOfAtLeast:`{loaded} of {total}+ shown`,loadedOfUnknown:`{loaded} shown`,loadMore:`Load {remaining} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadMoreFailed:`Could not load the next page`,retry:`Retry`,loadedMore:`{count} more loaded, {total} in total`,loadedMoreAtLeast:`{count} more loaded, at least {total} in total`,loadedMoreUnknown:`{count} more loaded`},report:{title:{metric_card:`Metric`,trend_card:`Trend`,finding_card:`Weak spot`,stability_row_card:`Scenario stability`,scenario_stability_card:`Scenario stability \u2014 details`,failure_breakdown_card:`Failure causes`,weak_spot_feature_card:`Weak area: feature`,weak_spot_page_card:`Weak area: page`,hotspot_card:`Bug hotspot`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},windowShort:{"7d":`7 d`,"14d":`14 d`,"30d":`30 d`,"90d":`90 d`},basisRuns:(e,t)=>`last ${Y(e)} ${Ad(e)} (up to ${Y(t)} ${Nd(t)})`,currentState:`current state`,noWindow:`window does not apply`,asOf:e=>`as of ${e}`,stamp:{source:(e,t)=>[`Source: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 version ${t}`,rule:(e,t)=>`rule ${e} \u00B7 version ${t}`,definition:e=>`definition version ${e}`,mapping:e=>`mapping version ${e}`,envelope:(e,t)=>`${e} \u00B7 version ${t}`},metric:{name:{pass_rate:`Run pass rate`,runs_total:`Runs`,runs_passed:`Passed runs`,runs_failed:`Failed runs`,runs_evaluated:`Runs in the denominator`,runs_infra:`Infrastructure runs`,runs_cancelled:`Cancelled runs`,runs_abandoned:`Abandoned runs`,run_duration_sum_ms:`Total run duration`,run_duration_count:`Runs with a known duration`,run_duration_avg:`Average run duration`,page_steps_executed:`Steps executed on the page`,page_steps_passed:`Steps passed on the page`,page_steps_failed:`Steps failed on the page`,page_steps_healed:`Self-healed steps on the page`,page_step_success_rate:`Page step success rate`,page_healed_rate:`Page self-healing share`,step_failures:`Step failures`,run_failures:`Run failures`,bugs_opened:`Bugs opened`,bugs_closed:`Bugs closed`,open_bugs:`Open bugs`,covered_pages:`Covered pages`,total_pages:`Total pages`,page_coverage_pct:`Page coverage`,unstable_scenarios:`Unstable scenarios`},missingName:`Metric without a name in this version`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`ms`,days:`d`},denominator:{pass_rate:e=>`of ${Y(e)} ${Ad(e)}`,runs_total:e=>`${Y(e)} ${Ad(e)}`,unstable_scenarios:e=>`of ${Y(e)} automated ${Zu(e,{one:`scenario`,other:`scenarios`})}`,open_bugs:e=>`${Y(e)} open`,page_coverage_pct:e=>`of ${Y(e)} ${Pd(e)}`,generic:e=>`base: ${Y(e)}`},insufficient:`Not enough data in the window \u2014 the metric is not computed.`,noSeriesValue:`Not enough data in the window \u2014 no chart is drawn.`,deltaHint:`vs the previous period`,deltaPointsHint:` \u00B7 pp \u2014 percentage points, the difference of two percentages`,deltaPoints:e=>`${e} pp`,sparkAria:e=>`Trend: ${e}`,sparkGap:(e,t)=>`Not enough data on ${e}: ${Y(t)} ${Ad(t)}`,openReport:`Open the full report`},trend:{lastDay:e=>`Last day (${e})`,dayDenominator:e=>`day denominator: ${Y(e)}`,points:`Points`,empty:`No points \u2014 not a single day in the window had enough data.`,gaps:e=>`Days with no value: ${Y(e)} \u2014 the day denominator is below the minimum.`},finding:{severity:{critical:`critical`,high:`important`,watch:`watch`},sentence:{uncovered_high_priority:e=>({before:`Feature `,after:` (${e.priority} priority): ${Y(e.uncovered)} of ${Y(e.total)} ${Pd(e.total)} not covered`}),consistently_failing_scenario:e=>({before:`Scenario `,after:` failed in the last ${Y(e.count)} ${Ad(e.count)} in a row`}),low_page_success:e=>({before:`Page `,after:`: step success ${e.rate} of ${Y(e.executions)} (threshold: ${e.threshold})`}),high_healed_rate:e=>({before:`Page `,after:`: ${e.rate} of passed steps needed self-healing (threshold: ${e.threshold})`}),stale_page:e=>({before:`Page `,after:` has not been checked for ${Y(e.days)} ${Nd(e.days)} (threshold: ${Y(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`Page `,after:`: ${Y(e.count)} critical ${Zu(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`}),open_bugs_no_verification_high:e=>({before:`Page `,after:`: ${Y(e.count)} high-severity ${Zu(e.count,{one:`bug`,other:`bugs`})} and no passed check in ${e.window}`})},dominantCause:(e,t,n)=>`; main cause \u2014 ${e.toLocaleLowerCase(`en`)} (${Y(t)} of ${Y(n)} ${jd(n)})`,unknownRule:`The rule of this weak spot is not supported by this version.`,incompleteEvidence:`The rule evidence is incomplete, so no statement is made.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${Y(e)} \u00B7 ${t} \u00B7 threshold ${Y(n)}`,evidenceAria:`Evidence behind the statement`,evidenceRows:{denominator:`Denominator`,threshold:`Threshold`,window:`Window`,rule:`Rule`},open:{scenario:`Open the scenario`,page:`Open the page`,feature:`Open the feature`}},openAria:(e,t)=>`${e} \u201C${t}\u201D`,stability:{status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`not enough history`,stable:`stable`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${Y(e)} ${jd(e)} and ${Y(t)} ${Md(t)} in the last ${Y(n)} ${Ad(n)}`,consistently_failing:e=>Zu(e,{one:`Consistently failing \u2014 the last ${Y(e)} run failed`,other:`Consistently failing \u2014 the last ${Y(e)} runs failed in a row`}),monitoring:(e,t)=>`Monitoring \u2014 ${Y(e)} ${jd(e)} out of ${Y(t)} ${Ad(t)}; flaky needs \u22652 failures and \u22652 passes at n\u22656`,insufficientHistory:e=>`Not enough history \u2014 ${Y(e)} ${Ad(e)}; classification needs \u22653`,insufficientHistoryWatermark:e=>`Not enough history \u2014 history is classified from ${e}: the scenario was edited`,stable:e=>`Stable \u2014 ${Y(e)} ${Ad(e)} with no failures`},stripAria:(e,t,n)=>`${Y(e)} ${Md(e)}, ${Y(t)} ${jd(t)} out of ${Y(n)}`,stripAriaBeforeChange:e=>` \u00B7 before the scenario was edited: ${Y(e)} ${Ad(e)}`,beforeChange:`before the scenario was edited`,success:`Success rate`,outOf:(e,t)=>`${Y(e)} of ${Y(t)}`,dominantCause:`Main cause`,noFailures:`no failures`,lastRun:`Last run`,historyReset:e=>`History is classified from ${e}: the scenario was edited.`,causesTitle:`Failure causes`,failures:e=>`${Y(e)} ${jd(e)}`,healed:`Step self-healing`,aiExecuted:`AI-executed steps`,ofPassedSteps:(e,t)=>`${Y(e)} of ${Y(t)} passed ${Zu(t,{one:`step`,other:`steps`})}`,erFailed:`Failed expected results`,erFailedValue:(e,t)=>`in ${Y(e)} of ${Y(t)} ${Ad(t)}`,rawCodes:e=>`Cause codes \u00B7 mapping ${e}`,rawCode:(e,t)=>`${e} \u00D7${Y(t)}`,recentRuns:`Recent runs`,outcome:{passed:`passed`,failed:`failed`,infra:`infrastructure`,cancelled:`cancelled`,abandoned:`abandoned`},totalFailures:`Failures in total`,noCauses:`No failures.`},cause:{element_resolution:`Element lookup`,step_definition:`Step definition`,action_dispatch:`Action dispatch`,precondition:`Precondition not met`,infrastructure:`Infrastructure`,cancelled:`Cancelled`,unrecognized:`Unrecognized`},weakSpots:{coverage:`Coverage`,coverageValue:(e,t)=>`${Y(e)} of ${Y(t)} ${Pd(t)}`,stepSuccess:`Step success rate`,ofSteps:(e,t)=>`${Y(e)} of ${Y(t)} ${Zu(t,{one:`step`,other:`steps`})}`,noExecutions:`no executions`,openBugs:`Open bugs`,findings:`Weak spots`,findingsNone:`none`,findingCount:{critical:e=>`${Y(e)} critical ${Zu(e,{one:`finding`,other:`findings`})}`,high:e=>`${Y(e)} important ${Zu(e,{one:`finding`,other:`findings`})}`,watch:e=>`${Y(e)} ${Zu(e,{one:`finding`,other:`findings`})} on watch`},pagesTitle:`Feature pages`,pagesCount:(e,t)=>`${Y(e)} of ${Y(t)}`,pageCovered:`covered`,pageNotCovered:`not covered`,pageBugs:e=>`bugs: ${Y(e)}`,pagesTruncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)} feature pages.`,membership:`A page can belong to several features \u2014 per-feature sums do not add up.`,unassigned:`no feature`,priority:{critical:`Critical`,high:`High`,medium:`Medium`,low:`Low`,ignore:`Ignored`}},lastPassed:{label:`Last passed check`,never:`no passed checks yet`,today:`today`,yesterday:`yesterday`,daysAgo:e=>`${Y(e)} ${Nd(e)} ago`},hotspot:{open:`Open bugs`,opened:`Opened in the window`,closed:`Closed in the window`,closedHint:`Closures are counted from the reports release: earlier closures carry no close date, and rebuilding it from the change time would be made up.`,unmapped:`Unmapped`,unmappedHint:`Bugs whose element or page has been deleted.`,severityChip:{critical:e=>`${Y(e)} crit`,high:e=>`${Y(e)} high`,medium:e=>`${Y(e)} med`,low:e=>`${Y(e)} low`,none:e=>`${Y(e)} no severity`,unknown:(e,t)=>`${Y(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)} \u2014 the full list is in the report.`,truncated:`Not all rows are shown \u2014 the full list is in the report.`},unsupported:{title:`This report card is not supported`,body:`The report data arrived in a shape this version cannot show. Reload the page or update the extension \u2014 the numbers are still in Progon\u2019s reply text.`},collection:{collectionAria:e=>`Report cards: ${Y(e)}`,roleCarousel:`card track`,roleSlide:`card`,previous:`Previous card`,next:`Next card`,goToSlide:`Card {index} of {total}`}},runnerReadiness:{title:e=>`Machine readiness: ${e}`,job:{atlas_crawl:`site crawl`,make_auto:`scenario auto-build`,swarm:`agent swarm`,scenario_launch:`scenario launch`},evaluatedAt:e=>`as of ${e}`,fleet:Fd,state:{not_owner:()=>`Not found`,pending_enroll:()=>`Awaiting connection`,offline:()=>`Offline`,capability_missing:e=>e===null?`Update needed`:Id[e],queue_full:()=>`Queue full`,ready:()=>`Ready`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`last seen ${e}`,lastSeenNever:`never came online`,machinesAria:e=>`Machines: ${Y(e)}`,noRunners:`The machine list is empty.`,truncated:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,unsupported:{title:`This machine card is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Readiness reports: ${Y(e)}`,roleCarousel:`readiness report track`,roleSlide:`report`,previous:`Previous report`,next:`Next report`,goToSlide:`Report {index} of {total}`}},runnerEnrollment:{title:e=>`Connect your machine: ${e}`,expiresAt:e=>`valid until ${e}`,step:{install:`Install the agent`,enroll:`Connect the machine`,approve:`Approve it in the browser`,start:`Start the daemon`},copy:`Copy`,copied:`Copied`,copyAria:{install:`Copy the install command`,enroll:`Copy the enroll command`,start:`Copy the start command`},copiedAria:{install:`Copied \u2014 the install command`,enroll:`Copied \u2014 the enroll command`,start:`Copied \u2014 the start command`},approveBefore:`The enroll command prints a confirmation code and an approval link shaped like`,approveAfter:`\u2014 open it in a browser signed in to Progon, check the code matches your terminal, name the machine and approve it.`,cadence:e=>`Approve the request within ${Y(e)} s.`,askAgain:`Once the machine is connected, ask in the chat again.`,unsupported:{title:`These connection instructions are not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`}},references:{title:`References`,groupAria:`References from the reply`,destination:{workbench:`in the workbench`,map:`on the map`,run:`opens the run`,list:`in the list`},action:{workbench:`Open in the workbench`,map:`Open on the map`,run:`Open the run`,list:`Open in the list`},noOpenAria:e=>`No open target: ${e}`,unsupported:{title:`References from the reply are not supported`,body:`The references arrived in a format this version cannot show. Reload the page or update the extension.`}},sectionLink:{title:`Project sections`,groupAria:`Project section links`,action:`Open the section`,sections:{scenarios:`Scenarios`,"shared-steps":`Shared Steps`,"api-collections":`API Requests`,"api-catalog":`API Requests`,checklists:`Checklists`,bugs:`Bugs`,"test-runs":`Test Runs`,imports:`Import`,map:`Project Map`},unrecognized:`Unrecognized section`,serverLabel:e=>`Section \u00B7 from the server: \u201C${e}\u201D`,noRoute:`no link`,noRouteHint:`No link could be built for this section`,noRouteAria:e=>`No link for the section: ${e}`,unsupported:{title:`This section link is not supported`,body:`The reply arrived in a shape this version cannot show. Reload the page or update the extension.`}},search:{title:`Found in the project`,evidence:`Why it matched`,openAria:e=>`Open: ${e}`,emptyTitle:`Nothing found`,emptyForQuery:e=>`Nothing matched \u201C${e}\u201D with enough confidence.`,emptyBody:`Searched across the available entity types \u2014 scenarios, bugs, checklist items.`,shownOfTotal:(e,t)=>`Showing ${Y(e)} of ${Y(t)}.`,shownOfAtLeast:(e,t)=>`Showing ${Y(e)} of ${Y(t)}+.`,shownUnknown:e=>`Showing ${Y(e)}.`,loadMore:e=>`Load ${Y(e)} more`,loadMoreUnknown:`Load more`,loading:`Loading the next page\u2026`,loadFailed:`Could not load the next page`,retry:`Retry`,unsupported:{title:`These search results are not supported`,body:`The search reply arrived in a shape this version cannot show. Reload the page or update the extension and ask in the chat again.`},collection:{collectionAria:e=>`Found: ${Y(e)}`,roleCarousel:`result track`,roleSlide:`result`,previous:`Previous result`,next:`Next result`,goToSlide:`Result {index} of {total}`}},jobStatus:fd,workflow:bd,scenario:Od,coverage:ld,runInTab:xd,runStartAgent:wd,confirmation:Td,changeSet:od},Rd={byCode:{"agent_jobs.dispatch_key_spent":`This confirmation is used up: the exploration it started has finished. Ask for the exploration again.`,"agent_jobs.not_active":`The job has already finished \u2014 there is nothing to stop.`,"agent_jobs.not_found":`Job not found.`,"ai.bedrock_not_configured":`Amazon Bedrock is not configured`,"ai.capabilities.unknown_provider":`Unknown provider.`,"ai.company_not_found":`Company not found.`,"ai.completion_failed":`Progon request failed`,"ai.concurrency_gate_unavailable":`Progon is temporarily unavailable because of a problem on our side. Please try again later.`,"ai.credit_charge_failed":`Credits could not be charged for this request. Please try again or contact support.`,"ai.credit_estimate_invalid":`Credit estimate is invalid.`,"ai.credit_reservation_failed":`Could not reserve credits.`,"ai.credit_reservation_not_found":`Credit reservation not found.`,"ai.credit_reservation_not_open":`This credit reservation is no longer open.`,"ai.credits_insufficient":`Not enough credits`,"ai.element_html_required":`Element HTML is required`,"ai.frozen_model_lane_retired":`Frozen on a model lane the platform no longer operates. Launch it again on a current model.`,"ai.generation_failed":`Progon generation failed`,"ai.messages_required":`Messages are required`,"ai.model_not_allowed":`This model is not allowed`,"ai.model_not_configured":`No model is available for your account. Configure one in settings or contact your administrator.`,"ai.model_output_ceiling_below_thinking_budget":`The model's catalog output ceiling is below its thinking budget \u2014 an administrator must raise the ceiling or lower the budget.`,"ai.model_output_ceiling_missing":`This model has no response ceiling recorded in the catalog, and the provider requires one. Contact your administrator.`,"ai.model_plan_restricted":`Your plan does not allow this model`,"ai.plan_restricted":`Your plan does not allow this action`,"ai.provider_empty_response":`Provider returned an empty response`,"ai.provider_error":`Provider error`,"ai.provider_not_configured":`Provider is not configured`,"ai.reasoning_unsupported":`The model does not control reasoning \u2014 choose \u00ABNormal\u00BB in \u00ABEffort\u00BB and send again.`,"ai.user_company_missing":`User is not associated with a company`,"ai.user_concurrency_exceeded":`Too many requests are running at once. Wait for the current ones to finish and try again.`,"ai.user_credits_limit":`User credit limit reached`,"ai.user_disabled":`Progon is disabled for your account. Contact your administrator.`,"ai.user_model_not_allowed":`This model is not available for your account`,"ai.user_not_found":`User account not found.`,"ai_models.no_sendable_model":`No model is available for this run \u2014 pick one in the top bar or configure a key in settings.`,"ai_models.selection_not_sendable":`This model cannot be selected right now.`,"ai_settings.admin_required":`Admin access required.`,"ai_settings.api_key_missing":`No saved API key found.`,"ai_settings.company_key_required":`Company API key is required for this action.`,"ai_settings.company_not_found":`Company not found.`,"ai_settings.company_provider_required":`A company provider must be configured.`,"ai_settings.enterprise_required_company":`Company keys require an Enterprise plan.`,"ai_settings.enterprise_required_personal":`Personal keys require an Enterprise plan.`,"ai_settings.enterprise_required_user":`User keys require an Enterprise plan.`,"ai_settings.invalid_provider":`Invalid provider selected.`,"ai_settings.model_unavailable":`Selected model is not available for your account.`,"ai_settings.personal_provider_required":`A personal provider must be configured.`,"ai_settings.plan_not_found":`Plan not found.`,"ai_settings.provider_required":`Provider is required.`,"ai_settings.provider_unavailable":`Selected provider is not available.`,"ai_settings.unsupported_personal_provider":`Selected provider is not supported as a personal provider.`,"ai_settings.user_not_found":`User not found.`,"assistant.action_context_missing":`Cannot confirm: the conversation context is missing. Start a new conversation or reload.`,"assistant.conversations.invalid_cursor":`Invalid cursor.`,"assistant.conversations.not_found":`Conversation not found.`,"assistant.recover_last_message":`The previous answer was interrupted. Retry your last message.`,"assistant.search_session.not_found":`Search session not found or expired.`,"auth.company_forbidden":`Access denied to this company`,"auth.forbidden":`Insufficient permissions`,"auth.insufficient_scope":`Required permission scope is not granted.`,"auth.invalid_token":`Invalid or expired token`,"auth.login.company_inactive":`Company not found or deactivated`,"auth.login.email_not_verified":`Please verify your email to sign in`,"auth.login.email_rate_limited":`Too many login attempts for this email. Please try again later.`,"auth.login.invalid_credentials":`Invalid email or password`,"auth.login.missing_credentials":`Email and password are required`,"auth.login.rate_limited":`Too many login attempts. Please try again later.`,"auth.missing_header":`Missing or invalid authorization header`,"auth.refresh.token_required":`Refresh token is required.`,"auth.register.capacity_reached":`We are accepting a limited number of new accounts right now, so sign-ups are temporarily closed. Please try again later, or contact support if you need access sooner.`,"auth.register.capacity_unreadable":`Registration could not be completed because of a server error. Please try again, and contact support if it persists.`,"auth.register.company_required":`Company name is required.`,"auth.register.email_domain_blocked":`This email provider is not accepted for registration. Please sign up with a permanent work or personal address.`,"auth.register.email_invalid":`Invalid email address.`,"auth.register.email_taken":`A user with this email already exists`,"auth.register.invite_code_invalid":`This invite code is not valid. Check the code you entered, or request a new one.`,"auth.register.invite_required":`Registration is currently by invitation only. Use the invitation link you were sent, or contact support to request access.`,"auth.register.name_required":`First and last name are required.`,"auth.register.rate_limited":`Too many registration attempts. Please try again later.`,"auth.required":`Authentication required`,"auth.resend.email_required":`Email is required.`,"auth.resend.rate_limited":`Please wait before requesting another code.`,"auth.session_invalidated":`Your session has been invalidated. Please log in again.`,"auth.session_required":`This action requires session authentication.`,"auth.token_expired":`Your token has expired. Please log in again.`,"auth.token_revoked":`Your token has been revoked. Please log in again.`,"auth.user_unavailable":`User not found or deactivated`,"auth.verify_email.invalid_code":`Invalid verification code`,"auth.verify_email.rate_limited":`Too many verification attempts. Please try again later.`,"auth.verify_email.required":`Email and verification code are required.`,"auth.verify_email.too_many_attempts":`Too many attempts. Please request a new code`,"available_models.missing_disabled_selection_id":`Disabled selection ID is missing.`,"available_models.redis_unavailable":`Model availability service is temporarily unavailable.`,"available_models.unknown_key_source":`Unknown API key source.`,"chat.busy":`The assistant is still answering the previous message. Wait and try again.`,"chat_confirm.display_unresolvable":`The assistant referred to an object that does not exist in this project. Say exactly what to start or stop and try again.`,"chat_confirm.pending_action_stale":`This proposal is stale: it was made before an update and its parameters no longer fit the tool. Ask again and the assistant will prepare a fresh one.`,"client.connection_lost_during_stream":`The answer was cut off. Try again once the connection is back.`,"client.browser_api_action_failed":`Could not finish the browser API request. Check history: the request may have been sent.`,"client.atlas_host_action_failed":`Could not finish starting the exploration in this browser. Check Atlas runs before trying again.`,"client.ai_run_host_action_failed":`Could not finish starting the AI run in this browser. Check its status before trying again.`,"client.workflow_host_action_failed":`Could not connect the swarm in this browser. Open the swarm page and try again.`,"client.permission_mode_changed":`The confirmation mode was changed in another window. Check the switch and send the message again.`,"client.stream_stalled":`No answer for over a minute. Try again \u2014 the part of the answer already received stays above.`,"cmd.accept_timeout":`The server did not take the message in time. Try again.`,"company_models.default_must_be_enabled":`Model must be enabled in the allowlist before it can be set as default.`,"company_models.invalid_model_id":`Model not found.`,"company_models.plan_restricted":`This model requires a higher subscription plan.`,"conversation.project_id_required":`A project ID is required for this conversation.`,disconnected:`Connection lost. Please try again.`,"internal.invalid_token":`Invalid admin token.`,"internal.not_configured":`Internal API is not configured.`,"internal.operation_failed":`Internal operation failed.`,"internal.unexpected":`Unexpected error`,model_not_allowed:`That model isn't available for your plan \u2014 reverted to your default.`,"rate_limit.company_write_exceeded":`Company rate limit exceeded. Please retry later.`,"rate_limit.counter_upsert_failed":`Failed to update rate limit counter.`,"rate_limit.counter_upsert_invalid_count":`Rate limit counter returned an invalid value.`,"rate_limit.exceeded":`Too many requests. Please try again later.`,reconnect_failed:`Unable to reconnect. Please check your network and try again.`,reconnect_timeout:`Connection timed out. Please check your network and try again.`,selection_expired:`Message could not be sent. Please try again.`,"subscription.admin_api_error":`Unable to process request at this time.`,"subscription.admin_api_not_configured":`The upgrade request service is not configured.`,"subscription.admin_api_unavailable":`The upgrade request service is temporarily unavailable. Please try again later.`,"subscription.admin_required":`Admin access required.`,"subscription.company_not_found":`Company not found.`,"subscription.credits_maximum":`Maximum purchase is 100,000 credits.`,"subscription.credits_minimum":`Minimum purchase is 100 credits.`,"subscription.invalid_plan":`Invalid subscription plan.`,"subscription.payments_disabled":`Payment processing is temporarily unavailable. Please use the upgrade request form.`,"subscription.plan_config_missing":`Your subscription plan configuration could not be read, so this action cannot be completed. Please contact support.`,"subscription.plan_not_found":`Subscription plan not found.`,"subscription.request_already_open":`Your company already has an open upgrade request. Please wait for it to be resolved before submitting a new one.`,"subscription.seats_exceed_limit":`Cannot add seats: the maximum allowed for your plan would be exceeded.`,"subscription.seats_invalid":`Invalid seat count. Must be between 1 and 100.`,"subscription.seats_unlimited":`Your plan already includes unlimited seats.`,"ws.conversation_not_found":`Conversation not found.`,"ws.rate_limit_company":`Company connection limit reached. Please try again later.`,"ws.rate_limit_fleet":`Server connection limit reached. Please try again later.`,"ws.rate_limit_user":`Too many connections. Please try again later.`,"ws.run_not_found":`Progon run not found.`,"ws.runner_already_claimed":`Runner is already claimed for this run.`,"ws.runner_not_owner":`Runner claim was lost. Please reconnect.`,"ws.runner_restore_unavailable":`No active runner session to restore.`,"ws.runner_restore_window_expired":`Runner restore window has expired.`,"ws.session_not_found":`Session not found.`,"ws.unauthorized_channel":`Access denied or resource not found.`,"workflows.agents_over_max":`\u00ABMax agents\u00BB was lowered \u2014 \u00ABEffort\u00BB moved to the new maximum, send again.`,"workflows.not_found":`Swarm not found.`,"workflows.not_initiator_or_admin":`Only the person who launched the swarm or a company admin can stop it.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI rejected the request \u2014 your account balance is insufficient, or the key and endpoint don't match. Check your Z.AI balance and key.`,"ai.zai.rate_limited":`Z.AI is rate-limiting requests. Please wait a moment and try again.`,"ai.zai.overloaded":`Z.AI is temporarily overloaded. Please wait a moment and try again.`,"ai.zai.quota_exhausted":`Your Z.AI usage quota is exhausted. Check your Z.AI plan limits.`,"ai.zai.plan_restricted":`This Z.AI key is restricted to a specific subscription or plan. Check your Z.AI plan.`,"ai.zai.content_policy":`Z.AI declined this request due to its content policy.`,"ai.zai.unknown_model":`The selected Z.AI model is not recognized. Pick a different GLM model.`,"ai.zai.auth_failed":`Z.AI authentication failed. Check that your API key is valid and active.`,"ai.zai.invalid_request":`Z.AI rejected the request as invalid. Check your input and try again.`,"ai.zai.context_overflow":`The conversation is too long for this Z.AI model. Start a new conversation or shorten your input.`,"ai.zai.vision_not_supported":`This Z.AI model does not support image input. Remove images or pick a vision-capable model.`,"ai.zai.abnormal_termination":`The Z.AI response ended unexpectedly. Please try again.`,"ai.zai.provider_error":`Z.AI returned an error. Please try again.`}},zd=e=>Zu(e,{one:`message`,other:`messages`}),Bd=e=>Zu(e,{one:`agent`,other:`agents`}),Vd={cards:Ld,shell:{header:{title:`Progon`,history:`History`,newConversation:`New conversation`,noProject:`No project selected`},composer:{inputLabel:`Message to the assistant`,placeholder:`Ask Progon\u2026`,placeholderNoModels:`Sending is unavailable until the model list loads`,placeholderSignIn:`Sign in in the extension first`,placeholderNoProject:`Select a project first`,placeholderOffline:`No connection \u2014 sending is unavailable`,send:`Send`,stop:`Stop the answer`,placeholderWithFiles:`Write what to do with the files\u2026`,sendBlocked:{uploading:`Wait for the files to upload`,refused:`Remove the files that cannot be sent`,noText:`Write a message for the files`},settingsLabel:`Answer settings`,effort:{name:`Effort`,note:`The assistant's answers and its launches`,levels:{normal:`Normal`,thinking:`Thinking`,max:`Max`},rows:{normal:`Normal answers, launches by one agent`,thinking:`The assistant and the agent think deeper`,max:`Deeper, and launches by a swarm of agents`},footer:`Holds until the end of the conversation. A new conversation starts on \u00ABNormal\u00BB.`,chipMax:e=>`Max \u00B7 ${e} ${Bd(e)}`,chipMaxShort:e=>`Max \u00B7 ${e}`,long:{normal:`Normal \u00B7 one agent`,thinking:`Thinking \u00B7 one agent`,max:e=>`Max \u00B7 ${e} ${Bd(e)}`},chipLabel:e=>`Effort: ${e}`,reasonPlace:`Needs a browser: \u00ABMaximum\u00BB is the agents' windows`,agents:{label:`Agents`,limit:e=>`No more than ${e} \u2014`,settingsLink:`\u00ABSettings \u2192 AI \u2192 Agent swarm\u00BB`,groupLabel:`Number of agents`,fewer:`Fewer agents`,more:`More agents`}},permission:{groupLabel:`Action confirmations`,menuNote:`For this conversation`,chipLabel:e=>`Confirmations: ${e}`,ask:`Ask`,bypass:`No confirmations`,askHint:`Launches and irreversible edits wait for your confirmation.`,bypassHint:`Launches and edits run at once. Deletions still wait for confirmation.`,arrived:e=>`Confirmations: ${e}`},place:{name:`Where to work`,note:`For every launch from the message`,title:`Where the AI works in a browser: this browser, a runner or no browser`,chipLabel:e=>`Where to work: ${e}`,thisBrowser:`This browser`,thisBrowserRowOpensWindows:`Windows open in the background of this Chrome`,thisBrowserRowTasksOnly:`In the web chat \u2014 tasks only; runs and crawls go through a runner or the side panel`,none:`No browser`,noneRow:`API requests and server-side scenarios only`,runner:e=>`Runner ${e}`,runnerUnread:`Runner`,runnerGone:`Runner unavailable`,runnerGoneHint:`The chosen runner was deleted or is no longer available to you. Pick where to work.`,runnerFree:`Free`,runnerBusy:`Busy \u2014 the launch will queue`,runnerBlocked:{notOwner:`Only its owner can launch`,notEnrolled:`Not connected yet`,offline:`Offline`},fleetLoading:`Loading runners\u2026`,fleetFailed:`Could not load runners`,fleetRetry:`Retry`,fleetEmpty:`Your company has no runners`,othersGroup:e=>`Other people's runners (${e})`},hint:`Enter to send, Shift+Enter for a new line`,plainHint:`Enter to send`,attachments:{attach:`Attach a file`,trayLabel:`Files of the message`,remove:e=>`Remove the file \u00AB${e}\u00BB`,uploading:e=>`Uploading ${e}%`,uploadingLabel:e=>`Uploading ${e}`,pastedName:e=>`Screenshot ${e}`,drop:{title:`Drop to attach`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`Images and PDF up to 50 MB, text up to 4 MB`},retry:`Retry`,reupload:`Upload again`,pickModel:`switch to another`,refusal:{type:`This file cannot be attached: PNG, JPEG, WebP, PDF, TXT, MD are supported`,tooLarge:e=>`File too large: ${e}`,limit:{image:`an image \u2014 up to 50 MB`,pdf:`PDF \u2014 up to 50 MB`,text:`text \u2014 up to 4 MB`},fileName:`The file name is longer than 255 characters \u2014 rename the file and attach it again`,empty:`The file is empty`,textNotUtf8:`The text is not UTF-8 \u2014 save the file as UTF-8 and attach it again`,unreadable:`The file cannot be read \u2014 it may be damaged`,contentMismatch:e=>`The content does not look like ${e} \u2014 attach the real file`,pdfEncrypted:`The PDF is password-protected \u2014 remove the password and attach it again`,server:`The server did not accept the file`,failedNetwork:`Not uploaded: the connection was interrupted`,failedServer:`Not uploaded: the server did not answer`,expired:`An unsent file is kept for a day \u2014 this one is already deleted`,modelNoFiles:e=>`${e} does not take files \u2014 `,modelNoType:(e,t)=>`${e} does not take ${t} \u2014 `,modelFact:(e,t)=>`${e} does not take this file: ${t} \u2014 `},announce:{uploaded:e=>`The file \u00AB${e}\u00BB is uploaded`,refused:(e,t)=>`The file \u00AB${e}\u00BB cannot be sent: ${t}`}}},transcript:{copyAnswer:{label:`Copy answer`,done:`Answer copied`,failed:`Could not copy the answer`},activity:{done:e=>`Completed ${e} ${Zu(e,{one:`action`,other:`actions`})}`,doneOf:(e,t)=>`Completed ${e} of ${t} ${Zu(t,{one:`action`,other:`actions`})}`,doneShort:e=>`${e} done`,failedShort:e=>`${e} failed`,running:e=>`Running: ${e}`,failed:`failed`,unknown:`outcome unknown`},feedLabel:`Conversation feed`,scrollToBottom:`Scroll to bottom`,olderHistory:{loading:`Loading earlier messages\u2026`,failed:`Could not load earlier messages`,retry:`Retry`},leadByline:`Swarm lead`,taskLeadByline:`Lead`,retry:`Retry`,thinking:`Thinking\u2026`,thoughtFor:e=>`Thought for ${e}s`,thinkingPhase:`Thinking\u2026`,toolCall:`Tool call`,toolCallCancelled:`Tool call cancelled`,toolCallStatus:{confirmed:`Action completed`,waitingForBrowser:`Waiting for the browser action`,stoppingBrowser:`Stopping the browser action\u2026`,failed:`Action failed`,rejected:`Rejected`,rejectedLeadGrant:`Not allowed \u2014 goes to the report \u00B7 you`,closed:`Closed: the launch stopped`,unknown:`Action outcome unknown`,launchedElsewhere:`Started in a new conversation`,openConversation:`Open the conversation`},unknownTool:{title:`Result not supported`,body:`This version cannot show the result of this action. Reload the page or update the extension.`},stopFailed:{rejected:`Could not stop the answer \u2014 the server did not accept the command. Try again.`,ack_timeout:`Could not stop the answer \u2014 the server did not respond. Try again.`,not_open:`Could not stop the answer \u2014 the connection is not open yet. Try again.`,connection_closed:`Could not stop the answer \u2014 the connection dropped. Try again.`},details:`Details`,cardsFailed:{title:`Could not show the cards of this answer.`,text:`The answer text above is intact.`,retry:`Show again`}},empty:{heading:`How can I help?`,subtext:`Ask about your testing or hand over a task`,footnote:`A click puts a task draft into the field \u2014 adjust it and send`,reportHeading:`Ask about this report`},errors:{classes:{rateLimit:{title:`Too many requests`,hint:`Wait a moment and try again`},credits:{title:`Limit reached`,hint:`Check your plan or limits in settings`},auth:{title:`Provider authorization failed`,hint:`Check the API key in settings`},connection:{title:`Provider unavailable`,hint:`Check the settings and try again`},stalled:{title:`The assistant stopped responding`,hint:null},streamCut:{title:`Connection lost`,hint:null},generic:{title:`Progon assistant error`,hint:`Please try again`}}},notices:{dismiss:`Dismiss notice`,capabilities:{title:`Model list unavailable`,sendBlocked:`Messages cannot be sent until the model list loads again.`,timedOut:`The model list did not load in time.`,loadFailed:`Could not load the model list.`,retry:`Load the model list`},permissionReadFailed:{title:`Could not load the confirmation mode`,text:`A new conversation cannot start without it. Load it again.`,retry:`Retry`},permissionWriteFailed:{title:e=>`Could not switch to \u201C${e}\u201D`,textConversation:e=>`The conversation stayed in \u201C${e}\u201D mode.`,textNewConversation:e=>`A new conversation will start in \u201C${e}\u201D mode.`,retry:`Retry`},unsent:{title:e=>`Not sent: ${e} ${zd(e)}`,textWaiting:`The model list could not be read, so the messages stayed here. Send them once the list loads.`,textReady:`The model list could not be read, so the messages stayed here. The list is loaded again \u2014 send or delete them.`,textFailed:`These messages did not reach the assistant. Send them again or delete them.`,textReconnect:`The messages will be sent once the connection is back.`,listLabel:`Unsent messages`,send:e=>`Send: ${e}`,discard:e=>`Delete: ${e}`,sendShort:`Send`,discardShort:`Delete`},interrupted:{title:`The previous request was interrupted`,text:`The answer to the last message did not arrive.`,retry:`Retry`},reportInitializing:{title:`The report is still being prepared`,text:`The data will appear after the first calculation. Try again a little later.`,retry:`Check again`},readiness:{signInTitle:`Sign in to use the assistant`,signInText:`Open the extension popup and sign in to Progon.`,projectTitle:`Select a project`,projectText:`The assistant works with the data of the selected project.`},pageScan:{scanning:`Scanning page\u2026`,delivering:`Sending scan results\u2026`,failedTitle:`This page cannot be scanned`,failed:{no_capturable_tab:`Restricted or unsupported address (chrome://, extension store, PDF).`,capture_failed:`Page scan failed. Please try again.`,capture_timeout:`Page scan timed out. Please try again.`,oversize_unrecoverable:`This page is too large to scan, even after reducing detail.`}},history:{loadFailed:`Could not load the conversation.`,retry:`Retry`}},connection:{reconnecting:`Connection lost \u2014 reconnecting\u2026`,restored:`Connection restored \u2014 events synchronized.`,failedTitle:`Connection failed`,failedHint:{"reload-page":`Reload the page to reconnect.`,"check-network":`Could not connect. Check your network.`}},history:{title:`Chat history`,close:`Close history`,newChat:`New chat`,search:`Search conversations\u2026`,searchLabel:`Search conversations`,emptyTitle:`No conversations yet`,emptyText:`Start a new chat.`,noResults:e=>`No results for \u201C${e}\u201D`,noResultsText:`Try a different search term`,errorTitle:`Failed to load conversations`,errorText:`Check your connection and try again.`,retry:`Retry`,loadingMore:`Loading\u2026`,untitled:e=>`Conversation of ${e}`,delete:e=>`Delete conversation \u201C${e}\u201D`,deleteFailed:`Could not delete the conversation. Try again.`,reportTag:`Report`,groups:{today:`Today`,yesterday:`Yesterday`,previous7Days:`Previous 7 days`,previous30Days:`Previous 30 days`,older:`Older`}},modelPicker:{selectModel:`Select model`,loading:`Loading models\u2026`,currentlySelected:`Currently selected`,footerNote:`Choice applies to your next message.`,manageKeys:`Manage keys`,upsell:`Bring your own key on Enterprise`,upgrade:`Upgrade`,rejected:`That model isn't available for your plan \u2014 reverted to your default.`,disabledKeyInvalid:`Key invalid \u2014 update it in Settings`,disabledNoKey:`No personal key configured`,disabledSuffixA11y:`unavailable`,tier:{fastest:`Fastest`,balanced:`For everyday tasks`,smartest:`Smartest`},byok:{personal:`Your key`,company:`Company key`},byokHeader:{personal:`Your key`,company:`Company key`}},confirmation:{regionLabel:`Action required`,confirmAll:e=>`Confirm all (${e})`,confirm:`Confirm`,reject:`Reject`,queuePosition:`Action {index} of {total}`,warningBadge:`Needs attention`,grant:{no:`No, report only`,yes:`Allow in this run`},unrecognizedTool:`Unrecognized action`},runWait:{title:`Waiting for executions`,status:{waiting:`Waiting for completion`,fired:`Executions finished`,running:`Reviewing results`,done:`Review complete`,cancelled:`Wait cancelled`},subject:{scenario_run:`Scenario run`,agent_job:`Agent job`,atlas_run:`Atlas crawl`,ai_run:`AI run`,workflow:`Swarm`,scenario_launch:`Scenario launch`},id:e=>`ID: ${e}`,stopWaiting:`Stop waiting`,stopWaitingFailed:`Could not cancel the wait. Try again.`},questions:{pendingTitle:`Clarification needed`,progress:`Answered: {resolved} of {total}`,progressLabel:`Questions`,progressSegmentAnswered:`Question {index}: answered`,progressSegmentUnanswered:`Question {index}: unanswered`,progressSegmentSkipped:`Question {index}: skipped`,questionIndex:`Question {index} of {total}`,previousQuestion:`Back`,nextQuestion:`Next`,showAllQuestions:`Show all questions`,oneQuestionAtATime:`One question at a time`,recommended:`Recommended`,customChoice:`Other`,customAnswerLabel:`Your answer`,customAnswerPlaceholder:`Enter another option\u2026`,textAnswerLabel:`Answer`,textAnswerPlaceholder:`Enter your answer\u2026`,skipQuestion:`Skip`,restoreQuestion:`Answer`,validationSingle:`Choose one option.`,validationMultiple:`Choose at least one option.`,validationText:`Enter an answer.`,cancelAll:`Cancel all`,submitAnswers:`Send`,sending:`Sending`,loading:`Loading questions`,retry:`Retry`,refresh:`Refresh`,retryErrorBadge:`Not sent`,nonretryableBadge:`Page unavailable`,nonretryableDescription:`Open this conversation in a secure context (HTTPS) to continue.`,staleBadge:`Already resolved`,unauthorizedBadge:`No access`,unauthorizedDescription:`Sign in again or return to the project where this conversation started.`,unavailableBadge:`Unavailable`,answeredTitle:`Clarification`,answeredBadge:`Answered`,continuationPendingBadge:`Queued`,continuationRunningBadge:`Continuing`,continuationFailedBadge:`Could not continue`,skippedBadge:`Skipped`,skippedAnswer:`Skipped`,cancelledTitle:`Clarification`,cancelledBadge:`Cancelled`,supersededTitle:`Clarification`,supersededBadge:`Replaced`,answerSeparator:`, `,unavailableAnswer:`Answer unavailable`,arrived:e=>`New question, the answer card is above the input: ${e}`},agentQuestions:{openRun:`Open run`,assumptionLabel:`Until you answer, the agent goes on like this`,decline:`Don\u2019t answer`,viaAssistant:`Passed on by the assistant from your words`,askerEnded:`The agent finished its work, no answer is needed`,leadWaits:`lead is waiting`,workersContinue:`Workers keep going`,agentsIdle:`No agents are working now`},context:{report:{label:`Report context`,title:e=>`Report: ${e}`,note:`The assistant sees this report and reads its figures from the same data as the page.`,nameUnavailable:`name unavailable`,entity:{scenario:`selected scenario`,page:`selected page`,feature:`selected feature`},view:{overview:`Overview`,stability:`Stability`,"weak-spots":`Weak spots`,"bug-hotspots":`Bug hotspots`},window:{"7d":`7 days`,"14d":`14 days`,"30d":`30 days`,"90d":`90 days`},lastRuns:(e,t)=>`last ${e} runs (up to ${t} days)`,status:{consistently_failing:`consistently failing`,flaky:`flaky`,monitoring:`monitoring`,insufficient_history:`little history`,stable:`stable`},prompts:{overviewWeakSpots:`What are this project\u2019s weak spots?`,overviewChanged:e=>`What changed over the last ${e}?`,overviewWhereToLook:`Where should I look first?`,stabilityWhyScenario:e=>`Why is \u201C${e}\u201D unstable?`,stabilityWhatToFix:`Which scenarios should I fix first?`,stabilityCauses:`Break the failures down by cause`,weakSpotsWhatToCover:`What should I cover with tests first?`,weakSpotsWhyEntity:e=>`Why is \u201C${e}\u201D a weak spot?`,bugHotspotsWhere:`Where do bugs pile up?`,bugHotspotsStale:`Which pages with bugs have not been checked in a while?`}}}},errors:Rd,attachments:ed},Hd=e=>J(e,{one:`\u0444\u0430\u0439\u043B`,few:`\u0444\u0430\u0439\u043B\u0430`,many:`\u0444\u0430\u0439\u043B\u043E\u0432`}),Ud={units:{b:`\u0411`,kb:`\u041A\u0411`,mb:`\u041C\u0411`},facts:{pdf:(e,t)=>`${e} \u0441\u0442\u0440., ${t}`,image:(e,t,n)=>`${e}\u00D7${t}, ${n}`,text:e=>e},typeLabel:{"image/png":`PNG`,"image/jpeg":`JPEG`,"image/webp":`WebP`,"application/pdf":`PDF`,"text/plain":`TXT`,"text/markdown":`MD`},message:{listLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,view:e=>`\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u00AB${e}\u00BB`,open:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u00AB${e}\u00BB \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,thumbnailLoading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u043C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u044B \u00AB${e}\u00BB`,thumbnailFailed:`\u041C\u0438\u043D\u0438\u0430\u0442\u044E\u0440\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`,openFailed:`\u041D\u0435 \u043E\u0442\u043A\u0440\u044B\u043B\u043E\u0441\u044C.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},viewer:{label:e=>`\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440: ${e}`,openInTab:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043D\u043E\u0432\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0435`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430`,position:(e,t)=>`${e} \u0438\u0437 ${t}`,loading:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u00AB${e}\u00BB`,failed:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0430\u0441\u044C`},conversation:{text:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B (${t}) \u2014 `,pick:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C`},unsent:{files:e=>`${e} ${Hd(e)}`,unsupported:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B: ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,noFiles:e=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,types:(e,t)=>`${e===null?`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C`:`\u041C\u043E\u0434\u0435\u043B\u044C ${e}`} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,reason:{fileBytes:e=>`\u0444\u0430\u0439\u043B \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageBytes:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,requestBytes:e=>`\u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,filesBytes:e=>`\u0444\u0430\u0439\u043B\u044B \u0432\u043C\u0435\u0441\u0442\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,imageEdge:e=>`\u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,imagePatches:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u043C\u043B\u043D \u043F\u0438\u043A\u0441\u0435\u043B\u0435\u0439`,pdfPages:e=>`\u0432 PDF \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,imagesCount:e=>`\u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A \u0431\u043E\u043B\u044C\u0448\u0435 ${e}`,manyImagesEdge:e=>`\u043F\u0440\u0438 \u043C\u043D\u043E\u0433\u0438\u0445 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430\u0445 \u0441\u0442\u043E\u0440\u043E\u043D\u0430 \u043A\u0430\u0436\u0434\u043E\u0439 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} px`,contextWindow:`\u0444\u0430\u0439\u043B\u044B \u043D\u0435 \u043F\u043E\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F \u0432 \u043E\u043A\u043D\u043E \u043C\u043E\u0434\u0435\u043B\u0438`,unknownSize:`\u0444\u0430\u0439\u043B\u044B \u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u044C`},notFound:`\u0424\u0430\u0439\u043B\u044B \u044D\u0442\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B: \u043D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`,alreadySent:`\u042D\u0442\u0438 \u0444\u0430\u0439\u043B\u044B \u0443\u0436\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u044B \u0441 \u0434\u0440\u0443\u0433\u0438\u043C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435\u043C. \u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B \u0437\u0430\u043D\u043E\u0432\u043E.`}},Wd=new Intl.NumberFormat(`ru`),Gd=e=>Wd.format(e),Kd=e=>J(e,{one:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435`,few:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,many:`\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439`}),qd={inspecting:`\u0418\u0437\u0443\u0447\u0435\u043D\u0438\u0435`,proposed:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u043E`,awaiting:`\u0416\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,applying:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,partial:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E`,failed:`\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,undone:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E`},Jd={step:`\u0428\u0430\u0433\u0438`,scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,api_folder:`\u041F\u0430\u043F\u043A\u0438`,api_saved_request:`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0437\u0430\u043F\u0440\u043E\u0441\u044B`,checklist_item:`\u041F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist_item_step:`\u0428\u0430\u0433\u0438 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,test_run_result:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,scenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,environment:`\u041E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,environment_variable:`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,environment_preference:`\u0412\u044B\u0431\u043E\u0440 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F \u0443 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u0439`,checklist:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,api_collection:`\u041A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 API`},Yd=(e,t,n)=>r=>`${Gd(r)} ${J(r,{one:e,few:t,many:n})}`,Xd=e=>e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} \u0438 ${e.slice(-1).join(``)}`,Zd={title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,cardAria:e=>`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${e.toLocaleLowerCase(`ru`)}`,phaseAnnouncement:e=>`\u0421\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439: ${e.toLocaleLowerCase(`ru`)}`,contextScenario:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u00AB${e}\u00BB`,contextProject:e=>`\u041F\u0440\u043E\u0435\u043A\u0442 \u00AB${e}\u00BB`,contextObject:e=>`\u00AB${e}\u00BB`,marker:qd,earlyTitle:{searching:`\u0418\u0449\u0443 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439\u2026`,search_results_shown:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439`,no_results:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,item_selected:`\u0426\u0435\u043B\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u0430`,inspecting:`\u0418\u0437\u0443\u0447\u0430\u044E \u0434\u0435\u0442\u0430\u043B\u0438\u2026`,ambiguity_choose_target:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0446\u0435\u043B\u044C`},preparing:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0433\u043E\u0442\u043E\u0432\u0438\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435\u2026`,changesCount:e=>`${Gd(e)} ${Kd(e)}`,noResults:`\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,chooseTargetHint:`\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u043A\u0430\u043A\u0443\u044E \u0446\u0435\u043B\u044C \u0438\u043C\u0435\u043B\u043E\u0441\u044C \u0432 \u0432\u0438\u0434\u0443:`,selected:`\u0412\u044B\u0431\u0440\u0430\u043D\u043E`,nothingChanged:`\u041D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E.`,evidenceHeading:`\u0414\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0430`,entityLabelMissing:`\u043C\u0435\u0442\u043A\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,searchingAria:`\u0418\u0434\u0451\u0442 \u043F\u043E\u0438\u0441\u043A`,whatChanges:`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F`,proposalEmpty:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442.`,secretChip:`\u0441\u0435\u043A\u0440\u0435\u0442`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,cascadeTitle:`\u0422\u0430\u043A\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043B\u0435\u043D\u043E`,cascadeEntity:Jd,cascadeUnknown:e=>`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435 \u043E\u0431\u044A\u0435\u043A\u0442\u044B (${e})`,cascadeCount:{step:Yd(`\u0448\u0430\u0433`,`\u0448\u0430\u0433\u0430`,`\u0448\u0430\u0433\u043E\u0432`),scenario_run:Yd(`\u043F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`),api_folder:Yd(`\u043F\u0430\u043F\u043A\u0430`,`\u043F\u0430\u043F\u043A\u0438`,`\u043F\u0430\u043F\u043E\u043A`),api_saved_request:Yd(`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u0430`,`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`),checklist_item:Yd(`\u043F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u0430 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u043F\u0443\u043D\u043A\u0442\u043E\u0432 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`),checklist_item_step:Yd(`\u0448\u0430\u0433 \u043F\u0443\u043D\u043A\u0442\u0430`,`\u0448\u0430\u0433\u0430 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`,`\u0448\u0430\u0433\u043E\u0432 \u043F\u0443\u043D\u043A\u0442\u043E\u0432`),test_run_result:Yd(`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u0440\u043E\u0433\u043E\u043D\u0430`),scenario:Yd(`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`),environment:Yd(`\u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435`,`\u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,`\u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0439`),environment_variable:Yd(`\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,`\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,`\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0445 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`),environment_preference:Yd(`\u0432\u044B\u0431\u043E\u0440 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,`\u0432\u044B\u0431\u043E\u0440\u0430 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,`\u0432\u044B\u0431\u043E\u0440\u043E\u0432 \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`),checklist:Yd(`\u0447\u0435\u043A-\u043B\u0438\u0441\u0442`,`\u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,`\u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u043E\u0432`),api_collection:Yd(`\u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u044F API`,`\u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438 API`,`\u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0439 API`)},cascadeCountUnknown:(e,t)=>`${e}: ${Gd(t)}`,dock:{factScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,factProject:`\u041F\u0440\u043E\u0435\u043A\u0442`,factObject:`\u0427\u0442\u043E`,factWithIt:`\u0412\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C`,factEdits:`\u041F\u0440\u0430\u0432\u043E\u043A`,recordWithIt:e=>`\u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u044D\u0442\u0438\u043C ${e}`,editsCount:Yd(`\u043F\u0440\u0430\u0432\u043A\u0430`,`\u043F\u0440\u0430\u0432\u043A\u0438`,`\u043F\u0440\u0430\u0432\u043E\u043A`),showInFeed:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435`,showInFeedAria:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432 \u043B\u0435\u043D\u0442\u0435: ${e}`,blockedUnworded:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438 \u0432 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043B\u0435\u043D\u0442\u0435`,decided:{confirmDelete:`\u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,confirm:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u044B`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`},secretSaved:(e,t)=>t===null?`${Xd(e)} ${e.length===1?`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D`:`\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B`}`:`${Xd(e)} ${e.length===1?`\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D`:`\u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u044B`} \u0432 ${t}`},secretInput:{titleTail:` \u2014 \u0441\u0435\u043A\u0440\u0435\u0442 \u0434\u043B\u044F \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,countTitle:Yd(`\u0441\u0435\u043A\u0440\u0435\u0442`,`\u0441\u0435\u043A\u0440\u0435\u0442\u0430`,`\u0441\u0435\u043A\u0440\u0435\u0442\u043E\u0432`),countTitleTail:` \u0434\u043B\u044F \u043E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u044F`,placeholder:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0435\u043A\u0440\u0435\u0442\u0430`,fieldLabel:e=>`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e}`,fieldLabelReplace:e=>`\u041D\u043E\u0432\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e}`,show:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,hide:`\u0421\u043A\u0440\u044B\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,save:`\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C`,saveMany:e=>`\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C ${Gd(e)} ${J(e,{one:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,few:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F`,many:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439`})}`,saving:`\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u044E`,replace:`\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C`,replacing:`\u0417\u0430\u043C\u0435\u043D\u044F\u044E`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,privacy:`\u041C\u043E\u0434\u0435\u043B\u044C \u0438 \u0447\u0430\u0442 \u043D\u0435 \u0443\u0432\u0438\u0434\u044F\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`,tooLong:(e,t)=>`\u041D\u0435 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 ${Gd(e)} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u2014 \u0441\u0435\u0439\u0447\u0430\u0441 ${Gd(t)}`,failed:{network:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u0435\u0442 \u0441\u0432\u044F\u0437\u0438 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C.`,server:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B.`,refused:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u0430\u0437\u0430\u043B.`},closed:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,confirmFailed:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u0440\u0438\u043D\u044F\u0442\u043E, \u043D\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C. \u00AB\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C\u00BB \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442 \u0435\u0433\u043E \u0437\u0430\u043D\u043E\u0432\u043E.`,current:`\u0421\u0435\u0439\u0447\u0430\u0441`,currentAria:`\u0422\u0435\u043A\u0443\u0449\u0435\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u0440\u044B\u0442\u043E, \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,willReplace:`\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u0441\u044F`,whyName:`\u041F\u043E\u0447\u0435\u043C\u0443 \u0436\u0434\u0451\u0442 \u0432\u0430\u0441`,whyText:e=>`\u0423 ${e} \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 \u043D\u043E\u0432\u043E\u0435 \u0437\u0430\u043C\u0435\u043D\u0438\u0442 \u0435\u0433\u043E. \u0417\u0430\u043C\u0435\u043D\u0443 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442\u0435 \u0432\u044B, \u0434\u0430\u0436\u0435 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB\u0431\u0435\u0437 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F\u00BB.`,hiddenAria:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u043A\u0440\u044B\u0442\u043E`,savedIn:e=>`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E \u0432 ${e}`,saved:`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,declined:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u2014 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,reenter:`\u0412\u0432\u0435\u0441\u0442\u0438 \u0437\u0430\u043D\u043E\u0432\u043E`,reenterAria:e=>`\u0412\u0432\u0435\u0441\u0442\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 ${e} \u0437\u0430\u043D\u043E\u0432\u043E`,setByYou:e=>`\u0437\u0430\u0434\u0430\u043D\u043E \u0432\u0430\u043C\u0438 \u0432 ${e}`,setAt:e=>`\u0437\u0430\u0434\u0430\u043D\u043E \u0432 ${e}`,notSet:`\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D\u043E`,savingAnnouncement:`\u0421\u043E\u0445\u0440\u0430\u043D\u044F\u044E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435`},killSwitch:{title:`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,body:`\u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043C\u043E\u0436\u0435\u0442 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0435\u0451 \u0432 \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418. \u041F\u043B\u0430\u043D \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C, \u043D\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.`},disabledReason:{still_composing:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u2014 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.`,awaiting_secret_value:`\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0435\u043A\u0440\u0435\u0442\u0430 \u2014 \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0435\u0433\u043E \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \u043D\u0430\u0434 \u043F\u043E\u043B\u0435\u043C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.`},confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,confirmDelete:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,bugFiling:{title:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433?`,confirm:`\u0417\u0430\u0432\u0435\u0441\u0442\u0438 \u0431\u0430\u0433`,capture:{ready:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442`,awaiting:`\u0421\u043A\u0440\u0438\u043D\u0448\u043E\u0442 \u0435\u0449\u0451 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F`,unavailable:`\u0411\u0435\u0437 \u0441\u043A\u0440\u0438\u043D\u0448\u043E\u0442\u0430`,no_screen:`\u0417\u0430\u043F\u0440\u043E\u0441 \u0438 \u043E\u0442\u0432\u0435\u0442, \u0441\u043D\u0438\u043C\u043A\u0430 \u044D\u043A\u0440\u0430\u043D\u0430 \u043D\u0435 \u0431\u044B\u0432\u0430\u0435\u0442`},address:e=>`\u0430\u0434\u0440\u0435\u0441 ${e}`,severity:e=>`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C: ${e}`,factFinding:`\u041D\u0430\u0445\u043E\u0434\u043A\u0430`,factSeverity:`\u0421\u0435\u0440\u044C\u0451\u0437\u043D\u043E\u0441\u0442\u044C`,factWithIt:`\u0421 \u043D\u0435\u0439`,severityWord:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F`,high:`\u0432\u044B\u0441\u043E\u043A\u0430\u044F`,medium:`\u0441\u0440\u0435\u0434\u043D\u044F\u044F`,low:`\u043D\u0438\u0437\u043A\u0430\u044F`}},closedBy:{line:{launch_stopped:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,finding_filed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u2014 \u0432\u044B \u0437\u0430\u0432\u0435\u043B\u0438 \u044D\u0442\u043E\u0442 \u0431\u0430\u0433 \u0441\u0430\u043C\u0438`},launchStoppedNote:`\u041E\u0442\u0432\u0435\u0442 \u0443\u0436\u0435 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442`,findingFiledNote:(e,t)=>`\u0411\u0430\u0433 #${String(e)} \u0438\u0437 \u044D\u0442\u043E\u0439 \u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u0437\u0430\u0432\u0435\u043B\u0438 \u0432\u044B \u0432 ${t} \u2014 \u043E\u0442\u0432\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`},rejectPlain:`\u041F\u0440\u043E\u0441\u0442\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,rejectWithReason:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0441 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u043C`,reasonLabel:`\u041F\u043E\u0447\u0435\u043C\u0443?`,reasonHint:`(\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E \u2014 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0438\u0442\u044C \u043B\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442)`,commandFailed:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,retry:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u2014 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},applyingSubject:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F ${Gd(e)} ${Kd(e)}`,applyingGeneric:`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,applyDuration:e=>`\u0412\u0440\u0435\u043C\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F: ${Gd(e)} \u043C\u0441`,applyAria:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F`,applyDisclaimer:`\u041D\u0435 \u0441\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u043C \u0434\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0443\u0439\u0442\u0438 \u2014 \u0437\u0430\u0434\u0430\u0447\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u0441\u044F \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u043F\u0440\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0435.`,attempt:e=>`\u043F\u043E\u043F\u044B\u0442\u043A\u0430 ${Gd(e)}`,verified:`\u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E \u0441\u0435\u0440\u0432\u0435\u0440\u043E\u043C`,appliedGroup:e=>`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E (${Gd(e)})`,failedGroup:e=>`\u041E\u0448\u0438\u0431\u043A\u0438 \u0438\u043B\u0438 \u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u043A\u0438 (${Gd(e)})`,row:{applied:`\u041F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C`,batch_aborted:`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E`,pending:`\u041D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,skipped:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`},applyError:{stale_guard:`\u041E\u0431\u044A\u0435\u043A\u0442 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u0442\u043E\u0433\u043E, \u043A\u0430\u043A \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u0441\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E.`,secret_expired_or_consumed:`\u0421\u0435\u043A\u0440\u0435\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E \u0438\u043B\u0438 \u0441\u0440\u043E\u043A \u0435\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0438\u0441\u0442\u0451\u043A.`,"assistant.change_set.batch_aborted":`\u041E\u0442\u043A\u0430\u0447\u0435\u043D\u043E: \u0434\u0440\u0443\u0433\u043E\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u044D\u0442\u043E\u0433\u043E \u0436\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B\u0441\u044F.`,"assistant.change_set.apply_unexpected_error":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u0438.`,"assistant.ai_write_disabled":`\u0417\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"variables.duplicate_name":`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.`},whatNext:`\u0427\u0442\u043E \u0434\u0435\u043B\u0430\u0442\u044C \u0434\u0430\u043B\u044C\u0448\u0435: \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043D\u0435\u0443\u0434\u0430\u0432\u0448\u0438\u0435\u0441\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441.`,applyMissing:`\u0421\u0432\u043E\u0434\u043A\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u043D\u0438\u043C\u043A\u0435.`,retryRemaining:e=>`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044F (${Gd(e)})`,importParts:{title:`\u0418\u043C\u043F\u043E\u0440\u0442 \u043A\u0435\u0439\u0441\u043E\u0432`,counts:(e,t,n,r)=>`\u0412\u0441\u0435\u0433\u043E ${Gd(e)} \u00B7 \u0437\u0430\u043F\u0438\u0441\u0430\u043D\u043E ${Gd(t)} \u00B7 \u043E\u0448\u0438\u0431\u043E\u043A ${Gd(n)} \u00B7 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E ${Gd(r)}`,page:(e,t)=>`\u041D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 ${Gd(e)} \u0438\u0437 ${Gd(t)}`,previous:`\u041D\u0430\u0437\u0430\u0434`,next:`\u0414\u0430\u043B\u0435\u0435`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0438\u043C\u043F\u043E\u0440\u0442`,unnamed:`\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,rowStatus:{pending:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,applied:`\u0417\u0430\u043F\u0438\u0441\u0430\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u043F\u0438\u0441\u0438`,rolled_back:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,create:`\u0411\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u043D\u043E`,replace:`\u0411\u0443\u0434\u0435\u0442 \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,copy:`\u0411\u0443\u0434\u0435\u0442 \u0441\u043E\u0437\u0434\u0430\u043D\u0430 \u043A\u043E\u043F\u0438\u044F`,skip_existing:`\u0423\u0436\u0435 \u0438\u043C\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043E`,skip_error:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0435`,blocked:`\u0417\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043E`,pending_decision:`\u0416\u0434\u0451\u0442 \u0432\u044B\u0431\u043E\u0440\u0430`}},revise:`\u041F\u0435\u0440\u0435\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441`,reviseDraftScenario:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u00AB${e}\u00BB`,reviseDraftProject:e=>`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435 \u00AB${e}\u00BB`,rejectedTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E.`,rejectedLead:`\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u043B\u043E \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E \u0434\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C.`,undoneTitle:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u044B`,undoneLead:`\u041F\u0440\u0438\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u044B \u043A \u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044E.`,superseded:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u0431\u043E\u043B\u0435\u0435 \u043D\u043E\u0432\u044B\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C.`,unknownState:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0434\u0430\u043D\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439`,undo:{action:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,until:e=>`\u041C\u043E\u0436\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u043E ${e}`,busy:`\u041E\u0442\u043C\u0435\u043D\u044F\u0435\u043C\u2026`,blocked:{stale:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,expired:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,kill_switch:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},unavailable:`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,error:{"change_sets.undo_stale":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0434\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C \u043F\u043E\u0441\u043B\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F.`,"change_sets.undo_expired":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u043E\u043A\u043D\u043E \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"change_sets.undo_not_eligible":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.`,"assistant.ai_write_disabled":`\u041E\u0442\u043C\u0435\u043D\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430: \u0437\u0430\u043F\u0438\u0441\u044C Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u0434\u043B\u044F \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unknown:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043E\u0442\u043C\u0435\u043D\u044B \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443.`,sideEffectsTitle:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438:`,sideEffect:{test_plan_assignment_advance:`\u041F\u0440\u043E\u0434\u0432\u0438\u0436\u0435\u043D\u0438\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0442\u0435\u0441\u0442-\u043F\u043B\u0430\u043D\u0435`}},loadingAria:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0437\u0430\u0434\u0430\u0447\u0438`,loadError:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438.`,loadErrorText:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043D\u0435 \u0437\u0430\u0442\u0440\u043E\u043D\u0443\u0442\u044B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unavailable:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,unavailableText:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u043C\u0443 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044E \u0438\u043B\u0438 \u043E\u043D\u043E \u0443\u0434\u0430\u043B\u0435\u043D\u043E.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},turn:{title:`\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,awaiting:e=>`${J(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`})} ${Gd(e)}`,proposals:e=>`${Gd(e)} ${J(e,{one:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435`,few:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F`,many:`\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439`})}`,remaining:(e,t)=>`\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C ${Gd(e)} \u0438\u0437 ${Gd(t)}`,applying:(e,t)=>`\u041F\u0440\u0438\u043C\u0435\u043D\u044F\u044E ${Gd(e)} \u0438\u0437 ${Gd(t)}\u2026`,done:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E: ${Gd(e)} \u0438\u0437 ${Gd(t)}`,applied:e=>`${Gd(e)} \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E`,rejected:e=>`${Gd(e)} \u043E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,errors:e=>`${Gd(e)} ${J(e,{one:`\u043E\u0448\u0438\u0431\u043A\u0430`,few:`\u043E\u0448\u0438\u0431\u043A\u0438`,many:`\u043E\u0448\u0438\u0431\u043E\u043A`})}`,superseded:e=>`${Gd(e)} \u0437\u0430\u043C\u0435\u043D\u0435\u043D\u043E \u043D\u043E\u0432\u044B\u043C`,closed:e=>`${Gd(e)} \u0437\u0430\u043A\u0440\u044B\u0442\u043E`,undone:e=>`${Gd(e)} \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,loadFailed:e=>`${Gd(e)} \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${Gd(e)})`,rejectAll:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0432\u0441\u0435`,passFailures:e=>J(e,{one:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Gd(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u2014 \u044D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C`,few:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Gd(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`,many:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C ${Gd(e)} \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u2014 \u044D\u0442\u0438 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C`})}},Qd=new Intl.NumberFormat(`ru`),$d=new Intl.NumberFormat(`ru`,{style:`percent`,maximumFractionDigits:0}),ef={title:`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F`,caption:e=>`\u00AB${e}\u00BB`,cardAria:e=>`\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,covered:`\u041F\u043E\u043B\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,partial:`\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,gaps:`\u041F\u0440\u043E\u0431\u0435\u043B\u044B`,tagWarningPill:`\u0417\u0430\u043C\u0435\u0447\u0430\u043D\u0438\u0435 \u043F\u043E \u0442\u0435\u0433\u0430\u043C`,unknownItem:`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E`,similarity:e=>`\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435 ${$d.format(e)}`,steps:e=>`${Qd.format(e)} ${J(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},tf=new Intl.NumberFormat(`ru`),nf=e=>tf.format(e),rf={kind:{atlas_crawl:`\u041E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},stage:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,link_pending:`\u0421\u0432\u044F\u0437\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0441 \u043A\u0430\u0440\u0442\u043E\u0439`,crawling:`\u0418\u0441\u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0441\u0430\u0439\u0442`,running_batch:`\u041F\u0440\u043E\u0433\u043E\u043D\u044F\u0435\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E`},machineMissing:`\u0418\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E`,activity:e=>`\u0410\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C ${e}`,activityNone:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u0438`,foundCaption:`\u041D\u0430 \u043A\u0430\u0440\u0442\u0435`,found:{screens:e=>J(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`}),edges:e=>J(e,{one:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434`,few:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430`,many:`\u043F\u0435\u0440\u0435\u0445\u043E\u0434\u043E\u0432`}),notes:e=>J(e,{one:`\u0437\u0430\u043C\u0435\u0442\u043A\u0430`,few:`\u0437\u0430\u043C\u0435\u0442\u043A\u0438`,many:`\u0437\u0430\u043C\u0435\u0442\u043E\u043A`}),unexplored:e=>J(e,{one:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0439`,few:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`,many:`\u043D\u0435\u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u043D\u044B\u0445`})},degraded:`\u041A\u0430\u0440\u0442\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u2014 \u0441\u0447\u0451\u0442\u0447\u0438\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B. \u0420\u0430\u0431\u043E\u0442\u0430 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442\u0441\u044F.`,terminalPrefix:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E \u043F\u043E\u0442\u043E\u043C\u0443, \u0447\u0442\u043E`,terminalReason:{claim_timeout:`\u0430\u0433\u0435\u043D\u0442 \u0442\u0430\u043A \u0438 \u043D\u0435 \u0432\u0437\u044F\u043B \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,launch_timeout:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,launch_error:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0441\u043C\u043E\u0433 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C\u0441\u044F`,browser_gone:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u0441\u0447\u0435\u0437`,agent_lost:`\u0430\u0433\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,max_duration:`\u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D \u043B\u0438\u043C\u0438\u0442 \u0432\u0440\u0435\u043C\u0435\u043D\u0438`,killed:`\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E`,stalled:`\u0440\u0430\u0431\u043E\u0442\u0430 \u0441\u0442\u043E\u044F\u043B\u0430 \u0431\u0435\u0437 \u043F\u0440\u043E\u0433\u0440\u0435\u0441\u0441\u0430`,capability_mismatch:`\u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0443\u044E \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443`,subject_rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0443\u0441\u043A \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,model_timeout:`\u0438\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438`,runs_not_started:`\u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0438\u0441\u044C`,credits_exhausted:`\u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B`,tab_closed:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0431\u044B\u043B\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430`,slot_taken:`\u043C\u0435\u0441\u0442\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0437\u0430\u043D\u044F\u043B \u0434\u0440\u0443\u0433\u043E\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,ai_disabled:`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u043E\u043C`},openMap:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443`,openMapAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043A\u0430\u0440\u0442\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430 \u00AB${e}\u00BB`,cancel:{atlas_crawl:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,make_auto:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`},kill:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430`,cancelConfirm:{atlas_crawl:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435?`,body:`\u0418\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F.`,bodyKept:`\u0412\u0441\u0451, \u0447\u0442\u043E \u0430\u0433\u0435\u043D\u0442 \u0443\u0436\u0435 \u0443\u0432\u0438\u0434\u0435\u043B, \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u043D\u0430 \u043A\u0430\u0440\u0442\u0435.`,bodyQueued:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442\u043E \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`},make_auto:{question:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442?`,body:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u0432\u0435\u0441\u044C \u043F\u0430\u043A\u0435\u0442: \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u043F\u0440\u0435\u0440\u0432\u0451\u0442\u0441\u044F, \u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0434\u043E \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0447\u0435\u0440\u0435\u0434\u044C \u043D\u0435 \u0434\u043E\u0448\u043B\u0430, \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u044F\u0442\u0441\u044F. \u0423\u0436\u0435 \u0441\u043E\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F.`,bodyKept:null,bodyQueued:`\u041F\u0430\u043A\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043D\u044F\u0442 \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u2014 \u043D\u0438\u0447\u0435\u0433\u043E \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u043E\u0441\u044C.`,keep:`\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C`,confirm:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442`}},killConfirm:{question:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430?`,body:{atlas_crawl:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`,make_auto:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0430\u043A\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044F \u0441 \u043F\u0440\u0438\u0447\u0438\u043D\u043E\u0439 \u00AB\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E\u00BB. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u0442\u043C\u0435\u043D\u044B \u0430\u0433\u0435\u043D\u0442 \u043D\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F.`},keep:`\u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C`,confirm:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`},failed:{cancel:{atlas_crawl:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435.`,make_auto:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442.`},kill:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0433\u0435\u043D\u0442\u0430.`,conflict:`\u0417\u0430\u0434\u0430\u0447\u0430 \u0443\u0436\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C \u2014 \u0441\u0442\u0430\u0442\u0443\u0441 \u043E\u0431\u043D\u043E\u0432\u043B\u0451\u043D.`},cardAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0430: ${e}`,unsupported:{title:`\u0421\u0442\u0430\u0442\u0443\u0441 \u0437\u0430\u0434\u0430\u0447\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0421\u0442\u0430\u0442\u0443\u0441 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},collection:{collectionAria:e=>`\u0417\u0430\u0434\u0430\u0447\u0438: ${nf(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0437\u0430\u0434\u0430\u0447`,roleSlide:`\u0437\u0430\u0434\u0430\u0447\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0437\u0430\u0434\u0430\u0447\u0430`,goToSlide:`\u0417\u0430\u0434\u0430\u0447\u0430 {index} \u0438\u0437 {total}`}},af={web_runs_prompt:`\u0438\u0437 \u00AB\u0417\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u00BB`,web_test_run_dialog:`\u0438\u0437 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u0430`,web_map_dialog:`\u0441 \u043A\u0430\u0440\u0442\u044B`,web_scenarios_dialog:`\u0438\u0437 \u00AB\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432\u00BB`,chat:`\u0438\u0437 \u0447\u0430\u0442\u0430`},of=e=>J(e,{one:`\u0430\u0433\u0435\u043D\u0442\u0430`,few:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),sf={title:{make_auto:`\u0420\u043E\u0439 \u00B7 \u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`\u0420\u043E\u0439 \u00B7 Atlas`,preset:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0434\u043B\u044F \u0418\u0418`},subtitle:(e,t,n)=>`${e} \u00B7 \u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 \u0434\u043E ${t} ${of(t)} \u00B7 \u0441 ${n}`,preset:{stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435?`,body:`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F, \u0438\u0434\u0443\u0449\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u0441\u044F. \u041E\u0442\u0447\u0451\u0442 \u0431\u0443\u0434\u0435\u0442 \u043F\u043E\u043C\u0435\u0447\u0435\u043D \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0431\u0430\u0433\u0438, \u043D\u0430\u0445\u043E\u0434\u043A\u0438, \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u043D\u0438\u0435`},scope:e=>{switch(e.kind){case`project`:return`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`;case`scenarios`:return`${e.count} ${J(e.count,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`;case`test_run`:return e.name===null?`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D #TR-${String(e.number).padStart(3,`0`)}`:`\u0422\u0435\u0441\u0442-\u0440\u0430\u043D \u00AB${e.name}\u00BB`;case`test_plan`:return`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D \u00AB${e.name}\u00BB`}},level:e=>e.effort===`max`?`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e.maxAgents} ${J(e.maxAgents,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`})}`:e.effort===`thinking`?`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,since:e=>`\u0441 ${e}`,counts:{findings:e=>J(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A`}),bugs:e=>J(e,{one:`\u0431\u0430\u0433`,few:`\u0431\u0430\u0433\u0430`,many:`\u0431\u0430\u0433\u043E\u0432`}),undecided:e=>J(e,{one:`\u0436\u0434\u0451\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,few:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`,many:`\u0436\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u044F`}),notDone:`\u043D\u0435 \u0441\u0434\u0435\u043B\u0430\u043D\u043E`},awaitingBrowser:{sidePanel:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u2014 \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043D\u0430\u0447\u043D\u0451\u0442 \u0441\u0440\u0430\u0437\u0443`,web:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome`},startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,pillAwaitingBrowser:`\u0416\u0434\u0451\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,stripAwaitingBrowser:`\u0417\u0430\u043F\u0443\u0441\u043A \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,panelWait:{title:e=>`\u00AB${e}\u00BB \u0436\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,lostTitle:e=>`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u043B\u0441\u044F \u2014 \u00AB${e}\u00BB \u0436\u0434\u0451\u0442`,lostDetail:e=>`\u041E\u043A\u043D\u043E \u0430\u0433\u0435\u043D\u0442\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u043E \u0432 ${e}, \u0441\u0434\u0435\u043B\u0430\u043D\u043D\u043E\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E`,origin:(e,t,n)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${af[e]} \u0432 ${t} \u00B7 ${n}`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},stripChatLeadAwaitingAnswer:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,stripChatLeadAwaitingMessage:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,chatLeadIdle:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0440\u043E\u0441\u043D\u0451\u0442\u0441\u044F, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F`,partialCancelled:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 ${e}.`,partialFailed:e=>`\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439: ${e}.`,failureReason:{credits:`\u0443 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418`,turnShape:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C`,internal:`\u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E`,initiatorUnavailable:`\u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,other:e=>`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB`},beforeStop:(e,t)=>t===null?`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}.`:`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u2014 ${e}, ${t}.`},topic:e=>e.kind===`atlas`?e.projectName:e.kind===`preset`?_d(e):e.scenarioName===null?`${e.scenarioCount} ${J(e.scenarioCount,{one:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,few:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,many:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`:e.scenarioName.trim()===``?`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`:e.scenarioName,pill:{startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C`,running:`\u0418\u0434\u0451\u0442`,awaiting:`\u0416\u0434\u0451\u0442 \u043E\u0442\u0432\u0435\u0442\u0430`,browserLost:`\u0416\u0434\u0451\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,runnerLost:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,pausing:`\u0421\u0442\u0430\u0432\u0438\u0442\u0441\u044F \u043D\u0430 \u043F\u0430\u0443\u0437\u0443`,paused:`\u041D\u0430 \u043F\u0430\u0443\u0437\u0435`,stopping:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,finalizing:`\u0418\u0442\u043E\u0433\u043E\u0432\u044B\u0439 \u0430\u043D\u0430\u043B\u0438\u0437`,completed:`\u0413\u043E\u0442\u043E\u0432\u043E`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u0441\u044F`,cancelled:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`},pauseCause:{user:`\u0432\u0440\u0443\u0447\u043D\u0443\u044E`,credits:`\u043A\u0440\u0435\u0434\u0438\u0442\u044B`},lead:{startingBrowser:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,startingRunner:`\u0416\u0434\u0451\u043C, \u043F\u043E\u043A\u0430 \u0440\u0430\u043D\u043D\u0435\u0440 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0440\u043E\u0439`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442, \u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0438\u0445 \u043E\u0442\u0447\u0451\u0442\u043E\u0432`,awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u0432\u043E\u043F\u0440\u043E\u0441 \u043D\u0438\u0436\u0435`,stopping:`\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043E\u043A\u043D\u0430 \u0438 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0437\u0430\u0434\u0430\u043D\u0438\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F.`},startingRow:{browser:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u2014 \u0444\u043E\u043A\u0443\u0441 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0443 \u0432\u0430\u0441`,runner:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430`},hostLost:{sidePanel:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u043B\u0441\u044F \u2014 \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0437\u0430\u043A\u0440\u044B\u0442\u044B, \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u043D\u0430 \u043F\u0430\u0443\u0437\u0435.`,web:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D. \u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043C\u043E\u0436\u043D\u043E \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 Progon \u0432 Chrome.`,runner:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u0447\u0435\u043C\u0443 \u2014 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430, \u0442\u0430\u043C \u0436\u0435 \u00AB\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u043D\u0430 \u0440\u0430\u043D\u043D\u0435\u0440\u0435\u00BB.`},worker:{name:e=>`\u0410\u0433\u0435\u043D\u0442 ${e}`,kind:{make_auto:`\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E`,atlas:`Atlas`,run:`\u041F\u0440\u043E\u0433\u043E\u043D`},task:e=>`\u0437\u0430\u0434\u0430\u043D\u0438\u0435 ${e}`,opening:`\u041E\u043A\u043D\u043E \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,idle:`\u0416\u0434\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u044F`,busy:`\u0411\u0435\u0440\u0451\u0442 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,closing:`\u041E\u043A\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F`,untitledScenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F`,crawl:e=>e===null?`\u041E\u0431\u0445\u043E\u0434`:`\u041E\u0431\u0445\u043E\u0434 \u00AB${e}\u00BB`,progress:(e,t)=>`${e} \u0438\u0437 ${t}`,steps:e=>`${e} ${J(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`})}`},end:{tally:(e,t)=>`\u0413\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,tallyBeforeStop:(e,t)=>`\u0414\u043E \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438 \u0433\u043E\u0442\u043E\u0432\u043E ${e} \u0438\u0437 ${t}`,screens:e=>`${e} ${J(e,{one:`\u044D\u043A\u0440\u0430\u043D`,few:`\u044D\u043A\u0440\u0430\u043D\u0430`,many:`\u044D\u043A\u0440\u0430\u043D\u043E\u0432`})} \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,cancelledBy:(e,t)=>`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430: ${e}, ${t}.`,reportPartial:`\u041E\u0442\u0447\u0451\u0442 \u00AB\u041D\u0435\u043F\u043E\u043B\u043D\u044B\u0439\u00BB.`,failureReason:{credits:`\u0423 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0437\u0430\u043A\u043E\u043D\u0447\u0438\u043B\u0438\u0441\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0418\u0418.`,turnShape:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442\u0438\u043B \u043D\u0435 \u043F\u043E \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C \u0440\u043E\u044F.`,internal:`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0435\u0434\u0443\u0449\u0435\u0433\u043E.`,initiatorUnavailable:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D: \u0438\u043D\u0438\u0446\u0438\u0430\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,other:e=>`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B\u0441\u044F \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439 \u00AB${e}\u00BB.`}},actions:{open:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0440\u043E\u044F`,openLaunch:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043E\u0442\u0447\u0451\u0442`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stopConfirm:{question:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439?`,body:`\u041E\u043A\u043D\u0430 \u0437\u0430\u043A\u0440\u043E\u044E\u0442\u0441\u044F, \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u044F\u0442\u0441\u044F. \u0413\u043E\u0442\u043E\u0432\u043E\u0435 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u044D\u043A\u0440\u0430\u043D\u044B \u043D\u0430 \u043A\u0430\u0440\u0442\u0435 \u2014 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F.`,keep:`\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C`,confirm:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},stopFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439`},strip:{awaiting:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430`,toQuestion:`\u041A \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,lostBrowser:`\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D`,lostRunner:`\u0416\u0434\u0451\u0442 \u0440\u0430\u043D\u043D\u0435\u0440`,resume:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,startingBrowser:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,startingRunner:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440`,active:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0430\u0451\u0442 \u0440\u0430\u0431\u043E\u0442\u0443`,idle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`,stopping:`\u0420\u043E\u0439 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,toBlock:`\u041A \u0440\u043E\u044E`,toBlockLabel:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043B\u043E\u043A \u0440\u043E\u044F`,windows:e=>`${e} ${J(e,{one:`\u043E\u043A\u043D\u043E`,few:`\u043E\u043A\u043D\u0430`,many:`\u043E\u043A\u043E\u043D`})}`}},cf={failed:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: ${e}`,failedBatch:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${e}`,reason:{no_active_tab:`\u043D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u0438. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,content_not_loaded:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u043D\u0430 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,launch_refused:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439: \u0432 \u043D\u0435\u0439 \u0443\u0436\u0435 \u0438\u0434\u0451\u0442 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0443\u0441\u043A, \u0438\u043B\u0438 \u0435\u0433\u043E \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u0438\u0442\u044C.`,no_response:`\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B\u043E \u043D\u0430 \u0437\u0430\u043F\u0440\u043E\u0441 \u0437\u0430\u043F\u0443\u0441\u043A\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,test_run_tab_missing:`\u0432\u043A\u043B\u0430\u0434\u043A\u0430 \u0441 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D\u043E\u043C \u044D\u0442\u043E\u0433\u043E \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u0438\u043B\u0438 \u0442\u0435\u0441\u0442-\u0440\u0430\u043D \u0432 \u043D\u0435\u0439 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D.`},unsupported:{title:`\u0417\u0430\u043F\u0443\u0441\u043A \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},lf=new Intl.NumberFormat(`ru`),uf=e=>lf.format(e),df={title:`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435`,cardAria:e=>`\u0417\u0430\u043F\u0443\u0441\u043A \u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u0435: ${e}`,outcome:{refused:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,refusedWithReason:e=>`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E: ${e}`,launched:(e,t)=>`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E ${uf(e)} \u0438\u0437 ${uf(t)}`},confirmed:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u043E`,refusedHead:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u044B`,refusedList:`\u041E\u0442\u043A\u043B\u043E\u043D\u0451\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,launchedSummary:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u044B`,launchedList:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},ff={listLabel:(e,t)=>`${e} \u00B7 ${uf(t)}`,token:{"stand.main":`\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u044B\u0439`,"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439`,"onExisting.skip":`\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,"onExisting.replace":`\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C`,"onExisting.duplicate":`\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u043A\u043E\u043F\u0438\u044E`,"scenarios.ad_hoc_batch":`\u0420\u0430\u0437\u043E\u0432\u044B\u0439 \u043D\u0430\u0431\u043E\u0440 \u0448\u0430\u0433\u043E\u0432, \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"environment.projectDefault":`\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,"status.running":`\u0418\u0434\u0451\u0442`,"status.finished":`\u0417\u0430\u043A\u043E\u043D\u0447\u0435\u043D`,"status.aborted":`\u041F\u0440\u0435\u0440\u0432\u0430\u043D`,"aiRunMode.mapping":`\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,"aiRunMode.agentic":`\u0410\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0445\u043E\u0434\u0438\u0442 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,"window.headful":`\u0421 \u043E\u043A\u043D\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"window.headless":`\u0411\u0435\u0437 \u043E\u043A\u043D\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,"executor.extension":`\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,"executor.agent":`\u0420\u0430\u043D\u043D\u0435\u0440`,"billingPeriod.monthly":`\u041F\u043E\u043C\u0435\u0441\u044F\u0447\u043D\u043E`,"billingPeriod.yearly":`\u0417\u0430 \u0433\u043E\u0434`,"requestType.plan_change":`\u0421\u043C\u0435\u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0430`,"requestType.topup":`\u041F\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"requestType.seats":`\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,"role.user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C`,"allowedChange.file_bugs":`\u0417\u0430\u0432\u043E\u0434\u0438\u0442\u044C \u0431\u0430\u0433\u0438`,"allowedChange.write_tests":`\u0421\u043E\u0437\u0434\u0430\u0432\u0430\u0442\u044C \u0438 \u043C\u0435\u043D\u044F\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0438 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,"allowedChange.edit_project":`\u041F\u0440\u043E\u0447\u0438\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F`,"scope.project":`\u0412\u0441\u0451 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435`},warning:{"stand.dangerous":`\u041F\u043E\u043B\u043D\u044B\u0439 \u0434\u043E\u0441\u0442\u0443\u043F \u043D\u0430 \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u0435: \u0430\u0433\u0435\u043D\u0442 \u0441\u043C\u043E\u0436\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u0438 \u0443\u0434\u0430\u043B\u044F\u0442\u044C \u043B\u044E\u0431\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u0438 \u0440\u044F\u0434\u043E\u043C \u043D\u0438\u043A\u043E\u0433\u043E \u043D\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u043A\u043B\u044E\u0447\u0430\u0439\u0442\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0435\u0441\u0442\u043E\u0432\u043E\u043C \u0441\u0442\u0435\u043D\u0434\u0435.`},unrecognized:`\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`},pf=new Intl.NumberFormat(`ru`),mf=e=>pf.format(e),hf={title:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,caption:e=>`SC-${String(e)}`,cardAria:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}: ${t}`,lifecycle:{draft:`\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A`,ready:`Live`,outdated:`\u0423\u0441\u0442\u0430\u0440\u0435\u043B`,archived:`\u0412 \u0430\u0440\u0445\u0438\u0432\u0435`},steps:e=>J(e,{one:`\u0448\u0430\u0433`,few:`\u0448\u0430\u0433\u0430`,many:`\u0448\u0430\u0433\u043E\u0432`}),runs:e=>J(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),mapping:{label:{none:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043D\u0435\u0442`,partial:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u0430\u044F`,full:`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430: \u043F\u043E\u043B\u043D\u0430\u044F`},hint:{none:`\u0448\u0430\u0433\u0438 \u0435\u0449\u0451 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`,partial:`\u0447\u0430\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u0430 \u043A \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430\u043C \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u043C`,full:`\u0432\u0441\u0435 \u0448\u0430\u0433\u0438 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B`},hintNoSteps:`\u0448\u0430\u0433\u043E\u0432 \u043D\u0435\u0442`,tip:e=>`\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B: ${e}`},open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,openShort:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438: ${e}`,run:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,runAria:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C: ${e}`,runCommand:e=>`\u0417\u0430\u043F\u0443\u0441\u0442\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 ${e}`,runNoSteps:`\u041D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438.`,expand:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u2014 \u0448\u0430\u0433\u0438 \u0438 \u0438\u0441\u0442\u043E\u0440\u0438\u044F`,expandShort:`\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,collapse:`\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C`,tabsAria:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,tabSteps:`\u0428\u0430\u0433\u0438`,tabRuns:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,step:{aria:(e,t)=>`\u0428\u0430\u0433 ${mf(e)}: ${t}`,missingLabel:`\u0442\u0435\u043A\u0441\u0442 \u0448\u0430\u0433\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,moreExpected:e=>`+${mf(e)}`,expectedHeading:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C\u044B\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B`},stepsEmptyTitle:`\u0428\u0430\u0433\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442`,stepsEmptyHint:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u2014 \u0437\u0430\u043F\u0438\u0441\u044C\u044E \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438, \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0438\u043B\u0438 \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u043C.`,stepsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${mf(e)} \u0438\u0437 ${mf(t)}`,stepsLoadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${mf(e)}`,stepsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0448\u0430\u0433\u0438\u2026`,stepsLoadFailed:(e,t)=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0448\u0430\u0433\u0438 \u00B7 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${mf(e)} \u0438\u0437 ${mf(t)}`,runsEmptyTitle:`\u0415\u0449\u0451 \u043D\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u043B\u0441\u044F`,runsEmptyHint:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsEmptyHintNoSteps:`\u0414\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u0448\u0430\u0433\u0438 \u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u0437\u0434\u0435\u0441\u044C.`,runsLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432\u2026`,runsLoadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432`,runsShown:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${mf(e)} \u0438\u0437 ${mf(t)}`,runsLoadMore:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 ${mf(e)}`,runStatus:{queued:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,launching:`\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F`,in_progress:`\u0412 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0435`,completed:`\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u043E`,failed:`\u041E\u0448\u0438\u0431\u043A\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},runMode:{manual:`\u0420\u0443\u0447\u043D\u043E\u0439`,semi_auto:`\u041F\u043E\u043B\u0443\u0430\u0432\u0442\u043E`,auto:`\u0410\u0432\u0442\u043E`},runProgress:(e,t)=>`\u0448\u0430\u0433 ${mf(e)} \u0438\u0437 ${mf(t)}`,runDurationUnavailable:`\u0414\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,runMomentUnavailable:`\u2014`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438: ${mf(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,roleSlide:`\u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,goToSlide:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 {index} \u0438\u0437 {total}`}},gf=new Intl.NumberFormat(`ru`),X=e=>gf.format(e),_f=e=>J(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),vf=e=>J(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`}),yf=e=>J(e,{one:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,few:`\u043F\u0430\u0434\u0435\u043D\u0438\u044F`,many:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439`}),bf=e=>J(e,{one:`\u0443\u0441\u043F\u0435\u0445`,few:`\u0443\u0441\u043F\u0435\u0445\u0430`,many:`\u0443\u0441\u043F\u0435\u0445\u043E\u0432`}),xf=e=>J(e,{one:`\u0434\u0435\u043D\u044C`,few:`\u0434\u043D\u044F`,many:`\u0434\u043D\u0435\u0439`}),Sf={not_enrolled:()=>`\u041D\u0438 \u043E\u0434\u043D\u043E\u0439 \u043C\u0430\u0448\u0438\u043D\u044B \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E.`,none_ready:e=>`\u041D\u0438 \u043E\u0434\u043D\u0430 \u0438\u0437 \u043C\u0430\u0448\u0438\u043D (${X(e)}) \u043D\u0435 \u0433\u043E\u0442\u043E\u0432\u0430 \u043A \u044D\u0442\u043E\u0439 \u0440\u0430\u0431\u043E\u0442\u0435.`,one_ready:e=>`\u041E\u0434\u043D\u0430 \u043C\u0430\u0448\u0438\u043D\u0430 \u0433\u043E\u0442\u043E\u0432\u0430. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`,many_ready:e=>`\u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043C\u0430\u0448\u0438\u043D \u0433\u043E\u0442\u043E\u0432\u044B. \u0412\u0441\u0435\u0433\u043E \u043C\u0430\u0448\u0438\u043D: ${X(e)}.`},Cf={playback:`\u041D\u0435\u0442 \u0432\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0434\u0435\u043D\u0438\u044F`,atlas_crawl:`\u041D\u0435\u0442 \u043E\u0431\u0445\u043E\u0434\u0430 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u041D\u0435\u0442 \u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0438 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,scenario_launch:`\u041D\u0435\u0442 \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},wf={common:{missingName:`\u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442`,open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C`,newTabSuffix:` (\u043D\u043E\u0432\u0430\u044F \u0432\u043A\u043B\u0430\u0434\u043A\u0430)`,noOpenTarget:`\u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,noOpenTargetHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0442\u0438\u043F\u0430 \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0438 \u043D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F`,moreActions:`\u0415\u0449\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,commandFailure:{confirm:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u2014`,reject:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u2014`,reason:{rejected:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0440\u0435\u0448\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},entityType:{scenario:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,bug:`\u0411\u0430\u0433`,"checklist-item":`\u041F\u0443\u043D\u043A\u0442 \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430`,checklist:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442`,"saved-request":`API-\u0437\u0430\u043F\u0440\u043E\u0441`,collection:`\u041A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u044F`,"shared-step":`\u041E\u0431\u0449\u0438\u0439 \u0448\u0430\u0433`,run:`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,"test-run":`\u0422\u0435\u0441\u0442-\u0437\u0430\u043F\u0443\u0441\u043A`,page:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,"test-plan":`\u0422\u0435\u0441\u0442-\u043F\u043B\u0430\u043D`,environment:`\u041E\u043A\u0440\u0443\u0436\u0435\u043D\u0438\u0435`,variable:`\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F`,incident:`\u0418\u043D\u0446\u0438\u0434\u0435\u043D\u0442`,"atlas-fact":`\u041A\u0430\u0440\u0442\u0430`,"api-folder":`\u041F\u0430\u043F\u043A\u0430 API`,"api-endpoint":`API-\u044D\u043D\u0434\u043F\u043E\u0438\u043D\u0442`,section:`\u0420\u0430\u0437\u0434\u0435\u043B`}},collection:{counter:`{index} / {total}`,counterUnknown:`{index}`,positionMore:`\u0414\u0430\u043B\u0435\u0435`,scrubberAria:`\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0432 \u043B\u0435\u043D\u0442\u0435`,slideAria:`{index} \u0438\u0437 {total}`,slideAriaAtLeast:`{index} \u0438\u0437 {total}+`,slideAriaUnknown:`{index}, \u0440\u0430\u0437\u043C\u0435\u0440 \u043D\u0430\u0431\u043E\u0440\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,loadedOf:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}`,loadedOfAtLeast:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded} \u0438\u0437 {total}+`,loadedOfUnknown:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E {loaded}`,loadMore:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 {remaining}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadMoreFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadedMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E {total}`,loadedMoreAtLeast:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}, \u0432\u0441\u0435\u0433\u043E \u043D\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 {total}`,loadedMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E \u0435\u0449\u0451 {count}`},report:{title:{metric_card:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C`,trend_card:`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430`,finding_card:`\u0421\u043B\u0430\u0431\u043E\u0435 \u043C\u0435\u0441\u0442\u043E`,stability_row_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,scenario_stability_card:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F \u2014 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E`,failure_breakdown_card:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,weak_spot_feature_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0444\u0438\u0447\u0430`,weak_spot_page_card:`\u0421\u043B\u0430\u0431\u0430\u044F \u0437\u043E\u043D\u0430: \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hotspot_card:`\u0413\u043E\u0440\u044F\u0447\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u0431\u0430\u0433\u043E\u0432`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},windowShort:{"7d":`7 \u0434`,"14d":`14 \u0434`,"30d":`30 \u0434`,"90d":`90 \u0434`},basisRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${X(e)} ${_f(e)} (\u0434\u043E ${X(t)} ${xf(t)})`,currentState:`\u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435`,noWindow:`\u043E\u043A\u043D\u043E \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F`,asOf:e=>`\u043D\u0430 ${e}`,stamp:{source:(e,t)=>[`\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A: ${e}`,...t].join(` \u00B7 `),metric:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,rule:(e,t)=>`\u043F\u0440\u0430\u0432\u0438\u043B\u043E ${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`,definition:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F ${e}`,mapping:e=>`\u0432\u0435\u0440\u0441\u0438\u044F \u043C\u0430\u043F\u043F\u0438\u043D\u0433\u0430 ${e}`,envelope:(e,t)=>`${e} \u00B7 \u0432\u0435\u0440\u0441\u0438\u044F ${t}`},metric:{name:{pass_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,runs_total:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_evaluated:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0432 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u0435`,runs_infra:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_cancelled:`\u041E\u0442\u043C\u0435\u043D\u0451\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,runs_abandoned:`\u0411\u0440\u043E\u0448\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,run_duration_sum_ms:`\u0421\u0443\u043C\u043C\u0430\u0440\u043D\u0430\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,run_duration_count:`\u041F\u0440\u043E\u0433\u043E\u043D\u044B \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u043E\u0439 \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\u044E`,run_duration_avg:`\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D\u0430`,page_steps_executed:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_passed:`\u0423\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_failed:`\u0423\u043F\u0430\u0432\u0448\u0438\u0445 \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_steps_healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043E\u043A \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,page_step_success_rate:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,page_healed_rate:`\u0414\u043E\u043B\u044F \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435`,step_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u0448\u0430\u0433\u043E\u0432`,run_failures:`\u041F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,bugs_opened:`\u0417\u0430\u0432\u0435\u0434\u0435\u043D\u043E \u0431\u0430\u0433\u043E\u0432`,bugs_closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0431\u0430\u0433\u043E\u0432`,open_bugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,covered_pages:`\u041F\u043E\u043A\u0440\u044B\u0442\u044B\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,total_pages:`\u0412\u0441\u0435\u0433\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,page_coverage_pct:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446`,unstable_scenarios:`\u041D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`},missingName:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u0431\u0435\u0437 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044F \u0432 \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438`,missingNameDetail:e=>`metricId: ${e}`,unit:{percent:`%`,count:``,ms:`\u043C\u0441`,days:`\u0434\u043D.`},denominator:{pass_rate:e=>`\u0438\u0437 ${X(e)} ${J(e,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432`})}`,runs_total:e=>`${X(e)} ${_f(e)}`,unstable_scenarios:e=>`\u0438\u0437 ${X(e)} ${J(e,{one:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,few:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,many:`\u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`})}`,open_bugs:e=>`${X(e)} ${J(e,{one:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0439`,few:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`,many:`\u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445`})}`,page_coverage_pct:e=>`\u0438\u0437 ${X(e)} ${J(e,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,generic:e=>`\u0431\u0430\u0437\u0430: ${X(e)}`},insufficient:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043D.`,noSeriesValue:`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E \u2014 \u0433\u0440\u0430\u0444\u0438\u043A \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u043E\u0435\u043D.`,deltaHint:`\u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u043F\u0435\u0440\u0438\u043E\u0434\u0443`,deltaPointsHint:` \u00B7 \u043F.\u043F. \u2014 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u044B\u0435 \u043F\u0443\u043D\u043A\u0442\u044B, \u0440\u0430\u0437\u043D\u0438\u0446\u0430 \u0434\u0432\u0443\u0445 \u043F\u0440\u043E\u0446\u0435\u043D\u0442\u043E\u0432`,deltaPoints:e=>`${e} \u043F.\u043F.`,sparkAria:e=>`\u0414\u0438\u043D\u0430\u043C\u0438\u043A\u0430: ${e}`,sparkGap:(e,t)=>`\u041C\u0430\u043B\u043E \u0434\u0430\u043D\u043D\u044B\u0445 ${e}: ${X(t)} ${_f(t)}`,openReport:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u043E\u043B\u043D\u044B\u0439 \u043E\u0442\u0447\u0451\u0442`},trend:{lastDay:e=>`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0434\u0435\u043D\u044C (${e})`,dayDenominator:e=>`\u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F: ${X(e)}`,points:`\u0422\u043E\u0447\u0435\u043A`,empty:`\u0422\u043E\u0447\u0435\u043A \u043D\u0435\u0442 \u2014 \u0437\u0430 \u043E\u043A\u043D\u043E \u043D\u0435 \u043D\u0430\u0431\u0440\u0430\u043B\u043E\u0441\u044C \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0434\u043D\u044F.`,gaps:e=>`\u0414\u043D\u0435\u0439 \u0431\u0435\u0437 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F: ${X(e)} \u2014 \u0437\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C \u0434\u043D\u044F \u043D\u0438\u0436\u0435 \u043C\u0438\u043D\u0438\u043C\u0443\u043C\u0430.`},finding:{severity:{critical:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u043E`,high:`\u0432\u0430\u0436\u043D\u043E`,watch:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`},sentence:{uncovered_high_priority:e=>({before:`\u0424\u0438\u0447\u0430 `,after:` (${e.priority} \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442): \u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u043E ${X(e.uncovered)} \u0438\u0437 ${X(e.total)} ${J(e.total,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`}),consistently_failing_scenario:e=>({before:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 `,after:` \u0443\u043F\u0430\u043B \u0432 ${X(e.count)} ${J(e.count,{one:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u043C \u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})} \u043F\u043E\u0434\u0440\u044F\u0434`}),low_page_success:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432 ${e.rate} \u0438\u0437 ${X(e.executions)} (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),high_healed_rate:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${e.rate} \u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u043F\u043E\u0442\u0440\u0435\u0431\u043E\u0432\u0430\u043B\u0438 \u0441\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0438 (\u043F\u043E\u0440\u043E\u0433: ${e.threshold})`}),stale_page:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:` \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0430\u0441\u044C ${X(e.days)} ${xf(e.days)} (\u043F\u043E\u0440\u043E\u0433: ${X(e.threshold)})`}),open_bugs_no_verification_critical:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${J(e.count,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`}),open_bugs_no_verification_high:e=>({before:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 `,after:`: ${X(e.count)} ${J(e.count,{one:`\u0432\u0430\u0436\u043D\u044B\u0439 \u0431\u0430\u0433`,few:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u0430`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u0431\u0430\u0433\u043E\u0432`})} \u0438 \u043D\u0438 \u043E\u0434\u043D\u043E\u0439 \u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0439 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0437\u0430 ${e.window}`})},dominantCause:(e,t,n)=>`; \u043E\u0441\u043D\u043E\u0432\u043D\u0430\u044F \u043F\u0440\u0438\u0447\u0438\u043D\u0430 \u2014 ${e.toLocaleLowerCase(`ru`)} (${X(t)} \u0438\u0437 ${X(n)} ${yf(n)})`,unknownRule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E \u044D\u0442\u043E\u0433\u043E \u0441\u043B\u0430\u0431\u043E\u0433\u043E \u043C\u0435\u0441\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u044D\u0442\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.`,incompleteEvidence:`\u0414\u0430\u043D\u043D\u044B\u0445 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043D\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0447\u0442\u043E\u0431\u044B \u0441\u0444\u043E\u0440\u043C\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0432\u043E\u0434.`,ruleIdDetail:e=>`ruleId: ${e}`,evidence:(e,t,n)=>`${X(e)} \u00B7 ${t} \u00B7 \u043F\u043E\u0440\u043E\u0433 ${X(n)}`,evidenceAria:`\u041E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u0432\u044B\u0432\u043E\u0434\u0430`,evidenceRows:{denominator:`\u0417\u043D\u0430\u043C\u0435\u043D\u0430\u0442\u0435\u043B\u044C`,threshold:`\u041F\u043E\u0440\u043E\u0433`,window:`\u041E\u043A\u043D\u043E`,rule:`\u041F\u0440\u0430\u0432\u0438\u043B\u043E`},open:{scenario:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,feature:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0444\u0438\u0447\u0443`}},openAria:(e,t)=>`${e} \u00AB${t}\u00BB`,stability:{status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},evidence:{flaky:(e,t,n)=>`Flaky \u2014 ${X(e)} ${yf(e)} \u0438 ${X(t)} ${bf(t)} \u0432 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 ${X(n)} ${J(n,{one:`\u043F\u0440\u043E\u0433\u043E\u043D\u0435`,few:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`,many:`\u043F\u0440\u043E\u0433\u043E\u043D\u0430\u0445`})}`,consistently_failing:e=>J(e,{one:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,few:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`,many:`\u041F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442 \u2014 ${X(e)} \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0445 \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 \u043F\u043E\u0434\u0440\u044F\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0438\u0441\u044C \u043F\u0430\u0434\u0435\u043D\u0438\u0435\u043C`}),monitoring:(e,t)=>`\u041D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435 \u2014 ${X(e)} ${yf(e)} \u043D\u0430 ${X(t)} ${_f(t)}; \u0434\u043B\u044F \u0441\u0442\u0430\u0442\u0443\u0441\u0430 flaky \u043D\u0443\u0436\u043D\u043E \u22652 \u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0438 \u22652 \u0443\u0441\u043F\u0435\u0445\u043E\u0432 \u043F\u0440\u0438 n\u22656`,insufficientHistory:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 ${X(e)} ${_f(e)}; \u0434\u043B\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u0438 \u043D\u0443\u0436\u043D\u043E \u22653`,insufficientHistoryWatermark:e=>`\u041C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438 \u2014 \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D`,stable:e=>`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E \u2014 ${X(e)} ${_f(e)} \u0431\u0435\u0437 \u043F\u0430\u0434\u0435\u043D\u0438\u0439`},stripAria:(e,t,n)=>`${X(e)} ${bf(e)}, ${X(t)} ${yf(t)} \u0438\u0437 ${X(n)}`,stripAriaBeforeChange:e=>` \u00B7 \u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F: ${X(e)} ${_f(e)}`,beforeChange:`\u0434\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,success:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C`,outOf:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,dominantCause:`\u041E\u0441\u043D. \u043F\u0440\u0438\u0447\u0438\u043D\u0430`,noFailures:`\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442`,lastRun:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043F\u0440\u043E\u0433\u043E\u043D`,historyReset:e=>`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043A\u043B\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0441 ${e}: \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0451\u043D.`,causesTitle:`\u041F\u0440\u0438\u0447\u0438\u043D\u044B \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,failures:e=>`${X(e)} ${yf(e)}`,healed:`\u0421\u0430\u043C\u043E\u043F\u043E\u0447\u0438\u043D\u043A\u0430 \u0448\u0430\u0433\u043E\u0432`,aiExecuted:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0448\u0430\u0433\u043E\u0432 \u0447\u0435\u0440\u0435\u0437 \u0418\u0418`,ofPassedSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${J(t,{one:`\u0443\u0441\u043F\u0435\u0448\u043D\u043E\u0433\u043E \u0448\u0430\u0433\u0430`,few:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`,many:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432`})}`,erFailed:`\u041D\u0435\u043F\u0440\u043E\u0439\u0434\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438`,erFailedValue:(e,t)=>`\u0432 ${X(e)} \u0438\u0437 ${X(t)} ${vf(t)}`,rawCodes:e=>`\u041A\u043E\u0434\u044B \u043F\u0440\u0438\u0447\u0438\u043D \u00B7 \u043C\u0430\u043F\u043F\u0438\u043D\u0433 ${e}`,rawCode:(e,t)=>`${e} \u00D7${X(t)}`,recentRuns:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u044B`,outcome:{passed:`\u0443\u0441\u043F\u0435\u0445`,failed:`\u043F\u0430\u0434\u0435\u043D\u0438\u0435`,infra:`\u0438\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u043E\u0442\u043C\u0435\u043D\u0451\u043D`,abandoned:`\u0431\u0440\u043E\u0448\u0435\u043D`},totalFailures:`\u0412\u0441\u0435\u0433\u043E \u043F\u0430\u0434\u0435\u043D\u0438\u0439`,noCauses:`\u041F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0442.`},cause:{element_resolution:`\u041F\u043E\u0438\u0441\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,step_definition:`\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0448\u0430\u0433\u0430`,action_dispatch:`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,precondition:`\u041F\u0440\u0435\u0434\u0443\u0441\u043B\u043E\u0432\u0438\u0435 \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,infrastructure:`\u0418\u043D\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430`,cancelled:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,unrecognized:`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0435`},weakSpots:{coverage:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435`,coverageValue:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${J(t,{one:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B`,few:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`,many:`\u0441\u0442\u0440\u0430\u043D\u0438\u0446`})}`,stepSuccess:`\u0423\u0441\u043F\u0435\u0448\u043D\u043E\u0441\u0442\u044C \u0448\u0430\u0433\u043E\u0432`,ofSteps:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)} ${J(t,{one:`\u0448\u0430\u0433\u0430`,few:`\u0448\u0430\u0433\u043E\u0432`,many:`\u0448\u0430\u0433\u043E\u0432`})}`,noExecutions:`\u043D\u0435\u0442 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,openBugs:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,findings:`\u0421\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430`,findingsNone:`\u043D\u0435\u0442`,findingCount:{critical:e=>`${X(e)} ${J(e,{one:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u043A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,high:e=>`${X(e)} ${J(e,{one:`\u0432\u0430\u0436\u043D\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u043A\u0430`,few:`\u0432\u0430\u0436\u043D\u044B\u0435 \u043D\u0430\u0445\u043E\u0434\u043A\u0438`,many:`\u0432\u0430\u0436\u043D\u044B\u0445 \u043D\u0430\u0445\u043E\u0434\u043E\u043A`})}`,watch:e=>`${X(e)} ${J(e,{one:`\u043D\u0430\u0445\u043E\u0434\u043A\u0430 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,few:`\u043D\u0430\u0445\u043E\u0434\u043A\u0438 \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`,many:`\u043D\u0430\u0445\u043E\u0434\u043E\u043A \u043D\u0430 \u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0438`})}`},pagesTitle:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0444\u0438\u0447\u0438`,pagesCount:(e,t)=>`${X(e)} \u0438\u0437 ${X(t)}`,pageCovered:`\u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageNotCovered:`\u043D\u0435 \u043F\u043E\u043A\u0440\u044B\u0442\u0430`,pageBugs:e=>`\u0431\u0430\u0433\u043E\u0432: ${X(e)}`,pagesTruncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B ${X(e)} \u0438\u0437 ${X(t)} \u0441\u0442\u0440\u0430\u043D\u0438\u0446 \u0444\u0438\u0447\u0438.`,membership:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043C\u043E\u0436\u0435\u0442 \u0432\u0445\u043E\u0434\u0438\u0442\u044C \u0432 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0444\u0438\u0447 \u2014 \u0441\u0443\u043C\u043C\u044B \u043F\u043E \u0444\u0438\u0447\u0430\u043C \u043D\u0435 \u0441\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u044E\u0442\u0441\u044F.`,unassigned:`\u0431\u0435\u0437 \u0444\u0438\u0447\u0438`,priority:{critical:`\u041A\u0440\u0438\u0442\u0438\u0447\u043D\u044B\u0439`,high:`\u0412\u044B\u0441\u043E\u043A\u0438\u0439`,medium:`\u0421\u0440\u0435\u0434\u043D\u0438\u0439`,low:`\u041D\u0438\u0437\u043A\u0438\u0439`,ignore:`\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044F`}},lastPassed:{label:`\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F \u0443\u0441\u043F\u0435\u0448\u043D\u0430\u044F \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430`,never:`\u0443\u0441\u043F\u0435\u0448\u043D\u044B\u0445 \u043F\u0440\u043E\u0432\u0435\u0440\u043E\u043A \u043D\u0435 \u0431\u044B\u043B\u043E`,today:`\u0441\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0432\u0447\u0435\u0440\u0430`,daysAgo:e=>`${X(e)} ${xf(e)} \u043D\u0430\u0437\u0430\u0434`},hotspot:{open:`\u041E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0431\u0430\u0433\u0438`,opened:`\u041D\u043E\u0432\u044B\u0445 \u0437\u0430 \u043E\u043A\u043D\u043E`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E \u0437\u0430 \u043E\u043A\u043D\u043E`,closedHint:`\u0417\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u0441 \u0440\u0435\u043B\u0438\u0437\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432: \u0443 \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0445 \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u0439 \u0434\u0430\u0442\u0430 \u043D\u0435 \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430, \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u0435\u0451 \u043F\u043E \u0432\u0440\u0435\u043C\u0435\u043D\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0431\u044B\u043B\u043E \u0431\u044B \u0432\u044B\u0434\u0443\u043C\u043A\u043E\u0439.`,unmapped:`\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043E`,unmappedHint:`\u0411\u0430\u0433\u0438, \u0447\u0435\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0438\u043B\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u044B.`,severityChip:{critical:e=>`${X(e)} \u043A\u0440\u0438\u0442`,high:e=>`${X(e)} \u0432\u044B\u0441`,medium:e=>`${X(e)} \u0441\u0440\u0435\u0434`,low:e=>`${X(e)} \u043D\u0438\u0437`,none:e=>`${X(e)} \u0431\u0435\u0437 \u0432\u0430\u0436\u043D\u043E\u0441\u0442\u0438`,unknown:(e,t)=>`${X(e)} ${t}`}},envelope:{shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)} \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`,truncated:`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043D\u0435 \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u2014 \u043F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0432 \u043E\u0442\u0447\u0451\u0442\u0435.`},unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0447\u0451\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0442\u0447\u0451\u0442\u0430 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u2014 \u0447\u0438\u0441\u043B\u0430 \u043E\u0441\u0442\u0430\u044E\u0442\u0441\u044F \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u0430 Progon.`},collection:{collectionAria:e=>`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u043E\u0442\u0447\u0451\u0442\u0430: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u0435\u043A`,roleSlide:`\u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430`,goToSlide:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 {index} \u0438\u0437 {total}`}},runnerReadiness:{title:e=>`\u0413\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u044C \u043C\u0430\u0448\u0438\u043D: ${e}`,job:{atlas_crawl:`\u043E\u0431\u0445\u043E\u0434 \u0441\u0430\u0439\u0442\u0430`,make_auto:`\u0430\u0432\u0442\u043E\u0441\u0431\u043E\u0440\u043A\u0430 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`,swarm:`\u0440\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,scenario_launch:`\u0437\u0430\u043F\u0443\u0441\u043A \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},evaluatedAt:e=>`\u043D\u0430 ${e}`,fleet:Sf,state:{not_owner:()=>`\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D`,pending_enroll:()=>`\u041E\u0436\u0438\u0434\u0430\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,offline:()=>`\u041D\u0435 \u0432 \u0441\u0435\u0442\u0438`,capability_missing:e=>e===null?`\u041D\u0443\u0436\u043D\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435`:Cf[e],queue_full:()=>`\u041E\u0447\u0435\u0440\u0435\u0434\u044C \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0430`,ready:()=>`\u0413\u043E\u0442\u043E\u0432`},platform:{darwin:`macOS`,linux:`Linux`,win32:`Windows`},lastSeen:e=>`\u043D\u0430 \u0441\u0432\u044F\u0437\u0438 ${e}`,lastSeenNever:`\u043D\u0438 \u0440\u0430\u0437\u0443 \u043D\u0435 \u0432\u044B\u0445\u043E\u0434\u0438\u043B\u0430 \u043D\u0430 \u0441\u0432\u044F\u0437\u044C`,machinesAria:e=>`\u041C\u0430\u0448\u0438\u043D\u044B: ${X(e)}`,noRunners:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u0430\u0448\u0438\u043D \u043F\u0443\u0441\u0442.`,truncated:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,unsupported:{title:`\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E \u043C\u0430\u0448\u0438\u043D\u0430\u0445 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041E\u0442\u0447\u0451\u0442\u044B \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432 \u043E \u0433\u043E\u0442\u043E\u0432\u043D\u043E\u0441\u0442\u0438`,roleSlide:`\u043E\u0442\u0447\u0451\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442`,goToSlide:`\u041E\u0442\u0447\u0451\u0442 {index} \u0438\u0437 {total}`}},runnerEnrollment:{title:e=>`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0435\u0439 \u043C\u0430\u0448\u0438\u043D\u044B: ${e}`,expiresAt:e=>`\u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E \u0434\u043E ${e}`,step:{install:`\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0430\u0433\u0435\u043D\u0442`,enroll:`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043C\u0430\u0448\u0438\u043D\u0443`,approve:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,start:`\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0434\u0435\u043C\u043E\u043D`},copy:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,copied:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E`,copyAria:{install:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},copiedAria:{install:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438`,enroll:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F`,start:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E \u2014 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0430`},approveBefore:`\u041A\u043E\u043C\u0430\u043D\u0434\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0430\u043F\u0435\u0447\u0430\u0442\u0430\u0435\u0442 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0438 \u0441\u0441\u044B\u043B\u043A\u0443 \u0432\u0438\u0434\u0430`,approveAfter:`\u2014 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0435\u0451 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0433\u0434\u0435 \u0432\u044B \u0432\u043E\u0448\u043B\u0438 \u0432 Progon, \u0441\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0441 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u043E\u043C, \u0437\u0430\u0434\u0430\u0439\u0442\u0435 \u0438\u043C\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435.`,cadence:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043D\u0443\u0436\u043D\u043E \u0432 \u0442\u0435\u0447\u0435\u043D\u0438\u0435 ${X(e)} \u0441.`,askAgain:`\u041F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043C\u0430\u0448\u0438\u043D\u044B \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,unsupported:{title:`\u0418\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},references:{title:`\u0421\u0441\u044B\u043B\u043A\u0438`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,destination:{workbench:`\u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u043E\u0442\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},action:{workbench:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438`,map:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043D\u0430 \u043A\u0430\u0440\u0442\u0435`,run:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A`,list:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u0441\u043F\u0438\u0441\u043A\u0435`},noOpenAria:e=>`\u041D\u0435\u0442 \u0446\u0435\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0438 \u0438\u0437 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043F\u0440\u0438\u0448\u043B\u0438 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},sectionLink:{title:`\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,groupAria:`\u0421\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B\u044B \u043F\u0440\u043E\u0435\u043A\u0442\u0430`,action:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0437\u0434\u0435\u043B`,sections:{scenarios:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,"shared-steps":`\u041E\u0431\u0449\u0438\u0435 \u0448\u0430\u0433\u0438`,"api-collections":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,"api-catalog":`API \u0417\u0430\u043F\u0440\u043E\u0441\u044B`,checklists:`\u0427\u0435\u043A-\u043B\u0438\u0441\u0442\u044B`,bugs:`\u0411\u0430\u0433\u0438`,"test-runs":`\u041F\u0440\u043E\u0433\u043E\u043D\u044B`,imports:`\u0418\u043C\u043F\u043E\u0440\u0442`,map:`\u041A\u0430\u0440\u0442\u0430 \u043F\u0440\u043E\u0435\u043A\u0442\u0430`},unrecognized:`\u0420\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D`,serverLabel:e=>`\u0420\u0430\u0437\u0434\u0435\u043B \u00B7 \u043E\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430: \u00AB${e}\u00BB`,noRoute:`\u043D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438`,noRouteHint:`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0434\u0435\u043B\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443`,noRouteAria:e=>`\u041D\u0435\u0442 \u0441\u0441\u044B\u043B\u043A\u0438 \u0434\u043B\u044F \u0440\u0430\u0437\u0434\u0435\u043B\u0430: ${e}`,unsupported:{title:`\u0421\u0441\u044B\u043B\u043A\u0430 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`}},search:{title:`\u041D\u0430\u0439\u0434\u0435\u043D\u043E \u0432 \u043F\u0440\u043E\u0435\u043A\u0442\u0435`,evidence:`\u041E\u0431\u043E\u0441\u043D\u043E\u0432\u0430\u043D\u0438\u0435`,openAria:e=>`\u041E\u0442\u043A\u0440\u044B\u0442\u044C: ${e}`,emptyTitle:`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E`,emptyForQuery:e=>`\u041F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u0441 \u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E\u0439 \u0443\u0432\u0435\u0440\u0435\u043D\u043D\u043E\u0441\u0442\u044C\u044E.`,emptyBody:`\u041F\u043E\u0438\u0441\u043A \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D \u043F\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C \u0442\u0438\u043F\u0430\u043C \u0441\u0443\u0449\u043D\u043E\u0441\u0442\u0435\u0439 \u2014 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438, \u0431\u0430\u0433\u0438, \u043F\u0443\u043D\u043A\u0442\u044B \u0447\u0435\u043A-\u043B\u0438\u0441\u0442\u0430.`,shownOfTotal:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}.`,shownOfAtLeast:(e,t)=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)} \u0438\u0437 ${X(t)}+.`,shownUnknown:e=>`\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E ${X(e)}.`,loadMore:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451 ${X(e)}`,loadMoreUnknown:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0435\u0449\u0451`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443\u2026`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,unsupported:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043F\u043E\u0438\u0441\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F`,body:`\u041E\u0442\u0432\u0435\u0442 \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u0440\u0438\u0448\u0451\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u044D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0435 \u043C\u043E\u0436\u0435\u0442. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435 \u0438 \u0441\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0432 \u0447\u0430\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},collection:{collectionAria:e=>`\u041D\u0430\u0439\u0434\u0435\u043D\u043E: ${X(e)}`,roleCarousel:`\u043B\u0435\u043D\u0442\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432`,roleSlide:`\u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,previous:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,next:`\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442`,goToSlide:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 {index} \u0438\u0437 {total}`}},jobStatus:rf,workflow:sf,scenario:hf,coverage:ef,runInTab:cf,runStartAgent:df,confirmation:ff,changeSet:Zd},Tf={byCode:{"agent_jobs.dispatch_key_spent":`\u042D\u0442\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0435 \u0443\u0436\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E: \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435, \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u043E\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B\u043E, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0438\u0441\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"agent_jobs.not_active":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u043E\u0441\u044C \u2014 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.`,"agent_jobs.not_found":`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.`,"ai.bedrock_not_configured":`Amazon Bedrock \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.capabilities.unknown_provider":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai.completion_failed":`\u041E\u0448\u0438\u0431\u043A\u0430 \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u043A Progon`,"ai.concurrency_gate_unavailable":`Progon \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0438\u0437-\u0437\u0430 \u0441\u0431\u043E\u044F \u043D\u0430 \u043D\u0430\u0448\u0435\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ai.credit_charge_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B \u0437\u0430 \u044D\u0442\u043E\u0442 \u0437\u0430\u043F\u0440\u043E\u0441. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"ai.credit_estimate_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u043E\u0446\u0435\u043D\u043A\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"ai.credit_reservation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u0440\u0435\u0434\u0438\u0442\u044B.`,"ai.credit_reservation_not_found":`\u0420\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai.credit_reservation_not_open":`\u042D\u0442\u043E\u0442 \u0440\u0435\u0437\u0435\u0440\u0432 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u0443\u0436\u0435 \u0437\u0430\u043A\u0440\u044B\u0442.`,"ai.credits_insufficient":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432`,"ai.element_html_required":`HTML \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u0435\u043D`,"ai.frozen_model_lane_retired":`\u0417\u0430\u043C\u043E\u0440\u043E\u0436\u0435\u043D\u043E \u043D\u0430 \u043B\u0435\u0439\u043D\u0435 \u043C\u043E\u0434\u0435\u043B\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0435\u0442. \u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0437\u0430\u043D\u043E\u0432\u043E \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u043C\u043E\u0434\u0435\u043B\u0438.`,"ai.generation_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0430\u043D\u043D\u044B\u0435 Progon`,"ai.messages_required":`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u044B`,"ai.model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,"ai.model_not_configured":`\u0414\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430 \u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_output_ceiling_below_thinking_budget":`\u041F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 \u0431\u044E\u0434\u0436\u0435\u0442\u0430 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0439 \u2014 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443 \u043D\u0443\u0436\u043D\u043E \u043F\u043E\u0434\u043D\u044F\u0442\u044C \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u0438\u043B\u0438 \u0441\u043D\u0438\u0437\u0438\u0442\u044C \u0431\u044E\u0434\u0436\u0435\u0442.`,"ai.model_output_ceiling_missing":`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D \u043F\u043E\u0442\u043E\u043B\u043E\u043A \u043E\u0442\u0432\u0435\u0442\u0430, \u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0435\u0433\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.model_plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u044D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C`,"ai.plan_restricted":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u043D\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u044D\u0442\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,"ai.provider_empty_response":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u0432\u0435\u0440\u043D\u0443\u043B \u043F\u0443\u0441\u0442\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,"ai.provider_error":`\u041E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,"ai.provider_not_configured":`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,"ai.reasoning_unsupported":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435\u043C \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB \u0432 \u00AB\u0423\u0441\u0438\u043B\u0438\u0438\u00BB \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.user_company_missing":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"ai.user_concurrency_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u2014 \u0434\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0442\u0435\u043A\u0443\u0449\u0438\u0445 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.user_credits_limit":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F`,"ai.user_disabled":`Progon \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u043A \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0443.`,"ai.user_model_not_allowed":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u0430`,"ai.user_not_found":`\u0423\u0447\u0451\u0442\u043D\u0430\u044F \u0437\u0430\u043F\u0438\u0441\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_models.no_sendable_model":`\u041D\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u0438, \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0439 \u0434\u043B\u044F \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u2014 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043B\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u0442\u0435 \u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445.`,"ai_models.selection_not_sendable":`\u042D\u0442\u0443 \u043C\u043E\u0434\u0435\u043B\u044C \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u0431\u0440\u0430\u0442\u044C.`,"ai_settings.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"ai_settings.api_key_missing":`\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.company_key_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0439 API-\u043A\u043B\u044E\u0447.`,"ai_settings.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ai_settings.company_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.enterprise_required_company":`\u041A\u043E\u0440\u043F\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_personal":`\u041B\u0438\u0447\u043D\u044B\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.enterprise_required_user":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0435 \u043A\u043B\u044E\u0447\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise.`,"ai_settings.invalid_provider":`\u0412\u044B\u0431\u0440\u0430\u043D \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440.`,"ai_settings.model_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0451\u0442\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438.`,"ai_settings.personal_provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u043B\u0438\u0447\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.plan_not_found":`\u0422\u0430\u0440\u0438\u0444 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ai_settings.provider_required":`\u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430.`,"ai_settings.provider_unavailable":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"ai_settings.unsupported_personal_provider":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043B\u0438\u0447\u043D\u043E\u0433\u043E.`,"ai_settings.user_not_found":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.action_context_missing":`\u041D\u0435\u043B\u044C\u0437\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C: \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u0430 \u043F\u043E\u0442\u0435\u0440\u044F\u043D. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.`,"assistant.conversations.invalid_cursor":`\u041D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043A\u0443\u0440\u0441\u043E\u0440.`,"assistant.conversations.not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"assistant.recover_last_message":`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u043E\u0442\u0432\u0435\u0442 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.`,"assistant.search_session.not_found":`\u041F\u043E\u0438\u0441\u043A\u043E\u0432\u0430\u044F \u0441\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u043B\u0430.`,"auth.company_forbidden":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u044D\u0442\u043E\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`,"auth.forbidden":`\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u043F\u0440\u0430\u0432`,"auth.insufficient_scope":`\u0422\u0440\u0435\u0431\u0443\u0435\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 (scope) \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B.`,"auth.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0438\u043B\u0438 \u0438\u0441\u0442\u0435\u043A\u0448\u0438\u0439 \u0442\u043E\u043A\u0435\u043D`,"auth.login.company_inactive":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u0430`,"auth.login.email_not_verified":`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 email \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u0430`,"auth.login.email_rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E email. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.login.invalid_credentials":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 email \u0438\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.missing_credentials":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043F\u0430\u0440\u043E\u043B\u044C`,"auth.login.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0432\u0445\u043E\u0434\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.missing_header":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438`,"auth.refresh.token_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043A\u0435\u043D \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"auth.register.capacity_reached":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0430 \u2014 \u043C\u044B \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u043C \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043D\u043E\u0432\u044B\u0445 \u0430\u043A\u043A\u0430\u0443\u043D\u0442\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435 \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.capacity_unreadable":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044E \u0438\u0437-\u0437\u0430 \u043E\u0448\u0438\u0431\u043A\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437, \u0430 \u0435\u0441\u043B\u0438 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430 \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u0435\u0442\u0441\u044F, \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.company_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`,"auth.register.email_domain_blocked":`\u042D\u0442\u043E\u0442 \u043F\u043E\u0447\u0442\u043E\u0432\u044B\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442 \u0434\u043B\u044F \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u044B\u0439 \u0440\u0430\u0431\u043E\u0447\u0438\u0439 \u0438\u043B\u0438 \u043B\u0438\u0447\u043D\u044B\u0439 \u0430\u0434\u0440\u0435\u0441.`,"auth.register.email_invalid":`\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 email.`,"auth.register.email_taken":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0441 \u0442\u0430\u043A\u0438\u043C email \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442`,"auth.register.invite_code_invalid":`\u041A\u043E\u0434 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043A\u043E\u0434 \u0438\u043B\u0438 \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439.`,"auth.register.invite_required":`\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044E. \u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435 \u0438\u0437 \u043F\u0440\u0438\u0433\u043B\u0430\u0448\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"auth.register.name_required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u043C\u044F \u0438 \u0444\u0430\u043C\u0438\u043B\u0438\u044E.`,"auth.register.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u044F`,"auth.resend.email_required":`\u0423\u043A\u0430\u0436\u0438\u0442\u0435 email.`,"auth.resend.rate_limited":`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u044B\u043C \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u043C \u043A\u043E\u0434\u0430.`,"auth.session_invalidated":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u044C\u043D\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.session_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0447\u0435\u0440\u0435\u0437 \u0441\u0435\u0441\u0441\u0438\u044E.`,"auth.token_expired":`\u0422\u043E\u043A\u0435\u043D \u0438\u0441\u0442\u0451\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.token_revoked":`\u0422\u043E\u043A\u0435\u043D \u043E\u0442\u043E\u0437\u0432\u0430\u043D. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"auth.user_unavailable":`\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D \u0438\u043B\u0438 \u0434\u0435\u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D`,"auth.verify_email.invalid_code":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F`,"auth.verify_email.rate_limited":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"auth.verify_email.required":`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 email \u0438 \u043A\u043E\u0434 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,"auth.verify_email.too_many_attempts":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u043F\u044B\u0442\u043E\u043A. \u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u043A\u043E\u0434`,"available_models.missing_disabled_selection_id":`\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 ID \u043E\u0442\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0439 \u0432\u044B\u0431\u043E\u0440\u043A\u0438.`,"available_models.redis_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0441\u0442\u0438 \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.`,"available_models.unknown_key_source":`\u041D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A API-\u043A\u043B\u044E\u0447\u0430.`,"chat.busy":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0435\u0449\u0451 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435.`,"chat_confirm.display_unresolvable":`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u043B\u0430\u043B\u0441\u044F \u043D\u0430 \u043E\u0431\u044A\u0435\u043A\u0442, \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043D\u0435\u0442 \u0432 \u044D\u0442\u043E\u043C \u043F\u0440\u043E\u0435\u043A\u0442\u0435. \u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435, \u0447\u0442\u043E \u0438\u043C\u0435\u043D\u043D\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C, \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"chat_confirm.pending_action_stale":`\u042D\u0442\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u043B\u043E: \u043E\u043D\u043E \u0431\u044B\u043B\u043E \u0441\u0434\u0435\u043B\u0430\u043D\u043E \u0434\u043E \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430, \u0438 \u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0442 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0443. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437 \u2014 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0441\u043E\u0441\u0442\u0430\u0432\u0438\u0442 \u043D\u043E\u0432\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435.`,"client.connection_lost_during_stream":`\u041E\u0442\u0432\u0435\u0442 \u043E\u0431\u043E\u0440\u0432\u0430\u043B\u0441\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430, \u043A\u043E\u0433\u0434\u0430 \u0441\u0432\u044F\u0437\u044C \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,"client.browser_api_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C API-\u0437\u0430\u043F\u0440\u043E\u0441 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0441\u0442\u043E\u0440\u0438\u044E: \u0437\u0430\u043F\u0440\u043E\u0441 \u043C\u043E\u0433 \u0431\u044B\u0442\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D.`,"client.atlas_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0431\u0445\u043E\u0434\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043E\u0431\u0445\u043E\u0434\u044B Atlas \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.ai_run_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C \u0437\u0430\u043F\u0443\u0441\u043A AI-\u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0440\u043E\u0433\u043E\u043D\u0430 \u043F\u0435\u0440\u0435\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043E\u043C.`,"client.workflow_host_action_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u043E\u0439 \u0432 \u044D\u0442\u043E\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0440\u043E\u044F \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.permission_mode_changed":`\u0420\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438 \u0432 \u0434\u0440\u0443\u0433\u043E\u043C \u043E\u043A\u043D\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"client.stream_stalled":`\u041E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u043C\u0438\u043D\u0443\u0442\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u2014 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043D\u0430\u044F \u0447\u0430\u0441\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u0430 \u043E\u0441\u0442\u0430\u043D\u0435\u0442\u0441\u044F \u0432\u044B\u0448\u0435.`,"cmd.accept_timeout":`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u0443\u0441\u043F\u0435\u043B \u043F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"company_models.default_must_be_enabled":`\u041C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u043B\u0436\u043D\u0430 \u0431\u044B\u0442\u044C \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0430 \u0432 \u0441\u043F\u0438\u0441\u043E\u043A \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0445, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u0435\u0451 \u043C\u043E\u0436\u043D\u043E \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"company_models.invalid_model_id":`\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"company_models.plan_restricted":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u0431\u043E\u043B\u0435\u0435 \u0432\u044B\u0441\u043E\u043A\u043E\u043C \u0442\u0430\u0440\u0438\u0444\u0435.`,"conversation.project_id_required":`\u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C ID \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`,disconnected:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"internal.invalid_token":`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0442\u043E\u043A\u0435\u043D \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"internal.not_configured":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 API \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"internal.operation_failed":`\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0430\u0441\u044C \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439.`,"internal.unexpected":`\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430`,model_not_allowed:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,"rate_limit.company_write_exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"rate_limit.counter_upsert_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439.`,"rate_limit.counter_upsert_invalid_count":`\u0421\u0447\u0451\u0442\u0447\u0438\u043A \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439 \u0432\u0435\u0440\u043D\u0443\u043B \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.`,"rate_limit.exceeded":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,reconnect_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,reconnect_timeout:`\u0412\u0440\u0435\u043C\u044F \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,selection_expired:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"subscription.admin_api_error":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0443 \u0432 \u0434\u0430\u043D\u043D\u044B\u0439 \u043C\u043E\u043C\u0435\u043D\u0442.`,"subscription.admin_api_not_configured":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D.`,"subscription.admin_api_unavailable":`\u0421\u0435\u0440\u0432\u0438\u0441 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0437\u0430\u044F\u0432\u043E\u043A \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"subscription.admin_required":`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430.`,"subscription.company_not_found":`\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"subscription.credits_maximum":`\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 000 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.credits_minimum":`\u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043A\u0443\u043F\u043A\u0430 \u2014 100 \u043A\u0440\u0435\u0434\u0438\u0442\u043E\u0432.`,"subscription.invalid_plan":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0442\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D.`,"subscription.payments_disabled":`\u041E\u043F\u043B\u0430\u0442\u0430 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0444\u043E\u0440\u043C\u0443 \u0437\u0430\u044F\u0432\u043A\u0438 \u043D\u0430 \u0430\u043F\u0433\u0440\u0435\u0439\u0434.`,"subscription.plan_config_missing":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E \u0442\u0430\u0440\u0438\u0444\u043D\u043E\u0433\u043E \u043F\u043B\u0430\u043D\u0430, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0443.`,"subscription.plan_not_found":`\u0422\u0430\u0440\u0438\u0444\u043D\u044B\u0439 \u043F\u043B\u0430\u043D \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"subscription.request_already_open":`\u0423 \u0432\u0430\u0448\u0435\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044C \u0437\u0430\u044F\u0432\u043A\u0430 \u043D\u0430 \u0440\u0430\u0441\u0441\u043C\u043E\u0442\u0440\u0435\u043D\u0438\u0438. \u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0435\u0451 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438, \u043F\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043C \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u043E\u0432\u0443\u044E.`,"subscription.seats_exceed_limit":`\u041D\u0435\u043B\u044C\u0437\u044F \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043C\u0435\u0441\u0442\u0430: \u043F\u0440\u0435\u0432\u044B\u0448\u0435\u043D \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0439 \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u0442\u0430\u0440\u0438\u0444\u0430.`,"subscription.seats_invalid":`\u041D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442. \u0414\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043E\u0442 1 \u0434\u043E 100.`,"subscription.seats_unlimited":`\u0412\u0430\u0448 \u0442\u0430\u0440\u0438\u0444 \u0443\u0436\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043D\u0435\u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043C\u0435\u0441\u0442.`,"ws.conversation_not_found":`\u0414\u0438\u0430\u043B\u043E\u0433 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.rate_limit_company":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_fleet":`\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442 \u043B\u0438\u043C\u0438\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.rate_limit_user":`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.`,"ws.run_not_found":`\u0417\u0430\u043F\u0443\u0441\u043A Progon \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"ws.runner_already_claimed":`\u0418\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C \u0443\u0436\u0435 \u0437\u0430\u043D\u044F\u0442 \u0434\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0430.`,"ws.runner_not_owner":`\u041F\u0440\u0430\u0432\u043E \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0443\u0442\u0435\u0440\u044F\u043D\u043E. \u041F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u0441\u044C.`,"ws.runner_restore_unavailable":`\u041D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.`,"ws.runner_restore_window_expired":`\u041E\u043A\u043D\u043E \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0438\u0441\u0442\u0435\u043A\u043B\u043E.`,"ws.session_not_found":`\u0421\u0435\u0441\u0441\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430.`,"ws.unauthorized_channel":`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u0438\u043B\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.agents_over_max":`\u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB \u0443\u043C\u0435\u043D\u044C\u0448\u0438\u043B\u0438 \u2014 \u00AB\u0423\u0441\u0438\u043B\u0438\u0435\u00BB \u0441\u0434\u0432\u0438\u043D\u0443\u0442\u043E \u043D\u0430 \u043D\u043E\u0432\u044B\u0439 \u043C\u0430\u043A\u0441\u0438\u043C\u0443\u043C, \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"workflows.not_found":`\u0420\u043E\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.`,"workflows.not_initiator_or_admin":`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u043E\u0439 \u043C\u043E\u0436\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0442\u043E\u0442, \u043A\u0442\u043E \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u043B, \u0438\u043B\u0438 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438.`},byProviderCode:{"ai.zai.insufficient_balance":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u2014 \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0442\u043E\u0447\u043D\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043D\u0430 \u0441\u0447\u0451\u0442\u0435 \u043B\u0438\u0431\u043E \u043A\u043B\u044E\u0447 \u0438 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043D\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0442. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0431\u0430\u043B\u0430\u043D\u0441 \u0438 \u043A\u043B\u044E\u0447 Z.AI.`,"ai.zai.rate_limited":`Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043E\u0442\u0443 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.overloaded":`\u0421\u0435\u0440\u0432\u0438\u0441 Z.AI \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043F\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043D. \u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.quota_exhausted":`\u041A\u0432\u043E\u0442\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F Z.AI \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D\u0430. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043B\u0438\u043C\u0438\u0442\u044B \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 Z.AI.`,"ai.zai.plan_restricted":`\u042D\u0442\u043E\u0442 \u043A\u043B\u044E\u0447 Z.AI \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D\u043D\u043E\u0439 \u043F\u043E\u0434\u043F\u0438\u0441\u043A\u043E\u0439 \u0438\u043B\u0438 \u043F\u043B\u0430\u043D\u043E\u043C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0430\u0448 \u043F\u043B\u0430\u043D Z.AI.`,"ai.zai.content_policy":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u0438\u0437-\u0437\u0430 \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0438 \u0432 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438 \u043A\u043E\u043D\u0442\u0435\u043D\u0442\u0430.`,"ai.zai.unknown_model":`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u0430. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C GLM.`,"ai.zai.auth_failed":`\u041D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C \u0430\u0443\u0442\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0446\u0438\u044F \u0432 Z.AI. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435, \u0447\u0442\u043E API-\u043A\u043B\u044E\u0447 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u0438 \u0430\u043A\u0442\u0438\u0432\u0435\u043D.`,"ai.zai.invalid_request":`Z.AI \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u043A\u0430\u043A \u043D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0432\u0432\u043E\u0434 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,"ai.zai.context_overflow":`\u0414\u0438\u0430\u043B\u043E\u0433 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u044B\u0439 \u0434\u043B\u044F \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 Z.AI. \u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u0441\u043E\u043A\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u0432\u043E\u0434.`,"ai.zai.vision_not_supported":`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C Z.AI \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F. \u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439.`,"ai.zai.abnormal_termination":`\u041E\u0442\u0432\u0435\u0442 Z.AI \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B\u0441\u044F \u043D\u0435\u0448\u0442\u0430\u0442\u043D\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,"ai.zai.provider_error":`Z.AI \u0432\u0435\u0440\u043D\u0443\u043B \u043E\u0448\u0438\u0431\u043A\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`}},Ef=e=>J(e,{one:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435`,few:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,many:`\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439`}),Df=e=>J(e,{one:`\u0430\u0433\u0435\u043D\u0442`,few:`\u0430\u0433\u0435\u043D\u0442\u0430`,many:`\u0430\u0433\u0435\u043D\u0442\u043E\u0432`}),Of={cards:wf,shell:{header:{title:`Progon`,history:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F`,newConversation:`\u041D\u043E\u0432\u044B\u0439 \u0434\u0438\u0430\u043B\u043E\u0433`,noProject:`\u041F\u0440\u043E\u0435\u043A\u0442 \u043D\u0435 \u0432\u044B\u0431\u0440\u0430\u043D`},composer:{inputLabel:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0443`,placeholder:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 Progon\u2026`,placeholderNoModels:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`,placeholderSignIn:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438`,placeholderNoProject:`\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,placeholderOffline:`\u041D\u0435\u0442 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,send:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,stop:`\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,placeholderWithFiles:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435, \u0447\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0441 \u0444\u0430\u0439\u043B\u0430\u043C\u0438\u2026`,sendBlocked:{uploading:`\u0414\u043E\u0436\u0434\u0438\u0442\u0435\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432`,refused:`\u0423\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,noText:`\u041D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043A \u0444\u0430\u0439\u043B\u0430\u043C`},settingsLabel:`\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0432\u0435\u0442\u0430`,effort:{name:`\u0423\u0441\u0438\u043B\u0438\u0435`,note:`\u041E\u0442\u0432\u0435\u0442\u044B \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0438 \u0435\u0433\u043E \u0437\u0430\u043F\u0443\u0441\u043A\u0438`,levels:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435`,max:`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C`},rows:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0435 \u043E\u0442\u0432\u0435\u0442\u044B, \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u043E\u0434\u043D\u0438\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u043C`,thinking:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0438 \u0430\u0433\u0435\u043D\u0442 \u0434\u0443\u043C\u0430\u044E\u0442 \u0433\u043B\u0443\u0431\u0436\u0435`,max:`\u0413\u043B\u0443\u0431\u0436\u0435, \u0430 \u0437\u0430\u043F\u0443\u0441\u043A\u0438 \u2014 \u0440\u043E\u0435\u043C \u0430\u0433\u0435\u043D\u0442\u043E\u0432`},footer:`\u0414\u0435\u0440\u0436\u0438\u0442\u0441\u044F \u0434\u043E \u043A\u043E\u043D\u0446\u0430 \u0431\u0435\u0441\u0435\u0434\u044B. \u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0441 \u00AB\u041E\u0431\u044B\u0447\u043D\u044B\u0439\u00BB.`,chipMax:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Df(e)}`,chipMaxShort:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e}`,long:{normal:`\u041E\u0431\u044B\u0447\u043D\u044B\u0439 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,thinking:`\u0420\u0430\u0437\u043C\u044B\u0448\u043B\u0435\u043D\u0438\u0435 \u00B7 \u043E\u0434\u0438\u043D \u0430\u0433\u0435\u043D\u0442`,max:e=>`\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C \u00B7 ${e} ${Df(e)}`},chipLabel:e=>`\u0423\u0441\u0438\u043B\u0438\u0435: ${e}`,reasonPlace:`\u041D\u0443\u0436\u0435\u043D \u0431\u0440\u0430\u0443\u0437\u0435\u0440: \u00AB\u041C\u0430\u043A\u0441\u0438\u043C\u0443\u043C\u00BB \u2014 \u044D\u0442\u043E \u043E\u043A\u043D\u0430 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,agents:{label:`\u0410\u0433\u0435\u043D\u0442\u043E\u0432`,limit:e=>`\u041D\u0435 \u0431\u043E\u043B\u044C\u0448\u0435 ${e} \u2014`,settingsLink:`\u00AB\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0418\u0418 \u2192 \u0420\u043E\u0439 \u0430\u0433\u0435\u043D\u0442\u043E\u0432\u00BB`,groupLabel:`\u0427\u0438\u0441\u043B\u043E \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,fewer:`\u041C\u0435\u043D\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`,more:`\u0411\u043E\u043B\u044C\u0448\u0435 \u0430\u0433\u0435\u043D\u0442\u043E\u0432`}},permission:{groupLabel:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,menuNote:`\u0414\u043B\u044F \u044D\u0442\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u044B`,chipLabel:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`,ask:`\u0421\u043F\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044C`,bypass:`\u0411\u0435\u0437 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,askHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043D\u0435\u043E\u0431\u0440\u0430\u0442\u0438\u043C\u044B\u0435 \u043F\u0440\u0430\u0432\u043A\u0438 \u0436\u0434\u0443\u0442 \u0432\u0430\u0448\u0435\u0433\u043E \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,bypassHint:`\u0417\u0430\u043F\u0443\u0441\u043A\u0438 \u0438 \u043F\u0440\u0430\u0432\u043A\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u0441\u0440\u0430\u0437\u0443. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0432\u0441\u0451 \u0440\u0430\u0432\u043D\u043E \u0436\u0434\u0443\u0442 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.`,arrived:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F: ${e}`},place:{name:`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C`,note:`\u0414\u043B\u044F \u0432\u0441\u0435\u0445 \u0437\u0430\u043F\u0443\u0441\u043A\u043E\u0432 \u0438\u0437 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,title:`\u0413\u0434\u0435 \u0418\u0418 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435: \u044D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0440\u0430\u043D\u043D\u0435\u0440 \u0438\u043B\u0438 \u0431\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,chipLabel:e=>`\u0413\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C: ${e}`,thisBrowser:`\u042D\u0442\u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440`,thisBrowserRowOpensWindows:`\u041E\u043A\u043D\u0430 \u043E\u0442\u043A\u0440\u043E\u044E\u0442\u0441\u044F \u0432 \u0444\u043E\u043D\u0435 \u044D\u0442\u043E\u0433\u043E Chrome`,thisBrowserRowTasksOnly:`\u0412 \u0432\u0435\u0431-\u0447\u0430\u0442\u0435 \u2014 \u0442\u043E\u043B\u044C\u043A\u043E \u0437\u0430\u0434\u0430\u043D\u0438\u044F; \u043F\u0440\u043E\u0433\u043E\u043D \u0438 \u043E\u0431\u0445\u043E\u0434 \u2014 \u0441 \u0440\u0430\u043D\u043D\u0435\u0440\u0430 \u0438\u043B\u0438 \u0438\u0437 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438`,none:`\u0411\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430`,noneRow:`\u0422\u043E\u043B\u044C\u043A\u043E API-\u0437\u0430\u043F\u0440\u043E\u0441\u044B \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043D\u044B\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438`,runner:e=>`\u0420\u0430\u043D\u043D\u0435\u0440 ${e}`,runnerUnread:`\u0420\u0430\u043D\u043D\u0435\u0440`,runnerGone:`\u0420\u0430\u043D\u043D\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,runnerGoneHint:`\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0430\u043D\u043D\u0435\u0440 \u0443\u0434\u0430\u043B\u0451\u043D \u0438\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u0430\u043C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u0433\u0434\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C.`,runnerFree:`\u0421\u0432\u043E\u0431\u043E\u0434\u0435\u043D`,runnerBusy:`\u0417\u0430\u043D\u044F\u0442 \u2014 \u0437\u0430\u043F\u0443\u0441\u043A \u0432\u0441\u0442\u0430\u043D\u0435\u0442 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u044C`,runnerBlocked:{notOwner:`\u0417\u0430\u043F\u0443\u0441\u043A \u0442\u043E\u043B\u044C\u043A\u043E \u0443 \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430`,notEnrolled:`\u0415\u0449\u0451 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D`,offline:`\u041E\u0444\u043B\u0430\u0439\u043D`},fleetLoading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0440\u0430\u043D\u043D\u0435\u0440\u044B\u2026`,fleetFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0430\u043D\u043D\u0435\u0440\u044B`,fleetRetry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,fleetEmpty:`\u0412 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438 \u043D\u0435\u0442 \u0440\u0430\u043D\u043D\u0435\u0440\u043E\u0432`,othersGroup:e=>`\u0427\u0443\u0436\u0438\u0435 \u0440\u0430\u043D\u043D\u0435\u0440\u044B (${e})`},hint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C, Shift+Enter \u2014 \u043D\u043E\u0432\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430`,plainHint:`Enter \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,attachments:{attach:`\u041F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u0444\u0430\u0439\u043B`,trayLabel:`\u0424\u0430\u0439\u043B\u044B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,remove:e=>`\u0423\u0431\u0440\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u00AB${e}\u00BB`,uploading:e=>`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F ${e}%`,uploadingLabel:e=>`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 ${e}`,pastedName:e=>`\u0421\u043D\u0438\u043C\u043E\u043A \u044D\u043A\u0440\u0430\u043D\u0430 ${e}`,drop:{title:`\u041E\u0442\u043F\u0443\u0441\u0442\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C`,types:`PNG, JPEG, WebP, PDF, TXT, MD`,sizes:`\u041A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0438 PDF \u0434\u043E 50 \u041C\u0411, \u0442\u0435\u043A\u0441\u0442 \u0434\u043E 4 \u041C\u0411`},retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,reupload:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`,pickModel:`\u0432\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E`,refusal:{type:`\u0422\u0430\u043A\u043E\u0439 \u0444\u0430\u0439\u043B \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F: \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F PNG, JPEG, WebP, PDF, TXT, MD`,tooLarge:e=>`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0439 \u0444\u0430\u0439\u043B: ${e}`,limit:{image:`\u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0430 \u2014 \u0434\u043E 50 \u041C\u0411`,pdf:`PDF \u2014 \u0434\u043E 50 \u041C\u0411`,text:`\u0442\u0435\u043A\u0441\u0442 \u2014 \u0434\u043E 4 \u041C\u0411`},fileName:`\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 255 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u2014 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043B \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,empty:`\u0424\u0430\u0439\u043B \u043F\u0443\u0441\u0442\u043E\u0439`,textNotUtf8:`\u0422\u0435\u043A\u0441\u0442 \u043D\u0435 \u0432 UTF-8 \u2014 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0432 UTF-8 \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,unreadable:`\u0424\u0430\u0439\u043B \u043D\u0435 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F \u2014 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043E\u043D \u043F\u043E\u0432\u0440\u0435\u0436\u0434\u0451\u043D`,contentMismatch:e=>`\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043D\u0435 \u043F\u043E\u0445\u043E\u0436\u0435 \u043D\u0430 ${e} \u2014 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u0444\u0430\u0439\u043B`,pdfEncrypted:`PDF \u0437\u0430\u0449\u0438\u0449\u0451\u043D \u043F\u0430\u0440\u043E\u043B\u0435\u043C \u2014 \u0441\u043D\u0438\u043C\u0438\u0442\u0435 \u043F\u0430\u0440\u043E\u043B\u044C \u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430`,server:`\u0421\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u0444\u0430\u0439\u043B`,failedNetwork:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C`,failedServer:`\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B`,expired:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \u0445\u0440\u0430\u043D\u0438\u0442\u0441\u044F \u0441\u0443\u0442\u043A\u0438 \u2014 \u044D\u0442\u043E\u0442 \u0443\u0436\u0435 \u0443\u0434\u0430\u043B\u0451\u043D`,modelNoFiles:e=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0444\u0430\u0439\u043B\u044B \u2014 `,modelNoType:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 ${t} \u2014 `,modelFact:(e,t)=>`\u041C\u043E\u0434\u0435\u043B\u044C ${e} \u043D\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u044D\u0442\u043E\u0442 \u0444\u0430\u0439\u043B: ${t} \u2014 `},announce:{uploaded:e=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D`,refused:(e,t)=>`\u0424\u0430\u0439\u043B \u00AB${e}\u00BB \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${t}`}}},transcript:{copyAnswer:{label:`\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`,done:`\u041E\u0442\u0432\u0435\u0442 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442`},activity:{done:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} ${J(e,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneOf:(e,t)=>`\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e} \u0438\u0437 ${t} ${J(t,{one:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F`,few:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`,many:`\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439`})}`,doneShort:e=>`\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E ${e}`,failedShort:e=>`${e} \u0441 \u043E\u0448\u0438\u0431\u043A\u043E\u0439`,running:e=>`\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F: ${e}`,failed:`\u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,unknown:`\u0438\u0441\u0445\u043E\u0434 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`},feedLabel:`\u041B\u0435\u043D\u0442\u0430 \u0434\u0438\u0430\u043B\u043E\u0433\u0430`,scrollToBottom:`\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u0432\u043D\u0438\u0437`,olderHistory:{loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u044E \u0440\u0430\u043D\u043D\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F\u2026`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0430\u043D\u043D\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},leadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0440\u043E\u044F`,taskLeadByline:`\u0412\u0435\u0434\u0443\u0449\u0438\u0439`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,thinking:`\u0414\u0443\u043C\u0430\u044E\u2026`,thoughtFor:e=>`\u0414\u0443\u043C\u0430\u043B ${e} \u0441`,thinkingPhase:`\u0414\u0443\u043C\u0430\u044E\u2026`,toolCall:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430`,toolCallCancelled:`\u0412\u044B\u0437\u043E\u0432 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u043E\u0442\u043C\u0435\u043D\u0451\u043D`,toolCallStatus:{confirmed:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E`,waitingForBrowser:`\u041E\u0436\u0438\u0434\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435`,stoppingBrowser:`\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435\u2026`,failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,rejected:`\u041E\u0442\u043A\u043B\u043E\u043D\u0435\u043D\u043E`,rejectedLeadGrant:`\u041D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043E \u2014 \u043F\u043E\u0439\u0434\u0451\u0442 \u0432 \u043E\u0442\u0447\u0451\u0442 \u00B7 \u0432\u044B`,closed:`\u0417\u0430\u043A\u0440\u044B\u0442\u043E: \u0437\u0430\u043F\u0443\u0441\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D`,unknown:`\u0418\u0441\u0445\u043E\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043D`,launchedElsewhere:`\u0417\u0430\u043F\u0443\u0449\u0435\u043D\u043E \u0432 \u043D\u043E\u0432\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u0435`,openConversation:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0431\u0435\u0441\u0435\u0434\u0443`},unknownTool:{title:`\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F`,body:`\u042D\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044F \u043D\u0435 \u0443\u043C\u0435\u0435\u0442 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u044D\u0442\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0435.`},stopFailed:{rejected:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B \u043A\u043E\u043C\u0430\u043D\u0434\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,ack_timeout:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u0435\u0440\u0432\u0435\u0440 \u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,not_open:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0442\u043E. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,connection_closed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442 \u2014 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0440\u0432\u0430\u043B\u043E\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},details:`\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0438`,cardsFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0438 \u044D\u0442\u043E\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430.`,text:`\u0422\u0435\u043A\u0441\u0442 \u043E\u0442\u0432\u0435\u0442\u0430 \u0432\u044B\u0448\u0435 \u043D\u0435 \u043F\u043E\u0441\u0442\u0440\u0430\u0434\u0430\u043B.`,retry:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043D\u043E\u0432\u0430`}},empty:{heading:`\u0427\u0435\u043C \u043C\u043E\u0433\u0443 \u043F\u043E\u043C\u043E\u0447\u044C?`,subtext:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043E \u0442\u0435\u0441\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u0438\u043B\u0438 \u043F\u043E\u0440\u0443\u0447\u0438\u0442\u0435 \u0437\u0430\u0434\u0430\u043D\u0438\u0435`,footnote:`\u041A\u043B\u0438\u043A \u0432\u0441\u0442\u0430\u0432\u0438\u0442 \u0437\u0430\u0433\u043E\u0442\u043E\u0432\u043A\u0443 \u0437\u0430\u0434\u0430\u043D\u0438\u044F \u0432 \u043F\u043E\u043B\u0435 \u2014 \u043F\u043E\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435`,reportHeading:`\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u043F\u0440\u043E \u044D\u0442\u043E\u0442 \u043E\u0442\u0447\u0451\u0442`},errors:{classes:{rateLimit:{title:`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u043D\u043E\u0433\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432`,hint:`\u041F\u043E\u0434\u043E\u0436\u0434\u0438\u0442\u0435 \u043D\u0435\u043C\u043D\u043E\u0433\u043E \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},credits:{title:`\u041B\u0438\u043C\u0438\u0442 \u0438\u0441\u0447\u0435\u0440\u043F\u0430\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0442\u0430\u0440\u0438\u0444 \u0438\u043B\u0438 \u043B\u0438\u043C\u0438\u0442\u044B \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},auth:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0432\u0442\u043E\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 API-\u043A\u043B\u044E\u0447 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`},connection:{title:`\u041F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,hint:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435`},stalled:{title:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0441\u0442\u0430\u043B \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,hint:null},streamCut:{title:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E`,hint:null},generic:{title:`\u041E\u0448\u0438\u0431\u043A\u0430 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 Progon`,hint:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437`}}},notices:{dismiss:`\u0421\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,capabilities:{title:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,sendBlocked:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u043F\u043E\u043A\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F \u0441\u043D\u043E\u0432\u0430.`,timedOut:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u0441\u044F \u0437\u0430 \u043E\u0442\u0432\u0435\u0434\u0451\u043D\u043D\u043E\u0435 \u0432\u0440\u0435\u043C\u044F.`,loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439.`,retry:`\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439`},permissionReadFailed:{title:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u0439`,text:`\u0411\u0435\u0437 \u043D\u0435\u0433\u043E \u043D\u043E\u0432\u0443\u044E \u0431\u0435\u0441\u0435\u0434\u0443 \u043D\u0435 \u043D\u0430\u0447\u0430\u0442\u044C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},permissionWriteFailed:{title:e=>`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u00AB${e}\u00BB`,textConversation:e=>`\u0411\u0435\u0441\u0435\u0434\u0430 \u043E\u0441\u0442\u0430\u043B\u0430\u0441\u044C \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,textNewConversation:e=>`\u041D\u043E\u0432\u0430\u044F \u0431\u0435\u0441\u0435\u0434\u0430 \u043D\u0430\u0447\u043D\u0451\u0442\u0441\u044F \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u00AB${e}\u00BB.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},unsent:{title:e=>`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E: ${e} ${Ef(e)}`,textWaiting:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445, \u043A\u043E\u0433\u0434\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044F.`,textReady:`\u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439 \u043D\u0435 \u0447\u0438\u0442\u0430\u043B\u0441\u044F, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0437\u0434\u0435\u0441\u044C. \u0421\u043F\u0438\u0441\u043E\u043A \u0441\u043D\u043E\u0432\u0430 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u2014 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textFailed:`\u042D\u0442\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043D\u0435 \u0434\u043E\u0448\u043B\u0438 \u0434\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430. \u041E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435 \u0438\u0445 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0438\u0442\u0435.`,textReconnect:`\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0443\u0439\u0434\u0443\u0442 \u0441\u0430\u043C\u0438, \u043A\u043E\u0433\u0434\u0430 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u043D\u0451\u0442\u0441\u044F.`,listLabel:`\u041D\u0435\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F`,send:e=>`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C: ${e}`,discard:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C: ${e}`,sendShort:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,discardShort:`\u0423\u0434\u0430\u043B\u0438\u0442\u044C`},interrupted:{title:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0437\u0430\u043F\u0440\u043E\u0441 \u0431\u044B\u043B \u043F\u0440\u0435\u0440\u0432\u0430\u043D`,text:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u0448\u0451\u043B.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`},reportInitializing:{title:`\u041E\u0442\u0447\u0451\u0442 \u0435\u0449\u0451 \u0433\u043E\u0442\u043E\u0432\u0438\u0442\u0441\u044F`,text:`\u0414\u0430\u043D\u043D\u044B\u0435 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u0440\u0430\u0441\u0447\u0451\u0442\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0447\u0443\u0442\u044C \u043F\u043E\u0437\u0436\u0435.`,retry:`\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430`},readiness:{signInTitle:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C`,signInText:`\u041E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u043F\u043E\u043F\u0430\u043F \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0438 \u0432\u043E\u0439\u0434\u0438\u0442\u0435 \u0432 Progon.`,projectTitle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0435\u043A\u0442`,projectText:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u0441 \u0434\u0430\u043D\u043D\u044B\u043C\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0435\u043A\u0442\u0430.`},pageScan:{scanning:`\u0421\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B\u2026`,delivering:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F\u2026`,failedTitle:`\u042D\u0442\u0443 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043D\u0435\u043B\u044C\u0437\u044F \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C`,failed:{no_capturable_tab:`\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u044B\u0439 \u0438\u043B\u0438 \u043D\u0435\u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0439 \u0430\u0434\u0440\u0435\u0441 (chrome://, \u043C\u0430\u0433\u0430\u0437\u0438\u043D \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439, PDF).`,capture_failed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,capture_timeout:`\u0418\u0441\u0442\u0435\u043A\u043B\u043E \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,oversize_unrecoverable:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u0430\u044F \u0434\u043B\u044F \u0441\u043A\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F, \u0434\u0430\u0436\u0435 \u0441 \u0443\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435\u043C \u0434\u0435\u0442\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438.`}},history:{loadFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`}},connection:{reconnecting:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043F\u043E\u0442\u0435\u0440\u044F\u043D\u043E \u2014 \u043F\u0435\u0440\u0435\u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F\u2026`,restored:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u2014 \u0441\u043E\u0431\u044B\u0442\u0438\u044F \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u044B.`,failedTitle:`\u0421\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C`,failedHint:{"reload-page":`\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0434\u043B\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F.`,"check-network":`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0438\u0442\u044C\u0441\u044F. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u0435\u0442\u044C.`}},history:{title:`\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0447\u0430\u0442\u043E\u0432`,close:`\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E`,newChat:`\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442`,search:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432\u2026`,searchLabel:`\u041F\u043E\u0438\u0441\u043A \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyTitle:`\u041F\u043E\u043A\u0430 \u043D\u0435\u0442 \u0434\u0438\u0430\u043B\u043E\u0433\u043E\u0432`,emptyText:`\u041D\u0430\u0447\u043D\u0438\u0442\u0435 \u043D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442.`,noResults:e=>`\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043F\u043E \u0437\u0430\u043F\u0440\u043E\u0441\u0443 \u00AB${e}\u00BB`,noResultsText:`\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0437\u0430\u043F\u0440\u043E\u0441`,errorTitle:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433\u0438`,errorText:`\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,loadingMore:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026`,untitled:e=>`\u0414\u0438\u0430\u043B\u043E\u0433 \u043E\u0442 ${e}`,delete:e=>`\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433 \u00AB${e}\u00BB`,deleteFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043B\u043E\u0433. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`,reportTag:`\u041E\u0442\u0447\u0451\u0442`,groups:{today:`\u0421\u0435\u0433\u043E\u0434\u043D\u044F`,yesterday:`\u0412\u0447\u0435\u0440\u0430`,previous7Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 7 \u0434\u043D\u0435\u0439`,previous30Days:`\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 30 \u0434\u043D\u0435\u0439`,older:`\u0421\u0442\u0430\u0440\u044B\u0435`}},modelPicker:{selectModel:`\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C`,loading:`\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043C\u043E\u0434\u0435\u043B\u0438\u2026`,currentlySelected:`\u0412\u044B\u0431\u0440\u0430\u043D\u0430`,footerNote:`\u0412\u044B\u0431\u043E\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043E \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F.`,manageKeys:`\u041A\u043B\u044E\u0447\u0438`,upsell:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447 \u2014 \u043D\u0430 \u0442\u0430\u0440\u0438\u0444\u0435 Enterprise`,upgrade:`\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0442\u0430\u0440\u0438\u0444`,rejected:`\u042D\u0442\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430 \u043D\u0430 \u0432\u0430\u0448\u0435\u043C \u0442\u0430\u0440\u0438\u0444\u0435 \u2014 \u0432\u044B\u0431\u0440\u0430\u043D\u0430 \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.`,disabledKeyInvalid:`\u041A\u043B\u044E\u0447 \u043D\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043B\u0435\u043D \u2014 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0432 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430\u0445`,disabledNoKey:`\u041B\u0438\u0447\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D`,disabledSuffixA11y:`\u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,tier:{fastest:`\u0421\u0430\u043C\u0430\u044F \u0431\u044B\u0441\u0442\u0440\u0430\u044F`,balanced:`\u0414\u043B\u044F \u043F\u043E\u0432\u0441\u0435\u0434\u043D\u0435\u0432\u043D\u044B\u0445 \u0437\u0430\u0434\u0430\u0447`,smartest:`\u0421\u0430\u043C\u0430\u044F \u0443\u043C\u043D\u0430\u044F`},byok:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`},byokHeader:{personal:`\u0421\u0432\u043E\u0439 \u043A\u043B\u044E\u0447`,company:`\u041A\u043B\u044E\u0447 \u043A\u043E\u043C\u043F\u0430\u043D\u0438\u0438`}},confirmation:{regionLabel:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435`,confirmAll:e=>`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0441\u0435 (${e})`,confirm:`\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C`,reject:`\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C`,queuePosition:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 {index} \u0438\u0437 {total}`,warningBadge:`\u0422\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F`,unrecognizedTool:`\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E`,grant:{no:`\u041D\u0435\u0442, \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043E\u0442\u0447\u0451\u0442`,yes:`\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A\u0435`}},runWait:{title:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439`,status:{waiting:`\u0416\u0434\u0451\u043C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F`,fired:`\u0418\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u044B`,running:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E \u0440\u0430\u0437\u0431\u043E\u0440`,done:`\u0420\u0430\u0437\u0431\u043E\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D`,cancelled:`\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`},subject:{scenario_run:`\u041F\u0440\u043E\u0433\u043E\u043D \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u044F`,agent_job:`\u0417\u0430\u0434\u0430\u043D\u0438\u0435 \u0430\u0433\u0435\u043D\u0442\u0430`,atlas_run:`\u041E\u0431\u0445\u043E\u0434 Atlas`,ai_run:`AI-\u043F\u0440\u043E\u0433\u043E\u043D`,workflow:`\u0420\u043E\u0439`,scenario_launch:`\u0417\u0430\u043F\u0443\u0441\u043A \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432`},id:e=>`ID: ${e}`,stopWaiting:`\u041D\u0435 \u0436\u0434\u0430\u0442\u044C`,stopWaitingFailed:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u0435. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0451 \u0440\u0430\u0437.`},questions:{pendingTitle:`\u041D\u0443\u0436\u043D\u043E \u0443\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,progress:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E: {resolved} \u0438\u0437 {total}`,progressLabel:`\u0412\u043E\u043F\u0440\u043E\u0441\u044B`,progressSegmentAnswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043E\u0442\u0432\u0435\u0447\u0435\u043D`,progressSegmentUnanswered:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u0431\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0430`,progressSegmentSkipped:`\u0412\u043E\u043F\u0440\u043E\u0441 {index}: \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D`,questionIndex:`\u0412\u043E\u043F\u0440\u043E\u0441 {index} \u0438\u0437 {total}`,previousQuestion:`\u041D\u0430\u0437\u0430\u0434`,nextQuestion:`\u0414\u0430\u043B\u0435\u0435`,showAllQuestions:`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B`,oneQuestionAtATime:`\u041F\u043E \u043E\u0434\u043D\u043E\u043C\u0443 \u0432\u043E\u043F\u0440\u043E\u0441\u0443`,recommended:`\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F`,customChoice:`\u0421\u0432\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442`,customAnswerLabel:`\u0421\u0432\u043E\u0439 \u043E\u0442\u0432\u0435\u0442`,customAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u2026`,textAnswerLabel:`\u041E\u0442\u0432\u0435\u0442`,textAnswerPlaceholder:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442\u2026`,skipQuestion:`\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C`,restoreQuestion:`\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C`,validationSingle:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0434\u0438\u043D \u0432\u0430\u0440\u0438\u0430\u043D\u0442.`,validationMultiple:`\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u0438\u043D \u043F\u0443\u043D\u043A\u0442.`,validationText:`\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043E\u0442\u0432\u0435\u0442.`,cancelAll:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0451`,submitAnswers:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C`,sending:`\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430`,loading:`\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0432\u043E\u043F\u0440\u043E\u0441\u043E\u0432`,retry:`\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C`,refresh:`\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C`,retryErrorBadge:`\u041D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E`,nonretryableBadge:`\u0421\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430`,nonretryableDescription:`\u0427\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C, \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u044D\u0442\u0443 \u0431\u0435\u0441\u0435\u0434\u0443 \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043D\u043D\u043E\u043C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0435 (HTTPS).`,staleBadge:`\u0423\u0436\u0435 \u043E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,unauthorizedBadge:`\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430`,unauthorizedDescription:`\u0412\u043E\u0439\u0434\u0438\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 \u0432\u0435\u0440\u043D\u0438\u0442\u0435\u0441\u044C \u0432 \u043F\u0440\u043E\u0435\u043A\u0442, \u0433\u0434\u0435 \u043D\u0430\u0447\u0430\u043B\u0441\u044F \u044D\u0442\u043E\u0442 \u0434\u0438\u0430\u043B\u043E\u0433.`,unavailableBadge:`\u041D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,answeredTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,answeredBadge:`\u041E\u0442\u0432\u0435\u0447\u0435\u043D\u043E`,continuationPendingBadge:`\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438`,continuationRunningBadge:`\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0435\u043D\u0438\u0435`,continuationFailedBadge:`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C`,skippedBadge:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,skippedAnswer:`\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E`,cancelledTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,cancelledBadge:`\u041E\u0442\u043C\u0435\u043D\u0435\u043D\u043E`,supersededTitle:`\u0423\u0442\u043E\u0447\u043D\u0435\u043D\u0438\u0435`,supersededBadge:`\u0417\u0430\u043C\u0435\u043D\u0435\u043D\u043E`,answerSeparator:`, `,unavailableAnswer:`\u041E\u0442\u0432\u0435\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D`,arrived:e=>`\u041D\u043E\u0432\u044B\u0439 \u0432\u043E\u043F\u0440\u043E\u0441, \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u2014 \u043D\u0430\u0434 \u043F\u043E\u043B\u0435\u043C \u0432\u0432\u043E\u0434\u0430: ${e}`},agentQuestions:{openRun:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u043E\u0433\u043E\u043D`,assumptionLabel:`\u041F\u043E\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430 \u043D\u0435\u0442, \u0430\u0433\u0435\u043D\u0442 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u0435\u0442 \u0442\u0430\u043A`,decline:`\u041D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0442\u044C`,viaAssistant:`\u041F\u0435\u0440\u0435\u0434\u0430\u043D\u043E \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u043E\u043C \u0441 \u0432\u0430\u0448\u0438\u0445 \u0441\u043B\u043E\u0432`,askerEnded:`\u0410\u0433\u0435\u043D\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043B \u0440\u0430\u0431\u043E\u0442\u0443, \u043E\u0442\u0432\u0435\u0442 \u043D\u0435 \u043D\u0443\u0436\u0435\u043D`,leadWaits:`\u0432\u0435\u0434\u0443\u0449\u0438\u0439 \u0436\u0434\u0451\u0442`,workersContinue:`\u0420\u0430\u0431\u043E\u0447\u0438\u0435 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E\u0442`,agentsIdle:`\u0410\u0433\u0435\u043D\u0442\u044B \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u0440\u0430\u0431\u043E\u0442\u0430\u044E\u0442`},context:{report:{label:`\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u043E\u0442\u0447\u0451\u0442\u0430`,title:e=>`\u041E\u0442\u0447\u0451\u0442: ${e}`,note:`\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442 \u0432\u0438\u0434\u0438\u0442 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u043E\u0442\u0447\u0451\u0442 \u0438 \u0431\u0435\u0440\u0451\u0442 \u0446\u0438\u0444\u0440\u044B \u0438\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043D\u043D\u044B\u0445, \u0447\u0442\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430.`,nameUnavailable:`\u0438\u043C\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E`,entity:{scenario:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0439`,page:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,feature:`\u0432\u044B\u0431\u0440\u0430\u043D\u043D\u0430\u044F \u0444\u0438\u0447\u0430`},view:{overview:`\u041E\u0431\u0437\u043E\u0440`,stability:`\u0421\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E\u0441\u0442\u044C`,"weak-spots":`\u0421\u043B\u0430\u0431\u044B\u0435 \u0437\u043E\u043D\u044B`,"bug-hotspots":`\u0413\u043E\u0440\u044F\u0447\u0438\u0435 \u0442\u043E\u0447\u043A\u0438`},window:{"7d":`7 \u0434\u043D\u0435\u0439`,"14d":`14 \u0434\u043D\u0435\u0439`,"30d":`30 \u0434\u043D\u0435\u0439`,"90d":`90 \u0434\u043D\u0435\u0439`},lastRuns:(e,t)=>`\u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 ${e} \u043F\u0440\u043E\u0433\u043E\u043D\u043E\u0432 (\u0434\u043E ${t} \u0434\u043D\u0435\u0439)`,status:{consistently_failing:`\u043F\u043E\u0441\u0442\u043E\u044F\u043D\u043D\u043E \u043F\u0430\u0434\u0430\u0435\u0442`,flaky:`flaky`,monitoring:`\u043D\u0430\u0431\u043B\u044E\u0434\u0435\u043D\u0438\u0435`,insufficient_history:`\u043C\u0430\u043B\u043E \u0438\u0441\u0442\u043E\u0440\u0438\u0438`,stable:`\u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u043E`},prompts:{overviewWeakSpots:`\u041A\u0430\u043A\u0438\u0435 \u0441\u043B\u0430\u0431\u044B\u0435 \u043C\u0435\u0441\u0442\u0430 \u0443 \u043F\u0440\u043E\u0435\u043A\u0442\u0430?`,overviewChanged:e=>`\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \u0437\u0430 ${e}?`,overviewWhereToLook:`\u041A\u0443\u0434\u0430 \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityWhyScenario:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u043D\u0435\u0441\u0442\u0430\u0431\u0438\u043B\u0435\u043D?`,stabilityWhatToFix:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0447\u0438\u043D\u0438\u0442\u044C \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,stabilityCauses:`\u0420\u0430\u0437\u0431\u0435\u0439 \u043F\u0430\u0434\u0435\u043D\u0438\u044F \u043F\u043E \u043F\u0440\u0438\u0447\u0438\u043D\u0430\u043C`,weakSpotsWhatToCover:`\u0427\u0442\u043E \u043F\u043E\u043A\u0440\u044B\u0442\u044C \u0442\u0435\u0441\u0442\u0430\u043C\u0438 \u0432 \u043F\u0435\u0440\u0432\u0443\u044E \u043E\u0447\u0435\u0440\u0435\u0434\u044C?`,weakSpotsWhyEntity:e=>`\u041F\u043E\u0447\u0435\u043C\u0443 \u00AB${e}\u00BB \u0432 \u0441\u043B\u0430\u0431\u044B\u0445 \u0437\u043E\u043D\u0430\u0445?`,bugHotspotsWhere:`\u0413\u0434\u0435 \u0441\u043A\u0430\u043F\u043B\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u0431\u0430\u0433\u0438?`,bugHotspotsStale:`\u041A\u0430\u043A\u0438\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0441 \u0431\u0430\u0433\u0430\u043C\u0438 \u0434\u0430\u0432\u043D\u043E \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0438\u0441\u044C?`}}}},errors:Tf,attachments:Ud},Z=He(),kf={ru:Of,en:Vd},Af=(0,B.createContext)(null);function jf({locale:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Af.Provider,{value:e,children:t})}function Q(){let e=(0,B.useContext)(Af);if(e===null)throw Error(`useChatLocale: no <ChatLocaleProvider> above this chat component`);return e}function $(){return kf[Q()]}var Mf=1e3,Nf=1e6;function Pf(e,t){return new Intl.NumberFormat(t,{maximumFractionDigits:1}).format(e)}function Ff(e,t,n){return e>=Nf?`${Pf(e/Nf,t)} ${n.mb}`:e>=Mf?`${Math.round(e/Mf)} ${n.kb}`:`${e} ${n.b}`}function If(e,t,n){let r=Ff(e.byteSize,t,n.units);if(e.mediaType===`application/pdf`){if(e.pageCount===null)throw Error(`Attachment ${e.id}: an application/pdf without its page count`);return n.facts.pdf(e.pageCount,r)}if(Hn(e.mediaType)){if(e.image===null)throw Error(`Attachment ${e.id}: an ${e.mediaType} without its size`);return n.facts.image(e.image.width,e.image.height,r)}return n.facts.text(r)}function Lf(e){let t=e.lastIndexOf(`.`);return t<=0?{base:e,ext:``}:{base:e.slice(0,t),ext:e.slice(t)}}function Rf(e,t){let{store:n}=Hf(),{id:r,mediaType:i}=e,a=(0,B.useSyncExternalStore)(n.subscribe,()=>n.get(r),()=>n.get(r)),o=(0,B.useCallback)(()=>n.load({id:r,mediaType:i}),[n,r,i]),s=a.status===`idle`;return(0,B.useEffect)(()=>{t&&s&&o()},[t,s,o]),{content:a,load:o}}var zf=`button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])`;function Bf({images:e,index:t,onIndex:n,onClose:r}){let i=$().attachments,a=Q(),o=(0,B.useRef)(null),s=(0,B.useRef)(null),c=e[t];if(c===void 0)throw Error(`AttachmentViewer: no image at ${t} of ${e.length}`);let{content:l}=Rf(c,!0),u=e.length>1;(0,B.useEffect)(()=>{var e;(e=s.current)==null||e.focus({preventScroll:!0})},[]),(0,B.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),r())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]);let d=r=>n((t+r+e.length)%e.length);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:o,className:`qa-ai-chat-viewer`,role:`dialog`,"aria-modal":`true`,"aria-label":i.viewer.label(c.fileName),"data-testid":`ai-chat-attachment-viewer`,onKeyDown:e=>{if(u&&e.key===`ArrowLeft`){e.preventDefault(),d(-1);return}if(u&&e.key===`ArrowRight`){e.preventDefault(),d(1);return}if(e.key!==`Tab`||o.current===null)return;let t=Array.from(o.current.querySelectorAll(zf)),n=t[0],r=t[t.length-1];n!==void 0&&r!==void 0&&(e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus()))},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-bar`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-title`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:c.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:If(c,a,i)})]}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:i.viewer.openInTab,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,disabled:l.status!==`ready`,onClick:()=>{l.status===`ready`&&window.open(l.url,`_blank`,`noopener`)},children:/* @__PURE__ */ (0,Z.jsx)(kn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:i.viewer.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:s,type:`button`,className:`qa-ai-chat-ib`,onClick:r,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-viewer-stage`,children:l.status===`ready`?/* @__PURE__ */ (0,Z.jsx)(`img`,{src:l.url,alt:c.fileName},c.id):l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-viewer-failed`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(Rr,{"aria-hidden":`true`}),i.viewer.failed]}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-viewer-loading`,role:`img`,"aria-busy":`true`,"aria-label":i.viewer.loading(c.fileName)})}),u&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-viewer-nav`,children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:i.viewer.previous,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(-1),children:/* @__PURE__ */ (0,Z.jsx)(Bn,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-live":`polite`,children:i.viewer.position(t+1,e.length)}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:i.viewer.next,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:()=>d(1),children:/* @__PURE__ */ (0,Z.jsx)(xe,{"aria-hidden":`true`})})})]})]})}var Vf=(0,B.createContext)(null);function Hf(){let e=(0,B.useContext)(Vf);if(e===null)throw Error(`useChatAttachments: no <ChatAttachmentsProvider> above this chat component`);return e}function Uf({http:e,logger:t,conversationId:n,children:r}){let[i]=(0,B.useState)(()=>Ju({http:e,logger:t})),[a,o]=(0,B.useState)(null),s=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>i.clear(),[i,n]);let c=(0,B.useCallback)((e,t,r)=>{s.current=r,o({conversationId:n,images:e,index:t})},[n]),l=(0,B.useCallback)(()=>{o(null);let e=s.current;s.current=null,e!==null&&e.isConnected&&e.focus({preventScroll:!0})},[]),u=(0,B.useMemo)(()=>({store:i,openViewer:c}),[i,c]);return/* @__PURE__ */ (0,Z.jsxs)(Vf.Provider,{value:u,children:[r,a!==null&&a.conversationId===n&&/* @__PURE__ */ (0,Z.jsx)(Bf,{images:a.images,index:a.index,onIndex:e=>o({...a,index:e}),onClose:l})]})}function Wf(e,t,n){let r=/* @__PURE__ */ new Map;for(let e of t)r.set(e.id,e);for(let t of e)if(t.attachments!==void 0)for(let e of t.attachments)r.set(e.id,e);let i=0;for(let e of r.values())Ln(e,n.attachments).ok||(i+=1);return i}function Gf({messages:e,filesBefore:t,model:n,onPickModel:r}){let i=$().attachments.conversation;if(n===null)return null;let a=Wf(e,t,n);return a===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-files-warning`,role:`status`,"data-testid":`ai-chat-files-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[i.text(n.name,a),r===null?i.pick:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-files-warning-pick`,onClick:r,children:i.pick})]})]})}function Kf(e,t){if(e===null)return null;for(let n of e.groups){let e=n.models.find(e=>e.id===t);if(e!==void 0)return e}return null}function qf(e,t,n,r){let{reason:i}=r.unsent,a=e.factValue,o=e=>Ff(e,n,r.units),s=e=>Pf(e,n);if(e.fact===`context_window`)return i.contextWindow;if(a===null)return i.unknownSize;switch(e.fact){case`media_type`:throw Error(`factReason: media_type has no fact reason`);case`file_bytes`:return i.fileBytes(o(a));case`image_bytes`:return i.imageBytes(o(Math.floor(a*3/4)));case`request_bytes`:return i.requestBytes(o(a));case`files_bytes`:return i.filesBytes(o(a));case`image_edge`:return i.imageEdge(s(a));case`image_patches`:{let e=t===null||t.attachments===null?null:t.attachments.facts.imageMaxPatches;return e===null?i.unknownSize:i.imagePatches(s(Math.floor(a*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(s(a));case`images_count`:return i.imagesCount(s(a));case`many_images_edge`:return i.manyImagesEdge(s(a))}}function Jf(e){let{refusal:t,files:n,models:r,locale:i,copy:a,logger:o}=e;switch(t.errorCode){case Fn.notFound:return{sentence:a.unsent.notFound,resendable:!1};case Fn.alreadySent:return{sentence:a.unsent.alreadySent,resendable:!1};case Fn.unsupportedByModel:{let e=In.safeParse(t.params);if(!e.success)return o.error(`chat send refusal: unsupported_by_model params failed validation`,{issues:e.error.issues.map(e=>e.message)}),null;let s=e.data,c=Kf(r,s.modelId),l=c===null?null:c.name;if(s.fact!==`media_type`)return{sentence:a.unsent.unsupported(l,qf(s,c,i,a)),resendable:!0};if(c!==null&&c.attachments===null)return{sentence:a.unsent.noFiles(l),resendable:!0};let u=new Set(s.attachmentIds),d=[...new Set(n.filter(e=>u.has(e.id)).map(e=>a.typeLabel[e.mediaType]))];return d.length===0?(o.error(`chat send refusal: unsupported_by_model names no file of the turn`,{attachmentIds:s.attachmentIds}),null):{sentence:a.unsent.types(l,d.join(`, `)),resendable:!0}}default:return null}}function Yf(e){return{attachments:e.attachments,refusal:e.release===`manual`?e.refusal:null}}function Xf(e){let{models:t,locale:n,copy:r,logger:i}=e;return e=>{let{attachments:a,refusal:o}=Yf(e);return{label:a.length===0?null:r.unsent.files(a.length),refusal:o===null?null:Jf({refusal:o,files:a,models:t,locale:n,copy:r,logger:i})}}}var Zf=(0,B.createContext)(null);function Qf({value:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(Zf.Provider,{value:e,children:t})}function $f(){let e=(0,B.useContext)(Zf);if(e===null)throw Error(`useChatCardEnvironment: no <ChatCardEnvironmentProvider> above this card`);return e}var ep=Ft(L(),L()),tp=et(`target`,[z({target:zt(`workbench`),routeKey:L().min(1),params:ep.optional(),query:ep.optional()}),z({target:zt(`detail`),routeKey:L().min(1),params:ep.optional(),query:ep.optional()}),z({target:zt(`list`),routeKey:L().min(1),listFilter:Ft(L(),L().optional()),query:ep.optional()}),z({target:zt(`none`)})]);function np(e){if(e===void 0)return``;let t=Object.entries(e).filter(e=>e[1]!==void 0&&e[1]!==``);return t.length===0?``:`?${t.map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join(`&`)}`}function rp(e){if(e===void 0)return``;let t=Object.values(e).filter(e=>e!==``);return t.length===0?``:`/${t.map(e=>encodeURIComponent(e)).join(`/`)}`}function ip(e){if(!Number.isInteger(e)||e<=0)throw Error(`entity-route: project number must be a positive integer, got ${String(e)}`);return`${Ie}/${String(e)}`}function ap(e,t){let n=ip(e);switch(t.target){case`none`:return null;case`workbench`:return`${n}/${t.routeKey}${np(t.query)}`;case`detail`:return`${n}/${t.routeKey}${rp(t.params)}${np(t.query)}`;case`list`:return`${n}/${t.routeKey}${np(t.listFilter)}`}}var op=`{projectRef}`;function sp(e,t){return e.startsWith(`/project/${op}/`)?`${ip(t)}${e.slice(`${Ie}/${op}`.length)}`:null}var cp=[`scenario`,`bug`,`checklist-item`,`checklist`,`saved-request`,`collection`,`shared-step`,`run`,`test-run`,`page`,`test-plan`,`environment`,`variable`,`incident`,`atlas-fact`,`api-folder`,`api-endpoint`,`section`];function lp(e){return cp.includes(e)}var up={scenario:{tone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(Hr,{size:16})},bug:{tone:`error`,icon:/* @__PURE__ */ (0,Z.jsx)(br,{size:16})},"checklist-item":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:16})},checklist:{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:16})},"saved-request":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Ce,{size:16})},collection:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:16})},"shared-step":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(dn,{size:16})},run:{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:16})},"test-run":{tone:`success`,icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:16})},page:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})},"test-plan":{tone:`warning`,icon:/* @__PURE__ */ (0,Z.jsx)(fn,{size:16})},environment:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:16})},variable:{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(ln,{size:16})},incident:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(x,{size:16})},"atlas-fact":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Gr,{size:16})},"api-folder":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:16})},"api-endpoint":{tone:`info`,icon:/* @__PURE__ */ (0,Z.jsx)(ii,{size:16})},section:{tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:16})}},dp={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16})};function fp(e){return lp(e)?up[e]:dp}function pp(e,t){return lp(e)?t.entityType[e]:e}var mp=(0,B.createContext)(`open`);function hp({mode:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(mp.Provider,{value:e,children:t})}function gp(){return(0,B.useContext)(mp)}var _p=(0,B.createContext)(()=>void 0);function vp({hold:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(_p.Provider,{value:e,children:t})}function yp(){return(0,B.useContext)(_p)}var bp=(0,B.createContext)(()=>void 0);function xp({reveal:e,children:t}){return/* @__PURE__ */ (0,Z.jsx)(bp.Provider,{value:e,children:t})}function Sp(){return(0,B.useContext)(bp)}function Cp(e,t){return[`qa-chat-card`,e===void 0||e===`neutral`?void 0:`qa-chat-card--${e}`,t].filter(Boolean).join(` `)}function wp({props:e,fold:t}){let{icon:n,tileTone:r=`primary`,meta:i,tone:a,children:o,sections:s,note:c,footer:l,className:u,role:d,data:f}=e,[p,m]=(0,B.useState)(!1),[h,g]=(0,B.useState)(0),[_,v]=(0,B.useState)(!1),y=yp(),b=Sp(),x=(0,B.useId)(),S=(0,B.useRef)(null),C=(0,B.useRef)(null),{handle:w,linked:T=!1,onLinkChange:E}=t;return(0,B.useImperativeHandle)(w,()=>({reveal(){y(),m(!0),v(!1),g(e=>e+1)}}),[y]),(0,B.useEffect)(()=>{var e;if(h===0)return;let t=S.current;t!==null&&b(t),(e=C.current)==null||e.focus({preventScroll:!0}),v(!0)},[h,b]),/* @__PURE__ */ (0,Z.jsxs)(`article`,{ref:S,className:[Cp(a,u),`qa-chat-card--fold`,p&&`qa-chat-card--fold-open`,T&&`qa-chat-card--linked`,_&&`qa-chat-card--revealed`].filter(Boolean).join(` `),role:d,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],"data-card-fold":p?`open`:`folded`,...E===void 0?{}:{onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onFocus:()=>E(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||E(!1)}},onAnimationEnd:e=>{e.target===e.currentTarget&&v(!1)},...f,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${r}`,"aria-hidden":`true`,children:n}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:C,type:`button`,className:`qa-chat-card__fold-toggle`,"aria-expanded":p,"aria-controls":x,onClick:()=>{y(),m(e=>!e)},children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__fold-facts`,children:t.facts})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__fold-side`,children:[i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:i}),t.quickActions,/* @__PURE__ */ (0,Z.jsx)(Be,{className:`qa-chat-card__fold-chevron`,size:16,"aria-hidden":`true`})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:x,className:`qa-chat-card__fold-region`,hidden:!p,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__body`,children:o}),s,c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:c}),l]})]})}function Tp(e){let t=gp();return e.bare!==!0&&e.fold!==void 0&&(t===`folded`||t===`open-until-decided`&&e.fold.decided===!0)?/* @__PURE__ */ (0,Z.jsx)(wp,{props:e,fold:e.fold}):/* @__PURE__ */ (0,Z.jsx)(Ep,{...e})}function Ep(e){let{icon:t,tileTone:n=`primary`,title:r,caption:i,meta:a,tone:o=`neutral`,children:s,sections:c,note:l,footer:u,className:d,bare:f=!1,role:p,data:m}=e,h=Cp(o,d);return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:h,role:p,"aria-label":e[`aria-label`],"aria-labelledby":e[`aria-labelledby`],"aria-busy":e[`aria-busy`],...m,children:[f?s:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${n}`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__title`,children:r}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-chat-card__caption`,children:i})]}),a!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__meta`,children:a})]}),s]}),c,l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__note`,children:l}),u]})}function Dp(e){let{tone:t=`success`,dot:n=!0,children:r,role:i,className:a}=e,o=[`qa-chat-card__pill`,`qa-chat-card__pill--${t}`,a].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:o,role:i,"aria-live":e[`aria-live`],children:[n&&/* @__PURE__ */ (0,Z.jsx)(`i`,{className:`qa-chat-card__pill-dot`,"aria-hidden":`true`}),r]})}function Op({children:e,missing:t=!1,ref:n}){return/* @__PURE__ */ (0,Z.jsx)(`h4`,{ref:n,className:`qa-chat-card__subject${t?` qa-chat-card__subject--missing`:``}`,children:e})}function kp({children:e,clamp:t=!1}){return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__lead${t?` qa-chat-card__lead--clamp`:``}`,children:e})}function Ap(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__rows`,"aria-label":e[`aria-label`],children:e.children})}function jp({label:e,value:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__row`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-key`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__row-value`,children:t})]})}function Mp(e){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-chat-card__list`,"aria-label":e[`aria-label`],children:e.children})}function Np({icon:e,tileTone:t=`primary`,name:n,note:r,noteWraps:i=!1,trailing:a}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-chat-card__list-item${i?` qa-chat-card__list-item--wrap`:``}`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${t}`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-chat-card__list-grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-name`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__list-note`,children:r})]}),a]})}function Pp({summary:e,children:t,defaultOpen:n=!1,className:r}){return/* @__PURE__ */ (0,Z.jsxs)(`details`,{className:[`qa-chat-card__disclosure`,r].filter(Boolean).join(` `),open:n?!0:void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`summary`,{className:`qa-chat-card__disclosure-summary`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Be,{size:14})}),e]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__disclosure-body`,children:t})]})}function Fp({children:e,className:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:[`qa-chat-card__actions`,t].filter(Boolean).join(` `),children:e})}function Ip({icon:e,title:t,text:n,actions:r}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-chat-card__empty`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__empty-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{className:`qa-chat-card__empty-title`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-chat-card__empty-text`,children:n}),r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__empty-actions`,children:r})]})}var Lp=`qa-card-kit`;function Rp({icon:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__note-line`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__note-icon`,"aria-hidden":`true`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function zp({tip:e,children:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(Re,{content:e,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-card-kit__tipped`,n),tabIndex:0,children:t})})}function Bp({value:e,base:t}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-card-kit__v-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:t})]})}function Vp({path:e,label:t,accessibleName:n,emphasis:r=`primary`}){let{navigation:i}=$f(),a=$().cards;return/* @__PURE__ */ (0,Z.jsx)(I,{variant:r,size:`sm`,icon:i.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(kn,{size:14}):void 0,"aria-label":`${n}${i.opensInNewTab?a.common.newTabSuffix:``}`,onClick:()=>i.openPath(e),children:t})}function Hp({label:e,icon:t,onClick:n,disabledReason:r}){return r===void 0?/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:e,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,onClick:n,children:t})}):/* @__PURE__ */ (0,Z.jsx)(fe,{disabled:!0,reason:r,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-chat-card__quick`,"aria-label":e,children:t})})}function Up({size:e}){let{navigation:t}=$f();return t.opensInNewTab?/* @__PURE__ */ (0,Z.jsx)(kn,{size:e}):/* @__PURE__ */ (0,Z.jsx)(_n,{size:e})}function Wp({title:e,body:t,family:n,resultKind:r}){let{logger:i}=$f();return(0,B.useEffect)(()=>{i.warn(`chat result not supported by its card`,{card:n,resultKind:r})},[i,n,r]),/* @__PURE__ */ (0,Z.jsx)(Tp,{className:P(Lp,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)($r,{size:16}),tileTone:`muted`,title:e,"aria-label":e,children:/* @__PURE__ */ (0,Z.jsx)(kp,{children:t})})}function Gp({label:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:e}),t]})}function Kp(e){return`path`in e}function qp({row:e}){let{navigation:t}=$f(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tile qa-chat-card__tile--${e.tile.tone} qa-ref__tile`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-ref__name`,e.nameMissing&&`qa-ref__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ref__note`,children:[e.note,Kp(r)&&r.destination!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__dest`,children:` \u00B7 ${r.destination}`})]})]})]});if(!Kp(r))return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref`,role:`note`,"aria-label":r.ariaLabel,children:[i,/* @__PURE__ */ (0,Z.jsx)(Re,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__pill`,tabIndex:0,children:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:r.pill})})})]});let a=`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ref qa-ref--clickable`,children:[i,/* @__PURE__ */ (0,Z.jsx)(Re,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(I,{variant:`secondary`,size:`sm`,className:`qa-ref__open`,icon:/* @__PURE__ */ (0,Z.jsx)(Up,{size:14}),"aria-label":a,onClick:()=>t.openPath(r.path),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label`,children:n.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ref__open-label-wide`,children:r.action})]})})]})}function Jp({groupAria:e,rows:t}){return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-refs`,role:`group`,"aria-label":e,children:t.map(e=>/* @__PURE__ */ (0,Z.jsx)(qp,{row:e},e.key))})}function Yp({title:e,groupAria:t,icon:n,rows:r}){return/* @__PURE__ */ (0,Z.jsx)(Tp,{className:`${Lp} qa-ref-card`,icon:n,tileTone:`info`,title:e,"aria-label":e,meta:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:r.length}),children:/* @__PURE__ */ (0,Z.jsx)(Jp,{groupAria:t,rows:r})})}var Xp=z({type:L(),id:L(),projectId:L(),label:L(),open:tp}),Zp=yt(Xp),Qp=`map`;function $p(e){switch(e.target){case`workbench`:return`workbench`;case`detail`:return e.routeKey===Qp?`map`:`run`;case`list`:return`list`}}function em(e){let t=$().cards,{project:n}=$f();return e.map((e,r)=>{let i=e.label.trim().length===0,a=i?t.common.missingName:e.label,o={key:`${e.type}:${e.id}:${String(r)}`,tile:fp(e.type),name:a,nameMissing:i,note:pp(e.type,t.common)},s=n===null||e.projectId!==n.id?null:ap(n.number,e.open);if(e.open.target===`none`||s===null)return{...o,open:{pill:t.common.noOpenTarget,hint:t.common.noOpenTargetHint,ariaLabel:t.references.noOpenAria(a)}};let c=$p(e.open);return{...o,open:{path:s,action:t.references.action[c],destination:t.references.destination[c]}}})}function tm(e){let t=/* @__PURE__ */ new Set;return e.filter(e=>{let n=`${e.projectId}:${e.type}:${e.id}`;return!t.has(n)&&(t.add(n),!0)})}function nm({row:e}){let{navigation:t}=$f(),n=$().cards.common,{open:r}=e,i=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__icon`,"aria-hidden":`true`,children:e.tile.icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-ai-chat-link__name`,e.nameMissing&&`qa-ai-chat-link__name--missing`),children:e.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-link__type`,children:e.note})]});return Kp(r)?/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(Re,{content:r.action,relationship:`none`,children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-link`,"aria-label":`${r.action}: ${e.name}${t.opensInNewTab?n.newTabSuffix:``}`,onClick:()=>t.openPath(r.path),children:[i,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link__open`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Up,{size:12})})]})})}):/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsx)(Re,{content:r.hint,closeOnPress:!1,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-link qa-ai-chat-link--inert`,role:`note`,tabIndex:0,"aria-label":r.ariaLabel,children:i})})})}function rm({references:e}){let t=$().cards.references,n=em(tm(e));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-links`,"data-testid":`ai-chat-references`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-links__label`,"aria-hidden":`true`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-links__list`,"aria-label":t.groupAria,children:n.map(e=>/* @__PURE__ */ (0,Z.jsx)(nm,{row:e},e.key))})]})}function im({entries:e}){let t=$().cards.references,n=e.flatMap(e=>e.outcome.status===`accepted`?[...e.outcome.result]:[]),r=e.flatMap((e,t)=>e.outcome.status===`rejected`?[{key:String(t),raw:e.outcome.raw}]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(rm,{references:n}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`references`,resultKind:dm(e.raw)},e.key))]})}var am={id:`references`,schema:Zp,Card:im};function om(e){if(typeof e!=`object`||!e||!(`entities`in e))return;let t=e.entities;if(!Array.isArray(t)||!t.every(e=>typeof e==`object`&&!!e&&typeof e.projectId==`string`))return;let n=Zp.safeParse(t);return n.success?n.data:void 0}var sm=z({tool:L(),error:z({code:L(),message:L()})});function cm(e){let t;try{t=JSON.parse(e)}catch{return!1}return sm.safeParse(t).success}function lm(e){return typeof e==`string`?cm(e):typeof e==`object`&&!!e&&`success`in e&&e.success===!1}function um(e){return typeof e==`object`&&!!e&&`outcome`in e&&e.outcome===`unknown`}function dm(e){return typeof e==`object`&&e&&`resultKind`in e&&typeof e.resultKind==`string`?e.resultKind:null}var fm=z({projectId:xt(),changeSetId:xt(),changeSetItemId:xt(),environment:ot,variableName:L().regex(Tt),replacesExistingValue:dt(),description:L().nullable(),valueDeposit:z({byUserId:xt(),at:St()}).nullable()});z({value:L().min(1).max(ft)}).strict();var pm=z({changeSetItemId:xt(),valueReceived:zt(!0),expiresAt:St()}).strict(),mm=z({changeSetId:L().min(1),projectId:L().min(1),mode:vt([`auto_undo`,`preview_confirm`,`confirmed_apply`]).optional()}),hm=z({label:L(),openTarget:tp}),gm=z({type:L(),id:L(),label:L(),open:tp}),_m=z({kind:L(),label:L(),detail:L().optional(),entityRef:gm.optional()}),vm=z({kind:L(),label:L(),reason:L(),cta:hm.optional()}),ym=z({kind:L(),label:L(),detail:L().optional(),cta:hm.optional()}),bm=z({ru:L().min(1),en:L().min(1)}),xm=z({capture:vt([`awaiting`,`ready`,`unavailable`,`no_screen`]),pageUrl:rt.nullable(),severity:tt,finding:z({candidate:mt,open:tp})}),Sm=z({actionType:L(),actionTitle:bm,entityLabel:L(),field:L().optional(),before:L().optional(),after:L(),isSecret:dt().optional(),removesData:dt(),diffKind:vt([`replace`,`add`,`delete`,`move`]),bug:xm.optional()}),Cm=z({entityType:L().min(1),count:R().int().min(0)}),wm=z({intentSummary:L(),targetEnvironment:z({id:L().min(1),label:L()}).optional(),items:yt(Sm),cascade:yt(Cm).optional()}),Tm=z({changeSetId:L().min(1),expectedRevision:R().int().min(1),confirmEnabled:dt()}),Em=z({actionType:L(),actionTitle:bm,entityLabel:L(),status:vt([`applied`,`failed`,`skipped`]),errorCode:L().optional(),detail:L().optional()}),Dm=z({actionType:L(),actionTitle:bm,entityLabel:L(),before:L().optional(),after:L().optional(),itemStatus:vt([`applied`,`failed`,`batch_aborted`,`pending`]),errorCode:L().optional()}),Om=z({eligible:dt(),offeredUntil:L().nullable(),blockedReason:vt([`stale`,`expired`,`kill_switch`,`not_auto`,`already_undone`]).nullable(),undoneAt:L().nullable(),nonReversedSideEffects:yt(L())}),km=z({outcome:vt([`applied`,`partially_applied`,`failed`]),applied:yt(Em),failed:yt(Em),attempt:R().int().min(1),durationMs:R().int().nonnegative().optional(),retryAvailable:dt(),retryApprovalRequestId:xt().nullable().optional(),undo:Om.optional(),rows:yt(Dm).optional()}),Am=et(`reason`,[z({reason:zt(`launch_stopped`)}),z({reason:zt(`finding_filed`),bug:z({id:xt(),number:R().int().min(1),filedAt:St()})})]),jm=z({taskId:L().min(1),projectId:L().min(1),environmentId:L().min(1).optional(),state:L().min(1),revision:R().int().min(1),header:z({projectName:L(),scenarioLabel:L().optional(),environmentLabel:L().optional()}),evidence:yt(_m),proposal:wm.optional(),blockers:yt(vm),warnings:yt(ym),confirmation:Tm.optional(),applySummary:km.optional(),confirmDisabledReason:L().min(1).optional(),closure:Am.optional(),secretInputRequests:yt(fm)}),Mm=z({layout:zt(`parts_v1`),ordinal:R().int().positive(),entityKind:vt([`scenario`,`checklist`]),name:L().nullable(),copyName:L().nullable(),previewStatus:vt([`create`,`replace`,`copy`,`skip_existing`,`skip_error`,`blocked`,`pending_decision`]),outcome:z({status:vt([`pending`,`applied`,`failed`,`rolled_back`]),entityId:L().nullable(),name:L().nullable(),errorCode:L().nullable(),error:L().nullable()}).nullable()}),Nm=z({items:yt(Mm),total:R().int().nonnegative(),nextCursor:L().min(1).nullable()}),Pm=jm.omit({evidence:!0,proposal:!0,blockers:!0,warnings:!0,applySummary:!0}).extend({layout:zt(`parts_v1`),import:z({importId:L().min(1),webUrl:L().min(1),removesData:dt(),undoEligible:dt(),counts:z({total:R().int().nonnegative(),pending:R().int().nonnegative(),applied:R().int().nonnegative(),failed:R().int().nonnegative(),retryable:R().int().nonnegative(),rolledBack:R().int().nonnegative(),skipped:R().int().nonnegative()}),progress:z({approvalRequestId:xt(),attempt:R().int().positive(),attemptCounts:z({total:R().int().nonnegative(),done:R().int().nonnegative()})}).nullable()}),rowPage:Nm}),Fm=Lt([Pm,jm,z({taskSnapshot:jm}).transform(e=>e.taskSnapshot)]),Im=z({layout:zt(`parts_v1`),changeSet:z({id:L(),projectId:L(),revision:R().int().positive()}),itemPage:z({items:yt(z({import:z({row:Mm})})),total:R().int().nonnegative(),nextCursor:L().min(1).nullable()})}),Lm=z({taskId:L().min(1),state:L().min(1),revision:R().int()}),Rm=[`searching`,`search_results_shown`,`no_results`,`item_selected`,`inspecting`,`ambiguity_choose_target`],zm=[`proposal_pending`,`confirmation_required`],Bm=[`applying`,`applied`,`partial_failure`,`rejected_no_op`,`undone`,`superseded`,`closed`],Vm=/* @__PURE__ */ new Set([...Rm,...zm,...Bm]);function Hm(e){return Vm.has(e)}function Um(e){return Rm.includes(e)}var Wm=`confirmation_required`,Gm={searching:{marker:`proposed`,tone:`info`,live:!0},search_results_shown:{marker:`proposed`,tone:`info`,live:!1},no_results:{marker:`proposed`,tone:`info`,live:!1},item_selected:{marker:`proposed`,tone:`info`,live:!1},ambiguity_choose_target:{marker:`proposed`,tone:`info`,live:!1},inspecting:{marker:`inspecting`,tone:`info`,live:!0},proposal_pending:{marker:`awaiting`,tone:`primary`,live:!0},confirmation_required:{marker:`awaiting`,tone:`primary`,live:!0},applying:{marker:`applying`,tone:`warning`,live:!0},applied:{marker:`applied`,tone:`success`,live:!1},partial_failure:{marker:`partial`,tone:`error`,live:!1},rejected_no_op:{marker:`rejected`,tone:`neutral`,live:!1},undone:{marker:`undone`,tone:`neutral`,live:!1},superseded:{marker:`superseded`,tone:`neutral`,live:!1},closed:{marker:`closed`,tone:`neutral`,live:!1}};function Km(e,t){var n;let r=Gm[e];return e===`partial_failure`&&((n=t.applySummary)==null?void 0:n.outcome)===`failed`?{...r,marker:`failed`}:r}function qm(e){return e!==void 0&&e.length>0&&e.every(e=>e.removesData)}function Jm(e){return e!==void 0&&e.some(e=>e.removesData)}function Ym(e){return{deletes:Jm(e),destructive:qm(e)}}function Xm(e){return{variant:e.deletes?`danger-soft`:`primary`,label:e.destructive?`confirmDelete`:`confirm`}}function Zm(e){let t=e==null?void 0:e[0];return e===void 0||t===void 0?null:e.every(e=>e.actionType===t.actionType)?t.actionType:null}function Qm(e){return e.confirmDisabledReason!==void 0||e.blockers.length>0?!1:e.confirmation===void 0||e.confirmation.confirmEnabled}var $m=/* @__PURE__ */ new Set([`insert_scenario_step`,`append_scenario_step`]);function eh(e){let t=Zm(e);return qm(e)?`delete`:t===null?`layers`:t===`create_bug`?`bug`:t===`create_environment_variable`?`key`:$m.has(t)?`add`:`layers`}function th(e,t){switch(e){case`searching`:case`search_results_shown`:case`no_results`:return{kind:`search`,tone:`primary`};case`inspecting`:return{kind:`inspect`,tone:`primary`};case`item_selected`:case`ambiguity_choose_target`:return{kind:`target`,tone:`primary`};case`proposal_pending`:case`confirmation_required`:case`applying`:{var n;let e=eh((n=t.proposal)==null?void 0:n.items);return{kind:e,tone:e===`delete`?`error`:`primary`}}case`applied`:return{kind:`applied`,tone:`success`};case`partial_failure`:return{kind:`partial`,tone:`error`};case`rejected_no_op`:return{kind:`rejected`,tone:`muted`};case`undone`:return{kind:`undone`,tone:`muted`};case`superseded`:return{kind:`superseded`,tone:`muted`};case`closed`:var r;return{kind:eh((r=t.proposal)==null?void 0:r.items),tone:`muted`}}}function nh(e,t){var n;return e===`applied`?`success`:e===`partial_failure`||(e===`proposal_pending`||e===`confirmation_required`)&&Jm((n=t.proposal)==null?void 0:n.items)?`error`:`neutral`}function rh(e){return{scenarioLabel:e.header.scenarioLabel??null,projectName:e.header.projectName,environmentLabel:e.header.environmentLabel??null}}function ih(e){let t=e.split(/[_.]/).filter(e=>e.length>0);return t.length===0?e:t.map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var ah=[`step`,`scenario_run`,`api_folder`,`api_saved_request`,`checklist_item`,`checklist_item_step`,`test_run_result`,`scenario`,`environment`,`environment_variable`,`environment_preference`,`checklist`,`api_collection`],oh=[`stale_guard`,`secret_expired_or_consumed`,`assistant.change_set.batch_aborted`,`assistant.change_set.apply_unexpected_error`,`assistant.ai_write_disabled`,`variables.duplicate_name`],sh=[`test_plan_assignment_advance`],ch=[`still_composing`,`awaiting_secret_value`],lh=[`change_sets.undo_stale`,`change_sets.undo_expired`,`change_sets.undo_not_eligible`,`assistant.ai_write_disabled`];function uh(e,t){return e.includes(t)}var dh=At();function fh(e,t){if(e===void 0||!e.retryAvailable)return null;let n=e.retryApprovalRequestId;return n===null?{kind:`fresh`}:n===void 0?t===null?null:{kind:`known`,key:t}:{kind:`known`,key:n}}var ph=4e3,mh=6e4,hh=3e4,gh=new Set(lh);function _h(e){queueMicrotask(()=>{throw e})}function vh(e){return e instanceof Jn&&e.status>=400&&e.status<500}var yh=class extends Error{constructor(){super(`change-set undo: no answer within ${String(hh)} ms`),this.name=`UndoTimeoutError`}};function bh(e,t,n){let{http:r,taskEvents:i}=e,[a,o]=(0,B.useState)({status:`loading`}),[s,c]=(0,B.useState)(null),[l,u]=(0,B.useState)(null),d=l??s,[f,p]=(0,B.useState)(null),[m,h]=(0,B.useState)(null),[g,_]=(0,B.useState)(null),[v,y]=(0,B.useState)({phase:`idle`}),b=(0,B.useRef)(!1),x=(0,B.useRef)(!0),S=(0,B.useRef)(0),C=(0,B.useRef)(0);(0,B.useEffect)(()=>(x.current=!0,()=>{x.current=!1}),[]);let w=(0,B.useCallback)(e=>{S.current+=1;let i=S.current;e||o({status:`loading`}),r.request({method:`GET`,path:qn.changeSetSnapshot.path(t,n,{view:`task_card`}),schema:Fm}).then(e=>{!x.current||i<=C.current||(C.current=i,`layout`in e?(c(null),u(e),o({status:`parts`,snapshot:e})):(u(null),c(e),o({status:`ready`,snapshot:e})))},t=>{!x.current||i<=C.current||(_h(t),!e&&(C.current=i,o({status:`failed`,reason:t instanceof Ht?`unsupported`:t instanceof Jn&&(t.status===403||t.status===404)?`unavailable`:`retryable`})))})},[r,t,n]);(0,B.useEffect)(()=>{w(!1)},[w]),(0,B.useEffect)(()=>i.subscribe(e=>{let t=Lm.safeParse(e);t.success&&t.data.taskId===n&&w(!0)}),[i,n,w]);let T=(d==null?void 0:d.state)??null,E=v.phase===`waiting`,D=T===`applying`||T===`confirmation_required`||E&&(T===`applied`||T===`partial_failure`);(0,B.useEffect)(()=>{if(!D)return;let e=setInterval(()=>w(!0),ph);return()=>clearInterval(e)},[D,w]),(0,B.useEffect)(()=>{if(!E||T===`undone`)return;let e=setTimeout(()=>{y({phase:`refused`,code:null,timedOut:!0,blockedFor:null})},mh);return()=>clearTimeout(e)},[E,T]);let O=(0,B.useCallback)(async(e,i,a)=>{if(d===null)return`skipped`;b.current=!0,p(e),h(null);try{return await r.request({method:`POST`,path:qn.changeSetCommand.path(t,n,e),body:i,schema:dh}),a(),`succeeded`}catch(t){return vh(t)?(x.current&&h({command:e,state:d.state}),`failed`):(_h(t),`unknown`)}finally{b.current=!1,x.current&&(p(null),w(!0))}},[r,t,n,d,w]),ee=(0,B.useCallback)(async()=>{if(b.current||d===null)return`skipped`;if(d.confirmation===void 0)return _h(/* @__PURE__ */ Error(`change-set ${n}: confirm asked without a confirmation block`)),`skipped`;let e=Ee();return O(`confirm`,{approvalRequestId:e,expectedRevision:d.confirmation.expectedRevision,applyRequestId:Ee()},()=>{x.current&&_(e)})},[d,n,O]),k=(0,B.useCallback)(async e=>b.current?`skipped`:O(`reject`,e===null?{approvalRequestId:Ee()}:{approvalRequestId:Ee(),reason:e},()=>void 0),[O]),A=l===null?fh(s==null?void 0:s.applySummary,g):l.state===`partial_failure`&&l.import.counts.retryable>0&&l.import.progress!==null?{kind:`known`,key:l.import.progress.approvalRequestId}:null,j=(0,B.useCallback)(()=>{b.current||d===null||A===null||O(`retry`,{approvalRequestId:A.kind===`known`?A.key:Ee(),expectedRevision:d.revision,applyRequestId:Ee()},()=>void 0)},[d,A,O]),M=(0,B.useCallback)(()=>{var e;if(b.current||d===null||(l===null?(s==null||(e=s.applySummary)==null||(e=e.undo)==null?void 0:e.eligible)!==!0:!l.import.undoEligible))return;let t=d;b.current=!0,p(`undo`),y({phase:`sending`});let i,a=new Promise((e,t)=>{i=setTimeout(()=>t(new yh),hh)});Promise.race([r.request({method:`POST`,path:qn.changeSetUndo.path(n),body:{undoRequestId:Ee(),expectedRevision:d.revision},schema:dh}),a]).then(()=>{x.current&&y({phase:`waiting`,unknown:!1})},e=>{if(vh(e)||_h(e),!x.current)return;if(!vh(e)){y({phase:`waiting`,unknown:!0});return}let n=e.errorCode!==null&&uh(lh,e.errorCode)?e.errorCode:null;y({phase:`refused`,code:n,timedOut:!1,blockedFor:n!==null&&gh.has(n)?t:null})}).finally(()=>{clearTimeout(i),b.current=!1,x.current&&(p(null),w(!0))})},[r,n,d,l,s,w]),N=(0,B.useCallback)(()=>w(!1),[w]),te=(0,B.useCallback)(()=>w(!0),[w]);return{load:a,snapshot:s,partsSnapshot:l,busy:f,commandFailure:m,canRetryApply:A!==null,undo:T===`undone`?{phase:`idle`}:v,reload:N,refresh:te,confirm:ee,reject:k,retryApply:j,requestUndo:M}}function xh(e,t){return uh(ah,e)?t.cascadeEntity[e]:t.cascadeUnknown(ih(e))}function Sh(e,t,n){return uh(ah,e)?n.cascadeCount[e](t):n.cascadeCountUnknown(ih(e),t)}function Ch(e,t){return uh(oh,e)?t.applyError[e]:null}function wh(e,t){return uh(sh,e)?t.undo.sideEffect[e]:ih(e)}function Th(e,t,n){let r=e.kind===`scenario`?n.contextScenario(e.label):e.kind===`object`?n.contextObject(e.label):n.contextProject(e.label);return t===null?r:`${r} \u00B7 ${t}`}function Eh(e,t){let n=e.scenarioLabel===null?t.contextProject(e.projectName):t.contextScenario(e.scenarioLabel);return e.environmentLabel===null?n:`${n} \u00B7 ${e.environmentLabel}`}function Dh(e,t,n,r){var i;if(Um(e))return n.earlyTitle[e];let a=(i=t.proposal)==null?void 0:i.items,o=a==null?void 0:a[0];return a===void 0||o===void 0?n.preparing:Zm(a)===null?n.changesCount(a.length):o.actionTitle[r]}function Oh(e,t){return e.scenarioLabel===null?t.reviseDraftProject(e.projectName):t.reviseDraftScenario(e.scenarioLabel)}function kh(e){let[t,...n]=e??[];return t===void 0||t.entityLabel===``?null:n.every(e=>e.entityLabel===t.entityLabel)?t.entityLabel:null}function Ah(e){var t;let n=e.header.scenarioLabel;if(n!==void 0)return{kind:`scenario`,label:n};let r=kh((t=e.proposal)==null?void 0:t.items);return r===null?{kind:`project`,label:e.header.projectName}:{kind:`object`,label:r}}function jh(e,t){var n,r;let i=(n=e.proposal)==null?void 0:n.items,a=(((r=e.proposal)==null?void 0:r.cascade)??[]).filter(e=>e.count>0);return{target:Ah(e),withIt:a.length===0?null:a.map(e=>Sh(e.entityType,e.count,t)).join(`, `),edits:i===void 0||i.length===0||qm(i)?null:i.length}}function Mh(e,t,n){let r=[Th(t.target,e.header.environmentLabel??null,n)];return t.withIt!==null&&r.push(n.dock.recordWithIt(t.withIt)),t.edits!==null&&r.push(n.dock.editsCount(t.edits)),r.join(` \u00B7 `)}function Nh(e,t){if(Qm(e))return null;let[n]=e.blockers;if(n!==void 0)return n.label;let r=e.confirmDisabledReason;return r===`kill_switch_off`?t.killSwitch.title:r!==void 0&&uh(ch,r)?t.disabledReason[r]:t.dock.blockedUnworded}function Ph(e,t){let n=e.blockers.find(e=>e.kind!==Lh);if(n!==void 0)return n.label;let r=e.confirmDisabledReason;return r===void 0||r===`awaiting_secret_value`?null:r===`kill_switch_off`?t.killSwitch.title:uh(ch,r)?t.disabledReason[r]:t.dock.blockedUnworded}function Fh(e){return{target:{kind:`project`,label:e.header.projectName},withIt:null,edits:e.import.counts.total}}function Ih(e,t,n){var r;if(((r=e.confirmation)==null?void 0:r.confirmEnabled)===!0)return null;let i=e.confirmDisabledReason;return n&&(i===void 0||i===`awaiting_secret_value`)?null:i===`kill_switch_off`?t.killSwitch.title:i!==void 0&&uh(ch,i)?t.disabledReason[i]:t.dock.blockedUnworded}var Lh=`secret_value_required`;function Rh(e,t){let n=t(`apiExecution.assertion.subject.${e.type}`,{target:e.target??``}),r=t(`apiExecution.assertion.comparator.${e.comparator}`);return e.expected===null?`${n} ${r}`:`${n} ${r} ${e.expected}`}function zh(e){return e.id===void 0?``:` ${e.id}`}function Bh(e,t){let n=e.assertionConfig[t];if(typeof n!=`string`)throw Error(`Expected-result${zh(e)} is missing string assertionConfig.${t}`);return n}function Vh(e){if(!(`label`in e))throw Error(`Expected-result${zh(e)} is missing required label`);if(e.label!==null&&typeof e.label!=`string`)throw Error(`Expected-result${zh(e)} has an invalid label`);if(e.assertionType===`text_free`){if(e.label!==null)throw Error(`Text-free expected-result${zh(e)} must have a null label`);return null}if(e.label!==null){if(e.label.trim().length===0)throw Error(`Expected-result${zh(e)} has a blank label`);return{kind:`label`,value:e.label}}switch(e.assertionType){case`text_contains`:return{kind:`text_contains`,value:Bh(e,`expectedText`)};case`text_equals`:return{kind:`text_equals`,value:Bh(e,`expectedText`)};case`assert_text`:return{kind:`assert_text`,mode:Bh(e,`mode`),value:Bh(e,`value`)};case`element_visible`:return{kind:`element_visible`};case`element_exists`:return{kind:`element_exists`};case`element_not_exists`:return{kind:`element_not_exists`};case`input_value`:return{kind:`input_value`,value:Bh(e,`expectedValue`)};default:throw Error(`Expected-result${zh(e)} has unsupported assertion type ${e.assertionType}`)}}function Hh(e){return e.assertionType!==`text_free`}function Uh(e){return Hh(e)?!0:e.text!==null&&e.text.trim().length>0}function Wh(e,t){return t(an(e))}function Gh(e,t){switch(e){case`equals`:return t(`expectedResult.assertTextModes.equals`);case`contains`:return t(`expectedResult.assertTextModes.contains`);case`matches`:return t(`expectedResult.assertTextModes.matches`);case`starts_with`:return t(`expectedResult.assertTextModes.startsWith`);case`ends_with`:return t(`expectedResult.assertTextModes.endsWith`);default:throw TypeError(`Unsupported assert_text mode: ${e}`)}}function Kh(e,t){let n=Vh(e);if(n===null)throw TypeError(`Typed expected result produced no description`);switch(n.kind){case`label`:return n.value;case`text_contains`:return t(`expectedResult.descriptions.textContains`,{value:n.value});case`text_equals`:return t(`expectedResult.descriptions.textEquals`,{value:n.value});case`assert_text`:return t(`expectedResult.descriptions.assertText`,{mode:Gh(n.mode,t),value:n.value});case`element_visible`:return t(`expectedResult.descriptions.elementVisible`);case`element_exists`:return t(`expectedResult.descriptions.elementExists`);case`element_not_exists`:return t(`expectedResult.descriptions.elementNotExists`);case`input_value`:return t(`expectedResult.descriptions.inputValue`,{value:n.value})}}function qh(e,t){if(!Hh(e)){if(e.text===null)throw TypeError(`text_free expected result must carry text`);return{description:e.text,assertionTypeLabel:null}}let n=e.assertionType;return{description:Kh(e,t),assertionTypeLabel:Wh(n,t)}}var Jh=/* @__PURE__ */ new Set([`element_not_found`,`element_not_found_page_busy`]);function Yh(e,t){let{source:n,evidence:r,origin:i}=e;switch(n.kind){case`atlas_turn`:if(i.kind!==`atlas_turn`)throw tg(e,i.kind);return{title:n.title,observed:n.observed,expected:n.expected===null?t(`findings.expected.atlasNone`):n.expected,sourceLine:i.title===null?t(`findings.source.atlasTurnUntitled`,{agent:i.agentNumber,step:i.stepNumber}):t(`findings.source.atlasTurn`,{agent:i.agentNumber,title:i.title,step:i.stepNumber})};case`run_step`:{if(r.kind!==`run_step`)throw tg(e,r.kind);if(i.kind!==`run_step`)throw tg(e,i.kind);let a=n.stepIndex+1;return{title:Zh(r,a,t),observed:r.actual===null?Xh(r,t):r.actual,expected:r.failedCheck===null?t(`findings.expected.runStepNone`):qh(r.failedCheck,t).description,sourceLine:i.scenarioName===null?t(`findings.source.runStepDeleted`,{agent:i.agentNumber,n:a}):t(`findings.source.runStep`,{agent:i.agentNumber,scenario:i.scenarioName,n:a})}}case`server_step`:{if(r.kind!==`server_step`)throw tg(e,r.kind);if(i.kind!==`server_step`)throw tg(e,i.kind);let n=$h(r),a=i.requestName===null?t(`findings.source.serverItemRequest`,{request:n}):t(`findings.source.serverItemNamed`,{name:i.requestName});return{title:i.requestName===null?t(`findings.title.serverStep`,{request:n,status:r.responseStatus}):t(`findings.title.serverStepNamed`,{name:i.requestName,status:r.responseStatus}),observed:r.responseStatusText===null?t(`findings.observed.response`,{status:r.responseStatus}):t(`findings.observed.responseWithText`,{status:r.responseStatus,statusText:r.responseStatusText}),expected:Qh(r,t),sourceLine:i.testRun===null?t(`findings.source.serverStep`,{item:a}):i.testRun.name===null?t(`findings.source.serverStepRunNumber`,{item:a,number:String(i.testRun.number).padStart(3,`0`)}):t(`findings.source.serverStepRun`,{item:a,run:i.testRun.name})}}}}function Xh(e,t){switch(e.failureCode){case null:return t(`findings.stepFailure.assertion`);case`element_not_found`:return t(`findings.stepFailure.element_not_found`);case`element_not_found_page_busy`:return t(`findings.stepFailure.element_not_found_page_busy`);case`native_dialog_open`:return t(`findings.stepFailure.native_dialog_open`);default:return t(`findings.stepFailure.other`,{code:e.failureCode})}}function Zh(e,t,n){let r=e.failureCode!==null&&Jh.has(e.failureCode),i=e.stepName.trim();return i.length===0?n(r?`findings.title.runStepNotFoundUnnamed`:`findings.title.runStepUnnamed`,{n:t}):n(r?`findings.title.runStepNotFound`:`findings.title.runStep`,{n:t,name:i})}function Qh(e,t){let n=e.failedChecks.map(e=>t(`findings.expected.checkQuoted`,{check:Rh(e,t)})).join(`, `);return t(`findings.expected.checks`,{count:e.failedChecks.length,checks:n})}function $h(e){return`${e.method.toUpperCase()} ${eg(e.url)}`}function eg(e){if(!URL.canParse(e))return e;let t=new URL(e);return`${t.pathname}${t.search}`}function tg(e,t){return/* @__PURE__ */ Error(`Finding ${e.id}: source '${e.source.kind}' with '${t}'`)}function ng(){let{t:e,i18n:t}=Qe();return(0,B.useMemo)(()=>({t:e,has:e=>t.exists(e)}),[e,t])}var rg=`create_bug`;function ig(e){var t;let n=(t=e.proposal)==null?void 0:t.items;if((n==null?void 0:n.length)!==1)return null;let[r]=n;return r===void 0||r.actionType!==rg||r.bug===void 0?null:{facts:r.bug}}function ag(e){let t=new URL(e);return`${t.pathname}${t.search}`}function og(e,t){return[t.capture[e.capture],...e.pageUrl===null?[]:[t.address(ag(e.pageUrl))]].join(`, `)}function sg({facts:e}){let t=$().cards.changeSet.bugFiling;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug`,"data-testid":`change-set-bug-filing`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(xr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:og(e,t)})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bug__line`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.severity(t.severityWord[e.severity])})]})]})}function cg(e,t){return Yh(e.candidate,t).title}function lg({finding:e}){let{t}=ng(),{project:n,navigation:r}=$f(),i=cg(e,t),a=n===null?null:ap(n.number,e.open);return a===null?i:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,"data-testid":`change-set-bug-finding`,onClick:()=>r.openPath(a),children:i})}function ug(e,t,n){var r;let i=$().cards.changeSet,a=Q(),o=t.status===`ready`?t.snapshot:null,s=t.status===`parts`?t.snapshot:null,c=o!==null&&Hm(o.state)?o.state:null,l=(0,B.useMemo)(()=>o===null?null:ig(o),[o]),u=(0,B.useMemo)(()=>{var e;if(s!==null){var t;return s.state!==`confirmation_required`&&s.state!==`proposal_pending`?null:{title:i.importParts.title,confirmEnabled:((t=s.confirmation)==null?void 0:t.confirmEnabled)===!0,destructive:!1,deletes:s.import.removesData,icon:`layers`,facts:Fh(s),confirmBlockedReason:Ih(s,i,!1),bug:null,secretInputRequests:s.secretInputRequests,confirmBlockedBeyondSecrets:Ih(s,i,!0)}}if(o===null||c!==`confirmation_required`)return null;let{deletes:n,destructive:r}=Ym((e=o.proposal)==null?void 0:e.items);return{title:l===null?Dh(c,o,i,a):i.bugFiling.title,confirmEnabled:Qm(o),destructive:r,deletes:n,icon:th(c,o).kind,facts:jh(o,i),confirmBlockedReason:Nh(o,i),bug:l,secretInputRequests:o.secretInputRequests,confirmBlockedBeyondSecrets:Ph(o,i)}},[s,o,c,l,i,a]),d=(r=e.conversation.changeSetDecision)==null?void 0:r.register;(0,B.useEffect)(()=>{if(u!==null&&n!==null&&d!==void 0)return d(n,u)},[u,n,d])}function dg(e){let t=/* @__PURE__ */ new Map;for(let n of e)if(n.toolResults!==void 0)for(let{toolCallId:e,result:r}of n.toolResults){if(dm(r)!==`change_set_proposal`)continue;let n=mm.safeParse(r);n.success&&n.data.mode===`preview_confirm`&&(t.has(e)||t.set(e,{toolCallId:e,projectId:n.data.projectId,changeSetId:n.data.changeSetId}))}return[...t.values()]}function fg({preview:e}){let t=$f(),{load:n}=bh(t,e.projectId,e.changeSetId);return ug(t,n,e.toolCallId),null}function pg({messages:e}){return dg(e).map(e=>/* @__PURE__ */ (0,Z.jsx)(fg,{preview:e},e.toolCallId))}function mg(){let e=null,t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Map,r=()=>{for(let e of t)e()};return{subscribe(e){return t.add(e),()=>t.delete(e)},link:()=>e,setLink(t,n,i){if(i){if((e==null?void 0:e.toolCallId)===t&&e.from===n)return;e={toolCallId:t,from:n},r();return}(e==null?void 0:e.toolCallId)===t&&e.from===n&&(e=null,r())},registerRecord(e,t){return n.set(e,t),r(),()=>{n.get(e)===t&&(n.delete(e),r())}},hasRecord:e=>n.has(e),reveal(e){let t=n.get(e);return t!==void 0&&(t.reveal(),!0)}}}function hg(e,t){return(0,B.useSyncExternalStore)(e.subscribe,()=>e.hasRecord(t))}function gg(e,t,n){return{linked:(0,B.useSyncExternalStore)(e.subscribe,()=>{let r=e.link();return r!==null&&r.toolCallId===t&&r.from!==n}),onLinkChange:(0,B.useCallback)(r=>e.setLink(t,n,r),[e,t,n])}}function _g({chat:e}){let[t,n]=(0,B.useState)(0),r=(0,B.useCallback)(()=>n(e=>e+1),[]),[i]=(0,B.useState)(mg),[a,o]=(0,B.useState)(()=>/* @__PURE__ */ new Map),s=(0,B.useCallback)((e,t)=>(o(n=>new Map(n).set(e,t)),()=>{o(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}),[]),{answeredToolCallIds:c}=e;return{register:s,dockEntries:[...a].filter(([e])=>!c.includes(e)).map(([e,t])=>({toolCallId:e,...t})),tether:i,focusRequest:t,focusComposer:r}}function vg({chat:e,decisionProgress:t}){let{isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i}=e;return(0,B.useCallback)(e=>aa({isStreaming:n,confirmationAnswerInFlight:r,permissionModeLane:i},e)||t!==null,[n,r,i,t])}var yg=[`isUnassigned`,`hasUnboundElementSteps`,`hasUnlockedTextSteps`],bg={ru:{needsBinding:(e,t)=>`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043F\u0440\u0438\u0432\u044F\u0437\u043A\u0438: ${e}. \u0421\u043D\u0430\u0447\u0430\u043B\u0430 ${t}, \u043F\u043E\u0442\u043E\u043C \u0437\u0430\u043F\u0443\u0441\u043A.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430`,hasUnboundElementSteps:`\u0435\u0441\u0442\u044C \u0448\u0430\u0433\u0438 \u0431\u0435\u0437 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430`,hasUnlockedTextSteps:`\u0435\u0441\u0442\u044C \u043D\u0435\u0437\u0430\u0431\u043B\u043E\u043A\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438`},actions:{make_auto:`\u00AB\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u0430\u0432\u0442\u043E\u00BB`,bind_elements:{hub:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB`,web:`\u00AB\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B\u00BB \u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0438 Progon`}},needsDeviceExecutor:(e,t)=>`\u041D\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044F \u0434\u043B\u044F \u0448\u0430\u0433\u043E\u0432 \u043D\u0430 \u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u0435: ${t?`\u0448\u0430\u0433\u0438`:`\u0448\u0430\u0433`} ${e}.`,noSteps:`\u0412 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u043D\u0435\u0442 \u0448\u0430\u0433\u043E\u0432.`,aiUnavailableForTextSteps:`\u0418\u0418 \u043D\u0435\u0442, \u0430 \u0432 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0438 \u0435\u0441\u0442\u044C \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0435 \u0448\u0430\u0433\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043E\u043D \u043D\u0443\u0436\u0435\u043D.`,unread:`\u0421\u0446\u0435\u043D\u0430\u0440\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.`,noReadyScenarios:`\u0421\u0440\u0435\u0434\u0438 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u0441\u0446\u0435\u043D\u0430\u0440\u0438\u0435\u0432 \u043D\u0435\u0442 \u0433\u043E\u0442\u043E\u0432\u044B\u0445 \u043A \u0437\u0430\u043F\u0443\u0441\u043A\u0443 \u0432 \u00AB\u0410\u0432\u0442\u043E\u00BB.`},en:{needsBinding:(e,t)=>`This scenario needs binding: ${e}. First use ${t}, then run it.`,causesSentence:e=>`${e}.`,causes:{isUnassigned:`no page is assigned`,hasUnboundElementSteps:`some steps have no element`,hasUnlockedTextSteps:`some text steps are not locked`},actions:{make_auto:`"Make Auto"`,bind_elements:{hub:`"Bind elements"`,web:`"Bind elements" in the Progon extension`}},needsDeviceExecutor:(e,t)=>`No executor for the steps on the device: ${t?`steps`:`step`} ${e}.`,noSteps:`This scenario has no steps.`,aiUnavailableForTextSteps:`AI is unavailable, and this scenario has text steps that need it.`,unread:`This scenario cannot run automatically.`,noReadyScenarios:`None of the selected scenarios is ready to run in Auto.`}};function xg(e,t,n){let r=bg[n];switch(e.status){case`needs_device_executor`:{let{stepNumbers:t}=e.details;return r.needsDeviceExecutor(t.join(`, `),t.length>1)}case`needs_binding`:return r.needsBinding(Tg(e.causes,n),Dg(e.offeredActions.map(e=>Eg(r,e,t)),n,`disjunction`,`a needs_binding refusal offers no action, but offeredActions is .min(1) on both schemas`));case`no_steps`:return r.noSteps;case`ai_unavailable_for_text_steps`:return r.aiUnavailableForTextSteps}}function Sg(e,t){return bg[t].causesSentence(Og(Tg(e,t)))}function Cg(e){return bg[e].unread}function wg(e){return bg[e].noReadyScenarios}function Tg(e,t){let n=bg[t];return Dg(yg.filter(t=>e[t]).map(e=>n.causes[e]),t,`conjunction`,`a needs_binding refusal has no true cause, but needsMapping is the OR of exactly these three`)}function Eg(e,t,n){let r=e.actions[t];return typeof r==`string`?r:r[n]}function Dg(e,t,n,r){if(e.length===0)throw Error(`scenario-launch-refusal-text: ${r}`);return new Intl.ListFormat(t,{style:`long`,type:n}).format(e)}function Og(e){return e.charAt(0).toUpperCase()+e.slice(1)}function kg(){let{t:e,i18n:t}=Qe(),n=t.resolvedLanguage;return(0,B.useMemo)(()=>{let r=e,i=Ve.find(e=>e===n);if(i===void 0)throw Error(`i18n resolved an unsupported UI locale: ${String(n)}`);return{t:r,has:e=>t.exists(e),locale:i}},[t,n,e])}var Ag=`scenarios.not_auto_runnable`;function jg(e,t,n){if(t!==Ag)return null;let r=Ct.safeParse(n==null?void 0:n.decision);return r.success?xg(r.data,`web`,e):Cg(e)}function Mg(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:null}function Ng(e,t){if(!(t instanceof ie)||t.errorCode!==`remote_runs.text_steps_unsupported`)return null;let n=t.params;if(!n)return null;let r=Mg(n.unconvertedTextStepCount),i=Mg(n.lockedTextStepCount);return r===null||i===null?null:r>0?e(`apiErrors.remote_runs.text_steps_unsupported.unconverted`):i>0?e(`apiErrors.remote_runs.text_steps_unsupported.locked`):null}function Pg(e,t,n,r){if(t instanceof ie){let n=Ng(e.t,t);if(n!==null)return n;let r=jg(e.locale,t.errorCode,t.params);if(r!==null)return r}return j(e,t,n,r)}var Fg=`qa-ai-chat-place inline-flex h-7 min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border border-solid pr-[7px] pl-[9px] text-xs font-medium transition-[border-color,background-color,color,box-shadow] duration-(--motion-short) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,Ig=`my-1 h-px shrink-0 bg-stroke-light`;function Lg(e,t){return e.block===null?e.occupied?t.runnerBusy:t.runnerFree:t.runnerBlocked[e.block]}function Rg(e,t,n){switch(e.kind){case`opening`:return t.status===`failed`?n.fleetFailed:n.fleetLoading;case`this_browser`:return n.thisBrowser;case`none`:return n.none;case`runner`:return n.runner(e.runner.name);case`runner-unread`:return n.runnerUnread;case`runner-gone`:return n.runnerGone}}function zg(e,t){switch(e.kind){case`opening`:return t.status===`failed`?x:ii;case`this_browser`:return Ce;case`none`:return kr;case`runner`:case`runner-unread`:return ii;case`runner-gone`:return x}}function Bg({place:e,view:t,fleet:n,onChoose:r,onOpen:i,copy:a,heading:s,thisBrowserReach:c,look:l,disabled:u=!1}){let[d,f]=(0,B.useState)(!1),[p,m]=(0,B.useState)(null),[h,g]=(0,B.useState)(!1),_=(0,B.useId)(),v=(0,B.useRef)(null),y=(0,B.useId)(),b=vn(),x=d&&!u,S=t.kind===`runner-gone`,C=S||t.kind===`opening`&&n.status===`failed`,w=Rg(t,n,a),T=zg(t,n),E=n.status===`ready`?n.runners:[],D=e=>({key:`runner-${e.id}`,place:{kind:`runner`,agentId:e.id},icon:ii,title:a.runner(e.name),detail:Lg(e,a),withheld:e.block!==null}),O={key:`this_browser`,place:{kind:`this_browser`},icon:Ce,title:a.thisBrowser,detail:c===`opens_windows`?a.thisBrowserRowOpensWindows:a.thisBrowserRowTasksOnly,withheld:!1},ee={key:`none`,place:{kind:`none`},icon:kr,title:a.none,detail:a.noneRow,withheld:!1},k=E.filter(e=>e.mine).map(D),A=E.filter(e=>!e.mine).map(D),j=t=>e!==null&&o(e,t.place),M=h||A.some(j),N=p===null?void 0:[O,...k,...A,ee].find(e=>e.key===p),te=e=>{e.withheld||(r(e.place),m(e.key),f(!1))},ne=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)].filter(e=>e.getAttribute(`aria-disabled`)!==`true`),n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},re=n.status===`loading`||n.status===`idle`?a.fleetLoading:n.status===`failed`?a.fleetFailed:n.runners.length===0?a.fleetEmpty:null,ie=t=>{let n=j(t),r=n||e===null&&t.key===`this_browser`,i=t.icon;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:r?v:void 0,type:`button`,role:`radio`,"aria-checked":n,"aria-disabled":t.withheld||void 0,tabIndex:r?0:-1,"data-testid":`ai-chat-place-${t.key}`,onClick:()=>te(t),className:P(`grid w-full grid-cols-[16px_minmax(0,1fr)_16px] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-fg-secondary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,t.withheld?`cursor-not-allowed text-fg-muted opacity-55`:`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`),children:[/* @__PURE__ */ (0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5 text-fg-secondary`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`block truncate text-body-sm font-medium text-fg-primary`,children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-caption leading-[1.4] text-fg-muted`,children:t.detail})]}),/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`,className:P(`size-3.5 text-(--color-primary-text)`,!n&&`invisible`)})]},t.key)},ae=l===`setting`?/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:P(`qa-ai-chat-set qa-ai-chat-set--place`,C&&`qa-ai-chat-set--gone`),"aria-describedby":S?y:void 0,disabled:u,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(T,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:w})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:P(Fg,C?`border-[color-mix(in_srgb,var(--color-error)_45%,transparent)] bg-(--color-error-bg) text-(--color-error-text)`:`border-(--color-border) bg-transparent text-fg-secondary enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary`,x&&`border-(--color-border-focus) shadow-(--glow-primary-sm)`),"aria-label":a.chipLabel(w),"aria-describedby":S?y:void 0,disabled:u,"data-place":t.kind,"data-testid":`ai-chat-place-chip`,children:[/* @__PURE__ */ (0,Z.jsx)(T,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:w}),/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`,className:P(`size-3 shrink-0 transition-transform duration-(--motion-medium) ease-(--ease-out)`,x&&`rotate-180`)})]});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Yt,{title:a.name,titleVisible:!1,trigger:ae,triggerTooltip:l===`setting`?{content:a.chipLabel(w),relationship:`label`}:{content:a.title,relationship:`description`},open:x,onOpenChange:e=>{e&&!d&&i(),f(e&&!u)},side:`top`,collisionAvoidance:nn,...b===null?{}:{positionAnchor:b},initialFocusRef:v,className:b===null?$t:en,"data-testid":`ai-chat-place-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[s&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 py-1.5`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold tracking-[-0.1px] text-fg-primary`,children:a.name}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`text-caption text-fg-muted`,children:a.note})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":a.name,className:`flex flex-col gap-px`,onKeyDown:ne,children:[ie(O),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:Ig}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-60 flex-col gap-px overflow-y-auto`,"data-testid":`ai-chat-place-runners`,children:[k.map(ie),re!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-[7px] pl-[34px] text-caption text-fg-muted`,"data-testid":`ai-chat-place-fleet-state`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:re}),n.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-caption text-(--color-primary-text) hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus)`,onClick:i,children:a.fleetRetry})]}),A.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":M,"aria-controls":_,onClick:()=>g(!M),"data-testid":`ai-chat-place-others`,className:`grid w-full cursor-pointer grid-cols-[16px_minmax(0,1fr)] items-center gap-2.5 rounded-md border-0 bg-transparent px-2 py-[7px] text-left text-caption font-medium text-fg-muted hover:bg-(--color-bg-elevated-hover) hover:text-fg-secondary focus-visible:bg-(--color-bg-elevated-hover) focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`,children:[/* @__PURE__ */ (0,Z.jsx)(xe,{"aria-hidden":`true`,className:P(`size-3.5 transition-transform duration-(--motion-short) ease-(--ease-out)`,M&&`rotate-90`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:a.othersGroup(A.length)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:_,className:`flex flex-col gap-px`,hidden:!M,children:M&&A.map(ie)})]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:Ig}),ie(ee)]})]})}),S&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:y,role:`status`,className:l===`setting`?`qa-ai-chat-sets-note`:`qa-ai-chat-place-gone m-0 flex items-start gap-1.5 text-caption leading-[1.45] text-(--color-error-text)`,"data-testid":`ai-chat-place-gone`,children:a.runnerGoneHint}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:N===void 0?``:a.chipLabel(N.title)})]})}var Vg={explore_app:Gr,find_bugs:br,create_tests:fn,automate_scenarios:mi,run_scenarios:Zr};function Hg(e,t,n){return{type:`text`,inputMode:`url`,autoComplete:`off`,spellCheck:!1,value:e,onValueChange:t,disabled:n,"data-testid":`launch-address-input`}}function Ug({state:e,disabled:t}){let{t:n}=kg(),r=e.scope===void 0;return/* @__PURE__ */ (0,Z.jsx)(m,{...Hg(e.value,e.setValue,t||r),label:n(`launchAddress.crawl.label`),placeholder:n(`launchAddress.crawl.placeholder`),...r?{hint:n(`launchAddress.crawl.loadingHint`)}:{}})}function Wg(e,t,n,r){let i=s(t);return n.kind===`create`?e.targets.create(i,{applicationId:_(n.pair.applicationId),environmentId:n.pair.environmentId,baseUrl:r}):e.targets.update(i,n.target.id,{baseUrl:r,expectedUpdatedAt:n.target.updatedAt})}function Gg(e,t){return e(`launchAddress.pair`,{application:t.applicationName===null?e(`launchAddress.applicationGone`):t.applicationName,environment:t.environmentName===null?e(`launchAddress.environmentGone`):t.environmentName})}function Kg({projectId:e,cell:t,children:n,testId:r}){return/* @__PURE__ */ (0,Z.jsx)(ee,{target:{kind:`environment-addresses`,projectRef:s(e),...t===void 0?{}:{cell:{applicationId:t.applicationId,environmentId:t.environmentId}}},placement:`same-tab`,className:`rounded-(--radius-sm) font-medium text-fg-link underline-offset-2 hover:underline focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-primary/40`,"data-testid":r,children:n})}function qg({projectId:e}){let{t}=Qe();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`flex items-start gap-3 rounded-(--radius-md) border border-[color:var(--color-chip-primary-border)] bg-(--color-bg-primary-tint-15) px-3 py-2.5`,"data-testid":`launch-address-not-configured`,children:[/* @__PURE__ */ (0,Z.jsx)(Ce,{size:16,className:`mt-0.5 shrink-0 text-fg-link`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-0.5 text-[length:var(--text-sm)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-medium text-fg-primary`,children:t(`launchAddress.notConfigured.title`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`text-fg-secondary`,children:[t(`launchAddress.notConfigured.body`),` `,/* @__PURE__ */ (0,Z.jsx)(Kg,{projectId:e,testId:`launch-address-not-configured-link`,children:t(`launchAddress.openAddresses`)})]})]})]})}function Jg({checked:e,onChange:t,pairLabel:n,plan:r,disabled:i}){let{t:a}=Qe(),o=(0,B.useId)(),s=e&&r.state===`ok`;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1`,"data-testid":`launch-address-save`,children:[/* @__PURE__ */ (0,Z.jsx)(Dn,{checked:e,onChange:t,disabled:i,label:a(`launchAddress.saveAs`,{pair:n}),describedBy:s?o:void 0}),s&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:o,className:`flex items-center gap-1.5 pl-6 text-[length:var(--text-xs)] text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(Ke,{size:12,className:`shrink-0 text-fg-success`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:/* @__PURE__ */ (0,Z.jsx)(ce,{i18nKey:`launchAddress.willSaveAs`,values:{baseUrl:r.baseUrl},components:{mono:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`font-mono text-fg-primary`})}})})]})]})}function Yg(e){let t=C(),n=(0,B.useCallback)(async n=>{let r=s(e),[i,a]=await Promise.all([t.applications.byProject(r,{signal:n}),t.targets.listAll(r,{signal:n})]);return{applications:i,targets:a}},[t,e]);return d({fetcher:n,deps:[e]})}function Xg(e,t,n,r){let i=e.applications.find(e=>e.id===n),a=t.find(e=>e.id===r);return{applicationId:n,environmentId:r,applicationName:i===void 0?null:i.name,environmentName:a===void 0?null:a.name}}function Zg(e,t,n){if(n.kind===`cell_missing`)return{kind:`create`,pair:Xg(e,t,n.applicationId,n.environmentId)};if(n.kind===`address_required`){let r=e.targets.find(e=>e.id===n.targetId);return r===void 0?null:{kind:`patch`,pair:Xg(e,t,r.applicationId,r.environmentId),target:r}}return null}function Qg({state:e,projectId:t,catalog:n,namesLoading:r,environments:i,disabled:a}){let o=kg(),{t:s}=o,c=Hg(e.value,e.setValue,a);if(e.source===`inherited`)return/* @__PURE__ */ (0,Z.jsx)(m,{...c,label:s(`runEntryUrl.label`),error:e.missingRepeatAddress?s(`runEntryUrl.errors.repeatCleared`):void 0,hint:s(`runEntryUrl.hintRepeat`)});if(e.refusal!==null&&e.refusal.kind===`not_configured`)return/* @__PURE__ */ (0,Z.jsx)(qg,{projectId:t});if(e.isLoading||r)return/* @__PURE__ */ (0,Z.jsx)(De,{className:`h-10 w-full`,label:s(`common.loading`)});let l=e.refusedCell;if(l!==null){let n=Gg(s,l.pair);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-missing`,children:[/* @__PURE__ */ (0,Z.jsx)(m,{...c,label:s(`runEntryUrl.labelFor`,{pair:n}),placeholder:s(`runEntryUrl.placeholder`),error:r_(o,e),hint:n_(s,l)}),/* @__PURE__ */ (0,Z.jsx)(Jg,{checked:e.saveChecked,onChange:e.setSaveChecked,pairLabel:n,plan:e.savePlan,disabled:a}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`text-[length:var(--text-xs)] text-fg-muted`,children:/* @__PURE__ */ (0,Z.jsx)(Kg,{projectId:t,cell:{applicationId:l.pair.applicationId,environmentId:l.pair.environmentId},testId:`run-entry-url-open-cell`,children:s(`launchAddress.openCell`,{pair:n})})})]})}let u=e.defaultApplicationNote;if(u!==null)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-2`,"data-testid":`run-entry-url-default-missing`,children:/* @__PURE__ */ (0,Z.jsx)(m,{...c,label:s(`runEntryUrl.labelFor`,{pair:Gg(s,u.pair)}),placeholder:s(`runEntryUrl.placeholder`),hint:t_(s,u)})});let d=e_(e,n,i);return/* @__PURE__ */ (0,Z.jsx)(m,{...c,label:d===null?s(`runEntryUrl.label`):s(`runEntryUrl.labelFor`,{pair:Gg(s,d)}),placeholder:s(`runEntryUrl.placeholder`),error:e.read.status===`error`?Pg(o,e.read.error,`runEntryUrl.errors.load`):void 0,hint:$g(s,e,d)})}function $g(e,t,n){return t.source===`scenario`&&t.read.status===`resolved`?e(`runEntryUrl.hintScenario`):n===null?t.refusal===null?e(`runEntryUrl.hintUnnamed`):e(t.refusal.kind===`cell_missing`?`apiErrors.targets.cell_missing`:`apiErrors.targets.address_required`):e(`runEntryUrl.hintBatch`,{application:n.applicationName===null?e(`launchAddress.applicationGone`):n.applicationName})}function e_(e,t,n){if(e.read.status!==`resolved`||t===void 0||n===null)return null;let{applicationId:r,environmentId:i}=e.read.address;return Xg(t,n,r,i)}function t_(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`patch`&&t.target.hostPattern!==null?e(`launchAddress.defaultPatternOnly`,{application:n,environment:r,pattern:t.target.hostPattern}):e(`launchAddress.defaultMissing`,{application:n,environment:r})}function n_(e,t){let n=t.pair.applicationName===null?e(`launchAddress.applicationGone`):t.pair.applicationName,r=t.pair.environmentName===null?e(`launchAddress.environmentGone`):t.pair.environmentName;return t.kind===`create`||t.target.hostPattern===null?e(`launchAddress.cellMissing`,{application:n,environment:r}):e(`launchAddress.addressRequired`,{application:n,environment:r,pattern:t.target.hostPattern})}function r_(e,t){let{t:n}=e;if(t.saveError!==null)return Pg(e,t.saveError,`launchAddress.errors.save`);if(t.saveChecked&&t.savePlan.state===`invalid`)return n(`environments.addresses.errors.baseUrl.${t.savePlan.reason}`)}var i_={projectDefault:`agentRunDispatch.environmentHint`,repeat:`makeAutoDispatch.repeat.environmentHint`,concrete:`launchAddress.environment.variablesHint`},a_={projectDefault:`agentRunDispatch.errors.environmentsLoad`,repeat:`agentRunDispatch.errors.environmentsLoad`,concrete:`launchAddress.environment.loadError`};function o_({state:e,disabled:t,onAddressEdit:r}){let i=kg(),{t:a}=i,{environment:o,catalog:s,address:c,projectId:l}=e,u=e=>{c.setValue(e),r!==void 0&&r()},d=c.kind===`entryUrl`&&(c.source===`inherited`||c.refusal!==null&&c.refusal.kind===`not_configured`),f=o.loadError!==null;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(s_,{environment:o,disabled:t,loadErrorTitle:o.loadError===null?null:Pg(i,o.loadError,a_[o.mode])}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[s.error!==null&&!d&&/* @__PURE__ */ (0,Z.jsx)(oe,{tone:`error`,title:Pg(i,s.error,`launchAddress.errors.catalogLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:s.reload,children:a(`common.retry`)})}),c.kind===`crawlStart`&&c.scopeError!==null&&/* @__PURE__ */ (0,Z.jsx)(oe,{tone:`error`,title:Pg(i,c.scopeError,`launchAddress.crawl.scopeLoad`),actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:c.reloadScope,children:a(`common.retry`)})}),c.kind===`crawlStart`?/* @__PURE__ */ (0,Z.jsx)(Ug,{state:{...c,setValue:u},disabled:t}):/* @__PURE__ */ (0,Z.jsx)(Qg,{state:{...c,setValue:u},projectId:l,catalog:s.data,namesLoading:s.data===void 0&&s.error===null||o.environments===void 0&&!f,environments:o.environments===void 0?null:o.environments,disabled:t})]})]})}function s_({environment:e,disabled:t,loadErrorTitle:r}){let{t:i}=kg();return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r!==null&&/* @__PURE__ */ (0,Z.jsx)(oe,{tone:`error`,title:r,actions:/* @__PURE__ */ (0,Z.jsx)(n,{onClick:e.reload,children:i(`common.retry`)})}),e.shown&&/* @__PURE__ */ (0,Z.jsx)(qe,{label:i(`agentRunDispatch.environmentLabel`),options:e.options,value:e.value,onValueChange:e.setValue,disabled:t,placeholder:e.mode===`repeat`?i(`makeAutoDispatch.repeat.environmentChoosePlaceholder`):void 0,error:e.noticeKey===null?void 0:i(e.noticeKey),hint:i(i_[e.mode]),"data-testid":`launch-environment`})]})}var c_=`relative inline-flex h-8 max-w-full min-w-0 items-center gap-2 rounded-md border border-solid border-stroke bg-surface-secondary pr-2 pl-3 text-xs text-fg-primary transition-[border-color,background-color,box-shadow] duration-(--motion-short) ease-(--ease-out) enabled:hover:border-stroke-hover enabled:hover:bg-surface-hover aria-expanded:border-stroke-focus aria-expanded:shadow-(--glow-primary-sm) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-fg-muted`;function l_(){return/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`,className:`size-3! text-fg-muted`})}function u_({icon:e,title:t,hint:n,checked:r,disabled:i=!1,onSelect:a,testId:o}){let s=(0,B.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"aria-disabled":i||void 0,"aria-describedby":n===void 0?void 0:s,onClick:i?void 0:a,"data-testid":o,className:P(`flex w-full items-center gap-3 rounded-md border-0 bg-transparent px-3 py-2 text-left text-xs text-fg-primary`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-stroke-focus`,i?`cursor-not-allowed opacity-(--opacity-inert)`:`cursor-pointer hover:bg-surface-hover-layer focus-visible:bg-surface-hover-layer`,r&&`bg-(--color-bg-primary-tint)`),children:[/* @__PURE__ */ (0,Z.jsx)(e,{"aria-hidden":`true`,className:`size-4 shrink-0 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`block truncate`,children:t}),n!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`small`,{id:s,className:`block text-caption text-fg-muted`,children:n})]}),r&&/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`,className:`size-4 shrink-0 text-(--color-primary-text)`})]})}function d_({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 pt-2 pb-1 text-caption text-fg-muted`,children:e})}function f_(){return/* @__PURE__ */ (0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`my-1 h-px bg-stroke-light`})}function p_({children:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-3 py-2 text-xs text-fg-muted`,children:e})}function m_(e){try{return new URL(e).host}catch{return e}}function h_(e,t){try{return new URL(e).href===new URL(t).href}catch{return!1}}function g_(e,t){if(t===null)return null;let n=e.find(e=>e.value===t);if(n===void 0)throw Error(`Environment ${t} is not among the picker's options`);return n.label}function __(e,t,n){let r=[];for(let i of e.applications)for(let a of t){let o=e.targets.find(e=>e.applicationId===i.id&&e.environmentId===a.id);if(o===void 0||o.baseUrl===null)continue;let s=Xg(e,t,i.id,a.id);r.push({targetId:o.id,environmentId:a.id,application:s.applicationName===null?n:s.applicationName,environment:a.name,url:o.baseUrl})}return r}function v_({state:e}){let{t}=Qe(),[n,r]=(0,B.useState)(`closed`),{environment:i,address:a,catalog:o}=e.address,s=g_(i.options,i.value),c=a.value.trim()===``,l=o.data===void 0||i.environments===void 0?null:__(o.data,i.environments,t(`launchAddress.applicationGone`)),u=l===null||c?void 0:l.find(e=>e.environmentId===i.value&&h_(e.url,a.value)),d=i.loadError!==null||a.scopeError!==null?t(`launchAddress.environment.loadError`):i.environments===void 0||a.block===`unread`?t(`taskForm.address.loading`):u===void 0?s===null?m_(a.value):c?t(`taskForm.address.missing`,{environment:s}):t(`taskForm.address.pair`,{environment:s,host:m_(a.value)}):t(`taskForm.address.cell`,{application:u.application,environment:u.environment}),f=e=>{i.setValue(e.environmentId),a.setValueFor(e.environmentId,e.url),r(`closed`)};return/* @__PURE__ */ (0,Z.jsx)(Yt,{side:`top`,collisionAvoidance:nn,title:t(n===`custom`?`taskForm.address.panelLabel`:`taskForm.address.menuLabel`),open:n!==`closed`,onOpenChange:e=>r(e?`menu`:`closed`),trapFocus:!0,className:n===`custom`?`w-[420px] max-w-[calc(100vw-32px)] gap-3`:`w-[340px] max-w-[calc(100vw-32px)] p-1`,"data-testid":n===`custom`?`task-form-address-panel`:`task-form-address-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:c_,"aria-label":t(`taskForm.address.label`,{address:d}),disabled:e.held,"data-testid":`task-form-address`,children:[/* @__PURE__ */ (0,Z.jsx)(Ce,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:d}),/* @__PURE__ */ (0,Z.jsx)(l_,{})]}),children:n===`custom`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,children:/* @__PURE__ */ (0,Z.jsx)(o_,{state:e.address,disabled:e.held})}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":t(`taskForm.address.menuLabel`),className:`flex flex-col`,children:[o.error!==null||i.loadError!==null?/* @__PURE__ */ (0,Z.jsxs)(p_,{children:[t(`launchAddress.environment.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:()=>{o.error!==null&&o.reload(),i.loadError!==null&&i.reload()},className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:t(`taskForm.scope.retry`)})]}):l===null?/* @__PURE__ */ (0,Z.jsx)(p_,{children:t(`taskForm.address.loading`)}):l.map(e=>/* @__PURE__ */ (0,Z.jsx)(u_,{icon:Ce,title:t(`taskForm.address.cell`,{application:e.application,environment:e.environment}),hint:m_(e.url),checked:(u==null?void 0:u.targetId)===e.targetId,onSelect:()=>f(e),testId:`task-form-address-cell-${e.targetId}`},e.targetId)),/* @__PURE__ */ (0,Z.jsx)(f_,{}),/* @__PURE__ */ (0,Z.jsx)(u_,{icon:ye,title:t(`taskForm.address.custom`),checked:!1,onSelect:()=>r(`custom`),testId:`task-form-address-custom`})]})})}var y_=`inline-flex h-6 items-center gap-1 rounded-full border border-solid px-2.5 font-mono text-caption transition-[border-color,background-color,color] duration-(--motion-short) ease-(--ease-out) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled [&>svg]:size-3 [&>svg]:shrink-0`;function b_({login:e,disabled:t}){let{t:n}=Qe(),{variables:r,chosen:i}=e,a=r.kind===`ready`?r.variables:[],o=new Set(a.map(e=>e.name)),s=r.kind===`ready`?i.filter(e=>!o.has(e)):[];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`group`,"aria-label":n(`taskForm.login.label`),className:`flex flex-wrap items-center gap-1.5 text-caption text-fg-muted`,"data-testid":`task-form-login`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 pr-1`,children:[/* @__PURE__ */ (0,Z.jsx)(zr,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),n(`taskForm.login.lead`)]}),r.kind===`no_environment`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.noEnvironment`)}),r.kind===`reading`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.reading`)}),r.kind===`failed`&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[n(`taskForm.login.failed`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:r.retry,className:`cursor-pointer border-0 bg-transparent p-0 text-caption text-fg-link hover:underline`,children:n(`taskForm.scope.retry`)})]}),r.kind===`ready`&&a.length===0&&s.length===0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n(`taskForm.login.empty`)}),a.map(r=>{let a=i.includes(r.name);return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":a,disabled:t,onClick:()=>e.toggle(r.name,!a),"data-testid":`task-form-login-${r.name}`,className:P(y_,a?`border-[color-mix(in_srgb,var(--color-primary)_55%,transparent)] bg-(--color-bg-primary-tint-15) text-(--color-primary-text)`:`border-stroke bg-surface-secondary text-fg-secondary enabled:hover:border-stroke-hover enabled:hover:text-fg-primary`),children:[r.isSecret&&/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-label":n(`taskForm.login.secret`)}),r.name]},r.name)}),s.map(r=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":!0,disabled:t,onClick:()=>e.toggle(r,!1),"data-testid":`task-form-login-gone-${r}`,className:P(y_,`border-(--color-border-warning) bg-(--color-warning-bg) text-fg-primary [&>svg]:text-(--color-warning-text)`),children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),r,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n(`taskForm.login.gone`)})]},r))]})}var x_={text:An,auto:mi};function S_({value:e,onChange:t,disabled:n}){let{t:r}=Qe(),[i,a]=(0,B.useState)(!1),o=r(e===null?`taskForm.scenarioKind.unset`:`taskForm.scenarioKind.short.${e}`),s=e===null?An:x_[e];return/* @__PURE__ */ (0,Z.jsx)(Yt,{side:`top`,collisionAvoidance:nn,title:r(`taskForm.scenarioKind.menuLabel`),open:i,onOpenChange:a,className:`w-[340px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scenario-kind-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:P(c_,e===null&&`border-(--color-border-warning)! bg-(--color-warning-bg)! [&>svg]:text-(--color-warning-text)!`),"aria-label":r(`taskForm.scenarioKind.label`,{kind:o}),disabled:n,"data-testid":`task-form-scenario-kind`,"data-unset":e===null||void 0,children:[/* @__PURE__ */ (0,Z.jsx)(s,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:r(`taskForm.scenarioKind.chip`,{kind:o})}),/* @__PURE__ */ (0,Z.jsx)(l_,{})]}),children:/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":r(`taskForm.scenarioKind.menuLabel`),className:`flex flex-col`,children:Vt.map(n=>/* @__PURE__ */ (0,Z.jsx)(u_,{icon:x_[n],title:r(`taskForm.scenarioKind.items.${n}`),hint:r(`taskForm.scenarioKind.hints.${n}`),checked:e===n,onSelect:()=>{t(n),a(!1)},testId:`task-form-scenario-kind-${n}`},n))})})}function C_({mode:e,className:t}){switch(e){case`observe`:return/* @__PURE__ */ (0,Z.jsx)(Cn,{"aria-hidden":`true`,className:t});case`main`:return/* @__PURE__ */ (0,Z.jsx)(Xt,{"aria-hidden":`true`,className:t});case`dangerous`:return/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`,className:t})}}function w_({allowed:e,onToggle:t,disabled:n,captureApi:r,site:i}){let{t:a}=Qe(),o=e.map(e=>a(`taskForm.allow.short.${e}`)).join(`, `),s=i===null?e.length===0?a(`taskForm.allow.projectOnlyNone`):a(`taskForm.allow.projectOnly`,{list:o}):a(`taskForm.allow.chip`,{site:i.value===null?a(`taskForm.site.unset`):a(`taskForm.site.chip.${i.value}`),project:e.length===0?a(`taskForm.allow.projectNone`):a(`taskForm.allow.project`,{list:o})}),c=i!==null&&i.value===`dangerous`,u=i!==null&&i.value===null||r!==null&&r.checked===null;return/* @__PURE__ */ (0,Z.jsxs)(l,{label:a(`taskForm.allow.menuName`),side:`top`,className:`w-[360px] max-w-[calc(100vw-16px)]`,matchTriggerWidth:!1,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:n,"data-testid":`task-form-allow`,"data-site":i===null||i.value===null?void 0:i.value,"data-unset":u||void 0,className:P(`inline-flex h-7 max-w-full min-w-0 items-center gap-1.5 rounded-full border border-solid pr-[7px] pl-[9px] text-xs font-medium whitespace-nowrap transition-[border-color,background-color,color] duration-(--motion-short) aria-expanded:border-(--color-border-focus) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,c?`border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) text-(--color-error-text)`:u?`border-(--color-border-warning) bg-(--color-warning-bg) text-fg-secondary enabled:hover:text-fg-primary [&>svg:first-child]:text-(--color-warning-text)`:`border-[color-mix(in_srgb,var(--color-primary)_30%,transparent)] bg-(--color-bg-primary-tint) text-fg-secondary enabled:hover:text-fg-primary`),children:[c?/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}):/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:s}),/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`,className:P(`size-3 shrink-0`,c?`text-current`:`text-fg-muted`)})]}),children:[i!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Pe,{label:a(`taskForm.site.menuLabel`),children:/* @__PURE__ */ (0,Z.jsx)(D,{value:i.value,onValueChange:i.onChange,children:bt.map(e=>/* @__PURE__ */ (0,Z.jsx)(k,{value:e,label:a(`taskForm.site.menu.${e}`),hint:a(`taskForm.site.hints.${e}`),icon:/* @__PURE__ */ (0,Z.jsx)(C_,{mode:e}),...e===`dangerous`?{tone:`danger`}:{},keepOpen:!0,"data-testid":`task-form-site-${e}`},e))})}),c&&/* @__PURE__ */ (0,Z.jsx)(T_,{lead:a(`taskForm.site.warnMenuLead`),className:`mx-1 mt-1 mb-2`,children:a(`taskForm.site.warnMenu`)}),/* @__PURE__ */ (0,Z.jsx)(ne,{})]}),/* @__PURE__ */ (0,Z.jsx)(Pe,{label:a(`taskForm.allow.menuLabel`),children:Ot.map(n=>/* @__PURE__ */ (0,Z.jsx)(M,{label:a(`taskForm.allow.items.${n}`),hint:a(`taskForm.allow.hints.${n}`),checked:e.includes(n),onCheckedChange:e=>t(n,e),"data-testid":`task-form-allow-${n}`},n))}),r!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(ne,{}),r.checked===null?/* @__PURE__ */ (0,Z.jsx)(Pe,{label:a(`taskForm.allow.captureApiAsk`),children:/* @__PURE__ */ (0,Z.jsxs)(D,{value:null,onValueChange:e=>r.onCheckedChange(e===`record`),children:[/* @__PURE__ */ (0,Z.jsx)(k,{value:`record`,label:a(`taskForm.allow.captureApiRecord`),hint:a(`taskForm.allow.captureApiHint`),keepOpen:!0,"data-testid":`task-form-capture-api-record`}),/* @__PURE__ */ (0,Z.jsx)(k,{value:`skip`,label:a(`taskForm.allow.captureApiSkip`),keepOpen:!0,"data-testid":`task-form-capture-api-skip`})]})}):/* @__PURE__ */ (0,Z.jsx)(M,{label:a(`taskForm.allow.captureApi`),hint:a(`taskForm.allow.captureApiHint`),checked:r.checked,onCheckedChange:r.onCheckedChange,"data-testid":`task-form-capture-api`})]}),/* @__PURE__ */ (0,Z.jsx)(Ae,{icon:/* @__PURE__ */ (0,Z.jsx)(Zt,{}),children:a(`taskForm.allow.deleteAlwaysAsks`)})]})}function T_({lead:e,children:t,className:n,"data-testid":r}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`note`,className:P(`m-0 flex items-center gap-2 rounded-md border border-solid border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) px-3 py-2 text-xs text-fg-primary animate-(--animation-alert-in) motion-reduce:animate-none`,n),"data-testid":r,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-(--color-error-text)`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`font-semibold text-(--color-error-text)`,children:e}),` `,t]})]})}var E_=[`ask`,`bypass`],D_={ask:Xn,bypass:Ke};function O_({value:e,onChange:t,disabled:n}){let{t:r}=Qe(),i=D_[e];return/* @__PURE__ */ (0,Z.jsx)(l,{label:r(`taskForm.mode.menuLabel`),side:`top`,className:`w-[300px]`,matchTriggerWidth:!1,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:n,"aria-label":r(`taskForm.mode.chipLabel`,{mode:r(`taskForm.mode.${e}`)}),"data-testid":`task-form-mode`,"data-mode":e,className:`inline-flex h-7 items-center gap-1.5 rounded-full border border-solid border-(--color-border) bg-transparent pr-[7px] pl-[9px] text-xs font-medium whitespace-nowrap text-fg-secondary transition-[border-color,background-color,color,box-shadow] duration-(--motion-short) enabled:hover:border-(--color-border-hover) enabled:hover:text-fg-primary aria-expanded:border-(--color-border-focus) aria-expanded:shadow-(--glow-primary-sm) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-50`,children:[/* @__PURE__ */ (0,Z.jsx)(i,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),r(`taskForm.mode.${e}`),/* @__PURE__ */ (0,Z.jsx)(Be,{"aria-hidden":`true`,className:`size-3 shrink-0 text-fg-muted`})]}),children:/* @__PURE__ */ (0,Z.jsx)(D,{value:e,onValueChange:t,children:E_.map(e=>{let t=D_[e];return/* @__PURE__ */ (0,Z.jsx)(k,{value:e,label:r(`taskForm.mode.${e}`),hint:r(`taskForm.mode.hints.${e}`),icon:/* @__PURE__ */ (0,Z.jsx)(t,{}),"data-testid":`task-form-mode-${e}`},e)})})})}function k_(e){switch(e.kind){case`project`:return{kind:`project`};case`scenarios`:return{kind:`scenarios`,scenarioIds:[...e.scenarioIds]};case`test_run`:return{kind:`test_run`,testRunId:e.testRunId};case`test_plan`:return{kind:`test_plan`,testPlanId:e.testPlanId}}}function A_(e){let[t,...n]=e;return t===void 0?null:{kind:`scenarios`,scenarioIds:[t.id,...n.map(e=>e.id)],firstName:t.name}}function j_(e,t){let n=e.resultsWriter;return n===null?{kind:`nobody`}:n.userId===t?{kind:`mine`,relation:e.testPlanId===null?`free`:`plan`}:{kind:`other`,writer:n.userDisplayName===null?n.userEmail:n.userDisplayName}}function M_(e,t){return e.data===void 0?e.error===null?{status:`loading`}:{status:`failed`,retry:t}:{status:`ready`,items:e.data.items,total:e.data.total}}function N_(e,t,n){let r=C(),i=(0,B.useDeferredValue)(t.trim()),a=(0,B.useCallback)(async t=>{let n=await r.testRuns.listUnified({projectId:e,launchKind:`test_run`,status:`in_progress`,limit:50,offset:0,...i===``?{}:{search:i}},{signal:t});return{items:n.items.filter(e=>e.kind===`run`),total:n.total}},[r,e,i]),o=d({fetcher:a,deps:[e,i],enabled:n}),s=(0,B.useCallback)(async t=>{let n=await or(t=>r.assignedPlans.list(e,{state:`unfinished`,...t}),t,{pageSize:500,route:`GET /test-plans/project/:id/assigned-to-me`});return{items:n,total:n.length}},[r,e]),c=d({fetcher:s,deps:[e],enabled:n});return{runs:M_(o,o.reload),plans:M_(c,c.reload)}}var P_={project:dn,scenarios:Ur,test_run:Or,test_plan:fn};function F_({state:e,viewerId:t,scenarioPicker:n}){let{t:r}=Qe(),[i,a]=(0,B.useState)(!1),[o,s]=(0,B.useState)(!1),[c,l]=(0,B.useState)(null),{scope:u,scopeRequest:d}=e,f=d===`scenarios`&&n!==null,p=i||d!==null&&!f,m=o||f,h=()=>{a(!1),e.clearScopeRequest()},g=()=>{s(!1),e.clearScopeRequest()},_=B_(u,r),v=P_[u.kind];return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Yt,{side:`top`,collisionAvoidance:nn,title:r(`taskForm.scope.menuLabel`),description:d===null?void 0:r(`taskForm.scope.suggested`),open:p,onOpenChange:e=>{if(!e){h();return}m&&g(),a(!0)},className:`w-[380px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scope-menu`,trigger:/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:l,type:`button`,className:P(c_,e.scopeSuggested&&`border-(--color-border-primary-tint-55)! bg-(--color-bg-primary-tint)! animate-(--animation-scope-suggest) motion-reduce:animate-none`),"aria-label":r(`taskForm.scope.label`,{scope:_.text}),disabled:e.held,"data-testid":`task-form-scope`,children:[/* @__PURE__ */ (0,Z.jsx)(v,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:_.text}),_.detail!==null&&/* @__PURE__ */ (0,Z.jsx)(`em`,{className:`truncate text-fg-muted not-italic`,children:_.detail}),/* @__PURE__ */ (0,Z.jsx)(l_,{})]}),children:p&&/* @__PURE__ */ (0,Z.jsx)(I_,{state:e,viewerId:t,offerScenarios:n!==null,onPicked:h,onScenarios:()=>{h(),s(!0)}})}),n!==null&&c!==null&&/* @__PURE__ */ (0,Z.jsx)(Yt,{anchor:c,open:m,onOpenChange:e=>{e||g()},side:`top`,collisionAvoidance:nn,title:r(`taskForm.scope.scenariosListLabel`),titleVisible:!1,className:`w-[400px] max-w-[calc(100vw-32px)] p-1`,"data-testid":`task-form-scenario-list`,children:m&&n({onPick:t=>{let n=A_(t);n!==null&&e.setScope(n),g()}})})]})}function I_({state:e,viewerId:t,offerScenarios:n,onPicked:r,onScenarios:i}){let{t:a}=Qe(),[o,s]=(0,B.useState)(``),c=N_(e.projectId,o,!0),{scope:l}=e,u=t=>{e.setScope(t),r()};return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`radiogroup`,"aria-label":a(`taskForm.scope.menuLabel`),className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsx)(u_,{icon:dn,title:a(`taskForm.scope.project`),checked:l.kind===`project`,onSelect:()=>u({kind:`project`}),testId:`task-form-scope-project`}),n&&/* @__PURE__ */ (0,Z.jsx)(u_,{icon:Ur,title:a(`taskForm.scope.scenariosPick`),hint:a(`taskForm.scope.scenariosPickHint`),checked:l.kind===`scenarios`,onSelect:i,testId:`task-form-scope-scenarios`}),/* @__PURE__ */ (0,Z.jsx)(f_,{}),/* @__PURE__ */ (0,Z.jsx)(d_,{children:a(`taskForm.scope.runsHeader`)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-2 pb-1`,children:/* @__PURE__ */ (0,Z.jsx)(wn,{value:o,onValueChange:s,"aria-label":a(`taskForm.scope.runsSearch`),placeholder:a(`taskForm.scope.runsSearch`),clearLabel:a(`taskForm.scope.runsSearchClear`),look:`quiet`})}),/* @__PURE__ */ (0,Z.jsx)(L_,{list:c.runs,empty:a(`taskForm.scope.runsEmpty`),render:e=>{let n=j_(e,t),r=R_(e);return/* @__PURE__ */ (0,Z.jsx)(u_,{icon:n.kind===`mine`?Or:xn,title:z_(r,a),hint:n.kind===`mine`?n.relation===`free`?a(`taskForm.scope.runMine`):a(`taskForm.scope.runAssigned`):n.kind===`other`?a(`taskForm.scope.runForbidden`,{name:n.writer}):a(`taskForm.scope.runForbiddenNobody`),disabled:n.kind!==`mine`,checked:l.kind===`test_run`&&l.testRunId===e.id,onSelect:()=>u({kind:`test_run`,testRunId:e.id,run:r}),testId:`task-form-scope-run-${e.id}`},e.id)}}),/* @__PURE__ */ (0,Z.jsx)(f_,{}),/* @__PURE__ */ (0,Z.jsx)(d_,{children:a(`taskForm.scope.plansHeader`)}),/* @__PURE__ */ (0,Z.jsx)(L_,{list:c.plans,empty:a(`taskForm.scope.plansEmpty`),render:e=>/* @__PURE__ */ (0,Z.jsx)(u_,{icon:fn,title:e.planName,hint:a(`taskForm.scope.planHint`),checked:l.kind===`test_plan`&&l.testPlanId===e.planId,onSelect:()=>u({kind:`test_plan`,testPlanId:e.planId,planName:e.planName}),testId:`task-form-scope-plan-${e.planId}`},e.planId)})]})}function L_({list:e,empty:t,render:n}){let{t:r}=Qe();if(e.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(p_,{children:r(`taskForm.scope.loading`)});if(e.status===`failed`)return/* @__PURE__ */ (0,Z.jsxs)(p_,{children:[r(`taskForm.scope.loadError`),` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,onClick:e.retry,className:`cursor-pointer border-0 bg-transparent p-0 text-xs text-fg-link hover:underline`,children:r(`taskForm.scope.retry`)})]});if(e.items.length===0)return/* @__PURE__ */ (0,Z.jsx)(p_,{children:t});let i=e.total-e.items.length;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex max-h-56 flex-col overflow-y-auto`,children:[e.items.map(n),i>0&&/* @__PURE__ */ (0,Z.jsx)(p_,{children:r(`taskForm.scope.more`,{count:i})})]})}function R_(e){return{number:e.number,name:e.name}}function z_(e,t){return`${t(`taskForm.scope.runNumber`,{number:String(e.number).padStart(3,`0`)})} \u00B7 ${e.name===null?t(`taskForm.scope.runUntitled`):e.name}`}function B_(e,t){switch(e.kind){case`project`:return{text:t(`taskForm.scope.project`),detail:null};case`scenarios`:{let n=e.scenarioIds.length;return{text:t(`taskForm.scope.scenarios`,{count:n}),detail:e.firstName===null?null:n===1?t(`taskForm.scope.scenariosFirst`,{name:e.firstName}):t(`taskForm.scope.scenariosMore`,{name:e.firstName,count:n-1})}}case`test_run`:return{text:t(`taskForm.scope.testRun`,{name:z_(e.run,t)}),detail:null};case`test_plan`:return{text:t(`taskForm.scope.testPlan`,{name:e.planName}),detail:null}}}function V_({state:e,variant:t,viewerId:n,scenarioPicker:r,launchSlot:i,notice:a,launchLabel:o,"data-testid":c}){let{t:l}=Qe(),{navigation:u}=E(),{locale:d}=e,f=kf[d].shell.composer,p={...En(),rows:{normal:l(`taskForm.effortRows.normal`),thinking:l(`taskForm.effortRows.thinking`),max:l(`taskForm.effortRows.max`)}},m=(0,B.useId)(),h=(0,B.useRef)(null),g=(0,B.useCallback)(()=>{let e=h.current;e!==null&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight+2}px`)},[]);(0,B.useLayoutEffect)(g,[g,e.draft.brief]),(0,B.useEffect)(()=>(window.addEventListener(`resize`,g),()=>window.removeEventListener(`resize`,g)),[g]);let _=t===`inline`,v=t!==`dialog`,y=e.submitting,b=e.draft.allowedChanges.includes(`write_tests`),{questions:x}=e,S=e.held,C=t=>{t.key===`Enter`&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),e.launch())},w=e.blocked===null?null:l(`taskForm.blocked.${e.blocked}`);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`relative flex flex-col`,t===`card`&&`min-h-0 flex-1`,_&&`rounded-2xl border border-solid border-stroke-hover bg-surface-card shadow-(--shadow-lg)`),..._?{role:`region`,"aria-label":l(`taskForm.title`)}:{},"aria-busy":y||void 0,"data-testid":c,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`relative flex flex-col`,v?`px-4 pt-4 pb-3`:`px-6 pt-4 pb-5`,t===`card`&&`min-h-0 flex-1 overflow-y-auto [scrollbar-width:thin]`),inert:y,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`rounded-xl border border-solid border-stroke-hover bg-surface-primary transition-[border-color,box-shadow] duration-(--motion-short) ease-(--ease-out) focus-within:border-stroke-focus focus-within:shadow-(--glow-primary)`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{htmlFor:m,className:`sr-only`,children:l(`taskForm.briefLabel`)}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:h,id:m,value:e.draft.brief,onChange:t=>e.setBrief(t.target.value),onBlur:e.commitBrief,onKeyDown:C,placeholder:l(`taskForm.placeholder`),disabled:S,className:P(`block w-full resize-none border-0 bg-transparent px-4 pt-4 pb-2 font-sans text-[length:var(--text-body-md)] leading-[1.6] tracking-control whitespace-pre-wrap text-fg-primary outline-none placeholder:text-fg-muted`,_?`min-h-[72px]`:`min-h-24`),"data-testid":`task-form-brief`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`group`,"aria-label":l(`taskForm.chipsLabel`),className:`flex flex-wrap gap-1.5 px-3 pb-3`,children:md.map(t=>/* @__PURE__ */ (0,Z.jsx)(U_,{id:t,locale:d,pressed:e.draft.presetId===t,disabled:S,onPress:()=>e.pressChip(t)},t))})]}),x.brief!==void 0&&/* @__PURE__ */ (0,Z.jsx)(H_,{field:`brief`,text:x.brief}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[/* @__PURE__ */ (0,Z.jsx)(F_,{state:e,viewerId:n,scenarioPicker:r}),e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(v_,{state:e}),b&&/* @__PURE__ */ (0,Z.jsx)(S_,{value:e.draft.newScenarioKind,onChange:e.setScenarioKind,disabled:S})]}),e.login!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-2`,children:/* @__PURE__ */ (0,Z.jsx)(b_,{login:e.login,disabled:S})}),x.entryUrl!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(H_,{field:`entryUrl`,text:x.entryUrl}),x.newScenarioKind!==void 0&&b&&/* @__PURE__ */ (0,Z.jsx)(H_,{field:`newScenarioKind`,text:x.newScenarioKind}),e.scopeSuggested&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`status`,className:`mt-2 mb-0 flex items-center gap-1.5 text-caption text-fg-muted`,"data-testid":`task-form-scope-suggested`,children:[/* @__PURE__ */ (0,Z.jsx)(oi,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-(--color-primary-text)`}),l(`taskForm.scope.suggestedByChip`)]}),e.withBrowser&&e.draft.standMode===`dangerous`&&/* @__PURE__ */ (0,Z.jsx)(T_,{lead:l(`taskForm.site.warnFieldLead`),className:`mt-4`,"data-testid":`task-form-site-warning`,children:l(`taskForm.site.warnField`)}),!e.withBrowser&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`mt-4 mb-0 flex items-center gap-2 rounded-md bg-surface-hover-layer px-3 py-2 text-xs text-fg-secondary`,"data-testid":`task-form-no-browser`,children:[/* @__PURE__ */ (0,Z.jsx)(kr,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-fg-muted`}),l(`taskForm.noBrowser`)]}),x.standMode!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(H_,{field:`standMode`,text:x.standMode}),x.captureApi!==void 0&&e.withBrowser&&/* @__PURE__ */ (0,Z.jsx)(H_,{field:`captureApi`,text:x.captureApi}),e.error!==null&&/* @__PURE__ */ (0,Z.jsx)(G_,{error:e.error,locale:d,onAction:t=>t===`addresses`?u.openInWeb({kind:`environment-addresses`,projectRef:s(e.projectId)},`new-tab`):u.openInWeb({kind:`ai-settings`},`new-tab`)}),a!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-4`,children:a})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`relative flex flex-none flex-wrap items-center gap-2 border-t border-solid border-stroke-light bg-(--modal-footer-bg) py-3 pr-4`,t===`card`?`rounded-b-sm pl-4`:v?`rounded-b-2xl pl-4`:`rounded-b-2xl pl-6`),children:[/* @__PURE__ */ (0,Z.jsx)(Bg,{place:e.place.place,view:e.place.view,fleet:e.place.fleet,onChoose:e.choosePlace,onOpen:e.place.reloadFleet,copy:f.place,heading:!1,thisBrowserReach:`opens_windows`,look:`chip`,disabled:S}),/* @__PURE__ */ (0,Z.jsx)(on,{choice:e.effort.choice,facts:e.effort.facts,onChoose:e.effort.choose,onAgentsChange:e.effort.setAgents,onOpenSettings:()=>u.openInWeb({kind:`ai-settings`},`new-tab`),copy:p,look:Kt,disabled:S||e.effort.locked}),e.mode!==null&&/* @__PURE__ */ (0,Z.jsx)(O_,{value:e.mode.value,onChange:e.mode.set,disabled:S}),/* @__PURE__ */ (0,Z.jsx)(w_,{allowed:e.draft.allowedChanges,onToggle:e.setAllowed,disabled:S,captureApi:e.withBrowser?{checked:e.draft.captureApi,onCheckedChange:e.setCaptureApi}:null,site:e.withBrowser?{value:e.draft.standMode,onChange:e.setStandMode}:null}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[i,/* @__PURE__ */ (0,Z.jsx)(fe,{disabled:w!==null,reason:w===null?``:w,children:/* @__PURE__ */ (0,Z.jsx)(I,{type:`button`,variant:`primary`,size:`md`,className:`h-10! rounded-lg! px-5! text-body-sm!`,icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{"aria-hidden":`true`}),loading:y,loadingLabel:l(`taskForm.launching`),onClick:()=>void e.launch(),"data-testid":`task-form-launch`,children:o===void 0?l(`taskForm.launch`):o})})]}),e.effort.loadError!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 basis-full text-caption text-(--color-error-text)`,children:l(`launchEffort.loadError`)})]})]})}function H_({field:e,text:t}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`mt-2 mb-0 flex items-start gap-1.5 text-caption text-fg-secondary`,"data-testid":`task-form-question-${e}`,children:[/* @__PURE__ */ (0,Z.jsx)(Tr,{"aria-hidden":`true`,className:`mt-px size-[13px] shrink-0 text-(--color-warning-text)`}),t]})}function U_({id:e,locale:t,pressed:n,disabled:r,onPress:i}){let a=Vg[e],o=gd(e);return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":n,disabled:r,onClick:i,"data-testid":`task-form-chip-${e}`,className:P(`inline-flex h-7 items-center gap-1.5 rounded-full border border-dashed border-stroke-hover bg-transparent pr-3 pl-2 text-xs text-fg-secondary`,`transition-[border-color,background-color,color] duration-(--motion-short) ease-(--ease-out)`,`enabled:hover:border-solid enabled:hover:bg-surface-hover-layer enabled:hover:text-fg-primary`,`aria-pressed:border-solid aria-pressed:border-[color-mix(in_srgb,var(--color-primary)_55%,transparent)] aria-pressed:bg-(--color-bg-primary-tint-15) aria-pressed:text-(--color-primary-text)`,`focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--color-border-focus) disabled:cursor-default disabled:opacity-disabled`),children:[/* @__PURE__ */ (0,Z.jsx)(a,{"aria-hidden":`true`,className:P(`size-[13px]`,n?`text-(--color-primary-text)`:`text-fg-muted`)}),o.title[t]]})}function W_(e,t){let[n,r]=Array.from(e);if(n===void 0||r===void 0)return e;let i=n.toLocaleLowerCase(t),a=r!==r.toLocaleUpperCase(t);return i!==n&&a?`${i}${e.slice(n.length)}`:e}function G_({error:e,locale:t,onAction:n}){let{t:r}=Qe();return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`alert`,className:`mt-4 mb-0 flex items-center gap-3 rounded-md border border-solid border-(--color-border-error-soft) bg-(--color-bg-error-tint-subtle) p-3 text-xs text-fg-primary animate-(--animation-alert-in) motion-reduce:animate-none`,"data-testid":`task-form-error`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-(--color-error-text)`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0`,children:e.kind===`refused`?r(`taskForm.errors.notStarted`,{reason:W_(e.reason,t)}):e.text}),e.kind===`refused`&&e.action!==null&&/* @__PURE__ */ (0,Z.jsx)(I,{type:`button`,variant:`secondary`,size:`sm`,className:`ml-auto shrink-0`,onClick:()=>{e.action!==null&&n(e.action)},"data-testid":`task-form-error-action`,children:r(`taskForm.errors.action.${e.action}`)})]})}function K_({tone:e=`error`,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`qa-card-kit__alert`,e===`warning`&&`qa-card-kit__alert--warning`),role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t})]})}function q_({question:e,body:t,children:n}){let r=(0,B.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__confirm`,role:`group`,"aria-labelledby":r,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:r,children:e}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__confirm-actions`,children:n})]})}function J_(e,t){return e.filter(e=>e.command!==`chat-stop`&&e.toolCallId===t)}function Y_({toolCallId:e}){let{commandFailures:t}=$f(),n=$().cards.common.commandFailure,r=J_(t,e),i=r[r.length-1];if(i===void 0)return null;let a=i.command===`chat-tool-confirm`?n.confirm:n.reject;return/* @__PURE__ */ (0,Z.jsx)(K_,{children:`${a} ${n.reason[i.reason]}`})}var X_={scope:null,placeToOpening:!1};function Z_(e){return e.trim()===``||hd(e)}function Q_(e,t){let{chip:n}=gd(e);if(n===null)throw Error(`Preset ${e} is in PRESET_CHIP_ORDER but has no chip`);return n.briefTemplate[t]}function $_(e){let t=gd(e).defaultAllowedChanges;if(t===null)throw Error(`Preset ${e} is a chip but has no \u00AB\u041C\u043E\u0436\u043D\u043E\u00BB defaults`);return Ot.filter(e=>t.includes(e))}function ev(e,t,n){if(e.presetId===t)return{draft:{...e,presetId:`custom`},effects:X_};let r=gd(t),i=Z_(e.brief)?Q_(t,n.locale):e.brief,a=$_(t);return{draft:{brief:i,presetId:t,allowedChanges:a,newScenarioKind:nv(a,e.newScenarioKind),captureApi:r.defaultCaptureApi,standMode:e.standMode},effects:{scope:n.scopeKind===`project`?tv(r.suggestedScopeKinds):null,placeToOpening:n.placeIsNone&&r.browserSuggested}}}function tv(e){let[t]=e;return t===`project`||e.includes(`project`)?null:t===`test_run`?{kind:`latest_test_run`}:{kind:`open`,on:t}}function nv(e,t){return e.includes(`write_tests`)?t:null}function rv(e,t){return t&&(e.captureApi===null||e.standMode===null)}function iv(e,t,n){let r=new Set(e.allowedChanges);n?r.add(t):r.delete(t);let i=Ot.filter(e=>r.has(e));return{...e,allowedChanges:i,newScenarioKind:nv(i,e.newScenarioKind)}}var av=[`make_auto`,`atlas_crawl`,`swarm`,`scenario_launch`],ov=[`pending_enroll`,`active`,`revoked`],sv=[`not_owner`,`pending_enroll`,`offline`,`capability_missing`,`queue_full`,`ready`],cv=[`not_enrolled`,`none_ready`,`one_ready`,`many_ready`],lv=[`agents.no_dispatch_target`,`agents.offline`,`agents.runner_ambiguous`],uv=vt(av),dv=z({queued:R().int().min(0),limit:R().int().min(0),remaining:R().int().min(0)}),fv=z({lifecycle:vt(ov),lastSeenAt:St().nullable(),online:dt(),declaredCapabilities:yt(L()).nullable(),queue:z({runs:dv,jobs:dv}),activeRun:z({id:L(),scenarioId:L(),scenarioName:L(),status:jt}).nullable(),activeJob:z({id:L(),kind:uv,scenariosTotal:R().int().min(0).nullable()}).nullable()}),pv=z({agentId:L(),name:L(),hostname:L().nullable(),platform:Ne.nullable(),agentVersion:L().nullable(),state:vt(sv),blocker:z({errorCode:vt([`agents.not_owner`,`agents.offline`,`agents.capability_missing`,`agents.queue_full`]),httpStatus:Lt([zt(403),zt(409)])}).nullable(),facts:fv}),mv=z({resultKind:zt(`runner_readiness`),readinessFor:uv,capability:L(),evaluatedAt:St(),presenceWindowMs:R().int().min(0),resolution:et(`kind`,[z({kind:zt(`resolved`),agentId:L(),name:L()}),z({kind:zt(`refused`),errorCode:vt(lv)})]),fleetState:vt(cv),runners:yt(pv),total:R().int().min(0)}),hv=z({resultKind:zt(`runner_enrollment_instructions`),readinessFor:uv,instructions:z({packageName:L(),installCommand:L(),enrollCommand:L(),startCommand:L(),approvalUrlPattern:L(),requestTtlSec:R().int().min(0),pollIntervalSec:R().int().min(0),steps:yt(L())}),expiresAt:St()}),gv=z({id:xt(),name:L().min(1),ownerName:L().min(1),mine:dt(),lifecycle:vt(ov),online:dt(),activeRun:z({}).loose().nullable(),activeJob:z({}).loose().nullable().optional()}),_v=z({items:yt(gv),total:R().int(),offset:R().int()});async function vv(e,t){return(await sr(t=>e.request({method:qn.agentList.method,path:qn.agentList.path(t),schema:_v}),t)).map(e=>({id:e.id,name:e.name,ownerName:e.ownerName,mine:e.mine,block:ir(e),occupied:ar(e)}))}function yv({http:e,ready:t}){let[n,r]=(0,B.useState)({status:`idle`}),[i,a]=(0,B.useState)(0),o=(0,B.useCallback)(()=>a(e=>e+1),[]);return(0,B.useEffect)(()=>{if(!t)return;let n=new AbortController;return r(e=>e.status===`ready`?e:{status:`loading`}),vv(e,n.signal).then(e=>{n.signal.aborted||r({status:`ready`,runners:e})},()=>{n.signal.aborted||r(e=>e.status===`ready`?e:{status:`failed`})}),()=>n.abort()},[t,e,i]),(0,B.useEffect)(()=>{if(!t)return;let e=()=>{document.visibilityState===`visible`&&o()};return window.addEventListener(`focus`,o),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,o),document.removeEventListener(`visibilitychange`,e)}},[t,o]),{fleet:n,reloadFleet:o}}function bv(e){let t=e.find(e=>e.block===null);return t===void 0?{kind:`this_browser`}:{kind:`runner`,agentId:t.id}}function xv(e,t){if(e.kind!==`runner`)return e;if(t.status!==`ready`)return{kind:`runner-unread`,agentId:e.agentId};let n=t.runners.find(t=>t.id===e.agentId);return n===void 0?{kind:`runner-gone`,agentId:e.agentId}:{kind:`runner`,runner:n}}function Sv({http:e,ready:t}){let[n,r]=(0,B.useState)(te),{fleet:i,reloadFleet:a}=yv({http:e,ready:t});return{place:n,view:(0,B.useMemo)(()=>xv(n,i),[n,i]),fleet:i,choose:r,reloadFleet:a}}function Cv({title:e,subtitle:t,onDiscard:n,discarding:r,children:i,testState:a}){let{t:o}=Qe(),s=(0,B.useId)();return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card`,"data-testid":`ai-launch-card`,"data-launch-card-state":a,"aria-labelledby":s,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(oi,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:[/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:s,children:e}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-subtitle`,children:t})]}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(Ue,{size:14}),loading:r,disabled:r,onClick:n,"data-testid":`ai-launch-card-discard`,children:o(`taskForm.card.discard`)})]}),i]})}function wv({children:e}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`status`,className:`m-0 flex items-start gap-2 rounded-md border border-solid border-(--color-border-primary-tint-55) bg-(--color-bg-primary-tint) px-3 py-2 text-xs leading-normal text-fg-primary`,"data-testid":`ai-launch-card-notice`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`,className:`mt-px size-3.5 shrink-0 text-(--color-primary-text)`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0`,children:e})]})}function Tv(e,t){let n=C(),[r,i]=(0,B.useState)(`idle`);return{discarding:r===`discarding`,failed:r===`failed`,discard:()=>{i(`discarding`),n.launchDrafts.discard(e.id).then(()=>t.reload(),()=>i(`failed`))}}}function Ev(e,t){switch(e.key){case`task`:return{version:t,task:e.fields};case`amend`:return{version:t,amend:e.fields};case`continue`:{let{amendment:n}=e.fields;return e.amendBase!==void 0&&n!=null?{version:t,continue:e.fields,amendBase:e.amendBase}:{version:t,continue:e.fields}}}}function Dv(e,t){if(t===null)return e;if(e===null)return t;if(e.key!==t.key)throw Error(`Draft writer: a '${t.key}' change while '${e.key}' waits`);if(t.key===`continue`&&e.key===`continue`){let n=`amendment`in t.fields?t.amendBase:e.amendBase;return{key:`continue`,fields:{...e.fields,...t.fields},...n===void 0?{}:{amendBase:n}}}return{key:t.key,fields:{...e.fields,...t.fields}}}function Ov({draft:e,adopt:t,onStale:n}){let r=C(),[i,a]=(0,B.useState)(null),o=(0,B.useRef)(e.version),s=(0,B.useRef)(null),c=(0,B.useRef)(null),l=(0,B.useRef)(null),u=e.id;(0,B.useEffect)(()=>{l.current===null&&(o.current=e.version)},[e.version]);let d=(0,B.useCallback)(async()=>{for(;;){let e=s.current;if(e===null)return o.current;s.current=null;try{let n=await r.launchDrafts.patch(u,Ev(e,o.current));o.current=n.version,t(n)}catch(t){let r=s.current;return s.current=null,t instanceof ie&&t.errorCode===`launch_drafts.version_changed`?(c.current=null,n(`version_changed`)):(c.current=Dv(e,r),a(t),n(`write_failed`)),null}}},[r,u,t,n]),f=(0,B.useCallback)(e=>{a(null);let t=c.current;c.current=null,s.current=Dv(Dv(t,s.current),e),l.current===null&&(l.current=d().finally(()=>{l.current=null}))},[d]);return{write:f,flush:(0,B.useCallback)(async()=>{let e=!1;for(;;){let t=l.current;if(t!==null){if(await t===null&&c.current===null)return null;continue}let n=c.current;if(n===null)return o.current;if(e)return null;e=!0,f(n)}},[f]),failure:i}}var kv=/* @__PURE__ */ new Set([`launch_drafts.version_changed`,`launch_drafts.not_open`,`workflows.segment_changed`,`workflows.not_amendable`,`workflows.not_continuable`]);function Av(e,t){return e===null?t.task.launchKind===`preset`?{text:``,allowedChanges:t.task.allowedChanges,newScenarioKind:t.task.newScenarioKind}:{text:``,allowedChanges:[],newScenarioKind:null}:{text:e.briefAddition===null?``:e.briefAddition,allowedChanges:e.allowedChanges,newScenarioKind:e.newScenarioKind}}function jv(e){let t=e.text.trim();return{briefAddition:t===``?null:t,allowedChanges:[...e.allowedChanges],newScenarioKind:e.newScenarioKind}}function Mv(e,t){return e.intent!==`continue`||e.continue.amendment!==null||t.task.launchKind!==`preset`?null:{allowedChanges:[...t.task.allowedChanges],newScenarioKind:t.task.newScenarioKind}}function Nv(e,t){return e.text.trim()!==``||e.newScenarioKind!==t.newScenarioKind||e.allowedChanges.length!==t.allowedChanges.length||e.allowedChanges.some(e=>!t.allowedChanges.includes(e))}function Pv({draft:e,source:t,staleNotice:n,onStale:r}){let{t:i}=Qe(),a=C(),o=kg(),s=$(),c=Q(),l=s.cards.workflow,{http:u,browser:d}=$f(),f=(0,B.useId)(),p=e.display.target;if(p===null)throw Error(`Launch draft ${e.id}: an ${e.intent} draft without its target`);let m=p.task.launchKind===`preset`?p.task:null,h=e.intent===`continue`,[g,_]=(0,B.useState)(()=>Av(e.intent===`amend`?e.amend:e.continue.amendment,p)),[v]=(0,B.useState)(()=>Mv(e,p)),[y,b]=(0,B.useState)(e.intent===`continue`?e.continue.place:null),[x,S]=(0,B.useState)(!1),[w,T]=(0,B.useState)(null),E=Ov({draft:e,adopt:t.adopt,onStale:r}),D=Tv(e,t),{fleet:O,reloadFleet:ee}=yv({http:u,ready:h}),k=t=>{if(T(null),e.intent===`amend`){E.write({key:`amend`,fields:jv(t)});return}if(p.task.launchKind!==`preset`){E.write({key:`continue`,fields:{amendment:null}});return}let n=Nv(t,v===null?{allowedChanges:p.task.allowedChanges,newScenarioKind:p.task.newScenarioKind}:v)?jv(t):null;E.write({key:`continue`,fields:{amendment:n},...v===null||n===null?{}:{amendBase:v}})},A=e=>{_(e),k(e)},j=()=>{let t=e.intent===`amend`?e.amend:e.continue.amendment;return t===null||t.briefAddition===null?``:t.briefAddition},M=()=>{g.text.trim()!==j()&&k(g)},N=e.missing.find(e=>e.field===`change`),te=c,ne=g.allowedChanges.includes(`write_tests`),re=y===null?null:xv(y,O),ae=e.intent===`amend`&&N!==void 0||ne&&g.newScenarioKind===null||re!==null&&re.kind===`runner-gone`,oe=(0,B.useRef)(!1),se=async()=>{if(!(ae||oe.current)){oe.current=!0;try{await ce()}finally{oe.current=!1}}},ce=async()=>{S(!0),T(null),M();let n=await E.flush();if(n===null){S(!1);return}try{let r=await a.launchDrafts.launch(e.id,{version:n,target:null});S(!1),h&&y!==null&&y.kind===`this_browser`&&d!==null&&d.workflowHost.attach(r.workflow.id),t.adopt(r.draft)}catch(e){if(S(!1),e instanceof ie&&e.errorCode!==void 0&&kv.has(e.errorCode)){r(`version_changed`);return}T(Pg(o,e,`taskForm.errors.launch`))}},le=h?i(`taskForm.card.continue.subtitle`,{task:l.topic(p.topic),segment:p.segment,status:l.pill[p.status]}):i(`taskForm.card.amend.subtitle`,{task:l.topic(p.topic),status:l.pill[p.status]}),ue=E.failure===null?w:i(`taskForm.card.notSaved`,{reason:Pg(o,E.failure,`taskForm.errors.launch`)}),P=x;return/* @__PURE__ */ (0,Z.jsxs)(Cv,{title:i(h?`taskForm.card.continue.title`:`taskForm.card.amend.title`),subtitle:le,onDiscard:P?null:D.discard,discarding:D.discarding,testState:e.intent,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-3 pb-3`,children:[m!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-md bg-(--color-bg-modal-inset) px-3 py-2 text-xs leading-normal`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-3 whitespace-pre-wrap text-fg-primary`,children:m.brief}),m.amendments.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-2 border-0 border-l-2 border-solid border-stroke pl-2 text-fg-secondary`,children:e.text},e.createdAt))]}),m===null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 text-xs text-fg-secondary`,children:i(`taskForm.card.continue.swarm`)}),m!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`rounded-xl border border-solid border-stroke-hover bg-surface-primary transition-[border-color,box-shadow] duration-(--motion-short) ease-(--ease-out) focus-within:border-stroke-focus focus-within:shadow-(--glow-primary)`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{htmlFor:f,className:`sr-only`,children:i(`taskForm.card.additionLabel`)}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{id:f,value:g.text,rows:3,placeholder:i(h?`taskForm.card.continue.placeholder`:`taskForm.card.amend.placeholder`),disabled:P,onChange:e=>{T(null),_({...g,text:e.target.value})},onBlur:M,className:`block w-full resize-y border-0 bg-transparent px-3 py-2.5 font-sans text-[length:var(--text-body-sm)] leading-[1.6] text-fg-primary outline-none placeholder:text-fg-muted`,"data-testid":`ai-launch-card-addition`})]}),N!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`m-0 flex items-start gap-1.5 text-caption text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(Tr,{"aria-hidden":`true`,className:`mt-px size-[13px] shrink-0 text-(--color-warning-text)`}),N.question[te]]}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(wv,{children:n}),D.failed&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:i(`taskForm.card.discardFailed`)}),ue!==null&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:ue})]})}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[h&&y!==null&&re!==null&&/* @__PURE__ */ (0,Z.jsx)(Bg,{place:y,view:re,fleet:O,onChoose:e=>{b(e),T(null),E.write({key:`continue`,fields:{place:e}})},onOpen:ee,copy:s.shell.composer.place,heading:!1,thisBrowserReach:`opens_windows`,look:`chip`,disabled:P}),m!==null&&/* @__PURE__ */ (0,Z.jsx)(w_,{allowed:g.allowedChanges,onToggle:(e,t)=>{let n=new Set(g.allowedChanges);t?n.add(e):n.delete(e);let r=Ot.filter(e=>n.has(e));A({...g,allowedChanges:r,newScenarioKind:nv(r,g.newScenarioKind)})},disabled:P,captureApi:null,site:null}),m!==null&&ne&&/* @__PURE__ */ (0,Z.jsx)(S_,{value:g.newScenarioKind,onChange:e=>A({...g,newScenarioKind:e}),disabled:P}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,className:`ml-auto`,icon:h?/* @__PURE__ */ (0,Z.jsx)(Zr,{size:14}):/* @__PURE__ */ (0,Z.jsx)(ye,{size:14}),loading:x,disabled:ae||P,onClick:()=>void se(),"data-testid":`ai-launch-card-press`,children:i(h?`taskForm.card.continue.press`:`taskForm.card.amend.press`)})]})]})}function Fv(e){let[t,n]=(0,B.useState)({key:e,value:null,save:null}),[r,i]=(0,B.useState)(null),a=t.key===e?t:{key:e,value:null,save:null},o=t=>{i(null),n(n=>({...n.key===e?n:{key:e,value:null,save:null},...t}))};return{value:a.value,save:a.save,setValue:e=>o({value:e}),setValueFor:(e,t)=>{i(null),n({key:e,value:t,save:null})},setSave:e=>o({save:e}),reset:()=>n({key:e,value:null,save:null}),saveError:r,setSaveError:i}}function Iv({projectId:e,environment:t,active:n,opening:r}){let i=C(),a=t===null?null:t.environmentId,o=a===null?``:a,c=(0,B.useCallback)(async t=>{let n=a===null?{}:{environmentId:a},r=await i.projects.crawlScope(s(e),n,{signal:t});return{key:o,scope:r}},[i,e,a,o]),{data:l,error:u,reload:f}=d({fetcher:c,deps:[e,o],enabled:n&&t!==null}),p=l===void 0||l.key!==o?void 0:l.scope,m=Fv(o),[h,g]=(0,B.useState)(r);return h!==null&&n&&t!==null&&(g(null),m.setValueFor(h.environmentId===null?o:h.environmentId,h.value)),{scope:p,scopeError:u,reloadScope:f,value:m.value===null?Lv(p):m.value,setValue:m.setValue,setValueFor:(e,t)=>m.setValueFor(e===null?``:e,t),block:p===void 0?`unread`:null}}function Lv(e){return e===void 0?``:e.startUrl.state===`resolved`?e.startUrl.url:``}function Rv(e){let t=e.trim();if(t===``)return{state:`empty`};let n=t.includes(`://`)?t:`https://${t}`,r=Me(n);if(!r.ok)return{state:`invalid`,reason:r.reason};let i=ur(r.url.origin);if(!i.ok)return{state:`invalid`,reason:i.reason};let a=r.url.href,o=a===`${r.url.origin}/`;return{state:`ok`,baseUrl:i.baseUrl,launchUrl:o?void 0:a,href:a}}var zv=`targets.not_configured`,Bv=`targets.cell_missing`,Vv=`targets.address_required`;function Hv(e){return e===zv||e===Bv||e===Vv}function Uv(e,t,n){if(t===zv)return{kind:`not_configured`};if(t===Bv){let t=n==null?void 0:n.applicationId,r=n==null?void 0:n.environmentId;return typeof t==`string`&&typeof r==`string`?{kind:`cell_missing`,applicationId:t,environmentId:r}:(e.error(`targets.cell_missing arrived without its application \u00D7 environment pair`,{params:n}),null)}if(t===Vv){let t=n==null?void 0:n.targetId;return typeof t==`string`?{kind:`address_required`,targetId:t}:(e.error(`targets.address_required arrived without its targetId`,{params:n}),null)}return null}function Wv(e,t){return t instanceof ie?Uv(e,t.errorCode,t.params):null}function Gv({projectId:e,environment:t,source:n,catalog:r,environments:i,reloadCatalog:a}){let o=C(),{logger:c}=E(),l=n!==null&&n.kind===`inherited`?n.entryUrl:null,u=l!==null,f=n!==null&&n.kind===`scenario`?n.scenarioId:null,p=n!==null&&(n.kind===`scenario`||n.kind===`launchCell`),m=t===null?null:t.environmentId,h=`${m===null?``:m}|${f===null?``:f}`,g=(0,B.useCallback)(async t=>{let n={...m===null?{}:{environmentId:m},...f===null?{}:{scenarioId:f}};try{let r=await o.projects.entryUrl(s(e),n,{signal:t});return{key:h,read:{status:`resolved`,address:r}}}catch(e){if(e instanceof ie&&Hv(e.errorCode)){let t=Uv(c,e.errorCode,e.params);if(t!==null)return{key:h,read:{status:`refused`,refusal:t}}}throw e}},[o,c,e,m,f,h]),{data:_,error:v,reload:y}=d({fetcher:g,deps:[e,h],enabled:n!==null&&!u&&t!==null}),b=v===null?_===void 0||_.key!==h?{status:`loading`}:_.read:{status:`error`,error:v},x=Fv(h),[S,w]=(0,B.useState)(null),T=b.status===`refused`?b.refusal:null,D=S!==null&&S.key===h?S.refusal:T!==null&&(p||T.kind===`not_configured`)?T:null,O=D===null&&!p?T:null,ee=e=>e===null||r===void 0||i===void 0?null:Zg(r,i,e),k=ee(D),A=b.status===`resolved`?b.address.entryUrl:null,j=u?l:D===null?A:null,M=x.value===null?j===null?``:j:x.value,N=M.trim(),te=D!==null&&D.kind!==`not_configured`,ne=x.save===null?te&&D.kind===`cell_missing`:x.save,re=Rv(M),ae=te&&ne&&re.state!==`empty`,oe=u&&N===``,se=(()=>{if(u)return N===``?void 0:N;if(N!==``&&(A===null||N!==A&&`${N}/`!==A))return N})(),ce=oe?`repeatCleared`:!u&&ae&&re.state===`invalid`?`saveInvalid`:null;return{value:M,setValue:x.setValue,isLoading:!u&&b.status===`loading`,read:b,refusal:D,refusedCell:k,defaultApplicationNote:ee(O),missingRepeatAddress:oe,saveChecked:ne,setSaveChecked:x.setSave,savePlan:re,saveError:x.saveError,block:ce,override:se,adoptDispatchRefusal:e=>{let t=Wv(c,e);return t!==null&&(w({key:h,refusal:t}),!0)},prepareDispatch:async()=>{if(!ae||k===null||re.state!==`ok`)return{ok:!0,entryUrl:se,saved:!1};x.setSaveError(null);try{let t=await Wg(o,e,k,re.baseUrl);c.info(`Launch address saved into its cell`,{projectId:e,targetId:t.id,applicationId:t.applicationId,environmentId:t.environmentId,mode:k.kind})}catch(t){return c.error(`Failed to save the launch address into its cell`,{error:t instanceof Error?t:Error(String(t)),projectId:e,mode:k.kind}),x.setSaveError(t),{ok:!1}}return w(null),x.reset(),y(),a(),{ok:!0,entryUrl:re.launchUrl,saved:!0}}}}var Kv=`project-default`;function qv(e,t){return e===null?{kind:`projectDefault`}:t===void 0?{kind:`unreadable`}:t.some(t=>t.id===e)?{kind:`named`,id:e}:{kind:`deleted`}}function Jv(e){return e.kind===`projectDefault`?Kv:e.kind===`named`?e.id:``}function Yv(e,t){return e.kind===`deleted`?`makeAutoDispatch.repeat.environmentSourceDeleted`:e.kind===`unreadable`&&t?`makeAutoDispatch.repeat.environmentSourceUnreadable`:null}function Xv(e){return e===`project-default`?null:e}function Zv(e,t){if(t!==null&&e.some(e=>e.id===t))return t;let n=e.find(e=>e.isDefault);if(n!==void 0)return n.id;let r=e[0];return r===void 0?null:r.id}function Qv(e,t){let{t:n}=Qe(),r=C(),[i,a]=(0,B.useState)(null),o=(0,B.useCallback)(t=>r.environments.list(s(e),{signal:t}),[r,e]),{data:c,error:l,reload:u}=d({fetcher:o,deps:[e]}),f=(0,B.useMemo)(()=>c===void 0?[]:c.map(e=>({value:e.id,label:e.name})),[c]),p=n(`agentRunDispatch.environment.asUsual`),m=(0,B.useMemo)(()=>t.kind===`concrete`?f:[{value:Kv,label:p},...f],[t.kind,f,p]),h={mode:t.kind,environments:c,loadError:l,reload:u,options:m,setValue:a};if(t.kind===`concrete`){let e=c===void 0?null:Zv(c,t.preferredEnvironmentId),n=i===null?e:i;return{...h,value:n,noticeKey:null,shown:c!==void 0&&c.length>0,body:c===void 0?null:{environmentId:n}}}let g=t.kind===`repeat`?qv(t.environmentId,c):null,_=g===null?Kv:Jv(g),v=i===null?_:i;return{...h,value:v===``?null:v,noticeKey:g===null?null:Yv(g,l!==null),shown:!0,body:v===``?null:{environmentId:Xv(v)}}}function $v({projectId:e,environment:t,address:n}){let r=Qv(e,t),i=Yg(e),a={data:i.data,error:i.error,reload:i.reload},o=r.environments,s=Gv({projectId:e,environment:r.body,source:n.kind===`crawlStart`?null:n,catalog:a.data,environments:o,reloadCatalog:a.reload}),c=Iv({projectId:e,environment:r.body,active:n.kind===`crawlStart`,opening:n.kind===`crawlStart`&&n.opening!==void 0?n.opening:null});return{projectId:e,environment:r,catalog:a,address:n.kind===`crawlStart`?{kind:`crawlStart`,...c}:{kind:`entryUrl`,source:n.kind,...s}}}function ey(){let{t:e}=Qe(),t=kg();return{generic:e=>Pg(t,e,`taskForm.errors.launch`),addressMissing:t=>t===null?e(`taskForm.errors.addressMissingNoEnvironment`):e(`taskForm.errors.addressMissing`,{environment:t}),missingFields:t=>e(`taskForm.errors.incomplete`,{fields:t.map(t=>e(`taskForm.errors.missingField.${t}`)).join(`; `)})}}var ty=/* @__PURE__ */ new Set([`targets.not_configured`,`agents.entry_url_out_of_scope`,`agents.entry_url_override_invalid`]);function ny(e,t,n){let r=Fe.parse(e.params).missing,i=t!==null&&t.blank&&r.includes(`entryUrl`),[a,...o]=N.filter(e=>r.includes(e)&&!(i&&e===`entryUrl`));return{kind:`refused`,reason:[...i?[n.addressMissing(t.environmentName)]:[],...a===void 0?[]:[n.missingFields([a,...o])]].join(`; `),action:i?`addresses`:null}}function ry(e,t,n){if(!(e instanceof ie)||e.errorCode===void 0)return{kind:`refused`,reason:n.generic(e),action:null};if(e.errorCode===`launch_drafts.incomplete`)return ny(e,t,n);let r=ty.has(e.errorCode)?`addresses`:e.errorCode.startsWith(`ai_models.`)?`ai_settings`:null;return{kind:`refused`,reason:n.generic(e),action:r}}var iy=new Set(ct);function ay(e,t){let n=C(),{data:r,error:i,reload:a}=d({fetcher:async r=>t===null?[]:(await n.variables.getContext(s(e),{environmentId:t},{signal:r})).resolved.filter(e=>iy.has(e.scope)&&Tt.test(e.name)).map(e=>({name:e.name,isSecret:e.isSecret})).sort((e,t)=>e.name.localeCompare(t.name)),deps:[n,e,t],enabled:t!==null});return t===null?{kind:`no_environment`}:i===null?r===void 0?{kind:`reading`}:{kind:`ready`,variables:r}:{kind:`failed`,retry:a}}function oy(e,t,n){let r=e.filter(e=>e!==t);return n?[...r,t]:r}var sy={"launch_drafts.version_changed":`version_changed`,"launch_drafts.not_open":`not_open`,"workflows.conversation_busy":`conversation_busy`};function cy(e){return e===`ru`||e===`en`}function ly(e,t){if(t===null||t.kind!==e.kind)throw Error(`Launch draft: scope label ${t===null?`null`:t.kind} does not name scope ${e.kind}`);switch(e.kind){case`project`:return{kind:`project`};case`scenarios`:{let[t,...n]=e.scenarioIds;if(t===void 0)throw Error(`Launch draft: a scenarios scope without scenarios`);return{kind:`scenarios`,scenarioIds:[t,...n],firstName:null}}case`test_run`:if(t.kind!==`test_run`)throw Error(`unreachable: label kind checked above`);return{kind:`test_run`,testRunId:e.testRunId,run:{number:t.number,name:t.name}};case`test_plan`:if(t.kind!==`test_plan`)throw Error(`unreachable: label kind checked above`);return{kind:`test_plan`,testPlanId:e.testPlanId,planName:t.name}}}function uy(e){return{brief:e.brief===null?``:e.brief,presetId:e.presetId,allowedChanges:e.allowedChanges,newScenarioKind:e.newScenarioKind,captureApi:e.captureApi,standMode:e.standMode}}function dy(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:e}function fy(e,t,n){return Le(e)?{place:e,captureApi:t.captureApi,standMode:t.standMode,entryUrl:n.entryUrl,environmentId:n.environmentId,credentials:n.variableNames.length===0?null:{variableNames:[...n.variableNames],role:null}}:{place:e,...t.newScenarioKind===`auto`?{newScenarioKind:null}:{},captureApi:null,standMode:null,entryUrl:null,environmentId:null,credentials:null}}function py({draft:e,source:t,target:n,onStale:r}){let i=C(),{t:a,i18n:o}=Qe(),s=kg(),c=ey(),{http:l}=$f(),u=o.resolvedLanguage;if(u===void 0||!cy(u))throw Error(`The task form has no templates for the UI locale ${String(u)}`);let d=e.task,f=e.projectId,[p,m]=(0,B.useState)(()=>uy(d)),[h,g]=(0,B.useState)(()=>ly(d.scope,e.display.scopeLabel)),[_,v]=(0,B.useState)(null),[y,b]=(0,B.useState)(d.place),[x,S]=(0,B.useState)(d.credentials===null?[]:d.credentials.variableNames),[w,T]=(0,B.useState)(null),[E,D]=(0,B.useState)(!1),O=Ov({draft:e,adopt:t.adopt,onStale:r}),{fleet:ee,reloadFleet:k}=yv({http:l,ready:!0}),A=Le(y),j=mn(dy(d.level),!A),M=$v({projectId:f,environment:{kind:`concrete`,preferredEnvironmentId:d.environmentId},address:{kind:`crawlStart`,...d.entryUrl===null?{}:{opening:{environmentId:d.environmentId,value:d.entryUrl}}}}),N=M.environment.body,te=N!==null,ne=N===null?null:N.environmentId,re=M.address.value,ae=ay(f,M.environment.value),oe=(0,B.useRef)(null);(0,B.useEffect)(()=>{if(!A||!te)return;let e=oe.current;if(e===null){if(oe.current={environmentId:ne,entryUrl:re},(d.environmentId===null||d.environmentId===ne)&&(d.entryUrl===null?re.trim()===``:d.entryUrl===re))return}else if(e.environmentId===ne&&e.entryUrl===re)return;let t=e!==null&&e.environmentId!==ne;oe.current={environmentId:ne,entryUrl:re},t&&S([]),O.write({key:`task`,fields:{entryUrl:re.trim()===``?null:re,environmentId:ne,...t?{credentials:null}:{}}})},[A,te,ne,re,d.environmentId,d.entryUrl,O]);let se=(0,B.useRef)(JSON.stringify(d.level)),ce=JSON.stringify(j.input);(0,B.useEffect)(()=>{se.current!==ce&&(se.current=ce,O.write({key:`task`,fields:{level:j.input}}))},[ce,j.input,O]);let le=e=>{T(null),O.write({key:`task`,fields:e})},ue=e=>{b(e),!Le(e)&&p.newScenarioKind===`auto`&&m(e=>({...e,newScenarioKind:null})),le(fy(e,p,{entryUrl:re.trim()===``?null:re,environmentId:ne,variableNames:x}))},P={place:y,view:xv(y,ee),fleet:ee,choose:ue,toOpeningPlace:()=>ue(ee.status===`ready`?bv(ee.runners):{kind:`this_browser`}),reopen:()=>void 0,reloadFleet:k},de=Object.fromEntries(e.missing.filter(e=>e.field!==`change`).map(e=>[e.field,e.question[u]])),fe=p.brief.trim()===``?`brief`:p.allowedChanges.includes(`write_tests`)&&p.newScenarioKind===null?`scenarioKind`:P.view.kind===`runner-gone`?`place`:rv(p,A)?`siteChoice`:A&&(M.environment.body===null||M.address.block===`unread`)?`loading`:null,pe=(0,B.useRef)(d.brief===null?``:d.brief),me=()=>{let e=p.brief.trim();e!==pe.current&&(pe.current=e,le({brief:e===``?null:e}))},he=(0,B.useRef)(!1),ge=async()=>{if(!(fe!==null||he.current)){he.current=!0;try{await _e()}finally{he.current=!1}}},_e=async()=>{T(null),j.clearRefusal(),D(!0),me();let a=await O.flush();if(a===null){D(!1);return}let o;try{o=await i.launchDrafts.launch(e.id,{version:a,target:n})}catch(e){D(!1);let t=e instanceof ie&&e.errorCode!==void 0?sy[e.errorCode]:void 0;if(t!==void 0){r(t);return}if(j.adoptLaunchRefusal(e))return;T(ry(e,A?{blank:re.trim()===``,environmentName:M.environment.value===null?null:ve()}:null,c));return}D(!1),t.adopt(o.draft)};function ve(){let e=M.environment.options.find(e=>e.value===M.environment.value);if(e===void 0)throw Error(`Environment ${String(M.environment.value)} is not among the options`);return e.label}let ye=(e,t)=>{m(e),le(t)};return{projectId:f,locale:u,draft:p,setBrief:e=>{T(null),m(t=>({...t,brief:e}))},commitBrief:me,pressChip:e=>{let t=ev(p,e,{locale:u,scopeKind:h.kind,placeIsNone:!A}),n=t.draft;ye(n,{presetId:n.presetId,allowedChanges:[...n.allowedChanges],newScenarioKind:n.newScenarioKind,...n.brief===p.brief?{}:{brief:n.brief.trim()===``?null:n.brief.trim()},...A?{captureApi:n.captureApi}:{}});let r=t.effects.scope;(r==null?void 0:r.kind)===`open`&&v(r.on),(r==null?void 0:r.kind)===`latest_test_run`&&v(`test_run`),t.effects.placeToOpening&&P.toOpeningPlace()},setAllowed:(e,t)=>{let n=iv(p,e,t);ye(n,{allowedChanges:[...n.allowedChanges],newScenarioKind:n.newScenarioKind})},setScenarioKind:e=>ye({...p,newScenarioKind:e},{newScenarioKind:e}),setCaptureApi:e=>ye({...p,captureApi:e},{captureApi:e}),setStandMode:e=>ye({...p,standMode:e},{standMode:e}),scope:h,setScope:e=>{g(e),le({scope:k_(e)})},scopeSuggested:!1,scopeRequest:_,clearScopeRequest:()=>v(null),address:M,place:P,choosePlace:ue,withBrowser:A,login:A?{variables:ae,chosen:x,toggle:(e,t)=>{let n=oy(x,e,t);S(n),le({credentials:n.length===0?null:{variableNames:n,role:null}})}}:null,questions:de,effort:j,mode:null,blocked:fe,submitting:E,held:E,error:w===null&&O.failure!==null?{kind:`unknown`,text:a(`taskForm.card.notSaved`,{reason:Pg(s,O.failure,`taskForm.errors.launch`)})}:w,launch:ge}}function my({source:e}){let{t}=Qe(),[n,r]=(0,B.useState)(null),{reload:i}=e,a=(0,B.useCallback)(e=>{r(e),i()},[i]),{read:o}=e;if(o.kind===`reading`)return null;if(o.kind===`failed`)return/* @__PURE__ */ (0,Z.jsxs)(Cv,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`unread`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:t(`taskForm.card.readFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:o.retry,children:t(`taskForm.scope.retry`)})})]});let{draft:s}=o;if(s===null)return null;let c=`${s.id}:${String(e.revision)}`,l=n===null||n===`write_failed`?null:t(`taskForm.card.stale.${n}`);return s.intent===`new`?/* @__PURE__ */ (0,Z.jsx)(hy,{draft:s,source:e,staleNotice:l,onStale:a},c):/* @__PURE__ */ (0,Z.jsx)(Pv,{draft:s,source:e,staleNotice:l,onStale:a},c)}function hy(e){let{t}=Qe(),n=C(),r=d({fetcher:async e=>(await n.auth.me({signal:e})).id,deps:[n]});return r.error===null?r.data===void 0?/* @__PURE__ */ (0,Z.jsx)(Cv,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`reading`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,"aria-busy":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 pb-3 text-xs text-fg-muted`,role:`status`,children:t(`taskForm.card.reading`)})})}):/* @__PURE__ */ (0,Z.jsx)(gy,{...e,viewerId:r.data}):/* @__PURE__ */ (0,Z.jsxs)(Cv,{title:t(`taskForm.title`),subtitle:t(`taskForm.card.subtitle`),onDiscard:null,discarding:!1,testState:`unread`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-body`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:t(`taskForm.card.readFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:r.reload,children:t(`taskForm.scope.retry`)})})]})}function gy({draft:e,source:t,staleNotice:n,onStale:r,viewerId:i}){let{t:a}=Qe(),o=C(),s=$().cards.workflow,c=e.display.busyWith,l=c!==null&&c.topic.kind===`preset`,[u,d]=(0,B.useState)(`calling_conversation`),f=c===null?u:`new_conversation`,p=py({draft:e,source:t,target:f,onStale:r}),m=Tv(e,t),[h,g]=(0,B.useState)(!1),[_,v]=(0,B.useState)(null),y=kg(),b=async n=>{g(!0),v(null);let i=p.draft.brief.trim();try{let r=await o.workflows.get(n);if(r.launch.kind!==`preset`)throw Error(`Launch draft: the live task ${n} is a ${r.launch.kind} swarm`);let a=await o.launchDrafts.patch(e.id,{version:e.version,switchTo:{intent:`amend`,targetWorkflowId:n,amend:{briefAddition:i===``?null:i,allowedChanges:[...r.launch.allowedChanges],newScenarioKind:r.launch.newScenarioKind}},amendBase:{allowedChanges:[...r.launch.allowedChanges],newScenarioKind:r.launch.newScenarioKind}});g(!1),t.adopt(a)}catch(e){if(g(!1),e instanceof ie&&e.errorCode===`launch_drafts.version_changed`){r(`version_changed`);return}v(Pg(y,e,`taskForm.errors.launch`))}},x=c===null?n===null?void 0:/* @__PURE__ */ (0,Z.jsx)(wv,{children:n}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[n!==null&&/* @__PURE__ */ (0,Z.jsx)(wv,{children:n}),/* @__PURE__ */ (0,Z.jsx)(wv,{children:a(l?`taskForm.card.busy`:`taskForm.card.busySwarm`,{task:s.topic(c.topic),status:s.pill[c.status]})}),l&&/* @__PURE__ */ (0,Z.jsx)(`div`,{children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,loading:h,disabled:h||p.held,onClick:()=>void b(c.workflowId),"data-testid":`ai-launch-card-amend-live`,children:a(`taskForm.card.amendLive`)})}),_!==null&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:_})]});return/* @__PURE__ */ (0,Z.jsxs)(Cv,{title:a(`taskForm.title`),subtitle:a(`taskForm.card.subtitle`),onDiscard:p.held?null:m.discard,discarding:m.discarding,testState:c===null?`new`:`busy`,children:[m.failed&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pt-3`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:a(`taskForm.card.discardFailed`)})}),/* @__PURE__ */ (0,Z.jsx)(V_,{state:p,variant:`card`,viewerId:i,scenarioPicker:null,notice:x,launchLabel:c===null?void 0:a(`taskForm.card.launchNew`),launchSlot:/* @__PURE__ */ (0,Z.jsx)(ue,{"aria-label":a(`taskForm.card.target.label`),size:`sm`,value:f,onValueChange:d,disabled:p.held,options:[{value:`calling_conversation`,label:a(`taskForm.card.target.calling_conversation`),...c===null?{}:{disabledReason:a(`taskForm.card.target.busyReason`)},testId:`ai-launch-card-target-calling`},{value:`new_conversation`,label:a(`taskForm.card.target.new_conversation`),testId:`ai-launch-card-target-new`}],"data-testid":`ai-launch-card-target`}),"data-testid":`ai-launch-card-form`})]})}var _y={search:/* @__PURE__ */ (0,Z.jsx)(_e,{size:16}),inspect:/* @__PURE__ */ (0,Z.jsx)(Mr,{size:16}),target:/* @__PURE__ */ (0,Z.jsx)(Sn,{size:16}),layers:/* @__PURE__ */ (0,Z.jsx)(dn,{size:16}),add:/* @__PURE__ */ (0,Z.jsx)(ye,{size:16}),delete:/* @__PURE__ */ (0,Z.jsx)(wr,{size:16}),key:/* @__PURE__ */ (0,Z.jsx)(zr,{size:16}),applied:/* @__PURE__ */ (0,Z.jsx)(We,{size:16}),partial:/* @__PURE__ */ (0,Z.jsx)(x,{size:16}),rejected:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:16}),undone:/* @__PURE__ */ (0,Z.jsx)(fi,{size:16}),superseded:/* @__PURE__ */ (0,Z.jsx)(rn,{size:16}),bug:/* @__PURE__ */ (0,Z.jsx)(br,{size:16}),unknown:/* @__PURE__ */ (0,Z.jsx)(Tr,{size:16})};function vy(e){return _y[e]}var yy=/* @__PURE__ */ new Set([`applied`,`rejected_no_op`,`undone`,`superseded`,`closed`]);function by({state:e,snapshot:t,subject:n,dockRecord:r,decidedInDock:i=!1,children:a,sections:o,note:s,footer:c}){let l=$().cards.changeSet,u=Q(),{t:d}=ng(),f=Km(e,t),p=th(e,t),m=l.marker[f.marker],h=Eh(rh(t),l),g=Um(e)?null:ig(t),_=e===`closed`&&t.closure!==void 0?l.closedBy.line[t.closure.reason]:null,v=g===null?void 0:{title:l.bugFiling.title,caption:_===null?cg(g.facts.finding,d):_},y=n??Dh(e,t,l,u),b=yy.has(e)||r!==void 0||i&&e===`applying`,x=v!==void 0&&r===void 0&&!yy.has(e),S=/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:f.tone,...f.live?{className:`qa-card-kit__pill-live`}:{},children:m});return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-cs-card`,e===`applying`&&`qa-card-kit--live`,r!==void 0&&`qa-cs-card--awaiting`,x&&`qa-cs-card--need`),tone:r===void 0?x?`warning`:nh(e,t):`neutral`,icon:_y[p.kind],tileTone:x?`primary`:p.tone,title:v===void 0?l.title:v.title,caption:v===void 0?h:v.caption,...x?{}:{meta:S},"aria-label":v===void 0?l.cardAria(m):v.title,fold:{title:v===void 0?Dh(e,t,l,u):v.title,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:v===void 0?_===null?Mh(t,jh(t,l),l):_:v.caption}),decided:b,...r===void 0?{}:{handle:r.handle,linked:r.linked,onLinkChange:r.onLinkChange}},sections:o,note:s,footer:c,data:{"data-change-set-state":t.state},children:[v===void 0&&/* @__PURE__ */ (0,Z.jsx)(Op,{children:y}),a,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,children:l.phaseAnnouncement(m)})]})}function xy({toolCallId:e,entry:t,locked:n,progress:i,onDecide:a,tether:o}){let s=(0,B.useId)(),c=(0,B.useId)(),l=$().cards.changeSet,u=l.dock,d=l.bugFiling,{linked:f,onLinkChange:p}=gg(o,e,`dock`),m=hg(o,e),h=i!==null&&i.current!==null&&i.current.toolCallId===e?i.current.verdict:null,g=Xm(t),{facts:_,bug:v}=t,y=!t.confirmEnabled,b=t.deletes||v!==null;return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:[`qa-ai-chat-dock-card`,b&&`qa-ai-chat-dock-card--warning`,f&&`qa-ai-chat-dock-card--linked`].filter(Boolean).join(` `),"data-testid":`ai-change-set-decision`,"data-tone":b?`warning`:`neutral`,"aria-labelledby":s,"aria-busy":h!==null||void 0,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),onFocus:()=>p(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||p(!1)},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:t.deletes?/* @__PURE__ */ (0,Z.jsx)(x,{}):vy(t.icon)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:s,children:t.title})}),m&&/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`description`,content:u.showInFeed,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-dock-card-locate`,"aria-label":u.showInFeedAria(t.title),"data-testid":`ai-change-set-decision-locate`,onClick:()=>o.reveal(e),children:/* @__PURE__ */ (0,Z.jsx)(_r,{"aria-hidden":`true`})})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[v===null?/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:_.target.kind===`scenario`?u.factScenario:_.target.kind===`object`?u.factObject:u.factProject}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:_.target.label}),_.withIt!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{className:`qa-ai-chat-dock-card-fact--risk`,children:_.withIt})]}),_.edits!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:u.factEdits}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:_.edits})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`dl`,{className:`qa-ai-chat-dock-card-facts`,"data-testid":`ai-change-set-decision-facts`,children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:d.factFinding}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(lg,{finding:v.facts.finding})}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:d.factSeverity}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:d.severityWord[v.facts.severity]}),/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:d.factWithIt}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:og(v.facts,d)})]}),y&&t.confirmBlockedReason!==null&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-ai-chat-dock-card-why`,id:c,"data-testid":`ai-change-set-decision-why`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`}),t.confirmBlockedReason]}),/* @__PURE__ */ (0,Z.jsx)(Y_,{toolCallId:e})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:14}),loading:h===`reject`,disabled:n,onClick:()=>a(e,`reject`),children:l.reject}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:g.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ke,{size:14}),loading:h===`confirm`,disabled:n,"aria-disabled":y||void 0,"aria-describedby":y&&t.confirmBlockedReason!==null?c:void 0,onClick:()=>{y||a(e,`confirm`)},children:v===null?l[g.label]:l.bugFiling.confirm})]})]})}function Sy({tone:e,icon:t}){return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-tile qa-sc-tile--${e}`,"aria-hidden":`true`,children:t===`check`?/* @__PURE__ */ (0,Z.jsx)(Ke,{}):t===`swap`?/* @__PURE__ */ (0,Z.jsx)(Wr,{}):/* @__PURE__ */ (0,Z.jsx)(xn,{})})}function Cy({name:e}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-sc-env`,children:[/* @__PURE__ */ (0,Z.jsx)(ii,{"aria-hidden":`true`}),e]})}function wy(e){let[t,...n]=e;return t===void 0?null:n.every(e=>e.environment.id===t.environment.id)?t.environment:null}function Ty({id:e,requests:t}){let n=$().cards.changeSet.secretInput,r=wy(t),[i]=t;return t.length===1&&i!==void 0?/* @__PURE__ */ (0,Z.jsxs)(`h2`,{className:`qa-sc-title`,id:e,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-var`,children:i.variableName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n.titleTail}),/* @__PURE__ */ (0,Z.jsx)(Cy,{name:i.environment.name})]}):/* @__PURE__ */ (0,Z.jsxs)(`h2`,{className:`qa-sc-title`,id:e,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-count`,children:n.countTitle(t.length)}),r!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`sr-only`,children:n.countTitleTail}),/* @__PURE__ */ (0,Z.jsx)(Cy,{name:r.name})]})]})}function Ey({requests:e,outcome:t,onDone:n}){let r=(0,B.useId)(),i=$().cards.changeSet.secretInput,a=wy(e),[o]=e,s=e.length===1&&o!==void 0?o.description:null;return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-sc qa-sc--outcome`,"data-testid":`ai-secret-input-outcome`,"data-state":t,"aria-labelledby":r,onAnimationEnd:e=>{e.target===e.currentTarget&&e.animationName===`qa-sc-out`&&n()},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-sc-head`,children:[/* @__PURE__ */ (0,Z.jsx)(Sy,{tone:t===`sealed`?`success`:`neutral`,icon:t===`sealed`?`check`:`lock`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-id`,children:/* @__PURE__ */ (0,Z.jsx)(Ty,{id:r,requests:e})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{}),s!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-sc-desc`,children:s})]}),t===`sealed`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-slot qa-sc-slot--success`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-sealed`,children:[/* @__PURE__ */ (0,Z.jsx)(gn,{label:i.hiddenAria,className:`qa-sc-secret`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-done`,children:a===null?i.saved:i.savedIn(a.name)})]})}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-slot`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-declined`,children:[/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`}),i.declined]})})]})}function Dy({copy:e,name:t,saved:n,disabled:r,onReopen:i}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-sealed`,"data-testid":`ai-secret-input-sealed`,children:[/* @__PURE__ */ (0,Z.jsx)(gn,{label:e.hiddenAria,className:`qa-sc-secret`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-done`,children:n}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,className:`qa-sc-reenter`,"aria-label":e.reenterAria(t),disabled:r,"data-testid":`ai-secret-input-reenter`,onClick:i,children:e.reenter})]})}function Oy({copy:e,name:t}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-was`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-was-label`,children:e.current}),/* @__PURE__ */ (0,Z.jsx)(gn,{label:e.currentAria,className:`qa-sc-secret qa-sc-secret--struck`}),/* @__PURE__ */ (0,Z.jsx)(hr,{className:`qa-sc-was-arrow`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-sc-badge-warn`,children:[e.willReplace,/* @__PURE__ */ (0,Z.jsx)(w,{name:e.whyName,text:e.whyText(t),placement:`top-end`})]})]})}function ky({field:e,size:t,copy:n,busy:r,closed:i,invalid:a,describedBy:o,onKeyDown:s,onValue:c,onToggle:l,fieldRef:u,trailing:d}){let f=(0,B.useId)(),m=de(),{request:h,value:g,shown:_}=e;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(me(r?`busy`:a?`invalid`:`default`,!1,m,t),`qa-sc-field`,`qa-sc-field--${t}`),children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:f,children:h.replacesExistingValue?n.fieldLabelReplace(h.variableName):n.fieldLabel(h.variableName)}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:u,id:f,className:P(b,`qa-sc-input`,_&&`qa-sc-input--shown`),type:_?`text`:`password`,value:g,placeholder:n.placeholder,autoComplete:`off`,spellCheck:!1,autoCapitalize:`off`,"data-1p-ignore":``,"data-lpignore":`true`,readOnly:r,disabled:i,"aria-invalid":a||void 0,"aria-describedby":o,onChange:e=>c(h.changeSetItemId,e.target.value),onKeyDown:s}),/* @__PURE__ */ (0,Z.jsx)(p,{size:`sm`,icon:_?/* @__PURE__ */ (0,Z.jsx)(hn,{}):/* @__PURE__ */ (0,Z.jsx)(Cn,{}),"aria-pressed":_,"aria-label":_?n.hide:n.show,disabled:r||i,onClick:e=>l(h.changeSetItemId,e.detail>0)}),!i&&d]})}function Ay({copy:e,count:t,replaces:n,failure:r,busy:i,held:a,disabled:o,describedBy:s,inField:c,decisionLabel:l,onPress:u}){let d=r!==null&&r.kind!==`length`&&r.kind!==`closed`&&!i,f=d?e.retry:l===null?t>1?e.saveMany(t):n?e.replace:e.save:l;return/* @__PURE__ */ (0,Z.jsx)(I,{variant:n&&!d&&l===null?`danger-soft`:`primary`,size:`sm`,icon:d?/* @__PURE__ */ (0,Z.jsx)(ni,{}):void 0,loading:i,loadingLabel:l===null?n&&t===1?e.replacing:e.saving:l,disabled:o&&!i,"aria-disabled":a&&!i||void 0,"aria-describedby":s,"data-testid":`ai-secret-input-submit`,className:c?`qa-sc-field-action`:void 0,onClick:()=>{a||u()},children:f})}function jy({copy:e,sealed:t,closed:n,failure:i,overLength:a,longest:o,lengthLineId:s}){if(n)return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`}),e.closed]});if(a!==null||(i==null?void 0:i.kind)===`length`)return/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line qa-sc-line--error`,id:s,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{"aria-hidden":`true`}),e.tooLong(ft,a===null?o:a)]});if(i!==null&&i.kind!==`closed`){let t=i.kind===`confirm`?e.confirmFailed:i.kind===`network`?e.failed.network:i.kind===`server`?e.failed.server:e.failed.refused,n=i.kind===`server`||i.kind===`refused`?i.status:null;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-banner`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-banner-text`,children:t}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-banner-code`,children:n})]})}return t?null:/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,children:[/* @__PURE__ */ (0,Z.jsx)(ai,{"aria-hidden":`true`}),e.privacy]})}async function My(e,t,n){let r=qn.changeSetSecretValue;await e.request({method:r.method,path:r.path(t.projectId,t.changeSetId,t.changeSetItemId),body:{value:n},schema:pm})}function Ny(e){if(e instanceof Ht)return{kind:`server`,status:null};if(!(e instanceof Jn))return{kind:`network`};let{status:t,errorCode:n}=e;return t===0?{kind:`network`}:t===409||t===404||n===`secret_unknown_item_id`?{kind:`closed`}:t===400&&n===`validation.failed`?{kind:`length`}:t>=500||t===429?{kind:`server`,status:t}:{kind:`refused`,status:t}}var Py={closed:0,length:1,refused:2,server:3,network:4};function Fy(e){return e.reduce((e,t)=>e===null||Py[t.kind]<Py[e.kind]?t:e,null)}var Iy={value:``,shown:!1,reopened:!1};function Ly(e,t){return new Map(Array.from(e,([e,n])=>[e,t(n)]))}function Ry(e,t){let[n]=e.filter(e=>e.toolCallId===t&&e.command===`chat-tool-confirm`).slice(-1);return n??null}function zy({requests:e,toolCallId:t,http:n,locked:r,held:i,progress:a,commandFailures:o,logger:s,onConfirm:c}){var l;let[u,d]=(0,B.useState)(()=>/* @__PURE__ */ new Map),f=e.map(e=>{let t=u.get(e.changeSetItemId)??Iy,n=e.valueDeposit!==null&&!t.reopened;return{request:e,value:n?``:t.value,shown:!n&&t.shown,sealed:n}}),p=(e,t)=>{d(n=>{let r=new Map(n);return r.set(e,t(n.get(e)??Iy)),r})},[m,h]=(0,B.useState)({kind:`editing`,failure:null}),g=Ry(o,t),_=m.kind===`deciding`&&!m.sent;(0,B.useEffect)(()=>{_&&!r&&(h({kind:`deciding`,sent:!0,failureBefore:g}),c())},[_,r,g,c]);let v=m.kind===`deciding`&&m.sent&&g!==m.failureBefore,y=f.reduce((e,t)=>t.value.length>1e4&&(e===null||t.value.length>e)?t.value.length:e,null),b=f.every(e=>e.sealed||e.value.length>0),x=f.every(e=>e.sealed),S=m.kind===`editing`||v,C=v?{kind:`confirm`}:m.kind===`editing`?m.failure:null,w=(a==null||(l=a.current)==null?void 0:l.toolCallId)===t,T=()=>{d(e=>Ly(e,e=>({...e,value:``,shown:!1})))};return{fields:f,phase:m.kind===`closed`?`closed`:S?`editing`:`busy`,failure:C,overLength:y,filled:b,allSealed:x,setValue(e,t){p(e,e=>({...e,value:t}))},toggleShown(e){p(e,e=>({...e,shown:!e.shown}))},reopen(e){S&&p(e,()=>({value:``,shown:!1,reopened:!0}))},submit(){if(!S||!b||y!==null||r||i||w)return;let e=f.filter(e=>!e.sealed);d(e=>Ly(e,e=>({...e,shown:!1}))),h({kind:`depositing`}),Promise.all(e.map(({request:e,value:t})=>My(n,e,t).then(()=>null,t=>{let n=Ny(t);return n.kind===`server`&&n.status===null&&s.warn(`chat.secret_input.deposit_unreadable`,{changeSetId:e.changeSetId,changeSetItemId:e.changeSetItemId,error:t instanceof Error?t.name:typeof t}),n}))).then(e=>{let t=Fy(e.filter(e=>e!==null));t===null?h({kind:`deciding`,sent:!1,failureBefore:null}):t.kind===`closed`?(T(),h({kind:`closed`})):h({kind:`editing`,failure:t})})},wipe:T}}function By({toolCallId:e,requests:t,heldReason:n,locked:i,progress:a,onDecide:o,tether:s}){var c;let l=(0,B.useId)(),u=(0,B.useId)(),d=$().cards.changeSet,f=d.secretInput,m=$f(),{linked:h,onLinkChange:g}=gg(s,e,`dock`),_=hg(s,e),v=(0,B.useRef)(/* @__PURE__ */ new Map),y=(0,B.useRef)(null),b=zy({requests:t,toolCallId:e,http:m.http,locked:i,held:n!==null,progress:a,commandFailures:m.commandFailures,logger:m.logger,onConfirm:()=>o(e,`confirm`)}),x=t.length===1?t[0]:void 0,S=b.allSealed,C=b.fields.filter(e=>!e.sealed),w=C.some(e=>e.request.replacesExistingValue),T=b.phase===`busy`,E=b.phase===`closed`,D=a!==null&&a.current!==null&&a.current.toolCallId===e&&a.current.verdict===`reject`,O=m.commandFailures.filter(t=>t.toolCallId===e).slice(-1)[0],ee=O!==void 0&&O.command===`chat-tool-reject`,k=b.overLength!==null||((c=b.failure)==null?void 0:c.kind)===`length`,A=`${u}-len`,j=`${u}-held`,M=P(k&&A,n!==null&&j)||void 0,N=b.filled&&n===null,te=E?`neutral`:S?`success`:w?`warning`:`live`,ne=wy(t),re=ne===null?f.saved:f.savedIn(ne.name),[ie]=b.fields,ae=x!==void 0&&ie!==void 0&&ie.sealed,oe=x===void 0?null:x.description,se=wy(t)!==null,ce=e=>{let t=v.current.get(e);t!==void 0&&(t.focus(),t.setSelectionRange(t.value.length,t.value.length))},le=e=>{if(e.key!==`Enter`)return;e.preventDefault();let t=b.fields.find(e=>!e.sealed&&e.value.length===0);if(b.fields.length>1&&t!==void 0){ce(t.request.changeSetItemId);return}b.submit()},ue=e=>{y.current=e,b.reopen(e)},de=e=>t=>{if(t===null){v.current.delete(e);return}v.current.set(e,t),y.current===e&&(y.current=null,t.focus())},fe=/* @__PURE__ */ (0,Z.jsx)(Ay,{copy:f,count:C.length,replaces:w,failure:b.failure,busy:T,held:!N,disabled:i||E||b.overLength!==null,describedBy:n===null?void 0:j,inField:x!==void 0&&!ae,decisionLabel:S?d.confirm:null,onPress:b.submit});return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:P(`qa-sc`,w&&`qa-sc--replace`,h&&`qa-sc--linked`),"data-testid":`ai-secret-input-card`,"data-state":b.phase,"aria-labelledby":l,"aria-busy":T||void 0,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),onFocus:()=>g(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||g(!1)},children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-sc-head`,children:[/* @__PURE__ */ (0,Z.jsx)(Sy,{tone:te,icon:S&&!E?`check`:w&&!E?`swap`:`lock`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-id`,children:/* @__PURE__ */ (0,Z.jsx)(Ty,{id:l,requests:t})}),E?/* @__PURE__ */ (0,Z.jsx)(`span`,{}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-corner`,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,loading:D,disabled:T||i,"data-testid":`ai-secret-input-reject`,onClick:()=>{b.wipe(),o(e,`reject`)},children:d.reject}),_&&/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`description`,content:d.dock.showInFeed,placement:`top-end`,children:/* @__PURE__ */ (0,Z.jsx)(p,{size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(_r,{}),"aria-label":d.dock.showInFeedAria(x===void 0?f.countTitle(t.length):x.variableName),"data-testid":`ai-secret-input-locate`,onClick:()=>s.reveal(e)})})]}),oe!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-sc-desc`,children:oe})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`qa-sc-slot`,w&&!E&&`qa-sc-slot--warning`,S&&!E&&`qa-sc-slot--success`,T&&`qa-sc-slot--busy`,E&&`qa-sc-slot--closed`),"aria-busy":T||void 0,children:[x!==void 0&&ae?/* @__PURE__ */ (0,Z.jsx)(Dy,{copy:f,name:x.variableName,saved:re,disabled:T||i||E,onReopen:()=>ue(x.changeSetItemId)}):x===void 0?b.fields.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-row`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-row-label`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.request.variableName}),e.request.description!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.request.description}),!se&&/* @__PURE__ */ (0,Z.jsx)(Cy,{name:e.request.environment.name}),e.request.replacesExistingValue&&!e.sealed&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-badge-warn`,children:f.willReplace}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-sc-row-fill`,(e.sealed||e.value.length>0)&&`qa-sc-row-fill--on`),"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Ke,{})})]}),e.sealed?/* @__PURE__ */ (0,Z.jsx)(Dy,{copy:f,name:e.request.variableName,saved:f.saved,disabled:T||i||E,onReopen:()=>ue(e.request.changeSetItemId)}):/* @__PURE__ */ (0,Z.jsx)(ky,{field:e,size:`md`,copy:f,busy:T,closed:E,invalid:k&&e.value.length>1e4,describedBy:M,onKeyDown:le,onValue:b.setValue,onToggle:(e,t)=>{b.toggleShown(e),t&&ce(e)},fieldRef:de(e.request.changeSetItemId),trailing:null})]},e.request.changeSetItemId)):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[x.replacesExistingValue&&!E&&/* @__PURE__ */ (0,Z.jsx)(Oy,{copy:f,name:x.variableName}),b.fields.map(e=>/* @__PURE__ */ (0,Z.jsx)(ky,{field:e,size:`lg`,copy:f,busy:T,closed:E,invalid:k,describedBy:M,onKeyDown:le,onValue:b.setValue,onToggle:(e,t)=>{b.toggleShown(e),t&&ce(e)},fieldRef:de(e.request.changeSetItemId),trailing:fe},e.request.changeSetItemId))]}),/* @__PURE__ */ (0,Z.jsx)(jy,{copy:f,sealed:S,closed:E,failure:b.failure,overLength:b.overLength,longest:Math.max(...b.fields.map(e=>e.value.length)),lengthLineId:A}),n!==null&&!E&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-sc-line`,id:j,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`}),n]}),ee&&!T&&/* @__PURE__ */ (0,Z.jsx)(Y_,{toolCallId:e}),(x===void 0||ae)&&!E&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-foot`,children:fe})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,children:T?f.savingAnnouncement:``})]})}function Vy({conversationId:e,presentToolCallIds:t,dockRef:n,onFocusComposer:r,copy:i}){let a=(0,B.useRef)({conversationId:e,calls:/* @__PURE__ */ new Map}),[o,s]=(0,B.useState)(null);return(0,B.useEffect)(()=>{if(a.current.conversationId!==e){a.current={conversationId:e,calls:/* @__PURE__ */ new Map},s(null);return}let{calls:i}=a.current,o=new Set(t),c=null;for(let[e,t]of[...i])o.has(e)||(i.delete(e),c=t);if(c===null)return;s(c.verdict===`reject`?{kind:`reject`}:c.secretSaved===null?{kind:c.destructive?`confirmDelete`:`confirm`}:{kind:`secretSaved`,saved:c.secretSaved});let l=document.activeElement,u=n.current;(l===null||l===document.body||u!==null&&u.contains(l))&&r()},[e,t,n,r]),{pressed(e,t){for(let n of e)a.current.calls.set(n.toolCallId,{verdict:t,destructive:n.destructive,secretSaved:n.secretSaved})},announcement:o===null?``:o.kind===`secretSaved`?i.secretSaved(o.saved.names,o.saved.environment):i.decided[o.kind]}}function Hy({conversationId:e,present:t}){let n=(0,B.useRef)({conversationId:e,pressed:/* @__PURE__ */ new Map,seen:/* @__PURE__ */ new Map}),[r,i]=(0,B.useState)({conversationId:e,items:[]});return(0,B.useEffect)(()=>{n.current.conversationId!==e&&(n.current={conversationId:e,pressed:/* @__PURE__ */ new Map,seen:/* @__PURE__ */ new Map});let{pressed:r,seen:a}=n.current,o=new Map(t.map(e=>[e.toolCallId,e.requests])),s=[];for(let[e,t]of[...r]){if(o.has(e))continue;r.delete(e);let n=a.get(e);n!==void 0&&s.push({toolCallId:e,requests:n,outcome:t===`confirm`?`sealed`:`declined`})}n.current.seen=o,s.length!==0&&i(t=>({conversationId:e,items:[...t.conversationId===e?t.items:[],...s]}))},[e,t]),{pressed(e,t){n.current.pressed.set(e,t)},items:r.conversationId===e?r.items:[],done(e){i(t=>({conversationId:t.conversationId,items:t.items.filter(t=>t.toolCallId!==e)}))}}}function Uy(e){return Object.prototype.hasOwnProperty.call(Qn,e)}function Wy(e){return Qn[e]===`warning`}function Gy(e){return e.kind===`list`||e.key===`entryUrl`||e.key===`reason`}function Ky({fact:e,copy:t}){switch(e.kind){case`workflow`:{let n=lt.safeParse(e.topic);return n.success?_d(n.data):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`text`:return e.key===`entryUrl`||e.key===`run`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__mono`,children:e.text}):e.text;case`token`:{let n=`${e.key}.${e.token}`;return Uy(n)?Wy(n)?/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`warning`,dot:!1,children:t.token[n]}):t.token[n]:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-confirm-facts__unrecognized`,children:t.unrecognized})}case`list`:return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-confirm-facts__chips`,children:e.items.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Hr,{"aria-hidden":`true`}),e]},`${String(t)}:${e}`))})}}function qy({facts:e}){let t=$().cards.confirmation,n=Q();return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`dl`,{className:`qa-confirm-facts`,children:e.map(e=>{let r=e.label[n];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`qa-confirm-facts__cell`,Gy(e)&&`qa-confirm-facts__cell--wide`),children:[/* @__PURE__ */ (0,Z.jsx)(`dt`,{children:e.kind===`list`?t.listLabel(r,e.items.length):r}),/* @__PURE__ */ (0,Z.jsx)(`dd`,{children:/* @__PURE__ */ (0,Z.jsx)(Ky,{fact:e,copy:t})})]},e.key)})})}function Jy(e,t){return e.flatMap(e=>{if(e.kind!==`token`)return[];let n=`${e.key}.${e.token}`;return!Uy(n)||!Wy(n)?[]:[t.warning[n]]})}var Yy=e=>typeof e==`object`&&e&&`op`in e?e.op:void 0;function Xy(e){return e.toolName===`workflow_task_execute`&&Yy(e.args)===`request_change`}var Zy=Qn;function Qy(e){if(e===null)return`default`;for(let t of e.facts)if(t.kind===`token`&&Zy[`${t.key}.${t.token}`]===`warning`)return`warning`;return`default`}var $y=2,eb=`allowedChange`;function tb(e,t){return t===null?e:e.filter(e=>e.key!==eb)}function nb({confirmation:e,confirmationPosition:t,pendingConfirmationCount:n,actionsLocked:r,onConfirm:i,onReject:a}){var o,s;let c=(0,B.useId)(),l=$(),u=Q(),d=l.shell.confirmation,{toolCallId:f,toolName:p,display:m}=e,h=((o=e.operationTitles)==null?void 0:o.map(e=>e[u]))??[],[g]=h,_=Xy(e)&&h.length===1&&g!==void 0?g:null,v=_??((s=e.title)==null?void 0:s[u]),y=_===null?h:[],b=m===null?null:tb(m.facts,_),S=Qy(m),C=b===null?[]:Jy(b,l.cards.confirmation),w=S===`warning`,T=_===null?{reject:d.reject,confirm:d.confirm}:{reject:d.grant.no,confirm:d.grant.yes};return/* @__PURE__ */ (0,Z.jsxs)(`article`,{className:`qa-ai-chat-dock-card${w?` qa-ai-chat-dock-card--warning`:``}`,"data-testid":`ai-pending-confirmation`,"data-tool-name":p,"data-tone":S,"data-pending-confirmation-count":n,"data-tool-purpose-state":y.length>0?`present`:`absent`,"data-confirmation-kind":_===null?`action`:`lead-grant`,"aria-labelledby":c,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-dock-card-head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-tile`,"aria-hidden":`true`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(Tr,{}):w?/* @__PURE__ */ (0,Z.jsx)(x,{}):_===null?/* @__PURE__ */ (0,Z.jsx)(On,{}):/* @__PURE__ */ (0,Z.jsx)(xn,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-card-heading`,children:v===void 0?/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,"data-tool-name-state":`unrecognized`,children:d.unrecognizedTool}):/* @__PURE__ */ (0,Z.jsx)(`h2`,{id:c,children:v})}),w&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-badge`,"data-testid":`ai-pending-confirmation-warning-badge`,children:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`warning`,children:d.warningBadge})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-card-body`,children:[y.length>0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-purpose`,children:y.join(` \u00B7 `)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{"data-testid":`ai-pending-confirmation-facts`,"data-confirmation-facts-state":b===null?`absent`:`present`,children:b!==null&&/* @__PURE__ */ (0,Z.jsx)(qy,{facts:b})}),C.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-dock-card-warning`,"data-testid":`ai-pending-confirmation-warning`,children:e},e))]}),/* @__PURE__ */ (0,Z.jsx)(Y_,{toolCallId:f}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-dock-card-foot`,children:[n>=$y&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-dock-card-counter`,"data-testid":`ai-pending-confirmation-queue-counter`,children:d.queuePosition.replace(`{index}`,String(t)).replace(`{total}`,String(n))}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:14}),disabled:r,onClick:()=>a(f),children:T.reject}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(We,{size:14}),disabled:r,onClick:()=>i(f),children:T.confirm})]})]})}function rb(e,t){switch(e.kind){case`ai_run`:return`/ai-runs/${encodeURIComponent(e.id)}`;case`atlas_run`:return t===null?null:`${a(t,`map/history`)}#run-${encodeURIComponent(e.id)}`;default:{let t=e.kind;throw Error(`agentExecutionWebPath: no page for executor kind ${String(t)}`)}}}function ib({question:e,bar:t}){let n=$().shell.agentQuestions,{project:r}=$f();if(!A(e.asker))return null;let i=rb(e.asker,r===null?null:r.number);if(i===null)return null;let a=/* @__PURE__ */ (0,Z.jsx)(Vp,{path:i,label:n.openRun,accessibleName:n.openRun,emphasis:`secondary`});return t?/* @__PURE__ */ (0,Z.jsx)(Fp,{children:a}):a}function ab(e,t){return e.mode===`text`?t.validationText:e.mode===`single`?t.validationSingle:t.validationMultiple}function ob({batchId:e,question:t,draft:n,showValidation:r,disabled:i,onChange:a}){let o=$().shell.questions,s=(0,B.useId)(),c=(0,B.useRef)(!1),l=`qa-chat-question-${e}-${t.id}`,u=`${s}-error`,d=`${s}-custom`,f=r,p=f?u:void 0,m=e=>{if(t.mode===`single`){a({...n,selectedOptionIds:[e],customActive:!1,skipped:!1});return}let r=n.selectedOptionIds.includes(e)?n.selectedOptionIds.filter(t=>t!==e):[...n.selectedOptionIds,e];a({...n,selectedOptionIds:r,customActive:!1,skipped:!1})},h=e=>{c.current=e,a({...n,customActive:e,selectedOptionIds:e?[]:n.selectedOptionIds,skipped:!1})},g=(0,B.useCallback)(e=>{e&&c.current&&(c.current=!1,e.focus())},[]);return/* @__PURE__ */ (0,Z.jsxs)(`fieldset`,{className:`qa-ai-chat-question-field${n.skipped?` qa-ai-chat-question-field--skipped`:``}${f?` qa-ai-chat-question-field--invalid`:``}`,disabled:i,"data-question-id":t.id,children:[/* @__PURE__ */ (0,Z.jsx)(`legend`,{className:`qa-ai-chat-question-legend`,children:/* @__PURE__ */ (0,Z.jsx)(`h4`,{className:`qa-ai-chat-question-title`,tabIndex:-1,children:t.question})}),t.mode!==`text`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-options`,children:[t.options.map(e=>{let r=n.selectedOptionIds.includes(e.id);return/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:r,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:()=>m(e.id)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-option-copy`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:e.label}),e.description&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-detail`,children:e.description})]}),e.recommended&&/* @__PURE__ */ (0,Z.jsx)(Dp,{dot:!1,className:`qa-ai-chat-question-recommended`,children:o.recommended})]},e.id)}),t.allowCustom&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-question-option`,children:[/* @__PURE__ */ (0,Z.jsx)(`input`,{type:t.mode===`single`?`radio`:`checkbox`,name:l,checked:n.customActive,"aria-controls":n.customActive?d:void 0,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,onChange:e=>h(e.currentTarget.checked)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-copy`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-option-label`,children:o.customChoice})})]})]}),(t.mode===`text`||n.customActive)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:d,className:`qa-ai-chat-question-custom`,children:[/* @__PURE__ */ (0,Z.jsx)(`label`,{className:`sr-only`,htmlFor:`${d}-input`,children:t.mode===`text`?o.textAnswerLabel:o.customAnswerLabel}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:g,id:`${d}-input`,value:n.customText,placeholder:t.mode===`text`?o.textAnswerPlaceholder:o.customAnswerPlaceholder,"aria-describedby":p,"aria-invalid":f||void 0,"data-question-control":!0,"data-question-text-input":!0,onChange:e=>a({...n,customText:e.currentTarget.value,skipped:!1})})]}),t.skippable&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-local-actions`,children:/* @__PURE__ */ (0,Z.jsx)(I,{type:`button`,variant:`secondary`,size:`sm`,onClick:()=>{a({...n,skipped:!n.skipped,selectedOptionIds:[],customActive:!1,customText:``})},children:n.skipped?o.restoreQuestion:o.skipQuestion})}),f&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:u,className:`qa-ai-chat-question-validation`,role:`alert`,children:ab(t,o)})]})}function sb(e){return e.origin===`agent`}function cb(e){return re(e)?e.payload:null}function lb(e,t){let n=t.questions;if(e.status!==`answered`){let r=sb(e)&&e.status===`superseded`;return db(n,e.status,r?t.agentQuestions.askerEnded:null)}let r=e.answers.length>0&&e.answers.every(e=>`skip`in e);return sb(e)?ub(n,r):e.continuationStatus===`pending`?{title:n.answeredTitle,badge:n.continuationPendingBadge,tone:`muted`,allSkipped:r,outcome:null}:e.continuationStatus===`running`?{title:n.answeredTitle,badge:n.continuationRunningBadge,tone:`warning`,allSkipped:r,outcome:null}:e.continuationStatus===`failed`?{title:n.answeredTitle,badge:n.continuationFailedBadge,tone:`error`,allSkipped:r,outcome:null}:ub(n,r)}function ub(e,t){return{title:e.answeredTitle,badge:t?e.skippedBadge:e.answeredBadge,tone:t?`muted`:`success`,allSkipped:t,outcome:null}}function db(e,t,n){let r=t===`cancelled`;return{title:r?e.cancelledTitle:e.supersededTitle,badge:r?e.cancelledBadge:e.supersededBadge,tone:`muted`,allSkipped:!1,outcome:n}}function fb(e,t){return lb(e,t).badge}function pb(e,t,n){switch(e){case`retryable`:return{badge:t.retryErrorBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:Oe};case`nonretryable`:return{badge:t.nonretryableBadge,actionLine:t.nonretryableDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:Oe};case`stale`:return{badge:t.staleBadge,actionLine:null,canCancel:!1,action:n.onRefresh,actionLabel:t.refresh,Icon:he};case`unauthorized`:return{badge:t.unauthorizedBadge,actionLine:t.unauthorizedDescription,canCancel:!1,action:void 0,actionLabel:null,Icon:Oe};case`unavailable`:return{badge:t.unavailableBadge,actionLine:null,canCancel:!0,action:n.onRetry,actionLabel:t.retry,Icon:Oe};default:throw Error(`Unhandled question action error kind: ${e}`)}}function mb(e,t){return pb(e,t,{}).badge}function hb({onRetry:e}){let t=$().shell.questions;return e?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-inline-status`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-status-icon qa-ai-chat-question-status-icon--error`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Oe,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-status-actions`,children:/* @__PURE__ */ (0,Z.jsx)(I,{type:`button`,variant:`primary`,size:`sm`,onClick:e,children:t.retry})})]}):null}function gb({batchId:e,kind:t,declineLabel:n,onCancel:r,onRetry:i,onRefresh:a}){let o=$().shell.questions,{canCancel:s,action:c,actionLabel:l,actionLine:u,badge:d,Icon:f}=pb(t,o,{onRetry:i,onRefresh:a});return/* @__PURE__ */ (0,Z.jsx)(Tp,{bare:!0,className:`qa-ai-chat-question-card`,data:{"data-question-batch-id":e,"data-question-state":t},children:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(f,{size:28}),title:d,text:u??void 0,actions:s||c?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[s&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,onClick:r,children:n}),c&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,onClick:c,children:l})]}):void 0})})}function _b({batch:e,formattedResolvedAt:t}){let n=$().shell,i=n.questions,a=lb(e,n),o=sb(e)?e:null,s=e.status===`answered`,c=!sb(e)&&e.status===`answered`?e.continuationStatus:null,l=s&&a.allSkipped&&(o!==null||c===`completed`)?`skipped`:e.status,u=[a.outcome===null?null:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:a.outcome},`outcome`),o!==null&&o.status===`answered`&&o.answeredVia===`assistant`?/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(qr,{}),children:n.agentQuestions.viaAssistant},`via`):null].filter(e=>e!==null),d=o===null?t:[o.askerLabel,t].filter(e=>e!==void 0).join(` \u00B7 `);return/* @__PURE__ */ (0,Z.jsx)(Tp,{className:`qa-ai-chat-question-card`,icon:/* @__PURE__ */ (0,Z.jsx)(Tr,{size:16}),title:a.title,caption:d,meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:a.tone===`muted`?`neutral`:a.tone,children:a.badge}),tone:a.tone===`muted`?`neutral`:a.tone,note:u.length===0?void 0:u,footer:o===null?void 0:/* @__PURE__ */ (0,Z.jsx)(ib,{question:o,bar:!0}),data:{"data-question-batch-id":e.id,"data-question-state":l,"data-continuation-state":c===null?void 0:c},children:s&&/* @__PURE__ */ (0,Z.jsx)(Ap,{children:e.questions.map(t=>{let n=e.answers.find(e=>e.questionId===t.id),r=i.unavailableAnswer;if(n&&`skip`in n&&(r=i.skippedAnswer),n&&`customText`in n&&(r=n.customText),n&&`selectedOptionIds`in n){let e=new Set(n.selectedOptionIds),a=t.options.filter(t=>e.has(t.id)).map(e=>e.label);a.length>0&&(r=a.join(i.answerSeparator))}return/* @__PURE__ */ (0,Z.jsx)(jp,{label:t.question,value:r},t.id)})})})}function vb(){return{selectedOptionIds:[],customActive:!1,customText:``,skipped:!1}}function yb(e){let t=vb();return e.mode!==`text`||e.prefill===void 0?t:{...t,customText:e.prefill}}function bb(e){return Object.fromEntries(e.map(e=>[e.id,yb(e)]))}function xb(e,t){return t.skipped?e.skippable:t.customActive||e.mode===`text`?t.customText.trim().length>0:t.selectedOptionIds.length>0}function Sb(e,t){return e.map(e=>{let n=t[e.id]??vb();return n.skipped?{questionId:e.id,skip:!0}:e.mode===`text`||n.customActive?{questionId:e.id,customText:n.customText}:{questionId:e.id,selectedOptionIds:n.selectedOptionIds}})}function Cb(e,t){return Object.entries(t).reduce((e,[t,n])=>e.split(`{${t}}`).join(String(n)),e)}function wb(){let e=$().shell.questions;return/* @__PURE__ */ (0,Z.jsx)(`article`,{className:`qa-ai-chat-question-card`,role:`status`,"aria-label":e.loading,"data-question-state":`loading`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Tr,{})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-heading`,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--title`})})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-loading-stack`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--option`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-skeleton qa-ai-chat-question-skeleton--line`})]})]})})}function Tb({question:e,controller:t,placement:n}){var r,i;let a=$().shell,o=a.questions,s=sb(e)?e:null,c=s!==null&&s.asker.kind===`workflow`?s:null,l=c!==null&&c.assumption===null,u=c===null||t.workflowAgentsWorking===void 0?null:t.workflowAgentsWorking(c.asker.id),d=u===null?null:u?a.agentQuestions.workersContinue:a.agentQuestions.agentsIdle,f=s===null?o.cancelAll:a.agentQuestions.decline,p=e.questions.length,m=(0,B.useRef)(null),h=(0,B.useRef)(!1),[g,_]=(0,B.useState)(()=>bb(e.questions)),[v,y]=(0,B.useState)(!1),[b,x]=(0,B.useState)(!1),[S,C]=(0,B.useState)(0),[w,T]=(0,B.useState)(!1),E=(0,B.useMemo)(()=>Object.fromEntries(e.questions.map(e=>[e.id,xb(e,g[e.id])])),[e.questions,g]),D=Object.values(E).filter(Boolean).length,O=p>=(n===`dock`?2:4),ee=O&&!w,k=p>1,A=((r=t.error)==null?void 0:r.batchId)===e.id?t.error:null,j=t.pendingBatchId===e.id||b,M=((i=t.restoredBatchIds)==null?void 0:i.includes(e.id))??!1;(0,B.useEffect)(()=>{A&&(h.current=!1,x(!1))},[A]);let N=e=>{var t;let n=((t=m.current)==null?void 0:t.querySelectorAll(`[data-question-id]`))??[];return Array.from(n).find(t=>t.dataset.questionId===e)},te=t=>{var n;let r=e.questions[t];r&&((n=N(r.id))==null||(n=n.querySelector(`.qa-ai-chat-question-title`))==null||n.focus())},ne=t=>{var n;let r=e.questions[t];if(!r)return;let i=g[r.id],a=r.mode===`text`||(i==null?void 0:i.customActive);(n=N(r.id))==null||(n=n.querySelector(a?`[data-question-text-input]`:`[data-question-control]`))==null||n.focus()},re=e=>{T(!1),C(e),queueMicrotask(()=>te(e))},ie=()=>{T(e=>!e),queueMicrotask(()=>te(S))},ae=async e=>{if(!h.current){h.current=!0,x(!0);try{await e()}catch{h.current=!1,x(!1)}}},oe=n=>{n==null||n.preventDefault();let r=e.questions.findIndex(e=>!E[e.id]);if(r>=0){y(!0),ee&&C(r),queueMicrotask(()=>ne(r));return}ae(()=>t.onAnswer(e.id,e.revision,Sb(e.questions,g)))},se=e=>{e.key===`Enter`&&(e.ctrlKey||e.metaKey)&&e.target instanceof HTMLTextAreaElement&&(e.preventDefault(),oe())};if(A&&A.kind!==`retryable`)return/* @__PURE__ */ (0,Z.jsx)(gb,{batchId:e.id,kind:A.kind,declineLabel:f,onCancel:()=>void ae(()=>t.onCancel(e.id,e.revision)),onRetry:t.onRetry?()=>void ae(()=>t.onRetry(e.id)):void 0,onRefresh:t.onRefresh?()=>void ae(()=>t.onRefresh(e.id)):void 0});let ce=ee?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-counter`,children:Cb(o.questionIndex,{index:S+1,total:p})}):null,le=ee?[e.questions[S]]:e.questions,ue=[`qa-ai-chat-question-card`,p>1&&!ee&&`qa-ai-chat-question-card--all`,j&&`qa-ai-chat-question-card--sending`,A&&`qa-ai-chat-question-card--error`,l&&`qa-ai-chat-question-card--lead-waits`].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:m,className:ue,"data-question-batch-id":e.id,"data-asker-kind":s===null?void 0:s.asker.kind,"data-asker-id":s===null?void 0:s.asker.id,"data-question-state":j?`sending`:M?`restored`:`pending`,"aria-busy":j||void 0,noValidate:!0,onSubmit:oe,onKeyDown:se,children:[O&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-question-progress`,role:`group`,"aria-label":o.progressLabel,children:e.questions.map((e,t)=>{let n=E[e.id]===!0,r=g[e.id].skipped,i=v&&!n,a=r?o.progressSegmentSkipped:n?o.progressSegmentAnswered:o.progressSegmentUnanswered;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:[`qa-ai-chat-question-progress-segment`,n&&`qa-ai-chat-question-progress-segment--answered`,i&&`qa-ai-chat-question-progress-segment--invalid`].filter(Boolean).join(` `),"data-question-index":t,"aria-current":ee&&t===S?`true`:void 0,"aria-label":Cb(a,{index:t+1}),disabled:j,onClick:()=>re(t)},e.id)})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-body`,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-question-header`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-header-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Tr,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-question-heading`,children:[c===null&&/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:o.pendingTitle}),s!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-caption`,children:s.askerLabel})]}),l&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-lead-waits`,children:a.agentQuestions.leadWaits}),(A||k)&&/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:A?`error`:`neutral`,"aria-live":`polite`,children:A?o.retryErrorBadge:Cb(o.progress,{resolved:D,total:p})})]}),s!==null&&s.assumption!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-question-assumption`,children:/* @__PURE__ */ (0,Z.jsxs)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(ri,{}),children:[a.agentQuestions.assumptionLabel,`: `,s.assumption]})}),A&&/* @__PURE__ */ (0,Z.jsx)(hb,{onRetry:t.onRetry?()=>void ae(()=>t.onRetry(e.id)):void 0}),le.map(t=>/* @__PURE__ */ (0,Z.jsx)(ob,{batchId:e.id,question:t,draft:g[t.id],showValidation:v&&!E[t.id],disabled:j,onChange:e=>_(n=>({...n,[t.id]:e}))},t.id)),O&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Qt,{}),disabled:j,onClick:ie,children:w?o.oneQuestionAtATime:o.showAllQuestions})]}),/* @__PURE__ */ (0,Z.jsxs)(`footer`,{className:`qa-ai-chat-question-footer`,children:[s===null?ce:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-question-footer-lead`,children:[c===null?/* @__PURE__ */ (0,Z.jsx)(ib,{question:s,bar:!1}):d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-footer-note`,children:d}),ce]}),ee&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:S===0||j,onClick:()=>re(S-1),children:o.previousQuestion}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:S===p-1||j,onClick:()=>re(S+1),children:o.nextQuestion})]}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:j,onClick:()=>void ae(()=>t.onCancel(e.id,e.revision)),children:f}),/* @__PURE__ */ (0,Z.jsxs)(I,{variant:`primary`,size:`sm`,type:`submit`,disabled:j,children:[j&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-question-spinner`,"aria-hidden":`true`}),j?o.sending:o.submitAnswers]})]})]})}function Eb({batch:e,loading:t=!1,controller:n,placement:r=`transcript`}){var i,a;let o=$().shell,s=o.questions;if(t)return/* @__PURE__ */ (0,Z.jsx)(wb,{});if(!e)return null;let c=((i=n.error)==null?void 0:i.batchId)===e.id?n.error:null,l=c?mb(c.kind,s):e.status===`pending`?``:fb(e,o),u=e.questions.map(e=>e.question).join(s.answerSeparator),d=e.status===`pending`?/* @__PURE__ */ (0,Z.jsx)(Tb,{question:e,controller:n,placement:r},`${e.id}:${e.revision}`):/* @__PURE__ */ (0,Z.jsx)(_b,{batch:e,formattedResolvedAt:(a=n.formatResolvedAt)==null?void 0:a.call(n,e.resolvedAt)});return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only qa-ai-chat-question-announcement`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:l&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:u}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{children:l})]})}),d]})}function Db(e){let t=e.secretInputRequests;return t.length>0?t:null}function Ob(e){if(e===null)return!1;let{read:t}=e;return t.kind===`failed`||t.kind===`ready`&&t.draft!==null}function kb(e,t){let n=(0,B.useRef)({conversationId:t,ids:/* @__PURE__ */ new Set}),[r,i]=(0,B.useState)({conversationId:t,items:[]});if((0,B.useEffect)(()=>{n.current.conversationId!==t&&(n.current={conversationId:t,ids:/* @__PURE__ */ new Set});let{ids:r}=n.current,a=e.filter(e=>!r.has(e.id));if(a.length!==0){for(let e of a)r.add(e.id);i({conversationId:t,items:a.map(e=>({key:e.id,questions:e.questions.map(e=>e.question)}))})}},[e,t]),r.conversationId!==t)return[];let a=new Set(e.map(e=>e.id));return r.items.filter(e=>a.has(e.key))}function Ab({regionLabel:e,conversationId:t,questions:n,questionController:r,confirmation:i,changeSets:a,isDecisionLocked:o,decisionProgress:s,onChangeSetDecision:c,onConfirmAll:l,changeSetTether:u,onFocusComposer:d,launchDraft:f}){let p=$(),m=p.shell.confirmation,h=p.shell.questions,g=kb(n,t),_=(0,B.useRef)(null),v=Vy({conversationId:t,presentToolCallIds:a.map(e=>e.toolCallId),dockRef:_,onFocusComposer:d,copy:p.cards.changeSet.dock}),y=Hy({conversationId:t,present:(0,B.useMemo)(()=>a.flatMap(e=>{let t=Db(e);return t===null?[]:[{toolCallId:e.toolCallId,requests:t}]}),[a])}),b=y.items,x=+!!Ob(f),S=x>0||n.length>0||i!==null||a.length>0||b.length>0,C=(i==null?void 0:i.items.filter(e=>e.status===`open`))??[],w=a.filter(e=>e.confirmEnabled&&Db(e)===null),T=C.length+w.length,E=[...C,...w].every(e=>o(e.toolCallId)),D=x+n.length+((i==null?void 0:i.items.length)??0)+a.length+b.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[g.map(e=>/* @__PURE__ */ (0,Z.jsx)(`p`,{children:h.arrived(e.questions.join(h.answerSeparator))},e.key)),v.announcement!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:v.announcement})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-dock-zone${S?` qa-ai-chat-dock-zone--open`:``}`,...S?{role:`region`,"aria-label":e}:{},children:/* @__PURE__ */ (0,Z.jsx)(`div`,{children:S&&/* @__PURE__ */ (0,Z.jsxs)(`section`,{ref:_,className:`qa-ai-chat-dock${D>1?` qa-ai-chat-dock--multiple`:``}`,"data-testid":`ai-chat-dock`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-dock-stack`,"data-testid":`ai-chat-dock-stack`,children:[f!==null&&/* @__PURE__ */ (0,Z.jsx)(my,{source:f}),n.map(e=>/* @__PURE__ */ (0,Z.jsx)(Eb,{batch:e,controller:r,placement:`dock`},e.id)),i==null?void 0:i.items.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(nb,{confirmation:e,confirmationPosition:t+1,pendingConfirmationCount:i.items.length,actionsLocked:o(e.toolCallId)||e.status!==`open`,onConfirm:i.onConfirm,onReject:i.onReject},e.toolCallId)),a.map(({toolCallId:e,...t})=>{let n=Db(t);if(n===null)return/* @__PURE__ */ (0,Z.jsx)(xy,{toolCallId:e,entry:t,locked:o(e),progress:s,onDecide:(e,n)=>{v.pressed([{toolCallId:e,destructive:t.destructive,secretSaved:null}],n),c(e,n)},tether:u},e);let r=wy(n);return/* @__PURE__ */ (0,Z.jsx)(By,{toolCallId:e,requests:n,heldReason:t.confirmBlockedBeyondSecrets,locked:o(e),progress:s,onDecide:(e,i)=>{y.pressed(e,i),v.pressed([{toolCallId:e,destructive:t.destructive,secretSaved:{names:n.map(e=>e.variableName),environment:r===null?null:r.name}}],i),c(e,i)},tether:u},`${e}:${n.map(e=>e.changeSetItemId).join(`,`)}`)}),b.map(e=>/* @__PURE__ */ (0,Z.jsx)(Ey,{requests:e.requests,outcome:e.outcome,onDone:()=>y.done(e.toolCallId)},`outcome:${e.toolCallId}`))]}),T>1&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,className:`qa-ai-chat-dock-confirm-all`,icon:/* @__PURE__ */ (0,Z.jsx)(Ke,{size:14}),loading:s!==null&&s.confirmAll,disabled:E,onClick:()=>{v.pressed(w.map(e=>({toolCallId:e.toolCallId,destructive:e.destructive,secretSaved:null})),`confirm`),l(C.map(e=>e.toolCallId),w.map(e=>e.toolCallId))},children:m.confirmAll(T)})]})})})]})}var jb=`workflow_draft`,Mb=/* @__PURE__ */ new Set([`launch_draft`,`launch_draft_discarded`]);function Nb(e){let t=[];for(let n of e){if(n.toolResults===void 0||n.toolCalls===void 0)continue;let e=new Set(n.toolCalls.filter(e=>e.toolName===jb).map(e=>e.id));for(let{toolCallId:r,result:i}of n.toolResults){if(!e.has(r))continue;let n=dm(i);n!==null&&Mb.has(n)&&t.push(r)}}return t.join(`,`)}function Pb(e){return e.state===`open`?e:null}function Fb(e){return{id:e.id,version:e.version,open:e.state===`open`}}function Ib(e,t){return t===null||t.id!==e.id?!1:e.version<t.version||e.version===t.version&&!t.open}function Lb(e,t){return e===null||t===null?e===t:e.id===t.id&&e.version===t.version}function Rb({conversationId:e,messages:t}){let n=C(),r=(0,B.useMemo)(()=>Nb(t),[t]),[i,a]=(0,B.useState)(null),[o,s]=(0,B.useState)(0);(0,B.useEffect)(()=>{if(e===null)return;let t=new AbortController;return n.launchDrafts.list({conversationId:e,state:`open`,limit:1},{signal:t.signal}).then(n=>{if(t.signal.aborted)return;let[r]=n.items,i=r===void 0?null:r;a(t=>{let n=t!==null&&t.conversationId===e?t:null;if(n!==null&&i!==null&&Ib(i,n.mark))return n;let r=n!==null&&n.read!==null&&n.read.kind===`ready`?n.read.draft:null,a=n===null?0:Lb(r,i)?n.revision:n.revision+1;return{conversationId:e,read:{kind:`ready`,draft:i},revision:a,mark:i===null?n===null?null:n.mark:Fb(i)}})},()=>{t.signal.aborted||a(t=>({conversationId:e,read:{kind:`failed`,retry:()=>s(e=>e+1)},revision:t===null||t.conversationId!==e?0:t.revision,mark:t===null||t.conversationId!==e?null:t.mark}))}),()=>t.abort()},[n,e,r,o]);let c=(0,B.useCallback)(e=>a(t=>t===null||t.conversationId!==e.conversationId?t:{...t,read:{kind:`ready`,draft:Pb(e)},mark:Fb(e)}),[]),l=(0,B.useCallback)(()=>s(e=>e+1),[]);if(e===null)return null;let u=i!==null&&i.conversationId===e?i:null;return{conversationId:e,read:u===null||u.read===null?{kind:`reading`}:u.read,revision:u===null?0:u.revision,adopt:c,reload:l}}function zb(e){let t=(0,B.useCallback)(t=>e.subscribe(t),[e]);return(0,B.useSyncExternalStore)(t,()=>e.get())}var Bb=()=>()=>{};function Vb(e){let t=(0,B.useCallback)(t=>e===null?Bb():e.subscribe(t),[e]);return(0,B.useSyncExternalStore)(t,()=>e===null?null:e.get())}var Hb=/[\p{Cc}\p{Cf}]+/gu;function Ub(e){let t=e.replace(Hb,` `).replace(/\s+/gu,` `).trim();return t.length<=60?t:t.slice(0,60).trimEnd()}function Wb(e){let t=Ub(e);return t===``?null:t}function Gb(e,t){return t.title(t.view[e.view])}function Kb(e,t){var n;let{context:r}=e,i=[{text:r.window===null?t.lastRuns(It.maxRuns,It.maxAgeDays):t.window[r.window],missing:!1}],a=(n=r.filters)==null?void 0:n.status;return a!==void 0&&i.push({text:t.status[a],missing:!1}),r.selectedEntity!==void 0&&i.push(qb(r.selectedEntity.type,e.entityName,t)),i}function qb(e,t,n){if(t===null)return{text:n.entity[e],missing:!1};let r=t.trim();return r===``?{text:n.nameUnavailable,missing:!0}:{text:r,missing:!1}}function Jb(e,t){let{context:n}=e,r=t.prompts,i=n.selectedEntity!==void 0&&e.entityName!==null?Wb(e.entityName):null;switch(n.view){case`overview`:return[r.overviewWeakSpots,...n.window===null?[]:[r.overviewChanged(t.window[n.window])],r.overviewWhereToLook];case`stability`:return[i===null?r.stabilityWhatToFix:r.stabilityWhyScenario(i),r.stabilityCauses];case`weak-spots`:return[r.weakSpotsWhatToCover,...i===null?[]:[r.weakSpotsWhyEntity(i)]];case`bug-hotspots`:return[r.bugHotspotsWhere,r.bugHotspotsStale]}}function Yb(e){let{report:t,copy:n,locale:r}=e;return t===null?{kind:`tasks`,heading:n.empty.heading,subtext:n.empty.subtext,footnote:n.empty.footnote,chips:md.map(e=>{let t=pd[e],n=Vg[e];return{id:e,title:t.title[r],hint:t.chip.hint[r],template:t.chip.briefTemplate[r],icon:/* @__PURE__ */ (0,Z.jsx)(n,{"aria-hidden":`true`})}})}:{kind:`report`,heading:n.empty.reportHeading,prompts:Jb(t,n.context.report).map((e,t)=>({id:`report-${t}`,text:e}))}}function Xb(e){return e.kind===`report`?/* @__PURE__ */ (0,Z.jsx)(Sr,{}):/* @__PURE__ */ (0,Z.jsx)(oi,{})}function Zb({welcome:e,draftStore:t,onSend:n,onInsert:r}){let i=zb(t),a=i.trim()!==``,o=e.kind===`tasks`&&i.trim()!==``&&!hd(i);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-welcome`,"data-testid":`ai-chat-empty-state`,"data-welcome":e.kind,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-welcome-mark`,"aria-hidden":`true`,children:Xb(e)}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:e.heading}),e.kind===`report`?e.prompts.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-suggest${a?` qa-ai-chat-suggest--faded`:``}`,children:e.prompts.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,disabled:a,onClick:()=>n(e.text),children:[/* @__PURE__ */ (0,Z.jsx)(oi,{"aria-hidden":`true`}),e.text]},e.id))}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.subtext}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-tasks${o?` qa-ai-chat-tasks--faded`:``}`,children:e.chips.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,"data-testid":`ai-chat-task-chip-${e.id}`,disabled:o,onClick:()=>r(e.template),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tasks-icon`,children:e.icon}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-tasks-text`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.title}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:e.hint})]})]})},e.id))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-tasks-hint`,children:e.footnote})]})]})}var Qb=z({kind:vt([`scenario`,`shared-step`,`element`,`page`,`test-plan`,`test-run`,`api-request`,`checklist`,`map`]),id:L().min(1).nullable()}),$b=z({projectId:xt().transform(s),keys:Rt([Qb],Qb)}),ex={kind:`none`};function tx(e){if(typeof e!=`object`||!e||!(`changed`in e))return ex;let t=$b.safeParse(e.changed);return t.success?{kind:`changed`,hint:t.data}:{kind:`malformed`,issuePaths:t.error.issues.map(e=>[`changed`,...e.path].join(`.`))}}function nx(e){let{transport:t,logger:n,entityChanged:r}=e;(0,B.useEffect)(()=>{if(r===null)return;let e=(e,t,i)=>{let a=tx(i);a.kind===`changed`?r(a.hint):a.kind===`malformed`&&n.warn(`${e}: changed is not an entity hint`,{toolCallId:t,issuePaths:a.issuePaths})};return t.subscribe(t=>{if(t.kind!==`event`)return;let{event:n}=t;n.type===`tool-result`?e(`tool result`,n.toolCallId,n.result):n.type===`action-resolved`&&e(`action resolved`,n.toolCallId,n)})},[t,n,r])}function rx({projectName:e,pinned:t,historyOpen:n,historyAvailable:r,onOpenHistory:i,onNewConversation:a,hostActions:o,copy:s}){return/* @__PURE__ */ (0,Z.jsx)(`header`,{className:`qa-ai-chat-header`,children:/* @__PURE__ */ (0,Z.jsxs)(Xe,{children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:s.history,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,"aria-expanded":n,disabled:!r,onClick:i,"data-testid":`ai-chat-history-button`,children:/* @__PURE__ */ (0,Z.jsx)(Kr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-header-tile`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(oi,{})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-names`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{className:`qa-ai-chat-header-title`,children:t===null?s.title:/* @__PURE__ */ (0,Z.jsx)(ix,{source:t.title})}),t===null?e===null?/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project qa-ai-chat-header-project--missing`,children:s.noProject}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:e}):/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`qa-ai-chat-header-project`,children:/* @__PURE__ */ (0,Z.jsx)(ix,{source:t.caption})})]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-header-actions`,children:[t===null&&/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:s.newConversation,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:a,"data-testid":`ai-chat-new-conversation`,children:/* @__PURE__ */ (0,Z.jsx)(ye,{"aria-hidden":`true`})})}),o]})]})})}function ix({source:e}){return zb(e)}var ax=/* @__PURE__ */ new Set([`managed`]),ox={fastest:0,balanced:1,smartest:2};function sx(e,t){return e===`key_invalid`?t.disabledKeyInvalid:e===`no_key`?t.disabledNoKey:null}var cx=[];function lx({capabilities:e,selectionId:t,onSelect:n,resolvedEcho:r,overrideRejected:i,isStreaming:a,onManageKeys:o,onUpgrade:s,openRequest:c,flagged:l}){let u=$().shell.modelPicker,d=e.status===`loading`,f=e.status===`ready`?e.value:null,p=f===null?cx:f.groups,[m,h]=(0,B.useState)(!1),[g,_]=(0,B.useState)(-1),v=(0,B.useRef)(null),y=(0,B.useRef)(null),b=(0,B.useId)(),x=p,S=[],C=[];for(let e of x)if(ax.has(e.source))for(let t of e.models)S.push({model:t,source:e.source});else C.push(e);let w=[...S].sort((e,t)=>ox[e.model.tier]-ox[t.model.tier]),T=[...w,...C.flatMap(e=>e.models.map(t=>({model:t,source:e.source})))],E=f===null?null:Kn(f,t,r),D=f===null||a,O=E!==null&&(E.source===`personal`||E.source===`company`)?E.source===`personal`?u.byok.personal:u.byok.company:null,ee=(0,B.useRef)(T),k=(0,B.useRef)(E);(0,B.useEffect)(()=>{ee.current=T,k.current=E}),(0,B.useEffect)(()=>{if(!m)return;let e=e=>{var t,n;let r=e.target;!((t=v.current)!=null&&t.contains(r))&&!((n=y.current)!=null&&n.contains(r))&&h(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[m]),(0,B.useEffect)(()=>{if(m){var e;let t=k.current,n=ee.current,r=t?n.findIndex(e=>e.model.id===t.model.id&&e.source===t.source):-1;_(r>=0?r:0),(e=y.current)==null||e.focus()}},[m]);let A=(0,B.useCallback)(()=>{D||h(!0)},[D]),j=(0,B.useCallback)(()=>{var e;h(!1),(e=v.current)==null||e.focus()},[]),M=(0,B.useRef)(A);(0,B.useEffect)(()=>{M.current=A},[A]),(0,B.useEffect)(()=>{c!==0&&M.current()},[c]);let N=(0,B.useCallback)((e,t)=>{Pn(e)&&(n(t,e),j())},[n,j]),te=(0,B.useCallback)(e=>{if(e.key===` `)e.preventDefault(),m?j():A();else if(e.key===`Enter`){if(e.preventDefault(),m){let e=T[g];e?N(e.model,e.source):j()}else A()}else e.key===`Escape`&&j()},[m,A,j,T,g,N]),ne=(0,B.useCallback)(e=>{if(e.key===`Escape`){e.preventDefault(),j();return}if(e.key===`ArrowDown`){e.preventDefault(),_(e=>Math.min(e+1,T.length-1));return}if(e.key===`ArrowUp`){e.preventDefault(),_(e=>Math.max(e-1,0));return}if(e.key===`Enter`&&g>=0){e.preventDefault();let t=T[g];t&&N(t.model,t.source)}},[j,T,g,N]);(0,B.useEffect)(()=>{if(!m||g<0)return;let e=y.current;if(!e)return;let t=e.querySelector(`[data-option-index="${g}"]`);t==null||t.scrollIntoView({block:`nearest`})},[g,m]);let re=()=>d?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-skeleton`,"data-testid":`model-picker-trigger-skeleton`,"aria-label":u.loading}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[E?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name`,children:E.model.shortName}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-trigger-name qa-ai-chat-modelpicker-trigger-name--empty`,children:u.selectModel}),O!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-trigger-provenance`,"data-testid":`model-picker-trigger-provenance`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(zr,{className:`qa-ai-chat-modelpicker-trigger-icon`,size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-sr-only`,children:O})]}),/* @__PURE__ */ (0,Z.jsx)(Be,{className:`qa-ai-chat-modelpicker-trigger-chevron${m?` qa-ai-chat-modelpicker-trigger-chevron--open`:``}`,size:12,"aria-hidden":`true`})]}),ie=0,ae=(e,t,n)=>{let r=ie++,i=(E==null?void 0:E.model.id)===e.id&&(E==null?void 0:E.source)===t,a=g===r,o=Pn(e),s=!o,c=sx(e.disabledReason,u),l=!n,d=n&&!s?u.tier[e.tier]:null,f=l?t===`personal`?u.byok.personal:u.byok.company:null,p=s&&c?`${e.name} \u2014 ${c}, ${u.disabledSuffixA11y}`:void 0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:[`qa-ai-chat-modelpicker-option`,i?`qa-ai-chat-modelpicker-option--active`:``,a?`qa-ai-chat-modelpicker-option--focused`:``,s?`qa-ai-chat-modelpicker-option--disabled`:``,d||s&&c?`qa-ai-chat-modelpicker-option--two-line`:``].filter(Boolean).join(` `),"data-testid":`model-picker-option-${e.id}`,"data-source":t,"data-model":e.id,"data-option-index":r,role:`option`,"aria-selected":i,"aria-disabled":s?`true`:void 0,"aria-label":p,onClick:o?()=>N(e,t):void 0,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-main`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-option-name`,children:e.name}),d!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-tier-descriptor`,"data-testid":`model-picker-tier-${e.id}`,children:d}),s&&c!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-disabled-reason${e.disabledReason===`key_invalid`?` qa-ai-chat-modelpicker-disabled-reason--invalid`:``}`,"data-testid":`model-picker-disabled-reason-${e.id}`,children:c})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-modelpicker-option-right`,children:[f!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-provenance`,"data-testid":`model-picker-provenance-${e.id}`,children:f}),i&&/* @__PURE__ */ (0,Z.jsx)(Ke,{className:`qa-ai-chat-modelpicker-check`,size:12,"data-testid":`model-picker-active-check`,"aria-label":u.currentlySelected})]})]},e.id)},oe=()=>m?/* @__PURE__ */ (0,Z.jsxs)(`div`,{ref:y,className:`qa-ai-chat-modelpicker-dropdown`,"data-testid":`model-picker-dropdown`,role:`listbox`,id:b,"aria-label":u.selectModel,onKeyDown:ne,tabIndex:-1,children:[/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[w.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-unified`,children:w.map(({model:e,source:t})=>ae(e,t,!0))}),C.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-group`,"data-testid":`model-picker-group-${e.source}`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-group-label`,children:e.source===`personal`?u.byokHeader.personal:u.byokHeader.company}),e.models.map(t=>ae(t,e.source,!1))]},e.source))]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-footer`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-footer-note`,"data-testid":`model-picker-footer-note`,children:u.footerNote}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-manage-keys`,onClick:()=>{j(),o()},"data-testid":`model-picker-manage-keys-link`,children:u.manageKeys})]}),f!==null&&!f.isEnterprise&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker-upsell`,"data-testid":`model-picker-upsell`,children:[/* @__PURE__ */ (0,Z.jsx)(zr,{size:12,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-modelpicker-upsell-text`,children:u.upsell}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-modelpicker-upsell-link`,onClick:()=>{j(),s()},children:u.upgrade})]})]}):null,se=()=>i?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-modelpicker-reject-error`,"data-testid":`model-picker-reject-error`,role:`alert`,children:u.rejected}):null,ce=E===null?null:O===null?E.model.name:`${E.model.name} \u00B7 ${O}`,le=/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:v,type:`button`,className:`qa-ai-chat-modelpicker-trigger${i?` qa-ai-chat-modelpicker-trigger--rejected`:``}${l?` qa-ai-chat-modelpicker-trigger--flagged`:``}${D?` qa-ai-chat-modelpicker-trigger--disabled`:``}`,"data-testid":`model-picker-trigger`,"data-provider":E==null?void 0:E.source,"data-model":E==null?void 0:E.model.id,onClick:()=>m?j():A(),onKeyDown:te,"aria-haspopup":`listbox`,"aria-expanded":m,"aria-controls":m?b:void 0,"aria-disabled":D,disabled:!1,children:re()});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-modelpicker`,children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`description`,content:ce,disabled:ce===null,children:le}),se(),oe()]})}var ux={"ai-keys":`/settings/personal/ai`,"billing-plan":`/settings/company/billing/plan`};function dx(e){return ux[e]}function fx({copy:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop`,"aria-hidden":`true`,"data-testid":`ai-chat-attachment-drop`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drop-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-drop-icon`,children:/* @__PURE__ */ (0,Z.jsx)(pi,{})}),/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:e.title}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{children:[e.types,/* @__PURE__ */ (0,Z.jsx)(`br`,{}),e.sizes]})]})})}function px(e){return Array.from(e.dataTransfer.types).includes(`Files`)}function mx(e){let[t,n]=(0,B.useState)(!1),r=(0,B.useRef)(0),i=e!==null,a=(0,B.useCallback)(()=>{r.current=0,n(!1)},[]);return(0,B.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&a()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,a]),(0,B.useEffect)(()=>{i||a()},[i,a]),{active:t,handlers:{onDragEnter:(0,B.useCallback)(e=>{i&&px(e)&&(e.preventDefault(),r.current+=1,n(!0))},[i]),onDragOver:(0,B.useCallback)(e=>{i&&px(e)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)},[i]),onDragLeave:(0,B.useCallback)(e=>{i&&px(e)&&(r.current=Math.max(0,r.current-1),r.current===0&&n(!1))},[i]),onDrop:(0,B.useCallback)(t=>{if(e===null||!px(t))return;t.preventDefault(),a();let n=Array.from(t.dataTransfer.files);n.length>0&&e(n)},[a,e])}}}var hx=[137,80,78,71,13,10,26,10],gx=[255,216,255],_x=[37,80,68,70,45],vx=[82,73,70,70],yx=[87,69,66,80];function bx(e,t){if(e.length===0)return{ok:!1,reason:`empty`};let n=Sx(e);if(n===null)return Rn(t.mediaType)?Cx(e)?{ok:!0,mediaType:t.mediaType,image:null}:{ok:!1,reason:`text_not_utf8`}:{ok:!1,reason:`content_mismatch`};if(n!==t.mediaType)return{ok:!1,reason:`content_mismatch`};if(n===`application/pdf`)return{ok:!0,mediaType:n,image:null};let r=wx(e,n);return r===null?{ok:!1,reason:`image_header_unreadable`}:{ok:!0,mediaType:n,image:r}}function xx(e,t,n=0){return e.length<n+t.length?!1:t.every((t,r)=>e[n+r]===t)}function Sx(e){return xx(e,hx)?`image/png`:xx(e,gx)?`image/jpeg`:xx(e,vx)&&xx(e,yx,8)?`image/webp`:xx(e,_x)?`application/pdf`:null}function Cx(e){if(e.includes(0))return!1;try{return new TextDecoder(`utf-8`,{fatal:!0}).decode(e),!0}catch(e){if(e instanceof TypeError)return!1;throw e}}function wx(e,t){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),r=t===`image/png`?Ex(e,n):t===`image/jpeg`?kx(e,n):Fx(e,n);return r===null||r.width<1||r.height<1?null:r}var Tx=[73,72,68,82];function Ex(e,t){return e.length<24||!xx(e,Tx,12)||t.getUint32(8)<13?null:{width:t.getUint32(16),height:t.getUint32(20)}}function Dx(e){return e===1||e>=208&&e<=216}function Ox(e){return e>=192&&e<=207&&e!==196&&e!==200&&e!==204}function kx(e,t){let n=2;for(;n<e.length;){if(e[n]!==255)return null;for(;n<e.length&&e[n]===255;)n+=1;let r=e[n];if(r===void 0)return null;if(n+=1,Dx(r))continue;if(r===217||r===218||n+2>e.length)return null;let i=t.getUint16(n);if(i<2)return null;if(Ox(r))return i<7||n+7>e.length?null:{width:t.getUint16(n+5),height:t.getUint16(n+3)};n+=i}return null}var Ax=[86,80,56,32],jx=[86,80,56,76],Mx=[86,80,56,88],Nx=[157,1,42],Px=47;function Fx(e,t){if(xx(e,Ax,12))return e.length<30||!xx(e,Nx,23)?null:{width:t.getUint16(26,!0)&16383,height:t.getUint16(28,!0)&16383};if(xx(e,jx,12)){if(e.length<25||e[20]!==Px)return null;let n=t.getUint32(21,!0);return{width:(n&16383)+1,height:(n>>>14&16383)+1}}return xx(e,Mx,12)?e.length<30?null:{width:Ix(t,24)+1,height:Ix(t,27)+1}:null}function Ix(e,t){return e.getUint8(t)|e.getUint8(t+1)<<8|e.getUint8(t+2)<<16}var Lx=`.png,.jpg,.jpeg,.webp,.pdf,.txt,.md`,Rx=/* @__PURE__ */ new Map([[`png`,`image/png`],[`jpg`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`webp`,`image/webp`],[`pdf`,`application/pdf`],[`txt`,`text/plain`],[`md`,`text/markdown`]]);function zx(e){let t=e.lastIndexOf(`.`);return t<=0||t===e.length-1?null:e.slice(t+1).toLowerCase()}function Bx(e){let t=zx(e);if(t===null)return null;let n=Rx.get(t);return n===void 0?null:n}function Vx(e,t,n){return n===null?{kind:`type`}:e.length>255?{kind:`file_name`}:t>Vn[n]?{kind:`too_large`,mediaType:n}:null}function Hx(e,t){if(t===null)return null;if(e.upload.kind===`uploaded`){let n=Ln(e.upload.attachment,t.attachments);return n.ok?null:n.fact}let{check:n}=e;if(n.kind!==`passed`)return null;let r=Gn({mediaType:n.mediaType,byteSize:e.byteSize,image:n.image},t.attachments);return r.ok?null:r.fact}function Ux(e,t){return e.check.kind===`passed`&&e.upload.kind===`idle`&&Hx(e,t)===null}function Wx(e,t){return e.upload.kind===`uploaded`&&t-Date.parse(e.upload.attachment.createdAt)>=864e5}function Gx(e,t,n){let{check:r,upload:i}=e;if(r.kind===`refused`)return{kind:`local_refused`,refusal:r.refusal};if(i.kind===`refused`)return{kind:`server_refused`,errorCode:i.errorCode};if(i.kind===`failed`)return{kind:`failed`,cause:i.cause};if(Wx(e,n))return{kind:`expired`};let a=Hx(e,t);if(a!==null)return{kind:`model_refused`,fact:a};if(r.kind===`reading`)return{kind:`reading`};switch(i.kind){case`uploaded`:return{kind:`ready`,attachment:i.attachment};case`uploading`:case`idle`:return{kind:`uploading`}}}function Kx(e){return e===`local_refused`||e===`server_refused`||e===`failed`||e===`expired`||e===`model_refused`}function qx(e){return Kx(e.kind)}function Jx(e,t){return e.length===0?null:e.some(qx)?`refused`:e.some(e=>e.kind===`uploading`||e.kind===`reading`)?`uploading`:t?null:`no_text`}function Yx(e){return e.check.kind===`passed`&&Hn(e.check.mediaType)&&e.check.image!==null}function Xx(e){return e.map(e=>{if(e.upload.kind!==`uploaded`)throw Error(`uploadedAttachments: the chip ${e.key} is not uploaded`);return e.upload.attachment})}var Zx=class{constructor(){this.shares=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Map}set(e,t){this.shares.get(e)!==t&&(this.shares.set(e,t),this.notify(e))}delete(e){this.shares.delete(e)&&this.notify(e)}get(e){let t=this.shares.get(e);return t===void 0?0:t}subscribe(e,t){let n=this.listeners.get(e);return n===void 0&&(n=/* @__PURE__ */ new Set,this.listeners.set(e,n)),n.add(t),()=>{let n=this.listeners.get(e);n!==void 0&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){let t=this.listeners.get(e);if(t!==void 0)for(let e of t)e()}};function Qx(e,t){let n=(0,B.useCallback)(n=>e.subscribe(t,n),[e,t]),r=(0,B.useCallback)(()=>e.get(t),[e,t]);return(0,B.useSyncExternalStore)(n,r,r)}var $x=6e4;function eS(e){let{totalBytes:t,onStall:n}=e,r=0,i=!1,a=null,o=()=>{a!==null&&clearTimeout(a),a=null},s=()=>{o(),a=setTimeout(()=>{a=null,i=!0,n()},$x)};return s(),{advance(e){if(!i){if(e===0){r=0,s();return}e<=r||(r=e,e>=t?o():s())}},stop(){i=!0,o()}}}var tS=6e4,nS=0,rS=()=>`attachment-${++nS}`,iS=408;function aS(e){return!(e instanceof Jn)||e.status===0||e.status===iS?{kind:`failed`,cause:`network`}:e.status>=500?{kind:`failed`,cause:`server`}:{kind:`refused`,errorCode:e.errorCode}}function oS({http:e,projectId:t,model:n,resetKey:r,logger:i}){let[a,o]=(0,B.useState)([]),[s,c]=(0,B.useState)(()=>Date.now()),l=(0,B.useRef)(/* @__PURE__ */ new Map),[u]=(0,B.useState)(()=>new Zx),d=(0,B.useRef)(a);(0,B.useEffect)(()=>{d.current=a},[a]);let f=(0,B.useCallback)((e,t)=>{o(n=>n.map(n=>n.key===e?t(n):n))},[]),p=(0,B.useCallback)(t=>{var n;if((n=l.current.get(t.key))==null||n.abort(),l.current.delete(t.key),t.upload.kind!==`uploaded`)return;let{id:r}=t.upload.attachment;Hu(e,r).catch(e=>{i.warn(`chat attachment discard failed`,{attachmentId:r,status:e instanceof Jn?e.status:null,errorCode:e instanceof Jn?e.errorCode:null})})},[e,i]),m=(0,B.useCallback)(()=>{for(let e of d.current)p(e);d.current=[],o([])},[p]),h=(0,B.useRef)({resetKey:r,projectId:t});(0,B.useEffect)(()=>{let e=h.current;(e.resetKey!==r||e.projectId!==t)&&(h.current={resetKey:r,projectId:t},m())},[r,t,m]),(0,B.useEffect)(()=>()=>{for(let e of l.current.values())e.abort();l.current.clear()},[]);let g=(0,B.useCallback)((e,t,n)=>{t.arrayBuffer().then(t=>{let r=new Uint8Array(t),i=bx(r,{mediaType:n}),a=i.ok?{kind:`passed`,mediaType:i.mediaType,bytes:r,image:i.image}:{kind:`refused`,refusal:{kind:`bytes`,reason:i.reason}};f(e,e=>({...e,check:a}))}).catch(t=>{i.warn(`chat attachment read failed`,{message:t instanceof Error?t.message:String(t)}),f(e,e=>({...e,check:{kind:`refused`,refusal:{kind:`unreadable`}}}))})},[i,f]),_=(0,B.useCallback)(e=>{let t=e.map(e=>{let t=Bx(e.name),n=Vx(e.name,e.size,t);return{key:rS(),file:e,fileName:e.name,byteSize:e.size,declared:t,check:n===null?{kind:`reading`}:{kind:`refused`,refusal:n},upload:{kind:`idle`}}});o(e=>[...e,...t]);for(let e of t)e.check.kind===`reading`&&e.declared!==null&&g(e.key,e.file,e.declared)},[g]),v=(0,B.useCallback)(n=>{let{check:r}=n;if(r.kind!==`passed`||t===null)return;let a=new AbortController;l.current.set(n.key,a),u.set(n.key,0),f(n.key,e=>({...e,upload:{kind:`uploading`}}));let o=r.bytes.byteLength,s=!1,c=0,d=eS({totalBytes:o,onStall:()=>{s=!0,a.abort(new DOMException(`No upload progress for 60 s`,`TimeoutError`))}});Bu(e,{projectId:t,fileName:n.fileName,mediaType:r.mediaType,bytes:r.bytes,signal:a.signal,onProgress:e=>{a.signal.aborted||(d.advance(e),c=Math.max(c,e),u.set(n.key,c/o))}}).then(e=>{d.stop(),u.delete(n.key),l.current.delete(n.key),f(n.key,t=>({...t,upload:{kind:`uploaded`,attachment:e}}))}).catch(e=>{if(d.stop(),u.delete(n.key),a.signal.aborted&&!s)return;l.current.delete(n.key);let t=s?{kind:`failed`,cause:`network`}:aS(e);i.warn(`chat attachment upload failed`,{mediaType:r.mediaType,byteSize:n.byteSize,stalled:s,status:e instanceof Jn?e.status:null,errorCode:e instanceof Jn?e.errorCode:null}),f(n.key,e=>({...e,upload:t}))})},[e,i,u,t,f]);(0,B.useEffect)(()=>{for(let e of a)t!==null&&Ux(e,n)&&!l.current.has(e.key)&&v(e)},[a,n,t,v]);let y=a.some(e=>e.upload.kind===`uploaded`);(0,B.useEffect)(()=>{if(!y)return;c(Date.now());let e=setInterval(()=>c(Date.now()),tS);return()=>clearInterval(e)},[y]);let b=(0,B.useCallback)(e=>{let t=d.current.find(t=>t.key===e);t!==void 0&&(p(t),o(t=>t.filter(t=>t.key!==e)))},[p]),x=(0,B.useCallback)(e=>{f(e,e=>({...e,upload:{kind:`idle`}}))},[f]),S=(0,B.useCallback)(()=>{let e=d.current;return d.current=[],o([]),e},[]),C=(0,B.useCallback)(e=>{o(t=>[...e,...t])},[]),w=(0,B.useMemo)(()=>a.map(e=>({attachment:e,view:Gx(e,n,s)})),[a,n,s]);return{items:w,model:n,progress:u,sendBlock:(0,B.useCallback)(e=>Jx(w.map(e=>e.view),e),[w]),add:_,remove:b,retry:x,detach:S,reattach:C}}function sS({host:e,projectId:t,model:n,resetKey:r,accepting:i}){let a=(0,B.useMemo)(()=>n===null?null:{name:n.name,attachments:n.attachments},[n]),o=oS({http:e.http,projectId:t,model:a,resetKey:r,logger:e.logger}),{add:s}=o,c=mx(i?s:null),[l,u]=(0,B.useState)(0);return{attachments:o,drop:c,modelListRequest:l,openModelList:(0,B.useCallback)(()=>u(e=>e+1),[]),modelFlagged:o.items.some(e=>e.view.kind===`model_refused`)}}function cS(){let e=``,t=/* @__PURE__ */ new Set;return{get:()=>e,set:n=>{if(n!==e){e=n;for(let e of t)e()}},subscribe:e=>(t.add(e),()=>{t.delete(e)})}}function lS({label:e}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-tile qa-ai-chat-filechip-tile--doc`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e})]})}function uS({fileName:e}){let{base:t,ext:n}=Lf(e);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-name`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-base`,children:t}),n!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-name-ext`,children:n})]})}function dS(e,t){let[n,r]=(0,B.useState)(null);return(0,B.useEffect)(()=>{if(!t)return;let n=URL.createObjectURL(e);return r(n),()=>{URL.revokeObjectURL(n),r(null)}},[t,e]),n}function fS({attachment:e,thumbnail:t,bad:n,typeLabel:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-tile-wrap`,children:[t===null?/* @__PURE__ */ (0,Z.jsx)(lS,{label:pS(e,r)}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-tile`,children:/* @__PURE__ */ (0,Z.jsx)(`img`,{src:t,alt:``})}),n&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-bad`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 6v7`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M12 18h.01`})]})})]})}function pS(e,t){if(e.declared!==null)return t[e.declared];let n=zx(e.fileName);return n===null?``:n.slice(0,3).toUpperCase()}function mS({item:e,progress:t,facts:n,reason:r,justUploaded:i,onRemove:a,onRetry:o,onPickModel:s,copy:c,typeLabel:l}){let{attachment:u,view:d}=e,f=(0,B.useId)(),p=dS(u.file,Yx(u)),m=r!==null,h=Qx(t,u.key),g=d.kind===`uploading`?h:null,_=g!==null,v=d.kind===`failed`?c.retry:d.kind===`expired`?c.reupload:null,y=[`qa-ai-chat-att`,_?`qa-ai-chat-att--up`:``,m?`qa-ai-chat-att--err`:``,i&&d.kind===`ready`?`qa-ai-chat-att--done`:``].filter(Boolean).join(` `);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:y,role:`listitem`,style:g===null?void 0:{"--qa-ai-chat-att-progress":g},"aria-describedby":m?f:void 0,"data-testid":`ai-chat-attachment`,"data-state":d.kind,children:[/* @__PURE__ */ (0,Z.jsx)(fS,{attachment:u,thumbnail:p,bad:m,typeLabel:l}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-att-text`,children:m?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-att-name-row`,children:[/* @__PURE__ */ (0,Z.jsx)(uS,{fileName:u.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-att-why`,id:f,"data-testid":`ai-chat-attachment-reason`,children:[r.kind===`sentence`?r.text:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r.lead,s===null?c.pickModel:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-link`,onClick:s,"data-testid":`ai-chat-attachment-pick-model`,children:c.pickModel})]}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` `,/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-att-link qa-ai-chat-att-act`,onClick:o,"data-testid":`ai-chat-attachment-retry`,children:[/* @__PURE__ */ (0,Z.jsx)(ni,{"aria-hidden":`true`}),v]})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(uS,{fileName:u.fileName}),g===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,children:n}):/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-att-meta`,role:`progressbar`,"aria-label":c.uploadingLabel(u.fileName),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g*100),children:c.uploading(Math.round(g*100))})]})}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:c.remove(u.fileName),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-att-remove`,onClick:a,"data-testid":`ai-chat-attachment-remove`,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`})})})]})}function hS(e,t,n){let r=Ff(e.byteSize,t,n.units),{upload:i,check:a}=e;return i.kind===`uploaded`?If(i.attachment,t,n):a.kind===`passed`&&a.image!==null?n.facts.image(a.image.width,a.image.height,r):n.facts.text(r)}function gS(e,t){switch(e.kind){case`type`:return t.refusal.type;case`file_name`:return t.refusal.fileName;case`unreadable`:return t.refusal.unreadable;case`too_large`:return t.refusal.tooLarge(Hn(e.mediaType)?t.refusal.limit.image:Rn(e.mediaType)?t.refusal.limit.text:t.refusal.limit.pdf);case`bytes`:switch(e.reason){case`empty`:return t.refusal.empty;case`content_mismatch`:return t.refusal.type;case`text_not_utf8`:return t.refusal.textNotUtf8;case`image_header_unreadable`:return t.refusal.unreadable}}}function _S(e,t,n,r){switch(e){case Fn.contentMismatch:return n.refusal.contentMismatch(r.typeLabel[t]);case Fn.textNotUtf8:return n.refusal.textNotUtf8;case Fn.pdfEncrypted:return n.refusal.pdfEncrypted;case Fn.pdfUnreadable:case Fn.imageUnreadable:return n.refusal.unreadable;case Fn.emptyFile:return n.refusal.empty;case Fn.invalidFileName:return n.refusal.fileName;case`FST_ERR_CTP_BODY_TOO_LARGE`:return gS({kind:`too_large`,mediaType:t},n);case`FST_ERR_CTP_INVALID_MEDIA_TYPE`:return n.refusal.type;default:return n.refusal.server}}function vS(e,t,n,r){let{reason:i}=r.unsent,a=e=>Ff(e,n,r.units),o=e=>Pf(e,n),s=t=>{if(t===null)throw Error(`factWords: no number for the fact ${e}`);return t};switch(e){case`image_bytes`:return i.imageBytes(a(Math.floor(s(t.imageMaxBase64Bytes)*3/4)));case`image_edge`:return i.imageEdge(o(s(t.imageMaxEdgePx)));case`image_patches`:{let e=t.imageMaxPatches;if(e===null)throw Error(`factWords: no number for the fact image_patches`);return i.imagePatches(o(Math.floor(e.maxPatches*e.patchPx**2/1e6)))}case`pdf_pages`:return i.pdfPages(o(s(t.pdfMaxPagesPerRequest)));case`file_bytes`:return i.fileBytes(a(s(t.fileMaxBytes)));case`request_bytes`:return i.requestBytes(a(s(t.requestMaxBytes)));case`media_type`:case`files_bytes`:case`images_count`:case`many_images_edge`:case`context_window`:throw Error(`factWords: ${e} is not a fact of one file`)}}function yS(e,t,n,r,i,a){let o=t.upload.kind===`uploaded`?t.upload.attachment.mediaType:t.declared;if(n.attachments===null)return i.refusal.modelNoFiles(n.name);if(o===null)throw Error(`modelRefusalLead: a model refusal of an untyped file`);return e===`media_type`?i.refusal.modelNoType(n.name,a.typeLabel[o]):i.refusal.modelFact(n.name,vS(e,n.attachments.facts,r,a))}function bS(e,t,n,r,i,a){switch(e.kind){case`local_refused`:return{kind:`sentence`,text:gS(e.refusal,i)};case`server_refused`:if(t.declared===null)throw Error(`chipReasonOf: a server refusal of an untyped file`);return{kind:`sentence`,text:_S(e.errorCode,t.declared,i,a)};case`failed`:return{kind:`sentence`,text:e.cause===`network`?i.refusal.failedNetwork:i.refusal.failedServer};case`expired`:return{kind:`sentence`,text:i.refusal.expired};case`model_refused`:if(n===null)throw Error(`chipReasonOf: a model refusal without a model`);return{kind:`model`,lead:yS(e.fact,t,n,r,i,a)};case`reading`:case`uploading`:case`ready`:return null}}function xS(e,t){return e.kind===`sentence`?e.text:`${e.lead}${t.pickModel}`}var SS=1100;function CS({attachments:e,onPickModel:t,copy:n}){let r=Q(),i=$().attachments,{items:a,model:o}=e,s=(0,B.useRef)(null),[c,l]=(0,B.useState)(!1),[u,d]=(0,B.useState)(/* @__PURE__ */ new Set),[f,p]=(0,B.useState)(``),m=(0,B.useRef)(/* @__PURE__ */ new Map),h=(0,B.useRef)(/* @__PURE__ */ new Set),g=a.map(e=>({item:e,reason:bS(e.view,e.attachment,o,r,n,i),facts:hS(e.attachment,r,i)}));(0,B.useEffect)(()=>{let e=m.current,t=/* @__PURE__ */ new Map,r=[],i=[];for(let{item:a,reason:o}of g){let{key:s}=a.attachment,c=e.get(s);t.set(s,a.view.kind),c!==a.view.kind&&(o!==null&&(c===void 0||!Kx(c))?r.push(n.announce.refused(a.attachment.fileName,xS(o,n))):a.view.kind===`ready`&&c===`uploading`&&(r.push(n.announce.uploaded(a.attachment.fileName)),i.push(s)))}if(m.current=t,r.length>0&&p(r.join(`. `)),i.length===0)return;d(e=>/* @__PURE__ */ new Set([...e,...i]));let a=setTimeout(()=>{h.current.delete(a),d(e=>new Set([...e].filter(e=>!i.includes(e))))},SS);h.current.add(a)}),(0,B.useEffect)(()=>()=>{for(let e of h.current)clearTimeout(e);h.current.clear()},[]);let _=()=>{let e=s.current;e!==null&&l(e.scrollTop+e.clientHeight<e.scrollHeight-1)};(0,B.useLayoutEffect)(_,[a]);let v=a.some(e=>qx(e.view));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:s,className:[`qa-ai-chat-att-tray`,v?`qa-ai-chat-att-tray--tall`:``,c?`qa-ai-chat-att-tray--fade`:``].filter(Boolean).join(` `),role:`list`,"aria-label":n.trayLabel,onScroll:_,onAnimationEnd:_,"data-testid":`ai-chat-attachment-tray`,children:g.map(({item:r,reason:a,facts:o})=>/* @__PURE__ */ (0,Z.jsx)(mS,{item:r,progress:e.progress,facts:o,reason:a,justUploaded:u.has(r.attachment.key),onRemove:()=>e.remove(r.attachment.key),onRetry:()=>e.retry(r.attachment.key),onPickModel:t,copy:n,typeLabel:i.typeLabel},r.attachment.key))}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,children:f})]})}var wS=/^image\.(png|jpe?g|webp)$/i,TS={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function ES(e){let t=e=>String(e).padStart(2,`0`);return`${t(e.getHours())}-${t(e.getMinutes())}-${t(e.getSeconds())}`}function DS(e,t,n){return e.getData(`text/plain`)===``?Array.from(e.files).map(e=>{let r=TS[e.type];return r===void 0||e.name!==``&&!wS.test(e.name)?e:new File([e],`${n(ES(t))}.${r}`,{type:e.type,lastModified:e.lastModified})}):[]}var OS=[`ask`,`bypass`],kS={ask:Ir,bypass:Ar};function AS({permission:e,copy:t}){let{value:n,disabled:r,arrival:i,onChange:a}=e,[o,s]=(0,B.useState)(!1),c=(0,B.useRef)(null),l=(0,B.useRef)(null),u=(0,B.useRef)(!1),d=vn(),f=o&&!r;(0,B.useEffect)(()=>{var e;if(r||!u.current)return;u.current=!1;let t=document.activeElement;(t===null||t===document.body)&&((e=l.current)==null||e.focus())},[r,n]);let p={ask:t.askHint,bypass:t.bypassHint},m=e=>{s(!1),e!==n&&(u.current=!0,a(e))},h=e=>{let t=[...e.currentTarget.querySelectorAll(`[role="radio"]`)],n=t.findIndex(e=>e===document.activeElement),r=n=>{let r=t[n];r!==void 0&&(e.preventDefault(),r.focus())};switch(e.key){case`ArrowDown`:case`ArrowRight`:r((n+1)%t.length);break;case`ArrowUp`:case`ArrowLeft`:r((n-1+t.length)%t.length);break;case`Home`:r(0);break;case`End`:r(t.length-1)}},g=n===null?t.groupLabel:t[n],_=n===null?Ir:kS[n],v=/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:l,type:`button`,className:P(`qa-ai-chat-set`,n===`bypass`&&`qa-ai-chat-set--bypass`,i!==null&&`qa-ai-chat-set--arrived`),"aria-label":n===null?t.groupLabel:t.chipLabel(g),disabled:r,"data-value":n===null?void 0:n,"data-testid":`ai-chat-permission`,onAnimationEnd:i===null?void 0:i.onShown,children:[/* @__PURE__ */ (0,Z.jsx)(_,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-set-value`,children:g})]});return/* @__PURE__ */ (0,Z.jsx)(Yt,{title:t.groupLabel,titleVisible:!1,trigger:v,open:f,onOpenChange:e=>s(e&&!r),side:`top`,collisionAvoidance:nn,...d===null?{}:{positionAnchor:d},initialFocusRef:c,className:en,"data-testid":`ai-chat-permission-popover`,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`flex items-baseline justify-between gap-2 px-2 pt-1.5 pb-2`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`text-xs font-semibold text-fg-primary`,children:t.groupLabel}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`text-xs text-fg-muted`,children:t.menuNote})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{role:`radiogroup`,"aria-label":t.groupLabel,className:`flex flex-col`,onKeyDown:h,children:OS.map((e,r)=>{let i=e===n,a=kS[e],o=i||n===null&&r===0;return/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:o?c:void 0,type:`button`,role:`radio`,"aria-checked":i,tabIndex:o?0:-1,"data-value":e,"data-testid":`ai-chat-permission-${e}`,onClick:()=>m(e),className:P(`grid w-full grid-cols-[18px_minmax(0,1fr)_16px] items-start gap-2.5 rounded-md border-0 bg-transparent p-2 text-left`,`hover:bg-(--color-bg-elevated-hover) focus-visible:bg-(--color-bg-elevated-hover)`,`focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--color-border-focus)`),children:[/* @__PURE__ */ (0,Z.jsx)(a,{"aria-hidden":`true`,className:P(`mt-0.5 size-4`,i?`text-(--color-primary-text)`:`text-fg-muted`)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:P(`block text-body-sm font-medium`,i?`text-(--color-primary-text)`:`text-fg-primary`),children:t[e]}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-xs leading-[1.45] text-fg-muted`,children:p[e]})]}),/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`,className:P(`mt-0.5 size-4 text-(--color-primary-text)`,!i&&`invisible`)})]},e)})})]})})}var jS=1e4,MS=5,NS=1e3,PS=1.5;function FS(e){let{isStreaming:t,errorCode:n,send:r,stop:i,onAbandoned:a}=e,o=(0,B.useRef)(a);(0,B.useEffect)(()=>{o.current=a},[a]);let[s,c]=(0,B.useState)(null),[l,u]=(0,B.useState)(!1),d=(0,B.useRef)(null),f=(0,B.useRef)(null),p=(0,B.useRef)(null),m=(0,B.useCallback)(()=>{p.current!==null&&(clearTimeout(p.current),p.current=null),f.current=null,u(!1)},[]),h=(0,B.useCallback)(e=>{r(e).kind!==`sent`&&m()},[m,r]),g=(0,B.useCallback)(e=>{i(),c(e),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(()=>{d.current=null,c(null),o.current(e.message)},jS)},[i]);return(0,B.useEffect)(()=>{s===null||t||(d.current!==null&&(clearTimeout(d.current),d.current=null),c(null),f.current={prepared:s.prepared,retriesLeft:MS,timerPending:!1},u(!0),h(s.prepared))},[h,t,s]),(0,B.useEffect)(()=>{if(n!==`chat.busy`){f.current!==null&&m();return}let e=f.current;if(e===null||e.timerPending)return;if(e.retriesLeft<=0){m();return}let t=(e,n,r)=>{f.current={prepared:n,retriesLeft:e,timerPending:!0},p.current=setTimeout(()=>{p.current=null;let e=f.current;e!==null&&(f.current={...e,timerPending:!1},h(e.prepared),f.current!==null&&(e.retriesLeft>0?t(e.retriesLeft-1,e.prepared,r*PS):m()))},r)};t(e.retriesLeft-1,e.prepared,NS)},[h,m,n]),(0,B.useEffect)(()=>()=>{d.current!==null&&clearTimeout(d.current),p.current!==null&&clearTimeout(p.current),f.current=null},[]),{queued:s!==null,busyChainActive:l,sendAfterStop:g}}var IS=typeof CSS<`u`&&typeof CSS.supports==`function`&&CSS.supports(`field-sizing`,`content`),LS=120,RS=300;function zS({draftStore:e,isStreaming:t,pendingHostAction:n,interactive:r,placeholder:i,errorCode:a,prepareSend:o,sendPrepared:s,stop:c,autoFocus:l,fillRequest:u,focusRequest:d,chips:f,files:p,onBusyChainChange:m,copy:h}){let g=(0,B.useRef)(null),_=(0,B.useRef)(null),v=(0,B.useRef)(null),y=(0,B.useId)(),[b,x]=(0,B.useState)(null),S=(0,B.useRef)(null),C=p===null?null:p.attachments,w=zb(e),T=e.set,{queued:E,busyChainActive:D,sendAfterStop:O}=FS({isStreaming:t,errorCode:a,send:s,stop:c,onAbandoned:(0,B.useCallback)(t=>{let n=e.get();T(n.trim().length===0?t.text:`${t.text}\n${n}`),C!==null&&t.attachments.length>0&&C.reattach(t.attachments)},[C,e,T])});(0,B.useEffect)(()=>{m(D)},[D,m]),(0,B.useEffect)(()=>{if(l)return S.current=setTimeout(()=>{var e;S.current=null;let t=g.current;t!==null&&t.contains(document.activeElement)||(e=_.current)==null||e.focus({preventScroll:!0})},RS),()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)}},[l]),(0,B.useEffect)(()=>{if(u===0)return;let e=_.current;if(e===null)return;let t=e.value.indexOf(`
|
|
371
|
-
`),n=t===-1?e.value.length:t;e.focus({preventScroll:!0}),e.setSelectionRange(n,n)},[u]),(0,B.useEffect)(()=>{var e;d!==0&&((e=_.current)==null||e.focus({preventScroll:!0}))},[d]);let ee=(0,B.useCallback)(()=>{S.current!==null&&(clearTimeout(S.current),S.current=null)},[]),k=(0,B.useCallback)(()=>{if(IS)return;let e=_.current;e!==null&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,LS)}px`)},[]);(0,B.useLayoutEffect)(k,[k,w]),(0,B.useEffect)(()=>{if(!IS)return window.addEventListener(`resize`,k),()=>window.removeEventListener(`resize`,k)},[k]);let[A,j]=(0,B.useState)(!1),M=w.trim(),N=C===null?null:C.sendBlock(M.length>0),te=(0,B.useCallback)(()=>{if(j(!1),n&&M.length===0){c();return}if(t){if(M.length===0){c();return}if(N!==null)return;T(``);let e={text:M,attachments:C===null?[]:C.detach()};O({message:e,prepared:o(M,`external`,Xx(e.attachments))});return}if(M.length===0||!r||N!==null)return;let e=C===null?[]:C.items.map(e=>e.attachment);s(o(M,`composer`,Xx(e))).kind===`sent`&&(T(``),C!==null&&C.detach())},[C,r,t,n,o,T,O,s,N,c,M]),ne=r&&M.length>0&&N===null,re=C!==null&&C.items.length>0,ie={uploading:h.sendBlocked.uploading,refused:h.sendBlocked.refused,no_text:h.sendBlocked.noText},ae=e=>{C!==null&&e.length!==0&&C.add(e)},oe=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`textarea`,{ref:_,value:w,rows:1,placeholder:r&&re?h.placeholderWithFiles:i,"aria-label":h.inputLabel,"aria-describedby":y,disabled:!r,"data-testid":`ai-chat-input`,onChange:e=>T(e.target.value),onPaste:e=>{if(C===null)return;let t=DS(e.clipboardData,/* @__PURE__ */ new Date,h.attachments.pastedName);t.length!==0&&(e.preventDefault(),ae(t))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),te())}}),/* @__PURE__ */ (0,Z.jsx)(`span`,{id:y,className:`qa-ai-chat-sr-only`,children:f===null?h.plainHint:h.hint})]}),se=p!==null&&p.attachments.items.length>0?/* @__PURE__ */ (0,Z.jsx)(CS,{attachments:p.attachments,onPickModel:p.onPickModel,copy:h.attachments}):null,ce=p===null?null:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:h.attachments.attach,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-attach`,disabled:!r,onClick:()=>{var e;return(e=v.current)==null?void 0:e.click()},"data-testid":`ai-chat-attach-button`,children:/* @__PURE__ */ (0,Z.jsx)(Xr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`input`,{ref:v,type:`file`,multiple:!0,accept:Lx,hidden:!0,tabIndex:-1,"aria-hidden":`true`,"data-testid":`ai-chat-attach-input`,onChange:e=>{let t=e.currentTarget;t.files!==null&&ae(Array.from(t.files)),t.value=``}})]}),le=E?/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--pending`,disabled:!0,"aria-busy":`true`,"aria-label":h.send,"data-testid":`ai-chat-send-button`,children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`icon-pending`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]})}):t||n?/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:h.stop,open:A,onOpenChange:j,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-send qa-ai-chat-send--stop`,onClick:c,"data-testid":`ai-chat-stop-button`,children:/* @__PURE__ */ (0,Z.jsx)(ci,{"aria-hidden":`true`})})}):/* @__PURE__ */ (0,Z.jsx)(Re,{...N===null?{relationship:`label`,content:h.send}:{relationship:`description`,content:ie[N]},open:A,onOpenChange:j,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`submit`,className:`qa-ai-chat-send`,"aria-label":h.send,"aria-disabled":ne?void 0:`true`,"data-testid":`ai-chat-send-button`,onClick:e=>{ne||e.preventDefault()},children:/* @__PURE__ */ (0,Z.jsx)(vr,{"aria-hidden":`true`})})});return f===null?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:g,onPointerDownCapture:ee,children:/* @__PURE__ */ (0,Z.jsxs)(`form`,{className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),te()},noValidate:!0,children:[se,oe,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-composer-foot qa-ai-chat-composer-foot--plain`,children:[ce!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[ce,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-composer-grow`})]}),le]})]})}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-composer-wrap`,ref:g,onPointerDownCapture:ee,children:/* @__PURE__ */ (0,Z.jsxs)(Gt.Provider,{value:b,children:[/* @__PURE__ */ (0,Z.jsxs)(`form`,{ref:x,className:`qa-ai-chat-composer`,onSubmit:e=>{e.preventDefault(),te()},noValidate:!0,children:[se,oe,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-composer-foot`,children:[ce,f.modelPicker,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-composer-grow`}),le]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-sets`,role:`group`,"aria-label":h.settingsLabel,children:[f.effortChip,/* @__PURE__ */ (0,Z.jsx)(AS,{permission:f.permission,copy:h.permission}),f.placeChip]})]})})}function BS(e){return typeof e!=`object`||!e||Array.isArray(e)?null:e}function VS(e){let t;try{t=JSON.parse(e)}catch{return null}return BS(t)}function HS(e){let t=BS(e.error);if(t===null)return null;let n=t.message;if(typeof n!=`string`)return null;let r=t.code;return typeof r==`string`&&r.length>0?{kind:`error`,code:r,message:n}:{kind:`error`,message:n}}var US=/* @__PURE__ */ new Set([`pending`,`confirmed`,`rejected`,`failed`,`closed`]);function WS(e){return typeof e==`string`&&US.has(e)?e:null}function GS(e,t){if(t!==null){let e=WS(t.status);return{kind:`pending-tool-call`,toolCallId:t.toolCallId,toolName:t.toolName,args:t.args,display:t.display,...e===null?{}:{status:e}}}let n=VS(e);if(n===null)return{kind:`prose`,text:e};let r=HS(n);return r===null?{kind:`prose`,text:e}:r}function KS(e){let{role:t,pendingToolCall:n,toolCalls:r,toolResults:i}=e,a=null;if(t===`assistant`&&n!=null){let t=GS(e.content,n);t.kind===`pending-tool-call`&&(a={toolCallId:t.toolCallId,toolName:t.toolName})}return{role:t,pendingToolCall:n,toolCalls:r,toolResults:i,confirmation:a}}function qS(e,t){return e.role===t.role&&e.pendingToolCall===t.pendingToolCall&&e.toolCalls===t.toolCalls&&e.toolResults===t.toolResults}function JS(e){return e.confirmation!==null||e.toolCalls!==void 0&&e.toolCalls.length>0||e.toolResults!==void 0&&e.toolResults.length>0}function YS(e,t,n,r){let i=e.get(t);if(i===void 0){e.set(t,/* @__PURE__ */ new Map([[n,r]]));return}i.set(n,r)}function XS(e,t,n){let r=e.get(t);r!==void 0&&(r.delete(n),r.size===0&&e.delete(t))}function ZS(e,t){let n=e.get(t);if(n===void 0)return;let r=n.values().next();return r.done===!0?void 0:r.value}function QS(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function $S(){let e=/* @__PURE__ */ new Map,t=/* @__PURE__ */ new Map,n=/* @__PURE__ */ new Map,r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=0,o=0,s=null,c=null,l=/* @__PURE__ */ new Map;function u(e,i,a){a!==null&&a.confirmation!==null?r.set(e,a.confirmation):i!==null&&i.confirmation!==null&&r.delete(e);let o=a===null?void 0:a.toolCalls;if(i!==null&&i.toolCalls!==void 0){let n=new Set(o===void 0?[]:o.map(e=>e.toolCallId));for(let r of i.toolCalls)n.has(r.toolCallId)||XS(t,r.toolCallId,e)}if(o!==void 0)for(let n of o)YS(t,n.toolCallId,e,n.toolName);let s=a===null?void 0:a.toolResults;if(i!==null&&i.toolResults!==void 0){let t=new Set(s===void 0?[]:s.map(e=>e.toolCallId));for(let r of i.toolResults)t.has(r.toolCallId)||XS(n,r.toolCallId,e)}if(s!==void 0)for(let t of s){var c;let r=(c=n.get(t.toolCallId))==null?void 0:c.get(e);(r===void 0||r.value!==t.result)&&YS(n,t.toolCallId,e,{value:t.result})}}function d(e,r,i){let a=ZS(t,r),o=i===null?a===void 0?null:a:i,s=ZS(n,r),c=s===void 0?null:s,u=l.get(e);return u!==void 0&&u.toolCallId===r&&u.toolName===o&&u.result===c?u:{toolCallId:r,toolName:o,result:c}}function f(){let t=/* @__PURE__ */ new Map;for(let[e,n]of r)t.set(e,d(e,n.toolCallId,n.toolName));for(let[n,a]of i)!r.has(n)&&e.has(n)&&t.set(n,d(n,a,null));QS(t,l)||(l=t)}return{get resolvedConfirmationsRevision(){return a},recordResolvedConfirmation({messageId:e,toolCallId:t}){return i.get(e)!==t&&(i.set(e,t),a+=1,!0)},forgetResolvedConfirmations(){return i.size!==0&&(i.clear(),a+=1,!0)},read(t,n){if(t===s&&n===c)return l;let r=n!==c;s=t,c=n,o+=1;let a=0;for(let n of t){let t=e.get(n.id);if(t===void 0){let t=KS(n);u(n.id,null,t),e.set(n.id,{message:n,facts:t,seenInRead:o}),a+=1,(JS(t)||i.has(n.id))&&(r=!0);continue}if(t.seenInRead!==o&&(t.seenInRead=o,a+=1),t.message===n||(t.message=n,qS(t.facts,n)))continue;let s=KS(n);(JS(t.facts)||JS(s))&&(r=!0),u(n.id,t.facts,s),t.facts=s}if(a!==e.size)for(let[t,n]of e)n.seenInRead!==o&&((JS(n.facts)||i.has(t))&&(r=!0),u(t,n.facts,null),e.delete(t));return r&&f(),l}}}function eC(e){let[t]=(0,B.useState)($S),[n,r]=(0,B.useState)(()=>t.resolvedConfirmationsRevision);return{confirmedCalls:(0,B.useMemo)(()=>t.read(e,n),[t,e,n]),recordResolvedConfirmation:(0,B.useCallback)(e=>{t.recordResolvedConfirmation(e)&&r(t.resolvedConfirmationsRevision)},[t]),forgetResolvedConfirmations:(0,B.useCallback)(()=>{t.forgetResolvedConfirmations()&&r(t.resolvedConfirmationsRevision)},[t])}}var tC=z({type:zt(`action-resolved`),messageId:L().min(1),toolCallId:L().min(1)}),nC={kind:`other-event`};function rC(e){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==`action-resolved`)return nC;let t=tC.safeParse(e);return t.success?{kind:`pairing`,pairing:{messageId:t.data.messageId,toolCallId:t.data.toolCallId}}:{kind:`malformed`,issuePaths:t.error.issues.map(e=>e.path.join(`.`))}}var iC=Mt({resultKind:zt(`workflow_started`),workflow:Mt({conversationId:xt().nullable()})});function aC(e,t){let n=iC.safeParse(e);if(!n.success)return null;let{conversationId:r}=n.data.workflow;return r!==null&&r!==t?r:null}function oC(e,t){let{launched:n,total:r}=be(e);return n===0?t.outcome.refused:t.outcome.launched(n,r)}var sC=/* @__PURE__ */ new WeakMap;function cC(e){let t=sC.get(e);if(t!==void 0)return t;let n=Ze(e.value);return sC.set(e,n),n}function lC(e,t,n){if(e===null)return t.confirmed;let r=cC(e);switch(r.kind){case`dispatched`:return oC(r.result,t);case`refused`:{let{code:e,message:i,params:a}=r.refusal,o=n({error_code:e,message:i,...a===void 0?{}:{params:a}});return o===``?t.outcome.refused:t.outcome.refusedWithReason(o)}case`unreadable`:return t.confirmed}}function uC({label:e,count:t,children:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec-head`,children:[e,t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:t})]}),n]})}function dC({item:e}){let t=$().cards.changeSet,n=Q(),r=e.diffKind;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:P(r===`delete`&&`qa-cs-diff__row--delete`),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__what`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__verb`,children:e.actionTitle[n]}),e.entityLabel!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__target`,children:e.entityLabel}),e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field}),e.isSecret===!0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-diff__secret`,children:[/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-hidden":`true`}),t.secretChip]})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-diff__vals`,children:[r===`replace`&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before}),/* @__PURE__ */ (0,Z.jsx)(_n,{className:`qa-cs-diff__arrow`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after})]}),r===`add`&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:e.after}),r===`delete`&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e.before??e.after}),r===`move`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__pos`,children:e.after})]})]})}function fC({items:e}){let t=$().cards.changeSet;return e.length===0?/* @__PURE__ */ (0,Z.jsx)(uC,{label:t.whatChanges,children:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.proposalEmpty})}):/* @__PURE__ */ (0,Z.jsx)(uC,{label:t.whatChanges,...e.length>1?{count:t.changesCount(e.length)}:{},children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-diff`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(dC,{item:e},t))})})}function pC({entries:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(uC,{label:t.cascadeTitle,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-cascade`,children:e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:P(e.count===0&&`qa-cs-cascade__zero`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:xh(e.entityType,t)}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.count})]},n))})})}function mC({evidence:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.length})]}),children:/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))})})}function hC({label:e,target:t}){let{project:n,navigation:r}=$f();if(n===null)return null;let i=ap(n.number,t);return i===null?null:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-cs-linkish`,onClick:()=>r.openPath(i),children:e})}function gC({warnings:e}){return e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-issue qa-cs-issue--warn`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.detail}),e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(hC,{label:e.cta.label,target:e.cta.openTarget})})]})]},t))}function _C({blockers:e,idOf:t}){return e.map((e,n)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:t(n),className:`qa-cs-issue qa-cs-issue--block`,children:[/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:e.label}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.reason}),e.cta!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-issue__acts`,children:/* @__PURE__ */ (0,Z.jsx)(hC,{label:e.cta.label,target:e.cta.openTarget})})]})]},n))}function vC({id:e}){let t=$().cards.changeSet.killSwitch;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{id:e,className:`qa-cs-issue qa-cs-issue--muted`,children:[/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.body})]})]})}function yC({id:e,children:t}){return/* @__PURE__ */ (0,Z.jsxs)(`p`,{id:e,className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(Lr,{"aria-hidden":`true`}),t]})}function bC(){let[e,t]=(0,B.useState)(!1);return{reasonOpen:e,openReason:()=>t(!0),closeReason:()=>t(!1)}}function xC({busy:e,onClose:t,onReject:n}){let r=$().cards.changeSet,i=(0,B.useId)(),[a,o]=(0,B.useState)(``),s=e=>{e.key===`Escape`&&(e.stopPropagation(),t())},c=a.trim();return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason`,children:[/* @__PURE__ */ (0,Z.jsxs)(`label`,{htmlFor:i,children:[r.reasonLabel,` `,/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.reasonHint})]}),/* @__PURE__ */ (0,Z.jsx)(`textarea`,{id:i,rows:2,value:a,autoFocus:!0,onChange:e=>o(e.target.value),onKeyDown:s}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-reason__row`,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:e,onClick:()=>n(null),children:r.rejectPlain}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,disabled:e,loading:e,onClick:()=>n(c.length>0?c:null),children:r.rejectWithReason})]})]})}function SC({deletion:e,confirmEnabled:t,disabledReasonIds:n,busy:r,onOpenReason:i,onConfirm:a,confirmLabel:o}){let s=$().cards.changeSet,c=!t,l=Xm(e);return/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:14}),loading:r===`reject`,disabled:r!==null,onClick:i,children:s.reject}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:l.variant,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Ke,{size:14}),loading:r===`confirm`,disabled:r!==null,"aria-disabled":c?!0:void 0,"aria-describedby":c&&n.length>0?n.join(` `):void 0,onClick:()=>{c||a()},children:o??s[l.label]})]})}function CC(e,t){return e!==null&&e.pressed!==null?e.pressed:e!==null&&e.locked?`other`:t===`confirm`?`confirm`:t===null?null:`other`}function wC({state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:i}){let a=$().cards.changeSet,o=Q(),s=(0,B.useId)(),c=bC(),l=t.proposal,u=ig(t),d=Dh(e,t,a,o),f=l===void 0?null:l.intentSummary.trim(),p=u===null&&f!==null&&f.length>0&&f!==d?f:null,m=t.confirmDisabledReason,h=m!==void 0&&uh(ch,m)?m:null,g=`${s}-ks`,_=`${s}-why`,v=e=>`${s}-b${String(e)}`,y=[...t.blockers.map((e,t)=>v(t)),...m===`kill_switch_off`?[g]:[],...h===null?[]:[_]],b=n.commandFailure!==null&&n.commandFailure.state===t.state?n.commandFailure.command:null,x=n.busy;return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,...i===null?{}:{dockRecord:i},sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(mC,{evidence:t.evidence}),r===null&&c.reasonOpen&&/* @__PURE__ */ (0,Z.jsx)(xC,{busy:x===`reject`,onClose:c.closeReason,onReject:e=>{n.reject(e).then(c.closeReason)}}),b!==null&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:a.commandFailed[b]}),r!==null&&i===null&&/* @__PURE__ */ (0,Z.jsx)(Y_,{toolCallId:r.toolCallId})]}),footer:i!==null||c.reasonOpen&&r===null?void 0:/* @__PURE__ */ (0,Z.jsx)(SC,{deletion:Ym(l==null?void 0:l.items),confirmEnabled:Qm(t),disabledReasonIds:y,busy:CC(r,n.busy),onOpenReason:r===null?c.openReason:()=>r.decide(`reject`),onConfirm:()=>{r===null?n.confirm():r.decide(`confirm`)},...u===null?{}:{confirmLabel:a.bugFiling.confirm}}),children:[p!==null&&/* @__PURE__ */ (0,Z.jsx)(kp,{children:p}),u===null?l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(fC,{items:l.items}):/* @__PURE__ */ (0,Z.jsx)(sg,{facts:u.facts}),(l==null?void 0:l.cascade)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(pC,{entries:l.cascade}),/* @__PURE__ */ (0,Z.jsx)(gC,{warnings:t.warnings}),/* @__PURE__ */ (0,Z.jsx)(_C,{blockers:t.blockers,idOf:v}),m===`kill_switch_off`&&/* @__PURE__ */ (0,Z.jsx)(vC,{id:g}),h!==null&&/* @__PURE__ */ (0,Z.jsx)(yC,{id:_,children:a.disabledReason[h]})]})}function TC({state:e,snapshot:t,controller:n,chatDecision:r,tether:i}){let{toolCallId:a}=r;return/* @__PURE__ */ (0,Z.jsx)(EC,{toolCallId:a,tether:i,children:i=>/* @__PURE__ */ (0,Z.jsx)(wC,{state:e,snapshot:t,controller:n,chatDecision:r,dockRecord:i})})}function EC({toolCallId:e,tether:t,children:n}){let r=(0,B.useRef)(null),{linked:i,onLinkChange:a}=gg(t,e,`feed`);return(0,B.useEffect)(()=>t.registerRecord(e,{reveal:()=>{var e;return(e=r.current)==null?void 0:e.reveal()}}),[t,e]),(0,B.useEffect)(()=>()=>a(!1),[a]),n({handle:r,linked:i,onLinkChange:a})}var DC=(0,B.createContext)(null);function OC(e,t){let n=(0,B.useContext)(DC),{state:r,loadFailed:i,confirm:a,reject:o}=t;(0,B.useEffect)(()=>{if(n!==null)return n.register(e,{state:r,loadFailed:i,confirm:a,reject:o}),()=>n.unregister(e)},[n,e,r,i,a,o])}function kC(e,t){let n={total:e.length,loading:0,loadFailed:0,awaiting:0,applying:0,applied:0,rejected:0,failed:0,superseded:0,closed:0,undone:0};for(let r of e){let e=t.get(r);if(e===void 0){n.loading+=1;continue}if(e.loadFailed){n.loadFailed+=1;continue}switch(e.state){case null:n.loading+=1;break;case Wm:n.awaiting+=1;break;case`applying`:n.applying+=1;break;case`applied`:n.applied+=1;break;case`rejected_no_op`:n.rejected+=1;break;case`partial_failure`:n.failed+=1;break;case`superseded`:n.superseded+=1;break;case`closed`:n.closed+=1;break;case`undone`:n.undone+=1}}return n}function AC(e){return e.total-e.superseded-e.closed-e.undone-e.loadFailed}function jC(e){return e.applied+e.rejected+e.failed}function MC(e){let t=AC(e);return t>0&&jC(e)===t}function NC(e){return e.awaiting>0&&e.loading===0}function PC(e){let t=AC(e),n=jC(e);return e.applying>0?{kind:`applying`,count:e.applied+e.applying,total:t}:MC(e)?{kind:`done`,count:n,total:t}:n>0?{kind:`remaining`,count:t-n,total:t}:e.awaiting>0?{kind:`awaiting`,count:e.awaiting}:{kind:`proposals`,count:e.total}}function FC(e,t,n){return new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:t}).format(e)}function IC(e,t){return new Intl.NumberFormat(t).format(e)}function LC(e,t,n){return`${e>0?`+`:e<0?`\u2212`:``}${FC(Math.abs(e),t,n)}`}function RC(e,t){return t===0?null:Math.round(e/t*100)}function zC(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}var BC={hour:`2-digit`,minute:`2-digit`},VC={day:`numeric`,month:`short`,hour:`2-digit`,minute:`2-digit`},HC={day:`numeric`,month:`short`};function UC(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e);return new Intl.DateTimeFormat(t,zC(r,n)?BC:VC).format(r)}function WC(e,t){return new Intl.DateTimeFormat(t,VC).format(new Date(e))}function GC(e,t){return new Intl.DateTimeFormat(t,{dateStyle:`long`,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function KC(e,t){return new Intl.DateTimeFormat(t,{...HC,timeZone:`UTC`}).format(/* @__PURE__ */ new Date(`${e}T00:00:00Z`))}function qC(e,t){return new Intl.DateTimeFormat(t,HC).format(new Date(e))}var JC=864e5;function YC(e,t=Date.now()){let n=Date.parse(`${e}T00:00:00Z`),r=Math.floor(t/JC)*JC;return Math.round((r-n)/JC)}function XC(e,t,n=/* @__PURE__ */ new Date){let r=new Date(e),i=new Intl.DateTimeFormat(t,BC).format(r),a=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),o=Math.round((a(r)-a(n))/JC);return o===0||o===-1?`${new Intl.RelativeTimeFormat(t,{numeric:`auto`}).format(o,`day`)}, ${i}`:new Intl.DateTimeFormat(t,VC).format(r)}var ZC=6e4,QC=60*ZC,$C=30*JC,ew=365*JC,tw=45e3;function nw(e,t,n){let r=Math.max(0,t-Date.parse(e)),i=new Intl.RelativeTimeFormat(n,{numeric:`auto`});return r<tw?i.format(0,`minute`):r<QC?i.format(-Math.max(1,Math.floor(r/ZC)),`minute`):r<JC?i.format(-Math.max(1,Math.floor(r/QC)),`hour`):r<$C?i.format(-Math.max(1,Math.floor(r/JC)),`day`):r<ew?i.format(-Math.max(1,Math.floor(r/$C)),`month`):i.format(-Math.max(1,Math.floor(r/ew)),`year`)}function rw(e,t){let n=Math.max(0,Math.round(e/1e3)),r=Math.floor(n/60),i=n%60,a=(e,n)=>new Intl.NumberFormat(t,{style:`unit`,unit:n,unitDisplay:`short`}).format(e);return r===0?a(i,`second`):`${a(r,`minute`)} ${a(i,`second`)}`}function iw({items:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-cs-apply`,role:`status`,"aria-label":t.applyAria,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{})}),e!==void 0&&e.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-ticks`,children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-ticks__t`,children:[e.entityLabel,e.field!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-diff__field`,children:e.field})]})]},t))})]})}var aw={applied:{tone:`ok`,Icon:We},failed:{tone:`fail`,Icon:Dr},batch_aborted:{tone:`abort`,Icon:wr},pending:{tone:`pend`,Icon:jn}};function ow({before:e,after:t}){return e===void 0&&t===void 0?null:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__dl`,children:[e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`del`,{children:e}),e!==void 0&&t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(_n,{"aria-hidden":`true`}),t!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`ins`,{children:t})]})}function sw({rows:e}){let t=$().cards.changeSet,n=Q(),r=new Set(e.map(e=>e.actionType)).size>1;return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:e.map((e,i)=>{let{tone:a,Icon:o}=aw[e.itemStatus],s=e.errorCode===void 0?null:Ch(e.errorCode,t);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-cs-results__${a}`,children:[/* @__PURE__ */ (0,Z.jsx)(o,{"aria-hidden":!0}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.row[e.itemStatus]}: `}),r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[n]}),e.entityLabel]}),/* @__PURE__ */ (0,Z.jsx)(ow,{...e.before===void 0?{}:{before:e.before},...e.after===void 0?{}:{after:e.after}}),e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[s,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},i)})})}function cw({label:e,tone:t,rows:n}){let r=$().cards.changeSet,i=Q();return n.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head qa-cs-legacy__${t}`,children:e}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-results`,children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:e.status===`applied`?`qa-cs-results__ok`:e.status===`skipped`?`qa-cs-results__pend`:`qa-cs-results__fail`,children:[e.status===`applied`?/* @__PURE__ */ (0,Z.jsx)(We,{"aria-hidden":`true`}):e.status===`skipped`?/* @__PURE__ */ (0,Z.jsx)(jn,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(Dr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__ent`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${r.row[e.status]}: `}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-results__act`,children:e.actionTitle[i]}),e.entityLabel]}),e.status===`failed`&&(e.errorCode!==void 0||e.detail!==void 0)&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-results__err`,children:[e.detail,e.errorCode!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:e.errorCode})]})]},t))})]})}function lw({summary:e}){let t=$().cards.changeSet;return e.rows===void 0?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(cw,{label:t.appliedGroup(e.applied.length),tone:`ok`,rows:e.applied}),/* @__PURE__ */ (0,Z.jsx)(cw,{label:t.failedGroup(e.failed.length),tone:`fail`,rows:e.failed})]}):/* @__PURE__ */ (0,Z.jsx)(sw,{rows:e.rows})}function uw({attempt:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[e>1&&/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`neutral`,dot:!1,children:t.attempt(e)}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-verified`,children:[/* @__PURE__ */ (0,Z.jsx)(We,{"aria-hidden":`true`}),t.verified]})]})}function dw({effects:e}){let t=$().cards.changeSet;return e.length===0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-side-effects`,children:[t.undo.sideEffectsTitle,/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.map(e=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:wh(e,t)},e))})]})}function fw(e,t){return e.timedOut?t.undo.unknown:e.code===null?t.undo.failed:t.undo.error[e.code]}function pw({block:e,undo:t,canRequest:n,onUndo:r}){let i=$().cards.changeSet,a=Q();if(e.blockedReason===`not_auto`)return null;if(t.phase===`sending`||t.phase===`waiting`)return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-undo`,children:/* @__PURE__ */ (0,Z.jsxs)(I,{variant:`secondary`,size:`sm`,disabled:!0,"aria-busy":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`}),i.undo.busy]})});let o=e.eligible&&n&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(fi,{size:14}),onClick:r,children:i.undo.action});if(t.phase===`refused`)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-undo__error`,role:`alert`,children:fw(t,i)}),o]});if(e.eligible)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-undo`,children:[o,e.offeredUntil!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-undo__deadline`,children:i.undo.until(UC(e.offeredUntil,a))})]});let s=e.blockedReason===`stale`||e.blockedReason===`expired`||e.blockedReason===`kill_switch`?i.undo.blocked[e.blockedReason]:e.blockedReason===null?null:i.undo.unavailable;return s===null?null:/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-cs-why`,children:[/* @__PURE__ */ (0,Z.jsx)(xn,{"aria-hidden":`true`}),s]})}function mw({row:e}){let t=$().cards.changeSet,{project:n,navigation:r}=$f(),i=e.entityRef,a=fp(i.type),o=n===null?null:ap(n.number,i.open),s=i.label===``?null:i.label;return/* @__PURE__ */ (0,Z.jsx)(Np,{icon:a.icon,tileTone:a.tone,name:s??/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-missing`,children:t.entityLabelMissing}),trailing:o!==null&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Up,{size:14}),"aria-label":t.openAria(s??t.entityLabelMissing),onClick:()=>r.openPath(o),children:t.open})})}function hw(e){return e.entityRef!==void 0}function gw({evidence:e}){let t=$().cards.changeSet,n=e.filter(hw);return n.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:t.noResults}):/* @__PURE__ */ (0,Z.jsx)(Mp,{children:n.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(mw,{row:e},t))})}function _w({count:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-cs-skeleton-lines`,"aria-hidden":`true`,children:Array.from({length:e},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk`},t))})}function vw({state:e,evidence:t}){let n=$().cards.changeSet;switch(e){case`searching`:return/* @__PURE__ */ (0,Z.jsx)(_w,{count:3});case`no_results`:return/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.noResults});case`search_results_shown`:return/* @__PURE__ */ (0,Z.jsx)(gw,{evidence:t});case`ambiguity_choose_target`:return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:n.chooseTargetHint}),/* @__PURE__ */ (0,Z.jsx)(gw,{evidence:t})]});case`item_selected`:{let e=t.find(hw);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-chipline`,children:[/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`info`,children:n.selected}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-muted`,children:n.nothingChanged})]}),e!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Mp,{children:/* @__PURE__ */ (0,Z.jsx)(mw,{row:e})})]})}case`inspecting`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-card-kit__sec`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-card-kit__sec-head`,children:n.evidenceHeading}),t.length>0&&/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-cs-evidence`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[e.label,e.detail!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-muted`,children:[` `,e.detail]})]})},t))}),/* @__PURE__ */ (0,Z.jsx)(_w,{count:1})]})}}function yw(e){let{viewer:t}=$f();return(0,B.useEffect)(()=>{e&&t.request()},[e,t]),(0,B.useSyncExternalStore)(t.subscribe,t.read)}function bw(e,t,n,r){switch(t.kind){case`reading`:return null;case`known`:return t.id===e.byUserId?r.setByYou(n):r.setAt(n);case`unknown`:return r.setAt(n)}}function xw({requests:e}){let t=$().cards.changeSet.secretInput,n=Q(),r=yw(e.some(e=>e.valueDeposit!==null));if(e.length===0)return null;let i=wy(e)!==null;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-sc-plates`,"data-testid":`ai-secret-history`,children:e.map(e=>{let a=e.valueDeposit,o=a===null?null:bw(a,r,UC(a.at,n),t);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-sc-plate`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-sc-plate-var`,children:e.variableName}),!i&&/* @__PURE__ */ (0,Z.jsx)(Cy,{name:e.environment.name}),a===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.notSet}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(gn,{label:t.hiddenAria,className:`qa-sc-secret`}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:o})]})]},e.changeSetItemId)})})}function Sw({snapshot:e}){return e.secretInputRequests.length===0?null:/* @__PURE__ */ (0,Z.jsx)(xw,{requests:e.secretInputRequests})}function Cw({snapshot:e}){let t=$().cards.changeSet,{conversation:n}=$f();return/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(he,{size:14}),onClick:()=>n.setDraft(Oh(rh(e),t)),children:t.revise})}function ww({state:e,snapshot:t,decidedInDock:n}){var i;let a=$().cards.changeSet,o=(i=t.proposal)==null?void 0:i.items;return/* @__PURE__ */ (0,Z.jsx)(by,{state:e,snapshot:t,decidedInDock:n,subject:o!==void 0&&o.length>0?a.applyingSubject(o.length):a.applyingGeneric,note:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:a.applyDisclaimer}),children:/* @__PURE__ */ (0,Z.jsx)(iw,{items:o})})}function Tw({state:e,snapshot:t,controller:n}){let r=$().cards.changeSet,i=t.applySummary,a=i==null?void 0:i.undo,o=n.undo;return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,sections:o.phase===`waiting`&&o.unknown?/* @__PURE__ */ (0,Z.jsx)(K_,{tone:`warning`,children:r.undo.unknown}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(Sw,{snapshot:t}),i===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(uw,{attempt:i.attempt}),i.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:r.applyDuration(i.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(lw,{summary:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(pw,{block:a,undo:o,canRequest:n.busy===null&&(o.phase!==`refused`||o.blockedFor!==t),onUndo:n.requestUndo}),a.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(dw,{effects:a.nonReversedSideEffects})]})]})]})}function Ew(e){let t=e.applySummary;return t===void 0?0:t.rows===void 0?t.failed.length:t.rows.filter(e=>e.itemStatus!==`applied`).length}function Dw({state:e,snapshot:t,controller:n}){let i=$().cards.changeSet,a=t.applySummary,o=a==null?void 0:a.undo,s=n.undo,c=Ew(t),l=a!==void 0&&a.retryAvailable&&n.canRetryApply&&c>0,u=n.commandFailure!==null&&n.commandFailure.state===t.state;return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,sections:u||s.phase===`waiting`&&s.unknown?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[u&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:i.commandFailed.retry}),s.phase===`waiting`&&s.unknown&&/* @__PURE__ */ (0,Z.jsx)(K_,{tone:`warning`,children:i.undo.unknown})]}):void 0,note:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:i.whatNext}),footer:/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[l&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),loading:n.busy===`retry`,disabled:n.busy!==null,onClick:n.retryApply,children:i.retryRemaining(c)}),/* @__PURE__ */ (0,Z.jsx)(Cw,{snapshot:t})]}),children:[/* @__PURE__ */ (0,Z.jsx)(Sw,{snapshot:t}),a===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:i.applyMissing}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[a.attempt>1&&/* @__PURE__ */ (0,Z.jsx)(uw,{attempt:a.attempt}),a.durationMs!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-cs-muted`,children:i.applyDuration(a.durationMs)}),/* @__PURE__ */ (0,Z.jsx)(lw,{summary:a}),o!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(pw,{block:o,undo:s,canRequest:n.busy===null&&(s.phase!==`refused`||s.blockedFor!==t),onUndo:n.requestUndo}),o.blockedReason!==`not_auto`&&/* @__PURE__ */ (0,Z.jsx)(dw,{effects:o.nonReversedSideEffects})]})]})]})}function Ow({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,subject:n.rejectedTitle,footer:/* @__PURE__ */ (0,Z.jsx)(Fp,{children:/* @__PURE__ */ (0,Z.jsx)(Cw,{snapshot:t})}),children:[/* @__PURE__ */ (0,Z.jsx)(kp,{children:n.rejectedLead}),/* @__PURE__ */ (0,Z.jsx)(Sw,{snapshot:t})]})}function kw({state:e,snapshot:t}){var n;let r=$().cards.changeSet,i=(n=t.applySummary)==null||(n=n.undo)==null?void 0:n.nonReversedSideEffects;return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,subject:r.undoneTitle,children:[/* @__PURE__ */ (0,Z.jsx)(kp,{children:r.undoneLead}),i!==void 0&&/* @__PURE__ */ (0,Z.jsx)(dw,{effects:i})]})}function Aw({state:e,snapshot:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(by,{state:e,snapshot:t,sections:/* @__PURE__ */ (0,Z.jsx)(mC,{evidence:t.evidence}),note:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(rn,{}),children:n.superseded}),children:t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(fC,{items:t.proposal.items})})}function jw({state:e,snapshot:t}){let n=ig(t);return/* @__PURE__ */ (0,Z.jsxs)(by,{state:e,snapshot:t,...t.closure===void 0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(Mw,{closure:t.closure})},children:[n===null?t.proposal!==void 0&&/* @__PURE__ */ (0,Z.jsx)(fC,{items:t.proposal.items}):/* @__PURE__ */ (0,Z.jsx)(sg,{facts:n.facts}),/* @__PURE__ */ (0,Z.jsx)(Sw,{snapshot:t})]})}function Mw({closure:e}){let t=$().cards.changeSet.closedBy,n=Q();switch(e.reason){case`launch_stopped`:return/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(Er,{}),children:t.launchStoppedNote});case`finding_filed`:return/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(Ke,{}),children:t.findingFiledNote(e.bug.number,UC(e.bug.filedAt,n))})}}function Nw(e){let{state:t,snapshot:n}=e;if(Um(t))return/* @__PURE__ */ (0,Z.jsx)(by,{state:t,snapshot:n,children:/* @__PURE__ */ (0,Z.jsx)(vw,{state:t,evidence:n.evidence})});switch(t){case`applying`:return/* @__PURE__ */ (0,Z.jsx)(ww,{...e});case`applied`:return/* @__PURE__ */ (0,Z.jsx)(Tw,{...e});case`partial_failure`:return/* @__PURE__ */ (0,Z.jsx)(Dw,{...e});case`rejected_no_op`:return/* @__PURE__ */ (0,Z.jsx)(Ow,{...e});case`undone`:return/* @__PURE__ */ (0,Z.jsx)(kw,{...e});case`superseded`:return/* @__PURE__ */ (0,Z.jsx)(Aw,{...e});case`closed`:return/* @__PURE__ */ (0,Z.jsx)(jw,{...e})}}function Pw(){let e=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{bare:!0,className:P(Lp,`qa-cs-card`),"aria-busy":!0,"aria-label":e.loadingAria,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__head`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--tile`}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-skeleton__titles`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w45`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--thin qa-cs-sk--w30`})]})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--h qa-cs-sk--w75`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w92`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--w80`})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__actions`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-sk qa-cs-sk--btn`})})]})}function Fw({reason:e,onRetry:t}){let n=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsx)(Tp,{bare:!0,tone:e===`retryable`?`error`:`neutral`,className:P(Lp,`qa-cs-card`),children:e===`retryable`?/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),title:n.loadError,text:n.loadErrorText,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:t,children:n.retry})}):/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:/* @__PURE__ */ (0,Z.jsx)(xn,{}),title:n.unavailable,text:n.unavailableText})})}function Iw({snapshot:e}){let t=$().cards.changeSet;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-cs-card`,`qa-card-kit--unsupported`),icon:/* @__PURE__ */ (0,Z.jsx)(Tr,{size:16}),tileTone:`muted`,title:t.title,...e===null?{}:{caption:Eh(rh(e),t)},"aria-label":`${t.title}: ${t.unknownState}`,sections:e===null?void 0:/* @__PURE__ */ (0,Z.jsx)(mC,{evidence:e.evidence}),children:[/* @__PURE__ */ (0,Z.jsx)(Op,{children:t.unknownState}),(e==null?void 0:e.proposal)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(fC,{items:e.proposal.items})]})}function Lw(e){switch(e.state){case`proposal_pending`:case`confirmation_required`:return`awaiting`;case`applying`:return`applying`;case`applied`:return`applied`;case`partial_failure`:return e.import.counts.applied===0?`failed`:`partial`;case`rejected_no_op`:return`rejected`;case`undone`:return`undone`;case`superseded`:return`superseded`;case`closed`:return`closed`;default:return`proposed`}}function Rw(e){let t=$f(),{snapshot:n,chatPreview:r,toolCallId:i}=e,a=t.conversation.changeSetDecision;return r&&i!==null&&a!==void 0&&n.state===`confirmation_required`?/* @__PURE__ */ (0,Z.jsx)(EC,{toolCallId:i,tether:a.tether,children:t=>/* @__PURE__ */ (0,Z.jsx)(zw,{...e,record:t})}):/* @__PURE__ */ (0,Z.jsx)(zw,{...e,record:null})}function zw({snapshot:e,controller:t,chatPreview:n,toolCallId:r,record:i}){var a;let o=$f(),s=$().cards.changeSet,c=s.importParts,l=bC(),u=(0,B.useId)(),d=o.conversation.changeSetDecision,{taskId:f,projectId:p,revision:m}=e,h=t.refresh,g=`${p}:${f}:${String(m)}`,[_,v]=(0,B.useState)({scope:g,page:0,cursors:[void 0]}),y=_.scope===g?_:{scope:g,page:0,cursors:[void 0]},[b,x]=(0,B.useState)(null),[S,C]=(0,B.useState)(null),[w,T]=(0,B.useState)(null),[E,D]=(0,B.useState)(0),O=(0,B.useRef)(0),ee=y.cursors[y.page],k=ee===void 0?null:`${g}:${ee}`,A=k!==null&&S===k,j=k!==null&&w===k;(0,B.useEffect)(()=>{if(ee===void 0)return;let e=++O.current;return T(k),C(null),o.http.request({method:`GET`,path:qn.changeSetSnapshot.path(p,f,{itemsCursor:ee,itemsLimit:50}),schema:Im}).then(t=>{if(e===O.current){if(t.changeSet.id!==f||t.changeSet.projectId!==p||t.changeSet.revision!==m){v({scope:g,page:0,cursors:[void 0]}),h();return}x({scope:g,cursor:ee,rows:{...t.itemPage,items:t.itemPage.items.map(e=>e.import.row)}})}}).catch(t=>{e===O.current&&(C(k),o.logger.warn(`Import card page failed`,{error:String(t)}),t instanceof Jn&&t.status===409&&(v({scope:g,page:0,cursors:[void 0]}),h()))}).finally(()=>{e===O.current&&T(null)}),()=>{O.current++}},[ee,k,E,o.http,o.logger,p,f,m,g,h,e.rowPage]);let M=ee===void 0?e.rowPage:(b==null?void 0:b.scope)===g&&b.cursor===ee?b.rows:null,N=e.state===`confirmation_required`||e.state===`proposal_pending`,te=((a=e.confirmation)==null?void 0:a.confirmEnabled)===!0,ne=Ih(e,s,!1),re=e.import.counts.total,ie=e=>{n&&r!==null&&d!==void 0?d.decide(r,e):e===`confirm`?t.confirm():l.openReason()},ae=Lw(e),oe=o.project!==null&&o.project.id===p?ap(o.project.number,{target:`detail`,routeKey:`imports`,params:{importId:e.import.importId}}):null,se=t.undo,ce=se.phase===`sending`||se.phase===`waiting`;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:`${Lp} qa-cs-card`,title:c.title,caption:s.contextProject(e.header.projectName),icon:/* @__PURE__ */ (0,Z.jsx)(dn,{size:16}),tileTone:`primary`,meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:ae===`partial`||ae===`failed`?`error`:ae===`applied`?`success`:`neutral`,children:s.marker[ae]}),fold:{title:c.title,facts:c.counts(re,e.import.counts.applied,e.import.counts.failed,e.import.counts.skipped),decided:i!==null||e.state===`applied`||e.state===`undone`||e.state===`rejected_no_op`,...i===null?{}:{handle:i.handle,linked:i.linked,onLinkChange:i.onLinkChange}},footer:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[N&&i===null&&/* @__PURE__ */ (0,Z.jsx)(SC,{deletion:{deletes:e.import.removesData,destructive:!1},confirmEnabled:te,disabledReasonIds:ne===null?[]:[u],busy:t.busy===`confirm`||t.busy===`reject`?t.busy:t.busy===null?null:`other`,onOpenReason:()=>ie(`reject`),onConfirm:()=>ie(`confirm`)}),/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[oe!==null&&/* @__PURE__ */ (0,Z.jsx)(Vp,{path:oe,label:c.open,accessibleName:c.open,emphasis:`secondary`}),t.canRetryApply&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:t.busy!==null,onClick:t.retryApply,children:s.retryRemaining(e.import.counts.retryable)}),e.import.undoEligible&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,disabled:t.busy!==null||se.phase===`refused`&&se.blockedFor===e,loading:ce,onClick:t.requestUndo,children:ce?s.undo.busy:s.undo.action})]})]}),children:[/* @__PURE__ */ (0,Z.jsx)(Op,{children:c.counts(re,e.import.counts.applied,e.import.counts.failed,e.import.counts.skipped)}),e.import.progress!==null&&/* @__PURE__ */ (0,Z.jsxs)(`p`,{role:`status`,children:[e.import.progress.attemptCounts.done,` /`,` `,e.import.progress.attemptCounts.total]}),ne!==null&&N&&/* @__PURE__ */ (0,Z.jsx)(`p`,{id:u,children:ne}),t.commandFailure!==null&&t.commandFailure.state===e.state&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:s.commandFailed[t.commandFailure.command]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(Y_,{toolCallId:r}),se.phase===`refused`&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:se.timedOut?s.undo.unknown:se.code===null?s.undo.failed:s.undo.error[se.code]}),l.reasonOpen&&/* @__PURE__ */ (0,Z.jsx)(xC,{busy:t.busy!==null,onClose:l.closeReason,onReject:e=>{t.reject(e),l.closeReason()}}),A?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(K_,{children:s.loadError}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,onClick:()=>D(e=>e+1),children:s.retry})]}):j||M===null?/* @__PURE__ */ (0,Z.jsx)(`p`,{role:`status`,children:s.loadingAria}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-cs-diff`,children:M.items.map(e=>{var t,n,r,i,a,o;let s=((t=e.outcome)==null?void 0:t.status)===`applied`||((n=e.outcome)==null?void 0:n.status)===`rolled_back`?(r=e.outcome)==null?void 0:r.name:e.previewStatus===`copy`?e.copyName:e.name;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:s??c.unnamed}),` \u00B7`,` `,c.rowStatus[((i=e.outcome)==null?void 0:i.status)??e.previewStatus],((a=e.outcome)==null?void 0:a.error)!==null&&((o=e.outcome)==null?void 0:o.error)!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.outcome.error})]},e.ordinal)})}),/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:c.page(M.items.length,M.total)}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,disabled:y.page===0,onClick:()=>v({...y,page:y.page-1}),children:c.previous}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,disabled:M.nextCursor===null,onClick:()=>{M.nextCursor!==null&&v({scope:g,page:y.page+1,cursors:[...y.cursors.slice(0,y.page+1),M.nextCursor]})},children:c.next})]})]})]})}function Bw({projectId:e,changeSetId:t,chatPreview:n=!1,toolCallId:r}){let i=$f(),a=bh(i,e,t),{load:o,confirm:s,reject:c}=a,l=o.status===`ready`?o.snapshot:null,u=l!==null&&Hm(l.state)?l.state:null,d=i.conversation.changeSetDecision,f=r??null,p=n&&f!==null&&d!==void 0;ug(i,o,f);let m=(0,B.useCallback)(()=>p&&f!==null&&d!==void 0?(d.decide(f,`reject`),Promise.resolve(`unknown`)):c(null),[c,p,f,d]),h=(0,B.useCallback)(()=>p&&f!==null&&d!==void 0?(d.decide(f,`confirm`),Promise.resolve(`unknown`)):s(),[s,p,f,d]);if(OC(t,{state:o.status===`parts`?o.snapshot.state:l===null?null:l.state,loadFailed:o.status===`failed`,confirm:h,reject:m}),o.status===`loading`)return/* @__PURE__ */ (0,Z.jsx)(Pw,{});if(o.status===`failed`)return o.reason===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(Iw,{snapshot:null}):/* @__PURE__ */ (0,Z.jsx)(Fw,{reason:o.reason,onRetry:a.reload});if(o.status===`parts`)return n&&!p||!Hm(o.snapshot.state)?/* @__PURE__ */ (0,Z.jsx)(Iw,{snapshot:null}):/* @__PURE__ */ (0,Z.jsx)(Rw,{snapshot:o.snapshot,controller:a,chatPreview:p,toolCallId:f});if(n&&!p||u===null)return/* @__PURE__ */ (0,Z.jsx)(Iw,{snapshot:o.snapshot});let g=p&&f!==null&&d!==void 0?{toolCallId:f,locked:d.isLocked(f)||d.isResolved(f),pressed:d.progress!==null&&d.progress.current!==null&&d.progress.current.toolCallId===f?d.progress.current.verdict:null,decide:e=>d.decide(f,e)}:null;return u===`confirmation_required`&&g!==null&&d!==void 0?/* @__PURE__ */ (0,Z.jsx)(TC,{state:u,snapshot:o.snapshot,controller:a,chatDecision:g,tether:d.tether}):u===`proposal_pending`||u===`confirmation_required`?/* @__PURE__ */ (0,Z.jsx)(wC,{state:u,snapshot:o.snapshot,controller:a,chatDecision:g,dockRecord:null}):/* @__PURE__ */ (0,Z.jsx)(Nw,{state:u,snapshot:o.snapshot,controller:a,decidedInDock:p})}function Vw(e,t,n){let r=[];e.applied>0&&r.push({text:n.applied(e.applied),bad:!1}),e.rejected>0&&r.push({text:n.rejected(e.rejected),bad:!1});let i=e.failed+t;return i>0&&r.push({text:n.errors(i),bad:!0}),e.superseded>0&&r.push({text:n.superseded(e.superseded),bad:!1}),e.closed>0&&r.push({text:n.closed(e.closed),bad:!1}),e.undone>0&&r.push({text:n.undone(e.undone),bad:!1}),e.loadFailed>0&&r.push({text:n.loadFailed(e.loadFailed),bad:!0}),r}function Hw(e,t){let n=PC(e);switch(n.kind){case`applying`:return t.applying(n.count,n.total);case`done`:return t.done(n.count,n.total);case`remaining`:return t.remaining(n.count,n.total);case`awaiting`:return t.awaiting(n.count);case`proposals`:return t.proposals(n.count)}}function Uw({counts:e,passFailures:t}){let n=$().cards.changeSet.turn;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-tsum`,role:`status`,"aria-live":`polite`,children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.title}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.total}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__head`,children:Hw(e,n)}),Vw(e,t,n).map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-tsum__seg-wrap`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-tsum__sep`,"aria-hidden":`true`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-cs-tsum__seg`,e.bad&&`qa-cs-tsum__seg--bad`),children:e.text})]},e.text))]})}function Ww(){return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-cs-spinner`,"aria-hidden":`true`})}function Gw({counts:e,running:t,passFailures:n,onRun:r}){let i=$().cards.changeSet.turn,a=t!==null||!NC(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-bulk`,children:[n>0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-cs-bulk__warn`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),i.passFailures(n)]}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,className:`qa-chat-card__actions-push`,icon:t===`reject`?/* @__PURE__ */ (0,Z.jsx)(Ww,{}):/* @__PURE__ */ (0,Z.jsx)(Dr,{size:14}),disabled:a,"aria-busy":t===`reject`,onClick:()=>r(`reject`),children:i.rejectAll}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,icon:t===`confirm`?/* @__PURE__ */ (0,Z.jsx)(Ww,{}):/* @__PURE__ */ (0,Z.jsx)(Ke,{size:14}),disabled:a,"aria-busy":t===`confirm`,onClick:()=>r(`confirm`),children:i.confirmAll(e.awaiting)})]})}function Kw({cards:e}){let t=(0,B.useRef)(/* @__PURE__ */ new Map),[,n]=(0,B.useReducer)(e=>e+1,0),[r,i]=(0,B.useState)(null),a=(0,B.useRef)(null),[o,s]=(0,B.useState)(0),c=(0,B.useRef)(!0);(0,B.useEffect)(()=>(c.current=!0,()=>{c.current=!1}),[]);let l=(0,B.useMemo)(()=>({register(e,r){t.current.set(e,r),n()},unregister(e){t.current.delete(e)&&n()}}),[]),u=(0,B.useCallback)(async n=>{if(a.current!==null)return;a.current=n,i(n),s(0);let r=0;try{for(let i of e){let e=t.current.get(i.changeSetId);if(e===void 0||e.state!==`confirmation_required`)continue;let a;try{a=n===`confirm`?await e.confirm():await e.reject()}catch(e){queueMicrotask(()=>{throw e}),a=`unknown`}a===`failed`&&(r+=1)}}finally{a.current=null,c.current&&(i(null),s(r))}},[e]),d=kC(e.map(e=>e.changeSetId),t.current),f=e.some(e=>e.mode===`preview_confirm`);return/* @__PURE__ */ (0,Z.jsx)(DC.Provider,{value:l,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-cs-group`,children:[/* @__PURE__ */ (0,Z.jsx)(Uw,{counts:d,passFailures:o}),e.map(e=>/* @__PURE__ */ (0,Z.jsx)(Bw,{projectId:e.projectId,changeSetId:e.changeSetId,chatPreview:e.mode===`preview_confirm`,toolCallId:e.mode===`preview_confirm`?e.toolCallId:null},e.changeSetId)),!f&&!MC(d)&&/* @__PURE__ */ (0,Z.jsx)(Gw,{counts:d,running:r,passFailures:o,onRun:e=>{u(e)}})]})})}function qw(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.changeSetId)||t.set(n.changeSetId,n);return[...t.values()]}function Jw({entries:e}){let t=$().cards.changeSet,n=qw(e.flatMap(e=>{var t;return e.outcome.status===`accepted`?[{...e.outcome.result,toolCallId:((t=e.call)==null?void 0:t.toolCallId)??null}]:[]})),[r]=n;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===1&&r!==void 0&&/* @__PURE__ */ (0,Z.jsx)(Bw,{projectId:r.projectId,changeSetId:r.changeSetId,chatPreview:r.mode===`preview_confirm`,toolCallId:r.mode===`preview_confirm`?r.toolCallId:null}),n.length>1&&/* @__PURE__ */ (0,Z.jsx)(Kw,{cards:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`change-set`,resultKind:dm(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var Yw={id:`change-set`,schema:mm,Card:Jw},Xw=z({entityType:L().min(1),entityId:L().min(1),similarity:R().min(0).max(1),name:L(),stepsCount:R().int().nonnegative().nullable().optional()}).transform(e=>({entityType:e.entityType,entityId:e.entityId,similarity:e.similarity,name:e.name,stepsCount:e.stepsCount??null})),Zw=z({success:zt(!0),data:z({query:L(),tagMatchWarning:L().nullable().optional(),coveredCount:R().int().nonnegative(),partialCount:R().int().nonnegative(),covered:yt(Xw),partial:yt(Xw),gaps:yt(L())})}).transform(({data:e})=>({query:e.query,tagMatchWarning:e.tagMatchWarning??null,coveredCount:e.coveredCount,partialCount:e.partialCount,covered:e.covered,partial:e.partial,gaps:e.gaps})),Qw={scenario:`scenario`,checklist_item:`checklist-item`};function $w({label:e,matches:t}){let n=$().cards.coverage;return t.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Gp,{label:e,children:/* @__PURE__ */ (0,Z.jsx)(Mp,{"aria-label":e,children:t.map(e=>{let t=fp(Qw[e.entityType]??e.entityType),r=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsx)(Np,{icon:t.icon,tileTone:t.tone,name:r?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-coverage-missing`,children:n.unknownItem}):e.name,note:[n.similarity(e.similarity),...e.stepsCount===null?[]:[n.steps(e.stepsCount)]].join(` \u00B7 `)},`${e.entityType}:${e.entityId}`)})})})}function eT({result:e}){let t=$().cards.coverage,n=Q(),r=e.tagMatchWarning!==null;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-coverage-card`),tone:r?`warning`:`neutral`,tileTone:r?`warning`:`success`,icon:r?/* @__PURE__ */ (0,Z.jsx)(x,{size:16}):/* @__PURE__ */ (0,Z.jsx)(ai,{size:16}),title:t.title,caption:t.caption(e.query),"aria-label":t.cardAria(e.query),fold:{title:t.cardAria(e.query),facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.covered}: ${IC(e.coveredCount,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${t.partial}: ${IC(e.partialCount,n)}`})]})},...r?{meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`warning`,children:t.tagWarningPill})}:{},children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__full`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:IC(e.coveredCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.covered})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-pair__part`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:IC(e.partialCount,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.partial})]})]}),e.tagMatchWarning!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-coverage-warning`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:e.tagMatchWarning})]}),/* @__PURE__ */ (0,Z.jsx)($w,{label:t.covered,matches:e.covered}),/* @__PURE__ */ (0,Z.jsx)($w,{label:t.partial,matches:e.partial}),e.gaps.length>0&&/* @__PURE__ */ (0,Z.jsx)(Gp,{label:t.gaps,children:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-coverage-gaps`,"aria-label":t.gaps,children:e.gaps.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]},`${String(t)}:${e}`))})})]})}function tT({entries:e}){let t=$().cards.coverage;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(eT,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`coverage`,resultKind:dm(e.outcome.raw)},r)})})}var nT={id:`coverage`,schema:Zw,Card:tT};function rT(e,t,n,r){let i=r-n;return t===`eq`&&i>0?Cb(e.loadMore,{remaining:i}):e.loadMoreUnknown}function iT({labels:e,totalForm:t,slideIndex:n,loaderIndex:r,loaded:i,total:a}){if(n===r)return rT(e,t,i,a);let o=n+1;switch(t){case`eq`:return Cb(e.slideAria,{index:o,total:a});case`atLeast`:return Cb(e.slideAriaAtLeast,{index:o,total:a});case`unknown`:return Cb(e.slideAriaUnknown,{index:o})}}function aT(e){let{labels:t,totalForm:n,slideIndex:r,loaderIndex:i,total:a}=e;return r===i?iT(e):n===`eq`?Cb(t.goToSlide,{index:r+1,total:a}):iT(e)}function oT(e,t,n,r){switch(t){case`eq`:return Cb(e.loadedOf,{loaded:n,total:r});case`atLeast`:return Cb(e.loadedOfAtLeast,{loaded:n,total:r});case`unknown`:return Cb(e.loadedOfUnknown,{loaded:n})}}function sT({labels:e,status:t,totalForm:n,loaded:r,total:i}){return t===`loading`?e.loading:t===`error`?e.retry:rT(e,n,r,i)}function cT({loaded:e,total:t,totalForm:n,status:r,labels:i,onLoadMore:a}){let o=r===`error`,s=r===`loading`,c=oT(i,n,e,t);return/* @__PURE__ */ (0,Z.jsx)(Tp,{bare:!0,className:`qa-ai-chat-collection__more`,role:o?`alert`:void 0,"aria-busy":s?!0:void 0,data:{"data-state":r},children:/* @__PURE__ */ (0,Z.jsx)(Ip,{icon:o?/* @__PURE__ */ (0,Z.jsx)(Oe,{size:28}):/* @__PURE__ */ (0,Z.jsx)(ye,{size:28}),title:o?i.loadMoreFailed:c,text:o?c:void 0,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:o?`secondary`:`primary`,size:`sm`,icon:o?/* @__PURE__ */ (0,Z.jsx)(ti,{size:14}):/* @__PURE__ */ (0,Z.jsx)(ye,{size:14}),disabled:s,onClick:a,children:sT({labels:i,status:r,totalForm:n,loaded:e,total:t})})})})}function lT({labels:e,totalForm:t,count:n,total:r}){switch(t){case`eq`:return Cb(e.loadedMore,{count:n,total:r});case`atLeast`:return Cb(e.loadedMoreAtLeast,{count:n,total:r});case`unknown`:return Cb(e.loadedMoreUnknown,{count:n})}}function uT({items:e,page:t,onLoadMore:n,keyOf:r,kind:i}){let[a,o]=(0,B.useReducer)((e,t)=>{switch(t.type){case`start`:return{...e,status:`loading`};case`success`:return{pages:[...e.pages,t.result],status:`idle`};case`error`:return{...e,status:`error`}}},{pages:[],status:`idle`}),{entries:s,lastAppended:c}=(0,B.useMemo)(()=>{let t=/* @__PURE__ */ new Set,n=[],i=e=>{let i=0;for(let a of e){let e=r(a);t.has(e)||(t.add(e),n.push({key:e,item:a}),i+=1)}return i};i(e);let o=0;for(let e of a.pages)o=i(e.items);return{entries:n,lastAppended:o}},[e,a.pages,r]),l=a.pages[a.pages.length-1],u=l===void 0?t:l.page,d=s.length;if(u!==null&&u.nextCursor!==null&&n===null)throw Error(`ChatCollection: missing onLoadMore for paged collection "${i}"`);let f=u===null?null:u.total,p=f!==null&&f.relation===`eq`&&f.value<d,m=f===null||p?d:f.value,h=u===null?`eq`:f===null||p?`unknown`:f.relation,g=u===null?null:u.nextCursor,_=(0,B.useRef)(a.status);_.current=a.status;let v=(0,B.useRef)(/* @__PURE__ */ new Set),y=(0,B.useCallback)(()=>{g!==null&&n!==null&&_.current!==`loading`&&(v.current.has(g)||(v.current.add(g),o({type:`start`}),n(g).then(e=>o({type:`success`,result:e}),()=>{v.current.delete(g),o({type:`error`})})))},[g,n]);return{entries:s,loaded:d,total:m,totalForm:h,hasMore:g!==null,status:a.status,lastAppended:c,loadMore:y}}function dT({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let{entries:c,loaded:l,total:u,totalForm:d,hasMore:f,status:p,lastAppended:m,loadMore:h}=uT({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),g=u>l||d===`unknown`&&f;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--rows`,"data-kind":e,"data-has-more":f?`true`:void 0,role:`group`,"aria-label":o.collectionAria,children:[s,g&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-ai-chat-collection__caption`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__caption-page`,children:oT(o,d,l,u)})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows`,children:c.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__row`,children:r(e.item,{index:t,loaded:l,total:u,totalIsExact:d===`eq`,active:!1})},e.key))}),f&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__rows-footer`,children:/* @__PURE__ */ (0,Z.jsx)(cT,{loaded:l,total:u,totalForm:d,status:p,labels:o,onLoadMore:h})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:m>0&&lT({labels:o,totalForm:d,count:m,total:u})})]})}function fT(e,t,n){return t?n.segmentCurrent:e===`resolved`?n.segmentResolved:e===`skipped`?n.segmentSkipped:n.segmentPending}function pT({kind:e,items:t,keyOf:n,renderItem:r,stepper:i,labels:a}){let{activeIndex:o,onActiveIndexChange:s,stateOf:c}=i,l=t.length,u=l-1,d=(0,B.useRef)(/* @__PURE__ */ new Map),f=(e,t)=>{var n;let r;switch(e.key){case`ArrowRight`:r=t+1;break;case`ArrowLeft`:r=t-1;break;case`Home`:r=0;break;case`End`:r=u;break;default:return}r<0||r>u||(e.preventDefault(),(n=d.current.get(r))==null||n.focus())};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--stepper`,"data-kind":e,role:`group`,"aria-roledescription":a.roleStepper,"aria-label":Cb(a.stepperAria,{total:l}),children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__progress`,children:t.map((e,t)=>{let r=c(t),i=t===o;return/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,ref:e=>{if(e!==null)return d.current.set(t,e),()=>{d.current.delete(t)}},className:`qa-ai-chat-collection__step`,"data-state":r,"aria-current":i?`step`:void 0,"aria-label":Cb(fT(r,i,a),{index:t+1,total:l}),tabIndex:i?0:-1,onClick:()=>s(t),onKeyDown:e=>f(e,t)},n(e))})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__steps`,children:t.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__step-panel`,"data-index":t,role:`group`,"aria-label":Cb(a.stepPosition,{index:t+1,total:l}),hidden:t!==o,children:r(e,{index:t,loaded:l,total:l,totalIsExact:!0,active:t===o})},n(e)))})]})}var mT=.6,hT=`0px 100% 0px 100%`,gT=`{index}`;function _T(e,t){let n=e.indexOf(gT);if(n===-1)return{lead:Cb(e,t),tail:``};let r=n+7;return{lead:Cb(e.slice(0,r),t),tail:Cb(e.slice(r),t)}}function vT({activeIndex:e,loaded:t,total:n,totalForm:r,slideCount:i,loaderIndex:a,labels:o,onGoTo:s}){let c=i-1,l=e+1,{lead:u,tail:d}=e===a?{lead:o.positionMore,tail:``}:r===`eq`?_T(o.counter,{index:l,total:n}):_T(o.counterUnknown,{index:l});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__controls`,onKeyDown:t=>{if(t.target instanceof HTMLInputElement)return;let n;switch(t.key){case`ArrowRight`:n=e+1;break;case`ArrowLeft`:n=e-1;break;case`Home`:n=0;break;case`End`:n=c;break;default:return}n<0||n>c||(t.preventDefault(),s(n,`live`))},children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-collection__counter`,children:[u,d!==``&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__counter-total`,children:d})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__indicator`,children:/* @__PURE__ */ (0,Z.jsx)(yT,{activeIndex:e,slideCount:i,loaded:t,total:n,totalForm:r,loaderIndex:a,labels:o,onGoTo:s})}),/* @__PURE__ */ (0,Z.jsxs)(Xe,{children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:o.previous,children:/* @__PURE__ */ (0,Z.jsx)(p,{icon:/* @__PURE__ */ (0,Z.jsx)(Bn,{size:16}),className:`qa-ai-chat-collection__prev`,disabled:e===0,onClick:()=>s(e-1,`live`)})}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:o.next,children:/* @__PURE__ */ (0,Z.jsx)(p,{icon:/* @__PURE__ */ (0,Z.jsx)(xe,{size:16}),className:`qa-ai-chat-collection__next`,disabled:e>=c,onClick:()=>s(e+1,`live`)})})]})]})}function yT({activeIndex:e,slideCount:t,loaded:n,total:r,totalForm:i,loaderIndex:a,labels:o,onGoTo:s}){return t<=6?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__dots`,children:Array.from({length:t},(t,c)=>/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-collection__dot`,"aria-label":aT({labels:o,totalForm:i,slideIndex:c,loaderIndex:a,loaded:n,total:r}),"aria-current":c===e?`true`:void 0,onClick:()=>s(c,`live`)},c))}):/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`range`,className:`qa-ai-chat-collection__strip`,min:1,max:t,step:1,value:e+1,"aria-label":o.scrubberAria,"aria-valuetext":iT({labels:o,totalForm:i,slideIndex:e,loaderIndex:a,loaded:n,total:r}),onChange:e=>s(Number(e.target.value)-1,`control`)})}function bT(e,t){if(t!==null)return e.some(e=>e.index===t&&e.ratio>=.6)?t:null;let n=null;for(let t of e)t.ratio<.6||(n===null||t.ratio>n.ratio)&&(n=t);return n===null?null:n.index}function xT(e){let t=Number(e.dataset.index);if(!Number.isInteger(t))throw Error(`ChatCollection: slide with no numeric data-index ("${String(e.dataset.index)}")`);return t}function ST({viewportRef:e,trackRef:t}){let[n,r]=(0,B.useState)(0),[i,a]=(0,B.useState)(null),o=(0,B.useRef)(0),s=(0,B.useRef)(0),c=(0,B.useRef)(/* @__PURE__ */ new Set),l=(0,B.useRef)(null),u=(0,B.useRef)(null),d=(0,B.useRef)(null);s.current=n;let f=(0,B.useCallback)(()=>{u.current=null,d.current!==null&&(clearTimeout(d.current),d.current=null)},[]),p=(0,B.useCallback)(e=>{var t;if(e!==null)return c.current.add(e),(t=l.current)==null||t.observe(e),()=>{var t;c.current.delete(e),(t=l.current)==null||t.unobserve(e)}},[]),m=(0,B.useCallback)(e=>{for(let t of c.current)if(xT(t)===e)return t;return null},[]);return(0,B.useEffect)(function(){let t=e.current;if(t===null)return;let n=new IntersectionObserver(e=>{let t=[];for(let n of e){let e=n.target;e instanceof HTMLLIElement&&c.current.has(e)&&t.push({index:xT(e),ratio:n.intersectionRatio})}let n=bT(t,u.current);if(n===null||(u.current!==null&&f(),n===s.current))return;let i=m(s.current),l=m(n),d=document.activeElement,p=i!==null&&l!==null&&d!==null&&i.contains(d)?l:null;p!==null&&p.focus({preventScroll:!0}),a(p===null?{seq:++o.current,index:n}:null),s.current=n,r(n)},{root:t,threshold:[mT]});l.current=n;for(let e of c.current)n.observe(e);return()=>{l.current=null,n.disconnect()}},[e,f,m]),(0,B.useEffect)(()=>f,[f]),{activeIndex:n,registerSlide:p,goToSlide:(0,B.useCallback)((n,i)=>{let c=e.current,l=t.current,p=m(n);if(c===null||l===null||p===null)return;let h=Math.abs(n-s.current),g=p.offsetLeft-l.offsetLeft;u.current=n,s.current=n,r(n),h>1?c.scrollTo({left:g,behavior:`instant`}):c.scrollTo({left:g}),d.current!==null&&clearTimeout(d.current),d.current=setTimeout(f,600),i.announcer===`slide`&&p.focus({preventScroll:!0}),a(i.announcer===`live`?{seq:++o.current,index:n}:null)},[e,t,f,m]),announcement:i}}function CT(e,t,n){return e<t||n.has(e)}function wT({viewportRef:e}){let[t,n]=(0,B.useState)(()=>/* @__PURE__ */ new Set),r=(0,B.useRef)(/* @__PURE__ */ new Set),i=(0,B.useRef)(null),a=(0,B.useCallback)(e=>{var t;if(e!==null)return r.current.add(e),(t=i.current)==null||t.observe(e),()=>{var t;r.current.delete(e),(t=i.current)==null||t.unobserve(e)}},[]);return(0,B.useEffect)(function(){let t=e.current;if(t===null)return;let a=new IntersectionObserver(e=>{let t=[];for(let n of e){if(!n.isIntersecting)continue;let e=Number(n.target.dataset.index);Number.isInteger(e)&&(t.push(e),a.unobserve(n.target))}t.length!==0&&n(e=>{let n=new Set(e);for(let e of t)n.add(e);return n})},{root:t,rootMargin:hT});i.current=a;for(let e of r.current)a.observe(e);return()=>{i.current=null,a.disconnect()}},[e]),{registerSlide:a,isMounted:(0,B.useCallback)(e=>CT(e,3,t),[t])}}function TT({kind:e,items:t,keyOf:n,renderItem:r,page:i,onLoadMore:a,labels:o,header:s}){let c=(0,B.useRef)(null),l=(0,B.useRef)(null),{entries:u,loaded:d,total:f,totalForm:p,hasMore:m,status:h,lastAppended:g,loadMore:_}=uT({items:t,page:i,onLoadMore:a,keyOf:n,kind:e}),v=m?u.length+1:u.length,y=f>d||m,{activeIndex:b,registerSlide:x,goToSlide:S,announcement:C}=ST({viewportRef:c,trackRef:l}),{registerSlide:w,isMounted:T}=wT({viewportRef:c}),E=(0,B.useCallback)(e=>{let t=x(e),n=w(e);return()=>{t==null||t(),n==null||n()}},[x,w]),D=u.length,O=m?D:null;(0,B.useEffect)(function(){m&&b===D&&h===`idle`&&_()},[m,b,D,h,_]);let ee=v-1,k=e=>{if(e.target!==e.currentTarget)return;let t;switch(e.key){case`ArrowRight`:t=b+1;break;case`ArrowLeft`:t=b-1;break;case`Home`:t=0;break;case`End`:t=ee;break;default:return}t<0||t>ee||(e.preventDefault(),S(t,{announcer:`slide`}))},A=(e,t,n,r)=>{let i=e===b;return/* @__PURE__ */ (0,Z.jsx)(`li`,{ref:E,"data-index":e,"data-active":i?`true`:void 0,className:`qa-ai-chat-collection__slide${r===void 0?``:` ${r}`}`,role:`group`,"aria-roledescription":o.roleSlide,"aria-label":iT({labels:o,totalForm:p,slideIndex:e,loaderIndex:O,loaded:d,total:f}),tabIndex:i?0:-1,onKeyDown:k,onClick:i?void 0:()=>S(e,{announcer:`slide`}),children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-collection__slide-content`,inert:!i,children:n})},t)};return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-collection qa-ai-chat-collection--carousel`,"data-kind":e,"data-has-more":m?`true`:void 0,children:[(s!==void 0||y)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__head`,children:[s,y&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-count`,children:oT(o,p,d,f)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:c,className:`qa-ai-chat-collection__viewport`,role:`group`,"aria-roledescription":o.roleCarousel,"aria-label":o.collectionAria,children:/* @__PURE__ */ (0,Z.jsxs)(`ul`,{ref:l,className:`qa-ai-chat-collection__track`,children:[u.map((e,t)=>A(t,e.key,T(t)?r(e.item,{index:t,loaded:d,total:f,totalIsExact:p===`eq`,active:t===b}):/* @__PURE__ */ (0,Z.jsx)(ET,{}))),m&&A(D,`${e}:load-more`,/* @__PURE__ */ (0,Z.jsx)(cT,{loaded:d,total:f,totalForm:p,status:h,labels:o,onLoadMore:_}),`qa-ai-chat-collection__slide--more`)]})}),/* @__PURE__ */ (0,Z.jsx)(vT,{activeIndex:b,loaded:d,total:f,totalForm:p,slideCount:v,loaderIndex:O,labels:o,onGoTo:(e,t)=>S(e,{announcer:t})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:C!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:iT({labels:o,totalForm:p,slideIndex:C.index,loaderIndex:O,loaded:d,total:f})},C.seq)}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:g>0&&lT({labels:o,totalForm:p,count:g,total:f})})]})}function ET(){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-collection__placeholder`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--head`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--title`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--line`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--meta`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__shimmer qa-ai-chat-collection__shimmer--actions`})]})}function DT(e){return e.mode===`stepper`?/* @__PURE__ */ (0,Z.jsx)(pT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,stepper:e.stepper,labels:e.labels}):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(dT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header}):/* @__PURE__ */ (0,Z.jsx)(TT,{kind:e.kind,items:e.items,keyOf:e.keyOf,renderItem:e.renderItem,page:e.page,onLoadMore:e.onLoadMore,labels:e.labels,header:e.header})}function OT(e,t){let[n]=t.items;if(n===void 0)throw Error(`ChatCollection: empty collection for kind "${e.kind}"`);return t.items.length<2?e.renderSingle(n):e.mode===`rows`?/* @__PURE__ */ (0,Z.jsx)(DT,{mode:`rows`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header}):/* @__PURE__ */ (0,Z.jsx)(DT,{mode:`carousel`,kind:e.kind,items:t.items,keyOf:e.keyOf,renderItem:e.renderItem,labels:e.labels,page:t.page,onLoadMore:t.onLoadMore,header:t.header})}function kT(e,t,n){return{...e,collectionAria:t.collectionAria(n),roleCarousel:t.roleCarousel,roleSlide:t.roleSlide,previous:t.previous,next:t.next,goToSlide:t.goToSlide}}function AT({items:e}){let t=$().cards.common,n=(0,B.useId)(),[r,i]=(0,B.useState)(!1),a=(0,B.useRef)(null),o=(0,B.useRef)(null),s=(0,B.useRef)([]);(0,B.useEffect)(()=>{var e;if(!r)return;let t=e=>{a.current!==null&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`pointerdown`,t),(e=s.current.find(e=>e!==null&&!e.disabled))==null||e.focus(),()=>document.removeEventListener(`pointerdown`,t)},[r]);let c=()=>{var e;i(!1),(e=o.current)==null||e.focus()};return/* @__PURE__ */ (0,Z.jsxs)(`span`,{ref:a,className:`qa-card-kit__more qa-card-kit__only-compact`,children:[/* @__PURE__ */ (0,Z.jsx)(`button`,{ref:o,type:`button`,className:`qa-card-kit__more-button`,"aria-haspopup":`menu`,"aria-expanded":r,"aria-controls":r?n:void 0,"aria-label":t.moreActions,onClick:()=>i(e=>!e),onKeyDown:e=>{e.key===`ArrowDown`&&!r&&(e.preventDefault(),i(!0))},children:/* @__PURE__ */ (0,Z.jsx)(bn,{size:16,"aria-hidden":`true`})}),r&&/* @__PURE__ */ (0,Z.jsx)(`div`,{id:n,className:`qa-card-kit__more-menu`,role:`menu`,onKeyDown:e=>{let t=s.current.filter(e=>e!==null&&!e.disabled),n=t.findIndex(e=>e===document.activeElement),r=e.key===`ArrowDown`?t[(n+1)%t.length]:e.key===`ArrowUp`?t[(n-1+t.length)%t.length]:e.key===`Home`?t[0]:e.key===`End`?t[t.length-1]:void 0;if(e.key===`Escape`){e.preventDefault(),c();return}r!==void 0&&(e.preventDefault(),r.focus())},children:e.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:e=>{s.current[t]=e},type:`button`,role:`menuitem`,tabIndex:-1,disabled:e.disabled===!0,onClick:()=>{c(),e.onSelect()},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:e.icon}),e.label]},e.id))})]})}var jT=6e4;function MT(e,t,n){let r=Math.max(0,t-Date.parse(e));return r>=jT?nw(e,t,n):new Intl.RelativeTimeFormat(n,{numeric:`auto`}).format(-Math.round(r/1e3),`second`)}var NT=At();function PT(e){let{jobStatus:t}=$f(),n=nr(e)===`active`;return(0,B.useEffect)(()=>n?t.watch(e):void 0,[t,e,n]),(0,B.useSyncExternalStore)(e=>t.subscribe(e),()=>t.latest(e.agentJobId))??e}var FT={active:`info`,success:`success`,error:`error`,neutral:`muted`},IT={active:`info`,success:`success`,error:`error`,neutral:`neutral`};function LT({found:e}){let t=$().cards.jobStatus,n=Q(),r=[{key:`screens`,value:e.screens,label:t.found.screens(e.screens)},{key:`edges`,value:e.edges,label:t.found.edges(e.edges)},{key:`notes`,value:e.notes,label:t.found.notes(e.notes)},{key:`unexplored`,value:e.unexplored,label:t.found.unexplored(e.unexplored)}];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__found`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__found-caption`,children:t.foundCaption}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-job-card__counters`,children:r.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:IC(e.value,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e.label})]},e.key))})]})}function RT({view:e}){let t=$().cards.jobStatus;if(e.terminal===null)return null;let{reason:n,message:r}=e.terminal;return n===null&&r===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`qa-job-card__terminal`,e.stage===`failed`&&`qa-job-card__terminal--error`),children:[n!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.terminalPrefix}),t.terminalReason[n]]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__terminal-message`,children:r})]})}function zT({payload:e}){let t=$().cards.jobStatus,n=Q(),{http:r,project:i,jobStatus:a}=$f(),o=PT(e.view),[s,c]=(0,B.useState)({status:`idle`}),l=tr(o.stage),u=l.blockState===`active`,d=rr(o),f=t.kind[o.kind],p=s.status===`confirming`?s.action:null,m=s.status===`sending`?s.action:null,h=o.deeplink===null||i===null?null:ap(i.number,o.deeplink),g=e=>{c({status:`sending`,action:e}),r.request({method:`POST`,path:qn.agentJobCommand.path(o.agentJobId,e),schema:NT}).then(()=>c({status:`idle`}),t=>{let n=t instanceof Jn&&t.status===409;c({status:`failed`,action:e,conflict:n}),n||queueMicrotask(()=>{throw t})}).finally(()=>a.refresh(o.agentJobId))},_=t.cancelConfirm[o.kind],v=o.status===`queued`?_.bodyQueued:_.bodyKept!==null&&o.degraded===null&&o.atlas!==null?`${_.body} ${_.bodyKept}`:_.body,y=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[p===`cancel`&&/* @__PURE__ */ (0,Z.jsxs)(q_,{question:_.question,body:v,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:_.keep}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(yr,{size:14}),onClick:()=>g(`cancel`),children:_.confirm})]}),p===`kill`&&/* @__PURE__ */ (0,Z.jsxs)(q_,{question:t.killConfirm.question,body:t.killConfirm.body[o.kind],children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,onClick:()=>c({status:`idle`}),children:t.killConfirm.keep}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Qr,{size:14}),onClick:()=>g(`kill`),children:t.killConfirm.confirm})]}),s.status===`failed`&&(s.conflict?/* @__PURE__ */ (0,Z.jsx)(K_,{tone:`warning`,children:t.failed.conflict}):/* @__PURE__ */ (0,Z.jsx)(K_,{children:s.action===`cancel`?t.failed.cancel[o.kind]:t.failed.kill}))]}),b=u&&d.cancel,S=d.kill,C=p===null&&(h!==null||b||S)?/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[h!==null&&i!==null&&/* @__PURE__ */ (0,Z.jsx)(Vp,{path:h,label:t.openMap,accessibleName:t.openMapAria(i.name)}),b&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(yr,{size:14}),loading:m===`cancel`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`cancel`}),children:t.cancel[o.kind]}),S&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Qr,{size:14}),loading:m===`kill`,disabled:m!==null,onClick:()=>c({status:`confirming`,action:`kill`}),children:t.kill})}),/* @__PURE__ */ (0,Z.jsx)(AT,{items:[{id:`kill`,label:t.kill,icon:/* @__PURE__ */ (0,Z.jsx)(Qr,{}),disabled:m!==null,onSelect:()=>c({status:`confirming`,action:`kill`})}]})]})]}):void 0,w=o.machine.agentName.trim();return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-job-card`,u&&p===null&&`qa-card-kit--live`),tone:o.stage===`failed`?`error`:`neutral`,icon:/* @__PURE__ */ (0,Z.jsx)(ei,{size:16}),tileTone:FT[l.tone],title:f,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__id`,children:o.agentJobId.slice(0,8)}),meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:IT[l.tone],role:`status`,...u?{className:`qa-card-kit__pill-live`}:{},children:t.stage[o.stage]}),"aria-label":t.cardAria(f),"aria-busy":m!==null||void 0,sections:y,footer:C,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__lines`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(On,{"aria-hidden":`true`}),w.length>0?w:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-job-card__missing`,children:t.machineMissing})]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(pr,{"aria-hidden":`true`}),o.lastActivityAt===null?t.activityNone:t.activity(MT(o.lastActivityAt,Date.parse(o.readAt),n))]})]}),o.degraded===null?o.atlas!==null&&/* @__PURE__ */ (0,Z.jsx)(LT,{found:o.atlas.found}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-job-card__degraded`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{size:15,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.degraded})]}),/* @__PURE__ */ (0,Z.jsx)(RT,{view:o})]})}function BT(e){return/* @__PURE__ */ (0,Z.jsx)(zT,{payload:e})}function VT(e,t){return{kind:`job`,mode:`carousel`,keyOf:e=>e.view.agentJobId,renderItem:BT,renderSingle:BT,labels:kT(e.collection,e.jobStatus.collection,t)}}function HT({entries:e}){let t=$().cards,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]),r=e.flatMap(e=>e.outcome.status===`rejected`?[e.outcome.raw]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&OT(VT(t,n.length),{items:n,page:null,onLoadMore:null}),r.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.jobStatus.unsupported.title,body:t.jobStatus.unsupported.body,family:`job-status`,resultKind:dm(e)},`rejected:${String(n)}`))]})}var UT={id:`job-status`,schema:O,Card:HT},WT=z({cardKind:zt(`metric_card`),metric:ve,drillTarget:L().nullable()}),GT=z({cardKind:zt(`finding_card`),finding:pe}),KT=z({cardKind:zt(`stability_row_card`),row:Ge,basis:ze}),qT=z({cardKind:zt(`scenario_stability_card`),detail:t}),JT=z({cardKind:zt(`failure_breakdown_card`),entity:ae,causes:yt(ge),totalFailures:R().int().min(0),mappingVersion:L()}),YT=z({cardKind:zt(`weak_spot_feature_card`),row:ke}),XT=z({cardKind:zt(`weak_spot_page_card`),row:Se,unassigned:dt()}),ZT=z({cardKind:zt(`trend_card`),trend:we}),QT=z({cardKind:zt(`hotspot_card`),page:ae.nullable(),counters:v,lastPassedDate:Ut().nullable()}),$T=et(`cardKind`,[WT,GT,KT,qT,JT,YT,XT,ZT,QT]),eE={resultKind:zt(`report_cards`),scope:z({projectId:xt()}),asOf:St(),definitionVersions:Ft(L(),L()),cards:yt($T),truncated:dt(),total:R().int().min(0).nullable().optional()},tE=et(`basisKind`,[z({...eE,basisKind:zt(`window`),window:Ye}),z({...eE,basisKind:zt(`last_runs`),basis:ze})]),nE=/* @__PURE__ */ `pass_rate.runs_total.runs_passed.runs_failed.runs_evaluated.runs_infra.runs_cancelled.runs_abandoned.run_duration_sum_ms.run_duration_count.run_duration_avg.page_steps_executed.page_steps_passed.page_steps_failed.page_steps_healed.page_step_success_rate.page_healed_rate.step_failures.run_failures.bugs_opened.bugs_closed.open_bugs.covered_pages.total_pages.page_coverage_pct.unstable_scenarios`.split(`.`);function rE(e){return nE.includes(e)}var iE=[`pass_rate`,`runs_total`,`unstable_scenarios`,`open_bugs`,`page_coverage_pct`];function aE(e){return iE.includes(e)}function oE(e,t,n,r){if(e===null)return{magnitude:`\u2014`,unit:null};let i=r.metric.unit[t.unit];return{magnitude:FC(e,t.precision,n),unit:i===``?null:i}}function sE(e,t,n,r){let i=oE(e,t,n,r);return i.unit===null?i.magnitude:`${i.magnitude}\u00A0${i.unit}`}function cE(e,t,n){let{previous:r,value:i,format:a}=e;if(r===null||r.insufficient||r.value===null||i===null)return null;let o=i-r.value,s=LC(o,a.precision,t),c=a.unit===`percent`,l=n.metric.unit[a.unit],u=c?n.metric.deltaPoints(s):l===``?s:`${s}\u00A0${l}`,d=o>0?`up`:o<0?`down`:`flat`;return o===0||a.goodDirection===`none`?{text:u,direction:d,tone:`neutral`,inPoints:c}:{text:u,direction:d,tone:(a.goodDirection===`up`?o>0:o<0)?`good`:`bad`,inPoints:c}}function lE(e,t){return rE(e)?{text:t.metric.name[e],missing:!1}:{text:t.metric.missingName,missing:!0}}function uE(e,t,n){return aE(e)?n.metric.denominator[e](t):n.metric.denominator.generic(t)}function dE(e,t){switch(e.kind){case`window`:return t.window[e.window];case`runs`:return t.basisRuns(e.basis.maxRuns,e.basis.maxAgeDays);case`currentState`:return t.currentState;case`noWindow`:return t.noWindow}}function fE(e,t){return e.trim().length===0?{text:t,missing:!0}:{text:e,missing:!1}}function pE(e,t){let n=t.weakSpots.priority;return Object.prototype.hasOwnProperty.call(n,e)?n[e]:e}var mE={status:`incomplete_evidence`};function hE(e,t,n){return`${FC(e,0,t)}\u00A0${n.metric.unit.percent}`}function gE(e,t){let n=e.evidence.dominantCause;return n===void 0?``:t.finding.dominantCause(t.cause[n.group],n.count,n.totalFailures)}function _E(e,t=``){return{status:`stated`,before:e.before,after:`${e.after}${t}`}}function vE(e,t,n){let{evidence:r}=e,i=n.finding.sentence;switch(e.ruleId){case`uncovered_high_priority`:{var a;let e=r.values.uncoveredPages,o=r.values.totalPages,s=(a=r.labels)==null?void 0:a.priority;return e===void 0||o===void 0||s===void 0?mE:_E(i.uncovered_high_priority({priority:pE(s,n).toLocaleLowerCase(t),uncovered:e,total:o}))}case`consistently_failing_scenario`:{let t=r.values.consecutiveFails;return t===void 0?mE:_E(i.consistently_failing_scenario({count:t}),gE(e,n))}case`low_page_success`:{let a=r.values.page_step_success_rate;return a===void 0?mE:_E(i.low_page_success({rate:hE(a,t,n),executions:r.denominator,threshold:hE(r.threshold,t,n)}),gE(e,n))}case`high_healed_rate`:{let e=r.values.page_healed_rate;return e===void 0?mE:_E(i.high_healed_rate({rate:hE(e,t,n),threshold:hE(r.threshold,t,n)}))}case`stale_page`:{let e=r.values.daysSinceLastExecution;return e===void 0?mE:_E(i.stale_page({days:e,threshold:r.threshold}))}case`open_bugs_no_verification`:{let e=r.values.criticalBugs,t=r.values.highBugs;if(e===void 0||t===void 0||r.window===null)return mE;let a=n.window[r.window];return _E(e>0?i.open_bugs_no_verification_critical({count:e,window:a}):i.open_bugs_no_verification_high({count:t,window:a}))}default:return{status:`unknown_rule`}}}function yE(e){let{project:t}=$f();return e===null||t===null?null:sp(e,t.number)}function bE({name:e}){let t=$().cards.common,n=fE(e,t.missingName);return/* @__PURE__ */ (0,Z.jsx)(Op,{missing:n.missing,children:n.text})}function xE({delta:e}){let t=$().cards.report.metric,n=`${t.deltaHint}${e.inPoints?t.deltaPointsHint:``}`;return/* @__PURE__ */ (0,Z.jsxs)(zp,{tip:n,className:P(`qa-report-delta`,`qa-report-delta--${e.tone}`),children:[e.direction===`up`&&/* @__PURE__ */ (0,Z.jsx)(vr,{"aria-hidden":`true`}),e.direction===`down`&&/* @__PURE__ */ (0,Z.jsx)(hr,{"aria-hidden":`true`}),e.text]})}function SE({finding:e}){let t=$().cards.report,n=Q(),{evidence:i}=e,a=i.window===null?t.noWindow:t.windowShort[i.window],o=i.window===null?t.noWindow:t.window[i.window],s=t.finding.evidenceRows,c=/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-evidence-tip`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${s.denominator}: ${IC(i.denominator,n)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${s.window}: ${o}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${s.threshold}: ${IC(i.threshold,n)}`}),Object.entries(i.values).map(([e,t])=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${e}: ${IC(t,n)}`},e)),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${s.rule}: ${e.ruleId} \u00B7 ${e.ruleVersion}`})]});return/* @__PURE__ */ (0,Z.jsxs)(zp,{tip:c,className:`qa-report-evidence`,children:[/* @__PURE__ */ (0,Z.jsx)(r,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:`${t.finding.evidenceAria}: `}),t.finding.evidence(i.denominator,a,i.threshold)]})}function CE({date:e}){let t=$().cards.report.lastPassed,n=Q();if(e===null)return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-warnink`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`}),t.never]});let r=YC(e),i=r<=0?t.today:r===1?t.yesterday:t.daysAgo(r);return/* @__PURE__ */ (0,Z.jsx)(zp,{tip:GC(e,n),children:i})}function wE({passed:e,executed:t}){let n=$().cards.report,r=Q(),i=RC(e,t);return i===null?/* @__PURE__ */ (0,Z.jsx)(Bp,{value:`\u2014`,base:n.weakSpots.noExecutions}):/* @__PURE__ */ (0,Z.jsx)(Bp,{value:`${IC(i,r)} ${n.metric.unit.percent}`,base:n.weakSpots.ofSteps(e,t)})}function TE(e){return e.basisKind===`window`?{kind:`window`,window:e.window.label}:{kind:`runs`,basis:e.basis}}function EE(e,t){switch(e.cardKind){case`metric_card`:return e.metric.windowScoped?{kind:`window`,window:e.metric.window.label}:{kind:`currentState`};case`trend_card`:return{kind:`window`,window:e.trend.window.label};case`stability_row_card`:return{kind:`runs`,basis:e.basis};case`scenario_stability_card`:return{kind:`runs`,basis:e.detail.basis};case`finding_card`:return e.finding.evidence.window===null?{kind:`noWindow`}:{kind:`window`,window:e.finding.evidence.window};case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function DE(e,t){switch(e.cardKind){case`metric_card`:return e.metric.asOf;case`trend_card`:return e.trend.asOf;case`finding_card`:return e.finding.asOf;case`scenario_stability_card`:return e.detail.asOf;case`stability_row_card`:case`failure_breakdown_card`:case`weak_spot_feature_card`:case`weak_spot_page_card`:case`hotspot_card`:return t}}function OE(e){let{total:t}=e;return typeof t==`number`&&t>e.cards.length?{kind:`shownOfTotal`,shown:e.cards.length,total:t}:e.truncated?{kind:`truncated`}:null}function kE(e){let t=[],n=[],r=[];for(let i of e){let{call:e,outcome:a}=i;if(a.status===`rejected`){n.push({toolCallId:e===null?null:e.toolCallId,raw:a.raw});continue}if(e===null){n.push({toolCallId:null,raw:a.result});continue}let o=a.result,s={...e.title!==void 0&&{source:e.title},basis:TE(o),asOf:o.asOf,definitionVersions:o.definitionVersions},c=OE(o);o.cards.length===0&&c!==null&&r.push({toolCallId:e.toolCallId,note:c}),o.cards.forEach((n,r)=>{t.push({card:n,envelope:{toolCallId:e.toolCallId,toolName:e.toolName,caption:s},indexInEnvelope:r,envelopeNote:r===o.cards.length-1?c:null})})}return{slides:t,rejected:n,cardlessNotes:r}}function AE(e,t){return e.kind===`shownOfTotal`?t.envelope.shownOfTotal(e.shown,e.total):t.envelope.truncated}function jE({slide:e,icon:t,label:n,versions:i,pill:a,notes:o=[],sections:s,footer:c,children:l}){var u;let d=$(),f=d.cards.report,p=Q(),{caption:m}=e.envelope,h=dE(EE(e.card,m.basis),f),g=DE(e.card,m.asOf),_=f.asOf(UC(g,p)),v=i??Object.entries(m.definitionVersions).map(([e,t])=>f.stamp.envelope(e,t)),y=((u=m.source)==null?void 0:u[p])??d.shell.transcript.toolCall,b=f.stamp.source(y,v),x=e.envelopeNote===null?null:AE(e.envelopeNote,f),S=[...o,...x===null?[]:[/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:x},`envelope`)]];return/* @__PURE__ */ (0,Z.jsx)(Tp,{className:`${Lp} qa-report-card`,icon:t,title:f.title[e.card.cardKind],"aria-label":n,fold:{title:n,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:`${y} \u00B7 ${h}`})},caption:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-card__env`,children:y}),` \u00B7 ${h}`,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:` \u00B7 ${_}`})]}),meta:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[a,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-wide`,children:/* @__PURE__ */ (0,Z.jsx)(zp,{tip:b,children:/* @__PURE__ */ (0,Z.jsx)(`time`,{dateTime:g,children:_})})})]}),...S.length===0?{}:{note:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:S})},...s===void 0?{}:{sections:s},...c===void 0?{}:{footer:c},children:l})}var ME={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},watch:{tone:`neutral`}};function NE({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{finding:a}=t,o=fE(a.entity.name,r.missingName),s=vE(a,i,n),c=yE(a.drillTarget),l=n.finding.open[a.entity.type],u=ME[a.severity];return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Br,{size:16}),label:`${n.title.finding_card}: ${o.text}`,versions:[n.stamp.rule(a.ruleId,a.ruleVersion)],pill:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:u.tone,...u.className===void 0?{}:{className:u.className},children:n.finding.severity[a.severity]}),footer:c===null?void 0:/* @__PURE__ */ (0,Z.jsx)(Fp,{children:/* @__PURE__ */ (0,Z.jsx)(Vp,{path:c,label:l,accessibleName:n.openAria(l,o.text)})}),children:[s.status===`stated`?/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-finding`,children:[s.before,/* @__PURE__ */ (0,Z.jsx)(`b`,{className:o.missing?`qa-report-finding__missing`:void 0,children:o.text}),s.after]}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(kp,{children:s.status===`unknown_rule`?n.finding.unknownRule:n.finding.incompleteEvidence}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:n.finding.ruleIdDetail(a.ruleId)})]}),/* @__PURE__ */ (0,Z.jsx)(SE,{finding:a})]})}var PE=300,FE=44,IE=4;function LE({points:e,ariaLabel:t}){let n=$().cards.report,r=Q(),i=e.flatMap(e=>e.value===null?[]:[e.value]),a=Math.min(...i),o=Math.max(...i)-a,s=t=>e.length>1?IE+t*292/(e.length-1):PE/2,c=e=>40-(o===0?.5:(e-a)/o)*36,l=e.map((e,t)=>e.value===null?null:{x:s(t),y:c(e.value)}),u=l.filter(e=>e!==null),d=u[0],f=u[u.length-1];if(d===void 0||f===void 0)throw Error(`Sparkline: rendered for a series with no value \u2014 the caller states that case`);let p=``,m=!1;for(let e of l){if(e===null){m=!1;continue}p+=`${m?`L`:`M`}${e.x.toFixed(1)} ${e.y.toFixed(1)} `,m=!0}let h=`M${d.x.toFixed(1)} ${String(FE)} ${u.map(e=>`L${e.x.toFixed(1)} ${e.y.toFixed(1)}`).join(` `)} L${f.x.toFixed(1)} ${String(FE)} Z`,g=e[0],_=e[e.length-1];return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark`,children:[/* @__PURE__ */ (0,Z.jsxs)(`svg`,{className:`qa-report-spark__svg`,viewBox:`0 0 ${String(PE)} ${String(FE)}`,role:`img`,"aria-label":t,children:[/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__area`,d:h}),/* @__PURE__ */ (0,Z.jsx)(`path`,{className:`qa-report-spark__line`,d:p.trim()}),e.map((e,t)=>e.value===null?/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__gap`,cx:s(t).toFixed(1),cy:42,r:2,children:/* @__PURE__ */ (0,Z.jsx)(`title`,{children:n.metric.sparkGap(KC(e.date,r),e.denominator)})},e.date):null),/* @__PURE__ */ (0,Z.jsx)(`circle`,{className:`qa-report-spark__last`,cx:f.x.toFixed(1),cy:f.y.toFixed(1),r:3.5})]}),g!==void 0&&_!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-spark__axis`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:KC(g.date,r)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:KC(_.date,r)})]})]})}function RE(e,t){return P(`qa-report-strip__cell`,`qa-report-strip__cell--${e===`P`?`passed`:e===`F`?`failed`:`unknown`}`,t&&`qa-report-strip__cell--pre`)}function zE({strip:e,preWatermarkStrip:t,passes:n,fails:r}){let i=$().cards.report.stability,a=Q(),o=t===null?[]:[...t],s=i.stripAria(n,r,n+r)+(o.length===0?``:i.stripAriaBeforeChange(o.length));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-strip__cells`,role:`group`,"aria-label":s,children:[o.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:RE(e,!0),"aria-hidden":`true`},`pre-${String(t)}`)),o.length>0&&/* @__PURE__ */ (0,Z.jsx)(zp,{tip:i.beforeChange,className:`qa-report-strip__divider`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:i.beforeChange})}),[...e].map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:RE(e,!1),"aria-hidden":`true`},`run-${String(t)}`))]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-strip__count`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__ok`,children:`${IC(n,a)}\u2713`}),` `,/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-strip__bad`,children:`${IC(r,a)}\u2717`})]})]})}function BE(e){return{"--qa-report-cause":`var(--color-cause-${e.replace(/_/g,`-`)})`}}function VE({group:e}){let t=$().cards.report;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-report-cause`,e===`unrecognized`&&`qa-report-cause--unrecognized`),style:BE(e),children:t.cause[e]})}function HE({causes:e,countLabel:t}){let n=Math.max(...e.map(e=>e.count));return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-causes`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{style:BE(e.group),children:[/* @__PURE__ */ (0,Z.jsx)(VE,{group:e.group}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__bar`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(`i`,{style:{"--qa-report-cause-share":`${String(n===0?0:Math.round(e.count/n*100))}%`}})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-causes__count`,children:t(e.count)})]},e.group))})}function UE({causes:e}){let t=$().cards.report.stability;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-report-rawcodes`,children:e.flatMap(e=>e.rawCodes.map(n=>/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.rawCode(n.code,n.count)},`${e.group}:${n.code}`)))})}var WE={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(Oe,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(ui,{})},watch:{tone:`plain`,icon:/* @__PURE__ */ (0,Z.jsx)(Cn,{})}};function GE({counts:e}){let t=$().cards.report.weakSpots,n=Q(),r=Pt.filter(t=>e[t]>0);return r.length===0?t.findingsNone:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:r.map(r=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${WE[r].tone}`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:WE[r].icon}),/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,children:IC(e[r],n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,children:t.findingCount[r](e[r])})]},r))})}var KE={critical:{tone:`crit`,icon:/* @__PURE__ */ (0,Z.jsx)(Oe,{})},high:{tone:`high`,icon:/* @__PURE__ */ (0,Z.jsx)(vr,{})},medium:{tone:`warn`,icon:/* @__PURE__ */ (0,Z.jsx)(wr,{})},low:{tone:`low`,icon:null}};function qE(e){return Object.prototype.hasOwnProperty.call(KE,e)}function JE({buckets:e}){let t=$().cards.report.hotspot.severityChip;return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev-row`,children:e.map(e=>{let{severity:n,count:r}=e;if(n===null)return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.none(r)},`__none__`);if(!qE(n))return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev qa-report-sev--plain`,children:t.unknown(r,n)},`raw:${n}`);let i=KE[n];return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-report-sev qa-report-sev--${i.tone}`,children:[i.icon!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sev__icon`,"aria-hidden":`true`,children:i.icon}),t[n](r)]},n)})})}function YE(e){return e.some(e=>e.value!==null)}function XE({metricId:e}){let t=$().cards.report,n=lE(e,t);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Op,{missing:n.missing,children:n.text}),n.missing&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-detail`,children:t.metric.missingNameDetail(e)})]})}function ZE({slide:e,card:t}){let n=$().cards.report,r=Q(),{metric:i}=t,a=lE(i.metricId,n),o=yE(t.drillTarget),s=oE(i.insufficient?null:i.value,i.format,r,n),c=i.insufficient?null:cE(i,r,n),l=i.series;return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Fr,{size:16}),label:`${n.title.metric_card}: ${a.text}`,versions:[n.stamp.metric(i.metricId,i.definitionVersion)],footer:o===null?void 0:/* @__PURE__ */ (0,Z.jsx)(Fp,{children:/* @__PURE__ */ (0,Z.jsx)(Vp,{path:o,label:n.metric.openReport,accessibleName:n.openAria(n.metric.openReport,a.text)})}),children:[/* @__PURE__ */ (0,Z.jsx)(XE,{metricId:i.metricId}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-report-metric`,children:[s.magnitude,s.unit!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-metric__unit`,children:` ${s.unit}`}),c!==null&&/* @__PURE__ */ (0,Z.jsx)(xE,{delta:c})]}),/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:uE(i.metricId,i.denominator,n)}),i.insufficient?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.insufficient}):l===void 0||l.length===0?null:YE(l)?/* @__PURE__ */ (0,Z.jsx)(LE,{points:l,ariaLabel:n.metric.sparkAria(a.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue})]})}function QE({slide:e,card:t}){let n=$().cards.report,i=Q(),{trend:a}=t,o=lE(a.metricId,n),s=a.points[a.points.length-1],c=a.points.filter(e=>e.value===null).length;return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(ui,{size:16}),label:`${n.title.trend_card}: ${o.text}`,versions:[n.stamp.metric(a.metricId,a.definitionVersion)],notes:c===0?[]:[/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:n.trend.gaps(c)},`gaps`)],children:[/* @__PURE__ */ (0,Z.jsx)(XE,{metricId:a.metricId}),s===void 0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.trend.empty}):/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[YE(a.points)?/* @__PURE__ */ (0,Z.jsx)(LE,{points:a.points,ariaLabel:n.metric.sparkAria(o.text)}):/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.metric.noSeriesValue}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.trend.lastDay(KC(s.date,i)),value:/* @__PURE__ */ (0,Z.jsx)(Bp,{value:sE(s.value,a.format,i,n),base:n.trend.dayDenominator(s.denominator)})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.trend.points,value:IC(a.points.length,i)})]})]})]})}function $E(e,t,n){let r=n.stability.evidence;switch(e.status){case`flaky`:return r.flaky(e.fails,e.passes,e.windowRuns);case`consistently_failing`:return r.consistently_failing(e.consecutiveFails);case`monitoring`:return r.monitoring(e.fails,e.windowRuns);case`stable`:return r.stable(e.windowRuns);case`insufficient_history`:return e.historyResetByContentChange&&e.contentWatermarkAt!==null?r.insufficientHistoryWatermark(qC(e.contentWatermarkAt,t)):r.insufficientHistory(e.windowRuns)}}var eD={consistently_failing:`error`,flaky:`warning`,monitoring:`info`,insufficient_history:`neutral`,stable:`success`};function tD({part:e,total:t,base:n}){let r=$().cards.report,i=Q(),a=RC(e,t);return/* @__PURE__ */ (0,Z.jsx)(Bp,{value:a===null?`\u2014`:`${IC(a,i)} ${r.metric.unit.percent}`,base:n})}function nD(e,t,n,r){return!e||t===null?[]:[/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(rn,{}),children:n(qC(t,r))},`history`)]}function rD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=fE(a.scenarioName,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:16}),label:`${n.title.stability_row_card}: ${o.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:eD[a.status],children:n.stability.status[a.status]}),notes:nD(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),children:[/* @__PURE__ */ (0,Z.jsx)(bE,{name:a.scenarioName}),/* @__PURE__ */ (0,Z.jsx)(kp,{children:$E(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(zE,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.success,value:/* @__PURE__ */ (0,Z.jsx)(tD,{part:a.passes,total:a.windowRuns,base:n.stability.outOf(a.passes,a.windowRuns)})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.dominantCause,value:a.dominantCauseGroup===null?n.stability.noFailures:/* @__PURE__ */ (0,Z.jsx)(VE,{group:a.dominantCauseGroup})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.lastRun,value:a.lastRunAt===null?`\u2014`:XC(a.lastRunAt,i)})]})]})}function iD(e){return e.some(e=>e.rawCodes.length>0)}var aD={passed:`ok`,failed:`fail`,infra:`gray`,cancelled:`gray`,abandoned:`gray`};function oD({runs:e}){let t=$().cards.report.stability,n=Q();return/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-report-runs`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-oc qa-report-oc--${aD[e.outcome]}`,children:t.outcome[e.outcome]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__when`,children:XC(e.startedAt,n)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-runs__dur`,children:e.durationMs===null?`\u2014`:rw(e.durationMs,n)}),e.dominantCauseGroup!==null&&/* @__PURE__ */ (0,Z.jsx)(VE,{group:e.dominantCauseGroup})]},e.scenarioRunId))})}function sD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{detail:a}=t,o=fE(a.scenario.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(pr,{size:16}),label:`${n.title.scenario_stability_card}: ${o.text}`,versions:[n.stamp.definition(a.definitionVersion),n.stamp.mapping(a.causeMappingVersion)],pill:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:eD[a.status],children:n.stability.status[a.status]}),notes:nD(a.historyResetByContentChange,a.contentWatermarkAt,n.stability.historyReset,i),sections:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[iD(a.causes)&&/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(a.causeMappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(UE,{causes:a.causes})}),a.recentRuns.length>0&&/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.recentRuns}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:IC(a.recentRuns.length,i)})]}),children:/* @__PURE__ */ (0,Z.jsx)(oD,{runs:a.recentRuns})})]}),children:[/* @__PURE__ */ (0,Z.jsx)(bE,{name:a.scenario.name}),/* @__PURE__ */ (0,Z.jsx)(kp,{children:$E(a,i,n)}),/* @__PURE__ */ (0,Z.jsx)(zE,{strip:a.outcomeStrip,preWatermarkStrip:a.preWatermarkStrip,passes:a.passes,fails:a.fails}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-report-stack`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-sublabel`,children:n.stability.causesTitle}),a.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(HE,{causes:a.causes,countLabel:n.stability.failures})]}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.healed,value:/* @__PURE__ */ (0,Z.jsx)(tD,{part:a.healedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.healedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.aiExecuted,value:/* @__PURE__ */ (0,Z.jsx)(tD,{part:a.aiExecutedSteps,total:a.passedSteps,base:n.stability.ofPassedSteps(a.aiExecutedSteps,a.passedSteps)})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.erFailed,value:n.stability.erFailedValue(a.erFailedRuns,a.windowRuns)})]})]})}function cD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),a=fE(t.entity.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Cr,{size:16}),label:`${n.title.failure_breakdown_card}: ${a.text}`,versions:[n.stamp.mapping(t.mappingVersion)],sections:iD(t.causes)?/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.stability.rawCodes(t.mappingVersion)}),children:/* @__PURE__ */ (0,Z.jsx)(UE,{causes:t.causes})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(bE,{name:t.entity.name}),/* @__PURE__ */ (0,Z.jsx)(Ap,{children:/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.stability.totalFailures,value:IC(t.totalFailures,i)})}),t.causes.length===0?/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-denom`,children:n.stability.noCauses}):/* @__PURE__ */ (0,Z.jsx)(HE,{causes:t.causes,countLabel:e=>IC(e,i)})]})}function lD({summary:e,children:t,className:n}){let r=(0,B.useId)(),[i,a]=(0,B.useState)(`by-tier`),o=(t,n)=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:P(`qa-chat-card__disclosure-summary`,`qa-card-kit__tier-summary`,n),"aria-expanded":t,"aria-controls":r,onClick:()=>a(t?`closed`:`open`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__disclosure-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(Be,{size:14})}),e]});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`qa-chat-card__disclosure`,`qa-card-kit__tier-disclosure`,n),"data-state":i,children:[i===`by-tier`?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[o(!1,`qa-card-kit__only-compact`),o(!0,`qa-card-kit__hide-compact`)]}):o(i===`open`,null),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:r,className:`qa-chat-card__disclosure-body qa-card-kit__tier-region`,hidden:i===`closed`,children:t})]})}var uD={critical:{tone:`error`},high:{tone:`warning`,className:`qa-report-pill--priority`},medium:{tone:`warning`}},dD={tone:`neutral`,className:`qa-card-kit__pill-plain`};function fD(e){return Object.prototype.hasOwnProperty.call(uD,e)?uD[e]:dD}function pD({slide:e,card:t}){let n=$().cards.report,i=$().cards.common,a=Q(),{row:o}=t,s=fE(o.feature.name,i.missingName),c=fD(o.priority),l=[...o.pagesTruncated?[/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:n.weakSpots.pagesTruncated(o.pages.length,o.totalPages)},`truncated`)]:[],/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:n.weakSpots.membership},`membership`)];return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(cn,{size:16}),label:`${n.title.weak_spot_feature_card}: ${s.text}`,versions:null,pill:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:c.tone,...c.className===void 0?{}:{className:c.className},children:pE(o.priority,n)}),notes:l,sections:o.pages.length===0?void 0:/* @__PURE__ */ (0,Z.jsx)(lD,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n.weakSpots.pagesTitle}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:n.weakSpots.pagesCount(o.pages.length,o.totalPages)})]}),children:/* @__PURE__ */ (0,Z.jsx)(Mp,{"aria-label":n.weakSpots.pagesTitle,children:o.pages.map(e=>{let t=fE(e.page.name,i.missingName);return/* @__PURE__ */ (0,Z.jsx)(Np,{icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:14}),tileTone:e.covered?`success`:`muted`,name:t.missing?/* @__PURE__ */ (0,Z.jsx)(`i`,{children:t.text}):t.text,note:`${e.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered} \u00B7 ${n.weakSpots.pageBugs(e.openBugs)}`},e.page.id)})})}),children:[/* @__PURE__ */ (0,Z.jsx)(bE,{name:o.feature.name}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.coverage,value:n.weakSpots.coverageValue(o.coveredPages,o.totalPages)}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(wE,{passed:o.stepsPassed,executed:o.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.openBugs,value:IC(o.openBugs,a)}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(GE,{counts:o.findingCounts})})]})]})}function mD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{row:a}=t,o=fE(a.page.name,r.missingName);return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(An,{size:16}),label:`${n.title.weak_spot_page_card}: ${o.text}`,versions:null,pill:t.unassigned?/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`neutral`,className:`qa-card-kit__pill-plain`,children:n.weakSpots.unassigned}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(bE,{name:a.page.name}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.coverage,value:a.covered?n.weakSpots.pageCovered:n.weakSpots.pageNotCovered}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.stepSuccess,value:/* @__PURE__ */ (0,Z.jsx)(wE,{passed:a.stepsPassed,executed:a.stepsExecuted})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.openBugs,value:IC(a.openBugs,i)}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(CE,{date:a.lastPassedDate})}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.weakSpots.findings,value:/* @__PURE__ */ (0,Z.jsx)(GE,{counts:a.findingCounts})})]})]})}function hD({slide:e,card:t}){let n=$().cards.report,r=$().cards.common,i=Q(),{counters:a,page:o}=t,s=o===null?null:fE(o.name,r.missingName),c=a.openBySeverity.length===0?IC(a.openCount,i):/* @__PURE__ */ (0,Z.jsx)(Bp,{value:IC(a.openCount,i),base:/* @__PURE__ */ (0,Z.jsx)(JE,{buckets:a.openBySeverity})});return/* @__PURE__ */ (0,Z.jsxs)(jE,{slide:e,icon:/* @__PURE__ */ (0,Z.jsx)(Nr,{size:16}),label:`${n.title.hotspot_card}: ${s===null?n.hotspot.unmapped:s.text}`,versions:null,children:[o===null?/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(Op,{missing:!0,children:n.hotspot.unmapped}),/* @__PURE__ */ (0,Z.jsx)(kp,{children:n.hotspot.unmappedHint})]}):/* @__PURE__ */ (0,Z.jsx)(bE,{name:o.name}),/* @__PURE__ */ (0,Z.jsxs)(Ap,{children:[/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.hotspot.open,value:c}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.hotspot.opened,value:IC(a.openedInWindow,i)}),/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.hotspot.closed,value:/* @__PURE__ */ (0,Z.jsx)(zp,{tip:n.hotspot.closedHint,children:IC(a.closedInWindow,i)})}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(jp,{label:n.lastPassed.label,value:/* @__PURE__ */ (0,Z.jsx)(CE,{date:t.lastPassedDate})})]})]})}function gD({slide:e}){let{card:t}=e;switch(t.cardKind){case`metric_card`:return/* @__PURE__ */ (0,Z.jsx)(ZE,{slide:e,card:t});case`trend_card`:return/* @__PURE__ */ (0,Z.jsx)(QE,{slide:e,card:t});case`finding_card`:return/* @__PURE__ */ (0,Z.jsx)(NE,{slide:e,card:t});case`stability_row_card`:return/* @__PURE__ */ (0,Z.jsx)(rD,{slide:e,card:t});case`scenario_stability_card`:return/* @__PURE__ */ (0,Z.jsx)(sD,{slide:e,card:t});case`failure_breakdown_card`:return/* @__PURE__ */ (0,Z.jsx)(cD,{slide:e,card:t});case`weak_spot_feature_card`:return/* @__PURE__ */ (0,Z.jsx)(pD,{slide:e,card:t});case`weak_spot_page_card`:return/* @__PURE__ */ (0,Z.jsx)(mD,{slide:e,card:t});case`hotspot_card`:return/* @__PURE__ */ (0,Z.jsx)(hD,{slide:e,card:t})}}function _D(e){return/* @__PURE__ */ (0,Z.jsx)(gD,{slide:e})}function vD(e,t){return{kind:`report`,mode:`carousel`,keyOf:e=>`${e.envelope.toolCallId}:${String(e.indexInEnvelope)}`,renderItem:_D,renderSingle:_D,labels:kT(e.collection,e.report.collection,t)}}function yD({entries:e}){let t=$().cards,{slides:n,rejected:i,cardlessNotes:a}=kE(e);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&OT(vD(t,n.length),{items:n,page:null,onLoadMore:null}),a.map(({toolCallId:e,note:n})=>/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-report-cardless-note`,children:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:AE(n,t.report)})},`note:${e}`)),i.map((e,n)=>/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.report.unsupported.title,body:t.report.unsupported.body,family:`report`,resultKind:dm(e.raw)},e.toolCallId??`rejected:${String(n)}`))]})}var bD={id:`report`,schema:tE,Card:yD},xD=z({resultKind:vt([`run_in_tab_outcome`,`run_batch_browser`]),launchId:xt()});function SD({toolCallId:e,batch:t}){let{browser:n}=$f(),r=$().cards.runInTab,i=n===null?void 0:n.runFailures[e];if(i===void 0)return null;let a=t?r.failedBatch:r.failed;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-run-in-tab`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:a(r.reason[i])})]})}function CD({entries:e}){let t=$().cards.runInTab;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`run-in-tab-outcome`,resultKind:dm(e.outcome.raw)},r):e.call===null?null:/* @__PURE__ */ (0,Z.jsx)(SD,{toolCallId:e.call.toolCallId,batch:e.outcome.result.resultKind===`run_batch_browser`},r)})})}var wD={id:`run-in-tab-outcome`,schema:xD,Card:CD},TD=e=>e.outcome===`not_launchable`,ED=e=>e.outcome===`queued`;function DD(e,t){return e===0?`error`:e<t?`warning`:`success`}function OD({result:e}){let t=$().cards.runStartAgent,n=Q(),{dispatchRefusalSentence:r}=$f(),{launched:i,total:a}=be(e),o=DD(i,a),s=e.items.filter(TD),c=e.items.filter(ED);return/* @__PURE__ */ (0,Z.jsx)(Tp,{className:P(Lp,`qa-run-agent-card`),tone:o===`success`?`neutral`:o,tileTone:o,icon:/* @__PURE__ */ (0,Z.jsx)(Jr,{size:16}),title:t.title,caption:e.agentName,"aria-label":t.cardAria(e.agentName),meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:o,children:oC(e,t)}),...c.length>0?{sections:/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.launchedSummary}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:IC(c.length,n)})]}),defaultOpen:s.length===0,children:/* @__PURE__ */ (0,Z.jsx)(Mp,{"aria-label":t.launchedList,children:c.map(e=>/* @__PURE__ */ (0,Z.jsx)(Np,{icon:/* @__PURE__ */ (0,Z.jsx)(We,{size:16}),tileTone:`success`,name:e.scenarioName},e.position))})})}:{},children:s.length>0&&/* @__PURE__ */ (0,Z.jsx)(Gp,{label:t.refusedHead,children:/* @__PURE__ */ (0,Z.jsx)(Mp,{"aria-label":t.refusedList,children:s.map(e=>{let t=r($e(e));return/* @__PURE__ */ (0,Z.jsx)(Np,{icon:/* @__PURE__ */ (0,Z.jsx)(Dr,{size:16}),tileTone:`error`,name:e.scenarioName,...t===``?{}:{note:t,noteWraps:!0}},e.position)})})})})}function kD({entries:e}){let t=$().cards.runStartAgent;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;if(e.outcome.status===`rejected`)return/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`run-start-agent`,resultKind:dm(e.outcome.raw)},r);let i=e.outcome.result;return i.kind===`dispatched`?/* @__PURE__ */ (0,Z.jsx)(OD,{result:i.result},r):null})})}var AD={id:`run-start-agent`,schema:Te,Card:kD};function jD({step:e,copied:t,onCopy:n,className:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(I,{variant:t?`success-soft`:`secondary`,size:`sm`,className:r,icon:t?/* @__PURE__ */ (0,Z.jsx)(Ke,{size:14}):/* @__PURE__ */ (0,Z.jsx)(Je,{size:14}),"aria-label":t?i.copiedAria[e]:i.copyAria[e],onClick:n,children:t?i.copied:i.copy})}function MD({step:e,command:t,copied:n,onCopy:r}){let i=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__top`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:i.step[e]}),/* @__PURE__ */ (0,Z.jsx)(jD,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--narrow`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-enroll-step__line`,children:[/* @__PURE__ */ (0,Z.jsx)(`code`,{className:`qa-enroll-step__code`,children:t}),/* @__PURE__ */ (0,Z.jsx)(jD,{step:e,copied:n,onCopy:r,className:`qa-enroll-copy--wide`})]})]})}function ND({result:e}){let t=$().cards.runnerEnrollment,n=$().cards.runnerReadiness.job,i=Q(),{instructions:a}=e,[o,s]=(0,B.useState)(/* @__PURE__ */ new Set),[c,l]=(0,B.useState)(null),u={install:a.installCommand,enroll:a.enrollCommand,start:a.startCommand},d=e=>{navigator.clipboard.writeText(u[e]).then(()=>{s(t=>new Set(t).add(e)),l(e)})},f=t.title(n[e.readinessFor]),p=t.expiresAt(WC(e.expiresAt,i)),m=e=>/* @__PURE__ */ (0,Z.jsx)(MD,{step:e,command:u[e],copied:o.has(e),onCopy:()=>d(e)});return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:`${Lp} qa-enroll-card`,icon:/* @__PURE__ */ (0,Z.jsx)(li,{size:16}),title:f,"aria-label":f,caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:p}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.expiresAt,children:p}),note:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:t.askAgain}),children:[/* @__PURE__ */ (0,Z.jsxs)(`ol`,{className:`qa-enroll-steps`,children:[m(`install`),m(`enroll`),/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-enroll-step`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-enroll-step__top`,children:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-enroll-step__label`,children:t.step.approve})}),/* @__PURE__ */ (0,Z.jsxs)(`p`,{className:`qa-enroll-step__text`,children:[t.approveBefore,` `,/* @__PURE__ */ (0,Z.jsx)(`code`,{children:a.approvalUrlPattern}),` `,t.approveAfter,` `,t.cadence(a.requestTtlSec)]})]}),m(`start`)]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__sr-only`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:c===null?``:t.copiedAria[c]})]})}function PD({entries:e}){let t=$().cards.runnerEnrollment;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(ND,{result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`runner-enrollment`,resultKind:dm(e.outcome.raw)},r)})})}var FD={id:`runner-enrollment`,schema:hv,Card:PD},ID=[`playback`,`atlas_crawl`,`make_auto`,`scenario_launch`];function LD(e){return ID.includes(e)}function RD(e){let[t]=e.split(`@`);return t!==void 0&&LD(t)?t:null}var zD=8,BD={ready:`success`,queue_full:`info`,pending_enroll:`warning`,capability_missing:`warning`,offline:`neutral`,not_owner:`error`};function VD(e,t,n,r){let i=[];return e.platform!==null&&i.push(n.platform[e.platform]),e.hostname!==null&&i.push(e.hostname),i.push(e.facts.lastSeenAt===null?n.lastSeenNever:n.lastSeen(nw(e.facts.lastSeenAt,t,r))),i.join(` \u00B7 `)}function HD({runner:e,capability:t,evaluatedAtMs:n}){let r=$().cards.runnerReadiness,i=$().cards.common,a=Q(),o=e.name.trim().length===0;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-runner-machine`,children:[/* @__PURE__ */ (0,Z.jsx)(On,{className:`qa-runner-machine__icon`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-runner-machine__who`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:o?`qa-runner-machine__name qa-runner-machine__name--missing`:`qa-runner-machine__name`,children:o?i.missingName:e.name}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-runner-machine__note`,children:VD(e,n,r,a)})]}),/* @__PURE__ */ (0,Z.jsx)(zp,{tip:e.agentId,className:`qa-runner-machine__id`,children:e.agentId.slice(0,zD)}),/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:BD[e.state],children:r.state[e.state](RD(t))})]})}function UD({report:e}){let t=$().cards.runnerReadiness,n=Q(),i=Date.parse(e.evaluatedAt),a=t.evaluatedAt(WC(e.evaluatedAt,n)),o=t.title(t.job[e.readinessFor]),s=e.runners.length,c=t.fleet[e.fleetState](e.total),l=e.fleetState===`not_enrolled`||e.fleetState===`none_ready`;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:`${Lp} qa-runner-card`,icon:/* @__PURE__ */ (0,Z.jsx)(On,{size:16}),title:o,"aria-label":o,fold:{title:o,facts:/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:P(`qa-chat-card__fold-fact--sentence`,l&&`qa-chat-card__fold-fact--warning`),children:[l&&/* @__PURE__ */ (0,Z.jsx)(x,{className:`qa-chat-card__fold-fact-icon`,"aria-hidden":`true`}),c]})},caption:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__t-compact`,children:a}),meta:/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-card-kit__t-wide`,dateTime:e.evaluatedAt,children:a}),...s<e.total?{note:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:t.truncated(s,e.total)})}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-fleet`,children:c}),s===0?e.fleetState===`not_enrolled`?null:/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`qa-runner-empty`,children:t.noRunners}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-runner-machines`,...s>1?{role:`group`,"aria-label":t.machinesAria(s)}:{},children:e.runners.map(t=>/* @__PURE__ */ (0,Z.jsx)(HD,{runner:t,capability:e.capability,evaluatedAtMs:i},t.agentId))})]})}function WD(e){return/* @__PURE__ */ (0,Z.jsx)(UD,{report:e.report})}function GD(e,t){return{kind:`runner`,mode:`carousel`,keyOf:e=>e.key,renderItem:WD,renderSingle:WD,labels:kT(e.collection,e.runnerReadiness.collection,t)}}function KD({entries:e}){let t=$().cards,n=[],r=[];return e.forEach((e,t)=>{let i=e.call===null?`entry:${String(t)}`:e.call.toolCallId;e.outcome.status===`accepted`?n.push({key:i,report:e.outcome.result}):r.push({key:i,raw:e.outcome.raw})}),/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&OT(GD(t,n.length),{items:n,page:null,onLoadMore:null}),r.map(e=>/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.runnerReadiness.unsupported.title,body:t.runnerReadiness.unsupported.body,family:`runner-readiness`,resultKind:dm(e.raw)},e.key))]})}var qD={id:`runner-readiness`,schema:mv,Card:KD};function JD(e){return e.deleted?`archived`:e.outdated?`outdated`:e.mappingStatus===`unassigned`?`draft`:`ready`}var YD={draft:`neutral`,ready:`success`,outdated:`warning`,archived:`neutral`},XD=z({id:L().min(1),orderIndex:R().int(),stepNumber:R().int(),actionType:L(),label:L(),inputValue:L().nullable(),targetUrl:L().nullable(),expectedResults:yt(L())}),ZD=z({resultKind:zt(`scenario_card`),scenarioId:L().min(1),projectId:L().min(1),number:R().int(),name:L(),description:L().nullable(),mappingStatus:vt([`unassigned`,`page_mapped`,`partially_mapped`,`fully_mapped`]),deleted:dt(),outdated:dt(),tags:yt(L()),totalSteps:R().int().nonnegative(),steps:yt(XD),totalRuns:R().int().nonnegative(),open:tp}),QD=z({items:yt(XD)}),$D=z({id:L().min(1),status:vt([`queued`,`launching`,`in_progress`,`completed`,`failed`,`cancelled`]),executionMode:c.nullable().optional(),startedAt:L(),completedAt:L().nullable().optional(),currentStepNumber:R().int()}).transform(e=>({id:e.id,status:e.status,executionMode:e.executionMode??null,startedAt:e.startedAt,completedAt:e.completedAt??null,currentStepNumber:e.currentStepNumber})),eO=yt($D);function tO(e){switch(e){case`unassigned`:return`none`;case`fully_mapped`:return`full`;case`page_mapped`:case`partially_mapped`:return`partial`}}var nO={queued:null,launching:`qa-scenario-run__status--live`,in_progress:`qa-scenario-run__status--live`,completed:`qa-scenario-run__status--ok`,failed:`qa-scenario-run__status--fail`,cancelled:null};function rO({run:e,totalSteps:t}){let n=$().cards.scenario,r=Q(),i=Date.parse(e.startedAt),a=Number.isNaN(i)?n.runMomentUnavailable:XC(e.startedAt,r),o=null;if(e.status===`in_progress`)o=n.runProgress(e.currentStepNumber,t);else if(e.status!==`queued`&&e.status!==`launching`){let t=e.completedAt===null?NaN:Date.parse(e.completedAt);o=Number.isNaN(i)||Number.isNaN(t)?n.runDurationUnavailable:rw(t-i,r)}return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-run`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:P(`qa-scenario-run__status`,nO[e.status]),children:n.runStatus[e.status]}),e.executionMode!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__mode`,children:n.runMode[e.executionMode]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__when`,children:a}),o!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-run__right`,children:o})]})}function iO({scenarioId:e,totalRuns:t,totalSteps:n,runAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=$f(),[s,c]=(0,B.useState)({status:`loading`,rows:[]}),[l,u]=(0,B.useState)(t>0?{offset:0,attempt:0}:null);(0,B.useEffect)(()=>{if(l===null)return;let t=!0;return o.request({method:`GET`,path:qn.scenarioRuns.path(e,{limit:10,offset:l.offset}),schema:eO}).then(e=>{t&&c(t=>({status:`ready`,rows:[...t.rows,...e]}))},e=>{t&&c(e=>({status:`failed`,rows:e.rows})),queueMicrotask(()=>{throw e})}),()=>{t=!1}},[o,e,l]);let d=e=>{c(e=>({status:`loading`,rows:e.rows})),u(t=>({offset:e,attempt:t===null?0:t.attempt+1}))};if(t===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)(Zr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.runsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:n>0?i.runsEmptyHint:i.runsEmptyHintNoSteps}),n>0&&r]});let{rows:f}=s;if(f.length===0)return s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ti,{size:13}),onClick:()=>d(0),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-runs-skeleton`,role:`status`,"aria-label":i.runsLoading,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-shimmer`})]});let p=t-f.length;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-scenario-runs`,children:f.map(e=>/* @__PURE__ */ (0,Z.jsx)(rO,{run:e,totalSteps:n},e.id))}),p>0&&(s.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsLoadFailed}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ti,{size:13}),onClick:()=>d(f.length),children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.runsShown(f.length,t)}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`sm`,loading:s.status===`loading`,onClick:()=>d(f.length),children:i.runsLoadMore(Math.min(10,p))})]}))]})}var aO={click:Xt,input:di,select:di,checkbox:si,keyboard:pn,keypress:pn,submit:We,focus:cn,blur:Cn,navigate:Vr,canvas_click:Wt,canvas_dblclick:Wt,canvas_drag:Wt,canvas_zoom:Wt,canvas_pan:Wt},oO=Zr;function sO({actionType:e,size:t=14,className:n=``}){let r=aO[e]||oO;return/* @__PURE__ */ (0,Z.jsx)(r,{size:t,className:n})}function cO({step:e}){let t=$().cards.scenario,[n,r]=(0,B.useState)(!1),i=e.inputValue??e.targetUrl,[a]=e.expectedResults,o=i!==null||a!==void 0,s=e.label.trim().length===0,c=s?t.step.missingLabel:e.label,l=()=>r(e=>!e);return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-scenario-step`,...o?{role:`button`,tabIndex:0,"aria-expanded":n,"aria-label":t.step.aria(e.stepNumber,c),onClick:l,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())}}:{},children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__no`,children:String(e.stepNumber).padStart(2,`0`)}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-step__icon`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(sO,{actionType:e.actionType,size:14})}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__text`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:s?`qa-scenario-step__label qa-scenario-step__label--missing`:`qa-scenario-step__label`,children:c}),o&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__sub`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),a!==void 0&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-scenario-step__expected`,children:[/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`}),a]}),e.expectedResults.length>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{children:t.step.moreExpected(e.expectedResults.length-1)})]})]}),o?/* @__PURE__ */ (0,Z.jsx)(Be,{className:`qa-scenario-step__chevron`,"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{}),o&&n&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-step__detail`,children:[i!==null&&/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i}),e.expectedResults.length>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.step.expectedHeading}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{children:e.expectedResults.map((e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`}),e]},t))})]})]})]})}function lO({scenarioId:e,firstPage:t,totalSteps:n,emptyAction:r}){let{scenario:i,common:a}=$().cards,{http:o}=$f(),[s,c]=(0,B.useState)([]),[l,u]=(0,B.useState)({status:`idle`});if(n===0)return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-empty`,children:[/* @__PURE__ */ (0,Z.jsx)(Qt,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:i.stepsEmptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i.stepsEmptyHint}),r]});let d=[...t,...s],f=n-d.length,p=()=>{u({status:`loading`}),o.request({method:`GET`,path:qn.scenarioSteps.path(e,{limit:20,offset:d.length}),schema:QD}).then(e=>{c(t=>[...t,...e.items]),u({status:`idle`})},e=>{u({status:`failed`}),queueMicrotask(()=>{throw e})})};return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`ol`,{className:`qa-scenario-steps`,children:d.map(e=>/* @__PURE__ */ (0,Z.jsx)(cO,{step:e},e.id))}),f>0&&(l.status===`failed`?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more qa-scenario-more--error`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsLoadFailed(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ti,{size:13}),onClick:p,children:a.retry})]}):/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-more`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.stepsShown(d.length,n)}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ye,{size:13}),loading:l.status===`loading`,onClick:p,children:i.stepsLoadMore(f)})]}))]})}var uO=[`steps`,`runs`];function dO({path:e,name:t,emphasis:n}){let r=$().cards.scenario;return/* @__PURE__ */ (0,Z.jsx)(Vp,{path:e,emphasis:n,accessibleName:r.openAria(t),label:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:r.open}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:r.openShort})]})})}function fO({result:e,path:t,runAction:n}){let r=$().cards.scenario,i=Q(),a=(0,B.useId)(),[o,s]=(0,B.useState)(`steps`),[c,l]=(0,B.useState)(!1),u=(0,B.useRef)({}),d=(e,t)=>{var n;s(e),e===`runs`&&l(!0),t&&((n=u.current[e])==null||n.focus())},f=e=>{let t=uO.indexOf(o),n=e.key===`ArrowRight`?uO[(t+1)%uO.length]:e.key===`ArrowLeft`?uO[(t-1+uO.length)%uO.length]:e.key===`Home`?uO[0]:e.key===`End`?uO[uO.length-1]:void 0;n!==void 0&&(e.preventDefault(),d(n,!0))},p=e=>e===`steps`?r.tabSteps:r.tabRuns,m=t=>t===`steps`?e.totalSteps:e.totalRuns;return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-tabs`,role:`tablist`,"aria-label":r.tabsAria,onKeyDown:f,children:uO.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`button`,{ref:t=>{u.current[e]=t},type:`button`,role:`tab`,id:`${a}-tab-${e}`,"aria-controls":`${a}-panel-${e}`,"aria-selected":o===e,tabIndex:o===e?0:-1,className:`qa-scenario-tab`,onClick:()=>d(e,!1),children:[p(e),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-tab__count`,children:IC(m(e),i)})]},e))}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-steps`,"aria-labelledby":`${a}-tab-steps`,hidden:o!==`steps`,children:/* @__PURE__ */ (0,Z.jsx)(lO,{scenarioId:e.scenarioId,firstPage:e.steps,totalSteps:e.totalSteps,emptyAction:t===null?null:/* @__PURE__ */ (0,Z.jsx)(dO,{path:t,name:e.name,emphasis:`secondary`})})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-scenario-panel`,role:`tabpanel`,id:`${a}-panel-runs`,"aria-labelledby":`${a}-tab-runs`,hidden:o!==`runs`,children:c&&/* @__PURE__ */ (0,Z.jsx)(iO,{scenarioId:e.scenarioId,totalRuns:e.totalRuns,totalSteps:e.totalSteps,runAction:n})})]})}function pO({result:e,presentation:t}){let{scenario:n,common:i}=$().cards,a=Q(),{project:o,navigation:s,browser:c,conversation:l}=$f(),u=(0,B.useId)(),d=(0,B.useId)(),[f,p]=(0,B.useState)(!1),m=n.caption(e.number),h=e.name.trim().length===0,g=h?i.missingName:e.name,_=e.description===null?``:e.description.trim(),v=JD(e),y=tO(e.mappingStatus),b=y===`none`&&e.totalSteps===0?n.mapping.hintNoSteps:n.mapping.hint[y],x=o===null?null:ap(o.number,e.open),S=e.totalSteps===0,C=c===null?x===null?null:()=>s.openPath(x):()=>l.send(n.runCommand(m)),w=C===null?null:/* @__PURE__ */ (0,Z.jsx)(fe,{disabled:S,reason:n.runNoSteps,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:14}),"aria-describedby":S?d:void 0,onClick:S?void 0:C,children:n.run})}),T=/* @__PURE__ */ (0,Z.jsx)(fO,{result:e,path:x,runAction:w}),E=t===`full`?T:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-scenario-expand`,"aria-expanded":f,"aria-controls":u,onClick:()=>p(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(Be,{size:14,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__hide-compact`,children:f?n.collapse:n.expand}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__only-compact`,children:f?n.collapse:n.expandShort})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{id:u,hidden:!f,children:f&&T})]});return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-scenario-card`),tileTone:`scenario`,icon:/* @__PURE__ */ (0,Z.jsx)(jr,{size:16}),title:n.title,caption:m,meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:YD[v],children:n.lifecycle[v]}),"aria-label":n.cardAria(m,g),fold:{title:h?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:g}):g,facts:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--mono`,children:m}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${IC(e.totalSteps,a)} ${n.steps(e.totalSteps)}`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:`${IC(e.totalRuns,a)} ${n.runs(e.totalRuns)}`})]}),...x===null&&C===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[x!==null&&/* @__PURE__ */ (0,Z.jsx)(Hp,{label:`${n.openAria(g)}${s.opensInNewTab?i.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(Up,{size:15}),onClick:()=>s.openPath(x)}),C!==null&&/* @__PURE__ */ (0,Z.jsx)(Hp,{label:n.runAria(g),icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:15}),onClick:C,...S?{disabledReason:n.runNoSteps}:{}})]})}},sections:E,...S&&C!==null?{note:/* @__PURE__ */ (0,Z.jsx)(`span`,{id:d,children:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:n.runNoSteps})})}:{},footer:/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[x===null?/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`neutral`,dot:!1,children:i.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(dO,{path:x,name:g,emphasis:`primary`}),w]}),children:[/* @__PURE__ */ (0,Z.jsx)(Op,{missing:h,children:g}),_.length>0&&/* @__PURE__ */ (0,Z.jsx)(kp,{clamp:!0,children:_}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-scenario-facts`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:IC(e.totalSteps,a)}),n.steps(e.totalSteps)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:IC(e.totalRuns,a)}),n.runs(e.totalRuns)]})]}),/* @__PURE__ */ (0,Z.jsxs)(zp,{tip:n.mapping.tip(b),className:P(`qa-scenario-mapping`,`qa-scenario-mapping--${y}`),children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-scenario-mapping__glyph`,"aria-hidden":`true`}),n.mapping.label[y]]}),e.tags.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-chat-card__tags`,children:e.tags.map(e=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__tag`,children:e},e))})]})}function mO(e){return/* @__PURE__ */ (0,Z.jsx)(pO,{result:e,presentation:`compact`})}function hO(e){return/* @__PURE__ */ (0,Z.jsx)(pO,{result:e,presentation:`full`})}function gO(e,t){return{kind:`scenario`,mode:`carousel`,keyOf:e=>e.scenarioId,renderItem:mO,renderSingle:hO,labels:kT(e.collection,e.scenario.collection,t)}}function _O(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.set(n.scenarioId,n);return[...t.values()]}function vO({entries:e}){let t=$().cards,n=_O(e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]));return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&OT(gO(t,n.length),{items:n,page:null,onLoadMore:null}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.scenario.unsupported.title,body:t.scenario.unsupported.body,family:`scenario`,resultKind:dm(e.outcome.raw)},e.call===null?`rejected:${String(n)}`:e.call.toolCallId):null)]})}var yO={id:`scenario`,schema:ZD,Card:vO};function bO(e){let{project:t}=$f(),n=tp.safeParse(e.openTarget);return!n.success||t===null?null:ap(t.number,n.data)}function xO({item:e,presentation:t,footerExtra:n,note:r}){let i=$().cards,{navigation:a}=$f(),o=bO(e),s=e.label.trim().length===0,c=s?i.common.missingName:e.label,[l,...u]=e.evidence,d=e.secondaryLabel===void 0||e.secondaryLabel===null||e.secondaryLabel.length===0?void 0:e.secondaryLabel,f=/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-search-card__evidence`,children:u.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`li`,{children:e},`${String(t)}:${e}`))});return/* @__PURE__ */ (0,Z.jsxs)(Tp,{className:P(Lp,`qa-search-card`,t===`compact`&&`qa-search-card--compact`),icon:/* @__PURE__ */ (0,Z.jsx)(_e,{size:16}),tileTone:`info`,title:i.search.title,"aria-label":`${i.search.title}: ${c}`,fold:{title:s?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-missing`,children:c}):c,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:[d,l].filter(e=>e!==void 0).join(` \u00B7 `)}),...o===null?{}:{quickActions:/* @__PURE__ */ (0,Z.jsx)(Hp,{label:`${i.search.openAria(c)}${a.opensInNewTab?i.common.newTabSuffix:``}`,icon:/* @__PURE__ */ (0,Z.jsx)(Up,{size:15}),onClick:()=>a.openPath(o)})}},...d===void 0?{}:{caption:d},meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:`neutral`,dot:!1,children:pp(e.entityType,i.common)}),...o===null?{role:`note`}:{},...r===void 0?{}:{note:r},sections:u.length===0?void 0:t===`compact`?/* @__PURE__ */ (0,Z.jsx)(Pp,{summary:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:i.search.evidence}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-card-kit__count`,children:e.evidence.length})]}),children:f}):/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-search-card__evidence-block`,children:f}),footer:/* @__PURE__ */ (0,Z.jsxs)(Fp,{children:[o===null?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-search-card__no-open`,children:i.common.noOpenTarget}):/* @__PURE__ */ (0,Z.jsx)(Vp,{path:o,label:i.common.open,accessibleName:i.search.openAria(c)}),n]}),children:[/* @__PURE__ */ (0,Z.jsx)(Op,{missing:s,children:c}),l!==void 0&&/* @__PURE__ */ (0,Z.jsx)(kp,{clamp:!0,children:l})]})}var SO=z({value:Et().nonnegative(),relation:vt([`eq`,`atLeast`])}),CO=z({total:SO.nullable(),nextCursor:L().min(1).nullable()}),wO=z({entityType:L().min(1),entityId:L().min(1),label:L(),secondaryLabel:L().nullable().optional(),evidence:yt(L()),openTarget:Mt({target:L()})}),TO=z({resultKind:zt(`unified_search`),items:yt(wO),page:CO,limit:R().int().positive().optional(),normalizedQuery:L().optional()}).refine(e=>e.page.nextCursor===null||e.limit!==void 0,{message:"a unified_search page with a cursor must carry the `limit` it was minted at",path:[`limit`]}),EO=z({items:yt(wO),page:CO}),DO=z({query:L().min(1),entityTypes:yt(L()).nullable().optional()});function OO(e){let t=DO.safeParse(e);if(!t.success)return null;let n=t.data.entityTypes??[];return{query:t.data.query,entityTypes:n}}function kO(e){return`${e.entityType}:${e.entityId}`}function AO(e){return/* @__PURE__ */ (0,Z.jsx)(xO,{item:e,presentation:`compact`})}function jO(e){return/* @__PURE__ */ (0,Z.jsx)(xO,{item:e,presentation:`full`})}function MO(e,t){return e.total===null?t:e.total.value}function NO(e,t){return{kind:`search`,mode:`carousel`,keyOf:kO,renderItem:AO,renderSingle:jO,labels:kT(e.collection,e.search.collection,t)}}function PO(e,t){let{http:n,project:r}=$f();return(0,B.useMemo)(()=>{if(t.page.nextCursor===null)return null;let{limit:i}=t;return async t=>{if(i===void 0)throw Error("search load-more: the result carries no `limit`");if(r===null)throw Error(`search load-more: the chat is bound to no project`);let a=e===null?null:OO(e.args);if(a===null)throw Error(`search load-more: the conversation does not carry the query the cursor is bound to`);let o=await n.request({method:`GET`,path:qn.searchPage.path(r.id,a,{limit:i,cursor:t}),schema:EO});return{items:o.items,page:o.page}}},[e,t,n,r])}function FO(e,t,n){return t.total===null?e.shownUnknown(n):t.total.relation===`eq`?e.shownOfTotal(n,t.total.value):e.shownOfAtLeast(n,t.total.value)}function IO({item:e,page:t,loadMore:n,onLoaded:i}){var a;let o=$().cards.search,[s,c]=(0,B.useState)({status:`idle`}),l=()=>{c({status:`loading`}),n(t.nextCursor).then(e=>{c({status:`idle`}),i(e.items,e.page)},e=>{c({status:`failed`}),queueMicrotask(()=>{throw e})})},u=t.total===null?null:t.total.value-1,d=s.status===`loading`?o.loading:s.status===`failed`?o.retry:u===null||((a=t.total)==null?void 0:a.relation)!==`eq`?o.loadMoreUnknown:o.loadMore(u);return/* @__PURE__ */ (0,Z.jsx)(xO,{item:e,presentation:`full`,note:/* @__PURE__ */ (0,Z.jsx)(`span`,{role:`status`,"aria-live":`polite`,children:/* @__PURE__ */ (0,Z.jsx)(Rp,{icon:/* @__PURE__ */ (0,Z.jsx)(r,{}),children:s.status===`failed`?o.loadFailed:FO(o,t,1)})}),footerExtra:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ye,{size:14}),disabled:s.status===`loading`,onClick:l,children:d})})}function LO({normalizedQuery:e}){let t=$().cards.search,n=e===void 0?t.emptyBody:t.emptyForQuery(e);return/* @__PURE__ */ (0,Z.jsx)(Tp,{className:`${Lp} qa-search-card qa-search-card--empty`,icon:/* @__PURE__ */ (0,Z.jsx)(_e,{size:16}),tileTone:`info`,title:t.emptyTitle,"aria-label":t.emptyTitle,fold:{title:t.emptyTitle,facts:/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-chat-card__fold-fact--sentence`,children:n})},children:/* @__PURE__ */ (0,Z.jsx)(kp,{children:n})})}function RO({call:e,result:t}){let n=$().cards,r=Q(),i=PO(e,t),[a,o]=(0,B.useState)(null),s=new Set(t.items.map(kO)),c=a===null?t.items:[...t.items,...a.items.filter(e=>!s.has(kO(e)))],l=a===null?t.page:a.page,[u]=c;if(u===void 0)return/* @__PURE__ */ (0,Z.jsx)(LO,{normalizedQuery:t.normalizedQuery});if(c.length===1&&l.nextCursor!==null&&i!==null){let{nextCursor:e}=l;return/* @__PURE__ */ (0,Z.jsx)(IO,{item:u,page:{...l,nextCursor:e},loadMore:i,onLoaded:(e,t)=>o({items:e,page:t})})}let d=MO(l,c.length),f=l.nextCursor!==null;return OT(NO(n,d),{items:c,page:l,onLoadMore:i,...f?{header:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:n.search.title}),l.total!==null&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-collection__head-badge`,children:`${IC(l.total.value,r)}${l.total.relation===`atLeast`?`+`:``}`})]})}:{}})}function zO({entries:e}){let t=$().cards.search;return/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:e.map((e,n)=>{let r=e.call===null?`entry:${String(n)}`:e.call.toolCallId;return e.outcome.status===`accepted`?/* @__PURE__ */ (0,Z.jsx)(RO,{call:e.call,result:e.outcome.result},r):/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`search`,resultKind:dm(e.outcome.raw)},r)})})}var BO={id:`search`,schema:TO,Card:zO},VO=[`scenarios`,`shared-steps`,`api-collections`,`api-catalog`,`checklists`,`bugs`,`test-runs`,`imports`,`map`];function HO(e){return VO.includes(e)}var UO=z({resultKind:zt(`section_link`),section:L().min(1),label:L().min(1),open:Mt({target:L()})}),WO={tone:`muted`,icon:/* @__PURE__ */ (0,Z.jsx)(Nn,{size:16})};function GO(e){let t=/* @__PURE__ */ new Map;for(let n of e)t.has(n.section)||t.set(n.section,n);return[...t.values()]}function KO(e){let t=$().cards,n=t.sectionLink,{project:r}=$f();return GO(e).map(e=>{let i=HO(e.section),a=HO(e.section)?n.sections[e.section]:n.unrecognized,o={key:e.section,tile:WO,name:a,nameMissing:!i,note:i?t.common.entityType.section:n.serverLabel(e.label)},s=tp.safeParse(e.open),c=s.success&&r!==null?ap(r.number,s.data):null;return c===null?{...o,open:{pill:n.noRoute,hint:n.noRouteHint,ariaLabel:n.noRouteAria(a)}}:{...o,open:{path:c,action:n.action,destination:null}}})}function qO({results:e}){let t=$().cards.sectionLink,n=KO(e);return/* @__PURE__ */ (0,Z.jsx)(Yp,{title:t.title,groupAria:t.groupAria,icon:/* @__PURE__ */ (0,Z.jsx)(se,{size:16}),rows:n})}function JO({entries:e}){let t=$().cards.sectionLink,n=e.flatMap(e=>e.outcome.status===`accepted`?[e.outcome.result]:[]);return/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length>0&&/* @__PURE__ */ (0,Z.jsx)(qO,{results:n}),e.map((e,n)=>e.outcome.status===`rejected`?/* @__PURE__ */ (0,Z.jsx)(Wp,{title:t.unsupported.title,body:t.unsupported.body,family:`section-link`,resultKind:dm(e.outcome.raw)},e.call===null?`entry:${String(n)}`:e.call.toolCallId):null)]})}var YO={id:`section-link`,schema:UO,Card:JO};function XO(e){return t=>typeof t==`object`&&!!t&&`resultKind`in t&&t.resultKind===e}function ZO(e){return XO(`unified_search`)(e)&&typeof e==`object`&&!!e&&`display`in e&&e.display===`collection`}function QO(e,t){return{id:e.id,declares:t,group(t,n){let[r,...i]=t.map(t=>{let n=e.schema.safeParse(t.raw);return{call:t.call,outcome:n.success?{status:`accepted`,result:n.data}:{status:`rejected`,raw:t.raw}}});return r===void 0?null:(0,B.createElement)(e.Card,{key:n,entries:[r,...i]})}}}var $O={"change-set":{grouping:`turn-group`}},ek={report:QO(bD,XO(`report_cards`)),"runner-readiness":QO(qD,XO(`runner_readiness`)),"runner-enrollment":QO(FD,XO(`runner_enrollment_instructions`)),references:QO(am,()=>!0),"section-link":QO(YO,XO(`section_link`)),search:QO(BO,ZO),scenario:QO(yO,XO(`scenario_card`)),"change-set":QO(Yw,XO(`change_set_proposal`)),"job-status":QO(UT,()=>!0),coverage:QO(nT,XO(`coverage`)),"run-start-agent":QO(AD,XO(`run_start_agent`)),"run-in-tab-outcome":QO(wD,e=>XO(`run_in_tab_outcome`)(e)||XO(`run_batch_browser`)(e))};function tk({message:e,conversationId:t,confirmedCalls:n,copy:r,refusalSentence:i,pendingHostCallIds:a,stoppingHostCallIds:o,waitingForBrowser:s,stoppingBrowser:c}){let l=n.get(e.id);if(l===void 0)return{kind:`generic`};if(l.toolName===null)return{kind:`awaiting`};if(l.result===null&&o.has(l.toolCallId))return{kind:`outcome`,text:c};if(l.result===null&&a.has(l.toolCallId))return{kind:`outcome`,text:s};if(l.result===null)return{kind:`awaiting`};if(l.result!==null&&um(l.result.value))return{kind:`unknown`};if(l.result!==null&&ek[`run-start-agent`].declares(l.result.value))return{kind:`outcome`,text:lC(l.result,r,i)};if(l.result!==null&&lm(l.result.value))return{kind:`failed`};if(t!==null){let e=aC(l.result.value,t);if(e!==null)return{kind:`launched_elsewhere`,conversationId:e}}return{kind:`generic`}}function nk(e,t){let[n,r]=(0,B.useState)(()=>/* @__PURE__ */ new Set),i=e.filter(e=>Xy(e)&&!n.has(e.toolCallId));return i.length>0&&r(e=>/* @__PURE__ */ new Set([...e,...i.map(e=>e.toolCallId)])),(0,B.useMemo)(()=>{let e=/* @__PURE__ */ new Set;for(let[r,i]of t)n.has(i.toolCallId)&&e.add(r);return e},[t,n])}function rk({label:e,icon:t,title:n,tags:r,note:i,testId:a}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context`,role:`note`,"aria-label":e,"data-testid":a,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-context-tile`,"aria-hidden":`true`,children:t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-context-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{children:n}),r.length>0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-context-scope`,children:r.map((e,t)=>/* @__PURE__ */ (0,Z.jsx)(`span`,{className:e.missing?`qa-ai-chat-context-missing`:void 0,children:e.text},t))}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i})]})]})}function ik(e){let{runtime:t,source:n,conversationId:r}=e,{reportContexts:i,session:a}=t,o=(0,B.useCallback)(e=>i.subscribe(e),[i]),s=(0,B.useSyncExternalStore)(o,()=>r===null?null:i.get(r)),c=Vb(n===null?null:n.reportHandoff),l=(0,B.useRef)(null);return(0,B.useEffect)(()=>{c!==null&&l.current!==c&&(l.current=c,a.openConversation(c.conversationId))},[c,a]),{report:s===null?null:{context:s,entityName:c!==null&&c.conversationId===r?c.entityName:null}}}function ak({tone:e,lead:t,role:n,title:r,text:i,slim:a=!1,extra:o,actions:s,dismiss:c,testId:l}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice qa-ai-chat-notice--${e}${a?` qa-ai-chat-notice--slim`:``}`,role:n===`none`?void 0:n,"aria-live":n===`status`?`polite`:void 0,"data-testid":l,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-lead`,"aria-hidden":`true`,children:t===`spinner`?/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-notice-spinner`}):t}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-notice-text`,children:[r!==null&&/* @__PURE__ */ (0,Z.jsx)(`b`,{children:r}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:i}),o]}),c!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-notice-close`,"aria-label":c.label,onClick:c.onDismiss,children:/* @__PURE__ */ (0,Z.jsx)(Ue,{})}),s!==void 0&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-actions`,children:s})]})}var ok=[`today`,`yesterday`,`previous7Days`,`previous30Days`,`older`];function sk(e,t){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()),r=e=>{let t=new Date(n);return t.setDate(t.getDate()-e),t};return e>=n?`today`:e>=r(1)?`yesterday`:e>=r(7)?`previous7Days`:e>=r(30)?`previous30Days`:`older`}function ck(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=sk(r.updatedAt,t),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return ok.flatMap(e=>{let t=n.get(e);return t===void 0?[]:[{group:e,items:t}]})}var lk=z({id:L().min(1),title:L().nullable(),updatedAt:L().min(1),reportContext:At().nullable()}),uk=z({items:yt(lk),nextCursor:L().nullable(),hasMore:dt()}),dk=z({success:zt(!0)});function fk(e){return{id:e.id,title:e.title,updatedAt:new Date(e.updatedAt),fromReport:e.reportContext!==null}}function pk(e){let{http:t,logger:n,projectId:r}=e,[i,a]=(0,B.useState)({status:`loading`}),[o,s]=(0,B.useState)(``),[c,l]=(0,B.useState)(``),u=(0,B.useRef)(0),d=(0,B.useRef)(i);(0,B.useEffect)(()=>{d.current=i}),(0,B.useEffect)(()=>{let e=setTimeout(()=>l(o.trim()),300);return()=>clearTimeout(e)},[o]);let f=(0,B.useCallback)(e=>{let n=++u.current;return t.request({method:qn.conversationList.method,path:qn.conversationList.path({projectId:r,limit:20,cursor:e,search:c===``?null:c}),schema:uk}).then(e=>({seq:n,page:e,error:null}),e=>({seq:n,page:null,error:e}))},[c,t,r]),p=(0,B.useCallback)(()=>{a({status:`loading`}),f(null).then(({seq:e,page:t,error:i})=>{if(e===u.current){if(t===null){n.error(`conversation-list: first page failed`,{projectId:r,error:i}),a({status:`failed`});return}a({status:`ready`,rows:t.items.map(fk),nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1})}})},[n,r,f]);return(0,B.useEffect)(p,[p]),{state:i,search:o,appliedSearch:c,setSearch:s,retry:p,loadMore:(0,B.useCallback)(()=>{let e=d.current;e.status!==`ready`||e.loadingMore||e.nextCursor===null||(a({...e,loadingMore:!0,moreFailed:!1}),f(e.nextCursor).then(({seq:e,page:t,error:i})=>{e===u.current&&a(e=>{if(e.status!==`ready`)return e;if(t===null)return n.error(`conversation-list: next page failed`,{projectId:r,error:i}),{...e,loadingMore:!1,moreFailed:!0};let a=new Set(e.rows.map(e=>e.id));return{status:`ready`,rows:[...e.rows,...t.items.map(fk).filter(e=>!a.has(e.id))],nextCursor:t.hasMore?t.nextCursor:null,loadingMore:!1,moreFailed:!1}})}))},[n,r,f]),remove:(0,B.useCallback)(async e=>{try{await t.request({method:qn.conversationDelete.method,path:qn.conversationDelete.path(e),schema:dk})}catch(t){return n.error(`conversation-list: delete failed`,{conversationId:e,error:t}),!1}return a(t=>t.status===`ready`?{...t,rows:t.rows.filter(t=>t.id!==e)}:t),!0},[t,n])}}var mk=6;function hk(e,t){let n=e.findIndex(e=>e.id===t);if(n<0)return null;let r=e[n+1]??e[n-1];return r===void 0?null:r.id}function gk({http:e,logger:t,projectId:n,currentConversationId:r,locale:i,copy:a,dismissLabel:o,onClose:s,onOpen:c,onNewConversation:l}){let u=pk({http:e,logger:t,projectId:n}),[d,f]=(0,B.useState)(!1),p=(0,B.useRef)(null),m=(0,B.useRef)(null),h=(0,B.useRef)(null),{state:g,loadMore:_}=u;(0,B.useEffect)(()=>{var e;(e=h.current)==null||e.focus()},[]),(0,B.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),s())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[s]);let v=g.status===`ready`&&g.nextCursor!==null&&!g.moreFailed;(0,B.useEffect)(()=>{let e=p.current,t=m.current;if(!v||e===null||t===null)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&_()},{root:t,rootMargin:`100px`});return n.observe(e),()=>n.disconnect()},[v,_]);let y=(0,B.useMemo)(()=>new Intl.DateTimeFormat(i,{dateStyle:`medium`}),[i]),b=(e,t)=>{let n=hk(t,e.id);f(!1),u.remove(e.id).then(t=>{if(!t){f(!0);return}e.id===r&&(n===null?l():c(n))})},x=g.status===`ready`&&g.rows.length===0&&u.appliedSearch===``;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{className:`qa-ai-chat-drawer`,role:`dialog`,"aria-label":a.title,children:[/* @__PURE__ */ (0,Z.jsxs)(`header`,{className:`qa-ai-chat-drawer-head`,children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:a.close,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib`,onClick:s,ref:h,children:/* @__PURE__ */ (0,Z.jsx)(gr,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`strong`,{children:a.title}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ye,{size:14}),onClick:l,children:a.newChat})]}),(!x||d)&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-drawer-tools`,children:[!x&&/* @__PURE__ */ (0,Z.jsxs)(`label`,{className:`qa-ai-chat-drawer-search`,children:[/* @__PURE__ */ (0,Z.jsx)(_e,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`input`,{type:`search`,value:u.search,placeholder:a.search,"aria-label":a.searchLabel,onChange:e=>u.setSearch(e.target.value)})]}),d&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,slim:!0,title:null,text:a.deleteFailed,dismiss:{label:o,onDismiss:()=>f(!1)},testId:`ai-chat-history-delete-failed`})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs`,ref:m,"aria-busy":g.status===`loading`||void 0,children:[g.status===`loading`&&Array.from({length:mk},(e,t)=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv-skeleton`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{}),/* @__PURE__ */ (0,Z.jsx)(`span`,{})]},t)),g.status===`failed`&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`alert`,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.errorTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.errorText}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:u.retry,children:a.retry})]}),x&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,children:[/* @__PURE__ */ (0,Z.jsx)(rn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.emptyTitle}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.emptyText})]}),g.status===`ready`&&g.rows.length===0&&u.appliedSearch!==``&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-convs-state`,role:`status`,children:[/* @__PURE__ */ (0,Z.jsx)(_e,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`h3`,{children:a.noResults(u.appliedSearch)}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:a.noResultsText})]}),g.status===`ready`&&ck(g.rows,/* @__PURE__ */ new Date).map(({group:e,items:t})=>/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`group`,"aria-label":a.groups[e],children:[/* @__PURE__ */ (0,Z.jsx)(`h4`,{children:a.groups[e]}),t.map(e=>{let t=e.id===r,n=e.title!==null&&e.title.trim()!==``?e.title:a.untitled(y.format(e.updatedAt));return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-conv${t?` qa-ai-chat-conv--current`:``}`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-conv-main`,"aria-current":t?`true`:void 0,onClick:()=>c(e.id),children:[/* @__PURE__ */ (0,Z.jsx)(rn,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-title`,children:n}),e.fromReport&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-conv-ctx`,children:a.reportTag})]}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:a.delete(n),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm qa-ai-chat-conv-del`,onClick:()=>b(e,g.rows),children:/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`})})})]},e.id)})]},e)),g.status===`ready`&&g.loadingMore&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,role:`status`,children:a.loadingMore}),g.status===`ready`&&g.moreFailed&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-convs-more`,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:_,children:a.retry})}),v&&/* @__PURE__ */ (0,Z.jsx)(`div`,{ref:p,className:`qa-ai-chat-convs-sentinel`,"aria-hidden":`true`})]})]})}var _k=/* @__PURE__ */ new Set;function vk(e){let{transport:t,stopOutcomes:n,conversationId:r,messages:i,confirmedCalls:a,historyLoading:o}=e,[s,c]=(0,B.useState)({conversationId:null,ids:_k}),[l,u]=(0,B.useState)({conversationId:null,ids:_k}),d=(0,B.useRef)({conversationId:null,ids:_k}),[f,p]=(0,B.useState)({conversationId:null,ids:_k}),m=(0,B.useRef)(!1),h=(0,B.useCallback)(()=>{let e=d.current;if(e.conversationId!==r||e.ids.size===0)return;p(t=>({conversationId:r,ids:/* @__PURE__ */ new Set([...t.conversationId===r?t.ids:[],...e.ids])})),c(t=>{if(t.conversationId!==r)return t;let n=new Set(t.ids);for(let t of e.ids)n.delete(t);return{conversationId:r,ids:n}});let t={conversationId:r,ids:_k};d.current=t,u(t)},[r]),g=(0,B.useCallback)(()=>{if(d.current.conversationId!==r)return;let e={conversationId:r,ids:_k};d.current=e,u(e)},[r]);(0,B.useEffect)(()=>n.subscribe(e=>{e.conversationId===r&&(e.accepted?h():g())}),[r,h,g,n]),(0,B.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if((t.type===`host-action`||t.type===`tool-result`)&&(c(e=>{let n=new Set(e.conversationId===r?e.ids:[]);return t.type===`host-action`?n.add(t.toolCallId):n.delete(t.toolCallId),{conversationId:r,ids:n}}),t.type===`tool-result`)){let e=d.current;if(e.conversationId===r&&e.ids.has(t.toolCallId)){let n=new Set(e.ids);n.delete(t.toolCallId);let i={conversationId:r,ids:n};d.current=i,u(i)}}}),[r,t]),(0,B.useEffect)(()=>{if(m.current&&!o){let e={conversationId:r,ids:_k};d.current=e,u(e),c({conversationId:r,ids:_k}),p({conversationId:r,ids:_k})}m.current=o},[r,o]);let _=l.conversationId===r?l.ids:_k,v=f.conversationId===r?f.ids:_k,y=(0,B.useMemo)(()=>{let e=new Set(s.conversationId===r?s.ids:[]);for(let t of i){let n=t.pendingToolCall;(n==null?void 0:n.hostActionContinuationStatus)===`pending`&&e.add(n.toolCallId)}for(let t of _)e.delete(t);for(let t of v)e.delete(t);for(let t of a.values())t.result!==null&&e.delete(t.toolCallId);return[...e].join(`
|
|
372
|
-
`)},[a,r,s,i,_,v]),b=(0,B.useMemo)(()=>new Set(y===``?[]:y.split(`
|
|
373
|
-
`)),[y]);return{pendingIds:b,stoppingIds:_,markStopping:(0,B.useCallback)(()=>{let e={conversationId:r,ids:b};d.current=e,u(e)},[r,b])}}function yk(e,t){switch(e){case`connecting`:case`connected`:return null;case`reconnecting`:case`lost`:return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`warning`,lead:`spinner`,role:`none`,slim:!0,title:t.reconnecting,text:null,testId:`ai-chat-connection-${e}`});case`restored`:return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`success`,lead:/* @__PURE__ */ (0,Z.jsx)(We,{}),role:`none`,slim:!0,title:null,text:t.restored,testId:`ai-chat-connection-restored`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Mn,{}),role:`alert`,title:t.failedTitle,text:t.failedText,testId:`ai-chat-connection-failed`})}}function bk({connectionStatus:e,labels:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-live-region`,role:`status`,"aria-live":`polite`,children:yk(e,t)})}function xk(e,t,n){return e.every(e=>e.release===`on-reconnect`)?n.textReconnect:e.some(e=>e.release===`manual`&&e.inTranscript)?n.textFailed:t?n.textReady:n.textWaiting}function Sk({turns:e,canSend:t,onSend:n,onDiscard:r,cause:i,filesOf:a,copy:o}){let s=e.map(e=>({turn:e,files:a(e)})),c=null;for(let e of s)e.files.refusal!==null&&(c=e.files.refusal);return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(un,{}),role:`status`,title:o.title(e.length),text:i??(c===null?xk(e,t,o):c.sentence),extra:/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-unsent`,"aria-label":o.listLabel,children:s.map(({turn:e,files:i})=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-body`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-unsent-text`,children:e.text}),i.label!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-unsent-files`,children:[/* @__PURE__ */ (0,Z.jsx)(Xr,{"aria-hidden":`true`}),i.label]})]}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:o.send(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,disabled:!t||i.refusal!==null&&!i.refusal.resendable,onClick:()=>n(e.id),children:/* @__PURE__ */ (0,Z.jsx)(un,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:o.discard(e.text),children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>r(e.id),children:/* @__PURE__ */ (0,Z.jsx)(Ue,{"aria-hidden":`true`})})})]},e.id))}),testId:`ai-chat-unsent`})}function Ck({url:e}){return e===null?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-tabline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-fav`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-tabline-url`,children:e})]})}function wk({connection:e,readiness:t,capabilities:n,onReloadCapabilities:r,unsent:i,interruptedTurnId:a,reportInitializing:o,onRetryLastTurn:s,historyFailed:c,onRetryHistory:l,stopFailure:u,permissionWriteFailure:d,permissionReadFailure:f,pageScan:p,context:m,copy:h}){let g=h.notices,[_,v]=(0,B.useState)(null),[y,b]=(0,B.useState)(null),[x,S]=(0,B.useState)(null),C=e=>({label:g.dismiss,onDismiss:e}),w=e=>h.composer.permission[e];p!==null&&p.status!==`idle`&&x!==null&&S(null);let T=p!==null&&p.failureReason!==null&&p.failureReason!==x?p.failureReason:null;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-lane`,"data-testid":`ai-chat-lane`,children:[/* @__PURE__ */ (0,Z.jsx)(bk,{...e}),t.kind===`needs-sign-in`&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(xn,{}),role:`status`,title:g.readiness.signInTitle,text:g.readiness.signInText,testId:`ai-chat-readiness-sign-in`}),t.kind===`needs-project`&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(Pr,{}),role:`status`,title:g.readiness.projectTitle,text:g.readiness.projectText,testId:`ai-chat-readiness-project`}),n!==null&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,title:g.capabilities.title,text:`${n.kind===`timed-out`?g.capabilities.timedOut:g.capabilities.loadFailed} ${g.capabilities.sendBlocked}`,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(he,{size:14}),onClick:r,children:g.capabilities.retry}),testId:`ai-chat-capabilities-unavailable`}),i.turns.length>0&&/* @__PURE__ */ (0,Z.jsx)(Sk,{turns:i.turns,canSend:i.canSend,onSend:i.onSend,onDiscard:i.onDiscard,cause:i.cause,filesOf:i.filesOf,copy:g.unsent}),a!==null&&a!==_&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`warning`,lead:/* @__PURE__ */ (0,Z.jsx)(rn,{}),role:`status`,title:g.interrupted.title,text:g.interrupted.text,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:s,children:g.interrupted.retry}),dismiss:C(()=>v(a)),testId:`ai-chat-interrupted`}),o&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`neutral`,lead:/* @__PURE__ */ (0,Z.jsx)(Lr,{}),role:`status`,title:g.reportInitializing.title,text:g.reportInitializing.text,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(he,{size:14}),onClick:s,children:g.reportInitializing.retry}),testId:`ai-chat-report-initializing`}),c&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,title:null,text:g.history.loadFailed,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:l,children:g.history.retry}),testId:`ai-chat-history-failed`}),u!==null&&u!==y&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(ci,{}),role:`alert`,title:null,text:h.transcript.stopFailed[u.reason],dismiss:C(()=>b(u)),testId:`ai-chat-stop-failed`}),f!==null&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,title:g.permissionReadFailed.title,text:g.permissionReadFailed.text,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:f.onRetry,children:g.permissionReadFailed.retry}),testId:`ai-chat-permission-read-failed`}),d!==null&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,title:g.permissionWriteFailed.title(w(d.attempted)),text:d.scope===`conversation`?g.permissionWriteFailed.textConversation(w(d.kept)):g.permissionWriteFailed.textNewConversation(w(d.kept)),actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:d.onRetry,children:g.permissionWriteFailed.retry}),dismiss:C(d.onDismiss),testId:`ai-chat-permission-write-failed`}),p!==null&&p.status!==`idle`&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`info`,lead:`spinner`,role:`status`,title:p.status===`scanning`?g.pageScan.scanning:g.pageScan.delivering,text:null,extra:/* @__PURE__ */ (0,Z.jsx)(Ck,{url:p.tabUrl}),actions:p.status===`delivering`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-notice-bar`,"aria-hidden":`true`}):void 0,testId:`ai-chat-page-${p.status}`}),T!==null&&/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,title:g.pageScan.failedTitle,text:g.pageScan.failed[T],dismiss:C(()=>S(T)),testId:`ai-chat-page-scan-failed`}),m]})}var Tk={report:`message`,"runner-readiness":`step`,"runner-enrollment":`step`,"section-link":`message`,search:`step`,scenario:`step`,coverage:`step`,"run-start-agent":`step`,"run-in-tab-outcome":`step`};function Ek(e){let t=Object.keys($O).find(t=>ek[t].declares(e));if(t!==void 0)return{family:t,grouping:$O[t].grouping};let n=Object.keys(Tk).find(t=>ek[t].declares(e));return n===void 0?null:{family:n,grouping:Tk[n]}}var Dk={isRenderableToolResult(e){if(Ek(e)!==null)return!0;let t=om(e);return t!==void 0&&t.length>0}},Ok=class{constructor(){this.levels=/* @__PURE__ */ new Map,this.selectionRead=null,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.levels.get(e);return t===void 0?null:t}startLoad(e){let t={level:null},n=this.selectionRead;return n!==null&&n.load===null&&n.state.conversationId===e&&(n.load=t),{record(e){t.level=e}}}followAdoptions(e,t){let n=e.getSnapshot().historyLoad;return e.subscribe(()=>{let r=e.getSnapshot(),i=n,a=r.historyLoad;if(a===i)return;n=a;let o=this.selectionRead;this.selectionRead=a.status===`loading`?{state:a,load:null}:null,i.status===`loading`&&a.status===`idle`&&r.conversationId===i.conversationId&&this.adopt(i.conversationId,o!==null&&o.state===i?o.load:null,t)})}adopt(e,t,n){if(t===null){n.error(`chat launch level: the session adopted a history load this store never saw start`,{conversationId:e});return}if(t.level===null){n.error(`chat launch level: the session adopted a history load that recorded no level`,{conversationId:e});return}if(!this.levels.has(e)){this.levels.set(e,t.level);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},kk=[`overview`,`stability`,`weak-spots`,`bug-hotspots`],Ak=`stability`,jk=z({version:zt(1),view:vt(kk),window:vt(Dt).nullable(),filters:z({status:vt(kt).optional()}).optional(),selectedEntity:z({type:vt(wt),id:xt()}).optional()}).refine(e=>e.view===Ak==(e.window===null),{message:`window must be null for view 'stability' (run-count basis) and non-null for every other view`,path:[`window`]}).refine(e=>{var t;return((t=e.filters)==null?void 0:t.status)===void 0||e.view===Ak},{message:`filters.status is accepted only for view 'stability' \u2014 no other report endpoint or tool takes a status filter`,path:[`filters`,`status`]}),Mk=z({toolCallId:L().min(1),toolName:L().min(1),title:z({ru:L().min(1),en:L().min(1)}).optional(),operationTitles:yt(z({ru:L().min(1),en:L().min(1)})).optional(),args:At(),display:Zn.nullable(),status:At().optional(),hostActionContinuationStatus:vt([`pending`,`running`,`completed`,`stopped`,`cancelled`]).optional()}),Nk=yt(z({ru:L().trim().min(1),en:L().trim().min(1)})),Pk=z({id:L().min(1),kind:L().min(1),revision:R().int(),state:vt([`active`,`terminal`,`superseded`]),payload:z({}).passthrough()}),Fk=z({id:L().min(1),role:L(),content:L().nullable(),toolCalls:At(),toolResults:At(),blocks:yt(Pk).optional(),pendingToolCall:Mk.nullable().optional(),agentOrigin:At().optional(),createdAt:L().optional(),attachments:yt(Yn)}),Ik=vt(_o),Lk=z({messages:yt(Fk),decisionLaneCompletedIds:yt(L()),reportContext:At().optional(),permissionMode:vt(Nt).nullable(),permissionModeVersion:R().int().positive().nullable(),launchLevel:ht}).extend({windowFirstMessageId:L().min(1).nullable(),olderCursor:L().min(1).nullable(),filesBefore:yt(Yn)}),Rk=class{constructor(){this.contexts=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set}get(e){let t=this.contexts.get(e);return t===void 0?null:t}record(e,t){if(this.contexts.get(e)!==t){this.contexts.set(e,t);for(let e of this.listeners)e()}}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function zk(e){return typeof e==`object`&&!!e}function Bk(e,t){if(!Array.isArray(e))return;let n=e.flatMap(e=>{if(!zk(e))return t.error(`chat history: persisted toolCalls entry is not an object \u2014 dropped`,{entryType:e===null?`null`:typeof e}),[];let{toolCallId:n,toolName:r,args:i,contentOffset:a,title:o,effect:s,operationTitles:c}=e;if(typeof n!=`string`||n===``||typeof r!=`string`)return t.error(`chat history: persisted toolCalls entry without toolCallId/toolName \u2014 dropped`,{keys:Object.keys(e)}),[];let l=Nk.safeParse(c);return[{toolCallId:n,toolName:r,args:i,...zk(o)&&typeof o.ru==`string`&&typeof o.en==`string`&&o.ru.trim().length>0&&o.en.trim().length>0&&{title:{ru:o.ru,en:o.en}},...(s===`read`||s===`reversible`||s===`irreversible`)&&{effect:s},...l.success&&{operationTitles:l.data},...typeof a==`number`&&Number.isInteger(a)&&a>=0&&{contentOffset:a}}]});return n.length>0?n:void 0}function Vk(e,t){if(!Array.isArray(e))return zk(e)?[{toolCallId:`${t}:result`,result:e}]:void 0;let n=e.flatMap(e=>zk(e)&&typeof e.toolCallId==`string`&&e.toolCallId!==``?[{toolCallId:e.toolCallId,result:e.result}]:[]);return n.length>0?n:void 0}function Hk(e,t){let n=e.toolResults===void 0?[]:e.toolResults;n.some(e=>e.toolCallId===t.toolCallId)||(e.toolResults=[...n,t])}function Uk(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role===`assistant`)return n}}function Wk(e,t){let n=[],r=/* @__PURE__ */ new Map;for(let i of e){if(i.role===`assistant`||i.role===`user`||i.role===`agent`){let e=Bk(i.toolCalls,t),a={id:i.id,content:i.content===null?``:i.content,toolCalls:e,toolResults:Vk(i.toolResults,i.id),...i.blocks!==void 0&&{blocks:i.blocks},...i.pendingToolCall!==void 0&&{pendingToolCall:i.pendingToolCall},...i.attachments.length>0&&{attachments:i.attachments}},o;if(i.role===`agent`){let e=Ik.safeParse(i.agentOrigin);if(!e.success){t.error(`History agent row without a known agentOrigin \u2014 left out`,{messageId:i.id,agentOrigin:i.agentOrigin});continue}if(e.data===`workflow_lead`){if(i.createdAt===void 0){t.error(`History lead prose row without createdAt \u2014 left out`,{messageId:i.id});continue}o={...a,role:`agent`,agentOrigin:`workflow_lead`,createdAt:i.createdAt}}else o={...a,role:`agent`,agentOrigin:e.data}}else o={...a,role:i.role};if(n.push(o),i.role===`assistant`&&e!==void 0)for(let t of e)r.set(t.toolCallId,n.length-1);continue}if(i.role!==`tool`)continue;let e=Vk(i.toolResults,i.id);if(e!==void 0)for(let t of e){let e=r.get(t.toolCallId),i=e===void 0?Uk(n):n[e];i!==void 0&&i.role===`assistant`&&Hk(i,t)}}return n}function Gk(e,t,n){if(t===null)return{messages:Wk(e,n),windowFirstMessageId:null};let r=e.findIndex(e=>e.id===t);if(r<0)throw Error(`Conversation history page names windowFirstMessageId ${t}, which is not among its messages`);let i=Wk(e.slice(0,r),n),a=Wk(e.slice(r),n),[o]=a;if(o===void 0)throw Error(`Conversation history window starting at ${t} has no row this build can draw`);return{messages:[...i,...a],windowFirstMessageId:o.id}}function Kk(e){switch(e){case void 0:case`pending`:return!0;case`confirmed`:case`rejected`:case`failed`:case`closed`:return!1}}function qk(e,t){let n=[],r=[];for(let i of e){if(i.role!==`assistant`||i.pendingToolCall==null)continue;let e=GS(i.content,i.pendingToolCall);if(e.kind===`pending-tool-call`){if(!Kk(e.status)){r.push(e.toolCallId);continue}if(e.display===null){t.debug(`chat history: unanswered confirmation without persisted facts \u2014 not re-offered`,{messageId:i.id,toolName:e.toolName});continue}n.push({toolCallId:e.toolCallId,toolName:e.toolName,...i.pendingToolCall.title!==void 0&&{title:i.pendingToolCall.title},...i.pendingToolCall.operationTitles!==void 0&&{operationTitles:i.pendingToolCall.operationTitles.map(e=>({...e}))},args:e.args,description:``,display:e.display,status:`open`,anchorMessageId:null})}}return{pendingConfirmations:n,answeredToolCallIds:r}}var Jk=z({id:L().min(1),permissionMode:vt(Nt),permissionModeVersion:R().int().positive()}),Yk=`assistant.conversations.permission_mode_stale`;function Xk(e){let{http:t,logger:n,reportContexts:r,launchLevels:i}=e;return{async create(e,n){let r;try{r=await t.request({method:qn.conversationCreate.method,path:qn.conversationCreate.path(),body:{projectId:e,mode:`copilot`,permissionMode:n},schema:Jk})}catch(e){throw e instanceof Jn&&e.status===409&&e.errorCode===Yk?new wl(e.message):e}return{id:r.id,permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async loadLatest(e,a){let o=i.startLoad(e),s;try{s=await t.request({method:qn.conversationMessages.method,path:qn.conversationMessages.path(e,{mode:`latest`,limit:30,decisionLaneId:a.decisionLaneId,outstandingCallIds:a.outstandingCallIds}),schema:Lk})}catch(e){if(e instanceof Jn&&e.status===404)return{kind:`not-found`};throw e}if(s.reportContext===void 0||s.reportContext===null)r.record(e,null);else{let t=jk.safeParse(s.reportContext);t.success?r.record(e,t.data):(n.warn(`chat history: reportContext failed validation \u2014 no report banner`,{conversationId:e,issues:t.error.issues.map(e=>e.message)}),r.record(e,null))}o.record(s.launchLevel);let{messages:c,windowFirstMessageId:l}=Gk(s.messages,s.windowFirstMessageId,n);return{kind:`found`,page:{messages:c,windowFirstMessageId:l,olderCursor:s.olderCursor,filesBefore:s.filesBefore,...qk(c,n),decisionLaneCompletedIds:s.decisionLaneCompletedIds,permissionMode:s.permissionMode,permissionModeVersion:s.permissionModeVersion}}},async loadOlder(e,r){let i;try{i=await t.request({method:qn.conversationMessages.method,path:qn.conversationMessages.path(e,{mode:`before`,limit:30,olderCursor:r}),schema:Lk})}catch(e){if(e instanceof Jn&&e.status===404)return{kind:`not-found`};throw e}return{kind:`found`,page:{messages:Wk(i.messages,n),olderCursor:i.olderCursor}}}}}var Zk=z({id:L().min(1)}),Qk={kind:`reading`},$k={kind:`unknown`},eA=class{constructor(e){this.state=Qk,this.started=!1,this.disposed=!1,this.listeners=/* @__PURE__ */ new Set,this.request=()=>{if(this.started||this.disposed)return;this.started=!0;let e=qn.currentUser;this.deps.http.request({method:e.method,path:e.path(),schema:Zk}).then(({id:e})=>({kind:`known`,id:e}),e=>(this.deps.logger.warn(`chat.viewer.read_failed`,{error:e instanceof Error?e.name:typeof e,status:e instanceof Jn?e.status:null}),$k)).then(e=>{if(!this.disposed){this.state=e;for(let e of this.listeners)e()}})},this.read=()=>this.state,this.subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)}),this.deps=e}dispose(){this.disposed=!0,this.listeners.clear()}},tA=5e3,nA=3e4,rA=1.5,iA=tA,aA=Vo({baseIntervalMs:tA,maxIntervalMs:nA,backoffFactor:rA,isTerminal:e=>nr(e)===`terminal`,activityStamp:e=>e.lastActivityAt}),oA=class extends Error{constructor(){super(`Agent job status read did not answer within ${String(iA)} ms`),this.name=`ReadTimeoutError`}};function sA(e){return e instanceof oA?{code:`read_timeout`,message:e.message}:e instanceof Jn?{code:e.errorCode===null?`http_${String(e.status)}`:e.errorCode,message:e.message}:{code:`network_error`,message:e instanceof Error?e.message:String(e)}}var cA=class{constructor(e){this.deps=e,this.state=Po(),this.holders=/* @__PURE__ */ new Map,this.readTokens=/* @__PURE__ */ new Map,this.listeners=/* @__PURE__ */ new Set,this.timer=null,this.cycleInFlight=!1,this.disposed=!1,this.dispatchVisibility(),this.unsubscribeVisibility=e.visibility.subscribe(()=>this.dispatchVisibility())}watch(e){let t=e.agentJobId,n=this.holders.get(t);this.holders.set(t,n===void 0?1:n+1),this.apply({type:`WATCH`,agentJobId:t,seed:e,now:Date.now()});let r=!1;return()=>{if(r)return;r=!0;let e=this.holders.get(t);if(e!==void 0){if(e>1){this.holders.set(t,e-1);return}this.holders.delete(t),this.readTokens.delete(t),this.apply({type:`UNWATCH`,agentJobId:t})}}}latest(e){let t=this.state.watched[e];return t===void 0?null:t.view}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}refresh(e){this.state.watched[e]!==void 0&&this.read(e)}dispose(){this.disposed=!0,this.unsubscribeVisibility(),this.timer!==null&&clearTimeout(this.timer.handle),this.timer=null,this.listeners.clear()}dispatchVisibility(){let e=!this.deps.visibility.get();e!==this.state.hidden&&this.apply({type:`VISIBILITY`,hidden:e,now:Date.now()})}apply(e){if(this.disposed)return;let t=aA(this.state,e);if(t!==this.state){this.state=t,this.reconcileTimer();for(let e of this.listeners)e()}}reconcileTimer(){let e=Bo(this.state),t=this.timer;if(e===null){t!==null&&clearTimeout(t.handle),this.timer=null;return}(t===null||t.dueAt!==e)&&(t!==null&&clearTimeout(t.handle),this.timer={dueAt:e,handle:setTimeout(()=>this.onTimer(),Math.max(0,e-Date.now()))})}onTimer(){if(this.timer=null,this.disposed||this.cycleInFlight)return;let e=Date.now(),t=zo(this.state,e);if(t.length===0){this.reconcileTimer();return}this.cycleInFlight=!0,this.apply({type:`TICK`,now:e}),Promise.all(t.map(e=>this.read(e))).finally(()=>{this.cycleInFlight=!1,this.reconcileTimer()})}async read(e){let t=this.readTokens.get(e),n=t===void 0?1:t+1;this.readTokens.set(e,n);let r=null,i=new Promise((e,t)=>{r=setTimeout(()=>t(new oA),iA)});try{let t=await Promise.race([this.deps.http.request({method:qn.agentJobStatus.method,path:qn.agentJobStatus.path(e),schema:T}),i]);if(this.readTokens.get(e)!==n)return;this.apply({type:`READ_OK`,agentJobId:e,view:t,now:Date.now()})}catch(t){if(this.readTokens.get(e)!==n)return;this.deps.logger.error(`Agent job status read for the chat card failed`,{agentJobId:e,error:t instanceof Error?t.message:String(t)}),this.apply({type:`READ_FAIL`,agentJobId:e,error:sA(t),now:Date.now()})}finally{r!==null&&clearTimeout(r)}}},lA=z({swarm:z({maxAgents:gt})});async function uA(e){return{maxAgents:(await e.request({method:qn.aiSettingsUser.method,path:qn.aiSettingsUser.path(),schema:lA})).swarm.maxAgents}}var dA=[`runner_cards.v1`];function fA(e){return e.browser===null?{runnerType:`web`,clientCapabilities:dA}:{runnerType:`extension`,clientCapabilities:dA,panelId:e.browser.panelId}}var pA=vt(Nt),mA=z({permissionMode:pA,permissionModeVersion:R().int().positive()}),hA=z({permissionMode:pA});function gA(e){let{http:t}=e;return{async setConversationMode(e,n){let r=await t.request({method:qn.conversationPermissionMode.method,path:qn.conversationPermissionMode.path(e),body:{permissionMode:n},schema:mA});return{permissionMode:r.permissionMode,permissionModeVersion:r.permissionModeVersion}},async readLastChoice(){return(await t.request({method:qn.lastPermissionModeRead.method,path:qn.lastPermissionModeRead.path(),schema:hA})).permissionMode},async writeLastChoice(e){return(await t.request({method:qn.lastPermissionModeWrite.method,path:qn.lastPermissionModeWrite.path(),body:{permissionMode:e},schema:hA})).permissionMode}}}function _A(e){let t=null,n=/* @__PURE__ */ new Set,r=e=>{for(let t of n)t(e)};return{transport:{async open(n){t=n.conversationId,await e.open(n)},close(){t=null,e.close()},async send(n){let i=n.name===`chat-stop`?t:null;try{let t=await e.send(n);return i!==null&&r({conversationId:i,accepted:t.status===`accepted`}),t}catch(e){throw i!==null&&r({conversationId:i,accepted:!1}),e}},subscribe(t){return e.subscribe(t)},getStatus(){return e.getStatus()}},stopOutcomes:{subscribe(e){return n.add(e),()=>n.delete(e)}}}}function vA(e){return{read:()=>Promise.resolve(e.conversationId),remember:()=>Promise.resolve(),forget:()=>Promise.resolve()}}function yA(e){let t=new Rk,n=new Ok,{transport:r,stopOutcomes:i}=_A(e.transport),a=Un({http:e.http,logger:e.logger}),o=gu({transport:r,clock:_u(),policy:Sl,tools:Dk,conversations:Xk({http:e.http,logger:e.logger,reportContexts:t,launchLevels:n}),permissionModes:gA({http:e.http}),memory:e.conversationPin===null?e.conversationMemory:vA(e.conversationPin),capabilities:{load:async()=>{let[t,n]=await Promise.all([a.load(),uA(e.http)]);return{...t,swarm:n}},resolveSelection:t=>{let n=e.modelSelection.read();return n===null?null:Wn(t,n)}},browser:e.browser,activeObject:()=>e.conversationContext===null?null:e.conversationContext.activePageObject.get(),open:fA(e),logger:e.logger}),s=n.followAdoptions(o,e.logger),c=new cA({http:e.http,logger:e.logger,visibility:e.visibility}),l=new eA({http:e.http,logger:e.logger});return{session:o,stopOutcomes:i,reportContexts:t,launchLevels:n,jobStatus:c,viewer:l,dispose(){s(),c.dispose(),l.dispose(),o.dispose()}}}function bA(e){let[t,n]=(0,B.useState)(null);return(0,B.useLayoutEffect)(()=>{let t=yA(e);return n(t),()=>{t.dispose(),n(null)}},[e]),t}function xA(e){let{session:t}=e,n=(0,B.useCallback)(e=>t.subscribe(e),[t]);return(0,B.useSyncExternalStore)(n,()=>t.getSnapshot())}function SA(e,t){let{unsent:n,unaccepted:r}=t;(0,B.useEffect)(()=>{if(e!==null&&n)return e.setUnsentWaiting(!0),()=>{e.setUnsentWaiting(!1)}},[e,n]),(0,B.useEffect)(()=>{if(e!==null&&r)return e.setUnacceptedWaiting(!0),()=>{e.setUnacceptedWaiting(!1)}},[e,r])}function CA(e,t){return e===null||t===null?e===t:e.keySource===t.keySource&&e.modelId===t.modelId}function wA(e){let t=(0,B.useRef)(null),n=(0,B.useCallback)(t=>e.subscribe(t),[e]),r=(0,B.useCallback)(()=>{let n=e.read();return CA(t.current,n)||(t.current=n),t.current},[e]);return(0,B.useSyncExternalStore)(n,r)}function TA(e){let{session:t,store:n,capabilityLoad:r}=e,i=wA(n);return(0,B.useEffect)(()=>{r.status===`ready`&&t.setModelSelection(i===null?null:Wn(r.value,i))},[r,t,i]),(0,B.useCallback)((e,r)=>{n.write({keySource:e,modelId:r.id}),t.setModelSelection(r.selectionId)},[t,n])}function EA(e){return e.scope===`conversation`?`conversation:${e.conversationId}`:`last-choice`}function DA(e){let{session:t,view:n,ready:r,newConversation:i,visible:a}=e,[o,s]=(0,B.useState)(null),[c,l]=(0,B.useState)(null),u=n.kind===`known`?{identity:EA(n),value:n.value,writeStatus:n.write.status}:null;if(u===null)c!==null&&l(null);else if(u.identity!==(o==null?void 0:o.identity)||u.value!==o.value||u.writeStatus!==o.writeStatus){s(u);let e=o!==null&&u.identity===o.identity,t=e&&u.value!==o.value,n=u.writeStatus===`writing`||(o==null?void 0:o.writeStatus)===`writing`;t&&!n?l(u.value):(!e||t||u.writeStatus===`writing`)&&l(null)}let d=c!==null&&n.kind===`known`&&n.write.status===`failed`;(0,B.useEffect)(()=>{d&&t.dismissPermissionModeWriteFailure()},[d,t]),(0,B.useEffect)(()=>{a&&i&&t.refreshLastPermissionMode()},[a,i,t]);let f=(0,B.useCallback)(()=>l(null),[]),p=(0,B.useCallback)(e=>t.setPermissionMode(e),[t]),m=n.kind===`known`?n:null,h=m!==null&&m.write.status===`failed`?{attempted:m.write.attempted,kept:m.value,scope:m.scope,onRetry:()=>t.retryPermissionModeWrite(),onDismiss:()=>t.dismissPermissionModeWriteFailure()}:null;return{readFailure:n.kind===`unknown`&&n.read===`failed`?{onRetry:()=>t.refreshLastPermissionMode()}:null,composer:{value:m===null?null:m.value,disabled:!r||m===null||m.write.status===`writing`,arrival:c===null?null:{onShown:f},onChange:p},failure:h,announced:c}}var OA=`chat_request_user_input`;function kA(e){switch(e){case`chat.question.forbidden`:return`unauthorized`;case`chat.question.continuation_unavailable`:return`unavailable`;case`chat.question.not_found`:case`chat.question.revision_conflict`:case`chat.question.stale_answer`:case`chat.question.already_pending`:return`stale`;default:return`retryable`}}function AA(e){switch(e.kind){case`accepted`:return null;case`rejected`:return kA(e.errorCode);case`failed`:return`retryable`}}function jA(e){let{session:t,conversationId:n,messages:r,restoredBatchIds:i,locale:a,logger:o}=e,[s,c]=(0,B.useState)(null),[l,u]=(0,B.useState)(null),d=(0,B.useRef)(/* @__PURE__ */ new Map),f=(0,B.useCallback)((e,t)=>{c(t=>t===e?null:t),u({batchId:e,kind:t})},[]),p=(0,B.useCallback)(async e=>{if(!e.inFlight){if(n===null){o.warn(`chat question action: no conversation bound`,{batchId:e.batchId}),f(e.batchId,`nonretryable`);return}if(globalThis.crypto===void 0||!(`subtle`in globalThis.crypto)){o.warn(`chat question action: crypto.subtle unavailable (insecure context)`,{batchId:e.batchId}),f(e.batchId,`nonretryable`);return}e.inFlight=!0,c(e.batchId),u(null);try{e.idempotencyKey===null&&(e.idempotencyKey=await No(n,e.fingerprint));let r={batchId:e.batchId,revision:e.revision,idempotencyKey:e.idempotencyKey},i=e.kind===`answer`?await t.answerQuestion({...r,answers:e.answers}):await t.cancelQuestion(r);if(d.current.get(e.batchId)!==e)return;let a=AA(i);if(a===null){c(t=>t===e.batchId?null:t);return}f(e.batchId,a)}catch(t){o.warn(`chat question action failed before it was sent`,{batchId:e.batchId,error:t instanceof Error?t.message:String(t)}),f(e.batchId,`retryable`)}finally{e.inFlight=!1}}},[n,o,t,f]);(0,B.useEffect)(()=>{let e=new Set(r.flatMap(e=>e.blocks??[]).flatMap(e=>{let t=cb(e);return t===null?[]:[t]}).filter(e=>e.status!==`pending`).map(e=>e.id));if(e.size!==0){for(let t of e)d.current.delete(t);c(t=>t!==null&&e.has(t)?null:t),u(t=>t!==null&&e.has(t.batchId)?null:t)}},[r]),(0,B.useEffect)(()=>{let e=d.current;return()=>{e.clear(),c(null),u(null)}},[n]);let m=(0,B.useCallback)((e,t,n)=>{let r=jo(e,t,n),i=d.current.get(e),a=i!==void 0&&i.fingerprint===r?i:{kind:`answer`,batchId:e,revision:t,answers:n,fingerprint:r,idempotencyKey:null,inFlight:!1};return d.current.set(e,a),p(a)},[p]),h=(0,B.useCallback)((e,t)=>{let n=Mo(e,t),r=d.current.get(e),i=r!==void 0&&r.fingerprint===n?r:{kind:`cancel`,batchId:e,revision:t,fingerprint:n,idempotencyKey:null,inFlight:!1};return d.current.set(e,i),p(i)},[p]),_=(0,B.useCallback)(e=>{let t=d.current.get(e);if(t!==void 0)return p(t)},[p]),v=(0,B.useCallback)(e=>{u(t=>t!==null&&t.batchId===e?null:t)},[]),y=r.flatMap(e=>e.role===`assistant`&&xa(e).length===0&&e.toolCalls!==void 0&&e.toolCalls.some(e=>e.toolName===OA)?[e.id]:[]).join(`
|
|
374
|
-
`),b=(0,B.useMemo)(()=>y===``?[]:y.split(`
|
|
375
|
-
`),[y]),x=r.flatMap(e=>e.blocks??[]).filter(g).map(e=>`${e.payload.workflowId}\t${e.payload.workers.some(e=>e.unit!==null)?`1`:`0`}`).join(`
|
|
376
|
-
`),S=(0,B.useMemo)(()=>{let e=/* @__PURE__ */ new Map;for(let t of x===``?[]:x.split(`
|
|
377
|
-
`)){let[n,r]=t.split(` `);n!==void 0&&!e.has(n)&&e.set(n,r===`1`)}return t=>{let n=e.get(t);return n===void 0?null:n}},[x]),C=(0,B.useMemo)(()=>{let e=new Intl.DateTimeFormat(a,{dateStyle:`medium`,timeStyle:`short`});return t=>e.format(new Date(t))},[a]);return(0,B.useMemo)(()=>({pendingBatchId:s,error:l,restoredBatchIds:i,loadingAssistantMessageIds:b,onAnswer:m,onCancel:h,onRetry:_,onRefresh:v,formatResolvedAt:C,workflowAgentsWorking:S}),[l,C,S,b,m,h,v,_,s,i])}var MA=[`managed`,`company`,`personal`];function NA(e){return MA.includes(e)}function PA(e){let{transport:t,logger:n,conversationId:r,recordResolvedConfirmation:i}=e,[a,o]=(0,B.useState)(null);return(0,B.useEffect)(()=>t.subscribe(e=>{if(e.kind!==`event`)return;let t=e.event;if(t.type===`usage`){let{provider:e,model:i}=t;if(e===void 0||i===void 0)return;if(!NA(e)){n.warn(`usage echo: provider outside the client contract`,{provider:e,model:i});return}o({conversationId:r,value:{provider:e,model:i}});return}let a=rC(t);a.kind===`pairing`?i(a.pairing):a.kind===`malformed`&&n.warn(`action-resolved frame without a usable pairing`,{issuePaths:a.issuePaths})}),[r,n,i,t]),a!==null&&a.conversationId===r?a.value:null}var FA={rate_limited:`rateLimit`,rate_limit:`rateLimit`,credits_exhausted:`credits`,credit_limit:`credits`,auth_failed:`auth`,auth_expired:`auth`,provider_error:`connection`,reconnect_failed:`connection`,"client.stream_stalled":`stalled`,"client.connection_lost_during_stream":`streamCut`},IA=/* @__PURE__ */ new Set([`ai.model_not_configured`,`ai_settings.company_not_found`,`ai.company_not_found`,`ai.user_disabled`]);function LA(e){if(e===null||!Object.prototype.hasOwnProperty.call(FA,e))return null;let t=FA[e];return t===void 0?null:t}function RA(e){let t=LA(e.errorCode);if(t!==null)return t;let n=LA(e.code);return n===null?`generic`:n}function zA(e){return e.errorCode!==null&&IA.has(e.errorCode)||e.code!==null&&IA.has(e.code)}function BA(e,t){if(t===null||!Object.prototype.hasOwnProperty.call(e,t))return null;let n=e[t];return n===void 0?null:n}function VA(e,t){let n=BA(e.byProviderCode,t.providerErrorCode);if(n!==null)return n;let r=BA(e.byCode,t.errorCode);if(r!==null)return r;let i=BA(e.byCode,t.code);return i===null?t.message:i}function HA(e){return t=>{let n=RA(t),r=!zA(t);return{errorClass:n,title:e.classes[n].title,text:VA(e.errors,t),hint:r?e.classes[n].hint:null,retryable:r}}}function UA(e){if(e.role!==`agent`)return{role:e.role};if(e.agentOrigin===`agent_question`)return{role:`agent`,agentOrigin:`agent_question`};if(e.createdAt===void 0)throw Error(`Lead prose row ${e.id} reached the transcript without createdAt`);return{role:`agent`,agentOrigin:`workflow_lead`,createdAt:e.createdAt}}function WA(e){switch(e){case`confirmed`:case`failed`:case`rejected`:case`closed`:return!1;case`pending`:case void 0:return!0}}function GA(e){return{id:e.toolCallId,toolName:e.toolName,...e.title!==void 0&&{title:e.title},...e.effect!==void 0&&{effect:e.effect},...e.operationTitles!==void 0&&{operationTitles:e.operationTitles},args:e.args,...e.contentOffset!==void 0&&{contentOffset:e.contentOffset}}}function KA(e,t,n,r){let i=t.kind===`pending-tool-call`||n!==void 0;return{id:e.id,...UA(e),content:t.kind===`prose`?t.text:``,...t.kind===`error`&&{error:{...t.code!==void 0&&{code:t.code},message:t.message}},...n!==void 0&&{toolCallStatus:n},...t.kind===`pending-tool-call`&&Xy(t)&&{answersLeadGrant:!0},...i&&!r&&WA(n)&&{toolCallCancelled:!0},...e.effort!==void 0&&{effort:e.effort},...e.thinkingText!==void 0&&{thinkingText:e.thinkingText},...e.thinkingDuration!==void 0&&{thinkingDuration:e.thinkingDuration},...e.toolCalls!==void 0&&{toolCalls:e.toolCalls.map(GA)},...e.toolResults!==void 0&&{toolResults:e.toolResults.map(e=>({toolCallId:e.toolCallId,result:e.result}))},...e.blocks!==void 0&&{blocks:e.blocks},...e.attachments!==void 0&&e.attachments.length>0&&{attachments:e.attachments}}}function qA(){let e=/* @__PURE__ */ new WeakMap;return(t,n)=>t.map(t=>{let r=e.get(t);if(r!==void 0&&(r.outcomeCallId===null||n.has(r.outcomeCallId)===r.awaitsOutcome))return r.message;let i=t.role===`assistant`?GS(t.content,t.pendingToolCall===void 0?null:t.pendingToolCall):{kind:`prose`,text:t.content},a=i.kind===`pending-tool-call`?i.toolCallId:null,o=t.pendingActionStatus,s=o===`confirmed`||o===`rejected`||o===`failed`||o===`closed`?o:i.kind===`pending-tool-call`?i.status:void 0,c=a!==null&&s===void 0?a:null,l=c!==null&&n.has(c),u=KA(t,i,s,l);return e.set(t,{outcomeCallId:c,awaitsOutcome:l,message:u}),u})}var JA=/\S/;function YA(e,t){let n=new Set(e.map(e=>e.id));return t.filter(e=>n.has(e.toolCallId))}function XA(e,t,n){let r=[{kind:`tools`,contentOffset:0,toolCalls:e,toolResults:YA(e,t)}];return JA.test(n)&&r.push({kind:`text`,text:n}),r}function ZA(e,t){let n=0;for(let r of e){if(!Number.isInteger(r)||r<n||r>t)return!1;n=r}return!0}function QA(e){let t=e.content,n=e.toolCalls??[],r=e.toolResults??[];if(n.length===0)return{layout:`chronological`,segments:JA.test(t)?[{kind:`text`,text:t}]:[]};let i=n.map(e=>e.contentOffset);if(i.some(e=>e===void 0))return{layout:`legacy`,segments:XA(n,r,t)};let a=i;if(!ZA(a,t.length))return{layout:`invalid`,segments:XA(n,r,t)};let o=[],s=0,c=0;for(;c<n.length;){let e=a[c],i=[];for(;c<n.length&&a[c]===e;)i.push(n[c]),c+=1;if(e>s){let n=t.slice(s,e);JA.test(n)&&o.push({kind:`text`,text:n})}o.push({kind:`tools`,contentOffset:e,toolCalls:i,toolResults:YA(i,r)}),s=e}if(s<t.length){let e=t.slice(s);JA.test(e)&&o.push({kind:`text`,text:e})}return{layout:`chronological`,segments:o}}function $A(e){let t=[e.code,e.errorCode,e.providerErrorCode].filter(e=>e!==null);return t.length===0?null:[...new Set(t)].join(` \u00B7 `)}function ej({error:e,presentation:t,copy:n,onRetry:r}){let i=$A(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-reply-error`,role:`alert`,"data-testid":`ai-chat-reply-error`,"data-error-class":t.errorClass,children:[/* @__PURE__ */ (0,Z.jsx)(Oe,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:t.title}),/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.text}),t.hint!==null&&/* @__PURE__ */ (0,Z.jsx)(`p`,{children:t.hint}),i!==null&&n.details!==null&&/* @__PURE__ */ (0,Z.jsxs)(`details`,{children:[/* @__PURE__ */ (0,Z.jsx)(`summary`,{children:n.details}),/* @__PURE__ */ (0,Z.jsx)(`code`,{children:i})]}),r!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-reply-error-actions`,children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:r,children:n.retry})})]})}function tj({liveText:e,storedText:t,durationSeconds:n,copy:r}){let[i,a]=(0,B.useState)(!1),o=t.length===0&&e.length>0;if(!o&&t.length===0)return null;let s=o||n===null?r.thinking:r.thoughtFor(n);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking`,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-toolline qa-ai-chat-thinking-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[/* @__PURE__ */ (0,Z.jsx)(oi,{className:`qa-ai-chat-toolline-icon${o?` qa-ai-chat-thinking-icon--live`:``}`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`b`,{children:s}),/* @__PURE__ */ (0,Z.jsx)(xe,{className:`qa-ai-chat-thinking-chevron${i?` qa-ai-chat-thinking-chevron--open`:``}`,"aria-hidden":`true`})]}),i&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-thinking-text`,children:[o?e:t,o&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thinking-cursor`,"aria-hidden":`true`})]})]})}function nj({label:e}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-activity`,role:`status`,"data-testid":`ai-tool-activity`,children:e===null?/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-activity-dots`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{}),/* @__PURE__ */ (0,Z.jsx)(`i`,{})]}):/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-activity-label qa-ai-chat-acts__sheen`,children:e})})}var rj=/\S/,ij=1500;function aj(e){let t=e.toolCalls;if(t===void 0||t.length===0)return null;let n=new Set(e.toolResults===void 0?[]:e.toolResults.map(e=>e.toolCallId));for(let e=t.length-1;e>=0;--e){let r=t[e];if(r!==void 0&&!n.has(r.id))return r}return null}var oj=e=>({text:e,link:null});function sj(e,t,n){let r=t.toolCallStatus;if(r===null)return null;switch(e.toolCallStatus){case`confirmed`:{if(n.confirmedLine===null)return oj(r.confirmed);let t=n.confirmedLine(e);switch(t.kind){case`generic`:return oj(r.confirmed);case`outcome`:return oj(t.text);case`unknown`:return oj(r.unknown);case`failed`:return oj(r.failed);case`awaiting`:return null;case`launched_elsewhere`:return{text:r.launchedElsewhere,link:{conversationId:t.conversationId,label:r.openConversation}}}break}case`failed`:return oj(r.failed);case`rejected`:return oj(n.answersLeadGrant!==null&&n.answersLeadGrant(e)?r.rejectedLeadGrant:r.rejected);case`closed`:return oj(r.closed);case`pending`:case void 0:return null}}function cj(e){return{code:e.code===void 0?null:e.code,message:e.message,errorCode:null,providerErrorCode:null}}function lj({text:e,copy:t}){let[n,r]=(0,B.useState)(`idle`),i=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>{i.current!==null&&clearTimeout(i.current)},[]);let a=e=>{r(e),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>r(`idle`),ij)},o=n===`done`?t.done:n===`failed`?t.failed:t.label;return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-answer-tools`,children:[/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:o,children:/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-ib qa-ai-chat-ib--sm`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>a(`done`),()=>a(`failed`))},children:n===`done`?/* @__PURE__ */ (0,Z.jsx)(Ke,{"aria-hidden":`true`}):/* @__PURE__ */ (0,Z.jsx)(Je,{"aria-hidden":`true`})})}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:n===`idle`?``:o})]})}var uj=(0,B.memo)(function({message:e,live:t,liveThinkingText:n,awaitingConfirmation:r,renderers:i,copy:a,presentError:o}){let{layout:s,segments:c}=(0,B.useMemo)(()=>QA(e),[e]),l=(0,B.useMemo)(()=>c.flatMap(e=>e.kind===`tools`?[e]:[]),[c]),u=i.cards,d=(0,B.useMemo)(()=>u(e,l),[u,e,l]),f=rj.test(e.content),p=e.effort!==void 0&&ut(e.effort),m=t&&p&&a.thinking!==null&&n.length>0&&(e.thinkingText===void 0||e.thinkingText.length===0),h=i.activity,g=t&&h!==null?aj(e):null,_=g!==null&&h!==null?h(g):m?null:a.thinkingPhase,v=sj(e,a,i),{openConversation:y}=i,b=v===null?null:v.link,x=e.toolCallCancelled===!0&&(e.toolCallStatus===void 0||e.toolCallStatus===`pending`),S=e.error!==void 0||e.toolCallCancelled===!0,C=p&&a.thinking!==null?/* @__PURE__ */ (0,Z.jsx)(tj,{liveText:t?n:``,storedText:e.thinkingText===void 0?``:e.thinkingText,durationSeconds:e.thinkingDuration===void 0?null:e.thinkingDuration,copy:a.thinking}):null,w=0,T=!1,E=!1,D=c.length-1,O=c.map((e,n)=>{if(e.kind===`text`)return S?null:(rj.test(e.text)&&(T=!0),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose${t&&n===D?` qa-ai-chat-prose--writing`:``}`,children:i.content(e.text,t)},`text-${String(n)}`));let a=d.atStep[w];w+=1;let o=i.activityLine===null?null:i.activityLine(e,{live:t,lastAndWorking:n===D&&!r});return o!==null&&(E=!0),o===null&&a==null?null:(T=!0,/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-step`,children:[o,a]},`step-${String(n)}`))}),ee=t&&!r&&!f&&!E,k=i.blocks===null?null:i.blocks(e,t),A=a.copyAnswer!==null&&!t&&f&&!S;return C!==null||T||ee||d.afterProse!==null||e.error!==void 0||x||v!==null||k!==null||A?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-assistant`,"data-segment-layout":s,"data-feed-row":e.id,children:[a.byline!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-byline-badge`,children:/* @__PURE__ */ (0,Z.jsx)(oi,{"aria-hidden":`true`})}),a.byline]}),C,O,ee&&/* @__PURE__ */ (0,Z.jsx)(nj,{label:_}),d.afterProse!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-step`,children:d.afterProse}),e.error!==void 0&&/* @__PURE__ */ (0,Z.jsx)(ej,{error:cj(e.error),presentation:o(cj(e.error)),copy:{retry:a.retry,details:a.details},onRetry:null}),x&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-cancelled`,children:a.toolCallCancelled}),v!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-note`,"data-testid":`ai-message-tool-call-status`,"data-tool-call-status":e.toolCallStatus,children:[v.text,b!==null&&y!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[` \u00B7 `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-turn-note__link`,"data-testid":`ai-message-tool-call-open-conversation`,onClick:()=>y(b.conversationId),children:b.label})]})]}),k,A&&a.copyAnswer!==null&&/* @__PURE__ */ (0,Z.jsx)(lj,{text:e.content,copy:a.copyAnswer})]}):null});function dj(){return/* @__PURE__ */ (0,Z.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[/* @__PURE__ */ (0,Z.jsx)(`circle`,{cx:`12`,cy:`9`,r:`3.4`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`M5.5 20c.8-3.6 3.4-5.6 6.5-5.6s5.7 2 6.5 5.6`}),/* @__PURE__ */ (0,Z.jsx)(`path`,{d:`m9 3.2 3 1.6 3-1.6`})]})}var fj=(0,B.memo)(function({message:e,content:t,copy:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-lead`,"data-feed-row":e.id,children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-byline`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-byline-badge`,children:/* @__PURE__ */ (0,Z.jsx)(dj,{})}),n.byline,/* @__PURE__ */ (0,Z.jsx)(`time`,{className:`qa-ai-chat-byline-time`,dateTime:e.createdAt,children:n.formatTime(e.createdAt)})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-prose`,children:t(e.content,!1)})]})}),pj=`data-feed-drawn`;function mj(e){let t=[];for(let n of e.children)n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&!n.hasAttribute(`data-feed-drawn`)&&t.push(n);return t}function hj(e){let t=(0,B.useRef)(null);(0,B.useEffect)(()=>()=>{t.current!==null&&cancelAnimationFrame(t.current)},[]);let n=(0,B.useCallback)(()=>{t.current===null&&(t.current=requestAnimationFrame(()=>{t.current=null;let r=e.current;if(r===null||r.getClientRects().length===0)return;let i=mj(r);i.length!==0&&(t.current=requestAnimationFrame(()=>{t.current=null;for(let e of i)e.isConnected&&e.setAttribute(pj,``);mj(r).length>0&&n()}))}))},[e]);return n}function gj(e){let t=[];for(let n of e.children)n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&t.push(n);return t}function _j(e,t){for(let n of gj(e))if(n.dataset.feedRow===t)return n;return null}function vj(e){let t=e.children;for(let e=t.length-1;e>=0;--e){let n=t[e];if(n instanceof HTMLElement&&n.dataset.feedRow!==void 0&&n.hasAttribute(`data-feed-own`))return n}return null}var yj=.5;function bj(e,t){let n=0,r=e;for(;r instanceof HTMLElement&&r!==t;)n+=r.offsetTop,r=r.offsetParent;if(r!==t)throw Error(`A feed element is not laid out inside its scroller (offsetParent chain)`);return n}function xj(){let e=(0,B.useRef)(null),t=(0,B.useRef)(null),n=(0,B.useRef)(0),[r,i]=(0,B.useState)(null),a=(0,B.useCallback)(t=>{let r=e.current;r===null||Math.abs(t-n.current)<yj||(n.current=t,r.style.height=`${String(t)}px`)},[]),o=(0,B.useCallback)(e=>{t.current={rowId:e,replacedFrom:null},i(e)},[]),s=(0,B.useCallback)(()=>{t.current=null,i(null),a(0)},[a]),c=(0,B.useCallback)(e=>{let n=t.current;if(n===null)return null;let r=_j(e,n.rowId);if(r!==null)return r;let a=vj(e);if(a===null||a.dataset.feedRow===void 0)return s(),null;let o=a.dataset.feedRow;return t.current={rowId:o,replacedFrom:n.rowId},i(o),a},[s]);return{spacerRef:e,turnRowId:r,begin:o,end:s,reserve:(0,B.useCallback)((t,n)=>{let r=e.current,i=c(n);if(i===null||r===null)return null;let o=Math.max(0,bj(i,t)-12),s=bj(r,t),l=Number.parseFloat(getComputedStyle(t).paddingBottom),u=o+t.clientHeight-s-l;return a(Math.max(0,u)),{top:o,outgrown:u<-1}},[c,a]),successorOf:(0,B.useCallback)((e,n)=>{let r=t.current;return r===null?null:r.rowId===n?c(e):r.replacedFrom===n?_j(e,r.rowId):null},[c])}}var Sj=100,Cj=1,wj=150,Tj=500,Ej=/* @__PURE__ */ new Set([`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Tab`]),Dj=16,Oj=`qa-ai-chat-messages--revealing`,kj=.5;function Aj(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function jj(e,t){let n=gj(t),r=e.getBoundingClientRect().top,i=0,a=n.length;for(;i<a;){let e=i+a>>>1,t=n[e];t!==void 0&&t.getBoundingClientRect().bottom<=r?i=e+1:a=e}let o=n[i];return o===void 0||o.dataset.feedRow===void 0?null:{rowId:o.dataset.feedRow,offset:o.getBoundingClientRect().top-r}}function Mj({showEmpty:e,shown:t}){let n=(0,B.useRef)(null),r=(0,B.useRef)(null),i=xj(),{begin:a,reserve:o,end:s,successorOf:c}=i,l=(0,B.useRef)(`follow`),[u,d]=(0,B.useState)(!1),f=(0,B.useRef)(!1),p=(0,B.useRef)(null),m=(0,B.useRef)(0),h=(0,B.useRef)(null),g=(0,B.useRef)(!1),_=(0,B.useRef)(0),v=(0,B.useRef)(e);(0,B.useLayoutEffect)(()=>{v.current=e});let y=(0,B.useCallback)(()=>g.current||performance.now()<_.current,[]),b=(0,B.useCallback)(e=>{l.current=e,d(e===`detached`)},[]),x=(0,B.useCallback)(e=>{let t=n.current;if(t===null)return;let r=t.scrollTop;t.scrollTop=e;let i=t.scrollTop;m.current=i,h.current=i===r?null:i},[]),S=(0,B.useCallback)(()=>{let e=n.current,t=r.current;e!==null&&t!==null&&(p.current=jj(e,t))},[]),C=(0,B.useCallback)(()=>{let e=n.current;e!==null&&(b(`follow`),p.current=null,x(e.scrollHeight))},[b,x]),w=(0,B.useCallback)(()=>{b(`follow`),p.current=null,x(0)},[b,x]),T=(0,B.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null||e.clientHeight===0)return;let i=p.current;if(i===null){S();return}let a=_j(t,i.rowId)??c(t,i.rowId);if(a===null){C();return}let o=e.scrollTop-m.current,s=i.offset-o,l=a.getBoundingClientRect().top-e.getBoundingClientRect().top-s;Math.abs(l)>=kj&&x(e.scrollTop+l),S()},[S,C,c,x]),E=(0,B.useCallback)(e=>{let t=n.current;if(t!==null){if(e===null){C();return}y()&&Math.abs(t.scrollTop-m.current)>=1||(Math.abs(t.scrollTop-e.top)>=kj&&x(e.top),e.outgrown&&(b(`detached`),S()))}},[S,C,y,b,x]),D=(0,B.useCallback)(()=>{let e=n.current;if(e===null)return;let t=Aj(e)<=Sj;b(t?`follow`:`detached`),t?p.current=null:S()},[S,b]),O=(0,B.useRef)(null),ee=(0,B.useCallback)(()=>{if(O.current!==null)return;let e=()=>{if(O.current=null,l.current===`follow`){if(y()){O.current=setTimeout(e,wj);return}C()}};O.current=setTimeout(e,wj)},[C,y]);(0,B.useEffect)(()=>()=>{O.current!==null&&clearTimeout(O.current)},[]);let k=(0,B.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null||e.clientHeight===0)return;let i=o(e,t);switch(l.current){case`held`:E(i);return;case`follow`:y()?ee():C();return;case`detached`:T();return}},[T,E,ee,C,y,o]),A=(0,B.useCallback)(()=>{if(l.current===`held`)return;f.current=!0;let e=l.current===`follow`;l.current=`detached`,e||S(),requestAnimationFrame(()=>requestAnimationFrame(()=>{f.current&&(f.current=!1,D())}))},[S,D]),j=(0,B.useCallback)(e=>{let t=n.current;if(t===null)return;b(`detached`);let r=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop-Dj,i=Math.min(Math.max(r,0),t.scrollHeight-t.clientHeight);if(Math.abs(i-t.scrollTop)<1){S();return}t.classList.add(Oj),t.addEventListener(`scrollend`,()=>t.classList.remove(Oj),{once:!0}),t.scrollTo({top:i,behavior:`auto`})},[S,b]),M=(0,B.useCallback)(()=>{let e=n.current;if(e!==null){if(l.current!==`held`&&e.scrollHeight-e.clientHeight<=Cj){b(`follow`),p.current=null;return}k()}},[k,b]),N=(0,B.useRef)(null),te=(0,B.useRef)(null),ne=(0,B.useCallback)(()=>{N.current!==null&&(cancelAnimationFrame(N.current),N.current=null,te.current=null)},[]);(0,B.useEffect)(()=>ne,[ne]);let re=(0,B.useCallback)(()=>{N.current===null&&(N.current=requestAnimationFrame(()=>{N.current=null;let e=te.current;te.current=null,v.current||M(),e!==null&&e()}))},[M]),ie=(0,B.useCallback)(({showEmpty:e,armToBottom:t,ownTurn:r},i)=>{if(n.current!==null){if(e){ne(),s(),w(),i();return}if(t){ne(),s(),C(),i();return}if(r!==null){ne(),a(r),p.current=null,b(`held`),k(),i();return}te.current=i,re()}},[a,ne,s,k,C,re,w,b]);return(0,B.useEffect)(()=>{let e=n.current,t=r.current;if(e===null||t===null)return;let i=new ResizeObserver(()=>{if(!v.current){if(f.current){f.current=!1,D();return}k()}});return i.observe(e),i.observe(t),()=>i.disconnect()},[k,D]),(0,B.useEffect)(()=>{let e=n.current;if(e===null)return;let t=e=>{_.current=Math.max(_.current,performance.now()+e)},r=()=>t(wj),i=()=>{g.current=!0},a=()=>{g.current&&(g.current=!1,t(wj))},o=e=>{Ej.has(e.key)&&t(Tj)},s=()=>{let n=e.scrollTop,r=h.current;h.current=null;let i=r!==null&&Math.abs(n-r)<1,a=m.current;if(m.current=n,v.current)return;if(!i&&y()){t(wj);let r=Aj(e);if(n<a&&r>Cj)l.current!==`detached`&&b(`detached`);else if(n>a&&r<=Sj){(l.current!==`follow`||r>0)&&C();return}}if(l.current!==`detached`||!i&&!y()&&N.current!==null)return;let o=p.current;if(o===null){S();return}p.current={rowId:o.rowId,offset:o.offset-(n-a)},re()};return e.addEventListener(`wheel`,r,{passive:!0}),e.addEventListener(`pointerdown`,i,{passive:!0}),e.addEventListener(`touchstart`,i,{passive:!0}),e.addEventListener(`keydown`,o),e.addEventListener(`scroll`,s,{passive:!0}),window.addEventListener(`pointerup`,a,{passive:!0}),window.addEventListener(`pointercancel`,a,{passive:!0}),window.addEventListener(`touchend`,a,{passive:!0}),window.addEventListener(`touchcancel`,a,{passive:!0}),()=>{e.removeEventListener(`wheel`,r),e.removeEventListener(`pointerdown`,i),e.removeEventListener(`touchstart`,i),e.removeEventListener(`keydown`,o),e.removeEventListener(`scroll`,s),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a),window.removeEventListener(`touchend`,a),window.removeEventListener(`touchcancel`,a)}},[S,C,y,re,b]),(0,B.useLayoutEffect)(()=>{if(t!==null)return t.subscribe(()=>{s(),v.current?w():C()})},[t,s,C,w]),{scrollerRef:n,feedRef:r,spacerRef:i.spacerRef,detached:u,turnRowId:i.turnRowId,pinToBottom:C,hold:A,reveal:j,afterRender:ie}}function Nj(e,t){let n=(0,B.useRef)(t);(0,B.useLayoutEffect)(()=>{n.current=t});let r=(0,B.useCallback)(()=>{let t=n.current,r=e.current;if(t===null||t.status!==`idle`||r===null||r.clientHeight===0)return;let i=r.scrollTop<=r.clientHeight,a=r.scrollHeight<=r.clientHeight;(i||a)&&t.load()},[e]);return(0,B.useEffect)(()=>{let t=e.current;if(t!==null)return t.addEventListener(`scroll`,r,{passive:!0}),()=>t.removeEventListener(`scroll`,r)},[e,r]),r}function Pj({older:e}){if(e===null)return null;switch(e.status){case`none`:case`idle`:return null;case`loading`:return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-older`,role:`status`,"data-testid":`ai-chat-older-history-loading`,children:[/* @__PURE__ */ (0,Z.jsx)(rn,{"aria-hidden":`true`}),e.copy.loading]});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)(Oe,{}),role:`alert`,slim:!0,title:null,text:e.copy.failed,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:e.load,children:e.copy.retry}),testId:`ai-chat-older-history-failed`})}}function Fj(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n!==void 0&&n.role!==`agent`)return t}return-1}function Ij(e,t){if(t===null)return null;let n=null;for(let r=e.length-1;r>=0;--r){let i=e[r];if(i!==void 0){if(i.id===t)return n;n===null&&i.role===`user`&&(n=i.id)}}return null}var Lj=(0,B.memo)(function({message:e,attachments:t,raised:n}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-turn-user${n?` qa-ai-chat-turn-user--raised`:``}`,"data-feed-row":e.id,"data-feed-own":``,children:[t!==null&&e.attachments!==void 0&&t(e),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-bubble`,children:e.content})]})}),Rj=(0,B.memo)(function({message:e,blocks:t}){let n=t===null?null:t(e,!1);return n===null?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-turn-assistant`,"data-testid":`ai-message-agent`,"data-feed-row":e.id,children:n})});function zj({messages:e,isStreaming:t,liveThinkingText:n,awaitingConfirmation:r,error:i,empty:a,renderers:o,copy:s,presentError:c,shown:l,olderHistory:u}){let d=e.length===0&&!t&&a!==null,f=Mj({showEmpty:d,shown:l}),p=(0,B.useRef)(e.length),m=e[e.length-1],h=(0,B.useRef)(m===void 0?null:m.id),{afterRender:g}=f,_=Nj(f.scrollerRef,u),v=hj(f.feedRef),y=u===null?null:u.status;(0,B.useLayoutEffect)(()=>{v();let t=p.current;p.current=e.length;let n=e[e.length-1],r=h.current;h.current=n===void 0?null:n.id;let i=t===0&&e.length>0;g({showEmpty:d,armToBottom:i,ownTurn:i?null:Ij(e,r)},_)},[e,t,n,i,r,d,y,g,_,v]);let b=Fj(e);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-messages`,ref:f.scrollerRef,tabIndex:s.feedLabel===null?void 0:0,"aria-label":s.feedLabel===null?void 0:s.feedLabel,children:[/* @__PURE__ */ (0,Z.jsx)(vp,{hold:f.hold,children:/* @__PURE__ */ (0,Z.jsx)(xp,{reveal:f.reveal,children:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-feed`,ref:f.feedRef,children:[/* @__PURE__ */ (0,Z.jsx)(Pj,{older:u}),d&&a,e.map((e,i)=>{switch(e.role){case`user`:return/* @__PURE__ */ (0,Z.jsx)(Lj,{message:e,attachments:o.attachments,raised:e.id===f.turnRowId},e.id);case`agent`:return e.agentOrigin===`workflow_lead`?s.leadProse===null?null:/* @__PURE__ */ (0,Z.jsx)(fj,{message:e,content:o.content,copy:s.leadProse},e.id):/* @__PURE__ */ (0,Z.jsx)(Rj,{message:e,blocks:o.blocks},e.id);case`assistant`:{let a=i===b;return/* @__PURE__ */ (0,Z.jsx)(uj,{message:e,live:t&&a,liveThinkingText:a?n:``,awaitingConfirmation:r&&a,renderers:o,copy:s,presentError:c},e.id)}}}),i!==null&&/* @__PURE__ */ (0,Z.jsx)(ej,{error:i.error,presentation:i.presentation,copy:{retry:s.retry,details:s.details},onRetry:i.onRetry})]})})}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-feed-spacer`,ref:f.spacerRef,"aria-hidden":`true`}),f.detached&&/* @__PURE__ */ (0,Z.jsx)(Re,{relationship:`label`,content:s.scrollToBottom,children:/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-scroll-bottom`,onClick:f.pinToBottom,children:[/* @__PURE__ */ (0,Z.jsx)(hr,{"aria-hidden":`true`}),t&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-scroll-bottom-live`,"aria-hidden":`true`})]})})]})}function Bj(e){switch(e.status){case`completed`:case`failed`:case`cancelled`:case`pausing`:case`paused`:case`stopping`:case`finalizing`:return e.status;case`running`:return e.hostState===`lost`?`host_lost`:e.hostState===`none`&&e.executorKind!==`none`?`starting`:e.leadState===`awaiting_user`||e.openAsk?`awaiting`:`running`}}function Vj(e){return e===`completed`||e===`failed`||e===`cancelled`}function Hj(e,t){let n=t===`agent`;switch(e){case`starting`:return{tone:`run`,label:n?`startingRunner`:`startingBrowser`};case`running`:return{tone:`run`,label:`running`};case`awaiting`:return{tone:`wait`,label:`awaiting`};case`host_lost`:return{tone:`wait`,label:n?`runnerLost`:`browserLost`};case`pausing`:return{tone:`stop`,label:`pausing`};case`paused`:return{tone:`wait`,label:`paused`};case`stopping`:return{tone:`stop`,label:`stopping`};case`finalizing`:return{tone:`run`,label:`finalizing`};case`completed`:return{tone:`ok`,label:`completed`};case`failed`:return{tone:`fail`,label:`failed`};case`cancelled`:return{tone:`stop`,label:`cancelled`}}}var Uj={make_auto:hi,atlas:Gr,run:Zr},Wj=`bg-(image:--hatch-skipped)`,Gj={success:`bg-(--color-progress-fill-success)`,error:`bg-(--color-progress-fill-failed)`,warning:`bg-warning`,info:`bg-info`,running:`relative overflow-hidden bg-(--color-progress-fill-running) after:absolute after:inset-0 after:w-[30%] after:bg-[linear-gradient(90deg,transparent,color-mix(in_srgb,var(--color-text-on-accent)_45%,transparent),transparent)] after:animate-(--animation-progress-shimmer) after:content-['']`,steady:`bg-(--color-progress-fill-running)`,cancelled:`bg-(--color-progress-fill-cancelled)`,muted:`bg-fg-muted`,quiet:`bg-[color-mix(in_srgb,var(--color-text-muted)_30%,transparent)]`,pending:`bg-surface-active`,skipped:`bg-surface-active ${Wj}`},Kj={success:`bg-(--color-progress-fill-success)`,error:`bg-(--color-progress-fill-failed)`,warning:`bg-warning`,info:`bg-info`,running:`bg-(--color-progress-fill-running)`,steady:`bg-(--color-progress-fill-running)`,cancelled:`bg-(--color-progress-fill-cancelled)`,muted:`bg-fg-muted`,quiet:`bg-[color-mix(in_srgb,var(--color-text-muted)_30%,transparent)]`,pending:`bg-stroke-hover`,skipped:`bg-stroke-hover ${Wj}`},qj={start:`justify-start`,center:`justify-center`};function Jj({segments:e,total:t,summary:n,meta:r,legendAlign:i,className:a,"data-testid":o}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:a===void 0?`grid min-w-0 gap-2`:`grid min-w-0 gap-2 ${a}`,"data-testid":o,children:[n===void 0&&r===void 0?null:/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex justify-between gap-3 text-xs text-fg-muted tabular-nums [&_b]:font-semibold [&_b]:text-fg-primary`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{children:n}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:r})]}),/* @__PURE__ */ (0,Z.jsx)(Xj,{segments:e,total:t}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-x-3.5 gap-y-1 p-0 text-xs text-fg-secondary tabular-nums ${qj[i]}`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`li`,{"data-legend":e.key,className:`inline-flex items-center gap-1.5`,children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{className:`size-2 shrink-0 rounded-2xs ${e.count>0?Kj[e.tone]:`bg-stroke-hover`}`,"aria-hidden":`true`}),e.label]},e.key))})]})}var Yj={md:`h-(--progress-track-md)`,sm:`h-(--progress-track-sm)`,xs:`h-(--progress-track-xs)`};function Xj({segments:e,total:t,size:n=`md`,className:r}){let i=`${Zj} ${Yj[n]}`;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:r===void 0?i:`${i} ${r}`,"aria-hidden":`true`,children:e.filter(e=>e.count>0).map(e=>/* @__PURE__ */ (0,Z.jsx)(`i`,{"data-segment":e.key,className:`block h-full transition-[width] duration-(--motion-long) ease-out motion-reduce:transition-none ${Gj[e.tone]}${e.pulse===!0?` animate-(--animation-pulse-dot)`:``}`,style:{width:`${e.count/t*100}%`}},e.key))})}var Zj=`relative flex gap-0.5 overflow-hidden rounded-full bg-(--color-progress-track)`,Qj=6;function $j({count:e,label:t,className:n}){return/* @__PURE__ */ (0,Z.jsx)(`span`,{...t===void 0?{"aria-hidden":!0}:{role:`img`,"aria-label":t},className:P(`inline-flex items-center gap-0.5`,n),children:Array.from({length:Math.min(e,Qj)},(e,t)=>/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`relative h-[9px] w-[11px] rounded-[2px] border-[1.2px] border-solid border-current opacity-90 before:absolute before:inset-x-0 before:top-[1.5px] before:h-[1.2px] before:bg-current before:opacity-60 before:content-['']`},t))})}function eM(e){return`workflow-block-${e}`}function tM(e){return e.status===`running`&&(e.leadState===`awaiting_user`||e.openAsk)}function nM(e){return e.launchKind===`preset`&&e.level.effort!==`max`}function rM(e,t){return e.launchKind===`preset`&&t===`starting`&&e.place.kind===`this_browser`}function iM(e,t){if(e.launchKind!==`preset`)return!0;let n=Bj(e);return n===`awaiting`||t&&rM(e,n)}function aM(e){return e===`awaiting`||e===`host_lost`}function oM(e){return e.filter(e=>e.status===`idle`||e.status===`busy`).length}function sM(e,t){return t&&e.status===`running`&&(e.hostState===`none`||e.hostState===`lost`)&&e.executorKind===`browser`}function cM(e,t){return new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}function lM(e,t){let n=e.flatMap(e=>e.blocks??[]).filter(g).find(e=>e.payload.workflowId===t);return n===void 0?null:n.payload.status}function uM(e){return e.flatMap(e=>e.blocks??[]).filter(g).filter(e=>e.payload.launchKind===`preset`).map(e=>e.payload.workflowId).sort().join(`,`)}function dM(e,t){return e.length>0&&e.every(e=>e.kind===`workflow`&&t.has(e.id))}function fM(e){let t=document.getElementById(eM(e));t!==null&&(t.scrollIntoView({block:`center`,behavior:`smooth`}),t.focus({preventScroll:!0}))}function pM({blockId:e,payload:t,sidePanel:n,onToQuestion:r,onResume:i,resuming:a}){let o=$().cards.workflow,s=o.strip,c=Bj(t),l=aM(c),u=oM(t.workers),d=t.executorKind===`browser`,f=c===`awaiting`&&nM(t),p=c===`awaiting`&&t.launchKind===`preset`,m=c===`awaiting`?f?t.openAsk?o.preset.stripChatLeadAwaitingAnswer:o.preset.stripChatLeadAwaitingMessage:s.awaiting:c===`host_lost`?d?s.lostBrowser:s.lostRunner:c===`starting`?rM(t,c)?o.preset.stripAwaitingBrowser:d?s.startingBrowser:s.startingRunner:c===`stopping`?s.stopping:t.leadState===`active`?s.active:s.idle,h=p?Xn:l?c===`host_lost`?x:Tr:Yr,g=sM(t,n)?/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:14}),loading:a,disabled:a,onClick:i,children:s.resume}):p?null:tM(t)?/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,onClick:()=>r(t.workflowId),children:s.toQuestion}):/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,"aria-label":s.toBlockLabel,onClick:()=>fM(e),children:s.toBlock});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,"data-testid":`ai-chat-swarm-strip`,"data-phase":c,className:P(`mx-3 mb-2 flex items-center gap-2 rounded-md border border-solid pl-3 text-xs shadow-(--shadow-sm) [animation:slide-up_var(--motion-long)_var(--ease-out)]`,g===null?`py-2 pr-3`:`py-1.5 pr-1.5`,l?`border-(--color-border-warning) bg-(--color-warning-bg)`:`border-(--color-border) bg-(--glass-bg)`),children:[/* @__PURE__ */ (0,Z.jsx)(h,{"aria-hidden":`true`,className:P(`size-3.5 flex-none`,l?`text-(--color-warning-text)`:`text-(--color-primary-text)`)}),c!==`host_lost`&&u>0&&/* @__PURE__ */ (0,Z.jsx)($j,{count:u,label:s.windows(u),className:`text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`min-w-0 grow truncate text-fg-secondary`,children:m}),g]})}function mM({messages:e,workflowHost:t,onToQuestion:n}){let r=$().errors,i=e.flatMap(e=>e.blocks??[]).filter(je).filter(g).filter(e=>iM(e.payload,t!==null)).reverse();return i.length===0?null:/* @__PURE__ */ (0,Z.jsx)(Z.Fragment,{children:i.map(e=>{let{workflowId:i}=e.payload,a=t===null?`idle`:t.statusOf(i);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{children:[/* @__PURE__ */ (0,Z.jsx)(pM,{blockId:e.id,payload:e.payload,sidePanel:t!==null,onToQuestion:n,onResume:()=>t==null?void 0:t.attach(i),resuming:a===`resuming`}),a===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mx-3 mb-2`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:r.byCode[`client.workflow_host_action_failed`]})})]},e.id)})})}function hM({launches:e,messages:t,workflowHost:n,openPath:r,onAttachSettled:i}){let a=e.filter(e=>lM(t,e.workflowId)===null);return gM(a.map(e=>e.workflowId),n,i),a.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-none flex-col gap-2 px-3 pt-3`,children:a.map(e=>/* @__PURE__ */ (0,Z.jsx)(_M,{launch:e,workflowHost:n,openPath:r},e.workflowId))})}function gM(e,t,n){let r=(0,B.useRef)(/* @__PURE__ */ new Set);(0,B.useEffect)(()=>{let i=!1;for(let n of e)t.statusOf(n)===`resuming`?r.current.add(n):r.current.delete(n)&&(i=!0);i&&n()})}function _M({launch:e,workflowHost:t,openPath:n}){let r=$(),i=r.cards.workflow.preset.panelWait,a=Q(),o=t.statusOf(e.workflowId),s=`panel-wait-${e.workflowId}`,c=e.reason===`host_lost`,l=e.reason===`host_lost`?i.lostDetail(cM(e.hostLostAt,a)):i.origin(e.surface,cM(e.startedAt,a),e.initiatorName);return/* @__PURE__ */ (0,Z.jsxs)(`section`,{role:`status`,"aria-labelledby":s,"data-testid":`ai-chat-panel-wait-strip`,"data-reason":e.reason,className:`grid grid-cols-[28px_minmax(0,1fr)] gap-x-3 gap-y-2 rounded-lg border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs [animation:var(--animation-slide-down)]`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid size-7 place-items-center rounded-md border border-solid border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-(--color-primary-text)${c?``:` shadow-(--glow-primary)`}`,children:/* @__PURE__ */ (0,Z.jsx)(oi,{className:`size-3.5`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{id:s,className:`block text-(length:--text-body-sm) font-semibold text-fg-primary`,children:c?i.lostTitle(e.title):i.title(e.title)}),/* @__PURE__ */ (0,Z.jsx)(`small`,{className:`block text-(length:--text-caption) text-fg-secondary`,children:l})]}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`col-span-2 flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(mr,{size:14}),loading:o===`resuming`,disabled:o===`resuming`,onClick:()=>t.attach(e.workflowId),"data-testid":`ai-chat-panel-wait-resume`,children:i.resume}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(kn,{size:14}),onClick:()=>n(e.deeplink),children:i.openLaunch})]}),o===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`col-span-2`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:r.errors.byCode[`client.workflow_host_action_failed`]})})]})}var vM=3e4,yM=z({items:yt(u),total:R().int().min(0)});function bM(e){return e.attention===`awaiting_browser`||e.attention===`host_lost`}async function xM(e,t){let n=[];for(let r=0;;r+=500){let i=await e.request({method:qn.myLiveBrowserTasks.method,path:qn.myLiveBrowserTasks.path(t,{limit:500,offset:r}),schema:yM});if(n.push(...i.items.filter(bM)),r+i.items.length>=i.total||i.items.length===0)return n}}function SM(e){let{http:t,logger:n,active:r,projectId:i,visible:a,conversationId:o}=e,[s,c]=(0,B.useState)({projectId:null,launches:[]}),[l,u]=(0,B.useState)(0),d=(0,B.useRef)(n);(0,B.useEffect)(()=>{d.current=n});let f=(0,B.useCallback)(()=>u(e=>e+1),[]);return(0,B.useEffect)(()=>{if(!r||i===null||!a)return;let e=!1,n=0,o=()=>{n+=1;let r=n;xM(t,i).then(t=>{let a=t.map(e=>{if(e.topic.kind!==`preset`)throw Error(`W10 answered swarm ${e.id} of topic ${e.topic.kind} to launchKind=preset`);if(e.launchSurface===null)throw Error(`W10 answered AI task ${e.id} without its launchSurface`);let t={workflowId:e.id,title:_d(e.topic),surface:e.launchSurface,startedAt:e.startedAt,initiatorName:e.initiator.displayName,deeplink:e.deeplink};if(e.attention===`awaiting_browser`)return{...t,reason:e.attention};if(e.hostLostAt===null)throw Error(`W10 answered host-lost AI task ${e.id} without its hostLostAt`);return{...t,reason:e.attention,hostLostAt:e.hostLostAt}});!e&&r===n&&c({projectId:i,launches:a})}).catch(t=>{e||d.current.error(`panel wait strip: reading the tasks waiting for a browser failed`,{projectId:i,error:t})})};o();let s=setInterval(o,vM);return window.addEventListener(`focus`,o),()=>{e=!0,clearInterval(s),window.removeEventListener(`focus`,o)}},[t,r,i,a,o,l]),{launches:r&&s.projectId===i?s.launches:[],reread:f}}function CM(e,t){let n=uM(e);return{aiTaskBlockIds:(0,B.useMemo)(()=>new Set(n===``?[]:n.split(`,`)),[n]),hiddenWorkflowId:t===null?null:t.workflowId}}function wM(e){let[t,n]=(0,B.useState)(()=>/* @__PURE__ */ new Map),r=(0,B.useCallback)((e,t)=>n(n=>{let r=new Map(n);return t===`idle`?r.delete(e):r.set(e,t),r}),[]);return(0,B.useMemo)(()=>e===null?null:{statusOf:e=>{let n=t.get(e);return n===void 0?`idle`:n},attach:t=>{r(t,`resuming`),e.attachWorkflowHost(t).then(()=>r(t,`idle`),e=>{r(t,`failed`),queueMicrotask(()=>{throw e})})}},[e,t,r])}var TM=``;function EM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function DM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort}}function OM(e){let{conversationId:t,historyLoad:n,launchLevels:r,capabilityLoad:i}=e,a=t===null?TM:t,o=(0,B.useCallback)(e=>r.subscribe(e),[r]),s=(0,B.useSyncExternalStore)(o,()=>t===null?null:r.get(t)),[c,l]=(0,B.useState)(()=>/* @__PURE__ */ new Map),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(t);if(f!==t&&(p(t),f===null&&t!==null)){d(!1);let e=c.get(TM);if(u&&n.status===`idle`&&e!==void 0&&!c.has(t)){let n=new Map(c);n.set(t,e),n.delete(TM),l(n)}}let m=i.status===`ready`?{block:sn,maxAgents:i.value.swarm.maxAgents}:null,h=c.get(a),g=h===void 0?s===null?Tn:DM(s):h,_=m===null?g:qt(g,m),v=e=>{l(t=>new Map(t).set(a,e))};return{choice:_,facts:m,choose:e=>{m!==null&&v(Jt(e,m.maxAgents))},setAgents:e=>{m!==null&&v(tn(_,e,m.maxAgents))},forSend:()=>(t===null&&d(!0),EM(_)),resetNewConversation:()=>{d(!1),l(e=>{if(!e.has(TM))return e;let t=new Map(e);return t.delete(TM),t})}}}function kM(e){return e.effort===`max`?{effort:`max`,maxAgents:e.maxAgents}:{effort:e.effort,maxAgents:null}}function AM({session:e,pin:t,launchEffortForSend:n,launchPlace:r}){let{place:i,reloadFleet:a}=r,o=(0,B.useCallback)((r,o,s)=>{if(t!==null){let n={text:r,launchEffort:kM(t.level),place:t.place,source:o,attachments:s};return e.prepareSend(n)}i.kind===`runner`&&a();let c={text:r,launchEffort:n(),place:i,source:o,attachments:s};return e.prepareSend(c)},[e,t,n,i,a]),s=(0,B.useCallback)(t=>e.sendPrepared(t),[e]);return{send:(0,B.useCallback)((e,t,n)=>s(o(e,t,n)),[o,s]),prepareSend:o,sendPrepared:s,retryLastTurn:(0,B.useCallback)(()=>{if(t!==null){e.retryLastTurn(kM(t.level),t.place);return}e.retryLastTurn(n(),i)},[e,t,n,i])}}function jM({attachments:e}){let t=$().attachments,n=e.filter(e=>Hn(e.mediaType)),r=n.length>1?`square`:`wide`;return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-msg-files`,role:`group`,"aria-label":t.message.listLabel,"data-testid":`ai-chat-message-files`,children:e.map(e=>Hn(e.mediaType)?/* @__PURE__ */ (0,Z.jsx)(MM,{attachment:e,images:n,shape:r},e.id):/* @__PURE__ */ (0,Z.jsx)(PM,{attachment:e},e.id))})}function MM({attachment:e,images:t,shape:n}){let r=$().attachments.message,{openViewer:i}=Hf(),{content:a,load:o}=Rf(e,!0),s=`qa-ai-chat-thumb qa-ai-chat-thumb--${n}`;switch(a.status){case`idle`:case`loading`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`${s} qa-ai-chat-thumb--loading`,role:`img`,"aria-busy":`true`,"aria-label":r.thumbnailLoading(e.fileName),"data-testid":`ai-chat-message-thumb-loading`});case`failed`:return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`${s} qa-ai-chat-thumb--failed`,"data-testid":`ai-chat-message-thumb-failed`,children:[/* @__PURE__ */ (0,Z.jsx)(Rr,{"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(`small`,{children:r.thumbnailFailed}),/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:()=>void o(),children:r.retry})]});case`ready`:return/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:s,"aria-label":r.view(e.fileName),"data-testid":`ai-chat-message-thumb`,onClick:n=>i(t,t.findIndex(t=>t.id===e.id),n.currentTarget),children:[/* @__PURE__ */ (0,Z.jsx)(`img`,{src:a.url,alt:``}),n===`wide`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-thumb-zoom`,"aria-hidden":`true`,children:/* @__PURE__ */ (0,Z.jsx)(gi,{})})]})}}function NM(e){let t=window.open(``,`_blank`);t!==null&&(t.opener=null),e().then(e=>{if(e===null){t!==null&&t.close();return}t===null?window.open(e.url,`_blank`,`noopener`):t.location.href=e.url})}function PM({attachment:e}){let t=$().attachments,n=Q(),{content:r,load:i}=Rf(e,!1),[a,o]=(0,B.useState)(!1),s=a&&r.status===`failed`,c=()=>{if(o(!0),r.status===`ready`){window.open(r.url,`_blank`,`noopener`);return}NM(async()=>{let e=await i();return e.status===`ready`?{url:e.url}:null})},l=If(e,n,t),u=/* @__PURE__ */ (0,Z.jsx)(lS,{label:t.typeLabel[e.mediaType]});return s?/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-filechip qa-ai-chat-filechip--fail`,"data-testid":`ai-chat-message-doc-failed`,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(uS,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-why`,children:[t.message.openFailed,` `,/* @__PURE__ */ (0,Z.jsx)(`button`,{type:`button`,className:`qa-ai-chat-linkbtn`,onClick:c,children:t.message.retry})]})]})]}):/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-filechip`,"aria-label":t.message.open(e.fileName),"aria-busy":r.status===`loading`,"data-testid":`ai-chat-message-doc`,onClick:c,children:[u,/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-filechip-text`,children:[/* @__PURE__ */ (0,Z.jsx)(uS,{fileName:e.fileName}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-filechip-facts`,children:l})]}),/* @__PURE__ */ (0,Z.jsx)(kn,{className:`qa-ai-chat-filechip-go`,"aria-hidden":`true`})]})}var FM={run:`border-[color-mix(in_srgb,var(--color-primary)_40%,transparent)] bg-(--color-bg-primary-tint-15) text-fg-on-primary-tint`,wait:`border-(--color-border-warning) bg-(--color-warning-bg) text-(--color-warning-text)`,ok:`border-(--color-border-success) bg-(--color-success-bg) text-(--color-success-text)`,fail:`border-(--color-border-error) bg-(--color-error-bg) text-(--color-error-text)`,stop:`border-(--color-border) bg-(--color-bg-cancelled-tint) text-fg-muted`,queue:`border-(--color-border) bg-(--color-bg-tertiary) text-fg-secondary`},IM={run:!0,wait:!0,ok:!1,fail:!1,stop:!1,queue:!1};function LM({tone:e,children:t,size:n=`md`,role:r}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{role:r,"data-tone":e,className:P(`inline-flex items-center gap-1.5 whitespace-nowrap rounded-full border border-solid px-2 font-medium`,n===`lg`?`h-6 text-xs`:`h-[22px] text-caption`,`leading-[inherit]`,FM[e]),children:[/* @__PURE__ */ (0,Z.jsx)(`i`,{"aria-hidden":`true`,className:P(`size-1.5 flex-none rounded-full bg-current`,IM[e]&&`[animation:pulse-dot_var(--motion-ambient)_var(--ease-in-out)_infinite]`)}),t]})}var RM={normal:1,thinking:2,max:3};function zM({payload:e,copy:t,locale:n}){return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-x-1`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[t.scope(e.scopeLabel),` \u00B7`]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(yn,{level:RM[e.level.effort],look:`quiet`}),t.level(e.level)]}),/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[`\u00B7 `,t.since(cM(e.createdAt,n))]})]})}function BM(e,t,n){if(e.total===0&&(t===null||t===0))return[];let r=[{key:`findings`,value:e.total,noun:n.counts.findings(e.total)},{key:`bugs`,value:e.bugs,noun:n.counts.bugs(e.bugs)}];return t===null?e.undecided>0&&r.push({key:`undecided`,value:e.undecided,noun:n.counts.undecided(e.undecided)}):t>0&&r.push({key:`notDone`,value:t,noun:n.counts.notDone}),r}function VM({items:e}){return e.length===0?null:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-1 text-xs text-fg-secondary`,"data-testid":`workflow-block-counts`,children:e.map(e=>/* @__PURE__ */ (0,Z.jsxs)(`span`,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`font-semibold text-fg-primary tabular-nums`,children:e.value}),` `,e.noun]},e.key))})}function HM({text:e}){return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2 text-xs text-fg-secondary`,children:[/* @__PURE__ */ (0,Z.jsx)(mr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{children:e})]})}function UM(e,t){switch(e){case`ai.credits_insufficient`:return t.failureReason.credits;case`turn_shape`:return t.failureReason.turnShape;case`lead_internal_error`:return t.failureReason.internal;case`initiator_unavailable`:return t.failureReason.initiatorUnavailable;default:return t.failureReason.other(e)}}function WM(e,t,n){if(e.status!==`cancelled`&&e.status!==`failed`)return null;let r=e.status===`cancelled`?t.partialCancelled(cM(e.end.endedAt,n)):t.partialFailed(UM(e.end.failureReason,t)),{findings:i}=e;return[r,i.total===0?null:t.beforeStop(`${i.total} ${t.counts.findings(i.total)}`,i.bugs===0?null:`${i.bugs} ${t.counts.bugs(i.bugs)}`),e.end.report.summary].filter(e=>e!==null).join(` `)}function GM({text:e,partial:t}){return/* @__PURE__ */ (0,Z.jsx)(`div`,{className:P(`line-clamp-6 rounded-md border border-solid p-3 text-body-sm leading-[1.6] text-fg-primary`,t?`border-(--color-border) bg-(--color-bg-tertiary)`:`border-(--color-border-success) bg-(--color-success-bg)`),children:e})}function KM(e){try{return new URL(e).host}catch{return e}}function qM({launch:e}){let{t}=Qe(),n=e.allowedChanges.length===0?t(`taskForm.allow.projectOnlyNone`):t(`taskForm.allow.projectOnly`,{list:e.allowedChanges.map(e=>t(`taskForm.allow.short.${e}`)).join(`, `)});return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-md bg-(--color-bg-modal-inset) px-3 py-2`,"data-testid":`workflow-block-launch`,children:[/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`m-0 line-clamp-2 text-xs leading-normal text-fg-primary`,children:e.briefLine}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-caption text-fg-muted`,children:[/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(ai,{"aria-hidden":`true`,className:`size-3 shrink-0`}),n]}),e.newScenarioKind!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(mi,{"aria-hidden":`true`,className:`size-3 shrink-0`}),t(`taskForm.scenarioKind.chip`,{kind:t(`taskForm.scenarioKind.short.${e.newScenarioKind}`)})]}),e.address!==null&&/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1`,children:[/* @__PURE__ */ (0,Z.jsx)(Ce,{"aria-hidden":`true`,className:`size-3 shrink-0`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`truncate`,children:t(`taskForm.address.pair`,{environment:e.address.environmentName,host:KM(e.address.entryUrl)})})]})]})]})}var JM=z({id:L()});function YM(e){let{http:t}=$f(),[n,r]=(0,B.useState)(`idle`);return{status:n,ask:()=>r(`confirming`),keep:()=>r(`idle`),stop:()=>{r(`stopping`),t.request({method:qn.workflowCancel.method,path:qn.workflowCancel.path(e),body:{},schema:JM}).then(()=>r(`idle`),e=>{r(`stopFailed`),e instanceof Jn&&e.status===409||queueMicrotask(()=>{throw e})})}}}function XM({state:e,words:t}){return e.status===`confirming`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsxs)(q_,{question:t.question,body:t.body,children:[/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,onClick:e.keep,children:t.keep}),/* @__PURE__ */ (0,Z.jsx)(I,{variant:`danger-soft`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ci,{size:14}),onClick:e.stop,children:t.confirm})]})}):e.status===`stopFailed`?/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:t.failed})}):null}var ZM={starting:`border-(--color-border)`,running:`border-(--color-border)`,awaiting:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,host_lost:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,pausing:`border-(--color-border)`,paused:`border-(--color-border-warning) shadow-[var(--shadow-sm),var(--shadow-warning-glow)]`,stopping:`border-(--color-border)`,finalizing:`border-(--color-border)`,completed:`border-(--color-border-success)`,failed:`border-(--color-border-error)`,cancelled:`border-(--color-border)`};function QM(e){return{...e.actions.stopConfirm,failed:e.actions.stopFailed}}function $M(e,t,n){switch(e){case`starting`:return{text:t.launchKind===`preset`?n.preset.startingRunner:t.executorKind===`browser`?n.lead.startingBrowser:n.lead.startingRunner,need:!1};case`awaiting`:return{text:n.lead.awaiting,need:!0};case`running`:return{text:t.leadState===`active`?n.lead.active:nM(t)?n.preset.chatLeadIdle:n.lead.idle,need:!1};case`stopping`:return{text:n.lead.stopping,need:!1};case`host_lost`:case`pausing`:case`paused`:case`finalizing`:case`completed`:case`failed`:case`cancelled`:return null}}function eN(e,t){switch(e){case`ai.credits_insufficient`:return t.end.failureReason.credits;case`turn_shape`:return t.end.failureReason.turnShape;case`lead_internal_error`:return t.end.failureReason.internal;case`initiator_unavailable`:return t.end.failureReason.initiatorUnavailable;default:return t.end.failureReason.other(e)}}function tN(e,t,n){let r=[];return e.scenarios!==null&&r.push(t?n.end.tallyBeforeStop(e.scenarios.done,e.scenarios.total):n.end.tally(e.scenarios.done,e.scenarios.total)),e.screensCreated>0&&r.push(n.end.screens(e.screensCreated)),r.length===0?``:`${r.join(`, `)}.`}function nN(e,t){return e.summary===null?[t.end.reportPartial]:[t.end.reportPartial,e.summary]}function rN(e,t,n){switch(e.status){case`completed`:return e.end.report.summary;case`failed`:return[eN(e.end.failureReason,t),tN(e.end.tally,!1,t),...nN(e.end.report,t)].filter(e=>e!==``).join(` `);case`cancelled`:return[t.end.cancelledBy(e.end.stoppedBy.displayName,cM(e.end.endedAt,n)),tN(e.end.tally,!0,t),...nN(e.end.report,t)].filter(e=>e!==``).join(` `);case`running`:case`pausing`:case`paused`:case`stopping`:case`finalizing`:return null}}function iN({worker:e,lit:t,copy:n}){let{unit:r}=e,i=t&&e.status===`busy`,a=r===null?e.status===`opening`?n.worker.opening:e.status===`closing`?n.worker.closing:e.status===`busy`?n.worker.busy:n.worker.idle:r.kind===`atlas`?n.worker.crawl(r.title):r.title.trim()===``?n.worker.untitledScenario:r.title,o=r===null||r.progress===null?null:r.progress.kind===`make_auto`?{text:n.worker.progress(r.progress.done,r.progress.total),percent:r.progress.total===0?null:r.progress.done/r.progress.total*100}:{text:n.worker.steps(r.progress.steps),percent:null},s=r===null?null:Uj[r.kind];return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,"data-testid":`workflow-block-worker`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-label":n.worker.name(e.ordinal),className:P(`relative grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid pt-0.5 text-micro font-semibold`,`before:absolute before:inset-x-0 before:top-[3px] before:h-px before:opacity-70 before:content-['']`,i?`border-(--color-secondary) text-(--color-primary-text) before:bg-(--color-secondary)`:`border-(--color-border-strong) text-fg-secondary before:bg-(--color-border-strong)`),children:e.ordinal}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:P(`truncate`,r===null?`text-fg-muted`:`text-fg-primary`),children:a}),r!==null&&s!==null&&/* @__PURE__ */ (0,Z.jsxs)(`small`,{className:`flex items-center gap-1.5 text-caption text-fg-muted`,children:[/* @__PURE__ */ (0,Z.jsx)(s,{"aria-hidden":`true`,className:`size-[11px]`}),n.worker.kind[r.kind],e.unitCount>1&&` \u00B7 ${n.worker.task(e.unitCount)}`]})]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:o!==null&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-[52px] text-right text-caption text-fg-secondary tabular-nums`,children:o.text}),o.percent!==null&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`relative mt-1 ml-auto h-1 w-[52px] overflow-hidden rounded-full bg-(--color-progress-track) shadow-[inset_0_0_0_1px_var(--color-border-light)]`,children:/* @__PURE__ */ (0,Z.jsx)(`b`,{className:P(`block h-full rounded-[inherit] [transition:width_var(--motion-long)_var(--ease-out)]`,o.percent>=100?`bg-(--color-progress-fill-success)`:`bg-(--color-progress-fill-running)`),style:{width:`${o.percent}%`}})})]})})]})}function aN({blockId:e,payload:t,state:n}){let r=$().cards.workflow,i=$().errors,a=Q(),{navigation:o,browser:s}=$f(),c=YM(t.workflowId),l=Bj(t),u=l===`paused`&&n===`terminal`,d=Vj(l)||u,f=rM(t,l),p=t.launchKind===`preset`&&l===`starting`&&!f?Hj(`running`,t.executorKind):Hj(l,t.executorKind),m=(t.status===`pausing`||t.status===`paused`)&&t.pauseCause!==void 0?t.pauseCause:null,h=m===null?r.pill[p.label]:`${r.pill[p.label]}: ${r.pauseCause[m]}`,g=$M(l,t,r),_=rN(t,r,a),v=!d&&sM(t,s!==null),y=t.launchKind===`preset`&&v,b=s===null?`idle`:s.workflowHost.statusOf(t.workflowId),S=l===`host_lost`?t.executorKind===`agent`?r.hostLost.runner:s===null?r.hostLost.web:r.hostLost.sidePanel:null,C=c.status===`confirming`,w=!d&&t.status!==`stopping`;return/* @__PURE__ */ (0,Z.jsxs)(`section`,{id:eM(e),tabIndex:-1,"aria-labelledby":`${eM(e)}-title`,"data-testid":`workflow-block`,"data-phase":l,className:P(`overflow-hidden rounded-lg border border-solid bg-(--color-bg-card) shadow-(--shadow-sm) [animation:scale-in_var(--motion-long)_var(--ease-out)_both] focus:outline-none`,u?`border-(--color-border)`:ZM[l]),children:[/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex items-start gap-3 px-4 pt-4 pb-3`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:P(`grid size-[34px] flex-none place-items-center rounded-md border border-solid bg-(--color-bg-tertiary) text-(--color-primary-text)`,d?`border-(--color-border-light)`:`border-[color-mix(in_srgb,var(--color-primary)_45%,transparent)] shadow-(--glow-primary)`),children:t.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(oi,{className:`size-4`}):/* @__PURE__ */ (0,Z.jsx)(Yr,{className:`size-4`})}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`min-w-0 grow`,children:[/* @__PURE__ */ (0,Z.jsx)(`div`,{id:`${eM(e)}-title`,className:`text-sm leading-[1.3] font-semibold tracking-[-0.25px] text-fg-primary`,children:t.launchKind===`preset`?r.topic(t.topic):r.title[t.launchKind]}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`mt-0.5 text-caption text-fg-muted`,children:t.launchKind===`preset`?/* @__PURE__ */ (0,Z.jsx)(zM,{payload:t,copy:r.preset,locale:a}):r.subtitle(r.topic(t.topic),t.maxAgents,cM(t.createdAt,a))})]}),/* @__PURE__ */ (0,Z.jsx)(LM,{tone:f?`wait`:u?`stop`:p.tone,role:`status`,children:f?r.preset.pillAwaitingBrowser:h})]}),t.launchKind===`preset`&&/* @__PURE__ */ (0,Z.jsx)(sN,{payload:t,phase:l,lead:g,sidePanel:s!==null,copy:r,locale:a}),t.launchKind!==`preset`&&g!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:P(`mx-4 flex items-center gap-2 rounded-md px-3 py-2 text-xs`,g.need?`bg-(--color-warning-bg) text-fg-primary`:`bg-(--color-bg-modal-inset) text-fg-secondary`),children:[g.need?/* @__PURE__ */ (0,Z.jsx)(Tr,{"aria-hidden":`true`,className:`size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-1.5 flex-none rounded-full bg-(--color-secondary) [animation:var(--animation-pulse-dot)]`}),g.text]}),S!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{role:`status`,className:`mx-4 mb-3 flex items-start gap-2 rounded-md border border-solid border-(--color-border-warning) bg-(--color-warning-bg) p-3 text-xs leading-normal text-fg-primary`,children:[/* @__PURE__ */ (0,Z.jsx)(x,{"aria-hidden":`true`,className:`mt-px size-3.5 flex-none text-(--color-warning-text)`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{children:S})]}),t.launchKind!==`preset`&&!d&&l!==`stopping`&&/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`mt-3 mb-0 flex list-none flex-col gap-1 px-4 pb-3`,children:l===`starting`&&t.workers.length===0?/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`grid grid-cols-[22px_minmax(0,1fr)_auto] items-center gap-2 py-1.5 text-xs`,children:[/* @__PURE__ */ (0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`grid h-[18px] w-[22px] place-items-center rounded-[4px] border-[1.3px] border-solid border-(--color-border-strong) text-micro text-fg-secondary`,children:`\u00B7`}),/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`min-w-0 truncate text-fg-muted`,children:t.executorKind===`browser`?r.startingRow.browser:r.startingRow.runner}),/* @__PURE__ */ (0,Z.jsx)(`div`,{})]}):t.workers.map(e=>/* @__PURE__ */ (0,Z.jsx)(iN,{worker:e,lit:l!==`host_lost`,copy:r},e.ordinal))}),t.launchKind!==`preset`&&_!==null&&_!==``&&/* @__PURE__ */ (0,Z.jsx)(`p`,{className:`mx-4 mt-0 mb-3 line-clamp-4 text-xs leading-[1.6] text-fg-secondary`,children:_}),/* @__PURE__ */ (0,Z.jsx)(XM,{state:c,words:t.launchKind===`preset`?r.preset.stopConfirm:QM(r)}),b===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`px-4 pb-3`,children:/* @__PURE__ */ (0,Z.jsx)(K_,{children:i.byCode[`client.workflow_host_action_failed`]})}),!C&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-0 border-t border-solid border-(--color-border-light) bg-(--color-bg-tertiary) py-2 pr-3 pl-4`,children:[y&&/* @__PURE__ */ (0,Z.jsx)(oN,{resuming:b===`resuming`,onResume:()=>s==null?void 0:s.workflowHost.attach(t.workflowId),label:r.actions.resume}),!y&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`ghost`,size:`xs`,icon:/* @__PURE__ */ (0,Z.jsx)(kn,{size:14}),onClick:()=>o.openPath(t.deeplink),children:l===`completed`||t.launchKind===`preset`&&d?r.actions.openReport:t.launchKind===`preset`?r.actions.openLaunch:r.actions.open}),w&&/* @__PURE__ */ (0,Z.jsx)(I,{variant:`danger-ghost`,size:`xs`,className:t.launchKind===`preset`?`ml-auto`:void 0,icon:/* @__PURE__ */ (0,Z.jsx)(ci,{size:14}),loading:c.status===`stopping`,disabled:c.status===`stopping`,onClick:c.ask,"data-testid":`workflow-block-stop`,children:r.actions.stop}),v&&!y&&/* @__PURE__ */ (0,Z.jsx)(oN,{className:`ml-auto`,resuming:b===`resuming`,onResume:()=>s==null?void 0:s.workflowHost.attach(t.workflowId),label:r.actions.resume})]})]})}function oN({className:e,resuming:t,onResume:n,label:r}){return/* @__PURE__ */ (0,Z.jsx)(I,{variant:`primary`,size:`xs`,...e!==void 0&&{className:e},icon:/* @__PURE__ */ (0,Z.jsx)(Zr,{size:14}),loading:t,disabled:t,onClick:n,"data-testid":`workflow-block-resume`,children:r})}function sN({payload:e,phase:t,lead:n,sidePanel:r,copy:i,locale:a}){let o=rM(e,t),s=e.status===`completed`?e.end.report.notDone:null,c=e.status===`cancelled`||e.status===`failed`?[]:BM(e.findings,s,i.preset),l=WM(e,i.preset,a);return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`flex flex-col gap-2 px-4 pb-3 text-xs text-fg-secondary`,children:[o?/* @__PURE__ */ (0,Z.jsx)(HM,{text:r?i.preset.awaitingBrowser.sidePanel:i.preset.awaitingBrowser.web}):n!==null&&/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`grid grid-cols-[20px_minmax(0,1fr)] items-start gap-2`,children:[n.need?/* @__PURE__ */ (0,Z.jsx)(Tr,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-(--color-warning-text)`}):/* @__PURE__ */ (0,Z.jsx)(oi,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 text-fg-muted`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:n.need?`text-fg-primary`:void 0,children:n.text})]}),e.launch!==void 0&&/* @__PURE__ */ (0,Z.jsx)(qM,{launch:e.launch}),/* @__PURE__ */ (0,Z.jsx)(VM,{items:c}),e.status===`completed`&&/* @__PURE__ */ (0,Z.jsx)(GM,{text:e.end.report.summary,partial:!1}),l!==null&&/* @__PURE__ */ (0,Z.jsx)(GM,{text:l,partial:!0})]})}function cN(e){if(e===void 0)return null;let t=e.trim();return t===``?null:t}function lN({block:e,locked:t,stopping:n,resolved:r,onStopWaiting:i}){let a=$().shell.runWait,{commandFailures:o}=$f(),{status:s,subjects:c,toolCallId:l}=e.payload,u=J_(o,l),d=u[u.length-1],f=s===`waiting`||s===`fired`,p=s===`waiting`||s===`fired`||s===`running`;return/* @__PURE__ */ (0,Z.jsxs)(Tp,{icon:/* @__PURE__ */ (0,Z.jsx)(Lr,{size:16}),title:a.title,tileTone:p?`info`:s===`done`?`success`:`muted`,meta:/* @__PURE__ */ (0,Z.jsx)(Dp,{tone:p?`info`:s===`done`?`success`:`neutral`,role:`status`,"aria-live":`polite`,children:a.status[s]}),data:{"data-run-wait-status":s},footer:f&&!r?/* @__PURE__ */ (0,Z.jsx)(Fp,{children:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(yr,{size:14}),disabled:t,loading:n,onClick:()=>i(l),children:a.stopWaiting})}):void 0,children:[/* @__PURE__ */ (0,Z.jsx)(Mp,{children:c.map(e=>{let t=cN(e.label);return/* @__PURE__ */ (0,Z.jsx)(Np,{name:t===null?a.subject[e.kind]:t,note:t===null?a.id(e.id):`${a.subject[e.kind]} \u00B7 ${a.id(e.id)}`},`${e.kind}:${e.id}`)})}),f&&!r&&d!==void 0&&/* @__PURE__ */ (0,Z.jsx)(K_,{children:a.stopWaitingFailed})]})}var uN=(0,B.memo)(function({text:e,live:t}){let n=(0,B.useMemo)(()=>Wi(e,{cache:!t}),[e,t]),r=(0,B.useMemo)(()=>({__html:n}),[n]);return/* @__PURE__ */ (0,Z.jsx)(`div`,{dangerouslySetInnerHTML:r})}),dN={scenario:`folded`,"runner-readiness":`folded`,report:`folded`,coverage:`folded`,search:`folded`,"change-set":`open-until-decided`,"job-status":`open`,"run-start-agent":`open`,"run-in-tab-outcome":`open`,"section-link":`open`,"runner-enrollment":`open`,references:`open`},fN=8,pN={running:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--running`,done:`qa-ai-chat-acts__tick`,failed:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--failed`,unknown:`qa-ai-chat-acts__tick qa-ai-chat-acts__tick--unknown`};function mN({chips:e}){let t=e.slice(0,fN);return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__ticks`,"aria-hidden":`true`,children:[t.map(e=>/* @__PURE__ */ (0,Z.jsx)(`i`,{className:pN[e.status]},e.key)),e.length>fN&&/* @__PURE__ */ (0,Z.jsx)(`em`,{children:`+${String(e.length-fN)}`})]})}function hN({status:e}){switch(e){case`running`:return/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__spin`,"aria-hidden":`true`});case`done`:return/* @__PURE__ */ (0,Z.jsx)(We,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`failed`:return/* @__PURE__ */ (0,Z.jsx)(Dr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`});case`unknown`:return/* @__PURE__ */ (0,Z.jsx)(Tr,{className:`qa-ai-chat-chip__icon`,"aria-hidden":`true`})}}function gN({chip:e,copy:t}){return/* @__PURE__ */ (0,Z.jsxs)(`li`,{className:`qa-ai-chat-chip qa-ai-chat-chip--${e.status}`,"data-tool-name":e.toolName,"data-tool-title-state":e.titleAbsent?`absent`:`present`,"data-tool-outcome":e.status,children:[/* @__PURE__ */ (0,Z.jsx)(hN,{status:e.status}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__label`,children:e.label}),e.status===`failed`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.failed}),e.status===`unknown`&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__why`,children:t.unknown}),e.count>1&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-chip__rep`,children:`\u00D7${String(e.count)}`})]})}function _N({activity:e,copy:t,showZeroDone:n}){let r=n||e.done>0;return/* @__PURE__ */ (0,Z.jsxs)(`span`,{className:`qa-ai-chat-acts__tally`,children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:` ${t.doneShort(e.done)}`}),e.failed>0&&/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[r&&/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub`,children:`,`}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__sub qa-ai-chat-acts__sub--error`,children:` ${t.failedShort(e.failed)}`})]})]})}function vN({activity:e,thinkingWord:t,copy:n}){let[r,i]=(0,B.useState)(!1),a=yp(),o=(0,B.useId)(),{chips:s,phase:c}=e,l=s.length,u=e.failed+e.unknown>0?n.doneOf(e.done,l):n.done(l),d,f;switch(c.kind){case`running`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:c.chip.label}),/* @__PURE__ */ (0,Z.jsx)(_N,{activity:e,copy:n,showZeroDone:!1})]}),f=n.running(c.chip.label);break;case`between`:d=/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[/* @__PURE__ */ (0,Z.jsx)(`b`,{className:`qa-ai-chat-acts__lead qa-ai-chat-acts__sheen`,children:t}),/* @__PURE__ */ (0,Z.jsx)(_N,{activity:e,copy:n,showZeroDone:!0})]}),f=n.done(e.done);break;case`finished`:d=/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__lead`,children:u}),f=u}return/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-acts`,"data-testid":`ai-chat-activity-line`,"data-phase":c.kind,children:[/* @__PURE__ */ (0,Z.jsxs)(`button`,{type:`button`,className:`qa-ai-chat-acts__row`,"aria-expanded":r,"aria-controls":o,onClick:()=>{a(),i(e=>!e)},children:[/* @__PURE__ */ (0,Z.jsx)(mN,{chips:s}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-acts__text`,children:d}),c.kind===`finished`&&e.failed>0&&/* @__PURE__ */ (0,Z.jsx)(x,{className:`qa-ai-chat-acts__mark qa-ai-chat-acts__mark--error`,"aria-hidden":`true`}),c.kind===`finished`&&e.failed===0&&e.unknown>0&&/* @__PURE__ */ (0,Z.jsx)(Tr,{className:`qa-ai-chat-acts__mark`,"aria-hidden":`true`}),/* @__PURE__ */ (0,Z.jsx)(Be,{className:`qa-ai-chat-acts__chevron`,"aria-hidden":`true`})]}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,role:`status`,children:f}),/* @__PURE__ */ (0,Z.jsx)(`ul`,{className:`qa-ai-chat-acts__panel`,id:o,hidden:!r,children:s.map(e=>/* @__PURE__ */ (0,Z.jsx)(gN,{chip:e,copy:n},e.key))})]})}function yN(e,t,n){if(!t.has(e.id))return n?`running`:`unknown`;let r=t.get(e.id);return lm(r)?`failed`:um(r)?`unknown`:`done`}function bN(e,t,n){let r=new Map(e.toolResults.map(e=>[e.toolCallId,e.result])),i=[],a=null;for(let o of e.toolCalls){let e=yN(o,r,t.live),s=n(o),c=e===`running`?void 0:i.find(t=>t.label===s&&t.status===e);if(c!==void 0){c.count+=1;continue}let l={key:o.id,label:s,titleAbsent:o.title===void 0,toolName:o.toolName,status:e,count:1};i.push(l),e===`running`&&(a=l)}let o=e=>i.filter(t=>t.status===e).length;return{chips:i,phase:a===null?t.live&&t.lastAndWorking?{kind:`between`}:{kind:`finished`}:{kind:`running`,chip:a},done:o(`done`),failed:o(`failed`),unknown:o(`unknown`)}}var xN=class extends B.Component{constructor(...e){super(...e),this.state={failed:!1,attempt:0}}static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){this.props.logger.error(`chat card group failed to render`,{group:this.props.groupKey,error:e.message,componentStack:t.componentStack===null?null:t.componentStack})}render(){if(!this.state.failed)return/* @__PURE__ */ (0,Z.jsx)(SN,{children:this.props.children},this.state.attempt);let{copy:e}=this.props;return/* @__PURE__ */ (0,Z.jsx)(ak,{tone:`error`,lead:/* @__PURE__ */ (0,Z.jsx)($r,{}),role:`alert`,title:e.title,text:e.text,actions:/* @__PURE__ */ (0,Z.jsx)(I,{variant:`secondary`,size:`sm`,icon:/* @__PURE__ */ (0,Z.jsx)(ni,{size:14}),onClick:()=>this.setState(e=>({failed:!1,attempt:e.attempt+1})),children:e.retry}),testId:`ai-chat-cards-failed`})}};function SN({children:e}){return e}function CN(e,t){e.set(t.key,t)}function wN(e,t){let n=new Map((e.toolCalls===void 0?[]:e.toolCalls).map(e=>[e.id,e])),r=/* @__PURE__ */ new Map;t.forEach((e,t)=>{for(let n of e.toolCalls)r.set(n.id,t)});let i=/* @__PURE__ */ new Map;for(let t of e.toolResults===void 0?[]:e.toolResults){let e=n.get(t.toolCallId),a=r.get(t.toolCallId);if(e===void 0||a===void 0){CN(i,{kind:`unsupported`,key:`orphan:${t.toolCallId}`,placement:{kind:`after`},resultKind:dm(t.result)});continue}let o=Ek(t.result);if(o===null)continue;let s=o.family,c={call:{toolCallId:e.id,toolName:e.toolName,title:e.title,args:e.args},raw:t.result},l=o.grouping===`step`?`${s}@step${String(a)}`:`${s}@turn`,u=i.get(l);if(u!==void 0&&u.kind===`family`){u.inputs.push(c);continue}CN(i,{kind:`family`,key:l,family:s,placement:o.grouping===`message`?{kind:`after`}:{kind:`step`,index:a},inputs:[c]})}let a=(e.blocks===void 0?[]:e.blocks).flatMap(e=>e.kind===`job_status`?[{call:null,raw:e.payload}]:[]);a.length>0&&CN(i,{kind:`family`,key:`job-status@turn`,family:`job-status`,placement:{kind:`after`},inputs:a});let o=(e.toolResults??[]).flatMap(e=>{let t=om(e.result);return t===void 0?[]:t});return o.length>0&&CN(i,{kind:`family`,key:`references@turn`,family:`references`,placement:{kind:`after`},inputs:[{call:null,raw:o}]}),[...i.values()]}function TN({copy:e,locale:t,logger:n}){let r=e.shell.transcript,i=e=>[e.title===void 0?r.toolCall:e.title[t],...e.operationTitles===void 0?[]:e.operationTitles.map(e=>e[t])].join(` \u00B7 `),a=e=>{let t=e.kind===`unsupported`?/* @__PURE__ */ (0,Z.jsx)(Wp,{title:r.unknownTool.title,body:r.unknownTool.body,family:`orphan`,resultKind:e.resultKind}):/* @__PURE__ */ (0,Z.jsx)(hp,{mode:dN[e.family],children:ek[e.family].group(e.inputs,e.key)});return/* @__PURE__ */ (0,Z.jsx)(xN,{groupKey:e.key,copy:r.cardsFailed,logger:n,children:t},e.key)};return{cards(e,t){let n=t.map(()=>[]),r=[];for(let o of wN(e,t)){var i;let e=a(o);o.placement.kind===`after`?r.push(e):(i=n[o.placement.index])==null||i.push(e)}return{atStep:n.map(e=>e.length===0?null:e),afterProse:r.length===0?null:r}},activityLine(e,t){let n=bN(e,t,i);return n.chips.length===0?null:/* @__PURE__ */ (0,Z.jsx)(vN,{activity:n,thinkingWord:r.thinkingPhase,copy:r.activity})}}}function EN(e){let{copy:t,locale:n,logger:r,questions:a,confirmedCalls:o,answeredGrants:s,pendingHostCallIds:c,stoppingHostCallIds:l,refusalSentence:u,onStopWaiting:d,runWaitLocked:p,decisionProgress:m,answeredToolCallIds:h,aiTaskBlockIds:_,hiddenWorkflowId:v,conversationId:y,openConversation:b}=e,x=m!==null&&m.current!==null?m.current.toolCallId:null,S=(0,B.useMemo)(()=>TN({copy:t,locale:n,logger:r}),[t,n,r]);return(0,B.useMemo)(()=>({content:(e,t)=>/* @__PURE__ */ (0,Z.jsx)(uN,{text:e,live:t}),cards:S.cards,activityLine:S.activityLine,activity:null,blocks:e=>{var t;let n=(e.blocks??[]).filter(e=>!i(e)).filter(e=>cb(e)!==null||f(e)&&!dM(e.payload.subjects,_)||g(e)&&e.payload.workflowId!==v),r=((t=a.loadingAssistantMessageIds)==null?void 0:t.includes(e.id))===!0;return n.length===0&&!r?null:/* @__PURE__ */ (0,Z.jsxs)(Z.Fragment,{children:[n.length===0&&r&&/* @__PURE__ */ (0,Z.jsx)(Eb,{loading:!0,controller:a}),n.map(e=>{let t=cb(e);return t===null?f(e)?/* @__PURE__ */ (0,Z.jsx)(lN,{block:e,locked:p,stopping:x===e.payload.toolCallId,resolved:h.includes(e.payload.toolCallId),onStopWaiting:d},e.id):g(e)?/* @__PURE__ */ (0,Z.jsx)(aN,{blockId:e.id,payload:e.payload,state:e.state},e.id):null:/* @__PURE__ */ (0,Z.jsx)(Eb,{batch:t,controller:a,placement:`transcript`},e.id)})]})},confirmedLine:e=>tk({message:e,conversationId:y,confirmedCalls:o,copy:t.cards.runStartAgent,refusalSentence:u,pendingHostCallIds:c,stoppingHostCallIds:l,waitingForBrowser:t.shell.transcript.toolCallStatus.waitingForBrowser,stoppingBrowser:t.shell.transcript.toolCallStatus.stoppingBrowser}),answersLeadGrant:e=>e.answersLeadGrant===!0||s.has(e.id),openConversation:b,attachments:e=>e.attachments===void 0?null:/* @__PURE__ */ (0,Z.jsx)(jM,{attachments:e.attachments})}),[_,v,s,h,o,y,b,c,l,t,d,a,u,S,p,x])}var DN=`[data-testid="ai-chat-dock-stack"]`,ON=`:is(input, textarea, button)`,kN=`${ON}:not([disabled])`;function AN(e){let{request:t,consoleRef:n,historyReady:r,focusComposer:i}=e,a=(0,B.useRef)(0);(0,B.useEffect)(()=>{var e;if(t===void 0||t===0||t===a.current||!r)return;a.current=t;let o=(e=n.current)==null?void 0:e.querySelector(DN),s=o==null?[]:[...o.children],c=s.find(e=>e.querySelector(kN)!==null);if(c instanceof HTMLElement){var l;c.scrollIntoView({block:`nearest`,behavior:`smooth`}),(l=c.querySelector(kN))==null||l.focus({preventScroll:!0});return}let u=s.find(e=>e.querySelector(ON)!==null);if(u instanceof HTMLElement){u.scrollIntoView({block:`nearest`,behavior:`smooth`});return}i()},[t,r,n,i])}var jN=(0,B.memo)(function({host:e,focusRequest:t}){let n=zb(e.locale),r=bA(e);return r===null?null:/* @__PURE__ */ (0,Z.jsx)(jf,{locale:n,children:/* @__PURE__ */ (0,Z.jsx)(MN,{host:e,runtime:r,openCardFocusRequest:t})})});function MN({host:e,runtime:t,openCardFocusRequest:n}){let r=$(),a=r.shell,{session:o}=t,s=xA(t),{chat:c}=s;SA(e.leaveGuard,{unsent:s.unsentTurns.length>0,unaccepted:s.holdsUnacceptedTurns});let l=Q(),u=zb(e.project),d=zb(e.readiness),f=zb(e.visibility),p=Vb(e.browser===null?null:e.browser.activeTabUrl),[m]=(0,B.useState)(cS),[h,g]=(0,B.useState)(0),[_,v]=(0,B.useState)(!1),[y,b]=(0,B.useState)(!1),[x,S]=(0,B.useState)(0),{register:C,dockEntries:w,tether:T,focusRequest:E,focusComposer:D}=_g({chat:c}),O=vg({chat:c,decisionProgress:s.decisionProgress}),ee=u===null?null:u.id;(0,B.useEffect)(()=>{o.setProject(ee)},[ee,o]);let k=d.kind===`ready`;(0,B.useEffect)(()=>{k&&o.reloadCapabilities()},[k,o]);let{capabilityChanges:A}=e;(0,B.useEffect)(()=>{if(k&&A!==null)return A.subscribe(()=>o.reloadCapabilities())},[k,A,o]);let j=TA({session:o,store:e.modelSelection,capabilityLoad:s.capabilityLoad}),M=ik({runtime:t,source:e.conversationContext,conversationId:s.conversationId}),N=eC(c.messages),te=vk({transport:e.transport,stopOutcomes:t.stopOutcomes,conversationId:s.conversationId,messages:c.messages,confirmedCalls:N.confirmedCalls,historyLoading:s.historyLoad.status===`loading`}),ne=te.pendingIds,{forgetResolvedConfirmations:re}=N;(0,B.useEffect)(()=>{re()},[s.conversationId,re]),nx({transport:e.transport,logger:e.logger,entityChanged:e.entityChanged});let ie=PA({transport:e.transport,logger:e.logger,conversationId:s.conversationId,recordResolvedConfirmation:N.recordResolvedConfirmation}),ae=OM({conversationId:s.conversationId,historyLoad:s.historyLoad,launchLevels:t.launchLevels,capabilityLoad:s.capabilityLoad}),oe=e.conversationPin,se=oe!==null,ce=Vb(oe===null?null:oe.placeholder),le=Sv({http:e.http,ready:k}),ue=jA({session:o,conversationId:s.conversationId,messages:c.messages,restoredBatchIds:s.restoredQuestionBatchIds,locale:l,logger:e.logger}),{forSend:P}=ae,{send:de,prepareSend:fe,sendPrepared:pe,retryLastTurn:me}=AM({session:o,pin:oe,launchEffortForSend:P,launchPlace:le}),he=(0,B.useCallback)(()=>{te.markStopping(),o.stop()},[te.markStopping,o]),ge=(0,B.useCallback)(e=>{b(!1),o.openConversation(e)},[o]),{resetNewConversation:_e}=ae,ve=(0,B.useCallback)(()=>{b(!1),m.set(``),S(e=>e+1),_e(),o.startNewConversation()},[m,o,_e]),ye=s.decisionProgress,be=ia(c)||ye!==null,xe=c.answeredToolCallIds,Se=(0,B.useMemo)(()=>({subscribe:t=>e.transport.subscribe(e=>{e.kind===`task-card`&&t(e.event)})}),[e.transport]),F=wM(e.browser),Ce=SM({http:e.http,logger:e.logger,active:F!==null&&d.kind===`ready`,projectId:ee,visible:f,conversationId:s.conversationId}),we=(0,B.useMemo)(()=>({project:u,navigation:e.navigation,http:e.http,conversation:{send:e=>{de(e,`external`,[])},setDraft:m.set,changeSetDecision:{register:C,decide:(e,t)=>{t===`confirm`?o.confirmChangeSet(e):o.rejectChangeSet(e)},isLocked:O,progress:ye,isResolved:e=>xe.includes(e),tether:T}},browser:e.browser===null||F===null?null:{runFailures:s.browserRunFailures,workflowHost:F},commandFailures:s.commandFailures,taskEvents:Se,jobStatus:t.jobStatus,viewer:t.viewer,dispatchRefusalSentence:e.dispatchRefusalSentence,logger:e.logger}),[e,u,t.jobStatus,t.viewer,O,ye,m,xe,T,C,o,de,s.browserRunFailures,s.commandFailures,Se,F]),Te=(0,B.useMemo)(()=>/* @__PURE__ */ new Set([...c.pendingConfirmations.map(e=>e.toolCallId),...c.answeredToolCallIds]),[c.answeredToolCallIds,c.pendingConfirmations]),[Ee]=(0,B.useState)(qA),De=(0,B.useMemo)(()=>Ee(c.messages,Te),[Ee,c.messages,Te]),Oe=Rb({conversationId:s.conversationId,messages:De}),ke=Pa(c).length,Ae=(0,B.useMemo)(()=>ke===De.length?De:De.slice(De.length-ke),[De,ke]),je=(0,B.useMemo)(()=>De.slice(0,De.length-ke),[De,ke]),{loadOlderHistory:Me}=o,Ne=s.olderHistory.status,Pe=(0,B.useMemo)(()=>({status:Ne,load:Me,copy:a.transcript.olderHistory}),[Ne,Me,a.transcript.olderHistory]),Fe=(0,B.useCallback)(e=>o.rejectRunWait(e),[o]),Ie=nk(c.pendingConfirmations,N.confirmedCalls),{aiTaskBlockIds:Le,hiddenWorkflowId:Re}=CM(c.messages,oe),ze=EN({copy:r,locale:l,logger:e.logger,questions:ue,confirmedCalls:N.confirmedCalls,answeredGrants:Ie,pendingHostCallIds:ne,stoppingHostCallIds:te.stoppingIds,refusalSentence:e.dispatchRefusalSentence,onStopWaiting:Fe,runWaitLocked:be,decisionProgress:ye,answeredToolCallIds:c.answeredToolCallIds,aiTaskBlockIds:Le,hiddenWorkflowId:Re,conversationId:s.conversationId,openConversation:ge}),Be=(0,B.useMemo)(()=>HA({errors:r.errors,classes:a.errors.classes}),[r.errors,a.errors.classes]),Ve=c.error===null?null:c.error.errorCode??null;(0,B.useEffect)(()=>{Ve!==null&&Fu.has(Ve)&&o.reloadCapabilities()},[Ve,o]);let He=(0,B.useMemo)(()=>{if(c.error===null)return null;let e=Iu(c.error);return e.errorCode!==null&&Pu.has(e.errorCode)||e.errorCode===`chat.busy`&&_?null:{error:e,presentation:Be(e),onRetry:me}},[_,c.error,Be,me]),Ue=(0,B.useMemo)(()=>({byline:a.header.title,thinking:{thinking:a.transcript.thinking,thoughtFor:a.transcript.thoughtFor},thinkingPhase:a.transcript.thinkingPhase,toolCallCancelled:a.transcript.toolCallCancelled,toolCallStatus:a.transcript.toolCallStatus,copyAnswer:a.transcript.copyAnswer,retry:a.transcript.retry,details:a.transcript.details,feedLabel:a.transcript.feedLabel,scrollToBottom:a.transcript.scrollToBottom,leadProse:{byline:se?a.transcript.taskLeadByline:a.transcript.leadByline,formatTime:e=>UC(e,l)}}),[a,l,se]),We=De.length===0&&!c.isStreaming&&s.historyLoad.status!==`loading`?Yb({report:M.report,copy:a,locale:l}):null,Ge=(0,B.useRef)(null);AN({request:n,consoleRef:Ge,historyReady:s.conversationId!==null&&s.historyLoad.status===`idle`,focusComposer:D});let Ke=[...c.messages.flatMap(e=>e.blocks??[]),...Object.values(c.pendingMessageBlocks).flat()].filter(i).flatMap(e=>{let t=cb(e);return t===null?[]:[t]}),qe=e=>{var t,n;let r=Ke.find(t=>t.origin===`agent`&&t.asker.kind===`workflow`&&t.asker.id===e&&t.assumption===null);if(r===void 0)return;let i=((t=Ge.current)==null?void 0:t.querySelectorAll(`[data-testid="ai-chat-dock"] [data-asker-kind="workflow"]`))??[],a=Array.from(i).find(t=>t.dataset.askerId===e&&t.dataset.questionBatchId===r.id);a!==void 0&&(a.scrollIntoView({block:`nearest`,behavior:`smooth`}),(n=a.querySelector(`:is(input, textarea, button):not([disabled])`))==null||n.focus({preventScroll:!0}))},Je=Lu(c.messages),Ye=!c.isStreaming&&(s.canRecoverDanglingTurn||Ve===`assistant.recover_last_message`),Xe=s.commandFailures.filter(e=>e.command===`chat-stop`),Ze=Xe[Xe.length-1],Qe=M.report===null?null:/* @__PURE__ */ (0,Z.jsx)(rk,{label:a.context.report.label,icon:/* @__PURE__ */ (0,Z.jsx)(Sr,{}),title:Gb(M.report.context,a.context.report),tags:Kb(M.report,a.context.report),note:a.context.report.note,testId:`ai-chat-report-context`}),$e=s.isComposerInteractive&&d.kind===`ready`,I=s.conversationId===null&&s.permissionMode.kind===`unknown`,et=$e&&!I,tt=io(c),nt=s.canSendChatTurn&&!tt,rt=DA({session:o,view:s.permissionMode,ready:$e,newConversation:s.conversationId===null,visible:f}),it=s.capabilityLoad.status===`ready`?s.capabilityLoad.value:null,at=it===null?null:oe===null?Kn(it,s.modelSelectionId,ie):zn(it,oe.leadModel),ot=oe===null||oe.level.effort!==`max`,st=sS({host:e,projectId:ee,model:at===null?null:at.model,resetKey:x,accepting:et&&ot}),ct=/* @__PURE__ */ (0,Z.jsx)(lx,{capabilities:s.capabilityLoad,selectionId:s.modelSelectionId,onSelect:j,resolvedEcho:ie,overrideRejected:s.modelSelectionRejected!==null,isStreaming:c.isStreaming,onManageKeys:()=>e.navigation.openPath(dx(`ai-keys`)),onUpgrade:()=>e.navigation.openPath(dx(`billing-plan`)),openRequest:st.modelListRequest,flagged:st.modelFlagged});return/* @__PURE__ */ (0,Z.jsx)(Qf,{value:we,children:/* @__PURE__ */ (0,Z.jsx)(`div`,{className:`qa-ai-chat-panel`,"data-testid":`ai-chat`,...st.drop.handlers,children:/* @__PURE__ */ (0,Z.jsxs)(Uf,{http:e.http,logger:e.logger,conversationId:s.conversationId,children:[e.chrome===null?null:e.chrome.resizeHandle,/* @__PURE__ */ (0,Z.jsx)(rx,{projectName:u===null?null:u.name,pinned:e.conversationPin,historyOpen:y,historyAvailable:u!==null,onOpenHistory:()=>b(!0),onNewConversation:ve,hostActions:e.chrome===null?null:e.chrome.headerActions,copy:a.header}),F!==null&&/* @__PURE__ */ (0,Z.jsx)(hM,{launches:Ce.launches,messages:c.messages,workflowHost:F,openPath:t=>e.navigation.openPath(t),onAttachSettled:Ce.reread}),/* @__PURE__ */ (0,Z.jsx)(wk,{connection:{connectionStatus:s.connectionStatus,labels:{reconnecting:a.connection.reconnecting,restored:a.connection.restored,failedTitle:a.connection.failedTitle,failedText:a.connection.failedHint[e.connectionFailedHint]}},readiness:d,capabilities:zu(s.capabilityLoad),onReloadCapabilities:()=>o.reloadCapabilities(),unsent:{turns:s.unsentTurns,canSend:nt,onSend:e=>{o.sendUnsentTurn(e)},onDiscard:e=>o.discardUnsentTurn(e),cause:Ve===Nu?r.errors.byCode[Nu]:null,filesOf:Xf({models:it,locale:l,copy:r.attachments,logger:e.logger})},interruptedTurnId:Ye?Je:null,reportInitializing:Ve===`reports.projection_not_initialized`,onRetryLastTurn:me,historyFailed:s.historyLoad.status===`failed`&&!s.historyLoad.notFound,onRetryHistory:()=>{s.historyLoad.status===`failed`&&o.openConversation(s.historyLoad.conversationId)},stopFailure:Ze===void 0?null:Ze,permissionWriteFailure:rt.failure,permissionReadFailure:rt.readFailure,pageScan:e.browser===null?null:{status:s.pageAnalysis.status,failureReason:s.pageAnalysis.failureReason,tabUrl:p},context:Qe,copy:a}),/* @__PURE__ */ (0,Z.jsx)(pg,{messages:je}),/* @__PURE__ */ (0,Z.jsx)(zj,{messages:Ae,isStreaming:c.isStreaming,liveThinkingText:c.thinkingText,awaitingConfirmation:c.pendingConfirmations.length>0,error:He,empty:We===null?null:/* @__PURE__ */ (0,Z.jsx)(Zb,{welcome:We,draftStore:m,onSend:e=>{de(e,`external`,[])},onInsert:e=>{m.set(e),g(e=>e+1)}}),renderers:ze,copy:Ue,presentError:Be,shown:e.shown,olderHistory:Pe}),/* @__PURE__ */ (0,Z.jsxs)(`div`,{className:`qa-ai-chat-console`,ref:Ge,children:[/* @__PURE__ */ (0,Z.jsx)(mM,{messages:c.messages,workflowHost:F,onToQuestion:qe}),/* @__PURE__ */ (0,Z.jsx)(Ab,{regionLabel:a.confirmation.regionLabel,conversationId:s.conversationId,questions:Ke,questionController:ue,changeSets:w,isDecisionLocked:O,decisionProgress:ye,onChangeSetDecision:(e,t)=>{t===`confirm`?o.confirmChangeSet(e):o.rejectChangeSet(e)},onConfirmAll:(e,t)=>o.confirmAll([...e,...t],t),changeSetTether:T,onFocusComposer:D,launchDraft:Oe,confirmation:c.pendingConfirmations.length>0?{items:c.pendingConfirmations,onConfirm:e=>o.confirm(e),onReject:e=>o.reject(e)}:null}),/* @__PURE__ */ (0,Z.jsx)(Gf,{messages:De,filesBefore:c.historyWindow.filesBefore,model:at===null?null:at.model,onPickModel:oe===null?st.openModelList:null}),/* @__PURE__ */ (0,Z.jsx)(zS,{draftStore:m,isStreaming:tt,pendingHostAction:ne.size>0,interactive:et,placeholder:Ru(d,s,a.composer,ce),errorCode:Ve,prepareSend:fe,sendPrepared:pe,stop:he,autoFocus:f,fillRequest:h,focusRequest:E,chips:oe===null?{modelPicker:ct,effortChip:/* @__PURE__ */ (0,Z.jsx)(on,{choice:ae.choice,facts:ae.facts,onChoose:ae.choose,onAgentsChange:ae.setAgents,onOpenSettings:()=>e.navigation.openPath(dx(`ai-keys`)),copy:a.composer.effort,look:{kind:`setting`,chipMaxShort:a.composer.effort.chipMaxShort}}),placeChip:/* @__PURE__ */ (0,Z.jsx)(Bg,{place:le.place,view:le.view,fleet:le.fleet,onChoose:le.choose,onOpen:le.reloadFleet,copy:a.composer.place,heading:!0,thisBrowserReach:e.browser===null?`tasks_only`:`opens_windows`,look:`setting`}),permission:rt.composer}:null,files:ot?{attachments:st.attachments,onPickModel:oe===null?st.openModelList:null}:null,onBusyChainChange:v,copy:a.composer}),/* @__PURE__ */ (0,Z.jsx)(`span`,{className:`qa-ai-chat-sr-only`,"aria-live":`polite`,"data-testid":`ai-chat-permission-live`,children:rt.announced===null?``:a.composer.permission.arrived(a.composer.permission[rt.announced])})]}),st.drop.active&&/* @__PURE__ */ (0,Z.jsx)(fx,{copy:a.composer.attachments.drop}),y&&u!==null&&e.conversationPin===null&&/* @__PURE__ */ (0,Z.jsx)(gk,{http:e.http,logger:e.logger,projectId:u.id,currentConversationId:s.conversationId,locale:l,copy:a.history,dismissLabel:a.notices.dismiss,onClose:()=>b(!1),onOpen:ge,onNewConversation:ve})]})})})}var NN=vt([`pending`,`resolved`,`dismissed`]),PN=vt([`mapping_low_confidence`,`mapping_grey_zone`,`mapping_fallback_failed`,`mapping_has_alternatives`,`user_question`,`execution_failed`,`element_disappeared`,`element_label_changed`,`element_uncertain_match`,`description_conflict`,`duplicate_suspected`,`er_mapping_grey`,`agent_blocked`,`captcha_required`,`heal_loop_detected`,`heal_proposal_pending`,`step_intent_too_broad`,`invalid_step_text`]),FN=[`user_question`,`captcha_required`];function IN(e){return FN.includes(e)}var LN=vt([`confirmed`,`overridden`,`dismissed`,`mark_for_rerun`]);z({scenarioId:xt(),status:NN.default(`pending`),cursor:L().optional(),limit:st().int().min(1).max(500).default(50)});var RN=z({id:xt(),runId:xt().nullable(),scenarioId:xt().nullable(),stepId:xt().nullable(),kind:PN,title:L(),detailPayload:At(),status:NN,resolution:LN.nullable(),resolutionPayload:At().nullable(),resolvedAt:L().datetime().nullable(),resolvedBy:xt().nullable(),createdAt:L().datetime(),updatedAt:L().datetime()});z({items:yt(RN),nextCursor:L().nullable(),total:R().int().nonnegative()}),z({id:xt()});var zN=z({elementId:xt().optional(),pageId:xt().optional(),note:L().max(2e3).optional()});z({resolution:LN,resolutionPayload:zN.default({})}).refine(e=>e.resolution!==`overridden`||e.resolutionPayload.elementId!==void 0&&e.resolutionPayload.pageId!==void 0,{message:`elementId and pageId are required for resolution='overridden'`}),z({reviewItemId:xt(),status:vt([`resolved`,`dismissed`]),resolvedAt:L().datetime(),resolvedBy:xt(),mapping:z({mappingId:xt(),pageId:xt().nullable(),elementId:xt().nullable(),source:zt(`user`)}).optional()});function BN(e){switch(e){case`element_text`:case`element_attribute`:return`element`;case`url_pathname`:case`url_href`:return`url`;case`response_body`:case`response_header`:case`response_status`:return`response`;default:throw Error(`Unknown extraction source: ${String(e)}`)}}var VN=vt([`browser`,`device`]);function HN(e){return e.actionType===`text_step`&&e.executionPlace===`device`}function UN(e){return e.some(e=>{var t;return HN(e)||(((t=e.sharedStep)==null?void 0:t.steps.some(e=>HN(e)))??!1)})}var WN=`text_step`,GN=[`element`,`page`,`canvas`],KN=`element`,qN=`page`,JN=KN;function YN(e){return e.some(e=>BN(e.sourceType)===`element`)}function XN(e){return e.actionType===`shared_step`||e.sharedStepRefId||e.sharedStepId||e.actionType===`api_call`?qN:e.actionType===`text_step`?JN:e.actionType===`extract_variable`&&e.extractionVariables!==void 0&&e.extractionVariables.length>0?YN(e.extractionVariables)?KN:qN:null}function ZN(e){let t=XN(e);if(t===null)throw Error(`Cannot derive targetType for ${e.actionType}: its create payload is incomplete`);return t}var QN=[`navigate`,WN,`shared_step`,`api_call`],$N=[`assert`];function eP(e){return QN.some(t=>t===e.actionType)?!1:$N.some(t=>t===e.actionType)?!0:e.targetType===KN}var tP=[`agent`,`replay`],nP=Bt({id:xt(),status:at,abortReason:it.nullable(),abortParams:Lt([pt,_t()])});export{wr as $,ku as A,ti as B,ng as C,Vh as D,qh as E,li as F,Lr as G,Zr as H,ci as I,Pr as J,Ir as K,oi as L,Ho as M,fi as N,Rh as O,di as P,Tr as Q,ii as R,Cg as S,Hh as T,Vr as U,$r as V,Rr as W,jr as X,Mr as Y,Dr as Z,Pg as _,eP as a,ar as at,xg as b,UN as c,Jj as d,yr as et,Xj as f,o_ as g,$v as h,ZN as i,ir as it,_u as j,Mu as k,IN as l,JD as m,tP as n,mr as nt,VN as o,$n as ot,sO as p,Fr as q,GN as r,sr as rt,HN as s,nP as t,vr as tt,jN as u,kg as v,Uh as w,wg as x,Sg as y,ni as z};
|