@questdb/web-console 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b as r,B as ue,t as _e,C as He,e as Ze,d as Dt,f as q,g as Ra,h as yt,i as xt,k as Tt,l as za,m as $a,n as Ft,o as Ba,q as be,r as wt,v as Rt,w as Wa,T as Qa,x as zt,y as $t,z as Oa,D as Bt,S as Ka,L as Pe,E as Pa,F as de,G as Wt,H as Ct,I as Ua,J as Ga,M as Ae,N as bt,O as Xa,P as Ya,R as At,U as Fe,V as Ja,W as Qt,X as en,Y as tn,Z as an,_ as nn,$ as rn,a0 as sn,a1 as on,a2 as ln,a3 as dn,a4 as Ot,a5 as cn,a6 as hn,a7 as mn,a8 as ge,a9 as un,aa as gn,ab as pn,ac as fn,ad as Kt,ae as Re,af as yn,ag as xn,ah as wn,ai as Ue,aj as Ge,ak as Xe,al as Ye,am as Je,an as Cn,ao as bn,ap as An,aq as vn,ar as kn,as as Mn,at as jn,au as _n,av as st,aw as Pt,ax as Hn,ay as En,az as In,aA as Nn}from"./index-zPfXTse8.js";import{b as e,E as Ee,H as i,Z as vt,R as ot,C as re,U as Vn,D as Ut}from"./vendor-BhHVTKlu.js";const Zn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),Sn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),qn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M88,128a16,16,0,1,1,16,16A16,16,0,0,1,88,128Zm64,16a16,16,0,1,0-16-16A16,16,0,0,0,152,144Zm84-80V192a20,20,0,0,1-20,20H84.47L53,239.17l-.12.11A19.91,19.91,0,0,1,40.05,244a20.14,20.14,0,0,1-8.49-1.9A19.82,19.82,0,0,1,20,224V64A20,20,0,0,1,40,44H216A20,20,0,0,1,236,64Zm-24,4H44V215.23l28.16-24.32A11.93,11.93,0,0,1,80,188H212Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),e.createElement("path",{d:"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58-54V192a14,14,0,0,1-14,14H82.23L49.07,234.64l-.06.05A13.87,13.87,0,0,1,40,238a14.11,14.11,0,0,1-5.95-1.33A13.88,13.88,0,0,1,26,224V64A14,14,0,0,1,40,50H216A14,14,0,0,1,230,64Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V224a2,2,0,0,0,3.26,1.55l34.82-30.08A6,6,0,0,1,80,194H216a2,2,0,0,0,2-2Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56-56V192a12,12,0,0,1-12,12H81.49L47.76,233.13l0,0A11.89,11.89,0,0,1,40,236a12.17,12.17,0,0,1-5.1-1.14A11.89,11.89,0,0,1,28,224V64A12,12,0,0,1,40,52H216A12,12,0,0,1,228,64Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V224a4,4,0,0,0,6.56,3.08L77.38,197A4,4,0,0,1,80,196H216a4,4,0,0,0,4-4Z"}))]]),Ln=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Dn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236,137A108.13,108.13,0,1,1,119,20,12,12,0,0,1,121,44,84.12,84.12,0,1,0,212,135,12,12,0,1,1,236,137ZM116,76v52a12,12,0,0,0,12,12h52a12,12,0,0,0,0-24H140V76a12,12,0,0,0-24,0Zm92,20a16,16,0,1,0-16-16A16,16,0,0,0,208,96ZM176,64a16,16,0,1,0-16-16A16,16,0,0,0,176,64Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,96a12,12,0,1,1,12,12A12,12,0,0,1,208,96ZM196,72a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm28.66,56a8,8,0,0,0-8.63,7.31A88.12,88.12,0,1,1,120.66,40,8,8,0,0,0,119.34,24,104.12,104.12,0,1,0,232,136.66,8,8,0,0,0,224.66,128ZM128,56a72,72,0,1,1-72,72A72.08,72.08,0,0,1,128,56Zm-8,72a8,8,0,0,0,8,8h48a8,8,0,0,0,0-16H136V80a8,8,0,0,0-16,0Zm40-80a12,12,0,1,0-12-12A12,12,0,0,0,160,48Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M230,136.49A102.12,102.12,0,1,1,119.51,26a6,6,0,0,1,1,12A90.13,90.13,0,1,0,218,135.51a6,6,0,1,1,12,1ZM122,72v56a6,6,0,0,0,6,6h56a6,6,0,0,0,0-12H134V72a6,6,0,0,0-12,0Zm38-26a10,10,0,1,0-10-10A10,10,0,0,0,160,46Zm36,24a10,10,0,1,0-10-10A10,10,0,0,0,196,70Zm24,36a10,10,0,1,0-10-10A10,10,0,0,0,220,106Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,136.33A100.13,100.13,0,1,1,119.67,28a4,4,0,1,1,.66,8A92.13,92.13,0,1,0,220,135.67a4,4,0,1,1,8,.66ZM128,132h56a4,4,0,0,0,0-8H132V72a4,4,0,0,0-8,0v56A4,4,0,0,0,128,132Zm32-88a8,8,0,1,0-8-8A8,8,0,0,0,160,44Zm36,24a8,8,0,1,0-8-8A8,8,0,0,0,196,68Zm24,36a8,8,0,1,0-8-8A8,8,0,0,0,220,104Z"}))]]),Tn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z"}))]]),Fn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M51.51,104.49l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,1,1,17,17L45,64,68.49,87.51a12,12,0,0,1-17,17Zm48,0a12,12,0,0,0,17,0l32-32a12,12,0,0,0,0-17l-32-32a12,12,0,1,0-17,17L123,64,99.51,87.51A12,12,0,0,0,99.51,104.49ZM200,36H180a12,12,0,0,0,0,24h16V196H60V140a12,12,0,0,0-24,0v60a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M152,32V96a16,16,0,0,1-16,16H32A16,16,0,0,1,16,96V32A16,16,0,0,1,32,16H136A16,16,0,0,1,152,32Z",opacity:"0.2"}),e.createElement("path",{d:"M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,40H168a16,16,0,0,0-16-16H32A16,16,0,0,0,16,40v80a16,16,0,0,0,16,16h8v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40ZM106.34,61.66a8,8,0,0,1,11.32-11.32l24,24a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L124.69,80Zm-64,24a8,8,0,0,1,0-11.32l24-24A8,8,0,0,1,77.66,61.66L59.31,80,77.66,98.34a8,8,0,0,1-11.32,11.32ZM200,200H56V136h96a16,16,0,0,0,16-16V56h32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M59.76,100.24l-32-32a6,6,0,0,1,0-8.48l32-32a6,6,0,1,1,8.48,8.48L40.49,64,68.24,91.76a6,6,0,1,1-8.48,8.48Zm40,0a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0,0-8.48l-32-32a6,6,0,1,0-8.48,8.48L127.51,64,99.76,91.76A6,6,0,0,0,99.76,100.24ZM200,42H176a6,6,0,0,0,0,12h24a2,2,0,0,1,2,2V200a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V136a6,6,0,0,0-12,0v64a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M61.17,98.83l-32-32a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,5.66L37.66,64,66.83,93.17a4,4,0,0,1-5.66,5.66Zm40,0a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0,0-5.66l-32-32a4,4,0,0,0-5.66,5.66L130.34,64,101.17,93.17A4,4,0,0,0,101.17,98.83ZM200,44H176a4,4,0,0,0,0,8h24a4,4,0,0,1,4,4V200a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V136a4,4,0,0,0-8,0v64a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Z"}))]]),Rn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M209.88,69.83A115.19,115.19,0,0,0,128,36h-.41C63.85,36.22,12,88.76,12,153.13V176a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V152A115.25,115.25,0,0,0,209.88,69.83ZM220,172H127.32l46.44-65A12,12,0,1,0,154.24,93L97.82,172H36V153.13c0-1.72,0-3.43.14-5.13H56a12,12,0,0,0,0-24H40.62c10.91-33.39,40-58.52,75.38-63.21V80a12,12,0,0,0,24,0V60.8A92,92,0,0,1,215.66,124H200a12,12,0,0,0,0,24h19.9c.06,1.33.1,2.66.1,4Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,152v24a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V153.13C24,95.65,70.15,48.2,127.63,48A104,104,0,0,1,232,152Z",opacity:"0.2"}),e.createElement("path",{d:"M207.06,72.67A111.24,111.24,0,0,0,128,40h-.4C66.07,40.21,16,91,16,153.13V176a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V152A111.25,111.25,0,0,0,207.06,72.67ZM224,176H119.71l54.76-75.3a8,8,0,0,0-12.94-9.42L99.92,176H32V153.13c0-3.08.15-6.12.43-9.13H56a8,8,0,0,0,0-16H35.27c10.32-38.86,44-68.24,84.73-71.66V80a8,8,0,0,0,16,0V56.33A96.14,96.14,0,0,1,221,128H200a8,8,0,0,0,0,16h23.67c.21,2.65.33,5.31.33,8Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240,152v24a16,16,0,0,1-16,16H115.93a4,4,0,0,1-3.24-6.35L174.27,101a8.21,8.21,0,0,0-1.37-11.3,8,8,0,0,0-11.37,1.61l-72,99.06A4,4,0,0,1,86.25,192H32a16,16,0,0,1-16-16V153.13c0-1.79,0-3.57.13-5.33a4,4,0,0,1,4-3.8H48a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,47.73,128H23.92a4,4,0,0,1-3.87-5c12-43.84,49.66-77.13,95.52-82.28a4,4,0,0,1,4.43,4V72a8,8,0,0,0,8.53,8A8.17,8.17,0,0,0,136,71.73V44.67a4,4,0,0,1,4.43-4A112.18,112.18,0,0,1,236.23,123a4,4,0,0,1-3.88,5H208.27a8.17,8.17,0,0,0-8.25,7.47,8,8,0,0,0,8,8.53h27.92a4,4,0,0,1,4,3.86C240,149.23,240,150.61,240,152Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.65,74.08A109.26,109.26,0,0,0,128,42h-.39C67.17,42.21,18,92.06,18,153.13V176a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V152A109.3,109.3,0,0,0,205.65,74.08ZM226,176a2,2,0,0,1-2,2H115.78l57.07-78.47a6,6,0,0,0-9.7-7.06L100.94,178H32a2,2,0,0,1-2-2V153.13A102.36,102.36,0,0,1,30.62,142H56a6,6,0,0,0,0-12H32.71C42.6,88.4,78.53,56.86,122,54.19V80a6,6,0,0,0,12,0V54.19A98.05,98.05,0,0,1,223.53,130H200a6,6,0,0,0,0,12h25.5c.33,3.3.5,6.64.5,10Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M207.06,72.67A111.24,111.24,0,0,0,128,40h-.4C66.07,40.21,16,91,16,153.13V176a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V152A111.25,111.25,0,0,0,207.06,72.67ZM224,176H119.71l54.76-75.3a8,8,0,0,0-12.94-9.42L99.92,176H32V153.13c0-3.08.15-6.12.43-9.13H56a8,8,0,0,0,0-16H35.27c10.32-38.86,44-68.24,84.73-71.66V80a8,8,0,0,0,16,0V56.33A96.14,96.14,0,0,1,221,128H200a8,8,0,0,0,0,16h23.67c.21,2.65.33,5.31.33,8Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.23,75.5A107.37,107.37,0,0,0,127.62,44C68.28,44.21,20,93.16,20,153.13V176a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V152A107.25,107.25,0,0,0,204.23,75.5ZM228,176a4,4,0,0,1-4,4H111.85l59.38-81.65a4,4,0,1,0-6.46-4.7L102,180H32a4,4,0,0,1-4-4V153.13A103.42,103.42,0,0,1,28.84,140H56a4,4,0,0,0,0-8H30.21C39.59,87.66,77.84,53.93,124,52.09V80a4,4,0,0,0,8,0V52.08A100.08,100.08,0,0,1,226,132H200a4,4,0,0,0,0,8h27.29a101.6,101.6,0,0,1,.71,12Z"}))]]),zn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M71.51,144.49a12,12,0,0,1,0-17l24-24a12,12,0,0,1,17,17L109,124h55V104a12,12,0,0,1,24,0v32a12,12,0,0,1-12,12H109l3.52,3.51a12,12,0,0,1-17,17ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),e.createElement("path",{d:"M184,104v32a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Zm48-48V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-32,96a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M182,104v32a6,6,0,0,1-6,6H94.48l13.76,13.76a6,6,0,1,1-8.48,8.48l-24-24a6,6,0,0,1,0-8.48l24-24a6,6,0,0,1,8.48,8.48L94.48,130H170V104a6,6,0,0,1,12,0Zm48-48V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M184,104v32a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Zm48-48V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M180,104v32a4,4,0,0,1-4,4H89.66l17.17,17.17a4,4,0,0,1-5.66,5.66l-24-24a4,4,0,0,1,0-5.66l24-24a4,4,0,0,1,5.66,5.66L89.66,132H172V104a4,4,0,0,1,8,0Zm48-48V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z"}))]]),$n=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),e.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Bn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),Gt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Zn}));Gt.displayName="ArrowCounterClockwiseIcon";const Xt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Sn}));Xt.displayName="ArrowUpIcon";const Yt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:qn}));Yt.displayName="ChatDotsIcon";const Jt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Ln}));Jt.displayName="ChatTextIcon";const ea=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Dn}));ea.displayName="ClockCountdownIcon";const ta=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Tn}));ta.displayName="ClockCounterClockwiseIcon";const aa=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Fn}));aa.displayName="CodeBlockIcon";const na=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Rn}));na.displayName="GaugeIcon";const ra=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:zn}));ra.displayName="KeyReturnIcon";const ia=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:$n}));ia.displayName="MagnifyingGlassIcon";const sa=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Bn}));sa.displayName="TrashSimpleIcon";const Wn=i(q).attrs({alignItems:"center",gap:"0"}).withConfig({displayName:"ExplainQueryButton__KeyBinding"})([`
|
|
1
|
+
import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b as r,B as ue,t as _e,C as He,e as Ze,d as Dt,f as q,g as Ra,h as yt,i as xt,k as Tt,l as za,m as $a,n as Ft,o as Ba,q as be,r as wt,v as Rt,w as Wa,T as Qa,x as zt,y as $t,z as Oa,D as Bt,S as Ka,L as Pe,E as Pa,F as de,G as Wt,H as Ct,I as Ua,J as Ga,M as Ae,N as bt,O as Xa,P as Ya,R as At,U as Fe,V as Ja,W as Qt,X as en,Y as tn,Z as an,_ as nn,$ as rn,a0 as sn,a1 as on,a2 as ln,a3 as dn,a4 as Ot,a5 as cn,a6 as hn,a7 as mn,a8 as ge,a9 as un,aa as gn,ab as pn,ac as fn,ad as Kt,ae as Re,af as yn,ag as xn,ah as wn,ai as Ue,aj as Ge,ak as Xe,al as Ye,am as Je,an as Cn,ao as bn,ap as An,aq as vn,ar as kn,as as Mn,at as jn,au as _n,av as st,aw as Pt,ax as Hn,ay as En,az as In,aA as Nn}from"./index-BsTZY3jV.js";import{b as e,E as Ee,H as i,Z as vt,R as ot,C as re,U as Vn,D as Ut}from"./vendor-BhHVTKlu.js";const Zn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),Sn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,112H56l72-72Z",opacity:"0.2"}),e.createElement("path",{d:"M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"}))]]),qn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M88,128a16,16,0,1,1,16,16A16,16,0,0,1,88,128Zm64,16a16,16,0,1,0-16-16A16,16,0,0,0,152,144Zm84-80V192a20,20,0,0,1-20,20H84.47L53,239.17l-.12.11A19.91,19.91,0,0,1,40.05,244a20.14,20.14,0,0,1-8.49-1.9A19.82,19.82,0,0,1,20,224V64A20,20,0,0,1,40,44H216A20,20,0,0,1,236,64Zm-24,4H44V215.23l28.16-24.32A11.93,11.93,0,0,1,80,188H212Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),e.createElement("path",{d:"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM84,140a12,12,0,1,1,12-12A12,12,0,0,1,84,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm44,0a12,12,0,1,1,12-12A12,12,0,0,1,172,140Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM84,118a10,10,0,1,0,10,10A10,10,0,0,0,84,118Zm88,0a10,10,0,1,0,10,10A10,10,0,0,0,172,118Zm58-54V192a14,14,0,0,1-14,14H82.23L49.07,234.64l-.06.05A13.87,13.87,0,0,1,40,238a14.11,14.11,0,0,1-5.95-1.33A13.88,13.88,0,0,1,26,224V64A14,14,0,0,1,40,50H216A14,14,0,0,1,230,64Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V224a2,2,0,0,0,3.26,1.55l34.82-30.08A6,6,0,0,1,80,194H216a2,2,0,0,0,2-2Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128ZM84,140a12,12,0,1,0-12-12A12,12,0,0,0,84,140Zm88,0a12,12,0,1,0-12-12A12,12,0,0,0,172,140Zm60-76V192a16,16,0,0,1-16,16H83l-32.6,28.16-.09.07A15.89,15.89,0,0,1,40,240a16.13,16.13,0,0,1-6.8-1.52A15.85,15.85,0,0,1,24,224V64A16,16,0,0,1,40,48H216A16,16,0,0,1,232,64ZM40,224h0ZM216,64H40V224l34.77-30A8,8,0,0,1,80,192H216Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-52-8a8,8,0,1,0,8,8A8,8,0,0,0,84,120Zm88,0a8,8,0,1,0,8,8A8,8,0,0,0,172,120Zm56-56V192a12,12,0,0,1-12,12H81.49L47.76,233.13l0,0A11.89,11.89,0,0,1,40,236a12.17,12.17,0,0,1-5.1-1.14A11.89,11.89,0,0,1,28,224V64A12,12,0,0,1,40,52H216A12,12,0,0,1,228,64Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V224a4,4,0,0,0,6.56,3.08L77.38,197A4,4,0,0,1,80,196H216a4,4,0,0,0,4-4Z"}))]]),Ln=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,44H40A20,20,0,0,0,20,64V224A19.82,19.82,0,0,0,31.56,242.1a20.14,20.14,0,0,0,8.49,1.9,19.91,19.91,0,0,0,12.82-4.72l.12-.11L84.47,212H216a20,20,0,0,0,20-20V64A20,20,0,0,0,216,44Zm-4,144H80a11.93,11.93,0,0,0-7.84,2.92L44,215.23V68H212ZM84,108A12,12,0,0,1,96,96h64a12,12,0,1,1,0,24H96A12,12,0,0,1,84,108Zm0,40a12,12,0,0,1,12-12h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,148Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,64V192a8,8,0,0,1-8,8H80L45.15,230.11A8,8,0,0,1,32,224V64a8,8,0,0,1,8-8H216A8,8,0,0,1,224,64Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.84,15.84,0,0,0,9.25,14.5A16.05,16.05,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM160,152H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,50H40A14,14,0,0,0,26,64V224a13.88,13.88,0,0,0,8.09,12.69A14.11,14.11,0,0,0,40,238a13.87,13.87,0,0,0,9-3.31l.06-.05L82.23,206H216a14,14,0,0,0,14-14V64A14,14,0,0,0,216,50Zm2,142a2,2,0,0,1-2,2H80a6,6,0,0,0-3.92,1.46L41.26,225.53A2,2,0,0,1,38,224V64a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Zm-52-80a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,144Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40A16,16,0,0,0,24,64V224a15.85,15.85,0,0,0,9.24,14.5A16.13,16.13,0,0,0,40,240a15.89,15.89,0,0,0,10.25-3.78l.09-.07L83,208H216a16,16,0,0,0,16-16V64A16,16,0,0,0,216,48ZM40,224h0ZM216,192H80a8,8,0,0,0-5.23,1.95L40,224V64H216ZM88,112a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,112Zm0,32a8,8,0,0,1,8-8h64a8,8,0,1,1,0,16H96A8,8,0,0,1,88,144Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,52H40A12,12,0,0,0,28,64V224a11.89,11.89,0,0,0,6.93,10.88A12.17,12.17,0,0,0,40,236a11.89,11.89,0,0,0,7.69-2.83l0,0L81.49,204H216a12,12,0,0,0,12-12V64A12,12,0,0,0,216,52Zm4,140a4,4,0,0,1-4,4H80a4,4,0,0,0-2.62,1L42.56,227.06A4,4,0,0,1,36,224V64a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Zm-56-80a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,144Z"}))]]),Dn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M236,137A108.13,108.13,0,1,1,119,20,12,12,0,0,1,121,44,84.12,84.12,0,1,0,212,135,12,12,0,1,1,236,137ZM116,76v52a12,12,0,0,0,12,12h52a12,12,0,0,0,0-24H140V76a12,12,0,0,0-24,0Zm92,20a16,16,0,1,0-16-16A16,16,0,0,0,208,96ZM176,64a16,16,0,1,0-16-16A16,16,0,0,0,176,64Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),e.createElement("path",{d:"M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M208,96a12,12,0,1,1,12,12A12,12,0,0,1,208,96ZM196,72a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm28.66,56a8,8,0,0,0-8.63,7.31A88.12,88.12,0,1,1,120.66,40,8,8,0,0,0,119.34,24,104.12,104.12,0,1,0,232,136.66,8,8,0,0,0,224.66,128ZM128,56a72,72,0,1,1-72,72A72.08,72.08,0,0,1,128,56Zm-8,72a8,8,0,0,0,8,8h48a8,8,0,0,0,0-16H136V80a8,8,0,0,0-16,0Zm40-80a12,12,0,1,0-12-12A12,12,0,0,0,160,48Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M230,136.49A102.12,102.12,0,1,1,119.51,26a6,6,0,0,1,1,12A90.13,90.13,0,1,0,218,135.51a6,6,0,1,1,12,1ZM122,72v56a6,6,0,0,0,6,6h56a6,6,0,0,0,0-12H134V72a6,6,0,0,0-12,0Zm38-26a10,10,0,1,0-10-10A10,10,0,0,0,160,46Zm36,24a10,10,0,1,0-10-10A10,10,0,0,0,196,70Zm24,36a10,10,0,1,0-10-10A10,10,0,0,0,220,106Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,136.66A104.12,104.12,0,1,1,119.34,24,8,8,0,0,1,120.66,40,88.12,88.12,0,1,0,216,135.34,8,8,0,0,1,232,136.66ZM120,72v56a8,8,0,0,0,8,8h56a8,8,0,0,0,0-16H136V72a8,8,0,0,0-16,0Zm40-24a12,12,0,1,0-12-12A12,12,0,0,0,160,48Zm36,24a12,12,0,1,0-12-12A12,12,0,0,0,196,72Zm24,36a12,12,0,1,0-12-12A12,12,0,0,0,220,108Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228,136.33A100.13,100.13,0,1,1,119.67,28a4,4,0,1,1,.66,8A92.13,92.13,0,1,0,220,135.67a4,4,0,1,1,8,.66ZM128,132h56a4,4,0,0,0,0-8H132V72a4,4,0,0,0-8,0v56A4,4,0,0,0,128,132Zm32-88a8,8,0,1,0-8-8A8,8,0,0,0,160,44Zm36,24a8,8,0,1,0-8-8A8,8,0,0,0,196,68Zm24,36a8,8,0,1,0-8-8A8,8,0,0,0,220,104Z"}))]]),Tn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z"}))]]),Fn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M51.51,104.49l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,1,1,17,17L45,64,68.49,87.51a12,12,0,0,1-17,17Zm48,0a12,12,0,0,0,17,0l32-32a12,12,0,0,0,0-17l-32-32a12,12,0,1,0-17,17L123,64,99.51,87.51A12,12,0,0,0,99.51,104.49ZM200,36H180a12,12,0,0,0,0,24h16V196H60V140a12,12,0,0,0-24,0v60a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M152,32V96a16,16,0,0,1-16,16H32A16,16,0,0,1,16,96V32A16,16,0,0,1,32,16H136A16,16,0,0,1,152,32Z",opacity:"0.2"}),e.createElement("path",{d:"M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,40H168a16,16,0,0,0-16-16H32A16,16,0,0,0,16,40v80a16,16,0,0,0,16,16h8v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40ZM106.34,61.66a8,8,0,0,1,11.32-11.32l24,24a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L124.69,80Zm-64,24a8,8,0,0,1,0-11.32l24-24A8,8,0,0,1,77.66,61.66L59.31,80,77.66,98.34a8,8,0,0,1-11.32,11.32ZM200,200H56V136h96a16,16,0,0,0,16-16V56h32Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M59.76,100.24l-32-32a6,6,0,0,1,0-8.48l32-32a6,6,0,1,1,8.48,8.48L40.49,64,68.24,91.76a6,6,0,1,1-8.48,8.48Zm40,0a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0,0-8.48l-32-32a6,6,0,1,0-8.48,8.48L127.51,64,99.76,91.76A6,6,0,0,0,99.76,100.24ZM200,42H176a6,6,0,0,0,0,12h24a2,2,0,0,1,2,2V200a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V136a6,6,0,0,0-12,0v64a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M58.34,101.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,69.66,37.66L43.31,64,69.66,90.34a8,8,0,0,1-11.32,11.32Zm40,0a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0,0-11.32l-32-32A8,8,0,0,0,98.34,37.66L124.69,64,98.34,90.34A8,8,0,0,0,98.34,101.66ZM200,40H176a8,8,0,0,0,0,16h24V200H56V136a8,8,0,0,0-16,0v64a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M61.17,98.83l-32-32a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,5.66L37.66,64,66.83,93.17a4,4,0,0,1-5.66,5.66Zm40,0a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0,0-5.66l-32-32a4,4,0,0,0-5.66,5.66L130.34,64,101.17,93.17A4,4,0,0,0,101.17,98.83ZM200,44H176a4,4,0,0,0,0,8h24a4,4,0,0,1,4,4V200a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V136a4,4,0,0,0-8,0v64a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Z"}))]]),Rn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M209.88,69.83A115.19,115.19,0,0,0,128,36h-.41C63.85,36.22,12,88.76,12,153.13V176a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V152A115.25,115.25,0,0,0,209.88,69.83ZM220,172H127.32l46.44-65A12,12,0,1,0,154.24,93L97.82,172H36V153.13c0-1.72,0-3.43.14-5.13H56a12,12,0,0,0,0-24H40.62c10.91-33.39,40-58.52,75.38-63.21V80a12,12,0,0,0,24,0V60.8A92,92,0,0,1,215.66,124H200a12,12,0,0,0,0,24h19.9c.06,1.33.1,2.66.1,4Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232,152v24a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V153.13C24,95.65,70.15,48.2,127.63,48A104,104,0,0,1,232,152Z",opacity:"0.2"}),e.createElement("path",{d:"M207.06,72.67A111.24,111.24,0,0,0,128,40h-.4C66.07,40.21,16,91,16,153.13V176a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V152A111.25,111.25,0,0,0,207.06,72.67ZM224,176H119.71l54.76-75.3a8,8,0,0,0-12.94-9.42L99.92,176H32V153.13c0-3.08.15-6.12.43-9.13H56a8,8,0,0,0,0-16H35.27c10.32-38.86,44-68.24,84.73-71.66V80a8,8,0,0,0,16,0V56.33A96.14,96.14,0,0,1,221,128H200a8,8,0,0,0,0,16h23.67c.21,2.65.33,5.31.33,8Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M240,152v24a16,16,0,0,1-16,16H115.93a4,4,0,0,1-3.24-6.35L174.27,101a8.21,8.21,0,0,0-1.37-11.3,8,8,0,0,0-11.37,1.61l-72,99.06A4,4,0,0,1,86.25,192H32a16,16,0,0,1-16-16V153.13c0-1.79,0-3.57.13-5.33a4,4,0,0,1,4-3.8H48a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,47.73,128H23.92a4,4,0,0,1-3.87-5c12-43.84,49.66-77.13,95.52-82.28a4,4,0,0,1,4.43,4V72a8,8,0,0,0,8.53,8A8.17,8.17,0,0,0,136,71.73V44.67a4,4,0,0,1,4.43-4A112.18,112.18,0,0,1,236.23,123a4,4,0,0,1-3.88,5H208.27a8.17,8.17,0,0,0-8.25,7.47,8,8,0,0,0,8,8.53h27.92a4,4,0,0,1,4,3.86C240,149.23,240,150.61,240,152Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M205.65,74.08A109.26,109.26,0,0,0,128,42h-.39C67.17,42.21,18,92.06,18,153.13V176a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V152A109.3,109.3,0,0,0,205.65,74.08ZM226,176a2,2,0,0,1-2,2H115.78l57.07-78.47a6,6,0,0,0-9.7-7.06L100.94,178H32a2,2,0,0,1-2-2V153.13A102.36,102.36,0,0,1,30.62,142H56a6,6,0,0,0,0-12H32.71C42.6,88.4,78.53,56.86,122,54.19V80a6,6,0,0,0,12,0V54.19A98.05,98.05,0,0,1,223.53,130H200a6,6,0,0,0,0,12h25.5c.33,3.3.5,6.64.5,10Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M207.06,72.67A111.24,111.24,0,0,0,128,40h-.4C66.07,40.21,16,91,16,153.13V176a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V152A111.25,111.25,0,0,0,207.06,72.67ZM224,176H119.71l54.76-75.3a8,8,0,0,0-12.94-9.42L99.92,176H32V153.13c0-3.08.15-6.12.43-9.13H56a8,8,0,0,0,0-16H35.27c10.32-38.86,44-68.24,84.73-71.66V80a8,8,0,0,0,16,0V56.33A96.14,96.14,0,0,1,221,128H200a8,8,0,0,0,0,16h23.67c.21,2.65.33,5.31.33,8Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M204.23,75.5A107.37,107.37,0,0,0,127.62,44C68.28,44.21,20,93.16,20,153.13V176a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V152A107.25,107.25,0,0,0,204.23,75.5ZM228,176a4,4,0,0,1-4,4H111.85l59.38-81.65a4,4,0,1,0-6.46-4.7L102,180H32a4,4,0,0,1-4-4V153.13A103.42,103.42,0,0,1,28.84,140H56a4,4,0,0,0,0-8H30.21C39.59,87.66,77.84,53.93,124,52.09V80a4,4,0,0,0,8,0V52.08A100.08,100.08,0,0,1,226,132H200a4,4,0,0,0,0,8h27.29a101.6,101.6,0,0,1,.71,12Z"}))]]),zn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M71.51,144.49a12,12,0,0,1,0-17l24-24a12,12,0,0,1,17,17L109,124h55V104a12,12,0,0,1,24,0v32a12,12,0,0,1-12,12H109l3.52,3.51a12,12,0,0,1-17,17ZM236,56V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V196H212Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),e.createElement("path",{d:"M184,104v32a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Zm48-48V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-32,96a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M182,104v32a6,6,0,0,1-6,6H94.48l13.76,13.76a6,6,0,1,1-8.48,8.48l-24-24a6,6,0,0,1,0-8.48l24-24a6,6,0,0,1,8.48,8.48L94.48,130H170V104a6,6,0,0,1,12,0Zm48-48V200a14,14,0,0,1-14,14H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V200a2,2,0,0,0,2,2H216a2,2,0,0,0,2-2Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M184,104v32a8,8,0,0,1-8,8H99.31l10.35,10.34a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L99.31,128H168V104a8,8,0,0,1,16,0Zm48-48V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM216,200V56H40V200H216Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M180,104v32a4,4,0,0,1-4,4H89.66l17.17,17.17a4,4,0,0,1-5.66,5.66l-24-24a4,4,0,0,1,0-5.66l24-24a4,4,0,0,1,5.66,5.66L89.66,132H172V104a4,4,0,0,1,8,0Zm48-48V200a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4Z"}))]]),$n=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),e.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),Bn=new Map([["bold",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"}))],["duotone",e.createElement(e.Fragment,null,e.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),e.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["fill",e.createElement(e.Fragment,null,e.createElement("path",{d:"M224,56a8,8,0,0,1-8,8h-8V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V64H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,56ZM88,32h80a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16Z"}))],["light",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM82,24a6,6,0,0,1,6-6h80a6,6,0,0,1,0,12H88A6,6,0,0,1,82,24Z"}))],["regular",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,48H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM192,208H64V64H192ZM80,24a8,8,0,0,1,8-8h80a8,8,0,0,1,0,16H88A8,8,0,0,1,80,24Z"}))],["thin",e.createElement(e.Fragment,null,e.createElement("path",{d:"M216,52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM84,24a4,4,0,0,1,4-4h80a4,4,0,0,1,0,8H88A4,4,0,0,1,84,24Z"}))]]),Gt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Zn}));Gt.displayName="ArrowCounterClockwiseIcon";const Xt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Sn}));Xt.displayName="ArrowUpIcon";const Yt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:qn}));Yt.displayName="ChatDotsIcon";const Jt=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Ln}));Jt.displayName="ChatTextIcon";const ea=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Dn}));ea.displayName="ClockCountdownIcon";const ta=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Tn}));ta.displayName="ClockCounterClockwiseIcon";const aa=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Fn}));aa.displayName="CodeBlockIcon";const na=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Rn}));na.displayName="GaugeIcon";const ra=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:zn}));ra.displayName="KeyReturnIcon";const ia=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:$n}));ia.displayName="MagnifyingGlassIcon";const sa=e.forwardRef((a,n)=>e.createElement(le,{ref:n,...a,weights:Bn}));sa.displayName="TrashSimpleIcon";const Wn=i(q).attrs({alignItems:"center",gap:"0"}).withConfig({displayName:"ExplainQueryButton__KeyBinding"})([`
|
|
2
2
|
color: `,`;
|
|
3
3
|
`],({theme:a})=>a.color.pinkPrimary),Qn=`${qt}+E`,On=i(ue).withConfig({displayName:"ExplainQueryButton__ExplainButton"})([`
|
|
4
4
|
gap: 1rem;
|
|
5
5
|
`]),Kn=({conversationId:a,queryText:n})=>{const{quest:o}=e.useContext(ft),c=Ee(je.query.getTables),{setStatus:u,abortController:g,hasSchemaAccess:y,currentModel:H,apiKey:A,aiAssistantSettings:_}=Te(),{addMessage:C,updateMessage:k,updateConversationName:b,persistMessages:p,setIsStreaming:N}=Fa(),l=()=>{_e(He.AI_EXPLAIN_QUERY),Ze(Dt({conversationId:a,queryText:n,settings:{model:H,apiKey:A},aiAssistantSettings:_,questClient:o,tables:c,hasSchemaAccess:y,abortSignal:g==null?void 0:g.signal}),{addMessage:C,updateMessage:k,setStatus:u,setIsStreaming:N,persistMessages:p,updateConversationName:b})};return t.jsxs(On,{skin:"gradient",gradientWeight:"thin",onClick:l,title:`Explain query with AI Assistant (${Qn})`,"data-hook":"button-explain-query",children:[t.jsx(it,{size:12,variant:"hollow"}),"Explain query",t.jsxs(Wn,{children:[t.jsx(Lt,{keyString:qt,color:r("pinkPrimary"),hoverColor:r("pinkPrimary")}),t.jsx(Lt,{keyString:"E",color:r("pinkPrimary"),hoverColor:r("pinkPrimary")})]})]})},oa=(a,n,o,c)=>{if(!(o!=null&&o.current)||!c.current)return null;const u=c.current.getModel();if(!u)return null;const g=o.current[n.toString()];if(!g)return null;const y=g[a];if(!y||!y.error)return null;const H=y.selection?y.selection.startOffset:y.startOffset,A=y.selection?y.selection.endOffset:y.endOffset,_=u.getPositionAt(H),C=u.getPositionAt(H+y.error.position),k=u.getWordAtPosition(C),b=u.getPositionAt(A),p=y.selection?u.getValueInRange({startLineNumber:_.lineNumber,startColumn:_.column,endLineNumber:b.lineNumber,endColumn:b.column}):Ra(a).queryText;return{errorMessage:y.error.error||"Query execution failed",word:k?k.word:null,fixStart:H,fixEnd:A,queryText:p}},Pn=i(ue).withConfig({displayName:"FixQueryButton__FixButton"})([`
|
|
6
6
|
gap: 1rem;
|
|
7
|
-
`]),Un=()=>{const{quest:a}=e.useContext(ft),{editorRef:n,executionRefs:o}=yt(),c=Ee(je.query.getTables),{setStatus:u,abortController:g,hasSchemaAccess:y,currentModel:H,apiKey:A,aiAssistantSettings:_}=Te(),{chatWindowState:C,getConversationMeta:k,addMessage:b,updateMessage:p,updateConversationName:N,persistMessages:l,setIsStreaming:v}=xt(),R=()=>{
|
|
7
|
+
`]),Un=()=>{const{quest:a}=e.useContext(ft),{editorRef:n,executionRefs:o}=yt(),c=Ee(je.query.getTables),{setStatus:u,abortController:g,hasSchemaAccess:y,currentModel:H,apiKey:A,aiAssistantSettings:_}=Te(),{chatWindowState:C,getConversationMeta:k,addMessage:b,updateMessage:p,updateConversationName:N,persistMessages:l,setIsStreaming:v}=xt(),R=()=>{const d=C.activeConversationId;if(!d)return;const x=k(d);if(!(x!=null&&x.queryKey)||x.bufferId==null)return;const h=oa(x.queryKey,x.bufferId,o,n);if(!h)return;_e(He.AI_FIX_QUERY);const{errorMessage:T,queryText:X,word:F}=h;Ze(Tt({conversationId:d,queryText:X,errorMessage:T,errorWord:F??void 0,settings:{model:H,apiKey:A},aiAssistantSettings:_,questClient:a,tables:c,hasSchemaAccess:y,abortSignal:g==null?void 0:g.signal}),{addMessage:b,updateMessage:p,setStatus:u,setIsStreaming:v,persistMessages:l,updateConversationName:N})};return t.jsxs(Pn,{skin:"gradient",gradientWeight:"thin",onClick:R,title:"Fix query with AI Assistant","data-hook":"button-fix-query",children:[t.jsx(it,{size:12,variant:"hollow"}),"Fix query"]})},kt=a=>{if(!a||typeof a!="string")return`
|
|
8
8
|
`;let n=a.trim();return n.endsWith(";")&&(n=n.slice(0,-1).trim()),n+`
|
|
9
9
|
`},la=i.div.withConfig({displayName:"AssistantModesCompact__Container"})([`
|
|
10
10
|
display: flex;
|
|
@@ -156,17 +156,17 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
156
156
|
font-weight: 400;
|
|
157
157
|
flex-shrink: 0;
|
|
158
158
|
transform: translateY(1px);
|
|
159
|
-
`],r("graphLegend"),({theme:a})=>a.fontMonospace),
|
|
159
|
+
`],r("graphLegend"),({theme:a})=>a.fontMonospace),er=(a,n)=>{if(a===be.Processing&&n&&"type"in n)switch(n.type){case"fix":return"Processing fix request";case"explain":return"Processing explain request";default:return a}return a},tr=i.div.withConfig({displayName:"AssistantModesCompact__ThinkingContent"})([`
|
|
160
160
|
font-size: 1.3rem;
|
|
161
161
|
color: `,`;
|
|
162
162
|
padding: 0 2.8rem;
|
|
163
163
|
white-space: pre-wrap;
|
|
164
164
|
word-break: break-word;
|
|
165
165
|
opacity: 0.7;
|
|
166
|
-
`],r("gray2")),ma=({operationHistory:a,status:n,isLive:o=!1,onScrollNeeded:c,collapsed:u=!1,endTimestamp:g})=>{const y=vt(),[H,A]=e.useState({}),[_,C]=e.useState(!1),k=e.useRef(0),b=e.useRef(null),p=e.useMemo(()=>za(a,n,o),[a,n,o]),N=e.useRef(o);e.useEffect(()=>{if(N.current&&!o){const d={};p.forEach(x=>{d[x.id]=!0}),A(d)}else if(o&&p.length>k.current){const d={};p.forEach((x,h)=>{h<p.length-1&&(d[x.id]=!0)}),A(d),c==null||c()}k.current=p.length,N.current=o},[p,o,c]);const l=d=>{A(x=>{const h=p.find(I=>I.id===d),T=h?Ft(h):!1,X=p.findIndex(I=>I.id===d)===p.length-1,F=u?!1:o?X:!0;return x[d]===void 0?{...x,[d]:F&&T}:{...x,[d]:!x[d]}})},v=e.useMemo(()=>{var h,T;if(a.length===0)return null;const d=(h=a[0])==null?void 0:h.timestamp,x=g??((T=a[a.length-1])==null?void 0:T.timestamp);return!d||!x||d===x?null:$a(x-d)},[a,g]);if(a.length===0)return null;const R=p.map((d,x)=>{var L;const h=Ft(d),T=x===p.length-1,X=u?!1:o?T:!0,F=H[d.id]===void 0?X&&h:!H[d.id]&&h,I=p[x+1],V=Ba(d,I,I?void 0:g),z=d.type===be.Thinking||d.type===be.RunningQuery,Z=z?((L=d.operations[0])==null?void 0:L.content)??"":"";return t.jsxs(da,{$expanded:F,$abort:d.abort,children:[t.jsxs(ca,{$expanded:F,$isExpandable:h,"data-hook":`assistant-mode-${d.type.toLowerCase().replace(/\s+/g,"-")}`,role:h?"button":"presentation",tabIndex:h?0:void 0,"aria-expanded":h?F:void 0,onClick:h?()=>l(d.id):void 0,onKeyDown:h?j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),l(d.id))}:void 0,children:[t.jsx(et,{children:d.active?t.jsx(wt,{size:14}):d.abort?t.jsx(Xn,{size:14}):t.jsx(ha,{})}),t.jsxs(q,{gap:"0.3rem",children:[t.jsx(jt,{$isActive:d.active,children:d.type}),V&&t.jsxs(Jn,{children:["(",V,")"]}),h&&t.jsx(Mt,{$expanded:F,children:t.jsx(Rt,{size:14})})]})]}),h&&z&&t.jsx(_t,{$expanded:F,children:t.jsx(Ht,{children:Z?t.jsx(
|
|
166
|
+
`],r("gray2")),ma=({operationHistory:a,status:n,isLive:o=!1,onScrollNeeded:c,collapsed:u=!1,endTimestamp:g})=>{const y=vt(),[H,A]=e.useState({}),[_,C]=e.useState(!1),k=e.useRef(0),b=e.useRef(null),p=e.useMemo(()=>za(a,n,o),[a,n,o]),N=e.useRef(o);e.useEffect(()=>{if(N.current&&!o){const d={};p.forEach(x=>{d[x.id]=!0}),A(d)}else if(o&&p.length>k.current){const d={};p.forEach((x,h)=>{h<p.length-1&&(d[x.id]=!0)}),A(d),c==null||c()}k.current=p.length,N.current=o},[p,o,c]);const l=d=>{A(x=>{const h=p.find(I=>I.id===d),T=h?Ft(h):!1,X=p.findIndex(I=>I.id===d)===p.length-1,F=u?!1:o?X:!0;return x[d]===void 0?{...x,[d]:F&&T}:{...x,[d]:!x[d]}})},v=e.useMemo(()=>{var h,T;if(a.length===0)return null;const d=(h=a[0])==null?void 0:h.timestamp,x=g??((T=a[a.length-1])==null?void 0:T.timestamp);return!d||!x||d===x?null:$a(x-d)},[a,g]);if(a.length===0)return null;const R=p.map((d,x)=>{var L;const h=Ft(d),T=x===p.length-1,X=u?!1:o?T:!0,F=H[d.id]===void 0?X&&h:!H[d.id]&&h,I=p[x+1],V=Ba(d,I,I?void 0:g),z=d.type===be.Thinking||d.type===be.RunningQuery,Z=z?((L=d.operations[0])==null?void 0:L.content)??"":"";return t.jsxs(da,{$expanded:F,$abort:d.abort,children:[t.jsxs(ca,{$expanded:F,$isExpandable:h,"data-hook":`assistant-mode-${d.type.toLowerCase().replace(/\s+/g,"-")}`,role:h?"button":"presentation",tabIndex:h?0:void 0,"aria-expanded":h?F:void 0,onClick:h?()=>l(d.id):void 0,onKeyDown:h?j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),l(d.id))}:void 0,children:[t.jsx(et,{children:d.active?t.jsx(wt,{size:14}):d.abort?t.jsx(Xn,{size:14}):t.jsx(ha,{})}),t.jsxs(q,{gap:"0.3rem",children:[t.jsx(jt,{$isActive:d.active,children:d.type}),V&&t.jsxs(Jn,{children:["(",V,")"]}),h&&t.jsx(Mt,{$expanded:F,children:t.jsx(Rt,{size:14})})]})]}),h&&z&&t.jsx(_t,{$expanded:F,children:t.jsx(Ht,{children:Z?t.jsx(tr,{children:Z}):null})}),h&&!z&&t.jsx(_t,{$expanded:F,children:t.jsx(Ht,{children:t.jsx(Gn,{children:d.operations.map((j,Ie)=>{const ee=`${d.id}-${Ie}-${JSON.stringify(j.args)}`;if(j.type===be.Processing){const K=er(j.type,j.args);return t.jsxs(lt,{children:[t.jsx(et,{children:t.jsx(Wa,{style:{width:"14px",height:"14px"}})}),t.jsx(dt,{children:t.jsx(ie,{children:K})})]},ee)}if(j.type===be.InvestigatingTable){const K=j.args&&"name"in j.args?j.args.name:"table",Y=j.args&&"tableOpType"in j.args?j.args.tableOpType:"details";return t.jsxs(lt,{children:[t.jsx(et,{children:t.jsx(Qa,{size:14,color:y.color.gray2})}),t.jsxs(dt,{children:[t.jsx(ie,{children:"Investigating"}),t.jsx(Se,{children:t.jsx(qe,{children:K})}),t.jsx(ie,{children:Y})]})]},ee)}if(j.type===be.InvestigatingDocs){const K=j.args&&"items"in j.args&&Array.isArray(j.args.items)?j.args.items:null;if(K&&K.length>0)return t.jsx(ot.Fragment,{children:K.map((pe,ke)=>{const J=`${ee}-item-${ke}`;return t.jsxs(lt,{children:[t.jsx(et,{children:t.jsx(zt,{size:14,color:y.color.gray2})}),t.jsx(dt,{children:pe.section?t.jsxs(t.Fragment,{children:[t.jsx(ie,{children:"Investigating"}),t.jsx(Se,{children:t.jsx(qe,{children:pe.section})}),t.jsx(ie,{children:"in"}),t.jsx(Se,{children:t.jsx(qe,{children:pe.name})})]}):t.jsxs(t.Fragment,{children:[t.jsx(ie,{children:"Investigating"}),t.jsx(Se,{children:t.jsx(qe,{children:pe.name})})]})})]},J)})},ee);const Y=j.args&&"name"in j.args?j.args.name:null,ve=j.args&&"section"in j.args?j.args.section:null;return t.jsxs(lt,{children:[t.jsx(et,{children:t.jsx(zt,{size:14})}),t.jsx(dt,{children:Y&&ve?t.jsxs(t.Fragment,{children:[t.jsx(ie,{children:"Investigating"}),t.jsx(Se,{children:t.jsx(qe,{children:ve})}),t.jsx(ie,{children:"in"}),t.jsx(Se,{children:t.jsx(qe,{children:Y})}),t.jsx(ie,{children:"documentation"})]}):Y?t.jsxs(t.Fragment,{children:[t.jsx(ie,{children:"Investigating"}),t.jsx(Se,{children:t.jsx(qe,{children:Y})}),t.jsx(ie,{children:"documentation"})]}):t.jsx(ie,{children:"Investigating documentation"})})]},ee)}return null})})})})]},d.id)});return u?t.jsx(la,{ref:b,"data-hook":"assistant-modes-container",children:t.jsxs(da,{$expanded:_,$abort:!1,children:[t.jsxs(ca,{$expanded:_,$isExpandable:!0,onClick:()=>C(d=>!d),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),C(x=>!x))},"data-hook":"assistant-mode-processing-collapsed",role:"button",tabIndex:0,"aria-expanded":_,children:[t.jsx(ha,{}),t.jsx(jt,{$isActive:!1,children:v?`Thought for ${v}`:"Thought"}),t.jsx(Mt,{$expanded:_,children:t.jsx(Rt,{size:14})})]}),t.jsx(_t,{$expanded:_,children:t.jsx(Ht,{children:t.jsx(Yn,{children:R})})})]})}):t.jsx(la,{ref:b,"data-hook":"assistant-modes-container",children:R})},ar=i.div.withConfig({displayName:"AssistantMarkdown__CodeBlockWrapper"})([`
|
|
167
167
|
margin: 1rem 0;
|
|
168
168
|
width: 100%;
|
|
169
|
-
`]),
|
|
169
|
+
`]),nr=i.div.withConfig({displayName:"AssistantMarkdown__MarkdownContent"})([`
|
|
170
170
|
margin: 0;
|
|
171
171
|
width: 100%;
|
|
172
172
|
font-family: `,`;
|
|
@@ -276,7 +276,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
276
276
|
white-space: normal;
|
|
277
277
|
min-width: 200px;
|
|
278
278
|
}
|
|
279
|
-
`],({theme:a})=>a.font,r("foreground"),r("background"),r("selection"),({theme:a})=>a.fontMonospace,r("purple"),r("foreground"),({theme:a})=>a.color.cyan,r("selection"),r("gray2"),r("selection"),r("backgroundDarker")),
|
|
279
|
+
`],({theme:a})=>a.font,r("foreground"),r("background"),r("selection"),({theme:a})=>a.fontMonospace,r("purple"),r("foreground"),({theme:a})=>a.color.cyan,r("selection"),r("gray2"),r("selection"),r("backgroundDarker")),rr=a=>({table:({children:n,...o})=>t.jsx("div",{className:"table-wrapper",children:t.jsx("table",{...o,children:n})}),pre:({children:n})=>t.jsx(t.Fragment,{children:n}),code:e.memo(({children:n,className:o})=>{if(typeof o=="string"&&o.includes("language-")){const c=(Array.isArray(n)?n.join(""):typeof n=="string"?n:"").replace(/\n$/,"");return t.jsx(ar,{"data-hook":"chat-message-code-block",children:t.jsx(Pe,{value:c,maxHeight:216,onOpenInEditor:()=>{var u;(u=a.current)==null||u.call(a,{type:"code",value:c})}})})}return t.jsx("code",{children:n})},(n,o)=>n.children===o.children&&n.className===o.className)}),ua=e.memo(({content:a,messageId:n,onOpenInEditor:o})=>{const c=e.useRef(o);e.useEffect(()=>{c.current=o},[o]);const u=e.useMemo(()=>rr(c),[]);return t.jsx(nr,{children:t.jsx(Ka,{allowImages:!0,components:u,children:a})},n)},(a,n)=>a.content===n.content);function ga(a){return a>=1e3?`${(a/1e3).toFixed(1)}K`:a.toString()}const pa=i.div.withConfig({displayName:"AssistantMessageContent__Divider"})([`
|
|
280
280
|
width: 100%;
|
|
281
281
|
height: 1px;
|
|
282
282
|
background: linear-gradient(
|
|
@@ -287,14 +287,14 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
287
287
|
margin-bottom: 1rem;
|
|
288
288
|
`],r("dividerAccent")),fa=i.div.withConfig({displayName:"AssistantMessageContent__OperationHistoryContainer"})([`
|
|
289
289
|
width: 100%;
|
|
290
|
-
`]),
|
|
290
|
+
`]),ir=i(q).attrs({alignItems:"center",gap:"1rem"}).withConfig({displayName:"AssistantMessageContent__AssistantHeader"})([`
|
|
291
291
|
width: 100%;
|
|
292
292
|
padding: 1.2rem 0.4rem;
|
|
293
293
|
flex: 1 0 auto;
|
|
294
|
-
`]),
|
|
294
|
+
`]),sr=i(de).attrs({className:"assistant-label"}).withConfig({displayName:"AssistantMessageContent__AssistantLabel"})([`
|
|
295
295
|
font-size: 1.4rem;
|
|
296
296
|
color: `,`;
|
|
297
|
-
`],r("foreground")),
|
|
297
|
+
`],r("foreground")),or=i(q).attrs({className:"token-display"}).withConfig({displayName:"AssistantMessageContent__TokenDisplay"})([`
|
|
298
298
|
align-items: center;
|
|
299
299
|
gap: 0.9rem;
|
|
300
300
|
margin: 0 0 0 auto;
|
|
@@ -305,7 +305,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
305
305
|
padding: 0 0.8rem;
|
|
306
306
|
flex-shrink: 0;
|
|
307
307
|
width: 100%;
|
|
308
|
-
`]),
|
|
308
|
+
`]),lr=Vn([`
|
|
309
309
|
0%, 50% { opacity: 1; }
|
|
310
310
|
51%, 100% { opacity: 0; }
|
|
311
311
|
`]),xa=i.span.withConfig({displayName:"AssistantMessageContent__StreamingCursor"})([`
|
|
@@ -317,9 +317,9 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
317
317
|
margin-right: auto;
|
|
318
318
|
vertical-align: text-bottom;
|
|
319
319
|
animation: `,` 1s infinite;
|
|
320
|
-
`],r("foreground"),
|
|
320
|
+
`],r("foreground"),lr),dr=e.memo(({turnMessages:a,anchorMessage:n,status:o,isLiveOperation:c,isMessageStreaming:u,onScrollNeeded:g,onOpenInEditor:y})=>{const H=vt(),{operationHistory:A,endTimestamp:_,timeline:C}=e.useMemo(()=>{const l=n.operationHistory??[],v=l.filter(x=>x.type!==be.Aborted),R=l.length>0?Math.max(...l.map(x=>x.timestamp)):void 0,d=v.some(x=>{var h;return x.type===be.GeneratingResponse&&!!((h=x.content)!=null&&h.trim())});return{operationHistory:v.filter(x=>x.type!==be.GeneratingResponse),endTimestamp:R,timeline:d?Pa(v):null}},[n.operationHistory]),k=e.useMemo(()=>a.filter(l=>l.role==="assistant"&&typeof l.content=="string"&&!!l.content).map(l=>l.content).join(`
|
|
321
321
|
|
|
322
|
-
`),[a]),b=!!k,p=e.useMemo(()=>{const l=n.tokenUsage;return!l||typeof l.inputTokens!="number"||typeof l.outputTokens!="number"?null:t.jsxs(t.Fragment,{children:[t.jsx("span",{style:{fontWeight:600},children:ga(l.inputTokens)})," ","input /"," ",t.jsx("span",{style:{fontWeight:600},children:ga(l.outputTokens)})," ","output tokens"]})},[n.tokenUsage]),N=t.jsxs(
|
|
322
|
+
`),[a]),b=!!k,p=e.useMemo(()=>{const l=n.tokenUsage;return!l||typeof l.inputTokens!="number"||typeof l.outputTokens!="number"?null:t.jsxs(t.Fragment,{children:[t.jsx("span",{style:{fontWeight:600},children:ga(l.inputTokens)})," ","input /"," ",t.jsx("span",{style:{fontWeight:600},children:ga(l.outputTokens)})," ","output tokens"]})},[n.tokenUsage]),N=t.jsxs(ir,{"data-hook":"assistant-header",children:[t.jsx(it,{size:20,variant:"filled"}),t.jsx(sr,{children:n.model||"Assistant"}),p&&t.jsxs(or,{className:"token-display",children:[t.jsx(na,{size:"16px",color:H.color.gray2}),t.jsx(de,{size:"sm",color:"gray2",children:p})]})]});if(C&&C.length>0){let l=!1;return t.jsxs(t.Fragment,{children:[C.map((v,R)=>{const d=R===C.length-1;if(v.type==="operations")return t.jsxs(ot.Fragment,{children:[R===0&&t.jsx(pa,{}),t.jsx(fa,{children:t.jsx(ma,{operationHistory:v.operations,status:o,isLive:c&&d,onScrollNeeded:g,collapsed:!d,endTimestamp:v.endTimestamp})})]},`ops-${v.timestamp}`);const x=!l;return l=!0,t.jsxs(ot.Fragment,{children:[x&&N,t.jsx(ya,{children:t.jsx(ua,{content:v.content,messageId:n.id,onOpenInEditor:y})})]},`content-${v.timestamp}`)}),u&&t.jsx(xa,{"data-hook":"streaming-cursor"})]})}return t.jsxs(t.Fragment,{children:[A.length>0&&t.jsxs(t.Fragment,{children:[t.jsx(pa,{}),t.jsx(fa,{children:t.jsx(ma,{operationHistory:A,status:o,isLive:c,onScrollNeeded:g,collapsed:b||!!n.error,endTimestamp:_})})]}),b&&t.jsxs(t.Fragment,{children:[N,t.jsxs(ya,{children:[t.jsx(ua,{content:k,messageId:n.id,onOpenInEditor:y}),u&&t.jsx(xa,{"data-hook":"streaming-cursor"})]})]})]})},(a,n)=>{const o=a.turnMessages[a.turnMessages.length-1],c=n.turnMessages[n.turnMessages.length-1];return o===c&&a.anchorMessage===n.anchorMessage&&a.status===n.status&&a.isLiveOperation===n.isLiveOperation&&a.isMessageStreaming===n.isMessageStreaming}),cr=i(q).withConfig({displayName:"ChatMessages__MessagesContainer"})([`
|
|
323
323
|
display: flex;
|
|
324
324
|
flex-direction: column;
|
|
325
325
|
gap: 1.5rem;
|
|
@@ -331,7 +331,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
331
331
|
`,`
|
|
332
332
|
`],({$scrolled:a})=>!a&&re([`
|
|
333
333
|
opacity: 0;
|
|
334
|
-
`])),
|
|
334
|
+
`])),hr=i(q).attrs({align:"flex-start"}).withConfig({displayName:"ChatMessages__MessageBubble"})([`
|
|
335
335
|
display: flex;
|
|
336
336
|
flex-direction: column;
|
|
337
337
|
gap: 0.5rem;
|
|
@@ -353,7 +353,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
353
353
|
border: 1px solid `,`;
|
|
354
354
|
border-radius: 0.6rem;
|
|
355
355
|
flex-shrink: 0;
|
|
356
|
-
`],r("loginBackground"),r("black32")),
|
|
356
|
+
`],r("loginBackground"),r("black32")),mr=i(q).attrs({alignItems:"center",gap:"0.8rem"}).withConfig({displayName:"ChatMessages__UserRequestHeader"})([`
|
|
357
357
|
width: 100%;
|
|
358
358
|
padding: 0.4rem;
|
|
359
359
|
flex: 1 0 auto;
|
|
@@ -367,10 +367,10 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
367
367
|
align-items: flex-start;
|
|
368
368
|
`]),Ca=i.div.withConfig({displayName:"ChatMessages__InlineSQLEditor"})([`
|
|
369
369
|
width: 100%;
|
|
370
|
-
`]),
|
|
370
|
+
`]),ur=i(q).attrs({gap:"1rem",alignItems:"center"}).withConfig({displayName:"ChatMessages__OperationBadge"})([`
|
|
371
371
|
width: 100%;
|
|
372
372
|
padding: 0 0.4rem;
|
|
373
|
-
`]),
|
|
373
|
+
`]),gr=i(q).attrs({align:"center",justifyContent:"center"}).withConfig({displayName:"ChatMessages__BadgeIconContainer"})([`
|
|
374
374
|
background: `,`;
|
|
375
375
|
border: 1px solid `,`;
|
|
376
376
|
border-radius: 0.4rem;
|
|
@@ -378,7 +378,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
378
378
|
width: 4.8rem;
|
|
379
379
|
height: 4rem;
|
|
380
380
|
flex-shrink: 0;
|
|
381
|
-
`],r("aiBadgeIconBg"),r("aiBadgeIconBorder")),
|
|
381
|
+
`],r("aiBadgeIconBg"),r("aiBadgeIconBorder")),pr=i.div.withConfig({displayName:"ChatMessages__BadgeIconWrapper"})([`
|
|
382
382
|
width: 2.4rem;
|
|
383
383
|
height: 2.4rem;
|
|
384
384
|
display: flex;
|
|
@@ -390,25 +390,25 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
390
390
|
width: 100%;
|
|
391
391
|
height: 100%;
|
|
392
392
|
}
|
|
393
|
-
`],({theme:a})=>a.color.pink),
|
|
393
|
+
`],({theme:a})=>a.color.pink),fr=i(de).withConfig({displayName:"ChatMessages__BadgeTitle"})([`
|
|
394
394
|
font-weight: 500;
|
|
395
395
|
font-size: 1.6rem;
|
|
396
396
|
line-height: 1.6rem;
|
|
397
397
|
color: `,`;
|
|
398
|
-
`],r("foreground")),
|
|
398
|
+
`],r("foreground")),yr=i(q).withConfig({displayName:"ChatMessages__BadgeDescriptionContainer"})([`
|
|
399
399
|
align-items: flex-start;
|
|
400
400
|
flex-direction: column;
|
|
401
401
|
padding: 0.8rem;
|
|
402
402
|
width: 100%;
|
|
403
|
-
`]),
|
|
403
|
+
`]),xr=i(de).withConfig({displayName:"ChatMessages__BadgeDescriptionText"})([`
|
|
404
404
|
font-size: 1.4rem;
|
|
405
405
|
line-height: 2.1rem;
|
|
406
406
|
color: `,`;
|
|
407
|
-
`],r("foreground")),
|
|
407
|
+
`],r("foreground")),wr=i(de).withConfig({displayName:"ChatMessages__BadgeDescriptionIssueText"})([`
|
|
408
408
|
font-size: 1.4rem;
|
|
409
409
|
line-height: 2.1rem;
|
|
410
410
|
font-weight: 600;
|
|
411
|
-
`]),
|
|
411
|
+
`]),Cr=i(q).withConfig({displayName:"ChatMessages__IssueMessageRow"})([`
|
|
412
412
|
display: flex;
|
|
413
413
|
align-items: center;
|
|
414
414
|
gap: 0.5rem;
|
|
@@ -435,7 +435,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
435
435
|
color: `,`;
|
|
436
436
|
white-space: pre-wrap;
|
|
437
437
|
word-wrap: break-word;
|
|
438
|
-
`],r("foreground")),
|
|
438
|
+
`],r("foreground")),br=i(q).withConfig({displayName:"ChatMessages__ExplanationBox"})([`
|
|
439
439
|
display: flex;
|
|
440
440
|
flex-direction: column;
|
|
441
441
|
gap: 0.8rem;
|
|
@@ -464,7 +464,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
464
464
|
}
|
|
465
465
|
`],({$hasOperationHistory:a})=>a&&re([`
|
|
466
466
|
padding-top: 0;
|
|
467
|
-
`])),
|
|
467
|
+
`])),Ar=i.div.withConfig({displayName:"ChatMessages__ErrorContainer"})([`
|
|
468
468
|
display: flex;
|
|
469
469
|
align-items: center;
|
|
470
470
|
flex-shrink: 0;
|
|
@@ -476,16 +476,16 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
476
476
|
font-size: 1.4rem;
|
|
477
477
|
line-height: 2rem;
|
|
478
478
|
width: 100%;
|
|
479
|
-
`],r("red"),r("foreground")),
|
|
479
|
+
`],r("red"),r("foreground")),vr=i(ue).withConfig({displayName:"ChatMessages__RetryButton"})([`
|
|
480
480
|
margin-left: auto;
|
|
481
481
|
flex-shrink: 0;
|
|
482
482
|
padding: 0.5rem 0.8rem;
|
|
483
483
|
height: auto;
|
|
484
|
-
`]),
|
|
484
|
+
`]),kr=i.div.withConfig({displayName:"ChatMessages__MessagesEnd"})([`
|
|
485
485
|
min-height: 1px;
|
|
486
486
|
width: 100%;
|
|
487
487
|
background: transparent;
|
|
488
|
-
`]),
|
|
488
|
+
`]),Mr=i(q).withConfig({displayName:"ChatMessages__DiffContainer"})([`
|
|
489
489
|
display: flex;
|
|
490
490
|
flex-direction: column;
|
|
491
491
|
gap: 1rem;
|
|
@@ -495,7 +495,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
495
495
|
border-radius: 0.8rem;
|
|
496
496
|
background: `,`;
|
|
497
497
|
width: 100%;
|
|
498
|
-
`],r("selection"),r("backgroundDarker")),
|
|
498
|
+
`],r("selection"),r("backgroundDarker")),jr=i(q).withConfig({displayName:"ChatMessages__DiffHeader"})([`
|
|
499
499
|
display: flex;
|
|
500
500
|
align-items: center;
|
|
501
501
|
justify-content: space-between;
|
|
@@ -506,15 +506,15 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
506
506
|
`],r("selectionDarker"),({$isExpanded:a})=>!a&&re([`
|
|
507
507
|
border-bottom: 0;
|
|
508
508
|
padding-bottom: 0;
|
|
509
|
-
`])),
|
|
509
|
+
`])),_r=i(q).withConfig({displayName:"ChatMessages__DiffHeaderLeft"})([`
|
|
510
510
|
display: flex;
|
|
511
511
|
align-items: center;
|
|
512
512
|
gap: 1rem;
|
|
513
513
|
padding: 0.4rem 0;
|
|
514
|
-
`]),
|
|
514
|
+
`]),Hr=i.span.withConfig({displayName:"ChatMessages__DiffHeaderLabel"})([`
|
|
515
515
|
font-size: 1.4rem;
|
|
516
516
|
color: `,`;
|
|
517
|
-
`],r("offWhite")),
|
|
517
|
+
`],r("offWhite")),Er=i(q).withConfig({displayName:"ChatMessages__DiffHeaderRight"})([`
|
|
518
518
|
display: flex;
|
|
519
519
|
align-items: center;
|
|
520
520
|
gap: 1.8rem;
|
|
@@ -551,13 +551,13 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
551
551
|
opacity: 0.4;
|
|
552
552
|
cursor: not-allowed;
|
|
553
553
|
}
|
|
554
|
-
`],r("gray2")),
|
|
554
|
+
`],r("gray2")),Ir=i(Et).withConfig({displayName:"ChatMessages__ExpandButton"})([`
|
|
555
555
|
width: 1.6rem;
|
|
556
556
|
height: 1.6rem;
|
|
557
|
-
`]),
|
|
557
|
+
`]),Nr=i.div.withConfig({displayName:"ChatMessages__DiffEditorWrapper"})([`
|
|
558
558
|
position: relative;
|
|
559
559
|
width: 100%;
|
|
560
|
-
`]),
|
|
560
|
+
`]),Vr=i(q).withConfig({displayName:"ChatMessages__ButtonBar"})([`
|
|
561
561
|
padding: 0.5rem;
|
|
562
562
|
gap: 1rem;
|
|
563
563
|
justify-content: center;
|
|
@@ -567,7 +567,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
567
567
|
background: `,`;
|
|
568
568
|
border: 1px solid `,`;
|
|
569
569
|
border-radius: 0.4rem;
|
|
570
|
-
`],r("backgroundDarker"),r("selection")),
|
|
570
|
+
`],r("backgroundDarker"),r("selection")),Zr=i(ue).withConfig({displayName:"ChatMessages__AcceptButton"})([`
|
|
571
571
|
background: `,`;
|
|
572
572
|
color: `,`;
|
|
573
573
|
border: 0.1rem solid `,`;
|
|
@@ -578,7 +578,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
578
578
|
border-color: `,`;
|
|
579
579
|
filter: brightness(1.2);
|
|
580
580
|
}
|
|
581
|
-
`],({theme:a})=>a.color.pinkDarker,r("foreground"),({theme:a})=>a.color.pinkDarker,({theme:a})=>a.color.pinkDarker,({theme:a})=>a.color.pinkDarker),
|
|
581
|
+
`],({theme:a})=>a.color.pinkDarker,r("foreground"),({theme:a})=>a.color.pinkDarker,({theme:a})=>a.color.pinkDarker,({theme:a})=>a.color.pinkDarker),Sr=i(ue).withConfig({displayName:"ChatMessages__RejectButton"})([`
|
|
582
582
|
background: `,`;
|
|
583
583
|
color: `,`;
|
|
584
584
|
border: 1px solid transparent;
|
|
@@ -588,7 +588,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
588
588
|
background: `,`;
|
|
589
589
|
border-color: transparent;
|
|
590
590
|
}
|
|
591
|
-
`],r("background"),r("foreground"),r("selection")),
|
|
591
|
+
`],r("background"),r("foreground"),r("selection")),qr=a=>{switch(a){case"fix_request":return{icon:t.jsx(sn,{size:24}),title:"Fix Query",description:"Help me debug and fix the error with the attached SQL query"};case"explain_request":return{icon:t.jsx(rn,{size:24}),title:"Explain Query",description:"Explain this query in detail"};case"schema_explain_request":return{icon:t.jsx(nn,{size:24}),title:"Explain Schema",description:"Provide an overview, detailed column descriptions and storage details."};case"health_issue_request":return{icon:t.jsx(an,{size:24}),title:"Health Issue Analysis",description:"Analyze table health issue and provide steps for resolution:"};default:return null}},Lr=(a,n)=>{switch(a){case"loading":return t.jsx(Ot,{size:24,color:n.color.red});case"success":return t.jsx(dn,{});case"error":return t.jsx(ln,{});default:return t.jsx(on,{})}},Dr=({messages:a,onAcceptChange:n,onRejectChange:o,onRunQuery:c,onOpenInEditor:u,onApplyToEditor:g,onRetry:y,onCancelQuery:H,runningQueryKey:A,queryNotifications:_,isOperationInProgress:C,editorSQL:k,isStreaming:b,isLoadingMessages:p,scrollToMessageId:N,onScrollToMessageComplete:l})=>{const v=vt(),R=Ut(),d=Ee(je.query.getTables),x=e.useRef(null),h=e.useRef(null),T=e.useRef(new Map),{status:X}=Te(),[F,I]=e.useState(!1),V=e.useRef(!1),z=e.useCallback(()=>{if(F&&V.current||N)return;const E=F?"smooth":"instant";setTimeout(()=>{var m;(m=x.current)==null||m.scrollIntoView({behavior:E}),I(!0)})},[F,N]),Z=e.useCallback(E=>{const m=d.find(Q=>Q.table_name===E.tableName&&Wt(Q)===E.kind);m&&R(Ct.console.pushSidebarHistory({type:"tableDetails",payload:{tableName:m.table_name,isMatView:m.table_type==="M",isView:m.table_type==="V"}}))},[d]);e.useEffect(()=>{const E=h.current;if(!E)return;const m=()=>{V.current=!0};return E.addEventListener("wheel",m),()=>E.removeEventListener("wheel",m)},[]),e.useEffect(()=>{V.current=!1},[a.length]);const L=e.useMemo(()=>{for(let E=a.length-1;E>=0;E--){const m=a[E];if(m.role==="assistant"&&m.sql)return E}return-1},[a]),j=e.useRef(L>=0?L:-1),[Ie,ee]=e.useState(L>=0?new Set([L]):new Set);e.useEffect(()=>{L>=0&&L!==j.current&&(ee(E=>new Set([...E,L])),j.current=L)},[L]);const{visibleEntries:K,lastAssistantAnchorIndex:Y,lastVisibleUserIndex:ve}=e.useMemo(()=>Ua(a),[a]),pe=e.useMemo(()=>Ga(b,a),[b,a]);e.useEffect(()=>{z()},[pe,z]),e.useLayoutEffect(()=>{if(!N||p)return;const E=T.current.get(N);if(E){const m=setTimeout(()=>{E.scrollIntoView({behavior:"smooth",block:"start"}),I(!0),l()},100);return()=>clearTimeout(m)}},[N,p,l]),e.useEffect(()=>()=>{l()},[]);const ke=K[K.length-1],J=K.length>0?ke.type==="user"?ke.index:ke.anchorIndex:-1,ze=Y;return t.jsxs(cr,{ref:h,$scrolled:F,role:"log","data-hook":"chat-messages-container",children:[K.map(E=>{var tt,Ke,P;if(E.type==="user"){const{message:M}=E,U=`${M.id}`,fe=(tt=M.displayHealthIssueData)==null?void 0:tt.severity,at=Ae(M.sql||"")===Ae(k||""),ye=M.displayType,me=M.sql;if(ye&&ye!=="ask_request"){const W=qr(ye);let xe=null;if(ye==="schema_explain_request"&&M.displaySchemaData){const ae=M.displaySchemaData;xe=t.jsx(ct,{children:t.jsxs(ba,{onClick:()=>Z(ae),children:[t.jsx(bt,{kind:ae.kind,partitionBy:ae.partitionBy,walEnabled:ae.walEnabled,designatedTimestamp:ae.designatedTimestamp}),t.jsx(Aa,{children:ae.tableName})]})})}else if(ye==="health_issue_request"&&M.displayHealthIssueData){const ae=M.displayHealthIssueData;xe=t.jsx(ct,{children:t.jsxs(ba,{children:[t.jsx(bt,{kind:"table"}),t.jsx(Aa,{children:ae.tableName})]})})}else me&&(xe=t.jsx(ct,{children:t.jsx(Ca,{"data-hook":"user-request-sql-editor",children:t.jsx(Pe,{value:me,maxHeight:216,onOpenInEditor:()=>u({type:"code",value:me},at)})})}));return t.jsxs(wa,{"data-hook":"chat-message-user",ref:ae=>{ae&&T.current.set(M.id,ae)},children:[t.jsxs(ur,{children:[t.jsx(gr,{children:t.jsx(pr,{children:W==null?void 0:W.icon})}),t.jsx(fr,{children:W==null?void 0:W.title})]}),(W==null?void 0:W.description)&&t.jsxs(yr,{children:[t.jsx(xr,{children:W.description}),ye==="health_issue_request"&&((Ke=M.displayHealthIssueData)==null?void 0:Ke.issueMessage)&&t.jsxs(Cr,{children:[fe==="critical"?t.jsx(Xa,{size:14,weight:"fill",color:v.color.red}):t.jsx(Ya,{size:14,weight:"fill",color:v.color.orange}),t.jsx(wr,{color:fe==="critical"?"red":"orange",children:M.displayHealthIssueData.issueMessage})]})]}),xe]},U)}if(ye==="ask_request"&&me){const W=M.displayUserMessage||M.content||"";return t.jsxs(wa,{"data-hook":"chat-message-user",ref:xe=>{xe&&T.current.set(M.id,xe)},children:[t.jsx(mr,{children:t.jsx(va,{children:W})}),t.jsx(ct,{children:t.jsx(Ca,{"data-hook":"user-request-sql-editor",children:t.jsx(Pe,{value:me,maxHeight:216,onOpenInEditor:()=>u({type:"code",value:me},at)})})})]},U)}return t.jsx(hr,{"data-hook":"chat-message-user",ref:W=>{W&&T.current.set(M.id,W)},children:t.jsx(va,{children:M.displayUserMessage||M.content})},U)}const{anchorMessage:m,anchorIndex:Q,turnMessages:$e}=E,Be=`${m.id}`,We=Ae(m.sql||"")===Ae(k||""),ce=!!m.sql,Ne=ce&&m.previousSQL!==void 0&&Ae(m.sql||"")===Ae(m.previousSQL||""),Le=Ie.has(Q),he=m.isAccepted===!0,s=m.isRejected===!0,te=ce&&!he&&!s&&Q<ve,Qe=Q===J,Me=b&&Qe,De=ce&&!Ne&&!he&&!s&&!te&&Qe;let $="neutral";if(m.sql){const M=Ae(m.sql),U=At(M);if(A&&U===A)$="loading";else if(_){const fe=(P=_[U])==null?void 0:P.latest;fe&&(fe.type===Fe.ERROR?$="error":(fe.type===Fe.SUCCESS||fe.type===Fe.INFO)&&($="success"))}}const B=kt(m.previousSQL),Oe=kt(m.sql),O=!!m.error,ht=O&&!b&&!C&&Qe,mt=Q===ze&&C===!0,se=!!m.operationHistory&&m.operationHistory.length>0;return t.jsxs(br,{$hasOperationHistory:se,"data-hook":"chat-message-assistant",ref:M=>{M&&T.current.set(m.id,M)},children:[t.jsx(dr,{turnMessages:$e,anchorMessage:m,status:X,isLiveOperation:mt,isMessageStreaming:Me,onScrollNeeded:z,onOpenInEditor:u}),ce&&!Me&&t.jsxs(Mr,{"data-hook":"inline-diff-container",children:[t.jsxs(jr,{$isExpanded:Le,children:[t.jsxs(_r,{children:[t.jsx(Ja,{size:22,color:v.color.offWhite}),t.jsx(Hr,{children:"Suggested change"})]}),Ne&&t.jsxs(ka,{"data-hook":"diff-status-unchanged",children:[t.jsx(Ma,{children:t.jsx(Qt,{size:"14px"})}),"Already accepted"]}),!Ne&&(he||s||te)&&t.jsxs(ka,{$isAccepted:he,$isRejected:s,$isRejectedWithFollowUp:te,"data-hook":s?"diff-status-rejected":te?"diff-status-followed-up":"diff-status-accepted",children:[t.jsx(Ma,{$isAccepted:he,$isRejected:s,$isRejectedWithFollowUp:te,children:s?t.jsx(en,{size:"14px"}):te?t.jsx(Yt,{size:"14px"}):t.jsx(Qt,{size:"14px"})}),s?"Rejected":te?"Followed up":"Accepted"]}),t.jsxs(Er,{children:[t.jsx(Et,{onClick:M=>{M.stopPropagation(),$==="loading"&&m.sql?H==null||H(At(Ae(m.sql))):m.sql&&c&&c(m.sql)},title:$==="loading"?"Cancel query":"Run this query","aria-label":$==="loading"?"Cancel query":"Run this query","data-hook":"message-action-run-sql",children:Lr($,v)}),!De&&g&&!(Q===L&&he)&&!We&&t.jsx(Et,{onClick:M=>{M.stopPropagation(),m.id&&m.sql&&!C&&(_e(He.AI_EDITOR_SUGGESTION_APPLY),g(m.id,m.sql))},title:"Apply to editor","aria-label":"Apply to editor",disabled:C,"data-hook":"message-action-apply",children:t.jsx(ra,{size:22,color:v.color.offWhite})}),t.jsx(Ir,{title:"Expand diff view","aria-label":Le?"Collapse diff view":"Expand diff view","aria-expanded":Le,"data-hook":"diff-expand-button",onClick:()=>{ee(M=>{const U=new Set(M);return U.has(Q)?U.delete(Q):U.add(Q),U})},children:t.jsx(tn,{})})]})]}),Le&&t.jsxs(t.Fragment,{children:[t.jsx(Nr,{children:t.jsx(Pe,{diffEditor:!0,original:B,modified:Oe,maxHeight:300,onOpenInEditor:()=>u({type:"diff",original:B??"",modified:Oe??""}),handleScrollNeeded:z})}),De&&t.jsxs(Vr,{align:"center",justifyContent:"center",children:[o&&m.id&&t.jsx(Sr,{onClick:()=>o(m.id),"data-hook":"message-action-reject",children:"Reject"}),n&&m.id&&t.jsx(Zr,{onClick:()=>n(m.id),"data-hook":"message-action-accept",children:"Accept"})]})]})]}),O&&t.jsxs(Ar,{role:"alert","data-hook":"chat-message-error",children:[t.jsx($t,{size:16,color:v.color.red,style:{flexShrink:0}}),m.error,ht&&y&&t.jsx(vr,{size:"sm",skin:"secondary",prefixIcon:t.jsx(Gt,{size:12}),onClick:()=>{const M=a.slice(0,Q).findLastIndex(U=>U.role==="user");M>=0&&y(a[M].id)},"data-hook":"retry-button",children:"Retry"})]})]},Be)}),t.jsx(kr,{ref:x,"data-hook":"messages-end"})]})},Tr=i(q).withConfig({displayName:"ChatInput__InputContainer"})([`
|
|
592
592
|
display: flex;
|
|
593
593
|
flex-direction: column;
|
|
594
594
|
align-items: stretch;
|
|
@@ -598,12 +598,12 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
598
598
|
width: 100%;
|
|
599
599
|
margin-top: auto;
|
|
600
600
|
border-top: 1px solid `,`;
|
|
601
|
-
`],r("selection")),
|
|
601
|
+
`],r("selection")),Fr=i(q).withConfig({displayName:"ChatInput__InputWrapper"})([`
|
|
602
602
|
display: flex;
|
|
603
603
|
position: relative;
|
|
604
604
|
width: 100%;
|
|
605
605
|
overflow: hidden;
|
|
606
|
-
`]),
|
|
606
|
+
`]),Rr=i.textarea.withConfig({displayName:"ChatInput__StyledTextArea"})([`
|
|
607
607
|
flex: 1;
|
|
608
608
|
min-height: 8rem;
|
|
609
609
|
max-height: 30rem;
|
|
@@ -629,7 +629,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
629
629
|
&:disabled {
|
|
630
630
|
opacity: 0.5;
|
|
631
631
|
}
|
|
632
|
-
`],({$hasContext:a})=>a?"4.4rem 4.5rem 1.2rem 1.2rem":"1.2rem 4.5rem 1.2rem 1.2rem",r("backgroundDarker"),r("selection"),r("foreground"),({theme:a})=>a.font,r("pinkDarker"),r("gray2")),
|
|
632
|
+
`],({$hasContext:a})=>a?"4.4rem 4.5rem 1.2rem 1.2rem":"1.2rem 4.5rem 1.2rem 1.2rem",r("backgroundDarker"),r("selection"),r("foreground"),({theme:a})=>a.font,r("pinkDarker"),r("gray2")),zr=i.button.withConfig({displayName:"ChatInput__ActionButton"})([`
|
|
633
633
|
position: absolute;
|
|
634
634
|
right: 0.8rem;
|
|
635
635
|
bottom: 0.8rem;
|
|
@@ -640,7 +640,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
640
640
|
justify-content: center;
|
|
641
641
|
border-radius: 0.4rem;
|
|
642
642
|
cursor: pointer;
|
|
643
|
-
`]),$
|
|
643
|
+
`]),$r=i.div.withConfig({displayName:"ChatInput__ContextBadgeContainer"})([`
|
|
644
644
|
position: absolute;
|
|
645
645
|
padding: 0.8rem;
|
|
646
646
|
top: 2px;
|
|
@@ -649,7 +649,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
649
649
|
width: calc(100% - 0.2rem);
|
|
650
650
|
display: inline-flex;
|
|
651
651
|
background: `,`;
|
|
652
|
-
`],r("backgroundDarker")),
|
|
652
|
+
`],r("backgroundDarker")),Br=i.button.withConfig({displayName:"ChatInput__ContextBadge"})([`
|
|
653
653
|
display: flex;
|
|
654
654
|
padding: 0.3rem 0.6rem;
|
|
655
655
|
align-items: center;
|
|
@@ -670,7 +670,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
670
670
|
`,`;
|
|
671
671
|
color: `,`;
|
|
672
672
|
}
|
|
673
|
-
`],({$warn:a,theme:n})=>a?n.color.red:n.color.selection,r("chatBackground"),({theme:a})=>a.color.gray2,({$warn:a})=>a?"default":"pointer",({$warn:a,theme:n})=>a?n.color.red:n.color.offWhite,({theme:a})=>a.color.offWhite),
|
|
673
|
+
`],({$warn:a,theme:n})=>a?n.color.red:n.color.selection,r("chatBackground"),({theme:a})=>a.color.gray2,({$warn:a})=>a?"default":"pointer",({$warn:a,theme:n})=>a?n.color.red:n.color.offWhite,({theme:a})=>a.color.offWhite),Wr=i.div.withConfig({displayName:"ChatInput__ContextBadgeIcon"})([`
|
|
674
674
|
display: flex;
|
|
675
675
|
align-items: center;
|
|
676
676
|
color: `,`;
|
|
@@ -679,7 +679,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
679
679
|
svg {
|
|
680
680
|
color: `,`;
|
|
681
681
|
}
|
|
682
|
-
`],r("gray2"),({$warn:a,theme:n})=>a?n.color.red:r("gray2")),
|
|
682
|
+
`],r("gray2"),({$warn:a,theme:n})=>a?n.color.red:r("gray2")),Qr=i(zr).withConfig({displayName:"ChatInput__SendButton"})([`
|
|
683
683
|
background: `,`;
|
|
684
684
|
color: `,`;
|
|
685
685
|
|
|
@@ -691,7 +691,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
691
691
|
opacity: 0.5;
|
|
692
692
|
cursor: not-allowed;
|
|
693
693
|
}
|
|
694
|
-
`],r("pinkDarker"),r("foreground"),r("pink")),
|
|
694
|
+
`],r("pinkDarker"),r("foreground"),r("pink")),Or=i.div.withConfig({displayName:"ChatInput__ThoughtStream"})([`
|
|
695
695
|
display: flex;
|
|
696
696
|
position: relative;
|
|
697
697
|
width: 100%;
|
|
@@ -703,7 +703,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
703
703
|
`,` border-box;
|
|
704
704
|
border-radius: 0.6rem;
|
|
705
705
|
height: 4rem;
|
|
706
|
-
`],r("backgroundDarker"),r("backgroundDarker"),r("backgroundDarker"),mn),
|
|
706
|
+
`],r("backgroundDarker"),r("backgroundDarker"),r("backgroundDarker"),mn),Kr=i.div.withConfig({displayName:"ChatInput__ThoughtStreamContent"})([`
|
|
707
707
|
display: flex;
|
|
708
708
|
align-items: center;
|
|
709
709
|
background: `,`;
|
|
@@ -713,17 +713,17 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
713
713
|
border-radius: 0.6rem;
|
|
714
714
|
padding: 0 1.2rem;
|
|
715
715
|
padding-right: 4.5rem;
|
|
716
|
-
`],r("backgroundDarker")),
|
|
716
|
+
`],r("backgroundDarker")),Pr=i.div.withConfig({displayName:"ChatInput__ThoughtText"})([`
|
|
717
717
|
font-weight: 500;
|
|
718
718
|
font-size: 1.4rem;
|
|
719
719
|
color: `,`;
|
|
720
720
|
`,`
|
|
721
|
-
`],r("gray2"),Bt),
|
|
721
|
+
`],r("gray2"),Bt),Ur=i.div.withConfig({displayName:"ChatInput__StopButtonWrapper"})([`
|
|
722
722
|
position: absolute;
|
|
723
723
|
right: 0.8rem;
|
|
724
724
|
top: 50%;
|
|
725
725
|
transform: translateY(-50%);
|
|
726
|
-
`]),It=(a,n=30)=>{if(!a)return"";const o=a.trim().replace(/\s+/g," ");return o.length<=n?o:o.slice(0,n)+"..."},
|
|
726
|
+
`]),It=(a,n=30)=>{if(!a)return"";const o=a.trim().replace(/\s+/g," ");return o.length<=n?o:o.slice(0,n)+"..."},Gr=e.forwardRef(({onSend:a,disabled:n=!1,placeholder:o="Ask a question or request a refinement...",contextSQL:c,contextTableId:u,contextNotebook:g,onContextClick:y},H)=>{const[A,_]=e.useState(""),C=e.useRef(null),k=Ee(je.query.getTables),b=e.useMemo(()=>u==null?null:k.find(I=>I.id===u)??null,[u,k]),p=g?It(g.label):b!=null&&b.table_name?It(b.table_name):c?It(c):null,N=!!p,l=g==null?void 0:g.warn,v=g?l==="archived"?"Notebook archived":l==="deleted"?"Notebook deleted":`Attached: ${g.label} \u2014 click to switch`:void 0;e.useImperativeHandle(H,()=>({focus:()=>{var I;(I=C.current)==null||I.focus()}}));const{status:R,abortOperation:d}=Te(),x=ge(R);e.useEffect(()=>{C.current&&(C.current.style.height="auto",C.current.style.height=`${C.current.scrollHeight}px`)},[A]);const h=()=>{const I=A.trim();I&&!n&&!x&&(a(I),_(""),C.current&&(C.current.style.height="auto"))},T=I=>{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),h())},X=()=>{d()},F=x;return t.jsxs(Tr,{children:[F?t.jsxs(Or,{"data-hook":"chat-assistant-modes",children:[t.jsxs(Kr,{children:[t.jsx(wt,{size:20}),t.jsx(Pr,{role:"status","aria-live":"polite",children:R})]}),t.jsx(Ur,{children:t.jsx(cn,{size:"md",onClick:X,title:"Stop generation",ariaLabel:"Stop AI generation",dataHook:"chat-stop-button"})})]}):t.jsxs(Fr,{children:[N&&t.jsx($r,{children:t.jsxs(Br,{type:"button",$warn:!!l,onClick:g?()=>void g.onClick():y,title:v,"aria-label":`Chat context: ${p}`,"data-hook":"chat-context-badge",children:[t.jsx(Wr,{$warn:!!l,children:g?t.jsx(hn,{size:14,weight:"regular"}):b?t.jsx(bt,{kind:Wt(b),partitionBy:b.partitionBy,walEnabled:b.walEnabled,designatedTimestamp:b.designatedTimestamp}):t.jsx(aa,{size:14,weight:"regular"})}),l==="archived"?`Archived: ${p}`:l==="deleted"?`Deleted: ${p}`:p]})}),t.jsx(Rr,{ref:C,value:A,onChange:I=>_(I.target.value),onKeyDown:T,placeholder:o,"aria-label":"Chat with AI assistant","aria-keyshortcuts":"Enter",disabled:n,rows:1,$hasContext:N,"data-hook":"chat-input-textarea"}),t.jsx(Qr,{onClick:h,disabled:!A.trim()||n,title:"Send (Enter) \u2022 New line (Shift+Enter)","aria-label":"Send message","data-hook":"chat-send-button",children:t.jsx(Xt,{size:20,weight:"bold"})})]}),t.jsx(de,{color:"gray2",size:"sm",align:"center",children:"Chats are connected to a single query to improve responses."})]})}),Nt=i.div.withConfig({displayName:"ChatHistoryItem__Container"})([`
|
|
727
727
|
display: flex;
|
|
728
728
|
align-items: center;
|
|
729
729
|
gap: 0.6rem;
|
|
@@ -749,19 +749,19 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
749
749
|
outline: 2px solid `,`;
|
|
750
750
|
outline-offset: -2px;
|
|
751
751
|
}
|
|
752
|
-
`],({$disabled:a})=>a?"not-allowed":"pointer",r("transparent"),({$disabled:a})=>a?.5:1,({$disabled:a})=>a?"transparent":r("selection"),({$disabled:a})=>a?r("offWhite"):r("foreground"),r("pink")),
|
|
752
|
+
`],({$disabled:a})=>a?"not-allowed":"pointer",r("transparent"),({$disabled:a})=>a?.5:1,({$disabled:a})=>a?"transparent":r("selection"),({$disabled:a})=>a?r("offWhite"):r("foreground"),r("pink")),Xr=i.div.withConfig({displayName:"ChatHistoryItem__IconWrapper"})([`
|
|
753
753
|
display: flex;
|
|
754
754
|
align-items: center;
|
|
755
755
|
justify-content: center;
|
|
756
756
|
flex-shrink: 0;
|
|
757
757
|
color: `,`;
|
|
758
|
-
`],r("gray2")),
|
|
758
|
+
`],r("gray2")),Yr=i.div.withConfig({displayName:"ChatHistoryItem__Content"})([`
|
|
759
759
|
display: flex;
|
|
760
760
|
flex-direction: column;
|
|
761
761
|
flex: 1;
|
|
762
762
|
min-width: 0;
|
|
763
763
|
padding-left: 0.4rem;
|
|
764
|
-
`]),
|
|
764
|
+
`]),Jr=i.div.attrs({className:"chat-title"}).withConfig({displayName:"ChatHistoryItem__Title"})([`
|
|
765
765
|
padding: 0.2rem 0.4rem;
|
|
766
766
|
border: 1px solid transparent;
|
|
767
767
|
color: `,`;
|
|
@@ -769,7 +769,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
769
769
|
overflow: hidden;
|
|
770
770
|
text-overflow: ellipsis;
|
|
771
771
|
transform: translateX(-0.4rem);
|
|
772
|
-
`],r("offWhite")),
|
|
772
|
+
`],r("offWhite")),e0=i.input.withConfig({displayName:"ChatHistoryItem__TitleInput"})([`
|
|
773
773
|
color: `,`;
|
|
774
774
|
background: transparent;
|
|
775
775
|
border: 1px solid `,`;
|
|
@@ -792,14 +792,14 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
792
792
|
&::-webkit-selection {
|
|
793
793
|
background: `,`;
|
|
794
794
|
}
|
|
795
|
-
`],r("foreground"),r("pinkDarker"),r("pinkPrimary"),r("pinkPrimary"),r("pinkPrimary")),
|
|
795
|
+
`],r("foreground"),r("pinkDarker"),r("pinkPrimary"),r("pinkPrimary"),r("pinkPrimary")),t0=i.div.withConfig({displayName:"ChatHistoryItem__Subtitle"})([`
|
|
796
796
|
font-size: 1.2rem;
|
|
797
797
|
line-height: 1.5;
|
|
798
798
|
color: `,`;
|
|
799
799
|
white-space: nowrap;
|
|
800
800
|
overflow: hidden;
|
|
801
801
|
text-overflow: ellipsis;
|
|
802
|
-
`],r("gray2")),
|
|
802
|
+
`],r("gray2")),a0=i.div.withConfig({displayName:"ChatHistoryItem__ActionsContainer"})([`
|
|
803
803
|
display: flex;
|
|
804
804
|
align-items: center;
|
|
805
805
|
gap: 0.4rem;
|
|
@@ -830,12 +830,12 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
830
830
|
&:hover {
|
|
831
831
|
background: `,`;
|
|
832
832
|
}
|
|
833
|
-
`],r("foreground"),Nt,Nt,r("pink"),r("backgroundDarker")),
|
|
833
|
+
`],r("foreground"),Nt,Nt,r("pink"),r("backgroundDarker")),n0=i.span.withConfig({displayName:"ChatHistoryItem__CurrentIndicator"})([`
|
|
834
834
|
font-size: 1.2rem;
|
|
835
835
|
line-height: 1.5rem;
|
|
836
836
|
color: `,`;
|
|
837
837
|
white-space: nowrap;
|
|
838
|
-
`],r("mutedLabel")),
|
|
838
|
+
`],r("mutedLabel")),r0=({conversation:a,subtitle:n,isCurrent:o,hasOngoingProcess:c,disabled:u,onSelect:g,onRename:y,onDelete:H})=>{const[A,_]=e.useState(!1),[C,k]=e.useState(a.conversationName),b=e.useRef(null);e.useEffect(()=>{A&&b.current&&(b.current.focus(),b.current.select())},[A]);const p=h=>{h.stopPropagation(),k(a.conversationName),_(!0)},N=h=>{h.stopPropagation(),H(a.id)},l=async()=>{const h=C.trim();h&&h!==a.conversationName&&(_e(He.AI_CHAT_RENAME),await y(a.id,h)),_(!1)},v=async h=>{h.key==="Enter"?await l():h.key==="Escape"&&(k(a.conversationName),_(!1))},R=async()=>{await l()},d=async()=>{!A&&!u&&await g(a.id)},x=async h=>{A||u||h.target===h.currentTarget&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),await g(a.id))};return t.jsxs(Nt,{role:"button",tabIndex:u?-1:0,"aria-disabled":u||void 0,onClick:d,onKeyDown:x,$disabled:u,"data-hook":"chat-history-item",children:[t.jsx(Xr,{children:t.jsx(Jt,{size:18})}),t.jsxs(Yr,{children:[A?t.jsx(e0,{ref:b,value:C,onChange:h=>k(h.target.value),onKeyDown:v,onBlur:R,onClick:h=>h.stopPropagation(),"data-hook":"chat-history-rename"}):t.jsx(Jr,{"data-hook":"chat-history-title",children:a.conversationName}),n&&t.jsx(t0,{children:n})]}),t.jsxs(a0,{children:[!A&&t.jsxs(t.Fragment,{children:[t.jsx(ja,{onClick:p,title:"Edit title","data-hook":"chat-history-edit",children:t.jsx(un,{size:18})}),!c&&t.jsx(ja,{onClick:N,title:"Delete","data-hook":"chat-history-delete",children:t.jsx(sa,{size:18})})]}),o&&t.jsx(n0,{children:"Current"})]})]})},i0=i.div.withConfig({displayName:"DateSeparator__Container"})([`
|
|
839
839
|
display: flex;
|
|
840
840
|
align-items: center;
|
|
841
841
|
gap: 1rem;
|
|
@@ -845,15 +845,15 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
845
845
|
flex: 1;
|
|
846
846
|
height: 1px;
|
|
847
847
|
background: `,`;
|
|
848
|
-
`],r("selection")),
|
|
848
|
+
`],r("selection")),s0=i.div.withConfig({displayName:"DateSeparator__LabelContainer"})([`
|
|
849
849
|
display: flex;
|
|
850
850
|
align-items: center;
|
|
851
851
|
gap: 0.8rem;
|
|
852
852
|
color: `,`;
|
|
853
|
-
`],r("gray2")),
|
|
853
|
+
`],r("gray2")),o0=i.span.withConfig({displayName:"DateSeparator__Label"})([`
|
|
854
854
|
font-size: 1.3rem;
|
|
855
855
|
white-space: nowrap;
|
|
856
|
-
`]),
|
|
856
|
+
`]),l0=({label:a})=>t.jsxs(i0,{children:[t.jsx(_a,{}),t.jsxs(s0,{children:[t.jsx(ea,{size:16}),t.jsx(o0,{children:a})]}),t.jsx(_a,{})]}),d0=6e4;function Ha(a){const n=gn(),o=fn(n);return pn(a,new Date().getTime(),{locale:o})+" ago"}function c0(a){const n=[...a].sort((g,y)=>y.updatedAt-g.updatedAt),o=new Map;for(const g of n){const y=Ha(g.updatedAt),H=o.get(y)||[];o.set(y,[...H,g])}const c=[],u=new Set;for(const g of n){const y=Ha(g.updatedAt);u.has(y)||(u.add(y),c.push({label:y,conversations:o.get(y)||[]}))}return c}function h0(a){const[n,o]=e.useState(0);return e.useEffect(()=>{const c=setInterval(()=>{o(u=>u+1)},d0);return()=>clearInterval(c)},[]),e.useMemo(()=>c0(a),[a,n])}function m0(a,n){if(!n.trim())return a;const o=n.toLowerCase().trim();return a.filter(c=>c.conversationName.toLowerCase().includes(o))}const Ea=i.div.withConfig({displayName:"ChatHistoryView__Container"})([`
|
|
857
857
|
display: flex;
|
|
858
858
|
flex-direction: column;
|
|
859
859
|
height: 100%;
|
|
@@ -861,12 +861,12 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
861
861
|
padding: 2rem 1rem 4rem 1rem;
|
|
862
862
|
background: `,`;
|
|
863
863
|
overflow: hidden;
|
|
864
|
-
`],r("chatBackground")),
|
|
864
|
+
`],r("chatBackground")),u0=i.div.withConfig({displayName:"ChatHistoryView__SearchContainer"})([`
|
|
865
865
|
position: relative;
|
|
866
866
|
display: flex;
|
|
867
867
|
align-items: center;
|
|
868
868
|
flex-shrink: 0;
|
|
869
|
-
`]),
|
|
869
|
+
`]),g0=i.div.withConfig({displayName:"ChatHistoryView__SearchIcon"})([`
|
|
870
870
|
position: absolute;
|
|
871
871
|
left: 1.2rem;
|
|
872
872
|
display: flex;
|
|
@@ -874,7 +874,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
874
874
|
color: `,`;
|
|
875
875
|
pointer-events: none;
|
|
876
876
|
z-index: 1;
|
|
877
|
-
`],r("gray2")),
|
|
877
|
+
`],r("gray2")),p0=i.button.withConfig({displayName:"ChatHistoryView__ClearButton"})([`
|
|
878
878
|
position: absolute;
|
|
879
879
|
right: 0.8rem;
|
|
880
880
|
display: flex;
|
|
@@ -890,7 +890,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
890
890
|
&:hover {
|
|
891
891
|
color: `,`;
|
|
892
892
|
}
|
|
893
|
-
`],r("gray2"),r("foreground")),
|
|
893
|
+
`],r("gray2"),r("foreground")),f0=i(wn).withConfig({displayName:"ChatHistoryView__SearchInput"})([`
|
|
894
894
|
width: 100%;
|
|
895
895
|
background: transparent;
|
|
896
896
|
color: `,`;
|
|
@@ -903,7 +903,7 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
903
903
|
background: transparent;
|
|
904
904
|
border-color: `,`;
|
|
905
905
|
}
|
|
906
|
-
`],r("foreground"),r("gray2"),r("pinkDarker")),
|
|
906
|
+
`],r("foreground"),r("gray2"),r("pinkDarker")),y0=i.div.withConfig({displayName:"ChatHistoryView__ListContainer"})([`
|
|
907
907
|
display: flex;
|
|
908
908
|
flex-direction: column;
|
|
909
909
|
gap: 0.6rem;
|
|
@@ -921,28 +921,28 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
921
921
|
font-size: 1.3rem;
|
|
922
922
|
text-align: center;
|
|
923
923
|
padding: 2rem;
|
|
924
|
-
`],r("gray2")),
|
|
924
|
+
`],r("gray2")),x0=i(Re.Content).withConfig({displayName:"ChatHistoryView__AlertDialogContent"})([`
|
|
925
925
|
background: `,`;
|
|
926
|
-
`],r("chatBackground")),
|
|
926
|
+
`],r("chatBackground")),w0=i.div.withConfig({displayName:"ChatHistoryView__DialogHeader"})([`
|
|
927
927
|
display: flex;
|
|
928
928
|
align-items: center;
|
|
929
929
|
justify-content: space-between;
|
|
930
930
|
padding: 1.5rem 2rem;
|
|
931
931
|
border-bottom: 1px solid `,`;
|
|
932
|
-
`],r("selection")),
|
|
932
|
+
`],r("selection")),C0=i.h3.withConfig({displayName:"ChatHistoryView__DialogTitle"})([`
|
|
933
933
|
margin: 0;
|
|
934
934
|
font-weight: 500;
|
|
935
935
|
color: `,`;
|
|
936
|
-
`],r("foreground")),
|
|
936
|
+
`],r("foreground")),b0=i.p.withConfig({displayName:"ChatHistoryView__DialogDescription"})([`
|
|
937
937
|
margin: 2rem;
|
|
938
938
|
font-size: 1.4rem;
|
|
939
939
|
line-height: 1.5;
|
|
940
|
-
`]),
|
|
940
|
+
`]),A0=i.div.withConfig({displayName:"ChatHistoryView__DialogButtons"})([`
|
|
941
941
|
display: flex;
|
|
942
942
|
justify-content: flex-end;
|
|
943
943
|
gap: 1rem;
|
|
944
944
|
padding: 0 2rem 0 2rem;
|
|
945
|
-
`]),
|
|
945
|
+
`]),v0=i(ue).attrs({skin:"secondary"}).withConfig({displayName:"ChatHistoryView__CancelButton"})([""]),k0=i(ue).withConfig({displayName:"ChatHistoryView__DeleteButton"})([`
|
|
946
946
|
background: `,`;
|
|
947
947
|
border-color: `,`;
|
|
948
948
|
|
|
@@ -950,16 +950,16 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
950
950
|
background: `,`;
|
|
951
951
|
filter: brightness(1.1);
|
|
952
952
|
}
|
|
953
|
-
`],r("red"),r("red"),r("red")),
|
|
953
|
+
`],r("red"),r("red"),r("red")),M0=({currentConversationId:a})=>{const[n,o]=e.useState(""),[c,u]=e.useState(!1),[g,y]=e.useState(null),H=e.useRef(null),{conversationMetas:A,chatWindowState:_,openChatWindow:C,updateConversationName:k,deleteConversation:b}=xt(),{status:p}=Te(),{buffers:N}=yt(),l=Ee(je.query.getTables),v=e.useMemo(()=>Array.from(A.values()),[A]),R=e.useMemo(()=>m0(v,n),[v,n]),d=h0(R),x=(V,z)=>{if(V){if(z==="buffer"){const Z=N.find(L=>L.id===V);if(Z)return Z.label}else if(z==="table"){const Z=l.find(L=>L.id===V);if(Z)return Z.table_name}}},h=async V=>{await C(V)},T=async(V,z)=>{await k(V,z)},X=V=>{y(V),u(!0)},F=async()=>{g&&await b(g),u(!1),y(null)},I=()=>{u(!1),y(null)};return e.useEffect(()=>{H.current&&H.current.scrollIntoView({block:"center"})},[]),v.length===0?t.jsx(Ea,{children:t.jsx(Ia,{"data-hook":"chat-history-empty",children:"No conversations yet"})}):t.jsxs(Ea,{children:[t.jsxs(u0,{children:[t.jsx(g0,{children:t.jsx(ia,{size:18})}),t.jsx(f0,{type:"text",placeholder:"Search chats",value:n,onChange:V=>o(V.target.value),"data-hook":"chat-history-search"}),n&&t.jsx(p0,{onClick:()=>o(""),title:"Clear search","data-hook":"chat-history-search-clear",children:t.jsx(Kt,{size:16})})]}),t.jsxs(y0,{"data-hook":"chat-history-list",children:[d.map((V,z)=>t.jsxs(ot.Fragment,{children:[z>0&&t.jsx(l0,{label:V.label}),V.conversations.map(Z=>{const L=Z.id===a;return t.jsx("div",{ref:L?H:void 0,children:t.jsx(r0,{conversation:Z,subtitle:Z.bufferId??Z.tableId?x(Z.bufferId??Z.tableId,Z.bufferId?"buffer":"table"):void 0,isCurrent:L,hasOngoingProcess:Z.id===_.activeConversationId&&ge(p),disabled:ge(p)&&Z.id!==_.activeConversationId,onSelect:h,onRename:T,onDelete:X})},Z.id)})]},V.label)),R.length===0&&n&&t.jsx(Ia,{children:"No chats match your search"})]}),t.jsx(Re.Root,{open:c,onOpenChange:u,children:t.jsxs(Re.Portal,{children:[t.jsx(yn,{children:t.jsx(xn,{primitive:Re.Overlay})}),t.jsxs(x0,{maxwidth:"40rem",children:[t.jsx(w0,{children:t.jsx(C0,{children:"Delete conversation"})}),t.jsx(b0,{children:"Are you sure you want to delete this conversation? This action cannot be undone."}),t.jsxs(A0,{children:[t.jsx(Re.Cancel,{asChild:!0,children:t.jsx(v0,{onClick:I,children:"Cancel"})}),t.jsx(Re.Action,{asChild:!0,children:t.jsx(k0,{onClick:F,children:"Delete"})})]})]})]})})]})};async function j0(a){var C,k,b;const{normalizedSQL:n,queryKey:o,namespaceKey:c,quest:u,dispatch:g,executionRefs:y,releaseExecution:H}=a,{promise:A,queryId:_}=u.queryRaw(n,{limit:"0,1000",explain:!0,cancellable:!0});(C=a.onQueryStarted)==null||C.call(a,_);try{const p=await A;if(y.current[c]||(y.current[c]={}),y.current[c][o]={success:!0,queryText:n,startOffset:-1,endOffset:-1},g(Ue.setResult(p)),p.type===Ge.DDL||p.type===Ge.DML){g(Ue.addNotification({query:o,content:t.jsx(Xe,{query:n})},c)),Ye.publish(Je.MSG_QUERY_SCHEMA);return}if(p.type===Ge.NOTICE){g(Ue.addNotification({query:o,content:t.jsxs(de,{color:"foreground",ellipsis:!0,title:n,children:[p.notice,n!==""?`: ${n}`:""]}),type:Fe.NOTICE,sideContent:t.jsx(Xe,{query:n})},c)),Ye.publish(Je.MSG_QUERY_SCHEMA);return}p.type===Ge.DQL&&(g(Ue.addNotification({query:o,jitCompiled:((k=p.explain)==null?void 0:k.jitCompiled)??!1,content:t.jsx(Cn,{...p.timings,rowCount:p.count}),sideContent:t.jsx(Xe,{query:n})},c)),Ye.publish(Je.MSG_QUERY_DATASET,p))}catch(p){const N=p;y.current[c]||(y.current[c]={}),y.current[c][o]={success:!1,queryText:n,startOffset:-1,endOffset:-1},g(Ue.addNotification({query:o,content:t.jsx(de,{color:"red",children:N.error||N.message||"Query execution failed"}),type:Fe.ERROR,sideContent:t.jsx(Xe,{query:n})},c))}finally{(b=a.onSettled)==null||b.call(a),H(o)}}const _0=i(ue).withConfig({displayName:"AIChatWindow__CancelButton"})([`
|
|
954
954
|
padding: 1.2rem 0.6rem;
|
|
955
|
-
`]),
|
|
955
|
+
`]),H0=i.div.withConfig({displayName:"AIChatWindow__HeaderLeft"})([`
|
|
956
956
|
display: flex;
|
|
957
957
|
align-items: center;
|
|
958
958
|
gap: 1rem;
|
|
959
959
|
flex: 1;
|
|
960
960
|
min-width: 0;
|
|
961
961
|
overflow: hidden;
|
|
962
|
-
`]),
|
|
962
|
+
`]),E0=i.span.withConfig({displayName:"AIChatWindow__HeaderTitle"})([`
|
|
963
963
|
white-space: nowrap;
|
|
964
964
|
overflow: hidden;
|
|
965
965
|
text-overflow: ellipsis;
|
|
@@ -971,17 +971,17 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
971
971
|
`,`
|
|
972
972
|
`],r("foreground"),({$active:a})=>a&&re([`
|
|
973
973
|
background: `,`;
|
|
974
|
-
`],r("selection"))),
|
|
974
|
+
`],r("selection"))),I0=i.div.withConfig({displayName:"AIChatWindow__HeaderRight"})([`
|
|
975
975
|
display: flex;
|
|
976
976
|
align-items: center;
|
|
977
977
|
gap: 0.5rem;
|
|
978
978
|
flex-shrink: 0;
|
|
979
|
-
`]),
|
|
979
|
+
`]),N0=i.div.withConfig({displayName:"AIChatWindow__ChatWindowContent"})([`
|
|
980
980
|
display: flex;
|
|
981
981
|
height: 100%;
|
|
982
982
|
width: 100%;
|
|
983
983
|
overflow: hidden;
|
|
984
|
-
`]),
|
|
984
|
+
`]),V0=i.div.withConfig({displayName:"AIChatWindow__InitialQueryContainer"})([`
|
|
985
985
|
display: flex;
|
|
986
986
|
flex-direction: column;
|
|
987
987
|
gap: 1rem;
|
|
@@ -990,24 +990,24 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
990
990
|
flex: 1 1 auto;
|
|
991
991
|
min-height: 0;
|
|
992
992
|
width: 100%;
|
|
993
|
-
`]),
|
|
993
|
+
`]),Z0=i.div.withConfig({displayName:"AIChatWindow__InitialQueryBox"})([`
|
|
994
994
|
display: flex;
|
|
995
995
|
flex-direction: column;
|
|
996
996
|
align-self: flex-end;
|
|
997
997
|
flex-shrink: 0;
|
|
998
998
|
overflow: hidden;
|
|
999
999
|
width: 100%;
|
|
1000
|
-
`]),
|
|
1000
|
+
`]),S0=i.div.withConfig({displayName:"AIChatWindow__InitialQueryEditor"})([`
|
|
1001
1001
|
width: 100%;
|
|
1002
1002
|
overflow: hidden;
|
|
1003
|
-
`]),
|
|
1003
|
+
`]),q0=i.div.withConfig({displayName:"AIChatWindow__ButtonContainer"})([`
|
|
1004
1004
|
display: flex;
|
|
1005
1005
|
justify-content: flex-start;
|
|
1006
1006
|
align-items: center;
|
|
1007
1007
|
gap: 1rem;
|
|
1008
1008
|
width: 100%;
|
|
1009
1009
|
margin-top: 0.5rem;
|
|
1010
|
-
`]),
|
|
1010
|
+
`]),L0=i.div.withConfig({displayName:"AIChatWindow__BlankChatContainer"})([`
|
|
1011
1011
|
display: flex;
|
|
1012
1012
|
flex-direction: column;
|
|
1013
1013
|
align-items: flex-start;
|
|
@@ -1019,13 +1019,13 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
1019
1019
|
max-width: 40rem;
|
|
1020
1020
|
text-align: center;
|
|
1021
1021
|
margin: 0 auto;
|
|
1022
|
-
`]),
|
|
1022
|
+
`]),D0=i.h2.withConfig({displayName:"AIChatWindow__BlankChatHeading"})([`
|
|
1023
1023
|
font-size: 2rem;
|
|
1024
1024
|
font-weight: 600;
|
|
1025
1025
|
text-align: left;
|
|
1026
1026
|
color: `,`;
|
|
1027
1027
|
margin: 0;
|
|
1028
|
-
`],r("foreground")),
|
|
1028
|
+
`],r("foreground")),T0=i.p.withConfig({displayName:"AIChatWindow__BlankChatSubheading"})([`
|
|
1029
1029
|
font-size: 1.4rem;
|
|
1030
1030
|
font-weight: 400;
|
|
1031
1031
|
color: `,`;
|
|
@@ -1039,9 +1039,9 @@ import{p as le,Q as ft,s as je,u as Te,a as Fa,j as t,c as qt,A as it,K as Lt,b
|
|
|
1039
1039
|
height: 100%;
|
|
1040
1040
|
width: 100%;
|
|
1041
1041
|
gap: 0;
|
|
1042
|
-
`]),
|
|
1043
|
-
`&&m&&!ge(J),[O.length,B,m,J]),tt=e.useMemo(()=>!se||!s||!s.queryKey||!s.bufferId||!u.current?!1:oa(s.queryKey,s.bufferId,A,u)!==null,[se,s,u,A]),Ke=se&&tt&&m&&!ge(J),P=l.isHistoryOpen??!1,M=N.size>0,U=e.useMemo(()=>ge(J)?!0:s?s.messages.length===0&&!s.queryKey&&!s.tableId:!1,[s,J]),fe=e.useMemo(()=>{if(P)return"Chat history";if(!s)return"";if(s.conversationName)return s.conversationName;const f=s.messages[0];if(f!=null&&f.displayType)switch(f.displayType){case"fix_request":return"Fix query";case"explain_request":return"Explain query";case"ask_request":return"Ask AI";case"health_issue_request":return"Health issue analysis";default:return"AI Assistant"}return"AI Assistant"},[s,P]),at=e.useCallback(()=>{P?I():F()},[P,I,F]),ye=()=>O.length>0?"Ask a follow up question or request refinement...":(s==null?void 0:s.tableId)!=null||B!=null&&B.trim()?"Ask a question or request an edit...":"Ask AI about your tables, or generate a query...",me=e.useCallback(async f=>{var Ve;const w=(Ve=V(f))==null?void 0:Ve.notebookBufferId,D=typeof w=="number"?Mn(w):void 0,G=w?await jn(w).catch(S=>(console.warn("Notebook snapshot unavailable, sending without it",S),null)):null,ne=pe(f),we=C.filter(S=>!!S.notebookViewState&&typeof S.id=="number"),Ce=we.length>0||typeof k.id=="number"?{notebooks:we.map(S=>({buffer_id:S.id,label:S.label,archived:!!S.archived,...S.id===w?{bound_to_this_chat:!0}:{}})),active:typeof k.id=="number"?{buffer_id:k.id,label:k.label,kind:k.notebookViewState?"notebook":k.metricsViewState?"metrics":k.editorViewState?"sql":"other"}:void 0}:void 0;if(!(!G&&!ne&&!Ce))return{snapshot:G,digest:ne,workspace:Ce,readSeq:D}},[V,pe,C,k]),W=async(f,w=!1)=>{if(!m||!l.activeConversationId||!s)return;_e(He.AI_CHAT_SEND);const D=l.activeConversationId;w&&y();const G=s.messages.some(ne=>ne.role==="assistant");Ze(Pt({conversationId:D,userMessage:f,currentSQL:B,conversationHistory:s.messages,isFirstMessage:!G,settings:{model:$e,apiKey:Be},aiAssistantSettings:We,questClient:o,tables:ce,hasSchemaAccess:Q,abortSignal:E==null?void 0:E.signal,notebookContext:await me(D)}),{addMessage:z,removeMessages:Z,updateMessage:L,setStatus:ze,setIsStreaming:d,persistMessages:Y,updateConversationName:Ie,bindConversationToNotebook:ve,rotateUserActionDigest:ke,updateMessagesWithCompaction:j})},xe=e.useCallback(async f=>{l.activeConversationId&&(_e(He.AI_CHAT_ACCEPT),await ee({conversationId:l.activeConversationId,messageId:f}))},[l.activeConversationId,ee]),ae=e.useCallback(async f=>{l.activeConversationId&&(_e(He.AI_CHAT_REJECT),await K(l.activeConversationId,f),setTimeout(()=>{var w;(w=Me.current)==null||w.focus()},100))},[l.activeConversationId,K]),Va=e.useCallback(f=>{if(!s)return;const w=Ae(f),D=At(w);let G=null;c.requestExecution({abort:()=>{G!==null&&o.abort(G)},bufferId:te,queryKey:D,execute:()=>{const ne=window.setTimeout(()=>{a(Ct.query.addNotification({query:D,type:Fe.LOADING,content:t.jsxs(q,{gap:"1rem",align:"center",children:[t.jsx(de,{color:"foreground",children:"Running..."}),t.jsx(
|
|
1042
|
+
`]),F0=()=>{const a=Ut(),n=Ee(je.console.getActiveSidebar),{quest:o,questExecution:c}=e.useContext(ft),{editorRef:u,showPreviewBuffer:g,closePreviewBuffer:y,addBuffer:H,executionRefs:A,highlightQuery:_,buffers:C,activeBuffer:k,setActiveBuffer:b}=yt(),p=bn(),{conversationMetas:N,chatWindowState:l,isLoadingMessages:v,isStreaming:R,setIsStreaming:d,scrollToMessageId:x,setScrollToMessageId:h,closeChatWindow:T,openBlankChatWindow:X,openHistoryView:F,closeHistoryView:I,getConversationMeta:V,addMessage:z,removeMessages:Z,updateMessage:L,updateMessagesWithCompaction:j,updateConversationName:Ie,acceptSuggestion:ee,rejectSuggestion:K,persistMessages:Y,bindConversationToNotebook:ve,readUserActionDigest:pe,rotateUserActionDigest:ke}=xt(),{status:J,setStatus:ze,abortController:E,canUse:m,hasSchemaAccess:Q,currentModel:$e,apiKey:Be,aiAssistantSettings:We}=Te(),ce=Ee(je.query.getTables),{active:Ne}=An(),Le=(Ne==null?void 0:Ne.queryKey)??null,he=l.activeConversationId?V(l.activeConversationId):null,s=e.useMemo(()=>he?{...he,messages:p}:null,[he,p]),te=e.useMemo(()=>s?s.bufferId!==void 0?s.bufferId:s.id:-1,[s==null?void 0:s.bufferId,s==null?void 0:s.id]),Qe=Ee(je.query.getQueryNotificationsForBuffer(te)),Me=e.useRef(null),De=e.useRef(!1),$=e.useRef(null),B=e.useMemo(()=>kt(s==null?void 0:s.currentSQL),[s==null?void 0:s.currentSQL]),Oe=e.useMemo(()=>vn(s==null?void 0:s.queryKey),[s==null?void 0:s.queryKey]),O=p,ht=e.useMemo(()=>kn(O)!==null,[O]),mt=e.useMemo(()=>O.length>0&&!v,[O,v]),se=e.useMemo(()=>O.length===0&&B&&B.trim()!==`
|
|
1043
|
+
`&&m&&!ge(J),[O.length,B,m,J]),tt=e.useMemo(()=>!se||!s||!s.queryKey||!s.bufferId||!u.current?!1:oa(s.queryKey,s.bufferId,A,u)!==null,[se,s,u,A]),Ke=se&&tt&&m&&!ge(J),P=l.isHistoryOpen??!1,M=N.size>0,U=e.useMemo(()=>ge(J)?!0:s?s.messages.length===0&&!s.queryKey&&!s.tableId:!1,[s,J]),fe=e.useMemo(()=>{if(P)return"Chat history";if(!s)return"";if(s.conversationName)return s.conversationName;const f=s.messages[0];if(f!=null&&f.displayType)switch(f.displayType){case"fix_request":return"Fix query";case"explain_request":return"Explain query";case"ask_request":return"Ask AI";case"health_issue_request":return"Health issue analysis";default:return"AI Assistant"}return"AI Assistant"},[s,P]),at=e.useCallback(()=>{P?I():F()},[P,I,F]),ye=()=>O.length>0?"Ask a follow up question or request refinement...":(s==null?void 0:s.tableId)!=null||B!=null&&B.trim()?"Ask a question or request an edit...":"Ask AI about your tables, or generate a query...",me=e.useCallback(async f=>{var Ve;const w=(Ve=V(f))==null?void 0:Ve.notebookBufferId,D=typeof w=="number"?Mn(w):void 0,G=w?await jn(w).catch(S=>(console.warn("Notebook snapshot unavailable, sending without it",S),null)):null,ne=pe(f),we=C.filter(S=>!!S.notebookViewState&&typeof S.id=="number"),Ce=we.length>0||typeof k.id=="number"?{notebooks:we.map(S=>({buffer_id:S.id,label:S.label,archived:!!S.archived,...S.id===w?{bound_to_this_chat:!0}:{}})),active:typeof k.id=="number"?{buffer_id:k.id,label:k.label,kind:k.notebookViewState?"notebook":k.metricsViewState?"metrics":k.editorViewState?"sql":"other"}:void 0}:void 0;if(!(!G&&!ne&&!Ce))return{snapshot:G,digest:ne,workspace:Ce,readSeq:D}},[V,pe,C,k]),W=async(f,w=!1)=>{if(!m||!l.activeConversationId||!s)return;_e(He.AI_CHAT_SEND);const D=l.activeConversationId;w&&y();const G=s.messages.some(ne=>ne.role==="assistant");Ze(Pt({conversationId:D,userMessage:f,currentSQL:B,conversationHistory:s.messages,isFirstMessage:!G,settings:{model:$e,apiKey:Be},aiAssistantSettings:We,questClient:o,tables:ce,hasSchemaAccess:Q,abortSignal:E==null?void 0:E.signal,notebookContext:await me(D)}),{addMessage:z,removeMessages:Z,updateMessage:L,setStatus:ze,setIsStreaming:d,persistMessages:Y,updateConversationName:Ie,bindConversationToNotebook:ve,rotateUserActionDigest:ke,updateMessagesWithCompaction:j})},xe=e.useCallback(async f=>{l.activeConversationId&&(_e(He.AI_CHAT_ACCEPT),await ee({conversationId:l.activeConversationId,messageId:f}))},[l.activeConversationId,ee]),ae=e.useCallback(async f=>{l.activeConversationId&&(_e(He.AI_CHAT_REJECT),await K(l.activeConversationId,f),setTimeout(()=>{var w;(w=Me.current)==null||w.focus()},100))},[l.activeConversationId,K]),Va=e.useCallback(f=>{if(!s)return;const w=Ae(f),D=At(w);let G=null;c.requestExecution({abort:()=>{G!==null&&o.abort(G)},bufferId:te,queryKey:D,execute:()=>{const ne=window.setTimeout(()=>{a(Ct.query.addNotification({query:D,type:Fe.LOADING,content:t.jsxs(q,{gap:"1rem",align:"center",children:[t.jsx(de,{color:"foreground",children:"Running..."}),t.jsx(_0,{skin:"error",onClick:()=>{c.cancelActive()},children:t.jsx(Ot,{size:"18px"})})]}),sideContent:t.jsx(Xe,{query:w})},te)),$.current=null},1e3);$.current=ne,j0({normalizedSQL:w,queryKey:D,namespaceKey:te,quest:o,dispatch:a,executionRefs:A,releaseExecution:c.releaseExecution,onQueryStarted:we=>{G=we},onSettled:()=>{$.current===ne&&(window.clearTimeout(ne),$.current=null)}})}})},[s,A,te,o,c]),Za=e.useCallback(f=>{var w;((w=c.getActive())==null?void 0:w.queryKey)===f&&($.current!==null&&(window.clearTimeout($.current),$.current=null),c.cancelActive())},[c]),ut=e.useCallback(async()=>{if(_e(He.AI_CONTEXT_BADGE_CLICK,{type:s!=null&&s.tableId?"table":"query"}),(s==null?void 0:s.queryKey)&&(s==null?void 0:s.bufferId))return await _(s.queryKey,s.bufferId);if(s!=null&&s.tableId){const f=ce.find(w=>w.id===s.tableId);if(f)return a(Ct.console.pushSidebarHistory({type:"tableDetails",payload:{tableName:f.table_name,isMatView:f.table_type==="M",isView:f.table_type==="V"}})),!0}return!1},[s==null?void 0:s.queryKey,s==null?void 0:s.bufferId,s==null?void 0:s.tableId,_,ce]),Sa=e.useCallback(()=>{h(null)},[h]),Zt=e.useCallback(async(f,w=!1)=>{if(!(w&&await ut()))if(f.type==="diff"){if(!l.activeConversationId)return;g({type:"diff",original:f.original,modified:f.modified,conversationId:l.activeConversationId})}else H({value:f.value})},[g,H,l.activeConversationId,ut]),qa=e.useCallback(async(f,w)=>{if(!l.activeConversationId)return;const D=_n(w,!1);try{await ee({conversationId:l.activeConversationId,messageId:f,skipDefaultMessage:!0}),z({role:"user",content:`User replaced query with one of your previous suggestions. Now the query is:
|
|
1044
1044
|
|
|
1045
1045
|
\`\`\`sql
|
|
1046
1046
|
${D.replaceAll(/\s+/g," ").trim()}
|
|
1047
|
-
\`\`\``,timestamp:Date.now(),hideFromUI:!0}),await Y(l.activeConversationId)}catch(G){console.error("Error applying SQL to editor:",G),st.error("Failed to apply changes to editor")}},[l.activeConversationId,ee,z,Y]),La=e.useCallback(async f=>{if(!l.activeConversationId||!m||ge(J))return;const w=l.activeConversationId,D=O.find(S=>S.id===f);if(!D)return;const G=O.findIndex(S=>S.id===f);if(G<0)return;const ne=O.slice(G).map(S=>S.id),we=new Set(ne);Z(ne);const Ce={settings:{model:$e,apiKey:Be},aiAssistantSettings:We,questClient:o,tables:ce,hasSchemaAccess:Q,abortSignal:E==null?void 0:E.signal,notebookContext:await me(w)},Ve={addMessage:z,updateMessage:L,removeMessages:Z,setStatus:ze,setIsStreaming:d,persistMessages:Y,updateConversationName:Ie,updateMessagesWithCompaction:j,bindConversationToNotebook:ve,rotateUserActionDigest:ke};switch(D.displayType){case"explain_request":{if(!D.sql)return;Ze(Dt({conversationId:w,queryText:D.sql,...Ce}),Ve);break}case"fix_request":{if(!D.sql)return;Ze(Tt({conversationId:w,queryText:D.sql,...Ce}),Ve);break}case"schema_explain_request":{if(!D.displaySchemaData)return;const S=D.displaySchemaData;try{const oe=S.kind==="matview"?await o.showMatViewDDL(S.tableName):S.kind==="view"?await o.showViewDDL(S.tableName):await o.showTableDDL(S.tableName);if((oe==null?void 0:oe.type)!==Ge.DQL||!oe.data||oe.data.length===0){st.error("Failed to fetch table schema for retry");return}const rt=oe.data[0];if(!rt.ddl){st.error("Failed to fetch table schema for retry");return}Ze(Hn({conversationId:w,tableName:S.tableName,schema:rt.ddl,kindLabel:En(S.kind),schemaDisplayData:S,...Ce}),Ve)}catch(oe){console.error("Error fetching DDL for retry:",oe),st.error("Failed to fetch table schema for retry")}break}case"ask_request":default:{const S=D.displayUserMessage||D.content||"",oe=O.filter(pt=>!we.has(pt.id)),rt=oe.some(pt=>pt.role==="assistant");Ze(Pt({conversationId:w,userMessage:S,currentSQL:D.sql||B,conversationHistory:oe,isFirstMessage:!rt,...Ce}),Ve);break}}},[l.activeConversationId,m,J,O,Z,$e,Be,We,o,ce,Q,E,z,L,ze,d,Y,Ie,j,ve,me,B]),St=e.useRef(null),nt=e.useCallback(()=>{var f,w;(w=(f=St.current)==null?void 0:f.querySelector('button[data-hook="button-explain-query"]'))==null||w.click()},[]),gt=e.useCallback(f=>{se&&(f.metaKey||f.ctrlKey)&&(f.key==="e"||f.key==="E")&&(f.preventDefault(),nt())},[se]);e.useEffect(()=>{if(se)return Ye.subscribe(Je.EXPLAIN_QUERY_EXEC,nt),document.addEventListener("keydown",gt),()=>{document.removeEventListener("keydown",gt),Ye.unsubscribe(Je.EXPLAIN_QUERY_EXEC,nt)}},[se,gt,nt]),e.useEffect(()=>()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),e.useEffect(()=>{De.current||P||v||Me.current&&(Me.current.focus(),De.current=!0)},[P,v]);const Da=e.useCallback(async()=>{var f;De.current=!1,await X(),(f=Me.current)==null||f.focus()},[X]);if((n==null?void 0:n.type)!=="aiChat"||!s&&!P)return null;const Ta=(()=>{const f=s==null?void 0:s.notebookBufferId;if(typeof f!="number")return;const w=C.find(Ce=>Ce.id===f),D=!w,G=!!(w!=null&&w.archived),ne=(w==null?void 0:w.label)??`#${f}`,we=D?"deleted":G?"archived":null;return{label:ne,warn:we,onClick:async()=>{we||w&&await b(w)}}})();return t.jsx(t.Fragment,{children:t.jsx(In,{mode:"side","data-hook":"ai-chat-window",open:(n==null?void 0:n.type)==="aiChat",onOpenChange:f=>{f||T()},onDismiss:T,trigger:t.jsx("span",{}),title:t.jsxs(
|
|
1047
|
+
\`\`\``,timestamp:Date.now(),hideFromUI:!0}),await Y(l.activeConversationId)}catch(G){console.error("Error applying SQL to editor:",G),st.error("Failed to apply changes to editor")}},[l.activeConversationId,ee,z,Y]),La=e.useCallback(async f=>{if(!l.activeConversationId||!m||ge(J))return;const w=l.activeConversationId,D=O.find(S=>S.id===f);if(!D)return;const G=O.findIndex(S=>S.id===f);if(G<0)return;const ne=O.slice(G).map(S=>S.id),we=new Set(ne);Z(ne);const Ce={settings:{model:$e,apiKey:Be},aiAssistantSettings:We,questClient:o,tables:ce,hasSchemaAccess:Q,abortSignal:E==null?void 0:E.signal,notebookContext:await me(w)},Ve={addMessage:z,updateMessage:L,removeMessages:Z,setStatus:ze,setIsStreaming:d,persistMessages:Y,updateConversationName:Ie,updateMessagesWithCompaction:j,bindConversationToNotebook:ve,rotateUserActionDigest:ke};switch(D.displayType){case"explain_request":{if(!D.sql)return;Ze(Dt({conversationId:w,queryText:D.sql,...Ce}),Ve);break}case"fix_request":{if(!D.sql)return;Ze(Tt({conversationId:w,queryText:D.sql,...Ce}),Ve);break}case"schema_explain_request":{if(!D.displaySchemaData)return;const S=D.displaySchemaData;try{const oe=S.kind==="matview"?await o.showMatViewDDL(S.tableName):S.kind==="view"?await o.showViewDDL(S.tableName):await o.showTableDDL(S.tableName);if((oe==null?void 0:oe.type)!==Ge.DQL||!oe.data||oe.data.length===0){st.error("Failed to fetch table schema for retry");return}const rt=oe.data[0];if(!rt.ddl){st.error("Failed to fetch table schema for retry");return}Ze(Hn({conversationId:w,tableName:S.tableName,schema:rt.ddl,kindLabel:En(S.kind),schemaDisplayData:S,...Ce}),Ve)}catch(oe){console.error("Error fetching DDL for retry:",oe),st.error("Failed to fetch table schema for retry")}break}case"ask_request":default:{const S=D.displayUserMessage||D.content||"",oe=O.filter(pt=>!we.has(pt.id)),rt=oe.some(pt=>pt.role==="assistant");Ze(Pt({conversationId:w,userMessage:S,currentSQL:D.sql||B,conversationHistory:oe,isFirstMessage:!rt,...Ce}),Ve);break}}},[l.activeConversationId,m,J,O,Z,$e,Be,We,o,ce,Q,E,z,L,ze,d,Y,Ie,j,ve,me,B]),St=e.useRef(null),nt=e.useCallback(()=>{var f,w;(w=(f=St.current)==null?void 0:f.querySelector('button[data-hook="button-explain-query"]'))==null||w.click()},[]),gt=e.useCallback(f=>{se&&(f.metaKey||f.ctrlKey)&&(f.key==="e"||f.key==="E")&&(f.preventDefault(),nt())},[se]);e.useEffect(()=>{if(se)return Ye.subscribe(Je.EXPLAIN_QUERY_EXEC,nt),document.addEventListener("keydown",gt),()=>{document.removeEventListener("keydown",gt),Ye.unsubscribe(Je.EXPLAIN_QUERY_EXEC,nt)}},[se,gt,nt]),e.useEffect(()=>()=>{$.current!==null&&(window.clearTimeout($.current),$.current=null)},[]),e.useEffect(()=>{De.current||P||v||Me.current&&(Me.current.focus(),De.current=!0)},[P,v]);const Da=e.useCallback(async()=>{var f;De.current=!1,await X(),(f=Me.current)==null||f.focus()},[X]);if((n==null?void 0:n.type)!=="aiChat"||!s&&!P)return null;const Ta=(()=>{const f=s==null?void 0:s.notebookBufferId;if(typeof f!="number")return;const w=C.find(Ce=>Ce.id===f),D=!w,G=!!(w!=null&&w.archived),ne=(w==null?void 0:w.label)??`#${f}`,we=D?"deleted":G?"archived":null;return{label:ne,warn:we,onClick:async()=>{we||w&&await b(w)}}})();return t.jsx(t.Fragment,{children:t.jsx(In,{mode:"side","data-hook":"ai-chat-window",open:(n==null?void 0:n.type)==="aiChat",onOpenChange:f=>{f||T()},onDismiss:T,trigger:t.jsx("span",{}),title:t.jsxs(H0,{children:[t.jsx(it,{size:20,variant:"filled"}),t.jsx(E0,{"data-hook":"chat-window-title",children:fe})]}),afterTitle:t.jsxs(I0,{children:[t.jsx(Vt,{onClick:Da,title:"New chat","aria-label":"New chat",disabled:U,"data-hook":"chat-window-new",children:t.jsx(Nn,{size:16,weight:"bold"})}),t.jsx(Vt,{$active:P,onClick:at,title:P?"Back to chat":"Chat history","aria-label":P?"Back to chat":"Chat history","aria-pressed":P,disabled:!M||ge(J),"data-hook":"chat-window-history",children:t.jsx(ta,{size:16,weight:"bold"})}),t.jsx(Vt,{onClick:T,title:"Close","aria-label":"Close AI chat","data-hook":"chat-window-close",children:t.jsx(Kt,{size:16,weight:"bold"})})]}),children:t.jsx(N0,{children:v?t.jsx(Na,{children:t.jsx(wt,{size:20,style:{margin:"auto"}})}):P?t.jsx(M0,{currentConversationId:l.previousConversationId??null}):t.jsxs(Na,{children:[mt?t.jsx(Dr,{messages:O,onAcceptChange:xe,onRejectChange:ae,onRunQuery:Va,onOpenInEditor:Zt,onApplyToEditor:qa,onRetry:La,onCancelQuery:Za,runningQueryKey:Le,queryNotifications:Qe,isOperationInProgress:ge(J),editorSQL:Oe.queryText,isStreaming:R,isLoadingMessages:v,scrollToMessageId:x,onScrollToMessageComplete:Sa}):B&&B.trim()?t.jsxs(V0,{children:[t.jsx(Z0,{"data-hook":"chat-initial-query-box",children:t.jsx(S0,{"data-hook":"chat-lite-editor",children:t.jsx(Pe,{value:B.trim(),maxHeight:216,onOpenInEditor:()=>Zt({type:"code",value:B.trim()},!0)})})}),(se||Ke)&&t.jsxs(q0,{ref:St,children:[se&&t.jsx(Kn,{conversationId:s.id,queryText:B.trim()}),Ke&&t.jsx(Un,{})]})]}):t.jsxs(L0,{"data-hook":"chat-blank-state",children:[t.jsx(D0,{children:"Leverage AI directly in your database"}),t.jsx(T0,{children:"Our AI Assistant is a specialized programming and support agent that makes you more effective and helps you solve problems as you interface with your QuestDB database. Start a conversation."})]}),t.jsx(Gr,{ref:Me,onSend:f=>W(f,ht),disabled:!m||ge(J),placeholder:ye(),contextSQL:Oe.queryText,contextTableId:s==null?void 0:s.tableId,contextNotebook:Ta,onContextClick:ut})]})})})})};export{F0 as default};
|