@turquoisehealth/pit-viper 2.224.1-dev.2 → 2.224.1-dev.3

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 (63) hide show
  1. package/_site/assets/css/pit-viper-a11y.css +79 -1
  2. package/_site/assets/css/pit-viper-consumer.css +79 -1
  3. package/_site/assets/css/pit-viper-v2-scoped.css +68 -1
  4. package/_site/assets/css/pit-viper-v2.css +118 -1
  5. package/_site/assets/css/pit-viper.css +79 -1
  6. package/package.json +1 -1
  7. package/pv-components/dist/stats/vue/ai/stats.html +1 -1
  8. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  9. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  10. package/pv-components/dist/stats/web/pv-action-button-stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-filter-modal-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-filter-panel-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-hover-action-menu-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  16. package/pv-components/dist/stats/web/pv-popover-v2-stats.html +1 -1
  17. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  18. package/pv-components/dist/stats/web/pv-reasoning-stats.html +1 -1
  19. package/pv-components/dist/stats/web/pv-segmented-control-stats.html +1 -1
  20. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  21. package/pv-components/dist/stats/web/pv-sidebar-v2-stats.html +1 -1
  22. package/pv-components/dist/stats/web/pv-split-button-stats.html +1 -1
  23. package/pv-components/dist/stats/web/pv-step-list-stats.html +4950 -0
  24. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
  25. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
  26. package/pv-components/dist/vue/ai/components/ai/PvReasoning/PvReasoning.vue.d.ts +11 -3
  27. package/pv-components/dist/vue/ai/components/ai/PvReasoning/types.d.ts +3 -0
  28. package/pv-components/dist/vue/ai/components/ai/PvStepList/PvStepList.vue.d.ts +7 -0
  29. package/pv-components/dist/vue/ai/components/ai/PvStepList/types.d.ts +42 -0
  30. package/pv-components/dist/vue/ai/components/ai/index.d.ts +2 -0
  31. package/pv-components/dist/vue/ai/components/base/PvQueryBuilderInput/PvQueryBuilderInput.vue.d.ts +4 -0
  32. package/pv-components/dist/vue/ai/components/base/PvSidebarV2/PvSidebarV2.vue.d.ts +3 -1
  33. package/pv-components/dist/vue/ai/components/base/PvSidebarV2/types.d.ts +2 -0
  34. package/pv-components/dist/vue/ai/pv-components-ai.mjs +490 -327
  35. package/pv-components/dist/vue/ai/pv-components-ai.mjs.map +1 -1
  36. package/pv-components/dist/vue/base/components/base/PvQueryBuilderInput/PvQueryBuilderInput.vue.d.ts +4 -0
  37. package/pv-components/dist/vue/base/components/base/PvSidebarV2/PvSidebarV2.vue.d.ts +3 -1
  38. package/pv-components/dist/vue/base/components/base/PvSidebarV2/types.d.ts +2 -0
  39. package/pv-components/dist/vue/base/pv-components-base.mjs +1091 -983
  40. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  41. package/pv-components/dist/vue/visualizations/components/base/PvQueryBuilderInput/PvQueryBuilderInput.vue.d.ts +4 -0
  42. package/pv-components/dist/vue/visualizations/components/base/PvSidebarV2/PvSidebarV2.vue.d.ts +3 -1
  43. package/pv-components/dist/vue/visualizations/components/base/PvSidebarV2/types.d.ts +2 -0
  44. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +13 -8
  45. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  46. package/pv-components/dist/web/components/pv-action-button/pv-action-button.js +8 -4
  47. package/pv-components/dist/web/components/pv-filter-modal/pv-filter-modal.js +8 -4
  48. package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +8 -4
  49. package/pv-components/dist/web/components/pv-hover-action-menu/pv-hover-action-menu.js +197 -193
  50. package/pv-components/dist/web/components/pv-menu/pv-menu.js +8 -4
  51. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +8 -4
  52. package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +8 -4
  53. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +16 -8
  54. package/pv-components/dist/web/components/pv-reasoning/pv-reasoning.js +640 -466
  55. package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +230 -226
  56. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +8 -4
  57. package/pv-components/dist/web/components/pv-sidebar-v2/pv-sidebar-v2.js +1431 -1322
  58. package/pv-components/dist/web/components/pv-split-button/pv-split-button.js +213 -209
  59. package/pv-components/dist/web/components/pv-step-list/pv-step-list.js +6309 -0
  60. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +8 -4
  61. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +8 -4
  62. package/pv-components/dist/web/pv-components.iife.js +39 -39
  63. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
@@ -1,8 +1,8 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.pv-badge-md[data-v-013a5d76]{--inset-size:2px 2px;min-width:20px;min-height:20px;max-height:20px;font-weight:500}.pv-badge-sm[data-v-013a5d76]{--inset-size:0 2px;min-width:16px;min-height:16px;max-height:16px;font-weight:500}.input-icon-position{pointer-events:none;position:absolute;top:8px;left:12px}.pv-question[data-v-38f26601]{--card-radius:.75rem;box-shadow:0 4px 16px #00000029}.pv-question__listbox[data-v-38f26601]:focus-visible{outline:2px solid var(--color-border-accent,#36c5ba);outline-offset:2px;border-radius:.5rem}.pv-question__option[data-v-38f26601],.pv-question__chat[data-v-38f26601]{cursor:pointer;min-width:0}.pv-question__option[data-active][data-v-38f26601],.pv-question__chat[data-active][data-v-38f26601]{background-color:var(--card-hover-background-color,#e8f2f4)}.pv-question__option[data-v-38f26601]:active,.pv-question__chat[data-v-38f26601]:active{background-color:var(--card-pressed-background-color,#c7d8db)}.pv-question__chevron[data-v-38f26601]{visibility:hidden;margin-inline-start:auto}.pv-question__option[data-active] .pv-question__chevron[data-v-38f26601],.pv-question__chat[data-active] .pv-question__chevron[data-v-38f26601]{visibility:visible}.pv-question__check[data-v-38f26601]{margin-inline-start:auto}.pv-question__option[aria-selected=true] .pv-question__chevron[data-v-38f26601]{display:none}.pv-question__chat-badge[data-v-38f26601]{--flex-gap:0;background-color:#e0e5e4;flex:0 0 1rem;justify-content:center;height:1rem}.pv-question__chat-input[data-v-38f26601] .pv-input-text{min-width:0}.pv-confirmation__actions[data-v-c200deca]{--flex-justify:flex-end}.pv-prompt-input[data-v-155361b4]{--flex-align:stretch;cursor:text;transition-property:border-color,box-shadow;transition-duration:.125s}.pv-prompt-input[data-v-155361b4]:hover{border-color:var(--text-input-hover-border-color,#d2d8dc);box-shadow:0 .25px 3px #0003}.pv-prompt-input[data-v-155361b4]:focus-within{border-color:var(--text-input-focus-border-color,#36c5ba)}.pv-prompt-input__textarea[data-v-155361b4]{--flex-align:stretch;width:100%}.pv-prompt-input__textarea[data-v-155361b4] textarea{field-sizing:content;max-height:var(--prompt-input-max-height);resize:none;background-color:#0000;border:0;width:100%;min-width:0;padding:0;overflow-y:auto}.pv-prompt-input__textarea[data-v-155361b4] textarea:focus,.pv-prompt-input__textarea[data-v-155361b4] textarea:focus-visible{outline:none}.pv-prompt-input__footer[data-v-155361b4]{--flex-justify:space-between}.pv-prompt-input__actions[data-v-155361b4]{min-width:0}summary[data-v-a64056ef]{background-image:none;padding-right:2px}.pv-reasoning__content[data-v-6111e5ae]{white-space:pre-wrap;padding:8px 0 8px 24px}.pv-tool__disclosure-content[data-v-a5e28b1a]{padding:0 12px 12px}.pv-tool__heading[data-v-a5e28b1a]{min-width:0}.pv-tool__content[data-v-a5e28b1a]{padding-top:12px}pre[data-v-a5e28b1a]{white-space:pre-wrap;word-break:break-word;max-width:100%;margin:0;overflow-x:auto}
2
- /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, getCurrentInstance as l, mergeModels as u, mergeProps as d, nextTick as f, normalizeClass as p, normalizeStyle as m, onBeforeUnmount as h, onScopeDispose as g, openBlock as _, ref as v, renderList as y, renderSlot as b, toDisplayString as x, useId as ee, useModel as S, vModelDynamic as C, vModelText as w, watch as T, withCtx as E, withDirectives as D, withKeys as te, withModifiers as O } from "vue";
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.pv-badge-md[data-v-013a5d76]{--inset-size:2px 2px;min-width:20px;min-height:20px;max-height:20px;font-weight:500}.pv-badge-sm[data-v-013a5d76]{--inset-size:0 2px;min-width:16px;min-height:16px;max-height:16px;font-weight:500}.input-icon-position{pointer-events:none;position:absolute;top:8px;left:12px}.pv-question[data-v-38f26601]{--card-radius:.75rem;box-shadow:0 4px 16px #00000029}.pv-question__listbox[data-v-38f26601]:focus-visible{outline:2px solid var(--color-border-accent,#36c5ba);outline-offset:2px;border-radius:.5rem}.pv-question__option[data-v-38f26601],.pv-question__chat[data-v-38f26601]{cursor:pointer;min-width:0}.pv-question__option[data-active][data-v-38f26601],.pv-question__chat[data-active][data-v-38f26601]{background-color:var(--card-hover-background-color,#e8f2f4)}.pv-question__option[data-v-38f26601]:active,.pv-question__chat[data-v-38f26601]:active{background-color:var(--card-pressed-background-color,#c7d8db)}.pv-question__chevron[data-v-38f26601]{visibility:hidden;margin-inline-start:auto}.pv-question__option[data-active] .pv-question__chevron[data-v-38f26601],.pv-question__chat[data-active] .pv-question__chevron[data-v-38f26601]{visibility:visible}.pv-question__check[data-v-38f26601]{margin-inline-start:auto}.pv-question__option[aria-selected=true] .pv-question__chevron[data-v-38f26601]{display:none}.pv-question__chat-badge[data-v-38f26601]{--flex-gap:0;background-color:#e0e5e4;flex:0 0 1rem;justify-content:center;height:1rem}.pv-question__chat-input[data-v-38f26601] .pv-input-text{min-width:0}.pv-confirmation__actions[data-v-c200deca]{--flex-justify:flex-end}.pv-prompt-input[data-v-155361b4]{--flex-align:stretch;cursor:text;transition-property:border-color,box-shadow;transition-duration:.125s}.pv-prompt-input[data-v-155361b4]:hover{border-color:var(--text-input-hover-border-color,#d2d8dc);box-shadow:0 .25px 3px #0003}.pv-prompt-input[data-v-155361b4]:focus-within{border-color:var(--text-input-focus-border-color,#36c5ba)}.pv-prompt-input__textarea[data-v-155361b4]{--flex-align:stretch;width:100%}.pv-prompt-input__textarea[data-v-155361b4] textarea{field-sizing:content;max-height:var(--prompt-input-max-height);resize:none;background-color:#0000;border:0;width:100%;min-width:0;padding:0;overflow-y:auto}.pv-prompt-input__textarea[data-v-155361b4] textarea:focus,.pv-prompt-input__textarea[data-v-155361b4] textarea:focus-visible{outline:none}.pv-prompt-input__footer[data-v-155361b4]{--flex-justify:space-between}.pv-prompt-input__actions[data-v-155361b4]{min-width:0}summary[data-v-a64056ef]{background-image:none;padding-right:2px}.pv-step-aside[data-v-5ab7d271]{white-space:pre-line}.pv-step-enter-active[data-v-5ab7d271]{transition-property:opacity,transform;transition-duration:.32s;transition-timing-function:ease}.pv-step-enter-from[data-v-5ab7d271]{opacity:0;transform:translateY(6px)}.pv-reasoning[data-v-91e8312e]{--accordion-background-color:var(--reasoning-background-color,transparent);--accordion-summary-background-color:var(--reasoning-trigger-background-color,transparent);--accordion-summary-hover-background-color:var(--reasoning-trigger-background-color,transparent);--accordion-summary-pressed-background-color:var(--reasoning-trigger-background-color,transparent);--accordion-arrow-left-summary-padding:var(--reasoning-trigger-padding,4px 4px 4px 0);--accordion-arrow-right-summary-padding:var(--reasoning-trigger-padding,4px 4px 4px 0);--accordion-content-padding:0}.pv-reasoning__trigger .pv-shimmer[data-v-91e8312e]{--shimmer-rgb:var(--reasoning-shimmer-rgb,247, 248, 248)}.pv-reasoning__standalone[data-v-91e8312e]{padding:var(--reasoning-trigger-padding,4px 4px 4px 0);margin-inline-start:calc(1rem + var(--flex-gap,.5rem))}.pv-reasoning__content[data-v-91e8312e]{white-space:pre-wrap;padding:8px 0 8px 20px}.pv-reasoning__content[data-v-91e8312e] :where(ol,ul,dl,table,figure){white-space:normal}.pv-tool__disclosure-content[data-v-a5e28b1a]{padding:0 12px 12px}.pv-tool__heading[data-v-a5e28b1a]{min-width:0}.pv-tool__content[data-v-a5e28b1a]{padding-top:12px}pre[data-v-a5e28b1a]{white-space:pre-wrap;word-break:break-word;max-width:100%;margin:0;overflow-x:auto}
2
+ /*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();import { Comment as e, Fragment as t, Text as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, getCurrentInstance as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onBeforeUpdate as y, onMounted as b, onScopeDispose as x, openBlock as S, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useId as O, useModel as k, useSlots as A, useTemplateRef as j, vModelDynamic as M, vModelText as N, watch as P, withCtx as F, withDirectives as I, withKeys as ee, withModifiers as L } from "vue";
3
3
  //#endregion
4
4
  //#region src/components/base/PvSpinner/PvSpinner.vue
5
- var k = /* @__PURE__ */ c({
5
+ var R = /* @__PURE__ */ d({
6
6
  __name: "PvSpinner",
7
7
  props: {
8
8
  size: { default: "lg" },
@@ -20,26 +20,26 @@ var k = /* @__PURE__ */ c({
20
20
  dark: "pv-spinner-dark",
21
21
  white: "pv-spinner-light"
22
22
  };
23
- return (r, a) => (_(), i("div", {
23
+ return (r, i) => (S(), s("div", {
24
24
  "data-testid": "pv-spinner",
25
- class: p(n[e.variant]),
26
- style: m({ "--size": t[e.size] })
25
+ class: g(n[e.variant]),
26
+ style: _({ "--size": t[e.size] })
27
27
  }, null, 6));
28
28
  }
29
- }), A = ["ghost"], j = {
29
+ }), z = ["ghost"], B = {
30
30
  md: "pv-button-small",
31
31
  lg: void 0,
32
32
  xl: "pv-button-large"
33
- }, M = (e) => e == null || !j.hasOwnProperty(e) ? null : j[e] || null;
33
+ }, V = (e) => e == null || !B.hasOwnProperty(e) ? null : B[e] || null;
34
34
  //#endregion
35
35
  //#region src/web-components/utils.ts
36
- function N() {
37
- let e = v(!1), t = l()?.root || {};
36
+ function H() {
37
+ let e = C(!1), t = f()?.root || {};
38
38
  return "isCE" in t && t.isCE === !0 && (e.value = !0), e;
39
39
  }
40
40
  //#endregion
41
41
  //#region src/components/base/baseProps.ts
42
- var P = [
42
+ var te = [
43
43
  void 0,
44
44
  10,
45
45
  12,
@@ -47,24 +47,24 @@ var P = [
47
47
  24,
48
48
  32,
49
49
  64
50
- ], F = ["xlink:href"], I = /* @__PURE__ */ c({
50
+ ], ne = ["xlink:href"], U = /* @__PURE__ */ d({
51
51
  __name: "PvIcon",
52
52
  props: {
53
53
  name: {},
54
54
  size: {}
55
55
  },
56
56
  setup(e) {
57
- let n = e, r = N(), o = v(null), s = t(() => ({
57
+ let t = e, n = H(), r = C(null), a = i(() => ({
58
58
  "pv-icon": !0,
59
- [`pv-icon-${n.size}`]: n.size != null && P.includes(n.size)
60
- })), c = t(() => r.value && o.value ? `${o.value}#${n.name}` : `#${n.name}`);
61
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (e, t) => (_(), i("svg", {
59
+ [`pv-icon-${t.size}`]: t.size != null && te.includes(t.size)
60
+ })), o = i(() => n.value && r.value ? `${r.value}#${t.name}` : `#${t.name}`);
61
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (e, t) => (S(), s("svg", {
62
62
  "data-testid": "pv-icon",
63
63
  "aria-hidden": "true",
64
- class: p(s.value)
65
- }, [a("use", { "xlink:href": c.value }, null, 8, F)], 2));
64
+ class: g(a.value)
65
+ }, [c("use", { "xlink:href": o.value }, null, 8, ne)], 2));
66
66
  }
67
- }), L = /* @__PURE__ */ c({
67
+ }), re = /* @__PURE__ */ d({
68
68
  __name: "PvCounterBadge",
69
69
  props: {
70
70
  maxValue: { default: 99 },
@@ -74,29 +74,29 @@ var P = [
74
74
  variant: { default: "primary" }
75
75
  },
76
76
  setup(e) {
77
- let n = e, r = t(() => n.maxValue && n.value && n.value > n.maxValue ? `${n.maxValue}+` : n.value == null ? "-" : `${n.prefix}${n.value}`), a = t(() => ({
77
+ let t = e, n = i(() => t.maxValue && t.value && t.value > t.maxValue ? `${t.maxValue}+` : t.value == null ? "-" : `${t.prefix}${t.value}`), r = i(() => ({
78
78
  "pv-inline-block pv-inset-square pv-radius pv-text-center": !0,
79
- "pv-badge-md pv-text-body-md": n.size == "md",
80
- "pv-badge-sm pv-text-body-sm": n.size == "sm",
81
- "pv-surface-brand-inverse pv-text-inverse": n.variant == "primary",
82
- "pv-badge-secondary": n.variant == "secondary",
83
- "pv-surface-lighten-5": n.variant == "tertiary",
84
- "pv-text-tertiary": n.variant == "ghost" || n.variant == "tertiary",
85
- "pv-surface": n.variant == "ghost"
79
+ "pv-badge-md pv-text-body-md": t.size == "md",
80
+ "pv-badge-sm pv-text-body-sm": t.size == "sm",
81
+ "pv-surface-brand-inverse pv-text-inverse": t.variant == "primary",
82
+ "pv-badge-secondary": t.variant == "secondary",
83
+ "pv-surface-lighten-5": t.variant == "tertiary",
84
+ "pv-text-tertiary": t.variant == "ghost" || t.variant == "tertiary",
85
+ "pv-surface": t.variant == "ghost"
86
86
  }));
87
- return (e, t) => (_(), i("div", {
88
- class: p(a.value),
87
+ return (e, t) => (S(), s("div", {
88
+ class: g(r.value),
89
89
  "data-testid": "pv-counter-badge"
90
- }, x(r.value), 3));
90
+ }, E(n.value), 3));
91
91
  }
92
- }), R = (e, t) => {
92
+ }), W = (e, t) => {
93
93
  let n = e.__vccOpts || e;
94
94
  for (let [e, r] of t) n[e] = r;
95
95
  return n;
96
- }, z = /* @__PURE__ */ R(L, [["__scopeId", "data-v-013a5d76"]]), B = ["disabled", "aria-label"], V = {
96
+ }, G = /* @__PURE__ */ W(re, [["__scopeId", "data-v-013a5d76"]]), ie = ["disabled", "aria-label"], ae = {
97
97
  key: 2,
98
98
  "data-testid": "pv-button-label"
99
- }, H = /* @__PURE__ */ c({
99
+ }, K = /* @__PURE__ */ d({
100
100
  __name: "PvButton",
101
101
  props: {
102
102
  variant: { default: "primary" },
@@ -120,60 +120,60 @@ var P = [
120
120
  rightCounterBadge: {},
121
121
  ariaLabel: {}
122
122
  },
123
- setup(a) {
124
- let o = a, s = t(() => !o.label || o.loading ? o.label || o.ariaLabel : void 0), c = t(() => {
123
+ setup(e) {
124
+ let n = e, r = i(() => !n.label || n.loading ? n.label || n.ariaLabel : void 0), c = i(() => {
125
125
  let e = [];
126
- o.inverse && A.includes(o.variant) ? e.push(`pv-button-${o.variant}-inverse`) : e.push(`pv-button-${o.variant}`);
127
- let t = M(o.size);
126
+ n.inverse && z.includes(n.variant) ? e.push(`pv-button-${n.variant}-inverse`) : e.push(`pv-button-${n.variant}`);
127
+ let t = V(n.size);
128
128
  return t && e.push(t), e;
129
129
  });
130
- return (t, o) => (_(), i("button", {
130
+ return (n, i) => (S(), s("button", {
131
131
  type: "button",
132
- class: p(c.value),
133
- disabled: a.disabled,
134
- "aria-label": s.value,
132
+ class: g(c.value),
133
+ disabled: e.disabled,
134
+ "aria-label": r.value,
135
135
  "data-testid": "pv-button"
136
- }, [a.loading ? (_(), n(k, {
136
+ }, [e.loading ? (S(), a(R, {
137
137
  key: 0,
138
138
  size: "sm"
139
- })) : (_(), i(e, { key: 1 }, [
140
- a.leftCounterBadge ? (_(), n(z, {
139
+ })) : (S(), s(t, { key: 1 }, [
140
+ e.leftCounterBadge ? (S(), a(G, {
141
141
  key: 0,
142
- value: a.leftCounterBadge,
142
+ value: e.leftCounterBadge,
143
143
  variant: "tertiary"
144
- }, null, 8, ["value"])) : r("", !0),
145
- a.leftIcon ? (_(), n(I, {
144
+ }, null, 8, ["value"])) : o("", !0),
145
+ e.leftIcon ? (S(), a(U, {
146
146
  key: 1,
147
- name: a.leftIcon,
147
+ name: e.leftIcon,
148
148
  "data-testid": "pv-button-left-icon"
149
- }, null, 8, ["name"])) : r("", !0),
150
- a.label ? (_(), i("span", V, x(a.label), 1)) : r("", !0),
151
- a.rightCounterBadge ? (_(), n(z, {
149
+ }, null, 8, ["name"])) : o("", !0),
150
+ e.label ? (S(), s("span", ae, E(e.label), 1)) : o("", !0),
151
+ e.rightCounterBadge ? (S(), a(G, {
152
152
  key: 3,
153
- value: a.rightCounterBadge,
153
+ value: e.rightCounterBadge,
154
154
  variant: "tertiary"
155
- }, null, 8, ["value"])) : r("", !0),
156
- a.rightIcon ? (_(), n(I, {
155
+ }, null, 8, ["value"])) : o("", !0),
156
+ e.rightIcon ? (S(), a(U, {
157
157
  key: 4,
158
- name: a.rightIcon,
158
+ name: e.rightIcon,
159
159
  "data-testid": "pv-button-right-icon"
160
- }, null, 8, ["name"])) : r("", !0)
161
- ], 64))], 10, B));
160
+ }, null, 8, ["name"])) : o("", !0)
161
+ ], 64))], 10, ie));
162
162
  }
163
- }), U = ["for"], ne = {
163
+ }), q = ["for"], J = {
164
164
  key: 0,
165
165
  class: "pv-surface-accent pv-inset-square pv-text-body-md pv-radius pv-bordered",
166
166
  style: { "--inset-size": "6px 10px" }
167
- }, W = { class: "pv-relative pv-flex-item" }, G = [
167
+ }, oe = { class: "pv-relative pv-flex-item" }, se = [
168
168
  "disabled",
169
169
  "type",
170
170
  "placeholder",
171
171
  "id",
172
172
  "data-invalid",
173
173
  "step"
174
- ], K = /* @__PURE__ */ c({
174
+ ], ce = /* @__PURE__ */ d({
175
175
  __name: "PvInput",
176
- props: /* @__PURE__ */ u({
176
+ props: /* @__PURE__ */ p({
177
177
  showLabel: { type: Boolean },
178
178
  error: { type: Boolean },
179
179
  disabled: { type: Boolean },
@@ -190,84 +190,84 @@ var P = [
190
190
  modelModifiers: {}
191
191
  }),
192
192
  emits: ["update:modelValue"],
193
- setup(o) {
194
- let s = o, c = S(o, "modelValue"), l = t(() => s.inputIcon ? { "--inset-size": "8px 12px 6px 36px" } : {});
195
- return (t, s) => (_(), i(e, null, [
196
- t.$slots.label || o.showLabel ? (_(), i("label", {
193
+ setup(e) {
194
+ let n = e, r = k(e, "modelValue"), l = i(() => n.inputIcon ? { "--inset-size": "8px 12px 6px 36px" } : {});
195
+ return (n, i) => (S(), s(t, null, [
196
+ n.$slots.label || e.showLabel ? (S(), s("label", {
197
197
  key: 0,
198
198
  "data-testid": "pv-input-label",
199
199
  class: "pv-label pv-stack-8",
200
- for: o.id
201
- }, [b(t.$slots, "label")], 8, U)) : r("", !0),
202
- a("div", { class: p(["pv-flex pv-flex-item", { "pv-stack-8": o.lowerLabel }]) }, [o.prefixLabel ? (_(), i("div", ne, x(o.prefixLabel), 1)) : r("", !0), a("div", W, [o.inputIcon ? (_(), n(I, {
200
+ for: e.id
201
+ }, [T(n.$slots, "label")], 8, q)) : o("", !0),
202
+ c("div", { class: g(["pv-flex pv-flex-item", { "pv-stack-8": e.lowerLabel }]) }, [e.prefixLabel ? (S(), s("div", J, E(e.prefixLabel), 1)) : o("", !0), c("div", oe, [e.inputIcon ? (S(), a(U, {
203
203
  key: 0,
204
204
  class: "pv-absolute input-icon-position",
205
- name: o.inputIcon
206
- }, null, 8, ["name"])) : r("", !0), D(a("input", d(t.$attrs, {
207
- "onUpdate:modelValue": s[0] ||= (e) => c.value = e,
205
+ name: e.inputIcon
206
+ }, null, 8, ["name"])) : o("", !0), I(c("input", m(n.$attrs, {
207
+ "onUpdate:modelValue": i[0] ||= (e) => r.value = e,
208
208
  "data-testid": "pv-input",
209
209
  class: ["pv-input-text", {
210
- "pv-inset-square": o.inputIcon,
211
- "pv-surface-accent": o.variant === "grey"
210
+ "pv-inset-square": e.inputIcon,
211
+ "pv-surface-accent": e.variant === "grey"
212
212
  }],
213
213
  style: [l.value, { width: "100%" }],
214
- disabled: o.disabled,
215
- type: o.type,
216
- placeholder: o.placeholder,
217
- id: o.id,
218
- "data-invalid": o.error ? !0 : void 0,
219
- step: o.step
220
- }), null, 16, G), [[C, c.value]])])], 2),
221
- o.lowerLabel ? (_(), i("p", {
214
+ disabled: e.disabled,
215
+ type: e.type,
216
+ placeholder: e.placeholder,
217
+ id: e.id,
218
+ "data-invalid": e.error ? !0 : void 0,
219
+ step: e.step
220
+ }), null, 16, se), [[M, r.value]])])], 2),
221
+ e.lowerLabel ? (S(), s("p", {
222
222
  key: 1,
223
223
  "data-testid": "pv-input-lower-label",
224
224
  style: { "margin-left": "12px" },
225
- class: p(["pv-text-body-xs", {
226
- "pv-text-red": o.error,
227
- "pv-text-subdued": !o.error
225
+ class: g(["pv-text-body-xs", {
226
+ "pv-text-red": e.error,
227
+ "pv-text-subdued": !e.error
228
228
  }])
229
- }, x(o.lowerLabel), 3)) : r("", !0)
229
+ }, E(e.lowerLabel), 3)) : o("", !0)
230
230
  ], 64));
231
231
  }
232
- }), q = ["onKeydown"], J = { class: "pv-question__header pv-inset-square-16 pv-space-between" }, Y = {
232
+ }), le = ["onKeydown"], ue = { class: "pv-question__header pv-inset-square-16 pv-space-between" }, de = {
233
233
  class: "pv-question__header-copy pv-flex-vertical pv-flex-item",
234
234
  style: {
235
235
  "--flex-align": "flex-start",
236
236
  "--flex-gap": "4px",
237
237
  "min-width": "0"
238
238
  }
239
- }, X = {
239
+ }, fe = {
240
240
  key: 0,
241
241
  class: "pv-text-body-md pv-text-tertiary"
242
- }, Z = { class: "pv-question__header-actions pv-flex" }, re = {
242
+ }, pe = { class: "pv-question__header-actions pv-flex" }, me = {
243
243
  key: 0,
244
244
  class: "pv-text-body-xs pv-text-tertiary",
245
245
  role: "status",
246
246
  "aria-live": "polite"
247
- }, ie = {
247
+ }, he = {
248
248
  class: "pv-question__body pv-border-bottom",
249
249
  style: { "padding-bottom": "2px" }
250
- }, ae = {
250
+ }, ge = {
251
251
  class: "pv-question__options pv-flex-vertical pv-inset-inline-16",
252
252
  style: {
253
253
  "--flex-align": "stretch",
254
254
  "--flex-gap": "2px"
255
255
  }
256
- }, oe = ["aria-activedescendant"], se = [
256
+ }, _e = ["aria-activedescendant"], ve = [
257
257
  "id",
258
258
  "aria-selected",
259
259
  "data-active",
260
260
  "onClick",
261
261
  "onMouseenter"
262
- ], ce = {
262
+ ], ye = {
263
263
  class: "pv-question__answer-text pv-flex-item pv-text-title-md",
264
264
  style: { "min-width": "0" }
265
- }, le = ["title"], ue = { class: "pv-visually-hidden" }, de = ["data-active"], fe = { class: "pv-question__chat-badge pv-flex pv-radius pv-text-subdued" }, pe = {
265
+ }, be = ["title"], xe = { class: "pv-visually-hidden" }, Se = ["data-active"], Ce = { class: "pv-question__chat-badge pv-flex pv-radius pv-text-subdued" }, we = {
266
266
  class: "pv-question__chat-input pv-flex-item",
267
267
  style: { "min-width": "0" }
268
- }, me = { class: "pv-question__footer pv-inset-squish-12 pv-space-between" }, he = /* @__PURE__ */ R(/* @__PURE__ */ c({
268
+ }, Te = { class: "pv-question__footer pv-inset-squish-12 pv-space-between" }, Ee = /* @__PURE__ */ W(/* @__PURE__ */ d({
269
269
  __name: "PvQuestion",
270
- props: /* @__PURE__ */ u({
270
+ props: /* @__PURE__ */ p({
271
271
  chatInputLabel: { default: "Other answer" },
272
272
  chatInputPlaceholder: { default: "Something else..." },
273
273
  currentQuestion: { default: 1 },
@@ -281,90 +281,90 @@ var P = [
281
281
  chatInput: { default: "" },
282
282
  chatInputModifiers: {}
283
283
  }),
284
- emits: /* @__PURE__ */ u([
284
+ emits: /* @__PURE__ */ p([
285
285
  "close",
286
286
  "select",
287
287
  "skip",
288
288
  "submit"
289
289
  ], ["update:modelValue", "update:chatInput"]),
290
- setup(o, { emit: c }) {
291
- let l = o, u = c, d = S(o, "modelValue"), p = S(o, "chatInput"), m = ee(), h = `${m}-heading`, g = `${m}-keyboard-hint`, b = v(), C = v(), w = l.options.findIndex((e) => e.id === d.value), E = v(Math.max(w, 0)), D = t(() => l.totalQuestions > 1), k = t(() => E.value < l.options.length ? A(E.value) : void 0);
292
- T(d, (e) => {
293
- let t = l.options.findIndex((t) => t.id === e);
294
- t >= 0 && (E.value = t);
295
- }), T(() => l.options.map((e) => e.id), (e, t) => {
290
+ setup(e, { emit: n }) {
291
+ let r = e, l = n, d = k(e, "modelValue"), f = k(e, "chatInput"), p = O(), m = `${p}-heading`, g = `${p}-keyboard-hint`, _ = C(), v = C(), y = r.options.findIndex((e) => e.id === d.value), b = C(Math.max(y, 0)), x = i(() => r.totalQuestions > 1), T = i(() => b.value < r.options.length ? D(b.value) : void 0);
292
+ P(d, (e) => {
293
+ let t = r.options.findIndex((t) => t.id === e);
294
+ t >= 0 && (b.value = t);
295
+ }), P(() => r.options.map((e) => e.id), (e, t) => {
296
296
  let n = e.findIndex((e) => e === d.value);
297
297
  if (n >= 0) {
298
- E.value = n;
298
+ b.value = n;
299
299
  return;
300
300
  }
301
- if (E.value === t.length) {
302
- E.value = e.length;
301
+ if (b.value === t.length) {
302
+ b.value = e.length;
303
303
  return;
304
304
  }
305
- let r = t[E.value], i = e.indexOf(r);
306
- E.value = i >= 0 ? i : Math.min(E.value, Math.max(e.length - 1, 0));
305
+ let r = t[b.value], i = e.indexOf(r);
306
+ b.value = i >= 0 ? i : Math.min(b.value, Math.max(e.length - 1, 0));
307
307
  });
308
+ function D(e) {
309
+ return `${p}-option-${e}`;
310
+ }
308
311
  function A(e) {
309
- return `${m}-option-${e}`;
312
+ r.options.length && (b.value = e, h(() => _.value?.focus()));
310
313
  }
311
- function j(e) {
312
- l.options.length && (E.value = e, f(() => b.value?.focus()));
314
+ function j() {
315
+ b.value = r.options.length, h(() => v.value?.querySelector("input")?.focus());
313
316
  }
314
- function M() {
315
- E.value = l.options.length, f(() => C.value?.querySelector("input")?.focus());
317
+ function M(e, t) {
318
+ b.value = t, d.value = e.id, l("select", e);
316
319
  }
317
320
  function N(e, t) {
318
- E.value = t, d.value = e.id, u("select", e);
319
- }
320
- function P(e, t) {
321
- N(e, t), f(() => b.value?.focus());
321
+ M(e, t), h(() => _.value?.focus());
322
322
  }
323
323
  function F() {
324
- E.value >= l.options.length && (E.value = 0);
324
+ b.value >= r.options.length && (b.value = 0);
325
325
  }
326
- function L(e) {
327
- e.key === "ArrowDown" ? (e.preventDefault(), E.value >= l.options.length - 1 ? M() : E.value += 1) : e.key === "ArrowUp" ? (e.preventDefault(), E.value <= 0 ? M() : --E.value) : e.key === "Enter" && l.options[E.value] && (e.preventDefault(), N(l.options[E.value], E.value));
326
+ function I(e) {
327
+ e.key === "ArrowDown" ? (e.preventDefault(), b.value >= r.options.length - 1 ? j() : b.value += 1) : e.key === "ArrowUp" ? (e.preventDefault(), b.value <= 0 ? j() : --b.value) : e.key === "Enter" && r.options[b.value] && (e.preventDefault(), M(r.options[b.value], b.value));
328
328
  }
329
329
  function R() {
330
- E.value = l.options.length, d.value = void 0;
330
+ b.value = r.options.length, d.value = void 0;
331
331
  }
332
- function B(e) {
333
- if (!(!l.options.length && (e.key === "ArrowDown" || e.key === "ArrowUp"))) {
334
- if (e.key === "ArrowDown") e.preventDefault(), j(0);
335
- else if (e.key === "ArrowUp") e.preventDefault(), j(l.options.length - 1);
332
+ function z(e) {
333
+ if (!(!r.options.length && (e.key === "ArrowDown" || e.key === "ArrowUp"))) {
334
+ if (e.key === "ArrowDown") e.preventDefault(), A(0);
335
+ else if (e.key === "ArrowUp") e.preventDefault(), A(r.options.length - 1);
336
336
  else if (e.key === "Enter" && !e.isComposing) {
337
337
  e.preventDefault();
338
- let t = p.value.trim();
339
- t && u("submit", t);
338
+ let t = f.value.trim();
339
+ t && l("submit", t);
340
340
  }
341
341
  }
342
342
  }
343
- function V() {
344
- u("close");
343
+ function B() {
344
+ l("close");
345
345
  }
346
- function U() {
347
- u("skip");
346
+ function V() {
347
+ l("skip");
348
348
  }
349
- return (t, c) => (_(), i("section", {
349
+ return (n, r) => (S(), s("section", {
350
350
  class: "pv-question pv-card pv-surface pv-full-width",
351
351
  "data-testid": "pv-question",
352
- "aria-labelledby": h,
353
- onKeydown: te(O(U, ["stop", "prevent"]), ["esc"])
352
+ "aria-labelledby": m,
353
+ onKeydown: ee(L(V, ["stop", "prevent"]), ["esc"])
354
354
  }, [
355
- a("header", J, [a("div", Y, [a("h3", {
356
- id: h,
355
+ c("header", ue, [c("div", de, [c("h3", {
356
+ id: m,
357
357
  class: "pv-heading-3"
358
- }, x(o.headerLabel), 1), o.subheader ? (_(), i("p", X, x(o.subheader), 1)) : r("", !0)]), a("div", Z, [D.value ? (_(), i("span", re, x(o.currentQuestion) + " of " + x(o.totalQuestions), 1)) : r("", !0), s(H, {
358
+ }, E(e.headerLabel), 1), e.subheader ? (S(), s("p", fe, E(e.subheader), 1)) : o("", !0)]), c("div", pe, [x.value ? (S(), s("span", me, E(e.currentQuestion) + " of " + E(e.totalQuestions), 1)) : o("", !0), u(K, {
359
359
  ariaLabel: "Close",
360
360
  leftIcon: "close",
361
361
  size: "md",
362
362
  variant: "ghost",
363
- onClick: V
363
+ onClick: B
364
364
  })])]),
365
- a("div", ie, [a("div", ae, [a("div", {
365
+ c("div", he, [c("div", ge, [c("div", {
366
366
  ref_key: "listboxRef",
367
- ref: b,
367
+ ref: _,
368
368
  class: "pv-question__listbox pv-flex-vertical",
369
369
  style: {
370
370
  "--flex-align": "stretch",
@@ -373,103 +373,103 @@ var P = [
373
373
  "data-testid": "pv-question-listbox",
374
374
  role: "listbox",
375
375
  tabindex: "0",
376
- "aria-activedescendant": k.value,
376
+ "aria-activedescendant": T.value,
377
377
  "aria-describedby": g,
378
- "aria-labelledby": h,
378
+ "aria-labelledby": m,
379
379
  onFocus: F,
380
- onKeydown: L
381
- }, [(_(!0), i(e, null, y(o.options, (e, t) => (_(), i("div", {
382
- id: A(t),
380
+ onKeydown: I
381
+ }, [(S(!0), s(t, null, w(e.options, (e, t) => (S(), s("div", {
382
+ id: D(t),
383
383
  key: e.id,
384
384
  class: "pv-question__option pv-flex pv-inset-squish-12 pv-radius-lg",
385
385
  "data-testid": "pv-question-option",
386
386
  role: "option",
387
387
  "aria-selected": d.value === e.id,
388
- "data-active": E.value === t || void 0,
389
- onClick: (n) => P(e, t),
390
- onMouseenter: (e) => E.value = t
388
+ "data-active": b.value === t || void 0,
389
+ onClick: (n) => N(e, t),
390
+ onMouseenter: (e) => b.value = t
391
391
  }, [
392
- s(z, {
392
+ u(G, {
393
393
  value: t + 1,
394
394
  size: "sm",
395
395
  variant: "tertiary"
396
396
  }, null, 8, ["value"]),
397
- a("span", ce, x(e.label), 1),
398
- e.helpText ? (_(), i("span", {
397
+ c("span", ye, E(e.label), 1),
398
+ e.helpText ? (S(), s("span", {
399
399
  key: 0,
400
400
  class: "pv-question__help pv-flex",
401
401
  style: { "--flex-gap": "0" },
402
402
  title: e.helpText
403
- }, [s(I, {
403
+ }, [u(U, {
404
404
  class: "pv-text-tertiary",
405
405
  name: "info-circle",
406
406
  size: 12
407
- }), a("span", ue, x(e.helpText), 1)], 8, le)) : r("", !0),
408
- d.value === e.id ? (_(), n(I, {
407
+ }), c("span", xe, E(e.helpText), 1)], 8, be)) : o("", !0),
408
+ d.value === e.id ? (S(), a(U, {
409
409
  key: 1,
410
410
  class: "pv-question__check pv-text-brand",
411
411
  name: "check"
412
- })) : r("", !0),
413
- s(I, {
412
+ })) : o("", !0),
413
+ u(U, {
414
414
  class: "pv-question__chevron pv-text-tertiary",
415
415
  name: "chevron-right"
416
416
  })
417
- ], 40, se))), 128))], 40, oe), a("div", {
417
+ ], 40, ve))), 128))], 40, _e), c("div", {
418
418
  ref_key: "chatInputWrapperRef",
419
- ref: C,
419
+ ref: v,
420
420
  class: "pv-question__chat pv-flex pv-inset-squish-12 pv-radius-lg",
421
421
  "data-testid": "pv-question-chat",
422
- "data-active": E.value === o.options.length || void 0,
423
- onClick: M,
424
- onMouseenter: c[1] ||= (e) => E.value = o.options.length
422
+ "data-active": b.value === e.options.length || void 0,
423
+ onClick: j,
424
+ onMouseenter: r[1] ||= (t) => b.value = e.options.length
425
425
  }, [
426
- a("span", fe, [s(I, {
426
+ c("span", Ce, [u(U, {
427
427
  name: "text-search",
428
428
  size: 12
429
429
  })]),
430
- a("div", pe, [s(K, {
431
- modelValue: p.value,
432
- "onUpdate:modelValue": c[0] ||= (e) => p.value = e,
433
- "aria-label": o.chatInputLabel,
434
- placeholder: o.chatInputPlaceholder,
430
+ c("div", we, [u(ce, {
431
+ modelValue: f.value,
432
+ "onUpdate:modelValue": r[0] ||= (e) => f.value = e,
433
+ "aria-label": e.chatInputLabel,
434
+ placeholder: e.chatInputPlaceholder,
435
435
  onFocus: R,
436
- onKeydown: B
436
+ onKeydown: z
437
437
  }, null, 8, [
438
438
  "modelValue",
439
439
  "aria-label",
440
440
  "placeholder"
441
441
  ])]),
442
- s(I, {
442
+ u(U, {
443
443
  class: "pv-question__chevron pv-text-tertiary",
444
444
  name: "chevron-right"
445
445
  })
446
- ], 40, de)])]),
447
- a("footer", me, [a("span", {
446
+ ], 40, Se)])]),
447
+ c("footer", Te, [c("span", {
448
448
  id: g,
449
449
  class: "pv-text-body-xs pv-text-tertiary"
450
- }, "↑↓ to navigate • Enter to select • Esc to skip"), s(H, {
450
+ }, "↑↓ to navigate • Enter to select • Esc to skip"), u(K, {
451
451
  class: "pv-question__skip",
452
452
  label: "Skip",
453
453
  size: "lg",
454
454
  variant: "secondary",
455
- onClick: U
455
+ onClick: V
456
456
  })])
457
- ], 40, q));
457
+ ], 40, le));
458
458
  }
459
- }), [["__scopeId", "data-v-38f26601"]]), ge = {
459
+ }), [["__scopeId", "data-v-38f26601"]]), De = {
460
460
  key: 0,
461
461
  class: "pv-confirmation pv-bordered pv-radius pv-inset-square-16 pv-flow-16",
462
462
  "data-testid": "pv-confirmation",
463
463
  "aria-label": "Tool approval"
464
- }, _e = { class: "pv-text-body-sm" }, ve = { class: "pv-flex pv-confirmation__actions" }, ye = {
464
+ }, Oe = { class: "pv-text-body-sm" }, ke = { class: "pv-flex pv-confirmation__actions" }, Ae = {
465
465
  key: 1,
466
466
  class: "pv-flex pv-text-body-sm pv-text-success",
467
467
  role: "status"
468
- }, be = {
468
+ }, je = {
469
469
  key: 2,
470
470
  class: "pv-flex pv-text-body-sm pv-text-critical",
471
471
  role: "status"
472
- }, xe = /* @__PURE__ */ R(/* @__PURE__ */ c({
472
+ }, Me = /* @__PURE__ */ W(/* @__PURE__ */ d({
473
473
  __name: "PvConfirmation",
474
474
  props: {
475
475
  approval: {},
@@ -483,45 +483,45 @@ var P = [
483
483
  state: {}
484
484
  },
485
485
  emits: ["respond"],
486
- setup(n, { emit: c }) {
487
- let l = n, u = c, d = t(() => l.state === "approval-requested" && l.approval !== void 0 && l.approval.approved === void 0), f = t(() => l.approval?.approved === !0 && (l.state === "approval-responded" || l.state === "input-available" || l.state === "output-available")), p = t(() => l.approval?.approved === !1 || l.state === "output-denied");
486
+ setup(e, { emit: n }) {
487
+ let r = e, a = n, d = i(() => r.state === "approval-requested" && r.approval !== void 0 && r.approval.approved === void 0), f = i(() => r.approval?.approved === !0 && (r.state === "approval-responded" || r.state === "input-available" || r.state === "output-available")), p = i(() => r.approval?.approved === !1 || r.state === "output-denied");
488
488
  function m(e) {
489
- u("respond", {
490
- id: l.approval.id,
489
+ a("respond", {
490
+ id: r.approval.id,
491
491
  approved: e
492
492
  });
493
493
  }
494
- return (t, c) => d.value || f.value || p.value ? (_(), i("section", ge, [d.value ? (_(), i(e, { key: 0 }, [a("div", _e, [b(t.$slots, "default", {}, () => [o(x(n.message), 1)], !0)]), a("div", ve, [s(H, {
494
+ return (n, r) => d.value || f.value || p.value ? (S(), s("section", De, [d.value ? (S(), s(t, { key: 0 }, [c("div", Oe, [T(n.$slots, "default", {}, () => [l(E(e.message), 1)], !0)]), c("div", ke, [u(K, {
495
495
  variant: "secondary",
496
496
  size: "md",
497
- label: n.rejectLabel,
498
- disabled: n.disabled,
499
- onClick: c[0] ||= (e) => m(!1)
500
- }, null, 8, ["label", "disabled"]), s(H, {
497
+ label: e.rejectLabel,
498
+ disabled: e.disabled,
499
+ onClick: r[0] ||= (e) => m(!1)
500
+ }, null, 8, ["label", "disabled"]), u(K, {
501
501
  size: "md",
502
- label: n.approveLabel,
503
- disabled: n.disabled,
504
- onClick: c[1] ||= (e) => m(!0)
505
- }, null, 8, ["label", "disabled"])])], 64)) : f.value ? (_(), i("p", ye, [s(I, {
502
+ label: e.approveLabel,
503
+ disabled: e.disabled,
504
+ onClick: r[1] ||= (e) => m(!0)
505
+ }, null, 8, ["label", "disabled"])])], 64)) : f.value ? (S(), s("p", Ae, [u(U, {
506
506
  name: "check-circle",
507
507
  size: 20
508
- }), b(t.$slots, "accepted", {}, () => [c[2] ||= o("You approved this tool execution.", -1)], !0)])) : (_(), i("p", be, [s(I, {
508
+ }), T(n.$slots, "accepted", {}, () => [r[2] ||= l("You approved this tool execution.", -1)], !0)])) : (S(), s("p", je, [u(U, {
509
509
  name: "close-circle",
510
510
  size: 20
511
- }), b(t.$slots, "rejected", {}, () => [c[3] ||= o("You rejected this tool execution.", -1)], !0)]))])) : r("", !0);
511
+ }), T(n.$slots, "rejected", {}, () => [r[3] ||= l("You rejected this tool execution.", -1)], !0)]))])) : o("", !0);
512
512
  }
513
- }), [["__scopeId", "data-v-c200deca"]]), Se = {
513
+ }), [["__scopeId", "data-v-c200deca"]]), Ne = {
514
514
  class: "pv-flex-vertical",
515
515
  style: { "--flex-align": "flex-start" }
516
- }, Ce = ["for"], we = [
516
+ }, Pe = ["for"], Fe = [
517
517
  "rows",
518
518
  "disabled",
519
519
  "placeholder",
520
520
  "id",
521
521
  "data-invalid"
522
- ], Te = /* @__PURE__ */ c({
522
+ ], Ie = /* @__PURE__ */ d({
523
523
  __name: "PvTextArea",
524
- props: /* @__PURE__ */ u({
524
+ props: /* @__PURE__ */ p({
525
525
  error: { type: Boolean },
526
526
  disabled: { type: Boolean },
527
527
  placeholder: {},
@@ -535,41 +535,41 @@ var P = [
535
535
  }),
536
536
  emits: ["update:modelValue"],
537
537
  setup(e) {
538
- let t = S(e, "modelValue");
539
- return (n, o) => (_(), i("div", Se, [
540
- n.$slots.label ? (_(), i("label", {
538
+ let t = k(e, "modelValue");
539
+ return (n, r) => (S(), s("div", Ne, [
540
+ n.$slots.label ? (S(), s("label", {
541
541
  key: 0,
542
542
  class: "pv-label",
543
543
  for: e.id
544
- }, [b(n.$slots, "label")], 8, Ce)) : r("", !0),
545
- D(a("textarea", d(n.$attrs, {
546
- "onUpdate:modelValue": o[0] ||= (e) => t.value = e,
544
+ }, [T(n.$slots, "label")], 8, Pe)) : o("", !0),
545
+ I(c("textarea", m(n.$attrs, {
546
+ "onUpdate:modelValue": r[0] ||= (e) => t.value = e,
547
547
  class: ["pv-textarea", { "pv-surface-accent": e.variant === "grey" }],
548
548
  rows: e.rows,
549
549
  disabled: e.disabled,
550
550
  placeholder: e.placeholder,
551
551
  id: e.id,
552
552
  "data-invalid": e.error ? !0 : void 0
553
- }), null, 16, we), [[w, t.value]]),
554
- e.lowerLabel ? (_(), i("p", {
553
+ }), null, 16, Fe), [[N, t.value]]),
554
+ e.lowerLabel ? (S(), s("p", {
555
555
  key: 1,
556
556
  style: { "margin-left": "12px" },
557
- class: p(["pv-text-body-xs", {
557
+ class: g(["pv-text-body-xs", {
558
558
  "pv-text-red": e.error,
559
559
  "pv-text-subdued": !e.error
560
560
  }])
561
- }, x(e.lowerLabel), 3)) : r("", !0)
561
+ }, E(e.lowerLabel), 3)) : o("", !0)
562
562
  ]));
563
563
  }
564
- }), Ee = ["aria-busy"], De = {
564
+ }), Le = ["aria-busy"], Re = {
565
565
  key: 0,
566
566
  class: "pv-full-width pv-flow-8"
567
- }, Oe = { class: "pv-prompt-input__footer pv-flex pv-full-width" }, ke = { class: "pv-prompt-input__actions pv-flex pv-flex-item" }, Ae = {
567
+ }, ze = { class: "pv-prompt-input__footer pv-flex pv-full-width" }, Be = { class: "pv-prompt-input__actions pv-flex pv-flex-item" }, Ve = {
568
568
  class: "pv-visually-hidden",
569
569
  "aria-live": "polite"
570
- }, je = /* @__PURE__ */ R(/* @__PURE__ */ c({
570
+ }, He = /* @__PURE__ */ W(/* @__PURE__ */ d({
571
571
  __name: "PvPromptInput",
572
- props: /* @__PURE__ */ u({
572
+ props: /* @__PURE__ */ p({
573
573
  ariaLabel: { default: "Message" },
574
574
  disabled: {
575
575
  type: Boolean,
@@ -585,38 +585,38 @@ var P = [
585
585
  modelValue: { default: "" },
586
586
  modelModifiers: {}
587
587
  }),
588
- emits: /* @__PURE__ */ u(["submit", "stop"], ["update:modelValue"]),
589
- setup(n, { emit: c }) {
590
- let l = n, u = c, d = S(n, "modelValue"), f = v(), p = t(() => l.status === "submitted" || l.status === "streaming"), h = t(() => !l.disabled && !p.value && d.value.trim().length > 0);
591
- function g() {
592
- h.value && u("submit", d.value.trim());
588
+ emits: /* @__PURE__ */ p(["submit", "stop"], ["update:modelValue"]),
589
+ setup(e, { emit: n }) {
590
+ let r = e, a = n, d = k(e, "modelValue"), f = C(), p = i(() => r.status === "submitted" || r.status === "streaming"), m = i(() => !r.disabled && !p.value && d.value.trim().length > 0);
591
+ function h() {
592
+ m.value && a("submit", d.value.trim());
593
593
  }
594
- function y(e) {
595
- l.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || f.value?.querySelector("textarea")?.focus();
594
+ function g(e) {
595
+ r.disabled || e.target?.closest("button, a, input, textarea, select, [tabindex]") || f.value?.querySelector("textarea")?.focus();
596
596
  }
597
- function x(e) {
598
- e.key !== "Enter" || e.shiftKey || e.isComposing || (e.preventDefault(), e.stopPropagation(), g());
597
+ function v(e) {
598
+ e.key !== "Enter" || e.shiftKey || e.isComposing || (e.preventDefault(), e.stopPropagation(), h());
599
599
  }
600
- return (t, c) => (_(), i("form", {
600
+ return (n, r) => (S(), s("form", {
601
601
  ref_key: "formRef",
602
602
  ref: f,
603
603
  class: "pv-prompt-input pv-bordered pv-radius pv-inset-square-8 pv-flex-vertical",
604
604
  "data-testid": "pv-prompt-input",
605
605
  "aria-busy": p.value,
606
- onSubmit: O(g, ["prevent"]),
607
- onClick: y
606
+ onSubmit: L(h, ["prevent"]),
607
+ onClick: g
608
608
  }, [
609
- t.$slots.header ? (_(), i("div", De, [b(t.$slots, "header", {}, void 0, !0)])) : r("", !0),
610
- s(Te, {
609
+ n.$slots.header ? (S(), s("div", Re, [T(n.$slots, "header", {}, void 0, !0)])) : o("", !0),
610
+ u(Ie, {
611
611
  modelValue: d.value,
612
- "onUpdate:modelValue": c[0] ||= (e) => d.value = e,
612
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
613
613
  class: "pv-prompt-input__textarea",
614
- style: m({ "--prompt-input-max-height": n.maxHeight }),
615
- rows: n.rows,
616
- placeholder: n.placeholder,
617
- disabled: n.disabled,
618
- "aria-label": n.ariaLabel,
619
- onKeydown: x
614
+ style: _({ "--prompt-input-max-height": e.maxHeight }),
615
+ rows: e.rows,
616
+ placeholder: e.placeholder,
617
+ disabled: e.disabled,
618
+ "aria-label": e.ariaLabel,
619
+ onKeydown: v
620
620
  }, null, 8, [
621
621
  "modelValue",
622
622
  "style",
@@ -625,14 +625,14 @@ var P = [
625
625
  "disabled",
626
626
  "aria-label"
627
627
  ]),
628
- a("div", Oe, [a("div", ke, [b(t.$slots, "actions", {}, void 0, !0)]), s(H, {
628
+ c("div", ze, [c("div", Be, [T(n.$slots, "actions", {}, void 0, !0)]), u(K, {
629
629
  type: p.value ? "button" : "submit",
630
630
  variant: p.value ? "secondary" : "primary",
631
631
  size: "md",
632
632
  "left-icon": p.value ? "stop" : "send",
633
- "aria-label": p.value ? n.stopLabel : n.submitLabel,
634
- disabled: n.disabled || !p.value && !h.value,
635
- onClick: c[1] ||= (e) => p.value && u("stop")
633
+ "aria-label": p.value ? e.stopLabel : e.submitLabel,
634
+ disabled: e.disabled || !p.value && !m.value,
635
+ onClick: r[1] ||= (e) => p.value && a("stop")
636
636
  }, null, 8, [
637
637
  "type",
638
638
  "variant",
@@ -640,17 +640,17 @@ var P = [
640
640
  "aria-label",
641
641
  "disabled"
642
642
  ])]),
643
- a("p", Ae, [n.status === "submitted" ? (_(), i(e, { key: 0 }, [o("Message submitted.")], 64)) : n.status === "streaming" ? (_(), i(e, { key: 1 }, [o("Response is streaming.")], 64)) : n.status === "error" ? (_(), i(e, { key: 2 }, [o("The message could not be sent.")], 64)) : r("", !0)])
644
- ], 40, Ee));
643
+ c("p", Ve, [e.status === "submitted" ? (S(), s(t, { key: 0 }, [l("Message submitted.")], 64)) : e.status === "streaming" ? (S(), s(t, { key: 1 }, [l("Response is streaming.")], 64)) : e.status === "error" ? (S(), s(t, { key: 2 }, [l("The message could not be sent.")], 64)) : o("", !0)])
644
+ ], 40, Le));
645
645
  }
646
- }), [["__scopeId", "data-v-155361b4"]]), Me = [
646
+ }), [["__scopeId", "data-v-155361b4"]]), Ue = [
647
647
  "ready",
648
648
  "submitted",
649
649
  "streaming",
650
650
  "error"
651
- ], Ne = ["open"], Q = /* @__PURE__ */ R(/* @__PURE__ */ c({
651
+ ], We = ["open"], Y = /* @__PURE__ */ W(/* @__PURE__ */ d({
652
652
  __name: "PvAccordion",
653
- props: /* @__PURE__ */ u({
653
+ props: /* @__PURE__ */ p({
654
654
  chevronPosition: { default: "right" },
655
655
  chevronVariant: { default: "vertical" },
656
656
  defaultOpen: { type: Boolean },
@@ -672,49 +672,186 @@ var P = [
672
672
  modelValue: { type: Boolean },
673
673
  modelModifiers: {}
674
674
  }),
675
- emits: /* @__PURE__ */ u(["summary-mouseenter", "summary-mouseleave"], ["update:modelValue"]),
676
- setup(o) {
677
- let s = o, c = S(o, "modelValue");
678
- s.defaultOpen !== void 0 && (c.value = s.defaultOpen);
675
+ emits: /* @__PURE__ */ p(["summary-mouseenter", "summary-mouseleave"], ["update:modelValue"]),
676
+ setup(e) {
677
+ let n = e, r = k(e, "modelValue");
678
+ n.defaultOpen !== void 0 && (r.value = n.defaultOpen);
679
679
  let l = (e) => {
680
- c.value = e.target.open;
681
- }, u = { width: s.enableTriggerFullWidth ? "100%" : "fit-content" }, f = t(() => s.chevronVariant === "horizontal" ? s.chevronPosition === "left" ? c.value ? "chevron-down" : "chevron-right" : c.value ? "chevron-down" : "chevron-left" : c.value ? "chevron-up" : "chevron-down");
682
- return (t, s) => (_(), i("details", {
680
+ r.value = e.target.open;
681
+ }, u = { width: n.enableTriggerFullWidth ? "100%" : "fit-content" }, d = i(() => n.chevronVariant === "horizontal" ? n.chevronPosition === "left" ? r.value ? "chevron-down" : "chevron-right" : r.value ? "chevron-down" : "chevron-left" : r.value ? "chevron-up" : "chevron-down");
682
+ return (n, i) => (S(), s("details", {
683
683
  "data-testid": "pv-accordion",
684
684
  class: "pv-accordion",
685
- open: c.value,
685
+ open: r.value,
686
686
  onToggle: l
687
- }, [a("summary", d(o.summaryAttrs, {
688
- class: ["pv-flex pv-space-between pv-relative", o.summaryClasses],
687
+ }, [c("summary", m(e.summaryAttrs, {
688
+ class: ["pv-flex pv-space-between pv-relative", e.summaryClasses],
689
689
  style: {
690
690
  ...u,
691
- ...o.summaryStyles
691
+ ...e.summaryStyles
692
692
  },
693
- onMouseenter: s[0] ||= (e) => t.$emit("summary-mouseenter"),
694
- onMouseleave: s[1] ||= (e) => t.$emit("summary-mouseleave")
693
+ onMouseenter: i[0] ||= (e) => n.$emit("summary-mouseenter"),
694
+ onMouseleave: i[1] ||= (e) => n.$emit("summary-mouseleave")
695
695
  }), [
696
- o.chevronPosition === "left" ? (_(), n(I, {
696
+ e.chevronPosition === "left" ? (S(), a(U, {
697
697
  key: 0,
698
- name: f.value
699
- }, null, 8, ["name"])) : r("", !0),
700
- o.enableTriggerSlot ? b(t.$slots, "trigger", { key: 1 }, void 0, !0) : (_(), i(e, { key: 2 }, [a("span", null, x(o.header), 1), o.counter ? (_(), n(z, {
698
+ name: d.value
699
+ }, null, 8, ["name"])) : o("", !0),
700
+ e.enableTriggerSlot ? T(n.$slots, "trigger", { key: 1 }, void 0, !0) : (S(), s(t, { key: 2 }, [c("span", null, E(e.header), 1), e.counter ? (S(), a(G, {
701
701
  key: 0,
702
- value: o.counter,
702
+ value: e.counter,
703
703
  variant: "secondary",
704
704
  size: "sm"
705
- }, null, 8, ["value"])) : r("", !0)], 64)),
706
- o.chevronPosition === "right" ? (_(), n(I, {
705
+ }, null, 8, ["value"])) : o("", !0)], 64)),
706
+ e.chevronPosition === "right" ? (S(), a(U, {
707
707
  key: 3,
708
- name: f.value
709
- }, null, 8, ["name"])) : r("", !0)
710
- ], 16), a("div", { style: m(o.contentStyles) }, [b(t.$slots, "default", {}, void 0, !0)], 4)], 40, Ne));
708
+ name: d.value
709
+ }, null, 8, ["name"])) : o("", !0)
710
+ ], 16), c("div", { style: _(e.contentStyles) }, [T(n.$slots, "default", {}, void 0, !0)], 4)], 40, We));
711
711
  }
712
- }), [["__scopeId", "data-v-a64056ef"]]), Pe = {
713
- class: "pv-flex pv-text-body-sm pv-text-subdued",
714
- "aria-live": "polite"
715
- }, $ = { class: "pv-reasoning__content pv-text-body-sm pv-text-subdued" }, Fe = /* @__PURE__ */ R(/* @__PURE__ */ c({
712
+ }), [["__scopeId", "data-v-a64056ef"]]);
713
+ //#endregion
714
+ //#region src/composables/useSlotPresence.ts
715
+ function X(e, t) {
716
+ if (e.nodeType !== Node.TEXT_NODE) return !1;
717
+ let n = e.textContent ?? "";
718
+ return t ? n.length > 0 : n.trim().length > 0;
719
+ }
720
+ function Ge(e, t, n) {
721
+ let r = t === "default" ? "" : t, i = Array.from(e.childNodes);
722
+ return r === "" ? i.some((e) => e.nodeType === Node.ELEMENT_NODE ? !e.hasAttribute("slot") : X(e, n)) : i.some((e) => e.nodeType === Node.ELEMENT_NODE ? e.getAttribute("slot") === r : !1);
723
+ }
724
+ function Z(e, t) {
725
+ let n = e.shadowRoot;
726
+ return n ? t === "default" || t === "" ? n.querySelector("slot:not([name])") : n.querySelector(`slot[name="${CSS.escape(t)}"]`) : null;
727
+ }
728
+ function Ke(e, t = {}) {
729
+ let { host: n, vueSlots: r, observe: a = !0, listenSlotChange: o = !0, countWhitespaceTextInDefaultSlot: s = !1 } = t, c = H(), l = r ?? A(), u = e === "default" || e === "" ? "default" : e, d = () => !!l && !!l[u], f = C(d());
730
+ y(() => {
731
+ f.value = d();
732
+ });
733
+ let p = C(!1), m = null, h = null, g = () => {
734
+ m &&= (m.disconnect(), null), h &&= (h.removeEventListener("slotchange", _), null);
735
+ }, _ = () => {
736
+ if (!c.value) {
737
+ p.value = !1;
738
+ return;
739
+ }
740
+ let t = D(n);
741
+ if (!t) {
742
+ p.value = !1;
743
+ return;
744
+ }
745
+ let r = o ? Z(t, e) : null;
746
+ if (r) {
747
+ p.value = r.assignedNodes({ flatten: !0 }).some((e) => e.nodeType === Node.ELEMENT_NODE ? !0 : X(e, s));
748
+ return;
749
+ }
750
+ p.value = Ge(t, e, s);
751
+ }, x = () => {
752
+ if (!c.value) return;
753
+ g();
754
+ let t = D(n);
755
+ if (!t) {
756
+ p.value = !1;
757
+ return;
758
+ }
759
+ _(), o && (h = Z(t, e), h && h.addEventListener("slotchange", _)), a && (m = new MutationObserver(() => _()), m.observe(t, {
760
+ childList: !0,
761
+ subtree: !1,
762
+ attributes: !0,
763
+ attributeFilter: ["slot"],
764
+ characterData: !0
765
+ }));
766
+ };
767
+ return b(x), v(g), P(() => D(n), () => {
768
+ c.value && x();
769
+ }), {
770
+ present: i(() => c.value ? p.value : f.value),
771
+ hasVueSlot: f,
772
+ hasNativeSlot: p,
773
+ refresh: _
774
+ };
775
+ }
776
+ //#endregion
777
+ //#region src/components/ai/PvStepList/PvStepList.vue?vue&type=script&setup=true&lang.ts
778
+ var qe = ["data-status"], Je = {
779
+ key: 0,
780
+ class: "pv-step-marker",
781
+ "aria-hidden": "true"
782
+ }, Ye = {
783
+ key: 1,
784
+ class: "pv-step-dot"
785
+ }, Xe = { class: "pv-step-body pv-flow-4" }, Ze = {
786
+ key: 0,
787
+ class: "pv-step-aside pv-text-body-md pv-text-tertiary"
788
+ }, Qe = {
789
+ class: "pv-flex pv-text-body-md pv-text-medium pv-text-default",
790
+ style: { "--flex-wrap": "wrap" }
791
+ }, $e = {
792
+ key: 0,
793
+ class: "pv-tag-highlight"
794
+ }, et = {
795
+ key: 0,
796
+ class: "pv-text-body-md pv-text-tertiary"
797
+ }, tt = {
798
+ key: 1,
799
+ class: "pv-flex",
800
+ role: "list",
801
+ style: {
802
+ "--flex-wrap": "wrap",
803
+ "--flex-gap": "4px"
804
+ }
805
+ }, nt = {
806
+ key: 2,
807
+ class: "pv-text-body-md pv-text-medium pv-text-brand"
808
+ }, Q = /* @__PURE__ */ W(/* @__PURE__ */ d({
809
+ __name: "PvStepList",
810
+ props: {
811
+ inProgress: {
812
+ type: Boolean,
813
+ default: !1
814
+ },
815
+ steps: { default: () => [] }
816
+ },
817
+ setup(e) {
818
+ let n = e, l = i(() => {
819
+ for (let e = n.steps.length - 1; e >= 0; --e) if (n.steps[e].variant !== "aside") return e;
820
+ return -1;
821
+ });
822
+ function u(e, t) {
823
+ return e.status ? e.status : e.variant === "aside" ? "complete" : n.inProgress && t === l.value ? "active" : "complete";
824
+ }
825
+ return (n, i) => (S(), a(r, {
826
+ tag: "ol",
827
+ name: "pv-step",
828
+ class: "pv-step-list",
829
+ role: "list"
830
+ }, {
831
+ default: F(() => [(S(!0), s(t, null, w(e.steps, (e, n) => (S(), s("li", {
832
+ key: e.id ?? n,
833
+ class: "pv-step",
834
+ "data-status": u(e, n)
835
+ }, [e.variant === "aside" ? o("", !0) : (S(), s("span", Je, [e.icon ? (S(), a(U, {
836
+ key: 0,
837
+ name: e.icon,
838
+ size: 12
839
+ }, null, 8, ["name"])) : (S(), s("span", Ye))])), c("div", Xe, [e.variant === "aside" ? (S(), s("p", Ze, [c("em", null, E(e.label), 1)])) : (S(), s(t, { key: 1 }, [
840
+ c("p", Qe, [c("span", { class: g({ "pv-shimmer": u(e, n) === "active" }) }, E(e.label), 3), e.artifact ? (S(), s("span", $e, E(e.artifact), 1)) : o("", !0)]),
841
+ e.note ? (S(), s("p", et, E(e.note), 1)) : o("", !0),
842
+ e.tags && e.tags.length > 0 ? (S(), s("ul", tt, [(S(!0), s(t, null, w(e.tags, (e, t) => (S(), s("li", {
843
+ key: t,
844
+ class: g(["pv-tag-secondary", { "pv-text-quaternary": e.variant === "muted" }]),
845
+ "data-style": "rounded"
846
+ }, E(e.label), 3))), 128))])) : o("", !0),
847
+ e.outcome ? (S(), s("p", nt, " →\xA0" + E(e.outcome), 1)) : o("", !0)
848
+ ], 64))])], 8, qe))), 128))]),
849
+ _: 1
850
+ }));
851
+ }
852
+ }), [["__scopeId", "data-v-5ab7d271"]]), rt = { class: "pv-reasoning__content pv-text-body-sm pv-text-subdued" }, it = /* @__PURE__ */ W(/* @__PURE__ */ d({
716
853
  __name: "PvReasoning",
717
- props: /* @__PURE__ */ u({
854
+ props: /* @__PURE__ */ p({
718
855
  autoCloseDelay: { default: 1e3 },
719
856
  completedLabel: { default: "Reasoning" },
720
857
  defaultOpen: {
@@ -726,6 +863,7 @@ var P = [
726
863
  type: Boolean,
727
864
  default: !1
728
865
  },
866
+ steps: { default: () => [] },
729
867
  streamingLabel: { default: "Thinking..." }
730
868
  }, {
731
869
  open: {
@@ -735,67 +873,92 @@ var P = [
735
873
  openModifiers: {}
736
874
  }),
737
875
  emits: ["update:open"],
738
- setup(e) {
739
- let r = e, i = S(e, "open"), c = v(), l = v(), u = v(!1), d;
740
- (r.defaultOpen || r.isStreaming) && (i.value = !0), r.isStreaming && (l.value = Date.now());
741
- let f = t(() => r.duration ?? c.value), p = t(() => {
742
- if (r.isStreaming) return r.streamingLabel;
743
- if (f.value === void 0) return r.completedLabel;
744
- let e = Math.max(1, Math.round(f.value));
876
+ setup(r) {
877
+ let l = r, d = k(r, "open"), f = C(), p = C(), m = C(!1), h;
878
+ (l.defaultOpen || l.isStreaming) && (d.value = !0), l.isStreaming && (p.value = Date.now());
879
+ let _ = i(() => l.duration ?? f.value), y = i(() => {
880
+ if (l.isStreaming) return l.streamingLabel;
881
+ if (_.value === void 0) return l.completedLabel;
882
+ let e = Math.max(1, Math.round(_.value));
745
883
  return `Thought for ${e} ${e === 1 ? "second" : "seconds"}`;
746
- });
747
- function m() {
748
- d !== void 0 && (clearTimeout(d), d = void 0);
884
+ }), b = A(), x = j("triggerRef"), { hasNativeSlot: w } = Ke("default", { host: i(() => {
885
+ let e = x.value?.getRootNode();
886
+ return e instanceof ShadowRoot ? e.host : null;
887
+ }) });
888
+ function D(r) {
889
+ return r.some((r) => r.type === e ? !1 : r.type === n ? String(r.children ?? "").trim().length > 0 : r.type === t ? Array.isArray(r.children) && D(r.children) : !0);
890
+ }
891
+ function O() {
892
+ return l.steps.length > 0 || w.value ? !0 : D(b.default?.() ?? []);
749
893
  }
750
- function g() {
751
- u.value = !0, m();
894
+ function M() {
895
+ h !== void 0 && (clearTimeout(h), h = void 0);
896
+ }
897
+ function N(e) {
898
+ let t = e.target?.closest?.("summary");
899
+ !t || t.parentElement !== e.currentTarget || (m.value = !0, M());
752
900
  }
753
- return T(() => r.isStreaming, (e, t) => {
754
- if (m(), e) {
755
- l.value = Date.now(), c.value = void 0, u.value = !1, i.value = !0;
901
+ return P(() => l.isStreaming, (e, t) => {
902
+ if (M(), e) {
903
+ p.value = Date.now(), f.value = void 0, m.value = !1, d.value = !0;
756
904
  return;
757
905
  }
758
- t && (l.value !== void 0 && (c.value = (Date.now() - l.value) / 1e3), u.value || (d = setTimeout(() => {
759
- u.value || (i.value = !1);
760
- }, r.autoCloseDelay)));
761
- }), h(m), (e, t) => (_(), n(Q, {
762
- modelValue: i.value,
763
- "onUpdate:modelValue": t[0] ||= (e) => i.value = e,
764
- "default-open": i.value,
906
+ t && (p.value !== void 0 && (f.value = (Date.now() - p.value) / 1e3), m.value || (h = setTimeout(() => {
907
+ m.value || (d.value = !1);
908
+ }, l.autoCloseDelay)));
909
+ }), v(M), (e, t) => O() ? (S(), a(Y, {
910
+ key: 0,
911
+ modelValue: d.value,
912
+ "onUpdate:modelValue": t[0] ||= (e) => d.value = e,
913
+ "default-open": d.value,
765
914
  class: "pv-reasoning",
766
915
  "chevron-position": "left",
767
916
  "chevron-variant": "horizontal",
768
917
  "enable-trigger-full-width": "",
769
918
  "enable-trigger-slot": "",
770
- "summary-classes": {
771
- "pv-button-ghost": !0,
772
- "pv-button-small": !0
773
- },
774
919
  "summary-styles": { justifyContent: "flex-start" },
775
- onClick: g
920
+ onClick: N
776
921
  }, {
777
- trigger: E(() => [a("span", Pe, [s(I, {
922
+ trigger: F(() => [c("span", {
923
+ ref_key: "triggerRef",
924
+ ref: x,
925
+ class: "pv-reasoning__trigger pv-flex pv-text-title-md pv-text-subdued",
926
+ "aria-live": "polite"
927
+ }, [T(e.$slots, "trigger", {}, () => [u(U, {
778
928
  name: "brain",
779
929
  size: 20
780
- }), o(" " + x(p.value), 1)])]),
781
- default: E(() => [a("div", $, [b(e.$slots, "default", {}, void 0, !0)])]),
930
+ }), c("span", { class: g({ "pv-shimmer": r.isStreaming }) }, E(y.value), 3)], !0)], 512)]),
931
+ default: F(() => [c("div", rt, [r.steps.length > 0 ? (S(), a(Q, {
932
+ key: 0,
933
+ steps: r.steps,
934
+ "in-progress": r.isStreaming
935
+ }, null, 8, ["steps", "in-progress"])) : o("", !0), T(e.$slots, "default", {}, void 0, !0)])]),
782
936
  _: 3
783
- }, 8, ["modelValue", "default-open"]));
937
+ }, 8, ["modelValue", "default-open"])) : (S(), s("span", {
938
+ key: 1,
939
+ ref_key: "triggerRef",
940
+ ref: x,
941
+ class: "pv-reasoning__trigger pv-reasoning__standalone pv-flex pv-text-title-md pv-text-subdued",
942
+ "aria-live": "polite"
943
+ }, [T(e.$slots, "trigger", {}, () => [u(U, {
944
+ name: "brain",
945
+ size: 20
946
+ }), c("span", { class: g({ "pv-shimmer": r.isStreaming }) }, E(y.value), 3)], !0)], 512));
784
947
  }
785
- }), [["__scopeId", "data-v-6111e5ae"]]), Ie = { class: "pv-tool__heading pv-flex pv-flex-item" }, Le = { class: "pv-text-title-sm pv-truncate" }, Re = { class: "pv-tool__disclosure-content" }, ze = { class: "pv-flow-16 pv-border-top pv-tool__content" }, Be = {
948
+ }), [["__scopeId", "data-v-91e8312e"]]), $ = { class: "pv-tool__heading pv-flex pv-flex-item" }, at = { class: "pv-text-title-sm pv-truncate" }, ot = { class: "pv-tool__disclosure-content" }, st = { class: "pv-flow-16 pv-border-top pv-tool__content" }, ct = {
786
949
  key: 0,
787
950
  class: "pv-flow-8"
788
- }, Ve = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, He = {
951
+ }, lt = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, ut = {
789
952
  key: 1,
790
953
  class: "pv-flow-8",
791
954
  role: "alert",
792
955
  "aria-label": "Tool error"
793
- }, Ue = { class: "pv-surface-critical pv-inset-square-12 pv-radius-sm pv-text-body-xs pv-text-critical" }, We = {
956
+ }, dt = { class: "pv-surface-critical pv-inset-square-12 pv-radius-sm pv-text-body-xs pv-text-critical" }, ft = {
794
957
  key: 2,
795
958
  class: "pv-flow-8"
796
- }, Ge = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, Ke = /* @__PURE__ */ R(/* @__PURE__ */ c({
959
+ }, pt = { class: "pv-surface-accent pv-inset-square-12 pv-radius-sm pv-text-body-xs" }, mt = /* @__PURE__ */ W(/* @__PURE__ */ d({
797
960
  __name: "PvTool",
798
- props: /* @__PURE__ */ u({
961
+ props: /* @__PURE__ */ p({
799
962
  defaultOpen: {
800
963
  type: Boolean,
801
964
  default: !1
@@ -828,9 +991,9 @@ var P = [
828
991
  }),
829
992
  emits: ["update:open"],
830
993
  setup(e) {
831
- let o = e, c = S(e, "open"), l = ["output-available", "output-error"];
832
- (o.defaultOpen || l.includes(o.state)) && (c.value = !0);
833
- let u = t(() => ({
994
+ let t = e, n = k(e, "open"), r = ["output-available", "output-error"];
995
+ (t.defaultOpen || r.includes(t.state)) && (n.value = !0);
996
+ let l = i(() => ({
834
997
  "input-streaming": {
835
998
  label: "Pending",
836
999
  className: "pv-tag-tertiary"
@@ -859,7 +1022,7 @@ var P = [
859
1022
  label: "Denied",
860
1023
  className: "pv-tag-error"
861
1024
  }
862
- })[o.state]);
1025
+ })[t.state]);
863
1026
  function d(e) {
864
1027
  if (typeof e == "string") return e;
865
1028
  try {
@@ -868,12 +1031,12 @@ var P = [
868
1031
  return String(e);
869
1032
  }
870
1033
  }
871
- return T(() => o.state, (e, t) => {
872
- e !== t && l.includes(e) && (c.value = !0);
873
- }), (t, o) => (_(), n(Q, {
874
- modelValue: c.value,
875
- "onUpdate:modelValue": o[0] ||= (e) => c.value = e,
876
- "default-open": c.value,
1034
+ return P(() => t.state, (e, t) => {
1035
+ e !== t && r.includes(e) && (n.value = !0);
1036
+ }), (t, r) => (S(), a(Y, {
1037
+ modelValue: n.value,
1038
+ "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
1039
+ "default-open": n.value,
877
1040
  class: "pv-tool pv-bordered pv-radius",
878
1041
  "chevron-position": "right",
879
1042
  "chevron-variant": "horizontal",
@@ -881,22 +1044,22 @@ var P = [
881
1044
  "enable-trigger-slot": "",
882
1045
  "summary-classes": { "pv-inset-square-12": !0 }
883
1046
  }, {
884
- trigger: E(() => [a("span", Ie, [
885
- s(I, {
1047
+ trigger: F(() => [c("span", $, [
1048
+ u(U, {
886
1049
  name: "settings",
887
1050
  size: 20
888
1051
  }),
889
- a("span", Le, x(e.toolName), 1),
890
- a("span", {
891
- class: p([u.value.className, "pv-tag-sm"]),
1052
+ c("span", at, E(e.toolName), 1),
1053
+ c("span", {
1054
+ class: g([l.value.className, "pv-tag-sm"]),
892
1055
  role: "status"
893
- }, x(u.value.label), 3)
1056
+ }, E(l.value.label), 3)
894
1057
  ])]),
895
- default: E(() => [a("div", Re, [a("div", ze, [t.$slots.input || e.input !== void 0 ? (_(), i("section", Be, [o[1] ||= a("h3", { class: "pv-text-title-xs" }, "Parameters", -1), b(t.$slots, "input", { input: e.input }, () => [a("pre", Ve, [a("code", null, x(d(e.input)), 1)])], !0)])) : r("", !0), e.errorText ? (_(), i("section", He, [o[2] ||= a("h3", { class: "pv-text-title-xs pv-text-critical" }, "Error", -1), a("pre", Ue, x(e.errorText), 1)])) : t.$slots.output || e.output !== void 0 ? (_(), i("section", We, [o[3] ||= a("h3", { class: "pv-text-title-xs" }, "Result", -1), b(t.$slots, "output", { output: e.output }, () => [a("pre", Ge, [a("code", null, x(d(e.output)), 1)])], !0)])) : r("", !0)])])]),
1058
+ default: F(() => [c("div", ot, [c("div", st, [t.$slots.input || e.input !== void 0 ? (S(), s("section", ct, [r[1] ||= c("h3", { class: "pv-text-title-xs" }, "Parameters", -1), T(t.$slots, "input", { input: e.input }, () => [c("pre", lt, [c("code", null, E(d(e.input)), 1)])], !0)])) : o("", !0), e.errorText ? (S(), s("section", ut, [r[2] ||= c("h3", { class: "pv-text-title-xs pv-text-critical" }, "Error", -1), c("pre", dt, E(e.errorText), 1)])) : t.$slots.output || e.output !== void 0 ? (S(), s("section", ft, [r[3] ||= c("h3", { class: "pv-text-title-xs" }, "Result", -1), T(t.$slots, "output", { output: e.output }, () => [c("pre", pt, [c("code", null, E(d(e.output)), 1)])], !0)])) : o("", !0)])])]),
896
1059
  _: 3
897
1060
  }, 8, ["modelValue", "default-open"]));
898
1061
  }
899
- }), [["__scopeId", "data-v-a5e28b1a"]]), qe = [
1062
+ }), [["__scopeId", "data-v-a5e28b1a"]]), ht = [
900
1063
  "input-streaming",
901
1064
  "input-available",
902
1065
  "approval-requested",
@@ -907,8 +1070,8 @@ var P = [
907
1070
  ];
908
1071
  //#endregion
909
1072
  //#region src/components/ai/useStickToBottom.ts
910
- function Je(e, t = {}) {
911
- let n = t.threshold ?? 32, r = v(!0);
1073
+ function gt(e, t = {}) {
1074
+ let n = t.threshold ?? 32, r = C(!0);
912
1075
  function i() {
913
1076
  let t = e.value;
914
1077
  t && (r.value = t.scrollHeight - t.scrollTop - t.clientHeight <= n);
@@ -939,14 +1102,14 @@ function Je(e, t = {}) {
939
1102
  e.removeEventListener("scroll", t), s.forEach((e) => e.disconnect());
940
1103
  };
941
1104
  }
942
- return T(e, (e) => {
1105
+ return P(e, (e) => {
943
1106
  o?.(), o = void 0, e && s(e);
944
- }, { immediate: !0 }), g(() => o?.()), {
1107
+ }, { immediate: !0 }), x(() => o?.()), {
945
1108
  isAtBottom: r,
946
1109
  scrollToBottom: a
947
1110
  };
948
1111
  }
949
1112
  //#endregion
950
- export { xe as PvConfirmation, je as PvPromptInput, he as PvQuestion, Fe as PvReasoning, Ke as PvTool, Me as promptInputStatuses, qe as toolLifecycleStates, Je as useStickToBottom };
1113
+ export { Me as PvConfirmation, He as PvPromptInput, Ee as PvQuestion, it as PvReasoning, Q as PvStepList, mt as PvTool, Ue as promptInputStatuses, ht as toolLifecycleStates, gt as useStickToBottom };
951
1114
 
952
1115
  //# sourceMappingURL=pv-components-ai.mjs.map