@duckcodeailabs/dql-cli 1.12.11 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps-api.d.ts +151 -3
- package/dist/apps-api.d.ts.map +1 -1
- package/dist/apps-api.js +675 -97
- package/dist/apps-api.js.map +1 -1
- package/dist/args.d.ts +2 -0
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +3 -0
- package/dist/args.js.map +1 -1
- package/dist/assets/dql-notebook/assets/AgentAnswerCard-c8QUo6NH.js +5 -0
- package/dist/assets/dql-notebook/assets/{AgentLogPage-hzHqpD3-.js → AgentLogPage-D6fgEAEy.js} +1 -1
- package/dist/assets/dql-notebook/assets/{AiBuildDialog-BQRWoxp9.js → AiBuildDialog-8miXFPse.js} +1 -1
- package/dist/assets/dql-notebook/assets/{AiBuildResult-D9t_4sQl.js → AiBuildResult-DPJ_SI0R.js} +3 -3
- package/dist/assets/dql-notebook/assets/AiSidePanel-NVA6lZnn.js +6 -0
- package/dist/assets/dql-notebook/assets/AnalyticsHome-DgwnRW71.js +6 -0
- package/dist/assets/dql-notebook/assets/AppsView-B6LYUpgm.js +4578 -0
- package/dist/assets/dql-notebook/assets/BlockStudio--jNw9XUI.js +60 -0
- package/dist/assets/dql-notebook/assets/{BusinessArtifactView-CnTbFVGT.js → BusinessArtifactView-DtRMiaF4.js} +1 -1
- package/dist/assets/dql-notebook/assets/DbtFirstModelingPage-DhBsLCYr.js +22 -0
- package/dist/assets/dql-notebook/assets/GitPage-CazC-eTR.js +7 -0
- package/dist/assets/dql-notebook/assets/GlobalAiRail-1Tgweuu2.js +1 -0
- package/dist/assets/dql-notebook/assets/GovernedContextPage-C7qGrH3d.js +16 -0
- package/dist/assets/dql-notebook/assets/{HelpDocsPage-CL0vbSER.js → HelpDocsPage-DMHPsVqP.js} +1 -1
- package/dist/assets/dql-notebook/assets/{HomePage-DzAucwBW.js → HomePage-DcSI4dnU.js} +1 -1
- package/dist/assets/dql-notebook/assets/LineageDAG-BJ6xz06u.js +1 -0
- package/dist/assets/dql-notebook/assets/{LineageDetailView-DdVH-nz6.js → LineageDetailView-8WrQm-MF.js} +1 -1
- package/dist/assets/dql-notebook/assets/{LineageDrawer-BvrVZNKY.js → LineageDrawer-hnqCW_t-.js} +1 -1
- package/dist/assets/dql-notebook/assets/{LineagePathBreadcrumb-CSut-zvm.js → LineagePathBreadcrumb-B4LZTUsl.js} +3 -3
- package/dist/assets/dql-notebook/assets/{MiniLineageGraph-zg_1wW3M.js → MiniLineageGraph-CotnRuxa.js} +1 -1
- package/dist/assets/dql-notebook/assets/{NewBlockModal-9cDletl-.js → NewBlockModal-DHn-CEEW.js} +1 -1
- package/dist/assets/dql-notebook/assets/{NewNotebookModal-V6de8L4d.js → NewNotebookModal-BPGp-8oq.js} +2 -2
- package/dist/assets/dql-notebook/assets/NotebookEditor-B0OTHM6W.js +195 -0
- package/dist/assets/dql-notebook/assets/ReadinessPage-CoOIpxWq.js +1 -0
- package/dist/assets/dql-notebook/assets/{SetupOnboarding-Bg-MjbC9.js → SetupOnboarding-DxK_mFzf.js} +2 -2
- package/dist/assets/dql-notebook/assets/{TrustBadge-DGuHB8kP.js → TrustBadge-ZuD5N5Ww.js} +1 -1
- package/dist/assets/dql-notebook/assets/UnifiedAgentRunPanel-duFXXNV_.js +88 -0
- package/dist/assets/dql-notebook/assets/{answer-to-notebook-BDzY4MuQ.js → answer-to-notebook-WAVAYjBv.js} +1 -1
- package/dist/assets/dql-notebook/assets/{arrow-left-IjlnAihE.js → arrow-left-L8odLbyN.js} +1 -1
- package/dist/assets/dql-notebook/assets/{arrow-right-BI4cXgOY.js → arrow-right-WIF1V9a9.js} +1 -1
- package/dist/assets/dql-notebook/assets/{book-open-text-i6xhxu_I.js → book-open-text-BpqWMa4m.js} +1 -1
- package/dist/assets/dql-notebook/assets/{bot-C6DE7Q6m.js → bot-CLR1V6dO.js} +1 -1
- package/dist/assets/dql-notebook/assets/{circle-x-BoAorVSm.js → circle-x-CQBOM0b0.js} +1 -1
- package/dist/assets/dql-notebook/assets/{dagre.esm-CycymVj6.js → dagre.esm-DlZi7NR3.js} +1 -1
- package/dist/assets/dql-notebook/assets/{external-link-ZwE5iHsX.js → external-link-DYqdQIGp.js} +1 -1
- package/dist/assets/dql-notebook/assets/{grip-vertical-Dnp2st8l.js → grip-vertical-HmUijbwN.js} +1 -1
- package/dist/assets/dql-notebook/assets/index-Cpx47jCH.js +634 -0
- package/dist/assets/dql-notebook/assets/{list-tree-Ced8e_S1.js → list-tree-DGKqCxmz.js} +1 -1
- package/dist/assets/dql-notebook/assets/{minimize-2-CBIAE0XH.js → minimize-2-C8dvqCxX.js} +1 -1
- package/dist/assets/dql-notebook/assets/{panel-right-open-po3bWSeL.js → panel-right-open-yuVkIo5n.js} +1 -1
- package/dist/assets/dql-notebook/assets/{rotate-ccw-B9v1LTJ0.js → rotate-ccw-Di0kRnrM.js} +1 -1
- package/dist/assets/dql-notebook/assets/{semantic-fields-B6ii0an0.js → semantic-fields-BMQV0li8.js} +1 -1
- package/dist/assets/dql-notebook/assets/sliders-horizontal-alebptlJ.js +6 -0
- package/dist/assets/dql-notebook/assets/{star-CO4tfaDq.js → star-CgCQbnXc.js} +1 -1
- package/dist/assets/dql-notebook/assets/{triangle-alert-BSdIu2El.js → triangle-alert-SyuSZ4ht.js} +1 -1
- package/dist/assets/dql-notebook/assets/upload-BPhfea_E.js +11 -0
- package/dist/assets/dql-notebook/assets/usePersistedAgentThreadId-Bnl9gWhj.js +28 -0
- package/dist/assets/dql-notebook/assets/{user-round-BfrV8U-W.js → user-round-J4PQHxo9.js} +1 -1
- package/dist/assets/dql-notebook/assets/{wand-sparkles-BgTxZNBc.js → wand-sparkles-c4WDXTCk.js} +1 -1
- package/dist/assets/dql-notebook/assets/{workflow--2ycp0yy.js → workflow-NtRLaq7n.js} +1 -1
- package/dist/assets/dql-notebook/assets/{wrench-LMCrpa9_.js → wrench-CS1f1Zv4.js} +1 -1
- package/dist/assets/dql-notebook/assets/{x-CeNgQwGm.js → x-CbKEfe5m.js} +1 -1
- package/dist/assets/dql-notebook/index.html +1 -1
- package/dist/commands/model.d.ts.map +1 -1
- package/dist/commands/model.js +62 -1
- package/dist/commands/model.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/llm/providers/dql-agent-provider.d.ts +4 -3
- package/dist/llm/providers/dql-agent-provider.d.ts.map +1 -1
- package/dist/llm/providers/dql-agent-provider.js +13 -10
- package/dist/llm/providers/dql-agent-provider.js.map +1 -1
- package/dist/local-operation-coordinator.d.ts +59 -0
- package/dist/local-operation-coordinator.d.ts.map +1 -0
- package/dist/local-operation-coordinator.js +256 -0
- package/dist/local-operation-coordinator.js.map +1 -0
- package/dist/local-runtime.d.ts +59 -1
- package/dist/local-runtime.d.ts.map +1 -1
- package/dist/local-runtime.js +2653 -342
- package/dist/local-runtime.js.map +1 -1
- package/dist/package.json +12 -11
- package/dist/project-refresh-coordinator.d.ts +19 -0
- package/dist/project-refresh-coordinator.d.ts.map +1 -0
- package/dist/project-refresh-coordinator.js +134 -0
- package/dist/project-refresh-coordinator.js.map +1 -0
- package/dist/project-refresh-worker.d.ts +13 -0
- package/dist/project-refresh-worker.d.ts.map +1 -0
- package/dist/project-refresh-worker.js +58 -0
- package/dist/project-refresh-worker.js.map +1 -0
- package/package.json +13 -11
- package/dist/assets/dql-notebook/assets/AgentAnswerCard-CpL2kDCV.js +0 -5
- package/dist/assets/dql-notebook/assets/AiSidePanel-BCQB9rVF.js +0 -6
- package/dist/assets/dql-notebook/assets/AnalyticsHome-Ba4Ve_Gd.js +0 -6
- package/dist/assets/dql-notebook/assets/AppsView-CdAT9BOq.js +0 -4466
- package/dist/assets/dql-notebook/assets/BlockStudio-Brg4fwn5.js +0 -60
- package/dist/assets/dql-notebook/assets/DbtFirstModelingPage-CQe2FUZq.js +0 -22
- package/dist/assets/dql-notebook/assets/GitPage-DHyDBChc.js +0 -7
- package/dist/assets/dql-notebook/assets/GlobalAiRail-Cys4n_rq.js +0 -1
- package/dist/assets/dql-notebook/assets/GovernedContextPage-DyKoDSZ2.js +0 -7
- package/dist/assets/dql-notebook/assets/LineageDAG-QHqd_AM5.js +0 -1
- package/dist/assets/dql-notebook/assets/NotebookEditor-EZ0pfWVs.js +0 -200
- package/dist/assets/dql-notebook/assets/ReadinessPage-BaGvjyfd.js +0 -1
- package/dist/assets/dql-notebook/assets/UnifiedAgentRunPanel-BlWAVEwO.js +0 -83
- package/dist/assets/dql-notebook/assets/chevron-up-DSEILnDs.js +0 -6
- package/dist/assets/dql-notebook/assets/index-BTuliKhK.js +0 -634
- package/dist/assets/dql-notebook/assets/link-2-CTKe6Snr.js +0 -6
- package/dist/assets/dql-notebook/assets/maximize-2-Cojc6867.js +0 -6
- package/dist/assets/dql-notebook/assets/pencil-Cb45c6WU.js +0 -6
- package/dist/assets/dql-notebook/assets/usePersistedAgentThreadId-CkVFrrjk.js +0 -18
|
@@ -0,0 +1,4578 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/UnifiedAgentRunPanel-duFXXNV_.js","assets/index-Cpx47jCH.js","assets/react-CRB3T2We.js","assets/index-DKu4CZt3.css","assets/AgentAnswerCard-c8QUo6NH.js","assets/usePersistedAgentThreadId-Bnl9gWhj.js","assets/wrench-CS1f1Zv4.js","assets/TrustBadge-ZuD5N5Ww.js","assets/AiBuildResult-DPJ_SI0R.js","assets/user-round-J4PQHxo9.js","assets/triangle-alert-SyuSZ4ht.js","assets/rotate-ccw-Di0kRnrM.js","assets/x-CbKEfe5m.js","assets/list-tree-DGKqCxmz.js","assets/minimize-2-C8dvqCxX.js","assets/arrow-right-WIF1V9a9.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as et,u as ga,t as We,r as p,a as D,j as t,G as ha,P as Jt,S as Ze,q as oi,p as pi,au as di,aV as kr,l as ot,T as Sr,h as ci,i as ui,k as ma,aW as xi,a6 as fi,V as gi,a7 as Mr,aX as lr,aY as ft,aE as hi,ap as De,g as xt,B as zr,d as ba,aZ as va,aS as mi,F as Ar}from"./index-Cpx47jCH.js";import{A as ya,a as gr,b as bi}from"./AiSidePanel-NVA6lZnn.js";import{u as qa,f as vi,C as yi,M as qi,c as wi,i as ji,T as ki,b as Si,e as zi,S as Ai,A as Ci,P as wa}from"./usePersistedAgentThreadId-Bnl9gWhj.js";import{c as Ii,r as ja}from"./semantic-fields-BMQV0li8.js";import{u as Ni}from"./answer-to-notebook-WAVAYjBv.js";import{W as ka}from"./wand-sparkles-c4WDXTCk.js";import{B as rr}from"./bot-CLR1V6dO.js";import{G as Ti}from"./grip-vertical-HmUijbwN.js";import{W as Zt}from"./wrench-CS1f1Zv4.js";import{T as it}from"./triangle-alert-SyuSZ4ht.js";import{S as Pi}from"./sliders-horizontal-alebptlJ.js";import{X as $i}from"./x-CbKEfe5m.js";import{A as Sa}from"./arrow-left-L8odLbyN.js";import{W as nt}from"./workflow-NtRLaq7n.js";import{S as Ri}from"./star-CgCQbnXc.js";import{B as za}from"./book-open-text-BpqWMa4m.js";import"./react-CRB3T2We.js";import"./minimize-2-C8dvqCxX.js";/**
|
|
3
|
+
* @license lucide-react v0.563.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const Bi=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Ei=et("calendar-days",Bi);/**
|
|
8
|
+
* @license lucide-react v0.563.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/const Li=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Aa=et("chart-column",Li);/**
|
|
13
|
+
* @license lucide-react v0.563.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/const _i=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],Cr=et("chart-line",_i);/**
|
|
18
|
+
* @license lucide-react v0.563.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/const Oi=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],Mi=et("chart-pie",Oi);/**
|
|
23
|
+
* @license lucide-react v0.563.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/const Wi=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Fi=et("map-pin",Wi);/**
|
|
28
|
+
* @license lucide-react v0.563.0 - ISC
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the ISC license.
|
|
31
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/const Vi=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Hi=et("share-2",Vi);/**
|
|
33
|
+
* @license lucide-react v0.563.0 - ISC
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the ISC license.
|
|
36
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/const Qi=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],Ki=et("table-2",Qi);/**
|
|
38
|
+
* @license lucide-react v0.563.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/const Gi=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Yi=et("user",Gi);/**
|
|
43
|
+
* @license lucide-react v0.563.0 - ISC
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the ISC license.
|
|
46
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/const Xi=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Ji=et("users",Xi),Zi=new Set(["bar","line","area","pie","donut","scatter","heatmap","funnel","waterfall","histogram","gauge","stacked-bar","grouped-bar","sankey","kpi","table"]);function Di(e){const r=String(e??"table").toLowerCase().replace(/_/g,"-");return r==="single-value"?"kpi":Zi.has(r)?r:"table"}function Ir(e,r){const a=e.viz.options??{},i=a,n=typeof a.valueField=="string"?a.valueField:typeof a.field=="string"?a.field:void 0;return{...r??{},...i,chart:Di(i.chart??e.viz.type??(r==null?void 0:r.chart)),y:i.y??n??(r==null?void 0:r.y),title:i.title??(r==null?void 0:r.title)??e.title,colorPalette:i.colorPalette??(r==null?void 0:r.colorPalette)??"corporate"}}function Ui(e,r){if(!r||e.rows.length<=1||!e.columns.includes(r))return e;const a=e.rows.map(n=>n[r]).filter(n=>typeof n=="number"||typeof n=="string"&&n.trim()!=="").map(Number).filter(Number.isFinite);if(a.length===0)return e;const i=Number(a.reduce((n,l)=>n+l,0).toPrecision(15));return{...e,columns:[r],rows:[{[r]:i}],rowCount:1}}const en=p.lazy(()=>kr(()=>import("./UnifiedAgentRunPanel-duFXXNV_.js").then(e=>e.c),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(e=>({default:e.UnifiedAgentRunPanel}))),tn="clamp(320px, calc(100vh - 220px), 760px)",Nr=[{value:"table",label:"Table"},...yi];function rn(e,r){if(!Array.isArray(e)||e.length===0)return;const a=Array.isArray(r)&&r.length>0?r.slice(0,8):Object.keys(e[0]??{}).slice(0,8);return e.slice(0,5).map(i=>Object.fromEntries(a.map(n=>[n,i[n]])))}const Ca=[{id:"auto",label:"Auto fit",description:"Choose a practical size from the tile content"},{id:"compact",label:"Compact",description:"Small KPI or short summary"},{id:"standard",label:"Standard",description:"Default chart or table card"},{id:"wide",label:"Wide",description:"Full-row trend or comparison"},{id:"tall",label:"Tall",description:"More vertical room for tables and dense charts"},{id:"full",label:"Full page",description:"Large focused view across the page"}];function an({appId:e,dashboard:r,variables:a,editable:i=!1,embeddedHeader:n=!1,onDashboardChanged:l,selectedBlockId:s,onBlockFocus:o,onAskBlock:d,onOpenLineageNode:c,copilotOpen:h,onCopilotChange:f,onRunChange:x}){var rt;const{state:y}=ga(),T=We[y.themeMode],[z,m]=p.useState(null),[I,A]=p.useState(null),W=p.useRef(null),[N,b]=p.useState(!1),[E,O]=p.useState(null),[F,M]=p.useState(!1),be=qa(`app:${e}:${r.id}`),[ie,K]=p.useState(!1),[U,L]=p.useState([]),[V,C]=p.useState(""),[he,qe]=p.useState(!1),[H,ne]=p.useState(null),[we,Ne]=p.useState(!1),[me,te]=p.useState(null),[re,Q]=p.useState(null),[ce,Te]=p.useState(null),[je,Z]=p.useState(!1),[j,P]=p.useState(!1),[R,G]=p.useState(null),[ee,fe]=p.useState(""),[ge,ve]=p.useState(null),J=p.useRef(null),[le,se]=p.useState(!1),w=r.layout.cols,de=r.layout.rowHeight,Ae=Ni(),Pe=p.useMemo(()=>JSON.stringify(a??{}),[a]),oe=p.useMemo(()=>JSON.parse(Pe),[Pe]),ze=p.useMemo(()=>{const v=new Map;for(const k of(z==null?void 0:z.tiles)??[])v.set(k.tileId,k);return v},[z]),pe=me??r.layout.items,B=p.useMemo(()=>({...r,layout:{...r.layout,items:pe}}),[r,pe]),Y=p.useMemo(()=>i?pe:r.layout.items.filter(v=>!In(v)),[r.layout.items,i,pe]),ke=p.useMemo(()=>i?Y:Nn(Y,ze,w),[Y,w,i,ze]),g=r.layout.items.length-Y.length,ue=Y.length-ke.length,ye=p.useMemo(()=>!i&&!r.story&&r.sections&&r.sections.length>0?[...r.sections].sort((v,k)=>v.order-k.order):null,[r.sections,r.story,i]),$e=p.useMemo(()=>ye?r.layout.items:null,[r.layout.items,ye]),tt=p.useMemo(()=>i||ye?null:Ln(ke,ze,oe),[i,oe,ye,ze,ke]);p.useEffect(()=>{te(null),Q(null)},[r.id]),p.useEffect(()=>{let v=!1;return b(!0),O(null),D.runDashboard(e,r.id,oe).then(k=>{v||(m(k),A((k==null?void 0:k.story)??null),W.current=(k==null?void 0:k.runId)??null,x==null||x(k),k||O("Dashboard run failed."),k!=null&&k.runId&&D.getDashboardStory(e,r.id,k.runId).then(q=>{v||!q||W.current!==q.runId||q.snapshotId!==k.snapshotId||q.filterFingerprint!==k.filterFingerprint||q.resultFingerprint!==k.resultFingerprint||q.personaFingerprint!==k.personaFingerprint||A(q.story)}))}).catch(k=>{v||(O(k instanceof Error?k.message:String(k)),x==null||x(null))}).finally(()=>{v||b(!1)}),()=>{v=!0}},[e,r.id,r.layout.items.length,x,oe,(rt=y.activePersona)==null?void 0:rt.userId]),p.useEffect(()=>{const v=k=>{const q=k.detail;(q==null?void 0:q.appId)!==e||q.dashboardId!==r.id||(D.getDashboard(e,r.id).then(_=>{_!=null&&_.dashboard&&(l==null||l(_.dashboard))}),D.runDashboard(e,r.id,oe).then(_=>{_&&(m(_),A(_.story),W.current=_.runId,x==null||x(_))}))};return window.addEventListener("dql-app-dashboard-updated",v),()=>window.removeEventListener("dql-app-dashboard-updated",v)},[e,r.id,l,x,oe]),p.useEffect(()=>{const v=()=>se(window.innerWidth<760);return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const pt=p.useMemo(()=>{const v=r.layout.items.map(k=>{var xe,Ce,Ke,Re,Ve;const q=ze.get(k.i),_=k.block?"blockId"in k.block?k.block.blockId:k.block.ref:k.semantic?`semantic:${k.semantic.id}`:k.draftAnalysis?`draft:${k.draftAnalysis.ref}`:k.aiPin?`aiPin:${k.aiPin.id}`:"text";return{title:k.title,blockRef:_,viz:k.viz.type,certificationStatus:q==null?void 0:q.certificationStatus,status:q==null?void 0:q.status,rowCount:(xe=q==null?void 0:q.result)==null?void 0:xe.rowCount,columns:(Ke=(Ce=q==null?void 0:q.result)==null?void 0:Ce.columns)==null?void 0:Ke.slice(0,8),sampleRows:rn((Re=q==null?void 0:q.result)==null?void 0:Re.rows,(Ve=q==null?void 0:q.result)==null?void 0:Ve.columns)}});return JSON.stringify({scope:"dashboard",appId:e,dashboardId:r.id,title:r.metadata.title,description:r.metadata.description,domain:r.metadata.domain,filters:r.filters,variables:oe,run:z?{runId:z.runId,snapshotId:z.snapshotId,filterFingerprint:z.filterFingerprint,resultFingerprint:z.resultFingerprint,personaFingerprint:z.personaFingerprint,story:z.story,facts:z.facts}:null,tiles:v},null,2)},[e,r,z,oe,ze]),Me=p.useCallback(async(v,k="Changes saved")=>{Ne(!0),O(null);const q={...r,layout:{...r.layout,items:v}};try{const _=await D.patchDashboardLayout(e,r.id,q.layout);_.ok?(te(null),Q(k),l==null||l(_.dashboard)):O(_.error)}finally{Ne(!1)}},[e,r,l]),Fe=p.useCallback(async v=>{if(me){te(v),Q("Layout preview ready");return}await Me(v)},[me,Me]),gt=p.useCallback(async()=>{K(!0);const v=await D.getAppEditorCatalog(e);L((v==null?void 0:v.blocks)??[])},[e]),Ye=p.useCallback(async v=>{const k=Et(v.chartType),q=await D.recommendDashboardTile(e,r.id,{blockRef:v.name,appAudience:r.metadata.audience,prompt:`${r.metadata.title} ${v.name} ${v.description}`,defaultVisualization:k}),_=Br(k,w),xe={i:pr(B,v.name),...or(B,_),block:{blockId:v.name},viz:{type:k},...q.ok?{display:q.display,filterBindings:"filterBindings"in q?q.filterBindings:void 0,parameterBindings:"parameterBindings"in q?q.parameterBindings:void 0,sourceEvidence:"sourceEvidence"in q?q.sourceEvidence:void 0,trustState:"trustState"in q?q.trustState:q.display.trustState,reviewStatus:"reviewStatus"in q?q.reviewStatus:q.display.reviewStatus}:{},title:v.name};await Fe([...pe,xe]),K(!1)},[e,w,r.id,r.metadata.audience,r.metadata.title,Fe,B,pe]),ht=p.useCallback(async()=>{G("text"),fe("")},[]),mt=p.useCallback(async()=>{G("heading"),fe("")},[]),Lt=p.useCallback(async()=>{var k;const v=ee.trim();if(!(!v||!R)){if(R==="heading")await Fe([...pe,{i:pr(B,"section"),...or(B,He("wide",w,"heading")),text:{markdown:v},viz:{type:"heading"},display:Xr("heading",v),title:v}]);else{const q=((k=v.split(/\r?\n/)[0])==null?void 0:k.slice(0,60))||"Summary";await Fe([...pe,{i:pr(B,"text"),...or(B,He("standard",w,"text")),text:{markdown:v},viz:{type:"text"},display:Xr("text",q),title:q}])}G(null),fe("")}},[w,Fe,R,ee,B,pe]),_t=p.useCallback(async(v,k)=>{const q=k===null?pe.filter(_=>_.i!==v):pe.map(_=>_.i===v?{..._,...k}:_);await Fe(Ut(q,w))},[w,Fe,pe]),bt=p.useCallback(async(v,k)=>{const q=J.current,_=pe.find(Ct=>Ct.i===v);if(!q||!_)return;const xe=q.getBoundingClientRect(),Ce=12,Re=(xe.width-Ce*(w-1))/w+Ce,Ve=de+Ce,ae=Math.round((k.clientX-xe.left)/Re),Xe=Math.round((k.clientY-xe.top)/Ve),ir={..._,x:er(ae,0,Math.max(0,w-_.w)),y:Math.max(0,Xe)};ve(null);const nr=Tl(pe,ir,w);await Fe(Ut(nr,w))},[w,de,Fe,pe]),jt=p.useCallback((v,k)=>{const q=J.current,_=pe.find(ae=>ae.i===v);if(!q||!_)return;const xe=q.getBoundingClientRect(),Ce=12,Ke=(xe.width-Ce*(w-1))/w,Re=Math.round((k.clientX-xe.left)/(Ke+Ce)),Ve=Math.round((k.clientY-xe.top)/(de+Ce));ve({tileId:v,x:er(Re,0,Math.max(0,w-_.w)),y:Math.max(0,Ve),w:_.w,h:_.h})},[w,de,pe]),kt=p.useCallback(()=>ve(null),[]),Ot=p.useCallback(()=>{pe.length!==0&&(te(Nl(pe,w)),Q("Layout preview ready"))},[w,pe]),St=p.useCallback(async()=>{me&&await Me(me,"Layout applied")},[me,Me]),ar=p.useCallback(()=>{te(null),Q("Layout preview cancelled")},[]),zt=p.useCallback(async v=>{Te(v);const k=await D.retryDashboardTile(e,r.id,v,oe);Te(null);const q=k==null?void 0:k.tiles.find(xe=>xe.tileId===v);if(!k||!q){O("This App tile could not be retried.");return}const _=z?{...z,tiles:z.tiles.map(xe=>xe.tileId===v?q:xe)}:k;m(_),A(null),x==null||x(_)},[e,r.id,x,z,oe]),Mt=p.useCallback(async(v,k)=>{const q=k.artifact,_={title:v.title??(q==null?void 0:q.name)??k.title??"App analysis",sql:q==null?void 0:q.sql,result:k.result,chartConfig:Ir(v,k.chartConfig),sourceRunId:z==null?void 0:z.runId,question:`App tile: ${v.title??k.title??v.i}`,executionTarget:q==null?void 0:q.executionTarget,...q!=null&&q.dql?{dqlArtifact:{kind:q.sourceKind==="certified_block"?"certified_block":"sql_block",source:q.dql,name:q.name,sourcePath:q.sourcePath,persistence:q.sourcePath?"saved":"transient",trustState:q.trustState,compiledSql:q.sql}}:{}};await Ae(_)},[Ae,z==null?void 0:z.runId]),At=p.useCallback(async()=>{if(qe(v=>!v),!H){const v=await D.fetchScopedLineage({domain:r.metadata.domain,appId:e,dashboardId:r.id});ne(v)}},[e,r.id,r.metadata.domain,H]),Wt=p.useCallback(()=>{if(c){c(`dashboard:${e}/${r.id}`);return}At()},[e,r.id,At,c]),dt=f?!!h:F,vt=p.useCallback(()=>{if(Z(!1),f){f(!0);return}M(!0)},[f]),Ft=p.useCallback(()=>{if(Z(!1),f){f(!h);return}M(v=>!v)},[h,f]);return t.jsxs("div",{style:{display:"block",minHeight:0},children:[t.jsxs("div",{style:{flex:1,minWidth:0},children:[(!n||i)&&t.jsxs("div",{style:Xn,children:[t.jsx("div",{style:{flex:1,minWidth:0},children:n?null:t.jsxs(t.Fragment,{children:[t.jsx("h2",{style:{margin:0,fontSize:20,lineHeight:1.18,fontWeight:780},children:r.metadata.title}),r.metadata.description?t.jsx("div",{style:{fontSize:13,opacity:.72,marginTop:4,maxWidth:680,lineHeight:1.4},children:r.metadata.description}):null]})}),i&&r.layout.items.length>0&&t.jsx(Qr,{open:je,onToggle:()=>Z(v=>!v),buttonStyle:Yn,onCertifiedBlock:()=>{Z(!1),gt()},onText:()=>{Z(!1),ht()},onHeading:()=>{Z(!1),mt()},onAi:vt}),i&&r.layout.items.length>1&&!me&&t.jsxs("button",{type:"button",onClick:Ot,disabled:we,style:Ge(!1),title:"Auto-arrange every tile into a clean, gap-free grid",children:[t.jsx(ka,{size:15,strokeWidth:2}),"Auto layout"]}),i&&me?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>void St(),disabled:we,style:Ge(!0),children:we?"Applying…":"Apply layout"}),t.jsx("button",{type:"button",onClick:ar,disabled:we,style:Ge(!1),children:"Cancel"})]}):null,i&&re?t.jsx("span",{role:"status",style:{fontSize:11,opacity:.68},children:re}):null,!n&&t.jsxs(t.Fragment,{children:[t.jsxs("button",{type:"button",onClick:Ft,style:Ge(dt),children:[t.jsx(rr,{size:14,strokeWidth:2}),dt?"Hide copilot":"AI Copilot"]}),t.jsxs("button",{type:"button",onClick:Wt,style:Ge(!1),title:"Open focused dashboard lineage",children:[t.jsx(ha,{size:14,strokeWidth:2}),"Lineage"]})]})]}),i&&t.jsx("div",{style:tl,children:"Drag tiles, select a block for Copilot context, or use the tile controls for sizing and chart settings."}),!i&&I?t.jsx(on,{story:I,onResearch:vt,onEvidence:Wt}):tt?t.jsx(sn,{story:tt}):null,ke.length===0?t.jsxs("div",{style:{border:"1px dashed var(--border-color, rgba(0,0,0,0.15))",borderRadius:8,padding:36,textAlign:"center",fontSize:13,minHeight:260,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},children:[t.jsx("div",{style:{fontSize:16,fontWeight:700,marginBottom:6},children:g>0||ue>0?"No stakeholder-ready tiles yet":"Build this dashboard page"}),t.jsx("div",{style:{maxWidth:520,opacity:.68,lineHeight:1.45},children:g>0?"Generated analysis and trust placeholders are hidden from the stakeholder view. Open Customize or Analysis to review them, then add certified blocks or pinned insights.":ue>0?"Static duplicate tiles are hidden from the stakeholder view because a filter-aware certified tile can answer the same question.":"Add certified domain blocks, narrative text, or use the scoped AI drawer and pin an answer into this layout."}),t.jsx("div",{style:{marginTop:18,display:"flex",gap:8,flexWrap:"wrap",justifyContent:"center"},children:t.jsx(Qr,{open:je,onToggle:()=>Z(v=>!v),buttonLabel:"Add tile",buttonStyle:Fa,onCertifiedBlock:()=>{Z(!1),gt()},onText:()=>{Z(!1),ht()},onHeading:()=>{Z(!1),mt()},onAi:vt})})]}):ye?t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:22},children:ye.map(v=>{var Re,Ve;const k=(Re=ye.find(ae=>ae.kind==="appendix"))==null?void 0:Re.id,q=((Ve=ye.find(ae=>ae.kind==="insight"))==null?void 0:Ve.id)??ye[0].id,_=ae=>ae.sectionId&&ye.some(Xe=>Xe.id===ae.sectionId)?ae.sectionId:(ae.trustState==="review_required"||ae.reviewStatus==="review_required")&&k?k:q,xe=($e??ke).filter(ae=>_(ae)===v.id);if(xe.length===0)return null;const Ce=Math.min(...xe.map(ae=>ae.y)),Ke=v.kind==="appendix";return t.jsxs("section",{"aria-label":v.title,children:[v.kind!=="exec_summary"?t.jsxs("div",{style:{marginBottom:10},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[t.jsx("h3",{style:{margin:0,fontSize:15,fontWeight:800,color:"var(--dql-app-text, #0f172a)"},children:v.title}),Ke?t.jsx("span",{style:{display:"inline-flex",alignItems:"center",gap:4,border:"1px solid rgba(217,119,6,0.4)",color:"#b45309",background:"rgba(217,119,6,0.08)",borderRadius:999,padding:"1px 8px",fontSize:10,fontWeight:800},children:"needs review"}):null]}),v.narrative?t.jsx("p",{style:{margin:"4px 0 0",fontSize:12.5,lineHeight:1.5,color:"var(--dql-app-text-muted, #64748b)",maxWidth:860},children:v.narrative}):null]}):null,t.jsx("div",{style:{display:"grid",gridTemplateColumns:le?"minmax(0, 1fr)":`repeat(${w}, 1fr)`,gridAutoRows:le?"auto":`${de}px`,gap:12,...Ke?{opacity:.96}:{}},children:xe.map(ae=>t.jsx(Wr,{item:{...ae,y:ae.y-Ce},tile:ze.get(ae.i),loading:N,error:E,themeMode:y.themeMode,editable:!1,narrow:le,cols:w,selected:!!(Qe(ae)&&Qe(ae)===s),onFocusBlock:o,onAskBlock:d,onMove:()=>{},onDragMove:()=>{},onDragEnd:()=>{},onPatch:Xe=>void _t(ae.i,Xe),onRetry:()=>void zt(ae.i),retrying:ce===ae.i,retryDisabled:!!(ce&&ce!==ae.i),onOpenNotebook:Xe=>void Mt(ae,Xe)},ae.i))})]},v.id)})}):t.jsxs("div",{ref:J,style:{display:"grid",gridTemplateColumns:le?"minmax(0, 1fr)":`repeat(${w}, 1fr)`,gridAutoRows:le?"auto":`${de}px`,gap:12},children:[ge&&!le&&t.jsx("div",{"aria-hidden":"true",style:{gridColumn:`${ge.x+1} / span ${ge.w}`,gridRow:`${ge.y+1} / span ${ge.h}`,border:"2px dashed var(--dql-app-accent, var(--accent, #4f46e5))",background:"var(--dql-app-accent-soft, rgba(79,70,229,0.10))",borderRadius:10,pointerEvents:"none",zIndex:10}}),ke.map(v=>t.jsx(Wr,{item:v,tile:ze.get(v.i),loading:N,error:E,themeMode:y.themeMode,editable:i,narrow:le,cols:w,selected:!!(Qe(v)&&Qe(v)===s),onFocusBlock:o,onAskBlock:d,onMove:k=>void bt(v.i,k),onDragMove:k=>jt(v.i,k),onDragEnd:kt,onPatch:k=>void _t(v.i,k),onRetry:()=>void zt(v.i),retrying:ce===v.i,retryDisabled:!!(ce&&ce!==v.i),onOpenNotebook:k=>void Mt(v,k)},v.i))]}),!i&&z?t.jsx(pn,{run:z,variables:oe}):null]}),he&&!c&&t.jsx("aside",{style:{width:340,minWidth:300,maxWidth:"34vw",border:"1px solid var(--border-color, rgba(0,0,0,0.08))",borderRadius:8,overflow:"auto",alignSelf:"flex-start",height:tn,position:"sticky",top:12,padding:12},children:t.jsx(zn,{lineage:H})}),F&&!f&&t.jsx(ya,{t:T,title:"Dashboard AI",subtitle:"Scoped to this App dashboard first",expanded:j,onToggleExpanded:()=>P(v=>!v),onClose:()=>{M(!1),P(!1)},floating:!0,ariaLabel:"Dashboard AI",style:rl(j),children:t.jsx(p.Suspense,{fallback:t.jsx("div",{style:{padding:16,fontSize:12,color:T.textSecondary},children:"Loading Dashboard AI…"}),children:t.jsx(en,{themeMode:y.themeMode,title:"Dashboard AI",scopeHint:"Scoped to this App dashboard first",audience:"stakeholder",workspaceContext:{appId:e,dashboardId:r.id,dashboardContext:pt},initialMode:"auto",threadId:be.threadId,onThreadIdChange:be.onThreadIdChange},`${e}:${r.id}`)})}),ie&&t.jsx(Sn,{blocks:U,search:V,onSearch:C,onClose:()=>K(!1),onAdd:v=>void Ye(v)}),R&&t.jsx(kn,{kind:R,value:ee,onChange:fe,onClose:()=>{G(null),fe("")},onSave:()=>void Lt()})]})}function Wr({item:e,tile:r,loading:a,error:i,themeMode:n,editable:l,narrow:s,cols:o,selected:d,onFocusBlock:c,onAskBlock:h,onMove:f,onDragMove:x,onDragEnd:y,onPatch:T,onRetry:z,retrying:m=!1,retryDisabled:I=!1,onOpenNotebook:A}){var ge,ve;const W=p.useRef(null),[N,b]=p.useState(null),[E,O]=p.useState(!1),[F,M]=p.useState(!1),[be,ie]=p.useState("how"),K=Qe(e),U=!!(!l&&K&&h),L=K?`block:${K}`:e.semantic?`semantic:${e.semantic.id}`:e.draftAnalysis?`draft:${e.draftAnalysis.ref}`:e.aiPin?`aiPin:${e.aiPin.id}`:"text",[V,C]=p.useState(()=>lt(e.viz.type));p.useEffect(()=>C(lt(e.viz.type)),[e.i,e.viz.type]);const he=l?lt(e.viz.type):V,qe=p.useMemo(()=>l||he===lt(e.viz.type)?e:{...e,viz:{...e.viz,type:Dt(he),options:{...e.viz.options??{},chart:he}}},[he,l,e]),H=Et(String(qe.viz.type??"table")),ne=Ue(e),we=ne==null?void 0:ne.component,Ne=(ne==null?void 0:ne.insightTitle)||e.title||L,me=(r==null?void 0:r.tileType)==="aiPin"?((ge=r.aiPin)==null?void 0:ge.certification)==="certified"?"certified":"review_required":void 0,te=r==null?void 0:r.repair,re=te?"review_required":((ve=r==null?void 0:r.artifact)==null?void 0:ve.trustState)??(ne==null?void 0:ne.trustState)??me??((r==null?void 0:r.certificationStatus)==="certified"?"certified":void 0),Q=!!ne,ce=e.h<=2&&(H==="single_value"||H==="kpi"||H==="gauge"),[Te,je]=p.useState(!1),Z=l&&(Te||d||E),j=Fn(e,ne),P=!!(r!=null&&r.result&&j.length>1),R=!!(r&&r.tileType!=="text"&&(r.artifact||r.result||r.citation||r.repair)),G=!!(U&&(Te||d)),ee=J=>{if(!l){C(J);return}const le=Dt(J),se=e.viz.options??{},w=Ue(e);T({viz:{...e.viz,type:le,options:{...se,chart:J,...w?{dqlGenUi:{...w,defaultVisualization:le}}:{}}},display:Ia(e,le,w)})},fe=J=>{if(s)return;const le=W.current;if(!le)return;J.preventDefault(),J.stopPropagation();const se=le.getBoundingClientRect(),w={x:J.clientX-se.left,y:J.clientY-se.top},de={x:J.clientX,y:J.clientY},Ae=oe=>{b({x:oe.clientX-de.x,y:oe.clientY-de.y}),x==null||x({clientX:oe.clientX-w.x,clientY:oe.clientY-w.y})},Pe=oe=>{window.removeEventListener("pointermove",Ae),window.removeEventListener("pointerup",Pe),b(null),y==null||y(),f({clientX:oe.clientX-w.x,clientY:oe.clientY-w.y})};window.addEventListener("pointermove",Ae),window.addEventListener("pointerup",Pe,{once:!0})};return t.jsxs("div",{ref:W,onMouseEnter:()=>je(!0),onMouseLeave:()=>je(!1),onClick:()=>{K&&(c==null||c(K))},style:{gridColumn:s?"1 / -1":`${e.x+1} / span ${e.w}`,gridRow:s?"auto":`${e.y+1} / span ${e.h}`,transform:N?`translate(${N.x}px, ${N.y}px) scale(1.02)`:void 0,opacity:N?.92:1,zIndex:N?30:void 0,position:"relative",background:Q?Vn(we):"var(--dql-app-surface, var(--surface, rgba(0,0,0,0.02)))",border:d||N?"1.5px solid var(--dql-app-accent, var(--accent, #4f46e5))":Q?"1px solid var(--dql-app-line-2, var(--border-color, rgba(15,23,42,0.10)))":"1px solid var(--dql-app-line, var(--border-color, rgba(0,0,0,0.08)))",borderRadius:8,padding:ce?12:14,paddingBottom:G?ce?42:46:ce?12:14,display:"flex",flexDirection:"column",gap:ce?4:Q?10:6,minHeight:s?Al(e,ne):0,overflow:"visible",boxShadow:N?"0 16px 40px rgba(0,0,0,0.22)":d?"0 0 0 3px var(--dql-app-accent-soft, rgba(79,70,229,0.12))":void 0,cursor:N?"grabbing":K?"pointer":void 0,transition:N?void 0:"box-shadow 120ms ease, transform 120ms ease"},children:[G?t.jsxs("button",{type:"button",style:xn,onClick:J=>{J.stopPropagation(),K&&(c==null||c(K)),K&&(h==null||h(K,fn(e.title??K)))},title:"Open app Copilot for this tile",children:[t.jsx(Ze,{size:11,strokeWidth:2})," Ask AI"]}):null,l&&!s?t.jsx("div",{style:{position:"absolute",top:10,left:10,zIndex:3,opacity:Z?1:0,pointerEvents:Z?"auto":"none",transition:"opacity 120ms ease"},children:t.jsx("button",{type:"button",title:"Drag to move tile",onPointerDown:fe,style:jl,children:t.jsx(Ti,{size:14,strokeWidth:2.2})})}):null,l?t.jsxs("div",{style:{position:"absolute",top:10,right:10,zIndex:4,display:"flex",alignItems:"center",gap:4,opacity:Z?1:0,pointerEvents:Z?"auto":"none",transition:"opacity 120ms ease"},children:[ce?null:t.jsx("span",{style:{fontSize:10,padding:"2px 8px",borderRadius:999,background:"var(--surface-hover, rgba(0,0,0,0.06))",opacity:.85},children:e.viz.type}),t.jsx(mn,{item:e,cols:o,settingsOpen:E,onToggleSettings:()=>O(J=>!J),onPatch:T})]}):null,Q?t.jsx("div",{style:{minHeight:ce?26:42,paddingLeft:Z?30:0,paddingRight:Z?ce?82:134:0,transition:"padding 120ms ease",display:"grid",gap:7},children:t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8,minWidth:0},children:[t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{title:Ne,style:{fontSize:ce?12:13,fontWeight:780,lineHeight:1.25,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:Ne}),t.jsxs("div",{style:dl,children:[re?t.jsx(Rt,{trust:re}):null,te?t.jsxs("span",{style:_e,title:te.message,children:[t.jsx(Zt,{size:9})," ",te.status==="repaired"?`${te.mode==="ai"?"AI ":""}repaired · review`:"repair blocked"]}):null,ne?t.jsx("span",{style:_e,children:Pa(ne)}):null,ne!=null&&ne.layoutIntent?t.jsx("span",{style:_e,children:Ee(String(ne.layoutIntent))}):null]})]}),P?t.jsx(Fr,{value:he,options:j,onChange:ee}):null]})}):t.jsxs("div",{style:{minHeight:ce?22:26,paddingLeft:Z?30:0,paddingRight:Z?ce?82:134:0,transition:"padding 120ms ease"},children:[t.jsxs("div",{style:{fontSize:ce?12:13,fontWeight:720,lineHeight:1.25,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[t.jsx("span",{children:e.title??L}),P?t.jsx("span",{style:{float:"right",marginLeft:8},children:t.jsx(Fr,{value:he,options:j,onChange:ee})}):null]}),me||te?t.jsxs("div",{style:{marginTop:5,display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[me?t.jsx(Rt,{trust:me}):null,me?t.jsx("span",{style:_e,children:"AI generated"}):null,te?t.jsxs("span",{style:_e,title:te.message,children:[t.jsx(Zt,{size:9})," ",te.status==="repaired"?`${te.mode==="ai"?"AI ":""}repaired · review`:"repair blocked"]}):null]}):ce?null:t.jsx("div",{style:{marginTop:5,fontSize:10.5,opacity:.58,fontFamily:"var(--font-mono, monospace)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:L})]}),l&&E?t.jsx(vn,{item:e,tile:r,cols:o,onPatch:T}):null,t.jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",marginTop:ce?0:2,fontSize:12,opacity:(r==null?void 0:r.status)==="ok"?1:.7,fontStyle:(r==null?void 0:r.status)==="ok"?"normal":"italic"},children:t.jsx(gn,{item:qe,tile:r,loading:a,error:i,themeMode:n,genUi:ne,onRetry:z,retrying:m,retryDisabled:I})}),l?null:t.jsx(nn,{tile:r,themeMode:n}),!l&&R?t.jsx("div",{style:{display:"flex",justifyContent:"flex-end",gap:6,paddingTop:2},children:t.jsx("button",{type:"button",onClick:J=>{J.stopPropagation(),M(le=>!le)},style:Ra,children:F?"Hide details":"How it works"})}):null,!l&&F&&r?t.jsx(hn,{item:e,tile:r,tab:be,onTab:ie,onOpenNotebook:A,onClose:()=>M(!1)}):null]})}function nn({tile:e,themeMode:r}){const a=We[r],i=p.useMemo(()=>ln(e),[e]);return i?t.jsxs("div",{style:{padding:"4px 10px 8px",fontSize:11.5,color:a.textMuted,lineHeight:1.4,display:"flex",gap:5,alignItems:"baseline"},children:[t.jsx("span",{style:{color:a.accent},children:"•"}),t.jsx("span",{children:i})]}):null}function ln(e){var T,z;const r=(T=e==null?void 0:e.result)==null?void 0:T.rows,a=(z=e==null?void 0:e.result)==null?void 0:z.columns;if(!Array.isArray(r)||r.length===0||!Array.isArray(a)||a.length===0)return null;const i=r[0],n=m=>{if(typeof m=="number"&&Number.isFinite(m))return m;if(typeof m=="string"){const I=Number(m.replace(/[$,%\s]/g,""));return Number.isFinite(I)&&m.trim()?I:void 0}},l=a.find(m=>n(i==null?void 0:i[m])!==void 0),s=a.find(m=>m!==l&&typeof(i==null?void 0:i[m])=="string");if(!l)return null;const o=r.map(m=>m[l]),d=s?r.map(m=>m[s]):[],c=Ee(l);if(r.length===1){const m=n(r[0][l]);return m!==void 0?`${c}: ${Oe(l,m,o,{compact:!0})}.`:null}const h=r.map(m=>({label:s?Oe(s,m[s],d):"top",value:n(m[l])??0})).sort((m,I)=>I.value-m.value),f=h.reduce((m,I)=>m+I.value,0),x=h[0];if(!x)return null;const y=Oe(l,x.value,o,{compact:!0});return f>0?`${x.label} leads ${c} at ${y} (${Math.round(x.value/f*100)}%).`:`${x.label} leads ${c} at ${y}.`}function Fr({value:e,options:r,onChange:a}){return t.jsx("div",{style:ul,"aria-label":"Visualization",children:r.map(i=>t.jsx("button",{type:"button",title:i.label,onClick:n=>{n.stopPropagation(),a(i.value)},style:xl(e===i.value),children:Hn(i.value)},i.value))})}function Rt({trust:e}){const r=e==="certified",a=r?"Certified":e==="review_required"?"Review required":"Draft ready";return t.jsxs("span",{style:cl(r),children:[r?t.jsx(ot,{size:10,strokeWidth:2.4}):t.jsx(it,{size:10,strokeWidth:2.4}),a]})}function sn({story:e}){return t.jsxs("section",{style:Ba,"aria-label":"Current dashboard story",children:[t.jsxs("div",{style:Ea,children:[t.jsx("div",{style:La,children:t.jsx(Ze,{size:15,strokeWidth:2.2})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:_a,children:"Story from current results"}),t.jsx("h3",{style:Oa,children:e.title})]}),e.trust?t.jsx(Rt,{trust:e.trust}):null]}),t.jsx("p",{style:Ma,children:e.summary}),t.jsxs("div",{style:Rr,children:[t.jsx("span",{style:Wa,children:e.sourceTitle}),e.filters.map(r=>t.jsxs("span",{style:wt,children:[r.label,": ",r.value]},`${r.label}:${r.value}`)),e.chips.map(r=>t.jsx("span",{style:wt,children:r},r))]})]})}function on({story:e,onEvidence:r,onResearch:a}){return t.jsxs("section",{style:{...Ba,padding:"20px 22px",marginBottom:16},"aria-label":"Business Story",children:[t.jsxs("div",{style:Ea,children:[t.jsx("div",{style:La,children:t.jsx(Ze,{size:15,strokeWidth:2.2})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:_a,children:"Business Story · current filters"}),t.jsx("h2",{style:{...Oa,fontSize:19},children:e.headline})]}),t.jsx(Rt,{trust:e.trustState})]}),t.jsxs("div",{style:{display:"grid",gap:10,marginTop:12,maxWidth:920},children:[e.paragraphs.slice(0,2).map((i,n)=>t.jsx("p",{style:{...Ma,margin:0,fontSize:14,lineHeight:1.65},children:Vr(i)},n)),e.implication?t.jsxs("p",{style:{margin:0,fontSize:13,lineHeight:1.55,fontWeight:650},children:["What this means: ",Vr(e.implication)]}):null]}),t.jsxs("div",{style:{...Rr,marginTop:14},children:[t.jsx("span",{style:Wa,children:e.generatedBy==="ai"?"AI wording · verified facts":"Verified result summary"}),t.jsxs("span",{style:wt,children:[e.evidenceRefs.length," evidence source",e.evidenceRefs.length===1?"":"s"]}),e.caveat?t.jsx("span",{style:wt,children:e.caveat}):null,t.jsx("span",{style:{flex:1}}),t.jsx("button",{type:"button",onClick:r,style:ia,children:"View evidence"}),t.jsx("button",{type:"button",onClick:a,style:ia,children:"Research deeper"})]})]})}function pn({run:e,variables:r}){const a=e.tiles.filter(n=>n.status!=="ok"),i=Object.entries(r).filter(([,n])=>n!=null&&n!=="");return t.jsxs("details",{style:dn,"aria-label":"Evidence and review appendix",children:[t.jsxs("summary",{style:cn,children:["Evidence & review appendix",t.jsxs("span",{style:{opacity:.62,fontWeight:600},children:[e.story.evidenceRefs.length," sources · ",a.length?`${a.length} issue${a.length===1?"":"s"}`:"all visible sources ran"]})]}),t.jsxs("div",{style:{display:"grid",gap:12,padding:"0 16px 16px"},children:[t.jsxs("div",{style:un,children:[t.jsxs("div",{children:[t.jsx("strong",{children:"Run"}),t.jsx("br",{}),t.jsx("span",{children:e.runId})]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Snapshot"}),t.jsx("br",{}),t.jsx("span",{children:e.snapshotId})]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Trust"}),t.jsx("br",{}),t.jsx("span",{children:e.story.trustState})]}),t.jsxs("div",{children:[t.jsx("strong",{children:"Filters"}),t.jsx("br",{}),t.jsx("span",{children:i.length?i.map(([n,l])=>`${n}: ${String(l)}`).join(" · "):"Current unfiltered scope"})]})]}),t.jsxs("div",{children:[t.jsx("strong",{style:{fontSize:12},children:"Evidence used by the story"}),t.jsx("div",{style:{...Rr,marginTop:7},children:e.story.evidenceRefs.map(n=>t.jsx("span",{style:wt,children:n},n))})]}),a.length?t.jsxs("div",{children:[t.jsx("strong",{style:{fontSize:12},children:"Items requiring review"}),t.jsx("ul",{style:{margin:"7px 0 0",paddingLeft:18,fontSize:12,lineHeight:1.55},children:a.map(n=>t.jsxs("li",{children:[n.title??n.tileId,": ",n.error??n.status]},n.tileId))})]}):null]})]})}function Vr(e){return e.split(/(\*\*[^*]+\*\*)/g).filter(Boolean).map((r,a)=>r.startsWith("**")&&r.endsWith("**")?t.jsx("strong",{children:r.slice(2,-2)},a):r)}const dn={marginTop:16,border:"1px solid var(--dql-app-line, var(--border-color, rgba(15,23,42,0.10)))",borderRadius:8,background:"var(--dql-app-surface, var(--surface, rgba(0,0,0,0.02)))",color:"var(--dql-app-text, var(--text-primary, #0f172a))"},cn={cursor:"pointer",padding:"12px 16px",fontSize:12.5,fontWeight:760,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12},un={display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(170px, 1fr))",gap:10,fontSize:11.5,lineHeight:1.45,color:"var(--dql-app-text-muted, var(--text-secondary, #64748b))"},xn={position:"absolute",bottom:10,right:10,zIndex:5,display:"inline-flex",alignItems:"center",gap:4,padding:"3px 8px",borderRadius:999,fontSize:10.5,fontWeight:700,color:"var(--dql-app-accent, var(--accent, #4f46e5))",background:"var(--dql-app-accent-soft, rgba(79,70,229,0.12))",border:"1px solid var(--dql-app-accent, rgba(79,70,229,0.4))",cursor:"pointer",lineHeight:1.2,fontFamily:"inherit"};function fn(e){return`/ask Explain ${e} for a stakeholder. Start with the business meaning, current result, active filters, caveats, and recommended next action.`}function gn({item:e,tile:r,loading:a,error:i,themeMode:n,genUi:l,onRetry:s,retrying:o,retryDisabled:d}){var x,y,T,z,m;if(a&&!r)return t.jsx("span",{children:"Loading data..."});if((r==null?void 0:r.tileType)==="text")return l?t.jsx(yn,{title:e.title??l.insightTitle??"Generated section",markdown:((x=r.text)==null?void 0:x.markdown)??"",genUi:l,themeMode:n}):t.jsx(wn,{markdown:((y=r.text)==null?void 0:y.markdown)??"",variant:((T=r.viz)==null?void 0:T.type)==="heading"?"heading":"text",themeMode:n});if(i&&!r)return t.jsx("span",{children:i});if(!r)return t.jsx("span",{children:"No run result."});if(r.status==="unauthorized")return t.jsx("span",{children:"Not authorized."});if(r.status==="unresolved")return t.jsx("span",{children:r.error??"Block reference unresolved."});if(r.status==="error")return t.jsxs("div",{style:{display:"grid",gap:8,justifyItems:"center",textAlign:"center",padding:8},children:[t.jsx("span",{children:r.error??"Tile failed."}),((z=r.repair)==null?void 0:z.status)==="failed"?t.jsx("small",{children:r.repair.message}):null,s?t.jsxs("button",{type:"button",disabled:o||d,onClick:I=>{I.stopPropagation(),s()},style:Jn,children:[t.jsx(Zt,{size:12})," ",o?"Fixing…":"Fix and retry"]}):null]});if(!r.result)return r.tileType==="aiPin"&&r.aiPin?t.jsx(Kr,{pin:r.aiPin,themeMode:n}):t.jsx("span",{children:"No result."});const c=Ir(e,r.chartConfig),h=String(c.chart??((m=r.viz)==null?void 0:m.type)??"").toLowerCase();let f;if(h==="table"||e.viz.type==="table"||e.viz.type==="pivot")r.tileType!=="aiPin"&&((l==null?void 0:l.component)==="EvidenceTable"||(l==null?void 0:l.component)==="PivotTable")?f=t.jsx(qn,{result:r.result,genUi:l,themeMode:n}):f=t.jsx("div",{style:{width:"100%",alignSelf:"stretch"},children:t.jsx(ki,{result:r.result,themeMode:n})});else{const I=h==="kpi"?Ui(r.result,c.y):r.result;f=t.jsx("div",{style:{width:"100%",alignSelf:"stretch"},children:t.jsx(Si,{result:I,themeMode:n,chartConfig:c})})}return r.tileType==="aiPin"&&r.aiPin?t.jsx(Kr,{pin:r.aiPin,themeMode:n,dataView:f}):f}function hn({item:e,tile:r,tab:a,onTab:i,onOpenNotebook:n,onClose:l}){var c,h,f;const s=r.artifact,o=!!(r.result&&(s!=null&&s.dql||s!=null&&s.sql)),d=(s==null?void 0:s.sourceKind)==="certified_block"?"Certified block":(s==null?void 0:s.sourceKind)==="semantic_query"?"Governed semantic query":(s==null?void 0:s.sourceKind)==="draft_analysis"?"App analysis":(s==null?void 0:s.sourceKind)==="ai_pin"?"Saved AI insight":r.tileType??"App tile";return t.jsx("div",{style:Zn,role:"presentation",onClick:l,children:t.jsxs("section",{role:"dialog","aria-modal":"true","aria-label":`How ${e.title??r.title??e.i} works`,style:Dn,onClick:x=>x.stopPropagation(),children:[t.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:{fontSize:16,fontWeight:800},children:e.title??r.title??(s==null?void 0:s.name)??"App tile"}),t.jsxs("div",{style:{marginTop:4,fontSize:12,color:"var(--text-secondary)"},children:[d," · ",(s==null?void 0:s.trustState)==="certified"&&!r.repair?"Certified":"Review required"]})]}),t.jsx("button",{type:"button",onClick:l,"aria-label":"Close details",style:Yt,children:t.jsx($i,{size:14})})]}),t.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",borderBottom:"1px solid var(--border-subtle)",paddingBottom:10},children:["how","dql","sql"].map(x=>t.jsx("button",{type:"button",onClick:()=>i(x),style:Un(a===x),children:x==="how"?"How it works":x.toUpperCase()},x))}),t.jsx("div",{style:{minHeight:180,maxHeight:"56vh",overflow:"auto"},children:a==="how"?t.jsxs("div",{style:{display:"grid",gap:12,fontSize:12.5,lineHeight:1.5},children:[t.jsx(It,{label:"Source",value:(s==null?void 0:s.sourcePath)??((c=r.citation)==null?void 0:c.path)??((h=r.citation)==null?void 0:h.name)??d}),t.jsx(It,{label:"Result",value:r.result?`${r.result.rowCount} rows · ${r.result.columns.length} columns`:r.status}),(f=s==null?void 0:s.explanation)!=null&&f.length?t.jsxs("div",{children:[t.jsx("b",{children:"Execution"}),t.jsx("ul",{style:{margin:"6px 0 0",paddingLeft:18},children:s.explanation.map(x=>t.jsx("li",{children:x},x))})]}):null,r.filters?t.jsx(It,{label:"Filters",value:`${r.filters.applied.map(x=>x.filter).join(", ")||"None applied"}${r.filters.skipped.length?` · ${r.filters.skipped.length} skipped`:""}`}):null,r.invocation?t.jsx(It,{label:"Parameters",value:r.invocation.resolvedParameters.map(x=>`${x.name} (${x.source})`).join(", ")||"None"}):null,r.repair?t.jsx(It,{label:"Repair",value:r.repair.message}):null,t.jsx("div",{style:{padding:10,borderRadius:8,background:"var(--bg-2)",color:"var(--text-secondary)"},children:"Parameter values are intentionally omitted here. Open the editable Notebook cell to inspect or change the full execution contract."})]}):t.jsx("pre",{style:el,children:a==="dql"?(s==null?void 0:s.dql)??"This tile does not expose DQL source. Its governed semantic intent is composed into SQL at runtime.":(s==null?void 0:s.sql)??"Executed SQL is not available for this saved result."})}),t.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,borderTop:"1px solid var(--border-subtle)",paddingTop:10},children:[t.jsx("button",{type:"button",onClick:l,style:Ge(!1),children:"Close"}),o?t.jsx("button",{type:"button",onClick:()=>n==null?void 0:n(r),style:Ge(!0),children:"Open in Notebook"}):null]})]})})}function It({label:e,value:r}){return t.jsxs("div",{style:{display:"grid",gridTemplateColumns:"110px minmax(0, 1fr)",gap:12},children:[t.jsx("b",{children:e}),t.jsx("span",{style:{minWidth:0,overflowWrap:"anywhere",color:"var(--text-secondary)"},children:r})]})}function mn({item:e,cols:r,settingsOpen:a,onToggleSettings:i,onPatch:n}){const[l,s]=p.useState(!1),o=d=>{s(!1),n(Ha(e,r,d))};return t.jsxs("div",{style:{display:"flex",gap:4,alignItems:"center",flexWrap:"wrap",justifyContent:"flex-end"},children:[t.jsxs("div",{style:{position:"relative"},children:[t.jsx("button",{type:"button",title:"Choose tile size",onClick:()=>s(d=>!d),style:Yt,children:t.jsx(qi,{size:13,strokeWidth:2})}),l?t.jsx(bn,{onPick:o,onClose:()=>s(!1)}):null]}),t.jsx("button",{type:"button",title:"Chart and field settings",onClick:i,style:Yt,children:t.jsx(Pi,{size:13,strokeWidth:2,color:a?"var(--accent, #4f46e5)":void 0})}),t.jsx("button",{type:"button",title:"Remove tile",onClick:()=>n(null),style:Yt,children:t.jsx(Sr,{size:13,strokeWidth:2})})]})}function bn({onPick:e,onClose:r}){return t.jsx("div",{style:kl,onMouseLeave:r,children:Ca.map(a=>t.jsxs("button",{type:"button",onClick:()=>e(a.id),style:Sl,children:[t.jsx("span",{style:{fontSize:12,fontWeight:750},children:a.label}),t.jsx("span",{style:{fontSize:11,opacity:.66},children:a.description})]},a.id))})}function vn({item:e,tile:r,cols:a,onPatch:i}){var N;const n=r==null?void 0:r.result,l=Ir(e,r==null?void 0:r.chartConfig),s=lt(l.chart),o=Ue(e),[d,c]=p.useState(!1),[h,f]=p.useState(null),[x,y]=p.useState(null),T=p.useMemo(()=>Ii(n),[n]),z=p.useMemo(()=>{const b=new Map;if(!n)return b;const E=new Set(T.metrics),O=new Set(T.dimensions);for(const F of n.columns)E.has(F)?b.set(F,"measure"):O.has(F)?b.set(F,"dimension"):b.set(F,wi(ji(F,n.rows)));return b},[n,T]),m=(n==null?void 0:n.columns.filter(b=>z.get(b)==="measure"))??[],I=(n==null?void 0:n.columns.filter(b=>z.get(b)!=="measure"))??[],A=b=>{const E=Yr({...l,...b}),O=Dt(E.chart),F=Ue(e),M={...E};F&&(M.dqlGenUi={...F,defaultVisualization:O}),i({title:E.title||e.title,viz:{...e.viz,type:O,options:M},display:Ia(e,O,F)})},W=async()=>{c(!0),y(null),f(null);const b=Qe(e)??e.title,E=await D.recommendVisualization({...b?{blockRef:b}:{},resultSchema:n?{columns:n.columns}:void 0,rowSample:n==null?void 0:n.rows.slice(0,5),prompt:[e.title,o==null?void 0:o.rationale].filter(Boolean).join(" "),allowedVisualizations:o==null?void 0:o.allowedVisualizations});if(c(!1),!E.ok){y(E.error);return}const O=lt(E.display.defaultVisualization),F=Dt(O),M=E.display.fieldHints??{},be=Yr({...l,chart:O,title:l.title??e.title,x:M.x??M.label??l.x,y:M.y??M.value??l.y,color:M.color??l.color});i({title:be.title||e.title,viz:{...e.viz,type:F,options:{...be}},display:E.display});const ie=E.evidence.map(U=>U.source).slice(0,3).join(", "),K=E.warnings[0];f(K?`${E.display.component}: ${K}`:`${E.display.component}${ie?` from ${ie}`:""}`)};return t.jsxs("div",{style:il,children:[t.jsxs("div",{style:{display:"grid",gap:6},children:[t.jsx("div",{style:{fontSize:10,fontWeight:800,textTransform:"uppercase",opacity:.58},children:"Tile size"}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Ca.map(b=>t.jsx("button",{type:"button",title:b.description,onClick:()=>i(Ha(e,a,b.id)),style:zl(Cl(e,a,b.id)),children:b.label},b.id))})]}),t.jsxs("div",{style:ll,children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,justifyContent:"space-between"},children:[t.jsxs("div",{style:{minWidth:0},children:[t.jsx("div",{style:{fontSize:10,fontWeight:800,textTransform:"uppercase",opacity:.58},children:"Display contract"}),t.jsx("div",{style:{marginTop:3,fontSize:11,lineHeight:1.35,opacity:.76},children:(o==null?void 0:o.rationale)??((N=e.display)==null?void 0:N.rationale)??"Choose a governed visualization for this app tile."})]}),t.jsxs("button",{type:"button",onClick:()=>void W(),disabled:d,style:sl(d),title:"Recommend visualization from block hints and result fields",children:[t.jsx(ka,{size:12,strokeWidth:2.2}),d?"Thinking":"AI recommend"]})]}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:[o!=null&&o.component?t.jsx("span",{style:_e,children:Pa(o)}):null,o!=null&&o.defaultVisualization?t.jsx("span",{style:_e,children:Ee(String(o.defaultVisualization))}):null,o!=null&&o.reviewStatus?t.jsx("span",{style:_e,children:Ee(String(o.reviewStatus))}):null]}),h?t.jsx("div",{style:Va,children:h}):null,x?t.jsx("div",{style:ol,children:x}):null]}),t.jsxs("div",{style:nl,children:[t.jsxs("label",{style:mr,children:["Title",t.jsx("input",{value:l.title??e.title??"",onChange:b=>A({title:b.target.value||void 0}),style:br})]}),t.jsxs("label",{style:mr,children:["Chart",t.jsx("select",{value:s,onChange:b=>A({chart:b.target.value}),style:br,children:Nr.map(b=>t.jsx("option",{value:b.value,children:b.label},b.value))})]}),t.jsx(Vt,{label:"X",value:l.x,columns:(n==null?void 0:n.columns)??[],onChange:b=>A({x:b})}),t.jsx(Vt,{label:"Y",value:l.y,columns:(n==null?void 0:n.columns)??[],onChange:b=>A({y:b})}),t.jsx(Vt,{label:"Color",value:l.color,columns:(n==null?void 0:n.columns)??[],onChange:b=>A({color:b})}),t.jsx(Vt,{label:"Facet",value:l.facet,columns:(n==null?void 0:n.columns)??[],onChange:b=>A({facet:b})})]}),n?t.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[t.jsx(Hr,{title:"Measures",columns:m,onPick:b=>A({y:b})}),t.jsx(Hr,{title:"Dimensions",columns:I,onPick:b=>A({x:b})})]}):t.jsx("div",{style:{fontSize:11,opacity:.64},children:"Run results are needed before field slots can be inferred."})]})}function Vt({label:e,value:r,columns:a,onChange:i}){return t.jsxs("label",{style:mr,children:[e,t.jsxs("select",{value:r??"",onChange:n=>i(n.target.value||void 0),style:br,children:[t.jsx("option",{value:"",children:"Auto"}),a.map(n=>t.jsx("option",{value:n,children:n},n))]})]})}function Hr({title:e,columns:r,onPick:a}){return t.jsxs("div",{style:{display:"grid",gap:4,minWidth:0},children:[t.jsx("div",{style:{fontSize:10,fontWeight:800,textTransform:"uppercase",opacity:.58},children:e}),t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:r.length===0?t.jsx("span",{style:{fontSize:11,opacity:.55},children:"None"}):r.slice(0,10).map(i=>t.jsx("button",{type:"button",onClick:()=>a(i),style:pl,children:i},i))})]})}function Qr({open:e,onToggle:r,onCertifiedBlock:a,onText:i,onHeading:n,onAi:l,buttonLabel:s,buttonStyle:o}){return t.jsxs("div",{style:{position:"relative",display:"inline-flex"},children:[t.jsxs("button",{type:"button",onClick:r,title:"Add tile",style:o??Ge(e),children:[t.jsx(Jt,{size:15,strokeWidth:2.2}),s?t.jsx("span",{children:s}):null]}),e&&t.jsxs("div",{style:{position:"absolute",top:"calc(100% + 6px)",right:0,zIndex:30,width:260,border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:8,background:"var(--color-bg, #fff)",boxShadow:"0 14px 38px rgba(0,0,0,0.16)",padding:6,display:"grid",gap:4,textAlign:"left"},children:[t.jsx(Ht,{title:"Certified block",description:"Chart, table, or KPI from this App domain",onClick:a}),t.jsx(Ht,{title:"Text / summary",description:"Narrative, notes, caveats, or CXO context",onClick:i}),t.jsx(Ht,{title:"Section heading",description:"Separate an App page into readable groups",onClick:n}),t.jsx(Ht,{title:"Copilot insight",description:"Open scoped AI, then pin the reviewed answer to this App",onClick:l})]})]})}function Ht({title:e,description:r,onClick:a}){return t.jsxs("button",{type:"button",onClick:a,style:al,children:[t.jsx("span",{style:{fontSize:12,fontWeight:700},children:e}),t.jsx("span",{style:{fontSize:11,opacity:.66},children:r})]})}function yn({title:e,markdown:r,genUi:a,themeMode:i}){var d;const n=We[i],l=Qn(r,e),s=a.component==="TrustCallout",o=a.component==="ResearchActions";return t.jsxs("div",{style:fl(s),children:[t.jsxs("div",{style:{display:"flex",gap:8,alignItems:"flex-start"},children:[t.jsx("span",{style:gl(s),children:s?t.jsx(it,{size:15}):o?t.jsx(Ze,{size:15}):t.jsx(ot,{size:15})}),t.jsxs("div",{style:{flex:1,minWidth:0},children:[t.jsx("div",{style:{fontSize:13,fontWeight:780,lineHeight:1.25},children:a.insightTitle??e}),t.jsx("div",{style:{marginTop:6,fontSize:13,lineHeight:1.45,color:n.textSecondary},children:l})]})]}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:[a.trustState?t.jsx(Rt,{trust:a.trustState}):null,a.reviewStatus?t.jsx("span",{style:_e,children:Ee(a.reviewStatus)}):null]}),(d=a.followUpActions)!=null&&d.length?t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:a.followUpActions.slice(0,3).map(c=>t.jsx("span",{style:hl,children:Ee(c)},c))}):null]})}function qn({result:e,genUi:r,themeMode:a}){var x;const i=We[a],n=e.rows??[],l=e.columns??[],s=Kn(l,n,(x=r.fieldHints)==null?void 0:x.label),o=l.find(y=>/\b(status|quality|trust|certification|review)\b/i.test(y)),d=l.filter(y=>y!==s&&y!==o).filter(y=>sr(y)<90||qt(y,n)).sort((y,T)=>sr(y)-sr(T)).slice(0,2),c=l.filter(y=>y!==s&&y!==o&&!d.includes(y)).slice(0,2),h=e.rowCount??n.length,f=$a(l,n);return t.jsxs("div",{style:ml,children:[t.jsxs("div",{style:{fontSize:11.5,color:i.textSecondary},children:[h," ",h===1?"row":"rows"," across ",l.length," ",l.length===1?"field":"fields"]}),t.jsx("div",{style:bl,children:n.slice(0,4).map((y,T)=>{const z=s?Oe(s,y[s],f.get(s)??[]):`Row ${T+1}`,m=o?Oe(o,y[o],f.get(o)??[]):null;return t.jsxs("div",{style:vl,children:[t.jsxs("div",{style:{minWidth:0},children:[t.jsx("div",{style:{fontSize:12.5,fontWeight:760,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:z}),c.length?t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:5,marginTop:4},children:c.map(I=>t.jsxs("span",{style:yl,children:[Ee(I),": ",Oe(I,y[I],f.get(I)??[])]},I))}):null]}),t.jsxs("div",{style:{display:"flex",gap:5,flexWrap:"wrap",justifyContent:"flex-start",minWidth:0},children:[d.map(I=>t.jsxs("span",{style:ql,children:[t.jsx("span",{style:{opacity:.62},children:Ee(I)}),t.jsx("strong",{children:Oe(I,y[I],f.get(I)??[])})]},I)),m?t.jsx("span",{style:wl,children:m}):null]})]},T)})}),n.length>4?t.jsx("div",{style:{fontSize:11,color:i.textSecondary},children:"Showing first 4 rows in generated view. Switch tile settings for full table controls."}):null]})}function wn({markdown:e,variant:r="text",themeMode:a}){const i=We[a];return t.jsx("div",{style:{width:"100%",alignSelf:"stretch",overflow:"auto",whiteSpace:"normal",lineHeight:1.45,fontStyle:"normal",opacity:1,fontSize:r==="heading"?18:void 0,fontWeight:r==="heading"?800:void 0,display:r==="heading"?"flex":void 0,alignItems:r==="heading"?"center":void 0},children:ja(e,i)})}function Kr({pin:e,themeMode:r,dataView:a}){var d,c;const[i,n]=p.useState(null),l=We[r]??We.light,s=async()=>{n("Refreshing...");const h=await D.refreshAiPin(e.appId,e.id);n(h.ok?"Refreshed.":h.error??"Refresh failed."),window.dispatchEvent(new CustomEvent("dql-app-dashboard-updated",{detail:{appId:e.appId,dashboardId:e.dashboardId}}))},o=async()=>{n("Creating draft...");const h=await D.promoteAiPin(e.appId,e.id);n(h.ok?`Draft created: ${h.blockPath}`:h.error??"Promotion failed."),window.dispatchEvent(new CustomEvent("dql-app-dashboard-updated",{detail:{appId:e.appId,dashboardId:e.dashboardId}}))};return t.jsxs("div",{style:{width:"100%",alignSelf:"stretch",overflow:"auto",fontStyle:"normal",lineHeight:1.5,display:"grid",gap:10},children:[a||t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[t.jsx("span",{style:{fontSize:10.5,fontWeight:800,color:e.certification==="certified"?"#15803d":"#b45309",background:e.certification==="certified"?"rgba(22,163,74,0.1)":"rgba(245,158,11,0.12)",border:`1px solid ${e.certification==="certified"?"rgba(22,163,74,0.22)":"rgba(245,158,11,0.24)"}`,borderRadius:999,padding:"3px 7px"},children:e.certification==="certified"?"Certified":"Review required"}),t.jsx("span",{style:{fontSize:10.5,color:"var(--color-text-muted, rgba(0,0,0,0.58))"},children:"Pinned report insight"})]}),t.jsx("div",{style:{minWidth:0},children:ja(e.answer,l)}),(c=(d=e.result)==null?void 0:d.rows)!=null&&c.length?t.jsx(jn,{result:e.result}):null]}),t.jsxs("div",{style:{display:"flex",gap:6,marginTop:8,flexWrap:"wrap"},children:[e.sql&&t.jsx("button",{type:"button",onClick:()=>void s(),style:la,children:"Refresh"}),e.sql&&e.reviewStatus==="needs_review"&&t.jsx("button",{type:"button",onClick:()=>void o(),style:la,children:"Promote"}),e.refreshCadence==="daily"&&t.jsx("span",{style:{fontSize:11,opacity:.62},children:"daily"})]}),i&&t.jsx("div",{style:{marginTop:6,fontSize:11,opacity:.72},children:i}),e.lastRefreshError&&t.jsx("div",{style:{marginTop:8,color:"#f85149"},children:e.lastRefreshError})]})}function jn({result:e}){var n,l;const r=((n=e.columns)!=null&&n.length?e.columns:Object.keys(((l=e.rows)==null?void 0:l[0])??{})).slice(0,4),a=(e.rows??[]).slice(0,3),i=$a(r,e.rows??[]);return!r.length||!a.length?null:t.jsxs("div",{style:{display:"grid",gap:6},children:[t.jsx("div",{style:{color:"var(--color-text-muted, rgba(0,0,0,0.58))",fontSize:11,fontWeight:750},children:"Supporting rows"}),t.jsx("div",{style:{overflow:"auto",border:"1px solid var(--border-color, rgba(0,0,0,0.08))",borderRadius:6},children:t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:11},children:[t.jsx("thead",{children:t.jsx("tr",{children:r.map(s=>t.jsx("th",{style:{textAlign:"left",padding:"5px 7px",borderBottom:"1px solid var(--border-color, rgba(0,0,0,0.08))",color:"var(--color-text-muted, rgba(0,0,0,0.58))"},children:Ee(s)},s))})}),t.jsx("tbody",{children:a.map((s,o)=>t.jsx("tr",{children:r.map(d=>t.jsx("td",{style:{padding:"5px 7px",borderBottom:o===a.length-1?"none":"1px solid var(--border-color, rgba(0,0,0,0.06))"},children:Oe(d,s[d],i.get(d)??[])},d))},o))})]})})]})}function kn({kind:e,value:r,onChange:a,onClose:i,onSave:n}){const l=e==="heading";return t.jsx("div",{style:{position:"fixed",inset:0,zIndex:90,background:"rgba(0,0,0,0.36)",display:"flex",alignItems:"center",justifyContent:"center",padding:24},children:t.jsxs("div",{style:{width:"min(520px, 92vw)",display:"grid",gap:12,background:"var(--color-bg, #fff)",color:"inherit",borderRadius:8,boxShadow:"0 18px 60px rgba(0,0,0,0.35)",padding:16},children:[t.jsxs("div",{children:[t.jsx("div",{style:{fontSize:16,fontWeight:800},children:l?"Add heading":"Add text tile"}),t.jsx("div",{style:{fontSize:12,opacity:.65,marginTop:4},children:l?"Create a section heading on this dashboard page.":"Create a narrative text tile on this dashboard page."})]}),l?t.jsx("input",{value:r,onChange:s=>a(s.target.value),onKeyDown:s=>{s.key==="Enter"&&n(),s.key==="Escape"&&i()},placeholder:"Executive summary",autoFocus:!0,style:na}):t.jsx("textarea",{value:r,onChange:s=>a(s.target.value),onKeyDown:s=>{s.key==="Escape"&&i(),s.key==="Enter"&&(s.metaKey||s.ctrlKey)&&n()},placeholder:"Add context, assumptions, or decisions...",rows:6,autoFocus:!0,style:{...na,resize:"vertical",lineHeight:1.45}}),t.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[t.jsx("button",{type:"button",onClick:i,style:Ge(!1),children:"Cancel"}),t.jsx("button",{type:"button",onClick:n,disabled:!r.trim(),style:{...Fa,opacity:r.trim()?1:.65},children:"Add"})]})]})})}function Sn({blocks:e,search:r,onSearch:a,onClose:i,onAdd:n}){const l=e.filter(s=>{const o=r.trim().toLowerCase();return o?[s.name,s.description,s.domain,...s.tags??[]].join(" ").toLowerCase().includes(o):!0});return t.jsx("div",{style:{position:"fixed",inset:0,zIndex:90,background:"rgba(0,0,0,0.36)",display:"flex",alignItems:"center",justifyContent:"center",padding:24},children:t.jsxs("div",{style:{width:"min(860px, 94vw)",maxHeight:"86vh",display:"flex",flexDirection:"column",background:"var(--color-bg, #fff)",color:"inherit",borderRadius:8,overflow:"hidden",boxShadow:"0 18px 60px rgba(0,0,0,0.35)"},children:[t.jsxs("div",{style:{padding:14,borderBottom:"1px solid var(--border-color, rgba(0,0,0,0.1))",display:"flex",gap:10,alignItems:"center"},children:[t.jsx("div",{style:{fontSize:15,fontWeight:700,flex:1},children:"Add Certified Block"}),t.jsx("button",{type:"button",onClick:i,style:Ge(!1),children:"Close"})]}),t.jsx("div",{style:{padding:14,borderBottom:"1px solid var(--border-color, rgba(0,0,0,0.08))"},children:t.jsx("input",{value:r,onChange:s=>a(s.target.value),placeholder:"Search domain blocks...",style:{width:"100%",boxSizing:"border-box",border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:6,padding:"8px 10px",background:"var(--surface, transparent)",color:"inherit"}})}),t.jsx("div",{style:{overflow:"auto",padding:12,display:"grid",gap:8},children:l.length===0?t.jsx("div",{style:{padding:18,fontSize:12,opacity:.66},children:"No certified blocks match this App scope."}):l.map(s=>t.jsxs("button",{type:"button",onClick:()=>n(s),style:{textAlign:"left",border:"1px solid var(--border-color, rgba(0,0,0,0.1))",borderRadius:7,background:"transparent",color:"inherit",padding:10,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:4},children:[t.jsx("span",{style:{fontSize:13,fontWeight:700},children:s.name}),t.jsx("span",{style:{fontSize:10,padding:"2px 6px",borderRadius:999,background:"rgba(63,185,80,0.14)",color:"#2ea043"},children:s.status}),t.jsx("span",{style:{fontSize:10,opacity:.68},children:s.domain}),t.jsx("span",{style:{fontSize:10,opacity:.68},children:s.chartType??"table"})]}),t.jsx("div",{style:{fontSize:12,opacity:.72},children:s.description||s.path})]},s.id))})]})})}function zn({lineage:e}){var n,l;const r=((n=e==null?void 0:e.graph)==null?void 0:n.nodes)??[],a=((l=e==null?void 0:e.graph)==null?void 0:l.edges)??[],i=(e==null?void 0:e.breadcrumbs)??[];return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[t.jsxs("div",{children:[t.jsx("div",{style:{fontSize:12,fontWeight:800,textTransform:"uppercase",opacity:.62,marginBottom:6},children:"App Lineage"}),t.jsx("div",{style:{fontSize:12,opacity:.72},children:"Terms and business views connect the App back to DQL blocks, dbt models, and source tables."})]}),i.length>0&&t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:i.map((s,o)=>t.jsxs("div",{style:{display:"grid",gridTemplateColumns:"64px 1fr",gap:8,fontSize:12},children:[t.jsx("span",{style:{fontFamily:"monospace",opacity:.6},children:s.type}),t.jsx("span",{children:s.name})]},`${s.id}-${o}`))}),t.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[t.jsx(Gr,{label:"Nodes",value:r.length}),t.jsx(Gr,{label:"Edges",value:a.length})]}),t.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:r.slice(0,18).map(s=>t.jsxs("div",{style:{border:"1px solid var(--border-color, rgba(0,0,0,0.08))",borderRadius:6,padding:8},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,minWidth:0},children:[t.jsx("span",{style:{color:"#0d1117",background:pi[s.type]??"#8b949e",borderRadius:3,padding:"1px 4px",fontSize:9,fontWeight:800,flexShrink:0},children:oi[s.type]??s.type.slice(0,4).toUpperCase()}),t.jsx("div",{style:{fontSize:12,fontWeight:700,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.name})]}),t.jsxs("div",{style:{fontSize:11,opacity:.62,fontFamily:"monospace",marginTop:4},children:[di[s.type]??s.type," · ",s.id]})]},s.id))})]})}function Gr({label:e,value:r}){return t.jsxs("div",{style:{border:"1px solid var(--border-color, rgba(0,0,0,0.08))",borderRadius:6,padding:8},children:[t.jsx("div",{style:{fontSize:11,opacity:.62},children:e}),t.jsx("div",{style:{fontSize:18,fontWeight:800},children:r})]})}function Qe(e){return e.block?"blockId"in e.block?e.block.blockId??null:e.block.ref??null:null}function lt(e){const r=String(e??"table").toLowerCase().replace(/_/g,"-");return r==="single-value"?"kpi":Nr.some(a=>a.value===r)?r:"table"}function Dt(e){const r=lt(e);return r==="table"?"table":r.replace(/-/g,"_")}function Yr(e){const r={};for(const[a,i]of Object.entries(e))i===void 0||i===""||(r[a]=i);return r.chart||(r.chart="table"),r}function Ue(e){var a;if(Kt(e.display)){const i=e.display,n=typeof i.component=="string"?i.component:void 0;return{version:1,component:n,role:Na(n),layoutIntent:typeof i.layoutIntent=="string"?i.layoutIntent:void 0,defaultVisualization:typeof i.defaultVisualization=="string"?i.defaultVisualization:void 0,allowedVisualizations:Array.isArray(i.allowedVisualizations)?i.allowedVisualizations.filter(l=>typeof l=="string"):void 0,fieldHints:Kt(i.fieldHints)?Object.fromEntries(Object.entries(i.fieldHints).filter(l=>typeof l[1]=="string")):void 0,insightTitle:e.title,trustState:typeof i.trustState=="string"?i.trustState:void 0,reviewStatus:typeof i.reviewStatus=="string"?i.reviewStatus:void 0,rationale:typeof i.rationale=="string"?i.rationale:void 0}}const r=(a=e.viz.options)==null?void 0:a.dqlGenUi;return Kt(r)?{version:typeof r.version=="number"?r.version:void 0,component:typeof r.component=="string"?r.component:void 0,role:typeof r.role=="string"?r.role:void 0,layoutIntent:typeof r.layoutIntent=="string"?r.layoutIntent:void 0,defaultVisualization:typeof r.defaultVisualization=="string"?r.defaultVisualization:void 0,allowedVisualizations:Array.isArray(r.allowedVisualizations)?r.allowedVisualizations.filter(i=>typeof i=="string"):void 0,fieldHints:Kt(r.fieldHints)?Object.fromEntries(Object.entries(r.fieldHints).filter(i=>typeof i[1]=="string")):void 0,insightTitle:typeof r.insightTitle=="string"?r.insightTitle:void 0,trustState:typeof r.trustState=="string"?r.trustState:void 0,reviewStatus:typeof r.reviewStatus=="string"?r.reviewStatus:void 0,sourceNodeId:typeof r.sourceNodeId=="string"?r.sourceNodeId:void 0,followUpActions:Array.isArray(r.followUpActions)?r.followUpActions.filter(i=>typeof i=="string"):void 0,rationale:typeof r.rationale=="string"?r.rationale:void 0}:null}function Xr(e,r){return{mode:"manual",component:e==="heading"?"NarrativePanel":"BusinessBrief",defaultVisualization:e,allowedVisualizations:[e],layoutIntent:e==="heading"?"wide":"standard",rationale:r?`Manual narrative tile for "${r}" on this app surface.`:"Manual narrative tile for this app surface.",trustState:"review_required",reviewStatus:"review_required"}}function Ia(e,r,a){var l,s,o,d,c,h,f,x,y;const i=An([r,...((l=e.display)==null?void 0:l.allowedVisualizations)??[],...(a==null?void 0:a.allowedVisualizations)??[]]),n=((s=e.display)==null?void 0:s.component)??Cn(r);return{mode:((o=e.display)==null?void 0:o.mode)??(a?"ai_generated":e.block?"block_hint":"manual"),component:n,defaultVisualization:r,allowedVisualizations:i.length?i:[r],...(d=e.display)!=null&&d.fieldHints||a!=null&&a.fieldHints?{fieldHints:((c=e.display)==null?void 0:c.fieldHints)??(a==null?void 0:a.fieldHints)}:{},layoutIntent:Mn(((h=e.display)==null?void 0:h.layoutIntent)??(a==null?void 0:a.layoutIntent)),rationale:((f=e.display)==null?void 0:f.rationale)??(a==null?void 0:a.rationale)??"Visualization selected for this consumer surface.",trustState:$r(((x=e.display)==null?void 0:x.trustState)??(a==null?void 0:a.trustState)),reviewStatus:Wn(((y=e.display)==null?void 0:y.reviewStatus)??(a==null?void 0:a.reviewStatus))}}function An(e){return Array.from(new Set(e.filter(r=>typeof r=="string"&&r.trim()).map(r=>r.trim())))}function Cn(e){return e==="single_value"||e==="kpi"||e==="gauge"?"KpiMetric":e==="line"||e==="area"?"TrendPanel":e==="bar"||e==="grouped_bar"||e==="stacked_bar"||e==="donut"||e==="pie"?"RankingPanel":e==="pivot"?"PivotTable":e==="text"||e==="heading"?"NarrativePanel":"EvidenceTable"}function Na(e){return e==="BusinessBrief"?"business_summary":e==="KpiMetric"?"kpi":e==="TrendPanel"?"trend":e==="RankingPanel"?"breakdown":e==="TrustCallout"?"trust":e==="ResearchActions"?"research":e==="NarrativePanel"?"narrative":e?"evidence":void 0}function In(e){var s,o,d,c;if(Qe(e)||e.aiPin)return!1;const r=Ue(e),a=(r==null?void 0:r.component)??((s=e.display)==null?void 0:s.component),i=(r==null?void 0:r.role)??Na(a),n=$r(String((r==null?void 0:r.trustState)??((o=e.display)==null?void 0:o.trustState)??"review_required"));if(a==="TrustCallout"||a==="ResearchActions"||i==="trust"||i==="research")return!0;if(a!=="NarrativePanel"&&a!=="BusinessBrief"||n==="certified")return!1;const l=[e.title,(d=e.text)==null?void 0:d.markdown,(c=e.display)==null?void 0:c.rationale,r==null?void 0:r.rationale,r==null?void 0:r.insightTitle].filter(Boolean).join(" ").toLowerCase();return/\b(draft ready|review-required|review required|missing evidence|missing proof|trust gap|research drilldown|promote to a certified block|generated review placeholder|generated section)\b/.test(l)}function Nn(e,r,a){const n=[...e.filter(l=>!Tn(l,r.get(l.i))&&!Rn(l,e,r)&&!Pn(l,e,r))].sort((l,s)=>{const o=Zr(s,r.get(s.i),a)-Zr(l,r.get(l.i),a);return o!==0?o:ct(l,a)-ct(s,a)});return Ut(n,a)}function Tn(e,r){var n,l;if(!e.aiPin)return!1;const a=(n=r==null?void 0:r.aiPin)==null?void 0:n.certification,i=(l=r==null?void 0:r.aiPin)==null?void 0:l.reviewStatus;return a!=="certified"&&i!=="certified"}function Pn(e,r,a){if(!e.aiPin)return!1;const i=Jr(e,a.get(e.i));if(!i)return!1;const n=r.findIndex(l=>l.i===e.i);return r.some((l,s)=>l.i===e.i||s>=n||!l.aiPin?!1:Jr(l,a.get(l.i))===i)}function Jr(e,r){const a=r==null?void 0:r.aiPin,i=a!=null&&a.analysisPlan&&typeof a.analysisPlan=="object"?a.analysisPlan:null,n=Qt(a==null?void 0:a.question)||Qt(e.title),l=Qt(i==null?void 0:i.sourceBlockId),s=Qt(i==null?void 0:i.sourceTileId),o=a!=null&&a.result?$n(a.result):"";return!n&&!l&&!s?"":[n,l,s,o].filter(Boolean).join("|")}function Qt(e){return String(e??"").toLowerCase().replace(/[^a-z0-9]+/g," ").replace(/\s+/g," ").trim()}function $n(e){if(!e||typeof e!="object")return"";const r=e,a=Array.isArray(r.columns)?r.columns.map(n=>String(n).toLowerCase()).join(","):"",i=Array.isArray(r.rows)?r.rows.slice(0,8).map(n=>hr(n)).join(";"):"";return a||i?`${a}:${i}`:""}function hr(e){if(e==null)return"";if(typeof e!="object")return String(e);if(Array.isArray(e))return`[${e.map(hr).join(",")}]`;const r=e;return`{${Object.keys(r).sort().map(a=>`${a}:${hr(r[a])}`).join(",")}}`}function Zr(e,r,a){var n,l,s,o,d;let i=0;return(n=e.parameterBindings)!=null&&n.length&&(i+=5e3),(s=(l=r==null?void 0:r.filters)==null?void 0:l.applied)!=null&&s.length&&(i+=4e3),(r==null?void 0:r.certificationStatus)==="certified"&&(i+=1800),Qe(e)&&(i+=900),(r==null?void 0:r.status)==="ok"&&((d=(o=r.result)==null?void 0:o.rows)!=null&&d.length)&&(i+=500),i-=vr(e)*80,i-=ct(e,a)/1e3,i}function Rn(e,r,a){var l;if((l=e.parameterBindings)!=null&&l.length||e.aiPin||!Qe(e))return!1;const i=a.get(e.i),n=i!=null&&i.result?Dr(i.result):null;return n?r.some(s=>{if(s.i===e.i||!Bn(s,a.get(s.i)))return!1;const o=a.get(s.i),d=o!=null&&o.result?Dr(o.result):null;return!!(d&&En(n,d))}):!1}function Bn(e,r){var a,i,n;return!!((a=e.parameterBindings)!=null&&a.length||(n=(i=r==null?void 0:r.filters)==null?void 0:i.applied)!=null&&n.length)}function Dr(e){var s;const r=e.rows??[];if(!r.length)return null;const a=(s=e.columns)!=null&&s.length?e.columns:Object.keys(r[0]??{});if(!a.length)return null;const i=Tr(a,r),n=Pr(a,r),l=r[0];return{columns:a.map(o=>o.toLowerCase()).sort().join("|"),label:i?Ur(l[i]):"",metric:(n==null?void 0:n.toLowerCase())??"",metricValue:n?Ur(l[n]):""}}function En(e,r){return e.columns===r.columns&&e.label===r.label&&e.metric===r.metric&&e.metricValue===r.metricValue}function Ur(e){return e==null?"":typeof e=="number"?Number.isFinite(e)?String(e):"":String(e).trim().toLowerCase().replace(/\s+/g," ")}function Ln(e,r,a){var be,ie,K,U;const i=e.map((L,V)=>({item:L,tile:r.get(L.i),index:V})).filter(L=>{var V,C;return((V=L.tile)==null?void 0:V.status)==="ok"&&!!L.tile.result&&Array.isArray((C=L.tile.result)==null?void 0:C.rows)&&L.tile.result.rows.length>0}).sort((L,V)=>{const C=ea(L.item,L.tile,L.index);return ea(V.item,V.tile,V.index)-C})[0];if(!(i!=null&&i.tile.result))return null;const n=i.tile.result,l=n.rows,s=n.columns??Object.keys(l[0]??{});if(!s.length)return null;const o=Ue(i.item),d=Tr(s,l,(be=o==null?void 0:o.fieldHints)==null?void 0:be.label),c=Pr(s,l,((ie=o==null?void 0:o.fieldHints)==null?void 0:ie.value)??((K=o==null?void 0:o.fieldHints)==null?void 0:K.y)),h=l[0],f=l[1],x=d?l.map(L=>L[d]):[],y=c?l.map(L=>L[c]):[],T=d?Oe(d,h[d],x):"The leading result",z=f&&d?Oe(d,f[d],x):null,m=c?aa(h[c]):null,I=c&&f?aa(f[c]):null,A=c?_n(c):null,W=On(a),N=W.length?"under the selected app filters":"in the current dashboard view",b=i.item.title??i.tile.title??Qe(i.item)??"Dashboard result",E=n.rowCount??l.length,O=i.tile.certificationStatus==="certified"?"certified":$r(String(((U=i.item.display)==null?void 0:U.trustState)??(o==null?void 0:o.trustState)??"review_required")),F=A?`${Ee(A)} snapshot`:"Dashboard snapshot";let M;if(c&&A&&m!==null){const L=`${T} leads ${A} with ${Oe(c,m,y,{compact:!0})}`;if(z&&I!==null&&Number.isFinite(m-I)){const V=Math.abs(m-I);M=`${L}, ahead of ${z} by ${Oe(c,V,y,{compact:!0})} ${N}.`}else M=`${L} ${N}.`}else M=`${b} returned ${E} ${E===1?"row":"rows"} ${N}.`;return{title:F,summary:M,sourceTitle:b,trust:O,filters:W,chips:[`${E} ${E===1?"row":"rows"}`,s.length?`${s.length} fields`:""].filter(Boolean)}}function ea(e,r,a){var o,d,c,h;const i=Ue(e),n=(i==null?void 0:i.component)??((o=e.display)==null?void 0:o.component),l=r.result;let s=1e3-a;return r.certificationStatus==="certified"&&(s+=500),Qe(e)&&(s+=180),(c=(d=r.filters)==null?void 0:d.applied)!=null&&c.length&&(s+=260),(h=e.parameterBindings)!=null&&h.length&&(s+=220),(n==="RankingPanel"||n==="EvidenceTable"||n==="KpiMetric")&&(s+=120),(e.viz.type==="table"||e.viz.type==="bar"||e.viz.type==="kpi")&&(s+=70),l&&Pr(l.columns,l.rows)&&(s+=80),l&&Tr(l.columns,l.rows)&&(s+=50),s}function Tr(e,r,a){const i=Ta(e,a);return i||(e.find(n=>/\b(player|customer|account|team|segment|category|name|label|title|entity)\b/i.test(n))??e.find(n=>!qt(n,r)&&!/\b(date|time|year|month|id)\b/i.test(n))??e.find(n=>!qt(n,r)))}function Pr(e,r,a){const i=Ta(e,a);return i&&qt(i,r)?i:e.filter(n=>qt(n,r)).sort((n,l)=>ta(n)-ta(l))[0]}function Ta(e,r){const a=r==null?void 0:r.toLowerCase().trim();if(a)return e.find(i=>{const n=i.toLowerCase();return n===a||n.includes(a)||a.includes(n)})}function ta(e){const r=e.toLowerCase();return/(total|revenue|amount|points|score|value|sales|arr|mrr)/.test(r)?1:/(count|orders|games|customers|rows|volume)/.test(r)?2:/(rate|pct|percent|ratio|margin|average|avg)/.test(r)?3:/(rank|position|index)/.test(r)?20:/(date|year|month|day|week|id)/.test(r)?90:30}function _n(e){return Ee(e).toLowerCase()}function On(e){return Object.entries(e).filter(([r,a])=>/^(smartView|persona|dashboardId|appId)$/i.test(r)||r.startsWith("__")||a==null||a===""||Array.isArray(a)&&a.length===0?!1:typeof a!="object"||Array.isArray(a)).slice(0,6).map(([r,a])=>({label:Ee(r),value:Array.isArray(a)?a.map(i=>ra(r,i)).join(", "):ra(r,a)}))}function ra(e,r){const a=typeof r=="number"?r:typeof r=="string"&&r.trim()!==""?Number(r):NaN;return/(season|year)/i.test(e)&&Number.isInteger(a)&&a>=1900&&a<=2200?String(a):Oe(e,r,[r])}function aa(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){const r=Number(e);return Number.isFinite(r)?r:null}return null}function Mn(e){return e==="compact"||e==="standard"||e==="wide"||e==="tall"||e==="full"||e==="auto"?e:"auto"}function $r(e){return e==="certified"||e==="draft_ready"||e==="review_required"?e:"review_required"}function Wn(e){return e==="certified"||e==="draft_ready"||e==="review_required"?e:"review_required"}function Kt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Fn(e,r){const a=new Set(["table",String(e.viz.type??"table"),...(r==null?void 0:r.allowedVisualizations)??[]]);return Array.from(a).map(n=>lt(n)).filter((n,l,s)=>s.indexOf(n)===l).map(n=>Nr.find(l=>l.value===n)??{value:n,label:Ee(n)})}function Vn(e){return e==="TrustCallout"?"linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,251,235,0.72))":e==="RankingPanel"||e==="TrendPanel"||e==="PivotTable"?"linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.86))":e==="BusinessBrief"?"var(--dql-app-surface, rgba(255,255,255,0.90))":"var(--dql-app-surface, var(--surface, rgba(255,255,255,0.84)))"}function Hn(e){return e==="line"||e==="area"?t.jsx(Cr,{size:13,strokeWidth:2.2}):e==="pie"||e==="donut"?t.jsx(Mi,{size:13,strokeWidth:2.2}):e==="table"?t.jsx(Ki,{size:13,strokeWidth:2.2}):t.jsx(Aa,{size:13,strokeWidth:2.2})}function Ee(e){return e.replace(/[_-]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function Pa(e){switch(e.component){case"BusinessBrief":return"Business summary";case"KpiMetric":return"KPI";case"TrendPanel":return"Trend";case"RankingPanel":return"Ranking";case"EvidenceTable":return"Evidence";case"PivotTable":return"Pivot";case"TrustCallout":return"Trust";case"ResearchActions":return"Analysis";case"NarrativePanel":return"Narrative";default:return e.role?Ee(e.role):"Generated"}}function Qn(e,r){const a=new RegExp(`^###\\s*${Gn(r)}\\s*`,"i");return e.replace(a,"").replace(/\*\*Trust:\*\*.*$/gim,"").replace(/\*\*Review status:\*\*.*$/gim,"").replace(/\*\*Next actions:\*\*[\s\S]*$/im,"").replace(/\*\*Review tasks:\*\*[\s\S]*$/im,"").trim().split(/\n{2,}/).map(l=>l.trim()).find(Boolean)||"Generated app section pending analyst review."}function Kn(e,r,a){if(e.length===0)return;const i=a==null?void 0:a.toLowerCase();if(i){const n=e.find(l=>{const s=l.toLowerCase();return s===i||s.includes(i)||i.includes(s)});if(n)return n}return e.find(n=>/\b(name|label|title|dataset|table|block|player|customer|account)\b/i.test(n))??e.find(n=>!qt(n,r))??e[0]}function sr(e){const r=e.toLowerCase();return/(total|count|records|rows|volume)/.test(r)?1:/(rate|percent|pct|score|quality|freshness)/.test(r)?2:/(amount|revenue|arr|value)/.test(r)?3:/(date|time|season)/.test(r)?6:/(^|_)id($|_)/.test(r)?20:100}function qt(e,r){const a=r.slice(0,8).map(i=>i[e]).filter(i=>i!=null&&i!=="");return a.length===0?!1:a.every(i=>typeof i=="number"||typeof i=="string"&&i.trim()!==""&&Number.isFinite(Number(i)))}function $a(e,r){return new Map(e.map(a=>[a,r.slice(0,32).map(i=>i[a])]))}function Oe(e,r,a=[],i={}){if(r==null||r==="")return"N/A";const n=vi(e,r,a,i);return n?typeof r=="string"&&n===r?n.replace(/_/g," "):n:"N/A"}function Gn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge(e){return{border:"1px solid var(--dql-app-line, var(--border-color, rgba(0,0,0,0.12)))",borderRadius:8,background:e?"var(--dql-app-accent-soft, var(--surface-hover, rgba(0,0,0,0.06)))":"var(--dql-app-surface, var(--surface, rgba(0,0,0,0.02)))",color:"inherit",padding:"7px 10px",cursor:"pointer",fontSize:12,fontWeight:720,display:"inline-flex",alignItems:"center",gap:6,minHeight:32}}const Yn={width:34,height:34,border:"1px solid var(--dql-app-accent, #4f46e5)",borderRadius:8,background:"var(--dql-app-accent-soft, rgba(79,70,229,0.12))",color:"var(--dql-app-accent, #4f46e5)",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center"},Xn={display:"flex",alignItems:"center",gap:6,marginBottom:10},Ra={border:"1px solid var(--border-subtle)",borderRadius:7,background:"var(--bg-1)",color:"var(--text-secondary)",padding:"4px 8px",cursor:"pointer",fontSize:10.5,fontWeight:720},Jn={...Ra,display:"inline-flex",alignItems:"center",gap:5,color:"var(--accent)",borderColor:"var(--accent-dim)"},Zn={position:"fixed",inset:0,zIndex:120,display:"grid",placeItems:"center",padding:24,background:"rgba(0, 0, 0, 0.38)"},Dn={width:"min(780px, calc(100vw - 32px))",maxHeight:"min(760px, calc(100vh - 48px))",overflow:"hidden",display:"grid",gap:12,padding:16,border:"1px solid var(--border-default)",borderRadius:12,background:"var(--bg-0)",color:"var(--text-primary)",boxShadow:"0 24px 80px rgba(0,0,0,0.28)"};function Un(e){return{border:e?"1px solid var(--accent)":"1px solid var(--border-subtle)",borderRadius:7,background:e?"var(--accent-dim)":"var(--bg-1)",color:e?"var(--accent)":"var(--text-secondary)",padding:"5px 9px",cursor:"pointer",fontSize:11,fontWeight:750}}const el={margin:0,minHeight:180,padding:14,borderRadius:8,background:"var(--bg-2)",color:"var(--text-primary)",whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontFamily:"var(--font-mono, monospace)",fontSize:12,lineHeight:1.55},tl={marginBottom:12,color:"var(--dql-app-muted, var(--color-text-secondary, rgba(0,0,0,0.64)))",fontSize:12,lineHeight:1.45},Ba={border:"1px solid var(--dql-app-line-2, var(--border-color, rgba(15,23,42,0.10)))",borderRadius:10,background:"linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.88))",boxShadow:"0 8px 24px rgba(15,23,42,0.05)",padding:14,marginBottom:12,display:"grid",gap:9},Ea={display:"flex",alignItems:"flex-start",gap:10,minWidth:0},La={width:30,height:30,borderRadius:8,background:"var(--dql-app-accent-soft, rgba(79,70,229,0.10))",color:"var(--dql-app-accent, #4f46e5)",display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},_a={fontSize:10.5,fontWeight:820,letterSpacing:0,textTransform:"uppercase",color:"var(--dql-app-muted, rgba(15,23,42,0.58))"},Oa={margin:"2px 0 0",fontSize:15,lineHeight:1.25,fontWeight:820,color:"var(--dql-app-text, inherit)"},Ma={margin:0,fontSize:13.5,lineHeight:1.48,color:"var(--dql-app-muted, rgba(15,23,42,0.72))"},Rr={display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},wt={border:"1px solid var(--dql-app-line, var(--border-color, rgba(15,23,42,0.10)))",borderRadius:999,background:"var(--dql-app-surface, rgba(255,255,255,0.78))",color:"var(--dql-app-muted, rgba(15,23,42,0.68))",padding:"3px 8px",fontSize:11,fontWeight:720,lineHeight:1.2,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Wa={...wt,color:"var(--dql-app-accent, #4f46e5)",borderColor:"rgba(79,70,229,0.22)",background:"var(--dql-app-accent-soft, rgba(79,70,229,0.08))"},ia={border:"1px solid var(--dql-app-line-2, var(--border-color, rgba(15,23,42,0.14)))",borderRadius:8,background:"var(--dql-app-surface, var(--surface, #fff))",color:"var(--dql-app-text, var(--text-primary, #0f172a))",padding:"6px 10px",fontSize:11.5,fontWeight:720,cursor:"pointer"};function rl(e){return{position:"fixed",right:24,top:76,bottom:24,zIndex:70,width:e?`min(${gr}px, calc(100vw - 96px))`:`min(${bi}px, calc(100vw - 64px))`,minWidth:0}}const na={width:"100%",boxSizing:"border-box",border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:6,background:"var(--surface, transparent)",color:"inherit",fontSize:12,padding:"8px 10px"},Fa={border:"1px solid var(--accent, #4f46e5)",borderRadius:6,background:"var(--accent, #4f46e5)",color:"var(--color-text-on-accent, #fff)",padding:"7px 11px",cursor:"pointer",fontSize:12,fontWeight:700},al={border:"none",borderRadius:6,background:"transparent",color:"inherit",padding:"9px 10px",cursor:"pointer",textAlign:"left",display:"grid",gap:2},il={border:"1px solid var(--border-color, rgba(0,0,0,0.10))",borderRadius:6,padding:8,background:"var(--color-bg, rgba(255,255,255,0.72))",display:"grid",gap:8,fontStyle:"normal"},nl={display:"grid",gridTemplateColumns:"repeat(4, minmax(0, 1fr))",gap:6},mr={display:"grid",gap:3,fontSize:10,fontWeight:700,opacity:.78},br={width:"100%",minWidth:0,boxSizing:"border-box",border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:5,background:"var(--surface, transparent)",color:"inherit",padding:"5px 6px",fontSize:11},ll={display:"grid",gap:6,border:"1px solid var(--border-color, rgba(0,0,0,0.08))",borderRadius:6,background:"var(--surface, rgba(248,250,252,0.62))",padding:8};function sl(e){return{border:"1px solid var(--accent, rgba(79,70,229,0.55))",background:e?"rgba(79,70,229,0.10)":"rgba(79,70,229,0.08)",color:"var(--accent, #4f46e5)",borderRadius:5,padding:"5px 7px",fontSize:11,fontWeight:750,display:"inline-flex",alignItems:"center",gap:5,cursor:e?"wait":"pointer",opacity:e?.72:1,whiteSpace:"nowrap"}}const Va={fontSize:11,lineHeight:1.35,color:"var(--dql-app-muted, rgba(15,23,42,0.68))"},ol={...Va,color:"var(--error-color, #b91c1c)"},pl={border:"1px solid var(--border-color, rgba(0,0,0,0.10))",borderRadius:4,background:"var(--surface, rgba(0,0,0,0.02))",color:"inherit",padding:"2px 5px",fontSize:10,cursor:"pointer",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},dl={marginTop:7,display:"flex",flexWrap:"wrap",gap:5,alignItems:"center",minWidth:0},_e={display:"inline-flex",alignItems:"center",minHeight:18,borderRadius:999,border:"1px solid var(--border-color, rgba(15,23,42,0.10))",background:"rgba(148,163,184,0.10)",color:"var(--dql-app-muted, rgba(15,23,42,0.70))",padding:"2px 7px",fontSize:10,fontWeight:720,lineHeight:1.1};function cl(e){return{..._e,border:e?"1px solid rgba(22,163,74,0.26)":"1px solid rgba(217,119,6,0.28)",background:e?"rgba(22,163,74,0.10)":"rgba(245,158,11,0.12)",color:e?"#15803d":"#b45309",gap:4}}const ul={display:"inline-flex",alignItems:"center",gap:2,padding:2,border:"1px solid var(--border-color, rgba(15,23,42,0.12))",borderRadius:6,background:"rgba(255,255,255,0.74)",flexShrink:0};function xl(e){return{width:24,height:24,border:"none",borderRadius:4,background:e?"var(--dql-app-accent, var(--accent, #4f46e5))":"transparent",color:e?"var(--color-text-on-accent, #fff)":"inherit",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0}}function fl(e){return{width:"100%",alignSelf:"stretch",overflow:"auto",display:"flex",flexDirection:"column",gap:10,fontStyle:"normal",opacity:1,lineHeight:1.45,borderRadius:6,padding:e?10:0,background:e?"rgba(245,158,11,0.08)":"transparent"}}function gl(e){return{width:30,height:30,borderRadius:7,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,background:e?"rgba(245,158,11,0.14)":"rgba(79,70,229,0.10)",color:e?"#b45309":"var(--dql-app-accent, var(--accent, #4f46e5))"}}const hl={..._e,background:"rgba(79,70,229,0.08)",color:"var(--dql-app-accent, var(--accent, #4f46e5))",border:"1px solid rgba(79,70,229,0.16)"},ml={width:"100%",alignSelf:"stretch",overflow:"auto",display:"flex",flexDirection:"column",gap:9,fontStyle:"normal",opacity:1,lineHeight:1.35},bl={display:"grid",gap:6},vl={display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:7,alignItems:"start",border:"1px solid var(--border-color, rgba(15,23,42,0.09))",borderRadius:7,background:"rgba(255,255,255,0.56)",padding:"7px 8px"},yl={..._e,minHeight:16,borderRadius:5,padding:"1px 5px",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},ql={display:"grid",gap:1,minWidth:82,textAlign:"left",fontSize:10.5},wl={..._e,minHeight:18,background:"rgba(22,163,74,0.09)",border:"1px solid rgba(22,163,74,0.18)",color:"#15803d"},Yt={width:24,height:24,borderRadius:5,border:"1px solid var(--border-color, rgba(0,0,0,0.12))",background:"var(--surface, rgba(255,255,255,0.72))",color:"inherit",cursor:"pointer",padding:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},jl={width:26,height:26,borderRadius:6,border:"1px solid var(--border-color, rgba(0,0,0,0.12))",background:"var(--surface, rgba(255,255,255,0.72))",color:"inherit",cursor:"grab",padding:0,display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0},kl={position:"absolute",top:"calc(100% + 6px)",right:0,zIndex:40,width:240,border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:8,background:"var(--color-bg, #fff)",boxShadow:"0 14px 38px rgba(0,0,0,0.16)",padding:6,display:"grid",gap:4},Sl={border:"none",borderRadius:6,background:"transparent",color:"inherit",padding:"8px 9px",cursor:"pointer",textAlign:"left",display:"grid",gap:2};function zl(e){return{border:`1px solid ${e?"var(--accent, #4f46e5)":"var(--border-color, rgba(0,0,0,0.12))"}`,borderRadius:999,background:e?"var(--color-bg-active, rgba(79,70,229,0.12))":"var(--surface, rgba(0,0,0,0.02))",color:e?"var(--accent, #4f46e5)":"inherit",padding:"4px 8px",fontSize:11,fontWeight:e?750:600,cursor:"pointer"}}const la={border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:4,background:"var(--surface, rgba(0,0,0,0.02))",color:"inherit",padding:"3px 7px",cursor:"pointer",fontSize:11};function Br(e,r){const a=Et(e);return a==="heading"?He("wide",r,"heading"):a==="text"?He("standard",r,"text"):He(a==="single_value"||a==="kpi"||a==="gauge"?"compact":a==="table"||a==="pivot"?"tall":a==="line"||a==="area"?"wide":"standard",r,a)}function Er(e,r){const a=Ue(e),i=Il(a==null?void 0:a.layoutIntent);return i&&i!=="auto"?He(i,r,String(e.viz.type??"table")):Br(Et(String(e.viz.type??"table")),r)}function Al(e,r){return e.viz.type==="heading"?90:(r==null?void 0:r.component)==="BusinessBrief"||(r==null?void 0:r.component)==="NarrativePanel"||e.viz.type==="text"?180:(r==null?void 0:r.component)==="TrustCallout"||(r==null?void 0:r.component)==="ResearchActions"?210:(r==null?void 0:r.component)==="EvidenceTable"||(r==null?void 0:r.component)==="PivotTable"?330:(r==null?void 0:r.component)==="KpiMetric"?150:Math.max(280,Math.min(420,e.h*76))}function He(e,r,a="table"){const i=Math.max(1,r),n=Math.max(1,Math.ceil(i/2)),l=Math.max(1,Math.ceil(i/3));return e==="auto"?Br(a,i):e==="compact"?{w:l,h:2}:e==="wide"?{w:i,h:a==="heading"?1:4}:e==="tall"?{w:n,h:6}:e==="full"?{w:i,h:7}:{w:n,h:a==="text"?2:4}}function Ha(e,r,a){const i=String(e.viz.type??"table"),n=a==="auto"?Er(e,r):He(a,r,i);return{w:n.w,h:n.h,x:er(e.x,0,Math.max(0,r-n.w))}}function Cl(e,r,a){const i=a==="auto"?Er(e,r):He(a,r,String(e.viz.type??"table"));return e.w===i.w&&e.h===i.h}function Il(e){return e==="auto"||e==="compact"||e==="standard"||e==="wide"||e==="tall"||e==="full"?e:null}function or(e,r={w:6,h:3}){return{x:0,y:e.layout.items.reduce((i,n)=>Math.max(i,n.y+n.h),0),w:r.w,h:r.h}}function pr(e,r){const a=r.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"tile",i=new Set(e.layout.items.map(n=>n.i));if(!i.has(a))return a;for(let n=2;n<1e3;n++){const l=`${a}-${n}`;if(!i.has(l))return l}return`${a}-${Date.now()}`}function Ut(e,r){const a=Math.max(1,r),i=[],n=(s,o,d,c)=>{for(let h=0;h<c;h++){const f=i[o+h];if(f){for(let x=0;x<d;x++)if(f[s+x])return!1}}return!0},l=(s,o,d,c)=>{for(let h=0;h<c;h++){const f=o+h;i[f]||(i[f]=new Array(a).fill(!1));for(let x=0;x<d;x++)i[f][s+x]=!0}};return e.map(s=>{const o=er(Math.round(s.w||1),1,a),d=Math.max(1,Math.round(s.h||1));let c=0,h=0;e:for(let f=0;;f++)for(let x=0;x+o<=a;x++)if(n(x,f,o,d)){c=x,h=f;break e}return l(c,h,o,d),{...s,x:c,y:h,w:o,h:d}})}function Nl(e,r){const a=[...e].map((i,n)=>({item:i,index:n})).sort((i,n)=>{const l=vr(i.item)-vr(n.item);return l!==0?l:i.index-n.index}).map(({item:i})=>{const n=Er(i,r);return{...i,w:n.w,h:n.h}});return Ut(a,r)}function Tl(e,r,a){const i=e.filter(s=>s.i!==r.i).sort((s,o)=>ct(s,a)-ct(o,a)),n=ct(r,a),l=i.findIndex(s=>ct(s,a)>n);return l===-1?[...i,r]:[...i.slice(0,l),r,...i.slice(l)]}function ct(e,r){return e.y*r+e.x}function vr(e){const r=Ue(e);if((r==null?void 0:r.role)==="business_summary")return 0;if((r==null?void 0:r.role)==="kpi")return 1;if((r==null?void 0:r.component)==="RankingPanel"||(r==null?void 0:r.component)==="TrendPanel")return 2;if((r==null?void 0:r.component)==="EvidenceTable"||(r==null?void 0:r.component)==="PivotTable")return 3;if((r==null?void 0:r.component)==="TrustCallout"||(r==null?void 0:r.component)==="ResearchActions")return 4;if((r==null?void 0:r.role)==="narrative")return 5;const a=Et(String(e.viz.type??"table"));return a==="heading"?0:a==="single_value"||a==="kpi"||a==="gauge"?1:a==="line"||a==="area"||a==="bar"||a==="pie"||a==="funnel"||a==="map"?2:a==="table"||a==="pivot"?3:a==="text"?4:2}function Et(e){const r=(e??"table").toLowerCase().replace(/-/g,"_");return r==="single_value"||r==="kpi"||r==="gauge"||r==="line"||r==="bar"||r==="area"||r==="pie"||r==="donut"||r==="grouped_bar"||r==="stacked_bar"||r==="scatter"||r==="heatmap"||r==="histogram"||r==="waterfall"||r==="pivot"||r==="map"||r==="funnel"||r==="sankey"||r==="heading"||r==="text"?r:"table"}function er(e,r,a){return Math.min(a,Math.max(r,e))}function Pl({app:e}){var o,d;const{state:r,dispatch:a}=ga(),[i,n]=p.useState(!1),l=p.useRef(null);p.useEffect(()=>{if(!i)return;const c=h=>{var f;(f=l.current)!=null&&f.contains(h.target)||n(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]);const s=r.activePersona?`${r.activePersona.displayName??r.activePersona.userId} [${r.activePersona.roles.join(", ")}]`:"View as: Owner";return!e||e.members.length===0?t.jsx("span",{style:{fontSize:12,opacity:.6},children:s}):t.jsxs("div",{ref:l,style:{position:"relative"},children:[t.jsxs("button",{onClick:()=>n(c=>!c),style:{padding:"6px 12px",fontSize:12,background:"var(--surface, rgba(0,0,0,0.04))",border:"1px solid var(--border-color, rgba(0,0,0,0.1))",borderRadius:6,cursor:"pointer",color:"inherit",display:"inline-flex",alignItems:"center",gap:6},"aria-haspopup":"menu","aria-expanded":i,children:[t.jsx("span",{style:{fontSize:11,opacity:.65},children:"View as:"}),t.jsx("span",{style:{fontWeight:600},children:((o=r.activePersona)==null?void 0:o.displayName)??((d=r.activePersona)==null?void 0:d.userId)??"Owner"}),r.activePersona&&t.jsxs("span",{style:{fontSize:11,opacity:.7},children:["[",r.activePersona.roles.join(", "),"]"]}),t.jsx("span",{style:{fontSize:10,opacity:.6},children:"▾"})]}),i&&t.jsxs("div",{role:"menu",style:{position:"absolute",top:"100%",right:0,marginTop:4,minWidth:240,background:"var(--surface-elevated, #fff)",border:"1px solid var(--border-color, rgba(0,0,0,0.12))",borderRadius:6,boxShadow:"0 4px 12px rgba(0,0,0,0.08)",zIndex:50},children:[t.jsxs("button",{role:"menuitem",onClick:async()=>{await D.clearPersona(),a({type:"SET_ACTIVE_PERSONA",persona:null}),n(!1)},style:sa(r.activePersona===null),children:[t.jsx("div",{style:{fontWeight:500},children:"Owner (local)"}),t.jsx("div",{style:{fontSize:11,opacity:.65},children:"Default — no RLS narrowing"})]}),t.jsx("div",{style:{height:1,background:"var(--border-color, rgba(0,0,0,0.08))",margin:"4px 0"}}),e.members.map(c=>{var h;return t.jsxs("button",{role:"menuitem",onClick:async()=>{const f=await D.setPersona(c.userId,e.id);a({type:"SET_ACTIVE_PERSONA",persona:f}),n(!1)},style:sa(((h=r.activePersona)==null?void 0:h.userId)===c.userId),children:[t.jsx("div",{style:{fontWeight:500},children:c.displayName??c.userId}),t.jsxs("div",{style:{fontSize:11,opacity:.65},children:["[",c.roles.join(", "),"]",c.attributes&&Object.keys(c.attributes).length>0?` · ${Object.entries(c.attributes).map(([f,x])=>`${f}=${x}`).join(", ")}`:""]})]},c.userId)})]})]})}function sa(e){return{display:"block",width:"100%",textAlign:"left",padding:"8px 12px",background:e?"var(--surface-hover, rgba(0,0,0,0.06))":"transparent",border:"none",cursor:"pointer",color:"inherit",fontSize:13}}function oa(e){if(!e)return[];const r=new Map;for(const i of e.filters??[])$l(i)&&r.set(i.id,{...i});const a=i=>{var n,l;return((n=i.block)==null?void 0:n.blockId)??((l=i.block)==null?void 0:l.ref)};for(const i of e.layout.items??[]){const n=a(i);for(const l of i.filterBindings??[]){const s=l.mode??(l.binding?"predicate":void 0);if(!n||s!=="predicate"||!l.binding||l.unsupportedReason)continue;const o=r.get(l.filter);o&&(o.bindsTo||(o.bindsTo=l.binding),o.sourceBlockId||(o.sourceBlockId=n))}for(const l of i.parameterBindings??[]){const s=l.filter||l.field||l.param;s&&(r.has(s)||Bl(r,l)||r.set(s,Rl(l)))}}return Array.from(r.values())}function $l(e){var r;return!(e.type==="select"&&!((r=e.options)!=null&&r.length)&&e.default===void 0)}function Rl(e){const r=e.filter||e.field||e.param;return{id:r,type:El(r,e.parameterType),default:e.default??Qa(r),bindsTo:e.param}}function Bl(e,r){return Array.from(e.values()).some(a=>r.filter&&a.id===r.filter||r.field&&a.bindsTo===r.field?!0:!!(r.param&&a.bindsTo===r.param))}function El(e,r){return r==="number"||r==="number[]"?"number":r==="boolean"?"boolean":r==="date"||r==="date[]"?"date":/(_at$|_date$|_time$|_ts$|date|time|day|week|month|quarter|period)/i.test(e)?"daterange":/(top[_-]?n|limit|count|number|year|season)/i.test(e)?"number":"string"}function Qa(e){const r=e.toLowerCase();return/(top[_-]?n|limit)/.test(r)?5:/(season|year).*start|start.*(season|year)/.test(r)?2016:/(season|year).*end|end.*(season|year)/.test(r)?2017:""}function Ll(e,r){const a=e.filter(i=>r==null?void 0:r.tiles.some(n=>{var l;return n.tileId===i&&((l=n.repair)==null?void 0:l.approvalEligible)===!1}));return{ready:e.length>0&&e.every(i=>r==null?void 0:r.tiles.some(n=>{var l;return n.tileId===i&&n.status==="ok"&&((l=n.repair)==null?void 0:l.approvalEligible)!==!1})),repairedTileIds:a}}const _l=p.lazy(()=>kr(()=>import("./UnifiedAgentRunPanel-duFXXNV_.js").then(e=>e.c),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])).then(e=>({default:e.UnifiedAgentRunPanel}))),Ol=p.lazy(()=>kr(()=>import("./AgentAnswerCard-c8QUo6NH.js").then(e=>e.A),__vite__mapDeps([4,1,2,3,5,6,7,8,9,10,11])).then(e=>({default:e.StructuredAnswerText}))),dr=new Map,yr="Build an analytics app from my certified DQL blocks and available warehouse tables.",qr="dql.apps.active-ai-build.v1";function pa(){try{const e=window.localStorage.getItem(qr);if(!e)return null;const r=JSON.parse(e);return typeof r.sessionId=="string"&&typeof r.prompt=="string"&&typeof r.createdAt=="string"?r:null}catch{return null}}function at(e){try{e?window.localStorage.setItem(qr,JSON.stringify(e)):window.localStorage.removeItem(qr)}catch{}}function Ml(){var r;const e=typeof((r=window.crypto)==null?void 0:r.randomUUID)=="function"?window.crypto.randomUUID().replace(/-/g,"").slice(0,12):Math.random().toString(36).slice(2,14);return`app_build_${Date.now()}_${e}`}const Ka=[{title:"Revenue story",domain:"Revenue",prompt:"Build a weekly revenue health app for the COO with risk flags."},{title:"Customer 360",domain:"Customer",prompt:"Customer 360: value, engagement, retention, orders, and service risk by segment."},{title:"Quality monitor",domain:"Platform",prompt:"Build a data quality monitor with freshness, failing tests, null rates, and model risk notes."},{title:"Experiment Readout",domain:"Product",prompt:"Create an experiment readout for product leadership with outcome, guardrails, and decision checklist."}],Wl=[{id:"match",title:"Find blocks",description:"Search certified blocks, terms, views, and lineage."},{id:"story",title:"Shape story",description:"Order the app around the business decision."},{id:"draft",title:"Draft gaps",description:"Keep missing sections visible as draft work instead of hiding them."}],Fl={all:"All",mine:"Mine",shared:"Shared",fav:"Favourites"};function Vl(e){return e==="obsidian"||e==="dark"||e==="midnight"?"obsidian":e==="white"||e==="arctic"?"white":"paper"}function go(){var _r,Or;const e=ci(ui(u=>({activeAppExperience:u.activeAppExperience,activeAppId:u.activeAppId,activeAppSection:u.activeAppSection,activeDashboardId:u.activeDashboardId,apps:u.apps,appsLoading:u.appsLoading,authoredDomains:u.authoredDomains,themeMode:u.themeMode}))),r=ma(),a=xi(),{operations:i,track:n}=fi(),l=p.useMemo(()=>Vl(e.themeMode),[e.themeMode]),[s,o]=p.useState(()=>e.activeAppId?"workspace":"library"),d=e.activeAppExperience,c=e.activeAppSection,h=u=>{r({type:"SET_APP_WORKSPACE_STATE",experience:u})},f=u=>{r({type:"SET_APP_WORKSPACE_STATE",section:u})},[x,y]=p.useState(""),[T,z]=p.useState("all"),[m,I]=p.useState(()=>new Set),[A,W]=p.useState(null),[N,b]=p.useState(null),[E,O]=p.useState(!1),[F,M]=p.useState("ai"),[be,ie]=p.useState("shared_project"),[K,U]=p.useState(!1),[L,V]=p.useState(yr),[C,he]=p.useState("Business Analytics"),[qe,H]=p.useState(""),ne=p.useMemo(()=>gi(e.authoredDomains),[e.authoredDomains]),[we,Ne]=p.useState("analytics"),[me,te]=p.useState("stakeholders"),[re,Q]=p.useState(null),[ce,Te]=p.useState([]),[je,Z]=p.useState(!1),[j,P]=p.useState(()=>new Set),[R,G]=p.useState(null),[ee,fe]=p.useState(null),ge=p.useRef(pa()),[ve,J]=p.useState(((_r=ge.current)==null?void 0:_r.sessionId)??null),[le,se]=p.useState(((Or=ge.current)==null?void 0:Or.operationId)??null),w=p.useRef(null),[de,Ae]=p.useState(new Set),[Pe,oe]=p.useState({}),[ze,pe]=p.useState(!1),[B,Y]=p.useState(null),[ke,g]=p.useState(!1),[ue,ye]=p.useState(!1),[$e,tt]=p.useState(""),[pt,Me]=p.useState(!1),[Fe,gt]=p.useState(null),[Ye,ht]=p.useState(null),[mt,Lt]=p.useState(!1),[_t,bt]=p.useState(null),[jt,kt]=p.useState({}),[Ot,St]=p.useState({}),[ar,zt]=p.useState(!1),[Mt,At]=p.useState(!1),Wt=p.useCallback(u=>{zt(u),u||At(!1)},[]),[dt,vt]=p.useState(0),Ft=p.useRef(0),rt=Mr({queryKey:["apps"],queryFn:()=>D.listAppsStrict(),staleTime:3e4}),v=Mr({queryKey:["persona"],queryFn:()=>D.getPersona(),staleTime:6e4});p.useEffect(()=>{r({type:"SET_APPS_LOADING",loading:rt.isLoading}),rt.data&&r({type:"SET_APPS",apps:rt.data})},[rt.data,rt.isLoading,r]),p.useEffect(()=>{v.data&&r({type:"SET_ACTIVE_PERSONA",persona:v.data})},[r,v.data]);const k=p.useCallback(u=>{var X,Le;if(fe(u),o("create"),M("ai"),V(u.prompt||yr),Q(u.inputs.existingAppId??null),H(lr(u.inputs.domain,e.authoredDomains)),Ne(u.inputs.owner??"analytics"),te(u.inputs.audience??"stakeholders"),ie(u.inputs.mode==="personal"?"personal":"shared_project"),U(u.inputs.mode==="personal"&&u.inputs.exploreGaps===!0),u.status==="building"){g(!0);return}if(g(!1),u.status==="error"){Y(u.error??"The App proposal did not complete.");return}Y(null),Ae(u.proposal?zi(u.proposal):new Set),oe(Object.fromEntries((((X=u.proposal)==null?void 0:X.tiles)??[]).map(yt=>[yt.id,{title:yt.title,viz:yt.viz}])));const S=u.plan,$=u.inputs.existingAppId?(Le=S==null?void 0:S.pages[0])==null?void 0:Le.title:S==null?void 0:S.name;$&&he($),S!=null&&S.audience&&te(S.audience)},[e.authoredDomains]),q=p.useMemo(()=>ve?i.find(u=>u.id===le)??i.find(u=>u.type==="app_ai_build"&&u.scope===`app-build:${ve}`)??null:null,[le,ve,i]);p.useEffect(()=>{const u=ge.current;u&&(ge.current=null,V(u.prompt),Q(u.existingAppId??null),M("ai"),g(!0),o("create"))},[]),p.useEffect(()=>{if(!ve)return;if(q!=null&&q.id&&q.id!==le){se(q.id);const X=pa();(X==null?void 0:X.sessionId)===ve&&at({...X,operationId:q.id})}q&&(q.status==="queued"||q.status==="running")&&(g(!0),o("create"));let u=!1,S;const $=async()=>{var Le;const X=await D.getAppAiBuild(ve);if(!u){if(!X||X.status==="building"){if(X&&k(X),q&&["failed","cancelled","interrupted"].includes(q.status)){g(!1),Y(((Le=q.error)==null?void 0:Le.message)??(q.status==="cancelled"?"The App proposal was cancelled.":"The App proposal did not complete."));return}S=window.setTimeout(()=>{$()},900);return}w.current===X.id&&(ee==null?void 0:ee.status)===X.status||(w.current=X.id,k(X))}};return $(),()=>{u=!0,S!==void 0&&window.clearTimeout(S)}},[q,k,le,ee==null?void 0:ee.status,ve]),p.useEffect(()=>{if(s!=="create")return;const u=new AbortController,S=window.setTimeout(()=>{Z(!0),D.recommendAppBlocks({domain:qe||void 0,purpose:L,audience:"stakeholder",certifiedOnly:!0},u.signal).then($=>{u.signal.aborted||Te($)}).catch(()=>{}).finally(()=>{u.signal.aborted||Z(!1)})},300);return()=>{window.clearTimeout(S),u.abort()}},[s,F,qe,L]),p.useEffect(()=>{if(!e.activeAppId||s!=="workspace"){W(null),b(null);return}let u=!1;O(!0);const S=D.getApp(e.activeAppId).then(X=>{u||W(X)}),$=e.activeDashboardId?D.getDashboard(e.activeAppId,e.activeDashboardId).then(X=>{u||b(X)}):Promise.resolve().then(()=>{u||b(null)});return Promise.allSettled([S,$]).finally(()=>{u||O(!1)}),()=>{u=!0}},[e.activeAppId,e.activeDashboardId,s]);const _=p.useMemo(()=>JSON.stringify(oa((N==null?void 0:N.dashboard)??null)),[N==null?void 0:N.dashboard]),xe=p.useMemo(()=>oa((N==null?void 0:N.dashboard)??null),[N==null?void 0:N.dashboard,_]);p.useEffect(()=>{const u=xe;kt(S=>{const $={};for(const X of u)$[X.id]=S[X.id]??Pt(X);return ca(S,$)?S:$}),St(S=>{const $={};for(const X of u)$[X.id]=S[X.id]??Pt(X);return ca(S,$)?S:$})},[N==null?void 0:N.dashboard.id,_,xe]);const Ce=async(u,S,$,X)=>{r({type:"SET_APPS_LOADING",loading:!0});const Le=await D.listApps();r({type:"SET_APPS",apps:Le}),r({type:"SET_APPS_LOADING",loading:!1}),u&&r({type:"OPEN_APP",appId:u,dashboardId:S,...X}),o($)},Ke=p.useMemo(()=>{const u=x.trim().toLowerCase();return e.apps.filter(S=>T==="mine"&&(S.storage??"shared")!=="mine"||T==="shared"&&(S.storage??"shared")!=="shared"||T==="fav"&&!m.has(S.id)?!1:u?[S.name,S.description??"",S.domain,S.audience??"",S.lifecycle??"",...S.tags??[],...S.owners??[],...S.dashboards.map(X=>X.title)].join(" ").toLowerCase().includes(u):!0)},[m,T,x,e.apps]),Re=p.useMemo(()=>e.apps.find(u=>u.id===e.activeAppId)??null,[e.apps,e.activeAppId]),Ve=p.useCallback(u=>{W(S=>S&&{...S,investigations:u})},[]),ae=(u,S="view")=>{r({type:"OPEN_APP",appId:u.id,experience:S,section:"dashboards"}),o("workspace")},Xe=(u=L,S,$=be,X=!1)=>{at(null),J(null),se(null),Q(null),M("ai"),ie($),U($==="personal"&&X),V(u),H(lr(S,e.authoredDomains)),P(new Set),Y(null),G(null),fe(null),oe({}),o("create"),vt(Le=>Le+1)},ir=()=>{at(null),J(null),se(null),Q(null),M("classic"),Y(null),G(null),fe(null),oe({}),o("create")},nr=u=>{P(S=>{const $=new Set(S);return $.has(u)?$.delete(u):$.add(u),$})},Ct=async u=>{const S=Array.isArray(u)?u.filter(Je=>typeof Je=="string"):[],$=L.trim();if(!$){Y("Describe the app you want to build.");return}g(!0),Y(null);const X=Array.from(F==="classic"?j:new Set([...Array.from(j),...S])),Le=Ml(),yt={sessionId:Le,prompt:$,...re?{existingAppId:re}:{},createdAt:new Date().toISOString()};at(yt),J(Le),se(null),w.current=null,fe(null),G(null);try{const Je=await D.proposeAppAiBuildInBackground({sessionId:Le,prompt:$,existingAppId:re??void 0,domain:qe.trim()||void 0,owner:we.trim()||void 0,force:!1,selectedBlockIds:X,plannerMode:"ai_assisted",mode:be==="personal"?"personal":"stakeholder",exploreGaps:be==="personal"&&K});n(Je.operation),se(Je.operation.id),at({...yt,operationId:Je.operation.id})}catch(Je){g(!1),Y(Je instanceof Error?Je.message:String(Je)),at(null),J(null),se(null)}};p.useEffect(()=>{s!=="create"||F!=="ai"||dt===0||Ft.current===dt||(Ft.current=dt,Ct())},[s,F,dt]);const Za=u=>{P(S=>{const $=new Set(S);return $.add(u),$}),Ct([u])},Da=u=>{Ae(S=>{const $=new Set(S);return $.has(u)?$.delete(u):$.add(u),$})},Ua=async()=>{var X;if(!ee||ee.status!=="proposed")return;pe(!0),Y(null);const u=await D.commitAppAiBuild(ee.id,{selectedTileIds:Array.from(de),expectedProposalHash:ee.proposalHash,...re?{pageTitle:C.trim()||void 0}:{appName:C.trim()||void 0},audience:me.trim()||void 0,tileOverrides:Pe});if(pe(!1),!u.ok){Y(u.error);return}const S=u.session;fe(S),at(null),J(null),se(null);const $={ok:!0,plan:S.plan,validation:S.validation,generated:{paths:S.generatedPaths},app:u.app,dashboardId:u.dashboardId};G($),zt(!0),await Ce(((X=u.app)==null?void 0:X.id)??$.plan.appId,u.dashboardId,"workspace",{experience:"view",section:"dashboards"})},ei=async()=>{if(!C.trim()){Y("Name the app before creating it.");return}if(!qe.trim()){Y("Choose a domain before creating the app.");return}g(!0),Y(null);try{const u=await D.createApp({name:C.trim(),domain:qe.trim(),dashboardTitle:"Overview",purpose:L.trim(),audience:"stakeholder",visibility:"shared",lifecycle:"draft",tags:["app-builder",qe.trim().toLowerCase()],owners:[we.trim()||"owner@local"],selectedBlockIds:Array.from(j)});await Ce(u.app.id,u.dashboardId,"workspace",{experience:"build",section:"dashboards"})}catch(u){Y(u instanceof Error?u.message:String(u))}finally{g(!1)}},ti=()=>{var S;const u=((S=R==null?void 0:R.app)==null?void 0:S.id)??(R==null?void 0:R.plan.appId);u&&(r({type:"OPEN_APP",appId:u,dashboardId:(R==null?void 0:R.dashboardId)??void 0,experience:"build",section:"dashboards"}),o("workspace"))},ri=()=>{if(!e.activeAppId||!A)return;const u=$e.trim();if(!u){gt("Describe the business question this page should answer.");return}gt(null),at(null),J(null),se(null),Q(e.activeAppId),M("ai"),V(u),he("New App page"),H(lr(A.app.domain,e.authoredDomains)),Ne(A.app.owners[0]??"analytics"),te(A.app.audience??"stakeholders");const S=A.app.publicationIntent??(A.app.visibility==="private"?"personal":"shared_project");ie(S),U(S==="personal"&&pt),P(new Set),Y(null),G(null),fe(null),oe({}),ye(!1),tt(""),Me(!1),o("create"),vt($=>$+1)},ai=p.useMemo(()=>({...Ot}),[Ot]),ii=p.useCallback((u,S)=>{kt($=>({...$,[u.id]:cs(u,S)}))},[]),ni=p.useCallback(()=>{St({...jt})},[jt]),li=p.useCallback(()=>{const u=Object.fromEntries(xe.map(S=>[S.id,Pt(S)]));kt(u),St(u)},[xe]),si=async()=>{if(!(!Ye||mt)){Lt(!0),bt(null);try{await D.deleteApp(Ye.id),I(u=>{const S=new Set(u);return S.delete(Ye.id),S}),r({type:"SET_APPS",apps:e.apps.filter(u=>u.id!==Ye.id)}),e.activeAppId===Ye.id&&r({type:"CLOSE_APP"}),ht(null),o("library"),await a.invalidateQueries({queryKey:["apps"]})}catch(u){bt(u instanceof Error?u.message:String(u))}finally{Lt(!1)}}};return t.jsxs("div",{className:`dql-apps-waterline dql-apps-theme-${l}`,children:[t.jsx("style",{children:Xs}),s==="library"?t.jsx(Hl,{apps:Ke,allApps:e.apps,loading:e.appsLoading,search:x,filter:T,favorites:m,onSearch:y,onFilter:z,onToggleFavorite:u=>{I(S=>{const $=new Set(S);return $.has(u)?$.delete(u):$.add(u),$})},onStartAi:(u,S,$)=>Xe(u,void 0,S,$),onStartClassic:ir,onOpenApp:ae,onDeleteApp:u=>{bt(null),ht(u)}}):s==="create"?t.jsx(Gl,{mode:F,existingAppId:re,appName:C,prompt:L,domain:qe,domainOptions:ne,owner:we,audience:me,promptExamples:Ka,catalog:ce,catalogLoading:je,selectedBlocks:j,generated:R,buildSession:ee,proposalSelection:de,proposalEdits:Pe,committing:ze,themeMode:e.themeMode,onToggleProposalTile:Da,onProposalEdit:(u,S)=>oe($=>({...$,[u]:{...$[u],...S}})),onCommitProposal:()=>void Ua(),onAddBlock:Za,saving:ke,error:B,onBack:()=>o(re?"workspace":"library"),onModeChange:u=>{M(u),u==="ai"&&P(new Set)},onAppNameChange:he,onPromptChange:V,onDomainChange:H,onOwnerChange:Ne,onAudienceChange:te,onToggleBlock:nr,onBuild:()=>F==="ai"?void Ct():void ei(),onOpenGenerated:ti}):t.jsx(Xl,{app:Re,appDoc:A,dashboardDoc:N,loading:E,experience:d,section:c,explainOpen:ar,explainExpanded:Mt,dashboardFilters:xe,dashboardFilterValues:jt,themeMode:e.themeMode,variables:ai,onBack:()=>o("library"),onExperienceChange:h,onSectionChange:f,onDashboardFilterChange:ii,onApplyDashboardFilters:ni,onResetDashboardFilters:li,onExplainChange:Wt,onExplainExpandedChange:At,onAddPage:()=>{Me(!1),ye(!0)},onOpenDashboard:u=>r({type:"OPEN_DASHBOARD",dashboardId:u}),onOpenApp:(u,S)=>{Ce(u,S,"workspace",{experience:"view",section:"dashboards"})},onDashboardChanged:u=>{b(S=>S&&{...S,dashboard:u}),Ce(e.activeAppId,u.id,"workspace")},onInvestigationsChanged:Ve,onOpenLineageNode:u=>{r({type:"OPEN_LINEAGE_DETAIL",nodeId:u,returnTo:e.activeAppId?{view:"apps",appId:e.activeAppId,dashboardId:e.activeDashboardId,label:Re==null?void 0:Re.name,experience:d,section:c}:null})}}),ue&&t.jsx(Hs,{title:$e,allowExploration:(A==null?void 0:A.app.publicationIntent)==="personal"||!(A!=null&&A.app.publicationIntent)&&(A==null?void 0:A.app.visibility)==="private",exploreGaps:pt,error:Fe,onChange:tt,onExploreGapsChange:Me,onCancel:()=>{ye(!1),Me(!1),gt(null)},onCreate:ri}),Ye&&t.jsx(Kl,{app:Ye,deleting:mt,error:_t,onCancel:()=>{mt||(ht(null),bt(null))},onConfirm:()=>void si()})]})}function Hl({apps:e,allApps:r,loading:a,search:i,filter:n,favorites:l,onSearch:s,onFilter:o,onToggleFavorite:d,onStartAi:c,onStartClassic:h,onOpenApp:f,onDeleteApp:x}){const y=Ks(r,l),[T,z]=p.useState(yr),[m,I]=p.useState("shared_project"),[A,W]=p.useState(!1),N=()=>{const b=T.trim();b&&c(b,m,m==="personal"&&A)};return t.jsxs("main",{className:"dql-apps-wrap",children:[t.jsxs("section",{className:"dql-apps-createhead",children:[t.jsx("h1",{children:"Build an app"}),t.jsx("p",{children:"Choose the destination, describe the business goal, and review the Build Brief before DQL writes an App draft."})]}),t.jsxs("section",{className:"dql-apps-composer","aria-label":"Build an app with AI",children:[t.jsxs("div",{className:"dql-apps-targets","aria-label":"App draft target",children:[t.jsxs("button",{type:"button",className:m==="shared_project"?"on":"",onClick:()=>{I("shared_project"),W(!1)},children:[t.jsx(Ji,{size:12})," Shared Project",t.jsx("small",{children:"Draft privately, then publish when governed"})]}),t.jsxs("button",{type:"button",className:m==="personal"?"on":"",onClick:()=>I("personal"),children:[t.jsx(Yi,{size:12})," Personal Draft",t.jsx("small",{children:"Explore privately with review-required analysis"})]})]}),t.jsx("textarea",{value:T,onChange:b=>z(b.target.value),rows:2,"aria-label":"App build request",placeholder:"Build an EMEA revenue app for the CFO…",onKeyDown:b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),N())}}),t.jsxs("div",{className:"dql-apps-composer-row",children:[t.jsxs("span",{className:"dql-apps-composer-chip",children:[t.jsx(ot,{size:11})," Certified + semantic sources"]}),m==="personal"?t.jsxs("label",{className:"dql-apps-explore-toggle",children:[t.jsx("input",{type:"checkbox",checked:A,onChange:b=>W(b.target.checked)}),"Explore uncovered gaps"]}):null,t.jsx("i",{}),t.jsxs("button",{type:"button",className:"dql-apps-composer-blank",onClick:h,children:[t.jsx(ft,{size:12})," Create blank"]}),t.jsx("button",{type:"button",className:"dql-apps-composer-send",onClick:N,disabled:!T.trim(),title:"Build",children:t.jsx(hi,{size:15,strokeWidth:2})})]})]}),t.jsxs("div",{className:"dql-apps-try",children:[t.jsx("span",{children:"Try:"}),Ka.slice(0,3).map(b=>t.jsx("button",{type:"button",onClick:()=>z(b.prompt),children:b.title},b.title))]}),t.jsxs("div",{className:"dql-apps-sectionhead",children:[t.jsx("span",{children:"App library"}),t.jsx("i",{}),t.jsxs("b",{children:[r.length," app",r.length===1?"":"s"]})]}),t.jsxs("div",{className:"dql-apps-libbar",children:[t.jsx("div",{className:"dql-apps-filter-tabs",children:["all","mine","shared","fav"].map(b=>t.jsxs("button",{className:n===b?"on":"",onClick:()=>o(b),children:[Fl[b]," ",t.jsx("span",{children:y[b]})]},b))}),t.jsxs("label",{className:"dql-apps-search",children:[t.jsx(De,{size:15,strokeWidth:2,"aria-hidden":"true"}),t.jsx("input",{value:i,onChange:b=>s(b.target.value),placeholder:"Search apps, domains, owners..."})]})]}),a&&r.length===0?t.jsx(Ie,{title:"Loading Apps...",detail:"Reading local app files from this DQL project."}):e.length===0?t.jsx(Ie,{title:"No Apps match this view.",detail:"Change the filter or start a new App above."}):t.jsx("div",{className:"dql-apps-grid",children:e.map(b=>t.jsx(Ql,{app:b,favorite:l.has(b.id),onToggleFavorite:()=>d(b.id),onOpen:()=>f(b,"view"),onEdit:()=>f(b,"build"),onDelete:()=>x(b)},b.id))})]})}function Ql({app:e,favorite:r,onToggleFavorite:a,onOpen:i,onEdit:n,onDelete:l}){var f,x;const s=e.certification==="certified"||e.lifecycle==="certified",o=((f=e.drafts)==null?void 0:f.length)??0,d=e.investigations??0,c=e.aiPins??0,h=s?"Certified app":o>0||d>0||c>0?"Review needed":"Draft app";return t.jsxs("article",{className:"dql-app-card",children:[t.jsxs("div",{className:"dql-app-card-body",onClick:i,role:"button",tabIndex:0,children:[t.jsxs("div",{className:"dql-app-card-top",children:[t.jsx("span",{className:"dql-app-eyebrow",children:e.domain||"Domain"}),t.jsx("button",{type:"button",className:`dql-app-star ${r?"on":""}`,onClick:y=>{y.stopPropagation(),a()},"aria-label":r?"Remove favourite":"Add favourite",children:t.jsx(Ri,{size:14,strokeWidth:1.8})})]}),t.jsx(st,{tone:s?"certified":o>0?"draft":"agentic",children:s?"certified":o>0?"mixed":e.lifecycle??"draft"}),t.jsx("h3",{children:e.name}),t.jsx("p",{children:Ya(e.description||`${e.name} consumption surface for ${e.domain}.`)}),t.jsxs("div",{className:"dql-app-card-mini",children:[t.jsx(fr,{label:"Pages",value:String(e.dashboards.length)}),t.jsx(fr,{label:"Books",value:String(((x=e.notebooks)==null?void 0:x.length)??0)}),t.jsx(fr,{label:"Drafts",value:String(o)})]}),t.jsxs("div",{className:"dql-app-card-signals",children:[t.jsxs("span",{children:[t.jsx(ot,{size:13})," ",h]}),t.jsxs("span",{children:[t.jsx(De,{size:13})," ",d," analysis"]}),t.jsxs("span",{children:[t.jsx(Ze,{size:13})," ",c," local insights"]})]})]}),t.jsxs("div",{className:"dql-app-card-depth",children:[t.jsx("span",{children:Gs(e)}),t.jsxs("button",{type:"button",className:"dql-app-card-act",onClick:i,title:"View app",children:[t.jsx(va,{size:12})," View"]}),t.jsxs("button",{type:"button",className:"dql-app-card-act",onClick:n,title:"Edit app",children:[t.jsx(wa,{size:12})," Edit"]}),t.jsxs("button",{type:"button",className:"dql-app-card-act danger",onClick:l,title:"Delete app",children:[t.jsx(Sr,{size:12})," Delete"]})]})]})}function Kl({app:e,deleting:r,error:a,onCancel:i,onConfirm:n}){const[l,s]=p.useState(""),o=l.trim()===e.name;return t.jsx("div",{role:"presentation",onMouseDown:d=>{d.target===d.currentTarget&&i()},style:{position:"fixed",inset:0,zIndex:1800,background:"rgba(0,0,0,0.42)",display:"grid",placeItems:"center",padding:24},children:t.jsxs("section",{role:"dialog","aria-modal":"true","aria-labelledby":"delete-app-title",style:{width:"min(460px, 100%)",borderRadius:14,border:"1px solid var(--border-default)",background:"var(--bg-1)",color:"var(--text-primary)",boxShadow:"0 22px 60px rgba(0,0,0,0.28)",padding:20,display:"grid",gap:14},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[t.jsx("span",{style:{width:34,height:34,borderRadius:9,display:"grid",placeItems:"center",background:"var(--status-error-bg)",color:"var(--status-error)",border:"1px solid var(--status-error-border)"},children:t.jsx(Sr,{size:16})}),t.jsxs("div",{children:[t.jsxs("h2",{id:"delete-app-title",style:{margin:0,fontSize:16},children:["Delete ",e.name,"?"]}),t.jsx("p",{style:{margin:"3px 0 0",color:"var(--text-tertiary)",fontSize:11.5},children:"The App package will leave the project and move to local DQL trash for recovery."})]})]}),t.jsxs("label",{style:{display:"grid",gap:6,color:"var(--text-secondary)",fontSize:11.5},children:["Type ",t.jsx("strong",{style:{color:"var(--text-primary)"},children:e.name})," to confirm",t.jsx("input",{autoFocus:!0,value:l,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&o&&!r&&n()},disabled:r,style:{height:36,borderRadius:8,border:"1px solid var(--border-default)",background:"var(--bg-2)",color:"var(--text-primary)",padding:"0 10px",outline:"none",font:"12px var(--font-ui)"}})]}),a?t.jsx("div",{role:"alert",style:{color:"var(--status-error)",fontSize:11.5},children:a}):null,t.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[t.jsx("button",{type:"button",onClick:i,disabled:r,style:{height:34,borderRadius:8,border:"1px solid var(--border-default)",background:"var(--bg-2)",color:"var(--text-secondary)",padding:"0 13px",cursor:r?"default":"pointer"},children:"Cancel"}),t.jsx("button",{type:"button",onClick:n,disabled:!o||r,style:{height:34,borderRadius:8,border:0,background:"var(--status-error)",color:"#fff",padding:"0 13px",cursor:o&&!r?"pointer":"default",opacity:o&&!r?1:.5},children:r?"Deleting…":"Delete App"})]})]})})}function Gl({mode:e,existingAppId:r,appName:a,prompt:i,domain:n,domainOptions:l,owner:s,audience:o,promptExamples:d,catalog:c,catalogLoading:h,selectedBlocks:f,generated:x,buildSession:y,proposalSelection:T,proposalEdits:z,committing:m,themeMode:I,onToggleProposalTile:A,onProposalEdit:W,onCommitProposal:N,saving:b,error:E,onBack:O,onModeChange:F,onAppNameChange:M,onPromptChange:be,onDomainChange:ie,onOwnerChange:K,onAudienceChange:U,onToggleBlock:L,onBuild:V,onOpenGenerated:C,onAddBlock:he}){var P,R,G,ee,fe,ge,ve,J,le,se;const[qe,H]=p.useState(!1),[ne,we]=p.useState(""),Ne=c.filter(w=>f.has(w.id)),me=n.trim()||"Auto domain",te=s.trim()||"Local owner",re=(y==null?void 0:y.status)==="proposed"?y.proposal:void 0,Q=(x==null?void 0:x.plan)??(y==null?void 0:y.plan)??Qs(a,i,n,s,Ne),Te=(((P=Q.pages[0])==null?void 0:P.tiles)??[]).filter(ns),je=(y==null?void 0:y.warnings)??[],Z=ls(Q),j=!!r;if(e==="ai"){const w=(re==null?void 0:re.tiles)??[],de=w.filter(g=>g.certification==="certified").length,Ae=w.filter(g=>g.certification==="reviewed_semantic").length,Pe=w.filter(g=>T.has(g.id)).length,oe=new Set(w.map(g=>g.blockId).filter(Boolean)),ze=ne.trim().toLowerCase(),pe=c.filter(g=>!oe.has(g.id)&&(!ze||g.name.toLowerCase().includes(ze)||(g.description??"").toLowerCase().includes(ze))),B=((R=Q.globalFilters)!=null&&R.length?Q.globalFilters:((G=Q.pages[0])==null?void 0:G.filters)??[]).slice(0,4),Y=g=>{const ue=g.toLowerCase();return ue.includes("kpi")||ue.includes("metric")||ue.includes("single")?"Σ":ue.includes("table")?"▤":"▦"},ke=g=>{const ue=g.toLowerCase();return ue.includes("kpi")||ue.includes("single")?"KPI":ue.includes("table")?"Table":ue.includes("line")?"Line chart":ue.includes("bar")?"Bar chart":g?g.charAt(0).toUpperCase()+g.slice(1):"Auto"};return t.jsx("div",{className:"dql-app-flow-scroll",children:t.jsxs("div",{className:"dql-app-flow",children:[t.jsxs("div",{className:"dql-app-flow-head",children:[t.jsx("h2",{children:j?"Build a new App page":"Build an app"}),t.jsx("p",{children:j?"DQL plans one page from the existing App context, then waits for approval without changing any current page.":"DQL resolves certified blocks and semantic metrics, then waits for your approval before writing a private App draft."})]}),t.jsx("div",{className:"dql-app-flow-bubble",children:i}),b?t.jsxs("div",{className:"dql-app-buildstream",children:[t.jsx("span",{className:"dql-app-buildorb",children:t.jsx(Ze,{size:14})}),t.jsxs("div",{className:"dql-app-buildbody",children:[t.jsx("span",{className:"dql-app-shimmer",children:"Finding certified blocks…"}),t.jsxs("div",{className:"dql-app-buildsteps",children:[t.jsxs("span",{style:{animationDelay:"0.2s"},children:[t.jsx(xt,{size:11,className:"ok"}),"Matched domain ",t.jsx("code",{children:me.toLowerCase()})]}),t.jsxs("span",{style:{animationDelay:"0.8s"},children:[t.jsx(xt,{size:11,className:"ok"}),"Scanning certified blocks and semantic metrics"]}),t.jsxs("span",{style:{animationDelay:"1.4s"},children:[t.jsx("i",{className:"dot"}),"Detecting app filters from block parameters…"]})]})]})]}):null,!b&&re?t.jsxs("div",{className:"dql-app-buildstream proposal",children:[t.jsx("span",{className:"dql-app-buildorb still",children:t.jsx(Ze,{size:14})}),t.jsxs("div",{className:"dql-app-buildbody wide",children:[t.jsxs("div",{className:"dql-app-proposal-lede",children:[t.jsxs("strong",{children:[j?"Page Build Brief":"Build Brief"," · ",re.intent.target==="personal"?"Personal Draft":"Shared Project target"]}),t.jsx("br",{}),"Found ",de," certified block",de===1?"":"s",Ae>0?` and ${Ae} governed semantic view${Ae===1?"":"s"}`:"",".",j?" The approved page is added atomically; existing pages remain unchanged.":" Every generated App starts private; review-required sources must pass publication checks before sharing."]}),t.jsxs("label",{className:"dql-app-buildbrief-name",children:[t.jsx("span",{children:j?"Page name":"Draft name"}),t.jsx("input",{value:a,onChange:g=>M(g.target.value),maxLength:120})]}),t.jsxs("label",{className:"dql-app-buildbrief-name",children:[t.jsx("span",{children:"Audience"}),t.jsx("input",{value:o,onChange:g=>U(g.target.value),maxLength:120})]}),t.jsxs("div",{className:"dql-app-proposal-card",children:[w.map(g=>{var tt,pt,Me;const ue=T.has(g.id),ye=g.certification==="certified",$e=g.certification==="reviewed_semantic";return t.jsxs("button",{type:"button",className:`dql-app-proposal-row ${ue?"":"off"}`,onClick:()=>A(g.id),disabled:!!g.error,title:((tt=g.repair)==null?void 0:tt.message)??g.error??g.preflight.message,children:[t.jsx("span",{className:`dql-app-prop-check ${ue?"on":""}`,children:ue?t.jsx(xt,{size:10,strokeWidth:3.2}):null}),t.jsx("span",{className:`dql-app-prop-glyph ${ye&&Y(g.viz)==="▤"?"green":""}`,children:Y(g.viz)}),t.jsxs("span",{className:"dql-app-prop-name",children:[t.jsx("b",{children:g.blockId??g.title}),t.jsx("small",{children:g.description??g.question??g.title})]}),t.jsx("span",{className:`dql-app-prop-badge ${ye?"certified":"draft"}`,children:ye?"Certified":((pt=g.repair)==null?void 0:pt.status)==="repaired"?"Auto-repaired · review":((Me=g.repair)==null?void 0:Me.status)==="failed"?"Repair blocked":$e?"Semantic · review":"Exploratory · review"}),t.jsx("span",{className:"dql-app-prop-viz",children:ke(g.viz)}),t.jsx("small",{children:g.preflight.status.replace("_"," ")})]},g.id)}),w.filter(g=>g.repair).map(g=>{var ue,ye;return t.jsx("div",{className:"dql-app-flow-gaps",children:t.jsxs("span",{children:[((ue=g.repair)==null?void 0:ue.status)==="repaired"?t.jsx(Zt,{size:12}):t.jsx(it,{size:12}),g.title,": ",(ye=g.repair)==null?void 0:ye.message]})},`repair-${g.id}`)}),t.jsxs("button",{type:"button",className:"dql-app-addmore",onClick:()=>H(g=>!g),children:[t.jsx(Jt,{size:13,strokeWidth:2.2})," Add more blocks"]}),qe?t.jsxs("div",{className:"dql-app-addmore-panel",children:[t.jsxs("div",{className:"dql-app-addmore-search",children:[t.jsx(De,{size:12}),t.jsx("input",{value:ne,onChange:g=>we(g.target.value),placeholder:`Search ${c.length} certified block${c.length===1?"":"s"}…`})]}),h?t.jsx("div",{className:"dql-app-addmore-hint",children:"Loading certified blocks…"}):null,pe.slice(0,6).map(g=>t.jsxs("button",{type:"button",className:"dql-app-addmore-row",onClick:()=>{we(""),he(g.id)},children:[t.jsx(Jt,{size:12,strokeWidth:2.2}),t.jsx("span",{children:g.name}),t.jsxs("small",{children:[g.domain??"certified"," · ",g.status]})]},g.id)),!h&&pe.length===0?t.jsx("div",{className:"dql-app-addmore-hint",children:"No more matching certified blocks."}):null]}):null]}),t.jsxs("details",{className:"dql-app-buildbrief-edit",children:[t.jsx("summary",{children:"Edit tile titles and visualizations"}),t.jsx("div",{children:w.filter(g=>!g.error).map(g=>{const ue=z[g.id]??{title:g.title,viz:g.viz},ye=Array.from(new Set([...g.allowedVisualizations??[],g.viz,"table"]));return t.jsxs("label",{children:[t.jsx("input",{value:ue.title??g.title,onChange:$e=>W(g.id,{title:$e.target.value}),maxLength:120}),t.jsx("select",{value:ue.viz??g.viz,onChange:$e=>W(g.id,{viz:$e.target.value}),children:ye.map($e=>t.jsx("option",{value:$e,children:ke($e)},$e))})]},`edit-${g.id}`)})})]}),B.length>0?t.jsxs("div",{className:"dql-app-detected",children:[t.jsx("span",{className:"dql-app-detected-label",children:"Detected filters"}),B.map(g=>t.jsxs("span",{className:"dql-app-detected-pill",children:[g.label," · ",t.jsx("strong",{children:tr(g.default??"Any")})]},g.id))]}):null,re.gaps.length>0?t.jsx("div",{className:"dql-app-flow-gaps",children:re.gaps.slice(0,3).map(g=>t.jsxs("span",{children:[t.jsx(it,{size:12})," ",g.question]},g.id))}):null,t.jsxs("div",{className:"dql-app-flow-actions",children:[t.jsxs("button",{type:"button",className:"dql-app-flow-build",onClick:N,disabled:m||Pe===0,children:[t.jsx(ft,{size:13}),m?j?"Adding page…":"Building draft…":`${j?"Add page":"Build private draft"} with ${Pe} tile${Pe===1?"":"s"}`]}),t.jsx("button",{type:"button",className:"dql-app-flow-reset",onClick:O,children:j?"Back to app":"Start over"})]})]})]}):null,!b&&!re?t.jsxs("div",{className:"dql-app-flow-actions",children:[t.jsxs("button",{type:"button",className:"dql-app-flow-build",onClick:V,children:[t.jsx(Ze,{size:13})," Create Build Brief"]}),t.jsx("button",{type:"button",className:"dql-app-flow-reset",onClick:O,children:j?"Back to app":"Start over"})]}):null,E?t.jsx("div",{className:"dql-app-error",children:E}):null,je.length>0&&!b?t.jsx("div",{className:"dql-app-flow-gaps",children:je.slice(0,2).map((g,ue)=>t.jsxs("span",{children:[t.jsx(it,{size:12})," ",g]},`${g}-${ue}`))}):null]})})}return t.jsxs("div",{className:"dql-app-create-shell",children:[t.jsxs("div",{className:"dql-app-buildbar",children:[t.jsxs("button",{type:"button",className:"dql-app-back dql-app-back-label",onClick:O,children:[t.jsx(Sa,{size:14}),t.jsx("span",{children:"Apps"})]}),t.jsx("span",{className:"dql-app-name-input",children:t.jsx("input",{value:a,onChange:w=>M(w.target.value),spellCheck:!1})}),t.jsx(st,{tone:x?"agentic":"draft",children:x?"generated":"draft"}),t.jsxs("div",{className:"dql-app-mode-seg",children:[t.jsxs("button",{type:"button",onClick:()=>F("ai"),children:[t.jsx(Ze,{size:15})," Build AI"]}),t.jsxs("button",{type:"button",className:"on",onClick:()=>F("classic"),children:[t.jsx(zr,{size:15})," Classic"]})]}),t.jsxs("div",{className:"dql-app-build-actions",children:[t.jsxs("span",{className:"dql-app-persona",children:[t.jsx("b",{children:"CFO"})," CFO"]}),x?t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:C,children:"Open app"}):null,t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-primary",onClick:V,disabled:b,children:b?"Building...":"Create app"})]})]}),t.jsx("div",{className:"dql-app-create-workspace clean classic",children:t.jsxs("section",{className:"dql-app-ai-start",children:[t.jsxs("div",{className:"dql-app-ai-start-main",children:[t.jsxs("div",{className:"dql-app-ai-start-copy",children:[t.jsx("h1",{children:"Start with one AI input."}),t.jsx("p",{children:"DQL finds certified blocks, detects app filters, and opens the generated app in a clean stakeholder view."})]}),t.jsxs("div",{className:"dql-app-ai-start-card",children:[t.jsx("textarea",{value:i,onChange:w=>be(w.target.value),rows:5,"aria-label":"App request",placeholder:"Build an NBA player performance app for stakeholders..."}),t.jsx("button",{type:"button",className:"dql-app-ai-start-send",onClick:V,disabled:b||!i.trim(),title:"Build app",children:b?t.jsx(nt,{size:19}):t.jsx(Ai,{size:19})})]}),t.jsxs("div",{className:"dql-app-suggestions dql-app-ai-start-examples","aria-label":"Prompt examples",children:[t.jsx("span",{children:"Examples"}),d.slice(0,4).map(w=>t.jsx("button",{type:"button",onClick:()=>{be(w.prompt);const de=l.find(Ae=>Ae.value.toLowerCase()===w.domain.toLowerCase()||Ae.label.toLowerCase()===w.domain.toLowerCase());ie((de==null?void 0:de.value)??"")},children:w.title},w.title))]}),t.jsxs("details",{className:"dql-app-ai-context dql-app-ai-start-advanced",children:[t.jsxs("summary",{children:[t.jsx("span",{children:"Advanced controls"}),t.jsxs("b",{children:[me," / ",te]}),t.jsx(ba,{size:14})]}),t.jsxs("div",{className:"dql-app-ai-context-grid",children:[t.jsxs("label",{children:["Domain",t.jsxs("select",{value:n,onChange:w=>ie(w.target.value),children:[t.jsx("option",{value:"",children:"Global / cross-domain"}),l.map(w=>t.jsx("option",{value:w.value,children:w.label},w.value))]})]}),t.jsxs("label",{children:["Owner",t.jsx("input",{value:s,onChange:w=>K(w.target.value)})]}),t.jsxs("label",{children:["Build mode",t.jsxs("select",{value:e,onChange:w=>F(w.target.value),children:[t.jsx("option",{value:"ai",children:"AI first"}),t.jsx("option",{value:"classic",children:"Manual block selection"})]})]})]}),e==="classic"?t.jsx(Jl,{title:"Manual certified block selection",subtitle:`${f.size} selected`,catalog:c,loading:h,selectedBlocks:f,onToggleBlock:L}):null]}),re&&!x?t.jsx("div",{style:{border:`1px solid ${We[I].cellBorder}`,background:We[I].appBg,borderRadius:10,padding:14},children:t.jsx(Ci,{proposal:re,t:We[I],selected:T,onToggle:A,onCreate:N,busy:m,error:null})}):null,x?t.jsxs("div",{className:"dql-app-ai-result dql-app-ai-start-result",children:["Generated ",t.jsx("b",{children:x.plan.name})," with ",x.validation.certifiedTiles," certified app tile",x.validation.certifiedTiles===1?"":"s"," and ",Z," scoped report",Z===1?"":"s",".",y?t.jsxs("small",{children:["Session ",y.id]}):null]}):null,E?t.jsx("div",{className:"dql-app-error",children:E}):null]}),t.jsxs("aside",{className:"dql-app-ai-start-context",children:[t.jsxs("section",{className:"dql-app-ai-context-card",children:[t.jsx(cr,{title:"Certified blocks found",meta:Q.coverage?`${Q.coverage.certifiedTiles} certified · ${Q.coverage.gaps} gap${Q.coverage.gaps===1?"":"s"}`:`${Te.length||c.length} matches`}),t.jsxs("div",{className:"dql-app-ai-evidence-list",children:[(Te.length?Te:c.slice(0,4)).map((w,de)=>"name"in w?t.jsxs("div",{className:"dql-app-ai-evidence-row",children:[t.jsx("span",{children:t.jsx(ot,{size:14})}),t.jsxs("div",{children:[t.jsx("b",{children:w.name}),t.jsx("small",{children:w.description})]}),t.jsx(st,{tone:w.status==="certified"?"certified":"draft",children:w.status})]},`catalog-${w.id}-${de}`):t.jsxs("div",{className:"dql-app-ai-evidence-row",children:[t.jsx("span",{children:t.jsx(ot,{size:14})}),t.jsxs("div",{children:[t.jsx("b",{children:w.title}),t.jsx("small",{children:w.description??w.rationale??"Certified DQL block"})]}),t.jsx(st,{tone:"certified",children:"Certified"})]},`plan-${w.id}-${de}`)),!Te.length&&!c.length?t.jsx(Ie,{title:"No matches yet.",detail:"Enter a prompt to retrieve certified blocks.",compact:!0}):null]})]}),t.jsxs("section",{className:"dql-app-ai-context-card",children:[t.jsx(cr,{title:"Detected app filters",meta:"bound to block params"}),t.jsxs("div",{className:"dql-app-ai-filter-preview",children:[((ee=Q.globalFilters)!=null&&ee.length?Q.globalFilters:((fe=Q.pages[0])==null?void 0:fe.filters)??[]).slice(0,4).map(w=>t.jsxs("span",{children:[t.jsx("small",{children:w.label}),t.jsx("b",{children:tr(w.default??"Any")})]},w.id)),(ge=Q.globalFilters)!=null&&ge.length||(J=(ve=Q.pages[0])==null?void 0:ve.filters)!=null&&J.length?null:t.jsxs(t.Fragment,{children:[t.jsxs("span",{children:[t.jsx("small",{children:"Domain"}),t.jsx("b",{children:me})]}),t.jsxs("span",{children:[t.jsx("small",{children:"Owner"}),t.jsx("b",{children:te})]}),t.jsxs("span",{children:[t.jsx("small",{children:"Top N"}),t.jsx("b",{children:"Any"})]})]})]})]}),t.jsxs("section",{className:"dql-app-ai-context-card",children:[t.jsx(cr,{title:"Possible deeper analysis",meta:"Copilot asks for context first"}),t.jsxs("div",{className:"dql-app-ai-gap-list",children:[((le=Q.missingEvidence)!=null&&le.length?Q.missingEvidence:je).slice(0,4).map((w,de)=>t.jsxs("span",{children:[t.jsx(it,{size:13})," ",w]},`${w}-${de}`)),!((se=Q.missingEvidence)!=null&&se.length)&&!je.length?t.jsxs("span",{children:[t.jsx(it,{size:13})," Driver explanations, new grains, and reusable block proposals require typed context before DQL creates SQL."]}):null]})]})]})]})})]})}async function Yl(e){const r=new TextEncoder().encode(JSON.stringify(e)),a=await crypto.subtle.digest("SHA-256",r);return`sha256:${Array.from(new Uint8Array(a)).map(i=>i.toString(16).padStart(2,"0")).join("")}`}function Xl({app:e,appDoc:r,dashboardDoc:a,loading:i,experience:n,section:l,explainOpen:s,explainExpanded:o,dashboardFilters:d,dashboardFilterValues:c,themeMode:h,variables:f,onBack:x,onExperienceChange:y,onSectionChange:T,onDashboardFilterChange:z,onApplyDashboardFilters:m,onResetDashboardFilters:I,onExplainChange:A,onExplainExpandedChange:W,onAddPage:N,onOpenDashboard:b,onOpenApp:E,onDashboardChanged:O,onInvestigationsChanged:F,onOpenLineageNode:M}){var pe;const be=ma(),ie=(a==null?void 0:a.dashboard.layout.items.filter(B=>!!B.block).length)??0,K=((pe=r==null?void 0:r.drafts)==null?void 0:pe.length)??0,U=p.useMemo(()=>Ga((a==null?void 0:a.dashboard)??null).map(B=>B.blockId),[a]),L=U.join("|"),[V,C]=p.useState(U[0]??null),[he,qe]=p.useState(null),[H,ne]=p.useState(null),[we,Ne]=p.useState(null),[me,te]=p.useState(null),[re,Q]=p.useState("idle"),[ce,Te]=p.useState(""),[je,Z]=p.useState("idle"),[j,P]=p.useState(""),R=(a==null?void 0:a.dashboard.layout.items.filter(B=>B.semantic).map(B=>B.i))??[],{ready:G,repairedTileIds:ee}=Ll(R,he),fe=p.useCallback(B=>{qe(B)},[]);p.useCallback(B=>{Ne({...B,nonce:Date.now()}),T("research"),A(!0)},[A,T]);const ge=p.useCallback(B=>{te(B)},[]),ve=p.useCallback(()=>{Ne(null)},[]),J=p.useCallback((B,Y)=>{var ke,g;if(C(B),n==="view"){be({type:"OPEN_GLOBAL_AI",audience:"stakeholder",context:{title:"App copilot",scopeHint:Gt(e==null?void 0:e.name)?`Follow up on ${Gt(e==null?void 0:e.name)}`:"Follow up on this tile",selectedObject:{kind:"block",id:B,title:a==null?void 0:a.dashboard.metadata.title},workspaceContext:{appId:e==null?void 0:e.id,dashboardId:a==null?void 0:a.dashboard.id,blockId:B},suggestedQuestions:(g=(ke=a==null?void 0:a.app)==null?void 0:ke.copilot)==null?void 0:g.suggestedQuestions},autoRun:{text:Y,mode:"auto"}});return}A(!0),ne({text:Y,nonce:Date.now()})},[be,n,e==null?void 0:e.id,e==null?void 0:e.name,a==null?void 0:a.dashboard.id,a==null?void 0:a.dashboard.metadata.title,A]);p.useEffect(()=>{n==="view"&&(l==="notebooks"||l==="ai"||l==="drafts"||l==="settings")&&T("dashboards")},[n,l,T]),p.useEffect(()=>{if(U.length===0){V!==null&&C(null);return}(!V||!U.includes(V))&&C(U[0])},[U,L,V]),p.useEffect(()=>{qe(null),te(null)},[e==null?void 0:e.id,a==null?void 0:a.dashboard.id]);const le=!!(e&&a&&(l==="dashboards"||l==="research")),se=le&&s,w=B=>{Q(B),B!=="ready"&&window.setTimeout(()=>Q("idle"),1800)},de=async()=>{var ke;const B=ms(e,r,a);Te(B);let Y=!1;try{typeof navigator<"u"&&((ke=navigator.clipboard)!=null&&ke.writeText)&&(await navigator.clipboard.writeText(B),Y=!0)}catch{Y=!1}if(!Y){const g=document.createElement("textarea");g.value=B,g.style.position="fixed",g.style.left="-9999px",document.body.appendChild(g),g.focus(),g.select(),Y=document.execCommand("copy"),document.body.removeChild(g)}w(Y?"copied":"ready")},Ae=()=>{const B=bs(e,r,a),Y=new Blob([B],{type:"text/markdown;charset=utf-8"}),ke=URL.createObjectURL(Y),g=document.createElement("a");g.href=ke,g.download=`${(e==null?void 0:e.id)??(r==null?void 0:r.app.id)??"dql-app"}-brief.md`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(ke),w("downloaded")},Pe=async()=>{if(!(e!=null&&e.id))return;Z("running"),P("");const B=await D.promoteApp(e.id,{lifecycle:"review"});if(!B.ok){Z("error"),P(B.error);return}Z("done"),P(`${B.paths.length} shared files published from the private draft${B.removedLocalTiles?`; ${B.removedLocalTiles} local-only insight removed`:""}.`),window.setTimeout(()=>Z("idle"),2400)},oe=async()=>{if(!(e!=null&&e.id)||!a||!he||R.length===0)return;Z("running"),P("");const B=await Yl(a.dashboard),Y=await D.approveAppSemanticTiles(e.id,a.dashboard.id,{runId:he.runId,tileIds:R,expectedDashboardFingerprint:B});if(!Y.ok){Z("error"),P(Y.error);return}O(Y.dashboard),Z("done"),P(`${R.length} semantic result${R.length===1?"":"s"} approved with run ${he.runId}.`)},ze=l==="dashboards"&&!!a;return t.jsxs("div",{className:"dql-app-workspace",children:[t.jsxs("div",{className:"dql-app-view-topbar",children:[t.jsxs("button",{type:"button",className:"dql-app-back dql-app-back-label",onClick:x,title:"Back to apps",children:[t.jsx(Sa,{size:14}),t.jsx("span",{children:"Apps"})]}),t.jsx("span",{className:"dql-app-crumb",children:t.jsx("b",{children:(e==null?void 0:e.id)??"app"})}),t.jsx(st,{tone:"certified",children:K>0?`${ie} certified`:"All certified"}),K>0?t.jsxs(st,{tone:"draft",children:[K," draft"]}):null,t.jsx("span",{className:"dql-app-topbar-divider","aria-hidden":"true"}),t.jsxs("div",{className:"dql-app-modeseg",role:"group","aria-label":"App mode",children:[t.jsxs("button",{type:"button",className:n==="view"?"on":"",onClick:()=>y("view"),title:"Clean stakeholder view",children:[t.jsx(va,{size:12})," View"]}),t.jsxs("button",{type:"button",className:n==="build"?"on":"",onClick:()=>y("build"),title:"Rearrange tiles and edit this app",children:[t.jsx(wa,{size:12})," Edit"]})]}),t.jsxs("div",{className:"dql-app-view-actions",children:[t.jsx(Pl,{app:(r==null?void 0:r.app)??null}),n==="build"&&R.length>0?t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>void oe(),disabled:je==="running"||!G,title:G?"Approve the successful semantic run for publication":ee.length>0?"AI-repaired semantic previews are review-required and cannot be approved as governed semantic results":"Run this dashboard successfully before semantic approval",children:[t.jsx(xt,{size:14})," Approve semantic (",R.length,")"]}):null,n==="build"?t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>void Pe(),disabled:je==="running",children:[t.jsx(ot,{size:14})," ",je==="running"?"Checking":"Publish"]}):null,t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line dql-apps-btn-icon",title:re==="copied"?"Copied handoff":"Share local app handoff",onClick:()=>void de(),children:re==="copied"?t.jsx(xt,{size:15}):t.jsx(Hi,{size:15})}),t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line dql-apps-btn-icon",title:re==="downloaded"?"Brief saved":"Download app brief",onClick:Ae,children:re==="downloaded"?t.jsx(xt,{size:15}):t.jsx(mi,{size:15})}),re==="ready"?t.jsxs("div",{className:"dql-app-share-popover",children:[t.jsx("b",{children:"Local handoff"}),t.jsx("textarea",{readOnly:!0,value:ce,onFocus:B=>B.currentTarget.select()})]}):null,je==="done"||je==="error"?t.jsx("div",{className:`dql-app-promote-popover ${je==="error"?"error":""}`,children:j}):null]})]}),t.jsxs("main",{className:"dql-app-view-wrap",children:[t.jsxs("div",{className:"dql-app-title-row",children:[t.jsxs("div",{className:"dql-app-title-copy",children:[t.jsxs("div",{className:"dql-app-title-meta",children:[t.jsxs("span",{children:[t.jsx(ft,{size:14})," ",(e==null?void 0:e.domain)??(a==null?void 0:a.dashboard.metadata.domain)??"DQL App"]}),ze?t.jsx("span",{className:"dql-app-title-context",children:Gt(e==null?void 0:e.name)||"App"}):null,n==="build"?t.jsx(st,{tone:"draft",children:"Customizing"}):null]}),t.jsx("h1",{children:Gt(ze?a==null?void 0:a.dashboard.metadata.title:e==null?void 0:e.name)||"App"}),t.jsx("p",{children:Ya((ze?a==null?void 0:a.dashboard.metadata.description:e==null?void 0:e.description)??"Local DQL App")})]}),t.jsxs("div",{className:"dql-app-nav-row",children:[t.jsx(Zl,{appDoc:r,section:l,experience:n,onChange:T}),l==="dashboards"&&(r!=null&&r.dashboards.length)?t.jsx(Dl,{dashboards:r.dashboards,activeDashboardId:a==null?void 0:a.dashboard.id,isBuild:n==="build",onOpen:b,onAdd:N}):null,le?t.jsx("button",{type:"button",className:`dql-apps-btn dql-apps-btn-line dql-apps-btn-icon ${s?"on":""}`,title:s?"Hide AI copilot":"Show AI copilot",onClick:()=>A(!s),children:t.jsx(rr,{size:15})}):null,ze?t.jsx(t.Fragment,{children:t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line dql-apps-btn-icon",title:"Open dashboard lineage",onClick:()=>{e&&a&&M(`dashboard:${e.id}/${a.dashboard.id}`)},children:t.jsx(ha,{size:15})})}):null]})]}),t.jsxs("div",{className:`dql-app-view-layout ${se?"":"no-explain"}`,children:[t.jsxs("div",{className:"dql-app-main-column",children:[l==="dashboards"&&a&&d.length>0?t.jsxs("section",{className:"dql-app-filter-row","aria-label":"Dashboard filters",children:[t.jsxs("div",{className:"dql-app-filter-row-copy",children:[t.jsx("b",{children:"Filters"}),t.jsx("span",{children:"Set the business scope, then apply once to refresh the full story."})]}),t.jsx(ss,{filters:d,values:c,onChange:z}),t.jsxs("div",{className:"dql-app-filter-row-actions",children:[t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:I,children:"Reset"}),t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-primary",onClick:m,children:"Apply filters"})]})]}):null,i?t.jsx(Ie,{title:"Loading app...",detail:"Reading dashboard files and running local blocks."}):l==="dashboards"&&a&&e?t.jsx(an,{appId:e.id,dashboard:a.dashboard,editable:n==="build",embeddedHeader:!0,variables:f,selectedBlockId:V,onBlockFocus:C,onAskBlock:J,onOpenLineageNode:M,copilotOpen:s,onCopilotChange:A,onDashboardChanged:O,onRunChange:fe}):l==="notebooks"?t.jsx(ts,{appDoc:r}):l==="research"?t.jsx(es,{appDoc:r,dashboardDoc:a,seed:we,themeMode:h,onSeedHandled:ve,onDashboardChanged:O,onInvestigationsChanged:F,onActiveInvestigationChange:ge}):l==="ai"?t.jsx(rs,{appDoc:r}):l==="drafts"?t.jsx(as,{appDoc:r}):l==="settings"?t.jsx(is,{appDoc:r}):t.jsx(Ie,{title:"No dashboard page selected.",detail:"Choose a dashboard page or add one in Build mode."})]}),se?t.jsx(Ul,{app:e,appDoc:r,dashboardDoc:a,dashboardRun:he,variables:f,selectedBlockId:V,askSeed:H,themeMode:h,expanded:o,onToggleExpanded:()=>W(!o),onClose:()=>A(!1),onOpenApp:E}):null]})]})]})}function Jl({title:e,subtitle:r,catalog:a,loading:i,selectedBlocks:n,onToggleBlock:l}){const[s,o]=p.useState(""),d=p.useMemo(()=>{const c=s.trim().toLowerCase();return c?a.filter(h=>[h.name,h.domain,h.status,h.description,h.owner??"",...h.tags??[]].join(" ").toLowerCase().includes(c)):a},[a,s]);return t.jsxs("div",{className:"dql-app-palette",children:[t.jsxs("div",{className:"dql-app-palette-title",children:[t.jsxs("span",{children:[t.jsx(zr,{size:14})," ",e]}),t.jsx("b",{children:r})]}),t.jsxs("label",{className:"dql-app-palette-search",children:[t.jsx(De,{size:14}),t.jsx("input",{value:s,onChange:c=>o(c.target.value),placeholder:"Search blocks, domains, tags"})]}),i?t.jsx(Ie,{title:"Loading blocks...",detail:"Finding certified blocks for this domain.",compact:!0}):null,!i&&d.length===0?t.jsx(Ie,{title:"No blocks found.",detail:"Try another domain or search term.",compact:!0}):null,d.slice(0,24).map((c,h)=>{const f=n.has(c.id);return t.jsxs("button",{type:"button",className:f?"selected":"",onClick:()=>l(c.id),children:[t.jsx("span",{className:"dql-app-palette-icon",children:t.jsx(Cr,{size:14})}),t.jsxs("span",{children:[t.jsx("b",{children:c.name}),t.jsxs("small",{children:[c.domain," / ",c.chartType??"table"]})]}),t.jsx("i",{children:f?"using":c.status})]},`${c.id}-${h}`)}),d.length>24?t.jsxs("div",{className:"dql-app-palette-more",children:[d.length-24," more matches"]}):null]})}function Zl({appDoc:e,section:r,experience:a,onChange:i}){var s,o,d,c,h;const n=((s=e==null?void 0:e.investigations)==null?void 0:s.length)??0,l=a==="view"?[{id:"dashboards",label:"App",count:(e==null?void 0:e.dashboards.length)??0,icon:t.jsx(ft,{size:14})}]:[{id:"dashboards",label:"App",count:(e==null?void 0:e.dashboards.length)??0,icon:t.jsx(ft,{size:14})},{id:"research",label:"Analysis",count:n,icon:t.jsx(De,{size:14})},{id:"notebooks",label:"Notebooks",count:((o=e==null?void 0:e.notebooks)==null?void 0:o.length)??((d=e==null?void 0:e.app.notebooks)==null?void 0:d.length)??0,icon:t.jsx(za,{size:14})},{id:"ai",label:"Pins",count:((c=e==null?void 0:e.aiPins)==null?void 0:c.length)??0,icon:t.jsx(rr,{size:14})},{id:"drafts",label:"Drafts",count:((h=e==null?void 0:e.drafts)==null?void 0:h.length)??0,icon:t.jsx(Ar,{size:14})},{id:"settings",label:"Settings",icon:t.jsx(nt,{size:14})}];return t.jsx("nav",{className:"dql-app-section-tabs","aria-label":"App sections",children:l.map(f=>t.jsxs("button",{className:r===f.id?"on":"","data-app-section":f.id,onClick:()=>i(f.id),title:f.label,"aria-label":`${f.label}${f.count!==void 0?` ${f.count}`:""}`,children:[t.jsx("i",{className:"dql-app-tab-icon",children:f.icon}),t.jsx("span",{className:"dql-app-tab-label",children:f.label}),f.count!==void 0?t.jsx("b",{children:f.count}):null]},f.id))})}function Dl({dashboards:e,activeDashboardId:r,isBuild:a,onOpen:i,onAdd:n}){const l=e.find(s=>s.id===r)??e[0];return t.jsxs("div",{className:"dql-app-page-picker","aria-label":"Dashboard page",children:[t.jsxs("span",{children:[t.jsx(Cr,{size:14})," Page"]}),t.jsx("select",{value:(l==null?void 0:l.id)??"",onChange:s=>i(s.target.value),title:(l==null?void 0:l.title)??"Dashboard page",children:e.map(s=>t.jsxs("option",{value:s.id,children:[s.title," (",s.itemCount,")"]},s.id))}),a?t.jsx("button",{type:"button",onClick:n,title:"Add dashboard page",children:t.jsx(Jt,{size:14})}):null]})}function Ul({app:e,appDoc:r,dashboardDoc:a,dashboardRun:i,variables:n,selectedBlockId:l,askSeed:s,themeMode:o,expanded:d,onToggleExpanded:c,onClose:h,onOpenApp:f}){const x=We[o],y=(a==null?void 0:a.dashboard)??null,z=p.useMemo(()=>Ga(y,i),[y,i]).find(ie=>ie.blockId===l)??null,m=z?i==null?void 0:i.tiles.find(ie=>ie.tileId===z.tileId||ie.blockId===z.blockId):null,I=(e==null?void 0:e.id)??(r==null?void 0:r.app.id)??"app",A=(y==null?void 0:y.id)??"dashboard",W=qa(`app:${I}:${A}`),[N,b]=p.useState(!1),E=Be((e==null?void 0:e.name)??(r==null?void 0:r.app.name)??(y==null?void 0:y.metadata.title)??"App workspace"),O=Be((y==null?void 0:y.metadata.title)??"Dashboard"),F=z?`Focused on ${Be(z.title)} in ${O}`:`Scoped to ${O}`,M=z?{kind:"block",id:z.blockId,title:z.title}:y?{kind:"dashboard",id:y.id,title:y.metadata.title}:{kind:"app",id:I,title:E},be=p.useMemo(()=>{var ie,K,U,L,V;return{surface:"apps",appId:I,appName:(e==null?void 0:e.name)??(r==null?void 0:r.app.name),appDomain:(e==null?void 0:e.domain)??(r==null?void 0:r.app.domain),appDescription:(e==null?void 0:e.description)??(r==null?void 0:r.app.description),dashboardId:y==null?void 0:y.id,dashboardTitle:y==null?void 0:y.metadata.title,dashboardDescription:y==null?void 0:y.metadata.description,dashboardFilters:n,selectedBlock:z?{blockId:z.blockId,tileId:z.tileId,title:z.title,visualization:z.viz,status:m==null?void 0:m.status,certificationStatus:m==null?void 0:m.certificationStatus,rowCount:(ie=m==null?void 0:m.result)==null?void 0:ie.rowCount,columns:(U=(K=m==null?void 0:m.result)==null?void 0:K.columns)==null?void 0:U.slice(0,12),sampleRows:hs((L=m==null?void 0:m.result)==null?void 0:L.rows,(V=m==null?void 0:m.result)==null?void 0:V.columns)}:void 0}},[e,r,I,y,z,m,n]);return t.jsx(ya,{t:x,title:"App AI",subtitle:E,expanded:d,onToggleExpanded:c,resizable:!0,minResizeWidth:390,maxResizeWidth:1200,fitViewportHeight:!0,heightResizable:!0,minResizeHeight:520,onClose:h,onNewChat:W.resetThreadId,running:N,ariaLabel:"App AI",className:"dql-app-explain-panel dql-app-assistant-panel",children:t.jsx(p.Suspense,{fallback:t.jsx("div",{style:{padding:16,fontSize:12,color:x.textSecondary},children:"Loading App AI…"}),children:t.jsx(_l,{themeMode:o,title:"App AI",scopeHint:F,audience:"stakeholder",selectedObject:M,workspaceContext:be,initialMode:"auto",autoRun:s!=null&&s.text?{text:s.text,mode:"ask",nonce:s.nonce}:void 0,threadId:W.threadId,onThreadIdChange:W.onThreadIdChange,onRunningChange:b,onOpenApp:f,answerFirstCards:!0,examplePrompts:[{label:"Explain this dashboard",prompt:"Explain the most important business story in this dashboard and what action it suggests."},{label:"Find the main driver",prompt:"What is the main driver behind the current result? Use the active app filters and governed evidence."},{label:"Check this result",prompt:"Validate the current result against its certified block, semantic definitions, and lineage."}]},`${I}:${A}`)})})}function es({appDoc:e,dashboardDoc:r,seed:a,themeMode:i,onSeedHandled:n,onDashboardChanged:l,onInvestigationsChanged:s,onActiveInvestigationChange:o}){var Z;const d=e==null?void 0:e.app.id,c=r==null?void 0:r.dashboard.id,h=We[i],[f,x]=p.useState(()=>(e==null?void 0:e.investigations)??[]),[y,T]=p.useState(null),[z,m]=p.useState(!1),[I,A]=p.useState(null),[W,N]=p.useState(null),[b,E]=p.useState("preview"),[O,F]=p.useState(""),[M,be]=p.useState(!1),[ie,K]=p.useState(!1),[U,L]=p.useState(null);p.useEffect(()=>{if(!d){x([]),T(null);return}let j=!1;return m(!0),D.listAppInvestigations(d).then(P=>{if(j)return;N(null),x(P);const R=jr(P);T(G=>{var ee,fe;return G??((ee=R.find(ge=>ge.status==="ready"))==null?void 0:ee.id)??((fe=R[0])==null?void 0:fe.id)??null})}).finally(()=>{j||m(!1)}),()=>{j=!0}},[d]),p.useEffect(()=>{s(f)},[f,s]),p.useEffect(()=>{if(!a||!d)return;let j=!1;const P={dashboardId:a.dashboardId??c,sourceTileId:a.sourceTileId,sourceBlockId:a.sourceBlockId,title:a.title,question:a.question,intent:a.intent,context:a.context,generatedSql:a.generatedSql,run:!0},R=Bt(a.title??a.question)||"requested follow-up",G=`${d}:${JSON.stringify(P)}`,ee=async()=>{A("create"),L(R),N(null);let ge=dr.get(G);ge||(ge=D.createAppInvestigation(d,P),dr.set(G,ge),ge.finally(()=>{window.setTimeout(()=>dr.delete(G),5e3)}));const ve=await ge;if(j)return;if(A(null),!ve.ok){N(ve.error),L(null),n();return}const J=ve.investigation,le=se=>{x(w=>Tt(w,se)),T(se.id),E("preview"),K(!1),se.status!=="draft"&&se.status!=="running"&&L(null)};if(le(J),J.status!=="draft"&&J.status!=="running"){n();return}A(J.id);for(let se=0;se<20;se+=1){if(await new Promise(de=>{window.setTimeout(de,1e3)}),j)return;const w=await D.getAppInvestigation(d,J.id);if(j)return;if(w&&w.status!=="draft"&&w.status!=="running"){A(null),le(w),n();return}}n(),A(null),L(null),N("Analysis is still running. Reopen it or refresh to load the latest proof.")},fe=window.setTimeout(()=>void ee(),0);return()=>{j=!0,window.clearTimeout(fe)}},[a==null?void 0:a.nonce,d,c,n]);const V=p.useMemo(()=>jr(f),[f]),C=V.find(j=>j.id===y)??V.find(j=>j.status==="ready")??V[0]??null;p.useEffect(()=>(o(C),()=>o(null)),[C,o]);const he=V.filter(j=>j.id!==(C==null?void 0:C.id)).filter(j=>M||j.status!=="error").slice(0,M?40:5),qe=Math.max(0,V.length-(C?1:0)-he.length),H=C?qs(C):null,ne=H?Ts(H):"",we=I==="create"||!!U,Ne=we&&!!U,me=we&&!C;p.useEffect(()=>{F((C==null?void 0:C.generatedSql)??"")},[C==null?void 0:C.id,C==null?void 0:C.generatedSql]);const te=async(j,P)=>{if(!d)return null;A(j.id),N(null);const R=P==null?void 0:P.trim(),G=await D.runAppInvestigation(d,j.id,R?{generatedSql:R}:void 0);return A(null),G.ok?(x(ee=>Tt(ee,G.investigation)),E("preview"),G.investigation):(N(G.error),null)},re=async j=>{if(!d)return null;A(`rebuild:${j.id}`),N(null);const P=await D.runAppInvestigation(d,j.id,{repairMode:"rebuild_from_certified"});return A(null),P.ok?(x(R=>Tt(R,P.investigation)),E(P.investigation.error?"sql":"preview"),P.investigation):(N(P.error),null)},Q=async j=>{if(!d)return null;A(`pin:${j.id}`),N(null);const P=await D.pinAppInvestigation(d,j.id,{dashboardId:j.dashboardId??c,title:j.title});return A(null),P.ok?(x(R=>Tt(R,P.investigation)),T(P.investigation.id),P.dashboard&&l(P.dashboard),P.investigation):(N(P.error),null)},ce=async j=>{if(!d)return;if(!j.generatedSql){N("Add reviewed SQL before creating a draft block.");return}const P=j.pinnedAiPinId?j:await Q(j),R=P==null?void 0:P.pinnedAiPinId;if(!R)return;A(`promote:${j.id}`),N(null);const G=await D.promoteAiPin(d,R);if(A(null),!G.ok){N(G.error??"Draft block could not be created.");return}const ee=await D.getAppInvestigation(d,j.id);ee&&x(fe=>Tt(fe,ee))},Te=async j=>{const P=O.trim();let R=j;if(P&&P!==(j.generatedSql??"").trim()){const G=await te(j,P);if(!G)return;R=G}await ce(R)},je=async j=>{const P=O.trim();let R=j;if(P&&P!==(j.generatedSql??"").trim()){const G=await te(j,P);if(!G)return null;R=G}return Q(R)};return e?t.jsxs("div",{className:`dql-app-research-shell ${ie||!C&&!me?"history-open":"history-collapsed"}`,children:[t.jsxs("section",{className:"dql-app-research-list",children:[t.jsxs("div",{className:"dql-app-research-head",children:[t.jsxs("span",{children:[t.jsx(De,{size:14})," Analysis"]}),t.jsxs("div",{children:[t.jsx("b",{children:f.length}),C?t.jsx("button",{type:"button",onClick:()=>K(!1),title:"Close analysis history",children:"Close"}):null]})]}),z?t.jsx(Ie,{title:"Loading analysis...",detail:"Reading local app analysis.",compact:!0}):null,W?t.jsx("div",{className:"dql-app-error",children:W}):null,!z&&f.length===0?t.jsx(Ie,{title:"No analysis yet.",detail:"Start from Copilot so the analysis keeps the original question, filters, and selected result context.",compact:!0}):null,t.jsxs("div",{className:"dql-app-research-items",children:[C?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"dql-app-research-group-label",children:"Current analysis"}),t.jsx(da,{item:C,selected:!0,onClick:()=>{N(null),T(C.id),E("preview"),K(!1)}})]}):null,he.length?t.jsx("div",{className:"dql-app-research-group-label",children:"Recent history"}):null,he.map(j=>t.jsx(da,{item:j,selected:(C==null?void 0:C.id)===j.id,onClick:()=>{N(null),T(j.id),E("preview"),K(!1)}},j.id)),qe>0?t.jsxs("button",{type:"button",className:"dql-app-research-history-toggle",onClick:()=>be(j=>!j),children:[t.jsx("span",{children:M?"Hide older runs":`Show ${qe} older run${qe===1?"":"s"}`}),t.jsx("small",{children:M?"Keep the current analysis focused":"Includes failed and superseded analysis attempts"})]}):null]})]}),t.jsx("section",{className:"dql-app-research-detail",children:Ne?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"dql-app-report-toolbar",children:[t.jsxs("div",{children:[t.jsx("span",{children:"New memo"}),t.jsx("b",{children:U})]}),f.length?t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>K(j=>!j),children:[t.jsx(De,{size:13})," ",ie?"Hide history":`Analysis history (${f.length})`]}):null]}),W?t.jsx("div",{className:"dql-app-error",children:W}):null,t.jsxs("div",{className:"dql-app-research-creating active",children:[t.jsx(nt,{size:24}),t.jsx("span",{children:"Preparing business memo"}),t.jsx("h2",{children:"Writing business memo..."}),t.jsxs("p",{children:['DQL is opening a scoped memo for "',U,'". The previous memo stays in history while this answer is built from the typed context, active filters, certified block evidence, and preview proof.']}),t.jsxs("div",{className:"dql-app-research-creating-steps",children:[t.jsx("small",{children:"Reading current filters"}),t.jsx("small",{children:"Checking certified block context"}),t.jsx("small",{children:"Building narrative and proof appendix"})]})]})]}):C&&H?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"dql-app-report-toolbar",children:[t.jsxs("div",{children:[t.jsx("span",{children:"Current memo"}),t.jsx("b",{children:Ja(C)})]}),t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>K(j=>!j),children:[t.jsx(De,{size:13})," ",ie?"Hide history":`Memo history (${f.length})`]})]}),we||I===C.id||C.status==="running"?t.jsxs("div",{className:`dql-app-research-status ${we?"opening":""}`,children:[t.jsx(nt,{size:14}),t.jsxs("div",{children:[t.jsx("span",{children:we?"Opening a new business memo...":"Refreshing the memo from certified evidence, active filters, and optional preview proof..."}),U?t.jsx("small",{children:U}):null]})]}):null,W?t.jsx("div",{className:"dql-app-error",children:W}):null,t.jsxs("article",{className:"dql-app-research-report",children:[t.jsxs("header",{className:"dql-app-report-hero",children:[t.jsxs("div",{className:"dql-app-report-status-row",children:[t.jsxs("span",{children:[t.jsx(De,{size:13})," Business memo"]}),t.jsx(st,{tone:C.status==="error"?"draft":"agentic",children:C.reviewStatus})]}),t.jsx("h2",{children:H.title}),t.jsx("p",{children:H.scope}),t.jsx("div",{className:"dql-app-report-context-line",children:H.contextFacts.map(j=>t.jsxs("span",{children:[t.jsx("b",{children:j.label}),j.value]},j.label))}),t.jsxs("div",{className:"dql-app-report-actions",children:[t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>void je(C),disabled:I===`pin:${C.id}`,children:[t.jsx(Fi,{size:13})," ",C.pinnedAiPinId?"Added to App":"Add reviewed insight to App"]}),t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-primary",onClick:()=>void Te(C),disabled:!(O.trim()||C.generatedSql)||I===`promote:${C.id}`,children:[t.jsx(Ar,{size:13})," ",I===`promote:${C.id}`?"Drafting...":"Create draft block"]}),t.jsxs("details",{className:"dql-app-report-review-actions",children:[t.jsx("summary",{children:"Reviewer tools"}),t.jsxs("div",{children:[t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>void te(C,O),disabled:I===C.id,children:[t.jsx(nt,{size:13})," ",I===C.id?"Refreshing...":"Refresh memo"]}),(Z=H.previewIssue)!=null&&Z.canRebuild?t.jsxs("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:()=>void re(C),disabled:I===`rebuild:${C.id}`,children:[t.jsx(nt,{size:13})," ",I===`rebuild:${C.id}`?"Rebuilding...":"Rebuild SQL"]}):null]})]})]}),H.previewIssue?t.jsxs("div",{className:"dql-app-report-warning",children:[t.jsx(it,{size:14}),t.jsx("span",{children:H.previewIssue.message})]}):null]}),t.jsx("section",{className:"dql-app-report-section dql-app-report-paper",children:H.sections.length?t.jsx(Ps,{sections:H.sections}):t.jsx(Ol,{text:ne,t:h,compact:!0})}),H.keyNumbers.length||H.drivers.length?t.jsxs("section",{className:`dql-app-report-section dql-app-report-evidence-story ${H.keyNumbers.length&&H.drivers.length?"":"single"}`,children:[H.keyNumbers.length?t.jsxs("div",{children:[t.jsx("h3",{children:H.intent==="segment_compare"?"Segment numbers":H.intent==="diagnose_change"?"Movement numbers":"Key numbers"}),t.jsx("div",{className:"dql-app-report-numbers",children:H.keyNumbers.map(j=>t.jsxs("div",{className:"dql-app-report-number",children:[t.jsx("span",{children:j.label}),t.jsx("b",{children:j.value}),t.jsx("small",{children:j.detail})]},j.label))})]}):null,H.drivers.length?t.jsxs("div",{children:[t.jsx("h3",{children:H.intent==="anomaly_investigation"?"Exception view":H.intent==="entity_drilldown"?"Entity view":"Driver view"}),t.jsx(Es,{drivers:H.drivers})]}):null]}):null,t.jsxs("details",{className:"dql-app-report-section dql-app-report-appendix",children:[t.jsxs("summary",{children:[t.jsx("span",{children:"Technical appendix"}),t.jsx("small",{children:"SQL, preview rows, caveats, routing, and source context for analyst review"}),t.jsx(ba,{size:15})]}),t.jsxs("div",{className:"dql-app-research-evidence-head",children:[t.jsxs("div",{children:[t.jsx("h3",{children:"SQL and proof"}),t.jsx("p",{children:"Use this appendix only when you need to inspect routing, repair generated SQL, or validate source context before pinning this memo to the app."})]}),t.jsx("div",{className:"dql-app-research-tabs",children:["preview","sql","assumptions","context"].map(j=>t.jsx("button",{type:"button",className:b===j?"on":"",onClick:()=>E(j),children:j==="assumptions"?"Caveats":Be(j)},j))})]}),t.jsx(Os,{investigation:C,tab:b,sqlDraft:O,onSqlDraftChange:F})]})]})]}):t.jsxs(t.Fragment,{children:[W?t.jsx("div",{className:"dql-app-error",children:W}):null,me?t.jsxs("div",{className:"dql-app-research-creating",children:[t.jsx(nt,{size:22}),t.jsx("span",{children:"Preparing business memo"}),t.jsx("h2",{children:"Writing business memo..."}),t.jsx("p",{children:U?`DQL is opening a scoped memo for "${U}".`:"DQL is using the Copilot context, active filters, certified block evidence, and any available preview proof to create the main-canvas memo."})]}):t.jsx(Ie,{title:"Start analysis from Copilot.",detail:"Ask a follow-up, add context, then review the analysis here."})]})})]}):t.jsx(Ie,{title:"No App selected.",detail:"Choose an App before writing analysis."})}function da({item:e,selected:r,onClick:a}){return t.jsxs("button",{type:"button",className:[r?"on":"",`status-${e.status}`].filter(Boolean).join(" "),onClick:a,children:[t.jsx("span",{children:Ja(e)}),t.jsx("small",{children:Ws(e)})]})}function ts({appDoc:e}){const r=(e==null?void 0:e.notebooks)??(e==null?void 0:e.app.notebooks)??[];return r.length?t.jsx("div",{className:"dql-app-simple-list",children:r.map(a=>t.jsxs(ut,{icon:t.jsx(za,{size:16}),children:[t.jsx("b",{children:a.title??a.path.split("/").pop()}),t.jsxs("span",{children:[a.role," / ",a.visibility," / ",a.path]})]},a.path))}):t.jsx(Ie,{title:"No notebooks attached.",detail:"Attach analysis notebooks in Build mode when this App needs supporting work."})}function rs({appDoc:e}){const r=(e==null?void 0:e.aiPins)??[];return r.length?t.jsx("div",{className:"dql-app-simple-list",children:r.map(a=>t.jsxs(ut,{icon:t.jsx(rr,{size:16}),children:[t.jsx("b",{children:a.title}),t.jsxs("span",{children:[a.certification," / ",a.reviewStatus]})]},a.id))}):t.jsx(Ie,{title:"No pinned insights yet.",detail:"Use Copilot from a dashboard page, create analysis, then add useful reviewed insights to this App."})}function as({appDoc:e}){const r=(e==null?void 0:e.drafts)??[];return r.length?t.jsx("div",{className:"dql-app-simple-list",children:r.map(a=>t.jsxs(ut,{icon:t.jsx(Ar,{size:16}),children:[t.jsx("b",{children:a.name}),t.jsxs("span",{children:[a.reviewStatus??"needs review"," / ",a.path]})]},a.path))}):t.jsx(Ie,{title:"No drafts.",detail:"Generated and promoted draft blocks will appear here for review."})}function is({appDoc:e}){var r;return e?t.jsxs("div",{className:"dql-app-settings-grid",children:[t.jsxs(ut,{icon:t.jsx(ot,{size:16}),children:[t.jsx("b",{children:"Owners"}),t.jsx("span",{children:e.app.owners.join(", ")})]}),t.jsxs(ut,{icon:t.jsx(nt,{size:16}),children:[t.jsx("b",{children:"Lifecycle"}),t.jsx("span",{children:e.app.lifecycle??"draft"})]}),t.jsxs(ut,{icon:t.jsx(zr,{size:16}),children:[t.jsx("b",{children:"Policies"}),t.jsxs("span",{children:[e.app.policies.length," local access policies"]})]}),t.jsxs(ut,{icon:t.jsx(ft,{size:16}),children:[t.jsx("b",{children:"Homepage"}),t.jsx("span",{children:((r=e.app.homepage)==null?void 0:r.type)??"dashboard"})]})]}):t.jsx(Ie,{title:"No App selected.",detail:"Choose an App to inspect its settings."})}function cr({title:e,meta:r}){return t.jsxs("div",{className:"dql-app-panel-head",children:[t.jsx("span",{children:e}),r?t.jsx("b",{children:r}):null]})}function ns(e){return e.kind==="certified_block"&&e.certification==="certified"}function ls(e){var i;const r=Array.isArray(e.scopedReports)?e.scopedReports.length:0,a=Array.isArray((i=e.planning)==null?void 0:i.scopedReports)?e.planning.scopedReports.length:0;return r>0||a>0?Math.max(r,a):Array.isArray(e.missingEvidence)?e.missingEvidence.length:0}function ss({filters:e,values:r,onChange:a}){return e.length===0?t.jsx("span",{className:"dql-app-filter-empty",children:"No filters"}):t.jsx(t.Fragment,{children:e.map(i=>t.jsx(os,{filter:i,value:r[i.id]??Pt(i),onChange:n=>a(i,n)},i.id))})}function os({filter:e,value:r,onChange:a}){var h;const i=Be(e.id),n=ds(e,r),l=e.sourceBlockId,s=e.bindsTo||e.id,o=(e.type==="string"||e.type==="select")&&!!l&&!((h=e.options)!=null&&h.length),[d,c]=p.useState(null);if(p.useEffect(()=>{if(!o||!l)return;let f=!1;return D.dashboardFilterOptions(l,s).then(x=>{!f&&x&&x.options.length>0&&!x.truncated&&c(x.options)}),()=>{f=!0}},[l,s,o]),d&&d.length>0)return t.jsx(ur,{icon:Nt(e),label:i,value:n,onChange:a,options:[["",`All ${i.toLowerCase()}`],...d.map(f=>[f,f])]});if(e.type==="select")return t.jsx(ur,{icon:Nt(e),label:i,value:n,onChange:a,options:ps(e)});if(e.type==="boolean")return t.jsx(ur,{icon:Nt(e),label:i,value:String(!!r),onChange:f=>a(f==="true"),options:[["true","Yes"],["false","No"]]});if(e.type==="daterange"){const f=r&&typeof r=="object"&&!Array.isArray(r)?r:{},x=typeof f.start=="string"?f.start:"",y=typeof f.end=="string"?f.end:"",T=(z,m)=>a(z&&m?{start:z,end:m}:void 0);return t.jsxs("label",{className:"dql-app-filter-select dql-app-filter-range",title:e.bindsTo?`${i} -> ${e.bindsTo}`:i,"aria-label":i,children:[t.jsx("span",{className:"dql-app-filter-icon",children:Nt(e)}),t.jsx("input",{type:"date",value:x,"aria-label":`${i} from`,onChange:z=>T(z.target.value,y)}),t.jsx("span",{className:"dql-app-filter-range-sep",children:"–"}),t.jsx("input",{type:"date",value:y,"aria-label":`${i} to`,onChange:z=>T(x,z.target.value)})]})}return t.jsxs("label",{className:"dql-app-filter-select",title:e.bindsTo?`${i} -> ${e.bindsTo}`:i,"aria-label":i,children:[t.jsx("span",{className:"dql-app-filter-icon",children:Nt(e)}),t.jsx("input",{type:e.type==="number"?"number":e.type==="date"?"date":"text",value:n,placeholder:i,onChange:f=>a(f.target.value)})]})}function Nt(e){return e.type==="date"||e.type==="daterange"||/season|year|date|time|period/i.test(e.id)?t.jsx(Ei,{size:13}):t.jsx(Aa,{size:13})}function ps(e){var a;return((a=e.options)!=null&&a.length?e.options:[e.default].filter(i=>i!==void 0)).map(i=>[String(i),Be(String(i))])}function Pt(e){var r;return e.default!==void 0?e.default:e.type==="number"?Qa(e.id):e.type==="boolean"?!1:e.type==="select"?((r=e.options)==null?void 0:r[0])??"":""}function ds(e,r){return r==null?String(Pt(e)??""):e.type==="daterange"&&typeof r=="object"?JSON.stringify(r):String(r)}function cs(e,r){if(e.type==="number"){if(typeof r=="string"&&r.trim()==="")return"";const a=Number(r);return Number.isFinite(a)?a:r}if(e.type==="boolean")return r===!0||r==="true";if(e.type==="select"&&typeof e.default=="number"){const a=Number(r);return Number.isFinite(a)?a:r}return r}function ca(e,r){const a=Object.keys(e),i=Object.keys(r);return a.length!==i.length?!1:a.every(n=>Object.is(e[n],r[n]))}function ur({label:e,icon:r,value:a,options:i,onChange:n}){return t.jsxs("label",{className:"dql-app-filter-select",title:e,"aria-label":e,children:[r?t.jsx("span",{className:"dql-app-filter-icon",children:r}):t.jsx("span",{children:e}),t.jsx("select",{value:a,onChange:l=>n(l.target.value),children:i.map(([l,s])=>t.jsx("option",{value:l,children:s},l))})]})}function xr(e){return e.block?"blockId"in e.block?e.block.blockId??null:e.block.ref??null:null}function Ga(e,r){if(!e)return[];const a=new Map(((r==null?void 0:r.tiles)??[]).map(d=>[d.tileId,d])),i=new Map(((r==null?void 0:r.tiles)??[]).filter(d=>d.blockId).map(d=>[d.blockId,d])),n=new Set(e.layout.items.filter(d=>xr(d)&&ua(d)).map(d=>wr(`${d.title??""} ${xr(d)??""}`)).filter(Boolean)),l=e.layout.items.map((d,c)=>{const h=xr(d);if(!h)return null;const f=wr(`${d.title??""} ${h}`);if(f&&n.has(f)&&!ua(d))return null;const x=a.get(d.i)??i.get(h);return{block:{blockId:h,title:d.title??h,viz:d.viz.type,tileId:d.i},duplicateKeys:us(d,x,h),score:gs(d,x,c)}}).filter(d=>!!d).sort((d,c)=>c.score-d.score),s=new Set,o=[];for(const d of l)if(!d.duplicateKeys.some(c=>s.has(c))){for(const c of d.duplicateKeys)s.add(c);o.push(d.block)}return o}function ua(e){var r,a;return(r=e.parameterBindings)!=null&&r.length?!0:!!((a=e.filterBindings)!=null&&a.some(i=>!i.unsupportedReason&&(i.mode==="parameter"||i.mode==="predicate"||!!i.binding)))}function us(e,r,a){const i=[`block:${a}`],n=xs(r==null?void 0:r.result);n&&i.push(`result:${n}`);const l=wr(`${e.title??""} ${a}`);return l&&i.push(`topic:${l}`),i}function xs(e){var i,n;if(!((i=e==null?void 0:e.columns)!=null&&i.length)||!((n=e.rows)!=null&&n.length))return"";const r=e.columns.slice(0,6).map(l=>l.toLowerCase()),a=e.rows.slice(0,3).map(l=>r.map(s=>fs(l[s]??l[e.columns.find(o=>o.toLowerCase()===s)??s])).join(","));return[...r,...a].join("|")}function fs(e){return e==null?"":typeof e=="number"?Number.isFinite(e)?String(Math.round(e*1e3)/1e3):"":String(e).toLowerCase().replace(/\s+/g," ").trim().slice(0,80)}function wr(e){const r=e.toLowerCase().replace(/\b(codex|e2e|qa|draft|imported|pasted|raw|sql|block)\b/g," ").replace(/\b20\d{10,}\b/g," "),a=/\b(player|players|scorer|scorers|athlete)\b/.test(r)?"player":/\b(customer|account|user)\b/.test(r)?"customer":/\b(team|teams)\b/.test(r)?"team":"",i=/\b(top|bottom|rank|ranking|leader|leaderboard|scorer|scorers)\b/.test(r)?"ranking":/\b(availability|freshness|record|records|quality|coverage)\b/.test(r)?"availability":/\b(trend|weekly|monthly|daily|over time)\b/.test(r)?"trend":"",n=/\b(point|points|pts|score|scoring|scorer|scorers)\b/.test(r)?"points":/\b(field goal|fgm|fga|field-goal|field_goals?)\b/.test(r)?"field_goals":/\b(count|records|games played)\b/.test(r)?"count":/\b(availability|freshness|quality|coverage)\b/.test(r)?"quality":"";return!a||!i||!n?"":`${a}|${i}|${n}`}function gs(e,r,a){var n,l,s,o,d;let i=1e4-a;return(n=e.parameterBindings)!=null&&n.length&&(i+=5e4),(l=e.filterBindings)!=null&&l.length&&(i+=2e4),(r==null?void 0:r.status)==="ok"&&(i+=15e3),(o=(s=r==null?void 0:r.result)==null?void 0:s.rows)!=null&&o.length&&(i+=8e3),(r==null?void 0:r.certificationStatus)==="certified"&&(i+=5e3),String(e.trustState??((d=e.display)==null?void 0:d.trustState)??"").toLowerCase()==="certified"&&(i+=3e3),/codex\s+e2e|test|pasted/i.test(String(e.title??""))&&(i-=6e3),i}function hs(e,r){if(!Array.isArray(e)||e.length===0)return;const a=Array.isArray(r)&&r.length>0?r.slice(0,8):Object.keys(e[0]??{}).slice(0,8);return e.slice(0,5).map(i=>Object.fromEntries(a.map(n=>[n,i[n]])))}function Gt(e){return String(e??"").replace(/\s+/g," ").replace(/[\s,;:.–—-]+$/,"").trim()}function Be(e){const r=String(e??"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim();return r?r.split(" ").map(a=>{const i=a.toLowerCase();return i==="ai"?"AI":i==="cxo"?"CXO":i==="kpi"?"KPI":i==="vs"||i==="vs."?"vs.":`${a.charAt(0).toUpperCase()}${a.slice(1)}`}).join(" "):"Business"}function Ya(e){return e.replace(/\bDraft gaps stay in Research until reviewed\.?/gi,"Follow-up analysis stays out of the stakeholder view until reviewed.").replace(/\bresearch path\b/gi,"analysis path").replace(/\bresearch suggestions\b/gi,"analysis suggestions").replace(/\bfollow-up research\b/gi,"follow-up analysis").replace(/\bevidence chips\b/gi,"proof chips").replace(/\bevidence, lineage\b/gi,"proof and lineage").replace(/\bevidence and lineage\b/gi,"proof and lineage").replace(/\bsource evidence\b/gi,"source proof").replace(/\bOpen Research\b/g,"Open Analysis").replace(/\bResearch\b/g,"Analysis")}function tr(e){return e==null||e===""?"All":Array.isArray(e)?e.map(tr).join(", "):typeof e=="boolean"?e?"On":"Off":typeof e=="number"?e.toLocaleString():typeof e=="object"?JSON.stringify(e):String(e)}function Xa(e,r){if(Array.isArray(r))return r.map(i=>Xa(e,i)).join(", ");const a=typeof r=="number"?r:typeof r=="string"&&r.trim()!==""?Number(r):NaN;return/(season|year)/i.test(e)&&Number.isInteger(a)&&a>=1900&&a<=2200?String(a):tr(r)}function ms(e,r,a){var o;const i=(e==null?void 0:e.id)??(r==null?void 0:r.app.id)??"app",n=(e==null?void 0:e.name)??(r==null?void 0:r.app.name)??"DQL App",l=(a==null?void 0:a.dashboard.metadata.title)??((o=r==null?void 0:r.dashboards[0])==null?void 0:o.title)??"Overview",s=typeof window<"u"?window.location.origin:"local DQL";return[n,`App ID: ${i}`,`Dashboard: ${l}`,`Domain: ${(e==null?void 0:e.domain)??(r==null?void 0:r.app.domain)??(a==null?void 0:a.dashboard.metadata.domain)??"unknown"}`,`Open locally: ${s}`].join(`
|
|
48
|
+
`)}function bs(e,r,a){const i=r==null?void 0:r.app,n=(e==null?void 0:e.name)??(i==null?void 0:i.name)??"DQL App",l=(r==null?void 0:r.dashboards)??[],s=(r==null?void 0:r.notebooks)??(i==null?void 0:i.notebooks)??[],o=(r==null?void 0:r.drafts)??[],d=(r==null?void 0:r.aiPins)??[],c=a==null?void 0:a.dashboard,h=(c==null?void 0:c.layout.items.map(x=>x.block?x.block.blockId??x.block.ref??x.title??x.i:null).filter(x=>!!x))??[];return`${[`# ${n}`,"",(e==null?void 0:e.description)??(c==null?void 0:c.metadata.description)??(i==null?void 0:i.description)??"Local DQL App brief.","","## App Metadata","",`- App ID: ${(e==null?void 0:e.id)??(i==null?void 0:i.id)??"unknown"}`,`- Domain: ${(e==null?void 0:e.domain)??(i==null?void 0:i.domain)??(c==null?void 0:c.metadata.domain)??"unknown"}`,`- Lifecycle: ${(e==null?void 0:e.lifecycle)??(i==null?void 0:i.lifecycle)??(c==null?void 0:c.metadata.lifecycle)??"draft"}`,`- Audience: ${(e==null?void 0:e.audience)??(i==null?void 0:i.audience)??(c==null?void 0:c.metadata.audience)??"stakeholder"}`,`- Owners: ${((e==null?void 0:e.owners)??(i==null?void 0:i.owners)??[]).join(", ")||"owner@local"}`,"","## Pages","",...l.length?l.map(x=>`- ${x.title} (${x.itemCount} tiles)`):["- No dashboard pages found."],"","## Governed Blocks","",...h.length?h.map(x=>`- ${x}`):["- No block-backed tiles found."],"","## Supporting Assets","",`- Notebooks: ${s.length}`,`- Pinned insights: ${d.length}`,`- Drafts needing review: ${o.length}`,""].join(`
|
|
49
|
+
`)}
|
|
50
|
+
`}function st({children:e,tone:r="certified"}){return t.jsx("span",{className:`dql-app-seal ${r}`,children:e})}function fr({label:e,value:r}){return t.jsxs("span",{children:[t.jsx("small",{children:e}),t.jsx("b",{children:r})]})}function xa({label:e,value:r}){return t.jsxs("div",{className:"dql-app-keyvalue-inline",children:[t.jsx("span",{children:e}),t.jsx("b",{children:r})]})}function vs(e,r){const a=Bt(r)||"Review this app result.",i=typeof e=="string"?e.trim():"";if(!i)return a;const n=ys(i);if(n)return n;const l=i.replace(/\bCurrent app filters:\s*[\s\S]*$/i,"").replace(/\bCertified block to start from:\s*[\s\S]*$/i,"").replace(/\bSource result:\s*[\s\S]*$/i,"").replace(/\bUser intent:\s*[\s\S]*$/i,"");return Bt(l)||a}function ys(e){const a=/(?:^|\n)\s*(Analysis goal|Analysis question|Report question|Research question|Proof question|Evidence question|Validation question|Reusable block goal|Business question|Question):\s*/i.exec(e);if(!a)return"";const i=(a.index??0)+a[0].length,n=e.slice(i),l=n.search(/(?:^|\n)\s*(Current app filters|Certified block to start from|Source result|User intent|Review status|Trust status):/i),s=l>=0?n.slice(0,l):n;return Bt(s)}function Bt(e){const r=e.replace(/^\/(ask|research|report|analy[sz]e|analysis|proof|evidence|validate|verify|add\s+block|create\s+block|draft\s+block|block)\b/i,"").replace(/\s+/g," ").trim();if(r.length<=280)return r;const a=r.slice(0,280).replace(/\s+\S*$/,"").trim();return a?`${a}...`:r.slice(0,280)}function qs(e){var O,F;const r=Se(e.metrics),a=Se(e.context),i=Se(e.evidence),n=Se(i.planner),l=ws(a,i,n),s=Se(a.focusBlock),o=Lr(e),d=Se(o==null?void 0:o.result),c=Array.isArray(d.rows)?d.rows.length:0,h=vs(a.userProvidedContext,e.question),f=typeof a.actionMode=="string"?a.actionMode:void 0,x=String(r.context??s.title??e.sourceBlockId??"selected app result"),y=String(a.activeFilterSummary??_s(Se(a.activeFilters))),T=Is(e.intent,f),z=zs(e,h,f,x),m=As(T,h,x,y),I=((O=e.summary)==null?void 0:O.trim())||`DQL wrote review-required analysis for ${x}: ${e.question}. The selected app result is available, but this analysis still needs human review before it becomes governed business logic.`,A=((F=e.recommendation)==null?void 0:F.trim())||"Use this as analyst-reviewed analysis first. Confirm the metric grain, filters, source tables, and caveats before adding it to the app or drafting a reusable DQL block.",W=[{label:String(r.currentLabel??"Current"),value:$t(r.currentValue),detail:String(r.currentDetail??"current selected result")},{label:String(r.baselineLabel??"Baseline"),value:$t(r.baselineValue),detail:String(r.baselineDetail??"comparison or prior value")},{label:String(r.deltaLabel??"Delta"),value:$t(r.delta),detail:String(r.deltaDetail??"change or gap to explain")},{label:"Preview",value:c?`${c} rows`:"not captured",detail:"bounded preview sample"}].filter(Ss),N=Ns(e),b=c>0||W.length>0||N.length>0||Object.keys(r).length>0,E=Bs(e.reportSections).filter(M=>ks(M,e.error,b));return{title:z,intent:e.intent,actionMode:f,scope:m,summary:I,recommendation:A,routeDecision:l,sections:E,previewIssue:js(e.error,typeof n.sqlErrorKind=="string"?n.sqlErrorKind:void 0,b),contextFacts:[{label:"Type",value:T},{label:"Source",value:x},{label:"Filters",value:y},{label:"Review",value:Be(e.reviewStatus)}],keyNumbers:W,drivers:N}}function ws(e,r,a){const i=Se(e.originatingAnswer),n=Se(e.routeDecision),l=Se(i.decision),s=Se(r.routeDecision),o=Se(a.routeDecision),d=Object.keys(n).length?n:Object.keys(l).length?l:Object.keys(s).length?s:Object.keys(o).length?o:{},c=typeof d.reason=="string"?d.reason.trim():"",h=typeof d.nextAction=="string"?d.nextAction.trim():"";if(!c&&!h)return null;const f=typeof d.mode=="string"&&d.mode.trim()?Be(d.mode):"Analysis",x=typeof d.confidence=="number"&&Number.isFinite(d.confidence)?Math.round(Math.max(0,Math.min(1,d.confidence))*100):void 0;return{mode:f,reason:c,nextAction:h,confidence:x}}function js(e,r,a=!1){const i=e==null?void 0:e.trim();return!i||a&&(r==="runtime_unavailable"||r==="unknown"||/\bAI provider did not return a governed answer\b/i.test(i))?null:r==="runtime_unavailable"?{message:"Preview could not run because the warehouse or execution runtime is unavailable. Resume or choose an active warehouse, then refresh the report. The SQL may not need to change.",canRebuild:!1}:r==="timeout"?{message:"Preview timed out. Narrow filters or simplify the SQL in the trace appendix, then refresh before promoting this report.",canRebuild:!1}:r==="safety"?{message:"DQL blocked this preview because the SQL is not safe read-only analytical SQL. Rebuild from the certified block or edit it as a SELECT/WITH query before refreshing.",canRebuild:!0}:{message:"SQL preview needs review. Edit the SQL in the trace appendix or rebuild it from the certified block context before promoting this report.",canRebuild:!0}}function ks(e,r,a){const i=String(e.id??"").toLowerCase();return!(e.kind==="review_boundary"||i==="review-boundary"||i==="preview-unavailable"&&a||i==="sql-repair-path"&&a&&/\bAI provider did not return a governed answer\b/i.test(r??""))}function Ss(e){const r=e.value.trim().toLowerCase();return!!r&&r!=="n/a"&&r!=="not captured"&&r!=="not available"}function zs(e,r,a,i){const n=Xt(r)||Xt(e.title)||Xt(e.question),l=a==="block"?"Reusable logic":a==="evidence"?"Proof brief":"Analysis",s=Be(i);return`${l}: ${Cs(n||s)}`}function As(e,r,a,i){const n=Xt(r);return[n?`Question: ${n}`:"",`Source: ${a}`,i&&i!=="No app filters set"?`Filters: ${i}`:"",`Status: ${e} / review-required`].filter(Boolean).join(" · ")}function Xt(e){return Bt(String(e??"")).replace(/^(analysis|report|research|proof|proof brief|reusable logic|reusable logic brief|change analysis|driver analysis|segment comparison|entity drilldown|anomaly review|validation result)\s*:\s*/i,"").replace(/^(analysis goal|analysis question|report question|research question|proof question|evidence question|validation question|reusable block goal|business question|question)\s*:\s*/i,"").trim()}function Cs(e){const r=e.replace(/\s+/g," ").trim();return r.length<=96?r:`${r.slice(0,96).replace(/\s+\S*$/,"").trim()||r.slice(0,96)}...`}function Is(e,r){return r==="evidence"?"Proof Brief":r==="block"?"Reusable Logic Brief":e==="diagnose_change"?"Change Analysis":e==="segment_compare"?"Segment Comparison":e==="entity_drilldown"?"Entity Drilldown":e==="anomaly_investigation"?"Anomaly Review":e==="trust_gap_review"?"Proof Review":"Driver Analysis"}function Ns(e){const r=(e.driverCards??[]).map(Se).filter(l=>Object.keys(l).length>0);if(r.length)return r.slice(0,8).map((l,s)=>({title:String(l.title??`Driver ${s+1}`),value:String(l.contribution??l.value??l.metric??"Proof"),explanation:String(l.explanation??"Review this driver against the source rows and metric grain.")}));const a=Lr(e),i=Se(a==null?void 0:a.result);return(Array.isArray(i.rows)?i.rows.map(Se).filter(l=>Object.keys(l).length>0):[]).slice(0,5).map((l,s)=>{const o=Object.keys(l),d=o.find(h=>/name|player|customer|account|segment|team/i.test(h))??o[0]??`row_${s+1}`,c=o.find(h=>/point|revenue|total|score|value|delta|count/i.test(h)&&h!==d)??o[1]??d;return{title:String(l[d]??`Preview row ${s+1}`),value:$t(l[c]),explanation:`This row is part of the bounded preview sample for ${Be(c)}.`}})}function Ts(e){var T,z;if(e.sections.length>0)return e.sections.map(m=>{var A;const I=(A=m.bullets)!=null&&A.length?`
|
|
51
|
+
|
|
52
|
+
${m.bullets.map(W=>`- ${W}`).join(`
|
|
53
|
+
`)}`:"";return`## ${m.title}
|
|
54
|
+
${m.body}${I}`}).join(`
|
|
55
|
+
|
|
56
|
+
`);const r=e.keyNumbers.find(m=>m.value!=="not available"&&m.label!=="Preview"),a=e.keyNumbers.find(m=>/baseline|comparison|next/i.test(m.label)&&m.value!=="not available"),i=e.keyNumbers.find(m=>/delta|gap|change/i.test(m.label)&&m.value!=="not available"),n=e.drivers[0],l=e.drivers[1],s=(T=e.contextFacts.find(m=>m.label==="Source"))==null?void 0:T.value,o=(z=e.contextFacts.find(m=>m.label==="Filters"))==null?void 0:z.value,d=[r?`${r.label}: ${r.value} (${r.detail})`:"",a?`${a.label}: ${a.value} (${a.detail})`:"",i?`${i.label}: ${i.value} (${i.detail})`:""].filter(Boolean).join("; "),c=n?`${n.title} is the strongest visible driver in this bounded preview${n.value?` (${n.value})`:""}.${l?` The next visible comparison is ${l.title}${l.value?` (${l.value})`:""}.`:""}`:"The report does not yet have ranked drivers. Add a clearer metric, time grain, or segment field before treating the analysis as complete.",h=[s?`source: ${s}`:"",o?`filters: ${o}`:""].filter(Boolean).join("; "),f=e.actionMode==="block"?"## Reusable logic decision":e.actionMode==="evidence"||e.intent==="trust_gap_review"?"## Validation result":"## Business interpretation",x=e.actionMode==="block"?"This is a candidate reusable block design, not a certified answer yet. Preserve the business question, parameter defaults, allowed filters, output grain, and proof path before certification.":e.actionMode==="evidence"||e.intent==="trust_gap_review"?`The claim should be treated as validated only inside this bounded analysis context${h?` (${h})`:""}. Use the appendix when a reviewer needs SQL, preview rows, caveats, or source trace.`:`${c} Treat the conclusion as a directional stakeholder explanation until the analyst confirms SQL, grain, filters, joins, and lineage.`,y=["## Executive answer",e.summary,f,x];return d&&y.push("## Key numbers",`The bounded preview shows ${d}. These numbers are useful for review and stakeholder framing but still need source validation before promotion.`),y.push("## Recommended next step",e.recommendation,"## Review boundary","This report is AI-generated and review-required. Use it to guide analysis, then validate SQL, grain, filters, joins, and source proof before pinning it to the app or turning it into a reusable DQL block."),y.join(`
|
|
57
|
+
|
|
58
|
+
`)}function Ps({sections:e}){return t.jsx("div",{className:"dql-app-report-dynamic-sections",children:e.map(r=>{var a;return t.jsxs("section",{className:`dql-app-report-dynamic-section tone-${r.tone??"neutral"}`,children:[t.jsxs("div",{className:"dql-app-report-dynamic-head",children:[t.jsx("span",{children:Rs(r)}),t.jsx("h3",{children:r.title})]}),t.jsx($s,{text:r.body}),(a=r.bullets)!=null&&a.length?t.jsx("ul",{children:r.bullets.map(i=>t.jsx("li",{children:i},i))}):null]},r.id)})})}function $s({text:e}){const r=e.split(/\n{2,}/).map(a=>a.replace(/\s*\n\s*/g," ").trim()).filter(Boolean);return r.length?t.jsx("div",{className:"dql-app-report-memo-body",children:r.map(a=>t.jsx("p",{children:a},a))}):null}function Rs(e){switch(e.kind){case"executive_answer":return"Answer";case"business_interpretation":return"Interpretation";case"key_numbers":return"Numbers";case"validation":return"Proof";case"reusable_logic":return"Reusable logic";case"recommended_next_step":return"Next step";case"review_boundary":return"Review boundary";default:return/focus/i.test(e.title)?"Scope":/repair|preview|sql/i.test(e.title)?"Appendix note":"Report note"}}function Bs(e){return Array.isArray(e)?e.filter(r=>!!r&&typeof r.title=="string"&&r.title.trim().length>0&&typeof r.body=="string"&&r.body.trim().length>0).slice(0,8).map((r,a)=>({...r,id:r.id||`section-${a+1}`,title:r.title.trim(),body:r.body.trim(),bullets:Array.isArray(r.bullets)?r.bullets.filter(Boolean).slice(0,8):void 0,evidenceRefs:Array.isArray(r.evidenceRefs)?r.evidenceRefs.filter(Boolean).slice(0,8):void 0})):[]}function Es({drivers:e}){if(!e.length)return t.jsx("p",{className:"dql-app-report-muted",children:"No ranked drivers are available yet. Refresh the report after adding a clearer metric, time grain, or comparison group."});const r=e.slice(0,6).map(i=>({...i,numericValue:Math.abs(Ls(i.value))})),a=Math.max(...r.map(i=>i.numericValue),0);return t.jsx("div",{className:"dql-app-report-driver-chart","aria-label":"Report driver chart",children:r.map((i,n)=>{const l=a>0?Math.max(8,Math.round(i.numericValue/a*100)):28;return t.jsxs("div",{className:"dql-app-report-driver-bar",children:[t.jsxs("div",{children:[t.jsx("b",{children:i.title}),t.jsx("span",{children:i.value})]}),t.jsx("i",{style:{"--driver-width":`${l}%`}}),t.jsx("p",{children:i.explanation})]},`${i.title}-${n}`)})})}function Ls(e){const r=e.replace(/,/g,"").match(/-?\+?\d+(?:\.\d+)?/);if(!r)return 0;const a=Number(r[0].replace(/^\+/,""));return Number.isFinite(a)?a:0}function _s(e){const r=Object.entries(e).filter(([a])=>a!=="smartView");return r.length?r.map(([a,i])=>`${Be(a)} ${Xa(a,i)}`).join(", "):"No app filters set"}function Os({investigation:e,tab:r,sqlDraft:a,onSqlDraftChange:i}){if(r==="sql")return t.jsxs("div",{className:"dql-app-research-sql-review",children:[t.jsx("textarea",{value:a,onChange:l=>i(l.target.value),spellCheck:!1,placeholder:"Generated SQL will appear here for review."}),e.error?t.jsx("div",{className:"dql-app-error",children:e.error}):null]});const n=Se(e.evidence);if(r==="assumptions"){const l=Array.isArray(n.assumptions)?n.assumptions:[],s=Se(n.trustStatus);return t.jsxs("div",{className:"dql-app-research-assumptions",children:[l.length?l.map((o,d)=>t.jsx("p",{children:String(o)},d)):t.jsx("p",{children:"Refresh the report to capture assumptions."}),t.jsx(xa,{label:"Trust",value:String(s.label??"AI-generated report")}),t.jsx(xa,{label:"Review",value:e.reviewStatus})]})}return r==="context"?t.jsx("pre",{className:"dql-app-research-code",children:JSON.stringify({certifiedContext:n.certifiedContext,trustStatus:n.trustStatus,planner:n.planner},null,2)}):t.jsx(Ms,{investigation:e})}function Ms({investigation:e}){const r=Lr(e);if(!r)return t.jsx(Ie,{title:"No preview rows yet.",detail:"Refresh the report with SQL or selected tile results to capture proof.",compact:!0});const a=Se(r.result),i=Array.isArray(a.rows)?a.rows.map(Se).filter(l=>!!l).slice(0,8):[],n=Array.isArray(a.columns)?a.columns.map(String).slice(0,8):Object.keys(i[0]??{}).slice(0,8);return!i.length||!n.length?t.jsx(Ie,{title:"No preview rows yet.",detail:"The report captured proof, but no row preview was available.",compact:!0}):t.jsx("div",{className:"dql-app-research-table",children:t.jsxs("table",{children:[t.jsx("thead",{children:t.jsx("tr",{children:n.map(l=>t.jsx("th",{children:Be(l)},l))})}),t.jsx("tbody",{children:i.map((l,s)=>t.jsx("tr",{children:n.map(o=>t.jsx("td",{children:Vs(l[o])},o))},s))})]})})}function Lr(e){return(Array.isArray(e.resultPreviews)?e.resultPreviews:[]).map(Se).find(a=>!!a.result)??null}function Tt(e,r){const a=e.filter(i=>i.id!==r.id);return jr([r,...a])}function jr(e){return[...e].sort((r,a)=>fa(a)-fa(r))}function fa(e){const r=new Date(e.updatedAt||e.lastRunAt||e.createdAt).getTime();return Number.isFinite(r)?r:0}function Ja(e){const r=e.title.replace(/^\s*(write\s+the\s+report\s+brief|the\s+research\s+question|research\s+question)\s*:\s*/i,"").replace(/^\s*research\b/i,"Analysis").replace(/^\s*report\b/i,"Analysis").trim(),a=Be(r||e.title);return a.length<=64?a:`${a.slice(0,61).trim()}...`}function Ws(e){const r=e.status==="error"?"Needs SQL review":e.status==="ready"?"Ready":e.status==="running"?"Running":"Draft",a=Fs(e.updatedAt||e.lastRunAt||e.createdAt);return`${Be(e.intent)} / ${r}${a?` / ${a}`:""}`}function Fs(e){if(!e)return"";const r=new Date(e).getTime();if(!Number.isFinite(r))return"";const a=Math.max(0,Date.now()-r),i=Math.floor(a/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const n=Math.floor(i/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}function $t(e){return typeof e=="number"&&Number.isFinite(e)?Math.abs(e)>=100?Math.round(e).toLocaleString():Number(e.toFixed(2)).toLocaleString():typeof e=="string"&&e.trim()?e:"n/a"}function Vs(e){return e==null?"":typeof e=="number"?$t(e):typeof e=="string"?e:JSON.stringify(e)}function Se(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function ut({icon:e,children:r}){return t.jsxs("div",{className:"dql-app-panel-card",children:[t.jsx("span",{children:e}),t.jsx("div",{children:r})]})}function Ie({title:e,detail:r,compact:a=!1}){return t.jsxs("div",{className:`dql-app-empty ${a?"compact":""}`,children:[t.jsx(ft,{size:a?24:34,strokeWidth:1.5}),t.jsx("b",{children:e}),t.jsx("span",{children:r})]})}function Hs({title:e,allowExploration:r,exploreGaps:a,error:i,onChange:n,onExploreGapsChange:l,onCancel:s,onCreate:o}){return t.jsx("div",{className:"dql-app-modal-backdrop",children:t.jsxs("div",{className:"dql-app-modal",children:[t.jsx("h3",{children:"Build a new App page"}),t.jsx("p",{children:"Describe the business question. AI will propose exactly one page for review before changing the App."}),t.jsxs("label",{children:["What should this page answer?",t.jsx("textarea",{value:e,onChange:d=>n(d.target.value),autoFocus:!0,rows:4,placeholder:"Show quarterly revenue drivers by region and segment for leadership."})]}),r?t.jsxs("button",{type:"button",className:`dql-app-page-explore ${a?"on":""}`,onClick:()=>l(!a),"aria-pressed":a,children:[t.jsx("span",{children:a?t.jsx(xt,{size:11,strokeWidth:3}):null}),t.jsx("b",{children:"Explore uncovered gaps with AI SQL"}),t.jsx("small",{children:"Personal App only · bounded preview · review required"})]}):t.jsx("small",{className:"dql-app-page-source-policy",children:"Shared-project pages use certified blocks and governed semantic metrics."}),i?t.jsx("div",{className:"dql-app-error",children:i}):null,t.jsxs("div",{children:[t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-line",onClick:s,children:"Cancel"}),t.jsx("button",{type:"button",className:"dql-apps-btn dql-apps-btn-primary",onClick:o,children:"Create Build Brief"})]})]})})}function Qs(e,r,a,i,n){const l=n.map((s,o)=>({id:s.id||`tile-${o+1}`,title:s.name,kind:"certified_block",description:s.description,blockId:s.name,sourceNodeId:s.id,viz:s.chartType??"table",certification:"certified",reviewStatus:"certified",rationale:"Selected from the certified block palette."}));return{version:2,mode:"stakeholder",publicationIntent:"shared_project",requirements:[{id:"primary",question:r,role:"detail",measures:[],dimensions:[],filters:[]}],requirementCoverage:l.map(s=>({requirementId:"primary",status:"covered",source:"certified_block",tileId:s.id,sourceId:s.sourceNodeId,trustState:"certified",reasons:["Explicitly selected certified block."]})),storyEvidencePlan:{version:1,goal:r,audience:"stakeholder",eligibleTileIds:l.map(s=>s.id)},appId:Ys(e)||"new-app",name:e,prompt:r,skills:Wl.map(s=>({id:s.id,title:s.title,description:s.description})),domain:a,audience:"stakeholder",businessGoal:r,owner:i,lifecycle:"draft",tags:["app-builder"],pages:[{id:"overview",title:"Overview",filters:[],tiles:l}],caveats:[],reviewTasks:[]}}function Ks(e,r){return{all:e.length,mine:e.filter(a=>a.storage==="mine").length,shared:e.filter(a=>(a.storage??"shared")==="shared").length,fav:r.size}}function Gs(e){var r;return((r=e.owners)==null?void 0:r[0])??"owner@local"}function Ys(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}const Xs=`
|
|
59
|
+
.dql-apps-waterline {
|
|
60
|
+
--dql-app-canvas: var(--color-bg-primary, #f7f8fb);
|
|
61
|
+
--dql-app-surface: var(--color-bg-card, #ffffff);
|
|
62
|
+
--dql-app-surface-muted: var(--color-bg-secondary, #f8fafc);
|
|
63
|
+
--dql-app-control: var(--color-bg-sunken, #f4f6f9);
|
|
64
|
+
--dql-app-line: var(--color-border-subtle, rgba(15, 23, 42, 0.10));
|
|
65
|
+
--dql-app-line-2: var(--color-border-primary, rgba(15, 23, 42, 0.16));
|
|
66
|
+
--dql-app-ink: var(--color-text-primary, #0f172a);
|
|
67
|
+
--dql-app-muted: var(--color-text-secondary, #64748b);
|
|
68
|
+
--dql-app-faint: var(--color-text-tertiary, #94a3b8);
|
|
69
|
+
--dql-app-accent: var(--color-accent-blue, #2563eb);
|
|
70
|
+
--dql-app-accent-soft: var(--accent-dim, rgba(37, 99, 235, 0.10));
|
|
71
|
+
--dql-app-deep: #111827;
|
|
72
|
+
--dql-app-green: var(--color-status-success, #16a34a);
|
|
73
|
+
--dql-app-green-soft: var(--status-success-bg, rgba(22, 163, 74, 0.08));
|
|
74
|
+
--dql-app-orange: var(--color-status-warning, #ca8a04);
|
|
75
|
+
--dql-app-orange-soft: var(--status-warning-bg, rgba(202, 138, 4, 0.10));
|
|
76
|
+
--dql-app-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.06);
|
|
77
|
+
--surface: var(--dql-app-surface);
|
|
78
|
+
--surface-hover: var(--dql-app-control);
|
|
79
|
+
--border-color: var(--dql-app-line);
|
|
80
|
+
flex: 1;
|
|
81
|
+
min-height: 0;
|
|
82
|
+
overflow-x: hidden;
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
background: var(--dql-app-canvas);
|
|
85
|
+
color: var(--dql-app-ink);
|
|
86
|
+
font-family: var(--font-ui);
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
line-height: 1.45;
|
|
89
|
+
text-rendering: geometricPrecision;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dql-apps-waterline * {
|
|
93
|
+
letter-spacing: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Per-theme palettes come straight from the Luna tokens the base block maps
|
|
97
|
+
(tokens.css under [data-theme]) — the redesign handoff palette IS the Paper
|
|
98
|
+
token set, so no per-theme hex overrides remain here. Obsidian only mutes
|
|
99
|
+
card shadows. */
|
|
100
|
+
.dql-apps-theme-obsidian {
|
|
101
|
+
--dql-app-deep: #05070b;
|
|
102
|
+
--dql-app-shadow: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dql-apps-wrap {
|
|
106
|
+
width: min(880px, calc(100% - 48px));
|
|
107
|
+
margin: 0 auto;
|
|
108
|
+
padding: 28px 0 40px;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
gap: 12px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dql-apps-createhead h1 {
|
|
115
|
+
margin: 0;
|
|
116
|
+
font-size: 18px;
|
|
117
|
+
line-height: 1.2;
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
letter-spacing: -0.01em;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.dql-apps-createhead p {
|
|
123
|
+
margin: 3px 0 0;
|
|
124
|
+
color: var(--dql-app-faint);
|
|
125
|
+
font-size: 12.5px;
|
|
126
|
+
line-height: 1.55;
|
|
127
|
+
max-width: 720px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Prototype composer card (library) */
|
|
131
|
+
.dql-apps-composer {
|
|
132
|
+
background: var(--dql-app-surface);
|
|
133
|
+
border: 1px solid var(--dql-app-line-2);
|
|
134
|
+
border-radius: 14px;
|
|
135
|
+
box-shadow: 0 1px 2px rgba(26, 26, 26, 0.03), 0 6px 22px rgba(26, 26, 26, 0.05);
|
|
136
|
+
display: flex;
|
|
137
|
+
flex-direction: column;
|
|
138
|
+
}
|
|
139
|
+
.dql-apps-targets {
|
|
140
|
+
display: grid;
|
|
141
|
+
grid-template-columns: 1fr 1fr;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
padding: 10px 10px 2px;
|
|
144
|
+
}
|
|
145
|
+
.dql-apps-targets button {
|
|
146
|
+
display: grid;
|
|
147
|
+
grid-template-columns: auto 1fr;
|
|
148
|
+
align-items: center;
|
|
149
|
+
gap: 2px 7px;
|
|
150
|
+
border: 1px solid var(--dql-app-line);
|
|
151
|
+
border-radius: 9px;
|
|
152
|
+
background: var(--dql-app-control);
|
|
153
|
+
color: var(--dql-app-muted);
|
|
154
|
+
padding: 8px 10px;
|
|
155
|
+
text-align: left;
|
|
156
|
+
font: 750 11.5px var(--font-ui);
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
}
|
|
159
|
+
.dql-apps-targets button.on {
|
|
160
|
+
border-color: var(--dql-app-accent);
|
|
161
|
+
color: var(--dql-app-ink);
|
|
162
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--dql-app-accent) 18%, transparent);
|
|
163
|
+
}
|
|
164
|
+
.dql-apps-targets button small {
|
|
165
|
+
grid-column: 2;
|
|
166
|
+
color: var(--dql-app-faint);
|
|
167
|
+
font-size: 10px;
|
|
168
|
+
font-weight: 500;
|
|
169
|
+
}
|
|
170
|
+
.dql-apps-composer textarea {
|
|
171
|
+
border: 0; background: transparent; resize: none; outline: none;
|
|
172
|
+
padding: 13px 15px 4px;
|
|
173
|
+
font-size: 13.5px; line-height: 1.5;
|
|
174
|
+
color: var(--dql-app-ink); font-family: inherit;
|
|
175
|
+
}
|
|
176
|
+
.dql-apps-composer-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 12px; }
|
|
177
|
+
.dql-apps-composer-row > i { flex: 1; }
|
|
178
|
+
.dql-apps-explore-toggle {
|
|
179
|
+
display: inline-flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
gap: 5px;
|
|
182
|
+
color: var(--dql-app-muted);
|
|
183
|
+
font-size: 10.5px;
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
}
|
|
186
|
+
.dql-apps-explore-toggle input { accent-color: var(--dql-app-accent); }
|
|
187
|
+
.dql-apps-composer-chip {
|
|
188
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
189
|
+
padding: 4px 9px; border-radius: 8px;
|
|
190
|
+
border: 1px solid var(--dql-app-line);
|
|
191
|
+
background: var(--dql-app-canvas);
|
|
192
|
+
font-size: 11.5px; color: var(--dql-app-muted); white-space: nowrap;
|
|
193
|
+
}
|
|
194
|
+
.dql-apps-composer-chip svg { color: var(--dql-app-green); }
|
|
195
|
+
.dql-apps-composer-blank {
|
|
196
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
197
|
+
height: 30px; padding: 0 11px;
|
|
198
|
+
border-radius: 8px; border: 1px solid var(--dql-app-line);
|
|
199
|
+
background: var(--dql-app-surface); color: var(--dql-app-muted);
|
|
200
|
+
font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit;
|
|
201
|
+
}
|
|
202
|
+
.dql-apps-composer-blank:hover { background: var(--dql-app-surface-muted); }
|
|
203
|
+
.dql-apps-composer-send {
|
|
204
|
+
width: 34px; height: 34px; border-radius: 10px; border: 0;
|
|
205
|
+
background: var(--dql-app-accent); color: #fff;
|
|
206
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
207
|
+
cursor: pointer; box-shadow: 0 1px 5px rgba(107, 93, 211, 0.3);
|
|
208
|
+
}
|
|
209
|
+
.dql-apps-composer-send:hover { filter: brightness(0.95); }
|
|
210
|
+
.dql-apps-composer-send:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
|
|
211
|
+
.dql-apps-try { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
212
|
+
.dql-apps-try > span { font-size: 10.5px; color: var(--dql-app-faint); }
|
|
213
|
+
.dql-apps-try button {
|
|
214
|
+
border: 1px solid var(--dql-app-line);
|
|
215
|
+
background: var(--dql-app-surface);
|
|
216
|
+
color: var(--dql-app-muted);
|
|
217
|
+
border-radius: 999px; padding: 3.5px 11px;
|
|
218
|
+
font-size: 11px; font-weight: 550; cursor: pointer; font-family: inherit;
|
|
219
|
+
}
|
|
220
|
+
.dql-apps-try button:hover { border-color: var(--dql-app-accent); color: var(--dql-app-accent); background: var(--dql-app-accent-soft); }
|
|
221
|
+
|
|
222
|
+
.dql-apps-btn {
|
|
223
|
+
height: 32px;
|
|
224
|
+
border-radius: 8px;
|
|
225
|
+
border: 1px solid transparent;
|
|
226
|
+
padding: 0 12px;
|
|
227
|
+
display: inline-flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
justify-content: center;
|
|
230
|
+
gap: 7px;
|
|
231
|
+
font: 750 12px var(--font-ui);
|
|
232
|
+
cursor: pointer;
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.dql-apps-btn:disabled { opacity: 0.62; cursor: not-allowed; }
|
|
237
|
+
.dql-apps-btn-primary { background: var(--dql-app-accent); color: #fff; }
|
|
238
|
+
.dql-apps-btn-line { background: var(--dql-app-surface); border-color: var(--dql-app-line-2); color: var(--dql-app-ink); }
|
|
239
|
+
.dql-apps-btn-icon { width: 32px; padding: 0; flex: none; }
|
|
240
|
+
.dql-apps-btn-icon:hover,
|
|
241
|
+
.dql-apps-btn-icon.on { color: var(--dql-app-accent); border-color: rgba(79, 99, 215, 0.34); background: var(--dql-app-accent-soft); }
|
|
242
|
+
.dql-apps-btn-dark { width: 100%; background: var(--dql-app-deep); border-color: #1f2937; color: #fff; margin-top: 12px; }
|
|
243
|
+
|
|
244
|
+
.dql-apps-ai-entry {
|
|
245
|
+
margin-top: 18px;
|
|
246
|
+
border: 1px solid rgba(79, 99, 215, 0.26);
|
|
247
|
+
border-radius: 12px;
|
|
248
|
+
background: var(--dql-app-surface);
|
|
249
|
+
box-shadow: var(--dql-app-shadow);
|
|
250
|
+
padding: 16px;
|
|
251
|
+
display: grid;
|
|
252
|
+
gap: 12px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.dql-apps-ai-entry-head {
|
|
256
|
+
display: flex;
|
|
257
|
+
align-items: center;
|
|
258
|
+
justify-content: space-between;
|
|
259
|
+
gap: 10px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.dql-apps-ai-entry-head span,
|
|
263
|
+
.dql-apps-ai-entry-head b {
|
|
264
|
+
display: inline-flex;
|
|
265
|
+
align-items: center;
|
|
266
|
+
gap: 6px;
|
|
267
|
+
font: 850 11px var(--font-ui);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.dql-apps-ai-entry-head span {
|
|
271
|
+
color: var(--dql-app-accent);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.dql-apps-ai-entry-head b {
|
|
275
|
+
color: var(--dql-app-green);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.dql-apps-ai-entry-box {
|
|
279
|
+
display: grid;
|
|
280
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
281
|
+
align-items: end;
|
|
282
|
+
gap: 12px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.dql-apps-ai-entry-box textarea {
|
|
286
|
+
width: 100%;
|
|
287
|
+
min-height: 112px;
|
|
288
|
+
resize: vertical;
|
|
289
|
+
border: 1px solid var(--dql-app-line-2);
|
|
290
|
+
border-radius: 10px;
|
|
291
|
+
background: var(--dql-app-control);
|
|
292
|
+
color: var(--dql-app-ink);
|
|
293
|
+
outline: 0;
|
|
294
|
+
padding: 13px 14px;
|
|
295
|
+
font: 540 15px/1.5 var(--font-ui);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.dql-apps-ai-entry-box textarea:focus {
|
|
299
|
+
border-color: rgba(79, 99, 215, 0.52);
|
|
300
|
+
box-shadow: 0 0 0 3px rgba(79, 99, 215, 0.1);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.dql-apps-ai-entry-box button {
|
|
304
|
+
height: 46px;
|
|
305
|
+
border: 0;
|
|
306
|
+
border-radius: 10px;
|
|
307
|
+
background: var(--dql-app-accent);
|
|
308
|
+
color: #fff;
|
|
309
|
+
padding: 0 16px;
|
|
310
|
+
display: inline-flex;
|
|
311
|
+
align-items: center;
|
|
312
|
+
justify-content: center;
|
|
313
|
+
gap: 7px;
|
|
314
|
+
font: 800 12.5px var(--font-ui);
|
|
315
|
+
cursor: pointer;
|
|
316
|
+
box-shadow: 0 12px 26px rgba(79, 99, 215, 0.2);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.dql-apps-ai-entry-box button:disabled {
|
|
320
|
+
opacity: 0.6;
|
|
321
|
+
cursor: not-allowed;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.dql-apps-ai-entry-foot {
|
|
325
|
+
display: flex;
|
|
326
|
+
align-items: center;
|
|
327
|
+
justify-content: space-between;
|
|
328
|
+
gap: 10px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.dql-apps-ai-entry-foot > div {
|
|
332
|
+
min-width: 0;
|
|
333
|
+
display: flex;
|
|
334
|
+
flex-wrap: wrap;
|
|
335
|
+
gap: 6px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.dql-apps-ai-entry-foot button {
|
|
339
|
+
border: 1px solid var(--dql-app-line);
|
|
340
|
+
border-radius: 999px;
|
|
341
|
+
background: var(--dql-app-surface);
|
|
342
|
+
color: var(--dql-app-muted);
|
|
343
|
+
padding: 6px 9px;
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
gap: 5px;
|
|
347
|
+
font: 750 11.5px var(--font-ui);
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.dql-apps-ai-entry-foot button:hover {
|
|
352
|
+
color: var(--dql-app-accent);
|
|
353
|
+
border-color: rgba(79, 99, 215, 0.32);
|
|
354
|
+
background: var(--dql-app-accent-soft);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.dql-apps-ai-entry-secondary {
|
|
358
|
+
flex: none;
|
|
359
|
+
color: var(--dql-app-ink) !important;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.dql-apps-sectionhead {
|
|
363
|
+
margin: 30px 0 14px;
|
|
364
|
+
display: flex;
|
|
365
|
+
align-items: center;
|
|
366
|
+
gap: 12px;
|
|
367
|
+
color: var(--dql-app-muted);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.dql-apps-sectionhead span,
|
|
371
|
+
.dql-app-eyebrow {
|
|
372
|
+
font-family: var(--font-mono);
|
|
373
|
+
font-size: 10px;
|
|
374
|
+
letter-spacing: 0;
|
|
375
|
+
text-transform: uppercase;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.dql-apps-sectionhead i { flex: 1; border-top: 1px solid var(--dql-app-line); }
|
|
379
|
+
.dql-apps-sectionhead b { font-family: var(--font-mono); font-size: 10px; color: var(--dql-app-faint); }
|
|
380
|
+
|
|
381
|
+
.dql-apps-libbar {
|
|
382
|
+
display: flex;
|
|
383
|
+
align-items: center;
|
|
384
|
+
gap: 12px;
|
|
385
|
+
margin-bottom: 16px;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.dql-apps-filter-tabs {
|
|
389
|
+
display: flex;
|
|
390
|
+
gap: 3px;
|
|
391
|
+
border: 1px solid var(--dql-app-line);
|
|
392
|
+
border-radius: 999px;
|
|
393
|
+
background: var(--dql-app-control);
|
|
394
|
+
padding: 4px;
|
|
395
|
+
flex-wrap: wrap;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.dql-apps-filter-tabs button {
|
|
399
|
+
border: 0;
|
|
400
|
+
background: transparent;
|
|
401
|
+
border-radius: 999px;
|
|
402
|
+
padding: 6px 12px;
|
|
403
|
+
cursor: pointer;
|
|
404
|
+
color: var(--dql-app-muted);
|
|
405
|
+
font: 800 12px var(--font-ui);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.dql-apps-filter-tabs button.on { background: var(--dql-app-surface); color: var(--dql-app-ink); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
|
|
409
|
+
.dql-apps-filter-tabs span { margin-left: 5px; color: var(--dql-app-accent); font-family: var(--font-mono); font-size: 10px; }
|
|
410
|
+
|
|
411
|
+
.dql-apps-search {
|
|
412
|
+
flex: 1;
|
|
413
|
+
min-width: 220px;
|
|
414
|
+
height: 38px;
|
|
415
|
+
display: flex;
|
|
416
|
+
align-items: center;
|
|
417
|
+
gap: 8px;
|
|
418
|
+
background: var(--dql-app-surface);
|
|
419
|
+
border: 1px solid var(--dql-app-line);
|
|
420
|
+
border-radius: 7px;
|
|
421
|
+
padding: 0 12px;
|
|
422
|
+
color: var(--dql-app-faint);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.dql-apps-search input {
|
|
426
|
+
flex: 1;
|
|
427
|
+
min-width: 0;
|
|
428
|
+
border: 0;
|
|
429
|
+
outline: 0;
|
|
430
|
+
background: transparent;
|
|
431
|
+
color: var(--dql-app-ink);
|
|
432
|
+
font: 13px var(--font-ui);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.dql-apps-grid {
|
|
436
|
+
display: grid;
|
|
437
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
438
|
+
gap: 16px;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.dql-app-card {
|
|
442
|
+
min-width: 0;
|
|
443
|
+
border: 1px solid var(--dql-app-line);
|
|
444
|
+
border-radius: 8px;
|
|
445
|
+
background: var(--dql-app-surface);
|
|
446
|
+
overflow: hidden;
|
|
447
|
+
box-shadow: var(--dql-app-shadow);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.dql-app-card-body {
|
|
451
|
+
padding: 16px;
|
|
452
|
+
cursor: pointer;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.dql-app-card-top {
|
|
456
|
+
display: flex;
|
|
457
|
+
align-items: flex-start;
|
|
458
|
+
justify-content: space-between;
|
|
459
|
+
gap: 10px;
|
|
460
|
+
margin-bottom: 9px;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.dql-app-star {
|
|
464
|
+
width: 28px;
|
|
465
|
+
height: 28px;
|
|
466
|
+
border-radius: 6px;
|
|
467
|
+
border: 1px solid var(--dql-app-line);
|
|
468
|
+
background: var(--dql-app-surface);
|
|
469
|
+
color: var(--dql-app-faint);
|
|
470
|
+
display: inline-flex;
|
|
471
|
+
align-items: center;
|
|
472
|
+
justify-content: center;
|
|
473
|
+
cursor: pointer;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.dql-app-star.on { color: var(--dql-app-accent); background: var(--dql-app-accent-soft); border-color: rgba(37, 99, 235, 0.35); }
|
|
477
|
+
.dql-app-card h3 { margin: 13px 0 0; font-size: 17px; line-height: 1.2; }
|
|
478
|
+
.dql-app-card p { min-height: 54px; margin: 7px 0 0; color: var(--dql-app-muted); font-size: 12px; line-height: 1.5; }
|
|
479
|
+
|
|
480
|
+
.dql-app-card-mini {
|
|
481
|
+
margin-top: 13px;
|
|
482
|
+
display: grid;
|
|
483
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
484
|
+
gap: 6px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.dql-app-card-mini span {
|
|
488
|
+
border-radius: 6px;
|
|
489
|
+
background: var(--dql-app-control);
|
|
490
|
+
padding: 7px 9px;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.dql-app-card-mini small {
|
|
494
|
+
display: block;
|
|
495
|
+
font-family: var(--font-mono);
|
|
496
|
+
font-size: 7.5px;
|
|
497
|
+
letter-spacing: 0;
|
|
498
|
+
text-transform: uppercase;
|
|
499
|
+
color: var(--dql-app-muted);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.dql-app-card-mini b { display: block; margin-top: 1px; font-size: 15px; }
|
|
503
|
+
|
|
504
|
+
.dql-app-card-signals {
|
|
505
|
+
margin-top: 12px;
|
|
506
|
+
display: flex;
|
|
507
|
+
flex-wrap: wrap;
|
|
508
|
+
gap: 7px;
|
|
509
|
+
color: var(--dql-app-muted);
|
|
510
|
+
font: 700 10px var(--font-mono);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.dql-app-card-signals span {
|
|
514
|
+
display: inline-flex;
|
|
515
|
+
align-items: center;
|
|
516
|
+
gap: 5px;
|
|
517
|
+
min-height: 24px;
|
|
518
|
+
padding: 4px 8px;
|
|
519
|
+
border: 1px solid var(--dql-app-line);
|
|
520
|
+
border-radius: 7px;
|
|
521
|
+
background: var(--dql-app-surface-muted);
|
|
522
|
+
white-space: nowrap;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.dql-app-card-depth {
|
|
526
|
+
min-height: 42px;
|
|
527
|
+
display: flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
gap: 8px;
|
|
530
|
+
padding: 8px 16px;
|
|
531
|
+
border-top: 1px solid var(--dql-app-line);
|
|
532
|
+
background: var(--dql-app-surface-muted);
|
|
533
|
+
font-family: var(--font-mono);
|
|
534
|
+
font-size: 10px;
|
|
535
|
+
color: var(--dql-app-muted);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.dql-app-card-depth span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
539
|
+
.dql-app-card-depth button { border: 0; background: transparent; color: var(--dql-app-accent); cursor: pointer; font: 800 11px var(--font-ui); }
|
|
540
|
+
.dql-app-card-act {
|
|
541
|
+
display: inline-flex;
|
|
542
|
+
align-items: center;
|
|
543
|
+
gap: 5px;
|
|
544
|
+
flex: none !important;
|
|
545
|
+
min-height: 26px;
|
|
546
|
+
padding: 0 10px;
|
|
547
|
+
border: 1px solid var(--dql-app-line) !important;
|
|
548
|
+
border-radius: 6px;
|
|
549
|
+
background: var(--dql-app-surface) !important;
|
|
550
|
+
color: var(--dql-app-muted) !important;
|
|
551
|
+
font: 650 11px var(--font-ui) !important;
|
|
552
|
+
transition: border-color 0.12s ease, color 0.12s ease;
|
|
553
|
+
}
|
|
554
|
+
.dql-app-card-act:hover {
|
|
555
|
+
border-color: var(--dql-app-accent) !important;
|
|
556
|
+
color: var(--dql-app-accent) !important;
|
|
557
|
+
}
|
|
558
|
+
.dql-app-card-act.danger:hover {
|
|
559
|
+
border-color: var(--status-error-border) !important;
|
|
560
|
+
color: var(--status-error) !important;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.dql-app-block-cite i,
|
|
564
|
+
.dql-app-plan-item > i {
|
|
565
|
+
width: 7px;
|
|
566
|
+
height: 7px;
|
|
567
|
+
border-radius: 999px;
|
|
568
|
+
background: var(--dql-app-green);
|
|
569
|
+
flex: none;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.dql-app-block-cite i.draft,
|
|
573
|
+
.dql-app-plan-item > i.draft { background: var(--dql-app-orange); }
|
|
574
|
+
|
|
575
|
+
.dql-app-seal {
|
|
576
|
+
display: inline-flex;
|
|
577
|
+
align-items: center;
|
|
578
|
+
gap: 5px;
|
|
579
|
+
border-radius: 999px;
|
|
580
|
+
min-height: 22px;
|
|
581
|
+
padding: 2px 9px;
|
|
582
|
+
width: fit-content;
|
|
583
|
+
border: 1px solid rgba(22, 163, 74, 0.26);
|
|
584
|
+
background: var(--dql-app-green-soft);
|
|
585
|
+
color: var(--dql-app-green);
|
|
586
|
+
font-family: var(--font-mono);
|
|
587
|
+
font-size: 10.5px;
|
|
588
|
+
font-weight: 700;
|
|
589
|
+
letter-spacing: 0;
|
|
590
|
+
text-transform: uppercase;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.dql-app-seal::before {
|
|
594
|
+
content: "";
|
|
595
|
+
width: 6px;
|
|
596
|
+
height: 6px;
|
|
597
|
+
border-radius: 999px;
|
|
598
|
+
background: currentColor;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.dql-app-seal.draft { border-color: rgba(202, 138, 4, 0.30); background: var(--dql-app-orange-soft); color: var(--dql-app-orange); }
|
|
602
|
+
.dql-app-seal.agentic { border-color: rgba(37, 99, 235, 0.32); background: var(--dql-app-accent-soft); color: var(--dql-app-accent); }
|
|
603
|
+
|
|
604
|
+
.dql-app-create-shell,
|
|
605
|
+
.dql-app-workspace {
|
|
606
|
+
height: 100%;
|
|
607
|
+
min-height: 0;
|
|
608
|
+
display: grid;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.dql-app-create-shell { grid-template-rows: auto 1fr; overflow: hidden; }
|
|
612
|
+
.dql-app-workspace { grid-template-rows: auto auto 1fr; }
|
|
613
|
+
|
|
614
|
+
.dql-app-buildbar,
|
|
615
|
+
.dql-app-view-topbar {
|
|
616
|
+
min-height: 54px;
|
|
617
|
+
display: flex;
|
|
618
|
+
align-items: center;
|
|
619
|
+
gap: 10px;
|
|
620
|
+
padding: 9px 18px;
|
|
621
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
622
|
+
background: var(--dql-app-surface);
|
|
623
|
+
flex-wrap: wrap;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.dql-app-back {
|
|
627
|
+
width: 30px;
|
|
628
|
+
height: 30px;
|
|
629
|
+
border: 1px solid var(--dql-app-line);
|
|
630
|
+
border-radius: 8px;
|
|
631
|
+
background: var(--dql-app-control);
|
|
632
|
+
display: inline-flex;
|
|
633
|
+
align-items: center;
|
|
634
|
+
justify-content: center;
|
|
635
|
+
color: var(--dql-app-muted);
|
|
636
|
+
cursor: pointer;
|
|
637
|
+
flex: none;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.dql-app-back:hover { color: var(--dql-app-ink); border-color: var(--dql-app-line-2); }
|
|
641
|
+
|
|
642
|
+
.dql-app-back-label {
|
|
643
|
+
width: auto;
|
|
644
|
+
min-width: 72px;
|
|
645
|
+
padding: 0 11px 0 9px;
|
|
646
|
+
gap: 6px;
|
|
647
|
+
justify-content: flex-start;
|
|
648
|
+
color: var(--dql-app-ink);
|
|
649
|
+
font: 750 12px var(--font-ui);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.dql-app-back-label span {
|
|
653
|
+
line-height: 1;
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.dql-app-topbar-divider {
|
|
657
|
+
width: 1px;
|
|
658
|
+
height: 22px;
|
|
659
|
+
background: var(--dql-app-line);
|
|
660
|
+
flex: none;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.dql-app-topbar-filters {
|
|
664
|
+
display: flex;
|
|
665
|
+
align-items: center;
|
|
666
|
+
gap: 8px;
|
|
667
|
+
flex-wrap: wrap;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.dql-app-filter-icon {
|
|
671
|
+
display: inline-flex;
|
|
672
|
+
align-items: center;
|
|
673
|
+
color: var(--dql-app-faint);
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.dql-app-name-input input {
|
|
677
|
+
width: 240px;
|
|
678
|
+
border: 1px solid transparent;
|
|
679
|
+
border-radius: 6px;
|
|
680
|
+
padding: 5px 8px;
|
|
681
|
+
outline: 0;
|
|
682
|
+
background: transparent;
|
|
683
|
+
color: var(--dql-app-ink);
|
|
684
|
+
font: 800 16px var(--font-ui);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.dql-app-name-input input:focus { border-color: var(--dql-app-accent); background: var(--dql-app-control); }
|
|
688
|
+
.dql-app-mode-seg {
|
|
689
|
+
margin: 0 auto;
|
|
690
|
+
display: flex;
|
|
691
|
+
gap: 2px;
|
|
692
|
+
border: 1px solid var(--dql-app-line);
|
|
693
|
+
border-radius: 999px;
|
|
694
|
+
background: var(--dql-app-control);
|
|
695
|
+
padding: 3px;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.dql-app-mode-seg button {
|
|
699
|
+
min-width: 78px;
|
|
700
|
+
border: 0;
|
|
701
|
+
background: transparent;
|
|
702
|
+
border-radius: 999px;
|
|
703
|
+
display: inline-flex;
|
|
704
|
+
align-items: center;
|
|
705
|
+
justify-content: center;
|
|
706
|
+
gap: 6px;
|
|
707
|
+
min-height: 30px;
|
|
708
|
+
padding: 6px 12px;
|
|
709
|
+
color: var(--dql-app-muted);
|
|
710
|
+
cursor: pointer;
|
|
711
|
+
font: 750 12px var(--font-ui);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.dql-app-mode-seg button.on { background: var(--dql-app-deep); color: #fff; }
|
|
715
|
+
|
|
716
|
+
.dql-app-customize-btn {
|
|
717
|
+
display: inline-flex;
|
|
718
|
+
align-items: center;
|
|
719
|
+
justify-content: center;
|
|
720
|
+
gap: 6px;
|
|
721
|
+
min-height: 32px;
|
|
722
|
+
padding: 6px 14px;
|
|
723
|
+
border: 1px solid var(--dql-app-line);
|
|
724
|
+
border-radius: 999px;
|
|
725
|
+
background: var(--dql-app-control);
|
|
726
|
+
color: var(--dql-app-ink);
|
|
727
|
+
cursor: pointer;
|
|
728
|
+
font: 750 12px var(--font-ui);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.dql-app-customize-btn:hover {
|
|
732
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
733
|
+
background: var(--dql-app-accent-soft);
|
|
734
|
+
color: var(--dql-app-accent);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.dql-app-customize-btn.on {
|
|
738
|
+
border-color: var(--dql-app-deep);
|
|
739
|
+
background: var(--dql-app-deep);
|
|
740
|
+
color: #fff;
|
|
741
|
+
}
|
|
742
|
+
.dql-app-build-actions,
|
|
743
|
+
.dql-app-view-actions {
|
|
744
|
+
margin-left: auto;
|
|
745
|
+
display: flex;
|
|
746
|
+
align-items: center;
|
|
747
|
+
gap: 8px;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.dql-app-view-actions { position: relative; }
|
|
751
|
+
|
|
752
|
+
.dql-app-share-popover {
|
|
753
|
+
position: absolute;
|
|
754
|
+
right: 0;
|
|
755
|
+
top: calc(100% + 8px);
|
|
756
|
+
z-index: 20;
|
|
757
|
+
width: min(340px, 80vw);
|
|
758
|
+
border: 1px solid var(--dql-app-line-2);
|
|
759
|
+
border-radius: 8px;
|
|
760
|
+
background: var(--dql-app-surface);
|
|
761
|
+
box-shadow: var(--dql-app-shadow);
|
|
762
|
+
padding: 10px;
|
|
763
|
+
display: grid;
|
|
764
|
+
gap: 7px;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.dql-app-share-popover b {
|
|
768
|
+
color: var(--dql-app-ink);
|
|
769
|
+
font: 850 12px var(--font-ui);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.dql-app-share-popover textarea {
|
|
773
|
+
width: 100%;
|
|
774
|
+
min-height: 92px;
|
|
775
|
+
resize: none;
|
|
776
|
+
border: 1px solid var(--dql-app-line);
|
|
777
|
+
border-radius: 7px;
|
|
778
|
+
background: var(--dql-app-control);
|
|
779
|
+
color: var(--dql-app-ink);
|
|
780
|
+
padding: 8px;
|
|
781
|
+
font: 11px/1.45 var(--font-mono);
|
|
782
|
+
box-sizing: border-box;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.dql-app-promote-popover {
|
|
786
|
+
position: absolute;
|
|
787
|
+
right: 0;
|
|
788
|
+
top: calc(100% + 8px);
|
|
789
|
+
z-index: 21;
|
|
790
|
+
max-width: min(360px, 80vw);
|
|
791
|
+
border: 1px solid rgba(22, 163, 74, 0.28);
|
|
792
|
+
border-radius: 8px;
|
|
793
|
+
background: var(--dql-app-green-soft);
|
|
794
|
+
color: var(--dql-app-ink);
|
|
795
|
+
box-shadow: var(--dql-app-shadow);
|
|
796
|
+
padding: 10px 12px;
|
|
797
|
+
font-size: 12px;
|
|
798
|
+
line-height: 1.4;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.dql-app-promote-popover.error {
|
|
802
|
+
border-color: rgba(202, 138, 4, 0.28);
|
|
803
|
+
background: var(--dql-app-orange-soft);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.dql-app-persona {
|
|
807
|
+
display: inline-flex;
|
|
808
|
+
align-items: center;
|
|
809
|
+
gap: 6px;
|
|
810
|
+
border: 1px solid var(--dql-app-line);
|
|
811
|
+
border-radius: 999px;
|
|
812
|
+
padding: 3px 9px 3px 4px;
|
|
813
|
+
color: var(--dql-app-muted);
|
|
814
|
+
font-size: 12px;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.dql-app-persona b {
|
|
818
|
+
width: 26px;
|
|
819
|
+
height: 26px;
|
|
820
|
+
border-radius: 999px;
|
|
821
|
+
display: inline-flex;
|
|
822
|
+
align-items: center;
|
|
823
|
+
justify-content: center;
|
|
824
|
+
background: var(--dql-app-accent);
|
|
825
|
+
color: #fff;
|
|
826
|
+
font-size: 9px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
.dql-app-create-workspace {
|
|
830
|
+
min-height: 0;
|
|
831
|
+
display: grid;
|
|
832
|
+
grid-template-columns: 380px minmax(420px, 1fr) 300px;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
.dql-app-create-workspace.classic { grid-template-columns: 286px minmax(420px, 1fr) 320px; }
|
|
836
|
+
.dql-app-create-workspace.clean {
|
|
837
|
+
display: block;
|
|
838
|
+
min-height: calc(100vh - 56px);
|
|
839
|
+
overflow: auto;
|
|
840
|
+
padding: 26px;
|
|
841
|
+
background: var(--dql-app-canvas);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.dql-app-ai-start {
|
|
845
|
+
max-width: 1260px;
|
|
846
|
+
margin: 0 auto;
|
|
847
|
+
display: grid;
|
|
848
|
+
grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
|
|
849
|
+
gap: 18px;
|
|
850
|
+
align-items: start;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.dql-app-ai-start-main {
|
|
854
|
+
min-width: 0;
|
|
855
|
+
display: grid;
|
|
856
|
+
gap: 14px;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.dql-app-ai-start-copy h1 {
|
|
860
|
+
margin: 0 0 7px;
|
|
861
|
+
color: var(--dql-app-ink);
|
|
862
|
+
font-size: clamp(30px, 4vw, 52px);
|
|
863
|
+
line-height: 0.98;
|
|
864
|
+
letter-spacing: 0;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
.dql-app-ai-start-copy p {
|
|
868
|
+
margin: 0;
|
|
869
|
+
max-width: 650px;
|
|
870
|
+
color: var(--dql-app-muted);
|
|
871
|
+
font-size: 14px;
|
|
872
|
+
line-height: 1.55;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.dql-app-ai-start-card {
|
|
876
|
+
position: relative;
|
|
877
|
+
border: 1px solid rgba(79, 99, 215, 0.32);
|
|
878
|
+
border-radius: 12px;
|
|
879
|
+
background: var(--dql-app-surface);
|
|
880
|
+
box-shadow: var(--dql-app-shadow);
|
|
881
|
+
padding: 18px 76px 18px 18px;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.dql-app-ai-start-card textarea {
|
|
885
|
+
width: 100%;
|
|
886
|
+
min-height: 124px;
|
|
887
|
+
resize: vertical;
|
|
888
|
+
border: 0;
|
|
889
|
+
outline: 0;
|
|
890
|
+
background: transparent;
|
|
891
|
+
color: var(--dql-app-ink);
|
|
892
|
+
padding: 0;
|
|
893
|
+
font: 520 18px/1.45 var(--font-ui);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.dql-app-ai-start-send {
|
|
897
|
+
position: absolute;
|
|
898
|
+
right: 18px;
|
|
899
|
+
bottom: 18px;
|
|
900
|
+
width: 46px;
|
|
901
|
+
height: 46px;
|
|
902
|
+
border: 0;
|
|
903
|
+
border-radius: 999px;
|
|
904
|
+
background: var(--dql-app-accent);
|
|
905
|
+
color: white;
|
|
906
|
+
display: inline-flex;
|
|
907
|
+
align-items: center;
|
|
908
|
+
justify-content: center;
|
|
909
|
+
cursor: pointer;
|
|
910
|
+
box-shadow: 0 14px 30px rgba(79, 99, 215, 0.24);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.dql-app-ai-start-send:disabled {
|
|
914
|
+
opacity: 0.6;
|
|
915
|
+
cursor: not-allowed;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.dql-app-ai-start-examples {
|
|
919
|
+
padding-left: 2px;
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.dql-app-ai-start-advanced {
|
|
923
|
+
border: 1px solid var(--dql-app-line);
|
|
924
|
+
border-radius: 8px;
|
|
925
|
+
background: var(--dql-app-surface);
|
|
926
|
+
padding: 0 12px;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.dql-app-ai-start-advanced .dql-app-palette {
|
|
930
|
+
max-height: 340px;
|
|
931
|
+
margin: 0 0 12px;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.dql-app-ai-start-result {
|
|
935
|
+
margin: 0;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
.dql-app-ai-start-context {
|
|
939
|
+
display: grid;
|
|
940
|
+
gap: 12px;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.dql-app-ai-context-card {
|
|
944
|
+
border: 1px solid var(--dql-app-line);
|
|
945
|
+
border-radius: 10px;
|
|
946
|
+
background: var(--dql-app-surface);
|
|
947
|
+
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
|
|
948
|
+
overflow: hidden;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
.dql-app-ai-evidence-list {
|
|
952
|
+
display: grid;
|
|
953
|
+
gap: 8px;
|
|
954
|
+
padding: 12px;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.dql-app-ai-evidence-row {
|
|
958
|
+
display: grid;
|
|
959
|
+
grid-template-columns: 30px minmax(0, 1fr) auto;
|
|
960
|
+
gap: 9px;
|
|
961
|
+
align-items: start;
|
|
962
|
+
border: 1px solid var(--dql-app-line);
|
|
963
|
+
border-radius: 8px;
|
|
964
|
+
background: var(--dql-app-surface-muted);
|
|
965
|
+
padding: 10px;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.dql-app-ai-evidence-row > span:first-child {
|
|
969
|
+
width: 30px;
|
|
970
|
+
height: 30px;
|
|
971
|
+
border-radius: 8px;
|
|
972
|
+
background: var(--dql-app-green-soft);
|
|
973
|
+
color: var(--dql-app-green);
|
|
974
|
+
display: inline-flex;
|
|
975
|
+
align-items: center;
|
|
976
|
+
justify-content: center;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.dql-app-ai-evidence-row b {
|
|
980
|
+
display: block;
|
|
981
|
+
color: var(--dql-app-ink);
|
|
982
|
+
font-size: 12px;
|
|
983
|
+
line-height: 1.25;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
.dql-app-ai-evidence-row small {
|
|
987
|
+
display: block;
|
|
988
|
+
margin-top: 3px;
|
|
989
|
+
color: var(--dql-app-muted);
|
|
990
|
+
font-size: 11px;
|
|
991
|
+
line-height: 1.35;
|
|
992
|
+
display: -webkit-box;
|
|
993
|
+
-webkit-line-clamp: 2;
|
|
994
|
+
-webkit-box-orient: vertical;
|
|
995
|
+
overflow: hidden;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.dql-app-ai-filter-preview {
|
|
999
|
+
display: grid;
|
|
1000
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
1001
|
+
gap: 8px;
|
|
1002
|
+
padding: 12px;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.dql-app-ai-filter-preview span {
|
|
1006
|
+
min-height: 70px;
|
|
1007
|
+
border: 1px solid var(--dql-app-line);
|
|
1008
|
+
border-radius: 8px;
|
|
1009
|
+
background: var(--dql-app-surface-muted);
|
|
1010
|
+
padding: 10px;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.dql-app-ai-filter-preview small {
|
|
1014
|
+
display: block;
|
|
1015
|
+
color: var(--dql-app-faint);
|
|
1016
|
+
font: 800 9.5px var(--font-mono);
|
|
1017
|
+
text-transform: uppercase;
|
|
1018
|
+
margin-bottom: 8px;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.dql-app-ai-filter-preview b {
|
|
1022
|
+
color: var(--dql-app-accent);
|
|
1023
|
+
font-size: 18px;
|
|
1024
|
+
line-height: 1.1;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.dql-app-ai-gap-list {
|
|
1028
|
+
display: grid;
|
|
1029
|
+
gap: 8px;
|
|
1030
|
+
padding: 12px;
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
.dql-app-ai-gap-list span {
|
|
1034
|
+
display: flex;
|
|
1035
|
+
gap: 8px;
|
|
1036
|
+
color: var(--dql-app-muted);
|
|
1037
|
+
font-size: 12px;
|
|
1038
|
+
line-height: 1.4;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.dql-app-ai-gap-list svg {
|
|
1042
|
+
flex: 0 0 auto;
|
|
1043
|
+
margin-top: 1px;
|
|
1044
|
+
color: var(--dql-app-orange);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.dql-app-ai-generated-section {
|
|
1048
|
+
max-width: 1260px;
|
|
1049
|
+
margin: 18px auto 0;
|
|
1050
|
+
display: grid;
|
|
1051
|
+
gap: 12px;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.dql-app-ai-generated-head {
|
|
1055
|
+
display: flex;
|
|
1056
|
+
align-items: flex-end;
|
|
1057
|
+
justify-content: space-between;
|
|
1058
|
+
gap: 14px;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.dql-app-ai-generated-head h2 {
|
|
1062
|
+
margin: 0;
|
|
1063
|
+
color: var(--dql-app-ink);
|
|
1064
|
+
font-size: 20px;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
.dql-app-ai-generated-head p {
|
|
1068
|
+
margin: 4px 0 0;
|
|
1069
|
+
color: var(--dql-app-muted);
|
|
1070
|
+
font-size: 12.5px;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.dql-app-ai-generated-grid {
|
|
1074
|
+
display: grid;
|
|
1075
|
+
grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
|
|
1076
|
+
gap: 14px;
|
|
1077
|
+
align-items: start;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.dql-app-ai-plan-compact {
|
|
1081
|
+
border: 1px solid var(--dql-app-line);
|
|
1082
|
+
border-radius: 10px;
|
|
1083
|
+
background: var(--dql-app-surface);
|
|
1084
|
+
overflow: hidden;
|
|
1085
|
+
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.dql-app-plan-list.compact {
|
|
1089
|
+
max-height: 520px;
|
|
1090
|
+
}
|
|
1091
|
+
.dql-app-panel {
|
|
1092
|
+
min-height: 0;
|
|
1093
|
+
display: flex;
|
|
1094
|
+
flex-direction: column;
|
|
1095
|
+
border-right: 1px solid var(--dql-app-line);
|
|
1096
|
+
background: var(--dql-app-surface-muted);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
.dql-app-panel:last-child { border-right: 0; }
|
|
1100
|
+
.dql-app-panel-head {
|
|
1101
|
+
min-height: 48px;
|
|
1102
|
+
display: flex;
|
|
1103
|
+
align-items: center;
|
|
1104
|
+
gap: 8px;
|
|
1105
|
+
padding: 12px 15px;
|
|
1106
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1107
|
+
background: var(--dql-app-surface);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.dql-app-panel-head span { font-weight: 850; font-size: 14px; }
|
|
1111
|
+
.dql-app-panel-head b { margin-left: auto; color: var(--dql-app-faint); font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: 0; }
|
|
1112
|
+
|
|
1113
|
+
.dql-app-agent-scroll,
|
|
1114
|
+
.dql-app-plan-list {
|
|
1115
|
+
flex: 1;
|
|
1116
|
+
min-height: 0;
|
|
1117
|
+
overflow: auto;
|
|
1118
|
+
padding: 16px;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
.dql-app-agent-panel.ai-clean { background: var(--dql-app-surface); }
|
|
1122
|
+
.dql-app-ai-brief {
|
|
1123
|
+
padding: 18px 16px 2px;
|
|
1124
|
+
display: grid;
|
|
1125
|
+
gap: 8px;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.dql-app-ai-brief > span {
|
|
1129
|
+
display: inline-flex;
|
|
1130
|
+
align-items: center;
|
|
1131
|
+
gap: 7px;
|
|
1132
|
+
color: var(--dql-app-ink);
|
|
1133
|
+
font: 850 13px var(--font-ui);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.dql-app-ai-brief > span svg { color: var(--dql-app-accent); }
|
|
1137
|
+
.dql-app-ai-brief p {
|
|
1138
|
+
margin: 0;
|
|
1139
|
+
color: var(--dql-app-muted);
|
|
1140
|
+
font-size: 12px;
|
|
1141
|
+
line-height: 1.5;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
.dql-app-ai-result {
|
|
1145
|
+
margin-top: 5px;
|
|
1146
|
+
border: 1px solid rgba(22, 163, 74, 0.26);
|
|
1147
|
+
border-radius: 7px;
|
|
1148
|
+
background: var(--dql-app-green-soft);
|
|
1149
|
+
color: var(--dql-app-ink);
|
|
1150
|
+
padding: 8px 10px;
|
|
1151
|
+
font-size: 12px;
|
|
1152
|
+
line-height: 1.45;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.dql-app-ai-result small {
|
|
1156
|
+
display: block;
|
|
1157
|
+
margin-top: 3px;
|
|
1158
|
+
color: var(--dql-app-muted);
|
|
1159
|
+
font: 700 10px var(--font-mono);
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
.dql-app-composer {
|
|
1163
|
+
border-top: 1px solid var(--dql-app-line);
|
|
1164
|
+
background: var(--dql-app-surface);
|
|
1165
|
+
padding: 12px;
|
|
1166
|
+
display: grid;
|
|
1167
|
+
gap: 9px;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
.dql-app-composer.ai-clean {
|
|
1171
|
+
border-top: 0;
|
|
1172
|
+
padding: 10px 16px 16px;
|
|
1173
|
+
gap: 9px;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.dql-app-suggestions {
|
|
1177
|
+
display: flex;
|
|
1178
|
+
align-items: center;
|
|
1179
|
+
gap: 10px;
|
|
1180
|
+
flex-wrap: wrap;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
.dql-app-suggestions > span {
|
|
1184
|
+
color: var(--dql-app-faint);
|
|
1185
|
+
font: 750 10px var(--font-mono);
|
|
1186
|
+
text-transform: uppercase;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
.dql-app-suggestions button,
|
|
1190
|
+
.dql-app-suggests button {
|
|
1191
|
+
border: 0;
|
|
1192
|
+
border-radius: 0;
|
|
1193
|
+
background: transparent;
|
|
1194
|
+
color: var(--dql-app-muted);
|
|
1195
|
+
padding: 2px 0;
|
|
1196
|
+
cursor: pointer;
|
|
1197
|
+
font: 750 11.5px var(--font-ui);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.dql-app-suggestions button:hover,
|
|
1201
|
+
.dql-app-suggests button:hover {
|
|
1202
|
+
color: var(--dql-app-accent);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.dql-app-composer textarea,
|
|
1206
|
+
.dql-app-form-grid input,
|
|
1207
|
+
.dql-app-select-label select,
|
|
1208
|
+
.dql-app-modal input,
|
|
1209
|
+
.dql-app-modal textarea {
|
|
1210
|
+
width: 100%;
|
|
1211
|
+
border: 1px solid var(--dql-app-line);
|
|
1212
|
+
border-radius: 7px;
|
|
1213
|
+
background: var(--dql-app-control);
|
|
1214
|
+
color: var(--dql-app-ink);
|
|
1215
|
+
outline: 0;
|
|
1216
|
+
padding: 8px 10px;
|
|
1217
|
+
font: 12.5px var(--font-ui);
|
|
1218
|
+
}
|
|
1219
|
+
.dql-app-modal textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
|
|
1220
|
+
|
|
1221
|
+
.dql-app-composer textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
|
|
1222
|
+
.dql-app-composer.ai-clean textarea {
|
|
1223
|
+
min-height: 130px;
|
|
1224
|
+
background: var(--dql-app-surface);
|
|
1225
|
+
border-color: var(--dql-app-line-2);
|
|
1226
|
+
border-radius: 10px;
|
|
1227
|
+
padding: 11px 12px;
|
|
1228
|
+
font-size: 13.5px;
|
|
1229
|
+
}
|
|
1230
|
+
.dql-app-form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
1231
|
+
.dql-app-form-grid label,
|
|
1232
|
+
.dql-app-select-label,
|
|
1233
|
+
.dql-app-modal label {
|
|
1234
|
+
display: grid;
|
|
1235
|
+
gap: 5px;
|
|
1236
|
+
color: var(--dql-app-muted);
|
|
1237
|
+
font: 700 10px var(--font-mono);
|
|
1238
|
+
text-transform: uppercase;
|
|
1239
|
+
letter-spacing: 0;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.dql-app-ai-context {
|
|
1243
|
+
border-top: 1px solid var(--dql-app-line);
|
|
1244
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1245
|
+
background: transparent;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
.dql-app-ai-context summary {
|
|
1249
|
+
min-height: 34px;
|
|
1250
|
+
display: flex;
|
|
1251
|
+
align-items: center;
|
|
1252
|
+
gap: 8px;
|
|
1253
|
+
padding: 0 2px;
|
|
1254
|
+
cursor: pointer;
|
|
1255
|
+
list-style: none;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.dql-app-ai-context summary::-webkit-details-marker { display: none; }
|
|
1259
|
+
|
|
1260
|
+
.dql-app-ai-context summary span {
|
|
1261
|
+
color: var(--dql-app-muted);
|
|
1262
|
+
font: 800 10px var(--font-mono);
|
|
1263
|
+
text-transform: uppercase;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.dql-app-ai-context summary b {
|
|
1267
|
+
margin-left: auto;
|
|
1268
|
+
min-width: 0;
|
|
1269
|
+
overflow: hidden;
|
|
1270
|
+
text-overflow: ellipsis;
|
|
1271
|
+
white-space: nowrap;
|
|
1272
|
+
color: var(--dql-app-ink);
|
|
1273
|
+
font: 750 11px var(--font-ui);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
.dql-app-ai-context summary svg {
|
|
1277
|
+
flex: 0 0 auto;
|
|
1278
|
+
color: var(--dql-app-faint);
|
|
1279
|
+
transition: transform 140ms ease;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.dql-app-ai-context[open] summary svg { transform: rotate(180deg); }
|
|
1283
|
+
|
|
1284
|
+
.dql-app-ai-context-grid {
|
|
1285
|
+
display: grid;
|
|
1286
|
+
grid-template-columns: 1fr;
|
|
1287
|
+
gap: 8px;
|
|
1288
|
+
padding: 0 0 10px;
|
|
1289
|
+
border-top: 1px solid var(--dql-app-line);
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
.dql-app-ai-context-grid label {
|
|
1293
|
+
display: grid;
|
|
1294
|
+
gap: 5px;
|
|
1295
|
+
color: var(--dql-app-muted);
|
|
1296
|
+
font: 700 10px var(--font-mono);
|
|
1297
|
+
text-transform: uppercase;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
.dql-app-ai-context-grid input,
|
|
1301
|
+
.dql-app-ai-context-grid select {
|
|
1302
|
+
width: 100%;
|
|
1303
|
+
height: 34px;
|
|
1304
|
+
border: 1px solid var(--dql-app-line);
|
|
1305
|
+
border-radius: 7px;
|
|
1306
|
+
background: var(--dql-app-surface-muted);
|
|
1307
|
+
color: var(--dql-app-ink);
|
|
1308
|
+
outline: 0;
|
|
1309
|
+
padding: 0 10px;
|
|
1310
|
+
font: 12.5px var(--font-ui);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.dql-app-ai-send-row {
|
|
1314
|
+
display: flex;
|
|
1315
|
+
align-items: center;
|
|
1316
|
+
justify-content: space-between;
|
|
1317
|
+
gap: 10px;
|
|
1318
|
+
padding-top: 3px;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.dql-app-ai-send-row span {
|
|
1322
|
+
display: inline-flex;
|
|
1323
|
+
align-items: center;
|
|
1324
|
+
gap: 6px;
|
|
1325
|
+
color: var(--dql-app-muted);
|
|
1326
|
+
font: 750 11px var(--font-ui);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
.dql-app-ai-send-row span svg {
|
|
1330
|
+
color: var(--dql-app-green);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.dql-app-preview-panel { background: var(--dql-app-canvas); }
|
|
1334
|
+
.dql-app-preview-scroll { flex: 1; min-height: 0; overflow: auto; padding: 18px 20px 40px; }
|
|
1335
|
+
.dql-app-preview-card {
|
|
1336
|
+
border: 1px solid var(--dql-app-line);
|
|
1337
|
+
border-radius: 8px;
|
|
1338
|
+
background: var(--dql-app-surface);
|
|
1339
|
+
overflow: hidden;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.dql-app-preview-head {
|
|
1343
|
+
min-height: 58px;
|
|
1344
|
+
display: flex;
|
|
1345
|
+
align-items: center;
|
|
1346
|
+
gap: 10px;
|
|
1347
|
+
padding: 12px 18px;
|
|
1348
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.dql-app-preview-head h2 { margin: 0; font-size: 19px; }
|
|
1352
|
+
.dql-app-preview-filters {
|
|
1353
|
+
display: flex;
|
|
1354
|
+
gap: 7px;
|
|
1355
|
+
padding: 10px 18px;
|
|
1356
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1357
|
+
background: var(--dql-app-surface-muted);
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
.dql-app-preview-filters span {
|
|
1361
|
+
display: inline-flex;
|
|
1362
|
+
align-items: center;
|
|
1363
|
+
gap: 6px;
|
|
1364
|
+
border: 1px solid var(--dql-app-line);
|
|
1365
|
+
border-radius: 6px;
|
|
1366
|
+
background: var(--dql-app-surface);
|
|
1367
|
+
color: var(--dql-app-muted);
|
|
1368
|
+
padding: 4px 9px;
|
|
1369
|
+
font-size: 11px;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
.dql-app-preview-grid {
|
|
1373
|
+
display: grid;
|
|
1374
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
1375
|
+
gap: 12px;
|
|
1376
|
+
padding: 16px 18px;
|
|
1377
|
+
min-height: 300px;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.dql-app-preview-empty {
|
|
1381
|
+
grid-column: 1 / -1;
|
|
1382
|
+
min-height: 260px;
|
|
1383
|
+
display: flex;
|
|
1384
|
+
flex-direction: column;
|
|
1385
|
+
align-items: center;
|
|
1386
|
+
justify-content: center;
|
|
1387
|
+
gap: 10px;
|
|
1388
|
+
color: var(--dql-app-faint);
|
|
1389
|
+
text-align: center;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.dql-app-preview-tile {
|
|
1393
|
+
grid-column: span 4;
|
|
1394
|
+
min-height: 136px;
|
|
1395
|
+
border: 1px solid var(--dql-app-line);
|
|
1396
|
+
border-radius: 8px;
|
|
1397
|
+
background: var(--dql-app-surface);
|
|
1398
|
+
overflow: hidden;
|
|
1399
|
+
display: flex;
|
|
1400
|
+
flex-direction: column;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
.dql-app-preview-tile.wide { grid-column: span 6; }
|
|
1404
|
+
.dql-app-preview-tile.draft { border-color: rgba(202, 138, 4, 0.34); }
|
|
1405
|
+
.dql-app-preview-tile-head,
|
|
1406
|
+
.dql-app-preview-tile-foot {
|
|
1407
|
+
display: flex;
|
|
1408
|
+
align-items: center;
|
|
1409
|
+
gap: 8px;
|
|
1410
|
+
padding: 8px 10px;
|
|
1411
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
.dql-app-preview-tile-head b { font-size: 12px; }
|
|
1415
|
+
.dql-app-preview-tile-head span,
|
|
1416
|
+
.dql-app-preview-tile-foot {
|
|
1417
|
+
color: var(--dql-app-faint);
|
|
1418
|
+
font: 700 9px var(--font-mono);
|
|
1419
|
+
text-transform: uppercase;
|
|
1420
|
+
letter-spacing: 0;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.dql-app-preview-tile-head span { margin-left: auto; }
|
|
1424
|
+
.dql-app-preview-tile-body {
|
|
1425
|
+
flex: 1;
|
|
1426
|
+
display: flex;
|
|
1427
|
+
flex-direction: column;
|
|
1428
|
+
justify-content: center;
|
|
1429
|
+
padding: 10px;
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
.dql-app-preview-tile-body strong { font-size: 26px; }
|
|
1433
|
+
.dql-app-preview-tile-body small { color: var(--dql-app-muted); }
|
|
1434
|
+
.dql-app-preview-source {
|
|
1435
|
+
display: grid;
|
|
1436
|
+
grid-template-columns: 34px minmax(0, 1fr);
|
|
1437
|
+
gap: 10px;
|
|
1438
|
+
align-items: center;
|
|
1439
|
+
}
|
|
1440
|
+
.dql-app-preview-source > span {
|
|
1441
|
+
width: 34px;
|
|
1442
|
+
height: 34px;
|
|
1443
|
+
border-radius: 8px;
|
|
1444
|
+
display: inline-flex;
|
|
1445
|
+
align-items: center;
|
|
1446
|
+
justify-content: center;
|
|
1447
|
+
background: var(--dql-app-accent-soft);
|
|
1448
|
+
color: var(--dql-app-accent);
|
|
1449
|
+
}
|
|
1450
|
+
.dql-app-preview-source b {
|
|
1451
|
+
display: block;
|
|
1452
|
+
color: var(--dql-app-ink);
|
|
1453
|
+
font-size: 13px;
|
|
1454
|
+
line-height: 1.2;
|
|
1455
|
+
}
|
|
1456
|
+
.dql-app-preview-source p {
|
|
1457
|
+
margin: 4px 0 0;
|
|
1458
|
+
color: var(--dql-app-muted);
|
|
1459
|
+
font-size: 11.5px;
|
|
1460
|
+
line-height: 1.4;
|
|
1461
|
+
display: -webkit-box;
|
|
1462
|
+
-webkit-line-clamp: 2;
|
|
1463
|
+
-webkit-box-orient: vertical;
|
|
1464
|
+
overflow: hidden;
|
|
1465
|
+
}
|
|
1466
|
+
.dql-app-preview-viz-row {
|
|
1467
|
+
display: flex;
|
|
1468
|
+
gap: 4px;
|
|
1469
|
+
padding: 0 10px 8px;
|
|
1470
|
+
align-items: center;
|
|
1471
|
+
}
|
|
1472
|
+
.dql-app-preview-viz-row button {
|
|
1473
|
+
width: 26px;
|
|
1474
|
+
height: 26px;
|
|
1475
|
+
border: 1px solid var(--dql-app-line);
|
|
1476
|
+
border-radius: 6px;
|
|
1477
|
+
background: var(--dql-app-surface);
|
|
1478
|
+
color: var(--dql-app-muted);
|
|
1479
|
+
display: inline-flex;
|
|
1480
|
+
align-items: center;
|
|
1481
|
+
justify-content: center;
|
|
1482
|
+
cursor: pointer;
|
|
1483
|
+
}
|
|
1484
|
+
.dql-app-preview-viz-row button.on {
|
|
1485
|
+
background: var(--dql-app-accent);
|
|
1486
|
+
border-color: var(--dql-app-accent);
|
|
1487
|
+
color: #fff;
|
|
1488
|
+
}
|
|
1489
|
+
.dql-app-preview-viz-row button:disabled {
|
|
1490
|
+
cursor: default;
|
|
1491
|
+
opacity: 0.58;
|
|
1492
|
+
}
|
|
1493
|
+
.dql-app-preview-tile-foot { border-bottom: 0; border-top: 1px solid var(--dql-app-line); }
|
|
1494
|
+
.dql-app-preview-tile-foot b { margin-left: auto; color: var(--dql-app-green); }
|
|
1495
|
+
.dql-app-preview-tile.draft .dql-app-preview-tile-foot b { color: var(--dql-app-orange); }
|
|
1496
|
+
.dql-app-review-backlog {
|
|
1497
|
+
border-top: 1px solid var(--dql-app-line);
|
|
1498
|
+
background: var(--dql-app-surface-muted);
|
|
1499
|
+
padding: 14px 18px 18px;
|
|
1500
|
+
}
|
|
1501
|
+
.dql-app-review-backlog-head {
|
|
1502
|
+
display: flex;
|
|
1503
|
+
align-items: center;
|
|
1504
|
+
gap: 8px;
|
|
1505
|
+
margin-bottom: 10px;
|
|
1506
|
+
color: var(--dql-app-muted);
|
|
1507
|
+
}
|
|
1508
|
+
.dql-app-review-backlog-head span {
|
|
1509
|
+
display: inline-flex;
|
|
1510
|
+
align-items: center;
|
|
1511
|
+
gap: 6px;
|
|
1512
|
+
font: 850 12px var(--font-ui);
|
|
1513
|
+
color: var(--dql-app-ink);
|
|
1514
|
+
}
|
|
1515
|
+
.dql-app-review-backlog-head b {
|
|
1516
|
+
margin-left: auto;
|
|
1517
|
+
min-width: 22px;
|
|
1518
|
+
height: 22px;
|
|
1519
|
+
border-radius: 999px;
|
|
1520
|
+
display: inline-flex;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
justify-content: center;
|
|
1523
|
+
background: var(--dql-app-orange-soft);
|
|
1524
|
+
color: var(--dql-app-orange);
|
|
1525
|
+
font: 800 10px var(--font-mono);
|
|
1526
|
+
}
|
|
1527
|
+
.dql-app-review-backlog-grid {
|
|
1528
|
+
display: grid;
|
|
1529
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
1530
|
+
gap: 10px;
|
|
1531
|
+
}
|
|
1532
|
+
.dql-app-review-backlog-item {
|
|
1533
|
+
border: 1px solid rgba(202, 138, 4, 0.22);
|
|
1534
|
+
border-radius: 8px;
|
|
1535
|
+
background: var(--dql-app-surface);
|
|
1536
|
+
padding: 11px;
|
|
1537
|
+
display: grid;
|
|
1538
|
+
gap: 9px;
|
|
1539
|
+
}
|
|
1540
|
+
.dql-app-review-backlog-item b {
|
|
1541
|
+
display: block;
|
|
1542
|
+
font-size: 12.5px;
|
|
1543
|
+
line-height: 1.25;
|
|
1544
|
+
}
|
|
1545
|
+
.dql-app-review-backlog-item p {
|
|
1546
|
+
margin: 5px 0 0;
|
|
1547
|
+
color: var(--dql-app-muted);
|
|
1548
|
+
font-size: 11.5px;
|
|
1549
|
+
line-height: 1.4;
|
|
1550
|
+
}
|
|
1551
|
+
.dql-app-review-backlog-item > div:last-child {
|
|
1552
|
+
display: flex;
|
|
1553
|
+
gap: 5px;
|
|
1554
|
+
flex-wrap: wrap;
|
|
1555
|
+
}
|
|
1556
|
+
.dql-app-review-backlog-item span {
|
|
1557
|
+
border: 1px solid rgba(79, 99, 215, 0.18);
|
|
1558
|
+
border-radius: 999px;
|
|
1559
|
+
background: var(--dql-app-accent-soft);
|
|
1560
|
+
color: var(--dql-app-accent);
|
|
1561
|
+
padding: 3px 7px;
|
|
1562
|
+
font: 750 10px var(--font-ui);
|
|
1563
|
+
}
|
|
1564
|
+
.dql-app-planner-flow {
|
|
1565
|
+
border: 1px solid var(--dql-app-line);
|
|
1566
|
+
border-radius: 8px;
|
|
1567
|
+
background: var(--dql-app-surface);
|
|
1568
|
+
padding: 11px;
|
|
1569
|
+
margin-bottom: 12px;
|
|
1570
|
+
}
|
|
1571
|
+
.dql-app-planner-flow-title {
|
|
1572
|
+
display: flex;
|
|
1573
|
+
align-items: center;
|
|
1574
|
+
gap: 7px;
|
|
1575
|
+
color: var(--dql-app-accent);
|
|
1576
|
+
font: 850 12px var(--font-ui);
|
|
1577
|
+
}
|
|
1578
|
+
.dql-app-planner-flow p {
|
|
1579
|
+
margin: 7px 0 0;
|
|
1580
|
+
color: var(--dql-app-muted);
|
|
1581
|
+
font-size: 11.5px;
|
|
1582
|
+
line-height: 1.42;
|
|
1583
|
+
}
|
|
1584
|
+
.dql-app-planner-flow-steps {
|
|
1585
|
+
display: grid;
|
|
1586
|
+
gap: 6px;
|
|
1587
|
+
margin-top: 10px;
|
|
1588
|
+
}
|
|
1589
|
+
.dql-app-planner-flow-steps span {
|
|
1590
|
+
display: grid;
|
|
1591
|
+
grid-template-columns: 20px minmax(0, 1fr);
|
|
1592
|
+
gap: 7px;
|
|
1593
|
+
color: var(--dql-app-muted);
|
|
1594
|
+
font-size: 11px;
|
|
1595
|
+
line-height: 1.35;
|
|
1596
|
+
}
|
|
1597
|
+
.dql-app-planner-flow-steps b {
|
|
1598
|
+
width: 20px;
|
|
1599
|
+
height: 20px;
|
|
1600
|
+
border-radius: 999px;
|
|
1601
|
+
display: inline-flex;
|
|
1602
|
+
align-items: center;
|
|
1603
|
+
justify-content: center;
|
|
1604
|
+
background: var(--dql-app-accent-soft);
|
|
1605
|
+
color: var(--dql-app-accent);
|
|
1606
|
+
font: 850 10px var(--font-mono);
|
|
1607
|
+
}
|
|
1608
|
+
.dql-app-plan-group-label {
|
|
1609
|
+
margin: 14px 0 4px;
|
|
1610
|
+
color: var(--dql-app-faint);
|
|
1611
|
+
font: 850 10px var(--font-mono);
|
|
1612
|
+
text-transform: uppercase;
|
|
1613
|
+
}
|
|
1614
|
+
.dql-app-plan-item {
|
|
1615
|
+
display: flex;
|
|
1616
|
+
align-items: center;
|
|
1617
|
+
gap: 10px;
|
|
1618
|
+
padding: 10px 0;
|
|
1619
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.dql-app-plan-item span { flex: 1; min-width: 0; }
|
|
1623
|
+
.dql-app-plan-item b { display: block; font: 700 11.5px var(--font-mono); }
|
|
1624
|
+
.dql-app-plan-item small { display: block; color: var(--dql-app-faint); font-size: 10px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1625
|
+
.dql-app-plan-item em { color: var(--dql-app-faint); font: 700 9px var(--font-mono); text-transform: uppercase; font-style: normal; }
|
|
1626
|
+
|
|
1627
|
+
.dql-app-plan-session,
|
|
1628
|
+
.dql-app-plan-warning,
|
|
1629
|
+
.dql-app-plan-task {
|
|
1630
|
+
border: 1px solid var(--dql-app-line);
|
|
1631
|
+
border-radius: 7px;
|
|
1632
|
+
padding: 8px 9px;
|
|
1633
|
+
background: var(--dql-app-surface-muted);
|
|
1634
|
+
color: var(--dql-app-muted);
|
|
1635
|
+
font-size: 11.5px;
|
|
1636
|
+
line-height: 1.35;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
.dql-app-plan-session span {
|
|
1640
|
+
display: block;
|
|
1641
|
+
color: var(--dql-app-ink);
|
|
1642
|
+
font-weight: 800;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
.dql-app-plan-session small {
|
|
1646
|
+
display: block;
|
|
1647
|
+
margin-top: 2px;
|
|
1648
|
+
color: var(--dql-app-faint);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
.dql-app-plan-warning {
|
|
1652
|
+
border-color: rgba(202, 138, 4, 0.24);
|
|
1653
|
+
background: var(--dql-app-orange-soft);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
.dql-app-plan-task {
|
|
1657
|
+
display: flex;
|
|
1658
|
+
align-items: flex-start;
|
|
1659
|
+
gap: 7px;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
.dql-app-plan-foot {
|
|
1663
|
+
margin-top: auto;
|
|
1664
|
+
padding: 14px;
|
|
1665
|
+
border-top: 2px solid var(--dql-app-accent);
|
|
1666
|
+
background: var(--dql-app-accent-soft);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
.dql-app-leader {
|
|
1670
|
+
display: flex;
|
|
1671
|
+
align-items: baseline;
|
|
1672
|
+
gap: 8px;
|
|
1673
|
+
font-size: 11.5px;
|
|
1674
|
+
color: var(--dql-app-muted);
|
|
1675
|
+
margin: 5px 0;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
.dql-app-leader i { flex: 1; border-bottom: 1.5px dotted var(--dql-app-line-2); transform: translateY(-3px); }
|
|
1679
|
+
.dql-app-leader b { font-family: var(--font-mono); color: var(--dql-app-ink); }
|
|
1680
|
+
.dql-app-leader.certified b { color: var(--dql-app-green); }
|
|
1681
|
+
.dql-app-leader.draft b { color: var(--dql-app-orange); }
|
|
1682
|
+
|
|
1683
|
+
.dql-app-error {
|
|
1684
|
+
border: 1px solid rgba(220, 38, 38, 0.24);
|
|
1685
|
+
border-radius: 6px;
|
|
1686
|
+
background: rgba(220, 38, 38, 0.06);
|
|
1687
|
+
color: #b91c1c;
|
|
1688
|
+
padding: 8px 10px;
|
|
1689
|
+
font-size: 12px;
|
|
1690
|
+
line-height: 1.45;
|
|
1691
|
+
margin-top: 10px;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.dql-app-palette { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
|
|
1695
|
+
.dql-app-agent-scroll .dql-app-palette {
|
|
1696
|
+
margin-top: 12px;
|
|
1697
|
+
border: 1px solid var(--dql-app-line);
|
|
1698
|
+
border-radius: 8px;
|
|
1699
|
+
background: var(--dql-app-surface-muted);
|
|
1700
|
+
padding: 10px;
|
|
1701
|
+
max-height: 360px;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
.dql-app-palette-title {
|
|
1705
|
+
display: flex;
|
|
1706
|
+
align-items: center;
|
|
1707
|
+
gap: 8px;
|
|
1708
|
+
margin-bottom: 8px;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
.dql-app-palette-title span {
|
|
1712
|
+
display: inline-flex;
|
|
1713
|
+
align-items: center;
|
|
1714
|
+
gap: 7px;
|
|
1715
|
+
color: var(--dql-app-ink);
|
|
1716
|
+
font: 850 12px var(--font-ui);
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.dql-app-palette-title b {
|
|
1720
|
+
margin-left: auto;
|
|
1721
|
+
color: var(--dql-app-faint);
|
|
1722
|
+
font: 700 9.5px var(--font-mono);
|
|
1723
|
+
text-transform: uppercase;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
.dql-app-palette-search {
|
|
1727
|
+
display: flex;
|
|
1728
|
+
align-items: center;
|
|
1729
|
+
gap: 8px;
|
|
1730
|
+
border: 1px solid var(--dql-app-line);
|
|
1731
|
+
border-radius: 7px;
|
|
1732
|
+
background: var(--dql-app-surface);
|
|
1733
|
+
color: var(--dql-app-muted);
|
|
1734
|
+
padding: 8px 10px;
|
|
1735
|
+
margin-bottom: 10px;
|
|
1736
|
+
font-size: 12px;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
.dql-app-palette-search input {
|
|
1740
|
+
flex: 1;
|
|
1741
|
+
min-width: 0;
|
|
1742
|
+
border: 0;
|
|
1743
|
+
outline: 0;
|
|
1744
|
+
background: transparent;
|
|
1745
|
+
color: var(--dql-app-ink);
|
|
1746
|
+
font: 12px var(--font-ui);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.dql-app-palette button {
|
|
1750
|
+
width: 100%;
|
|
1751
|
+
border: 1px solid var(--dql-app-line);
|
|
1752
|
+
border-radius: 7px;
|
|
1753
|
+
background: var(--dql-app-surface);
|
|
1754
|
+
color: var(--dql-app-ink);
|
|
1755
|
+
padding: 9px 10px;
|
|
1756
|
+
margin-bottom: 7px;
|
|
1757
|
+
display: flex;
|
|
1758
|
+
align-items: center;
|
|
1759
|
+
gap: 9px;
|
|
1760
|
+
text-align: left;
|
|
1761
|
+
cursor: pointer;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.dql-app-palette button.selected { border-color: var(--dql-app-accent); background: var(--dql-app-accent-soft); }
|
|
1765
|
+
.dql-app-palette-icon {
|
|
1766
|
+
width: 25px;
|
|
1767
|
+
height: 25px;
|
|
1768
|
+
border-radius: 6px;
|
|
1769
|
+
background: #f1f5f9;
|
|
1770
|
+
color: var(--dql-app-accent);
|
|
1771
|
+
display: inline-flex;
|
|
1772
|
+
align-items: center;
|
|
1773
|
+
justify-content: center;
|
|
1774
|
+
flex: none;
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
.dql-app-palette span:nth-child(2) { flex: 1; min-width: 0; }
|
|
1778
|
+
.dql-app-palette b { display: block; font: 700 11px var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1779
|
+
.dql-app-palette small { display: block; color: var(--dql-app-faint); font-size: 10px; }
|
|
1780
|
+
.dql-app-palette i { color: var(--dql-app-green); font: 700 9px var(--font-mono); text-transform: uppercase; font-style: normal; }
|
|
1781
|
+
.dql-app-palette-more {
|
|
1782
|
+
color: var(--dql-app-faint);
|
|
1783
|
+
text-align: center;
|
|
1784
|
+
font: 700 10px var(--font-mono);
|
|
1785
|
+
padding: 8px 0 2px;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
.dql-app-view-topbar { position: relative; z-index: 4; }
|
|
1789
|
+
.dql-app-view-topbar {
|
|
1790
|
+
min-height: 48px;
|
|
1791
|
+
padding: 7px 22px;
|
|
1792
|
+
box-shadow: 0 1px 0 var(--dql-app-line);
|
|
1793
|
+
background: var(--dql-app-surface);
|
|
1794
|
+
backdrop-filter: blur(10px);
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.dql-app-crumb { color: var(--dql-app-muted); font: 700 11.5px var(--font-mono); }
|
|
1798
|
+
.dql-app-filterbar {
|
|
1799
|
+
position: relative;
|
|
1800
|
+
z-index: 3;
|
|
1801
|
+
min-height: 52px;
|
|
1802
|
+
display: flex;
|
|
1803
|
+
align-items: center;
|
|
1804
|
+
gap: 8px;
|
|
1805
|
+
padding: 8px 26px;
|
|
1806
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
1807
|
+
background: var(--dql-app-surface);
|
|
1808
|
+
flex-wrap: wrap;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.dql-app-filter-select {
|
|
1812
|
+
height: 34px;
|
|
1813
|
+
display: inline-flex;
|
|
1814
|
+
align-items: center;
|
|
1815
|
+
gap: 8px;
|
|
1816
|
+
border: 1px solid var(--dql-app-line);
|
|
1817
|
+
border-radius: 8px;
|
|
1818
|
+
background: var(--dql-app-control);
|
|
1819
|
+
padding: 0 10px;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
.dql-app-filter-select span {
|
|
1823
|
+
color: var(--dql-app-faint);
|
|
1824
|
+
font: 700 9px var(--font-mono);
|
|
1825
|
+
letter-spacing: 0;
|
|
1826
|
+
text-transform: uppercase;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.dql-app-filter-select select,
|
|
1830
|
+
.dql-app-filter-select input {
|
|
1831
|
+
border: 0;
|
|
1832
|
+
background: transparent;
|
|
1833
|
+
color: var(--dql-app-ink);
|
|
1834
|
+
outline: 0;
|
|
1835
|
+
font: 750 12.5px var(--font-ui);
|
|
1836
|
+
min-width: 0;
|
|
1837
|
+
max-width: 110px;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.dql-app-filter-select input[type="number"] {
|
|
1841
|
+
width: 64px;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.dql-app-filter-empty {
|
|
1845
|
+
color: var(--dql-app-faint);
|
|
1846
|
+
font: 750 11px var(--font-ui);
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
.dql-app-filter-note {
|
|
1850
|
+
margin-left: auto;
|
|
1851
|
+
color: var(--dql-app-faint);
|
|
1852
|
+
font: 700 11px var(--font-ui);
|
|
1853
|
+
display: inline-flex;
|
|
1854
|
+
align-items: center;
|
|
1855
|
+
gap: 6px;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
.dql-app-toggle {
|
|
1859
|
+
border: 0;
|
|
1860
|
+
background: transparent;
|
|
1861
|
+
display: inline-flex;
|
|
1862
|
+
align-items: center;
|
|
1863
|
+
gap: 8px;
|
|
1864
|
+
color: var(--dql-app-muted);
|
|
1865
|
+
cursor: pointer;
|
|
1866
|
+
font: 800 12px var(--font-ui);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.dql-app-toggle i {
|
|
1870
|
+
width: 32px;
|
|
1871
|
+
height: 18px;
|
|
1872
|
+
border-radius: 999px;
|
|
1873
|
+
background: #cbd5e1;
|
|
1874
|
+
position: relative;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.dql-app-toggle i::after {
|
|
1878
|
+
content: "";
|
|
1879
|
+
width: 14px;
|
|
1880
|
+
height: 14px;
|
|
1881
|
+
border-radius: 999px;
|
|
1882
|
+
position: absolute;
|
|
1883
|
+
top: 2px;
|
|
1884
|
+
left: 2px;
|
|
1885
|
+
background: #fff;
|
|
1886
|
+
transition: transform 140ms ease;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
.dql-app-toggle.on i { background: var(--dql-app-accent); }
|
|
1890
|
+
.dql-app-toggle.on i::after { transform: translateX(14px); }
|
|
1891
|
+
|
|
1892
|
+
.dql-app-view-wrap {
|
|
1893
|
+
position: relative;
|
|
1894
|
+
z-index: 1;
|
|
1895
|
+
width: min(1560px, calc(100% - 40px));
|
|
1896
|
+
margin: 0 auto;
|
|
1897
|
+
padding: 12px 0 60px;
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
.dql-app-title-row {
|
|
1901
|
+
display: flex;
|
|
1902
|
+
align-items: flex-end;
|
|
1903
|
+
justify-content: space-between;
|
|
1904
|
+
gap: 18px;
|
|
1905
|
+
margin-bottom: 12px;
|
|
1906
|
+
flex-wrap: wrap;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
.dql-app-title-copy {
|
|
1910
|
+
flex: 1 1 420px;
|
|
1911
|
+
min-width: 0;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
.dql-app-title-meta {
|
|
1915
|
+
display: flex;
|
|
1916
|
+
align-items: center;
|
|
1917
|
+
gap: 8px;
|
|
1918
|
+
margin-bottom: 6px;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
.dql-app-title-meta > span {
|
|
1922
|
+
display: inline-flex;
|
|
1923
|
+
align-items: center;
|
|
1924
|
+
gap: 6px;
|
|
1925
|
+
color: var(--dql-app-muted);
|
|
1926
|
+
font: 750 11.5px var(--font-ui);
|
|
1927
|
+
text-transform: capitalize;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
.dql-app-title-row h1 {
|
|
1931
|
+
margin: 0;
|
|
1932
|
+
font-size: 26px;
|
|
1933
|
+
line-height: 1.1;
|
|
1934
|
+
font-weight: 820;
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
.dql-app-title-row p {
|
|
1938
|
+
margin: 6px 0 0;
|
|
1939
|
+
color: var(--dql-app-muted);
|
|
1940
|
+
font-size: 13px;
|
|
1941
|
+
line-height: 1.45;
|
|
1942
|
+
max-width: 720px;
|
|
1943
|
+
display: -webkit-box;
|
|
1944
|
+
-webkit-line-clamp: 2;
|
|
1945
|
+
-webkit-box-orient: vertical;
|
|
1946
|
+
overflow: hidden;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.dql-app-title-context {
|
|
1950
|
+
display: inline-flex;
|
|
1951
|
+
align-items: center;
|
|
1952
|
+
color: var(--dql-app-faint);
|
|
1953
|
+
font: 700 11.5px var(--font-mono);
|
|
1954
|
+
}
|
|
1955
|
+
.dql-app-title-context::before { content: "·"; margin-right: 8px; color: var(--dql-app-line-2); }
|
|
1956
|
+
|
|
1957
|
+
.dql-app-nav-row {
|
|
1958
|
+
display: flex;
|
|
1959
|
+
align-items: center;
|
|
1960
|
+
justify-content: flex-end;
|
|
1961
|
+
gap: 8px;
|
|
1962
|
+
flex-wrap: wrap;
|
|
1963
|
+
min-width: 0;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
.dql-app-section-tabs,
|
|
1967
|
+
.dql-app-page-picker {
|
|
1968
|
+
display: flex;
|
|
1969
|
+
align-items: center;
|
|
1970
|
+
gap: 6px;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
.dql-app-section-tabs {
|
|
1974
|
+
overflow-x: auto;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
.dql-app-section-tabs button,
|
|
1978
|
+
.dql-app-page-picker {
|
|
1979
|
+
border: 1px solid var(--dql-app-line);
|
|
1980
|
+
border-radius: 8px;
|
|
1981
|
+
background: var(--dql-app-surface);
|
|
1982
|
+
color: var(--dql-app-muted);
|
|
1983
|
+
min-height: 32px;
|
|
1984
|
+
display: inline-flex;
|
|
1985
|
+
align-items: center;
|
|
1986
|
+
font: 750 12px var(--font-ui);
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.dql-app-section-tabs {
|
|
1990
|
+
gap: 6px;
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
.dql-app-section-tabs button {
|
|
1994
|
+
border: 0;
|
|
1995
|
+
border-radius: 8px;
|
|
1996
|
+
background: transparent;
|
|
1997
|
+
color: var(--dql-app-muted);
|
|
1998
|
+
min-height: 32px;
|
|
1999
|
+
padding: 6px 9px;
|
|
2000
|
+
display: inline-flex;
|
|
2001
|
+
align-items: center;
|
|
2002
|
+
gap: 6px;
|
|
2003
|
+
cursor: pointer;
|
|
2004
|
+
font: 750 12px var(--font-ui);
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.dql-app-section-tabs button {
|
|
2008
|
+
min-width: 38px;
|
|
2009
|
+
justify-content: center;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
.dql-app-section-tabs .dql-app-tab-icon {
|
|
2013
|
+
display: inline-flex;
|
|
2014
|
+
align-items: center;
|
|
2015
|
+
justify-content: center;
|
|
2016
|
+
font-style: normal;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.dql-app-section-tabs .dql-app-tab-label {
|
|
2020
|
+
display: none;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.dql-app-section-tabs button.on .dql-app-tab-label {
|
|
2024
|
+
display: inline;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.dql-app-section-tabs button.on,
|
|
2028
|
+
.dql-app-section-tabs button:hover {
|
|
2029
|
+
color: var(--dql-app-ink);
|
|
2030
|
+
background: var(--dql-app-accent-soft);
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
.dql-app-section-tabs button.on {
|
|
2034
|
+
box-shadow: inset 0 0 0 1px var(--dql-app-accent);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
.dql-app-section-tabs b {
|
|
2038
|
+
color: var(--dql-app-accent);
|
|
2039
|
+
font-family: var(--font-mono);
|
|
2040
|
+
font-size: 10px;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.dql-app-page-picker {
|
|
2044
|
+
padding: 0 5px 0 10px;
|
|
2045
|
+
white-space: nowrap;
|
|
2046
|
+
max-width: min(440px, 100%);
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
.dql-app-page-picker > span {
|
|
2050
|
+
display: inline-flex;
|
|
2051
|
+
align-items: center;
|
|
2052
|
+
gap: 6px;
|
|
2053
|
+
color: var(--dql-app-faint);
|
|
2054
|
+
font: 800 10px var(--font-mono);
|
|
2055
|
+
text-transform: uppercase;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
.dql-app-page-picker select {
|
|
2059
|
+
min-width: 210px;
|
|
2060
|
+
max-width: 310px;
|
|
2061
|
+
height: 30px;
|
|
2062
|
+
border: 0;
|
|
2063
|
+
outline: 0;
|
|
2064
|
+
background: transparent;
|
|
2065
|
+
color: var(--dql-app-ink);
|
|
2066
|
+
font: 800 12px var(--font-ui);
|
|
2067
|
+
text-overflow: ellipsis;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
.dql-app-page-picker button {
|
|
2071
|
+
width: 26px;
|
|
2072
|
+
height: 26px;
|
|
2073
|
+
border: 0;
|
|
2074
|
+
border-radius: 6px;
|
|
2075
|
+
background: var(--dql-app-accent-soft);
|
|
2076
|
+
color: var(--dql-app-accent);
|
|
2077
|
+
display: inline-flex;
|
|
2078
|
+
align-items: center;
|
|
2079
|
+
justify-content: center;
|
|
2080
|
+
cursor: pointer;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
.dql-app-dashboard-label {
|
|
2084
|
+
min-width: 0;
|
|
2085
|
+
overflow: hidden;
|
|
2086
|
+
text-overflow: ellipsis;
|
|
2087
|
+
white-space: nowrap;
|
|
2088
|
+
}
|
|
2089
|
+
.dql-app-view-layout {
|
|
2090
|
+
display: grid;
|
|
2091
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
2092
|
+
gap: 14px;
|
|
2093
|
+
align-items: start;
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
.dql-app-view-layout.no-explain { grid-template-columns: minmax(0, 1fr); }
|
|
2097
|
+
.dql-app-main-column { min-width: 0; }
|
|
2098
|
+
.dql-app-filter-row {
|
|
2099
|
+
display: flex;
|
|
2100
|
+
align-items: center;
|
|
2101
|
+
gap: 12px;
|
|
2102
|
+
flex-wrap: wrap;
|
|
2103
|
+
margin-bottom: 14px;
|
|
2104
|
+
padding: 12px 14px;
|
|
2105
|
+
border: 1px solid var(--dql-app-line);
|
|
2106
|
+
border-radius: 12px;
|
|
2107
|
+
background: var(--dql-app-surface);
|
|
2108
|
+
}
|
|
2109
|
+
.dql-app-filter-row-copy { display: grid; gap: 2px; min-width: 170px; }
|
|
2110
|
+
.dql-app-filter-row-copy b { font-size: 12px; color: var(--dql-app-ink); }
|
|
2111
|
+
.dql-app-filter-row-copy span { font-size: 10.5px; color: var(--dql-app-faint); }
|
|
2112
|
+
.dql-app-filter-row .dql-app-topbar-filters { flex: 1; }
|
|
2113
|
+
.dql-app-filter-row-actions { display: flex; gap: 7px; margin-left: auto; }
|
|
2114
|
+
|
|
2115
|
+
.dql-app-explain-panel {
|
|
2116
|
+
position: sticky;
|
|
2117
|
+
top: 110px;
|
|
2118
|
+
width: clamp(420px, 29vw, 500px);
|
|
2119
|
+
min-width: 390px;
|
|
2120
|
+
max-width: min(520px, 40vw);
|
|
2121
|
+
min-height: 580px;
|
|
2122
|
+
height: calc(100vh - 142px);
|
|
2123
|
+
max-height: calc(100vh - 142px);
|
|
2124
|
+
border: 1px solid var(--dql-app-line);
|
|
2125
|
+
border-radius: 16px;
|
|
2126
|
+
background: var(--dql-app-surface);
|
|
2127
|
+
overflow: hidden;
|
|
2128
|
+
box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2131
|
+
.dql-app-explain-panel[data-expanded="true"] {
|
|
2132
|
+
width: min(${gr}px, 52vw);
|
|
2133
|
+
max-width: min(${gr}px, 52vw);
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
.dql-app-copilot-panel {
|
|
2137
|
+
display: flex;
|
|
2138
|
+
flex-direction: column;
|
|
2139
|
+
overflow: hidden;
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
.dql-app-assistant-panel {
|
|
2143
|
+
display: flex;
|
|
2144
|
+
flex-direction: column;
|
|
2145
|
+
min-height: 0;
|
|
2146
|
+
overflow: hidden;
|
|
2147
|
+
/* No background override: the shared AiSidePanel owns the surface so App AI,
|
|
2148
|
+
Notebook AI and Block AI read as the same panel rather than three skins. */
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
.dql-app-assistant-top {
|
|
2152
|
+
display: grid;
|
|
2153
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
2154
|
+
align-items: end;
|
|
2155
|
+
gap: 10px;
|
|
2156
|
+
padding: 10px 12px;
|
|
2157
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2158
|
+
flex: none;
|
|
2159
|
+
background: var(--dql-app-surface);
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
.dql-app-assistant-focus {
|
|
2163
|
+
min-width: 0;
|
|
2164
|
+
display: grid;
|
|
2165
|
+
gap: 5px;
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
.dql-app-assistant-focus span {
|
|
2169
|
+
color: var(--dql-app-muted);
|
|
2170
|
+
font: 800 9.5px var(--font-mono);
|
|
2171
|
+
letter-spacing: 0;
|
|
2172
|
+
text-transform: uppercase;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.dql-app-assistant-focus select {
|
|
2176
|
+
width: 100%;
|
|
2177
|
+
height: 36px;
|
|
2178
|
+
border: 1px solid var(--dql-app-line-2);
|
|
2179
|
+
border-radius: 8px;
|
|
2180
|
+
background: var(--dql-app-surface);
|
|
2181
|
+
color: var(--dql-app-ink);
|
|
2182
|
+
padding: 0 10px;
|
|
2183
|
+
font: 750 12px var(--font-ui);
|
|
2184
|
+
cursor: pointer;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
.dql-app-assistant-context-btn {
|
|
2188
|
+
flex: none;
|
|
2189
|
+
height: 30px;
|
|
2190
|
+
border: 1px solid var(--dql-app-line);
|
|
2191
|
+
border-radius: 8px;
|
|
2192
|
+
background: var(--dql-app-control);
|
|
2193
|
+
color: var(--dql-app-muted);
|
|
2194
|
+
display: inline-flex;
|
|
2195
|
+
align-items: center;
|
|
2196
|
+
gap: 5px;
|
|
2197
|
+
padding: 0 9px;
|
|
2198
|
+
cursor: pointer;
|
|
2199
|
+
font: 800 11px var(--font-ui);
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
.dql-app-assistant-context-btn.on,
|
|
2203
|
+
.dql-app-assistant-context-btn:hover {
|
|
2204
|
+
color: var(--dql-app-accent);
|
|
2205
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
2206
|
+
background: var(--dql-app-accent-soft);
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
.dql-app-assistant-context-btn.on svg { transform: rotate(180deg); }
|
|
2210
|
+
|
|
2211
|
+
.dql-app-assistant-context {
|
|
2212
|
+
display: grid;
|
|
2213
|
+
gap: 8px;
|
|
2214
|
+
padding: 11px 14px;
|
|
2215
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2216
|
+
background: var(--dql-app-surface-muted);
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
.dql-app-assistant-context p {
|
|
2220
|
+
margin: 0;
|
|
2221
|
+
color: var(--dql-app-muted);
|
|
2222
|
+
font-size: 12px;
|
|
2223
|
+
line-height: 1.45;
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.dql-app-assistant-context > div {
|
|
2227
|
+
display: grid;
|
|
2228
|
+
gap: 6px;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
.dql-app-one-ai-panel {
|
|
2232
|
+
flex: 1;
|
|
2233
|
+
min-height: 0;
|
|
2234
|
+
overflow: hidden;
|
|
2235
|
+
display: flex;
|
|
2236
|
+
flex-direction: column;
|
|
2237
|
+
padding: 0;
|
|
2238
|
+
background: var(--dql-app-surface);
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
.dql-app-one-ai-status {
|
|
2242
|
+
margin: 0;
|
|
2243
|
+
display: grid;
|
|
2244
|
+
gap: 6px;
|
|
2245
|
+
padding: 10px 16px;
|
|
2246
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2247
|
+
background: color-mix(in srgb, var(--dql-app-surface-muted) 72%, var(--dql-app-surface));
|
|
2248
|
+
flex: none;
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
.dql-app-one-ai-status span {
|
|
2252
|
+
display: inline-flex;
|
|
2253
|
+
align-items: center;
|
|
2254
|
+
gap: 6px;
|
|
2255
|
+
color: var(--dql-app-green);
|
|
2256
|
+
font: 850 11px var(--font-ui);
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.dql-app-one-ai-status > div {
|
|
2260
|
+
display: flex;
|
|
2261
|
+
flex-wrap: nowrap;
|
|
2262
|
+
gap: 6px;
|
|
2263
|
+
overflow-x: auto;
|
|
2264
|
+
scrollbar-width: none;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.dql-app-one-ai-status > div::-webkit-scrollbar {
|
|
2268
|
+
display: none;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
.dql-app-one-ai-status b {
|
|
2272
|
+
flex: none;
|
|
2273
|
+
min-width: 0;
|
|
2274
|
+
max-width: 190px;
|
|
2275
|
+
border: 1px solid var(--dql-app-line);
|
|
2276
|
+
border-radius: 999px;
|
|
2277
|
+
background: var(--dql-app-surface);
|
|
2278
|
+
color: var(--dql-app-faint);
|
|
2279
|
+
font: 750 10.5px var(--font-ui);
|
|
2280
|
+
padding: 4px 8px;
|
|
2281
|
+
overflow: hidden;
|
|
2282
|
+
text-overflow: ellipsis;
|
|
2283
|
+
white-space: nowrap;
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
.dql-app-copilot-thread {
|
|
2287
|
+
flex: 1;
|
|
2288
|
+
min-height: 0;
|
|
2289
|
+
overflow-y: auto;
|
|
2290
|
+
display: flex;
|
|
2291
|
+
flex-direction: column;
|
|
2292
|
+
gap: 14px;
|
|
2293
|
+
padding: 16px 0 20px;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
.dql-app-direct-ask {
|
|
2297
|
+
margin-top: 0;
|
|
2298
|
+
z-index: 4;
|
|
2299
|
+
border-top: 1px solid var(--dql-app-line);
|
|
2300
|
+
padding: 14px 16px 16px;
|
|
2301
|
+
display: grid;
|
|
2302
|
+
gap: 8px;
|
|
2303
|
+
flex: none;
|
|
2304
|
+
background: color-mix(in srgb, var(--dql-app-surface) 92%, transparent);
|
|
2305
|
+
backdrop-filter: blur(10px);
|
|
2306
|
+
box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.05);
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
.dql-app-direct-ask-row {
|
|
2310
|
+
display: grid;
|
|
2311
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
2312
|
+
gap: 8px;
|
|
2313
|
+
align-items: end;
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
.dql-app-direct-ask-row textarea {
|
|
2317
|
+
width: 100%;
|
|
2318
|
+
min-height: 96px;
|
|
2319
|
+
max-height: 150px;
|
|
2320
|
+
resize: vertical;
|
|
2321
|
+
border: 1px solid var(--dql-app-line-2);
|
|
2322
|
+
border-radius: 12px;
|
|
2323
|
+
background: var(--dql-app-surface);
|
|
2324
|
+
color: var(--dql-app-ink);
|
|
2325
|
+
padding: 12px 13px;
|
|
2326
|
+
font: 500 13.5px/1.45 var(--font-ui);
|
|
2327
|
+
outline: none;
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
.dql-app-direct-ask-row textarea:focus {
|
|
2331
|
+
border-color: rgba(79, 99, 215, 0.48);
|
|
2332
|
+
box-shadow: 0 0 0 3px rgba(79, 99, 215, 0.1);
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.dql-app-direct-ask-row button,
|
|
2336
|
+
.dql-app-direct-quick button {
|
|
2337
|
+
border: 1px solid var(--dql-app-line-2);
|
|
2338
|
+
border-radius: 12px;
|
|
2339
|
+
background: var(--dql-app-surface);
|
|
2340
|
+
color: var(--dql-app-ink);
|
|
2341
|
+
display: inline-flex;
|
|
2342
|
+
align-items: center;
|
|
2343
|
+
justify-content: center;
|
|
2344
|
+
gap: 6px;
|
|
2345
|
+
padding: 8px 10px;
|
|
2346
|
+
font-weight: 750;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
.dql-app-direct-ask-row button {
|
|
2350
|
+
min-height: 48px;
|
|
2351
|
+
padding-inline: 13px;
|
|
2352
|
+
background: var(--dql-app-accent);
|
|
2353
|
+
border-color: var(--dql-app-accent);
|
|
2354
|
+
color: #fff;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
.dql-app-direct-ask-row button:disabled {
|
|
2358
|
+
opacity: 0.55;
|
|
2359
|
+
}
|
|
2360
|
+
|
|
2361
|
+
.dql-app-direct-quick {
|
|
2362
|
+
display: grid;
|
|
2363
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
2364
|
+
gap: 6px;
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
.dql-app-direct-quick button {
|
|
2368
|
+
color: var(--dql-app-muted);
|
|
2369
|
+
font-size: 11.5px;
|
|
2370
|
+
padding: 7px 9px;
|
|
2371
|
+
white-space: nowrap;
|
|
2372
|
+
width: 100%;
|
|
2373
|
+
min-width: 0;
|
|
2374
|
+
overflow: hidden;
|
|
2375
|
+
text-overflow: ellipsis;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
.dql-app-copilot-welcome {
|
|
2379
|
+
margin: 2px 16px 0;
|
|
2380
|
+
border: 1px dashed var(--dql-app-line-2);
|
|
2381
|
+
border-radius: 12px;
|
|
2382
|
+
background: var(--dql-app-surface);
|
|
2383
|
+
padding: 12px;
|
|
2384
|
+
display: grid;
|
|
2385
|
+
gap: 6px;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
.dql-app-user-message {
|
|
2389
|
+
align-self: flex-end;
|
|
2390
|
+
max-width: calc(100% - 42px);
|
|
2391
|
+
margin: 0 16px 0 42px;
|
|
2392
|
+
border: 1px solid rgba(79, 99, 215, 0.28);
|
|
2393
|
+
border-radius: 14px 14px 5px 14px;
|
|
2394
|
+
background: var(--dql-app-accent);
|
|
2395
|
+
color: #fff;
|
|
2396
|
+
padding: 10px 12px;
|
|
2397
|
+
box-shadow: 0 10px 28px rgba(79, 99, 215, 0.16);
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
.dql-app-user-message span {
|
|
2401
|
+
display: block;
|
|
2402
|
+
font: 850 9.5px var(--font-mono);
|
|
2403
|
+
letter-spacing: 0;
|
|
2404
|
+
text-transform: uppercase;
|
|
2405
|
+
opacity: .72;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
.dql-app-user-message p {
|
|
2409
|
+
margin: 4px 0 0;
|
|
2410
|
+
color: inherit;
|
|
2411
|
+
font-size: 12.5px;
|
|
2412
|
+
line-height: 1.45;
|
|
2413
|
+
overflow-wrap: anywhere;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
.dql-app-copilot-welcome span {
|
|
2417
|
+
color: var(--dql-app-accent);
|
|
2418
|
+
font: 850 10.5px var(--font-mono);
|
|
2419
|
+
letter-spacing: 0;
|
|
2420
|
+
text-transform: uppercase;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
.dql-app-copilot-welcome p {
|
|
2424
|
+
margin: 0;
|
|
2425
|
+
color: var(--dql-app-muted);
|
|
2426
|
+
font-size: 12.5px;
|
|
2427
|
+
line-height: 1.48;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
.dql-app-direct-answer {
|
|
2431
|
+
border: 1px solid var(--dql-app-line);
|
|
2432
|
+
border-radius: 14px 14px 14px 5px;
|
|
2433
|
+
background: var(--dql-app-surface);
|
|
2434
|
+
margin: 0 42px 0 16px;
|
|
2435
|
+
padding: 12px;
|
|
2436
|
+
box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.dql-app-direct-answer > div:first-child {
|
|
2440
|
+
display: flex;
|
|
2441
|
+
align-items: center;
|
|
2442
|
+
gap: 8px;
|
|
2443
|
+
margin-bottom: 6px;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
.dql-app-direct-answer p {
|
|
2447
|
+
margin: 0;
|
|
2448
|
+
color: var(--dql-app-ink);
|
|
2449
|
+
font-size: 12.5px;
|
|
2450
|
+
line-height: 1.45;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
.dql-app-direct-followups {
|
|
2454
|
+
display: flex;
|
|
2455
|
+
flex-wrap: wrap;
|
|
2456
|
+
gap: 6px;
|
|
2457
|
+
margin-top: 8px;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
.dql-app-direct-followups span,
|
|
2461
|
+
.dql-app-direct-followups button {
|
|
2462
|
+
border: 1px solid var(--dql-app-line);
|
|
2463
|
+
border-radius: 999px;
|
|
2464
|
+
padding: 3px 7px;
|
|
2465
|
+
color: var(--dql-app-muted);
|
|
2466
|
+
font-size: 10.5px;
|
|
2467
|
+
background: var(--dql-app-surface);
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
.dql-app-direct-followups button {
|
|
2471
|
+
cursor: pointer;
|
|
2472
|
+
font-weight: 750;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
.dql-app-direct-followups button:hover {
|
|
2476
|
+
color: var(--dql-app-accent);
|
|
2477
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
2478
|
+
background: var(--dql-app-accent-soft);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
.dql-app-copilot-action-grid {
|
|
2482
|
+
display: grid;
|
|
2483
|
+
gap: 7px;
|
|
2484
|
+
margin-top: 10px;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
.dql-app-copilot-next-step {
|
|
2488
|
+
display: grid;
|
|
2489
|
+
gap: 8px;
|
|
2490
|
+
margin-top: 12px;
|
|
2491
|
+
border: 1px solid rgba(79, 99, 215, 0.18);
|
|
2492
|
+
border-radius: 11px;
|
|
2493
|
+
background: color-mix(in srgb, var(--dql-app-accent-soft) 58%, var(--dql-app-surface));
|
|
2494
|
+
padding: 10px;
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
.dql-app-copilot-next-step > span {
|
|
2498
|
+
color: var(--dql-app-accent);
|
|
2499
|
+
font: 850 10.5px var(--font-mono);
|
|
2500
|
+
text-transform: uppercase;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.dql-app-copilot-next-step p {
|
|
2504
|
+
margin: 0;
|
|
2505
|
+
color: var(--dql-app-muted);
|
|
2506
|
+
font-size: 12px;
|
|
2507
|
+
line-height: 1.45;
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
.dql-app-analysis-handoff {
|
|
2511
|
+
margin: 0 16px;
|
|
2512
|
+
border: 1px solid rgba(22, 163, 74, 0.2);
|
|
2513
|
+
border-radius: 12px;
|
|
2514
|
+
background: rgba(22, 163, 74, 0.06);
|
|
2515
|
+
padding: 12px;
|
|
2516
|
+
display: grid;
|
|
2517
|
+
gap: 7px;
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
.dql-app-analysis-handoff > span {
|
|
2521
|
+
color: #15803d;
|
|
2522
|
+
font: 850 10.5px var(--font-mono);
|
|
2523
|
+
letter-spacing: .02em;
|
|
2524
|
+
text-transform: uppercase;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
.dql-app-analysis-handoff p {
|
|
2528
|
+
margin: 0;
|
|
2529
|
+
color: var(--dql-app-ink);
|
|
2530
|
+
font-size: 12.5px;
|
|
2531
|
+
line-height: 1.45;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
.dql-app-analysis-handoff small {
|
|
2535
|
+
color: var(--dql-app-muted);
|
|
2536
|
+
font-size: 12px;
|
|
2537
|
+
line-height: 1.45;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
.dql-app-analysis-handoff > div {
|
|
2541
|
+
display: flex;
|
|
2542
|
+
flex-wrap: wrap;
|
|
2543
|
+
gap: 7px;
|
|
2544
|
+
margin-top: 2px;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
.dql-app-context-composer {
|
|
2548
|
+
margin: 0 16px;
|
|
2549
|
+
border: 1px solid rgba(79, 99, 215, 0.28);
|
|
2550
|
+
border-radius: 14px;
|
|
2551
|
+
background: var(--dql-app-surface);
|
|
2552
|
+
box-shadow: 0 16px 44px rgba(79, 99, 215, 0.11);
|
|
2553
|
+
padding: 12px;
|
|
2554
|
+
display: grid;
|
|
2555
|
+
gap: 9px;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
.dql-app-context-composer-head {
|
|
2559
|
+
display: flex;
|
|
2560
|
+
align-items: center;
|
|
2561
|
+
justify-content: space-between;
|
|
2562
|
+
gap: 8px;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
.dql-app-context-composer h4 {
|
|
2566
|
+
margin: 0;
|
|
2567
|
+
color: var(--dql-app-ink);
|
|
2568
|
+
font-size: 14px;
|
|
2569
|
+
line-height: 1.25;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
.dql-app-context-composer p {
|
|
2573
|
+
margin: 0;
|
|
2574
|
+
color: var(--dql-app-muted);
|
|
2575
|
+
font-size: 12px;
|
|
2576
|
+
line-height: 1.45;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
.dql-app-context-composer textarea {
|
|
2580
|
+
width: 100%;
|
|
2581
|
+
min-height: 158px;
|
|
2582
|
+
resize: vertical;
|
|
2583
|
+
border: 1px solid var(--dql-app-line-2);
|
|
2584
|
+
border-radius: 8px;
|
|
2585
|
+
background: var(--dql-app-control);
|
|
2586
|
+
color: var(--dql-app-ink);
|
|
2587
|
+
outline: 0;
|
|
2588
|
+
padding: 10px;
|
|
2589
|
+
font: 12.5px/1.5 var(--font-ui);
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
.dql-app-context-composer textarea:focus {
|
|
2593
|
+
border-color: rgba(79, 99, 215, 0.54);
|
|
2594
|
+
box-shadow: 0 0 0 3px rgba(79, 99, 215, 0.1);
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2597
|
+
.dql-app-context-chips {
|
|
2598
|
+
display: flex;
|
|
2599
|
+
flex-wrap: wrap;
|
|
2600
|
+
gap: 6px;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
.dql-app-context-chips span {
|
|
2604
|
+
min-width: 0;
|
|
2605
|
+
max-width: 100%;
|
|
2606
|
+
border: 1px solid var(--dql-app-line);
|
|
2607
|
+
border-radius: 999px;
|
|
2608
|
+
background: var(--dql-app-surface-muted);
|
|
2609
|
+
color: var(--dql-app-muted);
|
|
2610
|
+
padding: 4px 8px;
|
|
2611
|
+
font: 750 10px var(--font-ui);
|
|
2612
|
+
overflow: hidden;
|
|
2613
|
+
text-overflow: ellipsis;
|
|
2614
|
+
white-space: nowrap;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
.dql-app-context-actions {
|
|
2618
|
+
display: flex;
|
|
2619
|
+
justify-content: flex-end;
|
|
2620
|
+
gap: 8px;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
.dql-app-copilot-hero {
|
|
2624
|
+
padding: 12px 14px 10px;
|
|
2625
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2626
|
+
background: linear-gradient(180deg, var(--dql-app-surface), var(--dql-app-surface-muted));
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
.dql-app-copilot-kicker {
|
|
2630
|
+
display: inline-flex;
|
|
2631
|
+
align-items: center;
|
|
2632
|
+
gap: 7px;
|
|
2633
|
+
color: var(--dql-app-muted);
|
|
2634
|
+
font: 750 10px var(--font-mono);
|
|
2635
|
+
letter-spacing: 0;
|
|
2636
|
+
text-transform: uppercase;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
.dql-app-copilot-kicker svg { color: var(--dql-app-accent); }
|
|
2640
|
+
.dql-app-copilot-hero h3 {
|
|
2641
|
+
margin: 6px 0 0;
|
|
2642
|
+
color: var(--dql-app-ink);
|
|
2643
|
+
font-size: 19px;
|
|
2644
|
+
line-height: 1.15;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
.dql-app-copilot-hero p {
|
|
2648
|
+
margin: 6px 0 0;
|
|
2649
|
+
color: var(--dql-app-muted);
|
|
2650
|
+
font-size: 11.5px;
|
|
2651
|
+
line-height: 1.42;
|
|
2652
|
+
display: -webkit-box;
|
|
2653
|
+
-webkit-line-clamp: 2;
|
|
2654
|
+
-webkit-box-orient: vertical;
|
|
2655
|
+
overflow: hidden;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
.dql-app-copilot-decision {
|
|
2659
|
+
margin-top: 8px;
|
|
2660
|
+
border: 1px solid var(--dql-app-line);
|
|
2661
|
+
border-radius: 7px;
|
|
2662
|
+
background: var(--dql-app-surface);
|
|
2663
|
+
padding: 7px 9px;
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
.dql-app-copilot-decision small,
|
|
2667
|
+
.dql-app-copilot-facts small {
|
|
2668
|
+
display: block;
|
|
2669
|
+
color: var(--dql-app-muted);
|
|
2670
|
+
font: 750 9px var(--font-mono);
|
|
2671
|
+
letter-spacing: 0;
|
|
2672
|
+
text-transform: uppercase;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
.dql-app-copilot-decision b {
|
|
2676
|
+
display: block;
|
|
2677
|
+
margin-top: 3px;
|
|
2678
|
+
color: var(--dql-app-ink);
|
|
2679
|
+
font-size: 11.5px;
|
|
2680
|
+
line-height: 1.32;
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
.dql-app-copilot-facts {
|
|
2684
|
+
display: grid;
|
|
2685
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
2686
|
+
gap: 6px;
|
|
2687
|
+
margin-top: 7px;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
.dql-app-copilot-facts span {
|
|
2691
|
+
min-width: 0;
|
|
2692
|
+
border-radius: 7px;
|
|
2693
|
+
background: var(--dql-app-control);
|
|
2694
|
+
padding: 6px 8px;
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
.dql-app-copilot-facts b {
|
|
2698
|
+
display: block;
|
|
2699
|
+
margin-top: 2px;
|
|
2700
|
+
color: var(--dql-app-ink);
|
|
2701
|
+
font-size: 10.5px;
|
|
2702
|
+
line-height: 1.25;
|
|
2703
|
+
overflow: hidden;
|
|
2704
|
+
text-overflow: ellipsis;
|
|
2705
|
+
white-space: nowrap;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
.dql-app-copilot-chat {
|
|
2709
|
+
flex: 1;
|
|
2710
|
+
min-height: 210px;
|
|
2711
|
+
padding: 9px 12px 12px;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
.dql-app-explain-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--dql-app-line); }
|
|
2715
|
+
.dql-app-explain-head span,
|
|
2716
|
+
.dql-app-ex-label {
|
|
2717
|
+
color: var(--dql-app-muted);
|
|
2718
|
+
font: 700 9px var(--font-mono);
|
|
2719
|
+
letter-spacing: 0;
|
|
2720
|
+
text-transform: uppercase;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
.dql-app-explain-head h3 { margin: 3px 0 0; font-size: 17px; }
|
|
2724
|
+
.dql-app-explain-head p { margin: 5px 0 0; color: var(--dql-app-muted); font-size: 11.5px; line-height: 1.45; }
|
|
2725
|
+
.dql-app-ex-section { padding: 13px 16px; border-bottom: 1px solid var(--dql-app-line); }
|
|
2726
|
+
.dql-app-ex-section.compact { padding-top: 11px; padding-bottom: 11px; }
|
|
2727
|
+
.dql-app-copilot-controls {
|
|
2728
|
+
padding: 8px 12px;
|
|
2729
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
.dql-app-copilot-focus {
|
|
2733
|
+
display: grid;
|
|
2734
|
+
gap: 5px;
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
.dql-app-copilot-focus span {
|
|
2738
|
+
color: var(--dql-app-muted);
|
|
2739
|
+
font: 700 9px var(--font-mono);
|
|
2740
|
+
letter-spacing: 0;
|
|
2741
|
+
text-transform: uppercase;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
.dql-app-copilot-focus select {
|
|
2745
|
+
width: 100%;
|
|
2746
|
+
min-width: 0;
|
|
2747
|
+
height: 34px;
|
|
2748
|
+
border: 1px solid var(--dql-app-line-2);
|
|
2749
|
+
border-radius: 7px;
|
|
2750
|
+
background: var(--dql-app-control);
|
|
2751
|
+
color: var(--dql-app-ink);
|
|
2752
|
+
padding: 0 10px;
|
|
2753
|
+
font: 800 12px var(--font-ui);
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
.dql-app-copilot-empty {
|
|
2757
|
+
margin-top: 7px;
|
|
2758
|
+
color: var(--dql-app-faint);
|
|
2759
|
+
font-size: 11px;
|
|
2760
|
+
}
|
|
2761
|
+
|
|
2762
|
+
.dql-app-copilot-brief {
|
|
2763
|
+
display: flex;
|
|
2764
|
+
align-items: flex-start;
|
|
2765
|
+
gap: 10px;
|
|
2766
|
+
padding: 9px 12px;
|
|
2767
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
.dql-app-copilot-brief > div {
|
|
2771
|
+
min-width: 0;
|
|
2772
|
+
flex: 1;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
.dql-app-copilot-brief span {
|
|
2776
|
+
display: inline-flex;
|
|
2777
|
+
color: var(--dql-app-green);
|
|
2778
|
+
font: 750 9px var(--font-mono);
|
|
2779
|
+
letter-spacing: 0;
|
|
2780
|
+
text-transform: uppercase;
|
|
2781
|
+
}
|
|
2782
|
+
|
|
2783
|
+
.dql-app-copilot-brief b {
|
|
2784
|
+
display: block;
|
|
2785
|
+
margin-top: 4px;
|
|
2786
|
+
color: var(--dql-app-ink);
|
|
2787
|
+
font-size: 13px;
|
|
2788
|
+
line-height: 1.25;
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
.dql-app-copilot-brief p {
|
|
2792
|
+
margin: 4px 0 0;
|
|
2793
|
+
color: var(--dql-app-muted);
|
|
2794
|
+
font-size: 11.5px;
|
|
2795
|
+
line-height: 1.35;
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
.dql-app-copilot-result-pill {
|
|
2799
|
+
flex: none;
|
|
2800
|
+
border-radius: 999px;
|
|
2801
|
+
border: 1px solid rgba(22, 163, 74, 0.24);
|
|
2802
|
+
background: var(--dql-app-green-soft);
|
|
2803
|
+
color: var(--dql-app-green) !important;
|
|
2804
|
+
padding: 4px 8px;
|
|
2805
|
+
white-space: nowrap;
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
.dql-app-copilot-prompts {
|
|
2809
|
+
display: flex;
|
|
2810
|
+
gap: 7px;
|
|
2811
|
+
flex-wrap: wrap;
|
|
2812
|
+
padding: 8px 12px;
|
|
2813
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
.dql-app-copilot-prompts button {
|
|
2817
|
+
min-width: 0;
|
|
2818
|
+
height: 31px;
|
|
2819
|
+
border: 1px solid var(--dql-app-line);
|
|
2820
|
+
border-radius: 999px;
|
|
2821
|
+
background: var(--dql-app-surface);
|
|
2822
|
+
color: var(--dql-app-muted);
|
|
2823
|
+
padding: 0 9px;
|
|
2824
|
+
display: inline-flex;
|
|
2825
|
+
align-items: center;
|
|
2826
|
+
gap: 5px;
|
|
2827
|
+
cursor: pointer;
|
|
2828
|
+
font: 800 10.5px var(--font-ui);
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
.dql-app-copilot-prompts button:hover {
|
|
2832
|
+
color: var(--dql-app-accent);
|
|
2833
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
2834
|
+
background: var(--dql-app-accent-soft);
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
.dql-app-copilot-prompts svg {
|
|
2838
|
+
flex: 0 0 auto;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
.dql-app-copilot-evidence {
|
|
2842
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
.dql-app-copilot-evidence summary {
|
|
2846
|
+
min-height: 36px;
|
|
2847
|
+
display: flex;
|
|
2848
|
+
align-items: center;
|
|
2849
|
+
gap: 8px;
|
|
2850
|
+
padding: 0 12px;
|
|
2851
|
+
cursor: pointer;
|
|
2852
|
+
color: var(--dql-app-muted);
|
|
2853
|
+
font: 800 11px var(--font-ui);
|
|
2854
|
+
list-style: none;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
.dql-app-copilot-evidence summary::-webkit-details-marker { display: none; }
|
|
2858
|
+
.dql-app-copilot-evidence summary span {
|
|
2859
|
+
display: inline-flex;
|
|
2860
|
+
align-items: center;
|
|
2861
|
+
gap: 6px;
|
|
2862
|
+
min-width: 0;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
.dql-app-copilot-evidence summary small {
|
|
2866
|
+
margin-left: auto;
|
|
2867
|
+
min-width: 0;
|
|
2868
|
+
max-width: 160px;
|
|
2869
|
+
color: var(--dql-app-faint);
|
|
2870
|
+
font: 700 10px var(--font-mono);
|
|
2871
|
+
overflow: hidden;
|
|
2872
|
+
text-overflow: ellipsis;
|
|
2873
|
+
white-space: nowrap;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
.dql-app-copilot-evidence > div {
|
|
2877
|
+
display: grid;
|
|
2878
|
+
gap: 6px;
|
|
2879
|
+
padding: 0 12px 11px;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
.dql-app-keyvalue-inline {
|
|
2883
|
+
display: grid;
|
|
2884
|
+
grid-template-columns: 92px minmax(0, 1fr);
|
|
2885
|
+
gap: 8px;
|
|
2886
|
+
align-items: baseline;
|
|
2887
|
+
font-size: 11px;
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2890
|
+
.dql-app-keyvalue-inline span {
|
|
2891
|
+
color: var(--dql-app-faint);
|
|
2892
|
+
font-family: var(--font-mono);
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
.dql-app-keyvalue-inline b {
|
|
2896
|
+
min-width: 0;
|
|
2897
|
+
color: var(--dql-app-muted);
|
|
2898
|
+
font-weight: 700;
|
|
2899
|
+
overflow: hidden;
|
|
2900
|
+
text-overflow: ellipsis;
|
|
2901
|
+
white-space: nowrap;
|
|
2902
|
+
}
|
|
2903
|
+
.dql-app-block-cite {
|
|
2904
|
+
display: flex;
|
|
2905
|
+
align-items: center;
|
|
2906
|
+
gap: 9px;
|
|
2907
|
+
padding: 5px 0;
|
|
2908
|
+
font-size: 11.5px;
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
.dql-app-block-cite span { flex: 1; min-width: 0; font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2912
|
+
.dql-app-block-cite b { color: var(--dql-app-faint); font: 10px var(--font-mono); }
|
|
2913
|
+
.dql-app-flow { margin-top: 8px; }
|
|
2914
|
+
.dql-app-flow-node {
|
|
2915
|
+
display: flex;
|
|
2916
|
+
align-items: center;
|
|
2917
|
+
gap: 8px;
|
|
2918
|
+
padding: 5px 0;
|
|
2919
|
+
font-size: 11.5px;
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2922
|
+
.dql-app-flow-node span {
|
|
2923
|
+
width: 28px;
|
|
2924
|
+
height: 23px;
|
|
2925
|
+
border-radius: 6px;
|
|
2926
|
+
background: var(--dql-app-accent-soft);
|
|
2927
|
+
color: var(--dql-app-accent);
|
|
2928
|
+
display: inline-flex;
|
|
2929
|
+
align-items: center;
|
|
2930
|
+
justify-content: center;
|
|
2931
|
+
font: 700 8px var(--font-mono);
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
.dql-app-flow-node b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2935
|
+
.dql-app-flow-node small { color: var(--dql-app-faint); font: 9px var(--font-mono); }
|
|
2936
|
+
.dql-app-flow i {
|
|
2937
|
+
display: block;
|
|
2938
|
+
width: 2px;
|
|
2939
|
+
height: 9px;
|
|
2940
|
+
background: var(--dql-app-accent);
|
|
2941
|
+
margin-left: 13px;
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
.dql-app-suggests { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
|
|
2945
|
+
.dql-app-focus-list {
|
|
2946
|
+
display: grid;
|
|
2947
|
+
gap: 6px;
|
|
2948
|
+
margin-top: 8px;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
.dql-app-focus-list > span {
|
|
2952
|
+
color: var(--dql-app-faint);
|
|
2953
|
+
font-size: 12px;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
.dql-app-focus-list button {
|
|
2957
|
+
min-width: 0;
|
|
2958
|
+
min-height: 34px;
|
|
2959
|
+
border: 1px solid var(--dql-app-line);
|
|
2960
|
+
border-radius: 8px;
|
|
2961
|
+
background: var(--dql-app-surface);
|
|
2962
|
+
color: var(--dql-app-muted);
|
|
2963
|
+
display: flex;
|
|
2964
|
+
align-items: center;
|
|
2965
|
+
gap: 8px;
|
|
2966
|
+
padding: 7px 8px;
|
|
2967
|
+
cursor: pointer;
|
|
2968
|
+
text-align: left;
|
|
2969
|
+
}
|
|
2970
|
+
|
|
2971
|
+
.dql-app-focus-list button.on {
|
|
2972
|
+
color: var(--dql-app-ink);
|
|
2973
|
+
border-color: rgba(79, 99, 215, 0.42);
|
|
2974
|
+
background: var(--dql-app-accent-soft);
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
.dql-app-focus-list button svg {
|
|
2978
|
+
flex: 0 0 auto;
|
|
2979
|
+
color: var(--dql-app-accent);
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
.dql-app-focus-list button span {
|
|
2983
|
+
flex: 1;
|
|
2984
|
+
min-width: 0;
|
|
2985
|
+
overflow: hidden;
|
|
2986
|
+
text-overflow: ellipsis;
|
|
2987
|
+
white-space: nowrap;
|
|
2988
|
+
font: 800 11.5px var(--font-ui);
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2991
|
+
.dql-app-focus-list button b {
|
|
2992
|
+
color: var(--dql-app-faint);
|
|
2993
|
+
font: 700 8.5px var(--font-mono);
|
|
2994
|
+
text-transform: uppercase;
|
|
2995
|
+
}
|
|
2996
|
+
|
|
2997
|
+
.dql-app-rail-title {
|
|
2998
|
+
display: flex;
|
|
2999
|
+
align-items: center;
|
|
3000
|
+
gap: 8px;
|
|
3001
|
+
margin-bottom: 8px;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
.dql-app-rail-title > span { flex: 1; }
|
|
3005
|
+
|
|
3006
|
+
.dql-app-rail-title button {
|
|
3007
|
+
height: 26px;
|
|
3008
|
+
border: 1px solid var(--dql-app-line);
|
|
3009
|
+
border-radius: 6px;
|
|
3010
|
+
background: var(--dql-app-surface);
|
|
3011
|
+
color: var(--dql-app-muted);
|
|
3012
|
+
display: inline-flex;
|
|
3013
|
+
align-items: center;
|
|
3014
|
+
gap: 5px;
|
|
3015
|
+
padding: 0 8px;
|
|
3016
|
+
cursor: pointer;
|
|
3017
|
+
font: 800 10.5px var(--font-ui);
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
.dql-app-drilldown-grid {
|
|
3021
|
+
display: grid;
|
|
3022
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
3023
|
+
gap: 7px;
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
.dql-app-drilldown-grid button {
|
|
3027
|
+
min-width: 0;
|
|
3028
|
+
border: 1px solid var(--dql-app-line);
|
|
3029
|
+
border-radius: 8px;
|
|
3030
|
+
background: var(--dql-app-surface);
|
|
3031
|
+
color: var(--dql-app-muted);
|
|
3032
|
+
padding: 8px 6px;
|
|
3033
|
+
display: grid;
|
|
3034
|
+
justify-items: center;
|
|
3035
|
+
gap: 5px;
|
|
3036
|
+
cursor: pointer;
|
|
3037
|
+
font: 800 10.5px var(--font-ui);
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
.dql-app-drilldown-grid button:hover {
|
|
3041
|
+
color: var(--dql-app-accent);
|
|
3042
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
3043
|
+
background: var(--dql-app-accent-soft);
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
.dql-app-rail-chat {
|
|
3047
|
+
height: 100%;
|
|
3048
|
+
min-height: 0;
|
|
3049
|
+
border: 1px solid var(--dql-app-line-2);
|
|
3050
|
+
border-radius: 8px;
|
|
3051
|
+
overflow: hidden;
|
|
3052
|
+
background: var(--dql-app-surface);
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
.dql-app-rail-chat.expanded {
|
|
3056
|
+
position: fixed;
|
|
3057
|
+
z-index: 80;
|
|
3058
|
+
right: 24px;
|
|
3059
|
+
top: 76px;
|
|
3060
|
+
bottom: 24px;
|
|
3061
|
+
width: min(760px, calc(100vw - 80px));
|
|
3062
|
+
height: auto;
|
|
3063
|
+
box-shadow: 0 18px 60px rgba(15, 23, 42, 0.24);
|
|
3064
|
+
}
|
|
3065
|
+
|
|
3066
|
+
.dql-app-gapcard {
|
|
3067
|
+
margin: 12px;
|
|
3068
|
+
border-radius: 7px;
|
|
3069
|
+
background: var(--dql-app-orange-soft);
|
|
3070
|
+
padding: 11px 12px;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
.dql-app-gapcard p { margin: 6px 0 0; color: var(--dql-app-muted); font-size: 11.5px; line-height: 1.45; }
|
|
3074
|
+
.dql-app-research-shell {
|
|
3075
|
+
display: grid;
|
|
3076
|
+
gap: 14px;
|
|
3077
|
+
min-height: 620px;
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
.dql-app-research-shell.history-open {
|
|
3081
|
+
grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
.dql-app-research-shell.history-collapsed {
|
|
3085
|
+
grid-template-columns: minmax(0, 1fr);
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3088
|
+
.dql-app-research-shell.history-collapsed .dql-app-research-list {
|
|
3089
|
+
display: none;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
.dql-app-research-list {
|
|
3093
|
+
border: 1px solid var(--dql-app-line);
|
|
3094
|
+
border-radius: 8px;
|
|
3095
|
+
background: var(--dql-app-surface);
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
.dql-app-research-list {
|
|
3099
|
+
padding: 12px;
|
|
3100
|
+
display: flex;
|
|
3101
|
+
flex-direction: column;
|
|
3102
|
+
gap: 10px;
|
|
3103
|
+
min-width: 0;
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
.dql-app-research-detail {
|
|
3107
|
+
padding: 0;
|
|
3108
|
+
min-width: 0;
|
|
3109
|
+
overflow: auto;
|
|
3110
|
+
background: transparent;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
.dql-app-research-head,
|
|
3114
|
+
.dql-app-research-titlebar,
|
|
3115
|
+
.dql-app-research-evidence-head {
|
|
3116
|
+
display: flex;
|
|
3117
|
+
align-items: center;
|
|
3118
|
+
justify-content: space-between;
|
|
3119
|
+
gap: 12px;
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
.dql-app-research-head span {
|
|
3123
|
+
display: inline-flex;
|
|
3124
|
+
align-items: center;
|
|
3125
|
+
gap: 7px;
|
|
3126
|
+
font-weight: 850;
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
.dql-app-research-head > div {
|
|
3130
|
+
display: inline-flex;
|
|
3131
|
+
align-items: center;
|
|
3132
|
+
gap: 7px;
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
.dql-app-research-head b {
|
|
3136
|
+
color: var(--dql-app-faint);
|
|
3137
|
+
font-family: var(--font-mono);
|
|
3138
|
+
font-size: 10px;
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
.dql-app-research-head button {
|
|
3142
|
+
height: 26px;
|
|
3143
|
+
border: 1px solid var(--dql-app-line);
|
|
3144
|
+
border-radius: 999px;
|
|
3145
|
+
background: var(--dql-app-surface-muted);
|
|
3146
|
+
color: var(--dql-app-muted);
|
|
3147
|
+
padding: 0 9px;
|
|
3148
|
+
cursor: pointer;
|
|
3149
|
+
font: 800 10px var(--font-ui);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
.dql-app-research-head button:hover {
|
|
3153
|
+
color: var(--dql-app-accent);
|
|
3154
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
3155
|
+
background: var(--dql-app-accent-soft);
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
.dql-app-research-new {
|
|
3159
|
+
height: 32px;
|
|
3160
|
+
border: 1px solid var(--dql-app-line);
|
|
3161
|
+
border-radius: 7px;
|
|
3162
|
+
background: var(--dql-app-control);
|
|
3163
|
+
color: var(--dql-app-ink);
|
|
3164
|
+
display: inline-flex;
|
|
3165
|
+
align-items: center;
|
|
3166
|
+
justify-content: center;
|
|
3167
|
+
gap: 7px;
|
|
3168
|
+
font: 800 12px var(--font-ui);
|
|
3169
|
+
cursor: pointer;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
.dql-app-research-new:disabled { opacity: 0.65; cursor: not-allowed; }
|
|
3173
|
+
.dql-app-research-items { display: grid; gap: 6px; overflow: auto; }
|
|
3174
|
+
.dql-app-research-group-label {
|
|
3175
|
+
margin: 4px 2px 1px;
|
|
3176
|
+
color: var(--dql-app-faint);
|
|
3177
|
+
font: 850 9.5px var(--font-mono);
|
|
3178
|
+
letter-spacing: 0;
|
|
3179
|
+
text-transform: uppercase;
|
|
3180
|
+
}
|
|
3181
|
+
.dql-app-research-items button {
|
|
3182
|
+
border: 1px solid transparent;
|
|
3183
|
+
border-radius: 7px;
|
|
3184
|
+
background: transparent;
|
|
3185
|
+
color: var(--dql-app-ink);
|
|
3186
|
+
text-align: left;
|
|
3187
|
+
padding: 9px;
|
|
3188
|
+
cursor: pointer;
|
|
3189
|
+
min-width: 0;
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
.dql-app-research-items button.on,
|
|
3193
|
+
.dql-app-research-items button:hover {
|
|
3194
|
+
border-color: var(--dql-app-line);
|
|
3195
|
+
background: var(--dql-app-control);
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
.dql-app-research-items button.status-error:not(.on) {
|
|
3199
|
+
color: var(--dql-app-muted);
|
|
3200
|
+
opacity: 0.72;
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
.dql-app-research-items button.status-error small {
|
|
3204
|
+
color: var(--dql-app-orange);
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
.dql-app-research-items button.status-ready small {
|
|
3208
|
+
color: var(--dql-app-green);
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
.dql-app-research-history-toggle {
|
|
3212
|
+
border-style: dashed !important;
|
|
3213
|
+
background: var(--dql-app-surface-muted) !important;
|
|
3214
|
+
color: var(--dql-app-muted) !important;
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
.dql-app-research-items span,
|
|
3218
|
+
.dql-app-research-items small {
|
|
3219
|
+
display: block;
|
|
3220
|
+
overflow: hidden;
|
|
3221
|
+
text-overflow: ellipsis;
|
|
3222
|
+
white-space: nowrap;
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
.dql-app-research-items span { font-weight: 800; font-size: 12px; }
|
|
3226
|
+
.dql-app-research-items small { margin-top: 3px; color: var(--dql-app-muted); font-size: 10.5px; }
|
|
3227
|
+
.dql-app-research-titlebar { align-items: flex-start; margin-bottom: 14px; }
|
|
3228
|
+
.dql-app-research-titlebar h2 {
|
|
3229
|
+
margin: 2px 0 0;
|
|
3230
|
+
font-size: 20px;
|
|
3231
|
+
line-height: 1.2;
|
|
3232
|
+
}
|
|
3233
|
+
|
|
3234
|
+
.dql-app-research-status {
|
|
3235
|
+
margin: 0 0 12px;
|
|
3236
|
+
border: 1px solid rgba(37, 99, 235, 0.26);
|
|
3237
|
+
border-radius: 8px;
|
|
3238
|
+
background: var(--dql-app-accent-soft);
|
|
3239
|
+
color: var(--dql-app-accent);
|
|
3240
|
+
padding: 10px 12px;
|
|
3241
|
+
display: flex;
|
|
3242
|
+
align-items: flex-start;
|
|
3243
|
+
gap: 8px;
|
|
3244
|
+
font: 800 12px var(--font-ui);
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
.dql-app-research-status.opening {
|
|
3248
|
+
border-color: rgba(79, 99, 215, 0.28);
|
|
3249
|
+
background: color-mix(in srgb, var(--dql-app-accent-soft) 72%, var(--dql-app-surface));
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
.dql-app-research-status > div {
|
|
3253
|
+
min-width: 0;
|
|
3254
|
+
display: grid;
|
|
3255
|
+
gap: 3px;
|
|
3256
|
+
}
|
|
3257
|
+
|
|
3258
|
+
.dql-app-research-status small {
|
|
3259
|
+
color: var(--dql-app-muted);
|
|
3260
|
+
font: 700 11px/1.35 var(--font-ui);
|
|
3261
|
+
overflow: hidden;
|
|
3262
|
+
text-overflow: ellipsis;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
.dql-app-report-toolbar {
|
|
3266
|
+
max-width: 1120px;
|
|
3267
|
+
margin: 0 auto 12px;
|
|
3268
|
+
display: flex;
|
|
3269
|
+
align-items: center;
|
|
3270
|
+
justify-content: space-between;
|
|
3271
|
+
gap: 12px;
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
.dql-app-report-toolbar > div {
|
|
3275
|
+
min-width: 0;
|
|
3276
|
+
display: grid;
|
|
3277
|
+
gap: 3px;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
.dql-app-report-toolbar span {
|
|
3281
|
+
color: var(--dql-app-faint);
|
|
3282
|
+
font: 850 9.5px var(--font-mono);
|
|
3283
|
+
text-transform: uppercase;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
.dql-app-report-toolbar b {
|
|
3287
|
+
min-width: 0;
|
|
3288
|
+
color: var(--dql-app-ink);
|
|
3289
|
+
font-size: 13px;
|
|
3290
|
+
overflow: hidden;
|
|
3291
|
+
text-overflow: ellipsis;
|
|
3292
|
+
white-space: nowrap;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
.dql-app-research-creating {
|
|
3296
|
+
max-width: 760px;
|
|
3297
|
+
min-height: 340px;
|
|
3298
|
+
margin: 40px auto;
|
|
3299
|
+
border: 1px solid var(--dql-app-line);
|
|
3300
|
+
border-radius: 12px;
|
|
3301
|
+
background: var(--dql-app-surface);
|
|
3302
|
+
box-shadow: var(--dql-app-shadow);
|
|
3303
|
+
color: var(--dql-app-muted);
|
|
3304
|
+
padding: 42px;
|
|
3305
|
+
display: grid;
|
|
3306
|
+
place-items: center;
|
|
3307
|
+
align-content: center;
|
|
3308
|
+
gap: 12px;
|
|
3309
|
+
text-align: center;
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
.dql-app-research-creating.active {
|
|
3313
|
+
max-width: 920px;
|
|
3314
|
+
min-height: 420px;
|
|
3315
|
+
border-color: rgba(79, 99, 215, 0.24);
|
|
3316
|
+
background:
|
|
3317
|
+
linear-gradient(180deg, color-mix(in srgb, var(--dql-app-accent-soft) 24%, var(--dql-app-surface)), var(--dql-app-surface) 48%),
|
|
3318
|
+
var(--dql-app-surface);
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
.dql-app-research-creating svg {
|
|
3322
|
+
color: var(--dql-app-accent);
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
.dql-app-research-creating > span {
|
|
3326
|
+
color: var(--dql-app-accent);
|
|
3327
|
+
font: 850 10.5px var(--font-mono);
|
|
3328
|
+
letter-spacing: 0;
|
|
3329
|
+
text-transform: uppercase;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
.dql-app-research-creating h2 {
|
|
3333
|
+
margin: 0;
|
|
3334
|
+
color: var(--dql-app-ink);
|
|
3335
|
+
font-size: 24px;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
.dql-app-research-creating p {
|
|
3339
|
+
margin: 0;
|
|
3340
|
+
max-width: 520px;
|
|
3341
|
+
font-size: 13px;
|
|
3342
|
+
line-height: 1.6;
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
.dql-app-research-creating-steps {
|
|
3346
|
+
display: flex;
|
|
3347
|
+
flex-wrap: wrap;
|
|
3348
|
+
justify-content: center;
|
|
3349
|
+
gap: 8px;
|
|
3350
|
+
margin-top: 4px;
|
|
3351
|
+
max-width: 680px;
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
.dql-app-research-creating-steps small {
|
|
3355
|
+
border: 1px solid var(--dql-app-line);
|
|
3356
|
+
border-radius: 999px;
|
|
3357
|
+
background: var(--dql-app-surface-muted);
|
|
3358
|
+
color: var(--dql-app-muted);
|
|
3359
|
+
padding: 5px 9px;
|
|
3360
|
+
font: 750 11px var(--font-ui);
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
.dql-app-research-report {
|
|
3364
|
+
max-width: 1040px;
|
|
3365
|
+
margin: 0 auto;
|
|
3366
|
+
border: 0;
|
|
3367
|
+
border-radius: 0;
|
|
3368
|
+
background: var(--dql-app-surface);
|
|
3369
|
+
box-shadow: none;
|
|
3370
|
+
overflow: visible;
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
.dql-app-report-hero {
|
|
3374
|
+
padding: 26px 34px 20px;
|
|
3375
|
+
border-bottom: 0;
|
|
3376
|
+
background: var(--dql-app-surface);
|
|
3377
|
+
}
|
|
3378
|
+
|
|
3379
|
+
.dql-app-report-status-row {
|
|
3380
|
+
display: flex;
|
|
3381
|
+
align-items: center;
|
|
3382
|
+
justify-content: space-between;
|
|
3383
|
+
gap: 14px;
|
|
3384
|
+
}
|
|
3385
|
+
|
|
3386
|
+
.dql-app-report-status-row > span {
|
|
3387
|
+
display: inline-flex;
|
|
3388
|
+
align-items: center;
|
|
3389
|
+
gap: 7px;
|
|
3390
|
+
color: var(--dql-app-muted);
|
|
3391
|
+
font: 850 10px var(--font-mono);
|
|
3392
|
+
text-transform: uppercase;
|
|
3393
|
+
}
|
|
3394
|
+
|
|
3395
|
+
.dql-app-report-hero h2 {
|
|
3396
|
+
margin: 18px 0 0;
|
|
3397
|
+
color: var(--dql-app-ink);
|
|
3398
|
+
font-size: clamp(25px, 2.4vw, 34px);
|
|
3399
|
+
line-height: 1.08;
|
|
3400
|
+
max-width: 860px;
|
|
3401
|
+
text-wrap: balance;
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3404
|
+
.dql-app-report-hero p {
|
|
3405
|
+
margin: 14px 0 0;
|
|
3406
|
+
color: var(--dql-app-muted);
|
|
3407
|
+
font-size: 14px;
|
|
3408
|
+
line-height: 1.6;
|
|
3409
|
+
max-width: 850px;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3412
|
+
.dql-app-report-context-line {
|
|
3413
|
+
display: flex;
|
|
3414
|
+
flex-wrap: wrap;
|
|
3415
|
+
gap: 8px;
|
|
3416
|
+
margin-top: 18px;
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
.dql-app-report-context-line span {
|
|
3420
|
+
display: inline-flex;
|
|
3421
|
+
align-items: center;
|
|
3422
|
+
gap: 6px;
|
|
3423
|
+
border: 1px solid var(--dql-app-line);
|
|
3424
|
+
border-radius: 999px;
|
|
3425
|
+
background: var(--dql-app-surface);
|
|
3426
|
+
color: var(--dql-app-muted);
|
|
3427
|
+
padding: 6px 10px;
|
|
3428
|
+
font-size: 11.5px;
|
|
3429
|
+
max-width: 100%;
|
|
3430
|
+
}
|
|
3431
|
+
|
|
3432
|
+
.dql-app-report-context-line b {
|
|
3433
|
+
color: var(--dql-app-ink);
|
|
3434
|
+
font-weight: 850;
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3437
|
+
.dql-app-report-route {
|
|
3438
|
+
display: flex;
|
|
3439
|
+
align-items: flex-start;
|
|
3440
|
+
gap: 10px;
|
|
3441
|
+
margin-top: 14px;
|
|
3442
|
+
border: 1px solid rgba(79, 99, 215, 0.18);
|
|
3443
|
+
border-radius: 10px;
|
|
3444
|
+
background: rgba(79, 99, 215, 0.055);
|
|
3445
|
+
padding: 10px 12px;
|
|
3446
|
+
max-width: 900px;
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
.dql-app-report-route > svg {
|
|
3450
|
+
color: var(--dql-app-accent);
|
|
3451
|
+
flex: 0 0 auto;
|
|
3452
|
+
margin-top: 2px;
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
.dql-app-report-route span {
|
|
3456
|
+
display: block;
|
|
3457
|
+
color: var(--dql-app-accent);
|
|
3458
|
+
font: 850 10.5px var(--font-mono);
|
|
3459
|
+
letter-spacing: .02em;
|
|
3460
|
+
text-transform: uppercase;
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
.dql-app-report-route p {
|
|
3464
|
+
margin: 5px 0 0;
|
|
3465
|
+
color: var(--dql-app-ink);
|
|
3466
|
+
font-size: 12.5px;
|
|
3467
|
+
line-height: 1.45;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
.dql-app-report-route small {
|
|
3471
|
+
display: block;
|
|
3472
|
+
margin-top: 5px;
|
|
3473
|
+
color: var(--dql-app-muted);
|
|
3474
|
+
font-size: 12px;
|
|
3475
|
+
line-height: 1.45;
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
.dql-app-report-actions {
|
|
3479
|
+
display: flex;
|
|
3480
|
+
flex-wrap: wrap;
|
|
3481
|
+
gap: 8px;
|
|
3482
|
+
margin-top: 18px;
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3485
|
+
.dql-app-report-review-actions {
|
|
3486
|
+
position: relative;
|
|
3487
|
+
}
|
|
3488
|
+
|
|
3489
|
+
.dql-app-report-review-actions summary {
|
|
3490
|
+
list-style: none;
|
|
3491
|
+
height: 32px;
|
|
3492
|
+
border: 1px solid var(--dql-app-line);
|
|
3493
|
+
border-radius: 8px;
|
|
3494
|
+
background: var(--dql-app-surface);
|
|
3495
|
+
color: var(--dql-app-muted);
|
|
3496
|
+
padding: 0 10px;
|
|
3497
|
+
display: inline-flex;
|
|
3498
|
+
align-items: center;
|
|
3499
|
+
cursor: pointer;
|
|
3500
|
+
font: 800 11.5px var(--font-ui);
|
|
3501
|
+
}
|
|
3502
|
+
|
|
3503
|
+
.dql-app-report-review-actions summary::-webkit-details-marker {
|
|
3504
|
+
display: none;
|
|
3505
|
+
}
|
|
3506
|
+
|
|
3507
|
+
.dql-app-report-review-actions[open] summary,
|
|
3508
|
+
.dql-app-report-review-actions summary:hover {
|
|
3509
|
+
color: var(--dql-app-accent);
|
|
3510
|
+
border-color: rgba(79, 99, 215, 0.34);
|
|
3511
|
+
background: var(--dql-app-accent-soft);
|
|
3512
|
+
}
|
|
3513
|
+
|
|
3514
|
+
.dql-app-report-review-actions > div {
|
|
3515
|
+
position: absolute;
|
|
3516
|
+
z-index: 5;
|
|
3517
|
+
right: 0;
|
|
3518
|
+
top: calc(100% + 6px);
|
|
3519
|
+
min-width: 220px;
|
|
3520
|
+
border: 1px solid var(--dql-app-line);
|
|
3521
|
+
border-radius: 10px;
|
|
3522
|
+
background: var(--dql-app-surface);
|
|
3523
|
+
box-shadow: var(--dql-app-shadow);
|
|
3524
|
+
padding: 8px;
|
|
3525
|
+
display: grid;
|
|
3526
|
+
gap: 7px;
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
.dql-app-report-review-actions > div .dql-apps-btn {
|
|
3530
|
+
justify-content: flex-start;
|
|
3531
|
+
width: 100%;
|
|
3532
|
+
}
|
|
3533
|
+
|
|
3534
|
+
.dql-app-report-warning {
|
|
3535
|
+
display: flex;
|
|
3536
|
+
align-items: flex-start;
|
|
3537
|
+
gap: 8px;
|
|
3538
|
+
margin-top: 14px;
|
|
3539
|
+
border: 1px solid rgba(217, 119, 6, 0.24);
|
|
3540
|
+
border-radius: 9px;
|
|
3541
|
+
background: rgba(251, 191, 36, 0.12);
|
|
3542
|
+
color: #92400e;
|
|
3543
|
+
padding: 10px 12px;
|
|
3544
|
+
font-size: 12px;
|
|
3545
|
+
line-height: 1.45;
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.dql-app-report-warning svg {
|
|
3549
|
+
flex: none;
|
|
3550
|
+
margin-top: 1px;
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
.dql-app-report-section {
|
|
3554
|
+
padding: 24px 34px;
|
|
3555
|
+
border-bottom: 0;
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
.dql-app-report-section:last-child {
|
|
3559
|
+
border-bottom: 0;
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
.dql-app-report-section h3 {
|
|
3563
|
+
margin: 0 0 12px;
|
|
3564
|
+
color: var(--dql-app-ink);
|
|
3565
|
+
font-size: 17px;
|
|
3566
|
+
line-height: 1.25;
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
.dql-app-report-paper {
|
|
3570
|
+
color: var(--dql-app-ink);
|
|
3571
|
+
font-size: 14.5px;
|
|
3572
|
+
line-height: 1.78;
|
|
3573
|
+
padding: 26px 54px 20px;
|
|
3574
|
+
}
|
|
3575
|
+
|
|
3576
|
+
.dql-app-report-paper h2,
|
|
3577
|
+
.dql-app-report-paper h3 {
|
|
3578
|
+
margin: 18px 0 8px;
|
|
3579
|
+
color: var(--dql-app-ink);
|
|
3580
|
+
font-size: 18px;
|
|
3581
|
+
line-height: 1.22;
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
.dql-app-report-paper h2:first-child,
|
|
3585
|
+
.dql-app-report-paper h3:first-child {
|
|
3586
|
+
margin-top: 0;
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3589
|
+
.dql-app-report-paper p,
|
|
3590
|
+
.dql-app-report-paper ul,
|
|
3591
|
+
.dql-app-report-paper ol {
|
|
3592
|
+
max-width: 900px;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
.dql-app-report-dynamic-sections {
|
|
3596
|
+
display: grid;
|
|
3597
|
+
gap: 30px;
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
.dql-app-report-dynamic-section {
|
|
3601
|
+
border-left: 0;
|
|
3602
|
+
padding: 0;
|
|
3603
|
+
display: grid;
|
|
3604
|
+
gap: 10px;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
.dql-app-report-dynamic-head {
|
|
3608
|
+
display: grid;
|
|
3609
|
+
gap: 5px;
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
.dql-app-report-dynamic-head span {
|
|
3613
|
+
color: var(--dql-app-muted);
|
|
3614
|
+
font: 850 9.5px var(--font-mono);
|
|
3615
|
+
letter-spacing: 0;
|
|
3616
|
+
text-transform: uppercase;
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
.dql-app-report-dynamic-head h3 {
|
|
3620
|
+
margin: 0;
|
|
3621
|
+
font-size: 20px;
|
|
3622
|
+
line-height: 1.18;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
.dql-app-report-memo-body {
|
|
3626
|
+
display: grid;
|
|
3627
|
+
gap: 10px;
|
|
3628
|
+
max-width: 900px;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
.dql-app-report-memo-body p {
|
|
3632
|
+
margin: 0;
|
|
3633
|
+
color: var(--dql-app-ink);
|
|
3634
|
+
font-size: 14.5px;
|
|
3635
|
+
line-height: 1.72;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
.dql-app-report-dynamic-section ul {
|
|
3639
|
+
margin: 4px 0 0;
|
|
3640
|
+
padding-left: 20px;
|
|
3641
|
+
display: grid;
|
|
3642
|
+
gap: 7px;
|
|
3643
|
+
max-width: 820px;
|
|
3644
|
+
}
|
|
3645
|
+
|
|
3646
|
+
.dql-app-report-dynamic-section li {
|
|
3647
|
+
color: var(--dql-app-ink);
|
|
3648
|
+
font-size: 14.5px;
|
|
3649
|
+
line-height: 1.6;
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3652
|
+
.dql-app-report-evidence-story {
|
|
3653
|
+
display: grid;
|
|
3654
|
+
grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
|
|
3655
|
+
gap: 24px;
|
|
3656
|
+
align-items: start;
|
|
3657
|
+
margin: 6px 34px 12px;
|
|
3658
|
+
border: 1px solid color-mix(in srgb, var(--dql-app-line) 75%, transparent);
|
|
3659
|
+
border-radius: 12px;
|
|
3660
|
+
background: linear-gradient(180deg, color-mix(in srgb, var(--dql-app-surface-muted) 64%, var(--dql-app-surface)), var(--dql-app-surface));
|
|
3661
|
+
}
|
|
3662
|
+
|
|
3663
|
+
.dql-app-report-evidence-story.single {
|
|
3664
|
+
grid-template-columns: minmax(0, 1fr);
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3667
|
+
.dql-app-report-evidence-story .dql-app-report-numbers {
|
|
3668
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
.dql-app-report-prose {
|
|
3672
|
+
font-size: 14px;
|
|
3673
|
+
line-height: 1.65;
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
.dql-app-report-callout {
|
|
3677
|
+
margin-top: 16px;
|
|
3678
|
+
border-left: 3px solid var(--dql-app-accent);
|
|
3679
|
+
background: var(--dql-app-surface-muted);
|
|
3680
|
+
padding: 12px 14px;
|
|
3681
|
+
color: var(--dql-app-muted);
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
.dql-app-report-numbers {
|
|
3685
|
+
display: grid;
|
|
3686
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
3687
|
+
gap: 10px;
|
|
3688
|
+
}
|
|
3689
|
+
|
|
3690
|
+
.dql-app-report-number {
|
|
3691
|
+
border: 1px solid var(--dql-app-line);
|
|
3692
|
+
border-radius: 9px;
|
|
3693
|
+
background: var(--dql-app-surface);
|
|
3694
|
+
padding: 13px;
|
|
3695
|
+
min-width: 0;
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3698
|
+
.dql-app-report-number span,
|
|
3699
|
+
.dql-app-report-number small {
|
|
3700
|
+
display: block;
|
|
3701
|
+
color: var(--dql-app-muted);
|
|
3702
|
+
}
|
|
3703
|
+
|
|
3704
|
+
.dql-app-report-number span {
|
|
3705
|
+
font: 850 9.5px var(--font-mono);
|
|
3706
|
+
letter-spacing: 0;
|
|
3707
|
+
text-transform: uppercase;
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
.dql-app-report-number b {
|
|
3711
|
+
display: block;
|
|
3712
|
+
margin-top: 7px;
|
|
3713
|
+
color: var(--dql-app-ink);
|
|
3714
|
+
font-size: 23px;
|
|
3715
|
+
line-height: 1;
|
|
3716
|
+
overflow: hidden;
|
|
3717
|
+
text-overflow: ellipsis;
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
.dql-app-report-number small {
|
|
3721
|
+
margin-top: 7px;
|
|
3722
|
+
font-size: 11.5px;
|
|
3723
|
+
line-height: 1.35;
|
|
3724
|
+
}
|
|
3725
|
+
|
|
3726
|
+
.dql-app-report-drivers {
|
|
3727
|
+
display: grid;
|
|
3728
|
+
gap: 12px;
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3731
|
+
.dql-app-report-driver {
|
|
3732
|
+
display: grid;
|
|
3733
|
+
grid-template-columns: 34px minmax(0, 1fr);
|
|
3734
|
+
gap: 12px;
|
|
3735
|
+
align-items: start;
|
|
3736
|
+
padding: 13px 0;
|
|
3737
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
3738
|
+
}
|
|
3739
|
+
|
|
3740
|
+
.dql-app-report-driver:last-child { border-bottom: 0; }
|
|
3741
|
+
|
|
3742
|
+
.dql-app-report-driver > span {
|
|
3743
|
+
width: 28px;
|
|
3744
|
+
height: 28px;
|
|
3745
|
+
border-radius: 999px;
|
|
3746
|
+
background: var(--dql-app-accent-soft);
|
|
3747
|
+
color: var(--dql-app-accent);
|
|
3748
|
+
display: inline-flex;
|
|
3749
|
+
align-items: center;
|
|
3750
|
+
justify-content: center;
|
|
3751
|
+
font: 850 12px var(--font-mono);
|
|
3752
|
+
}
|
|
3753
|
+
|
|
3754
|
+
.dql-app-report-driver b {
|
|
3755
|
+
display: inline;
|
|
3756
|
+
color: var(--dql-app-ink);
|
|
3757
|
+
font-size: 14px;
|
|
3758
|
+
}
|
|
3759
|
+
|
|
3760
|
+
.dql-app-report-driver em {
|
|
3761
|
+
margin-left: 8px;
|
|
3762
|
+
color: var(--dql-app-accent);
|
|
3763
|
+
font: 850 12px var(--font-mono);
|
|
3764
|
+
font-style: normal;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
.dql-app-report-driver p,
|
|
3768
|
+
.dql-app-report-muted {
|
|
3769
|
+
margin: 7px 0 0;
|
|
3770
|
+
color: var(--dql-app-muted);
|
|
3771
|
+
font-size: 13px;
|
|
3772
|
+
line-height: 1.55;
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
.dql-app-report-driver-chart {
|
|
3776
|
+
display: grid;
|
|
3777
|
+
gap: 13px;
|
|
3778
|
+
}
|
|
3779
|
+
|
|
3780
|
+
.dql-app-report-driver-bar {
|
|
3781
|
+
display: grid;
|
|
3782
|
+
gap: 7px;
|
|
3783
|
+
}
|
|
3784
|
+
|
|
3785
|
+
.dql-app-report-driver-bar > div {
|
|
3786
|
+
display: flex;
|
|
3787
|
+
align-items: baseline;
|
|
3788
|
+
justify-content: space-between;
|
|
3789
|
+
gap: 12px;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
.dql-app-report-driver-bar b {
|
|
3793
|
+
min-width: 0;
|
|
3794
|
+
color: var(--dql-app-ink);
|
|
3795
|
+
font-size: 13.5px;
|
|
3796
|
+
overflow: hidden;
|
|
3797
|
+
text-overflow: ellipsis;
|
|
3798
|
+
white-space: nowrap;
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
.dql-app-report-driver-bar span {
|
|
3802
|
+
flex: none;
|
|
3803
|
+
color: var(--dql-app-accent);
|
|
3804
|
+
font: 850 11px var(--font-mono);
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
.dql-app-report-driver-bar i {
|
|
3808
|
+
display: block;
|
|
3809
|
+
width: var(--driver-width);
|
|
3810
|
+
min-width: 28px;
|
|
3811
|
+
height: 9px;
|
|
3812
|
+
border-radius: 999px;
|
|
3813
|
+
background: linear-gradient(90deg, var(--dql-app-accent), rgba(79, 99, 215, 0.42));
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
.dql-app-report-driver-bar p {
|
|
3817
|
+
margin: 0;
|
|
3818
|
+
color: var(--dql-app-muted);
|
|
3819
|
+
font-size: 12px;
|
|
3820
|
+
line-height: 1.45;
|
|
3821
|
+
}
|
|
3822
|
+
|
|
3823
|
+
.dql-app-report-appendix {
|
|
3824
|
+
padding: 0;
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
.dql-app-report-appendix summary {
|
|
3828
|
+
list-style: none;
|
|
3829
|
+
display: grid;
|
|
3830
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
3831
|
+
gap: 4px 14px;
|
|
3832
|
+
align-items: center;
|
|
3833
|
+
cursor: pointer;
|
|
3834
|
+
padding: 18px 30px;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3837
|
+
.dql-app-report-appendix summary::-webkit-details-marker {
|
|
3838
|
+
display: none;
|
|
3839
|
+
}
|
|
3840
|
+
|
|
3841
|
+
.dql-app-report-appendix summary span {
|
|
3842
|
+
color: var(--dql-app-ink);
|
|
3843
|
+
font: 850 14px var(--font-ui);
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
.dql-app-report-appendix summary small {
|
|
3847
|
+
grid-column: 1 / 2;
|
|
3848
|
+
color: var(--dql-app-muted);
|
|
3849
|
+
font-size: 12px;
|
|
3850
|
+
line-height: 1.4;
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
.dql-app-report-appendix summary svg {
|
|
3854
|
+
grid-row: 1 / span 2;
|
|
3855
|
+
grid-column: 2;
|
|
3856
|
+
color: var(--dql-app-muted);
|
|
3857
|
+
transition: transform 140ms ease;
|
|
3858
|
+
}
|
|
3859
|
+
|
|
3860
|
+
.dql-app-report-appendix[open] summary {
|
|
3861
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
.dql-app-report-appendix[open] summary svg {
|
|
3865
|
+
transform: rotate(180deg);
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
.dql-app-report-appendix .dql-app-research-evidence-head {
|
|
3869
|
+
align-items: flex-start;
|
|
3870
|
+
margin: 18px 30px 10px;
|
|
3871
|
+
}
|
|
3872
|
+
|
|
3873
|
+
.dql-app-report-appendix .dql-app-research-evidence-head h3 {
|
|
3874
|
+
margin-bottom: 4px;
|
|
3875
|
+
}
|
|
3876
|
+
|
|
3877
|
+
.dql-app-report-appendix .dql-app-research-evidence-head p {
|
|
3878
|
+
margin: 0;
|
|
3879
|
+
color: var(--dql-app-muted);
|
|
3880
|
+
font-size: 12px;
|
|
3881
|
+
line-height: 1.45;
|
|
3882
|
+
}
|
|
3883
|
+
|
|
3884
|
+
.dql-app-report-appendix .dql-app-research-table,
|
|
3885
|
+
.dql-app-report-appendix .dql-app-research-sql-review,
|
|
3886
|
+
.dql-app-report-appendix .dql-app-research-assumptions,
|
|
3887
|
+
.dql-app-report-appendix .dql-app-research-code {
|
|
3888
|
+
margin-left: 30px;
|
|
3889
|
+
margin-right: 30px;
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
.dql-app-report-appendix > :last-child {
|
|
3893
|
+
margin-bottom: 24px;
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
.dql-app-research-tabs {
|
|
3897
|
+
display: flex;
|
|
3898
|
+
gap: 4px;
|
|
3899
|
+
flex-wrap: wrap;
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3902
|
+
.dql-app-research-tabs button,
|
|
3903
|
+
.dql-app-research-next button {
|
|
3904
|
+
border: 1px solid var(--dql-app-line);
|
|
3905
|
+
border-radius: 999px;
|
|
3906
|
+
background: var(--dql-app-surface);
|
|
3907
|
+
color: var(--dql-app-muted);
|
|
3908
|
+
font: 800 11px var(--font-ui);
|
|
3909
|
+
padding: 5px 9px;
|
|
3910
|
+
cursor: pointer;
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
.dql-app-research-tabs button.on,
|
|
3914
|
+
.dql-app-research-tabs button:hover,
|
|
3915
|
+
.dql-app-research-next button:hover {
|
|
3916
|
+
color: var(--dql-app-accent);
|
|
3917
|
+
border-color: rgba(37, 99, 235, 0.34);
|
|
3918
|
+
background: var(--dql-app-accent-soft);
|
|
3919
|
+
}
|
|
3920
|
+
|
|
3921
|
+
.dql-app-research-code {
|
|
3922
|
+
margin: 10px 0 0;
|
|
3923
|
+
max-height: 320px;
|
|
3924
|
+
overflow: auto;
|
|
3925
|
+
border-radius: 8px;
|
|
3926
|
+
border: 1px solid var(--dql-app-line);
|
|
3927
|
+
background: var(--dql-app-surface);
|
|
3928
|
+
padding: 11px;
|
|
3929
|
+
color: var(--dql-app-ink);
|
|
3930
|
+
font: 11px/1.5 var(--font-mono);
|
|
3931
|
+
white-space: pre-wrap;
|
|
3932
|
+
}
|
|
3933
|
+
|
|
3934
|
+
.dql-app-research-sql-review {
|
|
3935
|
+
display: grid;
|
|
3936
|
+
gap: 10px;
|
|
3937
|
+
margin-top: 10px;
|
|
3938
|
+
}
|
|
3939
|
+
|
|
3940
|
+
.dql-app-research-sql-review textarea {
|
|
3941
|
+
min-height: 260px;
|
|
3942
|
+
resize: vertical;
|
|
3943
|
+
border-radius: 8px;
|
|
3944
|
+
border: 1px solid var(--dql-app-line);
|
|
3945
|
+
background: var(--dql-app-surface);
|
|
3946
|
+
color: var(--dql-app-ink);
|
|
3947
|
+
padding: 11px;
|
|
3948
|
+
font: 11px/1.5 var(--font-mono);
|
|
3949
|
+
outline: none;
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3952
|
+
.dql-app-research-sql-review textarea:focus {
|
|
3953
|
+
border-color: rgba(37, 99, 235, 0.42);
|
|
3954
|
+
box-shadow: 0 0 0 3px var(--dql-app-accent-soft);
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3957
|
+
.dql-app-research-assumptions {
|
|
3958
|
+
display: grid;
|
|
3959
|
+
gap: 8px;
|
|
3960
|
+
margin-top: 10px;
|
|
3961
|
+
}
|
|
3962
|
+
|
|
3963
|
+
.dql-app-research-assumptions p {
|
|
3964
|
+
margin: 0;
|
|
3965
|
+
border: 1px solid var(--dql-app-line);
|
|
3966
|
+
border-radius: 7px;
|
|
3967
|
+
background: var(--dql-app-surface);
|
|
3968
|
+
padding: 9px;
|
|
3969
|
+
color: var(--dql-app-muted);
|
|
3970
|
+
font-size: 12px;
|
|
3971
|
+
}
|
|
3972
|
+
|
|
3973
|
+
.dql-app-research-table {
|
|
3974
|
+
margin-top: 10px;
|
|
3975
|
+
overflow: auto;
|
|
3976
|
+
border: 1px solid var(--dql-app-line);
|
|
3977
|
+
border-radius: 8px;
|
|
3978
|
+
background: var(--dql-app-surface);
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
.dql-app-research-table table {
|
|
3982
|
+
width: 100%;
|
|
3983
|
+
border-collapse: collapse;
|
|
3984
|
+
min-width: 520px;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
.dql-app-research-table th,
|
|
3988
|
+
.dql-app-research-table td {
|
|
3989
|
+
padding: 8px 9px;
|
|
3990
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
3991
|
+
text-align: left;
|
|
3992
|
+
font-size: 11.5px;
|
|
3993
|
+
white-space: nowrap;
|
|
3994
|
+
}
|
|
3995
|
+
|
|
3996
|
+
.dql-app-research-table th {
|
|
3997
|
+
color: var(--dql-app-muted);
|
|
3998
|
+
background: var(--dql-app-control);
|
|
3999
|
+
font-weight: 850;
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
.dql-app-research-next {
|
|
4003
|
+
display: flex;
|
|
4004
|
+
gap: 7px;
|
|
4005
|
+
flex-wrap: wrap;
|
|
4006
|
+
margin-top: 10px;
|
|
4007
|
+
}
|
|
4008
|
+
|
|
4009
|
+
.dql-app-simple-list,
|
|
4010
|
+
.dql-app-settings-grid { display: grid; gap: 10px; }
|
|
4011
|
+
.dql-app-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
4012
|
+
.dql-app-panel-card {
|
|
4013
|
+
border: 1px solid var(--dql-app-line);
|
|
4014
|
+
border-radius: 8px;
|
|
4015
|
+
background: var(--dql-app-surface);
|
|
4016
|
+
padding: 13px;
|
|
4017
|
+
display: flex;
|
|
4018
|
+
gap: 10px;
|
|
4019
|
+
align-items: flex-start;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
.dql-app-panel-card > span {
|
|
4023
|
+
width: 30px;
|
|
4024
|
+
height: 30px;
|
|
4025
|
+
border-radius: 7px;
|
|
4026
|
+
display: inline-flex;
|
|
4027
|
+
align-items: center;
|
|
4028
|
+
justify-content: center;
|
|
4029
|
+
color: var(--dql-app-accent);
|
|
4030
|
+
background: var(--dql-app-accent-soft);
|
|
4031
|
+
flex: none;
|
|
4032
|
+
}
|
|
4033
|
+
|
|
4034
|
+
.dql-app-panel-card b { display: block; }
|
|
4035
|
+
.dql-app-panel-card span:last-child { color: var(--dql-app-muted); font-size: 12px; }
|
|
4036
|
+
.dql-app-empty {
|
|
4037
|
+
min-height: 260px;
|
|
4038
|
+
border: 1px dashed var(--dql-app-line-2);
|
|
4039
|
+
border-radius: 8px;
|
|
4040
|
+
background: var(--dql-app-surface);
|
|
4041
|
+
color: var(--dql-app-faint);
|
|
4042
|
+
display: flex;
|
|
4043
|
+
flex-direction: column;
|
|
4044
|
+
align-items: center;
|
|
4045
|
+
justify-content: center;
|
|
4046
|
+
text-align: center;
|
|
4047
|
+
gap: 8px;
|
|
4048
|
+
padding: 28px;
|
|
4049
|
+
}
|
|
4050
|
+
|
|
4051
|
+
.dql-app-empty.compact { min-height: 120px; padding: 18px; }
|
|
4052
|
+
.dql-app-empty b { color: var(--dql-app-ink); }
|
|
4053
|
+
.dql-app-empty span { max-width: 440px; font-size: 12px; line-height: 1.45; }
|
|
4054
|
+
.dql-app-modal-backdrop {
|
|
4055
|
+
position: fixed;
|
|
4056
|
+
inset: 0;
|
|
4057
|
+
z-index: 100;
|
|
4058
|
+
background: rgba(15, 23, 42, 0.36);
|
|
4059
|
+
display: flex;
|
|
4060
|
+
align-items: center;
|
|
4061
|
+
justify-content: center;
|
|
4062
|
+
padding: 24px;
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
.dql-app-modal {
|
|
4066
|
+
width: min(480px, 94vw);
|
|
4067
|
+
border-radius: 8px;
|
|
4068
|
+
background: var(--dql-app-surface);
|
|
4069
|
+
box-shadow: 0 18px 60px rgba(15, 23, 42, 0.28);
|
|
4070
|
+
padding: 18px;
|
|
4071
|
+
display: grid;
|
|
4072
|
+
gap: 12px;
|
|
4073
|
+
}
|
|
4074
|
+
|
|
4075
|
+
.dql-app-modal h3 { margin: 0; }
|
|
4076
|
+
.dql-app-modal p { margin: 0; color: var(--dql-app-muted); font-size: 12px; }
|
|
4077
|
+
.dql-app-modal > div:last-child { display: flex; justify-content: flex-end; gap: 8px; }
|
|
4078
|
+
.dql-app-page-explore {
|
|
4079
|
+
display: grid;
|
|
4080
|
+
grid-template-columns: 22px 1fr;
|
|
4081
|
+
gap: 2px 8px;
|
|
4082
|
+
align-items: center;
|
|
4083
|
+
text-align: left;
|
|
4084
|
+
border: 1px solid var(--dql-app-line);
|
|
4085
|
+
border-radius: 8px;
|
|
4086
|
+
background: var(--dql-app-control);
|
|
4087
|
+
color: var(--dql-app-ink);
|
|
4088
|
+
padding: 9px 10px;
|
|
4089
|
+
cursor: pointer;
|
|
4090
|
+
}
|
|
4091
|
+
.dql-app-page-explore.on { border-color: var(--dql-app-accent); background: var(--dql-app-accent-soft); }
|
|
4092
|
+
.dql-app-page-explore > span { grid-row: 1 / span 2; display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--dql-app-line-2); border-radius: 5px; }
|
|
4093
|
+
.dql-app-page-explore.on > span { border-color: var(--dql-app-accent); color: var(--dql-app-accent); }
|
|
4094
|
+
.dql-app-page-explore b { font-size: 12px; }
|
|
4095
|
+
.dql-app-page-explore small,
|
|
4096
|
+
.dql-app-page-source-policy { color: var(--dql-app-muted); font-size: 10.5px; line-height: 1.35; }
|
|
4097
|
+
|
|
4098
|
+
@media (max-width: 1120px) {
|
|
4099
|
+
.dql-apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
4100
|
+
.dql-app-create-workspace,
|
|
4101
|
+
.dql-app-create-workspace.classic {
|
|
4102
|
+
grid-template-columns: 1fr;
|
|
4103
|
+
align-content: start;
|
|
4104
|
+
overflow: auto;
|
|
4105
|
+
}
|
|
4106
|
+
.dql-app-create-workspace .dql-app-panel {
|
|
4107
|
+
min-height: auto;
|
|
4108
|
+
border-right: 0;
|
|
4109
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
4110
|
+
}
|
|
4111
|
+
.dql-app-ai-start,
|
|
4112
|
+
.dql-app-ai-generated-grid {
|
|
4113
|
+
grid-template-columns: 1fr;
|
|
4114
|
+
}
|
|
4115
|
+
.dql-app-filterbar {
|
|
4116
|
+
flex-wrap: nowrap;
|
|
4117
|
+
gap: 6px;
|
|
4118
|
+
padding: 7px 22px;
|
|
4119
|
+
overflow-x: auto;
|
|
4120
|
+
}
|
|
4121
|
+
.dql-app-filter-note {
|
|
4122
|
+
width: 30px;
|
|
4123
|
+
height: 30px;
|
|
4124
|
+
justify-content: center;
|
|
4125
|
+
gap: 0;
|
|
4126
|
+
border: 1px solid var(--dql-app-line);
|
|
4127
|
+
border-radius: 8px;
|
|
4128
|
+
background: var(--dql-app-control);
|
|
4129
|
+
font-size: 0;
|
|
4130
|
+
flex: 0 0 auto;
|
|
4131
|
+
}
|
|
4132
|
+
.dql-app-filter-note svg {
|
|
4133
|
+
width: 14px;
|
|
4134
|
+
height: 14px;
|
|
4135
|
+
}
|
|
4136
|
+
.dql-app-filter-select,
|
|
4137
|
+
.dql-app-toggle {
|
|
4138
|
+
flex: 0 0 auto;
|
|
4139
|
+
}
|
|
4140
|
+
.dql-app-toggle {
|
|
4141
|
+
gap: 6px;
|
|
4142
|
+
font-weight: 750;
|
|
4143
|
+
}
|
|
4144
|
+
.dql-app-review-backlog-grid {
|
|
4145
|
+
grid-template-columns: 1fr;
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
|
|
4149
|
+
@media (max-width: 900px) {
|
|
4150
|
+
.dql-app-view-layout { grid-template-columns: 1fr; }
|
|
4151
|
+
.dql-app-view-topbar {
|
|
4152
|
+
align-content: flex-start;
|
|
4153
|
+
align-items: flex-start;
|
|
4154
|
+
min-height: 132px;
|
|
4155
|
+
row-gap: 8px;
|
|
4156
|
+
}
|
|
4157
|
+
.dql-app-topbar-divider {
|
|
4158
|
+
display: none;
|
|
4159
|
+
}
|
|
4160
|
+
.dql-app-topbar-filters {
|
|
4161
|
+
flex: 1 1 100%;
|
|
4162
|
+
order: 2;
|
|
4163
|
+
}
|
|
4164
|
+
.dql-app-filter-row { align-items: stretch; }
|
|
4165
|
+
.dql-app-filter-row-copy, .dql-app-filter-row-actions { width: 100%; }
|
|
4166
|
+
.dql-app-filter-row-actions { justify-content: flex-end; }
|
|
4167
|
+
.dql-app-view-actions {
|
|
4168
|
+
flex: 1 1 100%;
|
|
4169
|
+
justify-content: flex-start;
|
|
4170
|
+
margin-left: 0;
|
|
4171
|
+
order: 3;
|
|
4172
|
+
}
|
|
4173
|
+
.dql-app-research-shell {
|
|
4174
|
+
grid-template-columns: 1fr;
|
|
4175
|
+
}
|
|
4176
|
+
.dql-app-research-detail {
|
|
4177
|
+
order: 1;
|
|
4178
|
+
}
|
|
4179
|
+
.dql-app-research-list {
|
|
4180
|
+
order: 2;
|
|
4181
|
+
}
|
|
4182
|
+
.dql-app-explain-panel {
|
|
4183
|
+
position: static;
|
|
4184
|
+
width: 100%;
|
|
4185
|
+
max-width: none;
|
|
4186
|
+
height: min(680px, calc(100vh - 24px));
|
|
4187
|
+
resize: none;
|
|
4188
|
+
max-height: none;
|
|
4189
|
+
}
|
|
4190
|
+
.dql-app-explain-panel[data-expanded="true"] {
|
|
4191
|
+
width: 100%;
|
|
4192
|
+
max-width: none;
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
|
|
4196
|
+
@media (max-width: 760px) {
|
|
4197
|
+
.dql-apps-wrap,
|
|
4198
|
+
.dql-app-view-wrap {
|
|
4199
|
+
width: min(100% - 16px, calc(100vw - 104px));
|
|
4200
|
+
max-width: calc(100vw - 104px);
|
|
4201
|
+
margin: 0 auto;
|
|
4202
|
+
padding-bottom: 48px;
|
|
4203
|
+
}
|
|
4204
|
+
.dql-apps-libbar,
|
|
4205
|
+
.dql-app-buildbar,
|
|
4206
|
+
.dql-app-view-topbar,
|
|
4207
|
+
.dql-app-filterbar {
|
|
4208
|
+
align-items: stretch;
|
|
4209
|
+
flex-direction: column;
|
|
4210
|
+
overflow-x: visible;
|
|
4211
|
+
}
|
|
4212
|
+
.dql-app-filter-note {
|
|
4213
|
+
width: auto;
|
|
4214
|
+
height: auto;
|
|
4215
|
+
margin-left: 0;
|
|
4216
|
+
justify-content: flex-start;
|
|
4217
|
+
gap: 6px;
|
|
4218
|
+
font-size: 11px;
|
|
4219
|
+
}
|
|
4220
|
+
.dql-apps-grid,
|
|
4221
|
+
.dql-app-form-grid.two,
|
|
4222
|
+
.dql-app-settings-grid,
|
|
4223
|
+
.dql-app-ai-filter-preview { grid-template-columns: 1fr; }
|
|
4224
|
+
.dql-apps-ai-entry-box {
|
|
4225
|
+
grid-template-columns: 1fr;
|
|
4226
|
+
}
|
|
4227
|
+
.dql-apps-ai-entry-box button {
|
|
4228
|
+
width: 100%;
|
|
4229
|
+
}
|
|
4230
|
+
.dql-apps-ai-entry-foot {
|
|
4231
|
+
align-items: stretch;
|
|
4232
|
+
flex-direction: column;
|
|
4233
|
+
}
|
|
4234
|
+
.dql-apps-ai-entry-secondary {
|
|
4235
|
+
justify-content: center;
|
|
4236
|
+
}
|
|
4237
|
+
.dql-app-create-workspace.clean {
|
|
4238
|
+
padding: 16px;
|
|
4239
|
+
}
|
|
4240
|
+
.dql-app-ai-start-card {
|
|
4241
|
+
padding: 15px;
|
|
4242
|
+
}
|
|
4243
|
+
.dql-app-ai-start-card textarea {
|
|
4244
|
+
min-height: 150px;
|
|
4245
|
+
font-size: 15px;
|
|
4246
|
+
padding-bottom: 48px;
|
|
4247
|
+
}
|
|
4248
|
+
.dql-app-ai-start-send {
|
|
4249
|
+
right: 14px;
|
|
4250
|
+
bottom: 14px;
|
|
4251
|
+
}
|
|
4252
|
+
.dql-app-ai-generated-head {
|
|
4253
|
+
align-items: stretch;
|
|
4254
|
+
flex-direction: column;
|
|
4255
|
+
}
|
|
4256
|
+
.dql-app-mode-seg { margin: 0; width: 100%; }
|
|
4257
|
+
.dql-app-mode-seg button { flex: 1; }
|
|
4258
|
+
.dql-app-build-actions,
|
|
4259
|
+
.dql-app-view-actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
|
|
4260
|
+
.dql-app-nav-row {
|
|
4261
|
+
width: 100%;
|
|
4262
|
+
justify-content: flex-start;
|
|
4263
|
+
flex-wrap: nowrap;
|
|
4264
|
+
overflow-x: auto;
|
|
4265
|
+
padding-bottom: 2px;
|
|
4266
|
+
}
|
|
4267
|
+
.dql-app-section-tabs {
|
|
4268
|
+
flex: 0 0 auto;
|
|
4269
|
+
max-width: none;
|
|
4270
|
+
}
|
|
4271
|
+
.dql-app-section-tabs button {
|
|
4272
|
+
min-width: auto;
|
|
4273
|
+
white-space: nowrap;
|
|
4274
|
+
}
|
|
4275
|
+
.dql-app-section-tabs .dql-app-tab-label {
|
|
4276
|
+
display: inline;
|
|
4277
|
+
}
|
|
4278
|
+
.dql-app-explain-panel {
|
|
4279
|
+
order: -1;
|
|
4280
|
+
min-width: 0;
|
|
4281
|
+
height: min(620px, calc(100vh - 160px));
|
|
4282
|
+
min-height: 420px;
|
|
4283
|
+
margin-bottom: 12px;
|
|
4284
|
+
}
|
|
4285
|
+
.dql-app-assistant-top {
|
|
4286
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4287
|
+
align-items: stretch;
|
|
4288
|
+
}
|
|
4289
|
+
.dql-app-assistant-focus {
|
|
4290
|
+
flex: 1 1 100%;
|
|
4291
|
+
}
|
|
4292
|
+
.dql-app-assistant-focus select {
|
|
4293
|
+
width: 100%;
|
|
4294
|
+
max-width: none;
|
|
4295
|
+
}
|
|
4296
|
+
.dql-app-assistant-context-btn {
|
|
4297
|
+
position: static;
|
|
4298
|
+
justify-self: start;
|
|
4299
|
+
}
|
|
4300
|
+
.dql-app-direct-ask-row {
|
|
4301
|
+
grid-template-columns: minmax(0, 1fr);
|
|
4302
|
+
}
|
|
4303
|
+
.dql-app-direct-ask-row button {
|
|
4304
|
+
width: 100%;
|
|
4305
|
+
}
|
|
4306
|
+
.dql-app-page-picker {
|
|
4307
|
+
flex: 0 0 min(100%, 360px);
|
|
4308
|
+
}
|
|
4309
|
+
.dql-app-page-picker select { min-width: 0; max-width: 100%; }
|
|
4310
|
+
.dql-app-report-hero {
|
|
4311
|
+
padding: 18px 16px 16px;
|
|
4312
|
+
}
|
|
4313
|
+
.dql-app-report-status-row {
|
|
4314
|
+
align-items: flex-start;
|
|
4315
|
+
flex-direction: column;
|
|
4316
|
+
}
|
|
4317
|
+
.dql-app-report-hero h2 {
|
|
4318
|
+
font-size: 26px;
|
|
4319
|
+
line-height: 1.08;
|
|
4320
|
+
overflow-wrap: anywhere;
|
|
4321
|
+
}
|
|
4322
|
+
.dql-app-report-section {
|
|
4323
|
+
padding: 18px 16px;
|
|
4324
|
+
}
|
|
4325
|
+
.dql-app-report-paper {
|
|
4326
|
+
padding: 18px 18px 14px;
|
|
4327
|
+
}
|
|
4328
|
+
.dql-app-report-evidence-story {
|
|
4329
|
+
margin: 4px 16px 10px;
|
|
4330
|
+
}
|
|
4331
|
+
.dql-app-report-appendix {
|
|
4332
|
+
padding: 0;
|
|
4333
|
+
}
|
|
4334
|
+
.dql-app-report-appendix summary {
|
|
4335
|
+
padding: 16px;
|
|
4336
|
+
}
|
|
4337
|
+
.dql-app-report-appendix .dql-app-research-evidence-head,
|
|
4338
|
+
.dql-app-report-appendix .dql-app-research-table,
|
|
4339
|
+
.dql-app-report-appendix .dql-app-research-sql-review,
|
|
4340
|
+
.dql-app-report-appendix .dql-app-research-assumptions,
|
|
4341
|
+
.dql-app-report-appendix .dql-app-research-code {
|
|
4342
|
+
margin-left: 16px;
|
|
4343
|
+
margin-right: 16px;
|
|
4344
|
+
}
|
|
4345
|
+
.dql-app-direct-quick,
|
|
4346
|
+
.dql-app-report-evidence-story,
|
|
4347
|
+
.dql-app-report-numbers {
|
|
4348
|
+
grid-template-columns: 1fr;
|
|
4349
|
+
}
|
|
4350
|
+
.dql-app-report-evidence-story .dql-app-report-numbers {
|
|
4351
|
+
grid-template-columns: 1fr;
|
|
4352
|
+
}
|
|
4353
|
+
.dql-app-report-context-line span {
|
|
4354
|
+
white-space: normal;
|
|
4355
|
+
}
|
|
4356
|
+
.dql-app-preview-tile,
|
|
4357
|
+
.dql-app-preview-tile.wide { grid-column: 1 / -1; }
|
|
4358
|
+
.dql-app-drilldown-grid {
|
|
4359
|
+
grid-template-columns: 1fr;
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
|
|
4363
|
+
/* ══ Redesigned AI build flow (Apps Redesign.dc.html) ══ */
|
|
4364
|
+
@keyframes dql-app-fadein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
|
|
4365
|
+
@keyframes dql-app-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
|
|
4366
|
+
@keyframes dql-app-orb { 0%, 100% { box-shadow: 0 0 0 0 rgba(107, 93, 211, 0); } 50% { box-shadow: 0 0 13px 1px rgba(107, 93, 211, 0.4); } }
|
|
4367
|
+
@keyframes dql-app-step { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
|
|
4368
|
+
|
|
4369
|
+
.dql-app-flow-scroll { min-height: 100%; }
|
|
4370
|
+
.dql-app-flow {
|
|
4371
|
+
width: min(880px, calc(100% - 48px));
|
|
4372
|
+
margin: 0 auto;
|
|
4373
|
+
padding: 28px 0 40px;
|
|
4374
|
+
display: flex;
|
|
4375
|
+
flex-direction: column;
|
|
4376
|
+
gap: 16px;
|
|
4377
|
+
}
|
|
4378
|
+
.dql-app-flow-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--dql-app-ink); }
|
|
4379
|
+
.dql-app-flow-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--dql-app-faint); }
|
|
4380
|
+
.dql-app-flow-bubble {
|
|
4381
|
+
align-self: flex-end;
|
|
4382
|
+
max-width: 78%;
|
|
4383
|
+
background: var(--dql-app-surface-muted);
|
|
4384
|
+
color: var(--dql-app-ink);
|
|
4385
|
+
border-radius: 16px 16px 4px 16px;
|
|
4386
|
+
padding: 10px 14px;
|
|
4387
|
+
font-size: 13px;
|
|
4388
|
+
line-height: 1.5;
|
|
4389
|
+
animation: dql-app-fadein 0.2s ease-out;
|
|
4390
|
+
}
|
|
4391
|
+
.dql-app-buildstream { display: flex; gap: 12px; animation: dql-app-fadein 0.25s ease-out; }
|
|
4392
|
+
.dql-app-buildorb {
|
|
4393
|
+
width: 30px; height: 30px; border-radius: 50%;
|
|
4394
|
+
background: var(--dql-app-accent-soft);
|
|
4395
|
+
border: 1px solid var(--dql-app-line);
|
|
4396
|
+
color: var(--dql-app-accent);
|
|
4397
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
4398
|
+
flex: none;
|
|
4399
|
+
animation: dql-app-orb 1.8s ease-in-out infinite;
|
|
4400
|
+
}
|
|
4401
|
+
.dql-app-buildorb.still { animation: none; }
|
|
4402
|
+
.dql-app-buildbody { display: flex; flex-direction: column; gap: 7px; padding-top: 4px; min-width: 0; }
|
|
4403
|
+
.dql-app-buildbody.wide { flex: 1; gap: 10px; }
|
|
4404
|
+
.dql-app-shimmer {
|
|
4405
|
+
font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em;
|
|
4406
|
+
background-image: linear-gradient(100deg, var(--dql-app-ink) 25%, var(--dql-app-accent) 50%, var(--dql-app-ink) 75%);
|
|
4407
|
+
background-size: 220% 100%;
|
|
4408
|
+
-webkit-background-clip: text; background-clip: text;
|
|
4409
|
+
color: transparent; -webkit-text-fill-color: transparent;
|
|
4410
|
+
animation: dql-app-shimmer 2.4s linear infinite;
|
|
4411
|
+
}
|
|
4412
|
+
.dql-app-buildsteps { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--dql-app-faint); line-height: 1.45; }
|
|
4413
|
+
.dql-app-buildsteps > span { display: inline-flex; align-items: center; gap: 6px; animation: dql-app-step 0.3s ease-out both; }
|
|
4414
|
+
.dql-app-buildsteps .ok { color: var(--dql-app-green); flex: none; }
|
|
4415
|
+
.dql-app-buildsteps code { font-family: var(--font-mono); font-size: 10.5px; }
|
|
4416
|
+
.dql-app-buildsteps .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--dql-app-accent); margin: 0 3px; flex: none; }
|
|
4417
|
+
.dql-app-proposal-lede { font-size: 13.5px; line-height: 1.6; color: var(--dql-app-ink); }
|
|
4418
|
+
.dql-app-buildbrief-name {
|
|
4419
|
+
display: grid;
|
|
4420
|
+
grid-template-columns: auto minmax(180px, 1fr);
|
|
4421
|
+
align-items: center;
|
|
4422
|
+
gap: 9px;
|
|
4423
|
+
color: var(--dql-app-faint);
|
|
4424
|
+
font-size: 10.5px;
|
|
4425
|
+
font-weight: 750;
|
|
4426
|
+
}
|
|
4427
|
+
.dql-app-buildbrief-name input {
|
|
4428
|
+
min-width: 0;
|
|
4429
|
+
border: 1px solid var(--dql-app-line);
|
|
4430
|
+
border-radius: 7px;
|
|
4431
|
+
background: var(--dql-app-control);
|
|
4432
|
+
color: var(--dql-app-ink);
|
|
4433
|
+
padding: 6px 8px;
|
|
4434
|
+
font: 12px var(--font-ui);
|
|
4435
|
+
}
|
|
4436
|
+
.dql-app-buildbrief-edit {
|
|
4437
|
+
border: 1px solid var(--dql-app-line);
|
|
4438
|
+
border-radius: 8px;
|
|
4439
|
+
background: var(--dql-app-surface);
|
|
4440
|
+
padding: 7px 9px;
|
|
4441
|
+
}
|
|
4442
|
+
.dql-app-buildbrief-edit summary {
|
|
4443
|
+
color: var(--dql-app-muted);
|
|
4444
|
+
cursor: pointer;
|
|
4445
|
+
font-size: 11px;
|
|
4446
|
+
font-weight: 750;
|
|
4447
|
+
}
|
|
4448
|
+
.dql-app-buildbrief-edit > div { display: grid; gap: 6px; margin-top: 8px; }
|
|
4449
|
+
.dql-app-buildbrief-edit label { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 7px; }
|
|
4450
|
+
.dql-app-buildbrief-edit input,
|
|
4451
|
+
.dql-app-buildbrief-edit select {
|
|
4452
|
+
min-width: 0;
|
|
4453
|
+
border: 1px solid var(--dql-app-line);
|
|
4454
|
+
border-radius: 6px;
|
|
4455
|
+
background: var(--dql-app-control);
|
|
4456
|
+
color: var(--dql-app-ink);
|
|
4457
|
+
padding: 5px 7px;
|
|
4458
|
+
font: 11px var(--font-ui);
|
|
4459
|
+
}
|
|
4460
|
+
.dql-app-proposal-card {
|
|
4461
|
+
border: 1px solid var(--dql-app-line);
|
|
4462
|
+
border-radius: 11px;
|
|
4463
|
+
background: var(--dql-app-surface);
|
|
4464
|
+
overflow: hidden;
|
|
4465
|
+
}
|
|
4466
|
+
.dql-app-proposal-row {
|
|
4467
|
+
display: flex; align-items: center; gap: 10px;
|
|
4468
|
+
width: 100%;
|
|
4469
|
+
padding: 10px 13px;
|
|
4470
|
+
border: 0; border-bottom: 1px solid var(--dql-app-line);
|
|
4471
|
+
background: var(--dql-app-surface);
|
|
4472
|
+
cursor: pointer; text-align: left; font-family: inherit;
|
|
4473
|
+
}
|
|
4474
|
+
.dql-app-proposal-row:hover { background: var(--dql-app-canvas); }
|
|
4475
|
+
.dql-app-proposal-row.off { background: var(--dql-app-canvas); }
|
|
4476
|
+
.dql-app-prop-check {
|
|
4477
|
+
width: 16px; height: 16px; border-radius: 4.5px;
|
|
4478
|
+
border: 1.5px solid var(--dql-app-line-2);
|
|
4479
|
+
background: var(--dql-app-surface);
|
|
4480
|
+
color: #fff;
|
|
4481
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
4482
|
+
flex: none;
|
|
4483
|
+
}
|
|
4484
|
+
.dql-app-prop-check.on { border-color: var(--dql-app-accent); background: var(--dql-app-accent); }
|
|
4485
|
+
.dql-app-prop-glyph {
|
|
4486
|
+
width: 26px; height: 26px; border-radius: 6px;
|
|
4487
|
+
background: var(--dql-app-accent-soft); color: var(--dql-app-accent);
|
|
4488
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
4489
|
+
flex: none; font-size: 13px;
|
|
4490
|
+
}
|
|
4491
|
+
.dql-app-prop-glyph.green { background: var(--dql-app-green-soft); color: var(--dql-app-green); }
|
|
4492
|
+
.dql-app-prop-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
4493
|
+
.dql-app-prop-name b { font-size: 12.5px; font-weight: 650; color: var(--dql-app-ink); font-family: var(--font-mono); }
|
|
4494
|
+
.dql-app-prop-name small { font-size: 11px; color: var(--dql-app-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4495
|
+
.dql-app-prop-badge {
|
|
4496
|
+
flex: none; border-radius: 999px; padding: 2px 8px;
|
|
4497
|
+
font-size: 9.5px; font-weight: 700;
|
|
4498
|
+
}
|
|
4499
|
+
.dql-app-prop-badge.certified { border: 1px solid rgba(46, 139, 87, 0.33); color: var(--dql-app-green); background: var(--dql-app-green-soft); }
|
|
4500
|
+
.dql-app-prop-badge.draft { border: 1px solid rgba(178, 107, 31, 0.31); color: var(--dql-app-orange); background: var(--dql-app-orange-soft); }
|
|
4501
|
+
.dql-app-prop-viz { flex: none; font-size: 10.5px; color: var(--dql-app-faint); }
|
|
4502
|
+
.dql-app-addmore {
|
|
4503
|
+
display: flex; align-items: center; gap: 7px;
|
|
4504
|
+
width: 100%; padding: 10px 13px;
|
|
4505
|
+
border: 0; background: none;
|
|
4506
|
+
color: var(--dql-app-accent);
|
|
4507
|
+
font-size: 12px; font-weight: 650; cursor: pointer; font-family: inherit; text-align: left;
|
|
4508
|
+
}
|
|
4509
|
+
.dql-app-addmore:hover { background: var(--dql-app-accent-soft); }
|
|
4510
|
+
.dql-app-addmore-panel { border-top: 1px solid var(--dql-app-line); animation: dql-app-fadein 0.15s ease-out; }
|
|
4511
|
+
.dql-app-addmore-search {
|
|
4512
|
+
display: flex; align-items: center; gap: 7px;
|
|
4513
|
+
padding: 9px 13px;
|
|
4514
|
+
border-bottom: 1px solid var(--dql-app-line);
|
|
4515
|
+
background: var(--dql-app-canvas);
|
|
4516
|
+
color: var(--dql-app-faint);
|
|
4517
|
+
}
|
|
4518
|
+
.dql-app-addmore-search input {
|
|
4519
|
+
flex: 1; border: 0; background: none; outline: none;
|
|
4520
|
+
font-size: 12px; font-family: inherit; color: var(--dql-app-ink); min-width: 0;
|
|
4521
|
+
}
|
|
4522
|
+
.dql-app-addmore-row {
|
|
4523
|
+
display: flex; align-items: center; gap: 9px;
|
|
4524
|
+
width: 100%; padding: 8px 13px;
|
|
4525
|
+
border: 0; border-bottom: 1px solid var(--dql-app-line);
|
|
4526
|
+
background: none; cursor: pointer; text-align: left; font-family: inherit;
|
|
4527
|
+
color: var(--dql-app-accent);
|
|
4528
|
+
}
|
|
4529
|
+
.dql-app-addmore-row:hover { background: var(--dql-app-accent-soft); }
|
|
4530
|
+
.dql-app-addmore-row span { flex: 1; min-width: 0; font-size: 12px; font-family: var(--font-mono); color: var(--dql-app-ink); }
|
|
4531
|
+
.dql-app-addmore-row small { flex: none; font-size: 10.5px; color: var(--dql-app-faint); }
|
|
4532
|
+
.dql-app-addmore-hint { padding: 9px 13px; font-size: 11px; color: var(--dql-app-faint); }
|
|
4533
|
+
.dql-app-detected { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--dql-app-faint); }
|
|
4534
|
+
.dql-app-detected-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 9.5px; }
|
|
4535
|
+
.dql-app-detected-pill {
|
|
4536
|
+
border: 1px solid var(--dql-app-line);
|
|
4537
|
+
background: var(--dql-app-surface);
|
|
4538
|
+
border-radius: 999px; padding: 2.5px 9px;
|
|
4539
|
+
color: var(--dql-app-muted);
|
|
4540
|
+
}
|
|
4541
|
+
.dql-app-flow-gaps { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--dql-app-orange); }
|
|
4542
|
+
.dql-app-flow-gaps span { display: inline-flex; align-items: center; gap: 6px; }
|
|
4543
|
+
.dql-app-flow-actions { display: flex; align-items: center; gap: 8px; }
|
|
4544
|
+
.dql-app-flow-build {
|
|
4545
|
+
display: inline-flex; align-items: center; gap: 7px;
|
|
4546
|
+
height: 34px; padding: 0 16px;
|
|
4547
|
+
border-radius: 8px; border: 0;
|
|
4548
|
+
background: var(--dql-app-accent); color: #fff;
|
|
4549
|
+
font-size: 12.5px; font-weight: 650; cursor: pointer; font-family: inherit;
|
|
4550
|
+
box-shadow: 0 1px 5px rgba(107, 93, 211, 0.3);
|
|
4551
|
+
}
|
|
4552
|
+
.dql-app-flow-build:hover { filter: brightness(0.95); }
|
|
4553
|
+
.dql-app-flow-build:disabled { opacity: 0.55; cursor: default; }
|
|
4554
|
+
.dql-app-flow-reset {
|
|
4555
|
+
height: 34px; padding: 0 13px;
|
|
4556
|
+
border-radius: 8px; border: 1px solid var(--dql-app-line);
|
|
4557
|
+
background: var(--dql-app-surface); color: var(--dql-app-muted);
|
|
4558
|
+
font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
|
|
4559
|
+
}
|
|
4560
|
+
.dql-app-flow-reset:hover { background: var(--dql-app-surface-muted); }
|
|
4561
|
+
/* View / Edit segmented toggle (app workspace top bar) */
|
|
4562
|
+
.dql-app-modeseg {
|
|
4563
|
+
display: inline-flex; align-items: center; gap: 2px;
|
|
4564
|
+
padding: 2px;
|
|
4565
|
+
border: 1px solid var(--dql-app-line);
|
|
4566
|
+
border-radius: 7px;
|
|
4567
|
+
background: var(--dql-app-canvas);
|
|
4568
|
+
}
|
|
4569
|
+
.dql-app-modeseg button {
|
|
4570
|
+
border: 0; border-radius: 5px;
|
|
4571
|
+
padding: 4px 12px;
|
|
4572
|
+
font-size: 11.5px; font-weight: 600;
|
|
4573
|
+
cursor: pointer; font-family: inherit;
|
|
4574
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
4575
|
+
background: transparent; color: var(--dql-app-faint);
|
|
4576
|
+
}
|
|
4577
|
+
.dql-app-modeseg button.on { background: var(--dql-app-accent-soft); color: var(--dql-app-accent); }
|
|
4578
|
+
`;export{go as AppsView};
|