@8wave/ai-elements 0.114.0-beta.8 → 0.115.0-beta.2

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 (163) hide show
  1. package/dist/_chunks/Agent-DK76k05_.js +566 -0
  2. package/dist/_chunks/Agent-DK76k05_.js.map +1 -0
  3. package/dist/_chunks/{PkStreamingMarkdown-C1sANAr5.js → PkStreamingMarkdown-BKxA6Ntl.js} +688 -672
  4. package/dist/_chunks/PkStreamingMarkdown-BKxA6Ntl.js.map +1 -0
  5. package/dist/_chunks/{PkToolRequestGeolocation-BbxYKt-9.js → PkToolRequestGeolocation-OF1PWhMw.js} +2 -2
  6. package/{dist-vue/_chunks/PkToolRequestGeolocation-9vfYNaQo.js.map → dist/_chunks/PkToolRequestGeolocation-OF1PWhMw.js.map} +1 -1
  7. package/dist/_chunks/{PkToolRequestOAuthConnection-CTp2w60F.js → PkToolRequestOAuthConnection-CgQePKKb.js} +4 -4
  8. package/dist/_chunks/PkToolRequestOAuthConnection-CgQePKKb.js.map +1 -0
  9. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js → PkToolShowArtifact-CHxeuKEU.js} +2 -2
  10. package/dist/_chunks/{PkToolShowArtifact-BfTjxGOT.js.map → PkToolShowArtifact-CHxeuKEU.js.map} +1 -1
  11. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js +72 -0
  12. package/dist/_chunks/PkToolShowComparison-8d6fAhRp.js.map +1 -0
  13. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js → PkToolShowContactForm-DqVLVwqJ.js} +2 -2
  14. package/dist/_chunks/{PkToolShowContactForm-PFpY9dIp.js.map → PkToolShowContactForm-DqVLVwqJ.js.map} +1 -1
  15. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js → PkToolShowForm-YJQPYfEe.js} +5 -5
  16. package/dist/_chunks/{PkToolShowForm-CMtSN0oX.js.map → PkToolShowForm-YJQPYfEe.js.map} +1 -1
  17. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js → PkToolShowSources-VFoI0YS8.js} +3 -3
  18. package/dist/_chunks/{PkToolShowSources-C6cu66Ts.js.map → PkToolShowSources-VFoI0YS8.js.map} +1 -1
  19. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js → PkToolShowSuggestedReply-Dl4x_nEJ.js} +2 -2
  20. package/dist/_chunks/{PkToolShowSuggestedReply-CFO8wV1b.js.map → PkToolShowSuggestedReply-Dl4x_nEJ.js.map} +1 -1
  21. package/dist/_chunks/{markdown-BRD-hDrH.js → markdown-BL7WANiX.js} +19 -12
  22. package/dist/_chunks/markdown-BL7WANiX.js.map +1 -0
  23. package/dist/ai-elements.es.js +3119 -2748
  24. package/dist/ai-elements.es.js.map +1 -1
  25. package/dist-vue/PkChatbot.js +1 -1
  26. package/dist-vue/PkChatbotAuth.js +1 -1
  27. package/dist-vue/PkChatbotEmptyState.js +1 -1
  28. package/dist-vue/PkChatbotInput.js +1 -1
  29. package/dist-vue/PkChatbotMessages.js +1 -1
  30. package/dist-vue/PkChatbotStepPayload.js +1 -1
  31. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  32. package/dist-vue/PkChatbotSteps.js +1 -1
  33. package/dist-vue/PkChatbotViewChat.js +1 -1
  34. package/dist-vue/PkChatbotViewConversations.js +1 -1
  35. package/dist-vue/PkChatbotViewFiles.js +1 -1
  36. package/dist-vue/PkChatbotViewProfile.js +1 -1
  37. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js → Agent-tbKw8Mdt.js} +2 -2
  38. package/dist-vue/_chunks/{Agent-BNlmK-uJ.js.map → Agent-tbKw8Mdt.js.map} +1 -1
  39. package/dist-vue/_chunks/{Document-2X01-F4Z.js → Document-nCWwJC2h.js} +18 -11
  40. package/dist-vue/_chunks/Document-nCWwJC2h.js.map +1 -0
  41. package/dist-vue/_chunks/Media-_HfFLHGD.js.map +1 -1
  42. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js → PkChatbot-CdtYJ1Lf.js} +8 -8
  43. package/dist-vue/_chunks/{PkChatbot-HRayDr2d.js.map → PkChatbot-CdtYJ1Lf.js.map} +1 -1
  44. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js +421 -0
  45. package/dist-vue/_chunks/PkChatbotAuth-jzoNJkmH.js.map +1 -0
  46. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js → PkChatbotEmptyState-Dicjr_Fv.js} +2 -2
  47. package/dist-vue/_chunks/{PkChatbotEmptyState-CPOcfoRC.js.map → PkChatbotEmptyState-Dicjr_Fv.js.map} +1 -1
  48. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js → PkChatbotInput-DcLmOqA1.js} +2 -2
  49. package/dist-vue/_chunks/{PkChatbotInput-pLJQIu7v.js.map → PkChatbotInput-DcLmOqA1.js.map} +1 -1
  50. package/dist-vue/_chunks/{PkChatbotMessages-GZStJbx_.js → PkChatbotMessages-R1EsTJpM.js} +258 -256
  51. package/dist-vue/_chunks/PkChatbotMessages-R1EsTJpM.js.map +1 -0
  52. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js → PkChatbotStepPayload-rKaeDQDj.js} +2 -2
  53. package/dist-vue/_chunks/{PkChatbotStepPayload-DU0W-eUp.js.map → PkChatbotStepPayload-rKaeDQDj.js.map} +1 -1
  54. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js → PkChatbotStepToolDetail-5HdSV8Im.js} +3 -3
  55. package/dist-vue/_chunks/{PkChatbotStepToolDetail-etlBryOg.js.map → PkChatbotStepToolDetail-5HdSV8Im.js.map} +1 -1
  56. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js +191 -0
  57. package/dist-vue/_chunks/PkChatbotSteps-CPPjwTJN.js.map +1 -0
  58. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js → PkChatbotViewChat-CbqrHEC6.js} +7 -7
  59. package/dist-vue/_chunks/{PkChatbotViewChat-DIfBWFoG.js.map → PkChatbotViewChat-CbqrHEC6.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js → PkChatbotViewConversations-CHpN4vhm.js} +2 -2
  61. package/dist-vue/_chunks/{PkChatbotViewConversations-BCdolW0R.js.map → PkChatbotViewConversations-CHpN4vhm.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js → PkChatbotViewFiles-Bk9-K6Hw.js} +3 -3
  63. package/dist-vue/_chunks/{PkChatbotViewFiles-Cudao8ew.js.map → PkChatbotViewFiles-Bk9-K6Hw.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js → PkChatbotViewProfile-CosaHA-g.js} +2 -2
  65. package/dist-vue/_chunks/{PkChatbotViewProfile-DDsKOkcC.js.map → PkChatbotViewProfile-CosaHA-g.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js → PkStreamingMarkdown-DYy79C1P.js} +214 -205
  67. package/dist-vue/_chunks/{PkStreamingMarkdown-BloMJaIW.js.map → PkStreamingMarkdown-DYy79C1P.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkToolRequestGeolocation-9vfYNaQo.js → PkToolRequestGeolocation-BOVbaCzQ.js} +2 -2
  69. package/{dist/_chunks/PkToolRequestGeolocation-BbxYKt-9.js.map → dist-vue/_chunks/PkToolRequestGeolocation-BOVbaCzQ.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BorR5NmZ.js → PkToolRequestOAuthConnection-a2LegFoE.js} +4 -4
  71. package/dist-vue/_chunks/PkToolRequestOAuthConnection-a2LegFoE.js.map +1 -0
  72. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js → PkToolShowArtifact-DUOnFdfa.js} +2 -2
  73. package/dist-vue/_chunks/{PkToolShowArtifact-BuMY7GNj.js.map → PkToolShowArtifact-DUOnFdfa.js.map} +1 -1
  74. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js +72 -0
  75. package/dist-vue/_chunks/PkToolShowComparison-DQs3E6-k.js.map +1 -0
  76. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js → PkToolShowContactForm-1TFKvG_s.js} +2 -2
  77. package/dist-vue/_chunks/{PkToolShowContactForm-0OQRqT8m.js.map → PkToolShowContactForm-1TFKvG_s.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js → PkToolShowDiagram-Dmtqu3th.js} +2 -2
  79. package/dist-vue/_chunks/{PkToolShowDiagram-BGL27iHG.js.map → PkToolShowDiagram-Dmtqu3th.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js → PkToolShowEmail-BDsBoETQ.js} +2 -2
  81. package/dist-vue/_chunks/{PkToolShowEmail-BJJpS69F.js.map → PkToolShowEmail-BDsBoETQ.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js → PkToolShowForm-DwFKxMJd.js} +4 -4
  83. package/dist-vue/_chunks/{PkToolShowForm-DDcPpOZ8.js.map → PkToolShowForm-DwFKxMJd.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js → PkToolShowMessage-Dau3agUy.js} +2 -2
  85. package/dist-vue/_chunks/{PkToolShowMessage-BFGynf3p.js.map → PkToolShowMessage-Dau3agUy.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js → PkToolShowProductList-CsupMsuy.js} +2 -2
  87. package/dist-vue/_chunks/{PkToolShowProductList-6t1Ir5CW.js.map → PkToolShowProductList-CsupMsuy.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js → PkToolShowSources-TzkNgwnr.js} +4 -4
  89. package/dist-vue/_chunks/{PkToolShowSources-cOF0ZxOj.js.map → PkToolShowSources-TzkNgwnr.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js → PkToolShowSuggestedReply-qAWdCUhr.js} +2 -2
  91. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DA4NEjHB.js.map → PkToolShowSuggestedReply-qAWdCUhr.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js → PkToolShowWebPages-D4E3Xzg1.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolShowWebPages-OgaT1vYJ.js.map → PkToolShowWebPages-D4E3Xzg1.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js → PkUrl-Cu3qKl4G.js} +2 -2
  95. package/dist-vue/_chunks/{PkUrl-Cd69XP5z.js.map → PkUrl-Cu3qKl4G.js.map} +1 -1
  96. package/dist-vue/_chunks/{createChatbotApiClient-CaVLm5W9.js → createChatbotApiClient-BlWs282E.js} +137 -168
  97. package/dist-vue/_chunks/createChatbotApiClient-BlWs282E.js.map +1 -0
  98. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js → useChatbotStore-CMo47fnS.js} +3 -3
  99. package/dist-vue/_chunks/{useChatbotStore-BwrBZJCq.js.map → useChatbotStore-CMo47fnS.js.map} +1 -1
  100. package/dist-vue/_chunks/utils-B45A2ONa.js +184 -0
  101. package/dist-vue/_chunks/utils-B45A2ONa.js.map +1 -0
  102. package/dist-vue/api.js +1 -1
  103. package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
  104. package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +53 -5
  105. package/dist-vue/apps/web-component/src/composables/useChatbotAuthForm.d.ts +14 -0
  106. package/dist-vue/composables.js +466 -39
  107. package/dist-vue/composables.js.map +1 -1
  108. package/dist-vue/index.js +3361 -3237
  109. package/dist-vue/index.js.map +1 -1
  110. package/dist-vue/locales.js +44 -0
  111. package/dist-vue/packages/ability/src/index.d.ts +10 -14
  112. package/dist-vue/packages/auth/src/add-member-to-organization.d.ts +8 -2
  113. package/dist-vue/packages/auth/src/additional-fields.d.ts +48 -0
  114. package/dist-vue/packages/auth/src/organization-member-limit.d.ts +12 -0
  115. package/dist-vue/packages/auth/src/passkey-policy-client-plugin.d.ts +31 -0
  116. package/dist-vue/packages/auth/src/passkey-policy-plugin.d.ts +22 -0
  117. package/dist-vue/packages/auth/src/two-factor-admin-plugin.d.ts +2 -0
  118. package/dist-vue/packages/auth/src/two-factor-policy-client-plugin.d.ts +163 -0
  119. package/dist-vue/packages/auth/src/two-factor-policy-plugin.d.ts +106 -0
  120. package/dist-vue/packages/components/src/PkQrCode.d.ts +14 -0
  121. package/dist-vue/packages/components/src/chat/PkChatbotAuth.d.ts +19 -0
  122. package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +8 -4
  123. package/dist-vue/packages/components/src/chat/PkChatbotSteps.d.ts +1 -0
  124. package/dist-vue/packages/components/src/chat/PkTurnEvaluation.d.ts +8 -0
  125. package/dist-vue/packages/components/src/chat/utils.d.ts +9 -0
  126. package/dist-vue/packages/components/src/index.d.ts +2 -1
  127. package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +60 -0
  128. package/dist-vue/packages/models/src/schema/Chat.d.ts +42 -0
  129. package/dist-vue/packages/models/src/schema/Document.d.ts +17 -0
  130. package/dist-vue/packages/models/src/schema/DocumentFolder.d.ts +10 -0
  131. package/dist-vue/packages/models/src/schema/DocumentSyncSource.d.ts +71 -1
  132. package/dist-vue/packages/models/src/schema/Lead.d.ts +1 -1
  133. package/dist-vue/packages/models/src/schema/McpServer.d.ts +13 -0
  134. package/dist-vue/packages/models/src/schema/Media.d.ts +0 -1
  135. package/dist-vue/packages/models/src/schema/Member.d.ts +10 -0
  136. package/dist-vue/packages/models/src/schema/Notification.d.ts +31 -0
  137. package/dist-vue/packages/models/src/schema/Organization.d.ts +20 -0
  138. package/dist-vue/packages/models/src/schema/SignInSecurity.d.ts +168 -0
  139. package/dist-vue/packages/models/src/schema/User.d.ts +1 -0
  140. package/dist-vue/packages/models/src/schema/index.d.ts +1 -0
  141. package/dist-vue/style.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/_chunks/Agent-DTLrWpzX.js +0 -460
  144. package/dist/_chunks/Agent-DTLrWpzX.js.map +0 -1
  145. package/dist/_chunks/Media-Cft7Pwrh.js +0 -108
  146. package/dist/_chunks/Media-Cft7Pwrh.js.map +0 -1
  147. package/dist/_chunks/PkStreamingMarkdown-C1sANAr5.js.map +0 -1
  148. package/dist/_chunks/PkToolRequestOAuthConnection-CTp2w60F.js.map +0 -1
  149. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js +0 -60
  150. package/dist/_chunks/PkToolShowComparison-BJ7QBXtf.js.map +0 -1
  151. package/dist/_chunks/markdown-BRD-hDrH.js.map +0 -1
  152. package/dist-vue/_chunks/Document-2X01-F4Z.js.map +0 -1
  153. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js +0 -349
  154. package/dist-vue/_chunks/PkChatbotAuth-Bi508F1u.js.map +0 -1
  155. package/dist-vue/_chunks/PkChatbotMessages-GZStJbx_.js.map +0 -1
  156. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js +0 -190
  157. package/dist-vue/_chunks/PkChatbotSteps-Cl4pVtPJ.js.map +0 -1
  158. package/dist-vue/_chunks/PkToolRequestOAuthConnection-BorR5NmZ.js.map +0 -1
  159. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js +0 -61
  160. package/dist-vue/_chunks/PkToolShowComparison-BLn4pkno.js.map +0 -1
  161. package/dist-vue/_chunks/createChatbotApiClient-CaVLm5W9.js.map +0 -1
  162. package/dist-vue/_chunks/utils-h4C7rRcu.js +0 -177
  163. package/dist-vue/_chunks/utils-h4C7rRcu.js.map +0 -1
@@ -1,43 +1,43 @@
1
- import { k as e } from "./Agent-BNlmK-uJ.js";
2
- import { t } from "./PkStreamingMarkdown-BloMJaIW.js";
1
+ import { O as e } from "./Agent-tbKw8Mdt.js";
2
+ import { t } from "./PkStreamingMarkdown-DYy79C1P.js";
3
3
  import "./src-DT8FLE4_.js";
4
4
  import { a as n, c as r, o as i, r as a, s as o, t as s } from "./message-RohfrdWS.js";
5
5
  import { t as c } from "./PkChatbotError-CuX9C_b9.js";
6
6
  import { t as l } from "./PkRelativeTime--1cIphlA.js";
7
- import { b as u, d, f, g as p, l as m, n as h, s as g, t as _, u as ee, v, x as te, y } from "./utils-h4C7rRcu.js";
8
- import { t as ne } from "./PkChatbotFilePreview-CwiVQDF2.js";
9
- import { t as re } from "./PkChatbotFeedbackForm-4XWLHOkB.js";
10
- import { t as ie } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
11
- import { n as ae, t as b } from "./PkChatbotSteps-Cl4pVtPJ.js";
12
- import { t as x } from "./PkChatbotOutlineRail-np4g6vsz.js";
13
- import { VvButton as S, VvButtonGroup as oe, VvIcon as se } from "@volverjs/ui-vue/components";
14
- import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as ce, createVNode as A, defineAsyncComponent as j, defineComponent as M, mergeProps as le, nextTick as N, normalizeClass as P, normalizeStyle as F, onBeforeUnmount as I, onMounted as ue, openBlock as L, ref as R, renderList as de, renderSlot as fe, resolveDynamicComponent as pe, toDisplayString as z, unref as B, useSlots as me, useTemplateRef as he, watch as V, withCtx as H, withModifiers as U } from "vue";
15
- import { useI18n as ge } from "vue-i18n";
7
+ import { S as u, _ as d, b as f, c as p, d as m, f as h, i as g, n as ee, p as te, t as _, u as v, x as ne, y } from "./utils-B45A2ONa.js";
8
+ import { t as re } from "./PkChatbotFilePreview-CwiVQDF2.js";
9
+ import { t as ie } from "./PkChatbotFeedbackForm-4XWLHOkB.js";
10
+ import { t as ae } from "./PkChatbotMessageFeedback-BYmrVaCE.js";
11
+ import { n as b, t as x } from "./PkChatbotSteps-CPPjwTJN.js";
12
+ import { t as S } from "./PkChatbotOutlineRail-np4g6vsz.js";
13
+ import { VvButton as oe, VvButtonGroup as se, VvIcon as ce } from "@volverjs/ui-vue/components";
14
+ import { Fragment as C, Transition as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as le, createVNode as A, defineAsyncComponent as j, defineComponent as M, mergeProps as ue, nextTick as N, normalizeClass as P, normalizeStyle as de, onBeforeUnmount as F, onMounted as fe, openBlock as I, ref as L, renderList as pe, renderSlot as me, resolveDynamicComponent as he, toDisplayString as R, unref as z, useSlots as ge, useTemplateRef as _e, watch as B, withCtx as V, withModifiers as H } from "vue";
15
+ import { useI18n as ve } from "vue-i18n";
16
16
  //#region ../../packages/utils/src/text.ts
17
- var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", ve = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", ye = (e) => e ? W(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", be = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", xe = {
18
- requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-BorR5NmZ.js")),
19
- showArtifact: j(() => import("./PkToolShowArtifact-BuMY7GNj.js").then((e) => e.n)),
17
+ var U = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ye = (e) => e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/[-_]+/g, " ") : "", be = (e) => e ? U(e).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase() : "", xe = (e) => e ? U(e).replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").toLowerCase() : "", Se = (e) => e ? e.charAt(0).toUpperCase() + e.slice(1) : "", Ce = {
18
+ requestOAuthConnection: j(() => import("./PkToolRequestOAuthConnection-a2LegFoE.js")),
19
+ showArtifact: j(() => import("./PkToolShowArtifact-DUOnFdfa.js").then((e) => e.n)),
20
20
  showCalendarEvent: j(() => import("./PkToolShowCalendarEvent-BsBdsbV0.js").then((e) => e.n)),
21
- showComparison: j(() => import("./PkToolShowComparison-BLn4pkno.js").then((e) => e.n)),
22
- showContactForm: j(() => import("./PkToolShowContactForm-0OQRqT8m.js").then((e) => e.n)),
23
- showDiagram: j(() => import("./PkToolShowDiagram-BGL27iHG.js")),
24
- showEmail: j(() => import("./PkToolShowEmail-BJJpS69F.js").then((e) => e.n)),
21
+ showComparison: j(() => import("./PkToolShowComparison-DQs3E6-k.js").then((e) => e.n)),
22
+ showContactForm: j(() => import("./PkToolShowContactForm-1TFKvG_s.js").then((e) => e.n)),
23
+ showDiagram: j(() => import("./PkToolShowDiagram-Dmtqu3th.js")),
24
+ showEmail: j(() => import("./PkToolShowEmail-BDsBoETQ.js").then((e) => e.n)),
25
25
  showImageGallery: j(() => import("./PkToolShowImageGallery-DudQzBx4.js").then((e) => e.n)),
26
26
  showLocation: j(() => import("./PkToolShowLocation-Bv6sLN5P.js").then((e) => e.n)),
27
- showMessage: j(() => import("./PkToolShowMessage-BFGynf3p.js").then((e) => e.n)),
28
- showForm: j(() => import("./PkToolShowForm-DDcPpOZ8.js").then((e) => e.n)),
29
- showMultipleChoice: j(() => import("./PkToolShowForm-DDcPpOZ8.js").then((e) => e.n)),
30
- showProductList: j(() => import("./PkToolShowProductList-6t1Ir5CW.js").then((e) => e.n)),
27
+ showMessage: j(() => import("./PkToolShowMessage-Dau3agUy.js").then((e) => e.n)),
28
+ showForm: j(() => import("./PkToolShowForm-DwFKxMJd.js").then((e) => e.n)),
29
+ showMultipleChoice: j(() => import("./PkToolShowForm-DwFKxMJd.js").then((e) => e.n)),
30
+ showProductList: j(() => import("./PkToolShowProductList-CsupMsuy.js").then((e) => e.n)),
31
31
  showQrCode: j(() => import("./PkToolShowQrCode-DEAvfLFu.js").then((e) => e.n)),
32
- showSources: j(() => import("./PkToolShowSources-cOF0ZxOj.js").then((e) => e.n)),
33
- showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-DA4NEjHB.js").then((e) => e.n)),
32
+ showSources: j(() => import("./PkToolShowSources-TzkNgwnr.js").then((e) => e.n)),
33
+ showSuggestedReply: j(() => import("./PkToolShowSuggestedReply-qAWdCUhr.js").then((e) => e.n)),
34
34
  showVideo: j(() => import("./PkToolShowVideo-BZOTu2Qe.js")),
35
35
  showWeather: j(() => import("./PkToolShowWeather-Bzqalzh8.js")),
36
- showWebPages: j(() => import("./PkToolShowWebPages-OgaT1vYJ.js").then((e) => e.n))
37
- }, G = {
36
+ showWebPages: j(() => import("./PkToolShowWebPages-D4E3Xzg1.js").then((e) => e.n))
37
+ }, W = {
38
38
  key: 0,
39
39
  class: "text-12 text-word-3 m-0 mb-xs"
40
- }, K = /* @__PURE__ */ M({
40
+ }, G = /* @__PURE__ */ M({
41
41
  __name: "PkToolApprovalPreviewMessage",
42
42
  props: { input: {} },
43
43
  setup(e) {
@@ -45,12 +45,12 @@ var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e
45
45
  let e = t.input;
46
46
  return typeof e?.message == "string" ? e.message : "";
47
47
  });
48
- return (e, t) => n.value ? (L(), O("p", G, z(n.value), 1)) : D("", !0);
48
+ return (e, t) => n.value ? (I(), O("p", W, R(n.value), 1)) : D("", !0);
49
49
  }
50
- }), Se = { [_]: K }, Ce = {
50
+ }), we = { [_]: G }, Te = {
51
51
  key: 0,
52
52
  class: "text-12 text-word-3 m-0 mb-xs"
53
- }, we = /* @__PURE__ */ M({
53
+ }, Ee = /* @__PURE__ */ M({
54
54
  __name: "PkToolApprovalCard",
55
55
  props: {
56
56
  part: {},
@@ -59,7 +59,7 @@ var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e
59
59
  },
60
60
  emits: ["respond"],
61
61
  setup(t, { emit: n }) {
62
- let r = t, i = n, { t: o } = ge({ useScope: "global" }), s = T(() => r.part), c = T(() => a(r.part)), l = T(() => c.value === _), u = T(() => l.value ? (s.value.state === "input-available" || e(s.value.output)) && r.callVerdict === void 0 : s.value.state === "approval-requested"), d = T(() => u.value && r.actionable === !0), f = T(() => u.value && r.actionable !== !0), p = T(() => l.value ? s.value.output === "confirmed" || r.callVerdict === !0 : s.value.approval?.approved === !0), m = T(() => l.value ? s.value.output === "cancelled" || r.callVerdict === !1 : s.value.approval?.approved === !1 || s.value.state === "output-denied"), h = T(() => Se[c.value]), g = T(() => {
62
+ let r = t, i = n, { t: o } = ve({ useScope: "global" }), s = T(() => r.part), c = T(() => a(r.part)), l = T(() => c.value === _), u = T(() => l.value ? (s.value.state === "input-available" || e(s.value.output)) && r.callVerdict === void 0 : s.value.state === "approval-requested"), d = T(() => u.value && r.actionable === !0), f = T(() => u.value && r.actionable !== !0), p = T(() => l.value ? s.value.output === "confirmed" || r.callVerdict === !0 : s.value.approval?.approved === !0), m = T(() => l.value ? s.value.output === "cancelled" || r.callVerdict === !1 : s.value.approval?.approved === !1 || s.value.state === "output-denied"), h = T(() => we[c.value]), g = T(() => {
63
63
  if (f.value) return {
64
64
  icon: "ri:time-line",
65
65
  message: o("toolApproval.expired")
@@ -74,37 +74,37 @@ var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e
74
74
  };
75
75
  }), ee = T(() => !!g.value && !h.value);
76
76
  return (e, n) => {
77
- let r = S, a = oe, c = se;
78
- return L(), O("div", { class: P(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !ee.value }]) }, [
77
+ let r = oe, a = se, c = ce;
78
+ return I(), O("div", { class: P(["w-full overflow-hidden transition-all duration-300", { "bg-surface p-sm rounded-xl border border-surface-3": !ee.value }]) }, [
79
79
  A(w, null, {
80
- default: H(() => [!l.value && u.value ? (L(), O("p", Ce, z(B(o)("toolApproval.prompt")), 1)) : D("", !0)]),
80
+ default: V(() => [!l.value && u.value ? (I(), O("p", Te, R(z(o)("toolApproval.prompt")), 1)) : D("", !0)]),
81
81
  _: 1
82
82
  }),
83
- h.value ? (L(), E(pe(h.value), {
83
+ h.value ? (I(), E(he(h.value), {
84
84
  key: 0,
85
85
  part: t.part,
86
86
  input: s.value.input
87
87
  }, null, 8, ["part", "input"])) : D("", !0),
88
88
  A(w, { mode: "out-in" }, {
89
- default: H(() => [g.value ? (L(), O("p", {
89
+ default: V(() => [g.value ? (I(), O("p", {
90
90
  key: 1,
91
91
  class: P(["flex items-center gap-4 text-12 text-word-3 m-0", { "mt-xs": h.value }])
92
92
  }, [A(c, {
93
93
  name: g.value.icon,
94
94
  class: "shrink-0"
95
- }, null, 8, ["name"]), ce(" " + z(g.value.message), 1)], 2)) : (L(), E(a, { key: 0 }, {
96
- default: H(() => [A(r, {
95
+ }, null, 8, ["name"]), le(" " + R(g.value.message), 1)], 2)) : (I(), E(a, { key: 0 }, {
96
+ default: V(() => [A(r, {
97
97
  modifiers: "primary-small",
98
98
  disabled: !d.value,
99
99
  icon: "ri:check-line",
100
- label: B(o)("action.proceed"),
101
- onClick: n[0] ||= U((e) => i("respond", !0), ["stop"])
100
+ label: z(o)("action.proceed"),
101
+ onClick: n[0] ||= H((e) => i("respond", !0), ["stop"])
102
102
  }, null, 8, ["disabled", "label"]), A(r, {
103
103
  modifiers: "action-quiet-small",
104
104
  disabled: !d.value,
105
105
  icon: "ri:close-line",
106
- label: B(o)("action.cancel"),
107
- onClick: n[1] ||= U((e) => i("respond", !1), ["stop"])
106
+ label: z(o)("action.cancel"),
107
+ onClick: n[1] ||= H((e) => i("respond", !1), ["stop"])
108
108
  }, null, 8, ["disabled", "label"])]),
109
109
  _: 1
110
110
  }))]),
@@ -113,9 +113,9 @@ var W = (e) => e.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), _e = (e) => e
113
113
  ], 2);
114
114
  };
115
115
  }
116
- }), Te = 30, Ee = 500;
117
- function De(e) {
118
- let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = R(!1), u = R(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, _ = (e = "smooth") => {
116
+ }), De = 30, K = 500;
117
+ function Oe(e) {
118
+ let { scrollEl: t, status: n, messagesLength: r, lastMessageRole: i, contentEl: a, beforeNewMessageScroll: o, onScrollUp: s, onScrollDown: c } = e, l = L(!1), u = L(!0), d = !1, f = null, p = null, m = null, h = null, g = 0, ee = (e = "smooth") => {
119
119
  if (!t.value || l.value) {
120
120
  d = !1;
121
121
  return;
@@ -125,18 +125,18 @@ function De(e) {
125
125
  behavior: e
126
126
  }), setTimeout(() => {
127
127
  d = !1;
128
- }, e === "instant" ? 0 : Ee);
129
- }, ee = (e) => {
128
+ }, e === "instant" ? 0 : K);
129
+ }, te = (e) => {
130
130
  e.deltaY < 0 && (l.value = !0);
131
- }, v = 0, te = (e) => {
132
- v = e.touches[0]?.clientY ?? 0;
133
- }, y = (e) => {
131
+ }, _ = 0, v = (e) => {
132
+ _ = e.touches[0]?.clientY ?? 0;
133
+ }, ne = (e) => {
134
134
  let t = e.touches[0]?.clientY ?? 0;
135
- t > v && (l.value = !0), v = t;
136
- }, ne = () => {
135
+ t > _ && (l.value = !0), _ = t;
136
+ }, y = () => {
137
137
  if (!t.value) return;
138
138
  let { scrollTop: e, scrollHeight: n, clientHeight: r } = t.value;
139
- if (u.value = n - r - e < Te, d) {
139
+ if (u.value = n - r - e < De, d) {
140
140
  g = e;
141
141
  return;
142
142
  }
@@ -156,19 +156,19 @@ function De(e) {
156
156
  }, ae = () => {
157
157
  f?.disconnect(), f = null;
158
158
  };
159
- V(n, (e, t) => {
159
+ B(n, (e, t) => {
160
160
  if (e === "streaming" || e === "submitted") {
161
161
  ie();
162
162
  return;
163
163
  }
164
164
  (e !== "ready" || t !== "streaming") && ae();
165
- }), V(r, async () => {
165
+ }), B(r, async () => {
166
166
  if (r() && i() !== "assistant") {
167
167
  S(), l.value = !1, d = !0;
168
168
  try {
169
169
  await N(), await o?.(), await N();
170
170
  } finally {
171
- _();
171
+ ee();
172
172
  }
173
173
  }
174
174
  });
@@ -177,9 +177,9 @@ function De(e) {
177
177
  }, S = () => {
178
178
  p?.disconnect(), p = null, m?.disconnect(), m = null, b &&= (clearTimeout(b), null);
179
179
  };
180
- return ue(() => {
180
+ return fe(() => {
181
181
  if (!t.value) return;
182
- t.value.addEventListener("wheel", ee, { passive: !0 }), t.value.addEventListener("touchstart", te, { passive: !0 }), t.value.addEventListener("touchmove", y, { passive: !0 });
182
+ t.value.addEventListener("wheel", te, { passive: !0 }), t.value.addEventListener("touchstart", v, { passive: !0 }), t.value.addEventListener("touchmove", ne, { passive: !0 });
183
183
  let e = n() === "submitted" || n() === "streaming";
184
184
  e ? ie() : (p = new ResizeObserver(x), p.observe(t.value), m = new MutationObserver(x), m.observe(t.value, {
185
185
  childList: !0,
@@ -187,45 +187,45 @@ function De(e) {
187
187
  }));
188
188
  let r = a?.() ?? t.value.firstElementChild;
189
189
  r && (h = new ResizeObserver(re), h.observe(r)), e || x();
190
- }), I(() => {
191
- t.value?.removeEventListener("wheel", ee), t.value?.removeEventListener("touchstart", te), t.value?.removeEventListener("touchmove", y), h?.disconnect(), h = null, ae(), S();
190
+ }), F(() => {
191
+ t.value?.removeEventListener("wheel", te), t.value?.removeEventListener("touchstart", v), t.value?.removeEventListener("touchmove", ne), h?.disconnect(), h = null, ae(), S();
192
192
  }), {
193
- handleScroll: ne,
194
- scrollToBottom: _,
193
+ handleScroll: y,
194
+ scrollToBottom: ee,
195
195
  userScrolledUp: l,
196
196
  isAtBottom: u
197
197
  };
198
198
  }
199
199
  //#endregion
200
200
  //#region ../../packages/components/src/chat/PkChatbotMessages.vue?vue&type=script&setup=true&lang.ts
201
- var Oe = ["aria-busy"], ke = {
201
+ var ke = ["aria-busy"], Ae = {
202
202
  key: 0,
203
203
  class: "pk-chatbot-messages__outline"
204
- }, Ae = {
204
+ }, je = {
205
205
  key: 0,
206
206
  class: "pk-chatbot-divider"
207
- }, je = { class: "pk-chatbot-divider__label" }, Me = { class: "pk-chatbot-message__text" }, Ne = ["title"], Pe = {
207
+ }, Me = { class: "pk-chatbot-divider__label" }, Ne = { class: "pk-chatbot-message__text" }, Pe = ["title"], Fe = {
208
208
  key: 0,
209
209
  class: "pk-chatbot-message__reaction-emoji"
210
- }, Fe = {
210
+ }, Ie = {
211
211
  key: 0,
212
212
  class: "pk-chatbot-message__loading-info"
213
- }, Ie = { class: "flex gap-8 items-center" }, Le = { class: "font-mono rounded text-12" }, Re = { class: "flex gap-8 items-center" }, ze = {
213
+ }, Le = { class: "flex gap-8 items-center" }, Re = { class: "font-mono rounded text-12" }, ze = { class: "flex gap-8 items-center" }, Be = {
214
214
  key: 0,
215
215
  class: "pk-chatbot-message__footer"
216
- }, Be = {
216
+ }, Ve = {
217
217
  key: 0,
218
218
  class: "pk-chatbot-message__hover-meta"
219
- }, Ve = ["datetime", "title"], He = { class: "truncate" }, Ue = {
219
+ }, He = ["datetime", "title"], Ue = { class: "truncate" }, We = {
220
220
  key: 0,
221
221
  class: "flex items-center gap-4 min-w-0"
222
- }, We = { class: "truncate" }, Ge = {
222
+ }, Ge = { class: "truncate" }, Ke = {
223
223
  key: 1,
224
224
  class: "flex items-center gap-4 text-12 text-word-3"
225
- }, Ke = { class: "truncate" }, qe = ["datetime"], Je = { class: "truncate" }, Ye = {
225
+ }, qe = { class: "truncate" }, Je = ["datetime"], Ye = { class: "truncate" }, Xe = {
226
226
  key: 3,
227
227
  class: "flex items-center gap-4 text-12 text-word-3"
228
- }, Xe = { class: "pk-chatbot-message__loading-info" }, Ze = { class: "flex gap-8 items-center" }, Qe = { class: "text-12" }, $e = ["title", "aria-label"], et = /* @__PURE__ */ M({
228
+ }, Ze = { class: "pk-chatbot-message__loading-info" }, Qe = { class: "flex gap-8 items-center" }, $e = { class: "text-12" }, et = ["title", "aria-label"], tt = /* @__PURE__ */ M({
229
229
  __name: "PkChatbotMessages",
230
230
  props: {
231
231
  status: {},
@@ -269,8 +269,8 @@ var Oe = ["aria-busy"], ke = {
269
269
  "confirm-respond"
270
270
  ],
271
271
  setup(e, { emit: _ }) {
272
- let j = e, M = _, { t: I, d: W, n: _e } = ge({ useScope: "global" }), ye = me(), be = (e, t) => {
273
- if (y(e)) {
272
+ let j = e, M = _, { t: F, d: U, n: ye } = ve({ useScope: "global" }), xe = ge(), Se = (e, t) => {
273
+ if (f(e)) {
274
274
  let n = e.toolCallId;
275
275
  n && M("confirm-respond", {
276
276
  toolCallId: n,
@@ -278,105 +278,105 @@ var Oe = ["aria-busy"], ke = {
278
278
  });
279
279
  return;
280
280
  }
281
- let n = d(e);
281
+ let n = h(e);
282
282
  n && M("approval-respond", {
283
283
  id: n,
284
284
  approved: t
285
285
  });
286
- }, G = he("scrollEl"), K = he("wrapperEl"), Se = T(() => te(j.textColor, j.mainColor)), { handleScroll: Ce, scrollToBottom: Te, userScrolledUp: Ee, isAtBottom: et } = De({
287
- scrollEl: G,
286
+ }, W = _e("scrollEl"), G = _e("wrapperEl"), we = T(() => u(j.textColor, j.mainColor)), { handleScroll: Te, scrollToBottom: De, userScrolledUp: K, isAtBottom: tt } = Oe({
287
+ scrollEl: W,
288
288
  status: () => j.status,
289
289
  messagesLength: () => j.messages?.length,
290
290
  lastMessageRole: () => j.messages?.[j.messages.length - 1]?.role,
291
- contentEl: () => K.value,
292
- beforeNewMessageScroll: () => ct(),
291
+ contentEl: () => G.value,
292
+ beforeNewMessageScroll: () => lt(),
293
293
  onScrollUp: () => M("scroll-up"),
294
294
  onScrollDown: () => M("scroll-down")
295
- }), tt = () => {
296
- Ee.value = !1, Te();
295
+ }), nt = () => {
296
+ K.value = !1, De();
297
297
  }, q = T(() => (j.messages ?? []).filter((e) => e.role === "user").map((e) => ({
298
298
  id: e.id,
299
299
  preview: e.parts.find(o)?.text.trim().slice(0, 120) || "…"
300
- }))), nt = R(), rt = () => G.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], it = () => {
301
- let e = G.value;
300
+ }))), rt = L(), it = () => W.value?.querySelectorAll(".pk-chatbot-message--user") ?? [], at = () => {
301
+ let e = W.value;
302
302
  if (!e || !j.showScrollToBottom) return;
303
303
  let t = e.getBoundingClientRect().top + e.clientHeight / 2, n = q.value[0]?.id;
304
- rt().forEach((e, r) => {
304
+ it().forEach((e, r) => {
305
305
  e.getBoundingClientRect().top <= t && (n = q.value[r]?.id);
306
- }), nt.value = n;
306
+ }), rt.value = n;
307
307
  };
308
- V(q, async () => {
309
- await N(), it();
308
+ B(q, async () => {
309
+ await N(), at();
310
310
  });
311
- let at = () => {
312
- Ce(), it();
313
- }, ot = (e) => {
314
- let t = G.value, n = q.value.findIndex((t) => t.id === e), r = rt()[n];
315
- t && r && (Ee.value = !0, t.scrollTo({
311
+ let ot = () => {
312
+ Te(), at();
313
+ }, st = (e) => {
314
+ let t = W.value, n = q.value.findIndex((t) => t.id === e), r = it()[n];
315
+ t && r && (K.value = !0, t.scrollTo({
316
316
  top: t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - Number.parseFloat(getComputedStyle(t).paddingTop),
317
317
  behavior: "smooth"
318
318
  }));
319
- }, J = R(0), st = R(!1), ct = async () => {
319
+ }, J = L(0), ct = L(!1), lt = async () => {
320
320
  let e = j.messages;
321
- if (!e?.length || j.disableHeightAdjustment || e[e.length - 1].role !== "user" && j.status !== "submitted" && j.status !== "streaming" || (st.value = !1, await N(), !G.value)) return;
322
- let { paddingTop: t, paddingBottom: n } = getComputedStyle(G.value), r = G.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(n), i = K.value && Number.parseFloat(getComputedStyle(K.value).rowGap) || 0, a = rt(), o = r - (a[a.length - 1]?.clientHeight ?? 0) - i;
321
+ if (!e?.length || j.disableHeightAdjustment || e[e.length - 1].role !== "user" && j.status !== "submitted" && j.status !== "streaming" || (ct.value = !1, await N(), !W.value)) return;
322
+ let { paddingTop: t, paddingBottom: n } = getComputedStyle(W.value), r = W.value.clientHeight - Number.parseFloat(t) - Number.parseFloat(n), i = G.value && Number.parseFloat(getComputedStyle(G.value).rowGap) || 0, a = it(), o = r - (a[a.length - 1]?.clientHeight ?? 0) - i;
323
323
  r > 0 && (J.value = Math.max(o, 0)), await N();
324
324
  };
325
- V(() => [j.messages?.length, j.messages?.[j.messages.length - 1]?.id], () => ct()), ue(() => {
326
- (j.status === "submitted" || j.status === "streaming" || j.awaitingSpokenAnswer) && ct();
327
- }), V(() => j.status, (e) => {
328
- (e === "ready" || e === "error") && (st.value = !0, J.value = 0);
325
+ B(() => [j.messages?.length, j.messages?.[j.messages.length - 1]?.id], () => lt()), fe(() => {
326
+ (j.status === "submitted" || j.status === "streaming" || j.awaitingSpokenAnswer) && lt();
327
+ }), B(() => j.status, (e) => {
328
+ (e === "ready" || e === "error") && (ct.value = !0, J.value = 0);
329
329
  });
330
- let lt = (e) => j.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => j.messageFeedbacks?.find((t) => t.messageId === e), ut = (e, t) => !j.readonlyFeedback && Ot(e, t), dt = (e) => j.readonlyFeedback ? Y(e) : void 0, ft = (e) => dt(e)?.vote, pt = (e) => {
331
- let t = dt(e);
330
+ let ut = (e) => j.revisedAnswers?.some((t) => t.messageId === e), Y = (e) => j.messageFeedbacks?.find((t) => t.messageId === e), dt = (e, t) => !j.readonlyFeedback && kt(e, t), ft = (e) => j.readonlyFeedback ? Y(e) : void 0, pt = (e) => ft(e)?.vote, mt = (e) => {
331
+ let t = ft(e);
332
332
  if (t?.vote) return;
333
333
  let n = t?.metadata?.reactionEmoji;
334
334
  return typeof n == "string" && /\p{Extended_Pictographic}/u.test(n) ? n : void 0;
335
- }, mt = (e) => !!(ft(e) || pt(e)), ht = (e) => {
336
- if (pt(e)) return "pk-chatbot-message__reaction--neutral";
337
- let t = ft(e);
335
+ }, ht = (e) => !!(pt(e) || mt(e)), gt = (e) => {
336
+ if (mt(e)) return "pk-chatbot-message__reaction--neutral";
337
+ let t = pt(e);
338
338
  return t === "upvote" ? "pk-chatbot-message__reaction--positive" : t === "downvote" ? "pk-chatbot-message__reaction--negative" : "pk-chatbot-message__reaction--neutral";
339
- }, gt = (e) => {
340
- let t = ft(e);
341
- return I(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
342
339
  }, _t = (e) => {
343
- let t = bt(e);
340
+ let t = pt(e);
341
+ return F(t === "upvote" ? "hint.userFeedbackPositive" : t === "downvote" ? "hint.userFeedbackNegative" : "hint.userFeedbackReaction");
342
+ }, vt = (e) => {
343
+ let t = xt(e);
344
344
  for (let e = t.length - 1; e >= 0; --e) if (o(t[e])) return e;
345
345
  return -1;
346
- }, vt = T(() => j.messages?.[j.messages.length - 1]), X = T(() => {
347
- let e = vt.value;
346
+ }, yt = T(() => j.messages?.[j.messages.length - 1]), X = T(() => {
347
+ let e = yt.value;
348
348
  return e ? e.parts[e.parts.length - 1] : null;
349
- }), yt = T(() => {
349
+ }), bt = T(() => {
350
350
  let e = /* @__PURE__ */ new Map();
351
- for (let t of j.messages ?? []) t.role === "assistant" && e.set(t.id, u(t.parts));
351
+ for (let t of j.messages ?? []) t.role === "assistant" && e.set(t.id, g(ne(t.parts)));
352
352
  return e;
353
- }), bt = (e) => yt.value.get(e.id) ?? e.parts, Z = T(() => j.status === "submitted" || j.status === "streaming"), xt = T(() => j.status === "error"), St = T(() => j.awaitingSpokenAnswer === !0 && !Z.value), Ct = T(() => St.value && vt.value?.role === "user" && !xt.value), wt = T(() => {
353
+ }), xt = (e) => bt.value.get(e.id) ?? e.parts, Z = T(() => j.status === "submitted" || j.status === "streaming"), St = T(() => j.status === "error"), Ct = T(() => j.awaitingSpokenAnswer === !0 && !Z.value), wt = T(() => Ct.value && yt.value?.role === "user" && !St.value), Tt = T(() => {
354
354
  let e = X.value;
355
- return f(I, e);
356
- }), Tt = T(() => {
355
+ return te(F, e);
356
+ }), Et = T(() => {
357
357
  let e = X.value;
358
- return m(e);
359
- }), Et = (e) => j.messages?.findIndex((t) => t.id === e), Q = (e) => e === void 0 || !j.messages ? !1 : e === j.messages.length - 1, Dt = (e) => Q(e) && j.status === "ready" && !!j.actions?.includes("regenerate"), Ot = (e, t) => (!Q(t) || j.status === "ready") && !!j.actions?.includes(e), kt = (e) => {
358
+ return v(e);
359
+ }), Dt = (e) => j.messages?.findIndex((t) => t.id === e), Q = (e) => e === void 0 || !j.messages ? !1 : e === j.messages.length - 1, Ot = (e) => Q(e) && j.status === "ready" && !!j.actions?.includes("regenerate"), kt = (e, t) => (!Q(t) || j.status === "ready") && !!j.actions?.includes(e), At = (e) => {
360
360
  let t = e.parts[e.parts.length - 1];
361
361
  return o(t);
362
- }, At = (e) => e.parts.some((e) => i(e) || r(e)), jt = (e) => !!j.showExtendedSteps && $(e) && At(e), $ = (e) => e.role === "assistant", Mt = (e) => e.role === "user", Nt = (e) => j.messages?.slice(0, e).reverse().find((e) => $(e)), Pt = (e) => j.messages?.slice(e + 1).find((e) => $(e)), Ft = (e) => {
363
- let t = Nt(e)?.metadata?.createdAt, n = Pt(e)?.metadata?.createdAt;
362
+ }, jt = (e) => e.parts.some((e) => i(e) || r(e)), Mt = (e) => !!j.showExtendedSteps && $(e) && jt(e), Nt = (e) => r(e) && !y(e) && !!(Ce[a(e)] || xe[e.type] || j.showAllMessageParts), Pt = (e) => e.parts.some((e) => o(e) && !!e.text.trim() || n(e) || d(e) && !y(e) || Nt(e)), $ = (e) => e.role === "assistant", Ft = (e) => e.role === "user", It = (e) => j.messages?.slice(0, e).reverse().find((e) => $(e)), Lt = (e) => j.messages?.slice(e + 1).find((e) => $(e)), Rt = (e) => {
363
+ let t = It(e)?.metadata?.createdAt, n = Lt(e)?.metadata?.createdAt;
364
364
  if (!t || !n) return;
365
365
  let r = new Date(t), i = new Date(n);
366
366
  return r.toDateString() === i.toDateString() ? void 0 : i;
367
- }, It = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(j.actions?.length || j.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || j.showMessageTokensCount && e.metadata?.totalTokens !== void 0), Lt = (e) => {
367
+ }, zt = (e, t) => t === 0 || e.role !== "assistant" ? !1 : !!(j.actions?.length || j.showMessageDateTime && e.metadata?.createdAt !== void 0 || e.metadata?.completedAt !== void 0 || j.showMessageTokensCount && e.metadata?.totalTokens !== void 0), Bt = (e) => {
368
368
  let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString();
369
- return W(t, n ? "time" : "date-time");
370
- }, Rt = (e) => {
369
+ return U(t, n ? "time" : "date-time");
370
+ }, Vt = (e) => {
371
371
  let { createdAt: t, completedAt: n } = e.metadata ?? {};
372
- if (t && n) return g(_e, n - t);
373
- }, zt = he("feedbackMessageEl");
374
- return V(() => j.feedbackMessageId, async () => {
372
+ if (t && n) return p(ye, n - t);
373
+ }, Ht = _e("feedbackMessageEl");
374
+ return B(() => j.feedbackMessageId, async () => {
375
375
  if (await N(), !j.feedbackMessageId) return;
376
- let e = zt.value?.[0]?.$el;
376
+ let e = Ht.value?.[0]?.$el;
377
377
  if (e) {
378
- if (Q(Et(j.feedbackMessageId))) {
379
- Te();
378
+ if (Q(Dt(j.feedbackMessageId))) {
379
+ De();
380
380
  return;
381
381
  }
382
382
  e.scrollIntoView({
@@ -384,92 +384,94 @@ var Oe = ["aria-busy"], ke = {
384
384
  block: "center"
385
385
  });
386
386
  }
387
- }), (i, u) => {
388
- let d = se, f = S, g = oe;
389
- return L(), O("div", {
387
+ }), (r, i) => {
388
+ let u = ce, p = oe, h = se;
389
+ return I(), O("div", {
390
390
  ref_key: "scrollEl",
391
- ref: G,
392
- class: P(["pk-chatbot-messages", { "pk-chatbot-messages--settling": st.value }]),
391
+ ref: W,
392
+ class: P(["pk-chatbot-messages", { "pk-chatbot-messages--settling": ct.value }]),
393
393
  role: "log",
394
394
  "aria-live": "polite",
395
395
  "aria-relevant": "additions text",
396
396
  "aria-busy": Z.value,
397
- style: F({
397
+ style: de({
398
398
  "--chatbot-main-color": e.mainColor,
399
- "--chatbot-contrast-color": Se.value
399
+ "--chatbot-contrast-color": we.value
400
400
  }),
401
- onScroll: at
401
+ onScroll: ot
402
402
  }, [
403
- e.showScrollToBottom && q.value.length > 1 ? (L(), O("div", ke, [A(x, {
403
+ e.showScrollToBottom && q.value.length > 1 ? (I(), O("div", Ae, [A(S, {
404
404
  items: q.value,
405
- "active-id": nt.value,
406
- onSelect: ot
405
+ "active-id": rt.value,
406
+ onSelect: st
407
407
  }, null, 8, ["items", "active-id"])])) : D("", !0),
408
408
  k("div", {
409
409
  ref_key: "wrapperEl",
410
- ref: K,
410
+ ref: G,
411
411
  class: "pk-chatbot-messages__wrapper"
412
412
  }, [
413
- (L(!0), O(C, null, de(e.messages, (c, _) => (L(), O(C, { key: c.id }, [Mt(c) && Ft(_) ? (L(), O("div", Ae, [k("span", je, z(B(W)(Ft(_), "short")), 1)])) : D("", !0), c.parts.length || Q(_) && Z.value && $(c) ? (L(), O("div", {
413
+ (I(!0), O(C, null, pe(e.messages, (c, g) => (I(), O(C, { key: c.id }, [Ft(c) && Rt(g) ? (I(), O("div", je, [k("span", Me, R(z(U)(Rt(g), "short")), 1)])) : D("", !0), c.parts.length || Q(g) && Z.value && $(c) ? (I(), O("div", {
414
414
  key: 1,
415
- class: P(["pk-chatbot-message", [`pk-chatbot-message--${c.role}`, { "pk-chatbot-message--loading": Z.value && Q(_) && $(c) }]]),
416
- style: F({ minHeight: Q(_) && $(c) && !xt.value ? `${J.value}px` : void 0 })
415
+ class: P(["pk-chatbot-message", [`pk-chatbot-message--${c.role}`, { "pk-chatbot-message--loading": Z.value && Q(g) && $(c) }]]),
416
+ style: de({ minHeight: Q(g) && $(c) && !St.value ? `${J.value}px` : void 0 })
417
417
  }, [
418
418
  A(w, {
419
419
  appear: "",
420
420
  name: "pk-chatbot-part"
421
421
  }, {
422
- default: H(() => [jt(c) ? (L(), E(b, {
422
+ default: V(() => [Mt(c) ? (I(), E(x, {
423
423
  key: 0,
424
424
  message: c,
425
- "is-streaming": Z.value && Q(_),
425
+ "is-streaming": Z.value && Q(g),
426
+ "has-content": Pt(c),
426
427
  "is-dark": e.isDark
427
428
  }, null, 8, [
428
429
  "message",
429
430
  "is-streaming",
431
+ "has-content",
430
432
  "is-dark"
431
433
  ])) : D("", !0)]),
432
434
  _: 2
433
435
  }, 1024),
434
- (L(!0), O(C, null, de(bt(c), (l, u) => (L(), O(C, { key: u }, [B(o)(l) && l.text.trim() ? (L(), E(w, {
436
+ (I(!0), O(C, null, pe(xt(c), (i, l) => (I(), O(C, { key: l }, [z(o)(i) && i.text.trim() ? (I(), E(w, {
435
437
  key: 0,
436
438
  appear: "",
437
439
  name: "pk-chatbot-part"
438
440
  }, {
439
- default: H(() => [k("div", Me, [fe(i.$slots, "text", le({ ref_for: !0 }, {
441
+ default: V(() => [k("div", Ne, [me(r.$slots, "text", ue({ ref_for: !0 }, {
440
442
  message: c,
441
- part: l,
442
- index: _,
443
+ part: i,
444
+ index: g,
443
445
  isLoading: Z.value
444
- }), () => [$(c) ? (L(), E(t, {
446
+ }), () => [$(c) ? (I(), E(t, {
445
447
  key: 0,
446
448
  class: "wysiwyg",
447
- markdown: l.text,
449
+ markdown: i.text,
448
450
  "is-dark": e.isDark,
449
- loading: Q(_) && e.status === "streaming"
451
+ loading: Q(g) && e.status === "streaming"
450
452
  }, null, 8, [
451
453
  "markdown",
452
454
  "is-dark",
453
455
  "loading"
454
- ])) : (L(), O(C, { key: 1 }, [ce(z(l.text), 1)], 64))]), mt(c.id) && !Y(c.id)?.comment && u === _t(c) ? (L(), O("span", {
456
+ ])) : (I(), O(C, { key: 1 }, [le(R(i.text), 1)], 64))]), ht(c.id) && !Y(c.id)?.comment && l === vt(c) ? (I(), O("span", {
455
457
  key: 0,
456
- class: P(["pk-chatbot-message__reaction", ht(c.id)]),
457
- title: gt(c.id)
458
- }, [pt(c.id) ? (L(), O("span", Pe, z(pt(c.id)), 1)) : (L(), E(d, {
458
+ class: P(["pk-chatbot-message__reaction", gt(c.id)]),
459
+ title: _t(c.id)
460
+ }, [mt(c.id) ? (I(), O("span", Fe, R(mt(c.id)), 1)) : (I(), E(u, {
459
461
  key: 1,
460
- name: ft(c.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
461
- }, null, 8, ["name"]))], 10, Ne)) : D("", !0)])]),
462
+ name: pt(c.id) === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-up-fill"
463
+ }, null, 8, ["name"]))], 10, Pe)) : D("", !0)])]),
462
464
  _: 2
463
- }, 1024)) : B(n)(l) ? (L(), E(w, {
465
+ }, 1024)) : z(n)(i) ? (I(), E(w, {
464
466
  key: 1,
465
467
  appear: "",
466
468
  name: "pk-chatbot-part"
467
469
  }, {
468
- default: H(() => [A(ne, {
469
- "media-type": l.mediaType,
470
- url: l.url,
471
- filename: l.filename,
472
- size: B(s)(l)?.bytesCount
470
+ default: V(() => [A(re, {
471
+ "media-type": i.mediaType,
472
+ url: i.url,
473
+ filename: i.filename,
474
+ size: z(s)(i)?.bytesCount
473
475
  }, null, 8, [
474
476
  "media-type",
475
477
  "url",
@@ -477,17 +479,17 @@ var Oe = ["aria-busy"], ke = {
477
479
  "size"
478
480
  ])]),
479
481
  _: 2
480
- }, 1024)) : B(p)(l) && !B(v)(l) ? (L(), E(w, {
482
+ }, 1024)) : z(d)(i) && !z(y)(i) ? (I(), E(w, {
481
483
  key: 2,
482
484
  appear: "",
483
485
  name: "pk-chatbot-part"
484
486
  }, {
485
- default: H(() => [(L(), E(we, {
486
- key: `approval-${u}`,
487
- part: l,
488
- actionable: e.interactive === !0 && (B(y)(l) || Q(_)),
489
- "call-verdict": e.confirmVerdictsOnCall?.get(l.toolCallId ?? ""),
490
- onRespond: (e) => be(l, e)
487
+ default: V(() => [(I(), E(Ee, {
488
+ key: `approval-${l}`,
489
+ part: i,
490
+ actionable: e.interactive === !0 && (z(f)(i) || Q(g)),
491
+ "call-verdict": e.confirmVerdictsOnCall?.get(i.toolCallId ?? ""),
492
+ onRespond: (e) => Se(i, e)
491
493
  }, null, 8, [
492
494
  "part",
493
495
  "actionable",
@@ -495,27 +497,27 @@ var Oe = ["aria-busy"], ke = {
495
497
  "onRespond"
496
498
  ]))]),
497
499
  _: 2
498
- }, 1024)) : B(r)(l) && !B(v)(l) && (B(xe)[B(a)(l)] || B(ye)[l.type] || e.showAllMessageParts) ? (L(), E(w, {
500
+ }, 1024)) : Nt(i) ? (I(), E(w, {
499
501
  key: 3,
500
502
  appear: "",
501
503
  name: "pk-chatbot-part"
502
504
  }, {
503
- default: H(() => [!B(ye)[l.type] && B(xe)[B(a)(l)] ? (L(), E(pe(B(xe)[B(a)(l)]), {
504
- key: `component-${u}-${B(ee)(l)}`,
505
- part: l
506
- }, null, 8, ["part"])) : fe(i.$slots, l.type, le({ ref_for: !0 }, {
505
+ default: V(() => [!z(xe)[i.type] && z(Ce)[z(a)(i)] ? (I(), E(he(z(Ce)[z(a)(i)]), {
506
+ key: `component-${l}-${z(m)(i)}`,
507
+ part: i
508
+ }, null, 8, ["part"])) : me(r.$slots, i.type, ue({ ref_for: !0 }, {
507
509
  message: c,
508
- part: l,
509
- index: _,
510
+ part: i,
511
+ index: g,
510
512
  isLoading: Z.value
511
- }), () => [e.showAllMessageParts ? (L(), O("div", Fe, [k("div", Ie, [B(m)(l) ? (L(), E(d, {
513
+ }), () => [e.showAllMessageParts ? (I(), O("div", Ie, [k("div", Le, [z(v)(i) ? (I(), E(u, {
512
514
  key: 0,
513
- name: B(m)(l),
515
+ name: z(v)(i),
514
516
  class: "shrink-0"
515
- }, null, 8, ["name"])) : D("", !0), k("code", Le, z(B(ve)(l.type)), 1)])])) : D("", !0)], void 0, 1)]),
517
+ }, null, 8, ["name"])) : D("", !0), k("code", Re, R(z(be)(i.type)), 1)])])) : D("", !0)], void 0, 1)]),
516
518
  _: 2
517
519
  }, 1024)) : D("", !0), A(w, { mode: "out-in" }, {
518
- default: H(() => [u === _t(c) && e.readonlyFeedback && Y(c.id)?.comment ? (L(), E(ie, {
520
+ default: V(() => [l === vt(c) && e.readonlyFeedback && Y(c.id)?.comment ? (I(), E(ae, {
519
521
  key: 0,
520
522
  feedback: Y(c.id)
521
523
  }, null, 8, ["feedback"])) : D("", !0)]),
@@ -525,38 +527,38 @@ var Oe = ["aria-busy"], ke = {
525
527
  name: "fade-in",
526
528
  mode: "out-in"
527
529
  }, {
528
- default: H(() => [Z.value && Q(_) && !kt(c) && $(c) && !jt(c) ? (L(), O("div", {
530
+ default: V(() => [Z.value && Q(g) && !At(c) && $(c) && (!Mt(c) || Pt(c)) ? (I(), O("div", {
529
531
  key: `loading-info-${c.id}`,
530
532
  class: "pk-chatbot-message__loading-info"
531
- }, [k("div", Re, [
532
- A(d, {
533
+ }, [k("div", ze, [
534
+ A(u, {
533
535
  name: "loading-loop",
534
536
  class: "shrink-0"
535
537
  }),
536
538
  A(w, { mode: "out-in" }, {
537
- default: H(() => [Tt.value ? (L(), E(d, {
538
- key: Tt.value,
539
+ default: V(() => [Et.value ? (I(), E(u, {
540
+ key: Et.value,
539
541
  class: "shrink-0",
540
- name: Tt.value
542
+ name: Et.value
541
543
  }, null, 8, ["name"])) : D("", !0)]),
542
544
  _: 1
543
545
  }),
544
546
  A(w, { mode: "out-in" }, {
545
- default: H(() => [wt.value ? (L(), O("span", {
546
- key: wt.value,
547
+ default: V(() => [Tt.value ? (I(), O("span", {
548
+ key: Tt.value,
547
549
  class: "text-12"
548
- }, z(wt.value), 1)) : D("", !0)]),
550
+ }, R(Tt.value), 1)) : D("", !0)]),
549
551
  _: 1
550
552
  })
551
553
  ]), A(w, {
552
554
  name: "fade-in",
553
555
  mode: "out-in"
554
556
  }, {
555
- default: H(() => [X.value && "text" in X.value && X.value.text.trim() ? (L(), E(ae, {
557
+ default: V(() => [!Mt(c) && X.value && "text" in X.value && X.value.text.trim() ? (I(), E(b, {
556
558
  key: 0,
557
559
  markdown: X.value.text,
558
560
  "is-dark": e.isDark,
559
- "tail-length": B(h),
561
+ "tail-length": z(ee),
560
562
  "inner-class": "wysiwyg",
561
563
  class: "border border-surface-3 rounded-md p-4 mt-8 bg-surface-1 max-h-64 text-12 w-full"
562
564
  }, null, 8, [
@@ -564,36 +566,36 @@ var Oe = ["aria-busy"], ke = {
564
566
  "is-dark",
565
567
  "tail-length"
566
568
  ])) : D("", !0)]),
567
- _: 1
568
- })])) : D("", !0)]),
569
+ _: 2
570
+ }, 1024)])) : D("", !0)]),
569
571
  _: 2
570
572
  }, 1024),
571
573
  A(w, { mode: "out-in" }, {
572
- default: H(() => [It(c, _) ? (L(), O("div", ze, [
573
- A(g, {
574
+ default: V(() => [zt(c, g) ? (I(), O("div", Be, [
575
+ A(h, {
574
576
  modifiers: "compact",
575
577
  class: "mr-auto shrink-0"
576
578
  }, {
577
- default: H(() => [
579
+ default: V(() => [
578
580
  A(w, { mode: "out-in" }, {
579
- default: H(() => [Dt(_) ? (L(), E(f, {
581
+ default: V(() => [Ot(g) ? (I(), E(p, {
580
582
  key: 0,
581
583
  icon: "ri:reset-right-line",
582
584
  modifiers: "action-quiet-small",
583
- title: B(I)("action.regenerate"),
584
- "aria-label": B(I)("action.regenerate"),
585
- onClick: u[0] ||= U((e) => i.$emit("regenerate"), ["stop"])
585
+ title: z(F)("action.regenerate"),
586
+ "aria-label": z(F)("action.regenerate"),
587
+ onClick: i[0] ||= H((e) => r.$emit("regenerate"), ["stop"])
586
588
  }, null, 8, ["title", "aria-label"])) : D("", !0)]),
587
589
  _: 2
588
590
  }, 1024),
589
591
  A(w, { mode: "out-in" }, {
590
- default: H(() => [Ot("show-info", _) ? (L(), E(f, {
592
+ default: V(() => [kt("show-info", g) ? (I(), E(p, {
591
593
  key: 0,
592
594
  icon: "ri:information-line",
593
- title: B(I)("action.getMoreInfo"),
594
- "aria-label": B(I)("action.getMoreInfo"),
595
+ title: z(F)("action.getMoreInfo"),
596
+ "aria-label": z(F)("action.getMoreInfo"),
595
597
  modifiers: "action-quiet-small",
596
- onClick: U((e) => i.$emit("show-info", c), ["stop"])
598
+ onClick: H((e) => r.$emit("show-info", c), ["stop"])
597
599
  }, null, 8, [
598
600
  "title",
599
601
  "aria-label",
@@ -602,14 +604,14 @@ var Oe = ["aria-busy"], ke = {
602
604
  _: 2
603
605
  }, 1024),
604
606
  A(w, { mode: "out-in" }, {
605
- default: H(() => [Ot("revise", _) ? (L(), E(f, {
607
+ default: V(() => [kt("revise", g) ? (I(), E(p, {
606
608
  key: 0,
607
- icon: lt(c.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
608
- title: lt(c.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
609
- "aria-label": lt(c.id) ? B(I)("action.editRevise") : B(I)("action.createRevise"),
609
+ icon: ut(c.id) ? "ri:file-edit-fill" : "ri:file-edit-line",
610
+ title: ut(c.id) ? z(F)("action.editRevise") : z(F)("action.createRevise"),
611
+ "aria-label": ut(c.id) ? z(F)("action.editRevise") : z(F)("action.createRevise"),
610
612
  modifiers: "action-quiet-small",
611
- class: P({ "text-brand": lt(c.id) }),
612
- onClick: U((e) => i.$emit("revise", c), ["stop"])
613
+ class: P({ "text-brand": ut(c.id) }),
614
+ onClick: H((e) => r.$emit("revise", c), ["stop"])
613
615
  }, null, 8, [
614
616
  "icon",
615
617
  "title",
@@ -620,13 +622,13 @@ var Oe = ["aria-busy"], ke = {
620
622
  _: 2
621
623
  }, 1024),
622
624
  A(w, { mode: "out-in" }, {
623
- default: H(() => [ut("upvote", _) ? (L(), E(f, {
625
+ default: V(() => [dt("upvote", g) ? (I(), E(p, {
624
626
  key: 0,
625
627
  icon: Y(c.id)?.vote === "upvote" ? "ri:thumb-up-fill" : "ri:thumb-up-line",
626
- title: B(I)("action.upvote"),
627
- "aria-label": B(I)("action.upvote"),
628
+ title: z(F)("action.upvote"),
629
+ "aria-label": z(F)("action.upvote"),
628
630
  modifiers: "action-quiet-small",
629
- onClick: U((e) => i.$emit("upvote", c), ["stop"])
631
+ onClick: H((e) => r.$emit("upvote", c), ["stop"])
630
632
  }, null, 8, [
631
633
  "icon",
632
634
  "title",
@@ -636,13 +638,13 @@ var Oe = ["aria-busy"], ke = {
636
638
  _: 2
637
639
  }, 1024),
638
640
  A(w, { mode: "out-in" }, {
639
- default: H(() => [ut("downvote", _) ? (L(), E(f, {
641
+ default: V(() => [dt("downvote", g) ? (I(), E(p, {
640
642
  key: 0,
641
643
  icon: Y(c.id)?.vote === "downvote" ? "ri:thumb-down-fill" : "ri:thumb-down-line",
642
- title: B(I)("action.downvote"),
643
- "aria-label": B(I)("action.downvote"),
644
+ title: z(F)("action.downvote"),
645
+ "aria-label": z(F)("action.downvote"),
644
646
  modifiers: "action-quiet-small",
645
- onClick: U((e) => i.$emit("downvote", c), ["stop"])
647
+ onClick: H((e) => r.$emit("downvote", c), ["stop"])
646
648
  }, null, 8, [
647
649
  "icon",
648
650
  "title",
@@ -652,13 +654,13 @@ var Oe = ["aria-busy"], ke = {
652
654
  _: 2
653
655
  }, 1024),
654
656
  A(w, { mode: "out-in" }, {
655
- default: H(() => [ut("feedback", _) ? (L(), E(f, {
657
+ default: V(() => [dt("feedback", g) ? (I(), E(p, {
656
658
  key: 0,
657
659
  icon: Y(c.id)?.comment ? "ri:feedback-fill" : "ri:feedback-line",
658
- title: B(I)("action.feedback"),
659
- "aria-label": B(I)("action.feedback"),
660
+ title: z(F)("action.feedback"),
661
+ "aria-label": z(F)("action.feedback"),
660
662
  modifiers: "action-quiet-small",
661
- onClick: U((e) => i.$emit("feedback", c), ["stop"])
663
+ onClick: H((e) => r.$emit("feedback", c), ["stop"])
662
664
  }, null, 8, [
663
665
  "icon",
664
666
  "title",
@@ -670,30 +672,30 @@ var Oe = ["aria-busy"], ke = {
670
672
  ]),
671
673
  _: 2
672
674
  }, 1024),
673
- !e.showMessageDateTime && c.metadata?.createdAt && c.metadata?.completedAt ? (L(), O("div", Be, [k("time", {
675
+ !e.showMessageDateTime && c.metadata?.createdAt && c.metadata?.completedAt ? (I(), O("div", Ve, [k("time", {
674
676
  datetime: new Date(c.metadata.createdAt).toISOString(),
675
- title: B(W)(new Date(c.metadata.createdAt), "date-time"),
677
+ title: z(U)(new Date(c.metadata.createdAt), "date-time"),
676
678
  class: "flex items-center gap-4 min-w-0"
677
- }, [A(d, {
679
+ }, [A(u, {
678
680
  name: "ri:time-line",
679
681
  class: "shrink-0"
680
- }), k("span", He, z(Lt(c.metadata.createdAt)), 1)], 8, Ve), Rt(c) ? (L(), O("span", Ue, [A(d, {
682
+ }), k("span", Ue, R(Bt(c.metadata.createdAt)), 1)], 8, He), Vt(c) ? (I(), O("span", We, [A(u, {
681
683
  name: "ri:hourglass-line",
682
684
  class: "shrink-0"
683
- }), k("span", We, z(Rt(c)), 1)])) : D("", !0)])) : D("", !0),
684
- e.showMessageTokensCount && c.metadata?.totalTokens ? (L(), O("span", Ge, [A(d, {
685
+ }), k("span", Ge, R(Vt(c)), 1)])) : D("", !0)])) : D("", !0),
686
+ e.showMessageTokensCount && c.metadata?.totalTokens ? (I(), O("span", Ke, [A(u, {
685
687
  name: "ri:ai-generate-2-line",
686
688
  class: "shrink-0"
687
- }), k("span", Ke, z(B(_e)(c.metadata.totalTokens, "integer")) + " " + z(B(I)("label.tokens")), 1)])) : D("", !0),
688
- e.showMessageDateTime && c.metadata?.createdAt ? (L(), O("time", {
689
+ }), k("span", qe, R(z(ye)(c.metadata.totalTokens, "integer")) + " " + R(z(F)("label.tokens")), 1)])) : D("", !0),
690
+ e.showMessageDateTime && c.metadata?.createdAt ? (I(), O("time", {
689
691
  key: 2,
690
692
  datetime: new Date(c.metadata?.createdAt).toISOString(),
691
693
  class: "flex items-center gap-4 text-12 text-word-3"
692
- }, [A(d, {
694
+ }, [A(u, {
693
695
  name: "ri:time-line",
694
696
  class: "shrink-0"
695
- }), k("span", Je, z(B(W)(new Date(c.metadata?.createdAt), "date-time")), 1)], 8, qe)) : D("", !0),
696
- e.showMessageDateTime && c?.metadata?.completedAt && c?.metadata?.createdAt ? (L(), O("div", Ye, [A(d, {
697
+ }), k("span", Ye, R(z(U)(new Date(c.metadata?.createdAt), "date-time")), 1)], 8, Je)) : D("", !0),
698
+ e.showMessageDateTime && c?.metadata?.completedAt && c?.metadata?.createdAt ? (I(), O("div", Xe, [A(u, {
697
699
  name: "ri:hourglass-line",
698
700
  class: "shrink-0"
699
701
  }), A(l, {
@@ -705,16 +707,16 @@ var Oe = ["aria-busy"], ke = {
705
707
  _: 2
706
708
  }, 1024),
707
709
  A(w, { mode: "out-in" }, {
708
- default: H(() => [c.id === e.feedbackMessageId ? (L(), E(re, {
710
+ default: V(() => [c.id === e.feedbackMessageId ? (I(), E(ie, {
709
711
  key: 0,
710
712
  ref_for: !0,
711
713
  ref_key: "feedbackMessageEl",
712
- ref: zt,
714
+ ref: Ht,
713
715
  loading: e.feedbackLoading,
714
716
  submitted: e.feedbackSubmitted,
715
717
  error: e.feedbackError,
716
- onSubmit: u[1] ||= (e) => i.$emit("feedback-submit", e),
717
- onClose: u[2] ||= (e) => i.$emit("feedback-close")
718
+ onSubmit: i[1] ||= (e) => r.$emit("feedback-submit", e),
719
+ onClose: i[2] ||= (e) => r.$emit("feedback-close")
718
720
  }, null, 8, [
719
721
  "loading",
720
722
  "submitted",
@@ -727,50 +729,50 @@ var Oe = ["aria-busy"], ke = {
727
729
  appear: "",
728
730
  name: "pk-chatbot-part"
729
731
  }, {
730
- default: H(() => [St.value ? (L(), O("div", {
732
+ default: V(() => [Ct.value ? (I(), O("div", {
731
733
  key: 0,
732
734
  class: "pk-chatbot-message pk-chatbot-message--assistant pk-chatbot-message--loading",
733
- style: F({ minHeight: Ct.value ? `${J.value}px` : void 0 })
734
- }, [k("div", Xe, [k("div", Ze, [A(d, {
735
+ style: de({ minHeight: wt.value ? `${J.value}px` : void 0 })
736
+ }, [k("div", Ze, [k("div", Qe, [A(u, {
735
737
  name: "loading-loop",
736
738
  class: "shrink-0"
737
- }), k("span", Qe, z(B(I)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
739
+ }), k("span", $e, R(z(F)("label.answeringOnTheCall")), 1)])])], 4)) : D("", !0)]),
738
740
  _: 1
739
741
  }),
740
742
  A(w, {
741
743
  appear: "",
742
744
  name: "pk-chatbot-part"
743
745
  }, {
744
- default: H(() => [xt.value ? (L(), E(c, {
746
+ default: V(() => [St.value ? (I(), E(c, {
745
747
  key: 0,
746
748
  error: e.error,
747
- onRetry: u[3] ||= (e) => i.$emit("auto-retry"),
748
- onReset: u[4] ||= (e) => i.$emit("reset-chat")
749
+ onRetry: i[3] ||= (e) => r.$emit("auto-retry"),
750
+ onReset: i[4] ||= (e) => r.$emit("reset-chat")
749
751
  }, null, 8, ["error"])) : D("", !0)]),
750
752
  _: 1
751
753
  }),
752
- vt.value?.role === "user" && !Ct.value || xt.value ? (L(), O("div", {
754
+ yt.value?.role === "user" && !wt.value || St.value ? (I(), O("div", {
753
755
  key: 0,
754
756
  class: "pk-chatbot-messages__spacer",
755
- style: F({ minHeight: `${J.value}px` })
757
+ style: de({ minHeight: `${J.value}px` })
756
758
  }, null, 4)) : D("", !0)
757
759
  ], 512),
758
760
  A(w, { name: "pk-chatbot-messages-fab" }, {
759
- default: H(() => [e.showScrollToBottom && (B(Ee) || !B(et)) ? (L(), O("button", {
761
+ default: V(() => [e.showScrollToBottom && (z(K) || !z(tt)) ? (I(), O("button", {
760
762
  key: 0,
761
763
  type: "button",
762
764
  class: "pk-chatbot-messages__scroll-to-bottom",
763
- title: B(I)("action.scrollToBottom"),
764
- "aria-label": B(I)("action.scrollToBottom"),
765
- onClick: tt
766
- }, [A(d, { name: "ri:arrow-down-line" })], 8, $e)) : D("", !0)]),
765
+ title: z(F)("action.scrollToBottom"),
766
+ "aria-label": z(F)("action.scrollToBottom"),
767
+ onClick: nt
768
+ }, [A(u, { name: "ri:arrow-down-line" })], 8, et)) : D("", !0)]),
767
769
  _: 1
768
770
  })
769
- ], 46, Oe);
771
+ ], 46, ke);
770
772
  };
771
773
  }
772
774
  });
773
775
  //#endregion
774
- export { ye as a, ve as i, be as n, _e as r, et as t };
776
+ export { xe as a, be as i, Se as n, ye as r, tt as t };
775
777
 
776
- //# sourceMappingURL=PkChatbotMessages-GZStJbx_.js.map
778
+ //# sourceMappingURL=PkChatbotMessages-R1EsTJpM.js.map