@revolist/ui 4.0.4-rc → 4.0.6-rc

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 (240) hide show
  1. package/MIGRATION.md +36 -0
  2. package/OWNERSHIP.md +10 -10
  3. package/README.md +22 -4
  4. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  5. package/_chunks/badge.view-D30pMUfi.js +14 -0
  6. package/_chunks/calculator-CDWOuAcp.js +4 -0
  7. package/_chunks/{calendar-xpZ0v3xf.js → calendar-QWDyYzdo.js} +19 -19
  8. package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
  9. package/_chunks/check-BwI7iCAm.js +4 -0
  10. package/_chunks/choice-chips-A6WR-WJe.js +126 -0
  11. package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
  12. package/_chunks/color-picker-BK4W1nd6.js +143 -0
  13. package/_chunks/{component-C_T2VN5u.js → component-CMkF17YZ.js} +281 -265
  14. package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
  15. package/_chunks/configurator-actions-By8WSL2m.js +155 -0
  16. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  17. package/_chunks/{control-AHKXD5Eu.js → control-mlH7l0Uq.js} +42 -17
  18. package/_chunks/{controls-DsNi8V8I.js → controls-FUU-MUKC.js} +171 -186
  19. package/_chunks/{date-control-DrVFX13g.js → date-control-Dup_P3w5.js} +1 -1
  20. package/_chunks/{date-time-qIhp5vaX.js → date-time-9z6pAG5T.js} +317 -278
  21. package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
  22. package/_chunks/{duration-CL68Em0o.js → duration-D7oRjsmP.js} +5 -5
  23. package/_chunks/editor-popup-ByU7qiub.js +82 -0
  24. package/_chunks/field-configurator-BCINdXpU.js +223 -0
  25. package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
  26. package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
  27. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  28. package/_chunks/minus-BOAR3A1C.js +4 -0
  29. package/_chunks/mount-Cw2zk58T.js +266 -0
  30. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  31. package/_chunks/native-control-pFMuHf3G.js +644 -0
  32. package/_chunks/{number-input-BKwA5FnM.js → number-input-DqXV6vgP.js} +7 -7
  33. package/_chunks/{picker-h1P5RUgp.js → picker-gEGTu1Ki.js} +2 -2
  34. package/_chunks/plus-CbGRkIGl.js +4 -0
  35. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  36. package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
  37. package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-DbxdUJr-.js} +1 -1
  38. package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B0_13Sja.js} +1 -1
  39. package/_chunks/request-trail-CCSK6TJA.js +753 -0
  40. package/_chunks/rich-text-5rnc8lpI.js +842 -0
  41. package/_chunks/rotate-left-BF6G883o.js +4 -0
  42. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  43. package/_chunks/tooltip-D4xkio5G.js +54 -0
  44. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  45. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  46. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  47. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  48. package/_variables.scss +33 -32
  49. package/ai/_chat.scss +28 -3
  50. package/ai/_style.scss +55 -2
  51. package/ai/chat.d.ts +3 -1
  52. package/ai/components.d.ts +13 -2
  53. package/ai/index.d.ts +1 -0
  54. package/ai/index.js +3 -3
  55. package/ai/mount.d.ts +17 -1
  56. package/ai/results/_style.scss +83 -0
  57. package/ai/results/index.d.ts +11 -0
  58. package/ai/results/metrics.d.ts +5 -0
  59. package/ai/results/table.d.ts +5 -0
  60. package/ai/results/text.d.ts +5 -0
  61. package/ai/results/types.d.ts +29 -0
  62. package/ai/transcript.d.ts +2 -0
  63. package/ai/translations.d.ts +1 -1
  64. package/assignee/assignee.scss +5 -1
  65. package/assignee/index.js +2 -2
  66. package/avatar/index.d.ts +25 -2
  67. package/avatar/index.js +33 -32
  68. package/badge.view.d.ts +8 -0
  69. package/brush-range/component.d.ts +1 -3
  70. package/brush-range/component.js +27 -27
  71. package/buttons/remove-button.d.ts +1 -1
  72. package/buttons/remove-button.style.scss +1 -1
  73. package/buttons/svg-button.d.ts +1 -1
  74. package/buttons/svg-button.js +16 -16
  75. package/calendar/_calendar.scss +2 -2
  76. package/calendar/calendar.js +1 -1
  77. package/calendar/index.js +2 -2
  78. package/checkbox/checkbox.scss +1 -22
  79. package/choice-chips/index.d.ts +3 -1
  80. package/choice-chips/index.js +1 -1
  81. package/color-palette/color-palette.js +1 -1
  82. package/color-palette/color-palette.style.scss +1 -1
  83. package/color-palette/color-picker.js +2 -2
  84. package/color-palette/common-palettes.d.ts +1 -1
  85. package/color-palette/common-palettes.js +1 -1
  86. package/color-palette/native.d.ts +15 -2
  87. package/component-catalog.d.ts +9 -7
  88. package/configurator-actions.d.ts +67 -0
  89. package/configurator-actions.js +1 -0
  90. package/configurator-aggregation-list.d.ts +14 -0
  91. package/configurator-aggregation-list.js +61 -0
  92. package/configurator-drop-zone.d.ts +38 -0
  93. package/configurator-drop-zone.js +64 -0
  94. package/configurator-field-icon.d.ts +10 -0
  95. package/configurator-field-icon.js +1 -0
  96. package/configurator-focus.d.ts +4 -0
  97. package/configurator-focus.js +39 -0
  98. package/configurator-sections.d.ts +42 -0
  99. package/configurator-sections.js +71 -0
  100. package/control-presentation.d.ts +8 -2
  101. package/control-presentation.js +25 -20
  102. package/controls.d.ts +1 -2
  103. package/controls.js +4 -3
  104. package/core/editor-popup-position.d.ts +6 -2
  105. package/core/editor-popup.d.ts +4 -0
  106. package/core/editor-popup.js +1 -1
  107. package/core/popover-controller.d.ts +35 -0
  108. package/core/popup-ownership.d.ts +2 -0
  109. package/core/title-tooltip.d.ts +2 -0
  110. package/core/tooltip-session.d.ts +29 -0
  111. package/core/tooltip-surface.d.ts +13 -0
  112. package/core/tooltip-text.d.ts +6 -0
  113. package/core/tooltip.d.ts +35 -0
  114. package/core/top-layer-popup.d.ts +4 -0
  115. package/core/top-layer-popup.js +1 -23
  116. package/date-time/attach.d.ts +1 -1
  117. package/date-time/field.d.ts +3 -2
  118. package/date-time/index.js +1 -1
  119. package/date-time/style.scss +64 -7
  120. package/date-time/time-selection.d.ts +3 -1
  121. package/date-time/types.d.ts +5 -1
  122. package/dialog/dialog-action-footer.d.ts +17 -2
  123. package/dialog/dialog.dom.d.ts +15 -2
  124. package/dialog/dialog.dom.js +9 -9
  125. package/dialog/dialog.parts.d.ts +1 -1
  126. package/dialog/dialog.parts.js +1 -1
  127. package/distribution-chart/_distribution-chart.scss +12 -54
  128. package/distribution-chart/area-chart.js +1 -1
  129. package/distribution-chart/bar-chart.js +1 -1
  130. package/distribution-chart/index.d.ts +1 -1
  131. package/distribution-chart/line-chart.js +1 -1
  132. package/dropdown/content.js +1 -1
  133. package/dropdown/control.js +1 -1
  134. package/dropdown/editor-dropdown.style.scss +5 -0
  135. package/dropdown/index.js +2 -2
  136. package/dropdown/lookup-field.d.ts +5 -0
  137. package/dropdown/lookup-field.js +2 -1
  138. package/dropdown/popup.d.ts +2 -2
  139. package/dropdown/popup.js +1 -1
  140. package/duration/index.js +1 -1
  141. package/editor-actions.js +1 -1
  142. package/field-configurator.d.ts +27 -0
  143. package/field-configurator.js +4 -170
  144. package/field-expansion.d.ts +9 -0
  145. package/filter/filters/slider/_slider.scss +8 -25
  146. package/filter/filters/slider/control.js +2 -0
  147. package/filter/filters/slider/runtime.js +49 -22
  148. package/filter/filters/slider/single.js +1 -1
  149. package/filter-badge.js +1 -1
  150. package/filter-controls.d.ts +0 -1
  151. package/filter-controls.js +5 -6
  152. package/form-controls/index.d.ts +10 -2
  153. package/form-controls/index.js +7 -7
  154. package/form-controls/presentation.js +12 -12
  155. package/formatting/index.d.ts +1 -1
  156. package/formatting/index.js +22 -21
  157. package/formatting/styles.scss +2 -47
  158. package/framework.js +226 -222
  159. package/history-controls.js +27 -1
  160. package/icon-toolbar.d.ts +62 -0
  161. package/icon-toolbar.js +1 -0
  162. package/masked-input/index.js +1 -1
  163. package/native-control.d.ts +1 -2
  164. package/native-control.js +1 -1
  165. package/native-controls.d.ts +54 -2
  166. package/native-styles.css +1 -1
  167. package/native.js +46 -43
  168. package/number-input/index.js +1 -1
  169. package/package.json +36 -1
  170. package/pagination.js +11 -11
  171. package/pdf-viewer/index.js +1 -1
  172. package/pickers.d.ts +5 -1
  173. package/preact-mount.js +1 -1
  174. package/preact.d.ts +8 -6
  175. package/preact.js +71 -64
  176. package/rating-choice.js +1 -1
  177. package/react-control.d.ts +2 -0
  178. package/react-control.js +2 -2
  179. package/react.d.ts +5 -6
  180. package/react.js +68 -66
  181. package/reorder-list.js +1 -1
  182. package/resource-picker/resource-picker-popup.js +1 -1
  183. package/resource-picker/resource-picker.js +4 -4
  184. package/rich-text/engine.d.ts +1 -0
  185. package/rich-text/format-html.d.ts +2 -0
  186. package/rich-text/index.d.ts +4 -0
  187. package/rich-text/index.js +1 -1
  188. package/rich-text/model.d.ts +2 -0
  189. package/rich-text/style.scss +165 -70
  190. package/rich-text/syntax.d.ts +5 -0
  191. package/rich-text/translations.d.ts +2 -0
  192. package/search-input/index.js +1 -1
  193. package/search-input/native.d.ts +21 -2
  194. package/select.d.ts +3 -1
  195. package/select.js +1 -1
  196. package/status-feedback/exit-snapshot.js +4 -4
  197. package/status-feedback/popover.js +4 -4
  198. package/styles/_alert.scss +18 -4
  199. package/styles/_compositions.scss +3 -3
  200. package/styles/_editor-slider.scss +0 -2
  201. package/styles/_field-configurator.scss +147 -0
  202. package/styles/_fields-grid.scss +37 -0
  203. package/styles/_palette.scss +0 -24
  204. package/styles/_primitives.scss +28 -19
  205. package/styles/configurator-actions.scss +141 -0
  206. package/styles/{legacy-pagination.css → pagination.css} +19 -2
  207. package/styles.css +1 -1
  208. package/styles.scss +2 -2
  209. package/surfaces.d.ts +36 -2
  210. package/surfaces.js +35 -132
  211. package/svelte.js +3 -3
  212. package/switch/index.js +15 -14
  213. package/time-grid.d.ts +0 -1
  214. package/time-grid.js +38 -37
  215. package/timeline-track/index.js +2 -2
  216. package/ui.css +1 -1
  217. package/vue.d.ts +26 -30
  218. package/vue.js +117 -121
  219. package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
  220. package/_chunks/choice-chips-CHQTUdLs.js +0 -110
  221. package/_chunks/color-picker-CudqPYZo.js +0 -138
  222. package/_chunks/control-tooltip-uscKfAnV.js +0 -100
  223. package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
  224. package/_chunks/editor-popup-WDdtVDNA.js +0 -81
  225. package/_chunks/history-controls-B3u3INEK.js +0 -27
  226. package/_chunks/mount-DQ1cpppK.js +0 -257
  227. package/_chunks/native-control-C_yok8_-.js +0 -605
  228. package/_chunks/request-trail-DSlFix6i.js +0 -618
  229. package/_chunks/rich-text-CH7gIqOS.js +0 -636
  230. package/avatar/index.view.d.ts +0 -25
  231. package/color-palette/native.view.d.ts +0 -15
  232. package/control-presentation.view.d.ts +0 -8
  233. package/dialog/dialog-action-footer.view.d.ts +0 -20
  234. package/dialog/dialog.dom.view.d.ts +0 -15
  235. package/form-controls/index.view.d.ts +0 -10
  236. package/formatting/control-tooltip.d.ts +0 -27
  237. package/native-controls.view.d.ts +0 -54
  238. package/search-input/native.view.d.ts +0 -21
  239. package/surfaces.view.d.ts +0 -63
  240. /package/styles/{legacy-rating.css → rating.css} +0 -0
@@ -0,0 +1,753 @@
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-pFMuHf3G.js";
8
+ import { RemoveButton as p } from "../buttons/remove-button.js";
9
+ import { t as m } from "./chevron-down-GbplLa6s.js";
10
+ import { E as h, a as g, c as _, j as v, p as y, t as b } from "./controls-FUU-MUKC.js";
11
+ import { t as x } from "./tooltip-text-BXsUEmBH.js";
12
+ import { t as S } from "./clock-BOhPNlW3.js";
13
+ import { t as C } from "./arrow-up-Cw8hW9vp.js";
14
+ //#region src/ai/translations.ts
15
+ var w = /* @__PURE__ */ "AI chat,No results,Clear chat,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,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 T(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 E = n({});
22
+ function D({ translations: e, children: t }) {
23
+ return /* @__PURE__ */ c(E.Provider, {
24
+ value: e,
25
+ children: t
26
+ });
27
+ }
28
+ function O(e) {
29
+ let t = o(E), n = e ?? t;
30
+ return (e, t) => T(e, n, t);
31
+ }
32
+ //#endregion
33
+ //#region src/ai/results/types.ts
34
+ function k(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 A({ result: e }) {
40
+ let t = O();
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: k(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 j({ 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: k(e.value) })] }, t))
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ //#endregion
90
+ //#region src/ai/results/text.tsx
91
+ function M({ 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 N({ result: e, renderTable: t }) {
111
+ switch (e.kind) {
112
+ case "table": return t ? t(e) : /* @__PURE__ */ c(A, { result: e });
113
+ case "metrics": return /* @__PURE__ */ c(j, { result: e });
114
+ case "text": return /* @__PURE__ */ c(M, { 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 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 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>", F = "<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>", I = "<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 L(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 R = 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
+ }, z = "<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 B({ 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: h, hint: g = "", actions: _, footer: b, textareaProps: x }) {
153
+ let S = O(e), w = s(l("ai-prompt")), T = s(!1), E = s(new R()), D = s();
154
+ a(() => {
155
+ if (!D.current) return;
156
+ let { element: e, position: t } = D.current;
157
+ e.setSelectionRange(t, t), D.current = void 0;
158
+ });
159
+ let k = `${w.current}-hint`, A = !!g && !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: S(d)
172
+ }), /* @__PURE__ */ c("div", {
173
+ class: "rv-ai-prompt-composer",
174
+ children: [
175
+ /* @__PURE__ */ c(v, {
176
+ rows: 1,
177
+ ...x,
178
+ id: w.current,
179
+ "aria-describedby": A ? k : void 0,
180
+ value: t,
181
+ onValueChange: (e) => {
182
+ E.current.reset(), D.current = void 0, n(e);
183
+ },
184
+ placeholder: S(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 (h && !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 = E.current.move(t, e.key === "ArrowUp" ? "up" : "down", L(h));
197
+ if (i !== void 0) {
198
+ if (e.preventDefault(), i === t) return;
199
+ D.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: [_, A && /* @__PURE__ */ c("span", {
218
+ id: k,
219
+ class: "rv-ai-prompt-hint",
220
+ children: S(g)
221
+ })]
222
+ }), /* @__PURE__ */ c(y, {
223
+ className: "rv-ai-prompt-submit",
224
+ type: j ? "button" : "submit",
225
+ label: S(j ? m : p),
226
+ icon: j ? z : C,
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 V({ translations: e, items: t, onSelect: n, disabled: r, label: i = "Suggested requests" }) {
241
+ let a = O(e);
242
+ if (!t.length) return null;
243
+ let o = 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": a(i),
251
+ children: [o.slice(0, 3).map((e, t) => /* @__PURE__ */ c(b, {
252
+ className: "rv-ai-suggestion",
253
+ size: "compact",
254
+ disabled: r,
255
+ onClick: () => n(e.prompt),
256
+ children: e.label
257
+ }, `${t}:${e.prompt}`)), o.length > 3 && /* @__PURE__ */ c(f, {
258
+ className: "rv-ai-examples",
259
+ source: o.slice(3).map((e) => ({
260
+ value: e.prompt,
261
+ label: e.label
262
+ })),
263
+ disabled: r,
264
+ placeholder: a("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: { ariaLabel: a("More") },
270
+ onChange: (e) => {
271
+ typeof e == "string" && n(e);
272
+ }
273
+ })]
274
+ });
275
+ }
276
+ function H({ translations: e, phase: t, message: n }) {
277
+ let r = O(e);
278
+ return /* @__PURE__ */ c("div", {
279
+ class: "rv-ai-status",
280
+ "data-state": t,
281
+ role: "status",
282
+ "aria-live": "polite",
283
+ "aria-atomic": "true",
284
+ children: [(t === "understanding" || t === "applying") && /* @__PURE__ */ c("span", {
285
+ "aria-hidden": "true",
286
+ children: /* @__PURE__ */ c(h, { label: "" })
287
+ }), /* @__PURE__ */ c("span", { children: r(n) })]
288
+ });
289
+ }
290
+ function U({ translations: e, summary: t, matchedRows: n, countLabel: r, actions: i, children: a }) {
291
+ let o = O(e);
292
+ return /* @__PURE__ */ c("div", {
293
+ class: "rv-ai-result",
294
+ role: "status",
295
+ "aria-live": "polite",
296
+ children: [
297
+ /* @__PURE__ */ c("p", {
298
+ class: "rv-ai-result-summary",
299
+ children: t
300
+ }),
301
+ n !== void 0 && /* @__PURE__ */ c("p", {
302
+ class: "rv-ai-result-count",
303
+ children: r ? r(n) : o("{count} matching rows", { count: n.toLocaleString() })
304
+ }),
305
+ a,
306
+ i && /* @__PURE__ */ c("div", {
307
+ class: "rv-ai-result-actions",
308
+ children: i
309
+ })
310
+ ]
311
+ });
312
+ }
313
+ function W({ layout: e = "flow", translations: t = {}, label: n = "AI view assistant", children: r, footer: i, busy: a }) {
314
+ return /* @__PURE__ */ c(D, {
315
+ translations: t,
316
+ children: /* @__PURE__ */ c("section", {
317
+ class: `rv-ai-assistant${e === "fill" ? " rv-ai-assistant--fill" : ""}`,
318
+ "aria-label": ((e) => T(e, t))(n),
319
+ "aria-busy": a || void 0,
320
+ onKeyDown: (e) => e.stopPropagation(),
321
+ onKeyUp: (e) => e.stopPropagation(),
322
+ children: [r, i && /* @__PURE__ */ c("div", {
323
+ class: "rv-ai-assistant-footer",
324
+ children: i
325
+ })]
326
+ })
327
+ });
328
+ }
329
+ function G({ translations: t, summary: n, details: i, changes: a, notice: o, disabled: l, onApply: u, onCancel: d }) {
330
+ let f = O(t), p = s(null);
331
+ return r(() => {
332
+ p.current?.focus();
333
+ }, []), /* @__PURE__ */ c("section", {
334
+ class: "rv-ai-change-preview",
335
+ "aria-label": f("Review changes"),
336
+ onKeyDown: (e) => {
337
+ e.key === "Escape" && !l && (e.preventDefault(), d());
338
+ },
339
+ children: /* @__PURE__ */ c(U, {
340
+ summary: n,
341
+ actions: /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ c(b, {
342
+ ref: p,
343
+ disabled: l,
344
+ onClick: u,
345
+ children: f("Apply changes")
346
+ }), /* @__PURE__ */ c(b, {
347
+ disabled: l,
348
+ variant: "ghost",
349
+ onClick: d,
350
+ children: f("Cancel changes")
351
+ })] }),
352
+ children: [o && /* @__PURE__ */ c("p", {
353
+ class: "rv-ai-preview-notice",
354
+ children: o
355
+ }), a?.length ? /* @__PURE__ */ c("div", {
356
+ class: "rv-ai-preview-changes",
357
+ role: "region",
358
+ "aria-label": f("Proposed changes"),
359
+ tabIndex: 0,
360
+ children: /* @__PURE__ */ c("table", { children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", { children: [
361
+ /* @__PURE__ */ c("th", {
362
+ scope: "col",
363
+ children: f("Change")
364
+ }),
365
+ /* @__PURE__ */ c("th", {
366
+ scope: "col",
367
+ children: f("Current")
368
+ }),
369
+ /* @__PURE__ */ c("th", {
370
+ scope: "col",
371
+ children: f("Proposed")
372
+ })
373
+ ] }) }), /* @__PURE__ */ c("tbody", { children: a.map((e, t) => /* @__PURE__ */ c("tr", { children: [
374
+ /* @__PURE__ */ c("th", {
375
+ scope: "row",
376
+ children: [e.item && /* @__PURE__ */ c("span", {
377
+ class: "rv-ai-preview-item",
378
+ children: e.item
379
+ }), e.label]
380
+ }),
381
+ /* @__PURE__ */ c("td", { children: e.before ?? "—" }),
382
+ /* @__PURE__ */ c("td", { children: e.after ?? "—" })
383
+ ] }, t)) })] })
384
+ }) : i && /* @__PURE__ */ c("pre", {
385
+ class: "rv-ai-result-details",
386
+ children: i
387
+ })]
388
+ })
389
+ });
390
+ }
391
+ //#endregion
392
+ //#region src/ai/chat.tsx
393
+ function K({ children: e, className: t = "", label: n = "AI chat", style: r, translations: i }) {
394
+ let a = O(i);
395
+ return /* @__PURE__ */ c("section", {
396
+ class: `rv-ai-chat ${t}`,
397
+ "aria-label": a(n),
398
+ style: r,
399
+ children: e
400
+ });
401
+ }
402
+ function q({ children: e, className: t = "", autoScroll: n = !0, busy: o = !1, label: l = "Conversation messages", jumpLabel: u = "Jump to latest", translations: d }) {
403
+ let f = O(d), p = s(null), m = s(null), h = s(n), [g, _] = i(!1), v = () => {
404
+ let e = p.current;
405
+ if (!e) return;
406
+ let t = e.scrollHeight - e.clientHeight - e.scrollTop <= 40;
407
+ h.current = t, _(!t);
408
+ }, b = () => {
409
+ let e = p.current;
410
+ e && (e.scrollTop = e.scrollHeight, h.current = !0, _(!1));
411
+ }, x = () => {
412
+ if (n && h.current) b();
413
+ else {
414
+ let e = p.current;
415
+ e && _(e.scrollHeight - e.clientHeight - e.scrollTop > 40);
416
+ }
417
+ };
418
+ return a(x, [e, n]), r(() => {
419
+ if (typeof ResizeObserver > "u") return;
420
+ let e = new ResizeObserver(x);
421
+ return p.current && e.observe(p.current), m.current && e.observe(m.current), () => e.disconnect();
422
+ }, [n]), /* @__PURE__ */ c("div", {
423
+ class: `rv-ai-chat-scroll ${t}`,
424
+ children: [/* @__PURE__ */ c("div", {
425
+ ref: p,
426
+ class: "rv-ai-chat-viewport",
427
+ role: "log",
428
+ "aria-label": f(l),
429
+ "aria-live": "polite",
430
+ "aria-relevant": "additions text",
431
+ "aria-busy": o || void 0,
432
+ tabIndex: 0,
433
+ onScroll: v,
434
+ children: /* @__PURE__ */ c("div", {
435
+ ref: m,
436
+ class: "rv-ai-chat-content",
437
+ children: e
438
+ })
439
+ }), g && /* @__PURE__ */ c(y, {
440
+ className: "rv-ai-chat-jump",
441
+ label: f(u),
442
+ 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>",
443
+ variant: "default",
444
+ size: "compact",
445
+ onClick: b
446
+ })]
447
+ });
448
+ }
449
+ function J({ title: e = "Start a conversation", description: t = "Ask a question to get started.", children: n, className: r = "", translations: i, renderContent: o }) {
450
+ let l = O(i), u = s(null);
451
+ return a(() => {
452
+ let e = u.current;
453
+ if (!e || !o) return;
454
+ let t = o(e);
455
+ return () => {
456
+ t?.(), e.replaceChildren();
457
+ };
458
+ }, [o]), /* @__PURE__ */ c("div", {
459
+ class: `rv-ai-chat-empty ${r}`,
460
+ children: [
461
+ e && /* @__PURE__ */ c("strong", { children: l(e) }),
462
+ t && /* @__PURE__ */ c("p", { children: l(t) }),
463
+ n,
464
+ o && /* @__PURE__ */ c("div", {
465
+ ref: u,
466
+ class: "rv-ai-chat-empty-slot"
467
+ })
468
+ ]
469
+ });
470
+ }
471
+ function Y(e) {
472
+ return /* @__PURE__ */ c("div", {
473
+ class: "rv-ai-chat-composer",
474
+ children: /* @__PURE__ */ c(B, {
475
+ label: "Message",
476
+ placeholder: "Type a message…",
477
+ ...e
478
+ })
479
+ });
480
+ }
481
+ function X({ from: e, label: t, isStreaming: n = !1, children: r, className: i = "", translations: a }) {
482
+ let o = O(a);
483
+ return /* @__PURE__ */ c("article", {
484
+ class: `rv-ai-message rv-ai-message--${e} ${i}`,
485
+ "aria-label": o(t ?? {
486
+ user: "You",
487
+ assistant: "Assistant",
488
+ system: "System"
489
+ }[e]),
490
+ "aria-busy": n || void 0,
491
+ "data-streaming": n || void 0,
492
+ children: r
493
+ });
494
+ }
495
+ function ee({ children: e, className: t = "" }) {
496
+ return /* @__PURE__ */ c("div", {
497
+ class: `rv-ai-message-content ${t}`,
498
+ children: e
499
+ });
500
+ }
501
+ function te({ children: e, className: t = "", label: n = "Message actions", translations: r }) {
502
+ let i = O(r);
503
+ return /* @__PURE__ */ c("div", {
504
+ class: `rv-ai-message-actions ${t}`,
505
+ role: "group",
506
+ "aria-label": i(n),
507
+ children: e
508
+ });
509
+ }
510
+ var Z = {
511
+ pending: "Pending",
512
+ running: "Running",
513
+ completed: "Completed",
514
+ error: "Failed",
515
+ cancelled: "Cancelled"
516
+ };
517
+ function Q({ status: e }) {
518
+ return /* @__PURE__ */ c("span", {
519
+ class: "rv-ai-task-icon",
520
+ "data-status": e,
521
+ "aria-hidden": "true",
522
+ children: e === "running" ? /* @__PURE__ */ c(h, { label: "" }) : /* @__PURE__ */ c(d, { svg: e === "completed" ? P : e === "error" ? F : e === "cancelled" ? I : S })
523
+ });
524
+ }
525
+ function $({ title: e, status: n = "completed", open: r, defaultOpen: a, onOpenChange: o, children: l, className: u = "", translations: f }) {
526
+ let p = O(f), [m, h] = i(a), g = r ?? m ?? n === "running", v = s({
527
+ expanded: g,
528
+ open: r,
529
+ onOpenChange: o
530
+ });
531
+ v.current = {
532
+ expanded: g,
533
+ open: r,
534
+ onOpenChange: o
535
+ };
536
+ let y = t(l).some((e) => typeof e != "string" || e.trim().length > 0), b = /* @__PURE__ */ c("span", {
537
+ class: "rv-ai-trace-heading",
538
+ children: [
539
+ /* @__PURE__ */ c(Q, { status: n }),
540
+ /* @__PURE__ */ c("span", { children: e }),
541
+ /* @__PURE__ */ c("span", {
542
+ class: "rv-visually-hidden",
543
+ children: p(Z[n])
544
+ }),
545
+ y && /* @__PURE__ */ c("span", {
546
+ class: "rv-ai-trace-chevron",
547
+ "aria-hidden": "true",
548
+ children: /* @__PURE__ */ c(d, {
549
+ 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>",
550
+ size: 8
551
+ })
552
+ })
553
+ ]
554
+ });
555
+ return y ? /* @__PURE__ */ c(_, {
556
+ className: `rv-ai-trace ${u}`,
557
+ open: g,
558
+ onToggle: (e) => {
559
+ let t = e.currentTarget.open, n = v.current;
560
+ t !== n.expanded && (n.open === void 0 ? h(t) : e.currentTarget.open = n.expanded, n.onOpenChange?.(t));
561
+ },
562
+ summary: b,
563
+ children: /* @__PURE__ */ c("div", {
564
+ class: "rv-ai-trace-content",
565
+ children: l
566
+ })
567
+ }) : /* @__PURE__ */ c("div", {
568
+ class: `rv-ai-trace rv-ai-trace-line ${u}`,
569
+ children: b
570
+ });
571
+ }
572
+ function ne(e) {
573
+ return /* @__PURE__ */ c($, { ...e });
574
+ }
575
+ function re({ status: e = "completed", children: t, className: n = "", translations: r }) {
576
+ let i = O(r);
577
+ return /* @__PURE__ */ c("div", {
578
+ class: `rv-ai-task-item ${n}`,
579
+ children: [
580
+ /* @__PURE__ */ c(Q, { status: e }),
581
+ /* @__PURE__ */ c("span", {
582
+ class: "rv-visually-hidden",
583
+ children: [i(Z[e]), ": "]
584
+ }),
585
+ /* @__PURE__ */ c("div", { children: t })
586
+ ]
587
+ });
588
+ }
589
+ function ie({ title: e, isStreaming: t = !1, duration: n, children: r, translations: i, ...a }) {
590
+ let o = O(i), s = typeof n == "number" && Number.isFinite(n) && n >= 0 ? ` · ${o("{seconds}s", { seconds: Math.round(n) })}` : "";
591
+ return /* @__PURE__ */ c($, {
592
+ ...a,
593
+ translations: i,
594
+ status: t ? "running" : "completed",
595
+ title: `${o(e ?? (t ? "Working…" : "Reasoning summary"))}${s}`,
596
+ children: r
597
+ });
598
+ }
599
+ //#endregion
600
+ //#region src/ai/request-trail.tsx
601
+ function ae({ translations: e, items: t, onRemove: n, onClear: r, onEmpty: o, disabled: f, removalsDisabled: h, label: _ = "View steps", triggerLabel: v, clearLabel: y = "Clear all", clearDescription: S, removeLabel: C, countLabel: w, changedMessage: T }) {
602
+ let E = O(e), D = w ?? ((e) => E(e === 1 ? "{count} applied request" : "{count} applied requests", { count: e })), k = C ?? ((e) => E("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;
603
+ a(() => {
604
+ if (I || F(!1), !P || !I || !A.current || !j.current || !M.current) return;
605
+ let e = M.current, t = new u(), n = !0;
606
+ return t.open({
607
+ anchor: j.current,
608
+ content: e,
609
+ appendTo: A.current,
610
+ onClose: () => {
611
+ n && F(!1);
612
+ }
613
+ }), e.focus({ preventScroll: !0 }), () => {
614
+ n = !1, t.destroy(), e.hidden = !0;
615
+ };
616
+ }, [P, I]);
617
+ let L = s();
618
+ if (a(() => {
619
+ let e = L.current;
620
+ if (!e) return;
621
+ if (f) {
622
+ e.sawBusy = !0;
623
+ return;
624
+ }
625
+ if (e.id ? t.some((t) => t.id === e.id) : t.length > 0) {
626
+ (e.sawBusy || e.id && h) && (L.current = void 0);
627
+ return;
628
+ }
629
+ L.current = void 0;
630
+ let n = e.button.ownerDocument.activeElement;
631
+ if (n !== e.button && n !== e.button.ownerDocument.body) return;
632
+ let r = A.current?.querySelectorAll(".rv-remove-button");
633
+ r?.length && P ? r[Math.min(e.index, r.length - 1)]?.focus() : t.length || o?.();
634
+ }, [
635
+ t,
636
+ o,
637
+ f,
638
+ h,
639
+ P
640
+ ]), !I) return null;
641
+ let R = 0, z = t.reduce((e, t) => e + (t.count ?? 1), 0);
642
+ return /* @__PURE__ */ c("div", {
643
+ class: "rv-ai-request-trail",
644
+ role: "group",
645
+ "aria-label": E(_),
646
+ ref: A,
647
+ onFocusOut: (e) => {
648
+ e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && F(!1);
649
+ },
650
+ children: [/* @__PURE__ */ c(b, {
651
+ ref: j,
652
+ className: "rv-ai-trail-trigger",
653
+ variant: "ghost",
654
+ size: "compact",
655
+ disabled: f,
656
+ "aria-haspopup": "dialog",
657
+ "aria-expanded": P,
658
+ "aria-controls": N,
659
+ onClick: () => F((e) => !e),
660
+ children: [v ? v(z) : E(z === 1 ? "{count} step" : "{count} steps", { count: z }), /* @__PURE__ */ c(d, {
661
+ svg: m,
662
+ size: 10
663
+ })]
664
+ }), /* @__PURE__ */ c("div", {
665
+ ref: M,
666
+ id: N,
667
+ class: "rv-popover rv-ai-trail-popover",
668
+ role: "dialog",
669
+ "aria-label": E(_),
670
+ tabIndex: -1,
671
+ hidden: !P,
672
+ children: [
673
+ /* @__PURE__ */ c("div", {
674
+ class: "rv-ai-trail-header",
675
+ children: /* @__PURE__ */ c("span", {
676
+ class: "rv-ai-trail-label",
677
+ children: [E(_), /* @__PURE__ */ c(g, {
678
+ count: z,
679
+ label: D(z)
680
+ })]
681
+ })
682
+ }),
683
+ /* @__PURE__ */ c("ol", {
684
+ class: "rv-ai-trail-steps",
685
+ "aria-label": D(z),
686
+ children: t.map((e, r) => {
687
+ let i = R + 1;
688
+ return R += e.count ?? 1, /* @__PURE__ */ c("li", {
689
+ class: "rv-ai-step",
690
+ "data-current": r === t.length - 1 || void 0,
691
+ onFocusCapture: (e) => e.currentTarget.scrollIntoView({
692
+ block: "nearest",
693
+ inline: "nearest"
694
+ }),
695
+ children: /* @__PURE__ */ c("span", {
696
+ class: "rv-ai-step-chip",
697
+ children: [
698
+ /* @__PURE__ */ c("span", {
699
+ class: "rv-ai-step-number",
700
+ "aria-hidden": "true",
701
+ children: i === R ? i : `${i}–${R}`
702
+ }),
703
+ /* @__PURE__ */ c(x, {
704
+ class: "rv-ai-step-label",
705
+ title: e.label,
706
+ children: e.label
707
+ }),
708
+ /* @__PURE__ */ c(p, {
709
+ compact: !0,
710
+ disabled: f || h,
711
+ locale: {
712
+ title: k(e),
713
+ ariaLabel: k(e)
714
+ },
715
+ onClick: (t) => {
716
+ t.preventDefault(), L.current = {
717
+ button: t.currentTarget,
718
+ index: r,
719
+ id: e.id
720
+ }, n(e.id);
721
+ }
722
+ })
723
+ ]
724
+ })
725
+ }, e.id);
726
+ })
727
+ }),
728
+ T && /* @__PURE__ */ c("p", {
729
+ class: "rv-ai-trail-message",
730
+ children: E(T)
731
+ }),
732
+ /* @__PURE__ */ c("div", {
733
+ class: "rv-ai-trail-footer",
734
+ children: /* @__PURE__ */ c(b, {
735
+ variant: "ghost",
736
+ size: "compact",
737
+ disabled: f,
738
+ title: S ? E(S) : void 0,
739
+ onClick: (e) => {
740
+ e.preventDefault(), L.current = {
741
+ button: e.currentTarget,
742
+ index: 0
743
+ }, r();
744
+ },
745
+ children: E(y)
746
+ })
747
+ })
748
+ ]
749
+ })]
750
+ });
751
+ }
752
+ //#endregion
753
+ export { k as C, T as E, A as S, w as T, V as _, J as a, M as b, ee as c, re as d, H as f, U as g, B as h, q as i, ie as l, G as m, K as n, X as o, W as p, Y as r, te as s, ae as t, ne as u, L as v, D as w, j as x, N as y };