@revolist/ui 4.0.2-rc → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/LICENSE +21 -0
  2. package/MIGRATION.md +36 -0
  3. package/OWNERSHIP.md +32 -32
  4. package/README.md +405 -265
  5. package/_button.scss +6 -2
  6. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  7. package/_chunks/calculator-CDWOuAcp.js +4 -0
  8. package/_chunks/{calendar-CpaUK7w1.js → calendar-CgXQgkga.js} +28 -18
  9. package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
  10. package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
  11. package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
  12. package/_chunks/choice-chips-SkllS5Kl.js +126 -0
  13. package/_chunks/clock-BOhPNlW3.js +4 -0
  14. package/_chunks/{color-palette-BBMFmUNA.js → color-palette-DMJUChWC.js} +20 -22
  15. package/_chunks/{color-picker-D90Jg-M8.js → color-picker-BpCTuIdm.js} +77 -72
  16. package/_chunks/{component-YDcfoOLz.js → component-CfeHXgIw.js} +301 -282
  17. package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
  18. package/_chunks/configurator-actions-DnStE6Yl.js +155 -0
  19. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  20. package/_chunks/control-Dcrjsunl.js +118 -0
  21. package/_chunks/{controls-DIum-E66.js → controls-B_6NJarZ.js} +217 -182
  22. package/_chunks/{date-control-BJSzu79z.js → date-control-C4h4m75W.js} +1 -1
  23. package/_chunks/{date-time-BxPJusp9.js → date-time-CTOSbzb0.js} +344 -307
  24. package/_chunks/{delete-button-Bblyah10.js → delete-button-CW9vjLnk.js} +6 -6
  25. package/_chunks/dialog.parts-3w5FR06n.js +131 -0
  26. package/_chunks/{duration-87U2EoMS.js → duration-Bf2OS1V5.js} +19 -18
  27. package/_chunks/editor-popup-ByU7qiub.js +82 -0
  28. package/_chunks/field-configurator-D5dZRhDe.js +288 -0
  29. package/_chunks/field-context-D57PnBbH.js +5 -0
  30. package/_chunks/{framework-mount-C-Zwm44H.js → framework-mount-Bk4O_T7T.js} +1 -1
  31. package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
  32. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  33. package/_chunks/minus-BOAR3A1C.js +4 -0
  34. package/_chunks/mount-BRdcG60g.js +267 -0
  35. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  36. package/_chunks/native-control-B_fVA5bL.js +649 -0
  37. package/_chunks/{number-input-BeIadZuL.js → number-input-CmM6_2vR.js} +7 -7
  38. package/_chunks/{picker-DpP7iQLA.js → picker-DTqET-2W.js} +2 -2
  39. package/_chunks/plus-CbGRkIGl.js +4 -0
  40. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  41. package/_chunks/popup-C35Isk7p.js +378 -0
  42. package/_chunks/{rating-choice-Ca8ZBty3.js → rating-choice-C-6wcb9U.js} +1 -1
  43. package/_chunks/render-m5eMMwFR.js +83 -0
  44. package/_chunks/{reorder-list-Cc3KmfAN.js → reorder-list-DIl1gkV6.js} +1 -1
  45. package/_chunks/request-trail-DrhdpWiH.js +762 -0
  46. package/_chunks/rich-text-BnilBbhU.js +842 -0
  47. package/_chunks/rotate-left-BF6G883o.js +4 -0
  48. package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
  49. package/_chunks/selection-list-tooltips-C5oMJe26.js +42 -0
  50. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  51. package/_chunks/tooltip-D4xkio5G.js +54 -0
  52. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  53. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  54. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  55. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  56. package/_dialog.scss +55 -21
  57. package/_form.scss +71 -21
  58. package/_legend.scss +25 -7
  59. package/_shared/data-query/index.d.ts +2 -2
  60. package/_shared/data-query/load-options.d.ts +2 -2
  61. package/_variables.scss +34 -32
  62. package/_view-switcher.scss +6 -0
  63. package/activity-message.d.ts +1 -1
  64. package/ai/_chat.scss +227 -0
  65. package/ai/_style.scss +170 -39
  66. package/ai/chat.d.ts +65 -0
  67. package/ai/components.d.ts +34 -5
  68. package/ai/index.d.ts +3 -0
  69. package/ai/index.js +3 -3
  70. package/ai/mount.d.ts +59 -6
  71. package/ai/prompt-history.d.ts +13 -0
  72. package/ai/request-trail.d.ts +9 -3
  73. package/ai/results/_style.scss +83 -0
  74. package/ai/results/index.d.ts +11 -0
  75. package/ai/results/metrics.d.ts +5 -0
  76. package/ai/results/table.d.ts +5 -0
  77. package/ai/results/text.d.ts +5 -0
  78. package/ai/results/types.d.ts +29 -0
  79. package/ai/transcript.d.ts +27 -0
  80. package/ai/translations.d.ts +1 -1
  81. package/angular/angular.d.ts +1 -1
  82. package/angular/angular.js +13 -10
  83. package/assignee/assignee.scss +28 -6
  84. package/assignee/index.js +34 -35
  85. package/avatar/avatar.style.scss +23 -6
  86. package/avatar/index.d.ts +25 -2
  87. package/avatar/index.js +33 -32
  88. package/badge.d.ts +1 -1
  89. package/badge.view.d.ts +8 -0
  90. package/brush-range/_brush-range.scss +55 -49
  91. package/brush-range/component.d.ts +1 -3
  92. package/brush-range/component.js +27 -27
  93. package/buttons/delete-button.d.ts +2 -1
  94. package/buttons/delete-button.js +1 -1
  95. package/buttons/delete-button.style.scss +6 -2
  96. package/buttons/remove-button.d.ts +1 -1
  97. package/buttons/remove-button.js +1 -1
  98. package/buttons/remove-button.style.scss +1 -1
  99. package/buttons/svg-button.d.ts +2 -1
  100. package/buttons/svg-button.js +19 -19
  101. package/calendar/_calendar.scss +27 -26
  102. package/calendar/calendar.js +1 -1
  103. package/calendar/header.js +1 -2
  104. package/calendar/index.js +2 -2
  105. package/cell-input.scss +3 -7
  106. package/cell-visuals/badge.style.scss +6 -3
  107. package/cell-visuals/bar-chart.style.scss +2 -1
  108. package/cell-visuals/column-type.style.css +12 -0
  109. package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
  110. package/cell-visuals/progress-line.style.scss +1 -4
  111. package/cell-visuals/sparkline.style.scss +2 -1
  112. package/cell-visuals/timeline.style.css +4 -2
  113. package/checkbox/checkbox.scss +6 -24
  114. package/choice-chips/index.d.ts +3 -1
  115. package/choice-chips/index.js +1 -1
  116. package/color-palette/color-palette.js +1 -1
  117. package/color-palette/color-palette.style.scss +88 -25
  118. package/color-palette/color-picker.js +2 -2
  119. package/color-palette/color-picker.style.scss +23 -10
  120. package/color-palette/common-palettes.d.ts +1 -1
  121. package/color-palette/common-palettes.js +1 -1
  122. package/color-palette/native.d.ts +15 -2
  123. package/component-catalog.d.ts +24 -11
  124. package/configurator-actions.d.ts +67 -0
  125. package/configurator-actions.js +1 -0
  126. package/configurator-aggregation-list.d.ts +14 -0
  127. package/configurator-aggregation-list.js +63 -0
  128. package/configurator-drop-zone.d.ts +39 -0
  129. package/configurator-drop-zone.js +66 -0
  130. package/configurator-field-icon.d.ts +10 -0
  131. package/configurator-field-icon.js +1 -0
  132. package/configurator-focus.d.ts +4 -0
  133. package/configurator-focus.js +39 -0
  134. package/configurator-sections.d.ts +42 -0
  135. package/configurator-sections.js +71 -0
  136. package/control-attributes.js +7 -7
  137. package/control-presentation.d.ts +8 -2
  138. package/control-presentation.js +25 -20
  139. package/controls.d.ts +19 -7
  140. package/controls.js +4 -3
  141. package/core/editor-popup-position.d.ts +6 -2
  142. package/core/editor-popup.d.ts +4 -0
  143. package/core/editor-popup.js +1 -1
  144. package/core/popover-controller.d.ts +35 -0
  145. package/core/popup-ownership.d.ts +2 -0
  146. package/core/selection-list-tooltips.d.ts +2 -0
  147. package/core/title-tooltip.d.ts +2 -0
  148. package/core/tooltip-session.d.ts +29 -0
  149. package/core/tooltip-surface.d.ts +13 -0
  150. package/core/tooltip-text.d.ts +6 -0
  151. package/core/tooltip.d.ts +35 -0
  152. package/core/top-layer-popup.d.ts +4 -0
  153. package/core/top-layer-popup.js +1 -23
  154. package/date-time/attach.d.ts +1 -1
  155. package/date-time/date-control.d.ts +1 -1
  156. package/date-time/field.d.ts +3 -2
  157. package/date-time/index.js +1 -1
  158. package/date-time/style.scss +242 -39
  159. package/date-time/time-selection.d.ts +3 -1
  160. package/date-time/types.d.ts +5 -1
  161. package/dialog/dialog-action-footer.d.ts +17 -2
  162. package/dialog/dialog.dom.d.ts +15 -2
  163. package/dialog/dialog.dom.js +3 -3
  164. package/dialog/dialog.parts.d.ts +1 -1
  165. package/dialog/dialog.parts.js +1 -1
  166. package/distribution-chart/_distribution-chart.scss +113 -77
  167. package/distribution-chart/area-chart.js +1 -1
  168. package/distribution-chart/bar-chart.d.ts +5 -2
  169. package/distribution-chart/bar-chart.js +7 -3
  170. package/distribution-chart/chart-frame.d.ts +2 -1
  171. package/distribution-chart/index.d.ts +1 -1
  172. package/distribution-chart/line-chart.js +1 -1
  173. package/dropdown/content.d.ts +2 -1
  174. package/dropdown/content.js +1 -142
  175. package/dropdown/control.d.ts +14 -0
  176. package/dropdown/control.js +1 -0
  177. package/dropdown/control.view.d.ts +6 -0
  178. package/dropdown/dropdown.types.d.ts +5 -1
  179. package/dropdown/editor-dropdown.style.scss +54 -16
  180. package/dropdown/index.d.ts +1 -1
  181. package/dropdown/index.js +3 -4
  182. package/dropdown/lookup-field.d.ts +5 -0
  183. package/dropdown/lookup-field.js +2 -1
  184. package/dropdown/popup.d.ts +2 -2
  185. package/dropdown/popup.js +1 -141
  186. package/duration/index.js +1 -1
  187. package/duration/style.scss +1 -1
  188. package/editor-actions.js +1 -1
  189. package/editor-layout/index.d.ts +4 -4
  190. package/editor-layout/index.js +39 -34
  191. package/editor-layout/style.scss +82 -18
  192. package/field-configurator.d.ts +39 -1
  193. package/field-configurator.js +4 -170
  194. package/field-expansion.d.ts +9 -0
  195. package/fieldset.d.ts +3 -0
  196. package/filter/filters/slider/_single-slider.scss +57 -38
  197. package/filter/filters/slider/_slider.scss +41 -33
  198. package/filter/filters/slider/control.js +2 -0
  199. package/filter/filters/slider/runtime.js +49 -22
  200. package/filter/filters/slider/single.js +1 -1
  201. package/filter-badge.js +1 -1
  202. package/filter-controls.d.ts +0 -1
  203. package/filter-controls.js +9 -10
  204. package/form-controls/field-context.d.ts +5 -0
  205. package/form-controls/index.d.ts +10 -2
  206. package/form-controls/index.js +4 -9
  207. package/form-controls/presentation.d.ts +1 -1
  208. package/form-controls/presentation.js +53 -45
  209. package/formatting/index.d.ts +1 -1
  210. package/formatting/index.js +40 -35
  211. package/formatting/styles.scss +14 -57
  212. package/framework.js +237 -226
  213. package/history-controls.d.ts +14 -0
  214. package/history-controls.js +27 -0
  215. package/icon-toolbar.d.ts +62 -0
  216. package/icon-toolbar.js +1 -0
  217. package/icons/icon.d.ts +1 -1
  218. package/legend.d.ts +1 -1
  219. package/masked-input/index.js +1 -1
  220. package/native-control.d.ts +6 -5
  221. package/native-control.js +3 -26
  222. package/native-controls.d.ts +54 -2
  223. package/native-styles.css +1 -1
  224. package/native-styles.scss +6 -2
  225. package/native.d.ts +3 -3
  226. package/native.js +41 -37
  227. package/number-input/index.d.ts +1 -1
  228. package/number-input/index.js +1 -1
  229. package/package.json +88 -14
  230. package/pagination.d.ts +3 -0
  231. package/pagination.js +50 -40
  232. package/pdf-viewer/header.d.ts +1 -1
  233. package/pdf-viewer/index.d.ts +2 -2
  234. package/pdf-viewer/index.js +1 -1
  235. package/pdf-viewer/search-bar.d.ts +1 -1
  236. package/pdf-viewer/status.d.ts +1 -1
  237. package/pdf-viewer/style.scss +205 -45
  238. package/pickers.d.ts +5 -1
  239. package/preact-mount.js +1 -1
  240. package/preact.d.ts +15 -10
  241. package/preact.js +109 -64
  242. package/progress/_bar.scss +9 -3
  243. package/progress/_circular.scss +2 -1
  244. package/rating-choice.js +1 -1
  245. package/react-adapter.d.ts +4 -2
  246. package/react-control.d.ts +1 -0
  247. package/react.d.ts +20 -11
  248. package/react.js +72 -88
  249. package/reorder-list.d.ts +1 -1
  250. package/reorder-list.js +1 -1
  251. package/reorder-list.scss +59 -17
  252. package/resource-picker/resource-picker-popup.js +1 -1
  253. package/resource-picker/resource-picker.js +73 -71
  254. package/resource-picker/resource-picker.scss +66 -35
  255. package/rich-text/engine.d.ts +17 -19
  256. package/rich-text/format-html.d.ts +2 -0
  257. package/rich-text/index.d.ts +11 -7
  258. package/rich-text/index.js +1 -1
  259. package/rich-text/model.d.ts +6 -3
  260. package/rich-text/render-model.d.ts +4 -5
  261. package/rich-text/style.scss +295 -55
  262. package/rich-text/syntax.d.ts +5 -2
  263. package/rich-text/toolbar.d.ts +6 -6
  264. package/rich-text/translations.d.ts +5 -15
  265. package/search-input/index.js +1 -1
  266. package/search-input/native.d.ts +21 -2
  267. package/select.d.ts +22 -0
  268. package/select.js +1 -0
  269. package/selection-list.d.ts +1 -0
  270. package/selection-list.js +3 -1
  271. package/status-feedback/exit-snapshot.js +1 -1
  272. package/status-feedback/index.js +2 -2
  273. package/status-feedback/popover.js +9 -9
  274. package/status-feedback/render.js +3 -44
  275. package/status-feedback/status-feedback.scss +130 -34
  276. package/status-feedback/types.d.ts +4 -0
  277. package/status-feedback/use-auto-dismiss.d.ts +3 -0
  278. package/styles/_activity-message.scss +24 -7
  279. package/styles/_alert.scss +78 -17
  280. package/styles/_cell-editor-frame.scss +11 -0
  281. package/styles/_compositions.scss +404 -82
  282. package/styles/_control.scss +42 -12
  283. package/styles/_disclosure.scss +15 -5
  284. package/styles/_editor-counter.scss +16 -6
  285. package/styles/_editor-slider.scss +8 -4
  286. package/styles/_field-configurator.scss +321 -23
  287. package/styles/_fields-grid.scss +49 -0
  288. package/styles/_filter-controls.scss +10 -2
  289. package/styles/_icon-action.scss +48 -15
  290. package/styles/_loading.scss +12 -3
  291. package/styles/_motion.scss +32 -9
  292. package/styles/_palette.scss +0 -24
  293. package/styles/_primitives.scss +376 -116
  294. package/styles/_theme.scss +130 -86
  295. package/styles/_thresholds.scss +28 -25
  296. package/styles/_time-grid.scss +8 -3
  297. package/styles/_tokens.scss +6 -1
  298. package/styles/configurator-actions.scss +241 -0
  299. package/styles/pagination.css +213 -0
  300. package/styles/{legacy-rating.css → rating.css} +8 -3
  301. package/styles.css +1 -1
  302. package/styles.scss +3 -5
  303. package/surfaces.d.ts +38 -2
  304. package/surfaces.js +37 -134
  305. package/svelte/UiComponent.server.js +1 -48
  306. package/svelte/UiComponent.svelte +44 -32
  307. package/svelte.d.ts +1 -1
  308. package/svelte.js +33 -68
  309. package/switch/index.js +15 -14
  310. package/time-grid.d.ts +0 -1
  311. package/time-grid.js +38 -37
  312. package/timeline-track/_style.scss +96 -24
  313. package/timeline-track/component.d.ts +5 -1
  314. package/timeline-track/index.js +71 -54
  315. package/timeline-track/model.d.ts +9 -0
  316. package/timeline-track/model.js +10 -1
  317. package/ui.css +1 -1
  318. package/view-switcher.d.ts +23 -0
  319. package/vue.d.ts +51 -35
  320. package/vue.js +149 -178
  321. package/_chunks/chart-frame-BC99KjGa.js +0 -127
  322. package/_chunks/choice-chips-Cs4D-3nH.js +0 -110
  323. package/_chunks/compat.module-DDB2pm9O.js +0 -229
  324. package/_chunks/control-tooltip-ztgmsG7H.js +0 -100
  325. package/_chunks/dialog.parts-DBqo3Qwb.js +0 -134
  326. package/_chunks/dropdown-voWqmwAe.js +0 -357
  327. package/_chunks/editor-popup-D3JdS8l3.js +0 -81
  328. package/_chunks/mount-DZe_6VtR.js +0 -90
  329. package/_chunks/request-trail-IdNiFvKH.js +0 -347
  330. package/_chunks/rich-text-BzI1DyfF.js +0 -477
  331. package/avatar/index.view.d.ts +0 -25
  332. package/color-palette/native.view.d.ts +0 -15
  333. package/control-presentation.view.d.ts +0 -8
  334. package/dialog/dialog-action-footer.view.d.ts +0 -20
  335. package/dialog/dialog.dom.view.d.ts +0 -15
  336. package/form-controls/index.view.d.ts +0 -12
  337. package/formatting/control-tooltip.d.ts +0 -27
  338. package/native-controls.view.d.ts +0 -54
  339. package/react-native-select.d.ts +0 -6
  340. package/search-input/native.view.d.ts +0 -21
  341. package/styles/legacy-pagination.css +0 -112
  342. package/surfaces.view.d.ts +0 -63
  343. package/vue-native-select.d.ts +0 -9
@@ -0,0 +1,762 @@
1
+ import { i as e, n as t, s as n } from "./preact.module-BBM36DnO.js";
2
+ import { c as r, i, r as a, s as o, t as s } from "./hooks.module-CG3gN83z.js";
3
+ import { t as c } from "./jsxRuntime.module-F6UFnpT-.js";
4
+ import { createControlId as l } from "../core/control-id.js";
5
+ import { t as u } from "./popover-controller-D-AvKQ7B.js";
6
+ import { SvgIcon as d } from "../icons/icon.js";
7
+ import { l as f } from "./native-control-B_fVA5bL.js";
8
+ import { RemoveButton as p } from "../buttons/remove-button.js";
9
+ import "./chevron-down-GbplLa6s.js";
10
+ import { D as m, M as h, c as g, p as _, t as v } from "./controls-B_6NJarZ.js";
11
+ import { t as y } from "./tooltip-text-BXsUEmBH.js";
12
+ import { t as b } from "./clock-BOhPNlW3.js";
13
+ import { t as x } from "./arrow-up-Cw8hW9vp.js";
14
+ //#region src/ai/translations.ts
15
+ var S = /* @__PURE__ */ "AI chat,No results,Clear chat,Restart conversation,New conversation,Request history,Clear chart,Conversation messages,Jump to latest,You,Assistant,System,Message actions,Start a conversation,Ask a question to get started.,Message,Type a message…,Working…,Reasoning summary,Pending,Running,Completed,Failed,Cancelled,{seconds}s,Data history,Review changes,Proposed changes,Change,Current,Proposed,Apply changes,Cancel changes,Undo data change,Redo data change,Ask AI to change this view,Filter or sort your data…,Send,Stop,Enter to send · Shift+Enter for a new line,Suggested requests,More,Search requests,Activity,Collapse activity,Expand activity,AI view assistant,View steps,Clear all,Restore the starting view,Restore previous view,Reset view,The view changed manually. Start a new request to continue.,Remove request: {label},{count} step,{count} steps,{count} applied request,{count} applied requests,{count} matching rows".split(",");
16
+ function C(e, t = {}, n = {}) {
17
+ return (t[e] ?? e).replace(/\{(\w+)\}/g, (e, t) => Object.hasOwn(n, t) ? String(n[t]) : e);
18
+ }
19
+ //#endregion
20
+ //#region src/ai/translation-context.tsx
21
+ var w = n({});
22
+ function T({ translations: e, children: t }) {
23
+ return /* @__PURE__ */ c(w.Provider, {
24
+ value: e,
25
+ children: t
26
+ });
27
+ }
28
+ function E(e) {
29
+ let t = o(w), n = e ?? t;
30
+ return (e, t) => C(e, n, t);
31
+ }
32
+ //#endregion
33
+ //#region src/ai/results/types.ts
34
+ function D(e) {
35
+ return e == null ? "—" : typeof e == "number" ? Number.isFinite(e) ? e.toLocaleString() : "—" : String(e);
36
+ }
37
+ //#endregion
38
+ //#region src/ai/results/table.tsx
39
+ function O({ result: e }) {
40
+ let t = E();
41
+ return /* @__PURE__ */ c("section", {
42
+ class: "rv-ai-result-content",
43
+ "aria-label": e.title,
44
+ children: /* @__PURE__ */ c("div", {
45
+ class: "rv-ai-result-table-scroll",
46
+ tabIndex: 0,
47
+ role: "region",
48
+ "aria-label": e.title,
49
+ children: [/* @__PURE__ */ c("table", {
50
+ class: "rv-ai-result-table",
51
+ children: [
52
+ /* @__PURE__ */ c("caption", { children: [/* @__PURE__ */ c("strong", { children: e.title }), e.description && /* @__PURE__ */ c("span", { children: e.description })] }),
53
+ /* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", { children: e.columns.map((e, t) => /* @__PURE__ */ c("th", {
54
+ scope: "col",
55
+ class: e.numeric ? "rv-ai-result-number" : void 0,
56
+ children: e.label
57
+ }, t)) }) }),
58
+ /* @__PURE__ */ c("tbody", { children: e.rows.map((t, n) => /* @__PURE__ */ c("tr", { children: e.columns.map((e, n) => /* @__PURE__ */ c("td", {
59
+ class: e.numeric ? "rv-ai-result-number" : void 0,
60
+ children: D(t[n])
61
+ }, n)) }, n)) })
62
+ ]
63
+ }), !e.rows.length && /* @__PURE__ */ c("p", {
64
+ class: "rv-ai-result-empty",
65
+ children: t("No results")
66
+ })]
67
+ })
68
+ });
69
+ }
70
+ //#endregion
71
+ //#region src/ai/results/metrics.tsx
72
+ function k({ result: e }) {
73
+ return /* @__PURE__ */ c("section", {
74
+ class: "rv-ai-result-content",
75
+ "aria-label": e.title,
76
+ children: [
77
+ /* @__PURE__ */ c("strong", { children: e.title }),
78
+ e.description && /* @__PURE__ */ c("p", {
79
+ class: "rv-ai-result-description",
80
+ children: e.description
81
+ }),
82
+ /* @__PURE__ */ c("dl", {
83
+ class: "rv-ai-result-metrics",
84
+ children: e.items.map((e, t) => /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("dt", { children: e.label }), /* @__PURE__ */ c("dd", { children: D(e.value) })] }, t))
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ //#endregion
90
+ //#region src/ai/results/text.tsx
91
+ function A({ result: e }) {
92
+ return /* @__PURE__ */ c("section", {
93
+ class: "rv-ai-result-content",
94
+ "aria-label": e.title,
95
+ children: [
96
+ /* @__PURE__ */ c("strong", { children: e.title }),
97
+ e.description && /* @__PURE__ */ c("p", {
98
+ class: "rv-ai-result-description",
99
+ children: e.description
100
+ }),
101
+ /* @__PURE__ */ c("p", {
102
+ class: "rv-ai-result-text",
103
+ children: e.text
104
+ })
105
+ ]
106
+ });
107
+ }
108
+ //#endregion
109
+ //#region src/ai/results/index.tsx
110
+ function j({ result: e, renderTable: t }) {
111
+ switch (e.kind) {
112
+ case "table": return t ? t(e) : /* @__PURE__ */ c(O, { result: e });
113
+ case "metrics": return /* @__PURE__ */ c(k, { result: e });
114
+ case "text": return /* @__PURE__ */ c(A, { result: e });
115
+ }
116
+ }
117
+ //#endregion
118
+ //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/circle-check.svg?raw
119
+ var M = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z\"/></svg>", N = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c9.4-9.4 24.6-9.4 33.9 0l55 55 55-55c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-55 55 55 55c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-55-55-55 55c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l55-55-55-55c-9.4-9.4-9.4-24.6 0-33.9z\"/></svg>", P = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z\"/></svg>";
120
+ //#endregion
121
+ //#region src/ai/prompt-history.ts
122
+ function F(e) {
123
+ if (!Array.isArray(e)) return [];
124
+ let t = e.slice(-20).filter((e) => typeof e == "string" && !!e.trim() && e.length <= 4e3).map((e) => e.trim()).filter((e, t, n) => !t || e !== n[t - 1]), n = [];
125
+ for (let e = t.length - 1; e >= 0; e--) new TextEncoder().encode(JSON.stringify([t[e], ...n])).byteLength <= 8192 && n.unshift(t[e]);
126
+ return n;
127
+ }
128
+ var I = class {
129
+ state;
130
+ reset() {
131
+ this.state = void 0;
132
+ }
133
+ move(e, t, n) {
134
+ let r = JSON.stringify(n);
135
+ if (this.state && (this.state.selected !== e || this.state.key !== r) && this.reset(), !n.length || !this.state && t === "down") return;
136
+ this.state ||= {
137
+ index: n.length,
138
+ draft: e,
139
+ selected: e,
140
+ key: r
141
+ };
142
+ let i = this.state.index + (t === "up" ? -1 : 1);
143
+ if (i >= n.length) {
144
+ let e = this.state.draft;
145
+ return this.reset(), e;
146
+ }
147
+ return this.state.index = Math.max(0, i), this.state.selected = n[this.state.index], this.state.selected;
148
+ }
149
+ }, L = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M64 32l320 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32z\"/></svg>";
150
+ //#endregion
151
+ //#region src/ai/components.tsx
152
+ function R({ translations: e, value: t, onValueChange: n, onSubmit: r, onStop: i, busy: o = !1, disabled: u = !1, label: d = "Ask AI to change this view", placeholder: f = "Filter or sort your data…", submitLabel: p = "Send", stopLabel: m = "Stop", promptHistory: g, hint: v = "", actions: y, footer: b, textareaProps: S }) {
153
+ let C = E(e), w = s(l("ai-prompt")), T = s(!1), D = s(new I()), O = s();
154
+ a(() => {
155
+ if (!O.current) return;
156
+ let { element: e, position: t } = O.current;
157
+ e.setSelectionRange(t, t), O.current = void 0;
158
+ });
159
+ let k = `${w.current}-hint`, A = !!v && !t.length, j = o && !!i, M = () => {
160
+ !u && !o && t.trim() && r(t.trim());
161
+ };
162
+ return /* @__PURE__ */ c("form", {
163
+ class: "rv-ai-prompt",
164
+ "aria-busy": o || void 0,
165
+ onSubmit: (e) => {
166
+ e.preventDefault(), M();
167
+ },
168
+ children: [/* @__PURE__ */ c("label", {
169
+ for: w.current,
170
+ class: "rv-ai-prompt-label rv-visually-hidden",
171
+ children: C(d)
172
+ }), /* @__PURE__ */ c("div", {
173
+ class: "rv-ai-prompt-composer",
174
+ children: [
175
+ /* @__PURE__ */ c(h, {
176
+ rows: 1,
177
+ ...S,
178
+ id: w.current,
179
+ "aria-describedby": A ? k : void 0,
180
+ value: t,
181
+ onValueChange: (e) => {
182
+ D.current.reset(), O.current = void 0, n(e);
183
+ },
184
+ placeholder: C(f),
185
+ disabled: u || o,
186
+ maxLength: 4e3,
187
+ onCompositionStart: () => {
188
+ T.current = !0;
189
+ },
190
+ onCompositionEnd: () => {
191
+ T.current = !1;
192
+ },
193
+ onKeyDown: (e) => {
194
+ let r = e.currentTarget;
195
+ if (g && !o && !u && !T.current && !e.isComposing && e.keyCode !== 229 && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey && r.selectionStart === r.selectionEnd && (e.key === "ArrowUp" && !t.slice(0, r.selectionStart).includes("\n") || e.key === "ArrowDown" && !t.slice(r.selectionEnd).includes("\n"))) {
196
+ let i = D.current.move(t, e.key === "ArrowUp" ? "up" : "down", F(g));
197
+ if (i !== void 0) {
198
+ if (e.preventDefault(), i === t) return;
199
+ O.current = {
200
+ element: r,
201
+ position: i.length
202
+ }, n(i);
203
+ return;
204
+ }
205
+ }
206
+ e.key === "Enter" && !e.shiftKey && !e.isComposing && !T.current && e.keyCode !== 229 && (e.preventDefault(), M());
207
+ }
208
+ }),
209
+ b && /* @__PURE__ */ c("div", {
210
+ class: "rv-ai-prompt-footer",
211
+ children: b
212
+ }),
213
+ /* @__PURE__ */ c("div", {
214
+ class: "rv-ai-prompt-toolbar",
215
+ children: [/* @__PURE__ */ c("div", {
216
+ class: "rv-ai-prompt-tools",
217
+ children: [y, A && /* @__PURE__ */ c("span", {
218
+ id: k,
219
+ class: "rv-ai-prompt-hint",
220
+ children: C(v)
221
+ })]
222
+ }), /* @__PURE__ */ c(_, {
223
+ className: "rv-ai-prompt-submit",
224
+ type: j ? "button" : "submit",
225
+ label: C(j ? m : p),
226
+ icon: j ? L : x,
227
+ onClick: j ? (e) => {
228
+ e.preventDefault(), i?.();
229
+ } : void 0,
230
+ disabled: u || !j && !t.trim(),
231
+ busy: o && !j,
232
+ variant: "solid",
233
+ size: "compact"
234
+ })]
235
+ })
236
+ ]
237
+ })]
238
+ });
239
+ }
240
+ function z({ translations: e, items: t, onSelect: n, disabled: r, label: i = "Suggested requests", maxVisible: a = 2 }) {
241
+ let o = E(e);
242
+ if (!t.length) return null;
243
+ let s = Number.isFinite(a) ? Math.max(0, Math.floor(a)) : 2, l = t.map((e) => typeof e == "string" ? {
244
+ label: e,
245
+ prompt: e
246
+ } : e);
247
+ return /* @__PURE__ */ c("div", {
248
+ class: "rv-ai-suggestions",
249
+ role: "group",
250
+ "aria-label": o(i),
251
+ children: [l.slice(0, s).map((e, t) => /* @__PURE__ */ c(v, {
252
+ className: "rv-ai-suggestion",
253
+ size: "compact",
254
+ disabled: r,
255
+ onClick: () => n(e.prompt),
256
+ children: e.label
257
+ }, `${t}:${e.prompt}`)), l.length > s && /* @__PURE__ */ c(f, {
258
+ className: "rv-ai-examples",
259
+ source: l.slice(s).map((e) => ({
260
+ value: e.prompt,
261
+ label: e.label
262
+ })),
263
+ disabled: r,
264
+ placeholder: o("More"),
265
+ renderSelectedValue: () => /* @__PURE__ */ c(d, {
266
+ svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M0 256a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm168 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm224-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z\"/></svg>",
267
+ size: 14
268
+ }),
269
+ config: {
270
+ ariaLabel: o("More"),
271
+ search: !0,
272
+ searchPlaceholder: o("Search requests"),
273
+ searchAriaLabel: o("Search requests"),
274
+ popupClassName: "rv-ai-examples-menu",
275
+ maxHeight: 480
276
+ },
277
+ onChange: (e) => {
278
+ typeof e == "string" && n(e);
279
+ }
280
+ })]
281
+ });
282
+ }
283
+ function B({ translations: e, phase: t, message: n }) {
284
+ let r = E(e);
285
+ return /* @__PURE__ */ c("div", {
286
+ class: "rv-ai-status",
287
+ "data-state": t,
288
+ role: "status",
289
+ "aria-live": "polite",
290
+ "aria-atomic": "true",
291
+ children: [(t === "understanding" || t === "applying") && /* @__PURE__ */ c("span", {
292
+ "aria-hidden": "true",
293
+ children: /* @__PURE__ */ c(m, { label: "" })
294
+ }), /* @__PURE__ */ c("span", { children: r(n) })]
295
+ });
296
+ }
297
+ function V({ translations: e, summary: t, matchedRows: n, countLabel: r, actions: i, children: a }) {
298
+ let o = E(e);
299
+ return /* @__PURE__ */ c("div", {
300
+ class: "rv-ai-result",
301
+ role: "status",
302
+ "aria-live": "polite",
303
+ children: [
304
+ /* @__PURE__ */ c("p", {
305
+ class: "rv-ai-result-summary",
306
+ children: t
307
+ }),
308
+ n !== void 0 && /* @__PURE__ */ c("p", {
309
+ class: "rv-ai-result-count",
310
+ children: r ? r(n) : o("{count} matching rows", { count: n.toLocaleString() })
311
+ }),
312
+ a,
313
+ i && /* @__PURE__ */ c("div", {
314
+ class: "rv-ai-result-actions",
315
+ children: i
316
+ })
317
+ ]
318
+ });
319
+ }
320
+ function H({ layout: e = "flow", translations: t = {}, label: n = "AI view assistant", children: r, footer: i, busy: a }) {
321
+ return /* @__PURE__ */ c(T, {
322
+ translations: t,
323
+ children: /* @__PURE__ */ c("section", {
324
+ class: `rv-ai-assistant${e === "fill" ? " rv-ai-assistant--fill" : ""}`,
325
+ "aria-label": ((e) => C(e, t))(n),
326
+ "aria-busy": a || void 0,
327
+ onKeyDown: (e) => e.stopPropagation(),
328
+ onKeyUp: (e) => e.stopPropagation(),
329
+ children: [r, i && /* @__PURE__ */ c("div", {
330
+ class: "rv-ai-assistant-footer",
331
+ children: i
332
+ })]
333
+ })
334
+ });
335
+ }
336
+ function U({ translations: t, summary: n, details: i, changes: a, notice: o, disabled: l, onApply: u, onCancel: d }) {
337
+ let f = E(t), p = s(null);
338
+ return r(() => {
339
+ p.current?.focus();
340
+ }, []), /* @__PURE__ */ c("section", {
341
+ class: "rv-ai-change-preview",
342
+ "aria-label": f("Review changes"),
343
+ onKeyDown: (e) => {
344
+ e.key === "Escape" && !l && (e.preventDefault(), d());
345
+ },
346
+ children: /* @__PURE__ */ c(V, {
347
+ summary: n,
348
+ actions: /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ c(v, {
349
+ ref: p,
350
+ disabled: l,
351
+ onClick: u,
352
+ children: f("Apply changes")
353
+ }), /* @__PURE__ */ c(v, {
354
+ disabled: l,
355
+ variant: "ghost",
356
+ onClick: d,
357
+ children: f("Cancel changes")
358
+ })] }),
359
+ children: [o && /* @__PURE__ */ c("p", {
360
+ class: "rv-ai-preview-notice",
361
+ children: o
362
+ }), a?.length ? /* @__PURE__ */ c("div", {
363
+ class: "rv-ai-preview-changes",
364
+ role: "region",
365
+ "aria-label": f("Proposed changes"),
366
+ tabIndex: 0,
367
+ children: /* @__PURE__ */ c("table", { children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", { children: [
368
+ /* @__PURE__ */ c("th", {
369
+ scope: "col",
370
+ children: f("Change")
371
+ }),
372
+ /* @__PURE__ */ c("th", {
373
+ scope: "col",
374
+ children: f("Current")
375
+ }),
376
+ /* @__PURE__ */ c("th", {
377
+ scope: "col",
378
+ children: f("Proposed")
379
+ })
380
+ ] }) }), /* @__PURE__ */ c("tbody", { children: a.map((e, t) => /* @__PURE__ */ c("tr", { children: [
381
+ /* @__PURE__ */ c("th", {
382
+ scope: "row",
383
+ children: [e.item && /* @__PURE__ */ c("span", {
384
+ class: "rv-ai-preview-item",
385
+ children: e.item
386
+ }), e.label]
387
+ }),
388
+ /* @__PURE__ */ c("td", { children: e.before ?? "—" }),
389
+ /* @__PURE__ */ c("td", { children: e.after ?? "—" })
390
+ ] }, t)) })] })
391
+ }) : i && /* @__PURE__ */ c("pre", {
392
+ class: "rv-ai-result-details",
393
+ children: i
394
+ })]
395
+ })
396
+ });
397
+ }
398
+ //#endregion
399
+ //#region src/ai/chat.tsx
400
+ function W({ children: e, className: t = "", label: n = "AI chat", style: r, translations: i }) {
401
+ let a = E(i);
402
+ return /* @__PURE__ */ c("section", {
403
+ class: `rv-ai-chat ${t}`,
404
+ "aria-label": a(n),
405
+ style: r,
406
+ children: e
407
+ });
408
+ }
409
+ function G({ children: e, className: t = "", autoScroll: n = !0, busy: o = !1, label: l = "Conversation messages", jumpLabel: u = "Jump to latest", translations: d }) {
410
+ let f = E(d), p = s(null), m = s(null), h = s(n), [g, v] = i(!1), y = () => {
411
+ let e = p.current;
412
+ if (!e) return;
413
+ let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 40;
414
+ h.current = t, v(!t);
415
+ }, b = () => {
416
+ let e = p.current;
417
+ e && (e.scrollTop = e.scrollHeight, h.current = !0, v(!1));
418
+ }, x = () => {
419
+ if (n && h.current) b();
420
+ else {
421
+ let e = p.current;
422
+ e && v(e.scrollHeight - e.clientHeight - e.scrollTop > 40);
423
+ }
424
+ };
425
+ return a(x, [e, n]), r(() => {
426
+ if (typeof ResizeObserver > "u") return;
427
+ let e = new ResizeObserver(x);
428
+ return p.current && e.observe(p.current), m.current && e.observe(m.current), () => e.disconnect();
429
+ }, [n]), /* @__PURE__ */ c("div", {
430
+ class: `rv-ai-chat-scroll ${t}`,
431
+ children: [/* @__PURE__ */ c("div", {
432
+ ref: p,
433
+ class: "rv-ai-chat-viewport",
434
+ role: "log",
435
+ "aria-label": f(l),
436
+ "aria-live": "polite",
437
+ "aria-relevant": "additions text",
438
+ "aria-busy": o || void 0,
439
+ tabIndex: 0,
440
+ onScroll: y,
441
+ children: /* @__PURE__ */ c("div", {
442
+ ref: m,
443
+ class: "rv-ai-chat-content",
444
+ children: e
445
+ })
446
+ }), g && /* @__PURE__ */ c(_, {
447
+ className: "rv-ai-chat-jump",
448
+ label: f(u),
449
+ icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M169.4 502.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 402.7 224 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 370.7-105.4-105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z\"/></svg>",
450
+ variant: "default",
451
+ size: "compact",
452
+ onClick: b
453
+ })]
454
+ });
455
+ }
456
+ function K({ title: e = "Start a conversation", description: t = "Ask a question to get started.", children: n, className: r = "", translations: i, renderContent: o }) {
457
+ let l = E(i), u = s(null);
458
+ return a(() => {
459
+ let e = u.current;
460
+ if (!e || !o) return;
461
+ let t = o(e);
462
+ return () => {
463
+ t?.(), e.replaceChildren();
464
+ };
465
+ }, [o]), /* @__PURE__ */ c("div", {
466
+ class: `rv-ai-chat-empty ${r}`,
467
+ children: [
468
+ e && /* @__PURE__ */ c("strong", { children: l(e) }),
469
+ t && /* @__PURE__ */ c("p", { children: l(t) }),
470
+ n,
471
+ o && /* @__PURE__ */ c("div", {
472
+ ref: u,
473
+ class: "rv-ai-chat-empty-slot"
474
+ })
475
+ ]
476
+ });
477
+ }
478
+ function q(e) {
479
+ return /* @__PURE__ */ c("div", {
480
+ class: "rv-ai-chat-composer",
481
+ children: /* @__PURE__ */ c(R, {
482
+ label: "Message",
483
+ placeholder: "Type a message…",
484
+ ...e
485
+ })
486
+ });
487
+ }
488
+ function J({ from: e, label: t, isStreaming: n = !1, children: r, className: i = "", translations: a }) {
489
+ let o = E(a);
490
+ return /* @__PURE__ */ c("article", {
491
+ class: `rv-ai-message rv-ai-message--${e} ${i}`,
492
+ "aria-label": o(t ?? {
493
+ user: "You",
494
+ assistant: "Assistant",
495
+ system: "System"
496
+ }[e]),
497
+ "aria-busy": n || void 0,
498
+ "data-streaming": n || void 0,
499
+ children: r
500
+ });
501
+ }
502
+ function Y({ children: e, className: t = "" }) {
503
+ return /* @__PURE__ */ c("div", {
504
+ class: `rv-ai-message-content ${t}`,
505
+ children: e
506
+ });
507
+ }
508
+ function X({ children: e, className: t = "", label: n = "Message actions", translations: r }) {
509
+ let i = E(r);
510
+ return /* @__PURE__ */ c("div", {
511
+ class: `rv-ai-message-actions ${t}`,
512
+ role: "group",
513
+ "aria-label": i(n),
514
+ children: e
515
+ });
516
+ }
517
+ var Z = {
518
+ pending: "Pending",
519
+ running: "Running",
520
+ completed: "Completed",
521
+ error: "Failed",
522
+ cancelled: "Cancelled"
523
+ };
524
+ function Q({ status: e }) {
525
+ return /* @__PURE__ */ c("span", {
526
+ class: "rv-ai-task-icon",
527
+ "data-status": e,
528
+ "aria-hidden": "true",
529
+ children: e === "running" ? /* @__PURE__ */ c(m, { label: "" }) : /* @__PURE__ */ c(d, { svg: e === "completed" ? M : e === "error" ? N : e === "cancelled" ? P : b })
530
+ });
531
+ }
532
+ function $({ title: e, status: n = "completed", open: r, defaultOpen: a, onOpenChange: o, children: l, className: u = "", translations: f }) {
533
+ let p = E(f), [m, h] = i(a), _ = r ?? m ?? n === "running", v = s({
534
+ expanded: _,
535
+ open: r,
536
+ onOpenChange: o
537
+ });
538
+ v.current = {
539
+ expanded: _,
540
+ open: r,
541
+ onOpenChange: o
542
+ };
543
+ let y = t(l).some((e) => typeof e != "string" || e.trim().length > 0), b = /* @__PURE__ */ c("span", {
544
+ class: "rv-ai-trace-heading",
545
+ children: [
546
+ /* @__PURE__ */ c(Q, { status: n }),
547
+ /* @__PURE__ */ c("span", { children: e }),
548
+ /* @__PURE__ */ c("span", {
549
+ class: "rv-visually-hidden",
550
+ children: p(Z[n])
551
+ }),
552
+ y && /* @__PURE__ */ c("span", {
553
+ class: "rv-ai-trace-chevron",
554
+ "aria-hidden": "true",
555
+ children: /* @__PURE__ */ c(d, {
556
+ svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"/></svg>",
557
+ size: 8
558
+ })
559
+ })
560
+ ]
561
+ });
562
+ return y ? /* @__PURE__ */ c(g, {
563
+ className: `rv-ai-trace ${u}`,
564
+ open: _,
565
+ onToggle: (e) => {
566
+ let t = e.currentTarget.open, n = v.current;
567
+ t !== n.expanded && (n.open === void 0 ? h(t) : e.currentTarget.open = n.expanded, n.onOpenChange?.(t));
568
+ },
569
+ summary: b,
570
+ children: /* @__PURE__ */ c("div", {
571
+ class: "rv-ai-trace-content",
572
+ children: l
573
+ })
574
+ }) : /* @__PURE__ */ c("div", {
575
+ class: `rv-ai-trace rv-ai-trace-line ${u}`,
576
+ children: b
577
+ });
578
+ }
579
+ function ee(e) {
580
+ return /* @__PURE__ */ c($, { ...e });
581
+ }
582
+ function te({ status: e = "completed", children: t, className: n = "", translations: r }) {
583
+ let i = E(r);
584
+ return /* @__PURE__ */ c("div", {
585
+ class: `rv-ai-task-item ${n}`,
586
+ children: [
587
+ /* @__PURE__ */ c(Q, { status: e }),
588
+ /* @__PURE__ */ c("span", {
589
+ class: "rv-visually-hidden",
590
+ children: [i(Z[e]), ": "]
591
+ }),
592
+ /* @__PURE__ */ c("div", { children: t })
593
+ ]
594
+ });
595
+ }
596
+ function ne({ title: e, isStreaming: t = !1, duration: n, children: r, translations: i, ...a }) {
597
+ let o = E(i), s = typeof n == "number" && Number.isFinite(n) && n >= 0 ? ` · ${o("{seconds}s", { seconds: Math.round(n) })}` : "";
598
+ return /* @__PURE__ */ c($, {
599
+ ...a,
600
+ translations: i,
601
+ status: t ? "running" : "completed",
602
+ title: `${o(e ?? (t ? "Working…" : "Reasoning summary"))}${s}`,
603
+ children: r
604
+ });
605
+ }
606
+ //#endregion
607
+ //#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/clock-rotate-left.svg?raw
608
+ var re = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M288 64c106 0 192 86 192 192S394 448 288 448c-65.2 0-122.9-32.5-157.6-82.3-10.1-14.5-30.1-18-44.6-7.9s-18 30.1-7.9 44.6C124.1 468.6 201 512 288 512 429.4 512 544 397.4 544 256S429.4 0 288 0C202.3 0 126.5 42.1 80 106.7L80 80c0-17.7-14.3-32-32-32S16 62.3 16 80l0 112c0 17.7 14.3 32 32 32l24.6 0c.5 0 1 0 1.5 0l86 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-38.3 0C154.9 102.6 217 64 288 64zm24 88c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 104c0 6.4 2.5 12.5 7 17l72 72c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-65-65 0-94.1z\"/></svg>";
609
+ //#endregion
610
+ //#region src/ai/request-trail.tsx
611
+ function ie({ translations: e, items: t, onRemove: n, onClear: r, onEmpty: o, footer: f, showClear: m = !0, disabled: h, removalsDisabled: g, label: _ = "Request history", triggerLabel: b, clearLabel: x = "Clear all", clearDescription: S, removeLabel: C, countLabel: w, changedMessage: T }) {
612
+ let D = E(e), O = w ?? ((e) => D(e === 1 ? "{count} applied request" : "{count} applied requests", { count: e })), k = C ?? ((e) => D("Remove request: {label}", { label: e.label })), A = s(null), j = s(null), M = s(null), [N] = i(() => l("rv-ai-steps")), [P, F] = i(!1), I = t.length > 0;
613
+ a(() => {
614
+ if (I || F(!1), !P || !I || !A.current || !j.current || !M.current) return;
615
+ let e = M.current, t = new u(), n = !0;
616
+ return t.open({
617
+ anchor: j.current,
618
+ content: e,
619
+ appendTo: A.current,
620
+ onClose: () => {
621
+ n && F(!1);
622
+ }
623
+ }), e.focus({ preventScroll: !0 }), () => {
624
+ n = !1, t.destroy(), e.hidden = !0;
625
+ };
626
+ }, [P, I]);
627
+ let L = s();
628
+ if (a(() => {
629
+ let e = L.current;
630
+ if (!e) return;
631
+ if (h) {
632
+ e.sawBusy = !0;
633
+ return;
634
+ }
635
+ if (e.id ? t.some((t) => t.id === e.id) : t.length > 0) {
636
+ (e.sawBusy || e.id && g) && (L.current = void 0);
637
+ return;
638
+ }
639
+ L.current = void 0;
640
+ let n = e.button.ownerDocument.activeElement;
641
+ if (n !== e.button && n !== e.button.ownerDocument.body) return;
642
+ let r = A.current?.querySelectorAll(".rv-remove-button");
643
+ r?.length && P ? r[Math.min(e.index, r.length - 1)]?.focus() : t.length ? P && j.current?.focus() : o?.();
644
+ }, [
645
+ t,
646
+ o,
647
+ h,
648
+ g,
649
+ P
650
+ ]), !I) return null;
651
+ let R = 0, z = t.reduce((e, t) => e + (t.count ?? 1), 0);
652
+ return /* @__PURE__ */ c("div", {
653
+ class: "rv-ai-request-trail",
654
+ role: "group",
655
+ "aria-label": D(_),
656
+ ref: A,
657
+ onFocusOut: (e) => {
658
+ e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && F(!1);
659
+ },
660
+ children: [/* @__PURE__ */ c(v, {
661
+ ref: j,
662
+ className: "rv-ai-trail-trigger rv-btn-icon",
663
+ variant: "ghost",
664
+ size: "compact",
665
+ disabled: h,
666
+ "aria-label": D(_),
667
+ title: D(_),
668
+ "aria-haspopup": "dialog",
669
+ "aria-expanded": P,
670
+ "aria-controls": N,
671
+ onClick: () => F((e) => !e),
672
+ children: b ? b(z) : /* @__PURE__ */ c(d, {
673
+ svg: re,
674
+ size: 16
675
+ })
676
+ }), /* @__PURE__ */ c("div", {
677
+ ref: M,
678
+ id: N,
679
+ class: "rv-popover rv-ai-trail-popover",
680
+ role: "dialog",
681
+ "aria-label": D(_),
682
+ tabIndex: -1,
683
+ hidden: !P,
684
+ children: [
685
+ /* @__PURE__ */ c("div", {
686
+ class: "rv-ai-trail-header",
687
+ children: /* @__PURE__ */ c("span", {
688
+ class: "rv-ai-trail-label",
689
+ children: D(_)
690
+ })
691
+ }),
692
+ /* @__PURE__ */ c("ol", {
693
+ class: "rv-ai-trail-steps",
694
+ "aria-label": O(z),
695
+ children: t.map((e, r) => {
696
+ let i = R + 1;
697
+ return R += e.count ?? 1, /* @__PURE__ */ c("li", {
698
+ class: "rv-ai-step",
699
+ "data-current": r === t.length - 1 || void 0,
700
+ onFocusCapture: (e) => e.currentTarget.scrollIntoView({
701
+ block: "nearest",
702
+ inline: "nearest"
703
+ }),
704
+ children: /* @__PURE__ */ c("span", {
705
+ class: "rv-ai-step-chip",
706
+ children: [
707
+ /* @__PURE__ */ c("span", {
708
+ class: "rv-ai-step-number",
709
+ "aria-hidden": "true",
710
+ children: i === R ? i : `${i}–${R}`
711
+ }),
712
+ /* @__PURE__ */ c(y, {
713
+ class: "rv-ai-step-label",
714
+ title: e.label,
715
+ children: e.label
716
+ }),
717
+ e.removable !== !1 && /* @__PURE__ */ c(p, {
718
+ compact: !0,
719
+ disabled: h || g,
720
+ locale: {
721
+ title: k(e),
722
+ ariaLabel: k(e)
723
+ },
724
+ onClick: (t) => {
725
+ t.preventDefault(), L.current = {
726
+ button: t.currentTarget,
727
+ index: r,
728
+ id: e.id
729
+ }, n(e.id);
730
+ }
731
+ })
732
+ ]
733
+ })
734
+ }, e.id);
735
+ })
736
+ }),
737
+ T && /* @__PURE__ */ c("p", {
738
+ class: "rv-ai-trail-message",
739
+ children: D(T)
740
+ }),
741
+ /* @__PURE__ */ c("div", {
742
+ class: "rv-ai-trail-footer",
743
+ children: [f, m && r && /* @__PURE__ */ c(v, {
744
+ variant: "ghost",
745
+ size: "compact",
746
+ disabled: h,
747
+ title: S ? D(S) : void 0,
748
+ onClick: (e) => {
749
+ e.preventDefault(), L.current = {
750
+ button: e.currentTarget,
751
+ index: 0
752
+ }, r?.();
753
+ },
754
+ children: D(x)
755
+ })]
756
+ })
757
+ ]
758
+ })]
759
+ });
760
+ }
761
+ //#endregion
762
+ export { D as C, C as E, O as S, S as T, z as _, K as a, A as b, Y as c, te as d, B as f, V as g, R as h, G as i, ne as l, U as m, W as n, J as o, H as p, q as r, X as s, ie as t, ee as u, F as v, T as w, k as x, j as y };