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

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 (133) hide show
  1. package/dist/_chunks/{Agent-Gdgpd3LA.js → Agent-DU38SnNd.js} +411 -247
  2. package/dist/_chunks/Agent-DU38SnNd.js.map +1 -0
  3. package/dist/_chunks/{PkChatbotFilePreview-3i9jZIdS.js → PkChatbotFilePreview-Bdi4_IFu.js} +2 -2
  4. package/dist/_chunks/PkChatbotFilePreview-Bdi4_IFu.js.map +1 -0
  5. package/dist/_chunks/{PkStreamingMarkdown-B1t1tBvW.js → PkStreamingMarkdown-xnhBbPf5.js} +3 -3
  6. package/dist/_chunks/{PkStreamingMarkdown-B1t1tBvW.js.map → PkStreamingMarkdown-xnhBbPf5.js.map} +1 -1
  7. package/dist/_chunks/{PkToolEditSpreadsheet-Xzum_9NH.js → PkToolEditSpreadsheet-Ct9pdQJ1.js} +3 -3
  8. package/dist/_chunks/{PkToolEditSpreadsheet-Xzum_9NH.js.map → PkToolEditSpreadsheet-Ct9pdQJ1.js.map} +1 -1
  9. package/dist/_chunks/{PkToolRequestGeolocation-PxhQxMP1.js → PkToolRequestGeolocation-DzhrY8bg.js} +2 -2
  10. package/dist/_chunks/{PkToolRequestGeolocation-PxhQxMP1.js.map → PkToolRequestGeolocation-DzhrY8bg.js.map} +1 -1
  11. package/dist/_chunks/{PkToolRequestOAuthConnection-W3ilzpr7.js → PkToolRequestOAuthConnection-CzRKRGoG.js} +2 -2
  12. package/dist/_chunks/{PkToolRequestOAuthConnection-W3ilzpr7.js.map → PkToolRequestOAuthConnection-CzRKRGoG.js.map} +1 -1
  13. package/dist/_chunks/{PkToolShowArtifact-DGGEb2LF.js → PkToolShowArtifact-DPt1qDUk.js} +2 -2
  14. package/dist/_chunks/{PkToolShowArtifact-DGGEb2LF.js.map → PkToolShowArtifact-DPt1qDUk.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowContactForm-Dn6CEXF_.js → PkToolShowContactForm-OdC7bsXd.js} +2 -2
  16. package/dist/_chunks/{PkToolShowContactForm-Dn6CEXF_.js.map → PkToolShowContactForm-OdC7bsXd.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowForm-CbuToc8O.js → PkToolShowForm-uFmaQoI1.js} +3 -3
  18. package/dist/_chunks/{PkToolShowForm-CbuToc8O.js.map → PkToolShowForm-uFmaQoI1.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowImageGallery-Dh0v2Df8.js → PkToolShowImageGallery-KmMO4UuQ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowImageGallery-Dh0v2Df8.js.map → PkToolShowImageGallery-KmMO4UuQ.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowProductList-bAis8u1t.js → PkToolShowProductList-cld-FOFb.js} +2 -2
  22. package/dist/_chunks/{PkToolShowProductList-bAis8u1t.js.map → PkToolShowProductList-cld-FOFb.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowSources-B1zXilsH.js → PkToolShowSources-BlpCKc4N.js} +3 -3
  24. package/dist/_chunks/{PkToolShowSources-B1zXilsH.js.map → PkToolShowSources-BlpCKc4N.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSuggestedReply-BISQY1ce.js → PkToolShowSuggestedReply-xUBuqStM.js} +2 -2
  26. package/dist/_chunks/{PkToolShowSuggestedReply-BISQY1ce.js.map → PkToolShowSuggestedReply-xUBuqStM.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowVideo-DcMzLibC.js → PkToolShowVideo-KDNxItWl.js} +2 -2
  28. package/dist/_chunks/{PkToolShowVideo-DcMzLibC.js.map → PkToolShowVideo-KDNxItWl.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowWebPages-RuwkZDMH.js → PkToolShowWebPages-D35B7GzS.js} +2 -2
  30. package/dist/_chunks/{PkToolShowWebPages-RuwkZDMH.js.map → PkToolShowWebPages-D35B7GzS.js.map} +1 -1
  31. package/dist/_chunks/{chatImagePolicy-BL4O14e9.js → chatImagePolicy-B_6Xg-r7.js} +2 -2
  32. package/dist/_chunks/{chatImagePolicy-BL4O14e9.js.map → chatImagePolicy-B_6Xg-r7.js.map} +1 -1
  33. package/dist/_chunks/{markdown-DtdG9Krq.js → markdown-BKLfFJPr.js} +2 -2
  34. package/dist/_chunks/{markdown-DtdG9Krq.js.map → markdown-BKLfFJPr.js.map} +1 -1
  35. package/dist/ai-elements.es.js +2067 -2064
  36. package/dist/ai-elements.es.js.map +1 -1
  37. package/dist-vue/PkChatbot.js +1 -1
  38. package/dist-vue/PkChatbotAuth.js +1 -1
  39. package/dist-vue/PkChatbotEmptyState.js +1 -1
  40. package/dist-vue/PkChatbotFilePreview.js +1 -1
  41. package/dist-vue/PkChatbotInput.js +1 -1
  42. package/dist-vue/PkChatbotMessages.js +1 -1
  43. package/dist-vue/PkChatbotStepPayload.js +1 -1
  44. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  45. package/dist-vue/PkChatbotSteps.js +1 -1
  46. package/dist-vue/PkChatbotViewChat.js +1 -1
  47. package/dist-vue/PkChatbotViewConversations.js +1 -1
  48. package/dist-vue/PkChatbotViewFiles.js +1 -1
  49. package/dist-vue/PkChatbotViewProfile.js +1 -1
  50. package/dist-vue/_chunks/{Agent-DGCZCx4Y.js → Agent-DDm9cCaN.js} +2 -2
  51. package/dist-vue/_chunks/{Agent-DGCZCx4Y.js.map → Agent-DDm9cCaN.js.map} +1 -1
  52. package/dist-vue/_chunks/{Document-BZea8ewV.js → Document-CZemm1AR.js} +11 -11
  53. package/dist-vue/_chunks/{Document-BZea8ewV.js.map → Document-CZemm1AR.js.map} +1 -1
  54. package/dist-vue/_chunks/Media-D-UGzdcW.js +301 -0
  55. package/dist-vue/_chunks/Media-D-UGzdcW.js.map +1 -0
  56. package/dist-vue/_chunks/{PkChatbot-BVWLvaXb.js → PkChatbot-DXwMfwN4.js} +8 -8
  57. package/dist-vue/_chunks/{PkChatbot-BVWLvaXb.js.map → PkChatbot-DXwMfwN4.js.map} +1 -1
  58. package/dist-vue/_chunks/{PkChatbotAuth-BVZzjbK9.js → PkChatbotAuth-CHoEXxmg.js} +8 -8
  59. package/dist-vue/_chunks/{PkChatbotAuth-BVZzjbK9.js.map → PkChatbotAuth-CHoEXxmg.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotEmptyState-B7fZ51v1.js → PkChatbotEmptyState-Dve5Ci2Y.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotEmptyState-B7fZ51v1.js.map → PkChatbotEmptyState-Dve5Ci2Y.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotFilePreview-Lxgu89Hg.js → PkChatbotFilePreview-D8XyjDPJ.js} +2 -2
  63. package/dist-vue/_chunks/PkChatbotFilePreview-D8XyjDPJ.js.map +1 -0
  64. package/dist-vue/_chunks/PkChatbotInput-DiCxEime.js +392 -0
  65. package/dist-vue/_chunks/PkChatbotInput-DiCxEime.js.map +1 -0
  66. package/dist-vue/_chunks/{PkChatbotMessages-DHZNG6YM.js → PkChatbotMessages-CTp0NkY2.js} +19 -19
  67. package/dist-vue/_chunks/{PkChatbotMessages-DHZNG6YM.js.map → PkChatbotMessages-CTp0NkY2.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotStepPayload-DuI9ZYqp.js → PkChatbotStepPayload-B1o2DbQz.js} +2 -2
  69. package/dist-vue/_chunks/{PkChatbotStepPayload-DuI9ZYqp.js.map → PkChatbotStepPayload-B1o2DbQz.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B9hBMl15.js → PkChatbotStepToolDetail-DpYV0KLn.js} +3 -3
  71. package/dist-vue/_chunks/{PkChatbotStepToolDetail-B9hBMl15.js.map → PkChatbotStepToolDetail-DpYV0KLn.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbotSteps-3qySSEYh.js → PkChatbotSteps-BPon4zjv.js} +5 -5
  73. package/dist-vue/_chunks/{PkChatbotSteps-3qySSEYh.js.map → PkChatbotSteps-BPon4zjv.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkChatbotViewChat-CLyoZH3C.js → PkChatbotViewChat-dJE2iHPN.js} +237 -236
  75. package/dist-vue/_chunks/PkChatbotViewChat-dJE2iHPN.js.map +1 -0
  76. package/dist-vue/_chunks/{PkChatbotViewConversations-BbXFoEOv.js → PkChatbotViewConversations-DcEcJgwV.js} +3 -3
  77. package/dist-vue/_chunks/{PkChatbotViewConversations-BbXFoEOv.js.map → PkChatbotViewConversations-DcEcJgwV.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkChatbotViewFiles-7vcERhnZ.js → PkChatbotViewFiles-DDEJqXct.js} +3 -3
  79. package/dist-vue/_chunks/{PkChatbotViewFiles-7vcERhnZ.js.map → PkChatbotViewFiles-DDEJqXct.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkChatbotViewProfile-RgFp-LpV.js → PkChatbotViewProfile-B79UynQ8.js} +2 -2
  81. package/dist-vue/_chunks/{PkChatbotViewProfile-RgFp-LpV.js.map → PkChatbotViewProfile-B79UynQ8.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkStreamingMarkdown-Bmm1kZpL.js → PkStreamingMarkdown-CqT_orLj.js} +3 -3
  83. package/dist-vue/_chunks/{PkStreamingMarkdown-Bmm1kZpL.js.map → PkStreamingMarkdown-CqT_orLj.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkSvgViewer-DU8K_gAD.js → PkSvgViewer-CZASatr4.js} +2 -2
  85. package/dist-vue/_chunks/{PkSvgViewer-DU8K_gAD.js.map → PkSvgViewer-CZASatr4.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolEditSpreadsheet-BIQky1RK.js → PkToolEditSpreadsheet-Dcp3VFzY.js} +3 -3
  87. package/dist-vue/_chunks/{PkToolEditSpreadsheet-BIQky1RK.js.map → PkToolEditSpreadsheet-Dcp3VFzY.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolRequestGeolocation-CYEyXZSh.js → PkToolRequestGeolocation-DG4-qKRq.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolRequestGeolocation-CYEyXZSh.js.map → PkToolRequestGeolocation-DG4-qKRq.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-B243GJ1-.js → PkToolRequestOAuthConnection-CZhNEM-o.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-B243GJ1-.js.map → PkToolRequestOAuthConnection-CZhNEM-o.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowArtifact-CJG-B9mE.js → PkToolShowArtifact-Qfkz64NY.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowArtifact-CJG-B9mE.js.map → PkToolShowArtifact-Qfkz64NY.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowContactForm-CG1H7xBz.js → PkToolShowContactForm-CRLEkYSE.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowContactForm-CG1H7xBz.js.map → PkToolShowContactForm-CRLEkYSE.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowDiagram-Cq0457a3.js → PkToolShowDiagram-j4FJ34Ta.js} +3 -3
  97. package/dist-vue/_chunks/{PkToolShowDiagram-Cq0457a3.js.map → PkToolShowDiagram-j4FJ34Ta.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowForm-IJ8B8_yT.js → PkToolShowForm-DdFBwLMf.js} +4 -4
  99. package/dist-vue/_chunks/{PkToolShowForm-IJ8B8_yT.js.map → PkToolShowForm-DdFBwLMf.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowImageGallery-ala8nlAj.js → PkToolShowImageGallery-CxlOwuTJ.js} +3 -3
  101. package/dist-vue/_chunks/{PkToolShowImageGallery-ala8nlAj.js.map → PkToolShowImageGallery-CxlOwuTJ.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkToolShowProductList-BDg84ZQN.js → PkToolShowProductList-dfd3vmhl.js} +2 -2
  103. package/dist-vue/_chunks/{PkToolShowProductList-BDg84ZQN.js.map → PkToolShowProductList-dfd3vmhl.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowSources-DaSijN_L.js → PkToolShowSources-B8Euk3rp.js} +3 -3
  105. package/dist-vue/_chunks/{PkToolShowSources-DaSijN_L.js.map → PkToolShowSources-B8Euk3rp.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkToolShowSuggestedReply-CLEFPrHP.js → PkToolShowSuggestedReply-Cl3Pswi4.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolShowSuggestedReply-CLEFPrHP.js.map → PkToolShowSuggestedReply-Cl3Pswi4.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolShowVideo-FmE-IRE7.js → PkToolShowVideo-C84UrvZ7.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowVideo-FmE-IRE7.js.map → PkToolShowVideo-C84UrvZ7.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowWebPages-B554-MlD.js → PkToolShowWebPages-CzzuVQqL.js} +2 -2
  111. package/dist-vue/_chunks/{PkToolShowWebPages-B554-MlD.js.map → PkToolShowWebPages-CzzuVQqL.js.map} +1 -1
  112. package/dist-vue/_chunks/{createChatbotApiClient-CDS3C4i6.js → createChatbotApiClient-DrUsRvCw.js} +3 -3
  113. package/dist-vue/_chunks/{createChatbotApiClient-CDS3C4i6.js.map → createChatbotApiClient-DrUsRvCw.js.map} +1 -1
  114. package/dist-vue/_chunks/{useChatbotStore-CBjBe7GI.js → useChatbotStore-DHmjHPR5.js} +3 -3
  115. package/dist-vue/_chunks/{useChatbotStore-CBjBe7GI.js.map → useChatbotStore-DHmjHPR5.js.map} +1 -1
  116. package/dist-vue/_chunks/{utils-Cvijhryt.js → utils-7oPvmwwu.js} +2 -2
  117. package/dist-vue/_chunks/{utils-Cvijhryt.js.map → utils-7oPvmwwu.js.map} +1 -1
  118. package/dist-vue/api.js +1 -1
  119. package/dist-vue/composables.js +5 -5
  120. package/dist-vue/composables.js.map +1 -1
  121. package/dist-vue/index.js +5192 -5187
  122. package/dist-vue/index.js.map +1 -1
  123. package/dist-vue/locales.js +2 -0
  124. package/dist-vue/packages/models/src/schema/Media.d.ts +34 -0
  125. package/package.json +1 -1
  126. package/dist/_chunks/Agent-Gdgpd3LA.js.map +0 -1
  127. package/dist/_chunks/PkChatbotFilePreview-3i9jZIdS.js.map +0 -1
  128. package/dist-vue/_chunks/Media-C6RS-s98.js +0 -139
  129. package/dist-vue/_chunks/Media-C6RS-s98.js.map +0 -1
  130. package/dist-vue/_chunks/PkChatbotFilePreview-Lxgu89Hg.js.map +0 -1
  131. package/dist-vue/_chunks/PkChatbotInput-Bo4Ewf6A.js +0 -388
  132. package/dist-vue/_chunks/PkChatbotInput-Bo4Ewf6A.js.map +0 -1
  133. package/dist-vue/_chunks/PkChatbotViewChat-CLyoZH3C.js.map +0 -1
@@ -1,26 +1,27 @@
1
- import { t as e } from "./PkChatbotMessages-DHZNG6YM.js";
2
- import { a as t, n, t as r } from "./useChatbotStore-CBjBe7GI.js";
3
- import { n as i } from "./src-BZRiAJsH.js";
4
- import { p as a, s as o } from "./utils-Cvijhryt.js";
5
- import { t as s } from "./useLocalizedString-PfaKjIQY.js";
6
- import { t as c } from "./PkAvatar-BTqu8tn9.js";
7
- import { n as l, t as u } from "./PkChatbotInput-Bo4Ewf6A.js";
8
- import { t as d } from "./PkChatbotEmptyState-B7fZ51v1.js";
9
- import { t as f } from "./PkChatbotWakeupBar-Cjgarxnw.js";
10
- import { VvIcon as p } from "@volverjs/ui-vue/components";
11
- import { Fragment as m, Transition as h, computed as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as x, createTextVNode as ee, createVNode as S, defineAsyncComponent as C, defineComponent as w, isRef as te, nextTick as ne, normalizeClass as T, onBeforeUnmount as E, onMounted as re, onScopeDispose as ie, onUnmounted as ae, openBlock as D, ref as O, renderList as oe, shallowRef as se, toDisplayString as k, toValue as A, unref as j, useTemplateRef as ce, watch as M, withCtx as N } from "vue";
12
- import { useI18n as le } from "vue-i18n";
13
- import { useDropZone as ue } from "@vueuse/core";
14
- import { storeToRefs as de } from "pinia";
1
+ import { t as e } from "./PkChatbotMessages-CTp0NkY2.js";
2
+ import { o as t } from "./Media-D-UGzdcW.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-DHmjHPR5.js";
4
+ import { n as a } from "./src-BZRiAJsH.js";
5
+ import { p as o, s } from "./utils-7oPvmwwu.js";
6
+ import { t as c } from "./useLocalizedString-PfaKjIQY.js";
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";
10
+ import { t as p } from "./PkChatbotWakeupBar-Cjgarxnw.js";
11
+ import { VvIcon as m } from "@volverjs/ui-vue/components";
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";
13
+ import { useI18n as ue } from "vue-i18n";
14
+ import { useDropZone as de } from "@vueuse/core";
15
+ import { storeToRefs as fe } from "pinia";
15
16
  //#region ../../packages/composable/src/chatbot/useGreeting.ts
16
- function fe(e, t) {
17
- let { locale: n, t: r, te: i } = le({ useScope: "global" });
18
- return g(() => {
17
+ function pe(e, t) {
18
+ let { locale: n, t: r, te: i } = ue({ useScope: "global" });
19
+ return _(() => {
19
20
  let a = A(e);
20
- return pe(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), A(t));
21
+ return me(a?.greeting?.[0]?.[n.value] || a?.initialMessage?.[n.value] || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""), A(t));
21
22
  });
22
23
  }
23
- function pe(e, t) {
24
+ function me(e, t) {
24
25
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
25
26
  }
26
27
  //#endregion
@@ -31,11 +32,11 @@ var P = {
31
32
  }, F = {
32
33
  key: 1,
33
34
  class: "pk-aurora__fallback"
34
- }, I = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", me = "\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}", he = /* @__PURE__ */ w({
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
36
  __name: "PkAuroraCanvas",
36
37
  props: { sourceSelector: {} },
37
38
  setup(e) {
38
- let t = e, n = ce("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
39
+ let t = e, n = le("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
39
40
  if (!i) return null;
40
41
  let n = i.createShader(e);
41
42
  return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
@@ -64,7 +65,7 @@ var P = {
64
65
  }, v = () => {
65
66
  _(), a = requestAnimationFrame(v);
66
67
  };
67
- return re(() => {
68
+ return ie(() => {
68
69
  let e = n.value;
69
70
  i = e?.getContext("webgl", { alpha: !0 }) ?? null;
70
71
  let t = m();
@@ -72,7 +73,7 @@ var P = {
72
73
  r.value = !0;
73
74
  return;
74
75
  }
75
- let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, me), y = i.createProgram();
76
+ let a = p(i.VERTEX_SHADER, I), f = p(i.FRAGMENT_SHADER, he), y = i.createProgram();
76
77
  if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
77
78
  r.value = !0;
78
79
  return;
@@ -90,22 +91,22 @@ var P = {
90
91
  1
91
92
  ]), i.STATIC_DRAW);
92
93
  let x = i.getAttribLocation(y, "a_position");
93
- i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), ne(h), g() ? _(10) : v();
94
+ i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), re(h), g() ? _(10) : v();
94
95
  }), E(() => {
95
96
  cancelAnimationFrame(a), o?.disconnect();
96
- }), ae(() => {
97
+ }), oe(() => {
97
98
  let e = i;
98
99
  i = null, setTimeout(() => {
99
100
  e?.getExtension("WEBGL_lose_context")?.loseContext();
100
101
  }, 150);
101
- }), (e, t) => (D(), y("div", P, [r.value ? (D(), y("div", F)) : (D(), y("canvas", {
102
+ }), (e, t) => (D(), b("div", P, [r.value ? (D(), b("div", F)) : (D(), b("canvas", {
102
103
  key: 0,
103
104
  ref_key: "canvasEl",
104
105
  ref: n,
105
106
  class: "pk-aurora__canvas"
106
107
  }, null, 512))]));
107
108
  }
108
- }), L = .18, ge = .35, R = /* @__PURE__ */ w({
109
+ }), L = .18, _e = .35, R = /* @__PURE__ */ w({
109
110
  __name: "PkVoiceOrb",
110
111
  props: {
111
112
  sample: {},
@@ -117,7 +118,7 @@ var P = {
117
118
  bars: { default: 5 }
118
119
  },
119
120
  setup(e) {
120
- let t = e, n = ce("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 }, () => L), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
121
122
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
122
123
  if (!n?.length) {
123
124
  let t = Date.now() / 260;
@@ -139,20 +140,20 @@ var P = {
139
140
  });
140
141
  }, c = () => {
141
142
  let e = o();
142
- r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * ge), s(), i = requestAnimationFrame(c);
143
+ r = r.map((t, n) => t + (Math.min(1, Math.max(L, e[n] ?? L)) - t) * _e), s(), i = requestAnimationFrame(c);
143
144
  }, l = () => {
144
145
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
145
146
  };
146
147
  return M(() => t.state, async (e) => {
147
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await ne(), s()) : i === void 0 && (i = requestAnimationFrame(c));
148
- }, { immediate: !0 }), E(l), (t, r) => (D(), y("div", {
148
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => L * 1.6), await re(), s()) : i === void 0 && (i = requestAnimationFrame(c));
149
+ }, { immediate: !0 }), E(l), (t, r) => (D(), b("div", {
149
150
  class: T(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
150
151
  "aria-hidden": "true"
151
- }, [b("div", {
152
+ }, [x("div", {
152
153
  ref_key: "barsEl",
153
154
  ref: n,
154
155
  class: "pk-voice-orb__bars"
155
- }, [(D(!0), y(m, null, oe(e.bars, (e) => (D(), y("span", {
156
+ }, [(D(!0), b(h, null, se(e.bars, (e) => (D(), b("span", {
156
157
  key: e,
157
158
  class: "pk-voice-orb__bar"
158
159
  }))), 128))], 512)], 2));
@@ -161,14 +162,14 @@ var P = {
161
162
  key: 0,
162
163
  class: "pk-voice-session__badge",
163
164
  "aria-hidden": "true"
164
- }, _e = {
165
+ }, ve = {
165
166
  class: "pk-voice-session__status",
166
167
  role: "status"
167
- }, ve = {
168
+ }, ye = {
168
169
  key: 0,
169
170
  class: "pk-voice-session__live-dot",
170
171
  "aria-hidden": "true"
171
- }, ye = ["title"], be = ["title"], xe = { class: "pk-voice-session__actions" }, Se = /* @__PURE__ */ w({
172
+ }, be = ["title"], xe = ["title"], Se = { class: "pk-voice-session__actions" }, Ce = /* @__PURE__ */ w({
172
173
  __name: "PkVoiceSession",
173
174
  props: {
174
175
  state: {},
@@ -187,17 +188,17 @@ var P = {
187
188
  "dismiss"
188
189
  ],
189
190
  setup(e, { emit: t }) {
190
- let n = e, r = t, { t: i } = le({ useScope: "global" }), a = g(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = g(() => {
191
+ let n = e, r = t, { t: i } = ue({ useScope: "global" }), a = _(() => n.error ? i("message.voiceFailed") : n.state === "connecting" ? i("message.voiceConnecting") : n.state === "speaking" ? i("message.voiceSpeaking") : n.muted ? i("message.voiceMuted") : i("message.voiceListening")), o = _(() => {
191
192
  if (n.remainingSeconds === void 0) return;
192
193
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
193
194
  return `${e}:${String(t).padStart(2, "0")}`;
194
- }), s = g(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = g(() => !n.error && (n.state === "listening" || n.state === "speaking")), u = g(() => {
195
+ }), s = _(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = _(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = _(() => {
195
196
  if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
196
197
  });
197
198
  return (t, n) => {
198
- let d = p;
199
- return D(), y("div", { class: T(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
200
- e.error ? (D(), y("span", z, [S(d, { name: "ri:error-warning-line" })])) : (D(), _(R, {
199
+ let d = m;
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
202
  key: 1,
202
203
  state: e.state,
203
204
  sample: e.sample,
@@ -207,34 +208,34 @@ var P = {
207
208
  "sample",
208
209
  "spectrum"
209
210
  ])),
210
- b("div", _e, [b("span", { class: T(["pk-voice-session__state", u.value && `pk-voice-session__state--${u.value}`]) }, [c.value ? (D(), y("span", ve)) : v("", !0), ee(" " + k(a.value), 1)], 2), e.error ? (D(), y("p", {
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
212
  key: 0,
212
213
  class: "pk-voice-session__detail",
213
214
  title: e.rawError ?? e.error
214
- }, k(e.error), 9, ye)) : v("", !0)]),
215
- o.value ? (D(), y("span", {
215
+ }, k(e.error), 9, be)) : y("", !0)]),
216
+ o.value ? (D(), b("span", {
216
217
  key: 2,
217
218
  class: T(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
218
219
  title: j(i)("hint.voiceRemaining"),
219
220
  "aria-hidden": "true"
220
- }, k(o.value), 11, be)) : v("", !0),
221
- b("div", xe, [e.error ? (D(), y(m, { key: 0 }, [S(l, {
221
+ }, k(o.value), 11, xe)) : y("", !0),
222
+ x("div", Se, [e.error ? (D(), b(h, { key: 0 }, [S(u, {
222
223
  icon: "ri:refresh-line",
223
224
  label: j(i)("action.retry"),
224
225
  onClick: n[0] ||= (e) => r("retry")
225
- }, null, 8, ["label"]), e.live ? (D(), _(l, {
226
+ }, null, 8, ["label"]), e.live ? (D(), v(u, {
226
227
  key: 0,
227
228
  icon: "ri:stop-circle-line",
228
229
  modifiers: "danger",
229
230
  title: j(i)("action.hangUp"),
230
231
  "aria-label": j(i)("action.hangUp"),
231
232
  onClick: n[1] ||= (e) => r("hang-up")
232
- }, null, 8, ["title", "aria-label"])) : (D(), _(l, {
233
+ }, null, 8, ["title", "aria-label"])) : (D(), v(u, {
233
234
  key: 1,
234
235
  icon: "ri:close-line",
235
236
  label: j(i)("action.close"),
236
237
  onClick: n[2] ||= (e) => r("dismiss")
237
- }, null, 8, ["label"]))], 64)) : (D(), y(m, { key: 1 }, [S(l, {
238
+ }, null, 8, ["label"]))], 64)) : (D(), b(h, { key: 1 }, [S(u, {
238
239
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
239
240
  title: e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
240
241
  "aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
@@ -245,7 +246,7 @@ var P = {
245
246
  "title",
246
247
  "aria-label",
247
248
  "aria-pressed"
248
- ]), S(l, {
249
+ ]), S(u, {
249
250
  icon: "ri:stop-circle-line",
250
251
  modifiers: "danger",
251
252
  title: j(i)("action.hangUp"),
@@ -255,18 +256,18 @@ var P = {
255
256
  ], 2);
256
257
  };
257
258
  }
258
- }), Ce = (e) => {
259
- let t = se(), n = O("disconnected"), r = O("listening"), a = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
259
+ }), we = (e) => {
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 = () => {
260
261
  u &&= (clearInterval(u), void 0), s.value = void 0;
261
262
  }, m = (e) => {
262
263
  let t = Date.now() + e * 1e3, n = () => {
263
264
  let e = Math.max(0, Math.ceil((t - Date.now()) / 1e3));
264
- s.value = e, e === 0 && _();
265
+ s.value = e, e === 0 && g();
265
266
  };
266
267
  n(), u = setInterval(n, 1e3);
267
268
  }, h = async (t) => {
268
269
  t && (l === t && (l = void 0), await e.closeGrant?.(t).catch(() => void 0));
269
- }, _ = async () => {
270
+ }, g = async () => {
270
271
  d += 1, p();
271
272
  let e = l;
272
273
  l = void 0;
@@ -274,18 +275,18 @@ var P = {
274
275
  t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
275
276
  }, v = async () => {
276
277
  if (f || t.value || n.value === "connecting") return;
277
- a.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
278
- let i = d, s = () => i === d && !f, u;
278
+ i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
279
+ let a = d, s = () => a === d && !f, u;
279
280
  try {
280
- let i = import("./web-BD9VqBSK.js");
281
- i.catch(() => void 0);
281
+ let a = import("./web-BD9VqBSK.js");
282
+ a.catch(() => void 0);
282
283
  let d = await e.fetchGrant();
283
284
  if (!s()) {
284
285
  await e.closeGrant?.(d.sessionId).catch(() => void 0);
285
286
  return;
286
287
  }
287
288
  l = d.sessionId, u = d.sessionId, c.value = d.chatId;
288
- let { VoiceConversation: f } = await i;
289
+ let { VoiceConversation: f } = await a;
289
290
  if (!s()) {
290
291
  await h(d.sessionId);
291
292
  return;
@@ -310,10 +311,10 @@ var P = {
310
311
  o.value = [...o.value, r], e.onTranscript?.(r);
311
312
  },
312
313
  onError: (e) => {
313
- s() && (a.value = e);
314
+ s() && (i.value = e);
314
315
  },
315
- onDisconnect: (i) => {
316
- s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", i.reason === "error" && (a.value = i.message), h(d.sessionId), e.onTurnEnd?.());
316
+ onDisconnect: (a) => {
317
+ s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message), h(d.sessionId), e.onTurnEnd?.());
317
318
  }
318
319
  });
319
320
  if (!s()) {
@@ -323,10 +324,10 @@ var P = {
323
324
  t.value = g, m(d.maxSessionSeconds);
324
325
  } catch (e) {
325
326
  if (await h(u), !s()) return;
326
- t.value = void 0, p(), n.value = "disconnected", a.value = e instanceof Error ? e.message : String(e);
327
+ t.value = void 0, p(), n.value = "disconnected", i.value = e instanceof Error ? e.message : String(e);
327
328
  }
328
329
  }, y = () => {
329
- a.value = void 0;
330
+ i.value = void 0;
330
331
  }, b = (e) => {
331
332
  t.value?.setMicMuted(e);
332
333
  }, x = (e) => {
@@ -335,7 +336,7 @@ var P = {
335
336
  try {
336
337
  return n.sendUserMessage(e), !0;
337
338
  } catch (e) {
338
- return i.warn("The spoken answer could not be sent", e), !1;
339
+ return a.warn("The spoken answer could not be sent", e), !1;
339
340
  }
340
341
  }, ee = (e) => {
341
342
  let n = t.value;
@@ -345,46 +346,46 @@ var P = {
345
346
  } catch {
346
347
  return 0;
347
348
  }
348
- }, S = (e) => {
349
+ }, te = (e) => {
349
350
  let n = t.value;
350
351
  if (n) try {
351
352
  return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
352
353
  } catch {
353
354
  return;
354
355
  }
355
- }, C = () => {
356
+ }, S = () => {
356
357
  let e = l;
357
358
  l = void 0, d += 1, p(), h(e);
358
359
  let r = t.value;
359
360
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
360
361
  };
361
- return typeof window < "u" && window.addEventListener("pagehide", C), ie(() => {
362
- f = !0, typeof window < "u" && window.removeEventListener("pagehide", C), _();
362
+ return typeof window < "u" && window.addEventListener("pagehide", S), ae(() => {
363
+ f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
363
364
  }), {
364
365
  status: n,
365
366
  mode: r,
366
- error: a,
367
+ error: i,
367
368
  transcript: o,
368
369
  remainingSeconds: s,
369
370
  chatId: c,
370
- isActive: g(() => n.value === "connected" || n.value === "connecting"),
371
- isConnecting: g(() => n.value === "connecting"),
372
- isSpeaking: g(() => n.value === "connected" && r.value === "speaking"),
373
- isListening: g(() => n.value === "connected" && r.value === "listening"),
371
+ isActive: _(() => n.value === "connected" || n.value === "connecting"),
372
+ isConnecting: _(() => n.value === "connecting"),
373
+ isSpeaking: _(() => n.value === "connected" && r.value === "speaking"),
374
+ isListening: _(() => n.value === "connected" && r.value === "listening"),
374
375
  start: v,
375
- stop: _,
376
+ stop: g,
376
377
  dismissError: y,
377
378
  setMuted: b,
378
379
  sendUserMessage: x,
379
380
  readLevel: ee,
380
- readSpectrum: S
381
+ readSpectrum: te
381
382
  };
382
- }, we = 4e3, Te = [
383
+ }, Te = 4e3, Ee = [
383
384
  3e3,
384
385
  5e3,
385
386
  1e4
386
- ], Ee = 12e4, B = 3e4;
387
- function De(e) {
387
+ ], De = 12e4, B = 3e4;
388
+ function Oe(e) {
388
389
  let t = O(null), n = O(!1), r, i = !1, a = () => {
389
390
  clearTimeout(r), r = void 0;
390
391
  }, o = (e, t) => {
@@ -402,12 +403,12 @@ function De(e) {
402
403
  }
403
404
  let r = t.value;
404
405
  if (r) {
405
- let e = Date.parse(r.dueAt) - Date.now() + we;
406
- o(Math.max(we, e), () => l(r.wakeId, Date.now(), 0));
406
+ let e = Date.parse(r.dueAt) - Date.now() + Te;
407
+ o(Math.max(Te, e), () => l(r.wakeId, Date.now(), 0));
407
408
  }
408
409
  }
409
410
  async function l(t, n, r) {
410
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ee ? await c() : o(Te[Math.min(r, Te.length - 1)], () => l(t, n, r + 1)));
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
412
  }
412
413
  async function u() {
413
414
  n.value = !0;
@@ -440,16 +441,16 @@ function De(e) {
440
441
  }
441
442
  //#endregion
442
443
  //#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
443
- var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
444
+ var ke = { class: "pk-chatbot-view-chat__input-stage" }, Ae = {
444
445
  key: 1,
445
446
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
446
- }, Ae = { class: "pk-chatbot-view-chat__agent-chip" }, je = {
447
+ }, je = { class: "pk-chatbot-view-chat__agent-chip" }, Me = {
447
448
  key: 0,
448
449
  class: "pk-chatbot-view-chat__agent-chip-name"
449
- }, Me = {
450
+ }, Ne = {
450
451
  key: 0,
451
452
  class: "pk-chatbot-view-chat__drop-overlay"
452
- }, Ne = 3e3, Pe = 6e4, Fe = 3e5, Ie = 6e5, Le = /* @__PURE__ */ w({
453
+ }, Pe = 3e3, Fe = 6e4, Ie = 3e5, Le = 6e5, Re = /* @__PURE__ */ w({
453
454
  __name: "PkChatbotViewChat",
454
455
  props: {
455
456
  agentId: {},
@@ -457,57 +458,57 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
457
458
  userName: {}
458
459
  },
459
460
  emits: ["show-info", "revise"],
460
- setup(i, { emit: l }) {
461
- let m = C(() => import("./PkToolShowForm-IJ8B8_yT.js").then((e) => e.n)), ee = C(() => import("./PkToolShowContactForm-CG1H7xBz.js").then((e) => e.n)), w = C(() => import("./PkToolShowSuggestedReply-CLEFPrHP.js").then((e) => e.n)), ne = C(() => import("./PkToolShowSources-DaSijN_L.js").then((e) => e.n)), re = C(() => import("./PkToolRequestGeolocation-CYEyXZSh.js")), ie = C(() => import("./PkToolRequestOAuthConnection-B243GJ1-.js")), ae = C(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), oe = C(() => import("./PkToolShowDiagram-Cq0457a3.js")), se = C(() => import("./PkToolEditSpreadsheet-BIQky1RK.js")), A = i, pe = l, P = n(A.agentId), { agentInterface: F, agentFileUpload: I, agentVoice: me, actions: L, revisedAnswers: ge, messages: R, chat: z, messageFeedbacks: _e, feedbackDialogMessage: ve, isFeedbackSubmitting: ye, isFeedbackSubmitted: be, feedbackSubmitError: xe, isLeadSubmitted: we, isLoadingSubmitLead: Te, submitLeadError: Ee, input: B, inputMessagePlaceholder: Le, isConversationBlocked: Re, baseUrl: ze, pendingAttachments: Be, isAttachmentLimitReached: Ve, fileLimitError: He, apiClient: V, isDark: Ue } = de(P), We = (e) => V.value.getMediaDownloadUrl(A.agentId, P.localChatId, e), { handleSubmit: Ge, stopGeneration: Ke, regenerate: qe, onUpvote: Je, onDownvote: Ye, onFeedback: Xe, onFeedbackSubmit: Ze, onLeadSubmit: Qe, startNewChat: $e, addToolOutput: H, addToolApprovalResponse: et, handleFileSelect: tt, clearFileLimitError: nt, refreshMessages: rt, appendMessage: it } = P, { t: U } = le({ useScope: "global" }), at = g(() => {
462
- let e = He.value;
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;
463
464
  if (e) return e.reason === "per-chat" ? U("message.fileLimitPerChat", { max: e.max }) : U("message.fileLimitPerMessage", { max: e.max });
464
- }), ot = s(() => F.value?.dismissableNotice), st = g(() => R.value.some((e) => e.role === "user")), ct = g(() => A.modifier === "fullscreen" && !st.value), lt = fe(F, () => A.userName), ut = ce("chatViewEl"), dt = async (e) => (await V.value.expandSourceContext(A.agentId, e.documentId, e.chunkIndex)).content, ft = async (e) => {
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) => {
465
466
  let t = await V.value.downloadSourceDocument(A.agentId, e);
466
467
  window.open(t.downloadUrl, "_blank");
467
- }, { isOverDropZone: pt } = ue(ut, {
468
- dataTypes: g(() => I.value?.allowedMimeTypes ?? []),
468
+ }, { isOverDropZone: mt } = de(dt, {
469
+ dataTypes: (e) => t(e, I.value?.allowedMimeTypes ?? []),
469
470
  onDrop: (e) => {
470
- if (I.value?.enabled && e) for (let t of e) tt(t);
471
+ if (I.value?.enabled && e) for (let t of e) nt(t);
471
472
  }
472
- }), W = O(!1), G = !1, K = O(!1), mt = [
473
+ }), W = O(!1), G = !1, K = O(!1), ht = [
473
474
  3e3,
474
475
  5e3,
475
476
  1e4
476
- ], q, J, Y = !1, X = 0, ht = !1;
477
- function gt() {
477
+ ], q, J, Y = !1, X = 0, gt = !1;
478
+ function _t() {
478
479
  clearTimeout(q), q = void 0, J = void 0, Y = !1, X = 0, K.value = !1;
479
480
  }
480
- function _t(e) {
481
+ function vt(e) {
481
482
  G || (clearTimeout(q), q = setTimeout(() => {
482
- vt();
483
+ yt();
483
484
  }, e));
484
485
  }
485
- async function vt() {
486
- if (G || ht) return;
487
- ht = !0;
486
+ async function yt() {
487
+ if (G || gt) return;
488
+ gt = !0;
488
489
  let e;
489
490
  try {
490
- e = await rt();
491
+ e = await it();
491
492
  } finally {
492
- ht = !1;
493
+ gt = !1;
493
494
  }
494
495
  if (G) return;
495
496
  if (e === "caught-up" && (K.value = !1), Z.isActive.value) {
496
- J = void 0, Y = !1, X = 0, _t(Ne);
497
+ J = void 0, Y = !1, X = 0, vt(Pe);
497
498
  return;
498
499
  }
499
500
  J === void 0 && (J = Date.now(), Y = !!Z.error.value);
500
501
  let t = Date.now() - J;
501
- if (e === "caught-up" && t >= (Y ? Fe : Pe) || t >= Ie) {
502
- gt();
502
+ if (e === "caught-up" && t >= (Y ? Ie : Fe) || t >= Le) {
503
+ _t();
503
504
  return;
504
505
  }
505
- let n = mt[Math.min(X, mt.length - 1)];
506
- X += 1, _t(n);
506
+ let n = ht[Math.min(X, ht.length - 1)];
507
+ X += 1, vt(n);
507
508
  }
508
- let yt = (e = 1200) => {
509
- _t(e);
510
- }, Z = Ce({
509
+ let bt = (e = 1200) => {
510
+ vt(e);
511
+ }, Z = we({
511
512
  fetchGrant: async () => {
512
513
  let e = await V.value.createVoiceSession(A.agentId, P.localChatId, {
513
514
  deviceContext: P.buildDeviceContext(),
@@ -517,8 +518,8 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
517
518
  },
518
519
  closeGrant: (e) => V.value.closeVoiceSession(A.agentId, e),
519
520
  onTranscript: (e) => {
520
- e.role === "user" ? (K.value = !0, it({
521
- id: `${r}user-${t()}`,
521
+ e.role === "user" ? (K.value = !0, at({
522
+ id: `${i}user-${n()}`,
522
523
  role: "user",
523
524
  parts: [{
524
525
  type: "text",
@@ -527,46 +528,46 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
527
528
  })) : K.value = !1;
528
529
  },
529
530
  onTurnEnd: () => {
530
- yt();
531
+ bt();
531
532
  }
532
533
  });
533
534
  M(() => Z.error.value, (e) => {
534
535
  e && (K.value = !1);
535
536
  });
536
- let bt = g(() => me.value?.enabled === !0), xt = g(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), St = g(() => {
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
538
  let e = Z.error.value;
538
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");
539
- }), Ct = g(() => Z.isSpeaking.value ? "output" : "input"), wt = () => Z.readLevel(Ct.value), Tt = () => Z.readSpectrum(Ct.value), Et = async () => {
540
- W.value = !1, await Z.start(), Z.isActive.value && (gt(), _t(Ne));
541
- }, Dt = async () => {
542
- K.value = !1, await Z.stop(), !G && yt(0);
543
- }, Ot = () => {
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 = () => {
544
545
  Z.dismissError();
545
- }, kt = async () => {
546
- Z.dismissError(), await Z.stop(), await Et();
547
- }, Q = (e) => e?.toolCallId ?? "", At = O(/* @__PURE__ */ new Set()), jt = (e) => At.value.has(Q(e)), Mt = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (At.value = new Set(At.value).add(Q(e)), yt()), !0) : !1, Nt = (e, t, n) => {
548
- $(t, o(t, n)) || H({
546
+ }, 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) => {
549
+ $(t, s(t, n)) || H({
549
550
  tool: e,
550
551
  toolCallId: Q(t),
551
552
  output: n
552
553
  });
553
- }, Pt = (e) => {
554
+ }, Ft = (e) => {
554
555
  let t = e.confirmed ? U("message.voiceConfirmed") : U("message.voiceCancelled");
555
- $({ toolCallId: e.toolCallId }, t) ? At.value.has(e.toolCallId) && (Mt.value = new Map(Mt.value).set(e.toolCallId, e.confirmed)) : H({
556
+ $({ toolCallId: e.toolCallId }, t) ? jt.value.has(e.toolCallId) && (Nt.value = new Map(Nt.value).set(e.toolCallId, e.confirmed)) : H({
556
557
  tool: "requestConfirm",
557
558
  toolCallId: e.toolCallId,
558
559
  output: e.confirmed ? "confirmed" : "cancelled"
559
560
  });
560
- }, Ft = (e, t) => {
561
- $(e, t) || (B.value = t, Ge());
562
561
  }, It = (e, t) => {
562
+ $(e, t) || (B.value = t, Ke());
563
+ }, Lt = (e, t) => {
563
564
  let n = t.error ? U("message.voiceLocationRefused") : U("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
564
565
  $(e, n) || H({
565
566
  tool: "requestGeolocation",
566
567
  toolCallId: Q(e),
567
568
  output: t
568
569
  });
569
- }, Lt = (e, t) => {
570
+ }, Rt = (e, t) => {
570
571
  $(e, U("message.voiceConnectionDone")) || H({
571
572
  tool: "requestOAuthConnection",
572
573
  toolCallId: Q(e),
@@ -575,88 +576,88 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
575
576
  mcpServerId: t
576
577
  }
577
578
  });
578
- }, Rt = () => {
579
+ }, zt = () => {
579
580
  W.value = !W.value, Z.setMuted(W.value);
580
581
  };
581
582
  E(() => {
582
- G = !0, gt();
583
+ G = !0, _t();
583
584
  });
584
- let { pendingWakeup: zt, isStopping: Bt, check: Vt, reset: Ht, stop: Ut } = De({
585
+ let { pendingWakeup: Bt, isStopping: Vt, check: Ht, reset: Ut, stop: Wt } = Oe({
585
586
  agentId: () => A.agentId,
586
587
  chatId: () => P.localChatId,
587
588
  apiClient: () => V.value,
588
589
  messages: () => R.value,
589
- refreshMessages: rt
590
+ refreshMessages: it
590
591
  });
591
- return M([() => P.localChatId, st], ([, e]) => {
592
- Ht(), e && Vt();
592
+ return M([() => P.localChatId, ct], ([, e]) => {
593
+ Ut(), e && Ht();
593
594
  }, { immediate: !0 }), M(() => z.value.status, (e, t) => {
594
- e === "ready" && t !== "ready" && st.value && Vt();
595
+ e === "ready" && t !== "ready" && ct.value && Ht();
595
596
  }), (t, n) => {
596
- let r = p;
597
- return D(), y("div", {
597
+ let r = m;
598
+ return D(), b("div", {
598
599
  ref_key: "chatViewEl",
599
- ref: ut,
600
+ ref: dt,
600
601
  class: T(["pk-chatbot-view-chat", {
601
- "pk-chatbot-view-chat--dragover": j(pt) && j(I)?.enabled,
602
- "pk-chatbot-view-chat--empty": ct.value
602
+ "pk-chatbot-view-chat--dragover": j(mt) && j(I)?.enabled,
603
+ "pk-chatbot-view-chat--empty": lt.value
603
604
  }])
604
605
  }, [
605
- S(h, {
606
+ S(g, {
606
607
  name: "pk-chatbot-view-chat-fade",
607
608
  mode: "out-in"
608
609
  }, {
609
- default: N(() => [ct.value ? (D(), _(d, {
610
+ default: N(() => [lt.value ? (D(), v(f, {
610
611
  key: 0,
611
- greeting: j(lt),
612
+ greeting: j(ut),
612
613
  logo: j(F)?.logo,
613
614
  name: j(P).name
614
615
  }, null, 8, [
615
616
  "greeting",
616
617
  "logo",
617
618
  "name"
618
- ])) : (D(), _(e, {
619
+ ])) : (D(), v(e, {
619
620
  key: 1,
620
621
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
621
622
  interactive: "",
622
623
  messages: j(R),
623
- "confirm-verdicts-on-call": Mt.value,
624
+ "confirm-verdicts-on-call": Nt.value,
624
625
  status: j(z).status,
625
626
  error: j(z).error,
626
627
  "main-color": j(F)?.mainColor,
627
628
  "text-color": j(F)?.textColor,
628
- "revised-answers": j(ge),
629
+ "revised-answers": j(_e),
629
630
  actions: j(L),
630
- "message-feedbacks": j(_e),
631
- "feedback-message-id": j(ve)?.id,
632
- "feedback-loading": j(ye),
633
- "feedback-submitted": j(be),
634
- "feedback-error": j(xe),
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),
635
636
  "show-extended-steps": j(F)?.showExtendedSteps,
636
637
  "awaiting-spoken-answer": K.value,
637
- "is-dark": j(Ue),
638
- "show-scroll-to-bottom": i.modifier === "fullscreen",
639
- onFeedbackSubmit: n[0] ||= (e) => j(Ze)(e),
640
- onFeedbackClose: n[1] ||= (e) => ve.value = void 0,
641
- onRegenerate: j(qe),
642
- onAutoRetry: j(qe),
643
- onResetChat: j($e),
644
- onShowInfo: n[2] ||= (e) => pe("show-info", e),
645
- onRevise: n[3] ||= (e) => pe("revise", e),
646
- onUpvote: j(Je),
647
- onDownvote: j(Ye),
648
- onFeedback: j(Xe),
649
- onApprovalRespond: j(et),
650
- onConfirmRespond: Pt
638
+ "is-dark": j(We),
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),
645
+ onShowInfo: n[2] ||= (e) => me("show-info", e),
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
651
652
  }, {
652
- "tool-showContactForm": N(({ part: e }) => [S(j(ee), {
653
+ "tool-showContactForm": N(({ part: e }) => [S(j(te), {
653
654
  part: e,
654
- readonly: !j(ze),
655
- submitted: j(we),
656
- loading: j(Te),
657
- error: j(Ee),
655
+ readonly: !j(Be),
656
+ submitted: j(Te),
657
+ loading: j(Ee),
658
+ error: j(De),
658
659
  "privacy-policy-notice": j(F)?.privacyPolicyNotice,
659
- onSubmit: j(Qe)
660
+ onSubmit: j($e)
660
661
  }, null, 8, [
661
662
  "part",
662
663
  "readonly",
@@ -668,18 +669,18 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
668
669
  ])]),
669
670
  "tool-showSuggestedReply": N(({ part: e }) => [S(j(w), {
670
671
  part: e,
671
- onSelect: (t) => Ft(e, t)
672
+ onSelect: (t) => It(e, t)
672
673
  }, null, 8, ["part", "onSelect"])]),
673
- "tool-showSources": N(({ part: e }) => [S(j(ne), {
674
+ "tool-showSources": N(({ part: e }) => [S(j(re), {
674
675
  part: e,
675
- "on-expand-context": dt,
676
- "on-download": ft
676
+ "on-expand-context": ft,
677
+ "on-download": pt
677
678
  }, null, 8, ["part"])]),
678
- "tool-showForm": N(({ part: e }) => [S(h, { mode: "out-in" }, {
679
- default: N(() => [S(j(m), {
679
+ "tool-showForm": N(({ part: e }) => [S(g, { mode: "out-in" }, {
680
+ default: N(() => [S(j(h), {
680
681
  part: e,
681
- answered: jt(e),
682
- onSelect: (t) => Nt("showForm", e, t)
682
+ answered: Mt(e),
683
+ onSelect: (t) => Pt("showForm", e, t)
683
684
  }, null, 8, [
684
685
  "part",
685
686
  "answered",
@@ -687,12 +688,12 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
687
688
  ])]),
688
689
  _: 2
689
690
  }, 1024)]),
690
- "tool-showMultipleChoice": N(({ part: e }) => [S(h, { mode: "out-in" }, {
691
- default: N(() => [S(j(m), {
691
+ "tool-showMultipleChoice": N(({ part: e }) => [S(g, { mode: "out-in" }, {
692
+ default: N(() => [S(j(h), {
692
693
  part: e,
693
694
  "allow-custom-answer": "",
694
- answered: jt(e),
695
- onSelect: (t) => Nt("showMultipleChoice", e, t)
695
+ answered: Mt(e),
696
+ onSelect: (t) => Pt("showMultipleChoice", e, t)
696
697
  }, null, 8, [
697
698
  "part",
698
699
  "answered",
@@ -700,12 +701,12 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
700
701
  ])]),
701
702
  _: 2
702
703
  }, 1024)]),
703
- "tool-requestOAuthConnection": N(({ part: e }) => [S(j(ie), {
704
+ "tool-requestOAuthConnection": N(({ part: e }) => [S(j(ae), {
704
705
  part: e,
705
- "backend-url": j(ze),
706
+ "backend-url": j(Be),
706
707
  "resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(A.agentId, e),
707
708
  "check-connection": (e) => j(V).getOAuthConnectionStatus(A.agentId, e),
708
- onConnected: (t) => Lt(e, t)
709
+ onConnected: (t) => Rt(e, t)
709
710
  }, null, 8, [
710
711
  "part",
711
712
  "backend-url",
@@ -713,20 +714,20 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
713
714
  "check-connection",
714
715
  "onConnected"
715
716
  ])]),
716
- "tool-requestGeolocation": N(({ part: e }) => [S(j(re), {
717
+ "tool-requestGeolocation": N(({ part: e }) => [S(j(ie), {
717
718
  part: e,
718
719
  "call-live": j(Z).isActive.value,
719
720
  "reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
720
- onResult: (t) => It(e, t)
721
+ onResult: (t) => Lt(e, t)
721
722
  }, null, 8, [
722
723
  "part",
723
724
  "call-live",
724
725
  "reverse-geocode",
725
726
  "onResult"
726
727
  ])]),
727
- "tool-showLocation": N(({ part: e }) => [S(j(ae), {
728
+ "tool-showLocation": N(({ part: e }) => [S(j(oe), {
728
729
  part: e,
729
- "is-dark": j(Ue),
730
+ "is-dark": j(We),
730
731
  "main-color": j(F)?.mainColor,
731
732
  "forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
732
733
  }, null, 8, [
@@ -735,14 +736,14 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
735
736
  "main-color",
736
737
  "forward-geocode"
737
738
  ])]),
738
- "tool-showDiagram": N(({ part: e }) => [S(j(oe), {
739
+ "tool-showDiagram": N(({ part: e }) => [S(j(se), {
739
740
  part: e,
740
- "is-dark": j(Ue)
741
+ "is-dark": j(We)
741
742
  }, null, 8, ["part", "is-dark"])]),
742
- "tool-editSpreadsheet": N(({ part: e }) => [(D(), _(j(se), {
743
- key: j(a)(e),
743
+ "tool-editSpreadsheet": N(({ part: e }) => [(D(), v(j(ce), {
744
+ key: j(o)(e),
744
745
  part: e,
745
- "file-url": We
746
+ "file-url": Ge
746
747
  }, null, 8, ["part"]))]),
747
748
  _: 1
748
749
  }, 8, [
@@ -773,52 +774,52 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
773
774
  ]))]),
774
775
  _: 1
775
776
  }),
776
- b("div", Oe, [
777
- S(h, { name: "pk-chatbot-view-chat-fade" }, {
778
- default: N(() => [ct.value ? (D(), _(he, {
777
+ x("div", ke, [
778
+ S(g, { name: "pk-chatbot-view-chat-fade" }, {
779
+ default: N(() => [lt.value ? (D(), v(ge, {
779
780
  key: 0,
780
781
  class: "pk-chatbot-view-chat__aurora",
781
782
  "source-selector": ".pk-chatbot-input__form"
782
- })) : v("", !0)]),
783
+ })) : y("", !0)]),
783
784
  _: 1
784
785
  }),
785
- j(zt) && !j(Re) ? (D(), _(f, {
786
+ j(Bt) && !j(ze) ? (D(), v(p, {
786
787
  key: 0,
787
- pending: j(zt),
788
- stopping: j(Bt),
789
- onStop: j(Ut)
788
+ pending: j(Bt),
789
+ stopping: j(Vt),
790
+ onStop: j(Wt)
790
791
  }, null, 8, [
791
792
  "pending",
792
793
  "stopping",
793
794
  "onStop"
794
- ])) : v("", !0),
795
- j(Re) ? (D(), y("div", ke, k(j(U)("message.chatErrorConversationBlocked")), 1)) : xt.value === "idle" ? (D(), _(u, {
795
+ ])) : y("", !0),
796
+ j(ze) ? (D(), b("div", Ae, k(j(U)("message.chatErrorConversationBlocked")), 1)) : St.value === "idle" ? (D(), v(d, {
796
797
  key: 3,
797
798
  modelValue: j(B),
798
- "onUpdate:modelValue": n[4] ||= (e) => te(B) ? B.value = e : null,
799
- "pending-attachments": j(Be),
800
- "onUpdate:pendingAttachments": n[5] ||= (e) => te(Be) ? Be.value = e : null,
801
- placeholder: j(Le),
802
- "dismissable-notice": j(ot) && j(z).messages.length <= 1 ? j(ot) : void 0,
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,
803
804
  status: j(z).status,
804
805
  "max-message-length": j(F)?.maxMessageLength,
805
806
  "file-upload": j(I),
806
- "attachment-limit-reached": j(Ve),
807
- "attachment-notice": at.value,
808
- "voice-enabled": bt.value,
809
- onStopGeneration: j(Ke),
810
- onSubmit: j(Ge),
811
- onFileSelect: j(tt),
812
- onDismissAttachmentNotice: j(nt),
813
- onVoiceStart: Et
814
- }, x({ _: 2 }, [i.modifier === "fullscreen" ? {
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
815
+ }, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
815
816
  name: "prepend",
816
- fn: N(() => [b("span", Ae, [S(c, {
817
+ fn: N(() => [x("span", je, [S(l, {
817
818
  modifiers: "surface",
818
819
  class: "pk-chatbot-view-chat__agent-chip-avatar",
819
820
  "img-src": j(F)?.logo,
820
821
  name: j(P).name
821
- }, null, 8, ["img-src", "name"]), j(P).name ? (D(), y("strong", je, k(j(P).name), 1)) : v("", !0)])]),
822
+ }, null, 8, ["img-src", "name"]), j(P).name ? (D(), b("strong", Me, k(j(P).name), 1)) : y("", !0)])]),
822
823
  key: "0"
823
824
  } : void 0]), 1032, [
824
825
  "modelValue",
@@ -835,21 +836,21 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
835
836
  "onSubmit",
836
837
  "onFileSelect",
837
838
  "onDismissAttachmentNotice"
838
- ])) : (D(), _(Se, {
839
+ ])) : (D(), v(Ce, {
839
840
  key: 2,
840
- state: xt.value,
841
- sample: wt,
842
- spectrum: Tt,
841
+ state: St.value,
842
+ sample: Tt,
843
+ spectrum: Et,
843
844
  "remaining-seconds": j(Z).remainingSeconds.value,
844
845
  muted: W.value,
845
- error: St.value,
846
+ error: Ct.value,
846
847
  "raw-error": j(Z).error.value,
847
848
  live: j(Z).isActive.value,
848
849
  class: "pk-chatbot-view-chat__voice",
849
- onToggleMute: Rt,
850
- onHangUp: Dt,
851
- onRetry: kt,
852
- onDismiss: Ot
850
+ onToggleMute: zt,
851
+ onHangUp: Ot,
852
+ onRetry: At,
853
+ onDismiss: kt
853
854
  }, null, 8, [
854
855
  "state",
855
856
  "remaining-seconds",
@@ -859,11 +860,11 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
859
860
  "live"
860
861
  ]))
861
862
  ]),
862
- S(h, null, {
863
- default: N(() => [j(pt) && j(I)?.enabled ? (D(), y("div", Me, [S(r, {
863
+ S(g, null, {
864
+ default: N(() => [j(mt) && j(I)?.enabled ? (D(), b("div", Ne, [S(r, {
864
865
  name: "ri:upload-cloud-2-line",
865
866
  class: "pk-chatbot-view-chat__drop-overlay-icon"
866
- }), b("span", null, k(j(U)("action.dropFile")), 1)])) : v("", !0)]),
867
+ }), x("span", null, k(j(U)("action.dropFile")), 1)])) : y("", !0)]),
867
868
  _: 1
868
869
  })
869
870
  ], 2);
@@ -871,6 +872,6 @@ var Oe = { class: "pk-chatbot-view-chat__input-stage" }, ke = {
871
872
  }
872
873
  });
873
874
  //#endregion
874
- export { he as i, Se as n, R as r, Le as t };
875
+ export { ge as i, Ce as n, R as r, Re as t };
875
876
 
876
- //# sourceMappingURL=PkChatbotViewChat-CLyoZH3C.js.map
877
+ //# sourceMappingURL=PkChatbotViewChat-dJE2iHPN.js.map