@vc-shell/framework 2.5.0-pr326.40af648 → 2.5.0-pr327.faf792b
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/ai-agent/index.js +3 -3
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-BUqJaQp0.js} +422 -433
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-BUqJaQp0.js.map +1 -0
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js} +2 -2
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-JB7OKRk6.js.map → VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js.map} +1 -1
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-CsoZiFbY.js → VcScheduler.vue_vue_type_script_setup_true_lang-KiYomASz.js} +3995 -3940
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-KiYomASz.js.map +1 -0
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-BQ09AUgy.js → VcScheduler.vue_vue_type_style_index_0_lang-CwXsJo6H.js} +4 -4
- package/dist/chunks/{VcScheduler.vue_vue_type_style_index_0_lang-BQ09AUgy.js.map → VcScheduler.vue_vue_type_style_index_0_lang-CwXsJo6H.js.map} +1 -1
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-C0IjvNtI.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-DIV6xL6V.js} +2 -2
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-C0IjvNtI.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-DIV6xL6V.js.map} +1 -1
- package/dist/chunks/{index-DLsURdJp.js → index-CpPgch-Q.js} +2 -2
- package/dist/chunks/{index-DLsURdJp.js.map → index-CpPgch-Q.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-components-B3XvEasa.js → vendor-vueuse-components-CoR2FSn3.js} +1 -1
- package/dist/chunks/{vendor-vueuse-components-B3XvEasa.js.map → vendor-vueuse-components-CoR2FSn3.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-core-_wFDcFkI.js → vendor-vueuse-core-BFa9je5E.js} +1 -1
- package/dist/chunks/{vendor-vueuse-core-_wFDcFkI.js.map → vendor-vueuse-core-BFa9je5E.js.map} +1 -1
- package/dist/chunks/{vendor-vueuse-shared-CiuC98Kk.js → vendor-vueuse-shared-kZH3-Km1.js} +44 -28
- package/dist/chunks/{vendor-vueuse-shared-CiuC98Kk.js.map → vendor-vueuse-shared-kZH3-Km1.js.map} +1 -1
- package/dist/core/blade-navigation/types/index.d.ts +0 -7
- package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +671 -703
- package/dist/framework.js.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-navigation/vc-blade-navigation-new.vue.d.ts.map +1 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts +0 -1
- package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
- package/dist/test-helpers.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/index.js +3 -3
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-y-eKcMMU.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-CsoZiFbY.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { ref as N, computed as E, shallowRef as
|
|
2
|
-
import { c as
|
|
1
|
+
import { ref as N, computed as E, shallowRef as We, watch as q, getCurrentInstance as oe, inject as F, isRef as ze, provide as De, defineComponent as X, openBlock as I, createElementBlock as k, createElementVNode as A, createCommentVNode as Z, createStaticVNode as qe, Fragment as Te, renderList as Ze, toDisplayString as z, createVNode as L, createBlock as ue, unref as O, withCtx as G, withKeys as K, withModifiers as H, createTextVNode as be, Transition as Le, normalizeClass as Ne, onUnmounted as Xe, normalizeStyle as Ye } from "vue";
|
|
2
|
+
import { c as Y, b as Fe, d as je, B as Qe, e as Je, f as et, N as tt, A as xe, L as nt, g as at, T as ot, a as Ae, _ as de, E as rt } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-0llGMIi1.js";
|
|
3
3
|
import { c as re } from "./vendor-lodash-es-D2n90GJy.js";
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
const
|
|
4
|
+
import { u as it } from "./vendor-vueuse-core-BFa9je5E.js";
|
|
5
|
+
import { u as st } from "./vendor-vue-i18n-LO-EJStU.js";
|
|
6
|
+
const lt = {
|
|
7
7
|
url: "",
|
|
8
8
|
title: "Virto OZ",
|
|
9
9
|
width: 362,
|
|
10
10
|
expandedWidth: 500,
|
|
11
11
|
// Secure by default: no origins trusted until the embedder configures them.
|
|
12
12
|
allowedOrigins: []
|
|
13
|
-
},
|
|
13
|
+
}, An = "APP_AI_AGENT_URL", yn = {
|
|
14
14
|
EMBEDDED_APP_READY: "EMBEDDED_APP_READY",
|
|
15
15
|
AI_TOGGLE_PANEL: "AI_TOGGLE_PANEL",
|
|
16
16
|
AI_CONTEXT_UPDATE: "AI_CONTEXT_UPDATE",
|
|
17
17
|
AI_CONTEXT_CLEAR: "AI_CONTEXT_CLEAR"
|
|
18
|
-
},
|
|
18
|
+
}, Bn = {
|
|
19
19
|
EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
|
|
20
20
|
AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
|
|
21
|
-
},
|
|
22
|
-
function
|
|
21
|
+
}, ct = "ai-agent-toggle", dt = "lucide-sparkles", ut = "AI Assistant", ie = Y("ai-agent-panel");
|
|
22
|
+
function pt() {
|
|
23
23
|
const e = N("closed"), r = N(!1), a = E(() => e.value !== "closed"), t = E(() => e.value === "expanded"), o = () => {
|
|
24
|
-
e.value === "closed" && (e.value = "open",
|
|
25
|
-
},
|
|
26
|
-
e.value = "closed", r.value = !1,
|
|
24
|
+
e.value === "closed" && (e.value = "open", ie.debug("Panel opened"));
|
|
25
|
+
}, l = () => {
|
|
26
|
+
e.value = "closed", r.value = !1, ie.debug("Panel closed, reset initialized state");
|
|
27
27
|
};
|
|
28
28
|
return {
|
|
29
29
|
panelState: e,
|
|
@@ -31,22 +31,22 @@ function ft() {
|
|
|
31
31
|
isExpanded: t,
|
|
32
32
|
isInitialized: r,
|
|
33
33
|
open: o,
|
|
34
|
-
close:
|
|
34
|
+
close: l,
|
|
35
35
|
toggle: () => {
|
|
36
|
-
e.value === "closed" ? o() :
|
|
36
|
+
e.value === "closed" ? o() : l();
|
|
37
37
|
},
|
|
38
38
|
expand: () => {
|
|
39
|
-
e.value === "open" && (e.value = "expanded",
|
|
39
|
+
e.value === "open" && (e.value = "expanded", ie.debug("Panel expanded"));
|
|
40
40
|
},
|
|
41
41
|
collapse: () => {
|
|
42
|
-
e.value === "expanded" && (e.value = "open",
|
|
42
|
+
e.value === "expanded" && (e.value = "open", ie.debug("Panel collapsed"));
|
|
43
43
|
},
|
|
44
44
|
resetInitialized: () => {
|
|
45
45
|
r.value = !1;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
const ye =
|
|
49
|
+
const ye = Y("ai-agent-context");
|
|
50
50
|
function Se(e) {
|
|
51
51
|
return e ? {
|
|
52
52
|
id: e.id,
|
|
@@ -55,10 +55,10 @@ function Se(e) {
|
|
|
55
55
|
param: e.param
|
|
56
56
|
} : { id: "unknown", name: "unknown", title: "Unknown" };
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const { userGetter: r, bladeGetter: a, localeGetter: t, tokenGetter: o } = e,
|
|
58
|
+
function ft(e) {
|
|
59
|
+
const { userGetter: r, bladeGetter: a, localeGetter: t, tokenGetter: o } = e, l = N(/* @__PURE__ */ new Map()), C = () => {
|
|
60
60
|
const v = a();
|
|
61
|
-
return v ?
|
|
61
|
+
return v ? l.value.get(v.id) ?? {
|
|
62
62
|
items: [],
|
|
63
63
|
type: "list",
|
|
64
64
|
suggestions: void 0
|
|
@@ -67,15 +67,15 @@ function gt(e) {
|
|
|
67
67
|
type: "list",
|
|
68
68
|
suggestions: void 0
|
|
69
69
|
};
|
|
70
|
-
}, d = E(() => C().items),
|
|
70
|
+
}, d = E(() => C().items), s = E(() => C().type), u = E(() => C().suggestions), g = E(() => d.value.length);
|
|
71
71
|
return {
|
|
72
72
|
contextItems: d,
|
|
73
|
-
contextType:
|
|
73
|
+
contextType: s,
|
|
74
74
|
contextSuggestions: u,
|
|
75
75
|
totalItemsCount: g,
|
|
76
|
-
setContextData: (v, _,
|
|
76
|
+
setContextData: (v, _, T, M) => {
|
|
77
77
|
const D = a()?.id || M;
|
|
78
|
-
return D ? v.length === 0 && !
|
|
78
|
+
return D ? v.length === 0 && !T ? (l.value.delete(D), ye.debug(`Context cleared for blade: ${D}`), { cleared: !0 }) : (l.value.set(D, { items: v, type: _, suggestions: T }), ye.debug(`Context set for blade: ${D}, items: ${v.length}, type: ${_}`), { cleared: !1 }) : (ye.warn("Cannot set context data: no blade id available"), { cleared: !1 });
|
|
79
79
|
},
|
|
80
80
|
buildInitPayload: async () => {
|
|
81
81
|
const v = o ? await o() ?? void 0 : void 0;
|
|
@@ -83,7 +83,7 @@ function gt(e) {
|
|
|
83
83
|
userId: r()?.id || "",
|
|
84
84
|
locale: t(),
|
|
85
85
|
blade: Se(a()),
|
|
86
|
-
contextType:
|
|
86
|
+
contextType: s.value,
|
|
87
87
|
items: re(d.value),
|
|
88
88
|
suggestions: u.value ? re(u.value) : void 0,
|
|
89
89
|
accessToken: v
|
|
@@ -93,7 +93,7 @@ function gt(e) {
|
|
|
93
93
|
const v = o ? await o() ?? void 0 : void 0;
|
|
94
94
|
return {
|
|
95
95
|
blade: Se(a()),
|
|
96
|
-
contextType:
|
|
96
|
+
contextType: s.value,
|
|
97
97
|
items: re(d.value),
|
|
98
98
|
suggestions: u.value ? re(u.value) : void 0,
|
|
99
99
|
locale: t(),
|
|
@@ -102,13 +102,13 @@ function gt(e) {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
const P =
|
|
106
|
-
function
|
|
107
|
-
const { getConfig: r, isEmbedded: a, navigateToBlade: t, closePanel: o } = e,
|
|
108
|
-
function g(f,
|
|
105
|
+
const P = Y("ai-agent-transport");
|
|
106
|
+
function gt(e) {
|
|
107
|
+
const { getConfig: r, isEmbedded: a, navigateToBlade: t, closePanel: o } = e, l = We(null), C = N(!1), d = N(!1), s = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
108
|
+
function g(f, b) {
|
|
109
109
|
switch (f) {
|
|
110
110
|
case "NAVIGATE_TO_APP": {
|
|
111
|
-
const _ =
|
|
111
|
+
const _ = b;
|
|
112
112
|
t && _?.bladeName && (t(_.bladeName, _.param, _.options), P.debug(`Navigation requested to: ${_.bladeName}`));
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
@@ -123,14 +123,14 @@ function vt(e) {
|
|
|
123
123
|
}
|
|
124
124
|
const v = {
|
|
125
125
|
type: f,
|
|
126
|
-
payload:
|
|
126
|
+
payload: b,
|
|
127
127
|
timestamp: Date.now()
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
s.forEach((_) => {
|
|
130
130
|
try {
|
|
131
131
|
_(v);
|
|
132
|
-
} catch (
|
|
133
|
-
P.error("Handler error:",
|
|
132
|
+
} catch (T) {
|
|
133
|
+
P.error("Handler error:", T);
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
}
|
|
@@ -151,16 +151,16 @@ function vt(e) {
|
|
|
151
151
|
}
|
|
152
152
|
if (!v.includes(f.origin))
|
|
153
153
|
return;
|
|
154
|
-
const _ = a ? window.parent :
|
|
154
|
+
const _ = a ? window.parent : l.value?.contentWindow;
|
|
155
155
|
if (!_ || f.source !== _)
|
|
156
156
|
return;
|
|
157
|
-
const
|
|
158
|
-
if (!(!
|
|
159
|
-
switch (P.debug(`Message received: ${
|
|
157
|
+
const T = f.data;
|
|
158
|
+
if (!(!T?.type || typeof T.type != "string"))
|
|
159
|
+
switch (P.debug(`Message received: ${T.type}`), T.type) {
|
|
160
160
|
// Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
|
|
161
161
|
case "AI_CHAT_MESSAGE": {
|
|
162
162
|
if (a) {
|
|
163
|
-
const M =
|
|
163
|
+
const M = T.payload;
|
|
164
164
|
M?.type && g(M.type, M.payload);
|
|
165
165
|
}
|
|
166
166
|
return;
|
|
@@ -177,46 +177,46 @@ function vt(e) {
|
|
|
177
177
|
break;
|
|
178
178
|
// Normal: direct chat protocol messages
|
|
179
179
|
default:
|
|
180
|
-
g(
|
|
180
|
+
g(T.type, T.payload);
|
|
181
181
|
break;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
return {
|
|
185
|
-
iframeRef:
|
|
185
|
+
iframeRef: l,
|
|
186
186
|
pendingInitContext: C,
|
|
187
187
|
isListenerRegistered: d,
|
|
188
188
|
setIframeRef(f) {
|
|
189
|
-
|
|
189
|
+
l.value = f, P.debug("Iframe ref set:", f ? "available" : "null");
|
|
190
190
|
},
|
|
191
191
|
sendToIframe(f) {
|
|
192
|
-
if (!
|
|
192
|
+
if (!l.value?.contentWindow) {
|
|
193
193
|
P.warn("Cannot send message: iframe not available");
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
197
|
-
if (!
|
|
196
|
+
const b = r().allowedOrigins?.[0];
|
|
197
|
+
if (!b || b === "*") {
|
|
198
198
|
P.error(
|
|
199
199
|
"Refusing to send to iframe: aiAgentConfig.allowedOrigins must contain an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
|
|
200
200
|
{ type: f.type }
|
|
201
201
|
);
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
|
|
204
|
+
l.value.contentWindow.postMessage(f, b), P.debug(`Sent to iframe: ${f.type}`);
|
|
205
205
|
},
|
|
206
206
|
sendToParent(f) {
|
|
207
207
|
if (!window.parent || window.parent === window) {
|
|
208
208
|
P.warn("Cannot send to parent: not in iframe");
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
const
|
|
212
|
-
if (!
|
|
211
|
+
const b = r().parentOrigin;
|
|
212
|
+
if (!b || b === "*") {
|
|
213
213
|
P.error(
|
|
214
214
|
"Refusing to send to parent: aiAgentConfig.parentOrigin must be an explicit origin. Message dropped to avoid leaking data (including access tokens) to arbitrary origins.",
|
|
215
215
|
{ type: f.type }
|
|
216
216
|
);
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
window.parent.postMessage(f,
|
|
219
|
+
window.parent.postMessage(f, b), P.debug(`Sent to parent: ${f.type}`);
|
|
220
220
|
},
|
|
221
221
|
startListening() {
|
|
222
222
|
d.value || (window.addEventListener("message", p), d.value = !0);
|
|
@@ -230,75 +230,75 @@ function vt(e) {
|
|
|
230
230
|
};
|
|
231
231
|
},
|
|
232
232
|
onMessage(f) {
|
|
233
|
-
return
|
|
234
|
-
|
|
233
|
+
return s.add(f), () => {
|
|
234
|
+
s.delete(f);
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
};
|
|
238
238
|
}
|
|
239
|
-
const
|
|
240
|
-
function
|
|
239
|
+
const se = Y("ai-agent-service");
|
|
240
|
+
function vt(e) {
|
|
241
241
|
const {
|
|
242
242
|
userGetter: r,
|
|
243
243
|
bladeGetter: a,
|
|
244
244
|
localeGetter: t,
|
|
245
245
|
tokenGetter: o,
|
|
246
|
-
navigateToBlade:
|
|
246
|
+
navigateToBlade: l,
|
|
247
247
|
initialConfig: C,
|
|
248
248
|
isEmbedded: d = !1
|
|
249
|
-
} = e,
|
|
249
|
+
} = e, s = N({ ...lt, ...C }), u = pt(), g = ft({
|
|
250
250
|
userGetter: r,
|
|
251
251
|
bladeGetter: a,
|
|
252
252
|
localeGetter: t,
|
|
253
253
|
tokenGetter: o
|
|
254
|
-
}), p =
|
|
255
|
-
getConfig: () =>
|
|
254
|
+
}), p = gt({
|
|
255
|
+
getConfig: () => s.value,
|
|
256
256
|
isEmbedded: d,
|
|
257
|
-
navigateToBlade:
|
|
257
|
+
navigateToBlade: l,
|
|
258
258
|
closePanel: () => u.close()
|
|
259
259
|
}), f = E(() => ({
|
|
260
260
|
user: r(),
|
|
261
261
|
currentBlade: a(),
|
|
262
262
|
items: g.contextItems.value
|
|
263
|
-
})),
|
|
263
|
+
})), b = async () => {
|
|
264
264
|
if (p.pendingInitContext.value && p.iframeRef.value?.contentWindow) {
|
|
265
265
|
p.pendingInitContext.value = !1, u.isInitialized.value = !0;
|
|
266
|
-
const
|
|
267
|
-
p.sendToIframe({ type: "INIT_CONTEXT", payload:
|
|
266
|
+
const x = await g.buildInitPayload();
|
|
267
|
+
p.sendToIframe({ type: "INIT_CONTEXT", payload: x }), se.debug("Flushed pending INIT_CONTEXT");
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
270
|
p.onChatReady(() => {
|
|
271
|
-
p.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, g.buildInitPayload().then((
|
|
272
|
-
p.sendToIframe({ type: "INIT_CONTEXT", payload:
|
|
273
|
-
})) : (p.pendingInitContext.value = !0,
|
|
274
|
-
}),
|
|
271
|
+
p.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, g.buildInitPayload().then((x) => {
|
|
272
|
+
p.sendToIframe({ type: "INIT_CONTEXT", payload: x }), se.info("Chatbot ready, sent INIT_CONTEXT");
|
|
273
|
+
})) : (p.pendingInitContext.value = !0, se.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
|
|
274
|
+
}), q(p.iframeRef, () => b()), q(
|
|
275
275
|
() => ({ currentBlade: f.value.currentBlade, items: f.value.items }),
|
|
276
276
|
async () => {
|
|
277
277
|
if (d) {
|
|
278
|
-
const
|
|
279
|
-
p.sendToParent({ type: "AI_CONTEXT_UPDATE", payload:
|
|
278
|
+
const x = await g.buildInitPayload();
|
|
279
|
+
p.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: x });
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
if (u.isOpen.value && u.isInitialized.value && p.iframeRef.value?.contentWindow) {
|
|
283
|
-
const
|
|
284
|
-
p.sendToIframe({ type: "UPDATE_CONTEXT", payload:
|
|
283
|
+
const x = await g.buildUpdatePayload();
|
|
284
|
+
p.sendToIframe({ type: "UPDATE_CONTEXT", payload: x });
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
{ deep: !0 }
|
|
288
288
|
);
|
|
289
|
-
const v = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), _ = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(),
|
|
290
|
-
p.setIframeRef(
|
|
291
|
-
}, D = (
|
|
292
|
-
const { cleared:
|
|
293
|
-
d &&
|
|
289
|
+
const v = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), _ = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), T = () => d ? p.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), M = (x) => {
|
|
290
|
+
p.setIframeRef(x), b();
|
|
291
|
+
}, D = (x, U, j, $) => {
|
|
292
|
+
const { cleared: Q } = g.setContextData(x, U, j, $);
|
|
293
|
+
d && Q && p.sendToParent({ type: "AI_CONTEXT_CLEAR" });
|
|
294
294
|
};
|
|
295
295
|
return p.startListening(), d && (p.sendToParent({
|
|
296
296
|
type: "EMBEDDED_APP_READY",
|
|
297
297
|
payload: { supportedFeatures: ["ai-agent"] }
|
|
298
|
-
}),
|
|
298
|
+
}), se.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
|
|
299
299
|
// State
|
|
300
300
|
panelState: u.panelState,
|
|
301
|
-
config:
|
|
301
|
+
config: s,
|
|
302
302
|
context: f,
|
|
303
303
|
isOpen: E(() => !d && u.isOpen.value),
|
|
304
304
|
isExpanded: u.isExpanded,
|
|
@@ -306,16 +306,16 @@ function Ct(e) {
|
|
|
306
306
|
// Panel control
|
|
307
307
|
openPanel: v,
|
|
308
308
|
closePanel: _,
|
|
309
|
-
togglePanel:
|
|
309
|
+
togglePanel: T,
|
|
310
310
|
expandPanel: () => u.expand(),
|
|
311
311
|
collapsePanel: () => u.collapse(),
|
|
312
312
|
// Configuration
|
|
313
|
-
setConfig: (
|
|
314
|
-
|
|
313
|
+
setConfig: (x) => {
|
|
314
|
+
s.value = { ...s.value, ...x };
|
|
315
315
|
},
|
|
316
316
|
// Communication
|
|
317
|
-
sendMessage: (
|
|
318
|
-
p.sendToIframe({ type:
|
|
317
|
+
sendMessage: (x, U) => {
|
|
318
|
+
p.sendToIframe({ type: x, payload: U });
|
|
319
319
|
},
|
|
320
320
|
onMessage: p.onMessage,
|
|
321
321
|
// Internal API
|
|
@@ -326,19 +326,19 @@ function Ct(e) {
|
|
|
326
326
|
_setContextData: D
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const Ct = /* @__PURE__ */ new Set(["mod", "ctrl", "meta", "alt", "shift"]);
|
|
330
330
|
function $e(e) {
|
|
331
331
|
return new Proxy(
|
|
332
332
|
{},
|
|
333
333
|
{
|
|
334
334
|
get(r, a) {
|
|
335
335
|
if (!(typeof a != "string" || a === "then"))
|
|
336
|
-
return
|
|
336
|
+
return Ct.has(a) ? $e({ ...e, [a]: !0 }) : { key: a, ...e };
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
);
|
|
340
340
|
}
|
|
341
|
-
const ee = $e({}),
|
|
341
|
+
const ee = $e({}), le = { ctrl: "⌃", alt: "⌥", shift: "⇧", meta: "⌘" }, ce = { ctrl: "Ctrl", alt: "Alt", shift: "Shift", meta: "Meta" }, Oe = {
|
|
342
342
|
escape: "Esc",
|
|
343
343
|
enter: "Enter",
|
|
344
344
|
tab: "Tab",
|
|
@@ -369,16 +369,16 @@ const ee = $e({}), ce = { ctrl: "⌃", alt: "⌥", shift: "⇧", meta: "⌘" },
|
|
|
369
369
|
comma: ",",
|
|
370
370
|
slash: "/"
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function mt(e) {
|
|
373
373
|
return e in Oe ? Oe[e] : (e.length === 1, e.toUpperCase());
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function ht(e) {
|
|
376
376
|
return e in ke ? ke[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
377
377
|
}
|
|
378
378
|
function Ie(e, r) {
|
|
379
|
-
const a = !!e.ctrl || !!e.mod && !r, t = !!e.meta || !!e.mod && r, o = [],
|
|
380
|
-
r ? (a && o.push(
|
|
381
|
-
const C = [...
|
|
379
|
+
const a = !!e.ctrl || !!e.mod && !r, t = !!e.meta || !!e.mod && r, o = [], l = [];
|
|
380
|
+
r ? (a && o.push(le.ctrl), e.alt && o.push(le.alt), e.shift && o.push(le.shift), t && o.push(le.meta)) : (a && o.push(ce.ctrl), t && o.push(ce.meta), e.alt && o.push(ce.alt), e.shift && o.push(ce.shift)), a && l.push("Control"), t && l.push("Meta"), e.alt && l.push("Alt"), e.shift && l.push("Shift"), o.push(mt(e.key));
|
|
381
|
+
const C = [...l, ht(e.key)].join("+");
|
|
382
382
|
return { parts: o, aria: C };
|
|
383
383
|
}
|
|
384
384
|
const Pe = {
|
|
@@ -398,35 +398,35 @@ const Pe = {
|
|
|
398
398
|
arrowleft: "ArrowLeft",
|
|
399
399
|
arrowright: "ArrowRight"
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function _t(e) {
|
|
402
402
|
return e.length === 1 && e >= "a" && e <= "z";
|
|
403
403
|
}
|
|
404
|
-
function
|
|
404
|
+
function Et(e) {
|
|
405
405
|
return e.length === 1 && e >= "0" && e <= "9";
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function wt(e) {
|
|
408
408
|
return /^f([1-9]|1[0-2])$/.test(e);
|
|
409
409
|
}
|
|
410
410
|
function bt(e) {
|
|
411
|
-
if (
|
|
412
|
-
if (
|
|
411
|
+
if (_t(e)) return `Key${e.toUpperCase()}`;
|
|
412
|
+
if (Et(e)) return `Digit${e}`;
|
|
413
413
|
if (e in Pe) return Pe[e];
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function At(e) {
|
|
416
416
|
if (e in Me) return Me[e];
|
|
417
|
-
if (
|
|
417
|
+
if (wt(e)) return e.toUpperCase();
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function yt(e, r) {
|
|
420
420
|
const a = bt(e.key);
|
|
421
421
|
if (a !== void 0) return r.code === a;
|
|
422
|
-
const t =
|
|
422
|
+
const t = At(e.key);
|
|
423
423
|
return t !== void 0 ? r.key === t : !1;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
const t = !!e.ctrl || !!e.mod && !a, o = !!e.meta || !!e.mod && a,
|
|
427
|
-
return r.ctrlKey !== t || r.metaKey !== o || r.altKey !==
|
|
425
|
+
function Bt(e, r, a) {
|
|
426
|
+
const t = !!e.ctrl || !!e.mod && !a, o = !!e.meta || !!e.mod && a, l = !!e.alt, C = !!e.shift;
|
|
427
|
+
return r.ctrlKey !== t || r.metaKey !== o || r.altKey !== l || r.shiftKey !== C ? !1 : yt(e, r);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
429
|
+
const It = /* @__PURE__ */ new Set([
|
|
430
430
|
"button",
|
|
431
431
|
"submit",
|
|
432
432
|
"reset",
|
|
@@ -437,57 +437,57 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
437
437
|
"range",
|
|
438
438
|
"color"
|
|
439
439
|
]);
|
|
440
|
-
function
|
|
440
|
+
function In() {
|
|
441
441
|
const e = document.activeElement;
|
|
442
442
|
if (!e) return !1;
|
|
443
443
|
const r = e.tagName;
|
|
444
|
-
if (r === "INPUT") return !
|
|
444
|
+
if (r === "INPUT") return !It.has(e.type);
|
|
445
445
|
if (r === "TEXTAREA" || r === "SELECT" || e.isContentEditable === !0) return !0;
|
|
446
446
|
const a = e.getAttribute("contenteditable");
|
|
447
447
|
return a === "true" || a === "";
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function xt() {
|
|
450
450
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
451
451
|
}
|
|
452
452
|
function Re() {
|
|
453
|
-
const e =
|
|
453
|
+
const e = xt();
|
|
454
454
|
return {
|
|
455
455
|
hotkey: ee,
|
|
456
456
|
isMac: e,
|
|
457
457
|
formatShortcut: (r) => Ie(r, e)
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
let
|
|
461
|
-
function
|
|
462
|
-
|
|
460
|
+
let Tt, Ge, Ue, St;
|
|
461
|
+
function xn(e) {
|
|
462
|
+
Tt = e;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function Tn(e) {
|
|
465
465
|
Ge = e;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Sn(e) {
|
|
468
468
|
Ue = e;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
|
|
470
|
+
function On(e) {
|
|
471
|
+
St = e;
|
|
472
472
|
}
|
|
473
|
-
const
|
|
473
|
+
const Ot = "useBlade() was called outside a blade. Navigation methods (openBlade) work everywhere, but blade-specific methods require the component to be rendered inside VcBladeSlot.";
|
|
474
474
|
function y(e) {
|
|
475
475
|
throw new Error(`[vc-shell] ${e} requires blade context.
|
|
476
|
-
${
|
|
476
|
+
${Ot}`);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
479
|
-
const e = (
|
|
478
|
+
function kt() {
|
|
479
|
+
const e = (oe() ? F(Fe, void 0) : void 0) ?? Ge, r = (oe() ? F(je, void 0) : void 0) ?? Ue;
|
|
480
480
|
if (!e || !r)
|
|
481
481
|
throw new Error(
|
|
482
482
|
"[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
|
|
483
483
|
);
|
|
484
|
-
const a = e, t = r, o =
|
|
484
|
+
const a = e, t = r, o = oe() ? F(Qe, void 0) : void 0, l = oe() ? F(Je, void 0) : void 0, C = E(() => (o || y("id"), o.value.id)), d = E(() => (o || y("param"), o.value.param)), s = E(() => (o || y("options"), o.value.options)), u = E(() => (o || y("query"), o.value.query)), g = E(() => (o || y("closable"), o.value.parentId !== void 0)), p = E(() => (o || y("expanded"), a.activeBlade.value?.id === o.value.id)), f = E(() => (o || y("name"), o.value.name)), b = E(() => {
|
|
485
485
|
if (!o) return;
|
|
486
|
-
const
|
|
487
|
-
return a.blades.value.find((
|
|
486
|
+
const m = o.value.id;
|
|
487
|
+
return a.blades.value.find((B) => B.parentId === m)?.param;
|
|
488
488
|
});
|
|
489
489
|
let v = !1;
|
|
490
|
-
function _(
|
|
490
|
+
function _(m) {
|
|
491
491
|
if (v) {
|
|
492
492
|
console.warn(
|
|
493
493
|
"[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
|
|
@@ -495,16 +495,16 @@ function Pt() {
|
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
v = !0;
|
|
498
|
-
const
|
|
499
|
-
De(
|
|
498
|
+
const B = ze(m) ? m : N(m);
|
|
499
|
+
De(et, B);
|
|
500
500
|
}
|
|
501
|
-
async function
|
|
502
|
-
const { isWorkspace:
|
|
503
|
-
if (
|
|
504
|
-
await a.openWorkspace(
|
|
501
|
+
async function T(m) {
|
|
502
|
+
const { isWorkspace: B, ...J } = m;
|
|
503
|
+
if (B)
|
|
504
|
+
await a.openWorkspace(J);
|
|
505
505
|
else {
|
|
506
|
-
const
|
|
507
|
-
|
|
506
|
+
const ae = o?.value.id;
|
|
507
|
+
ae ? await a.openBlade({ ...J, parentId: ae }) : await a.openBlade(J);
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
async function M() {
|
|
@@ -513,96 +513,96 @@ function Pt() {
|
|
|
513
513
|
async function D() {
|
|
514
514
|
o || y("closeChildren()"), await a.closeChildren(o.value.id);
|
|
515
515
|
}
|
|
516
|
-
async function
|
|
516
|
+
async function x(m) {
|
|
517
517
|
o || y("replaceWith()"), await a.replaceCurrentBlade({
|
|
518
|
-
...
|
|
518
|
+
...m,
|
|
519
519
|
parentId: o.value.parentId
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
|
-
async function U(
|
|
522
|
+
async function U(m) {
|
|
523
523
|
o || y("coverWith()"), await a.coverCurrentBlade({
|
|
524
|
-
...
|
|
524
|
+
...m,
|
|
525
525
|
parentId: o.value.parentId
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
async function
|
|
529
|
-
return o || y("callParent()"), t.callParent(o.value.id,
|
|
528
|
+
async function j(m, B) {
|
|
529
|
+
return o || y("callParent()"), t.callParent(o.value.id, m, B);
|
|
530
530
|
}
|
|
531
|
-
function $(
|
|
532
|
-
o || y("exposeToChildren()"), t.exposeToChildren(o.value.id,
|
|
531
|
+
function $(m) {
|
|
532
|
+
o || y("exposeToChildren()"), t.exposeToChildren(o.value.id, m);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
o || y("onBeforeClose()"), a.registerBeforeClose(o.value.id,
|
|
534
|
+
function Q(m) {
|
|
535
|
+
o || y("onBeforeClose()"), a.registerBeforeClose(o.value.id, m);
|
|
536
536
|
}
|
|
537
|
-
function
|
|
538
|
-
o || y("setError()"), a.setBladeError(o.value.id,
|
|
537
|
+
function pe(m) {
|
|
538
|
+
o || y("setError()"), a.setBladeError(o.value.id, m);
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function fe() {
|
|
541
541
|
o || y("clearError()"), a.clearBladeError(o.value.id);
|
|
542
542
|
}
|
|
543
|
-
let
|
|
544
|
-
function
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
return
|
|
548
|
-
...
|
|
549
|
-
id:
|
|
550
|
-
dismissible:
|
|
551
|
-
}),
|
|
543
|
+
let ge = 0;
|
|
544
|
+
function ve(m) {
|
|
545
|
+
l || y("addBanner()");
|
|
546
|
+
const B = `banner-${o.value.id}-${++ge}`;
|
|
547
|
+
return l.value.push({
|
|
548
|
+
...m,
|
|
549
|
+
id: B,
|
|
550
|
+
dismissible: m.dismissible ?? !1
|
|
551
|
+
}), B;
|
|
552
552
|
}
|
|
553
|
-
function
|
|
554
|
-
|
|
553
|
+
function Ce(m) {
|
|
554
|
+
l || y("removeBanner()"), l.value = l.value.filter((B) => B.id !== m);
|
|
555
555
|
}
|
|
556
556
|
function me() {
|
|
557
|
-
|
|
557
|
+
l || y("clearBanners()"), l.value = l.value.filter((m) => m._system);
|
|
558
558
|
}
|
|
559
|
-
let
|
|
560
|
-
function he(
|
|
561
|
-
if (o || y("onActivated()"),
|
|
559
|
+
let te = !1, ne = !1;
|
|
560
|
+
function he(m) {
|
|
561
|
+
if (o || y("onActivated()"), te) {
|
|
562
562
|
console.warn("[useBlade] onActivated() already registered in this blade.");
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
|
-
|
|
566
|
-
|
|
565
|
+
te = !0, q(p, (B) => {
|
|
566
|
+
B && m();
|
|
567
567
|
});
|
|
568
568
|
}
|
|
569
|
-
function _e(
|
|
570
|
-
if (o || y("onDeactivated()"),
|
|
569
|
+
function _e(m) {
|
|
570
|
+
if (o || y("onDeactivated()"), ne) {
|
|
571
571
|
console.warn("[useBlade] onDeactivated() already registered in this blade.");
|
|
572
572
|
return;
|
|
573
573
|
}
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
ne = !0, q(p, (B) => {
|
|
575
|
+
B || m();
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
return {
|
|
579
579
|
id: C,
|
|
580
580
|
param: d,
|
|
581
|
-
activeChildParam:
|
|
582
|
-
options:
|
|
581
|
+
activeChildParam: b,
|
|
582
|
+
options: s,
|
|
583
583
|
query: u,
|
|
584
584
|
closable: g,
|
|
585
585
|
expanded: p,
|
|
586
586
|
name: f,
|
|
587
587
|
provideBladeData: _,
|
|
588
|
-
openBlade:
|
|
588
|
+
openBlade: T,
|
|
589
589
|
closeSelf: M,
|
|
590
590
|
closeChildren: D,
|
|
591
|
-
replaceWith:
|
|
591
|
+
replaceWith: x,
|
|
592
592
|
coverWith: U,
|
|
593
|
-
callParent:
|
|
593
|
+
callParent: j,
|
|
594
594
|
exposeToChildren: $,
|
|
595
|
-
onBeforeClose:
|
|
595
|
+
onBeforeClose: Q,
|
|
596
596
|
onActivated: he,
|
|
597
597
|
onDeactivated: _e,
|
|
598
|
-
setError:
|
|
599
|
-
clearError:
|
|
600
|
-
addBanner:
|
|
601
|
-
removeBanner:
|
|
598
|
+
setError: pe,
|
|
599
|
+
clearError: fe,
|
|
600
|
+
addBanner: ve,
|
|
601
|
+
removeBanner: Ce,
|
|
602
602
|
clearBanners: me
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Pt(e, r) {
|
|
606
606
|
return {
|
|
607
607
|
id: r.generateId(),
|
|
608
608
|
name: e.name,
|
|
@@ -613,7 +613,7 @@ function Mt(e, r) {
|
|
|
613
613
|
visible: !0
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Mt(e, r, a) {
|
|
617
617
|
return {
|
|
618
618
|
id: a.generateId(),
|
|
619
619
|
name: e.name,
|
|
@@ -625,7 +625,7 @@ function Dt(e, r, a) {
|
|
|
625
625
|
visible: !0
|
|
626
626
|
};
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Dt(e, r, a) {
|
|
629
629
|
return {
|
|
630
630
|
id: a.generateId(),
|
|
631
631
|
name: e.name,
|
|
@@ -637,7 +637,7 @@ function Lt(e, r, a) {
|
|
|
637
637
|
visible: !0
|
|
638
638
|
};
|
|
639
639
|
}
|
|
640
|
-
function
|
|
640
|
+
function Lt(e, r, a) {
|
|
641
641
|
return {
|
|
642
642
|
id: a.generateId(),
|
|
643
643
|
name: e.name,
|
|
@@ -649,31 +649,31 @@ function Nt(e, r, a) {
|
|
|
649
649
|
visible: !0
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
|
-
let
|
|
653
|
-
function
|
|
654
|
-
return `blade_${++
|
|
652
|
+
let Nt = 0;
|
|
653
|
+
function Ft() {
|
|
654
|
+
return `blade_${++Nt}_${Math.random().toString(36).slice(2, 8)}`;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
const t = N([]), o = /* @__PURE__ */ new Map(),
|
|
656
|
+
function kn(e, r, a = tt) {
|
|
657
|
+
const t = N([]), o = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), s = E(() => t.value[0]), u = E(() => t.value), g = E(() => {
|
|
658
658
|
for (let n = t.value.length - 1; n >= 0; n--)
|
|
659
659
|
if (t.value[n].visible) return t.value[n];
|
|
660
660
|
});
|
|
661
661
|
function p(n) {
|
|
662
|
-
o.delete(n),
|
|
662
|
+
o.delete(n), l.delete(n), C.delete(n), d.delete(n);
|
|
663
663
|
}
|
|
664
664
|
function f(n) {
|
|
665
665
|
const i = e.getBlade(n);
|
|
666
666
|
if (i)
|
|
667
667
|
return i.route;
|
|
668
668
|
}
|
|
669
|
-
const
|
|
670
|
-
generateId:
|
|
669
|
+
const b = {
|
|
670
|
+
generateId: Ft,
|
|
671
671
|
resolveUrl: f
|
|
672
672
|
};
|
|
673
673
|
async function v(n) {
|
|
674
674
|
for (let i = n.length - 1; i >= 0; i--) {
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
675
|
+
const c = o.get(n[i].id);
|
|
676
|
+
if (c && await c())
|
|
677
677
|
return !0;
|
|
678
678
|
}
|
|
679
679
|
return !1;
|
|
@@ -682,39 +682,39 @@ function Pn(e, r, a = nt) {
|
|
|
682
682
|
for (const i of n)
|
|
683
683
|
C.get(i.id)?.(), p(i.id);
|
|
684
684
|
}
|
|
685
|
-
async function
|
|
686
|
-
if (
|
|
687
|
-
const
|
|
688
|
-
if (!
|
|
685
|
+
async function T(n) {
|
|
686
|
+
if (s.value?.name === n.name) return !1;
|
|
687
|
+
const c = e.getBlade(n.name);
|
|
688
|
+
if (!c)
|
|
689
689
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
690
|
-
if (r &&
|
|
690
|
+
if (r && c.permissions && !r(c.permissions))
|
|
691
691
|
return console.warn(`[BladeStack] Access denied to workspace '${n.name}'`), !1;
|
|
692
692
|
_([...t.value]);
|
|
693
|
-
const
|
|
694
|
-
return t.value = [
|
|
693
|
+
const h = Pt(n, b);
|
|
694
|
+
return t.value = [h], n.onOpen && l.set(h.id, n.onOpen), n.onClose && C.set(h.id, n.onClose), n.onOpen?.(), !0;
|
|
695
695
|
}
|
|
696
696
|
async function M(n) {
|
|
697
697
|
if (!e.getBlade(n.name))
|
|
698
698
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
699
|
-
const i = n.parentId ?? g.value?.id ??
|
|
699
|
+
const i = n.parentId ?? g.value?.id ?? s.value?.id;
|
|
700
700
|
if (!i)
|
|
701
701
|
throw new Error("[BladeStack] Cannot open blade: no parent blade found");
|
|
702
|
-
const
|
|
703
|
-
if (
|
|
702
|
+
const c = t.value.findIndex((S) => S.id === i);
|
|
703
|
+
if (c === -1)
|
|
704
704
|
throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
|
|
705
|
-
const
|
|
706
|
-
if (
|
|
705
|
+
const h = t.value.slice(c + 1);
|
|
706
|
+
if (h.length > 0 && await v(h))
|
|
707
707
|
return !1;
|
|
708
|
-
_(
|
|
709
|
-
const w =
|
|
710
|
-
return t.value = [...t.value.slice(0,
|
|
708
|
+
_(h);
|
|
709
|
+
const w = Mt(n, i, b);
|
|
710
|
+
return t.value = [...t.value.slice(0, c + 1), w], n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
711
711
|
}
|
|
712
712
|
async function D(n) {
|
|
713
713
|
const i = t.value.findIndex((S) => S.id === n);
|
|
714
714
|
if (i === -1 || i === 0) return "refused";
|
|
715
|
-
const
|
|
716
|
-
if (await v(
|
|
717
|
-
_(
|
|
715
|
+
const c = t.value.slice(i);
|
|
716
|
+
if (await v(c)) return "prevented";
|
|
717
|
+
_(c), t.value = t.value.slice(0, i);
|
|
718
718
|
const w = t.value.length - 1;
|
|
719
719
|
if (w > 0 && !t.value[w].visible) {
|
|
720
720
|
const S = [...t.value];
|
|
@@ -722,24 +722,24 @@ function Pn(e, r, a = nt) {
|
|
|
722
722
|
}
|
|
723
723
|
return "closed";
|
|
724
724
|
}
|
|
725
|
-
async function
|
|
725
|
+
async function x(n) {
|
|
726
726
|
const i = g.value;
|
|
727
727
|
if (!i)
|
|
728
728
|
throw new Error("[BladeStack] No active blade to replace");
|
|
729
729
|
if (!e.getBlade(n.name))
|
|
730
730
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
731
|
-
const
|
|
732
|
-
if (
|
|
731
|
+
const c = t.value.findIndex((R) => R.id === i.id);
|
|
732
|
+
if (c === -1)
|
|
733
733
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
736
|
-
if (await v(
|
|
737
|
-
_(
|
|
734
|
+
const h = t.value.slice(c + 1);
|
|
735
|
+
if (h.length > 0) {
|
|
736
|
+
if (await v(h)) return !1;
|
|
737
|
+
_(h);
|
|
738
738
|
}
|
|
739
|
-
const w =
|
|
739
|
+
const w = Dt(n, i.parentId, b);
|
|
740
740
|
_([i]);
|
|
741
|
-
const S = [...t.value.slice(0,
|
|
742
|
-
return t.value = S, n.onOpen &&
|
|
741
|
+
const S = [...t.value.slice(0, c), w, ...t.value.slice(c + 1)];
|
|
742
|
+
return t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
743
743
|
}
|
|
744
744
|
async function U(n) {
|
|
745
745
|
const i = g.value;
|
|
@@ -747,143 +747,132 @@ function Pn(e, r, a = nt) {
|
|
|
747
747
|
throw new Error("[BladeStack] No active blade to cover");
|
|
748
748
|
if (!e.getBlade(n.name))
|
|
749
749
|
throw new Error(`[BladeStack] Blade '${n.name}' not found in registry`);
|
|
750
|
-
const
|
|
751
|
-
if (
|
|
750
|
+
const c = t.value.findIndex((R) => R.id === i.id);
|
|
751
|
+
if (c === -1)
|
|
752
752
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
753
|
-
const
|
|
754
|
-
if (
|
|
755
|
-
if (await v(
|
|
756
|
-
_(
|
|
753
|
+
const h = t.value.slice(c + 1);
|
|
754
|
+
if (h.length > 0) {
|
|
755
|
+
if (await v(h)) return !1;
|
|
756
|
+
_(h);
|
|
757
757
|
}
|
|
758
|
-
const w =
|
|
759
|
-
return S.push({ ...i, visible: !1 }), S.push(w), t.value = S, n.onOpen &&
|
|
758
|
+
const w = Lt(n, i.id, b), S = t.value.slice(0, c);
|
|
759
|
+
return S.push({ ...i, visible: !1 }), S.push(w), t.value = S, n.onOpen && l.set(w.id, n.onOpen), n.onClose && C.set(w.id, n.onClose), n.onOpen?.(), !0;
|
|
760
760
|
}
|
|
761
|
-
async function
|
|
761
|
+
async function j(n) {
|
|
762
762
|
const i = t.value.findIndex((w) => w.id === n);
|
|
763
763
|
if (i === -1) return !1;
|
|
764
|
-
const
|
|
765
|
-
return
|
|
764
|
+
const c = t.value.slice(i + 1);
|
|
765
|
+
return c.length === 0 || await v(c) ? !1 : (_(c), t.value = t.value.slice(0, i + 1), !0);
|
|
766
766
|
}
|
|
767
767
|
function $(n) {
|
|
768
768
|
g.value?.url && a[n]();
|
|
769
769
|
}
|
|
770
|
-
async function
|
|
771
|
-
await
|
|
770
|
+
async function Q(n) {
|
|
771
|
+
await T(n) && $("push");
|
|
772
772
|
}
|
|
773
|
-
async function
|
|
773
|
+
async function pe(n) {
|
|
774
774
|
await M(n) && $("push");
|
|
775
775
|
}
|
|
776
|
-
async function
|
|
777
|
-
await
|
|
776
|
+
async function fe(n) {
|
|
777
|
+
await x(n) && $("replace");
|
|
778
778
|
}
|
|
779
|
-
async function
|
|
779
|
+
async function ge(n) {
|
|
780
780
|
await U(n) && $("push");
|
|
781
781
|
}
|
|
782
|
-
async function
|
|
782
|
+
async function ve(n) {
|
|
783
783
|
const i = await D(n);
|
|
784
784
|
return i === "closed" && a.replace(), i === "prevented";
|
|
785
785
|
}
|
|
786
|
-
async function
|
|
787
|
-
await
|
|
786
|
+
async function Ce(n) {
|
|
787
|
+
await j(n) && a.replace();
|
|
788
788
|
}
|
|
789
789
|
function me(n, i) {
|
|
790
790
|
o.set(n, i);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function te(n) {
|
|
793
793
|
o.delete(n);
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
const
|
|
797
|
-
if (
|
|
798
|
-
const
|
|
799
|
-
|
|
795
|
+
function ne(n, i) {
|
|
796
|
+
const c = t.value.findIndex((w) => w.id === n);
|
|
797
|
+
if (c === -1) return;
|
|
798
|
+
const h = [...t.value];
|
|
799
|
+
h[c] = { ...h[c], error: i }, t.value = h;
|
|
800
800
|
}
|
|
801
801
|
function he(n) {
|
|
802
|
-
const i = t.value.findIndex((
|
|
802
|
+
const i = t.value.findIndex((h) => h.id === n);
|
|
803
803
|
if (i === -1) return;
|
|
804
|
-
const
|
|
805
|
-
|
|
804
|
+
const c = [...t.value];
|
|
805
|
+
c[i] = { ...c[i], error: void 0 }, t.value = c;
|
|
806
806
|
}
|
|
807
807
|
function _e(n, i) {
|
|
808
|
-
const
|
|
809
|
-
if (
|
|
810
|
-
const
|
|
811
|
-
|
|
808
|
+
const c = t.value.findIndex((w) => w.id === n);
|
|
809
|
+
if (c === -1 || t.value[c].title === i) return;
|
|
810
|
+
const h = [...t.value];
|
|
811
|
+
h[c] = { ...h[c], title: i }, t.value = h;
|
|
812
812
|
}
|
|
813
|
-
function
|
|
814
|
-
const
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}));
|
|
822
|
-
}
|
|
823
|
-
function T(n, i) {
|
|
824
|
-
const s = t.value.findIndex((K) => K.id === n);
|
|
825
|
-
if (s === -1) return;
|
|
826
|
-
const m = t.value[s].query ?? {}, w = { ...m };
|
|
827
|
-
for (const [K, we] of Object.entries(i))
|
|
828
|
-
we === "" || we == null ? delete w[K] : w[K] = we;
|
|
829
|
-
const S = Object.keys(m), R = Object.keys(w);
|
|
830
|
-
if (S.length === R.length && R.every((K) => m[K] === w[K]))
|
|
813
|
+
function m(n, i) {
|
|
814
|
+
const c = t.value.findIndex((V) => V.id === n);
|
|
815
|
+
if (c === -1) return;
|
|
816
|
+
const h = t.value[c].query ?? {}, w = { ...h };
|
|
817
|
+
for (const [V, we] of Object.entries(i))
|
|
818
|
+
we === "" || we == null ? delete w[V] : w[V] = we;
|
|
819
|
+
const S = Object.keys(h), R = Object.keys(w);
|
|
820
|
+
if (S.length === R.length && R.every((V) => h[V] === w[V]))
|
|
831
821
|
return;
|
|
832
822
|
const Ee = [...t.value];
|
|
833
|
-
Ee[
|
|
823
|
+
Ee[c] = { ...Ee[c], query: w }, t.value = Ee;
|
|
834
824
|
}
|
|
835
|
-
function
|
|
825
|
+
function B(n) {
|
|
836
826
|
let i = d.get(n);
|
|
837
827
|
return i || (i = N(!1), d.set(n, i)), i;
|
|
838
828
|
}
|
|
839
|
-
function
|
|
829
|
+
function J(n) {
|
|
840
830
|
return d.get(n)?.value ?? !1;
|
|
841
831
|
}
|
|
842
|
-
function
|
|
843
|
-
|
|
832
|
+
function ae(n, i) {
|
|
833
|
+
B(n).value = i;
|
|
844
834
|
}
|
|
845
|
-
function
|
|
846
|
-
const i =
|
|
835
|
+
function Ke(n) {
|
|
836
|
+
const i = B(n);
|
|
847
837
|
i.value = !i.value;
|
|
848
838
|
}
|
|
849
|
-
function
|
|
839
|
+
function He(n) {
|
|
850
840
|
for (const i of t.value)
|
|
851
841
|
p(i.id);
|
|
852
842
|
t.value = n;
|
|
853
843
|
}
|
|
854
844
|
return {
|
|
855
|
-
workspace:
|
|
845
|
+
workspace: s,
|
|
856
846
|
blades: u,
|
|
857
847
|
activeBlade: g,
|
|
858
|
-
openWorkspace:
|
|
859
|
-
openBlade:
|
|
860
|
-
closeBlade:
|
|
861
|
-
closeChildren:
|
|
862
|
-
replaceCurrentBlade:
|
|
863
|
-
coverCurrentBlade:
|
|
848
|
+
openWorkspace: Q,
|
|
849
|
+
openBlade: pe,
|
|
850
|
+
closeBlade: ve,
|
|
851
|
+
closeChildren: Ce,
|
|
852
|
+
replaceCurrentBlade: fe,
|
|
853
|
+
coverCurrentBlade: ge,
|
|
864
854
|
registerBeforeClose: me,
|
|
865
|
-
unregisterBeforeClose:
|
|
866
|
-
setBladeError:
|
|
855
|
+
unregisterBeforeClose: te,
|
|
856
|
+
setBladeError: ne,
|
|
867
857
|
clearBladeError: he,
|
|
868
858
|
setBladeTitle: _e,
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
_restoreStack: We
|
|
859
|
+
updateBladeQuery: m,
|
|
860
|
+
getMaximizedRef: B,
|
|
861
|
+
isMaximized: J,
|
|
862
|
+
setMaximized: ae,
|
|
863
|
+
toggleMaximized: Ke,
|
|
864
|
+
_restoreStack: He
|
|
876
865
|
};
|
|
877
866
|
}
|
|
878
|
-
function
|
|
867
|
+
function $t() {
|
|
879
868
|
const e = F(Fe);
|
|
880
869
|
if (!e)
|
|
881
870
|
throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
|
|
882
871
|
return e;
|
|
883
872
|
}
|
|
884
|
-
const
|
|
885
|
-
function
|
|
886
|
-
const r = F(
|
|
873
|
+
const W = Y("use-ai-agent");
|
|
874
|
+
function Pn(e) {
|
|
875
|
+
const r = F(nt), { user: a, getAccessToken: t } = at(), { openBlade: o } = kt(), { blades: l, activeBlade: C } = $t(), d = e?.isEmbedded, s = vt({
|
|
887
876
|
userGetter: () => {
|
|
888
877
|
if (a.value)
|
|
889
878
|
return {
|
|
@@ -894,7 +883,7 @@ function Mn(e) {
|
|
|
894
883
|
};
|
|
895
884
|
},
|
|
896
885
|
bladeGetter: () => {
|
|
897
|
-
const g = C.value ??
|
|
886
|
+
const g = C.value ?? l.value[l.value.length - 1];
|
|
898
887
|
return g ? {
|
|
899
888
|
id: g.id,
|
|
900
889
|
name: g.name,
|
|
@@ -907,36 +896,36 @@ function Mn(e) {
|
|
|
907
896
|
tokenGetter: t,
|
|
908
897
|
navigateToBlade: (g, p, f) => {
|
|
909
898
|
o({ name: g, param: p, options: f }).then(() => {
|
|
910
|
-
|
|
911
|
-
}).catch((
|
|
912
|
-
|
|
899
|
+
W.debug(`Navigated to blade: ${g}`);
|
|
900
|
+
}).catch((b) => {
|
|
901
|
+
W.warn(`Blade not found or cannot be opened: ${g}`, b);
|
|
913
902
|
});
|
|
914
903
|
},
|
|
915
904
|
initialConfig: e?.config,
|
|
916
905
|
isEmbedded: d
|
|
917
906
|
});
|
|
918
|
-
if (De(xe,
|
|
919
|
-
const g = F(
|
|
907
|
+
if (De(xe, s), W.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
|
|
908
|
+
const g = F(ot, null);
|
|
920
909
|
g ? (g.registerToolbarItem(
|
|
921
910
|
{
|
|
922
|
-
id:
|
|
923
|
-
icon:
|
|
924
|
-
title:
|
|
911
|
+
id: ct,
|
|
912
|
+
icon: dt,
|
|
913
|
+
title: ut,
|
|
925
914
|
shortcut: ee.mod.i,
|
|
926
915
|
clickHandler: () => {
|
|
927
|
-
|
|
916
|
+
s.togglePanel();
|
|
928
917
|
}
|
|
929
918
|
},
|
|
930
919
|
"*"
|
|
931
920
|
// Wildcard for all blades
|
|
932
|
-
),
|
|
921
|
+
), W.debug("Global AI toolbar button registered with wildcard '*'")) : W.warn("Toolbar service not available, AI button not registered");
|
|
933
922
|
}
|
|
934
|
-
return
|
|
923
|
+
return s;
|
|
935
924
|
}
|
|
936
|
-
function
|
|
925
|
+
function Mn() {
|
|
937
926
|
const e = F(xe);
|
|
938
927
|
if (!e) {
|
|
939
|
-
|
|
928
|
+
W.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
|
|
940
929
|
return;
|
|
941
930
|
}
|
|
942
931
|
return {
|
|
@@ -960,7 +949,7 @@ function Dn() {
|
|
|
960
949
|
onMessage: e.onMessage
|
|
961
950
|
};
|
|
962
951
|
}
|
|
963
|
-
function
|
|
952
|
+
function Dn(e) {
|
|
964
953
|
return {
|
|
965
954
|
id: "ai-agent-toggle",
|
|
966
955
|
icon: e?.icon ?? "lucide-sparkles",
|
|
@@ -970,11 +959,11 @@ function Ln(e) {
|
|
|
970
959
|
}
|
|
971
960
|
};
|
|
972
961
|
}
|
|
973
|
-
const
|
|
962
|
+
const Rt = ["width", "height"], Gt = ["clip-path"], Ut = {
|
|
974
963
|
key: 1,
|
|
975
964
|
d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z",
|
|
976
965
|
fill: "url(#virto-oz-gradient-animated)"
|
|
977
|
-
},
|
|
966
|
+
}, Vt = ["id"], Kt = {
|
|
978
967
|
key: 1,
|
|
979
968
|
id: "virto-oz-gradient-animated",
|
|
980
969
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -982,7 +971,7 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
982
971
|
y1: "0",
|
|
983
972
|
x2: "99",
|
|
984
973
|
y2: "108"
|
|
985
|
-
}, Ve = /* @__PURE__ */
|
|
974
|
+
}, Ve = /* @__PURE__ */ X({
|
|
986
975
|
__name: "VcVirtoOzLogo",
|
|
987
976
|
props: {
|
|
988
977
|
width: { default: 22 },
|
|
@@ -991,7 +980,7 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
991
980
|
},
|
|
992
981
|
setup(e) {
|
|
993
982
|
const r = E(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
|
|
994
|
-
return (a, t) => (
|
|
983
|
+
return (a, t) => (I(), k("svg", {
|
|
995
984
|
width: e.width,
|
|
996
985
|
height: e.height,
|
|
997
986
|
viewBox: "0 0 99 108",
|
|
@@ -999,22 +988,22 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
999
988
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1000
989
|
class: "vc-virto-oz-logo"
|
|
1001
990
|
}, [
|
|
1002
|
-
t[3] || (t[3] =
|
|
991
|
+
t[3] || (t[3] = A("path", {
|
|
1003
992
|
d: "M40.1199 2.41576C45.6989 -0.805254 52.5724 -0.805253 58.1514 2.41576L89.2556 20.3738C94.8345 23.5948 98.2713 29.5475 98.2713 35.9895V71.9055C98.2713 78.3475 94.8345 84.3002 89.2556 87.5212L58.1514 105.479C52.5724 108.7 45.6989 108.7 40.1199 105.479L9.01574 87.5212C3.43678 84.3002 0 78.3475 0 71.9055V35.9895C0 29.5475 3.43678 23.5948 9.01574 20.3738L40.1199 2.41576Z",
|
|
1004
993
|
fill: "white"
|
|
1005
994
|
}, null, -1)),
|
|
1006
|
-
e.animated ? (
|
|
995
|
+
e.animated ? (I(), k("path", Ut)) : (I(), k("g", {
|
|
1007
996
|
key: 0,
|
|
1008
997
|
"clip-path": `url(#${r.value})`
|
|
1009
998
|
}, [...t[0] || (t[0] = [
|
|
1010
|
-
|
|
1011
|
-
|
|
999
|
+
A("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
|
|
1000
|
+
A("foreignObject", {
|
|
1012
1001
|
x: "-334.01",
|
|
1013
1002
|
y: "-334.01",
|
|
1014
1003
|
width: "668.02",
|
|
1015
1004
|
height: "668.02"
|
|
1016
1005
|
}, [
|
|
1017
|
-
|
|
1006
|
+
A("div", {
|
|
1018
1007
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1019
1008
|
style: { background: `conic-gradient(
|
|
1020
1009
|
from 90deg,
|
|
@@ -1028,63 +1017,63 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1028
1017
|
})
|
|
1029
1018
|
])
|
|
1030
1019
|
], -1)
|
|
1031
|
-
])], 8,
|
|
1032
|
-
t[4] || (t[4] =
|
|
1020
|
+
])], 8, Gt)),
|
|
1021
|
+
t[4] || (t[4] = A("path", {
|
|
1033
1022
|
d: "M72.1266 54.0945C72.1266 60.0873 74.3028 71.0379 60.6238 82.8517C65.2871 73.0587 55.8339 77.1002 49.1209 77.1002C36.4152 77.1002 26.1152 66.8002 26.1152 54.0945C26.1152 41.3889 36.4152 31.0889 49.1209 31.0889C61.8266 31.0889 72.1266 41.3889 72.1266 54.0945Z",
|
|
1034
1023
|
fill: "white"
|
|
1035
1024
|
}, null, -1)),
|
|
1036
|
-
t[5] || (t[5] =
|
|
1025
|
+
t[5] || (t[5] = A("ellipse", {
|
|
1037
1026
|
cx: "49.12",
|
|
1038
1027
|
cy: "54.09",
|
|
1039
1028
|
rx: "4.05",
|
|
1040
1029
|
ry: "4.05",
|
|
1041
1030
|
fill: "#6C6C6C"
|
|
1042
1031
|
}, null, -1)),
|
|
1043
|
-
t[6] || (t[6] =
|
|
1032
|
+
t[6] || (t[6] = A("ellipse", {
|
|
1044
1033
|
cx: "60.62",
|
|
1045
1034
|
cy: "54.09",
|
|
1046
1035
|
rx: "4.05",
|
|
1047
1036
|
ry: "4.05",
|
|
1048
1037
|
fill: "#6C6C6C"
|
|
1049
1038
|
}, null, -1)),
|
|
1050
|
-
t[7] || (t[7] =
|
|
1039
|
+
t[7] || (t[7] = A("ellipse", {
|
|
1051
1040
|
cx: "37.62",
|
|
1052
1041
|
cy: "54.09",
|
|
1053
1042
|
rx: "4.05",
|
|
1054
1043
|
ry: "4.05",
|
|
1055
1044
|
fill: "#6C6C6C"
|
|
1056
1045
|
}, null, -1)),
|
|
1057
|
-
|
|
1058
|
-
e.animated ?
|
|
1046
|
+
A("defs", null, [
|
|
1047
|
+
e.animated ? Z("", !0) : (I(), k("clipPath", {
|
|
1059
1048
|
key: 0,
|
|
1060
1049
|
id: r.value
|
|
1061
1050
|
}, [...t[1] || (t[1] = [
|
|
1062
|
-
|
|
1063
|
-
])], 8,
|
|
1064
|
-
e.animated ? (
|
|
1065
|
-
|
|
1066
|
-
])])) :
|
|
1051
|
+
A("path", { d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z" }, null, -1)
|
|
1052
|
+
])], 8, Vt)),
|
|
1053
|
+
e.animated ? (I(), k("linearGradient", Kt, [...t[2] || (t[2] = [
|
|
1054
|
+
qe('<stop offset="0%" stop-color="#FF9533"><animate attributeName="stop-color" values="#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="25%" stop-color="#FF4FBB"><animate attributeName="stop-color" values="#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="50%" stop-color="#EAFF4F"><animate attributeName="stop-color" values="#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="75%" stop-color="#1C91FC"><animate attributeName="stop-color" values="#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="100%" stop-color="#9A2DF8"><animate attributeName="stop-color" values="#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8" dur="4s" repeatCount="indefinite"></animate></stop>', 5)
|
|
1055
|
+
])])) : Z("", !0)
|
|
1067
1056
|
])
|
|
1068
|
-
], 8,
|
|
1057
|
+
], 8, Rt));
|
|
1069
1058
|
}
|
|
1070
|
-
}),
|
|
1059
|
+
}), Ht = { class: "vc-shortcut-kbd" }, Wt = {
|
|
1071
1060
|
key: 0,
|
|
1072
1061
|
class: "vc-shortcut-kbd__plus"
|
|
1073
|
-
},
|
|
1062
|
+
}, zt = { class: "vc-shortcut-kbd__key" }, Be = /* @__PURE__ */ X({
|
|
1074
1063
|
__name: "ShortcutKbd",
|
|
1075
1064
|
props: {
|
|
1076
1065
|
parts: {},
|
|
1077
1066
|
separated: { type: Boolean, default: !1 }
|
|
1078
1067
|
},
|
|
1079
1068
|
setup(e) {
|
|
1080
|
-
return (r, a) => (
|
|
1081
|
-
(
|
|
1082
|
-
e.separated && o > 0 ? (
|
|
1083
|
-
|
|
1069
|
+
return (r, a) => (I(), k("span", Ht, [
|
|
1070
|
+
(I(!0), k(Te, null, Ze(e.parts, (t, o) => (I(), k(Te, { key: o }, [
|
|
1071
|
+
e.separated && o > 0 ? (I(), k("span", Wt, "+")) : Z("", !0),
|
|
1072
|
+
A("kbd", zt, z(t), 1)
|
|
1084
1073
|
], 64))), 128))
|
|
1085
1074
|
]));
|
|
1086
1075
|
}
|
|
1087
|
-
}),
|
|
1076
|
+
}), qt = { class: "vc-ai-agent-header" }, Zt = { class: "vc-ai-agent-header__icon" }, Xt = { class: "vc-ai-agent-header__wrapper" }, Yt = { class: "vc-ai-agent-header__content" }, jt = { class: "vc-ai-agent-header__title" }, Qt = { class: "vc-ai-agent-header__controls" }, Jt = ["aria-label", "aria-keyshortcuts"], en = { class: "tw-inline-flex tw-items-center tw-gap-2" }, tn = ["aria-label", "aria-keyshortcuts"], nn = { class: "tw-inline-flex tw-items-center tw-gap-2" }, an = ["aria-label", "aria-keyshortcuts"], on = { class: "tw-inline-flex tw-items-center tw-gap-2" }, rn = /* @__PURE__ */ X({
|
|
1088
1077
|
__name: "VcAiAgentHeader",
|
|
1089
1078
|
props: {
|
|
1090
1079
|
title: {},
|
|
@@ -1093,28 +1082,28 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1093
1082
|
},
|
|
1094
1083
|
emits: ["close", "expand", "collapse"],
|
|
1095
1084
|
setup(e) {
|
|
1096
|
-
const { t: r } =
|
|
1097
|
-
return (d,
|
|
1098
|
-
|
|
1085
|
+
const { t: r } = st(), { isMac: a } = Re(), t = E(() => Ie(ee.escape, a)), o = E(() => Ie(ee.mod.backslash, a)), l = E(() => t.value.aria), C = E(() => o.value.aria);
|
|
1086
|
+
return (d, s) => (I(), k("div", qt, [
|
|
1087
|
+
A("div", Zt, [
|
|
1099
1088
|
L(Ve, {
|
|
1100
1089
|
width: 22,
|
|
1101
1090
|
height: 24,
|
|
1102
1091
|
"show-dots": ""
|
|
1103
1092
|
})
|
|
1104
1093
|
]),
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1094
|
+
A("div", Xt, [
|
|
1095
|
+
A("div", Yt, [
|
|
1096
|
+
A("div", jt, z(e.title), 1)
|
|
1108
1097
|
])
|
|
1109
1098
|
]),
|
|
1110
|
-
|
|
1111
|
-
e.isExpanded ? (
|
|
1099
|
+
A("div", Qt, [
|
|
1100
|
+
e.isExpanded ? (I(), ue(O(Ae), {
|
|
1112
1101
|
key: 0,
|
|
1113
1102
|
placement: "bottom"
|
|
1114
1103
|
}, {
|
|
1115
1104
|
tooltip: G(() => [
|
|
1116
|
-
|
|
1117
|
-
|
|
1105
|
+
A("span", en, [
|
|
1106
|
+
be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
|
|
1118
1107
|
L(Be, {
|
|
1119
1108
|
parts: o.value.parts,
|
|
1120
1109
|
separated: !O(a)
|
|
@@ -1122,29 +1111,29 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1122
1111
|
])
|
|
1123
1112
|
]),
|
|
1124
1113
|
default: G(() => [
|
|
1125
|
-
|
|
1114
|
+
A("div", {
|
|
1126
1115
|
class: "vc-ai-agent-header__button",
|
|
1127
1116
|
role: "button",
|
|
1128
1117
|
tabindex: "0",
|
|
1129
1118
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
|
|
1130
1119
|
"aria-keyshortcuts": C.value,
|
|
1131
|
-
onClick:
|
|
1120
|
+
onClick: s[0] || (s[0] = (u) => d.$emit("collapse")),
|
|
1132
1121
|
onKeydown: [
|
|
1133
|
-
|
|
1134
|
-
|
|
1122
|
+
s[1] || (s[1] = K(H((u) => d.$emit("collapse"), ["prevent"]), ["enter"])),
|
|
1123
|
+
s[2] || (s[2] = K(H((u) => d.$emit("collapse"), ["prevent"]), ["space"]))
|
|
1135
1124
|
]
|
|
1136
1125
|
}, [
|
|
1137
|
-
L(O(
|
|
1138
|
-
], 40,
|
|
1126
|
+
L(O(de), { icon: "lucide-minus" })
|
|
1127
|
+
], 40, Jt)
|
|
1139
1128
|
]),
|
|
1140
1129
|
_: 1
|
|
1141
|
-
})) : (
|
|
1130
|
+
})) : (I(), ue(O(Ae), {
|
|
1142
1131
|
key: 1,
|
|
1143
1132
|
placement: "bottom"
|
|
1144
1133
|
}, {
|
|
1145
1134
|
tooltip: G(() => [
|
|
1146
|
-
|
|
1147
|
-
|
|
1135
|
+
A("span", nn, [
|
|
1136
|
+
be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
|
|
1148
1137
|
L(Be, {
|
|
1149
1138
|
parts: o.value.parts,
|
|
1150
1139
|
separated: !O(a)
|
|
@@ -1152,27 +1141,27 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1152
1141
|
])
|
|
1153
1142
|
]),
|
|
1154
1143
|
default: G(() => [
|
|
1155
|
-
|
|
1144
|
+
A("div", {
|
|
1156
1145
|
class: "vc-ai-agent-header__button",
|
|
1157
1146
|
role: "button",
|
|
1158
1147
|
tabindex: "0",
|
|
1159
1148
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
|
|
1160
1149
|
"aria-keyshortcuts": C.value,
|
|
1161
|
-
onClick:
|
|
1150
|
+
onClick: s[3] || (s[3] = (u) => d.$emit("expand")),
|
|
1162
1151
|
onKeydown: [
|
|
1163
|
-
|
|
1164
|
-
|
|
1152
|
+
s[4] || (s[4] = K(H((u) => d.$emit("expand"), ["prevent"]), ["enter"])),
|
|
1153
|
+
s[5] || (s[5] = K(H((u) => d.$emit("expand"), ["prevent"]), ["space"]))
|
|
1165
1154
|
]
|
|
1166
1155
|
}, [
|
|
1167
|
-
L(O(
|
|
1168
|
-
], 40,
|
|
1156
|
+
L(O(de), { icon: "lucide-panel-top" })
|
|
1157
|
+
], 40, tn)
|
|
1169
1158
|
]),
|
|
1170
1159
|
_: 1
|
|
1171
1160
|
})),
|
|
1172
|
-
L(O(
|
|
1161
|
+
L(O(Ae), { placement: "bottom" }, {
|
|
1173
1162
|
tooltip: G(() => [
|
|
1174
|
-
|
|
1175
|
-
|
|
1163
|
+
A("span", on, [
|
|
1164
|
+
be(z(O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
|
|
1176
1165
|
L(Be, {
|
|
1177
1166
|
parts: t.value.parts,
|
|
1178
1167
|
separated: !O(a)
|
|
@@ -1180,104 +1169,104 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1180
1169
|
])
|
|
1181
1170
|
]),
|
|
1182
1171
|
default: G(() => [
|
|
1183
|
-
|
|
1172
|
+
A("div", {
|
|
1184
1173
|
class: "vc-ai-agent-header__button",
|
|
1185
1174
|
role: "button",
|
|
1186
1175
|
tabindex: "0",
|
|
1187
1176
|
"aria-label": O(r)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
|
|
1188
|
-
"aria-keyshortcuts":
|
|
1189
|
-
onClick:
|
|
1177
|
+
"aria-keyshortcuts": l.value,
|
|
1178
|
+
onClick: s[6] || (s[6] = (u) => d.$emit("close")),
|
|
1190
1179
|
onKeydown: [
|
|
1191
|
-
|
|
1192
|
-
|
|
1180
|
+
s[7] || (s[7] = K(H((u) => d.$emit("close"), ["prevent"]), ["enter"])),
|
|
1181
|
+
s[8] || (s[8] = K(H((u) => d.$emit("close"), ["prevent"]), ["space"]))
|
|
1193
1182
|
]
|
|
1194
1183
|
}, [
|
|
1195
|
-
L(O(
|
|
1196
|
-
], 40,
|
|
1184
|
+
L(O(de), { icon: "lucide-x" })
|
|
1185
|
+
], 40, an)
|
|
1197
1186
|
]),
|
|
1198
1187
|
_: 1
|
|
1199
1188
|
})
|
|
1200
1189
|
])
|
|
1201
1190
|
]));
|
|
1202
1191
|
}
|
|
1203
|
-
}),
|
|
1192
|
+
}), sn = { class: "vc-ai-agent-loader" }, ln = { class: "vc-ai-agent-loader__content" }, cn = { class: "vc-ai-agent-loader__logo" }, dn = {
|
|
1204
1193
|
key: 0,
|
|
1205
1194
|
class: "vc-ai-agent-loader__text"
|
|
1206
|
-
},
|
|
1195
|
+
}, un = /* @__PURE__ */ X({
|
|
1207
1196
|
__name: "VcAiAgentLoader",
|
|
1208
1197
|
props: {
|
|
1209
1198
|
text: {}
|
|
1210
1199
|
},
|
|
1211
1200
|
setup(e) {
|
|
1212
|
-
return (r, a) => (
|
|
1213
|
-
|
|
1214
|
-
|
|
1201
|
+
return (r, a) => (I(), k("div", sn, [
|
|
1202
|
+
A("div", ln, [
|
|
1203
|
+
A("div", cn, [
|
|
1215
1204
|
L(Ve, {
|
|
1216
1205
|
width: 80,
|
|
1217
1206
|
height: 87,
|
|
1218
1207
|
animated: ""
|
|
1219
1208
|
})
|
|
1220
1209
|
]),
|
|
1221
|
-
e.text ? (
|
|
1210
|
+
e.text ? (I(), k("p", dn, z(e.text), 1)) : Z("", !0)
|
|
1222
1211
|
])
|
|
1223
1212
|
]));
|
|
1224
1213
|
}
|
|
1225
|
-
}),
|
|
1214
|
+
}), pn = { class: "vc-ai-agent-iframe" }, fn = ["src"], gn = {
|
|
1226
1215
|
key: 1,
|
|
1227
1216
|
class: "vc-ai-agent-iframe__placeholder"
|
|
1228
|
-
},
|
|
1217
|
+
}, vn = /* @__PURE__ */ X({
|
|
1229
1218
|
__name: "VcAiAgentIframe",
|
|
1230
1219
|
props: {
|
|
1231
1220
|
url: {}
|
|
1232
1221
|
},
|
|
1233
1222
|
emits: ["iframe-ready"],
|
|
1234
1223
|
setup(e, { emit: r }) {
|
|
1235
|
-
const a =
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
(
|
|
1239
|
-
|
|
1224
|
+
const a = Y("ai-agent-iframe"), t = e, o = r, l = N(null), C = N(!0);
|
|
1225
|
+
q(
|
|
1226
|
+
l,
|
|
1227
|
+
(s) => {
|
|
1228
|
+
s && o("iframe-ready", s);
|
|
1240
1229
|
},
|
|
1241
1230
|
{ immediate: !0 }
|
|
1242
1231
|
);
|
|
1243
1232
|
const d = () => {
|
|
1244
1233
|
C.value = !1, a.debug("Iframe loaded");
|
|
1245
1234
|
};
|
|
1246
|
-
return
|
|
1235
|
+
return q(
|
|
1247
1236
|
() => t.url,
|
|
1248
1237
|
() => {
|
|
1249
1238
|
C.value = !0;
|
|
1250
1239
|
}
|
|
1251
|
-
), (
|
|
1240
|
+
), (s, u) => (I(), k("div", pn, [
|
|
1252
1241
|
L(Le, { name: "fade" }, {
|
|
1253
1242
|
default: G(() => [
|
|
1254
|
-
C.value && e.url ? (
|
|
1243
|
+
C.value && e.url ? (I(), ue(un, {
|
|
1255
1244
|
key: 0,
|
|
1256
|
-
text:
|
|
1257
|
-
}, null, 8, ["text"])) :
|
|
1245
|
+
text: s.$t("AI_AGENT.LOADING")
|
|
1246
|
+
}, null, 8, ["text"])) : Z("", !0)
|
|
1258
1247
|
]),
|
|
1259
1248
|
_: 1
|
|
1260
1249
|
}),
|
|
1261
|
-
e.url ? (
|
|
1250
|
+
e.url ? (I(), k("iframe", {
|
|
1262
1251
|
key: 0,
|
|
1263
1252
|
ref_key: "iframeRef",
|
|
1264
|
-
ref:
|
|
1253
|
+
ref: l,
|
|
1265
1254
|
src: e.url,
|
|
1266
1255
|
class: Ne(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": C.value }]),
|
|
1267
1256
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
1268
1257
|
allow: "clipboard-read; clipboard-write",
|
|
1269
1258
|
onLoad: d
|
|
1270
|
-
}, null, 42,
|
|
1271
|
-
L(O(
|
|
1259
|
+
}, null, 42, fn)) : (I(), k("div", gn, [
|
|
1260
|
+
L(O(de), {
|
|
1272
1261
|
icon: "lucide-sparkles",
|
|
1273
1262
|
size: "xl",
|
|
1274
1263
|
class: "vc-ai-agent-iframe__placeholder-icon"
|
|
1275
1264
|
}),
|
|
1276
|
-
u[0] || (u[0] =
|
|
1265
|
+
u[0] || (u[0] = A("p", { class: "vc-ai-agent-iframe__placeholder-text" }, "AI Agent URL not configured", -1))
|
|
1277
1266
|
]))
|
|
1278
1267
|
]));
|
|
1279
1268
|
}
|
|
1280
|
-
}),
|
|
1269
|
+
}), Cn = ["inert"], mn = { class: "vc-ai-agent-panel__content" }, Ln = /* @__PURE__ */ X({
|
|
1281
1270
|
__name: "VcAiAgentPanel",
|
|
1282
1271
|
props: {
|
|
1283
1272
|
inert: { type: Boolean }
|
|
@@ -1287,40 +1276,40 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1287
1276
|
a || console.error("[VcAiAgentPanel] AiAgentService not provided");
|
|
1288
1277
|
const o = E(
|
|
1289
1278
|
() => a?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
|
|
1290
|
-
),
|
|
1279
|
+
), l = E(() => !t && (a?.isOpen.value ?? !1)), C = E(() => a?.isExpanded.value ?? !1), d = E(() => a?.totalItemsCount.value ?? 0), s = E(() => ({
|
|
1291
1280
|
width: C.value ? `${o.value.expandedWidth ?? 500}px` : `${o.value.width ?? 362}px`
|
|
1292
1281
|
})), u = () => a?.closePanel(), g = () => a?.expandPanel(), p = () => a?.collapsePanel(), f = N(null);
|
|
1293
|
-
|
|
1294
|
-
if (
|
|
1282
|
+
it(document, "keydown", (v) => {
|
|
1283
|
+
if (l.value && !v.isComposing && !v.defaultPrevented) {
|
|
1295
1284
|
if (v.key === "Escape") {
|
|
1296
1285
|
v.preventDefault(), u();
|
|
1297
1286
|
return;
|
|
1298
1287
|
}
|
|
1299
|
-
if (
|
|
1288
|
+
if (Bt(ee.mod.backslash, v, r)) {
|
|
1300
1289
|
const _ = document.activeElement;
|
|
1301
1290
|
if (!_ || !f.value?.contains(_)) return;
|
|
1302
1291
|
v.preventDefault(), C.value ? p() : g();
|
|
1303
1292
|
}
|
|
1304
1293
|
}
|
|
1305
1294
|
});
|
|
1306
|
-
const
|
|
1295
|
+
const b = (v) => {
|
|
1307
1296
|
a?._setIframeRef(v);
|
|
1308
1297
|
};
|
|
1309
|
-
return
|
|
1298
|
+
return Xe(() => {
|
|
1310
1299
|
a?._setIframeRef(null);
|
|
1311
|
-
}), (v, _) => (
|
|
1300
|
+
}), (v, _) => (I(), ue(Le, { name: "ai-panel-slide" }, {
|
|
1312
1301
|
default: G(() => [
|
|
1313
|
-
|
|
1302
|
+
l.value ? (I(), k("div", {
|
|
1314
1303
|
key: 0,
|
|
1315
1304
|
ref_key: "panelRef",
|
|
1316
1305
|
ref: f,
|
|
1317
1306
|
class: Ne(["vc-ai-agent-panel", {
|
|
1318
1307
|
"vc-ai-agent-panel--expanded": C.value
|
|
1319
1308
|
}]),
|
|
1320
|
-
style:
|
|
1309
|
+
style: Ye(s.value),
|
|
1321
1310
|
inert: e.inert || void 0
|
|
1322
1311
|
}, [
|
|
1323
|
-
L(
|
|
1312
|
+
L(rn, {
|
|
1324
1313
|
title: o.value.title,
|
|
1325
1314
|
"is-expanded": C.value,
|
|
1326
1315
|
"items-count": d.value,
|
|
@@ -1328,45 +1317,45 @@ const Gt = ["width", "height"], Ut = ["clip-path"], Vt = {
|
|
|
1328
1317
|
onExpand: g,
|
|
1329
1318
|
onCollapse: p
|
|
1330
1319
|
}, null, 8, ["title", "is-expanded", "items-count"]),
|
|
1331
|
-
|
|
1332
|
-
L(
|
|
1320
|
+
A("div", mn, [
|
|
1321
|
+
L(vn, {
|
|
1333
1322
|
url: o.value.url,
|
|
1334
|
-
onIframeReady:
|
|
1323
|
+
onIframeReady: b
|
|
1335
1324
|
}, null, 8, ["url"])
|
|
1336
1325
|
])
|
|
1337
|
-
], 14,
|
|
1326
|
+
], 14, Cn)) : Z("", !0)
|
|
1338
1327
|
]),
|
|
1339
1328
|
_: 1
|
|
1340
1329
|
}));
|
|
1341
1330
|
}
|
|
1342
1331
|
});
|
|
1343
1332
|
export {
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1333
|
+
An as A,
|
|
1334
|
+
lt as D,
|
|
1335
|
+
yn as E,
|
|
1336
|
+
Bn as H,
|
|
1337
|
+
Ln as _,
|
|
1338
|
+
kn as a,
|
|
1339
|
+
Sn as b,
|
|
1340
|
+
Dn as c,
|
|
1341
|
+
xn as d,
|
|
1342
|
+
On as e,
|
|
1343
|
+
kt as f,
|
|
1344
|
+
Tt as g,
|
|
1356
1345
|
Ge as h,
|
|
1357
|
-
|
|
1346
|
+
St as i,
|
|
1358
1347
|
Ue as j,
|
|
1359
1348
|
bt as k,
|
|
1360
|
-
|
|
1349
|
+
At as l,
|
|
1361
1350
|
Ie as m,
|
|
1362
1351
|
ee as n,
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1352
|
+
In as o,
|
|
1353
|
+
Bt as p,
|
|
1354
|
+
$t as q,
|
|
1355
|
+
xt as r,
|
|
1356
|
+
Tn as s,
|
|
1368
1357
|
Re as t,
|
|
1369
|
-
|
|
1358
|
+
Mn as u,
|
|
1370
1359
|
Be as v,
|
|
1371
|
-
|
|
1360
|
+
Pn as w
|
|
1372
1361
|
};
|