@8wave/ai-elements 0.119.0-beta.48 → 0.119.0-beta.49

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 (70) hide show
  1. package/dist/_chunks/{PkStreamingMarkdown-xnhBbPf5.js → PkStreamingMarkdown-pEgm7m-B.js} +4 -4
  2. package/dist/_chunks/PkStreamingMarkdown-pEgm7m-B.js.map +1 -0
  3. package/dist/_chunks/{PkToolShowArtifact-DPt1qDUk.js → PkToolShowArtifact-D6ZTw5vh.js} +2 -2
  4. package/dist/_chunks/{PkToolShowArtifact-DPt1qDUk.js.map → PkToolShowArtifact-D6ZTw5vh.js.map} +1 -1
  5. package/dist/_chunks/{PkToolShowContactForm-OdC7bsXd.js → PkToolShowContactForm-CW7gKQ7h.js} +2 -2
  6. package/dist/_chunks/{PkToolShowContactForm-OdC7bsXd.js.map → PkToolShowContactForm-CW7gKQ7h.js.map} +1 -1
  7. package/dist/_chunks/{PkToolShowForm-uFmaQoI1.js → PkToolShowForm-D_2FmDwq.js} +2 -2
  8. package/dist/_chunks/{PkToolShowForm-uFmaQoI1.js.map → PkToolShowForm-D_2FmDwq.js.map} +1 -1
  9. package/dist/_chunks/{PkToolShowSources-BlpCKc4N.js → PkToolShowSources-DyzheirE.js} +2 -2
  10. package/dist/_chunks/{PkToolShowSources-BlpCKc4N.js.map → PkToolShowSources-DyzheirE.js.map} +1 -1
  11. package/dist/ai-elements.es.js +1172 -1170
  12. package/dist/ai-elements.es.js.map +1 -1
  13. package/dist-vue/PkChatbot.js +1 -1
  14. package/dist-vue/PkChatbotEmptyState.js +1 -1
  15. package/dist-vue/PkChatbotInput.js +1 -1
  16. package/dist-vue/PkChatbotMessages.js +1 -1
  17. package/dist-vue/PkChatbotStepPayload.js +1 -1
  18. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  19. package/dist-vue/PkChatbotSteps.js +1 -1
  20. package/dist-vue/PkChatbotViewChat.js +1 -1
  21. package/dist-vue/PkChatbotViewConversations.js +1 -1
  22. package/dist-vue/_chunks/{PkChatbot-DXwMfwN4.js → PkChatbot-viqlDa9r.js} +5 -5
  23. package/dist-vue/_chunks/{PkChatbot-DXwMfwN4.js.map → PkChatbot-viqlDa9r.js.map} +1 -1
  24. package/dist-vue/_chunks/{PkChatbotEmptyState-Dve5Ci2Y.js → PkChatbotEmptyState-B-2GZ2ZU.js} +2 -2
  25. package/dist-vue/_chunks/{PkChatbotEmptyState-Dve5Ci2Y.js.map → PkChatbotEmptyState-B-2GZ2ZU.js.map} +1 -1
  26. package/dist-vue/_chunks/{PkChatbotInput-DiCxEime.js → PkChatbotInput-D4bT_1be.js} +2 -2
  27. package/dist-vue/_chunks/{PkChatbotInput-DiCxEime.js.map → PkChatbotInput-D4bT_1be.js.map} +1 -1
  28. package/dist-vue/_chunks/{PkChatbotMessages-CTp0NkY2.js → PkChatbotMessages-BgcGen7D.js} +14 -14
  29. package/dist-vue/_chunks/{PkChatbotMessages-CTp0NkY2.js.map → PkChatbotMessages-BgcGen7D.js.map} +1 -1
  30. package/dist-vue/_chunks/{PkChatbotStepPayload-B1o2DbQz.js → PkChatbotStepPayload-CzCHmvUG.js} +2 -2
  31. package/dist-vue/_chunks/{PkChatbotStepPayload-B1o2DbQz.js.map → PkChatbotStepPayload-CzCHmvUG.js.map} +1 -1
  32. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DpYV0KLn.js → PkChatbotStepToolDetail-qSHrVOGO.js} +3 -3
  33. package/dist-vue/_chunks/{PkChatbotStepToolDetail-DpYV0KLn.js.map → PkChatbotStepToolDetail-qSHrVOGO.js.map} +1 -1
  34. package/dist-vue/_chunks/{PkChatbotSteps-BPon4zjv.js → PkChatbotSteps-dgj6C2hA.js} +5 -5
  35. package/dist-vue/_chunks/{PkChatbotSteps-BPon4zjv.js.map → PkChatbotSteps-dgj6C2hA.js.map} +1 -1
  36. package/dist-vue/_chunks/{PkChatbotViewChat-dJE2iHPN.js → PkChatbotViewChat-BtbE6V2u.js} +173 -173
  37. package/dist-vue/_chunks/PkChatbotViewChat-BtbE6V2u.js.map +1 -0
  38. package/dist-vue/_chunks/{PkChatbotViewConversations-DcEcJgwV.js → PkChatbotViewConversations-Cw9fL47_.js} +2 -2
  39. package/dist-vue/_chunks/{PkChatbotViewConversations-DcEcJgwV.js.map → PkChatbotViewConversations-Cw9fL47_.js.map} +1 -1
  40. package/dist-vue/_chunks/{PkStreamingMarkdown-CqT_orLj.js → PkStreamingMarkdown-DXoUbGsP.js} +2 -2
  41. package/dist-vue/_chunks/{PkStreamingMarkdown-CqT_orLj.js.map → PkStreamingMarkdown-DXoUbGsP.js.map} +1 -1
  42. package/dist-vue/_chunks/{PkToolShowArtifact-Qfkz64NY.js → PkToolShowArtifact-BRtz1x7K.js} +2 -2
  43. package/dist-vue/_chunks/{PkToolShowArtifact-Qfkz64NY.js.map → PkToolShowArtifact-BRtz1x7K.js.map} +1 -1
  44. package/dist-vue/_chunks/{PkToolShowContactForm-CRLEkYSE.js → PkToolShowContactForm-D0CR80e2.js} +2 -2
  45. package/dist-vue/_chunks/{PkToolShowContactForm-CRLEkYSE.js.map → PkToolShowContactForm-D0CR80e2.js.map} +1 -1
  46. package/dist-vue/_chunks/{PkToolShowDiagram-j4FJ34Ta.js → PkToolShowDiagram-CYpqqWLo.js} +2 -2
  47. package/dist-vue/_chunks/{PkToolShowDiagram-j4FJ34Ta.js.map → PkToolShowDiagram-CYpqqWLo.js.map} +1 -1
  48. package/dist-vue/_chunks/{PkToolShowForm-DdFBwLMf.js → PkToolShowForm-BIsu4XhQ.js} +3 -3
  49. package/dist-vue/_chunks/{PkToolShowForm-DdFBwLMf.js.map → PkToolShowForm-BIsu4XhQ.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkToolShowImageGallery-CxlOwuTJ.js → PkToolShowImageGallery-DkEv-6Nu.js} +2 -2
  51. package/dist-vue/_chunks/{PkToolShowImageGallery-CxlOwuTJ.js.map → PkToolShowImageGallery-DkEv-6Nu.js.map} +1 -1
  52. package/dist-vue/_chunks/{PkToolShowProductList-dfd3vmhl.js → PkToolShowProductList-Dr2mQqsb.js} +2 -2
  53. package/dist-vue/_chunks/{PkToolShowProductList-dfd3vmhl.js.map → PkToolShowProductList-Dr2mQqsb.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkToolShowSources-B8Euk3rp.js → PkToolShowSources-CxUDh6cC.js} +2 -2
  55. package/dist-vue/_chunks/{PkToolShowSources-B8Euk3rp.js.map → PkToolShowSources-CxUDh6cC.js.map} +1 -1
  56. package/dist-vue/_chunks/{PkToolShowVideo-C84UrvZ7.js → PkToolShowVideo-Bh1oagOm.js} +2 -2
  57. package/dist-vue/_chunks/{PkToolShowVideo-C84UrvZ7.js.map → PkToolShowVideo-Bh1oagOm.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkToolShowWebPages-CzzuVQqL.js → PkToolShowWebPages-ilQ1qTEC.js} +2 -2
  59. package/dist-vue/_chunks/{PkToolShowWebPages-CzzuVQqL.js.map → PkToolShowWebPages-ilQ1qTEC.js.map} +1 -1
  60. package/dist-vue/_chunks/{utils-7oPvmwwu.js → utils-Bopp5IPf.js} +4 -4
  61. package/dist-vue/_chunks/utils-Bopp5IPf.js.map +1 -0
  62. package/dist-vue/composables.js +3 -1
  63. package/dist-vue/composables.js.map +1 -1
  64. package/dist-vue/index.js +20 -20
  65. package/dist-vue/index.js.map +1 -1
  66. package/dist-vue/locales.js +2 -0
  67. package/package.json +1 -1
  68. package/dist/_chunks/PkStreamingMarkdown-xnhBbPf5.js.map +0 -1
  69. package/dist-vue/_chunks/PkChatbotViewChat-dJE2iHPN.js.map +0 -1
  70. package/dist-vue/_chunks/utils-7oPvmwwu.js.map +0 -1
@@ -1,12 +1,12 @@
1
- import { t as e } from "./PkChatbotMessages-CTp0NkY2.js";
1
+ import { t as e } from "./PkChatbotMessages-BgcGen7D.js";
2
2
  import { o as t } from "./Media-D-UGzdcW.js";
3
3
  import { a as n, n as r, t as i } from "./useChatbotStore-DHmjHPR5.js";
4
4
  import { n as a } from "./src-BZRiAJsH.js";
5
- import { p as o, s } from "./utils-7oPvmwwu.js";
5
+ import { p as o, s } from "./utils-Bopp5IPf.js";
6
6
  import { t as c } from "./useLocalizedString-PfaKjIQY.js";
7
7
  import { t as l } from "./PkAvatar-BTqu8tn9.js";
8
- import { n as u, t as d } from "./PkChatbotInput-DiCxEime.js";
9
- import { t as f } from "./PkChatbotEmptyState-Dve5Ci2Y.js";
8
+ import { n as u, t as d } from "./PkChatbotInput-D4bT_1be.js";
9
+ import { t as f } from "./PkChatbotEmptyState-B-2GZ2ZU.js";
10
10
  import { t as p } from "./PkChatbotWakeupBar-Cjgarxnw.js";
11
11
  import { VvIcon as m } from "@volverjs/ui-vue/components";
12
12
  import { Fragment as h, Transition as g, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as ee, createTextVNode as te, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as ne, nextTick as re, normalizeClass as T, onBeforeUnmount as E, onMounted as ie, onScopeDispose as ae, onUnmounted as oe, openBlock as D, ref as O, renderList as se, shallowRef as ce, toDisplayString as k, toValue as A, unref as j, useTemplateRef as le, watch as M, withCtx as N } from "vue";
@@ -32,7 +32,7 @@ var P = {
32
32
  }, F = {
33
33
  key: 1,
34
34
  class: "pk-aurora__fallback"
35
- }, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", he = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", ge = /* @__PURE__ */ w({
35
+ }, he = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", ge = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", _e = /* @__PURE__ */ w({
36
36
  __name: "PkAuroraCanvas",
37
37
  props: { sourceSelector: {} },
38
38
  setup(e) {
@@ -73,7 +73,7 @@ var P = {
73
73
  r.value = !0;
74
74
  return;
75
75
  }
76
- let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, he), y = i.createProgram();
76
+ let a = p(i.VERTEX_SHADER, he), f = p(i.FRAGMENT_SHADER, ge), y = i.createProgram();
77
77
  if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
78
78
  r.value = !0;
79
79
  return;
@@ -106,7 +106,7 @@ var P = {
106
106
  class: "pk-aurora__canvas"
107
107
  }, null, 512))]));
108
108
  }
109
- }), L = .18, _e = .35, R = /* @__PURE__ */ w({
109
+ }), I = .18, ve = .35, ye = /* @__PURE__ */ w({
110
110
  __name: "PkVoiceOrb",
111
111
  props: {
112
112
  sample: {},
@@ -118,20 +118,20 @@ var P = {
118
118
  bars: { default: 5 }
119
119
  },
120
120
  setup(e) {
121
- let t = e, n = le("barsEl"), r = Array.from({ length: t.bars }, () => L), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
121
+ let t = e, n = le("barsEl"), r = Array.from({ length: t.bars }, () => I), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
122
122
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
123
123
  if (!n?.length) {
124
124
  let t = Date.now() / 260;
125
125
  return Array.from({ length: i }, (n, r) => {
126
126
  let i = .65 + .35 * Math.sin(t + r * .9);
127
- return L + e * 2.4 * i;
127
+ return I + e * 2.4 * i;
128
128
  });
129
129
  }
130
130
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
131
131
  return Array.from({ length: i }, (e, t) => {
132
132
  let r = 0;
133
133
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
134
- return L + r / o / 255 * 2.2;
134
+ return I + r / o / 255 * 2.2;
135
135
  });
136
136
  }, s = () => {
137
137
  let e = n.value?.children;
@@ -140,12 +140,12 @@ var P = {
140
140
  });
141
141
  }, c = () => {
142
142
  let e = o();
143
- r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * _e), s(), i = requestAnimationFrame(c);
143
+ r = r.map((t, n) => t + (Math.min(1, Math.max(I, e[n] ?? I)) - t) * ve), s(), i = requestAnimationFrame(c);
144
144
  }, l = () => {
145
145
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
146
146
  };
147
147
  return M(() => t.state, async (e) => {
148
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
148
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => I * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
149
149
  }, { immediate: !0 }), E(l), (t, r) => (D(), b("div", {
150
150
  class: T(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
151
151
  "aria-hidden": "true"
@@ -158,18 +158,18 @@ var P = {
158
158
  class: "pk-voice-orb__bar"
159
159
  }))), 128))], 512)], 2));
160
160
  }
161
- }), z = {
161
+ }), L = {
162
162
  key: 0,
163
163
  class: "pk-voice-session__badge",
164
164
  "aria-hidden": "true"
165
- }, ve = {
165
+ }, R = {
166
166
  class: "pk-voice-session__status",
167
167
  role: "status"
168
- }, ye = {
168
+ }, be = {
169
169
  key: 0,
170
170
  class: "pk-voice-session__live-dot",
171
171
  "aria-hidden": "true"
172
- }, be = ["title"], xe = ["title"], Se = { class: "pk-voice-session__actions" }, Ce = /* @__PURE__ */ w({
172
+ }, xe = ["title"], Se = ["title"], Ce = { class: "pk-voice-session__actions" }, we = /* @__PURE__ */ w({
173
173
  __name: "PkVoiceSession",
174
174
  props: {
175
175
  state: {},
@@ -198,7 +198,7 @@ var P = {
198
198
  return (t, n) => {
199
199
  let d = m;
200
200
  return D(), b("div", { class: T(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
201
- e.error ? (D(), b("span", z, [S(d, { name: "ri:error-warning-line" })])) : (D(), v(R, {
201
+ e.error ? (D(), b("span", L, [S(d, { name: "ri:error-warning-line" })])) : (D(), v(ye, {
202
202
  key: 1,
203
203
  state: e.state,
204
204
  sample: e.sample,
@@ -208,18 +208,18 @@ var P = {
208
208
  "sample",
209
209
  "spectrum"
210
210
  ])),
211
- x("div", ve, [x("span", { class: T(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), b("span", ye)) : y("", !0), te(" " + k(a.value), 1)], 2), e.error ? (D(), b("p", {
211
+ x("div", R, [x("span", { class: T(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), b("span", be)) : y("", !0), te(" " + k(a.value), 1)], 2), e.error ? (D(), b("p", {
212
212
  key: 0,
213
213
  class: "pk-voice-session__detail",
214
214
  title: e.rawError ?? e.error
215
- }, k(e.error), 9, be)) : y("", !0)]),
215
+ }, k(e.error), 9, xe)) : y("", !0)]),
216
216
  o.value ? (D(), b("span", {
217
217
  key: 2,
218
218
  class: T(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
219
219
  title: j(i)("hint.voiceRemaining"),
220
220
  "aria-hidden": "true"
221
- }, k(o.value), 11, xe)) : y("", !0),
222
- x("div", Se, [e.error ? (D(), b(h, { key: 0 }, [S(u, {
221
+ }, k(o.value), 11, Se)) : y("", !0),
222
+ x("div", Ce, [e.error ? (D(), b(h, { key: 0 }, [S(u, {
223
223
  icon: "ri:refresh-line",
224
224
  label: j(i)("action.retry"),
225
225
  onClick: n[0] ||= (e) => r("retry")
@@ -256,7 +256,7 @@ var P = {
256
256
  ], 2);
257
257
  };
258
258
  }
259
- }), we = (e) => {
259
+ }), Te = (e) => {
260
260
  let t = ce(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
261
261
  u &&= (clearInterval(u), void 0), s.value = void 0;
262
262
  }, m = (e) => {
@@ -380,12 +380,12 @@ var P = {
380
380
  readLevel: ee,
381
381
  readSpectrum: te
382
382
  };
383
- }, Te = 4e3, Ee = [
383
+ }, Ee = 4e3, De = [
384
384
  3e3,
385
385
  5e3,
386
386
  1e4
387
- ], De = 12e4, B = 3e4;
388
- function Oe(e) {
387
+ ], Oe = 12e4, ke = 3e4;
388
+ function Ae(e) {
389
389
  let t = O(null), n = O(!1), r, i = !1, a = () => {
390
390
  clearTimeout(r), r = void 0;
391
391
  }, o = (e, t) => {
@@ -403,12 +403,12 @@ function Oe(e) {
403
403
  }
404
404
  let r = t.value;
405
405
  if (r) {
406
- let e = Date.parse(r.dueAt) - Date.now() + Te;
407
- o(Math.max(Te, e), () => l(r.wakeId, Date.now(), 0));
406
+ let e = Date.parse(r.dueAt) - Date.now() + Ee;
407
+ o(Math.max(Ee, e), () => l(r.wakeId, Date.now(), 0));
408
408
  }
409
409
  }
410
410
  async function l(t, n, r) {
411
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= De ? await c() : o(Ee[Math.min(r, Ee.length - 1)], () => l(t, n, r + 1)));
411
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Oe ? await c() : o(De[Math.min(r, De.length - 1)], () => l(t, n, r + 1)));
412
412
  }
413
413
  async function u() {
414
414
  n.value = !0;
@@ -428,7 +428,7 @@ function Oe(e) {
428
428
  }
429
429
  let m = () => p();
430
430
  return document.addEventListener("visibilitychange", m), M(() => t.value?.wakeId, (e) => {
431
- clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, B));
431
+ clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, ke));
432
432
  }), E(() => {
433
433
  i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
434
434
  }), {
@@ -441,16 +441,16 @@ function Oe(e) {
441
441
  }
442
442
  //#endregion
443
443
  //#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
444
- var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
444
+ var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
445
445
  key: 1,
446
446
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
447
- }, je = { class: "pk-chatbot-view-chat__agent-chip" }, Me = {
447
+ }, Ne = { class: "pk-chatbot-view-chat__agent-chip" }, Pe = {
448
448
  key: 0,
449
449
  class: "pk-chatbot-view-chat__agent-chip-name"
450
- }, Ne = {
450
+ }, Fe = {
451
451
  key: 0,
452
452
  class: "pk-chatbot-view-chat__drop-overlay"
453
- }, Pe = 3e3, Fe = 6e4, Ie = 3e5, Le = 6e5, Re = /* @__PURE__ */ w({
453
+ }, Ie = 3e3, Le = 6e4, Re = 3e5, ze = 6e5, z = /* @__PURE__ */ w({
454
454
  __name: "PkChatbotViewChat",
455
455
  props: {
456
456
  agentId: {},
@@ -459,66 +459,66 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
459
459
  },
460
460
  emits: ["show-info", "revise"],
461
461
  setup(a, { emit: u }) {
462
- let h = C(() => import("./PkToolShowForm-DdFBwLMf.js").then((e) => e.n)), te = C(() => import("./PkToolShowContactForm-CRLEkYSE.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-Cl3Pswi4.js").then((e) => e.n)), re = C(() => import("./PkToolShowSources-B8Euk3rp.js").then((e) => e.n)), ie = C(() => import("./PkToolRequestGeolocation-DG4-qKRq.js")), ae = C(() => import("./PkToolRequestOAuthConnection-CZhNEM-o.js")), oe = C(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = C(() => import("./PkToolShowDiagram-j4FJ34Ta.js")), ce = C(() => import("./PkToolEditSpreadsheet-Dcp3VFzY.js")), A = a, me = u, P = r(A.agentId), { agentInterface: F, agentFileUpload: I, agentVoice: he, actions: L, revisedAnswers: _e, messages: R, chat: z, messageFeedbacks: ve, feedbackDialogMessage: ye, isFeedbackSubmitting: be, isFeedbackSubmitted: xe, feedbackSubmitError: Se, isLeadSubmitted: Te, isLoadingSubmitLead: Ee, submitLeadError: De, input: B, inputMessagePlaceholder: Re, isConversationBlocked: ze, baseUrl: Be, pendingAttachments: Ve, isAttachmentLimitReached: He, fileLimitError: Ue, apiClient: V, isDark: We } = fe(P), Ge = (e) => V.value.getMediaDownloadUrl(A.agentId, P.localChatId, e), { handleSubmit: Ke, stopGeneration: qe, regenerate: Je, onUpvote: Ye, onDownvote: Xe, onFeedback: Ze, onFeedbackSubmit: Qe, onLeadSubmit: $e, startNewChat: et, addToolOutput: H, addToolApprovalResponse: tt, handleFileSelect: nt, clearFileLimitError: rt, refreshMessages: it, appendMessage: at } = P, { t: U } = ue({ useScope: "global" }), ot = _(() => {
463
- let e = Ue.value;
462
+ let h = C(() => import("./PkToolShowForm-BIsu4XhQ.js").then((e) => e.n)), te = C(() => import("./PkToolShowContactForm-D0CR80e2.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-Cl3Pswi4.js").then((e) => e.n)), re = C(() => import("./PkToolShowSources-CxUDh6cC.js").then((e) => e.n)), ie = C(() => import("./PkToolRequestGeolocation-DG4-qKRq.js")), ae = C(() => import("./PkToolRequestOAuthConnection-CZhNEM-o.js")), oe = C(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = C(() => import("./PkToolShowDiagram-CYpqqWLo.js")), ce = C(() => import("./PkToolEditSpreadsheet-Dcp3VFzY.js")), A = a, me = u, P = r(A.agentId), { agentInterface: F, agentFileUpload: he, agentType: ge, agentVoice: I, actions: ve, revisedAnswers: ye, messages: L, chat: R, messageFeedbacks: be, feedbackDialogMessage: xe, isFeedbackSubmitting: Se, isFeedbackSubmitted: Ce, feedbackSubmitError: Ee, isLeadSubmitted: De, isLoadingSubmitLead: Oe, submitLeadError: ke, input: z, inputMessagePlaceholder: Be, isConversationBlocked: Ve, baseUrl: He, pendingAttachments: Ue, isAttachmentLimitReached: We, fileLimitError: Ge, apiClient: B, isDark: Ke } = fe(P), V = _(() => ge.value === "reasoning" ? void 0 : he.value), qe = (e) => B.value.getMediaDownloadUrl(A.agentId, P.localChatId, e), { handleSubmit: Je, stopGeneration: Ye, regenerate: Xe, onUpvote: Ze, onDownvote: Qe, onFeedback: $e, onFeedbackSubmit: et, onLeadSubmit: tt, startNewChat: nt, addToolOutput: H, addToolApprovalResponse: rt, handleFileSelect: it, clearFileLimitError: at, refreshMessages: ot, appendMessage: st } = P, { t: U } = ue({ useScope: "global" }), ct = _(() => {
463
+ let e = Ge.value;
464
464
  if (e) return e.reason === "per-chat" ? U("message.fileLimitPerChat", { max: e.max }) : U("message.fileLimitPerMessage", { max: e.max });
465
- }), st = c(() => F.value?.dismissableNotice), ct = _(() => R.value.some((e) => e.role === "user")), lt = _(() => A.modifier === "fullscreen" && !ct.value), ut = pe(F, () => A.userName), dt = le("chatViewEl"), ft = async (e) => (await V.value.expandSourceContext(A.agentId, e.documentId, e.chunkIndex)).content, pt = async (e) => {
466
- let t = await V.value.downloadSourceDocument(A.agentId, e);
465
+ }), lt = c(() => F.value?.dismissableNotice), ut = _(() => L.value.some((e) => e.role === "user")), dt = _(() => A.modifier === "fullscreen" && !ut.value), ft = pe(F, () => A.userName), pt = le("chatViewEl"), mt = async (e) => (await B.value.expandSourceContext(A.agentId, e.documentId, e.chunkIndex)).content, ht = async (e) => {
466
+ let t = await B.value.downloadSourceDocument(A.agentId, e);
467
467
  window.open(t.downloadUrl, "_blank");
468
- }, { isOverDropZone: mt } = de(dt, {
469
- dataTypes: (e) => t(e, I.value?.allowedMimeTypes ?? []),
468
+ }, { isOverDropZone: gt } = de(pt, {
469
+ dataTypes: (e) => t(e, V.value?.allowedMimeTypes ?? []),
470
470
  onDrop: (e) => {
471
- if (I.value?.enabled && e) for (let t of e) nt(t);
471
+ if (V.value?.enabled && e) for (let t of e) it(t);
472
472
  }
473
- }), W = O(!1), G = !1, K = O(!1), ht = [
473
+ }), W = O(!1), G = !1, K = O(!1), _t = [
474
474
  3e3,
475
475
  5e3,
476
476
  1e4
477
- ], q, J, Y = !1, X = 0, gt = !1;
478
- function _t() {
477
+ ], q, J, Y = !1, X = 0, vt = !1;
478
+ function yt() {
479
479
  clearTimeout(q), q = void 0, J = void 0, Y = !1, X = 0, K.value = !1;
480
480
  }
481
- function vt(e) {
481
+ function bt(e) {
482
482
  G || (clearTimeout(q), q = setTimeout(() => {
483
- yt();
483
+ xt();
484
484
  }, e));
485
485
  }
486
- async function yt() {
487
- if (G || gt) return;
488
- gt = !0;
486
+ async function xt() {
487
+ if (G || vt) return;
488
+ vt = !0;
489
489
  let e;
490
490
  try {
491
- e = await it();
491
+ e = await ot();
492
492
  } finally {
493
- gt = !1;
493
+ vt = !1;
494
494
  }
495
495
  if (G) return;
496
496
  if (e === "caught-up" && (K.value = !1), Z.isActive.value) {
497
- J = void 0, Y = !1, X = 0, vt(Pe);
497
+ J = void 0, Y = !1, X = 0, bt(Ie);
498
498
  return;
499
499
  }
500
500
  J === void 0 && (J = Date.now(), Y = !!Z.error.value);
501
501
  let t = Date.now() - J;
502
- if (e === "caught-up" && t >= (Y ? Ie : Fe) || t >= Le) {
503
- _t();
502
+ if (e === "caught-up" && t >= (Y ? Re : Le) || t >= ze) {
503
+ yt();
504
504
  return;
505
505
  }
506
- let n = ht[Math.min(X, ht.length - 1)];
507
- X += 1, vt(n);
506
+ let n = _t[Math.min(X, _t.length - 1)];
507
+ X += 1, bt(n);
508
508
  }
509
- let bt = (e = 1200) => {
510
- vt(e);
511
- }, Z = we({
509
+ let St = (e = 1200) => {
510
+ bt(e);
511
+ }, Z = Te({
512
512
  fetchGrant: async () => {
513
- let e = await V.value.createVoiceSession(A.agentId, P.localChatId, {
513
+ let e = await B.value.createVoiceSession(A.agentId, P.localChatId, {
514
514
  deviceContext: P.buildDeviceContext(),
515
515
  externalContext: P.externalContext
516
516
  });
517
517
  return e.chatId !== P.localChatId && (P.localChatId = e.chatId), e;
518
518
  },
519
- closeGrant: (e) => V.value.closeVoiceSession(A.agentId, e),
519
+ closeGrant: (e) => B.value.closeVoiceSession(A.agentId, e),
520
520
  onTranscript: (e) => {
521
- e.role === "user" ? (K.value = !0, at({
521
+ e.role === "user" ? (K.value = !0, st({
522
522
  id: `${i}user-${n()}`,
523
523
  role: "user",
524
524
  parts: [{
@@ -528,46 +528,46 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
528
528
  })) : K.value = !1;
529
529
  },
530
530
  onTurnEnd: () => {
531
- bt();
531
+ St();
532
532
  }
533
533
  });
534
534
  M(() => Z.error.value, (e) => {
535
535
  e && (K.value = !1);
536
536
  });
537
- let xt = _(() => he.value?.enabled === !0), St = _(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Ct = _(() => {
537
+ let Ct = _(() => I.value?.enabled === !0), wt = _(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), Tt = _(() => {
538
538
  let e = Z.error.value;
539
539
  if (e) return /took too long/i.test(e) ? U("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? U("message.voiceNoAnswer") : U("message.voiceInterrupted");
540
- }), wt = _(() => Z.isSpeaking.value ? "output" : "input"), Tt = () => Z.readLevel(wt.value), Et = () => Z.readSpectrum(wt.value), Dt = async () => {
541
- W.value = !1, await Z.start(), Z.isActive.value && (_t(), vt(Pe));
542
- }, Ot = async () => {
543
- K.value = !1, await Z.stop(), !G && bt(0);
544
- }, kt = () => {
545
- Z.dismissError();
540
+ }), Et = _(() => Z.isSpeaking.value ? "output" : "input"), Dt = () => Z.readLevel(Et.value), Ot = () => Z.readSpectrum(Et.value), kt = async () => {
541
+ W.value = !1, await Z.start(), Z.isActive.value && (yt(), bt(Ie));
546
542
  }, At = async () => {
547
- Z.dismissError(), await Z.stop(), await Dt();
548
- }, Q = (e) => e?.toolCallId ?? "", jt = O(/* @__PURE__ */ new Set()), Mt = (e) => jt.value.has(Q(e)), Nt = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (jt.value = new Set(jt.value).add(Q(e)), bt()), !0) : !1, Pt = (e, t, n) => {
543
+ K.value = !1, await Z.stop(), !G && St(0);
544
+ }, jt = () => {
545
+ Z.dismissError();
546
+ }, Mt = async () => {
547
+ Z.dismissError(), await Z.stop(), await kt();
548
+ }, Q = (e) => e?.toolCallId ?? "", Nt = O(/* @__PURE__ */ new Set()), Pt = (e) => Nt.value.has(Q(e)), Ft = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (Nt.value = new Set(Nt.value).add(Q(e)), St()), !0) : !1, It = (e, t, n) => {
549
549
  $(t, s(t, n)) || H({
550
550
  tool: e,
551
551
  toolCallId: Q(t),
552
552
  output: n
553
553
  });
554
- }, Ft = (e) => {
554
+ }, Lt = (e) => {
555
555
  let t = e.confirmed ? U("message.voiceConfirmed") : U("message.voiceCancelled");
556
- $({ toolCallId: e.toolCallId }, t) ? jt.value.has(e.toolCallId) && (Nt.value = new Map(Nt.value).set(e.toolCallId, e.confirmed)) : H({
556
+ $({ toolCallId: e.toolCallId }, t) ? Nt.value.has(e.toolCallId) && (Ft.value = new Map(Ft.value).set(e.toolCallId, e.confirmed)) : H({
557
557
  tool: "requestConfirm",
558
558
  toolCallId: e.toolCallId,
559
559
  output: e.confirmed ? "confirmed" : "cancelled"
560
560
  });
561
- }, It = (e, t) => {
562
- $(e, t) || (B.value = t, Ke());
563
- }, Lt = (e, t) => {
561
+ }, Rt = (e, t) => {
562
+ $(e, t) || (z.value = t, Je());
563
+ }, zt = (e, t) => {
564
564
  let n = t.error ? U("message.voiceLocationRefused") : U("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
565
565
  $(e, n) || H({
566
566
  tool: "requestGeolocation",
567
567
  toolCallId: Q(e),
568
568
  output: t
569
569
  });
570
- }, Rt = (e, t) => {
570
+ }, Bt = (e, t) => {
571
571
  $(e, U("message.voiceConnectionDone")) || H({
572
572
  tool: "requestOAuthConnection",
573
573
  toolCallId: Q(e),
@@ -576,40 +576,40 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
576
576
  mcpServerId: t
577
577
  }
578
578
  });
579
- }, zt = () => {
579
+ }, Vt = () => {
580
580
  W.value = !W.value, Z.setMuted(W.value);
581
581
  };
582
582
  E(() => {
583
- G = !0, _t();
583
+ G = !0, yt();
584
584
  });
585
- let { pendingWakeup: Bt, isStopping: Vt, check: Ht, reset: Ut, stop: Wt } = Oe({
585
+ let { pendingWakeup: Ht, isStopping: Ut, check: Wt, reset: Gt, stop: Kt } = Ae({
586
586
  agentId: () => A.agentId,
587
587
  chatId: () => P.localChatId,
588
- apiClient: () => V.value,
589
- messages: () => R.value,
590
- refreshMessages: it
588
+ apiClient: () => B.value,
589
+ messages: () => L.value,
590
+ refreshMessages: ot
591
591
  });
592
- return M([() => P.localChatId, ct], ([, e]) => {
593
- Ut(), e && Ht();
594
- }, { immediate: !0 }), M(() => z.value.status, (e, t) => {
595
- e === "ready" && t !== "ready" && ct.value && Ht();
592
+ return M([() => P.localChatId, ut], ([, e]) => {
593
+ Gt(), e && Wt();
594
+ }, { immediate: !0 }), M(() => R.value.status, (e, t) => {
595
+ e === "ready" && t !== "ready" && ut.value && Wt();
596
596
  }), (t, n) => {
597
597
  let r = m;
598
598
  return D(), b("div", {
599
599
  ref_key: "chatViewEl",
600
- ref: dt,
600
+ ref: pt,
601
601
  class: T(["pk-chatbot-view-chat", {
602
- "pk-chatbot-view-chat--dragover": j(mt) && j(I)?.enabled,
603
- "pk-chatbot-view-chat--empty": lt.value
602
+ "pk-chatbot-view-chat--dragover": j(gt) && V.value?.enabled,
603
+ "pk-chatbot-view-chat--empty": dt.value
604
604
  }])
605
605
  }, [
606
606
  S(g, {
607
607
  name: "pk-chatbot-view-chat-fade",
608
608
  mode: "out-in"
609
609
  }, {
610
- default: N(() => [lt.value ? (D(), v(f, {
610
+ default: N(() => [dt.value ? (D(), v(f, {
611
611
  key: 0,
612
- greeting: j(ut),
612
+ greeting: j(ft),
613
613
  logo: j(F)?.logo,
614
614
  name: j(P).name
615
615
  }, null, 8, [
@@ -620,44 +620,44 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
620
620
  key: 1,
621
621
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
622
622
  interactive: "",
623
- messages: j(R),
624
- "confirm-verdicts-on-call": Nt.value,
625
- status: j(z).status,
626
- error: j(z).error,
623
+ messages: j(L),
624
+ "confirm-verdicts-on-call": Ft.value,
625
+ status: j(R).status,
626
+ error: j(R).error,
627
627
  "main-color": j(F)?.mainColor,
628
628
  "text-color": j(F)?.textColor,
629
- "revised-answers": j(_e),
630
- actions: j(L),
631
- "message-feedbacks": j(ve),
632
- "feedback-message-id": j(ye)?.id,
633
- "feedback-loading": j(be),
634
- "feedback-submitted": j(xe),
635
- "feedback-error": j(Se),
629
+ "revised-answers": j(ye),
630
+ actions: j(ve),
631
+ "message-feedbacks": j(be),
632
+ "feedback-message-id": j(xe)?.id,
633
+ "feedback-loading": j(Se),
634
+ "feedback-submitted": j(Ce),
635
+ "feedback-error": j(Ee),
636
636
  "show-extended-steps": j(F)?.showExtendedSteps,
637
637
  "awaiting-spoken-answer": K.value,
638
- "is-dark": j(We),
638
+ "is-dark": j(Ke),
639
639
  "show-scroll-to-bottom": a.modifier === "fullscreen",
640
- onFeedbackSubmit: n[0] ||= (e) => j(Qe)(e),
641
- onFeedbackClose: n[1] ||= (e) => ye.value = void 0,
642
- onRegenerate: j(Je),
643
- onAutoRetry: j(Je),
644
- onResetChat: j(et),
640
+ onFeedbackSubmit: n[0] ||= (e) => j(et)(e),
641
+ onFeedbackClose: n[1] ||= (e) => xe.value = void 0,
642
+ onRegenerate: j(Xe),
643
+ onAutoRetry: j(Xe),
644
+ onResetChat: j(nt),
645
645
  onShowInfo: n[2] ||= (e) => me("show-info", e),
646
646
  onRevise: n[3] ||= (e) => me("revise", e),
647
- onUpvote: j(Ye),
648
- onDownvote: j(Xe),
649
- onFeedback: j(Ze),
650
- onApprovalRespond: j(tt),
651
- onConfirmRespond: Ft
647
+ onUpvote: j(Ze),
648
+ onDownvote: j(Qe),
649
+ onFeedback: j($e),
650
+ onApprovalRespond: j(rt),
651
+ onConfirmRespond: Lt
652
652
  }, {
653
653
  "tool-showContactForm": N(({ part: e }) => [S(j(te), {
654
654
  part: e,
655
- readonly: !j(Be),
656
- submitted: j(Te),
657
- loading: j(Ee),
658
- error: j(De),
655
+ readonly: !j(He),
656
+ submitted: j(De),
657
+ loading: j(Oe),
658
+ error: j(ke),
659
659
  "privacy-policy-notice": j(F)?.privacyPolicyNotice,
660
- onSubmit: j($e)
660
+ onSubmit: j(tt)
661
661
  }, null, 8, [
662
662
  "part",
663
663
  "readonly",
@@ -669,18 +669,18 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
669
669
  ])]),
670
670
  "tool-showSuggestedReply": N(({ part: e }) => [S(j(w), {
671
671
  part: e,
672
- onSelect: (t) => It(e, t)
672
+ onSelect: (t) => Rt(e, t)
673
673
  }, null, 8, ["part", "onSelect"])]),
674
674
  "tool-showSources": N(({ part: e }) => [S(j(re), {
675
675
  part: e,
676
- "on-expand-context": ft,
677
- "on-download": pt
676
+ "on-expand-context": mt,
677
+ "on-download": ht
678
678
  }, null, 8, ["part"])]),
679
679
  "tool-showForm": N(({ part: e }) => [S(g, { mode: "out-in" }, {
680
680
  default: N(() => [S(j(h), {
681
681
  part: e,
682
- answered: Mt(e),
683
- onSelect: (t) => Pt("showForm", e, t)
682
+ answered: Pt(e),
683
+ onSelect: (t) => It("showForm", e, t)
684
684
  }, null, 8, [
685
685
  "part",
686
686
  "answered",
@@ -692,8 +692,8 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
692
692
  default: N(() => [S(j(h), {
693
693
  part: e,
694
694
  "allow-custom-answer": "",
695
- answered: Mt(e),
696
- onSelect: (t) => Pt("showMultipleChoice", e, t)
695
+ answered: Pt(e),
696
+ onSelect: (t) => It("showMultipleChoice", e, t)
697
697
  }, null, 8, [
698
698
  "part",
699
699
  "answered",
@@ -703,10 +703,10 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
703
703
  }, 1024)]),
704
704
  "tool-requestOAuthConnection": N(({ part: e }) => [S(j(ae), {
705
705
  part: e,
706
- "backend-url": j(Be),
707
- "resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(A.agentId, e),
708
- "check-connection": (e) => j(V).getOAuthConnectionStatus(A.agentId, e),
709
- onConnected: (t) => Rt(e, t)
706
+ "backend-url": j(He),
707
+ "resolve-connection": (e) => j(B).getOAuthAuthorizeUrl(A.agentId, e),
708
+ "check-connection": (e) => j(B).getOAuthConnectionStatus(A.agentId, e),
709
+ onConnected: (t) => Bt(e, t)
710
710
  }, null, 8, [
711
711
  "part",
712
712
  "backend-url",
@@ -717,8 +717,8 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
717
717
  "tool-requestGeolocation": N(({ part: e }) => [S(j(ie), {
718
718
  part: e,
719
719
  "call-live": j(Z).isActive.value,
720
- "reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
721
- onResult: (t) => Lt(e, t)
720
+ "reverse-geocode": (e, t) => j(B).reverseGeocode(e, t),
721
+ onResult: (t) => zt(e, t)
722
722
  }, null, 8, [
723
723
  "part",
724
724
  "call-live",
@@ -727,9 +727,9 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
727
727
  ])]),
728
728
  "tool-showLocation": N(({ part: e }) => [S(j(oe), {
729
729
  part: e,
730
- "is-dark": j(We),
730
+ "is-dark": j(Ke),
731
731
  "main-color": j(F)?.mainColor,
732
- "forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
732
+ "forward-geocode": (e, t) => j(B).forwardGeocode(e, t)
733
733
  }, null, 8, [
734
734
  "part",
735
735
  "is-dark",
@@ -738,12 +738,12 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
738
738
  ])]),
739
739
  "tool-showDiagram": N(({ part: e }) => [S(j(se), {
740
740
  part: e,
741
- "is-dark": j(We)
741
+ "is-dark": j(Ke)
742
742
  }, null, 8, ["part", "is-dark"])]),
743
743
  "tool-editSpreadsheet": N(({ part: e }) => [(D(), v(j(ce), {
744
744
  key: j(o)(e),
745
745
  part: e,
746
- "file-url": Ge
746
+ "file-url": qe
747
747
  }, null, 8, ["part"]))]),
748
748
  _: 1
749
749
  }, 8, [
@@ -774,52 +774,52 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
774
774
  ]))]),
775
775
  _: 1
776
776
  }),
777
- x("div", ke, [
777
+ x("div", je, [
778
778
  S(g, { name: "pk-chatbot-view-chat-fade" }, {
779
- default: N(() => [lt.value ? (D(), v(ge, {
779
+ default: N(() => [dt.value ? (D(), v(_e, {
780
780
  key: 0,
781
781
  class: "pk-chatbot-view-chat__aurora",
782
782
  "source-selector": ".pk-chatbot-input__form"
783
783
  })) : y("", !0)]),
784
784
  _: 1
785
785
  }),
786
- j(Bt) && !j(ze) ? (D(), v(p, {
786
+ j(Ht) && !j(Ve) ? (D(), v(p, {
787
787
  key: 0,
788
- pending: j(Bt),
789
- stopping: j(Vt),
790
- onStop: j(Wt)
788
+ pending: j(Ht),
789
+ stopping: j(Ut),
790
+ onStop: j(Kt)
791
791
  }, null, 8, [
792
792
  "pending",
793
793
  "stopping",
794
794
  "onStop"
795
795
  ])) : y("", !0),
796
- j(ze) ? (D(), b("div", Ae, k(j(U)("message.chatErrorConversationBlocked")), 1)) : St.value === "idle" ? (D(), v(d, {
796
+ j(Ve) ? (D(), b("div", Me, k(j(U)("message.chatErrorConversationBlocked")), 1)) : wt.value === "idle" ? (D(), v(d, {
797
797
  key: 3,
798
- modelValue: j(B),
799
- "onUpdate:modelValue": n[4] ||= (e) => ne(B) ? B.value = e : null,
800
- "pending-attachments": j(Ve),
801
- "onUpdate:pendingAttachments": n[5] ||= (e) => ne(Ve) ? Ve.value = e : null,
802
- placeholder: j(Re),
803
- "dismissable-notice": j(st) && j(z).messages.length <= 1 ? j(st) : void 0,
804
- status: j(z).status,
798
+ modelValue: j(z),
799
+ "onUpdate:modelValue": n[4] ||= (e) => ne(z) ? z.value = e : null,
800
+ "pending-attachments": j(Ue),
801
+ "onUpdate:pendingAttachments": n[5] ||= (e) => ne(Ue) ? Ue.value = e : null,
802
+ placeholder: j(Be),
803
+ "dismissable-notice": j(lt) && j(R).messages.length <= 1 ? j(lt) : void 0,
804
+ status: j(R).status,
805
805
  "max-message-length": j(F)?.maxMessageLength,
806
- "file-upload": j(I),
807
- "attachment-limit-reached": j(He),
808
- "attachment-notice": ot.value,
809
- "voice-enabled": xt.value,
810
- onStopGeneration: j(qe),
811
- onSubmit: j(Ke),
812
- onFileSelect: j(nt),
813
- onDismissAttachmentNotice: j(rt),
814
- onVoiceStart: Dt
806
+ "file-upload": V.value,
807
+ "attachment-limit-reached": j(We),
808
+ "attachment-notice": ct.value,
809
+ "voice-enabled": Ct.value,
810
+ onStopGeneration: j(Ye),
811
+ onSubmit: j(Je),
812
+ onFileSelect: j(it),
813
+ onDismissAttachmentNotice: j(at),
814
+ onVoiceStart: kt
815
815
  }, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
816
816
  name: "prepend",
817
- fn: N(() => [x("span", je, [S(l, {
817
+ fn: N(() => [x("span", Ne, [S(l, {
818
818
  modifiers: "surface",
819
819
  class: "pk-chatbot-view-chat__agent-chip-avatar",
820
820
  "img-src": j(F)?.logo,
821
821
  name: j(P).name
822
- }, null, 8, ["img-src", "name"]), j(P).name ? (D(), b("strong", Me, k(j(P).name), 1)) : y("", !0)])]),
822
+ }, null, 8, ["img-src", "name"]), j(P).name ? (D(), b("strong", Pe, k(j(P).name), 1)) : y("", !0)])]),
823
823
  key: "0"
824
824
  } : void 0]), 1032, [
825
825
  "modelValue",
@@ -836,21 +836,21 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
836
836
  "onSubmit",
837
837
  "onFileSelect",
838
838
  "onDismissAttachmentNotice"
839
- ])) : (D(), v(Ce, {
839
+ ])) : (D(), v(we, {
840
840
  key: 2,
841
- state: St.value,
842
- sample: Tt,
843
- spectrum: Et,
841
+ state: wt.value,
842
+ sample: Dt,
843
+ spectrum: Ot,
844
844
  "remaining-seconds": j(Z).remainingSeconds.value,
845
845
  muted: W.value,
846
- error: Ct.value,
846
+ error: Tt.value,
847
847
  "raw-error": j(Z).error.value,
848
848
  live: j(Z).isActive.value,
849
849
  class: "pk-chatbot-view-chat__voice",
850
- onToggleMute: zt,
851
- onHangUp: Ot,
852
- onRetry: At,
853
- onDismiss: kt
850
+ onToggleMute: Vt,
851
+ onHangUp: At,
852
+ onRetry: Mt,
853
+ onDismiss: jt
854
854
  }, null, 8, [
855
855
  "state",
856
856
  "remaining-seconds",
@@ -861,7 +861,7 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
861
861
  ]))
862
862
  ]),
863
863
  S(g, null, {
864
- default: N(() => [j(mt) && j(I)?.enabled ? (D(), b("div", Ne, [S(r, {
864
+ default: N(() => [j(gt) && V.value?.enabled ? (D(), b("div", Fe, [S(r, {
865
865
  name: "ri:upload-cloud-2-line",
866
866
  class: "pk-chatbot-view-chat__drop-overlay-icon"
867
867
  }), x("span", null, k(j(U)("action.dropFile")), 1)])) : y("", !0)]),
@@ -872,6 +872,6 @@ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
872
872
  }
873
873
  });
874
874
  //#endregion
875
- export { ge as i, Ce as n, R as r, Re as t };
875
+ export { _e as i, we as n, ye as r, z as t };
876
876
 
877
- //# sourceMappingURL=PkChatbotViewChat-dJE2iHPN.js.map
877
+ //# sourceMappingURL=PkChatbotViewChat-BtbE6V2u.js.map