@8wave/ai-elements 0.123.0-beta.11 → 0.123.0-beta.12
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 +30 -3
- package/dist/_chunks/{Agent-C0JtGK2t.js → Agent-CsSvagZw.js} +13 -2
- package/dist/_chunks/Agent-CsSvagZw.js.map +1 -0
- package/dist/_chunks/{PkStreamingMarkdown-DGdyf4_3.js → PkStreamingMarkdown-ReRKQNAO.js} +3 -3
- package/dist/_chunks/{PkStreamingMarkdown-DGdyf4_3.js.map → PkStreamingMarkdown-ReRKQNAO.js.map} +1 -1
- package/dist/_chunks/{PkToolChatFile-NrOBCzk2.js → PkToolChatFile-QJi6bOuS.js} +2 -2
- package/dist/_chunks/{PkToolChatFile-NrOBCzk2.js.map → PkToolChatFile-QJi6bOuS.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestGeolocation-BIfpxvX5.js → PkToolRequestGeolocation-CUjRsNs9.js} +2 -2
- package/dist/_chunks/{PkToolRequestGeolocation-BIfpxvX5.js.map → PkToolRequestGeolocation-CUjRsNs9.js.map} +1 -1
- package/dist/_chunks/{PkToolRequestOAuthConnection-CJgoiSgi.js → PkToolRequestOAuthConnection-CbxVIAPg.js} +2 -2
- package/dist/_chunks/{PkToolRequestOAuthConnection-CJgoiSgi.js.map → PkToolRequestOAuthConnection-CbxVIAPg.js.map} +1 -1
- package/dist/_chunks/{PkToolShowArtifact-DmZEQMSm.js → PkToolShowArtifact-D0HZ_qWx.js} +2 -2
- package/dist/_chunks/{PkToolShowArtifact-DmZEQMSm.js.map → PkToolShowArtifact-D0HZ_qWx.js.map} +1 -1
- package/dist/_chunks/{PkToolShowContactForm-BaX3d5Yq.js → PkToolShowContactForm-DkJB0EO1.js} +2 -2
- package/dist/_chunks/{PkToolShowContactForm-BaX3d5Yq.js.map → PkToolShowContactForm-DkJB0EO1.js.map} +1 -1
- package/dist/_chunks/{PkToolShowForm-BKyZnpPB.js → PkToolShowForm-zAprG0yl.js} +3 -3
- package/dist/_chunks/{PkToolShowForm-BKyZnpPB.js.map → PkToolShowForm-zAprG0yl.js.map} +1 -1
- package/dist/_chunks/{PkToolShowImageGallery-GBaXxucK.js → PkToolShowImageGallery-o62SZ6tq.js} +2 -2
- package/dist/_chunks/{PkToolShowImageGallery-GBaXxucK.js.map → PkToolShowImageGallery-o62SZ6tq.js.map} +1 -1
- package/dist/_chunks/{PkToolShowProductList-DBVtBJXU.js → PkToolShowProductList-CWLxVreB.js} +2 -2
- package/dist/_chunks/{PkToolShowProductList-DBVtBJXU.js.map → PkToolShowProductList-CWLxVreB.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSources-Ciuizdl3.js → PkToolShowSources-dJEqZn6T.js} +3 -3
- package/dist/_chunks/{PkToolShowSources-Ciuizdl3.js.map → PkToolShowSources-dJEqZn6T.js.map} +1 -1
- package/dist/_chunks/{PkToolShowSuggestedReply-Dbti20SV.js → PkToolShowSuggestedReply-BHAltyxH.js} +2 -2
- package/dist/_chunks/{PkToolShowSuggestedReply-Dbti20SV.js.map → PkToolShowSuggestedReply-BHAltyxH.js.map} +1 -1
- package/dist/_chunks/{PkToolShowVideo-DKDR3zmI.js → PkToolShowVideo-DtJ0nEJk.js} +2 -2
- package/dist/_chunks/{PkToolShowVideo-DKDR3zmI.js.map → PkToolShowVideo-DtJ0nEJk.js.map} +1 -1
- package/dist/_chunks/{PkToolShowWebPages-CuJ12tdE.js → PkToolShowWebPages-D-tG9JH8.js} +2 -2
- package/dist/_chunks/{PkToolShowWebPages-CuJ12tdE.js.map → PkToolShowWebPages-D-tG9JH8.js.map} +1 -1
- package/dist/_chunks/{chatImagePolicy-D3zIP7-i.js → chatImagePolicy-Dhxqcirq.js} +2 -2
- package/dist/_chunks/{chatImagePolicy-D3zIP7-i.js.map → chatImagePolicy-Dhxqcirq.js.map} +1 -1
- package/dist/_chunks/{markdown-BxOlM5SY.js → markdown-CUaXq5OY.js} +2 -2
- package/dist/_chunks/{markdown-BxOlM5SY.js.map → markdown-CUaXq5OY.js.map} +1 -1
- package/dist/ai-elements.es.js +2720 -2269
- 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-Dsi_xGvV.js → Agent-D3US-D1x.js} +13 -2
- package/dist-vue/_chunks/Agent-D3US-D1x.js.map +1 -0
- package/dist-vue/_chunks/{Document-B5R1PJnc.js → Document-D5FVOcP9.js} +2 -2
- package/dist-vue/_chunks/{Document-B5R1PJnc.js.map → Document-D5FVOcP9.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbot-CBpViucq.js → PkChatbot-DxPT26Vn.js} +8 -8
- package/dist-vue/_chunks/{PkChatbot-CBpViucq.js.map → PkChatbot-DxPT26Vn.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotEmptyState-DKrmLdVU.js → PkChatbotEmptyState-3VeE3lFA.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotEmptyState-DKrmLdVU.js.map → PkChatbotEmptyState-3VeE3lFA.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotInput-C1i14Ur_.js → PkChatbotInput-SWQVz3m7.js} +212 -175
- package/dist-vue/_chunks/PkChatbotInput-SWQVz3m7.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-Ce8h0QNX.js → PkChatbotMessages-DFimKbCj.js} +122 -114
- package/dist-vue/_chunks/PkChatbotMessages-DFimKbCj.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotStepPayload-Dp_akrQu.js → PkChatbotStepPayload-Di0FNaTC.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotStepPayload-Dp_akrQu.js.map → PkChatbotStepPayload-Di0FNaTC.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CKxl4_lQ.js → PkChatbotStepToolDetail-Bne48uS8.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotStepToolDetail-CKxl4_lQ.js.map → PkChatbotStepToolDetail-Bne48uS8.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotSteps-ChaHkHjG.js → PkChatbotSteps-Cr9nwMQj.js} +5 -5
- package/dist-vue/_chunks/{PkChatbotSteps-ChaHkHjG.js.map → PkChatbotSteps-Cr9nwMQj.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-Bjw6x7VD.js → PkChatbotViewChat-CQy-k_dp.js} +417 -404
- package/dist-vue/_chunks/PkChatbotViewChat-CQy-k_dp.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewConversations-D-UK4paq.js → PkChatbotViewConversations-Bng-dyqd.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewConversations-D-UK4paq.js.map → PkChatbotViewConversations-Bng-dyqd.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-57kQRbZm.js → PkChatbotViewFiles-Ccti1JAS.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewFiles-57kQRbZm.js.map → PkChatbotViewFiles-Ccti1JAS.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-BZTify2Q.js → PkChatbotViewProfile-ChEItAHZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-BZTify2Q.js.map → PkChatbotViewProfile-ChEItAHZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkStreamingMarkdown-4Ez-DDFq.js → PkStreamingMarkdown-92GXUXrG.js} +3 -3
- package/dist-vue/_chunks/{PkStreamingMarkdown-4Ez-DDFq.js.map → PkStreamingMarkdown-92GXUXrG.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolChatFile-DaivFIhK.js → PkToolChatFile-Ca45de6q.js} +2 -2
- package/dist-vue/_chunks/{PkToolChatFile-DaivFIhK.js.map → PkToolChatFile-Ca45de6q.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestGeolocation-B__wk6m3.js → PkToolRequestGeolocation-gEDbmudT.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestGeolocation-B__wk6m3.js.map → PkToolRequestGeolocation-gEDbmudT.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BAttadSC.js → PkToolRequestOAuthConnection-Dy0GXNwC.js} +2 -2
- package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BAttadSC.js.map → PkToolRequestOAuthConnection-Dy0GXNwC.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowArtifact-CncSr7Z8.js → PkToolShowArtifact-B-BUIMju.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowArtifact-CncSr7Z8.js.map → PkToolShowArtifact-B-BUIMju.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowContactForm-Bi5N1fFe.js → PkToolShowContactForm-NRfvmPLV.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowContactForm-Bi5N1fFe.js.map → PkToolShowContactForm-NRfvmPLV.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-D8NF9lZu.js → PkToolShowDiagram-VTi8vwcN.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-D8NF9lZu.js.map → PkToolShowDiagram-VTi8vwcN.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowForm-Dmyn6cMU.js → PkToolShowForm-C4JnalBU.js} +4 -4
- package/dist-vue/_chunks/{PkToolShowForm-Dmyn6cMU.js.map → PkToolShowForm-C4JnalBU.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowImageGallery-XZiRk6FK.js → PkToolShowImageGallery-ORfqyhhh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowImageGallery-XZiRk6FK.js.map → PkToolShowImageGallery-ORfqyhhh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowProductList-DzvPUdbo.js → PkToolShowProductList-C9kbfutK.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowProductList-DzvPUdbo.js.map → PkToolShowProductList-C9kbfutK.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-NOSBkQCi.js → PkToolShowSources-BVfcp1iE.js} +3 -3
- package/dist-vue/_chunks/{PkToolShowSources-NOSBkQCi.js.map → PkToolShowSources-BVfcp1iE.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-C7dUB3dz.js → PkToolShowSuggestedReply-Bb7Inxa4.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowSuggestedReply-C7dUB3dz.js.map → PkToolShowSuggestedReply-Bb7Inxa4.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowVideo-sSZyISJH.js → PkToolShowVideo-CUNITpHh.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowVideo-sSZyISJH.js.map → PkToolShowVideo-CUNITpHh.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowWebPages-B1c4X_cH.js → PkToolShowWebPages-C-yl2smm.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowWebPages-B1c4X_cH.js.map → PkToolShowWebPages-C-yl2smm.js.map} +1 -1
- package/dist-vue/_chunks/{createChatbotApiClient-BmBo5IQR.js → createChatbotApiClient-CuqGJGHD.js} +2 -2
- package/dist-vue/_chunks/createChatbotApiClient-CuqGJGHD.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-D7ZMA7Tr.js → useChatbotStore-C1lW6qXE.js} +1143 -1134
- package/dist-vue/_chunks/useChatbotStore-C1lW6qXE.js.map +1 -0
- package/dist-vue/_chunks/{utils-CKsn0vxx.js → utils-CoLdYTZq.js} +2 -2
- package/dist-vue/_chunks/{utils-CKsn0vxx.js.map → utils-CoLdYTZq.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +4 -4
- package/dist-vue/apps/web-component/src/composables/useChatbotAgent.d.ts +2 -0
- package/dist-vue/apps/web-component/src/composables/useChatbotAuth.d.ts +3 -3
- package/dist-vue/apps/web-component/src/composables/usePagePointer.d.ts +50 -0
- package/dist-vue/apps/web-component/src/composables/usePageTools.d.ts +21 -0
- package/dist-vue/apps/web-component/src/pageTools/index.d.ts +8 -1
- package/dist-vue/apps/web-component/src/pageTools/pointing.d.ts +41 -0
- package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +2 -0
- package/dist-vue/composables.js +24 -8
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +47 -30
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/locales.js +20 -0
- package/dist-vue/packages/components/src/chat/PkAgentPageAccessSettings.d.ts +2 -0
- package/dist-vue/packages/components/src/chat/PkAgentSettingsPanel.d.ts +2 -0
- package/dist-vue/packages/components/src/chat/PkChatbotInput.d.ts +16 -3
- package/dist-vue/packages/components/src/chat/PkPagePointer.d.ts +41 -0
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +150 -6
- package/dist-vue/packages/models/src/schema/Agent.d.ts +7 -0
- package/dist-vue/packages/models/src/schema/Chat.d.ts +8 -0
- package/dist-vue/packages/models/src/schema/PageAccess.d.ts +29 -1
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +2 -0
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/Agent-C0JtGK2t.js.map +0 -1
- package/dist-vue/_chunks/Agent-Dsi_xGvV.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotInput-C1i14Ur_.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-Ce8h0QNX.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotViewChat-Bjw6x7VD.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-BmBo5IQR.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore-D7ZMA7Tr.js.map +0 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { t as e } from "./PkChatbotMessages-
|
|
1
|
+
import { t as e } from "./PkChatbotMessages-DFimKbCj.js";
|
|
2
2
|
import { o as t } from "./Media-DylqhvaF.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-C1lW6qXE.js";
|
|
4
4
|
import { n as a } from "./src-j7iLdNe4.js";
|
|
5
|
-
import { c as o, h as s, n as c } from "./utils-
|
|
5
|
+
import { c as o, h as s, n as c } from "./utils-CoLdYTZq.js";
|
|
6
6
|
import { t as l } from "./useLocalizedString-Dmn92nix.js";
|
|
7
7
|
import { t as u } from "./PkAvatar-DwtZWSW4.js";
|
|
8
|
-
import { n as d, t as f } from "./PkChatbotInput-
|
|
8
|
+
import { n as d, t as f } from "./PkChatbotInput-SWQVz3m7.js";
|
|
9
9
|
import { t as p } from "./PkChatbotQueuedMessages-CIJFAvE2.js";
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { VvIcon as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useI18n as
|
|
15
|
-
import { useDropZone as
|
|
16
|
-
import { storeToRefs as
|
|
10
|
+
import { t as ee } from "./PkChatbotEmptyState-3VeE3lFA.js";
|
|
11
|
+
import { t as m } from "./PkChatbotWakeupBar-DEP-d-Fp.js";
|
|
12
|
+
import { VvIcon as h } from "@volverjs/ui-vue/components";
|
|
13
|
+
import { Fragment as g, Transition as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as te, createTextVNode as ne, createVNode as C, defineAsyncComponent as w, defineComponent as T, isRef as re, nextTick as ie, normalizeClass as E, onBeforeUnmount as ae, onMounted as oe, onScopeDispose as se, onUnmounted as ce, openBlock as D, provide as le, ref as O, renderList as ue, shallowRef as k, toDisplayString as A, toValue as de, unref as j, useTemplateRef as fe, watch as M, withCtx as N } from "vue";
|
|
14
|
+
import { useI18n as pe } from "vue-i18n";
|
|
15
|
+
import { useDropZone as me, useElementSize as he } from "@vueuse/core";
|
|
16
|
+
import { storeToRefs as ge } from "pinia";
|
|
17
17
|
// ../../packages/composable/src/chatbot/useGreeting.ts
|
|
18
|
-
function ge(e, t) {
|
|
19
|
-
let { locale: n, t: r, te: i } = fe({ useScope: "global" });
|
|
20
|
-
return y(() => _e(ue(e)?.greeting?.[0]?.[n.value] ?? "", ue(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
21
|
-
}
|
|
22
18
|
function _e(e, t) {
|
|
19
|
+
let { locale: n, t: r, te: i } = pe({ useScope: "global" });
|
|
20
|
+
return v(() => ve(de(e)?.greeting?.[0]?.[n.value] ?? "", de(t)) || (i("message.defaultAgentWelcome") ? r("message.defaultAgentWelcome") : ""));
|
|
21
|
+
}
|
|
22
|
+
function ve(e, t) {
|
|
23
23
|
return (t ? e.replace(/\{name\}/g, t) : e.replace(/[,\s]*\{name\}[!?]?/g, "")).trim();
|
|
24
24
|
}
|
|
25
25
|
// ../../packages/components/src/chat/PkAuroraCanvas.vue?vue&type=script&setup=true&lang.ts
|
|
26
|
-
var
|
|
26
|
+
var ye = {
|
|
27
27
|
class: "pk-aurora",
|
|
28
28
|
"aria-hidden": "true"
|
|
29
|
-
},
|
|
29
|
+
}, P = {
|
|
30
30
|
key: 1,
|
|
31
31
|
class: "pk-aurora__fallback"
|
|
32
|
-
},
|
|
32
|
+
}, be = "\nattribute vec2 a_position;\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n}", F = "\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}", xe = /* @__PURE__ */ T({
|
|
33
33
|
__name: "PkAuroraCanvas",
|
|
34
34
|
props: { sourceSelector: {} },
|
|
35
35
|
setup(e) {
|
|
36
|
-
let t = e, n =
|
|
36
|
+
let t = e, n = fe("canvasEl"), r = O(!1), i = null, a = 0, o = null, s = null, c = null, l = null, u = null, d = null, f = performance.now(), p = (e, t) => {
|
|
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;
|
|
40
|
-
},
|
|
40
|
+
}, ee = () => {
|
|
41
41
|
if (!n.value) return null;
|
|
42
42
|
let e = getComputedStyle(n.value).color.match(/rgba?\(([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/);
|
|
43
43
|
return e ? [
|
|
@@ -45,7 +45,7 @@ var ve = {
|
|
|
45
45
|
Number(e[2]) / 255,
|
|
46
46
|
Number(e[3]) / 255
|
|
47
47
|
] : null;
|
|
48
|
-
},
|
|
48
|
+
}, m = () => {
|
|
49
49
|
if (!i || !n.value) return;
|
|
50
50
|
let e = Math.min(window.devicePixelRatio || 1, 1.5), { clientWidth: r, clientHeight: a } = n.value;
|
|
51
51
|
n.value.width = Math.max(1, Math.round(r * e)), n.value.height = Math.max(1, Math.round(a * e)), i.viewport(0, 0, n.value.width, n.value.height);
|
|
@@ -56,28 +56,28 @@ var ve = {
|
|
|
56
56
|
let p = Number.parseFloat(getComputedStyle(n.value).getPropertyValue("--aurora-spread"));
|
|
57
57
|
i.uniform1f(d, Number.isNaN(p) ? 1 : p);
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
},
|
|
59
|
+
g(h() ? 10 : void 0);
|
|
60
|
+
}, h = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, g = (e) => {
|
|
61
61
|
i && n.value && (i.uniform1f(s, e ?? (performance.now() - f) / 1e3), i.uniform2f(c, n.value.width, n.value.height), i.drawArrays(i.TRIANGLE_STRIP, 0, 4));
|
|
62
|
-
},
|
|
63
|
-
|
|
62
|
+
}, _ = () => {
|
|
63
|
+
g(), a = requestAnimationFrame(_);
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return oe(() => {
|
|
66
66
|
let e = n.value;
|
|
67
67
|
i = e?.getContext("webgl", { alpha: !0 }) ?? null;
|
|
68
|
-
let t =
|
|
68
|
+
let t = ee();
|
|
69
69
|
if (!e || !i || !t) {
|
|
70
70
|
r.value = !0;
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
|
-
let a = p(i.VERTEX_SHADER,
|
|
74
|
-
if (!a || !f || !
|
|
73
|
+
let a = p(i.VERTEX_SHADER, be), f = p(i.FRAGMENT_SHADER, F), v = i.createProgram();
|
|
74
|
+
if (!a || !f || !v || (i.attachShader(v, a), i.attachShader(v, f), i.linkProgram(v), !i.getProgramParameter(v, i.LINK_STATUS))) {
|
|
75
75
|
r.value = !0;
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
i.useProgram(
|
|
79
|
-
let
|
|
80
|
-
i.bindBuffer(i.ARRAY_BUFFER,
|
|
78
|
+
i.useProgram(v);
|
|
79
|
+
let y = i.createBuffer();
|
|
80
|
+
i.bindBuffer(i.ARRAY_BUFFER, y), i.bufferData(i.ARRAY_BUFFER, new Float32Array([
|
|
81
81
|
-1,
|
|
82
82
|
-1,
|
|
83
83
|
1,
|
|
@@ -87,23 +87,23 @@ var ve = {
|
|
|
87
87
|
1,
|
|
88
88
|
1
|
|
89
89
|
]), i.STATIC_DRAW);
|
|
90
|
-
let
|
|
91
|
-
i.enableVertexAttribArray(
|
|
92
|
-
}),
|
|
90
|
+
let b = i.getAttribLocation(v, "a_position");
|
|
91
|
+
i.enableVertexAttribArray(b), i.vertexAttribPointer(b, 2, i.FLOAT, !1, 0, 0), s = i.getUniformLocation(v, "u_time"), c = i.getUniformLocation(v, "u_resolution"), l = i.getUniformLocation(v, "u_center"), u = i.getUniformLocation(v, "u_half"), d = i.getUniformLocation(v, "u_spread"), i.uniform3f(i.getUniformLocation(v, "u_color"), ...t), o = new ResizeObserver(m), o.observe(e), m(), ie(m), h() ? g(10) : _();
|
|
92
|
+
}), ae(() => {
|
|
93
93
|
cancelAnimationFrame(a), o?.disconnect();
|
|
94
|
-
}),
|
|
94
|
+
}), ce(() => {
|
|
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) => (D(), x("div", ye, [r.value ? (D(), x("div", P)) : (D(), 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
|
+
}), I = .18, Se = .35, Ce = /* @__PURE__ */ T({
|
|
107
107
|
__name: "PkVoiceOrb",
|
|
108
108
|
props: {
|
|
109
109
|
sample: {},
|
|
@@ -115,20 +115,20 @@ var ve = {
|
|
|
115
115
|
bars: { default: 5 }
|
|
116
116
|
},
|
|
117
117
|
setup(e) {
|
|
118
|
-
let t = e, n =
|
|
118
|
+
let t = e, n = fe("barsEl"), r = Array.from({ length: t.bars }, () => I), 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 I + 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 I + r / o / 255 * 2.2;
|
|
132
132
|
});
|
|
133
133
|
}, s = () => {
|
|
134
134
|
let e = n.value?.children;
|
|
@@ -137,36 +137,36 @@ var ve = {
|
|
|
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(I, e[n] ?? I)) - t) * Se), 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 M(() => t.state, async (e) => {
|
|
145
|
+
e !== "listening" && e !== "speaking" || a() ? (l(), r = r.map(() => I * 1.6), await ie(), s()) : i === void 0 && (i = requestAnimationFrame(c));
|
|
146
|
+
}, { immediate: !0 }), ae(l), (t, r) => (D(), x("div", {
|
|
147
|
+
class: E(["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
|
+
}, [(D(!0), x(g, null, ue(e.bars, (e) => (D(), x("span", {
|
|
154
154
|
key: e,
|
|
155
155
|
class: "pk-voice-orb__bar"
|
|
156
156
|
}))), 128))], 512)], 2));
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), we = {
|
|
159
159
|
key: 0,
|
|
160
160
|
class: "pk-voice-session__badge",
|
|
161
161
|
"aria-hidden": "true"
|
|
162
|
-
},
|
|
162
|
+
}, Te = {
|
|
163
163
|
class: "pk-voice-session__status",
|
|
164
164
|
role: "status"
|
|
165
|
-
},
|
|
165
|
+
}, Ee = {
|
|
166
166
|
key: 0,
|
|
167
167
|
class: "pk-voice-session__live-dot",
|
|
168
168
|
"aria-hidden": "true"
|
|
169
|
-
},
|
|
169
|
+
}, L = ["title"], R = ["title"], De = { class: "pk-voice-session__actions" }, Oe = /* @__PURE__ */ T({
|
|
170
170
|
__name: "PkVoiceSession",
|
|
171
171
|
props: {
|
|
172
172
|
state: {},
|
|
@@ -185,17 +185,17 @@ var ve = {
|
|
|
185
185
|
"dismiss"
|
|
186
186
|
],
|
|
187
187
|
setup(e, { emit: t }) {
|
|
188
|
-
let n = e, r = t, { t: i } =
|
|
188
|
+
let n = e, r = t, { t: i } = pe({ 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 u =
|
|
197
|
-
return
|
|
198
|
-
e.error ? (
|
|
196
|
+
let u = h;
|
|
197
|
+
return D(), x("div", { class: E(["pk-voice-session", { "pk-voice-session--failed": !!e.error }]) }, [
|
|
198
|
+
e.error ? (D(), x("span", we, [C(u, { name: "ri:error-warning-line" })])) : (D(), y(Ce, {
|
|
199
199
|
key: 1,
|
|
200
200
|
state: e.state,
|
|
201
201
|
sample: e.sample,
|
|
@@ -205,37 +205,37 @@ var ve = {
|
|
|
205
205
|
"sample",
|
|
206
206
|
"spectrum"
|
|
207
207
|
])),
|
|
208
|
-
|
|
208
|
+
S("div", Te, [S("span", { class: E(["pk-voice-session__state", l.value && `pk-voice-session__state--${l.value}`]) }, [c.value ? (D(), x("span", Ee)) : b("", !0), ne(" " + A(a.value), 1)], 2), e.error ? (D(), 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
|
+
}, A(e.error), 9, L)) : b("", !0)]),
|
|
213
|
+
o.value ? (D(), x("span", {
|
|
214
214
|
key: 2,
|
|
215
|
-
class:
|
|
216
|
-
title:
|
|
215
|
+
class: E(["pk-voice-session__timer", { "pk-voice-session__timer--warning": s.value }]),
|
|
216
|
+
title: j(i)("hint.voiceRemaining"),
|
|
217
217
|
"aria-hidden": "true"
|
|
218
|
-
},
|
|
219
|
-
|
|
218
|
+
}, A(o.value), 11, R)) : b("", !0),
|
|
219
|
+
S("div", De, [e.error ? (D(), x(g, { key: 0 }, [C(d, {
|
|
220
220
|
icon: "ri:refresh-line",
|
|
221
|
-
label:
|
|
221
|
+
label: j(i)("action.retry"),
|
|
222
222
|
onClick: n[0] ||= (e) => r("retry")
|
|
223
|
-
}, null, 8, ["label"]), e.live ? (
|
|
223
|
+
}, null, 8, ["label"]), e.live ? (D(), y(d, {
|
|
224
224
|
key: 0,
|
|
225
225
|
icon: "ri:stop-circle-line",
|
|
226
226
|
modifiers: "danger",
|
|
227
|
-
title:
|
|
228
|
-
"aria-label":
|
|
227
|
+
title: j(i)("action.hangUp"),
|
|
228
|
+
"aria-label": j(i)("action.hangUp"),
|
|
229
229
|
onClick: n[1] ||= (e) => r("hang-up")
|
|
230
|
-
}, null, 8, ["title", "aria-label"])) : (
|
|
230
|
+
}, null, 8, ["title", "aria-label"])) : (D(), y(d, {
|
|
231
231
|
key: 1,
|
|
232
232
|
icon: "ri:close-line",
|
|
233
|
-
label:
|
|
233
|
+
label: j(i)("action.close"),
|
|
234
234
|
onClick: n[2] ||= (e) => r("dismiss")
|
|
235
|
-
}, null, 8, ["label"]))], 64)) : (
|
|
235
|
+
}, null, 8, ["label"]))], 64)) : (D(), x(g, { key: 1 }, [C(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 ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
238
|
+
"aria-label": e.muted ? j(i)("action.unmute") : j(i)("action.mute"),
|
|
239
239
|
"aria-pressed": e.muted,
|
|
240
240
|
onClick: n[3] ||= (e) => r("toggle-mute")
|
|
241
241
|
}, null, 8, [
|
|
@@ -243,34 +243,34 @@ var ve = {
|
|
|
243
243
|
"title",
|
|
244
244
|
"aria-label",
|
|
245
245
|
"aria-pressed"
|
|
246
|
-
]),
|
|
246
|
+
]), C(d, {
|
|
247
247
|
icon: "ri:stop-circle-line",
|
|
248
248
|
modifiers: "danger",
|
|
249
|
-
title:
|
|
250
|
-
"aria-label":
|
|
249
|
+
title: j(i)("action.hangUp"),
|
|
250
|
+
"aria-label": j(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 =
|
|
256
|
+
}), ke = (e) => {
|
|
257
|
+
let t = k(), n = O("disconnected"), r = O("listening"), i = O(), o = O([]), s = O(), c = O(), l, u, d = 0, f = !1, p = () => {
|
|
258
258
|
u &&= (clearInterval(u), void 0), s.value = void 0;
|
|
259
|
-
},
|
|
259
|
+
}, ee = (e) => {
|
|
260
260
|
let t = Date.now() + e * 1e3, n = () => {
|
|
261
261
|
let e = Math.max(0, Math.ceil((t - Date.now()) / 1e3));
|
|
262
|
-
s.value = e, e === 0 &&
|
|
262
|
+
s.value = e, e === 0 && h();
|
|
263
263
|
};
|
|
264
264
|
n(), u = setInterval(n, 1e3);
|
|
265
|
-
},
|
|
265
|
+
}, m = async (t) => {
|
|
266
266
|
t && (l === t && (l = void 0), await e.closeGrant?.(t).catch(() => void 0));
|
|
267
|
-
},
|
|
267
|
+
}, h = async () => {
|
|
268
268
|
d += 1, p();
|
|
269
269
|
let e = l;
|
|
270
270
|
l = void 0;
|
|
271
271
|
let i = t.value;
|
|
272
|
-
t.value = void 0, await i?.endSession().catch(() => void 0), await
|
|
273
|
-
},
|
|
272
|
+
t.value = void 0, await i?.endSession().catch(() => void 0), await m(e), n.value = "disconnected", r.value = "listening";
|
|
273
|
+
}, g = 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;
|
|
@@ -285,10 +285,10 @@ var ve = {
|
|
|
285
285
|
l = d.sessionId, u = d.sessionId, c.value = d.chatId;
|
|
286
286
|
let { VoiceConversation: f } = await a;
|
|
287
287
|
if (!s()) {
|
|
288
|
-
await
|
|
288
|
+
await m(d.sessionId);
|
|
289
289
|
return;
|
|
290
290
|
}
|
|
291
|
-
let
|
|
291
|
+
let h = await f.startSession({
|
|
292
292
|
signedUrl: d.signedUrl,
|
|
293
293
|
customLlmExtraBody: { voice_session_id: d.sessionId },
|
|
294
294
|
clientTools: e.clientTools?.() ?? {},
|
|
@@ -312,23 +312,23 @@ var ve = {
|
|
|
312
312
|
s() && (i.value = e);
|
|
313
313
|
},
|
|
314
314
|
onDisconnect: (a) => {
|
|
315
|
-
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message),
|
|
315
|
+
s() && (p(), t.value = void 0, n.value = "disconnected", r.value = "listening", a.reason === "error" && (i.value = a.message), m(d.sessionId), e.onTurnEnd?.());
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
if (!s()) {
|
|
319
|
-
await
|
|
319
|
+
await h.endSession().catch(() => void 0), await m(d.sessionId);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
|
-
t.value =
|
|
322
|
+
t.value = h, ee(d.maxSessionSeconds);
|
|
323
323
|
} catch (e) {
|
|
324
|
-
if (await
|
|
324
|
+
if (await m(u), !s()) return;
|
|
325
325
|
t.value = void 0, p(), n.value = "disconnected", i.value = e instanceof Error ? e.message : String(e);
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, _ = () => {
|
|
328
328
|
i.value = void 0;
|
|
329
|
-
},
|
|
329
|
+
}, y = (e) => {
|
|
330
330
|
t.value?.setMicMuted(e);
|
|
331
|
-
},
|
|
331
|
+
}, b = (e) => {
|
|
332
332
|
let n = t.value;
|
|
333
333
|
if (!n || !e.trim()) return !1;
|
|
334
334
|
try {
|
|
@@ -336,7 +336,7 @@ var ve = {
|
|
|
336
336
|
} catch (e) {
|
|
337
337
|
return a.warn("The spoken answer could not be sent", e), !1;
|
|
338
338
|
}
|
|
339
|
-
},
|
|
339
|
+
}, x = (e) => {
|
|
340
340
|
let n = t.value;
|
|
341
341
|
if (!n) return 0;
|
|
342
342
|
try {
|
|
@@ -344,21 +344,21 @@ var ve = {
|
|
|
344
344
|
} catch {
|
|
345
345
|
return 0;
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, S = (e) => {
|
|
348
348
|
let n = t.value;
|
|
349
349
|
if (n) try {
|
|
350
350
|
return e === "input" ? n.getInputByteFrequencyData() : n.getOutputByteFrequencyData();
|
|
351
351
|
} catch {
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
},
|
|
354
|
+
}, te = () => {
|
|
355
355
|
let e = l;
|
|
356
|
-
l = void 0, d += 1, p(),
|
|
356
|
+
l = void 0, d += 1, p(), m(e);
|
|
357
357
|
let r = t.value;
|
|
358
358
|
t.value = void 0, r?.endSession().catch(() => void 0), n.value = "disconnected";
|
|
359
359
|
};
|
|
360
|
-
return typeof window < "u" && window.addEventListener("pagehide",
|
|
361
|
-
f = !0, typeof window < "u" && window.removeEventListener("pagehide",
|
|
360
|
+
return typeof window < "u" && window.addEventListener("pagehide", te), se(() => {
|
|
361
|
+
f = !0, typeof window < "u" && window.removeEventListener("pagehide", te), h();
|
|
362
362
|
}), {
|
|
363
363
|
status: n,
|
|
364
364
|
mode: r,
|
|
@@ -366,25 +366,25 @@ var ve = {
|
|
|
366
366
|
transcript: o,
|
|
367
367
|
remainingSeconds: s,
|
|
368
368
|
chatId: c,
|
|
369
|
-
isActive:
|
|
370
|
-
isConnecting:
|
|
371
|
-
isSpeaking:
|
|
372
|
-
isListening:
|
|
373
|
-
start:
|
|
374
|
-
stop:
|
|
375
|
-
dismissError:
|
|
376
|
-
setMuted:
|
|
377
|
-
sendUserMessage:
|
|
378
|
-
readLevel:
|
|
379
|
-
readSpectrum:
|
|
369
|
+
isActive: v(() => n.value === "connected" || n.value === "connecting"),
|
|
370
|
+
isConnecting: v(() => n.value === "connecting"),
|
|
371
|
+
isSpeaking: v(() => n.value === "connected" && r.value === "speaking"),
|
|
372
|
+
isListening: v(() => n.value === "connected" && r.value === "listening"),
|
|
373
|
+
start: g,
|
|
374
|
+
stop: h,
|
|
375
|
+
dismissError: _,
|
|
376
|
+
setMuted: y,
|
|
377
|
+
sendUserMessage: b,
|
|
378
|
+
readLevel: x,
|
|
379
|
+
readSpectrum: S
|
|
380
380
|
};
|
|
381
|
-
},
|
|
381
|
+
}, z = 4e3, Ae = [
|
|
382
382
|
3e3,
|
|
383
383
|
5e3,
|
|
384
384
|
1e4
|
|
385
|
-
],
|
|
386
|
-
function
|
|
387
|
-
let t =
|
|
385
|
+
], je = 12e4, Me = 3e4;
|
|
386
|
+
function Ne(e) {
|
|
387
|
+
let t = O(null), n = O(!1), r, i = !1, a = () => {
|
|
388
388
|
clearTimeout(r), r = void 0;
|
|
389
389
|
}, o = (e, t) => {
|
|
390
390
|
a(), i || (r = setTimeout(() => void t(), e));
|
|
@@ -401,12 +401,12 @@ function Me(e) {
|
|
|
401
401
|
}
|
|
402
402
|
let r = t.value;
|
|
403
403
|
if (r) {
|
|
404
|
-
let e = Date.parse(r.dueAt) - Date.now() +
|
|
405
|
-
o(Math.max(
|
|
404
|
+
let e = Date.parse(r.dueAt) - Date.now() + z;
|
|
405
|
+
o(Math.max(z, e), () => l(r.wakeId, Date.now(), 0));
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
async function l(t, n, r) {
|
|
409
|
-
await e.refreshMessages(), !i && (s(t) || Date.now() - n >=
|
|
409
|
+
await e.refreshMessages(), !i && (s(t) || Date.now() - n >= je ? await c() : o(Ae[Math.min(r, Ae.length - 1)], () => l(t, n, r + 1)));
|
|
410
410
|
}
|
|
411
411
|
async function u() {
|
|
412
412
|
n.value = !0;
|
|
@@ -424,29 +424,29 @@ function Me(e) {
|
|
|
424
424
|
function p() {
|
|
425
425
|
f = e.chatId();
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function ee() {
|
|
428
428
|
f === e.chatId() && (f = void 0, c());
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function m() {
|
|
431
431
|
f = void 0;
|
|
432
432
|
}
|
|
433
|
-
let
|
|
434
|
-
|
|
433
|
+
let h = v(() => e.messages().some((e) => e.role === "user"));
|
|
434
|
+
M([e.chatId, h], ([, t]) => {
|
|
435
435
|
d();
|
|
436
436
|
let n = e.status(), r = n === "submitted" || n === "streaming" || f === e.chatId();
|
|
437
437
|
t && !r && c();
|
|
438
|
-
}, { immediate: !0 }),
|
|
439
|
-
e === "ready" && t !== "ready" &&
|
|
438
|
+
}, { immediate: !0 }), M(e.status, (e, t) => {
|
|
439
|
+
e === "ready" && t !== "ready" && h.value && c();
|
|
440
440
|
});
|
|
441
|
-
let
|
|
442
|
-
function
|
|
441
|
+
let g;
|
|
442
|
+
function _() {
|
|
443
443
|
t.value && document.visibilityState === "visible" && e.apiClient().markChatWakeupPresence(e.agentId(), e.chatId()).catch(() => void 0);
|
|
444
444
|
}
|
|
445
|
-
let
|
|
446
|
-
return document.addEventListener("visibilitychange",
|
|
447
|
-
clearInterval(
|
|
448
|
-
}),
|
|
449
|
-
i = !0, a(), clearInterval(
|
|
445
|
+
let y = () => _();
|
|
446
|
+
return document.addEventListener("visibilitychange", y), M(() => t.value?.wakeId, (e) => {
|
|
447
|
+
clearInterval(g), g = void 0, e && !i && (_(), g = setInterval(_, Me));
|
|
448
|
+
}), ae(() => {
|
|
449
|
+
i = !0, a(), clearInterval(g), document.removeEventListener("visibilitychange", y);
|
|
450
450
|
}), {
|
|
451
451
|
pendingWakeup: t,
|
|
452
452
|
isStopping: n,
|
|
@@ -454,13 +454,13 @@ function Me(e) {
|
|
|
454
454
|
reset: d,
|
|
455
455
|
stop: u,
|
|
456
456
|
spokenTurnStarted: p,
|
|
457
|
-
spokenTurnsWritten:
|
|
458
|
-
forgetSpokenTurns:
|
|
457
|
+
spokenTurnsWritten: ee,
|
|
458
|
+
forgetSpokenTurns: m
|
|
459
459
|
};
|
|
460
460
|
}
|
|
461
461
|
// ../../packages/components/src/chat/useChatFilePreview.ts
|
|
462
|
-
function
|
|
463
|
-
let t =
|
|
462
|
+
function Pe(e) {
|
|
463
|
+
let t = O(), n = O(), r = O(!1), i = O(!1), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = async (c) => {
|
|
464
464
|
let l = ++o, u = s;
|
|
465
465
|
t.value = c, i.value = !1;
|
|
466
466
|
let d = a.get(c.storedFileName);
|
|
@@ -491,19 +491,19 @@ function Ne(e) {
|
|
|
491
491
|
};
|
|
492
492
|
}
|
|
493
493
|
// ../../packages/components/src/chat/PkChatbotViewChat.vue?vue&type=script&setup=true&lang.ts
|
|
494
|
-
var
|
|
494
|
+
var Fe = { class: "pk-chatbot-view-chat__input-stage" }, Ie = {
|
|
495
495
|
key: 1,
|
|
496
496
|
class: "p-md border-t border-surface-3 text-center text-12 text-danger bg-surface-danger"
|
|
497
|
-
},
|
|
497
|
+
}, Le = { class: "pk-chatbot-view-chat__agent-chip" }, Re = {
|
|
498
498
|
key: 0,
|
|
499
499
|
class: "pk-chatbot-view-chat__agent-chip-name"
|
|
500
|
-
},
|
|
500
|
+
}, ze = {
|
|
501
501
|
key: 0,
|
|
502
502
|
class: "pk-chatbot-view-chat__drop-overlay"
|
|
503
|
-
},
|
|
503
|
+
}, Be = {
|
|
504
504
|
key: 1,
|
|
505
505
|
class: "pk-chatbot-view-chat__preview"
|
|
506
|
-
},
|
|
506
|
+
}, Ve = 1e3, He = 3e3, Ue = 6e4, We = 3e5, Ge = 6e5, Ke = /* @__PURE__ */ T({
|
|
507
507
|
__name: "PkChatbotViewChat",
|
|
508
508
|
props: {
|
|
509
509
|
agentId: {},
|
|
@@ -512,83 +512,88 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
512
512
|
},
|
|
513
513
|
emits: ["show-info", "revise"],
|
|
514
514
|
setup(a, { emit: d }) {
|
|
515
|
-
let
|
|
516
|
-
|
|
517
|
-
let
|
|
518
|
-
|
|
519
|
-
|
|
515
|
+
let g = w(() => import("./PkToolShowForm-C4JnalBU.js").then((e) => e.n)), ne = w(() => import("./PkToolShowContactForm-NRfvmPLV.js").then((e) => e.n)), T = w(() => import("./PkToolShowSuggestedReply-Bb7Inxa4.js").then((e) => e.n)), ie = w(() => import("./PkToolShowSources-BVfcp1iE.js").then((e) => e.n)), oe = w(() => import("./PkToolRequestGeolocation-gEDbmudT.js").then((e) => e.n)), se = w(() => import("./PkToolRequestOAuthConnection-Dy0GXNwC.js")), ce = w(() => import("./PkToolShowLocation-C7hBRwq8.js").then((e) => e.n)), ue = w(() => import("./PkToolShowDiagram-VTi8vwcN.js")), k = w(() => import("./PkToolChatFile-Ca45de6q.js").then((e) => e.n)), de = w(() => import("./PkToolShareDocument-IreRCu-j.js").then((e) => e.n)), ve = w(() => import("./PkFilePreview-ItDTJWaw.js").then((e) => e.n)), ye = w(() => import("./PkFilePreviewDialog-4YbxP5m2.js").then((e) => e.n)), P = a, be = d, F = r(P.agentId), { agentInterface: I, agentFileUpload: Se, agentType: Ce, agentVoice: we, actions: Te, revisedAnswers: Ee, messages: L, chat: R, messageFeedbacks: De, feedbackDialogMessage: z, isFeedbackSubmitting: Ae, isFeedbackSubmitted: je, feedbackSubmitError: Me, isLeadSubmitted: Ke, isLoadingSubmitLead: qe, submitLeadError: Je, input: B, inputMessagePlaceholder: Ye, isConversationBlocked: Xe, baseUrl: Ze, pendingAttachments: Qe, isAttachmentLimitReached: $e, fileLimitError: et, apiClient: V, isDark: tt, hostToolsPending: nt, pageNoticeLevel: rt, hostConfirmation: it, agentPageAccess: at, hostStepTitles: ot, canQueue: st, queuedMessages: ct, backgroundAnswers: lt, inputFocusRequest: ut, pagePointer: H, pagePointerAvailable: dt, pagePointing: ft } = ge(F);
|
|
516
|
+
le(c, ot);
|
|
517
|
+
let pt = fe("inputEl");
|
|
518
|
+
M(ut, () => {
|
|
519
|
+
pt.value?.focus();
|
|
520
|
+
}), M(H, (e) => {
|
|
521
|
+
e && pt.value?.focus();
|
|
520
522
|
});
|
|
521
|
-
let
|
|
522
|
-
|
|
523
|
+
let mt = v(() => H.value ? {
|
|
524
|
+
kind: H.value.kind,
|
|
525
|
+
label: H.value.label
|
|
526
|
+
} : void 0), U = v(() => Ce.value === "reasoning" ? void 0 : Se.value), W = (e) => V.value.getMediaDownloadUrl(P.agentId, F.localChatId, e), { handleSubmit: ht, stopGeneration: gt, regenerate: _t, onUpvote: vt, onDownvote: yt, onFeedback: bt, onFeedbackSubmit: xt, onLeadSubmit: St, startNewChat: Ct, addToolOutput: wt, addToolApprovalResponse: Tt, handleFileSelect: Et, clearFileLimitError: Dt, refreshMessages: Ot, appendMessage: kt, closePageNotice: At, respondHostConfirmation: jt, editQueuedMessage: Mt, removeQueuedMessage: Nt, openBackgroundAnswer: Pt, dismissBackgroundAnswer: Ft } = F, { t: G } = pe({ useScope: "global" }), It = v(() => nt.value > 0), Lt = v(() => It.value && R.value.status === "ready" ? "streaming" : R.value.status), Rt = l(() => at.value?.notice), zt = v(() => rt.value ? Rt.value || G(`message.pageAccessNotice.${rt.value}`) : void 0), Bt = v(() => {
|
|
527
|
+
let e = et.value;
|
|
523
528
|
if (e) return e.reason === "per-chat" ? G("message.fileLimitPerChat", { max: e.max }) : G("message.fileLimitPerMessage", { max: e.max });
|
|
524
|
-
}),
|
|
529
|
+
}), Vt = v(() => lt.value.map(({ chatId: e, title: t }) => ({
|
|
525
530
|
id: e,
|
|
526
531
|
text: t ? G("message.backgroundAnswerReady", { title: t }) : G("message.backgroundAnswerReadyUntitled")
|
|
527
|
-
}))),
|
|
532
|
+
}))), Ht = l(() => I.value?.dismissableNotice), Ut = v(() => L.value.some((e) => e.role === "user")), Wt = v(() => P.modifier === "fullscreen" && !Ut.value), Gt = _e(I, () => P.userName), Kt = fe("chatViewEl"), { width: qt } = he(Kt, {
|
|
528
533
|
width: 0,
|
|
529
534
|
height: 0
|
|
530
|
-
}, { box: "border-box" }),
|
|
531
|
-
|
|
532
|
-
let
|
|
533
|
-
let t = await
|
|
535
|
+
}, { box: "border-box" }), Jt = v(() => qt.value >= Ve), Yt = v(() => qt.value > 0 && qt.value < 576), { target: K, preview: Xt, loading: Zt, error: Qt, open: $t, close: en, reset: tn } = Pe((e) => V.value.getChatFilePreview(P.agentId, F.localChatId, e));
|
|
536
|
+
M(() => F.localChatId, tn);
|
|
537
|
+
let nn = async (e) => (await V.value.expandSourceContext(P.agentId, e.documentId, e.chunkIndex)).content, rn = async (e) => {
|
|
538
|
+
let t = await V.value.downloadSourceDocument(P.agentId, e);
|
|
534
539
|
window.open(t.downloadUrl, "_blank");
|
|
535
|
-
}, { isOverDropZone:
|
|
540
|
+
}, { isOverDropZone: an } = me(Kt, {
|
|
536
541
|
dataTypes: (e) => t(e, U.value?.allowedMimeTypes ?? []),
|
|
537
542
|
onDrop: (e) => {
|
|
538
|
-
if (U.value?.enabled && e) for (let t of e)
|
|
543
|
+
if (U.value?.enabled && e) for (let t of e) Et(t);
|
|
539
544
|
}
|
|
540
|
-
}), q =
|
|
545
|
+
}), q = O(!1), J = !1, Y = O(!1), on = [
|
|
541
546
|
3e3,
|
|
542
547
|
5e3,
|
|
543
548
|
1e4
|
|
544
|
-
],
|
|
545
|
-
function
|
|
546
|
-
clearTimeout(
|
|
549
|
+
], sn, X, cn = !1, ln = 0, un = !1;
|
|
550
|
+
function dn() {
|
|
551
|
+
clearTimeout(sn), sn = void 0, X = void 0, cn = !1, ln = 0, Y.value = !1;
|
|
547
552
|
}
|
|
548
|
-
function
|
|
549
|
-
J || (clearTimeout(
|
|
550
|
-
|
|
553
|
+
function fn(e) {
|
|
554
|
+
J || (clearTimeout(sn), sn = setTimeout(() => {
|
|
555
|
+
pn();
|
|
551
556
|
}, e));
|
|
552
557
|
}
|
|
553
|
-
async function
|
|
554
|
-
if (J ||
|
|
555
|
-
|
|
558
|
+
async function pn() {
|
|
559
|
+
if (J || un) return;
|
|
560
|
+
un = !0;
|
|
556
561
|
let e;
|
|
557
562
|
try {
|
|
558
|
-
e = await
|
|
563
|
+
e = await Ot();
|
|
559
564
|
} finally {
|
|
560
|
-
|
|
565
|
+
un = !1;
|
|
561
566
|
}
|
|
562
567
|
if (J) return;
|
|
563
|
-
if (e === "caught-up" && (Y.value = !1,
|
|
564
|
-
X = void 0,
|
|
568
|
+
if (e === "caught-up" && (Y.value = !1, Hn()), Z.isActive.value) {
|
|
569
|
+
X = void 0, cn = !1, ln = 0, fn(He);
|
|
565
570
|
return;
|
|
566
571
|
}
|
|
567
|
-
X === void 0 && (X = Date.now(),
|
|
572
|
+
X === void 0 && (X = Date.now(), cn = !!Z.error.value);
|
|
568
573
|
let t = Date.now() - X;
|
|
569
|
-
if (e === "caught-up" && t >= (
|
|
570
|
-
|
|
574
|
+
if (e === "caught-up" && t >= (cn ? We : Ue) || t >= Ge) {
|
|
575
|
+
dn(), Un();
|
|
571
576
|
return;
|
|
572
577
|
}
|
|
573
|
-
let n =
|
|
574
|
-
|
|
578
|
+
let n = on[Math.min(ln, on.length - 1)];
|
|
579
|
+
ln += 1, fn(n);
|
|
575
580
|
}
|
|
576
|
-
let
|
|
577
|
-
|
|
578
|
-
},
|
|
581
|
+
let mn = (e = 1200) => {
|
|
582
|
+
fn(e);
|
|
583
|
+
}, hn, Z = ke({
|
|
579
584
|
fetchGrant: async () => {
|
|
580
|
-
|
|
581
|
-
let e = await
|
|
582
|
-
deviceContext:
|
|
583
|
-
externalContext:
|
|
584
|
-
pageTools:
|
|
585
|
+
hn = F.voicePageTools();
|
|
586
|
+
let e = await V.value.createVoiceSession(P.agentId, F.localChatId, {
|
|
587
|
+
deviceContext: F.buildDeviceContext(),
|
|
588
|
+
externalContext: F.externalContext,
|
|
589
|
+
pageTools: hn?.declaration
|
|
585
590
|
});
|
|
586
|
-
return e.chatId !==
|
|
591
|
+
return e.chatId !== F.localChatId && (F.localChatId = e.chatId), e;
|
|
587
592
|
},
|
|
588
|
-
closeGrant: (e) =>
|
|
589
|
-
clientTools: () =>
|
|
593
|
+
closeGrant: (e) => V.value.closeVoiceSession(P.agentId, e),
|
|
594
|
+
clientTools: () => hn?.clientTools,
|
|
590
595
|
onTranscript: (e) => {
|
|
591
|
-
e.role === "user" ? (Y.value = !0,
|
|
596
|
+
e.role === "user" ? (Y.value = !0, Vn(), kt({
|
|
592
597
|
id: `${i}user-${n()}`,
|
|
593
598
|
role: "user",
|
|
594
599
|
parts: [{
|
|
@@ -598,63 +603,63 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
598
603
|
})) : Y.value = !1;
|
|
599
604
|
},
|
|
600
605
|
onTurnEnd: () => {
|
|
601
|
-
|
|
606
|
+
mn();
|
|
602
607
|
}
|
|
603
608
|
});
|
|
604
|
-
|
|
605
|
-
e ||
|
|
606
|
-
}),
|
|
609
|
+
M(() => Z.isActive.value, (e) => {
|
|
610
|
+
e || F.cancelVoicePageCalls();
|
|
611
|
+
}), M(() => Z.error.value, (e) => {
|
|
607
612
|
e && (Y.value = !1);
|
|
608
613
|
});
|
|
609
|
-
let
|
|
614
|
+
let gn = v(() => we.value?.enabled === !0), _n = v(() => Z.error.value ? "error" : Z.isConnecting.value ? "connecting" : Z.isSpeaking.value ? "speaking" : Z.isActive.value ? "listening" : "idle"), vn = v(() => {
|
|
610
615
|
let e = Z.error.value;
|
|
611
616
|
if (e) return /took too long/i.test(e) ? G("message.voiceTookTooLong") : /cascade|no response|custom_llm_error/i.test(e) ? G("message.voiceNoAnswer") : G("message.voiceInterrupted");
|
|
612
|
-
}),
|
|
613
|
-
q.value = !1, await Z.start(), Z.isActive.value && (
|
|
614
|
-
},
|
|
615
|
-
Y.value = !1, await Z.stop(), !J &&
|
|
616
|
-
},
|
|
617
|
+
}), yn = v(() => Z.isSpeaking.value ? "output" : "input"), bn = () => Z.readLevel(yn.value), xn = () => Z.readSpectrum(yn.value), Sn = async () => {
|
|
618
|
+
q.value = !1, await Z.start(), Z.isActive.value && (dn(), fn(He));
|
|
619
|
+
}, Cn = async () => {
|
|
620
|
+
Y.value = !1, await Z.stop(), !J && mn(0);
|
|
621
|
+
}, wn = () => {
|
|
617
622
|
Z.dismissError();
|
|
618
|
-
},
|
|
619
|
-
Z.dismissError(), await Z.stop(), await
|
|
620
|
-
}, Q = (e) => e?.toolCallId ?? "",
|
|
621
|
-
$(t, o(t, n)) ||
|
|
623
|
+
}, Tn = async () => {
|
|
624
|
+
Z.dismissError(), await Z.stop(), await Sn();
|
|
625
|
+
}, Q = (e) => e?.toolCallId ?? "", En = O(/* @__PURE__ */ new Set()), Dn = (e) => En.value.has(Q(e)), On = O(/* @__PURE__ */ new Map()), $ = (e, t) => Z.isActive.value ? (Z.sendUserMessage(t) && (En.value = new Set(En.value).add(Q(e)), mn()), !0) : !1, kn = (e, t, n) => {
|
|
626
|
+
$(t, o(t, n)) || wt({
|
|
622
627
|
tool: e,
|
|
623
628
|
toolCallId: Q(t),
|
|
624
629
|
output: n
|
|
625
630
|
});
|
|
626
|
-
},
|
|
631
|
+
}, An = (e) => {
|
|
627
632
|
let t = e.confirmed ? G("message.voiceConfirmed") : G("message.voiceCancelled");
|
|
628
|
-
$({ toolCallId: e.toolCallId }, t) ?
|
|
633
|
+
$({ toolCallId: e.toolCallId }, t) ? En.value.has(e.toolCallId) && (On.value = new Map(On.value).set(e.toolCallId, e.confirmed)) : wt({
|
|
629
634
|
tool: "requestConfirm",
|
|
630
635
|
toolCallId: e.toolCallId,
|
|
631
636
|
output: e.confirmed ? "confirmed" : "cancelled"
|
|
632
637
|
});
|
|
633
|
-
},
|
|
638
|
+
}, jn = /* @__PURE__ */ new Set([
|
|
634
639
|
"tool-editSpreadsheet",
|
|
635
640
|
"tool-editWordDocument",
|
|
636
641
|
"tool-createSpreadsheet",
|
|
637
642
|
"tool-createWordDocument"
|
|
638
|
-
]),
|
|
643
|
+
]), Mn = v(() => {
|
|
639
644
|
let e = /* @__PURE__ */ new Map();
|
|
640
|
-
for (let t of
|
|
645
|
+
for (let t of L.value) for (let n of t.parts) {
|
|
641
646
|
let { type: t, state: r, output: i } = n;
|
|
642
|
-
|
|
647
|
+
jn.has(t) && r === "output-available" && i?.fileId && i.version && e.set(i.fileId, Math.max(e.get(i.fileId) ?? 0, i.version));
|
|
643
648
|
}
|
|
644
649
|
return e;
|
|
645
|
-
}),
|
|
646
|
-
|
|
647
|
-
}),
|
|
648
|
-
$(e, t) || (
|
|
649
|
-
},
|
|
650
|
+
}), Nn = v(() => Xe.value ? void 0 : (e) => {
|
|
651
|
+
B.value = G("messagePart.chatFileRestoreRequest", e), ht();
|
|
652
|
+
}), Pn = (e, t) => {
|
|
653
|
+
$(e, t) || (B.value = t, ht());
|
|
654
|
+
}, Fn = (e, t) => {
|
|
650
655
|
let n = t.error ? G("message.voiceLocationRefused") : G("message.voiceLocationShared", { place: t.displayName ?? `${t.latitude}, ${t.longitude}` });
|
|
651
|
-
$(e, n) ||
|
|
656
|
+
$(e, n) || wt({
|
|
652
657
|
tool: "requestGeolocation",
|
|
653
658
|
toolCallId: Q(e),
|
|
654
659
|
output: t
|
|
655
660
|
});
|
|
656
|
-
},
|
|
657
|
-
$(e, G("message.voiceConnectionDone")) ||
|
|
661
|
+
}, In = (e, t) => {
|
|
662
|
+
$(e, G("message.voiceConnectionDone")) || wt({
|
|
658
663
|
tool: "requestOAuthConnection",
|
|
659
664
|
toolCallId: Q(e),
|
|
660
665
|
output: {
|
|
@@ -662,90 +667,90 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
662
667
|
mcpServerId: t
|
|
663
668
|
}
|
|
664
669
|
});
|
|
665
|
-
},
|
|
670
|
+
}, Ln = () => {
|
|
666
671
|
q.value = !q.value, Z.setMuted(q.value);
|
|
667
672
|
};
|
|
668
|
-
|
|
669
|
-
J = !0,
|
|
673
|
+
ae(() => {
|
|
674
|
+
J = !0, dn();
|
|
670
675
|
});
|
|
671
|
-
let { pendingWakeup:
|
|
672
|
-
agentId: () =>
|
|
673
|
-
chatId: () =>
|
|
674
|
-
apiClient: () =>
|
|
675
|
-
messages: () =>
|
|
676
|
-
refreshMessages:
|
|
677
|
-
status: () =>
|
|
676
|
+
let { pendingWakeup: Rn, isStopping: zn, stop: Bn, spokenTurnStarted: Vn, spokenTurnsWritten: Hn, forgetSpokenTurns: Un } = Ne({
|
|
677
|
+
agentId: () => P.agentId,
|
|
678
|
+
chatId: () => F.localChatId,
|
|
679
|
+
apiClient: () => V.value,
|
|
680
|
+
messages: () => L.value,
|
|
681
|
+
refreshMessages: Ot,
|
|
682
|
+
status: () => R.value.status
|
|
678
683
|
});
|
|
679
684
|
return (t, n) => {
|
|
680
|
-
let r =
|
|
681
|
-
return
|
|
685
|
+
let r = h;
|
|
686
|
+
return D(), x("div", {
|
|
682
687
|
ref_key: "chatViewEl",
|
|
683
|
-
ref:
|
|
684
|
-
class:
|
|
685
|
-
"pk-chatbot-view-chat--dragover":
|
|
686
|
-
"pk-chatbot-view-chat--empty":
|
|
687
|
-
"pk-chatbot-view-chat--with-preview": !!
|
|
688
|
+
ref: Kt,
|
|
689
|
+
class: E(["pk-chatbot-view-chat", {
|
|
690
|
+
"pk-chatbot-view-chat--dragover": j(an) && U.value?.enabled,
|
|
691
|
+
"pk-chatbot-view-chat--empty": Wt.value,
|
|
692
|
+
"pk-chatbot-view-chat--with-preview": !!j(K) && Jt.value
|
|
688
693
|
}])
|
|
689
694
|
}, [
|
|
690
|
-
|
|
695
|
+
C(_, {
|
|
691
696
|
name: "pk-chatbot-view-chat-fade",
|
|
692
697
|
mode: "out-in"
|
|
693
698
|
}, {
|
|
694
|
-
default:
|
|
699
|
+
default: N(() => [Wt.value ? (D(), y(ee, {
|
|
695
700
|
key: 0,
|
|
696
|
-
greeting:
|
|
697
|
-
logo:
|
|
698
|
-
name:
|
|
701
|
+
greeting: j(Gt),
|
|
702
|
+
logo: j(I)?.logo,
|
|
703
|
+
name: j(F).name
|
|
699
704
|
}, null, 8, [
|
|
700
705
|
"greeting",
|
|
701
706
|
"logo",
|
|
702
707
|
"name"
|
|
703
|
-
])) : (
|
|
708
|
+
])) : (D(), y(e, {
|
|
704
709
|
key: 1,
|
|
705
710
|
class: "flex flex-col flex-1 min-h-0 p-md overflow-y-auto",
|
|
706
711
|
interactive: "",
|
|
707
|
-
messages:
|
|
708
|
-
"confirm-verdicts-on-call":
|
|
709
|
-
status:
|
|
710
|
-
error:
|
|
711
|
-
"main-color":
|
|
712
|
-
"text-color":
|
|
713
|
-
"revised-answers":
|
|
714
|
-
actions:
|
|
715
|
-
"message-feedbacks":
|
|
716
|
-
"feedback-message-id":
|
|
717
|
-
"feedback-loading":
|
|
718
|
-
"feedback-submitted":
|
|
719
|
-
"feedback-error":
|
|
720
|
-
"show-extended-steps":
|
|
721
|
-
"hide-reasoning":
|
|
712
|
+
messages: j(L),
|
|
713
|
+
"confirm-verdicts-on-call": On.value,
|
|
714
|
+
status: j(R).status,
|
|
715
|
+
error: j(R).error,
|
|
716
|
+
"main-color": j(I)?.mainColor,
|
|
717
|
+
"text-color": j(I)?.textColor,
|
|
718
|
+
"revised-answers": j(Ee),
|
|
719
|
+
actions: j(Te),
|
|
720
|
+
"message-feedbacks": j(De),
|
|
721
|
+
"feedback-message-id": j(z)?.id,
|
|
722
|
+
"feedback-loading": j(Ae),
|
|
723
|
+
"feedback-submitted": j(je),
|
|
724
|
+
"feedback-error": j(Me),
|
|
725
|
+
"show-extended-steps": j(I)?.showExtendedSteps,
|
|
726
|
+
"hide-reasoning": j(I)?.showReasoning === !1,
|
|
722
727
|
"awaiting-spoken-answer": Y.value,
|
|
723
|
-
"host-working":
|
|
724
|
-
"host-confirmation":
|
|
725
|
-
"is-dark":
|
|
728
|
+
"host-working": It.value,
|
|
729
|
+
"host-confirmation": j(it),
|
|
730
|
+
"is-dark": j(tt),
|
|
726
731
|
"show-scroll-to-bottom": a.modifier === "fullscreen",
|
|
727
|
-
onFeedbackSubmit: n[0] ||= (e) =>
|
|
728
|
-
onFeedbackClose: n[1] ||= (e) =>
|
|
729
|
-
onRegenerate:
|
|
730
|
-
onAutoRetry:
|
|
731
|
-
onResetChat:
|
|
732
|
-
onShowInfo: n[2] ||= (e) =>
|
|
733
|
-
onRevise: n[3] ||= (e) =>
|
|
734
|
-
onUpvote:
|
|
735
|
-
onDownvote:
|
|
736
|
-
onFeedback:
|
|
737
|
-
onApprovalRespond:
|
|
738
|
-
onConfirmRespond:
|
|
739
|
-
onHostConfirmRespond:
|
|
732
|
+
onFeedbackSubmit: n[0] ||= (e) => j(xt)(e),
|
|
733
|
+
onFeedbackClose: n[1] ||= (e) => z.value = void 0,
|
|
734
|
+
onRegenerate: j(_t),
|
|
735
|
+
onAutoRetry: j(_t),
|
|
736
|
+
onResetChat: j(Ct),
|
|
737
|
+
onShowInfo: n[2] ||= (e) => be("show-info", e),
|
|
738
|
+
onRevise: n[3] ||= (e) => be("revise", e),
|
|
739
|
+
onUpvote: j(vt),
|
|
740
|
+
onDownvote: j(yt),
|
|
741
|
+
onFeedback: j(bt),
|
|
742
|
+
onApprovalRespond: j(Tt),
|
|
743
|
+
onConfirmRespond: An,
|
|
744
|
+
onHostConfirmRespond: j(jt)
|
|
740
745
|
}, {
|
|
741
|
-
"tool-showContactForm":
|
|
746
|
+
"tool-showContactForm": N(({ part: e }) => [C(j(ne), {
|
|
742
747
|
part: e,
|
|
743
|
-
readonly: !
|
|
744
|
-
submitted:
|
|
745
|
-
loading:
|
|
746
|
-
error:
|
|
747
|
-
"privacy-policy-notice":
|
|
748
|
-
onSubmit:
|
|
748
|
+
readonly: !j(Ze),
|
|
749
|
+
submitted: j(Ke),
|
|
750
|
+
loading: j(qe),
|
|
751
|
+
error: j(Je),
|
|
752
|
+
"privacy-policy-notice": j(I)?.privacyPolicyNotice,
|
|
753
|
+
onSubmit: j(St)
|
|
749
754
|
}, null, 8, [
|
|
750
755
|
"part",
|
|
751
756
|
"readonly",
|
|
@@ -755,20 +760,20 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
755
760
|
"privacy-policy-notice",
|
|
756
761
|
"onSubmit"
|
|
757
762
|
])]),
|
|
758
|
-
"tool-showSuggestedReply":
|
|
763
|
+
"tool-showSuggestedReply": N(({ part: e }) => [C(j(T), {
|
|
759
764
|
part: e,
|
|
760
|
-
onSelect: (t) =>
|
|
765
|
+
onSelect: (t) => Pn(e, t)
|
|
761
766
|
}, null, 8, ["part", "onSelect"])]),
|
|
762
|
-
"tool-showSources":
|
|
767
|
+
"tool-showSources": N(({ part: e }) => [C(j(ie), {
|
|
763
768
|
part: e,
|
|
764
|
-
"on-expand-context":
|
|
765
|
-
"on-download":
|
|
769
|
+
"on-expand-context": nn,
|
|
770
|
+
"on-download": rn
|
|
766
771
|
}, null, 8, ["part"])]),
|
|
767
|
-
"tool-showForm":
|
|
768
|
-
default:
|
|
772
|
+
"tool-showForm": N(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
773
|
+
default: N(() => [C(j(g), {
|
|
769
774
|
part: e,
|
|
770
|
-
answered:
|
|
771
|
-
onSelect: (t) =>
|
|
775
|
+
answered: Dn(e),
|
|
776
|
+
onSelect: (t) => kn("showForm", e, t)
|
|
772
777
|
}, null, 8, [
|
|
773
778
|
"part",
|
|
774
779
|
"answered",
|
|
@@ -776,12 +781,12 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
776
781
|
])]),
|
|
777
782
|
_: 2
|
|
778
783
|
}, 1024)]),
|
|
779
|
-
"tool-showMultipleChoice":
|
|
780
|
-
default:
|
|
784
|
+
"tool-showMultipleChoice": N(({ part: e }) => [C(_, { mode: "out-in" }, {
|
|
785
|
+
default: N(() => [C(j(g), {
|
|
781
786
|
part: e,
|
|
782
787
|
"allow-custom-answer": "",
|
|
783
|
-
answered:
|
|
784
|
-
onSelect: (t) =>
|
|
788
|
+
answered: Dn(e),
|
|
789
|
+
onSelect: (t) => kn("showMultipleChoice", e, t)
|
|
785
790
|
}, null, 8, [
|
|
786
791
|
"part",
|
|
787
792
|
"answered",
|
|
@@ -789,12 +794,12 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
789
794
|
])]),
|
|
790
795
|
_: 2
|
|
791
796
|
}, 1024)]),
|
|
792
|
-
"tool-requestOAuthConnection":
|
|
797
|
+
"tool-requestOAuthConnection": N(({ part: e }) => [C(j(se), {
|
|
793
798
|
part: e,
|
|
794
|
-
"backend-url":
|
|
795
|
-
"resolve-connection": (e) =>
|
|
796
|
-
"check-connection": (e) =>
|
|
797
|
-
onConnected: (t) =>
|
|
799
|
+
"backend-url": j(Ze),
|
|
800
|
+
"resolve-connection": (e) => j(V).getOAuthAuthorizeUrl(P.agentId, e),
|
|
801
|
+
"check-connection": (e) => j(V).getOAuthConnectionStatus(P.agentId, e),
|
|
802
|
+
onConnected: (t) => In(e, t)
|
|
798
803
|
}, null, 8, [
|
|
799
804
|
"part",
|
|
800
805
|
"backend-url",
|
|
@@ -802,156 +807,161 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
802
807
|
"check-connection",
|
|
803
808
|
"onConnected"
|
|
804
809
|
])]),
|
|
805
|
-
"tool-requestGeolocation":
|
|
810
|
+
"tool-requestGeolocation": N(({ part: e }) => [C(j(oe), {
|
|
806
811
|
part: e,
|
|
807
|
-
"call-live":
|
|
808
|
-
"reverse-geocode": (e, t) =>
|
|
809
|
-
onResult: (t) =>
|
|
812
|
+
"call-live": j(Z).isActive.value,
|
|
813
|
+
"reverse-geocode": (e, t) => j(V).reverseGeocode(e, t),
|
|
814
|
+
onResult: (t) => Fn(e, t)
|
|
810
815
|
}, null, 8, [
|
|
811
816
|
"part",
|
|
812
817
|
"call-live",
|
|
813
818
|
"reverse-geocode",
|
|
814
819
|
"onResult"
|
|
815
820
|
])]),
|
|
816
|
-
"tool-showLocation":
|
|
821
|
+
"tool-showLocation": N(({ part: e }) => [C(j(ce), {
|
|
817
822
|
part: e,
|
|
818
|
-
"is-dark":
|
|
819
|
-
"main-color":
|
|
820
|
-
"forward-geocode": (e, t) =>
|
|
823
|
+
"is-dark": j(tt),
|
|
824
|
+
"main-color": j(I)?.mainColor,
|
|
825
|
+
"forward-geocode": (e, t) => j(V).forwardGeocode(e, t)
|
|
821
826
|
}, null, 8, [
|
|
822
827
|
"part",
|
|
823
828
|
"is-dark",
|
|
824
829
|
"main-color",
|
|
825
830
|
"forward-geocode"
|
|
826
831
|
])]),
|
|
827
|
-
"tool-showDiagram":
|
|
832
|
+
"tool-showDiagram": N(({ part: e }) => [C(j(ue), {
|
|
828
833
|
part: e,
|
|
829
|
-
"is-dark":
|
|
834
|
+
"is-dark": j(tt)
|
|
830
835
|
}, null, 8, ["part", "is-dark"])]),
|
|
831
|
-
"tool-editSpreadsheet":
|
|
832
|
-
key:
|
|
836
|
+
"tool-editSpreadsheet": N(({ part: e }) => [(D(), y(j(k), {
|
|
837
|
+
key: j(s)(e),
|
|
833
838
|
part: e,
|
|
834
839
|
"file-url": W,
|
|
835
|
-
preview:
|
|
836
|
-
"latest-versions":
|
|
837
|
-
restore:
|
|
840
|
+
preview: j($t),
|
|
841
|
+
"latest-versions": Mn.value,
|
|
842
|
+
restore: Nn.value
|
|
838
843
|
}, null, 8, [
|
|
839
844
|
"part",
|
|
840
845
|
"preview",
|
|
841
846
|
"latest-versions",
|
|
842
847
|
"restore"
|
|
843
848
|
]))]),
|
|
844
|
-
"tool-editWordDocument":
|
|
845
|
-
key:
|
|
849
|
+
"tool-editWordDocument": N(({ part: e }) => [(D(), y(j(k), {
|
|
850
|
+
key: j(s)(e),
|
|
846
851
|
part: e,
|
|
847
852
|
"file-url": W,
|
|
848
|
-
preview:
|
|
849
|
-
"latest-versions":
|
|
850
|
-
restore:
|
|
853
|
+
preview: j($t),
|
|
854
|
+
"latest-versions": Mn.value,
|
|
855
|
+
restore: Nn.value
|
|
851
856
|
}, null, 8, [
|
|
852
857
|
"part",
|
|
853
858
|
"preview",
|
|
854
859
|
"latest-versions",
|
|
855
860
|
"restore"
|
|
856
861
|
]))]),
|
|
857
|
-
"tool-createSpreadsheet":
|
|
858
|
-
key:
|
|
862
|
+
"tool-createSpreadsheet": N(({ part: e }) => [(D(), y(j(k), {
|
|
863
|
+
key: j(s)(e),
|
|
859
864
|
part: e,
|
|
860
865
|
"file-url": W,
|
|
861
|
-
preview:
|
|
862
|
-
"latest-versions":
|
|
863
|
-
restore:
|
|
866
|
+
preview: j($t),
|
|
867
|
+
"latest-versions": Mn.value,
|
|
868
|
+
restore: Nn.value
|
|
864
869
|
}, null, 8, [
|
|
865
870
|
"part",
|
|
866
871
|
"preview",
|
|
867
872
|
"latest-versions",
|
|
868
873
|
"restore"
|
|
869
874
|
]))]),
|
|
870
|
-
"tool-createWordDocument":
|
|
871
|
-
key:
|
|
875
|
+
"tool-createWordDocument": N(({ part: e }) => [(D(), y(j(k), {
|
|
876
|
+
key: j(s)(e),
|
|
872
877
|
part: e,
|
|
873
878
|
"file-url": W,
|
|
874
|
-
preview:
|
|
875
|
-
"latest-versions":
|
|
876
|
-
restore:
|
|
879
|
+
preview: j($t),
|
|
880
|
+
"latest-versions": Mn.value,
|
|
881
|
+
restore: Nn.value
|
|
877
882
|
}, null, 8, [
|
|
878
883
|
"part",
|
|
879
884
|
"preview",
|
|
880
885
|
"latest-versions",
|
|
881
886
|
"restore"
|
|
882
887
|
]))]),
|
|
883
|
-
"tool-shareDocument":
|
|
884
|
-
key:
|
|
888
|
+
"tool-shareDocument": N(({ part: e }) => [(D(), y(j(de), {
|
|
889
|
+
key: j(s)(e),
|
|
885
890
|
part: e,
|
|
886
|
-
"on-download":
|
|
891
|
+
"on-download": rn
|
|
887
892
|
}, null, 8, ["part"]))]),
|
|
888
893
|
_: 1
|
|
889
894
|
}, 8, /* @__PURE__ */ "messages.confirm-verdicts-on-call.status.error.main-color.text-color.revised-answers.actions.message-feedbacks.feedback-message-id.feedback-loading.feedback-submitted.feedback-error.show-extended-steps.hide-reasoning.awaiting-spoken-answer.host-working.host-confirmation.is-dark.show-scroll-to-bottom.onRegenerate.onAutoRetry.onResetChat.onUpvote.onDownvote.onFeedback.onApprovalRespond.onHostConfirmRespond".split(".")))]),
|
|
890
895
|
_: 1
|
|
891
896
|
}),
|
|
892
|
-
|
|
897
|
+
j(ct).length ? (D(), y(p, {
|
|
893
898
|
key: 0,
|
|
894
|
-
messages:
|
|
895
|
-
onEdit:
|
|
896
|
-
onRemove:
|
|
899
|
+
messages: j(ct),
|
|
900
|
+
onEdit: j(Mt),
|
|
901
|
+
onRemove: j(Nt)
|
|
897
902
|
}, null, 8, [
|
|
898
903
|
"messages",
|
|
899
904
|
"onEdit",
|
|
900
905
|
"onRemove"
|
|
901
|
-
])) :
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
default:
|
|
906
|
+
])) : b("", !0),
|
|
907
|
+
S("div", Fe, [
|
|
908
|
+
C(_, { name: "pk-chatbot-view-chat-fade" }, {
|
|
909
|
+
default: N(() => [Wt.value ? (D(), y(xe, {
|
|
905
910
|
key: 0,
|
|
906
911
|
class: "pk-chatbot-view-chat__aurora",
|
|
907
912
|
"source-selector": ".pk-chatbot-input__form"
|
|
908
|
-
})) :
|
|
913
|
+
})) : b("", !0)]),
|
|
909
914
|
_: 1
|
|
910
915
|
}),
|
|
911
|
-
|
|
916
|
+
j(Rn) && !j(Xe) ? (D(), y(m, {
|
|
912
917
|
key: 0,
|
|
913
|
-
pending:
|
|
914
|
-
stopping:
|
|
915
|
-
onStop:
|
|
918
|
+
pending: j(Rn),
|
|
919
|
+
stopping: j(zn),
|
|
920
|
+
onStop: j(Bn)
|
|
916
921
|
}, null, 8, [
|
|
917
922
|
"pending",
|
|
918
923
|
"stopping",
|
|
919
924
|
"onStop"
|
|
920
|
-
])) :
|
|
921
|
-
|
|
925
|
+
])) : b("", !0),
|
|
926
|
+
j(Xe) ? (D(), x("div", Ie, A(j(G)("message.chatErrorConversationBlocked")), 1)) : _n.value === "idle" ? (D(), y(f, {
|
|
922
927
|
key: 3,
|
|
923
928
|
ref_key: "inputEl",
|
|
924
|
-
ref:
|
|
925
|
-
modelValue:
|
|
926
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
927
|
-
"pending-attachments":
|
|
928
|
-
"onUpdate:pendingAttachments": n[5] ||= (e) =>
|
|
929
|
-
placeholder:
|
|
930
|
-
"dismissable-notice":
|
|
931
|
-
"page-notice":
|
|
932
|
-
status:
|
|
933
|
-
"max-message-length":
|
|
929
|
+
ref: pt,
|
|
930
|
+
modelValue: j(B),
|
|
931
|
+
"onUpdate:modelValue": n[4] ||= (e) => re(B) ? B.value = e : null,
|
|
932
|
+
"pending-attachments": j(Qe),
|
|
933
|
+
"onUpdate:pendingAttachments": n[5] ||= (e) => re(Qe) ? Qe.value = e : null,
|
|
934
|
+
placeholder: j(Ye),
|
|
935
|
+
"dismissable-notice": j(Ht) && j(R).messages.length <= 1 ? j(Ht) : void 0,
|
|
936
|
+
"page-notice": zt.value,
|
|
937
|
+
status: Lt.value,
|
|
938
|
+
"max-message-length": j(I)?.maxMessageLength,
|
|
934
939
|
"file-upload": U.value,
|
|
935
|
-
"attachment-limit-reached":
|
|
936
|
-
"attachment-notice":
|
|
937
|
-
"voice-enabled":
|
|
938
|
-
"queue-enabled":
|
|
939
|
-
"answer-notices":
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
940
|
+
"attachment-limit-reached": j($e),
|
|
941
|
+
"attachment-notice": Bt.value,
|
|
942
|
+
"voice-enabled": gn.value,
|
|
943
|
+
"queue-enabled": j(st),
|
|
944
|
+
"answer-notices": Vt.value,
|
|
945
|
+
"pointer-available": j(dt),
|
|
946
|
+
pointing: j(ft),
|
|
947
|
+
pointer: mt.value,
|
|
948
|
+
onPoint: n[6] ||= (e) => j(F).pagePointerStart?.(),
|
|
949
|
+
onRemovePointer: n[7] ||= (e) => H.value = void 0,
|
|
950
|
+
onStopGeneration: j(gt),
|
|
951
|
+
onSubmit: j(ht),
|
|
952
|
+
onFileSelect: j(Et),
|
|
953
|
+
onDismissAttachmentNotice: j(Dt),
|
|
954
|
+
onDismissPageNotice: j(At),
|
|
955
|
+
onOpenAnswerNotice: j(Pt),
|
|
956
|
+
onDismissAnswerNotice: j(Ft),
|
|
957
|
+
onVoiceStart: Sn
|
|
958
|
+
}, te({ _: 2 }, [a.modifier === "fullscreen" ? {
|
|
949
959
|
name: "prepend",
|
|
950
|
-
fn:
|
|
960
|
+
fn: N(() => [S("span", Le, [C(u, {
|
|
951
961
|
class: "pk-chatbot-view-chat__agent-chip-avatar",
|
|
952
|
-
"img-src":
|
|
953
|
-
name:
|
|
954
|
-
}, null, 8, ["img-src", "name"]),
|
|
962
|
+
"img-src": j(I)?.logo,
|
|
963
|
+
name: j(F).name
|
|
964
|
+
}, null, 8, ["img-src", "name"]), j(F).name ? (D(), x("strong", Re, A(j(F).name), 1)) : b("", !0)])]),
|
|
955
965
|
key: "0"
|
|
956
966
|
} : void 0]), 1032, [
|
|
957
967
|
"modelValue",
|
|
@@ -967,6 +977,9 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
967
977
|
"voice-enabled",
|
|
968
978
|
"queue-enabled",
|
|
969
979
|
"answer-notices",
|
|
980
|
+
"pointer-available",
|
|
981
|
+
"pointing",
|
|
982
|
+
"pointer",
|
|
970
983
|
"onStopGeneration",
|
|
971
984
|
"onSubmit",
|
|
972
985
|
"onFileSelect",
|
|
@@ -974,21 +987,21 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
974
987
|
"onDismissPageNotice",
|
|
975
988
|
"onOpenAnswerNotice",
|
|
976
989
|
"onDismissAnswerNotice"
|
|
977
|
-
])) : (
|
|
990
|
+
])) : (D(), y(Oe, {
|
|
978
991
|
key: 2,
|
|
979
|
-
state:
|
|
980
|
-
sample:
|
|
981
|
-
spectrum:
|
|
982
|
-
"remaining-seconds":
|
|
992
|
+
state: _n.value,
|
|
993
|
+
sample: bn,
|
|
994
|
+
spectrum: xn,
|
|
995
|
+
"remaining-seconds": j(Z).remainingSeconds.value,
|
|
983
996
|
muted: q.value,
|
|
984
|
-
error:
|
|
985
|
-
"raw-error":
|
|
986
|
-
live:
|
|
997
|
+
error: vn.value,
|
|
998
|
+
"raw-error": j(Z).error.value,
|
|
999
|
+
live: j(Z).isActive.value,
|
|
987
1000
|
class: "pk-chatbot-view-chat__voice",
|
|
988
|
-
onToggleMute:
|
|
989
|
-
onHangUp:
|
|
990
|
-
onRetry:
|
|
991
|
-
onDismiss:
|
|
1001
|
+
onToggleMute: Ln,
|
|
1002
|
+
onHangUp: Cn,
|
|
1003
|
+
onRetry: Tn,
|
|
1004
|
+
onDismiss: wn
|
|
992
1005
|
}, null, 8, [
|
|
993
1006
|
"state",
|
|
994
1007
|
"remaining-seconds",
|
|
@@ -998,23 +1011,23 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
998
1011
|
"live"
|
|
999
1012
|
]))
|
|
1000
1013
|
]),
|
|
1001
|
-
|
|
1002
|
-
default:
|
|
1014
|
+
C(_, null, {
|
|
1015
|
+
default: N(() => [j(an) && U.value?.enabled ? (D(), x("div", ze, [C(r, {
|
|
1003
1016
|
name: "ri:upload-cloud-2-line",
|
|
1004
1017
|
class: "pk-chatbot-view-chat__drop-overlay-icon"
|
|
1005
|
-
}),
|
|
1018
|
+
}), S("span", null, A(j(G)("action.dropFile")), 1)])) : b("", !0)]),
|
|
1006
1019
|
_: 1
|
|
1007
1020
|
}),
|
|
1008
|
-
|
|
1021
|
+
j(K) && Jt.value ? (D(), x("aside", Be, [C(j(ve), {
|
|
1009
1022
|
closable: "",
|
|
1010
|
-
kind:
|
|
1011
|
-
filename:
|
|
1012
|
-
version:
|
|
1013
|
-
"download-url": W(
|
|
1014
|
-
preview:
|
|
1015
|
-
loading:
|
|
1016
|
-
error:
|
|
1017
|
-
onClose:
|
|
1023
|
+
kind: j(K).kind,
|
|
1024
|
+
filename: j(K).filename,
|
|
1025
|
+
version: j(K).version,
|
|
1026
|
+
"download-url": W(j(K).storedFileName),
|
|
1027
|
+
preview: j(Xt),
|
|
1028
|
+
loading: j(Zt),
|
|
1029
|
+
error: j(Qt),
|
|
1030
|
+
onClose: j(en)
|
|
1018
1031
|
}, null, 8, [
|
|
1019
1032
|
"kind",
|
|
1020
1033
|
"filename",
|
|
@@ -1024,16 +1037,16 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
1024
1037
|
"loading",
|
|
1025
1038
|
"error",
|
|
1026
1039
|
"onClose"
|
|
1027
|
-
])])) :
|
|
1028
|
-
|
|
1040
|
+
])])) : b("", !0),
|
|
1041
|
+
j(K) && !Jt.value ? (D(), y(j(ye), {
|
|
1029
1042
|
key: 2,
|
|
1030
|
-
target:
|
|
1031
|
-
"download-url": W(
|
|
1032
|
-
preview:
|
|
1033
|
-
loading:
|
|
1034
|
-
error:
|
|
1035
|
-
fullscreen:
|
|
1036
|
-
onClose:
|
|
1043
|
+
target: j(K),
|
|
1044
|
+
"download-url": W(j(K).storedFileName),
|
|
1045
|
+
preview: j(Xt),
|
|
1046
|
+
loading: j(Zt),
|
|
1047
|
+
error: j(Qt),
|
|
1048
|
+
fullscreen: Yt.value,
|
|
1049
|
+
onClose: j(en)
|
|
1037
1050
|
}, null, 8, [
|
|
1038
1051
|
"target",
|
|
1039
1052
|
"download-url",
|
|
@@ -1042,11 +1055,11 @@ var Pe = { class: "pk-chatbot-view-chat__input-stage" }, Fe = {
|
|
|
1042
1055
|
"error",
|
|
1043
1056
|
"fullscreen",
|
|
1044
1057
|
"onClose"
|
|
1045
|
-
])) :
|
|
1058
|
+
])) : b("", !0)
|
|
1046
1059
|
], 2);
|
|
1047
1060
|
};
|
|
1048
1061
|
}
|
|
1049
1062
|
});
|
|
1050
|
-
export {
|
|
1063
|
+
export { xe as a, Ce as i, Pe as n, Oe as r, Ke as t };
|
|
1051
1064
|
|
|
1052
|
-
//# sourceMappingURL=PkChatbotViewChat-
|
|
1065
|
+
//# sourceMappingURL=PkChatbotViewChat-CQy-k_dp.js.map
|