@8wave/ai-elements 0.125.0-beta.3 → 0.125.0-beta.5

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 (154) hide show
  1. package/dist/_chunks/{Agent-BBWFD4nI.js → Agent-DZhK49jg.js} +99 -96
  2. package/dist/_chunks/Agent-DZhK49jg.js.map +1 -0
  3. package/dist/_chunks/{PkFilePreview-BwHe4-m1.js → PkFilePreview-C3R3jrNi.js} +31 -31
  4. package/dist/_chunks/{PkFilePreview-BwHe4-m1.js.map → PkFilePreview-C3R3jrNi.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreviewDialog-LWxNgkzk.js → PkFilePreviewDialog-BAKFOnPI.js} +2 -2
  6. package/dist/_chunks/{PkFilePreviewDialog-LWxNgkzk.js.map → PkFilePreviewDialog-BAKFOnPI.js.map} +1 -1
  7. package/dist/_chunks/{PkStreamingMarkdown-BvgO6aHe.js → PkStreamingMarkdown-BM-DSTPr.js} +3 -3
  8. package/dist/_chunks/{PkStreamingMarkdown-BvgO6aHe.js.map → PkStreamingMarkdown-BM-DSTPr.js.map} +1 -1
  9. package/dist/_chunks/{PkToolChatFile-OuaeZTxw.js → PkToolChatFile-DbeOmRPh.js} +3 -3
  10. package/dist/_chunks/{PkToolChatFile-OuaeZTxw.js.map → PkToolChatFile-DbeOmRPh.js.map} +1 -1
  11. package/dist/_chunks/{PkToolRequestGeolocation-C9PSITRU.js → PkToolRequestGeolocation-CCz4REP9.js} +2 -2
  12. package/dist/_chunks/{PkToolRequestGeolocation-C9PSITRU.js.map → PkToolRequestGeolocation-CCz4REP9.js.map} +1 -1
  13. package/dist/_chunks/{PkToolRequestOAuthConnection-CWi5SeCi.js → PkToolRequestOAuthConnection-BU-4Sm3z.js} +2 -2
  14. package/dist/_chunks/{PkToolRequestOAuthConnection-CWi5SeCi.js.map → PkToolRequestOAuthConnection-BU-4Sm3z.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowArtifact-BqgW3E6D.js → PkToolShowArtifact-utxGuLLt.js} +2 -2
  16. package/dist/_chunks/{PkToolShowArtifact-BqgW3E6D.js.map → PkToolShowArtifact-utxGuLLt.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowContactForm-DDDXopZp.js → PkToolShowContactForm-DTtE93D3.js} +2 -2
  18. package/dist/_chunks/{PkToolShowContactForm-DDDXopZp.js.map → PkToolShowContactForm-DTtE93D3.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowForm-D2LZ8Kkl.js → PkToolShowForm-I4pKopEI.js} +6 -6
  20. package/dist/_chunks/{PkToolShowForm-D2LZ8Kkl.js.map → PkToolShowForm-I4pKopEI.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowImageGallery-DAcW2Dau.js → PkToolShowImageGallery-skV87BlD.js} +2 -2
  22. package/dist/_chunks/{PkToolShowImageGallery-DAcW2Dau.js.map → PkToolShowImageGallery-skV87BlD.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowProductList-OYwQCHar.js → PkToolShowProductList-CcdOQoxf.js} +2 -2
  24. package/dist/_chunks/{PkToolShowProductList-OYwQCHar.js.map → PkToolShowProductList-CcdOQoxf.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowSources-DA4SOt-H.js → PkToolShowSources-DLmVS3bL.js} +3 -3
  26. package/dist/_chunks/{PkToolShowSources-DA4SOt-H.js.map → PkToolShowSources-DLmVS3bL.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowSuggestedReply-BTE7TZ4Z.js → PkToolShowSuggestedReply-Cv-WVCFN.js} +2 -2
  28. package/dist/_chunks/{PkToolShowSuggestedReply-BTE7TZ4Z.js.map → PkToolShowSuggestedReply-Cv-WVCFN.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowVideo-bTWeXtZd.js → PkToolShowVideo-D_K95gTR.js} +2 -2
  30. package/dist/_chunks/{PkToolShowVideo-bTWeXtZd.js.map → PkToolShowVideo-D_K95gTR.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowWebPages-DNbdkSSz.js → PkToolShowWebPages-DsfMacw-.js} +2 -2
  32. package/dist/_chunks/{PkToolShowWebPages-DNbdkSSz.js.map → PkToolShowWebPages-DsfMacw-.js.map} +1 -1
  33. package/dist/_chunks/{chatImagePolicy-C4jFnVQl.js → chatImagePolicy-BfgdFbm_.js} +2 -2
  34. package/dist/_chunks/{chatImagePolicy-C4jFnVQl.js.map → chatImagePolicy-BfgdFbm_.js.map} +1 -1
  35. package/dist/_chunks/{markdown-DDYeZICP.js → markdown-CrMYpY8l.js} +10 -10
  36. package/dist/_chunks/{markdown-DDYeZICP.js.map → markdown-CrMYpY8l.js.map} +1 -1
  37. package/dist/_chunks/{utils-euH8esYP.js → utils-CbhqxYyx.js} +57 -57
  38. package/dist/_chunks/utils-CbhqxYyx.js.map +1 -0
  39. package/dist/ai-elements.es.js +3812 -3717
  40. package/dist/ai-elements.es.js.map +1 -1
  41. package/dist-vue/PkChatbot.js +1 -1
  42. package/dist-vue/PkChatbotEmptyState.js +1 -1
  43. package/dist-vue/PkChatbotInput.js +1 -1
  44. package/dist-vue/PkChatbotMessages.js +1 -1
  45. package/dist-vue/PkChatbotStepPayload.js +1 -1
  46. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  47. package/dist-vue/PkChatbotSteps.js +1 -1
  48. package/dist-vue/PkChatbotViewChat.js +1 -1
  49. package/dist-vue/PkChatbotViewConversations.js +1 -1
  50. package/dist-vue/PkChatbotViewFiles.js +1 -1
  51. package/dist-vue/PkChatbotViewProfile.js +1 -1
  52. package/dist-vue/_chunks/{Agent-DQl-tv4S.js → Agent-BtXBSGy6.js} +34 -31
  53. package/dist-vue/_chunks/Agent-BtXBSGy6.js.map +1 -0
  54. package/dist-vue/_chunks/{Document-DXDifFZE.js → Document-DERAWuR0.js} +10 -10
  55. package/dist-vue/_chunks/{Document-DXDifFZE.js.map → Document-DERAWuR0.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbot-Qrk8yEM0.js +294 -0
  57. package/dist-vue/_chunks/PkChatbot-Qrk8yEM0.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotEmptyState-CLOH5Z2d.js → PkChatbotEmptyState-C9aUiynZ.js} +2 -2
  59. package/dist-vue/_chunks/{PkChatbotEmptyState-CLOH5Z2d.js.map → PkChatbotEmptyState-C9aUiynZ.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotInput-BK7f1jFE.js → PkChatbotInput-Bs8nn-Jz.js} +154 -135
  61. package/dist-vue/_chunks/PkChatbotInput-Bs8nn-Jz.js.map +1 -0
  62. package/dist-vue/_chunks/PkChatbotMessages-DAwGWRtd.js +1039 -0
  63. package/dist-vue/_chunks/PkChatbotMessages-DAwGWRtd.js.map +1 -0
  64. package/dist-vue/_chunks/{PkChatbotStepPayload-D682n3VR.js → PkChatbotStepPayload-C45aVagz.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotStepPayload-D682n3VR.js.map → PkChatbotStepPayload-C45aVagz.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotStepToolDetail-D5c8rqj9.js → PkChatbotStepToolDetail-B0tC33x6.js} +16 -16
  67. package/dist-vue/_chunks/{PkChatbotStepToolDetail-D5c8rqj9.js.map → PkChatbotStepToolDetail-B0tC33x6.js.map} +1 -1
  68. package/dist-vue/_chunks/PkChatbotSteps-MTSA_RrY.js +215 -0
  69. package/dist-vue/_chunks/PkChatbotSteps-MTSA_RrY.js.map +1 -0
  70. package/dist-vue/_chunks/{PkChatbotViewChat-D8depeWQ.js → PkChatbotViewChat-CMFc4eLD.js} +450 -446
  71. package/dist-vue/_chunks/PkChatbotViewChat-CMFc4eLD.js.map +1 -0
  72. package/dist-vue/_chunks/{PkChatbotViewConversations-B-dmLi-8.js → PkChatbotViewConversations-CtxE_a1O.js} +3 -3
  73. package/dist-vue/_chunks/{PkChatbotViewConversations-B-dmLi-8.js.map → PkChatbotViewConversations-CtxE_a1O.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkChatbotViewFiles-Du5AAS4v.js → PkChatbotViewFiles-B51zU374.js} +3 -3
  75. package/dist-vue/_chunks/{PkChatbotViewFiles-Du5AAS4v.js.map → PkChatbotViewFiles-B51zU374.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkChatbotViewProfile-UZrZdOyM.js → PkChatbotViewProfile-BSKRU7Ae.js} +2 -2
  77. package/dist-vue/_chunks/{PkChatbotViewProfile-UZrZdOyM.js.map → PkChatbotViewProfile-BSKRU7Ae.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkFilePreview-B54Dp_Rs.js → PkFilePreview-p-AGDrXi.js} +30 -30
  79. package/dist-vue/_chunks/{PkFilePreview-B54Dp_Rs.js.map → PkFilePreview-p-AGDrXi.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkFilePreviewDialog-QDPoZh1v.js → PkFilePreviewDialog-BpeeWS6d.js} +2 -2
  81. package/dist-vue/_chunks/{PkFilePreviewDialog-QDPoZh1v.js.map → PkFilePreviewDialog-BpeeWS6d.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkStreamingMarkdown-qnKwvrCg.js → PkStreamingMarkdown-DlcTV5je.js} +3 -3
  83. package/dist-vue/_chunks/{PkStreamingMarkdown-qnKwvrCg.js.map → PkStreamingMarkdown-DlcTV5je.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolChatFile-i0rHgFxB.js → PkToolChatFile-HWGjtuaT.js} +3 -3
  85. package/dist-vue/_chunks/{PkToolChatFile-i0rHgFxB.js.map → PkToolChatFile-HWGjtuaT.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolRequestGeolocation-SDzM1-Wl.js → PkToolRequestGeolocation-euI4VBVe.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolRequestGeolocation-SDzM1-Wl.js.map → PkToolRequestGeolocation-euI4VBVe.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DNrlGxMX.js → PkToolRequestOAuthConnection-DAAYyufP.js} +2 -2
  89. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-DNrlGxMX.js.map → PkToolRequestOAuthConnection-DAAYyufP.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowArtifact-Dh4ogn6A.js → PkToolShowArtifact-C8OIF_sy.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowArtifact-Dh4ogn6A.js.map → PkToolShowArtifact-C8OIF_sy.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowContactForm-BGTI1sio.js → PkToolShowContactForm-K6Z5MUXk.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowContactForm-BGTI1sio.js.map → PkToolShowContactForm-K6Z5MUXk.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolShowDiagram-xef3wJb0.js → PkToolShowDiagram-DrlGh_v6.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolShowDiagram-xef3wJb0.js.map → PkToolShowDiagram-DrlGh_v6.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowForm-Crg4Kl6v.js → PkToolShowForm-DzsXJfOl.js} +6 -6
  97. package/dist-vue/_chunks/{PkToolShowForm-Crg4Kl6v.js.map → PkToolShowForm-DzsXJfOl.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowImageGallery-D9hdGBHK.js → PkToolShowImageGallery-sCyrPOIT.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowImageGallery-D9hdGBHK.js.map → PkToolShowImageGallery-sCyrPOIT.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowProductList-SC5aKDCw.js → PkToolShowProductList-DPDDeVu4.js} +2 -2
  101. package/dist-vue/_chunks/{PkToolShowProductList-SC5aKDCw.js.map → PkToolShowProductList-DPDDeVu4.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkToolShowSources-Bf9_JwFL.js → PkToolShowSources-D4zjssdh.js} +3 -3
  103. package/dist-vue/_chunks/{PkToolShowSources-Bf9_JwFL.js.map → PkToolShowSources-D4zjssdh.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BlcEfMx8.js → PkToolShowSuggestedReply-smfC1hlT.js} +2 -2
  105. package/dist-vue/_chunks/{PkToolShowSuggestedReply-BlcEfMx8.js.map → PkToolShowSuggestedReply-smfC1hlT.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkToolShowVideo-C2ITZDNo.js → PkToolShowVideo-C77DAqoZ.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolShowVideo-C2ITZDNo.js.map → PkToolShowVideo-C77DAqoZ.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolShowWebPages-BrefGxKQ.js → PkToolShowWebPages-D_tqGI6o.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowWebPages-BrefGxKQ.js.map → PkToolShowWebPages-D_tqGI6o.js.map} +1 -1
  110. package/dist-vue/_chunks/{createChatbotApiClient-Bukf58dz.js → createChatbotApiClient-CO6l0P79.js} +87 -85
  111. package/dist-vue/_chunks/createChatbotApiClient-CO6l0P79.js.map +1 -0
  112. package/dist-vue/_chunks/{useChatbotStore-DcvdWkgq.js → useChatbotStore-CY1gAHOh.js} +1224 -1201
  113. package/dist-vue/_chunks/useChatbotStore-CY1gAHOh.js.map +1 -0
  114. package/dist-vue/_chunks/{utils-B0PnU1Rk.js → utils-CX4JuhXz.js} +66 -66
  115. package/dist-vue/_chunks/utils-CX4JuhXz.js.map +1 -0
  116. package/dist-vue/api.js +1 -1
  117. package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +6 -0
  118. package/dist-vue/composables.js +16 -8
  119. package/dist-vue/composables.js.map +1 -1
  120. package/dist-vue/index.js +3394 -3359
  121. package/dist-vue/index.js.map +1 -1
  122. package/dist-vue/locales.js +16 -0
  123. package/dist-vue/packages/components/src/chat/PkAgentPageAccessSettings.d.ts +5 -0
  124. package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +6 -2
  125. package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +10 -8
  126. package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +11 -3
  127. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +2 -2
  128. package/dist-vue/packages/components/src/chat/PkFieldChanges.d.ts +15 -0
  129. package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +1 -2
  130. package/dist-vue/packages/components/src/chat/utils.d.ts +18 -0
  131. package/dist-vue/packages/composable/src/chatbot/api/createChatbotApiClient.d.ts +2 -0
  132. package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +10 -0
  133. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +31 -4
  134. package/dist-vue/packages/models/src/schema/Agent.d.ts +41 -0
  135. package/dist-vue/packages/models/src/schema/Chat.d.ts +1 -0
  136. package/dist-vue/packages/models/src/schema/Organization.d.ts +9 -0
  137. package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +6 -0
  138. package/dist-vue/packages/models/src/schema/SubAgent.d.ts +6 -0
  139. package/dist-vue/style.css +1 -1
  140. package/package.json +1 -1
  141. package/dist/_chunks/Agent-BBWFD4nI.js.map +0 -1
  142. package/dist/_chunks/utils-euH8esYP.js.map +0 -1
  143. package/dist-vue/_chunks/Agent-DQl-tv4S.js.map +0 -1
  144. package/dist-vue/_chunks/PkChatbot-BRttF7Lo.js +0 -286
  145. package/dist-vue/_chunks/PkChatbot-BRttF7Lo.js.map +0 -1
  146. package/dist-vue/_chunks/PkChatbotInput-BK7f1jFE.js.map +0 -1
  147. package/dist-vue/_chunks/PkChatbotMessages-Ck0ofhtK.js +0 -1041
  148. package/dist-vue/_chunks/PkChatbotMessages-Ck0ofhtK.js.map +0 -1
  149. package/dist-vue/_chunks/PkChatbotSteps-CtKRHqaG.js +0 -189
  150. package/dist-vue/_chunks/PkChatbotSteps-CtKRHqaG.js.map +0 -1
  151. package/dist-vue/_chunks/PkChatbotViewChat-D8depeWQ.js.map +0 -1
  152. package/dist-vue/_chunks/createChatbotApiClient-Bukf58dz.js.map +0 -1
  153. package/dist-vue/_chunks/useChatbotStore-DcvdWkgq.js.map +0 -1
  154. package/dist-vue/_chunks/utils-B0PnU1Rk.js.map +0 -1
@@ -1,33 +1,33 @@
1
- import { t as e } from "./PkChatbotMessages-Ck0ofhtK.js";
1
+ import { t as e } from "./PkChatbotMessages-DAwGWRtd.js";
2
2
  import { o as t } from "./Media-DylqhvaF.js";
3
- import { a as n, n as r, t as i } from "./useChatbotStore-DcvdWkgq.js";
3
+ import { a as n, n as r, t as i } from "./useChatbotStore-CY1gAHOh.js";
4
4
  import { n as a } from "./src-nb8MU1sh.js";
5
5
  import { s as o, t as s } from "./message-DuibQyHy.js";
6
- import { I as c, c as l, d as u, n as d, v as f } from "./utils-B0PnU1Rk.js";
7
- import { t as p } from "./useLocalizedString-Dmn92nix.js";
8
- import { t as m } from "./PkAvatar-DwtZWSW4.js";
9
- import { n as h, t as g } from "./PkChatbotInput-BK7f1jFE.js";
10
- import { t as _ } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
11
- import { t as v } from "./PkChatbotEmptyState-CLOH5Z2d.js";
6
+ import { L as c, f as l, l as u, n as d, r as f, y as p } from "./utils-CX4JuhXz.js";
7
+ import { t as m } from "./useLocalizedString-Dmn92nix.js";
8
+ import { t as h } from "./PkAvatar-DwtZWSW4.js";
9
+ import { n as g, t as _ } from "./PkChatbotInput-Bs8nn-Jz.js";
10
+ import { t as v } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
11
+ import { t as y } from "./PkChatbotEmptyState-C9aUiynZ.js";
12
12
  import { t as ee } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
13
- import { VvIcon as te } from "@volverjs/ui-vue/components";
14
- import { Fragment as y, Teleport as ne, Transition as b, computed as x, createBlock as S, createCommentVNode as C, createElementBlock as w, createElementVNode as T, createSlots as re, createTextVNode as ie, createVNode as E, defineAsyncComponent as D, defineComponent as O, inject as ae, isRef as oe, nextTick as se, normalizeClass as k, normalizeStyle as ce, onBeforeUnmount as le, onMounted as ue, onScopeDispose as A, onUnmounted as de, openBlock as j, provide as fe, ref as M, renderList as pe, shallowRef as me, toDisplayString as N, toValue as P, unref as F, useTemplateRef as he, watch as I, withCtx as L } from "vue";
15
- import { useI18n as ge } from "vue-i18n";
16
- import { useDropZone as _e, useResizeObserver as ve } from "@vueuse/core";
17
- import { storeToRefs as ye } from "pinia";
13
+ import { VvIcon as b } from "@volverjs/ui-vue/components";
14
+ import { Fragment as x, Teleport as S, Transition as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createSlots as te, createTextVNode as ne, createVNode as k, defineAsyncComponent as A, defineComponent as j, inject as re, isRef as ie, nextTick as ae, normalizeClass as M, normalizeStyle as oe, onBeforeUnmount as se, onMounted as ce, onScopeDispose as le, onUnmounted as ue, openBlock as N, provide as de, ref as P, renderList as fe, shallowRef as pe, toDisplayString as F, toValue as I, unref as L, useTemplateRef as me, watch as R, withCtx as z } from "vue";
15
+ import { useI18n as he } from "vue-i18n";
16
+ import { useDropZone as ge, useResizeObserver as _e } from "@vueuse/core";
17
+ import { storeToRefs as ve } from "pinia";
18
18
  // ../../packages/composable/src/chatbot/useGreeting.ts
19
- function be(e, t) {
20
- let { locale: n, t: r, te: i } = ge({ useScope: "global" });
21
- return x(() => xe(P(e)?.greeting?.[0]?.[n.value] ?? "", P(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
19
+ function ye(e, t) {
20
+ let { locale: n, t: r, te: i } = he({ useScope: "global" });
21
+ return w(() => be(I(e)?.greeting?.[0]?.[n.value] ?? "", I(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
22
22
  }
23
- function xe(e, t) {
23
+ function be(e, t) {
24
24
  return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
25
25
  }
26
26
  // ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
27
- var R = {
27
+ var B = {
28
28
  key: 1,
29
29
  class: "pk-aurora__fallback"
30
- }, z = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", Se = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\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 // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Ce = /* @__PURE__ */ O({
30
+ }, V = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", xe = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec3 u_color2;\nuniform float u_duo;\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 // Two tones: left to right the glow passes from the first to the\n // second, along a border a slow noise field keeps bending\n vec2 q = rel / max(radii, vec2(1.0));\n float bands = q.x * 0.9\n + 0.7 * snoise(q * 0.8 + vec2(u_time * 0.07, -u_time * 0.05));\n vec3 color = mix(u_color, u_color2, u_duo * smoothstep(-0.6, 0.6, bands));\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(color * alpha, alpha);\n}", Se = /* @__PURE__ */ j({
31
31
  __name: "PkAuroraCanvas",
32
32
  props: {
33
33
  sourceSelector: {},
@@ -36,26 +36,26 @@ var R = {
36
36
  secondColor: {}
37
37
  },
38
38
  setup(e) {
39
- let t = e, n = he("rootEl"), r = he("canvasEl"), i = M(!1), a = M(null), o = x(() => a.value ? {
39
+ let t = e, n = me("rootEl"), r = me("canvasEl"), i = P(!1), a = P(null), o = w(() => a.value ? {
40
40
  "--pk-aurora-tint": `rgb(${a.value.first.join(" ")})`,
41
41
  "--pk-aurora-tint-2": `rgb(${(a.value.duo ? a.value.second : a.value.first).join(" ")})`
42
- } : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, ee = performance.now(), te = (e, t) => {
42
+ } : void 0), s = null, l = 0, u = null, d = null, f = null, p = null, m = null, h = null, g = null, _ = null, v = null, y = performance.now(), ee = (e, t) => {
43
43
  if (!s) return null;
44
44
  let n = s.createShader(e);
45
45
  return !n || (s.shaderSource(n, t), s.compileShader(n), !s.getShaderParameter(n, s.COMPILE_STATUS)) ? null : n;
46
- }, y = (e) => e.map((e) => e / 255), ne = () => {
46
+ }, b = (e) => e.map((e) => e / 255), x = () => {
47
47
  n.value && (a.value = c(n.value, {
48
48
  mainColor: t.mainColor,
49
49
  tones: t.tones,
50
50
  secondColor: t.secondColor
51
- }), s && !i.value && a.value && (s.uniform3f(g, ...y(a.value.first)), s.uniform3f(_, ...y(a.value.second)), s.uniform1f(v, +!!a.value.duo), C(S() ? 10 : void 0)));
51
+ }), s && !i.value && a.value && (s.uniform3f(g, ...b(a.value.first)), s.uniform3f(_, ...b(a.value.second)), s.uniform1f(v, +!!a.value.duo), T(C() ? 10 : void 0)));
52
52
  };
53
- I([
53
+ R([
54
54
  () => t.mainColor,
55
55
  () => t.tones,
56
56
  () => t.secondColor
57
- ], ne);
58
- let b = () => {
57
+ ], x);
58
+ let S = () => {
59
59
  if (!s || !r.value) return;
60
60
  let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: n, clientHeight: i } = r.value;
61
61
  r.value.width = Math.max(1, Math.round(n * e)), r.value.height = Math.max(1, Math.round(i * e)), s.viewport(0, 0, r.value.width, r.value.height);
@@ -66,19 +66,19 @@ var R = {
66
66
  let u = Number.parseFloat(getComputedStyle(r.value).getPropertyValue("--aurora-spread"));
67
67
  s.uniform1f(h, Number.isNaN(u) ? 1 : u);
68
68
  }
69
- C(S() ? 10 : void 0);
70
- }, S = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, C = (e) => {
71
- s && r.value && (s.uniform1f(d, e ?? (performance.now() - ee) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
72
- }, T = () => {
73
- C(), l = requestAnimationFrame(T);
69
+ T(C() ? 10 : void 0);
70
+ }, C = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, T = (e) => {
71
+ s && r.value && (s.uniform1f(d, e ?? (performance.now() - y) / 1e3), s.uniform2f(f, r.value.width, r.value.height), s.drawArrays(s.TRIANGLE_STRIP, 0, 4));
72
+ }, E = () => {
73
+ T(), l = requestAnimationFrame(E);
74
74
  };
75
- return ue(() => {
75
+ return ce(() => {
76
76
  let e = r.value;
77
- if (ne(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
77
+ if (x(), s = e?.getContext("webgl", { alpha: !0 }) ?? null, !e || !s || !a.value) {
78
78
  i.value = !0;
79
79
  return;
80
80
  }
81
- let t = te(s.VERTEX_SHADER, z), n = te(s.FRAGMENT_SHADER, Se), o = s.createProgram();
81
+ let t = ee(s.VERTEX_SHADER, V), n = ee(s.FRAGMENT_SHADER, xe), o = s.createProgram();
82
82
  if (!t || !n || !o || (s.attachShader(o, t), s.attachShader(o, n), s.linkProgram(o), !s.getProgramParameter(o, s.LINK_STATUS))) {
83
83
  i.value = !0;
84
84
  return;
@@ -96,28 +96,28 @@ var R = {
96
96
  1
97
97
  ]), s.STATIC_DRAW);
98
98
  let l = s.getAttribLocation(o, "a_position");
99
- s.enableVertexAttribArray(l), s.vertexAttribPointer(l, 2, s.FLOAT, !1, 0, 0), d = s.getUniformLocation(o, "u_time"), f = s.getUniformLocation(o, "u_resolution"), p = s.getUniformLocation(o, "u_center"), m = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), ne(), u = new ResizeObserver(b), u.observe(e), b(), se(b), S() ? C(10) : T();
100
- }), le(() => {
99
+ s.enableVertexAttribArray(l), s.vertexAttribPointer(l, 2, s.FLOAT, !1, 0, 0), d = s.getUniformLocation(o, "u_time"), f = s.getUniformLocation(o, "u_resolution"), p = s.getUniformLocation(o, "u_center"), m = s.getUniformLocation(o, "u_half"), h = s.getUniformLocation(o, "u_spread"), g = s.getUniformLocation(o, "u_color"), _ = s.getUniformLocation(o, "u_color2"), v = s.getUniformLocation(o, "u_duo"), x(), u = new ResizeObserver(S), u.observe(e), S(), ae(S), C() ? T(10) : E();
100
+ }), se(() => {
101
101
  cancelAnimationFrame(l), u?.disconnect();
102
- }), de(() => {
102
+ }), ue(() => {
103
103
  let e = s;
104
104
  s = null, setTimeout(() => {
105
105
  e?.getExtension("WEBGL_lose_context")?.loseContext();
106
106
  }, 150);
107
- }), (e, t) => (j(), w("div", {
107
+ }), (e, t) => (N(), D("div", {
108
108
  ref_key: "rootEl",
109
109
  ref: n,
110
110
  class: "pk-aurora",
111
111
  "aria-hidden": "true",
112
- style: ce(o.value)
113
- }, [i.value ? (j(), w("div", R)) : (j(), w("canvas", {
112
+ style: oe(o.value)
113
+ }, [i.value ? (N(), D("div", B)) : (N(), D("canvas", {
114
114
  key: 0,
115
115
  ref_key: "canvasEl",
116
116
  ref: r,
117
117
  class: "pk-aurora__canvas"
118
118
  }, null, 512))], 4));
119
119
  }
120
- }), B = .18, we = .35, Te = /* @__PURE__ */ O({
120
+ }), H = .18, Ce = .35, we = /* @__PURE__ */ j({
121
121
  __name: "PkVoiceOrb",
122
122
  props: {
123
123
  sample: {},
@@ -129,20 +129,20 @@ var R = {
129
129
  bars: { default: 5 }
130
130
  },
131
131
  setup(e) {
132
- let t = e, n = he("barsEl"), r = Array.from({ length: t.bars }, () => B), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
132
+ let t = e, n = me("barsEl"), r = Array.from({ length: t.bars }, () => H), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
133
133
  let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
134
134
  if (!n?.length) {
135
135
  let t = Date.now() / 260;
136
136
  return Array.from({ length: i }, (n, r) => {
137
137
  let i = .65 + .35 * Math.sin(t + r * .9);
138
- return B + e * 2.4 * i;
138
+ return H + e * 2.4 * i;
139
139
  });
140
140
  }
141
141
  let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
142
142
  return Array.from({ length: i }, (e, t) => {
143
143
  let r = 0;
144
144
  for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
145
- return B + r / o / 255 * 2.2;
145
+ return H + r / o / 255 * 2.2;
146
146
  });
147
147
  }, s = () => {
148
148
  let e = n.value?.children;
@@ -151,36 +151,36 @@ var R = {
151
151
  });
152
152
  }, c = () => {
153
153
  let e = o();
154
- r = r.map((t, n) => t + (Math.min(1, Math.max(B, e[n] ?? B)) - t) * we), s(), i = requestAnimationFrame(c);
154
+ r = r.map((t, n) => t + (Math.min(1, Math.max(H, e[n] ?? H)) - t) * Ce), s(), i = requestAnimationFrame(c);
155
155
  }, l = () => {
156
156
  i !== void 0 && (cancelAnimationFrame(i), i = void 0);
157
157
  };
158
- return I(() => t.state, async (e) => {
159
- e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => B * 1.6), await se(), s()) : i === void 0 && (i = requestAnimationFrame(c));
160
- }, { immediate: !0 }), le(l), (t, r) => (j(), w("div", {
161
- class: k(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
158
+ return R(() => t.state, async (e) => {
159
+ e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => H * 1.6), await ae(), s()) : i === void 0 && (i = requestAnimationFrame(c));
160
+ }, { immediate: !0 }), se(l), (t, r) => (N(), D("div", {
161
+ class: M(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
162
162
  "aria-hidden": "true"
163
- }, [T("div", {
163
+ }, [O("div", {
164
164
  ref_key: "barsEl",
165
165
  ref: n,
166
166
  class: "pk-voice-orb__bars"
167
- }, [(j(!0), w(y, null, pe(e.bars, (e) => (j(), w("span", {
167
+ }, [(N(!0), D(x, null, fe(e.bars, (e) => (N(), D("span", {
168
168
  key: e,
169
169
  class: "pk-voice-orb__bar"
170
170
  }))), 128))], 512)], 2));
171
171
  }
172
- }), Ee = {
172
+ }), Te = {
173
173
  key: 0,
174
174
  class: "pk-voice-session__badge",
175
175
  "aria-hidden": "true"
176
- }, V = {
176
+ }, U = {
177
177
  class: "pk-voice-session__status",
178
178
  role: "status"
179
- }, H = {
179
+ }, W = {
180
180
  key: 0,
181
181
  class: "pk-voice-session__live-dot",
182
182
  "aria-hidden": "true"
183
- }, De = ["title"], Oe = ["title"], ke = { class: "pk-voice-session__actions" }, Ae = /* @__PURE__ */ O({
183
+ }, Ee = ["title"], De = ["title"], Oe = { class: "pk-voice-session__actions" }, ke = /* @__PURE__ */ j({
184
184
  __name: "PkVoiceSession",
185
185
  props: {
186
186
  state: {},
@@ -199,17 +199,17 @@ var R = {
199
199
  "dismiss"
200
200
  ],
201
201
  setup(e, { emit: t }) {
202
- let n = e, r = t, { t: i } = ge({ useScope: "global" }), a = x(() => 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 = x(() => {
202
+ let n = e, r = t, { t: i } = he({ useScope: "global" }), a = w(() => 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 = w(() => {
203
203
  if (n.remainingSeconds === void 0) return;
204
204
  let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
205
205
  return `${e}:${String(t).padStart(2, "0")}`;
206
- }), s = x(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = x(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = x(() => {
206
+ }), s = w(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = w(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = w(() => {
207
207
  if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
208
208
  });
209
209
  return (t, n) => {
210
- let u = te;
211
- return j(), w("div", { class: k(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
212
- e.error ? (j(), w("span", Ee, [E(u, { name: "ri:error-warning-line" })])) : (j(), S(Te, {
210
+ let u = b;
211
+ return N(), D("div", { class: M(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
212
+ e.error ? (N(), D("span", Te, [k(u, { name: "ri:error-warning-line" })])) : (N(), T(we, {
213
213
  key: 1,
214
214
  state: e.state,
215
215
  sample: e.sample,
@@ -219,37 +219,37 @@ var R = {
219
219
  "sample",
220
220
  "spectrum"
221
221
  ])),
222
- T("div", V, [T("span", { class: k(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (j(), w("span", H)) : C("", !0), ie(" " + N(a.value), 1)], 2), e.error ? (j(), w("p", {
222
+ O("div", U, [O("span", { class: M(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (N(), D("span", W)) : E("", !0), ne(" " + F(a.value), 1)], 2), e.error ? (N(), D("p", {
223
223
  key: 0,
224
224
  class: "pk-voice-session__detail",
225
225
  title: e.rawError ?? e.error
226
- }, N(e.error), 9, De)) : C("", !0)]),
227
- o.value ? (j(), w("span", {
226
+ }, F(e.error), 9, Ee)) : E("", !0)]),
227
+ o.value ? (N(), D("span", {
228
228
  key: 2,
229
- class: k(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
230
- title: F(i)("hint.voiceRemaining"),
229
+ class: M(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
230
+ title: L(i)("hint.voiceRemaining"),
231
231
  "aria-hidden": "true"
232
- }, N(o.value), 11, Oe)) : C("", !0),
233
- T("div", ke, [e.error ? (j(), w(y, { key: 0 }, [E(h, {
232
+ }, F(o.value), 11, De)) : E("", !0),
233
+ O("div", Oe, [e.error ? (N(), D(x, { key: 0 }, [k(g, {
234
234
  icon: "ri:refresh-line",
235
- label: F(i)("action.retry"),
235
+ label: L(i)("action.retry"),
236
236
  onClick: n[0] ||= (e) => r("retry")
237
- }, null, 8, ["label"]), e.live ? (j(), S(h, {
237
+ }, null, 8, ["label"]), e.live ? (N(), T(g, {
238
238
  key: 0,
239
239
  icon: "ri:stop-circle-line",
240
240
  modifiers: "danger",
241
- title: F(i)("action.hangUp"),
242
- "aria-label": F(i)("action.hangUp"),
241
+ title: L(i)("action.hangUp"),
242
+ "aria-label": L(i)("action.hangUp"),
243
243
  onClick: n[1] ||= (e) => r("hang-up")
244
- }, null, 8, ["title", "aria-label"])) : (j(), S(h, {
244
+ }, null, 8, ["title", "aria-label"])) : (N(), T(g, {
245
245
  key: 1,
246
246
  icon: "ri:close-line",
247
- label: F(i)("action.close"),
247
+ label: L(i)("action.close"),
248
248
  onClick: n[2] ||= (e) => r("dismiss")
249
- }, null, 8, ["label"]))], 64)) : (j(), w(y, { key: 1 }, [E(h, {
249
+ }, null, 8, ["label"]))], 64)) : (N(), D(x, { key: 1 }, [k(g, {
250
250
  icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
251
- title: e.muted ? F(i)("action.unmute") : F(i)("action.mute"),
252
- "aria-label": e.muted ? F(i)("action.unmute") : F(i)("action.mute"),
251
+ title: e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
252
+ "aria-label": e.muted ? L(i)("action.unmute") : L(i)("action.mute"),
253
253
  "aria-pressed": e.muted,
254
254
  onClick: n[3] ||= (e) => r("toggle-mute")
255
255
  }, null, 8, [
@@ -257,18 +257,18 @@ var R = {
257
257
  "title",
258
258
  "aria-label",
259
259
  "aria-pressed"
260
- ]), E(h, {
260
+ ]), k(g, {
261
261
  icon: "ri:stop-circle-line",
262
262
  modifiers: "danger",
263
- title: F(i)("action.hangUp"),
264
- "aria-label": F(i)("action.hangUp"),
263
+ title: L(i)("action.hangUp"),
264
+ "aria-label": L(i)("action.hangUp"),
265
265
  onClick: n[4] ||= (e) => r("hang-up")
266
266
  }, null, 8, ["title", "aria-label"])], 64))])
267
267
  ], 2);
268
268
  };
269
269
  }
270
- }), je = (e) => {
271
- let t = me(), n = M("disconnected"), r = M("listening"), i = M(), o = M([]), s = M(), c = M(), l, u, d = 0, f = !1, p = () => {
270
+ }), Ae = (e) => {
271
+ let t = pe(), n = P("disconnected"), r = P("listening"), i = P(), o = P([]), s = P(), c = P(), l, u, d = 0, f = !1, p = () => {
272
272
  u &&= (clearInterval(u), void 0), s.value = void 0;
273
273
  }, m = (e) => {
274
274
  let t = Date.now() + e * 1e3, n = () => {
@@ -340,9 +340,9 @@ var R = {
340
340
  }
341
341
  }, v = () => {
342
342
  i.value = void 0;
343
- }, ee = (e) => {
343
+ }, y = (e) => {
344
344
  t.value?.setMicMuted(e);
345
- }, te = (e) => {
345
+ }, ee = (e) => {
346
346
  let n = t.value;
347
347
  if (!n || !e.trim()) return !1;
348
348
  try {
@@ -350,7 +350,7 @@ var R = {
350
350
  } catch (e) {
351
351
  return a.warn("The spoken answer could not be sent", e), !1;
352
352
  }
353
- }, y = (e) => {
353
+ }, b = (e) => {
354
354
  let n = t.value;
355
355
  if (!n) return 0;
356
356
  try {
@@ -358,21 +358,21 @@ var R = {
358
358
  } catch {
359
359
  return 0;
360
360
  }
361
- }, ne = (e) => {
361
+ }, x = (e) => {
362
362
  let n = t.value;
363
363
  if (n) try {
364
364
  return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
365
365
  } catch {
366
366
  return;
367
367
  }
368
- }, b = () => {
368
+ }, S = () => {
369
369
  let e = l;
370
370
  l = void 0, d += 1, p(), h(e);
371
371
  let r = t.value;
372
372
  t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
373
373
  };
374
- return typeof window < "u" && window.addEventListener("pagehide", b), A(() => {
375
- f = !0, typeof window < "u" && window.removeEventListener("pagehide", b), g();
374
+ return typeof window < "u" && window.addEventListener("pagehide", S), le(() => {
375
+ f = !0, typeof window < "u" && window.removeEventListener("pagehide", S), g();
376
376
  }), {
377
377
  status: n,
378
378
  mode: r,
@@ -380,33 +380,33 @@ var R = {
380
380
  transcript: o,
381
381
  remainingSeconds: s,
382
382
  chatId: c,
383
- isActive: x(() => n.value === "connected" || n.value === "connecting"),
384
- isConnecting: x(() => n.value === "connecting"),
385
- isSpeaking: x(() => n.value === "connected" && r.value === "speaking"),
386
- isListening: x(() => n.value === "connected" && r.value === "listening"),
383
+ isActive: w(() => n.value === "connected" || n.value === "connecting"),
384
+ isConnecting: w(() => n.value === "connecting"),
385
+ isSpeaking: w(() => n.value === "connected" && r.value === "speaking"),
386
+ isListening: w(() => n.value === "connected" && r.value === "listening"),
387
387
  start: _,
388
388
  stop: g,
389
389
  dismissError: v,
390
- setMuted: ee,
391
- sendUserMessage: te,
392
- readLevel: y,
393
- readSpectrum: ne
390
+ setMuted: y,
391
+ sendUserMessage: ee,
392
+ readLevel: b,
393
+ readSpectrum: x
394
394
  };
395
- }, Me = Symbol("ChatFilePreviewDock");
396
- function Ne(e) {
397
- fe(Me, e);
395
+ }, je = Symbol("ChatFilePreviewDock");
396
+ function Me(e) {
397
+ de(je, e);
398
398
  }
399
- function Pe() {
400
- return ae(Me, void 0);
399
+ function Ne() {
400
+ return re(je, void 0);
401
401
  }
402
402
  // ../../packages/components/src/chat/useWakeupWatch.ts
403
- var Fe = 4e3, Ie = [
403
+ var Pe = 4e3, Fe = [
404
404
  3e3,
405
405
  5e3,
406
406
  1e4
407
- ], Le = 12e4, U = 3e4;
408
- function Re(e) {
409
- let t = M(null), n = M(!1), r, i = !1, a = () => {
407
+ ], Ie = 12e4, G = 3e4;
408
+ function Le(e) {
409
+ let t = P(null), n = P(!1), r, i = !1, a = () => {
410
410
  clearTimeout(r), r = void 0;
411
411
  }, o = (e, t) => {
412
412
  a(), i || (r = setTimeout(() => void t(), e));
@@ -423,12 +423,12 @@ function Re(e) {
423
423
  }
424
424
  let r = t.value;
425
425
  if (r) {
426
- let e = Date.parse(r.dueAt) - Date.now() + Fe;
427
- o(Math.max(Fe, e), () => l(r.wakeId, Date.now(), 0));
426
+ let e = Date.parse(r.dueAt) - Date.now() + Pe;
427
+ o(Math.max(Pe, e), () => l(r.wakeId, Date.now(), 0));
428
428
  }
429
429
  }
430
430
  async function l(t, n, r) {
431
- await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Le ? await c() : o(Ie[Math.min(r, Ie.length - 1)], () => l(t, n, r + 1)));
431
+ await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Ie ? await c() : o(Fe[Math.min(r, Fe.length - 1)], () => l(t, n, r + 1)));
432
432
  }
433
433
  async function u() {
434
434
  n.value = !0;
@@ -452,23 +452,23 @@ function Re(e) {
452
452
  function h() {
453
453
  f = void 0;
454
454
  }
455
- let g = x(() => e.messages().some((e) => e.role === "user"));
456
- I([e.chatId, g], ([, t]) => {
455
+ let g = w(() => e.messages().some((e) => e.role === "user"));
456
+ R([e.chatId, g], ([, t]) => {
457
457
  d();
458
458
  let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
459
459
  t && !r && c();
460
- }, { immediate: !0 }), I(e.status, (e, t) => {
460
+ }, { immediate: !0 }), R(e.status, (e, t) => {
461
461
  e === "ready" && t !== "ready" && g.value && c();
462
462
  });
463
463
  let _;
464
464
  function v() {
465
465
  t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
466
466
  }
467
- let ee = () => v();
468
- return document.addEventListener("visibilitychange", ee), I(() => t.value?.wakeId, (e) => {
469
- clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, U));
470
- }), le(() => {
471
- i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", ee);
467
+ let y = () => v();
468
+ return document.addEventListener("visibilitychange", y), R(() => t.value?.wakeId, (e) => {
469
+ clearInterval(_), _ = void 0, e && !i && (v(), _ = setInterval(v, G));
470
+ }), se(() => {
471
+ i = !0, a(), clearInterval(_), document.removeEventListener("visibilitychange", y);
472
472
  }), {
473
473
  pendingWakeup: t,
474
474
  isStopping: n,
@@ -481,8 +481,8 @@ function Re(e) {
481
481
  };
482
482
  }
483
483
  // ../../packages/components/src/chat/useChatFilePreview.ts
484
- function ze(e) {
485
- let t = M(), n = M(), r = M(!1), i = M(!1), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = async (c) => {
484
+ function Re(e) {
485
+ let t = P(), n = P(), r = P(!1), i = P(!1), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = async (c) => {
486
486
  let l = ++o, u = s;
487
487
  t.value = c, i.value = !1;
488
488
  let d = a.get(c.storedFileName);
@@ -513,16 +513,16 @@ function ze(e) {
513
513
  };
514
514
  }
515
515
  // ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
516
- var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
516
+ var ze = { class: "pk-chatbot-view-chat__input-stage" }, Be = {
517
517
  key: 1,
518
518
  class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
519
- }, He = { class: "pk-chatbot-view-chat__agent-chip" }, Ue = {
519
+ }, Ve = { class: "pk-chatbot-view-chat__agent-chip" }, He = {
520
520
  key: 0,
521
521
  class: "pk-chatbot-view-chat__agent-chip-name"
522
- }, We = {
522
+ }, Ue = {
523
523
  key: 0,
524
524
  class: "pk-chatbot-view-chat__drop-overlay"
525
- }, Ge = 1e3, Ke = 3e3, qe = 6e4, Je = 3e5, Ye = 6e5, Xe = /* @__PURE__ */ O({
525
+ }, We = 1e3, Ge = 3e3, Ke = 6e4, qe = 3e5, Je = 6e5, Ye = /* @__PURE__ */ j({
526
526
  __name: "PkChatbotViewChat",
527
527
  props: {
528
528
  agentId: {},
@@ -531,125 +531,126 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
531
531
  },
532
532
  emits: ["show-info", "revise"],
533
533
  setup(a, { emit: c }) {
534
- let h = D(() => import("./PkToolShowForm-Crg4Kl6v.js").then((e) => e.n)), y = D(() => import("./PkToolShowContactForm-BGTI1sio.js").then((e) => e.n)), ie = D(() => import("./PkToolShowSuggestedReply-BlcEfMx8.js").then((e) => e.n)), O = D(() => import("./PkToolShowSources-Bf9_JwFL.js").then((e) => e.n)), ae = D(() => import("./PkToolRequestGeolocation-SDzM1-Wl.js").then((e) => e.n)), se = D(() => import("./PkToolRequestOAuthConnection-DNrlGxMX.js")), ce = D(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)), ue = D(() => import("./PkToolShowDiagram-xef3wJb0.js")), A = D(() => import("./PkToolChatFile-i0rHgFxB.js").then((e) => e.n)), de = D(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)), pe = D(() => import("./PkFilePreview-B54Dp_Rs.js").then((e) => e.n)), me = D(() => import("./PkFilePreviewDialog-QDPoZh1v.js").then((e) => e.n)), P = a, xe = c, R = r(P.agentId), { agentInterface: z, agentFileUpload: Se, agentType: B, agentVoice: we, actions: Te, revisedAnswers: Ee, messages: V, chat: H, messageFeedbacks: De, feedbackDialogMessage: Oe, isFeedbackSubmitting: ke, isFeedbackSubmitted: Me, feedbackSubmitError: Ne, isLeadSubmitted: Fe, isLoadingSubmitLead: Ie, submitLeadError: Le, input: U, inputMessagePlaceholder: Xe, isConversationBlocked: Ze, baseUrl: Qe, pendingAttachments: $e, isAttachmentLimitReached: et, fileLimitError: tt, apiClient: W, isDark: nt, hostToolsPending: rt, pageNoticeLevel: it, hostConfirmation: at, agentPageAccess: ot, hostStepTitles: st, canQueue: ct, queuedMessages: lt, backgroundAnswers: ut, inputFocusRequest: dt, pagePointer: G, pagePointerAvailable: ft, pagePointing: pt } = ye(R);
535
- fe(d, st);
536
- let mt = he("inputEl");
537
- I(dt, () => {
538
- mt.value?.focus();
539
- }), I(G, (e) => {
540
- e && mt.value?.focus();
534
+ let g = A(() => import("./PkToolShowForm-DzsXJfOl.js").then((e) => e.n)), x = A(() => import("./PkToolShowContactForm-K6Z5MUXk.js").then((e) => e.n)), ne = A(() => import("./PkToolShowSuggestedReply-smfC1hlT.js").then((e) => e.n)), j = A(() => import("./PkToolShowSources-D4zjssdh.js").then((e) => e.n)), re = A(() => import("./PkToolRequestGeolocation-euI4VBVe.js").then((e) => e.n)), ae = A(() => import("./PkToolRequestOAuthConnection-DAAYyufP.js")), oe = A(() => import("./PkToolShowLocation-DAQEuCuQ.js").then((e) => e.n)), ce = A(() => import("./PkToolShowDiagram-DrlGh_v6.js")), le = A(() => import("./PkToolChatFile-HWGjtuaT.js").then((e) => e.n)), ue = A(() => import("./PkToolShareDocument-CsS5OTDj.js").then((e) => e.n)), fe = A(() => import("./PkFilePreview-p-AGDrXi.js").then((e) => e.n)), pe = A(() => import("./PkFilePreviewDialog-BpeeWS6d.js").then((e) => e.n)), I = a, be = c, B = r(I.agentId), { agentInterface: V, agentFileUpload: xe, agentType: H, agentVoice: Ce, actions: we, revisedAnswers: Te, messages: U, chat: W, messageFeedbacks: Ee, feedbackDialogMessage: De, isFeedbackSubmitting: Oe, isFeedbackSubmitted: je, feedbackSubmitError: Me, isLeadSubmitted: Pe, isLoadingSubmitLead: Fe, submitLeadError: Ie, input: G, inputMessagePlaceholder: Ye, isConversationBlocked: Xe, baseUrl: Ze, pendingAttachments: Qe, isAttachmentLimitReached: $e, fileLimitError: et, apiClient: K, isDark: tt, hostToolsPending: nt, pageNoticeLevel: rt, hostConfirmation: it, agentPageAccess: at, hostStepTitles: ot, hostStepChanges: st, confirmationMode: ct, canQueue: lt, queuedMessages: ut, backgroundAnswers: dt, inputFocusRequest: ft, pagePointer: pt, pagePointerAvailable: mt, pagePointing: ht } = ve(B);
535
+ de(f, ot), de(d, st);
536
+ let gt = me("inputEl");
537
+ R(ft, () => {
538
+ gt.value?.focus();
539
+ }), R(pt, (e) => {
540
+ e && gt.value?.focus();
541
541
  });
542
- let ht = x(() => G.value ? {
543
- kind: G.value.kind,
544
- label: G.value.label
545
- } : void 0), K = x(() => B.value === "reasoning" ? void 0 : Se.value), q = (e) => W.value.getMediaDownloadUrl(P.agentId, R.localChatId, e), { handleSubmit: gt, stopGeneration: _t, regenerate: vt, onUpvote: yt, onDownvote: bt, onFeedback: xt, onFeedbackSubmit: St, onLeadSubmit: Ct, startNewChat: wt, addToolOutput: Tt, addToolApprovalResponse: Et, handleFileSelect: Dt, clearFileLimitError: Ot, refreshMessages: kt, appendMessage: At, closePageNotice: jt, respondHostConfirmation: Mt, editQueuedMessage: Nt, removeQueuedMessage: Pt, openBackgroundAnswer: Ft, dismissBackgroundAnswer: It } = R, { t: J } = ge({ useScope: "global" }), Lt = x(() => rt.value > 0), Rt = x(() => Lt.value && H.value.status === "ready" ? "streaming" : H.value.status), zt = p(() => ot.value?.notice), Bt = x(() => it.value ? zt.value || J(`message.pageAccessNotice.${it.value}`) : void 0), Vt = x(() => {
546
- let e = tt.value;
542
+ let _t = w(() => pt.value ? {
543
+ kind: pt.value.kind,
544
+ label: pt.value.label
545
+ } : void 0), vt = w(() => H.value === "reasoning" ? void 0 : xe.value), q = (e) => K.value.getMediaDownloadUrl(I.agentId, B.localChatId, e), { handleSubmit: yt, stopGeneration: bt, regenerate: xt, onUpvote: St, onDownvote: Ct, onFeedback: wt, onFeedbackSubmit: Tt, onLeadSubmit: Et, startNewChat: Dt, addToolOutput: Ot, addToolApprovalResponse: kt, handleFileSelect: At, clearFileLimitError: jt, refreshMessages: Mt, appendMessage: Nt, closePageNotice: Pt, respondHostConfirmation: Ft, editQueuedMessage: It, removeQueuedMessage: Lt, openBackgroundAnswer: Rt, dismissBackgroundAnswer: zt } = B, { t: J } = he({ useScope: "global" }), Bt = w(() => nt.value > 0), Vt = w(() => Bt.value && W.value.status === "ready" ? "streaming" : W.value.status), Ht = m(() => at.value?.notice), Ut = w(() => rt.value ? Ht.value || J(`message.pageAccessNotice.${rt.value}`) : void 0), Wt = w(() => {
546
+ let e = et.value;
547
547
  if (e) return e.reason === "per-chat" ? J("message.fileLimitPerChat", { max: e.max }) : J("message.fileLimitPerMessage", { max: e.max });
548
- }), Ht = x(() => ut.value.map(({ chatId: e, title: t }) => ({
548
+ }), Gt = w(() => dt.value.map(({ chatId: e, title: t }) => ({
549
549
  id: e,
550
550
  text: t ? J("message.backgroundAnswerReady", { title: t }) : J("message.backgroundAnswerReadyUntitled")
551
- }))), Ut = p(() => z.value?.dismissableNotice), Wt = x(() => V.value.some((e) => e.role === "user")), Gt = x(() => P.modifier === "fullscreen" && !Wt.value), Kt = be(z, () => P.userName), qt = he("chatViewEl"), Jt = Pe(), Yt = x(() => !!Jt?.value), Xt = x(() => Jt?.value ?? "body"), Zt = M(0), Qt = M(0);
552
- ve([qt, x(() => Jt?.value ?? void 0)], (e) => {
551
+ }))), Kt = m(() => V.value?.dismissableNotice), qt = w(() => U.value.some((e) => e.role === "user")), Jt = w(() => I.modifier === "fullscreen" && !qt.value), Yt = ye(V, () => I.userName), Xt = me("chatViewEl"), Zt = Ne(), Qt = w(() => !!Zt?.value), $t = w(() => Zt?.value ?? "body"), en = P(0), tn = P(0);
552
+ _e([Xt, w(() => Zt?.value ?? void 0)], (e) => {
553
553
  for (let t of e) {
554
554
  let e = t.borderBoxSize?.[0]?.inlineSize ?? t.contentRect.width;
555
- t.target === qt.value ? Zt.value = e : Qt.value = e;
555
+ t.target === Xt.value ? en.value = e : tn.value = e;
556
556
  }
557
557
  }, { box: "border-box" });
558
- let $t = x(() => Zt.value + (Yt.value ? Qt.value : 0) >= Ge), en = x(() => Zt.value > 0 && Zt.value < 576), { target: Y, preview: tn, loading: nn, error: rn, open: an, close: on, reset: sn } = ze((e) => W.value.getChatFilePreview(P.agentId, R.localChatId, e)), X = M({}), cn = (e) => {
558
+ let nn = w(() => en.value + (Qt.value ? tn.value : 0) >= We), rn = w(() => en.value > 0 && en.value < 576), { target: Y, preview: an, loading: on, error: sn, open: cn, close: ln, reset: un } = Re((e) => K.value.getChatFilePreview(I.agentId, B.localChatId, e)), X = P({}), dn = (e) => {
559
559
  let t = (e) => e?.fileId ?? e?.storedFileName;
560
- return t(e) !== t(Y.value) && (X.value = {}), an(e);
561
- }, ln = M(!1), un = x(() => !!Y.value && $t.value && !ln.value), dn = () => {
562
- on(), ln.value = !1;
563
- }, fn = x(() => {
560
+ return t(e) !== t(Y.value) && (X.value = {}), cn(e);
561
+ }, fn = P(!1), pn = w(() => !!Y.value && nn.value && !fn.value), mn = () => {
562
+ ln(), fn.value = !1;
563
+ }, hn = w(() => {
564
564
  let e = /* @__PURE__ */ new Map();
565
- for (let t of V.value) for (let n of t.parts) {
565
+ for (let t of U.value) for (let n of t.parts) {
566
566
  let { type: t, state: r, output: i } = n;
567
- if (Xn.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
567
+ if ($n.has(t) && r === "output-available" && i?.fileId && i.version && i.storedFileName) {
568
568
  let t = e.get(i.fileId) ?? /* @__PURE__ */ new Map();
569
569
  t.set(i.version, i.storedFileName), e.set(i.fileId, t);
570
570
  }
571
571
  }
572
572
  for (let [t, n] of e) n.has(1) || n.set(1, t);
573
573
  return e;
574
- }), pn = x(() => [...fn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), mn = (e) => {
575
- let t = Y.value, n = fn.value.get(t?.fileId ?? "")?.get(e);
576
- t && n && cn({
574
+ }), gn = w(() => [...hn.value.get(Y.value?.fileId ?? "")?.keys() ?? []].sort((e, t) => e - t)), _n = (e) => {
575
+ let t = Y.value, n = hn.value.get(t?.fileId ?? "")?.get(e);
576
+ t && n && dn({
577
577
  ...t,
578
578
  version: e,
579
579
  storedFileName: n
580
580
  });
581
- }, hn = x(() => {
582
- let e = Y.value, t = pn.value;
581
+ }, vn = w(() => {
582
+ let e = Y.value, t = gn.value;
583
583
  return !!$.value && !!e?.fileId && !!e.version && t.length > 0 && e.version < t[t.length - 1];
584
- }), gn = () => {
584
+ }), yn = () => {
585
585
  let e = Y.value;
586
586
  e?.fileId && e.version && ($.value?.({
587
587
  fileId: e.fileId,
588
588
  version: e.version,
589
589
  filename: e.filename
590
- }), dn());
590
+ }), mn());
591
591
  };
592
- I(() => R.localChatId, sn);
593
- let _n = async (e) => (await W.value.expandSourceContext(P.agentId, e.documentId, e.chunkIndex)).content, vn = async (e) => {
594
- let t = await W.value.downloadSourceDocument(P.agentId, e);
592
+ R(() => B.localChatId, un);
593
+ let bn = async (e) => (await K.value.expandSourceContext(I.agentId, e.documentId, e.chunkIndex)).content, xn = async (e) => {
594
+ let t = await K.value.downloadSourceDocument(I.agentId, e);
595
595
  window.open(t.downloadUrl, "_blank");
596
- }, { isOverDropZone: yn } = _e(qt, {
597
- dataTypes: (e) => t(e, K.value?.allowedMimeTypes ?? []),
596
+ }, { isOverDropZone: Sn } = ge(Xt, {
597
+ dataTypes: (e) => t(e, vt.value?.allowedMimeTypes ?? []),
598
598
  onDrop: (e) => {
599
- if (K.value?.enabled && e) for (let t of e) Dt(t);
599
+ if (vt.value?.enabled && e) for (let t of e) At(t);
600
600
  }
601
- }), bn = M(!1), xn = !1, Z = M(!1), Sn = [
601
+ }), Cn = P(!1), wn = !1, Z = P(!1), Tn = [
602
602
  3e3,
603
603
  5e3,
604
604
  1e4
605
- ], Cn, wn, Tn = !1, En = 0, Dn = !1;
606
- function On() {
607
- clearTimeout(Cn), Cn = void 0, wn = void 0, Tn = !1, En = 0, Z.value = !1;
605
+ ], En, Dn, On = !1, kn = 0, An = !1;
606
+ function jn() {
607
+ clearTimeout(En), En = void 0, Dn = void 0, On = !1, kn = 0, Z.value = !1;
608
608
  }
609
- function kn(e) {
610
- xn || (clearTimeout(Cn), Cn = setTimeout(() => {
611
- An();
609
+ function Mn(e) {
610
+ wn || (clearTimeout(En), En = setTimeout(() => {
611
+ Nn();
612
612
  }, e));
613
613
  }
614
- async function An() {
615
- if (xn || Dn) return;
616
- Dn = !0;
614
+ async function Nn() {
615
+ if (wn || An) return;
616
+ An = !0;
617
617
  let e;
618
618
  try {
619
- e = await kt();
619
+ e = await Mt();
620
620
  } finally {
621
- Dn = !1;
621
+ An = !1;
622
622
  }
623
- if (xn) return;
624
- if (e === "caught-up" && (Z.value = !1, sr()), Q.isActive.value) {
625
- wn = void 0, Tn = !1, En = 0, kn(Ke);
623
+ if (wn) return;
624
+ if (e === "caught-up" && (Z.value = !1, ur()), Q.isActive.value) {
625
+ Dn = void 0, On = !1, kn = 0, Mn(Ge);
626
626
  return;
627
627
  }
628
- wn === void 0 && (wn = Date.now(), Tn = !!Q.error.value);
629
- let t = Date.now() - wn;
630
- if (e === "caught-up" && t >= (Tn ? Je : qe) || t >= Ye) {
631
- On(), cr();
628
+ Dn === void 0 && (Dn = Date.now(), On = !!Q.error.value);
629
+ let t = Date.now() - Dn;
630
+ if (e === "caught-up" && t >= (On ? qe : Ke) || t >= Je) {
631
+ jn(), dr();
632
632
  return;
633
633
  }
634
- let n = Sn[Math.min(En, Sn.length - 1)];
635
- En += 1, kn(n);
634
+ let n = Tn[Math.min(kn, Tn.length - 1)];
635
+ kn += 1, Mn(n);
636
636
  }
637
- let jn = (e = 1200) => {
638
- kn(e);
639
- }, Mn, Q = je({
637
+ let Pn = (e = 1200) => {
638
+ Mn(e);
639
+ }, Fn, Q = Ae({
640
640
  fetchGrant: async () => {
641
- Mn = R.voicePageTools();
642
- let e = await W.value.createVoiceSession(P.agentId, R.localChatId, {
643
- deviceContext: R.buildDeviceContext(),
644
- externalContext: R.externalContext,
645
- pageTools: Mn?.declaration
641
+ Fn = B.voicePageTools();
642
+ let e = await K.value.createVoiceSession(I.agentId, B.localChatId, {
643
+ deviceContext: B.buildDeviceContext(),
644
+ externalContext: B.externalContext,
645
+ pageTools: Fn?.declaration,
646
+ ...B.confirmationMode === "automatic" && { confirmations: "automatic" }
646
647
  });
647
- return e.chatId !== R.localChatId && (R.localChatId = e.chatId), e;
648
+ return e.chatId !== B.localChatId && (B.localChatId = e.chatId), e;
648
649
  },
649
- closeGrant: (e) => W.value.closeVoiceSession(P.agentId, e),
650
- clientTools: () => Mn?.clientTools,
650
+ closeGrant: (e) => K.value.closeVoiceSession(I.agentId, e),
651
+ clientTools: () => Fn?.clientTools,
651
652
  onTranscript: (e) => {
652
- e.role === "user" ? (Z.value = !0, or(), At({
653
+ e.role === "user" ? (Z.value = !0, lr(), Nt({
653
654
  id: `${i}user-${n()}`,
654
655
  role: "user",
655
656
  parts: [{
@@ -659,171 +660,171 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
659
660
  })) : Z.value = !1;
660
661
  },
661
662
  onTurnEnd: () => {
662
- jn();
663
+ Pn();
663
664
  }
664
665
  });
665
- I(() => Q.isActive.value, (e) => {
666
- e || R.cancelVoicePageCalls();
667
- }), I(() => Q.error.value, (e) => {
666
+ R(() => Q.isActive.value, (e) => {
667
+ e || B.cancelVoicePageCalls();
668
+ }), R(() => Q.error.value, (e) => {
668
669
  e && (Z.value = !1);
669
670
  });
670
- let Nn = x(() => we.value?.enabled === !0), Pn = x(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Fn = x(() => {
671
+ let In = w(() => Ce.value?.enabled === !0), Ln = w(() => Q.error.value ? "error" : Q.isConnecting.value ? "connecting" : Q.isSpeaking.value ? "speaking" : Q.isActive.value ? "listening" : "idle"), Rn = w(() => {
671
672
  let e = Q.error.value;
672
673
  if (e) return /took too long/i.test(e) ? J("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? J("message.voiceNoAnswer") : J("message.voiceInterrupted");
673
- }), In = x(() => Q.isSpeaking.value ? "output" : "input"), Ln = () => Q.readLevel(In.value), Rn = () => Q.readSpectrum(In.value), zn = async () => {
674
- bn.value = !1, await Q.start(), Q.isActive.value && (On(), kn(Ke));
675
- }, Bn = async () => {
676
- Z.value = !1, await Q.stop(), !xn && jn(0);
677
- }, Vn = () => {
674
+ }), zn = w(() => Q.isSpeaking.value ? "output" : "input"), Bn = () => Q.readLevel(zn.value), Vn = () => Q.readSpectrum(zn.value), Hn = async () => {
675
+ Cn.value = !1, await Q.start(), Q.isActive.value && (jn(), Mn(Ge));
676
+ }, Un = async () => {
677
+ Z.value = !1, await Q.stop(), !wn && Pn(0);
678
+ }, Wn = () => {
678
679
  Q.dismissError();
679
- }, Hn = async () => {
680
- Q.dismissError(), await Q.stop(), await zn();
681
- }, Un = (e) => e?.toolCallId ?? "", Wn = M(/* @__PURE__ */ new Set()), Gn = (e) => Wn.value.has(Un(e)), Kn = M(/* @__PURE__ */ new Map()), qn = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (Wn.value = new Set(Wn.value).add(Un(e)), jn()), !0) : !1, Jn = (e, t, n) => {
682
- qn(t, u(t, n)) || Tt({
680
+ }, Gn = async () => {
681
+ Q.dismissError(), await Q.stop(), await Hn();
682
+ }, Kn = (e) => e?.toolCallId ?? "", qn = P(/* @__PURE__ */ new Set()), Jn = (e) => qn.value.has(Kn(e)), Yn = P(/* @__PURE__ */ new Map()), Xn = (e, t) => Q.isActive.value ? (Q.sendUserMessage(t) && (qn.value = new Set(qn.value).add(Kn(e)), Pn()), !0) : !1, Zn = (e, t, n) => {
683
+ Xn(t, l(t, n)) || Ot({
683
684
  tool: e,
684
- toolCallId: Un(t),
685
+ toolCallId: Kn(t),
685
686
  output: n
686
687
  });
687
- }, Yn = (e) => {
688
+ }, Qn = (e) => {
688
689
  let t = e.confirmed ? J("message.voiceConfirmed") : J("message.voiceCancelled");
689
- qn({ toolCallId: e.toolCallId }, t) ? Wn.value.has(e.toolCallId) && (Kn.value = new Map(Kn.value).set(e.toolCallId, e.confirmed)) : Tt({
690
+ Xn({ toolCallId: e.toolCallId }, t) ? qn.value.has(e.toolCallId) && (Yn.value = new Map(Yn.value).set(e.toolCallId, e.confirmed)) : Ot({
690
691
  tool: "requestConfirm",
691
692
  toolCallId: e.toolCallId,
692
693
  output: e.confirmed ? "confirmed" : "cancelled"
693
694
  });
694
- }, Xn = /* @__PURE__ */ new Set([
695
+ }, $n = /* @__PURE__ */ new Set([
695
696
  "tool-editSpreadsheet",
696
697
  "tool-editWordDocument",
697
698
  "tool-createSpreadsheet",
698
699
  "tool-createWordDocument"
699
- ]), Zn = x(() => {
700
+ ]), er = w(() => {
700
701
  let e = /* @__PURE__ */ new Map();
701
- for (let t of V.value) for (let n of t.parts) {
702
+ for (let t of U.value) for (let n of t.parts) {
702
703
  let { type: t, state: r, output: i } = n;
703
- Xn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
704
+ $n.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
704
705
  }
705
706
  return e;
706
- }), Qn = x(() => {
707
+ }), tr = w(() => {
707
708
  let e = /* @__PURE__ */ new Map(), t = (t, n) => {
708
709
  if (t && n) {
709
710
  let r = t.toLowerCase();
710
711
  e.set(r, (e.get(r) ?? /* @__PURE__ */ new Set()).add(n));
711
712
  }
712
713
  };
713
- for (let e of V.value) for (let n of e.parts) {
714
+ for (let e of U.value) for (let n of e.parts) {
714
715
  if (o(n)) {
715
716
  t(n.filename, s(n)?.storedFileName);
716
717
  continue;
717
718
  }
718
719
  let { type: e, state: r, output: i } = n;
719
- Xn.has(e) && r === "output-available" && i?.filename && t(l(i.filename, i.version), i.fileId);
720
+ $n.has(e) && r === "output-available" && i?.filename && t(u(i.filename, i.version), i.fileId);
720
721
  }
721
722
  return e;
722
- }), $ = x(() => Ze.value ? void 0 : (e) => {
723
- let t = (Qn.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
724
- U.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), gt();
725
- }), $n = (e, t) => {
726
- qn(e, t) || (U.value = t, gt());
727
- }, er = (e, t) => {
723
+ }), $ = w(() => Xe.value ? void 0 : (e) => {
724
+ let t = (tr.value.get(e.filename.toLowerCase())?.size ?? 0) > 1;
725
+ G.value = J(t ? "messagePart.chatFileRestoreRequestById" : "messagePart.chatFileRestoreRequest", e), yt();
726
+ }), nr = (e, t) => {
727
+ Xn(e, t) || (G.value = t, yt());
728
+ }, rr = (e, t) => {
728
729
  let n = t.error ? J("message.voiceLocationRefused") : J("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
729
- qn(e, n) || Tt({
730
+ Xn(e, n) || Ot({
730
731
  tool: "requestGeolocation",
731
- toolCallId: Un(e),
732
+ toolCallId: Kn(e),
732
733
  output: t
733
734
  });
734
- }, tr = (e, t) => {
735
- qn(e, J("message.voiceConnectionDone")) || Tt({
735
+ }, ir = (e, t) => {
736
+ Xn(e, J("message.voiceConnectionDone")) || Ot({
736
737
  tool: "requestOAuthConnection",
737
- toolCallId: Un(e),
738
+ toolCallId: Kn(e),
738
739
  output: {
739
740
  connected: !0,
740
741
  mcpServerId: t
741
742
  }
742
743
  });
743
- }, nr = () => {
744
- bn.value = !bn.value, Q.setMuted(bn.value);
744
+ }, ar = () => {
745
+ Cn.value = !Cn.value, Q.setMuted(Cn.value);
745
746
  };
746
- le(() => {
747
- xn = !0, On();
747
+ se(() => {
748
+ wn = !0, jn();
748
749
  });
749
- let { pendingWakeup: rr, isStopping: ir, stop: ar, spokenTurnStarted: or, spokenTurnsWritten: sr, forgetSpokenTurns: cr } = Re({
750
- agentId: () => P.agentId,
751
- chatId: () => R.localChatId,
752
- apiClient: () => W.value,
753
- messages: () => V.value,
754
- refreshMessages: kt,
755
- status: () => H.value.status
750
+ let { pendingWakeup: or, isStopping: sr, stop: cr, spokenTurnStarted: lr, spokenTurnsWritten: ur, forgetSpokenTurns: dr } = Le({
751
+ agentId: () => I.agentId,
752
+ chatId: () => B.localChatId,
753
+ apiClient: () => K.value,
754
+ messages: () => U.value,
755
+ refreshMessages: Mt,
756
+ status: () => W.value.status
756
757
  });
757
758
  return (t, n) => {
758
- let r = te;
759
- return j(), w("div", {
759
+ let r = b;
760
+ return N(), D("div", {
760
761
  ref_key: "chatViewEl",
761
- ref: qt,
762
- class: k(["pk-chatbot-view-chat", {
763
- "pk-chatbot-view-chat--dragover": F(yn) && K.value?.enabled,
764
- "pk-chatbot-view-chat--empty": Gt.value,
765
- "pk-chatbot-view-chat--with-preview": un.value && !Yt.value
762
+ ref: Xt,
763
+ class: M(["pk-chatbot-view-chat", {
764
+ "pk-chatbot-view-chat--dragover": L(Sn) && vt.value?.enabled,
765
+ "pk-chatbot-view-chat--empty": Jt.value,
766
+ "pk-chatbot-view-chat--with-preview": pn.value && !Qt.value
766
767
  }])
767
768
  }, [
768
- E(b, {
769
+ k(C, {
769
770
  name: "pk-chatbot-view-chat-fade",
770
771
  mode: "out-in"
771
772
  }, {
772
- default: L(() => [Gt.value ? (j(), S(v, {
773
+ default: z(() => [Jt.value ? (N(), T(y, {
773
774
  key: 0,
774
- greeting: F(Kt),
775
- logo: F(z)?.logo,
776
- name: F(R).name
775
+ greeting: L(Yt),
776
+ logo: L(V)?.logo,
777
+ name: L(B).name
777
778
  }, null, 8, [
778
779
  "greeting",
779
780
  "logo",
780
781
  "name"
781
- ])) : (j(), S(e, {
782
+ ])) : (N(), T(e, {
782
783
  key: 1,
783
784
  class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
784
785
  interactive: "",
785
- messages: F(V),
786
- "confirm-verdicts-on-call": Kn.value,
787
- status: F(H).status,
788
- error: F(H).error,
789
- "main-color": F(z)?.mainColor,
790
- "text-color": F(z)?.textColor,
791
- "revised-answers": F(Ee),
792
- actions: F(Te),
793
- "message-feedbacks": F(De),
794
- "feedback-message-id": F(Oe)?.id,
795
- "feedback-loading": F(ke),
796
- "feedback-submitted": F(Me),
797
- "feedback-error": F(Ne),
798
- "show-extended-steps": F(z)?.showExtendedSteps,
799
- "hide-reasoning": F(z)?.showReasoning === !1,
786
+ messages: L(U),
787
+ "confirm-verdicts-on-call": Yn.value,
788
+ status: L(W).status,
789
+ error: L(W).error,
790
+ "main-color": L(V)?.mainColor,
791
+ "text-color": L(V)?.textColor,
792
+ "revised-answers": L(Te),
793
+ actions: L(we),
794
+ "message-feedbacks": L(Ee),
795
+ "feedback-message-id": L(De)?.id,
796
+ "feedback-loading": L(Oe),
797
+ "feedback-submitted": L(je),
798
+ "feedback-error": L(Me),
799
+ "show-extended-steps": L(V)?.showExtendedSteps,
800
+ "hide-reasoning": L(V)?.showReasoning === !1,
800
801
  "awaiting-spoken-answer": Z.value,
801
- "host-working": Lt.value,
802
- "host-confirmation": F(at),
803
- "is-dark": F(nt),
802
+ "host-working": Bt.value,
803
+ "host-confirmation": L(it),
804
+ "is-dark": L(tt),
804
805
  "show-scroll-to-bottom": a.modifier === "fullscreen",
805
- onFeedbackSubmit: n[0] ||= (e) => F(St)(e),
806
- onFeedbackClose: n[1] ||= (e) => Oe.value = void 0,
807
- onRegenerate: F(vt),
808
- onAutoRetry: F(vt),
809
- onResetChat: F(wt),
810
- onShowInfo: n[2] ||= (e) => xe("show-info", e),
811
- onRevise: n[3] ||= (e) => xe("revise", e),
812
- onUpvote: F(yt),
813
- onDownvote: F(bt),
814
- onFeedback: F(xt),
815
- onApprovalRespond: F(Et),
816
- onConfirmRespond: Yn,
817
- onHostConfirmRespond: F(Mt)
806
+ onFeedbackSubmit: n[0] ||= (e) => L(Tt)(e),
807
+ onFeedbackClose: n[1] ||= (e) => De.value = void 0,
808
+ onRegenerate: L(xt),
809
+ onAutoRetry: L(xt),
810
+ onResetChat: L(Dt),
811
+ onShowInfo: n[2] ||= (e) => be("show-info", e),
812
+ onRevise: n[3] ||= (e) => be("revise", e),
813
+ onUpvote: L(St),
814
+ onDownvote: L(Ct),
815
+ onFeedback: L(wt),
816
+ onApprovalRespond: L(kt),
817
+ onConfirmRespond: Qn,
818
+ onHostConfirmRespond: L(Ft)
818
819
  }, {
819
- "tool-showContactForm": L(({ part: e }) => [E(F(y), {
820
+ "tool-showContactForm": z(({ part: e }) => [k(L(x), {
820
821
  part: e,
821
- readonly: !F(Qe),
822
- submitted: F(Fe),
823
- loading: F(Ie),
824
- error: F(Le),
825
- "privacy-policy-notice": F(z)?.privacyPolicyNotice,
826
- onSubmit: F(Ct)
822
+ readonly: !L(Ze),
823
+ submitted: L(Pe),
824
+ loading: L(Fe),
825
+ error: L(Ie),
826
+ "privacy-policy-notice": L(V)?.privacyPolicyNotice,
827
+ onSubmit: L(Et)
827
828
  }, null, 8, [
828
829
  "part",
829
830
  "readonly",
@@ -833,20 +834,20 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
833
834
  "privacy-policy-notice",
834
835
  "onSubmit"
835
836
  ])]),
836
- "tool-showSuggestedReply": L(({ part: e }) => [E(F(ie), {
837
+ "tool-showSuggestedReply": z(({ part: e }) => [k(L(ne), {
837
838
  part: e,
838
- onSelect: (t) => $n(e, t)
839
+ onSelect: (t) => nr(e, t)
839
840
  }, null, 8, ["part", "onSelect"])]),
840
- "tool-showSources": L(({ part: e }) => [E(F(O), {
841
+ "tool-showSources": z(({ part: e }) => [k(L(j), {
841
842
  part: e,
842
- "on-expand-context": _n,
843
- "on-download": vn
843
+ "on-expand-context": bn,
844
+ "on-download": xn
844
845
  }, null, 8, ["part"])]),
845
- "tool-showForm": L(({ part: e }) => [E(b, { mode: "out-in" }, {
846
- default: L(() => [E(F(h), {
846
+ "tool-showForm": z(({ part: e }) => [k(C, { mode: "out-in" }, {
847
+ default: z(() => [k(L(g), {
847
848
  part: e,
848
- answered: Gn(e),
849
- onSelect: (t) => Jn("showForm", e, t)
849
+ answered: Jn(e),
850
+ onSelect: (t) => Zn("showForm", e, t)
850
851
  }, null, 8, [
851
852
  "part",
852
853
  "answered",
@@ -854,12 +855,12 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
854
855
  ])]),
855
856
  _: 2
856
857
  }, 1024)]),
857
- "tool-showMultipleChoice": L(({ part: e }) => [E(b, { mode: "out-in" }, {
858
- default: L(() => [E(F(h), {
858
+ "tool-showMultipleChoice": z(({ part: e }) => [k(C, { mode: "out-in" }, {
859
+ default: z(() => [k(L(g), {
859
860
  part: e,
860
861
  "allow-custom-answer": "",
861
- answered: Gn(e),
862
- onSelect: (t) => Jn("showMultipleChoice", e, t)
862
+ answered: Jn(e),
863
+ onSelect: (t) => Zn("showMultipleChoice", e, t)
863
864
  }, null, 8, [
864
865
  "part",
865
866
  "answered",
@@ -867,12 +868,12 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
867
868
  ])]),
868
869
  _: 2
869
870
  }, 1024)]),
870
- "tool-requestOAuthConnection": L(({ part: e }) => [E(F(se), {
871
+ "tool-requestOAuthConnection": z(({ part: e }) => [k(L(ae), {
871
872
  part: e,
872
- "backend-url": F(Qe),
873
- "resolve-connection": (e) => F(W).getOAuthAuthorizeUrl(P.agentId, e),
874
- "check-connection": (e) => F(W).getOAuthConnectionStatus(P.agentId, e),
875
- onConnected: (t) => tr(e, t)
873
+ "backend-url": L(Ze),
874
+ "resolve-connection": (e) => L(K).getOAuthAuthorizeUrl(I.agentId, e),
875
+ "check-connection": (e) => L(K).getOAuthConnectionStatus(I.agentId, e),
876
+ onConnected: (t) => ir(e, t)
876
877
  }, null, 8, [
877
878
  "part",
878
879
  "backend-url",
@@ -880,164 +881,166 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
880
881
  "check-connection",
881
882
  "onConnected"
882
883
  ])]),
883
- "tool-requestGeolocation": L(({ part: e }) => [E(F(ae), {
884
+ "tool-requestGeolocation": z(({ part: e }) => [k(L(re), {
884
885
  part: e,
885
- "call-live": F(Q).isActive.value,
886
- "reverse-geocode": (e, t) => F(W).reverseGeocode(e, t),
887
- onResult: (t) => er(e, t)
886
+ "call-live": L(Q).isActive.value,
887
+ "reverse-geocode": (e, t) => L(K).reverseGeocode(e, t),
888
+ onResult: (t) => rr(e, t)
888
889
  }, null, 8, [
889
890
  "part",
890
891
  "call-live",
891
892
  "reverse-geocode",
892
893
  "onResult"
893
894
  ])]),
894
- "tool-showLocation": L(({ part: e }) => [E(F(ce), {
895
+ "tool-showLocation": z(({ part: e }) => [k(L(oe), {
895
896
  part: e,
896
- "is-dark": F(nt),
897
- "main-color": F(z)?.mainColor,
898
- "forward-geocode": (e, t) => F(W).forwardGeocode(e, t)
897
+ "is-dark": L(tt),
898
+ "main-color": L(V)?.mainColor,
899
+ "forward-geocode": (e, t) => L(K).forwardGeocode(e, t)
899
900
  }, null, 8, [
900
901
  "part",
901
902
  "is-dark",
902
903
  "main-color",
903
904
  "forward-geocode"
904
905
  ])]),
905
- "tool-showDiagram": L(({ part: e }) => [E(F(ue), {
906
+ "tool-showDiagram": z(({ part: e }) => [k(L(ce), {
906
907
  part: e,
907
- "is-dark": F(nt)
908
+ "is-dark": L(tt)
908
909
  }, null, 8, ["part", "is-dark"])]),
909
- "tool-editSpreadsheet": L(({ part: e }) => [(j(), S(F(A), {
910
- key: F(f)(e),
910
+ "tool-editSpreadsheet": z(({ part: e }) => [(N(), T(L(le), {
911
+ key: L(p)(e),
911
912
  part: e,
912
913
  "file-url": q,
913
- preview: cn,
914
- "latest-versions": Zn.value,
914
+ preview: dn,
915
+ "latest-versions": er.value,
915
916
  restore: $.value
916
917
  }, null, 8, [
917
918
  "part",
918
919
  "latest-versions",
919
920
  "restore"
920
921
  ]))]),
921
- "tool-editWordDocument": L(({ part: e }) => [(j(), S(F(A), {
922
- key: F(f)(e),
922
+ "tool-editWordDocument": z(({ part: e }) => [(N(), T(L(le), {
923
+ key: L(p)(e),
923
924
  part: e,
924
925
  "file-url": q,
925
- preview: cn,
926
- "latest-versions": Zn.value,
926
+ preview: dn,
927
+ "latest-versions": er.value,
927
928
  restore: $.value
928
929
  }, null, 8, [
929
930
  "part",
930
931
  "latest-versions",
931
932
  "restore"
932
933
  ]))]),
933
- "tool-createSpreadsheet": L(({ part: e }) => [(j(), S(F(A), {
934
- key: F(f)(e),
934
+ "tool-createSpreadsheet": z(({ part: e }) => [(N(), T(L(le), {
935
+ key: L(p)(e),
935
936
  part: e,
936
937
  "file-url": q,
937
- preview: cn,
938
- "latest-versions": Zn.value,
938
+ preview: dn,
939
+ "latest-versions": er.value,
939
940
  restore: $.value
940
941
  }, null, 8, [
941
942
  "part",
942
943
  "latest-versions",
943
944
  "restore"
944
945
  ]))]),
945
- "tool-createWordDocument": L(({ part: e }) => [(j(), S(F(A), {
946
- key: F(f)(e),
946
+ "tool-createWordDocument": z(({ part: e }) => [(N(), T(L(le), {
947
+ key: L(p)(e),
947
948
  part: e,
948
949
  "file-url": q,
949
- preview: cn,
950
- "latest-versions": Zn.value,
950
+ preview: dn,
951
+ "latest-versions": er.value,
951
952
  restore: $.value
952
953
  }, null, 8, [
953
954
  "part",
954
955
  "latest-versions",
955
956
  "restore"
956
957
  ]))]),
957
- "tool-shareDocument": L(({ part: e }) => [(j(), S(F(de), {
958
- key: F(f)(e),
958
+ "tool-shareDocument": z(({ part: e }) => [(N(), T(L(ue), {
959
+ key: L(p)(e),
959
960
  part: e,
960
- "on-download": vn
961
+ "on-download": xn
961
962
  }, null, 8, ["part"]))]),
962
963
  _: 1
963
964
  }, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
964
965
  _: 1
965
966
  }),
966
- F(lt).length ? (j(), S(_, {
967
+ L(ut).length ? (N(), T(v, {
967
968
  key: 0,
968
- messages: F(lt),
969
- onEdit: F(Nt),
970
- onRemove: F(Pt)
969
+ messages: L(ut),
970
+ onEdit: L(It),
971
+ onRemove: L(Lt)
971
972
  }, null, 8, [
972
973
  "messages",
973
974
  "onEdit",
974
975
  "onRemove"
975
- ])) : C("", !0),
976
- T("div", Be, [
977
- E(b, { name: "pk-chatbot-view-chat-fade" }, {
978
- default: L(() => [Gt.value ? (j(), S(Ce, {
976
+ ])) : E("", !0),
977
+ O("div", ze, [
978
+ k(C, { name: "pk-chatbot-view-chat-fade" }, {
979
+ default: z(() => [Jt.value ? (N(), T(Se, {
979
980
  key: 0,
980
981
  class: "pk-chatbot-view-chat__aurora",
981
982
  "source-selector": ".pk-chatbot-input__form",
982
- "main-color": F(z)?.mainColor,
983
- tones: F(z)?.glowTones,
984
- "second-color": F(z)?.glowSecondColor
983
+ "main-color": L(V)?.mainColor,
984
+ tones: L(V)?.glowTones,
985
+ "second-color": L(V)?.glowSecondColor
985
986
  }, null, 8, [
986
987
  "main-color",
987
988
  "tones",
988
989
  "second-color"
989
- ])) : C("", !0)]),
990
+ ])) : E("", !0)]),
990
991
  _: 1
991
992
  }),
992
- F(rr) && !F(Ze) ? (j(), S(ee, {
993
+ L(or) && !L(Xe) ? (N(), T(ee, {
993
994
  key: 0,
994
- pending: F(rr),
995
- stopping: F(ir),
996
- onStop: F(ar)
995
+ pending: L(or),
996
+ stopping: L(sr),
997
+ onStop: L(cr)
997
998
  }, null, 8, [
998
999
  "pending",
999
1000
  "stopping",
1000
1001
  "onStop"
1001
- ])) : C("", !0),
1002
- F(Ze) ? (j(), w("div", Ve, N(F(J)("message.chatErrorConversationBlocked")), 1)) : Pn.value === "idle" ? (j(), S(g, {
1002
+ ])) : E("", !0),
1003
+ L(Xe) ? (N(), D("div", Be, F(L(J)("message.chatErrorConversationBlocked")), 1)) : Ln.value === "idle" ? (N(), T(_, {
1003
1004
  key: 3,
1004
1005
  ref_key: "inputEl",
1005
- ref: mt,
1006
- modelValue: F(U),
1007
- "onUpdate:modelValue": n[4] ||= (e) => oe(U) ? U.value = e : null,
1008
- "pending-attachments": F($e),
1009
- "onUpdate:pendingAttachments": n[5] ||= (e) => oe($e) ? $e.value = e : null,
1010
- placeholder: F(Xe),
1011
- "dismissable-notice": F(Ut) && F(H).messages.length <= 1 ? F(Ut) : void 0,
1012
- "page-notice": Bt.value,
1013
- status: Rt.value,
1014
- "max-message-length": F(z)?.maxMessageLength,
1015
- "file-upload": K.value,
1016
- "attachment-limit-reached": F(et),
1017
- "attachment-notice": Vt.value,
1018
- "voice-enabled": Nn.value,
1019
- "queue-enabled": F(ct),
1020
- "answer-notices": Ht.value,
1021
- "pointer-available": F(ft),
1022
- pointing: F(pt),
1023
- pointer: ht.value,
1024
- onPoint: n[6] ||= (e) => F(R).pagePointerStart?.(),
1025
- onRemovePointer: n[7] ||= (e) => G.value = void 0,
1026
- onStopGeneration: F(_t),
1027
- onSubmit: F(gt),
1028
- onFileSelect: F(Dt),
1029
- onDismissAttachmentNotice: F(Ot),
1030
- onDismissPageNotice: F(jt),
1031
- onOpenAnswerNotice: F(Ft),
1032
- onDismissAnswerNotice: F(It),
1033
- onVoiceStart: zn
1034
- }, re({ _: 2 }, [a.modifier === "fullscreen" ? {
1006
+ ref: gt,
1007
+ modelValue: L(G),
1008
+ "onUpdate:modelValue": n[4] ||= (e) => ie(G) ? G.value = e : null,
1009
+ "pending-attachments": L(Qe),
1010
+ "onUpdate:pendingAttachments": n[5] ||= (e) => ie(Qe) ? Qe.value = e : null,
1011
+ placeholder: L(Ye),
1012
+ "dismissable-notice": L(Kt) && L(W).messages.length <= 1 ? L(Kt) : void 0,
1013
+ "page-notice": Ut.value,
1014
+ status: Vt.value,
1015
+ "max-message-length": L(V)?.maxMessageLength,
1016
+ "file-upload": vt.value,
1017
+ "attachment-limit-reached": L($e),
1018
+ "attachment-notice": Wt.value,
1019
+ "voice-enabled": In.value,
1020
+ "queue-enabled": L(lt),
1021
+ "answer-notices": Gt.value,
1022
+ "pointer-available": L(mt),
1023
+ pointing: L(ht),
1024
+ pointer: _t.value,
1025
+ "automatic-confirmations": L(ct) === "automatic",
1026
+ onPoint: n[6] ||= (e) => L(B).pagePointerStart?.(),
1027
+ onRemovePointer: n[7] ||= (e) => pt.value = void 0,
1028
+ onManualConfirmations: n[8] ||= (e) => L(B).setConfirmationMode("manual"),
1029
+ onStopGeneration: L(bt),
1030
+ onSubmit: L(yt),
1031
+ onFileSelect: L(At),
1032
+ onDismissAttachmentNotice: L(jt),
1033
+ onDismissPageNotice: L(Pt),
1034
+ onOpenAnswerNotice: L(Rt),
1035
+ onDismissAnswerNotice: L(zt),
1036
+ onVoiceStart: Hn
1037
+ }, te({ _: 2 }, [a.modifier === "fullscreen" ? {
1035
1038
  name: "prepend",
1036
- fn: L(() => [T("span", He, [E(m, {
1039
+ fn: z(() => [O("span", Ve, [k(h, {
1037
1040
  class: "pk-chatbot-view-chat__agent-chip-avatar",
1038
- "img-src": F(z)?.logo,
1039
- name: F(R).name
1040
- }, null, 8, ["img-src", "name"]), F(R).name ? (j(), w("strong", Ue, N(F(R).name), 1)) : C("", !0)])]),
1041
+ "img-src": L(V)?.logo,
1042
+ name: L(B).name
1043
+ }, null, 8, ["img-src", "name"]), L(B).name ? (N(), D("strong", He, F(L(B).name), 1)) : E("", !0)])]),
1041
1044
  key: "0"
1042
1045
  } : void 0]), 1032, [
1043
1046
  "modelValue",
@@ -1056,6 +1059,7 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
1056
1059
  "pointer-available",
1057
1060
  "pointing",
1058
1061
  "pointer",
1062
+ "automatic-confirmations",
1059
1063
  "onStopGeneration",
1060
1064
  "onSubmit",
1061
1065
  "onFileSelect",
@@ -1063,21 +1067,21 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
1063
1067
  "onDismissPageNotice",
1064
1068
  "onOpenAnswerNotice",
1065
1069
  "onDismissAnswerNotice"
1066
- ])) : (j(), S(Ae, {
1070
+ ])) : (N(), T(ke, {
1067
1071
  key: 2,
1068
- state: Pn.value,
1069
- sample: Ln,
1070
- spectrum: Rn,
1071
- "remaining-seconds": F(Q).remainingSeconds.value,
1072
- muted: bn.value,
1073
- error: Fn.value,
1074
- "raw-error": F(Q).error.value,
1075
- live: F(Q).isActive.value,
1072
+ state: Ln.value,
1073
+ sample: Bn,
1074
+ spectrum: Vn,
1075
+ "remaining-seconds": L(Q).remainingSeconds.value,
1076
+ muted: Cn.value,
1077
+ error: Rn.value,
1078
+ "raw-error": L(Q).error.value,
1079
+ live: L(Q).isActive.value,
1076
1080
  class: "pk-chatbot-view-chat__voice",
1077
- onToggleMute: nr,
1078
- onHangUp: Bn,
1079
- onRetry: Hn,
1080
- onDismiss: Vn
1081
+ onToggleMute: ar,
1082
+ onHangUp: Un,
1083
+ onRetry: Gn,
1084
+ onDismiss: Wn
1081
1085
  }, null, 8, [
1082
1086
  "state",
1083
1087
  "remaining-seconds",
@@ -1087,41 +1091,41 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
1087
1091
  "live"
1088
1092
  ]))
1089
1093
  ]),
1090
- E(b, null, {
1091
- default: L(() => [F(yn) && K.value?.enabled ? (j(), w("div", We, [E(r, {
1094
+ k(C, null, {
1095
+ default: z(() => [L(Sn) && vt.value?.enabled ? (N(), D("div", Ue, [k(r, {
1092
1096
  name: "ri:upload-cloud-2-line",
1093
1097
  class: "pk-chatbot-view-chat__drop-overlay-icon"
1094
- }), T("span", null, N(F(J)("action.dropFile")), 1)])) : C("", !0)]),
1098
+ }), O("span", null, F(L(J)("action.dropFile")), 1)])) : E("", !0)]),
1095
1099
  _: 1
1096
1100
  }),
1097
- un.value ? (j(), S(ne, {
1101
+ pn.value ? (N(), T(S, {
1098
1102
  key: 1,
1099
- to: Xt.value,
1100
- disabled: !Yt.value
1101
- }, [T("aside", { class: k(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": Yt.value }]) }, [F(Y) ? (j(), S(F(pe), {
1103
+ to: $t.value,
1104
+ disabled: !Qt.value
1105
+ }, [O("aside", { class: M(["pk-chatbot-view-chat__preview", { "pk-chatbot-view-chat__preview--docked": Qt.value }]) }, [L(Y) ? (N(), T(L(fe), {
1102
1106
  key: 0,
1103
1107
  mode: X.value.mode,
1104
- "onUpdate:mode": n[8] ||= (e) => X.value.mode = e,
1108
+ "onUpdate:mode": n[9] ||= (e) => X.value.mode = e,
1105
1109
  sheet: X.value.sheet,
1106
- "onUpdate:sheet": n[9] ||= (e) => X.value.sheet = e,
1110
+ "onUpdate:sheet": n[10] ||= (e) => X.value.sheet = e,
1107
1111
  zoom: X.value.zoom,
1108
- "onUpdate:zoom": n[10] ||= (e) => X.value.zoom = e,
1112
+ "onUpdate:zoom": n[11] ||= (e) => X.value.zoom = e,
1109
1113
  fit: X.value.fit,
1110
- "onUpdate:fit": n[11] ||= (e) => X.value.fit = e,
1111
- kind: F(Y).kind,
1112
- filename: F(Y).filename,
1113
- version: F(Y).version,
1114
- versions: pn.value,
1115
- "download-url": q(F(Y).storedFileName),
1116
- preview: F(tn),
1117
- loading: F(nn),
1118
- error: F(rn),
1119
- restorable: hn.value,
1114
+ "onUpdate:fit": n[12] ||= (e) => X.value.fit = e,
1115
+ kind: L(Y).kind,
1116
+ filename: L(Y).filename,
1117
+ version: L(Y).version,
1118
+ versions: gn.value,
1119
+ "download-url": q(L(Y).storedFileName),
1120
+ preview: L(an),
1121
+ loading: L(on),
1122
+ error: L(sn),
1123
+ restorable: vn.value,
1120
1124
  resize: "expand",
1121
- onVersion: mn,
1122
- onRestore: gn,
1123
- onResize: n[12] ||= (e) => ln.value = !0,
1124
- onClose: dn
1125
+ onVersion: _n,
1126
+ onRestore: yn,
1127
+ onResize: n[13] ||= (e) => fn.value = !0,
1128
+ onClose: mn
1125
1129
  }, null, 8, [
1126
1130
  "mode",
1127
1131
  "sheet",
@@ -1136,30 +1140,30 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
1136
1140
  "loading",
1137
1141
  "error",
1138
1142
  "restorable"
1139
- ])) : C("", !0)], 2)], 8, ["to", "disabled"])) : C("", !0),
1140
- F(Y) && !un.value ? (j(), S(F(me), {
1143
+ ])) : E("", !0)], 2)], 8, ["to", "disabled"])) : E("", !0),
1144
+ L(Y) && !pn.value ? (N(), T(L(pe), {
1141
1145
  key: 2,
1142
1146
  mode: X.value.mode,
1143
- "onUpdate:mode": n[13] ||= (e) => X.value.mode = e,
1147
+ "onUpdate:mode": n[14] ||= (e) => X.value.mode = e,
1144
1148
  sheet: X.value.sheet,
1145
- "onUpdate:sheet": n[14] ||= (e) => X.value.sheet = e,
1149
+ "onUpdate:sheet": n[15] ||= (e) => X.value.sheet = e,
1146
1150
  zoom: X.value.zoom,
1147
- "onUpdate:zoom": n[15] ||= (e) => X.value.zoom = e,
1151
+ "onUpdate:zoom": n[16] ||= (e) => X.value.zoom = e,
1148
1152
  fit: X.value.fit,
1149
- "onUpdate:fit": n[16] ||= (e) => X.value.fit = e,
1150
- target: F(Y),
1151
- versions: pn.value,
1152
- "download-url": q(F(Y).storedFileName),
1153
- preview: F(tn),
1154
- loading: F(nn),
1155
- error: F(rn),
1156
- restorable: hn.value,
1157
- resize: $t.value ? "shrink" : void 0,
1158
- fullscreen: en.value,
1159
- onVersion: mn,
1160
- onRestore: gn,
1161
- onResize: n[17] ||= (e) => ln.value = !1,
1162
- onClose: dn
1153
+ "onUpdate:fit": n[17] ||= (e) => X.value.fit = e,
1154
+ target: L(Y),
1155
+ versions: gn.value,
1156
+ "download-url": q(L(Y).storedFileName),
1157
+ preview: L(an),
1158
+ loading: L(on),
1159
+ error: L(sn),
1160
+ restorable: vn.value,
1161
+ resize: nn.value ? "shrink" : void 0,
1162
+ fullscreen: rn.value,
1163
+ onVersion: _n,
1164
+ onRestore: yn,
1165
+ onResize: n[18] ||= (e) => fn.value = !1,
1166
+ onClose: mn
1163
1167
  }, null, 8, [
1164
1168
  "mode",
1165
1169
  "sheet",
@@ -1174,11 +1178,11 @@ var Be = { class: "pk-chatbot-view-chat__input-stage" }, Ve = {
1174
1178
  "restorable",
1175
1179
  "resize",
1176
1180
  "fullscreen"
1177
- ])) : C("", !0)
1181
+ ])) : E("", !0)
1178
1182
  ], 2);
1179
1183
  };
1180
1184
  }
1181
1185
  });
1182
- export { Te as a, Ae as i, ze as n, Ce as o, Ne as r, Xe as t };
1186
+ export { we as a, ke as i, Re as n, Se as o, Me as r, Ye as t };
1183
1187
 
1184
- //# sourceMappingURL=PkChatbotViewChat-D8depeWQ.js.map
1188
+ //# sourceMappingURL=PkChatbotViewChat-CMFc4eLD.js.map