@8wave/ai-elements 0.117.0-beta.29 → 0.117.0-beta.30
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/dist/_chunks/PkToolShowVideo-C5RfIsFU.js +141 -0
- package/dist/_chunks/PkToolShowVideo-C5RfIsFU.js.map +1 -0
- package/dist/ai-elements.es.js +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-BsTXbdI2.js → PkChatbot-DP2XuKXf.js} +2 -2
- package/dist-vue/_chunks/{PkChatbot-BsTXbdI2.js.map → PkChatbot-DP2XuKXf.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-BDh_t2MT.js → PkChatbotMessages-CVefdmkP.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotMessages-BDh_t2MT.js.map → PkChatbotMessages-CVefdmkP.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-Cd5t_ESd.js → PkChatbotViewChat-BOankj81.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-Cd5t_ESd.js.map → PkChatbotViewChat-BOankj81.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowDiagram-ysQaeMuo.js → PkToolShowDiagram-CjtKqj4N.js} +2 -2
- package/dist-vue/_chunks/{PkToolShowDiagram-ysQaeMuo.js.map → PkToolShowDiagram-CjtKqj4N.js.map} +1 -1
- package/dist-vue/_chunks/PkToolShowVideo-Cw2QqlRI.js +140 -0
- package/dist-vue/_chunks/PkToolShowVideo-Cw2QqlRI.js.map +1 -0
- package/dist-vue/index.js +7 -7
- package/dist-vue/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/PkToolShowVideo-he5c61Er.js +0 -142
- package/dist/_chunks/PkToolShowVideo-he5c61Er.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowVideo-DNqbPNq7.js +0 -141
- package/dist-vue/_chunks/PkToolShowVideo-DNqbPNq7.js.map +0 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { C as e, Ct as t, Dt as n, L as r, O as i, St as a, _ as o, d as s, h as c, it as l, m as u, v as d, wt as f, x as p, z as m } from "./vue.runtime.esm-bundler-DKVd2gci.js";
|
|
2
|
+
import "./src-Dt4rhhPN.js";
|
|
3
|
+
import { t as h } from "./index.es-dTcgyeM4.js";
|
|
4
|
+
import { n as g } from "./chatImagePolicy-CiUR4uD1.js";
|
|
5
|
+
import { t as _ } from "./PkHeldImage-eNPFmmdh.js";
|
|
6
|
+
//#region ../../packages/utils/src/video-source.ts
|
|
7
|
+
var v = (e) => e.replace(/[^a-zA-Z0-9_-]/g, ""), y = (e, t) => e === t || e.endsWith(`.${t}`), b = (e) => {
|
|
8
|
+
if (e.hostname.endsWith("youtu.be")) return v(e.pathname.split("/")[1] ?? "") || null;
|
|
9
|
+
let t = e.searchParams.get("v");
|
|
10
|
+
if (t) return v(t) || null;
|
|
11
|
+
let n = e.pathname.match(/^\/(?:shorts|live|embed|v)\/([^/?#]+)/);
|
|
12
|
+
return n && v(n[1]) || null;
|
|
13
|
+
}, x = (e) => {
|
|
14
|
+
let t = e.pathname.match(/(?:^|\/)(\d+)(?:$|[/?#])/);
|
|
15
|
+
return t ? t[1] : null;
|
|
16
|
+
};
|
|
17
|
+
function S(e, t) {
|
|
18
|
+
let n;
|
|
19
|
+
try {
|
|
20
|
+
n = new URL(e);
|
|
21
|
+
} catch {
|
|
22
|
+
return {
|
|
23
|
+
provider: "file",
|
|
24
|
+
url: e,
|
|
25
|
+
embedUrl: e
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
let r = n.hostname.toLowerCase();
|
|
29
|
+
if (y(r, "youtube.com") || y(r, "youtu.be") || y(r, "youtube-nocookie.com")) {
|
|
30
|
+
let t = b(n);
|
|
31
|
+
if (t) return {
|
|
32
|
+
provider: "youtube",
|
|
33
|
+
url: e,
|
|
34
|
+
videoId: t,
|
|
35
|
+
embedUrl: `https://www.youtube-nocookie.com/embed/${t}`,
|
|
36
|
+
thumbnailUrl: `https://img.youtube.com/vi/${t}/hqdefault.jpg`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
if (y(r, "vimeo.com")) {
|
|
40
|
+
let t = x(n);
|
|
41
|
+
if (t) return {
|
|
42
|
+
provider: "vimeo",
|
|
43
|
+
url: e,
|
|
44
|
+
videoId: t,
|
|
45
|
+
embedUrl: `https://player.vimeo.com/video/${t}?dnt=1`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return t && t !== "file" ? {
|
|
49
|
+
provider: t,
|
|
50
|
+
url: e,
|
|
51
|
+
embedUrl: e
|
|
52
|
+
} : {
|
|
53
|
+
provider: "file",
|
|
54
|
+
url: e,
|
|
55
|
+
embedUrl: e
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../packages/components/src/chat/PkToolShowVideo.vue?vue&type=script&setup=true&lang.ts
|
|
60
|
+
i(), t(), l();
|
|
61
|
+
var C = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "border border-surface-3 rounded-xl w-full overflow-hidden bg-surface"
|
|
64
|
+
}, w = { class: "px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40" }, T = { class: "font-bold" }, E = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "w-full overflow-hidden",
|
|
67
|
+
style: { "aspect-ratio": "16 / 9" }
|
|
68
|
+
}, D = ["src", "poster"], O = ["href"], k = {
|
|
69
|
+
key: 2,
|
|
70
|
+
class: "relative w-full overflow-hidden bg-black",
|
|
71
|
+
style: { "aspect-ratio": "16 / 9" }
|
|
72
|
+
}, A = ["src", "title"], j = {
|
|
73
|
+
key: 3,
|
|
74
|
+
class: "p-sm flex flex-col gap-4 border-t border-surface-3"
|
|
75
|
+
}, M = {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: "font-bold text-14"
|
|
78
|
+
}, N = {
|
|
79
|
+
key: 1,
|
|
80
|
+
class: "text-12 text-word-3"
|
|
81
|
+
}, P = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", F = /* @__PURE__ */ e({
|
|
82
|
+
__name: "PkToolShowVideo",
|
|
83
|
+
props: { part: { type: null } },
|
|
84
|
+
setup(e) {
|
|
85
|
+
let t = e, i = ["www.youtube-nocookie.com", "player.vimeo.com"], l = g(), v = u(() => (t.part.input?.videos ?? []).map((e) => {
|
|
86
|
+
let t = S(e.url, e.provider), n = (t.provider === "file" ? [t.embedUrl, e.poster] : [t.embedUrl]).filter((e) => !!e && !i.includes(l.hostOf(e) ?? ""));
|
|
87
|
+
return {
|
|
88
|
+
...e,
|
|
89
|
+
source: t,
|
|
90
|
+
gated: n,
|
|
91
|
+
held: n.some((e) => !l.canLoad(e))
|
|
92
|
+
};
|
|
93
|
+
}));
|
|
94
|
+
function y(e) {
|
|
95
|
+
for (let t of e) l.release(t);
|
|
96
|
+
}
|
|
97
|
+
return (e, t) => {
|
|
98
|
+
let i = h;
|
|
99
|
+
return v.value.length ? (r(), d("div", C, [c("div", w, [p(i, {
|
|
100
|
+
name: "ri:film-line",
|
|
101
|
+
class: "text-16"
|
|
102
|
+
}), c("strong", T, n(e.$t("label.video")), 1)]), (r(!0), d(s, null, m(v.value, (e, t) => (r(), d("div", {
|
|
103
|
+
key: e.url,
|
|
104
|
+
class: f(["flex flex-col", { "border-t border-surface-3": t > 0 }])
|
|
105
|
+
}, [e.held ? (r(), d("div", E, [p(_, {
|
|
106
|
+
host: a(l).hostOf(e.gated[0]),
|
|
107
|
+
kind: "video",
|
|
108
|
+
fill: "",
|
|
109
|
+
onRelease: (t) => y(e.gated)
|
|
110
|
+
}, null, 8, ["host", "onRelease"])])) : e.source.provider === "file" ? (r(), d("video", {
|
|
111
|
+
key: 1,
|
|
112
|
+
src: e.source.embedUrl,
|
|
113
|
+
poster: e.poster,
|
|
114
|
+
controls: "",
|
|
115
|
+
preload: "metadata",
|
|
116
|
+
playsinline: "",
|
|
117
|
+
class: "w-full bg-black",
|
|
118
|
+
style: {
|
|
119
|
+
"aspect-ratio": "16 / 9",
|
|
120
|
+
"max-height": "480px"
|
|
121
|
+
}
|
|
122
|
+
}, [c("a", {
|
|
123
|
+
href: e.url,
|
|
124
|
+
target: "_blank",
|
|
125
|
+
rel: "noopener noreferrer"
|
|
126
|
+
}, n(e.title ?? e.url), 9, O)], 8, D)) : (r(), d("div", k, [c("iframe", {
|
|
127
|
+
src: e.source.embedUrl,
|
|
128
|
+
title: e.title ?? e.url,
|
|
129
|
+
loading: "lazy",
|
|
130
|
+
referrerpolicy: "strict-origin-when-cross-origin",
|
|
131
|
+
allow: P,
|
|
132
|
+
allowfullscreen: "",
|
|
133
|
+
class: "absolute inset-0 w-full h-full border-0"
|
|
134
|
+
}, null, 8, A)])), e.title || e.description ? (r(), d("div", j, [e.title ? (r(), d("strong", M, n(e.title), 1)) : o("", !0), e.description ? (r(), d("span", N, n(e.description), 1)) : o("", !0)])) : o("", !0)], 2))), 128))])) : o("", !0);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
//#endregion
|
|
139
|
+
export { F as default };
|
|
140
|
+
|
|
141
|
+
//# sourceMappingURL=PkToolShowVideo-C5RfIsFU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PkToolShowVideo-C5RfIsFU.js","names":["$t","__unplugin_components_0","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_toDisplayString","_Fragment","_renderList","_normalizeClass","PkHeldImage","_unref","_createCommentVNode","_sfc_main","defineComponent","init_shared_esm_bundler","toDisplayString","openBlock","init_runtime_core_esm_bundler","unref","createCommentVNode","Fragment","createBaseVNode","init_reactivity_esm_bundler","computed","createElementBlock","normalizeClass","createVNode","renderList","Ae","useChatImageGate","PkHeldImage_default","sanitizeId","raw","hostMatches","host","domain","youtubeId","u","v","m","vimeoId","parseVideoSource","url","id","hint","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","IFRAME_ALLOW","PkToolShowVideo_default","props","__props","PLAYER_HOSTS","imageGate","videos","source","video","gated","src","release","urls","_component_VvIcon","_ctx","index"],"sources":["../../../../packages/utils/src/video-source.ts","../../../../packages/components/src/chat/PkToolShowVideo.vue","../../../../packages/components/src/chat/PkToolShowVideo.vue"],"sourcesContent":["/**\n * Video source parsing shared by the backend platform renderer and the frontend\n * player component, so both classify a video URL the same way.\n *\n * A URL is either a known provider (YouTube/Vimeo), which plays through the\n * provider's iframe embed, or a direct media file (`file`), which plays in a\n * native `<video>` element. Detection is by URL shape; an explicit `hint` is\n * used only as a fallback when the URL alone is inconclusive.\n */\n\nexport type VideoProvider = 'youtube' | 'vimeo' | 'file'\n\nexport interface ParsedVideoSource {\n provider: VideoProvider\n /** The original URL, unchanged. */\n url: string\n /**\n * The URL to actually load: the provider iframe embed URL for\n * YouTube/Vimeo, or the direct file URL for `file`.\n */\n embedUrl: string\n /** The provider video id (providers only). */\n videoId?: string\n /**\n * A preview image URL derived from the provider, when one is available\n * without an extra API call (currently YouTube only). Lets a link-only\n * surface (e.g. a Teams card) show a thumbnail instead of a bare link.\n */\n thumbnailUrl?: string\n}\n\n/** Keep only characters that are legal in a provider video id. */\nconst sanitizeId = (raw: string): string => raw.replace(/[^a-zA-Z0-9_-]/g, '')\n\n/**\n * True when `host` is exactly `domain` or a subdomain of it. Guards against\n * lookalike hosts (e.g. `notyoutube.com`) that a bare substring check would\n * misclassify.\n */\nconst hostMatches = (host: string, domain: string): boolean =>\n host === domain || host.endsWith(`.${domain}`)\n\n/** Extract the YouTube video id from any of its URL shapes, or null. */\nconst youtubeId = (u: URL): string | null => {\n // youtu.be/<id>\n if (u.hostname.endsWith('youtu.be')) {\n return sanitizeId(u.pathname.split('/')[1] ?? '') || null\n }\n // youtube.com/watch?v=<id>\n const v = u.searchParams.get('v')\n if (v) {\n return sanitizeId(v) || null\n }\n // youtube.com/shorts/<id>, /live/<id>, /embed/<id>, /v/<id>\n const m = u.pathname.match(/^\\/(?:shorts|live|embed|v)\\/([^/?#]+)/)\n return m ? sanitizeId(m[1]) || null : null\n}\n\n/** Extract the Vimeo (numeric) video id, or null. */\nconst vimeoId = (u: URL): string | null => {\n // player.vimeo.com/video/<id> or vimeo.com/<id>\n const m = u.pathname.match(/(?:^|\\/)(\\d+)(?:$|[/?#])/)\n return m ? m[1] : null\n}\n\n/**\n * Classify a video URL into a provider + a loadable embed/file URL.\n * Falls back to `file` (native `<video>`) for anything not recognized as a\n * supported provider, or when a provider is matched but no id can be extracted.\n */\nexport function parseVideoSource(\n url: string,\n hint?: VideoProvider,\n): ParsedVideoSource {\n let u: URL | undefined\n try {\n u = new URL(url)\n } catch {\n // Not an absolute URL: treat as a direct file reference.\n return { provider: 'file', url, embedUrl: url }\n }\n\n const host = u.hostname.toLowerCase()\n\n const isYouTube =\n hostMatches(host, 'youtube.com') ||\n hostMatches(host, 'youtu.be') ||\n hostMatches(host, 'youtube-nocookie.com')\n if (isYouTube) {\n const id = youtubeId(u)\n if (id) {\n return {\n provider: 'youtube',\n url,\n videoId: id,\n embedUrl: `https://www.youtube-nocookie.com/embed/${id}`,\n thumbnailUrl: `https://img.youtube.com/vi/${id}/hqdefault.jpg`,\n }\n }\n }\n\n if (hostMatches(host, 'vimeo.com')) {\n const id = vimeoId(u)\n if (id) {\n return {\n provider: 'vimeo',\n url,\n videoId: id,\n // `dnt=1`: the player sets no cookies and records no session\n // data, the Vimeo counterpart of youtube-nocookie above.\n embedUrl: `https://player.vimeo.com/video/${id}?dnt=1`,\n }\n }\n }\n\n // Honor an explicit provider hint only if we could not extract an id from a\n // provider URL (so a caller-tagged provider link still routes to an iframe\n // via its original URL rather than a broken native <video>).\n if (hint && hint !== 'file') {\n return { provider: hint, url, embedUrl: url }\n }\n\n return { provider: 'file', url, embedUrl: url }\n}\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { parseVideoSource, type VideoProvider } from 'utils'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n interface VideoInput {\n url: string\n title?: string\n description?: string\n poster?: string\n provider?: VideoProvider\n }\n\n // Permissions granted to provider embeds (YouTube/Vimeo players).\n const IFRAME_ALLOW =\n 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'\n\n /**\n * Where a YouTube or Vimeo player lives: the url is built here from the\n * video id, so nothing the model wrote reaches these hosts but the id.\n */\n const PLAYER_HOSTS = ['www.youtube-nocookie.com', 'player.vimeo.com']\n\n // A file, its poster, or an embed this card does not recognize, fetch the\n // url the model wrote as soon as they render: from a host the agent does\n // not list they wait for a click, like an image (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n\n const videos = computed(() => {\n const part = props.part as { input?: { videos?: VideoInput[] } }\n return (part.input?.videos ?? []).map((video) => {\n const source = parseVideoSource(video.url, video.provider)\n const fetched =\n source.provider === 'file'\n ? [source.embedUrl, video.poster]\n : [source.embedUrl]\n const gated = fetched.filter(\n (src): src is string =>\n !!src &&\n !PLAYER_HOSTS.includes(imageGate.hostOf(src) ?? ''),\n )\n return {\n ...video,\n source,\n gated,\n held: gated.some((src) => !imageGate.canLoad(src)),\n }\n })\n })\n\n function release(urls: string[]) {\n for (const url of urls) {\n imageGate.release(url)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"videos.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:film-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.video') }}\n </strong>\n </div>\n <!-- Each video bleeds to the card's edges, like the map of the\n location card: the card's overflow clips the bottom corners. -->\n <div\n v-for=\"(video, index) in videos\"\n :key=\"video.url\"\n class=\"flex flex-col\"\n :class=\"{ 'border-t border-surface-3': index > 0 }\">\n <!-- Direct file: native player. Handles MP4/WebM/OGG and works\n inside the widget's Shadow DOM without any extra CSS. -->\n <div\n v-if=\"video.held\"\n class=\"w-full overflow-hidden\"\n style=\"aspect-ratio: 16 / 9\">\n <PkHeldImage\n :host=\"imageGate.hostOf(video.gated[0])\"\n kind=\"video\"\n fill\n @release=\"release(video.gated)\" />\n </div>\n <video\n v-else-if=\"video.source.provider === 'file'\"\n :src=\"video.source.embedUrl\"\n :poster=\"video.poster\"\n controls\n preload=\"metadata\"\n playsinline\n class=\"w-full bg-black\"\n style=\"aspect-ratio: 16 / 9; max-height: 480px\">\n <a :href=\"video.url\" target=\"_blank\" rel=\"noopener noreferrer\">\n {{ video.title ?? video.url }}\n </a>\n </video>\n <!-- Provider (YouTube/Vimeo): iframe embed, 16:9 responsive. -->\n <div\n v-else\n class=\"relative w-full overflow-hidden bg-black\"\n style=\"aspect-ratio: 16 / 9\">\n <iframe\n :src=\"video.source.embedUrl\"\n :title=\"video.title ?? video.url\"\n loading=\"lazy\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n :allow=\"IFRAME_ALLOW\"\n allowfullscreen\n class=\"absolute inset-0 w-full h-full border-0\"></iframe>\n </div>\n <div\n v-if=\"video.title || video.description\"\n class=\"p-sm flex flex-col gap-4 border-t border-surface-3\">\n <strong v-if=\"video.title\" class=\"font-bold text-14\">\n {{ video.title }}\n </strong>\n <span v-if=\"video.description\" class=\"text-12 text-word-3\">\n {{ video.description }}\n </span>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { parseVideoSource, type VideoProvider } from 'utils'\n import { useChatImageGate } from './chatImagePolicy'\n import PkHeldImage from './PkHeldImage.vue'\n\n const props = defineProps<{\n part: unknown\n }>()\n\n interface VideoInput {\n url: string\n title?: string\n description?: string\n poster?: string\n provider?: VideoProvider\n }\n\n // Permissions granted to provider embeds (YouTube/Vimeo players).\n const IFRAME_ALLOW =\n 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'\n\n /**\n * Where a YouTube or Vimeo player lives: the url is built here from the\n * video id, so nothing the model wrote reaches these hosts but the id.\n */\n const PLAYER_HOSTS = ['www.youtube-nocookie.com', 'player.vimeo.com']\n\n // A file, its poster, or an embed this card does not recognize, fetch the\n // url the model wrote as soon as they render: from a host the agent does\n // not list they wait for a click, like an image (chatImagePolicy.ts).\n const imageGate = useChatImageGate()\n\n const videos = computed(() => {\n const part = props.part as { input?: { videos?: VideoInput[] } }\n return (part.input?.videos ?? []).map((video) => {\n const source = parseVideoSource(video.url, video.provider)\n const fetched =\n source.provider === 'file'\n ? [source.embedUrl, video.poster]\n : [source.embedUrl]\n const gated = fetched.filter(\n (src): src is string =>\n !!src &&\n !PLAYER_HOSTS.includes(imageGate.hostOf(src) ?? ''),\n )\n return {\n ...video,\n source,\n gated,\n held: gated.some((src) => !imageGate.canLoad(src)),\n }\n })\n })\n\n function release(urls: string[]) {\n for (const url of urls) {\n imageGate.release(url)\n }\n }\n</script>\n\n<template>\n <div\n v-if=\"videos.length\"\n class=\"border border-surface-3 rounded-xl w-full overflow-hidden bg-surface\">\n <div\n class=\"px-sm py-6 bg-surface-1 text-12 border-b border-surface-3 text-word-3 flex items-center gap-8 min-h-40\">\n <VvIcon name=\"ri:film-line\" class=\"text-16\" />\n <strong class=\"font-bold\">\n {{ $t('label.video') }}\n </strong>\n </div>\n <!-- Each video bleeds to the card's edges, like the map of the\n location card: the card's overflow clips the bottom corners. -->\n <div\n v-for=\"(video, index) in videos\"\n :key=\"video.url\"\n class=\"flex flex-col\"\n :class=\"{ 'border-t border-surface-3': index > 0 }\">\n <!-- Direct file: native player. Handles MP4/WebM/OGG and works\n inside the widget's Shadow DOM without any extra CSS. -->\n <div\n v-if=\"video.held\"\n class=\"w-full overflow-hidden\"\n style=\"aspect-ratio: 16 / 9\">\n <PkHeldImage\n :host=\"imageGate.hostOf(video.gated[0])\"\n kind=\"video\"\n fill\n @release=\"release(video.gated)\" />\n </div>\n <video\n v-else-if=\"video.source.provider === 'file'\"\n :src=\"video.source.embedUrl\"\n :poster=\"video.poster\"\n controls\n preload=\"metadata\"\n playsinline\n class=\"w-full bg-black\"\n style=\"aspect-ratio: 16 / 9; max-height: 480px\">\n <a :href=\"video.url\" target=\"_blank\" rel=\"noopener noreferrer\">\n {{ video.title ?? video.url }}\n </a>\n </video>\n <!-- Provider (YouTube/Vimeo): iframe embed, 16:9 responsive. -->\n <div\n v-else\n class=\"relative w-full overflow-hidden bg-black\"\n style=\"aspect-ratio: 16 / 9\">\n <iframe\n :src=\"video.source.embedUrl\"\n :title=\"video.title ?? video.url\"\n loading=\"lazy\"\n referrerpolicy=\"strict-origin-when-cross-origin\"\n :allow=\"IFRAME_ALLOW\"\n allowfullscreen\n class=\"absolute inset-0 w-full h-full border-0\"></iframe>\n </div>\n <div\n v-if=\"video.title || video.description\"\n class=\"p-sm flex flex-col gap-4 border-t border-surface-3\">\n <strong v-if=\"video.title\" class=\"font-bold text-14\">\n {{ video.title }}\n </strong>\n <span v-if=\"video.description\" class=\"text-12 text-word-3\">\n {{ video.description }}\n </span>\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;AAgCA,IAAMgC,KAAc,MAAwBC,EAAI,QAAQ,mBAAmB,EAAE,GAOvEC,KAAe,GAAc,MAC/BC,MAASC,KAAUD,EAAK,SAAS,IAAIC,GAAQ,GAG3CC,KAAa,MAA0B;CAEzC,IAAIC,EAAE,SAAS,SAAS,UAAU,GAC9B,OAAON,EAAWM,EAAE,SAAS,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK;CAGzD,IAAMC,IAAID,EAAE,aAAa,IAAI,GAAG;CAChC,IAAIC,GACA,OAAOP,EAAWO,CAAC,KAAK;CAG5B,IAAMC,IAAIF,EAAE,SAA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AA,cAAA;IAAA;GACA7D,GAAAA,CAAAA,EAEI,KAAA;IAFA,MAAM6D,EAAM;IAAK,QAAO;IAAS,KAAI;GAClC,GAAA3D,EAAA2D,EAAM,SAASA,EAAM,GAAG,GAAA,GAAAd,CAAA,CAAA,GAAA,GAAAD,CAAA,MAInChD,EAAA,GAAAC,EAYM,OAZNiD,GAYM,CARFhD,EAO6D,UAAA;IANxD,KAAK6D,EAAM,OAAO;IAClB,OAAOA,EAAM,SAASA,EAAM;IAC7B,SAAQ;IACR,gBAAe;IACd,OAAOR;IACR,iBAAA;IACA,OAAM;GAGJ,GAAA,MAAA,GAAAJ,CAAA,CAAA,CAAA,IAAAY,EAAM,SAASA,EAAM,eAD/B/D,EAAA,GAAAC,EASM,OATNmD,GASM,CANYW,EAAM,SAApB/D,EAAA,GAAAC,EAES,UAFToD,GAESjD,EADF2D,EAAM,KAAK,GAAA,CAAA,KAAA7C,EAAA,IAAA,EAAA,GAEN6C,EAAM,eAAlB/D,EAAA,GAAAC,EAEO,QAFPqD,GAEOlD,EADA2D,EAAM,WAAW,GAAA,CAAA,KAAA7C,EAAA,IAAA,EAAA,CAAA,CAAA,KAAAA,EAAA,IAAA,EAAA,CAAA,GAAA,CAAA"}
|
package/dist/ai-elements.es.js
CHANGED
|
@@ -11782,7 +11782,7 @@ var um = {
|
|
|
11782
11782
|
showQrCode: N(() => import("./_chunks/PkToolShowQrCode-B70jPHDw.js")),
|
|
11783
11783
|
showSources: N(() => import("./_chunks/PkToolShowSources-eheNtJG8.js")),
|
|
11784
11784
|
showSuggestedReply: N(() => import("./_chunks/PkToolShowSuggestedReply-0RVUEzK_.js")),
|
|
11785
|
-
showVideo: N(() => import("./_chunks/PkToolShowVideo-
|
|
11785
|
+
showVideo: N(() => import("./_chunks/PkToolShowVideo-C5RfIsFU.js")),
|
|
11786
11786
|
showWeather: N(() => import("./_chunks/PkToolShowWeather-BFOlS1AS.js")),
|
|
11787
11787
|
showWebPages: N(() => import("./_chunks/PkToolShowWebPages-D-sv52_o.js"))
|
|
11788
11788
|
};
|
package/dist-vue/PkChatbot.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as default } from "./_chunks/PkChatbot-
|
|
1
|
+
export { t as default } from "./_chunks/PkChatbot-DP2XuKXf.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as default } from "./_chunks/PkChatbotMessages-
|
|
1
|
+
export { t as default } from "./_chunks/PkChatbotMessages-CVefdmkP.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as default } from "./_chunks/PkChatbotViewChat-
|
|
1
|
+
export { t as default } from "./_chunks/PkChatbotViewChat-BOankj81.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e, t } from "./PkStreamingMarkdown-By0JBQUl.js";
|
|
2
2
|
import { n } from "./useChatbotStore-Dmxnn4xV.js";
|
|
3
3
|
import { t as ee } from "./PkChatbotViewConversations-uaKc5XAv.js";
|
|
4
|
-
import { t as te } from "./PkChatbotViewChat-
|
|
4
|
+
import { t as te } from "./PkChatbotViewChat-BOankj81.js";
|
|
5
5
|
import { t as r } from "./useShortUrlResolver-DI8ycJiO.js";
|
|
6
6
|
import { t as ne } from "./PkChatbotViewFiles-53zY5v4R.js";
|
|
7
7
|
import { t as i } from "./useLocalizedString-PfaKjIQY.js";
|
|
@@ -272,4 +272,4 @@ var be = { class: "pk-chatbot__header-start" }, xe = ["title"], Se = { key: 1 },
|
|
|
272
272
|
//#endregion
|
|
273
273
|
export { A as t };
|
|
274
274
|
|
|
275
|
-
//# sourceMappingURL=PkChatbot-
|
|
275
|
+
//# sourceMappingURL=PkChatbot-DP2XuKXf.js.map
|