@8wave/ai-elements 0.121.0-beta.39 → 0.121.0-beta.40
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.
- package/README.md +67 -15
- package/dist/_chunks/{Agent-C3m0UmlL.js → Agent-BuPgJIt4.js} +203 -202
- package/dist/_chunks/Agent-BuPgJIt4.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown--PCkA4Fg.js → PkStreamingMarkdown-D2aqCD0I.js} +953 -927
- package/dist/_chunks/PkStreamingMarkdown-D2aqCD0I.js.map +1 -0
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js → PkToolEditSpreadsheet-83ZdmGeA.js} +2 -2
- package/dist/_chunks/{PkToolEditSpreadsheet-DAMWWIVt.js.map → PkToolEditSpreadsheet-83ZdmGeA.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js → PkToolRequestGeolocation-1cOmCG8P.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BgsvQb7Q.js.map → PkToolRequestGeolocation-1cOmCG8P.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js → PkToolRequestOAuthConnection-CCu3FCyo.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-DtuZw7yk.js.map → PkToolRequestOAuthConnection-CCu3FCyo.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js → PkToolShowArtifact-CiYkZkpe.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-B163OvqY.js.map → PkToolShowArtifact-CiYkZkpe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js → PkToolShowContactForm-D7TEzrYe.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-C_ptr7Xs.js.map → PkToolShowContactForm-D7TEzrYe.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js → PkToolShowForm-CSh4Q6sl.js} +5 -5
- package/dist/_chunks/{PkToolShowForm-fburTpQm.js.map → PkToolShowForm-CSh4Q6sl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js → PkToolShowImageGallery-CQEaEfYE.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-ChauJukk.js.map → PkToolShowImageGallery-CQEaEfYE.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js → PkToolShowProductList-BCmULLct.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-B_XZezYw.js.map → PkToolShowProductList-BCmULLct.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js → PkToolShowSources-R9KWsfTQ.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-CS4nEuL0.js.map → PkToolShowSources-R9KWsfTQ.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js → PkToolShowSuggestedReply-DYZz9aV2.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-BIe56XdA.js.map → PkToolShowSuggestedReply-DYZz9aV2.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js → PkToolShowVideo-C_9SZtZM.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DzU1XJqv.js.map → PkToolShowVideo-C_9SZtZM.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js → PkToolShowWebPages-DwRYfle9.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-BlKe8Arf.js.map → PkToolShowWebPages-DwRYfle9.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js → chatImagePolicy-CQYTWTkP.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-ChSkpiw6.js.map → chatImagePolicy-CQYTWTkP.js.map} +1 -1
- package/dist/_chunks/{markdown-D3iMlF6T.js → markdown-Br9ROCBT.js} +2 -2
- package/dist/_chunks/{markdown-D3iMlF6T.js.map → markdown-Br9ROCBT.js.map} +1 -1
- package/dist/ai-elements.es.js +4378 -3756
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotEmptyState.js +1 -1
- package/dist-vue/PkChatbotInput.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotStepPayload.js +1 -1
- package/dist-vue/PkChatbotStepToolDetail.js +1 -1
- package/dist-vue/PkChatbotSteps.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{Agent-3IHYHv05.js → Agent-DZb775Ak.js} +193 -192
- package/dist-vue/_chunks/Agent-DZb775Ak.js.map +1 -0
- package/dist-vue/_chunks/{Document-B0A_y6N5.js → Document-E72l_VU6.js} +2 -2
- package/dist-vue/_chunks/{Document-B0A_y6N5.js.map → Document-E72l_VU6.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js → PkChatbot-DIqduIwr.js} +9 -9
- package/dist-vue/_chunks/{PkChatbot-Bu76hH4F.js.map → PkChatbot-DIqduIwr.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js → PkChatbotEmptyState-Dh7ETVnf.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-ilPJoYjk.js.map → PkChatbotEmptyState-Dh7ETVnf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js → PkChatbotInput-BJHtmPR-.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotInput-CY0YRGkG.js.map → PkChatbotInput-BJHtmPR-.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js +968 -0
- package/dist-vue/_chunks/PkChatbotMessages-DMSActW1.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js → PkChatbotStepPayload-CXdsUMrw.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-CiEcIlzW.js.map → PkChatbotStepPayload-CXdsUMrw.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js → PkChatbotStepToolDetail-DbpXR7jh.js} +16 -16
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-VqLkuWi7.js.map → PkChatbotStepToolDetail-DbpXR7jh.js.map} +1 -1
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js +189 -0
- package/dist-vue/_chunks/PkChatbotSteps-QFFZ0DjH.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-t-XkwFbe.js → PkChatbotViewChat-BI_PtT72.js} +300 -298
- package/dist-vue/_chunks/PkChatbotViewChat-BI_PtT72.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js → PkChatbotViewConversations-Bg4jSO9a.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-CgRMohUQ.js.map → PkChatbotViewConversations-Bg4jSO9a.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js → PkChatbotViewFiles-Cwm-JQMF.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-DkeysDGW.js.map → PkChatbotViewFiles-Cwm-JQMF.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js → PkChatbotViewProfile-C_GElIM3.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-kgqu10ED.js.map → PkChatbotViewProfile-C_GElIM3.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js → PkStreamingMarkdown-DwDs-cGP.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-CDlpb5w0.js.map → PkStreamingMarkdown-DwDs-cGP.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js → PkToolEditSpreadsheet-B61LtERY.js} +2 -2
- package/dist-vue/_chunks/{PkToolEditSpreadsheet-D0EPgCmp.js.map → PkToolEditSpreadsheet-B61LtERY.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js → PkToolRequestGeolocation-DC8hSH0j.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-DZnJd1od.js.map → PkToolRequestGeolocation-DC8hSH0j.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js → PkToolRequestOAuthConnection-BH_-drvw.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-C8MGtBlh.js.map → PkToolRequestOAuthConnection-BH_-drvw.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js → PkToolShowArtifact-CjVN96wJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CtXB1-vJ.js.map → PkToolShowArtifact-CjVN96wJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js → PkToolShowContactForm-CmBLigw8.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-DlZdfcNw.js.map → PkToolShowContactForm-CmBLigw8.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js → PkToolShowDiagram-dKUU5_6F.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-BUUjmUpE.js.map → PkToolShowDiagram-dKUU5_6F.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js → PkToolShowForm-B6ESvq-5.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-DxiiMSCC.js.map → PkToolShowForm-B6ESvq-5.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js → PkToolShowImageGallery-Daq0IwTH.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-D01aM-9U.js.map → PkToolShowImageGallery-Daq0IwTH.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js → PkToolShowProductList-Bc3Gzyxy.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-BRMF3WJf.js.map → PkToolShowProductList-Bc3Gzyxy.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js → PkToolShowSources-BDvRbenn.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-C0_MwX7m.js.map → PkToolShowSources-BDvRbenn.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js → PkToolShowSuggestedReply-Cd6VkzvJ.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-BcjKYwbk.js.map → PkToolShowSuggestedReply-Cd6VkzvJ.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js → PkToolShowVideo-Bo1gsD97.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-CjjoQH7j.js.map → PkToolShowVideo-Bo1gsD97.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js → PkToolShowWebPages-DI3sZiqh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B5reGh4g.js.map → PkToolShowWebPages-DI3sZiqh.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js → createChatbotApiClient-DUz4dwzY.js} +12 -12
- package/dist-vue/_chunks/{createChatbotApiClient-DcLpptlt.js.map → createChatbotApiClient-DUz4dwzY.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore-BliRphuB.js → useChatbotStore-D7LcpA-6.js} +481 -455
- package/dist-vue/_chunks/useChatbotStore-D7LcpA-6.js.map +1 -0
- package/dist-vue/_chunks/{utils-C7-KrzRE.js → utils-EPX3V3VI.js} +112 -86
- package/dist-vue/_chunks/utils-EPX3V3VI.js.map +1 -0
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/components/FloatingChatWidget.ce.d.ts +2 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +1 -0
- package/dist-vue/apps/web-component/src/lib.d.ts +10 -0
- package/dist-vue/apps/web-component/src/pageTools/actions.d.ts +2 -0
- package/dist-vue/apps/web-component/src/pageTools/announcements.d.ts +9 -0
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +12 -1
- package/dist-vue/apps/web-component/src/pageTools/navigation.d.ts +40 -8
- package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +60 -0
- package/dist-vue/composables.js +34 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +145 -125
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +28 -2
- package/dist-vue/packages/components/src/PkEditorPrompt.d.ts +6 -0
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +7 -1
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +4 -0
- package/dist-vue/packages/components/src/chat/PkPageControlBar.d.ts +5 -1
- package/dist-vue/packages/components/src/chat/utils.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +37 -8
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +8 -2
- package/dist-vue/packages/models/src/schema/PageAccess.d.ts +9 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-C3m0UmlL.js.map +0 -1
- package/dist/_chunks/PkStreamingMarkdown--PCkA4Fg.js.map +0 -1
- package/dist-vue/_chunks/Agent-3IHYHv05.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js +0 -954
- package/dist-vue/_chunks/PkChatbotMessages-BfKqJ8n_.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js +0 -189
- package/dist-vue/_chunks/PkChatbotSteps-CoDtEaL7.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-t-XkwFbe.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-BliRphuB.js.map +0 -1
- package/dist-vue/_chunks/utils-C7-KrzRE.js.map +0 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-DMSActW1.js";
|
|
2
2
|
import { o as t } from "./Media-D-UGzdcW.js";
|
|
3
|
-
import { a as n, n as r, t as i } from "./useChatbotStore-
|
|
3
|
+
import { a as n, n as r, t as i } from "./useChatbotStore-D7LcpA-6.js";
|
|
4
4
|
import { n as a } from "./src-BZRiAJsH.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { VvIcon as
|
|
12
|
-
import { Fragment as
|
|
5
|
+
import { c as o, h as s, n as c } from "./utils-EPX3V3VI.js";
|
|
6
|
+
import { t as l } from "./useLocalizedString-PfaKjIQY.js";
|
|
7
|
+
import { t as u } from "./PkAvatar-BTqu8tn9.js";
|
|
8
|
+
import { n as d, t as f } from "./PkChatbotInput-BJHtmPR-.js";
|
|
9
|
+
import { t as p } from "./PkChatbotEmptyState-Dh7ETVnf.js";
|
|
10
|
+
import { t as m } from "./PkChatbotWakeupBar-Cjgarxnw.js";
|
|
11
|
+
import { VvIcon as h } from "@volverjs/ui-vue/components";
|
|
12
|
+
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as ee, createTextVNode as C, createVNode as w, defineAsyncComponent as T, defineComponent as E, isRef as te, nextTick as ne, normalizeClass as D, onBeforeUnmount as O, onMounted as re, onScopeDispose as ie, onUnmounted as ae, openBlock as k, provide as oe, ref as A, renderList as se, shallowRef as ce, toDisplayString as j, toValue as le, unref as M, useTemplateRef as ue, watch as N, withCtx as P } from "vue";
|
|
13
13
|
import { useI18n as de } from "vue-i18n";
|
|
14
14
|
import { useDropZone as fe } from "@vueuse/core";
|
|
15
15
|
import { storeToRefs as pe } from "pinia";
|
|
16
16
|
//#region ../../packages/composable/src/chatbot/useGreeting.ts
|
|
17
17
|
function me(e, t) {
|
|
18
18
|
let { locale: n, t: r, te: i } = de({ useScope: "global" });
|
|
19
|
-
return
|
|
19
|
+
return v(() => F(le(e)?.greeting?.[0]?.[n.value] ?? "", le(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function F(e, t) {
|
|
22
22
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
@@ -26,14 +26,14 @@ function N(e, t) {
|
|
|
26
26
|
var he = {
|
|
27
27
|
class: "pk-aurora",
|
|
28
28
|
"aria-hidden": "true"
|
|
29
|
-
},
|
|
29
|
+
}, I = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "pk-aurora__fallback"
|
|
32
|
-
},
|
|
32
|
+
}, L = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", ge = "\nprecision mediump float;\nuniform vec2 u_resolution;\nuniform float u_time;\nuniform vec3 u_color;\nuniform vec2 u_center;\nuniform vec2 u_half;\nuniform float u_spread;\n\nvec3 permute(vec3 x) { return mod(((x * 34.0) + 1.0) * x, 289.0); }\n\nfloat snoise(vec2 v) {\n const vec4 C = vec4(0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439);\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0));\n vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)), 0.0);\n m = m * m;\n m = m * m;\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h);\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nvoid main() {\n vec2 px = gl_FragCoord.xy;\n vec2 rel = px - u_center;\n\n // Ignition: the ellipse lights up expanding from the center on mount\n float intro = smoothstep(0.0, 1.4, u_time);\n\n // Breathing: size and brightness oscillate gently but visibly\n float breath = 1.0\n + 0.12 * sin(u_time * 0.55)\n + 0.06 * snoise(vec2(u_time * 0.1, 3.7));\n float pulse = 1.0 + 0.2 * sin(u_time * 0.55 + 1.3);\n\n // Keep it simple (Gemini-style): one huge soft elliptical glow\n // centered on the pill\n vec2 radii = vec2(u_half.x * 0.95, u_half.y * 6.5)\n * u_spread\n * breath\n * mix(0.15, 1.0, intro);\n float r = length(rel / max(radii, vec2(1.0)));\n float glow = exp(-r * r * 2.2);\n\n // Never cut hard against the canvas bounds\n vec2 m = min(px, u_resolution - px);\n glow *= smoothstep(0.0, 32.0, min(m.x, m.y));\n\n // Dither: breaks the 8-bit banding rings of the very soft gradient\n // (no CSS blur on the canvas, the noise must fully mask the bands)\n glow = max(glow + (snoise(px * 0.9) - 0.5) * 0.03, 0.0);\n\n float alpha = glow * 0.2 * pulse * intro;\n\n // Premultiplied alpha (default canvas compositing)\n gl_FragColor = vec4(u_color * alpha, alpha);\n}", _e = /* @__PURE__ */ E({
|
|
33
33
|
__name: "PkAuroraCanvas",
|
|
34
34
|
props: { sourceSelector: {} },
|
|
35
35
|
setup(e) {
|
|
36
|
-
let t = e, n = ue("canvasEl"), r =
|
|
36
|
+
let t = e, n = ue("canvasEl"), r = A(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
37
37
|
if (!i) return null;
|
|
38
38
|
let n = i.createShader(e);
|
|
39
39
|
return !n || (i.shaderSource(n, t), i.compileShader(n), !i.getShaderParameter(n, i.COMPILE_STATUS)) ? null : n;
|
|
@@ -62,7 +62,7 @@ var he = {
|
|
|
62
62
|
}, v = () => {
|
|
63
63
|
_(), a = requestAnimationFrame(v);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return re(() => {
|
|
66
66
|
let e = n.value;
|
|
67
67
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
68
68
|
let t = m();
|
|
@@ -70,7 +70,7 @@ var he = {
|
|
|
70
70
|
r.value = !0;
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
let a = p(i.VERTEX_SHADER,
|
|
73
|
+
let a = p(i.VERTEX_SHADER, L), f = p(i.FRAGMENT_SHADER, ge), y = i.createProgram();
|
|
74
74
|
if (!a || !f || !y || (i.attachShader(y, a), i.attachShader(y, f), i.linkProgram(y), !i.getProgramParameter(y, i.LINK_STATUS))) {
|
|
75
75
|
r.value = !0;
|
|
76
76
|
return;
|
|
@@ -88,22 +88,22 @@ var he = {
|
|
|
88
88
|
1
|
|
89
89
|
]), i.STATIC_DRAW);
|
|
90
90
|
let x = i.getAttribLocation(y, "a_position");
|
|
91
|
-
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(),
|
|
92
|
-
}),
|
|
91
|
+
i.enableVertexAttribArray(x), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(y, "u_time"), c = i.getUniformLocation(y, "u_resolution"), l = i.getUniformLocation(y, "u_center"), u = i.getUniformLocation(y, "u_half"), d = i.getUniformLocation(y, "u_spread"), i.uniform3f(i.getUniformLocation(y, "u_color"), ...t), o = new ResizeObserver(h), o.observe(e), h(), ne(h), g() ? _(10) : v();
|
|
92
|
+
}), O(() => {
|
|
93
93
|
cancelAnimationFrame(a), o?.disconnect();
|
|
94
|
-
}),
|
|
94
|
+
}), ae(() => {
|
|
95
95
|
let e = i;
|
|
96
96
|
i = null, setTimeout(() => {
|
|
97
97
|
e?.getExtension("WEBGL_lose_context")?.loseContext();
|
|
98
98
|
}, 150);
|
|
99
|
-
}), (e, t) => (
|
|
99
|
+
}), (e, t) => (k(), x("div", he, [r.value ? (k(), x("div", I)) : (k(), x("canvas", {
|
|
100
100
|
key: 0,
|
|
101
101
|
ref_key: "canvasEl",
|
|
102
102
|
ref: n,
|
|
103
103
|
class: "pk-aurora__canvas"
|
|
104
104
|
}, null, 512))]));
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
106
|
+
}), R = .18, ve = .35, ye = /* @__PURE__ */ E({
|
|
107
107
|
__name: "PkVoiceOrb",
|
|
108
108
|
props: {
|
|
109
109
|
sample: {},
|
|
@@ -115,20 +115,20 @@ var he = {
|
|
|
115
115
|
bars: { default: 5 }
|
|
116
116
|
},
|
|
117
117
|
setup(e) {
|
|
118
|
-
let t = e, n = ue("barsEl"), r = Array.from({ length: t.bars }, () =>
|
|
118
|
+
let t = e, n = ue("barsEl"), r = Array.from({ length: t.bars }, () => R), i, a = () => typeof window < "u" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === !0, o = () => {
|
|
119
119
|
let e = Math.min(1, Math.max(0, t.sample())), n = t.spectrum?.(), i = r.length;
|
|
120
120
|
if (!n?.length) {
|
|
121
121
|
let t = Date.now() / 260;
|
|
122
122
|
return Array.from({ length: i }, (n, r) => {
|
|
123
123
|
let i = .65 + .35 * Math.sin(t + r * .9);
|
|
124
|
-
return
|
|
124
|
+
return R + e * 2.4 * i;
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
let a = Math.max(1, Math.floor(n.length / 2)), o = Math.max(1, Math.floor(a / i));
|
|
128
128
|
return Array.from({ length: i }, (e, t) => {
|
|
129
129
|
let r = 0;
|
|
130
130
|
for (let e = 0; e < o; e += 1) r += n[t * o + e] ?? 0;
|
|
131
|
-
return
|
|
131
|
+
return R + r / o / 255 * 2.2;
|
|
132
132
|
});
|
|
133
133
|
}, s = () => {
|
|
134
134
|
let e = n.value?.children;
|
|
@@ -137,20 +137,20 @@ var he = {
|
|
|
137
137
|
});
|
|
138
138
|
}, c = () => {
|
|
139
139
|
let e = o();
|
|
140
|
-
r = r.map((t, n) => t + (Math.min(1, Math.max(
|
|
140
|
+
r = r.map((t, n) => t + (Math.min(1, Math.max(R, e[n] ?? R)) - t) * ve), s(), i = requestAnimationFrame(c);
|
|
141
141
|
}, l = () => {
|
|
142
142
|
i !== void 0 && (cancelAnimationFrame(i), i = void 0);
|
|
143
143
|
};
|
|
144
|
-
return
|
|
145
|
-
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() =>
|
|
146
|
-
}, { immediate: !0 }),
|
|
147
|
-
class:
|
|
144
|
+
return N(() => t.state, async (e) => {
|
|
145
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => R * 1.6), await ne(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
146
|
+
}, { immediate: !0 }), O(l), (t, r) => (k(), x("div", {
|
|
147
|
+
class: D(["pk-voice-orb", `pk-voice-orb--${e.state}`]),
|
|
148
148
|
"aria-hidden": "true"
|
|
149
|
-
}, [
|
|
149
|
+
}, [S("div", {
|
|
150
150
|
ref_key: "barsEl",
|
|
151
151
|
ref: n,
|
|
152
152
|
class: "pk-voice-orb__bars"
|
|
153
|
-
}, [(
|
|
153
|
+
}, [(k(!0), x(g, null, se(e.bars, (e) => (k(), x("span", {
|
|
154
154
|
key: e,
|
|
155
155
|
class: "pk-voice-orb__bar"
|
|
156
156
|
}))), 128))], 512)], 2));
|
|
@@ -159,14 +159,14 @@ var he = {
|
|
|
159
159
|
key: 0,
|
|
160
160
|
class: "pk-voice-session__badge",
|
|
161
161
|
"aria-hidden": "true"
|
|
162
|
-
},
|
|
162
|
+
}, z = {
|
|
163
163
|
class: "pk-voice-session__status",
|
|
164
164
|
role: "status"
|
|
165
|
-
},
|
|
165
|
+
}, B = {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "pk-voice-session__live-dot",
|
|
168
168
|
"aria-hidden": "true"
|
|
169
|
-
},
|
|
169
|
+
}, xe = ["title"], Se = ["title"], Ce = { class: "pk-voice-session__actions" }, we = /* @__PURE__ */ E({
|
|
170
170
|
__name: "PkVoiceSession",
|
|
171
171
|
props: {
|
|
172
172
|
state: {},
|
|
@@ -185,17 +185,17 @@ var he = {
|
|
|
185
185
|
"dismiss"
|
|
186
186
|
],
|
|
187
187
|
setup(e, { emit: t }) {
|
|
188
|
-
let n = e, r = t, { t: i } = de({ useScope: "global" }), a =
|
|
188
|
+
let n = e, r = t, { t: i } = de({ useScope: "global" }), a = v(() => 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 = v(() => {
|
|
189
189
|
if (n.remainingSeconds === void 0) return;
|
|
190
190
|
let e = Math.floor(n.remainingSeconds / 60), t = n.remainingSeconds % 60;
|
|
191
191
|
return `${e}:${String(t).padStart(2, "0")}`;
|
|
192
|
-
}), s =
|
|
192
|
+
}), s = v(() => n.remainingSeconds !== void 0 && n.remainingSeconds <= 30), c = v(() => !n.error && (n.state === "listening" || n.state === "speaking")), l = v(() => {
|
|
193
193
|
if (c.value) return n.state === "speaking" ? "speaking" : n.muted ? void 0 : "listening";
|
|
194
194
|
});
|
|
195
195
|
return (t, n) => {
|
|
196
|
-
let
|
|
197
|
-
return
|
|
198
|
-
e.error ? (
|
|
196
|
+
let u = h;
|
|
197
|
+
return k(), x("div", { class: D(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
198
|
+
e.error ? (k(), x("span", be, [w(u, { name: "ri:error-warning-line" })])) : (k(), y(ye, {
|
|
199
199
|
key: 1,
|
|
200
200
|
state: e.state,
|
|
201
201
|
sample: e.sample,
|
|
@@ -205,37 +205,37 @@ var he = {
|
|
|
205
205
|
"sample",
|
|
206
206
|
"spectrum"
|
|
207
207
|
])),
|
|
208
|
-
|
|
208
|
+
S("div", z, [S("span", { class: D(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (k(), x("span", B)) : b("", !0), C(" " + j(a.value), 1)], 2), e.error ? (k(), x("p", {
|
|
209
209
|
key: 0,
|
|
210
210
|
class: "pk-voice-session__detail",
|
|
211
211
|
title: e.rawError ?? e.error
|
|
212
|
-
},
|
|
213
|
-
o.value ? (
|
|
212
|
+
}, j(e.error), 9, xe)) : b("", !0)]),
|
|
213
|
+
o.value ? (k(), x("span", {
|
|
214
214
|
key: 2,
|
|
215
|
-
class:
|
|
216
|
-
title:
|
|
215
|
+
class: D(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
216
|
+
title: M(i)("hint.voiceRemaining"),
|
|
217
217
|
"aria-hidden": "true"
|
|
218
|
-
},
|
|
219
|
-
|
|
218
|
+
}, j(o.value), 11, Se)) : b("", !0),
|
|
219
|
+
S("div", Ce, [e.error ? (k(), x(g, { key: 0 }, [w(d, {
|
|
220
220
|
icon: "ri:refresh-line",
|
|
221
|
-
label:
|
|
221
|
+
label: M(i)("action.retry"),
|
|
222
222
|
onClick: n[0] ||= (e) => r("retry")
|
|
223
|
-
}, null, 8, ["label"]), e.live ? (
|
|
223
|
+
}, null, 8, ["label"]), e.live ? (k(), y(d, {
|
|
224
224
|
key: 0,
|
|
225
225
|
icon: "ri:stop-circle-line",
|
|
226
226
|
modifiers: "danger",
|
|
227
|
-
title:
|
|
228
|
-
"aria-label":
|
|
227
|
+
title: M(i)("action.hangUp"),
|
|
228
|
+
"aria-label": M(i)("action.hangUp"),
|
|
229
229
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
230
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
230
|
+
}, null, 8, ["title", "aria-label"])) : (k(), y(d, {
|
|
231
231
|
key: 1,
|
|
232
232
|
icon: "ri:close-line",
|
|
233
|
-
label:
|
|
233
|
+
label: M(i)("action.close"),
|
|
234
234
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
235
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
235
|
+
}, null, 8, ["label"]))], 64)) : (k(), x(g, { key: 1 }, [w(d, {
|
|
236
236
|
icon: e.muted ? "ri:mic-off-line" : "ri:mic-line",
|
|
237
|
-
title: e.muted ?
|
|
238
|
-
"aria-label": e.muted ?
|
|
237
|
+
title: e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
238
|
+
"aria-label": e.muted ? M(i)("action.unmute") : M(i)("action.mute"),
|
|
239
239
|
"aria-pressed": e.muted,
|
|
240
240
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
241
241
|
}, null, 8, [
|
|
@@ -243,18 +243,18 @@ var he = {
|
|
|
243
243
|
"title",
|
|
244
244
|
"aria-label",
|
|
245
245
|
"aria-pressed"
|
|
246
|
-
]),
|
|
246
|
+
]), w(d, {
|
|
247
247
|
icon: "ri:stop-circle-line",
|
|
248
248
|
modifiers: "danger",
|
|
249
|
-
title:
|
|
250
|
-
"aria-label":
|
|
249
|
+
title: M(i)("action.hangUp"),
|
|
250
|
+
"aria-label": M(i)("action.hangUp"),
|
|
251
251
|
onClick: n[4] ||= (e) => r("hang-up")
|
|
252
252
|
}, null, 8, ["title", "aria-label"])], 64))])
|
|
253
253
|
], 2);
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
}),
|
|
257
|
-
let t = ce(), n =
|
|
256
|
+
}), Te = (e) => {
|
|
257
|
+
let t = ce(), n = A("disconnected"), r = A("listening"), i = A(), o = A([]), s = A(), c = A(), l, u, d = 0, f = !1, p = () => {
|
|
258
258
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
259
259
|
}, m = (e) => {
|
|
260
260
|
let t = Date.now() + e * 1e3, n = () => {
|
|
@@ -270,7 +270,7 @@ var he = {
|
|
|
270
270
|
l = void 0;
|
|
271
271
|
let i = t.value;
|
|
272
272
|
t.value = void 0, await i?.endSession().catch(() => void 0), await h(e), n.value = "disconnected", r.value = "listening";
|
|
273
|
-
},
|
|
273
|
+
}, _ = async () => {
|
|
274
274
|
if (f || t.value || n.value === "connecting") return;
|
|
275
275
|
i.value = void 0, o.value = [], r.value = "listening", c.value = void 0, n.value = "connecting", d += 1;
|
|
276
276
|
let a = d, s = () => a === d && !f, u;
|
|
@@ -335,7 +335,7 @@ var he = {
|
|
|
335
335
|
} catch (e) {
|
|
336
336
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, S = (e) => {
|
|
339
339
|
let n = t.value;
|
|
340
340
|
if (!n) return 0;
|
|
341
341
|
try {
|
|
@@ -343,21 +343,21 @@ var he = {
|
|
|
343
343
|
} catch {
|
|
344
344
|
return 0;
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, ee = (e) => {
|
|
347
347
|
let n = t.value;
|
|
348
348
|
if (n) try {
|
|
349
349
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
350
350
|
} catch {
|
|
351
351
|
return;
|
|
352
352
|
}
|
|
353
|
-
},
|
|
353
|
+
}, C = () => {
|
|
354
354
|
let e = l;
|
|
355
355
|
l = void 0, d += 1, p(), h(e);
|
|
356
356
|
let r = t.value;
|
|
357
357
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
358
358
|
};
|
|
359
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
360
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
359
|
+
return typeof window < "u" && window.addEventListener("pagehide", C), ie(() => {
|
|
360
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", C), g();
|
|
361
361
|
}), {
|
|
362
362
|
status: n,
|
|
363
363
|
mode: r,
|
|
@@ -365,25 +365,25 @@ var he = {
|
|
|
365
365
|
transcript: o,
|
|
366
366
|
remainingSeconds: s,
|
|
367
367
|
chatId: c,
|
|
368
|
-
isActive:
|
|
369
|
-
isConnecting:
|
|
370
|
-
isSpeaking:
|
|
371
|
-
isListening:
|
|
372
|
-
start:
|
|
368
|
+
isActive: v(() => n.value === "connected" || n.value === "connecting"),
|
|
369
|
+
isConnecting: v(() => n.value === "connecting"),
|
|
370
|
+
isSpeaking: v(() => n.value === "connected" && r.value === "speaking"),
|
|
371
|
+
isListening: v(() => n.value === "connected" && r.value === "listening"),
|
|
372
|
+
start: _,
|
|
373
373
|
stop: g,
|
|
374
374
|
dismissError: y,
|
|
375
375
|
setMuted: b,
|
|
376
376
|
sendUserMessage: x,
|
|
377
|
-
readLevel:
|
|
378
|
-
readSpectrum:
|
|
377
|
+
readLevel: S,
|
|
378
|
+
readSpectrum: ee
|
|
379
379
|
};
|
|
380
|
-
},
|
|
380
|
+
}, Ee = 4e3, De = [
|
|
381
381
|
3e3,
|
|
382
382
|
5e3,
|
|
383
383
|
1e4
|
|
384
|
-
],
|
|
385
|
-
function
|
|
386
|
-
let t =
|
|
384
|
+
], Oe = 12e4, ke = 3e4;
|
|
385
|
+
function Ae(e) {
|
|
386
|
+
let t = A(null), n = A(!1), r, i = !1, a = () => {
|
|
387
387
|
clearTimeout(r), r = void 0;
|
|
388
388
|
}, o = (e, t) => {
|
|
389
389
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -400,12 +400,12 @@ function je(e) {
|
|
|
400
400
|
}
|
|
401
401
|
let r = t.value;
|
|
402
402
|
if (r) {
|
|
403
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
404
|
-
o(Math.max(
|
|
403
|
+
let e = Date.parse(r.dueAt) - Date.now() + Ee;
|
|
404
|
+
o(Math.max(Ee, e), () => l(r.wakeId, Date.now(), 0));
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
async function l(t, n, r) {
|
|
408
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
408
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= Oe ? await c() : o(De[Math.min(r, De.length - 1)], () => l(t, n, r + 1)));
|
|
409
409
|
}
|
|
410
410
|
async function u() {
|
|
411
411
|
n.value = !0;
|
|
@@ -424,9 +424,9 @@ function je(e) {
|
|
|
424
424
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
425
425
|
}
|
|
426
426
|
let m = () => p();
|
|
427
|
-
return document.addEventListener("visibilitychange", m),
|
|
428
|
-
clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p,
|
|
429
|
-
}),
|
|
427
|
+
return document.addEventListener("visibilitychange", m), N(() => t.value?.wakeId, (e) => {
|
|
428
|
+
clearInterval(f), f = void 0, e && !i && (p(), f = setInterval(p, ke));
|
|
429
|
+
}), O(() => {
|
|
430
430
|
i = !0, a(), clearInterval(f), document.removeEventListener("visibilitychange", m);
|
|
431
431
|
}), {
|
|
432
432
|
pendingWakeup: t,
|
|
@@ -438,16 +438,16 @@ function je(e) {
|
|
|
438
438
|
}
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
441
|
-
var
|
|
441
|
+
var je = { class: "pk-chatbot-view-chat__input-stage" }, Me = {
|
|
442
442
|
key: 1,
|
|
443
443
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
444
|
-
},
|
|
444
|
+
}, Ne = { class: "pk-chatbot-view-chat__agent-chip" }, Pe = {
|
|
445
445
|
key: 0,
|
|
446
446
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
447
|
-
},
|
|
447
|
+
}, Fe = {
|
|
448
448
|
key: 0,
|
|
449
449
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
450
|
-
},
|
|
450
|
+
}, Ie = 3e3, Le = 6e4, Re = 3e5, ze = 6e5, Be = /* @__PURE__ */ E({
|
|
451
451
|
__name: "PkChatbotViewChat",
|
|
452
452
|
props: {
|
|
453
453
|
agentId: {},
|
|
@@ -455,117 +455,119 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
455
455
|
userName: {}
|
|
456
456
|
},
|
|
457
457
|
emits: ["show-info", "revise"],
|
|
458
|
-
setup(a, { emit:
|
|
459
|
-
let
|
|
458
|
+
setup(a, { emit: d }) {
|
|
459
|
+
let g = T(() => import("./PkToolShowForm-B6ESvq-5.js").then((e) => e.n)), C = T(() => import("./PkToolShowContactForm-CmBLigw8.js").then((e) => e.n)), E = T(() => import("./PkToolShowSuggestedReply-Cd6VkzvJ.js").then((e) => e.n)), ne = T(() => import("./PkToolShowSources-BDvRbenn.js").then((e) => e.n)), re = T(() => import("./PkToolRequestGeolocation-DC8hSH0j.js")), ie = T(() => import("./PkToolRequestOAuthConnection-BH_-drvw.js")), ae = T(() => import("./PkToolShowLocation-BipZrvw7.js").then((e) => e.n)), se = T(() => import("./PkToolShowDiagram-dKUU5_6F.js")), ce = T(() => import("./PkToolEditSpreadsheet-B61LtERY.js")), le = T(() => import("./PkToolShareDocument-C8sPmh0k.js").then((e) => e.n)), F = a, he = d, I = r(F.agentId), { agentInterface: L, agentFileUpload: ge, agentType: R, agentVoice: ve, actions: ye, revisedAnswers: be, messages: z, chat: B, messageFeedbacks: xe, feedbackDialogMessage: Se, isFeedbackSubmitting: Ce, isFeedbackSubmitted: Ee, feedbackSubmitError: De, isLeadSubmitted: Oe, isLoadingSubmitLead: ke, submitLeadError: Be, input: Ve, inputMessagePlaceholder: He, isConversationBlocked: Ue, baseUrl: We, pendingAttachments: Ge, isAttachmentLimitReached: Ke, fileLimitError: qe, apiClient: V, isDark: Je, hostToolsPending: Ye, pageNoticeLevel: Xe, hostConfirmation: Ze, agentPageAccess: Qe, hostStepTitles: $e } = pe(I);
|
|
460
|
+
oe(c, $e);
|
|
461
|
+
let H = v(() => R.value === "reasoning" ? void 0 : ge.value), et = (e) => V.value.getMediaDownloadUrl(F.agentId, I.localChatId, e), { handleSubmit: tt, stopGeneration: nt, regenerate: rt, onUpvote: it, onDownvote: at, onFeedback: ot, onFeedbackSubmit: st, onLeadSubmit: ct, startNewChat: lt, addToolOutput: U, addToolApprovalResponse: ut, handleFileSelect: dt, clearFileLimitError: ft, refreshMessages: pt, appendMessage: mt, closePageNotice: ht, respondHostConfirmation: gt } = I, { t: W } = de({ useScope: "global" }), _t = v(() => Ye.value > 0), vt = v(() => _t.value && B.value.status === "ready" ? "streaming" : B.value.status), yt = l(() => Qe.value?.notice), bt = v(() => Xe.value ? yt.value || W(`message.pageAccessNotice.${Xe.value}`) : void 0), xt = v(() => {
|
|
460
462
|
let e = qe.value;
|
|
461
|
-
if (e) return e.reason === "per-chat" ?
|
|
462
|
-
}),
|
|
463
|
-
let t = await
|
|
463
|
+
if (e) return e.reason === "per-chat" ? W("message.fileLimitPerChat", { max: e.max }) : W("message.fileLimitPerMessage", { max: e.max });
|
|
464
|
+
}), St = l(() => L.value?.dismissableNotice), Ct = v(() => z.value.some((e) => e.role === "user")), wt = v(() => F.modifier === "fullscreen" && !Ct.value), Tt = me(L, () => F.userName), Et = ue("chatViewEl"), Dt = async (e) => (await V.value.expandSourceContext(F.agentId, e.documentId, e.chunkIndex)).content, Ot = async (e) => {
|
|
465
|
+
let t = await V.value.downloadSourceDocument(F.agentId, e);
|
|
464
466
|
window.open(t.downloadUrl, "_blank");
|
|
465
|
-
}, { isOverDropZone:
|
|
466
|
-
dataTypes: (e) => t(e,
|
|
467
|
+
}, { isOverDropZone: kt } = fe(Et, {
|
|
468
|
+
dataTypes: (e) => t(e, H.value?.allowedMimeTypes ?? []),
|
|
467
469
|
onDrop: (e) => {
|
|
468
|
-
if (
|
|
470
|
+
if (H.value?.enabled && e) for (let t of e) dt(t);
|
|
469
471
|
}
|
|
470
|
-
}),
|
|
472
|
+
}), G = A(!1), K = !1, q = A(!1), At = [
|
|
471
473
|
3e3,
|
|
472
474
|
5e3,
|
|
473
475
|
1e4
|
|
474
|
-
],
|
|
475
|
-
function
|
|
476
|
-
clearTimeout(
|
|
476
|
+
], J, Y, X = !1, jt = 0, Mt = !1;
|
|
477
|
+
function Nt() {
|
|
478
|
+
clearTimeout(J), J = void 0, Y = void 0, X = !1, jt = 0, q.value = !1;
|
|
477
479
|
}
|
|
478
|
-
function
|
|
479
|
-
|
|
480
|
-
|
|
480
|
+
function Pt(e) {
|
|
481
|
+
K || (clearTimeout(J), J = setTimeout(() => {
|
|
482
|
+
Ft();
|
|
481
483
|
}, e));
|
|
482
484
|
}
|
|
483
|
-
async function
|
|
484
|
-
if (
|
|
485
|
-
|
|
485
|
+
async function Ft() {
|
|
486
|
+
if (K || Mt) return;
|
|
487
|
+
Mt = !0;
|
|
486
488
|
let e;
|
|
487
489
|
try {
|
|
488
|
-
e = await
|
|
490
|
+
e = await pt();
|
|
489
491
|
} finally {
|
|
490
|
-
|
|
492
|
+
Mt = !1;
|
|
491
493
|
}
|
|
492
|
-
if (
|
|
493
|
-
if (e === "caught-up" && (
|
|
494
|
-
|
|
494
|
+
if (K) return;
|
|
495
|
+
if (e === "caught-up" && (q.value = !1), Z.isActive.value) {
|
|
496
|
+
Y = void 0, X = !1, jt = 0, Pt(Ie);
|
|
495
497
|
return;
|
|
496
498
|
}
|
|
497
|
-
|
|
498
|
-
let t = Date.now() -
|
|
499
|
-
if (e === "caught-up" && t >= (
|
|
500
|
-
|
|
499
|
+
Y === void 0 && (Y = Date.now(), X = !!Z.error.value);
|
|
500
|
+
let t = Date.now() - Y;
|
|
501
|
+
if (e === "caught-up" && t >= (X ? Re : Le) || t >= ze) {
|
|
502
|
+
Nt();
|
|
501
503
|
return;
|
|
502
504
|
}
|
|
503
|
-
let n =
|
|
504
|
-
|
|
505
|
+
let n = At[Math.min(jt, At.length - 1)];
|
|
506
|
+
jt += 1, Pt(n);
|
|
505
507
|
}
|
|
506
|
-
let
|
|
507
|
-
|
|
508
|
-
}, Z =
|
|
508
|
+
let It = (e = 1200) => {
|
|
509
|
+
Pt(e);
|
|
510
|
+
}, Z = Te({
|
|
509
511
|
fetchGrant: async () => {
|
|
510
|
-
let e = await
|
|
511
|
-
deviceContext:
|
|
512
|
-
externalContext:
|
|
512
|
+
let e = await V.value.createVoiceSession(F.agentId, I.localChatId, {
|
|
513
|
+
deviceContext: I.buildDeviceContext(),
|
|
514
|
+
externalContext: I.externalContext
|
|
513
515
|
});
|
|
514
|
-
return e.chatId !==
|
|
516
|
+
return e.chatId !== I.localChatId && (I.localChatId = e.chatId), e;
|
|
515
517
|
},
|
|
516
|
-
closeGrant: (e) =>
|
|
518
|
+
closeGrant: (e) => V.value.closeVoiceSession(F.agentId, e),
|
|
517
519
|
onTranscript: (e) => {
|
|
518
|
-
e.role === "user" ? (
|
|
520
|
+
e.role === "user" ? (q.value = !0, mt({
|
|
519
521
|
id: `${i}user-${n()}`,
|
|
520
522
|
role: "user",
|
|
521
523
|
parts: [{
|
|
522
524
|
type: "text",
|
|
523
525
|
text: e.text
|
|
524
526
|
}]
|
|
525
|
-
})) :
|
|
527
|
+
})) : q.value = !1;
|
|
526
528
|
},
|
|
527
529
|
onTurnEnd: () => {
|
|
528
|
-
|
|
530
|
+
It();
|
|
529
531
|
}
|
|
530
532
|
});
|
|
531
|
-
|
|
532
|
-
e && (
|
|
533
|
+
N(() => Z.error.value, (e) => {
|
|
534
|
+
e && (q.value = !1);
|
|
533
535
|
});
|
|
534
|
-
let
|
|
536
|
+
let Lt = v(() => ve.value?.enabled === !0), Rt = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), zt = v(() => {
|
|
535
537
|
let e = Z.error.value;
|
|
536
|
-
if (e) return /took too long/i.test(e) ?
|
|
537
|
-
}),
|
|
538
|
-
|
|
539
|
-
},
|
|
540
|
-
|
|
541
|
-
},
|
|
538
|
+
if (e) return /took too long/i.test(e) ? W("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? W("message.voiceNoAnswer") : W("message.voiceInterrupted");
|
|
539
|
+
}), Bt = v(() => Z.isSpeaking.value ? "output" : "input"), Vt = () => Z.readLevel(Bt.value), Ht = () => Z.readSpectrum(Bt.value), Ut = async () => {
|
|
540
|
+
G.value = !1, await Z.start(), Z.isActive.value && (Nt(), Pt(Ie));
|
|
541
|
+
}, Wt = async () => {
|
|
542
|
+
q.value = !1, await Z.stop(), !K && It(0);
|
|
543
|
+
}, Gt = () => {
|
|
542
544
|
Z.dismissError();
|
|
543
|
-
},
|
|
544
|
-
Z.dismissError(), await Z.stop(), await
|
|
545
|
-
}, Q = (e) => e?.toolCallId ?? "",
|
|
546
|
-
$(t,
|
|
545
|
+
}, Kt = async () => {
|
|
546
|
+
Z.dismissError(), await Z.stop(), await Ut();
|
|
547
|
+
}, Q = (e) => e?.toolCallId ?? "", qt = A(/* @__PURE__ */ new Set()), Jt = (e) => qt.value.has(Q(e)), Yt = A(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (qt.value = new Set(qt.value).add(Q(e)), It()), !0) : !1, Xt = (e, t, n) => {
|
|
548
|
+
$(t, o(t, n)) || U({
|
|
547
549
|
tool: e,
|
|
548
550
|
toolCallId: Q(t),
|
|
549
551
|
output: n
|
|
550
552
|
});
|
|
551
|
-
},
|
|
552
|
-
let t = e.confirmed ?
|
|
553
|
-
$({ toolCallId: e.toolCallId }, t) ?
|
|
553
|
+
}, Zt = (e) => {
|
|
554
|
+
let t = e.confirmed ? W("message.voiceConfirmed") : W("message.voiceCancelled");
|
|
555
|
+
$({ toolCallId: e.toolCallId }, t) ? qt.value.has(e.toolCallId) && (Yt.value = new Map(Yt.value).set(e.toolCallId, e.confirmed)) : U({
|
|
554
556
|
tool: "requestConfirm",
|
|
555
557
|
toolCallId: e.toolCallId,
|
|
556
558
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
557
559
|
});
|
|
558
|
-
},
|
|
559
|
-
$(e, t) || (
|
|
560
|
-
},
|
|
561
|
-
let n = t.error ?
|
|
562
|
-
$(e, n) ||
|
|
560
|
+
}, Qt = (e, t) => {
|
|
561
|
+
$(e, t) || (Ve.value = t, tt());
|
|
562
|
+
}, $t = (e, t) => {
|
|
563
|
+
let n = t.error ? W("message.voiceLocationRefused") : W("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
564
|
+
$(e, n) || U({
|
|
563
565
|
tool: "requestGeolocation",
|
|
564
566
|
toolCallId: Q(e),
|
|
565
567
|
output: t
|
|
566
568
|
});
|
|
567
|
-
},
|
|
568
|
-
$(e,
|
|
569
|
+
}, en = (e, t) => {
|
|
570
|
+
$(e, W("message.voiceConnectionDone")) || U({
|
|
569
571
|
tool: "requestOAuthConnection",
|
|
570
572
|
toolCallId: Q(e),
|
|
571
573
|
output: {
|
|
@@ -573,91 +575,91 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
573
575
|
mcpServerId: t
|
|
574
576
|
}
|
|
575
577
|
});
|
|
576
|
-
},
|
|
577
|
-
|
|
578
|
+
}, tn = () => {
|
|
579
|
+
G.value = !G.value, Z.setMuted(G.value);
|
|
578
580
|
};
|
|
579
|
-
|
|
580
|
-
|
|
581
|
+
O(() => {
|
|
582
|
+
K = !0, Nt();
|
|
581
583
|
});
|
|
582
|
-
let { pendingWakeup:
|
|
583
|
-
agentId: () =>
|
|
584
|
-
chatId: () =>
|
|
585
|
-
apiClient: () =>
|
|
586
|
-
messages: () =>
|
|
587
|
-
refreshMessages:
|
|
584
|
+
let { pendingWakeup: nn, isStopping: rn, check: an, reset: on, stop: sn } = Ae({
|
|
585
|
+
agentId: () => F.agentId,
|
|
586
|
+
chatId: () => I.localChatId,
|
|
587
|
+
apiClient: () => V.value,
|
|
588
|
+
messages: () => z.value,
|
|
589
|
+
refreshMessages: pt
|
|
588
590
|
});
|
|
589
|
-
return
|
|
590
|
-
|
|
591
|
-
}, { immediate: !0 }),
|
|
592
|
-
e === "ready" && t !== "ready" &&
|
|
591
|
+
return N([() => I.localChatId, Ct], ([, e]) => {
|
|
592
|
+
on(), e && an();
|
|
593
|
+
}, { immediate: !0 }), N(() => B.value.status, (e, t) => {
|
|
594
|
+
e === "ready" && t !== "ready" && Ct.value && an();
|
|
593
595
|
}), (t, n) => {
|
|
594
|
-
let r =
|
|
595
|
-
return
|
|
596
|
+
let r = h;
|
|
597
|
+
return k(), x("div", {
|
|
596
598
|
ref_key: "chatViewEl",
|
|
597
|
-
ref:
|
|
598
|
-
class:
|
|
599
|
-
"pk-chatbot-view-chat--dragover":
|
|
600
|
-
"pk-chatbot-view-chat--empty":
|
|
599
|
+
ref: Et,
|
|
600
|
+
class: D(["pk-chatbot-view-chat", {
|
|
601
|
+
"pk-chatbot-view-chat--dragover": M(kt) && H.value?.enabled,
|
|
602
|
+
"pk-chatbot-view-chat--empty": wt.value
|
|
601
603
|
}])
|
|
602
604
|
}, [
|
|
603
|
-
|
|
605
|
+
w(_, {
|
|
604
606
|
name: "pk-chatbot-view-chat-fade",
|
|
605
607
|
mode: "out-in"
|
|
606
608
|
}, {
|
|
607
|
-
default:
|
|
609
|
+
default: P(() => [wt.value ? (k(), y(p, {
|
|
608
610
|
key: 0,
|
|
609
|
-
greeting:
|
|
610
|
-
logo:
|
|
611
|
-
name:
|
|
611
|
+
greeting: M(Tt),
|
|
612
|
+
logo: M(L)?.logo,
|
|
613
|
+
name: M(I).name
|
|
612
614
|
}, null, 8, [
|
|
613
615
|
"greeting",
|
|
614
616
|
"logo",
|
|
615
617
|
"name"
|
|
616
|
-
])) : (
|
|
618
|
+
])) : (k(), y(e, {
|
|
617
619
|
key: 1,
|
|
618
620
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
619
621
|
interactive: "",
|
|
620
|
-
messages:
|
|
621
|
-
"confirm-verdicts-on-call":
|
|
622
|
-
status:
|
|
623
|
-
error:
|
|
624
|
-
"main-color":
|
|
625
|
-
"text-color":
|
|
626
|
-
"revised-answers":
|
|
627
|
-
actions:
|
|
628
|
-
"message-feedbacks":
|
|
629
|
-
"feedback-message-id":
|
|
630
|
-
"feedback-loading":
|
|
631
|
-
"feedback-submitted":
|
|
632
|
-
"feedback-error":
|
|
633
|
-
"show-extended-steps":
|
|
634
|
-
"awaiting-spoken-answer":
|
|
635
|
-
"host-working":
|
|
636
|
-
"host-confirmation":
|
|
637
|
-
"is-dark":
|
|
622
|
+
messages: M(z),
|
|
623
|
+
"confirm-verdicts-on-call": Yt.value,
|
|
624
|
+
status: M(B).status,
|
|
625
|
+
error: M(B).error,
|
|
626
|
+
"main-color": M(L)?.mainColor,
|
|
627
|
+
"text-color": M(L)?.textColor,
|
|
628
|
+
"revised-answers": M(be),
|
|
629
|
+
actions: M(ye),
|
|
630
|
+
"message-feedbacks": M(xe),
|
|
631
|
+
"feedback-message-id": M(Se)?.id,
|
|
632
|
+
"feedback-loading": M(Ce),
|
|
633
|
+
"feedback-submitted": M(Ee),
|
|
634
|
+
"feedback-error": M(De),
|
|
635
|
+
"show-extended-steps": M(L)?.showExtendedSteps,
|
|
636
|
+
"awaiting-spoken-answer": q.value,
|
|
637
|
+
"host-working": _t.value,
|
|
638
|
+
"host-confirmation": M(Ze),
|
|
639
|
+
"is-dark": M(Je),
|
|
638
640
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
639
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
640
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
641
|
-
onRegenerate:
|
|
642
|
-
onAutoRetry:
|
|
643
|
-
onResetChat:
|
|
641
|
+
onFeedbackSubmit: n[0] ||= (e) => M(st)(e),
|
|
642
|
+
onFeedbackClose: n[1] ||= (e) => Se.value = void 0,
|
|
643
|
+
onRegenerate: M(rt),
|
|
644
|
+
onAutoRetry: M(rt),
|
|
645
|
+
onResetChat: M(lt),
|
|
644
646
|
onShowInfo: n[2] ||= (e) => he("show-info", e),
|
|
645
647
|
onRevise: n[3] ||= (e) => he("revise", e),
|
|
646
|
-
onUpvote:
|
|
647
|
-
onDownvote:
|
|
648
|
-
onFeedback:
|
|
649
|
-
onApprovalRespond:
|
|
650
|
-
onConfirmRespond:
|
|
651
|
-
onHostConfirmRespond:
|
|
648
|
+
onUpvote: M(it),
|
|
649
|
+
onDownvote: M(at),
|
|
650
|
+
onFeedback: M(ot),
|
|
651
|
+
onApprovalRespond: M(ut),
|
|
652
|
+
onConfirmRespond: Zt,
|
|
653
|
+
onHostConfirmRespond: M(gt)
|
|
652
654
|
}, {
|
|
653
|
-
"tool-showContactForm":
|
|
655
|
+
"tool-showContactForm": P(({ part: e }) => [w(M(C), {
|
|
654
656
|
part: e,
|
|
655
|
-
readonly: !
|
|
656
|
-
submitted:
|
|
657
|
-
loading:
|
|
658
|
-
error:
|
|
659
|
-
"privacy-policy-notice":
|
|
660
|
-
onSubmit:
|
|
657
|
+
readonly: !M(We),
|
|
658
|
+
submitted: M(Oe),
|
|
659
|
+
loading: M(ke),
|
|
660
|
+
error: M(Be),
|
|
661
|
+
"privacy-policy-notice": M(L)?.privacyPolicyNotice,
|
|
662
|
+
onSubmit: M(ct)
|
|
661
663
|
}, null, 8, [
|
|
662
664
|
"part",
|
|
663
665
|
"readonly",
|
|
@@ -667,20 +669,20 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
667
669
|
"privacy-policy-notice",
|
|
668
670
|
"onSubmit"
|
|
669
671
|
])]),
|
|
670
|
-
"tool-showSuggestedReply":
|
|
672
|
+
"tool-showSuggestedReply": P(({ part: e }) => [w(M(E), {
|
|
671
673
|
part: e,
|
|
672
|
-
onSelect: (t) =>
|
|
674
|
+
onSelect: (t) => Qt(e, t)
|
|
673
675
|
}, null, 8, ["part", "onSelect"])]),
|
|
674
|
-
"tool-showSources":
|
|
676
|
+
"tool-showSources": P(({ part: e }) => [w(M(ne), {
|
|
675
677
|
part: e,
|
|
676
|
-
"on-expand-context":
|
|
677
|
-
"on-download":
|
|
678
|
+
"on-expand-context": Dt,
|
|
679
|
+
"on-download": Ot
|
|
678
680
|
}, null, 8, ["part"])]),
|
|
679
|
-
"tool-showForm":
|
|
680
|
-
default:
|
|
681
|
+
"tool-showForm": P(({ part: e }) => [w(_, { mode: "out-in" }, {
|
|
682
|
+
default: P(() => [w(M(g), {
|
|
681
683
|
part: e,
|
|
682
|
-
answered:
|
|
683
|
-
onSelect: (t) =>
|
|
684
|
+
answered: Jt(e),
|
|
685
|
+
onSelect: (t) => Xt("showForm", e, t)
|
|
684
686
|
}, null, 8, [
|
|
685
687
|
"part",
|
|
686
688
|
"answered",
|
|
@@ -688,12 +690,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
688
690
|
])]),
|
|
689
691
|
_: 2
|
|
690
692
|
}, 1024)]),
|
|
691
|
-
"tool-showMultipleChoice":
|
|
692
|
-
default:
|
|
693
|
+
"tool-showMultipleChoice": P(({ part: e }) => [w(_, { mode: "out-in" }, {
|
|
694
|
+
default: P(() => [w(M(g), {
|
|
693
695
|
part: e,
|
|
694
696
|
"allow-custom-answer": "",
|
|
695
|
-
answered:
|
|
696
|
-
onSelect: (t) =>
|
|
697
|
+
answered: Jt(e),
|
|
698
|
+
onSelect: (t) => Xt("showMultipleChoice", e, t)
|
|
697
699
|
}, null, 8, [
|
|
698
700
|
"part",
|
|
699
701
|
"answered",
|
|
@@ -701,12 +703,12 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
701
703
|
])]),
|
|
702
704
|
_: 2
|
|
703
705
|
}, 1024)]),
|
|
704
|
-
"tool-requestOAuthConnection":
|
|
706
|
+
"tool-requestOAuthConnection": P(({ part: e }) => [w(M(ie), {
|
|
705
707
|
part: e,
|
|
706
|
-
"backend-url":
|
|
707
|
-
"resolve-connection": (e) =>
|
|
708
|
-
"check-connection": (e) =>
|
|
709
|
-
onConnected: (t) =>
|
|
708
|
+
"backend-url": M(We),
|
|
709
|
+
"resolve-connection": (e) => M(V).getOAuthAuthorizeUrl(F.agentId, e),
|
|
710
|
+
"check-connection": (e) => M(V).getOAuthConnectionStatus(F.agentId, e),
|
|
711
|
+
onConnected: (t) => en(e, t)
|
|
710
712
|
}, null, 8, [
|
|
711
713
|
"part",
|
|
712
714
|
"backend-url",
|
|
@@ -714,94 +716,94 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
714
716
|
"check-connection",
|
|
715
717
|
"onConnected"
|
|
716
718
|
])]),
|
|
717
|
-
"tool-requestGeolocation":
|
|
719
|
+
"tool-requestGeolocation": P(({ part: e }) => [w(M(re), {
|
|
718
720
|
part: e,
|
|
719
|
-
"call-live":
|
|
720
|
-
"reverse-geocode": (e, t) =>
|
|
721
|
-
onResult: (t) =>
|
|
721
|
+
"call-live": M(Z).isActive.value,
|
|
722
|
+
"reverse-geocode": (e, t) => M(V).reverseGeocode(e, t),
|
|
723
|
+
onResult: (t) => $t(e, t)
|
|
722
724
|
}, null, 8, [
|
|
723
725
|
"part",
|
|
724
726
|
"call-live",
|
|
725
727
|
"reverse-geocode",
|
|
726
728
|
"onResult"
|
|
727
729
|
])]),
|
|
728
|
-
"tool-showLocation":
|
|
730
|
+
"tool-showLocation": P(({ part: e }) => [w(M(ae), {
|
|
729
731
|
part: e,
|
|
730
|
-
"is-dark":
|
|
731
|
-
"main-color":
|
|
732
|
-
"forward-geocode": (e, t) =>
|
|
732
|
+
"is-dark": M(Je),
|
|
733
|
+
"main-color": M(L)?.mainColor,
|
|
734
|
+
"forward-geocode": (e, t) => M(V).forwardGeocode(e, t)
|
|
733
735
|
}, null, 8, [
|
|
734
736
|
"part",
|
|
735
737
|
"is-dark",
|
|
736
738
|
"main-color",
|
|
737
739
|
"forward-geocode"
|
|
738
740
|
])]),
|
|
739
|
-
"tool-showDiagram":
|
|
741
|
+
"tool-showDiagram": P(({ part: e }) => [w(M(se), {
|
|
740
742
|
part: e,
|
|
741
|
-
"is-dark":
|
|
743
|
+
"is-dark": M(Je)
|
|
742
744
|
}, null, 8, ["part", "is-dark"])]),
|
|
743
|
-
"tool-editSpreadsheet":
|
|
744
|
-
key:
|
|
745
|
+
"tool-editSpreadsheet": P(({ part: e }) => [(k(), y(M(ce), {
|
|
746
|
+
key: M(s)(e),
|
|
745
747
|
part: e,
|
|
746
|
-
"file-url":
|
|
748
|
+
"file-url": et
|
|
747
749
|
}, null, 8, ["part"]))]),
|
|
748
|
-
"tool-shareDocument":
|
|
749
|
-
key:
|
|
750
|
+
"tool-shareDocument": P(({ part: e }) => [(k(), y(M(le), {
|
|
751
|
+
key: M(s)(e),
|
|
750
752
|
part: e,
|
|
751
|
-
"on-download":
|
|
753
|
+
"on-download": Ot
|
|
752
754
|
}, null, 8, ["part"]))]),
|
|
753
755
|
_: 1
|
|
754
756
|
}, 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.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
755
757
|
_: 1
|
|
756
758
|
}),
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
default:
|
|
759
|
+
S("div", je, [
|
|
760
|
+
w(_, { name: "pk-chatbot-view-chat-fade" }, {
|
|
761
|
+
default: P(() => [wt.value ? (k(), y(_e, {
|
|
760
762
|
key: 0,
|
|
761
763
|
class: "pk-chatbot-view-chat__aurora",
|
|
762
764
|
"source-selector": ".pk-chatbot-input__form"
|
|
763
|
-
})) :
|
|
765
|
+
})) : b("", !0)]),
|
|
764
766
|
_: 1
|
|
765
767
|
}),
|
|
766
|
-
|
|
768
|
+
M(nn) && !M(Ue) ? (k(), y(m, {
|
|
767
769
|
key: 0,
|
|
768
|
-
pending:
|
|
769
|
-
stopping:
|
|
770
|
-
onStop:
|
|
770
|
+
pending: M(nn),
|
|
771
|
+
stopping: M(rn),
|
|
772
|
+
onStop: M(sn)
|
|
771
773
|
}, null, 8, [
|
|
772
774
|
"pending",
|
|
773
775
|
"stopping",
|
|
774
776
|
"onStop"
|
|
775
|
-
])) :
|
|
776
|
-
|
|
777
|
+
])) : b("", !0),
|
|
778
|
+
M(Ue) ? (k(), x("div", Me, j(M(W)("message.chatErrorConversationBlocked")), 1)) : Rt.value === "idle" ? (k(), y(f, {
|
|
777
779
|
key: 3,
|
|
778
|
-
modelValue:
|
|
779
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
780
|
-
"pending-attachments":
|
|
781
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
782
|
-
placeholder:
|
|
783
|
-
"dismissable-notice":
|
|
784
|
-
"page-notice":
|
|
785
|
-
status:
|
|
786
|
-
"max-message-length":
|
|
787
|
-
"file-upload":
|
|
788
|
-
"attachment-limit-reached":
|
|
789
|
-
"attachment-notice":
|
|
790
|
-
"voice-enabled":
|
|
791
|
-
onStopGeneration:
|
|
792
|
-
onSubmit:
|
|
793
|
-
onFileSelect:
|
|
794
|
-
onDismissAttachmentNotice:
|
|
795
|
-
onDismissPageNotice:
|
|
796
|
-
onVoiceStart:
|
|
780
|
+
modelValue: M(Ve),
|
|
781
|
+
"onUpdate:modelValue": n[4] ||= (e) => te(Ve) ? Ve.value = e : null,
|
|
782
|
+
"pending-attachments": M(Ge),
|
|
783
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => te(Ge) ? Ge.value = e : null,
|
|
784
|
+
placeholder: M(He),
|
|
785
|
+
"dismissable-notice": M(St) && M(B).messages.length <= 1 ? M(St) : void 0,
|
|
786
|
+
"page-notice": bt.value,
|
|
787
|
+
status: vt.value,
|
|
788
|
+
"max-message-length": M(L)?.maxMessageLength,
|
|
789
|
+
"file-upload": H.value,
|
|
790
|
+
"attachment-limit-reached": M(Ke),
|
|
791
|
+
"attachment-notice": xt.value,
|
|
792
|
+
"voice-enabled": Lt.value,
|
|
793
|
+
onStopGeneration: M(nt),
|
|
794
|
+
onSubmit: M(tt),
|
|
795
|
+
onFileSelect: M(dt),
|
|
796
|
+
onDismissAttachmentNotice: M(ft),
|
|
797
|
+
onDismissPageNotice: M(ht),
|
|
798
|
+
onVoiceStart: Ut
|
|
797
799
|
}, ee({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
798
800
|
name: "prepend",
|
|
799
|
-
fn:
|
|
801
|
+
fn: P(() => [S("span", Ne, [w(u, {
|
|
800
802
|
modifiers: "surface",
|
|
801
803
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
802
|
-
"img-src":
|
|
803
|
-
name:
|
|
804
|
-
}, null, 8, ["img-src", "name"]),
|
|
804
|
+
"img-src": M(L)?.logo,
|
|
805
|
+
name: M(I).name
|
|
806
|
+
}, null, 8, ["img-src", "name"]), M(I).name ? (k(), x("strong", Pe, j(M(I).name), 1)) : b("", !0)])]),
|
|
805
807
|
key: "0"
|
|
806
808
|
} : void 0]), 1032, [
|
|
807
809
|
"modelValue",
|
|
@@ -820,21 +822,21 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
820
822
|
"onFileSelect",
|
|
821
823
|
"onDismissAttachmentNotice",
|
|
822
824
|
"onDismissPageNotice"
|
|
823
|
-
])) : (
|
|
825
|
+
])) : (k(), y(we, {
|
|
824
826
|
key: 2,
|
|
825
|
-
state:
|
|
826
|
-
sample:
|
|
827
|
-
spectrum:
|
|
828
|
-
"remaining-seconds":
|
|
829
|
-
muted:
|
|
830
|
-
error:
|
|
831
|
-
"raw-error":
|
|
832
|
-
live:
|
|
827
|
+
state: Rt.value,
|
|
828
|
+
sample: Vt,
|
|
829
|
+
spectrum: Ht,
|
|
830
|
+
"remaining-seconds": M(Z).remainingSeconds.value,
|
|
831
|
+
muted: G.value,
|
|
832
|
+
error: zt.value,
|
|
833
|
+
"raw-error": M(Z).error.value,
|
|
834
|
+
live: M(Z).isActive.value,
|
|
833
835
|
class: "pk-chatbot-view-chat__voice",
|
|
834
|
-
onToggleMute:
|
|
835
|
-
onHangUp:
|
|
836
|
-
onRetry:
|
|
837
|
-
onDismiss:
|
|
836
|
+
onToggleMute: tn,
|
|
837
|
+
onHangUp: Wt,
|
|
838
|
+
onRetry: Kt,
|
|
839
|
+
onDismiss: Gt
|
|
838
840
|
}, null, 8, [
|
|
839
841
|
"state",
|
|
840
842
|
"remaining-seconds",
|
|
@@ -844,11 +846,11 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
844
846
|
"live"
|
|
845
847
|
]))
|
|
846
848
|
]),
|
|
847
|
-
|
|
848
|
-
default:
|
|
849
|
+
w(_, null, {
|
|
850
|
+
default: P(() => [M(kt) && H.value?.enabled ? (k(), x("div", Fe, [w(r, {
|
|
849
851
|
name: "ri:upload-cloud-2-line",
|
|
850
852
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
851
|
-
}),
|
|
853
|
+
}), S("span", null, j(M(W)("action.dropFile")), 1)])) : b("", !0)]),
|
|
852
854
|
_: 1
|
|
853
855
|
})
|
|
854
856
|
], 2);
|
|
@@ -856,6 +858,6 @@ var Me = { class: "pk-chatbot-view-chat__input-stage" }, Ne = {
|
|
|
856
858
|
}
|
|
857
859
|
});
|
|
858
860
|
//#endregion
|
|
859
|
-
export { _e as i,
|
|
861
|
+
export { _e as i, we as n, ye as r, Be as t };
|
|
860
862
|
|
|
861
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
863
|
+
//# sourceMappingURL=PkChatbotViewChat-BI_PtT72.js.map
|