@vc-shell/framework 2.4.0-pr309.548f73c → 2.4.0-pr310.8b50b1a
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 +2 -2
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_script_setup_true_lang-bvyt-Rtf.js → VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js} +388 -375
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-9mBLzIi1.js.map +1 -0
- package/dist/chunks/{VcScheduler.vue_vue_type_script_setup_true_lang-CfaVA4mj.js → VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js} +6795 -6739
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-BmlVL_rn.js.map +1 -0
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DSujdkDw.js → dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js} +146 -141
- package/dist/chunks/{dashboard-feed-row.vue_vue_type_script_setup_true_lang-DSujdkDw.js.map → dashboard-feed-row.vue_vue_type_script_setup_true_lang-BCsJG_hk.js.map} +1 -1
- package/dist/chunks/{index-DYMV0pFy.js → index-B7RhGTNx.js} +1 -1
- package/dist/chunks/{index-DYMV0pFy.js.map → index-B7RhGTNx.js.map} +1 -1
- package/dist/core/composables/usePopup/index.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts +4 -1
- package/dist/core/plugins/ai-agent/components/VcAiAgentPanel.vue.d.ts.map +1 -1
- package/dist/core/plugins/ai-agent/services/message-transport.d.ts.map +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/framework.js +12 -12
- package/dist/locales/de.js +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/types.d.ts +1 -0
- package/dist/shell/dashboard/draggable-dashboard/GridstackDashboard.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts +4 -0
- package/dist/ui/components/molecules/vc-popover/vc-popover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/MenuSidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/layouts/MobileLayout.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts +16 -0
- package/dist/ui/components/organisms/vc-blade/useBladeSkeleton.d.ts.map +1 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-scheduler/_internal/month/MonthMorePopover.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-sidebar/vc-sidebar.vue.d.ts.map +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-bvyt-Rtf.js.map +0 -1
- package/dist/chunks/VcScheduler.vue_vue_type_script_setup_true_lang-CfaVA4mj.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as L, computed as b, shallowRef as Ge, watch as q, getCurrentInstance as ee, inject as $, isRef as Ve, provide as ke, defineComponent as H, openBlock as B, createElementBlock as S, createElementVNode as w, createCommentVNode as z, createStaticVNode as Ke, Fragment as we, renderList as qe, toDisplayString as K, createVNode as M, createBlock as se, unref as x, withCtx as F, withKeys as U, withModifiers as G, createTextVNode as Ce, Transition as Pe, normalizeClass as Me, onUnmounted as ze, normalizeStyle as He } from "vue";
|
|
2
2
|
import { c as W, b as De, d as We, B as Ze, e as Xe, f as Ye, A as be, L as je, g as Qe, T as Je, a as me, _ as ie, E as et } from "./VcAiAgentPanel.vue_vue_type_style_index_0_lang-CZdY18Hq.js";
|
|
3
3
|
import { c as te } from "./vendor-lodash-es-D2n90GJy.js";
|
|
4
4
|
import { u as tt } from "./vendor-vueuse-core-BFa9je5E.js";
|
|
@@ -10,19 +10,19 @@ const at = {
|
|
|
10
10
|
expandedWidth: 500,
|
|
11
11
|
// Secure by default: no origins trusted until the embedder configures them.
|
|
12
12
|
allowedOrigins: []
|
|
13
|
-
},
|
|
13
|
+
}, hn = "APP_AI_AGENT_URL", _n = {
|
|
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
|
+
}, En = {
|
|
19
19
|
EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
|
|
20
20
|
AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
|
|
21
21
|
}, ot = "ai-agent-toggle", rt = "lucide-sparkles", it = "AI Assistant", ne = W("ai-agent-panel");
|
|
22
22
|
function st() {
|
|
23
|
-
const e =
|
|
23
|
+
const e = L("closed"), o = L(!1), t = b(() => e.value !== "closed"), s = b(() => e.value === "expanded"), n = () => {
|
|
24
24
|
e.value === "closed" && (e.value = "open", ne.debug("Panel opened"));
|
|
25
|
-
},
|
|
25
|
+
}, l = () => {
|
|
26
26
|
e.value = "closed", o.value = !1, ne.debug("Panel closed, reset initialized state");
|
|
27
27
|
};
|
|
28
28
|
return {
|
|
@@ -31,9 +31,9 @@ function st() {
|
|
|
31
31
|
isExpanded: s,
|
|
32
32
|
isInitialized: o,
|
|
33
33
|
open: n,
|
|
34
|
-
close:
|
|
34
|
+
close: l,
|
|
35
35
|
toggle: () => {
|
|
36
|
-
e.value === "closed" ? n() :
|
|
36
|
+
e.value === "closed" ? n() : l();
|
|
37
37
|
},
|
|
38
38
|
expand: () => {
|
|
39
39
|
e.value === "open" && (e.value = "expanded", ne.debug("Panel expanded"));
|
|
@@ -47,7 +47,7 @@ function st() {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
const he = W("ai-agent-context");
|
|
50
|
-
function
|
|
50
|
+
function Ae(e) {
|
|
51
51
|
return e ? {
|
|
52
52
|
id: e.id,
|
|
53
53
|
name: e.name,
|
|
@@ -56,9 +56,9 @@ function we(e) {
|
|
|
56
56
|
} : { id: "unknown", name: "unknown", title: "Unknown" };
|
|
57
57
|
}
|
|
58
58
|
function lt(e) {
|
|
59
|
-
const { userGetter: o, bladeGetter: t, localeGetter: s, tokenGetter: n } = e,
|
|
60
|
-
const
|
|
61
|
-
return
|
|
59
|
+
const { userGetter: o, bladeGetter: t, localeGetter: s, tokenGetter: n } = e, l = L(/* @__PURE__ */ new Map()), g = () => {
|
|
60
|
+
const v = t();
|
|
61
|
+
return v ? l.value.get(v.id) ?? {
|
|
62
62
|
items: [],
|
|
63
63
|
type: "list",
|
|
64
64
|
suggestions: void 0
|
|
@@ -67,168 +67,171 @@ function lt(e) {
|
|
|
67
67
|
type: "list",
|
|
68
68
|
suggestions: void 0
|
|
69
69
|
};
|
|
70
|
-
},
|
|
70
|
+
}, c = b(() => g().items), d = b(() => g().type), u = b(() => g().suggestions), h = b(() => c.value.length);
|
|
71
71
|
return {
|
|
72
|
-
contextItems:
|
|
72
|
+
contextItems: c,
|
|
73
73
|
contextType: d,
|
|
74
74
|
contextSuggestions: u,
|
|
75
75
|
totalItemsCount: h,
|
|
76
|
-
setContextData: (
|
|
77
|
-
const
|
|
78
|
-
return
|
|
76
|
+
setContextData: (v, A, I, k) => {
|
|
77
|
+
const P = t()?.id || k;
|
|
78
|
+
return P ? v.length === 0 && !I ? (l.value.delete(P), he.debug(`Context cleared for blade: ${P}`), { cleared: !0 }) : (l.value.set(P, { items: v, type: A, suggestions: I }), he.debug(`Context set for blade: ${P}, items: ${v.length}, type: ${A}`), { cleared: !1 }) : (he.warn("Cannot set context data: no blade id available"), { cleared: !1 });
|
|
79
79
|
},
|
|
80
80
|
buildInitPayload: async () => {
|
|
81
|
-
const
|
|
81
|
+
const v = n ? await n() ?? void 0 : void 0;
|
|
82
82
|
return {
|
|
83
83
|
userId: o()?.id || "",
|
|
84
84
|
locale: s(),
|
|
85
|
-
blade:
|
|
85
|
+
blade: Ae(t()),
|
|
86
86
|
contextType: d.value,
|
|
87
|
-
items: te(
|
|
87
|
+
items: te(c.value),
|
|
88
88
|
suggestions: u.value ? te(u.value) : void 0,
|
|
89
|
-
accessToken:
|
|
89
|
+
accessToken: v
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
buildUpdatePayload: async () => {
|
|
93
|
-
const
|
|
93
|
+
const v = n ? await n() ?? void 0 : void 0;
|
|
94
94
|
return {
|
|
95
|
-
blade:
|
|
95
|
+
blade: Ae(t()),
|
|
96
96
|
contextType: d.value,
|
|
97
|
-
items: te(
|
|
97
|
+
items: te(c.value),
|
|
98
98
|
suggestions: u.value ? te(u.value) : void 0,
|
|
99
99
|
locale: s(),
|
|
100
|
-
accessToken:
|
|
100
|
+
accessToken: v
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
const O = W("ai-agent-transport");
|
|
106
106
|
function ct(e) {
|
|
107
|
-
const { getConfig: o, isEmbedded: t, navigateToBlade: s, closePanel: n } = e,
|
|
108
|
-
function h(
|
|
109
|
-
switch (
|
|
107
|
+
const { getConfig: o, isEmbedded: t, navigateToBlade: s, closePanel: n } = e, l = Ge(null), g = L(!1), c = L(!1), d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
108
|
+
function h(f, E) {
|
|
109
|
+
switch (f) {
|
|
110
110
|
case "NAVIGATE_TO_APP": {
|
|
111
|
-
const
|
|
112
|
-
s &&
|
|
111
|
+
const A = E;
|
|
112
|
+
s && A?.bladeName && (s(A.bladeName, A.param, A.options), O.debug(`Navigation requested to: ${A.bladeName}`));
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
// The panel's own Escape handler listens on the host document, which never sees a
|
|
116
116
|
// keystroke delivered to a cross-origin iframe. So while the chatbot holds focus the
|
|
117
117
|
// only route back is the chatbot relaying it here (VCST-5673). Closing a panel exposes
|
|
118
|
-
// nothing, and the sender's origin
|
|
118
|
+
// nothing, and the sender's origin and window are checked before this runs.
|
|
119
119
|
case "CLOSE_PANEL": {
|
|
120
120
|
n && (n(), O.debug("Panel close requested by the chatbot"));
|
|
121
121
|
break;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
type:
|
|
126
|
-
payload:
|
|
124
|
+
const v = {
|
|
125
|
+
type: f,
|
|
126
|
+
payload: E,
|
|
127
127
|
timestamp: Date.now()
|
|
128
128
|
};
|
|
129
|
-
d.forEach((
|
|
129
|
+
d.forEach((A) => {
|
|
130
130
|
try {
|
|
131
|
-
|
|
132
|
-
} catch (
|
|
133
|
-
O.error("Handler error:",
|
|
131
|
+
A(v);
|
|
132
|
+
} catch (I) {
|
|
133
|
+
O.error("Handler error:", I);
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
137
|
+
function C(f) {
|
|
138
|
+
const v = o().allowedOrigins ?? [];
|
|
139
|
+
if (v.length === 0) {
|
|
140
140
|
O.warn(
|
|
141
141
|
"Ignoring postMessage: aiAgentConfig.allowedOrigins is empty. Configure explicit origins to enable the AI agent bridge.",
|
|
142
|
-
{ origin:
|
|
142
|
+
{ origin: f.origin, type: f.data?.type }
|
|
143
143
|
);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
if (
|
|
146
|
+
if (v.includes("*")) {
|
|
147
147
|
O.error(
|
|
148
148
|
'Refusing postMessage with wildcard allowedOrigins. Replace "*" with explicit origins (e.g. ["https://chat.example.com"]).'
|
|
149
149
|
);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
if (!
|
|
152
|
+
if (!v.includes(f.origin))
|
|
153
153
|
return;
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
156
|
-
|
|
154
|
+
const A = t ? window.parent : l.value?.contentWindow;
|
|
155
|
+
if (!A || f.source !== A)
|
|
156
|
+
return;
|
|
157
|
+
const I = f.data;
|
|
158
|
+
if (!(!I?.type || typeof I.type != "string"))
|
|
159
|
+
switch (O.debug(`Message received: ${I.type}`), I.type) {
|
|
157
160
|
// Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
|
|
158
161
|
case "AI_CHAT_MESSAGE": {
|
|
159
162
|
if (t) {
|
|
160
|
-
const
|
|
161
|
-
|
|
163
|
+
const k = I.payload;
|
|
164
|
+
k?.type && h(k.type, k.payload);
|
|
162
165
|
}
|
|
163
166
|
return;
|
|
164
167
|
}
|
|
165
168
|
// Normal: chatbot signals it's ready
|
|
166
169
|
case "CHAT_READY":
|
|
167
|
-
u.forEach((
|
|
170
|
+
u.forEach((k) => {
|
|
168
171
|
try {
|
|
169
|
-
|
|
170
|
-
} catch (
|
|
171
|
-
O.error("ChatReady handler error:",
|
|
172
|
+
k();
|
|
173
|
+
} catch (P) {
|
|
174
|
+
O.error("ChatReady handler error:", P);
|
|
172
175
|
}
|
|
173
176
|
});
|
|
174
177
|
break;
|
|
175
178
|
// Normal: direct chat protocol messages
|
|
176
179
|
default:
|
|
177
|
-
h(
|
|
180
|
+
h(I.type, I.payload);
|
|
178
181
|
break;
|
|
179
182
|
}
|
|
180
183
|
}
|
|
181
184
|
return {
|
|
182
|
-
iframeRef:
|
|
183
|
-
pendingInitContext:
|
|
184
|
-
isListenerRegistered:
|
|
185
|
-
setIframeRef(
|
|
186
|
-
|
|
185
|
+
iframeRef: l,
|
|
186
|
+
pendingInitContext: g,
|
|
187
|
+
isListenerRegistered: c,
|
|
188
|
+
setIframeRef(f) {
|
|
189
|
+
l.value = f, O.debug("Iframe ref set:", f ? "available" : "null");
|
|
187
190
|
},
|
|
188
|
-
sendToIframe(
|
|
189
|
-
if (!
|
|
191
|
+
sendToIframe(f) {
|
|
192
|
+
if (!l.value?.contentWindow) {
|
|
190
193
|
O.warn("Cannot send message: iframe not available");
|
|
191
194
|
return;
|
|
192
195
|
}
|
|
193
|
-
const
|
|
194
|
-
if (!
|
|
196
|
+
const E = o().allowedOrigins?.[0];
|
|
197
|
+
if (!E || E === "*") {
|
|
195
198
|
O.error(
|
|
196
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.",
|
|
197
|
-
{ type:
|
|
200
|
+
{ type: f.type }
|
|
198
201
|
);
|
|
199
202
|
return;
|
|
200
203
|
}
|
|
201
|
-
|
|
204
|
+
l.value.contentWindow.postMessage(f, E), O.debug(`Sent to iframe: ${f.type}`);
|
|
202
205
|
},
|
|
203
|
-
sendToParent(
|
|
206
|
+
sendToParent(f) {
|
|
204
207
|
if (!window.parent || window.parent === window) {
|
|
205
208
|
O.warn("Cannot send to parent: not in iframe");
|
|
206
209
|
return;
|
|
207
210
|
}
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
211
|
+
const E = o().parentOrigin;
|
|
212
|
+
if (!E || E === "*") {
|
|
210
213
|
O.error(
|
|
211
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.",
|
|
212
|
-
{ type:
|
|
215
|
+
{ type: f.type }
|
|
213
216
|
);
|
|
214
217
|
return;
|
|
215
218
|
}
|
|
216
|
-
window.parent.postMessage(
|
|
219
|
+
window.parent.postMessage(f, E), O.debug(`Sent to parent: ${f.type}`);
|
|
217
220
|
},
|
|
218
221
|
startListening() {
|
|
219
|
-
|
|
222
|
+
c.value || (window.addEventListener("message", C), c.value = !0);
|
|
220
223
|
},
|
|
221
224
|
stopListening() {
|
|
222
|
-
|
|
225
|
+
c.value && (window.removeEventListener("message", C), c.value = !1);
|
|
223
226
|
},
|
|
224
|
-
onChatReady(
|
|
225
|
-
return u.add(
|
|
226
|
-
u.delete(
|
|
227
|
+
onChatReady(f) {
|
|
228
|
+
return u.add(f), () => {
|
|
229
|
+
u.delete(f);
|
|
227
230
|
};
|
|
228
231
|
},
|
|
229
|
-
onMessage(
|
|
230
|
-
return d.add(
|
|
231
|
-
d.delete(
|
|
232
|
+
onMessage(f) {
|
|
233
|
+
return d.add(f), () => {
|
|
234
|
+
d.delete(f);
|
|
232
235
|
};
|
|
233
236
|
}
|
|
234
237
|
};
|
|
@@ -240,87 +243,87 @@ function dt(e) {
|
|
|
240
243
|
bladeGetter: t,
|
|
241
244
|
localeGetter: s,
|
|
242
245
|
tokenGetter: n,
|
|
243
|
-
navigateToBlade:
|
|
244
|
-
initialConfig:
|
|
245
|
-
isEmbedded:
|
|
246
|
-
} = e, d =
|
|
246
|
+
navigateToBlade: l,
|
|
247
|
+
initialConfig: g,
|
|
248
|
+
isEmbedded: c = !1
|
|
249
|
+
} = e, d = L({ ...at, ...g }), u = st(), h = lt({
|
|
247
250
|
userGetter: o,
|
|
248
251
|
bladeGetter: t,
|
|
249
252
|
localeGetter: s,
|
|
250
253
|
tokenGetter: n
|
|
251
|
-
}),
|
|
254
|
+
}), C = ct({
|
|
252
255
|
getConfig: () => d.value,
|
|
253
|
-
isEmbedded:
|
|
254
|
-
navigateToBlade:
|
|
256
|
+
isEmbedded: c,
|
|
257
|
+
navigateToBlade: l,
|
|
255
258
|
closePanel: () => u.close()
|
|
256
|
-
}),
|
|
259
|
+
}), f = b(() => ({
|
|
257
260
|
user: o(),
|
|
258
261
|
currentBlade: t(),
|
|
259
262
|
items: h.contextItems.value
|
|
260
|
-
})),
|
|
261
|
-
if (
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
263
|
+
})), E = async () => {
|
|
264
|
+
if (C.pendingInitContext.value && C.iframeRef.value?.contentWindow) {
|
|
265
|
+
C.pendingInitContext.value = !1, u.isInitialized.value = !0;
|
|
266
|
+
const T = await h.buildInitPayload();
|
|
267
|
+
C.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.debug("Flushed pending INIT_CONTEXT");
|
|
265
268
|
}
|
|
266
269
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
})) : (
|
|
271
|
-
}), q(
|
|
272
|
-
() => ({ currentBlade:
|
|
270
|
+
C.onChatReady(() => {
|
|
271
|
+
C.iframeRef.value?.contentWindow ? (u.isInitialized.value = !0, h.buildInitPayload().then((T) => {
|
|
272
|
+
C.sendToIframe({ type: "INIT_CONTEXT", payload: T }), ae.info("Chatbot ready, sent INIT_CONTEXT");
|
|
273
|
+
})) : (C.pendingInitContext.value = !0, ae.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
|
|
274
|
+
}), q(C.iframeRef, () => E()), q(
|
|
275
|
+
() => ({ currentBlade: f.value.currentBlade, items: f.value.items }),
|
|
273
276
|
async () => {
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
+
if (c) {
|
|
278
|
+
const T = await h.buildInitPayload();
|
|
279
|
+
C.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: T });
|
|
277
280
|
return;
|
|
278
281
|
}
|
|
279
|
-
if (u.isOpen.value && u.isInitialized.value &&
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
+
if (u.isOpen.value && u.isInitialized.value && C.iframeRef.value?.contentWindow) {
|
|
283
|
+
const T = await h.buildUpdatePayload();
|
|
284
|
+
C.sendToIframe({ type: "UPDATE_CONTEXT", payload: T });
|
|
282
285
|
}
|
|
283
286
|
},
|
|
284
287
|
{ deep: !0 }
|
|
285
288
|
);
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
},
|
|
289
|
-
const { cleared: Y } = h.setContextData(
|
|
290
|
-
|
|
289
|
+
const v = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.open(), A = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.close(), I = () => c ? C.sendToParent({ type: "AI_TOGGLE_PANEL" }) : u.toggle(), k = (T) => {
|
|
290
|
+
C.setIframeRef(T), E();
|
|
291
|
+
}, P = (T, R, Z, X) => {
|
|
292
|
+
const { cleared: Y } = h.setContextData(T, R, Z, X);
|
|
293
|
+
c && Y && C.sendToParent({ type: "AI_CONTEXT_CLEAR" });
|
|
291
294
|
};
|
|
292
|
-
return
|
|
295
|
+
return C.startListening(), c && (C.sendToParent({
|
|
293
296
|
type: "EMBEDDED_APP_READY",
|
|
294
297
|
payload: { supportedFeatures: ["ai-agent"] }
|
|
295
298
|
}), ae.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
|
|
296
299
|
// State
|
|
297
300
|
panelState: u.panelState,
|
|
298
301
|
config: d,
|
|
299
|
-
context:
|
|
300
|
-
isOpen: b(() => !
|
|
302
|
+
context: f,
|
|
303
|
+
isOpen: b(() => !c && u.isOpen.value),
|
|
301
304
|
isExpanded: u.isExpanded,
|
|
302
305
|
totalItemsCount: h.totalItemsCount,
|
|
303
306
|
// Panel control
|
|
304
|
-
openPanel:
|
|
305
|
-
closePanel:
|
|
306
|
-
togglePanel:
|
|
307
|
+
openPanel: v,
|
|
308
|
+
closePanel: A,
|
|
309
|
+
togglePanel: I,
|
|
307
310
|
expandPanel: () => u.expand(),
|
|
308
311
|
collapsePanel: () => u.collapse(),
|
|
309
312
|
// Configuration
|
|
310
|
-
setConfig: (
|
|
311
|
-
d.value = { ...d.value, ...
|
|
313
|
+
setConfig: (T) => {
|
|
314
|
+
d.value = { ...d.value, ...T };
|
|
312
315
|
},
|
|
313
316
|
// Communication
|
|
314
|
-
sendMessage: (
|
|
315
|
-
|
|
317
|
+
sendMessage: (T, R) => {
|
|
318
|
+
C.sendToIframe({ type: T, payload: R });
|
|
316
319
|
},
|
|
317
|
-
onMessage:
|
|
320
|
+
onMessage: C.onMessage,
|
|
318
321
|
// Internal API
|
|
319
|
-
iframeRef:
|
|
320
|
-
_setIframeRef:
|
|
321
|
-
_startListening:
|
|
322
|
-
_stopListening:
|
|
323
|
-
_setContextData:
|
|
322
|
+
iframeRef: C.iframeRef,
|
|
323
|
+
_setIframeRef: k,
|
|
324
|
+
_startListening: C.startListening,
|
|
325
|
+
_stopListening: C.stopListening,
|
|
326
|
+
_setContextData: P
|
|
324
327
|
};
|
|
325
328
|
}
|
|
326
329
|
const ut = /* @__PURE__ */ new Set(["mod", "ctrl", "meta", "alt", "shift"]);
|
|
@@ -373,10 +376,10 @@ function ft(e) {
|
|
|
373
376
|
return e in Be ? Be[e] : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1);
|
|
374
377
|
}
|
|
375
378
|
function Ee(e, o) {
|
|
376
|
-
const t = !!e.ctrl || !!e.mod && !o, s = !!e.meta || !!e.mod && o, n = [],
|
|
377
|
-
o ? (t && n.push(oe.ctrl), e.alt && n.push(oe.alt), e.shift && n.push(oe.shift), s && n.push(oe.meta)) : (t && n.push(re.ctrl), s && n.push(re.meta), e.alt && n.push(re.alt), e.shift && n.push(re.shift)), t &&
|
|
378
|
-
const
|
|
379
|
-
return { parts: n, aria:
|
|
379
|
+
const t = !!e.ctrl || !!e.mod && !o, s = !!e.meta || !!e.mod && o, n = [], l = [];
|
|
380
|
+
o ? (t && n.push(oe.ctrl), e.alt && n.push(oe.alt), e.shift && n.push(oe.shift), s && n.push(oe.meta)) : (t && n.push(re.ctrl), s && n.push(re.meta), e.alt && n.push(re.alt), e.shift && n.push(re.shift)), t && l.push("Control"), s && l.push("Meta"), e.alt && l.push("Alt"), e.shift && l.push("Shift"), n.push(pt(e.key));
|
|
381
|
+
const g = [...l, ft(e.key)].join("+");
|
|
382
|
+
return { parts: n, aria: g };
|
|
380
383
|
}
|
|
381
384
|
const Ie = {
|
|
382
385
|
backslash: "Backslash",
|
|
@@ -420,8 +423,8 @@ function _t(e, o) {
|
|
|
420
423
|
return s !== void 0 ? o.key === s : !1;
|
|
421
424
|
}
|
|
422
425
|
function Et(e, o, t) {
|
|
423
|
-
const s = !!e.ctrl || !!e.mod && !t, n = !!e.meta || !!e.mod && t,
|
|
424
|
-
return o.ctrlKey !== s || o.metaKey !== n || o.altKey !==
|
|
426
|
+
const s = !!e.ctrl || !!e.mod && !t, n = !!e.meta || !!e.mod && t, l = !!e.alt, g = !!e.shift;
|
|
427
|
+
return o.ctrlKey !== s || o.metaKey !== n || o.altKey !== l || o.shiftKey !== g ? !1 : _t(e, o);
|
|
425
428
|
}
|
|
426
429
|
const bt = /* @__PURE__ */ new Set([
|
|
427
430
|
"button",
|
|
@@ -434,7 +437,7 @@ const bt = /* @__PURE__ */ new Set([
|
|
|
434
437
|
"range",
|
|
435
438
|
"color"
|
|
436
439
|
]);
|
|
437
|
-
function
|
|
440
|
+
function bn() {
|
|
438
441
|
const e = document.activeElement;
|
|
439
442
|
if (!e) return !1;
|
|
440
443
|
const o = e.tagName;
|
|
@@ -443,51 +446,51 @@ function En() {
|
|
|
443
446
|
const t = e.getAttribute("contenteditable");
|
|
444
447
|
return t === "true" || t === "";
|
|
445
448
|
}
|
|
446
|
-
function
|
|
449
|
+
function wt() {
|
|
447
450
|
return typeof navigator > "u" ? !1 : /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
448
451
|
}
|
|
449
452
|
function Ne() {
|
|
450
|
-
const e =
|
|
453
|
+
const e = wt();
|
|
451
454
|
return {
|
|
452
455
|
hotkey: Q,
|
|
453
456
|
isMac: e,
|
|
454
457
|
formatShortcut: (o) => Ee(o, e)
|
|
455
458
|
};
|
|
456
459
|
}
|
|
457
|
-
let
|
|
458
|
-
function
|
|
459
|
-
|
|
460
|
+
let $e, Fe, Re, At;
|
|
461
|
+
function wn(e) {
|
|
462
|
+
$e = e;
|
|
460
463
|
}
|
|
461
464
|
function An(e) {
|
|
462
|
-
|
|
465
|
+
Fe = e;
|
|
463
466
|
}
|
|
464
|
-
function
|
|
467
|
+
function yn(e) {
|
|
465
468
|
Re = e;
|
|
466
469
|
}
|
|
467
|
-
function
|
|
468
|
-
|
|
470
|
+
function Bn(e) {
|
|
471
|
+
At = e;
|
|
469
472
|
}
|
|
470
473
|
function xe(e, o) {
|
|
471
474
|
if (o.length === 0)
|
|
472
475
|
return { path: e ? `/${e}` : "/", query: {} };
|
|
473
476
|
const t = o[0], s = Se(t.url);
|
|
474
477
|
let n;
|
|
475
|
-
for (let
|
|
476
|
-
if (o[
|
|
477
|
-
n = o[
|
|
478
|
+
for (let c = o.length - 1; c >= 1; c--)
|
|
479
|
+
if (o[c].visible) {
|
|
480
|
+
n = o[c];
|
|
478
481
|
break;
|
|
479
482
|
}
|
|
480
|
-
let
|
|
481
|
-
if (s && (
|
|
482
|
-
const
|
|
483
|
-
|
|
483
|
+
let l = e ? `/${e}` : "";
|
|
484
|
+
if (s && (l += `/${s}`), n) {
|
|
485
|
+
const c = Se(n.url);
|
|
486
|
+
c && (l += `/${c}`), n.param && (l += `/${n.param}`);
|
|
484
487
|
}
|
|
485
|
-
const
|
|
486
|
-
for (const
|
|
487
|
-
|
|
488
|
-
return { path:
|
|
488
|
+
const g = {};
|
|
489
|
+
for (const c of o)
|
|
490
|
+
c.visible && c.query && Object.assign(g, c.query);
|
|
491
|
+
return { path: l || "/", query: g };
|
|
489
492
|
}
|
|
490
|
-
function
|
|
493
|
+
function In(e, o) {
|
|
491
494
|
let t = e.split("/").filter(Boolean);
|
|
492
495
|
return o && t.length > 0 && t[0] === o && (t = t.slice(1)), t.length === 0 ? {} : {
|
|
493
496
|
workspaceUrl: t[0],
|
|
@@ -505,12 +508,12 @@ function Oe(e) {
|
|
|
505
508
|
}
|
|
506
509
|
function yt(e, o) {
|
|
507
510
|
function t() {
|
|
508
|
-
const { path: n, query:
|
|
509
|
-
e.push({ path: n, query:
|
|
511
|
+
const { path: n, query: l } = xe(Oe(e), o.blades.value);
|
|
512
|
+
e.push({ path: n, query: l });
|
|
510
513
|
}
|
|
511
514
|
function s() {
|
|
512
|
-
const { path: n, query:
|
|
513
|
-
e.replace({ path: n, query:
|
|
515
|
+
const { path: n, query: l } = xe(Oe(e), o.blades.value);
|
|
516
|
+
e.replace({ path: n, query: l });
|
|
514
517
|
}
|
|
515
518
|
return { syncUrlPush: t, syncUrlReplace: s };
|
|
516
519
|
}
|
|
@@ -520,64 +523,64 @@ function y(e) {
|
|
|
520
523
|
${Bt}`);
|
|
521
524
|
}
|
|
522
525
|
function It() {
|
|
523
|
-
const e = (ee() ?
|
|
526
|
+
const e = (ee() ? $(De, void 0) : void 0) ?? Fe, o = (ee() ? $(We, void 0) : void 0) ?? Re;
|
|
524
527
|
if (!e || !o)
|
|
525
528
|
throw new Error(
|
|
526
529
|
"[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
|
|
527
530
|
);
|
|
528
|
-
const t = e, s = o, n = ee() ?
|
|
529
|
-
let
|
|
530
|
-
function
|
|
531
|
-
if (
|
|
532
|
-
const r =
|
|
533
|
-
return r && (
|
|
531
|
+
const t = e, s = o, n = ee() ? $(Ze, void 0) : void 0, l = ee() ? $(Xe, void 0) : void 0;
|
|
532
|
+
let g;
|
|
533
|
+
function c() {
|
|
534
|
+
if (g) return g;
|
|
535
|
+
const r = $e?.router;
|
|
536
|
+
return r && (g = yt(r, t)), g;
|
|
534
537
|
}
|
|
535
|
-
const d = b(() => (n || y("id"), n.value.id)), u = b(() => (n || y("param"), n.value.param)), h = b(() => (n || y("options"), n.value.options)),
|
|
538
|
+
const d = b(() => (n || y("id"), n.value.id)), u = b(() => (n || y("param"), n.value.param)), h = b(() => (n || y("options"), n.value.options)), C = b(() => (n || y("query"), n.value.query)), f = b(() => (n || y("closable"), n.value.parentId !== void 0)), E = b(() => (n || y("expanded"), t.activeBlade.value?.id === n.value.id)), v = b(() => (n || y("name"), n.value.name)), A = b(() => {
|
|
536
539
|
if (!n) return;
|
|
537
540
|
const r = n.value.id;
|
|
538
541
|
return t.blades.value.find((m) => m.parentId === r)?.param;
|
|
539
542
|
});
|
|
540
|
-
let
|
|
541
|
-
function
|
|
542
|
-
if (
|
|
543
|
+
let I = !1;
|
|
544
|
+
function k(r) {
|
|
545
|
+
if (I) {
|
|
543
546
|
console.warn(
|
|
544
547
|
"[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
|
|
545
548
|
);
|
|
546
549
|
return;
|
|
547
550
|
}
|
|
548
|
-
|
|
549
|
-
const m = Ve(r) ? r :
|
|
550
|
-
|
|
551
|
+
I = !0;
|
|
552
|
+
const m = Ve(r) ? r : L(r);
|
|
553
|
+
ke(Ye, m);
|
|
551
554
|
}
|
|
552
|
-
async function
|
|
553
|
-
const { isWorkspace: m, ...
|
|
555
|
+
async function P(r) {
|
|
556
|
+
const { isWorkspace: m, ...D } = r;
|
|
554
557
|
if (m)
|
|
555
|
-
await t.openWorkspace(
|
|
558
|
+
await t.openWorkspace(D);
|
|
556
559
|
else {
|
|
557
|
-
const
|
|
558
|
-
|
|
560
|
+
const N = n?.value.id;
|
|
561
|
+
N ? await t.openBlade({ ...D, parentId: N }) : await t.openBlade(D);
|
|
559
562
|
}
|
|
560
|
-
t.activeBlade.value?.url &&
|
|
563
|
+
t.activeBlade.value?.url && c()?.syncUrlPush();
|
|
561
564
|
}
|
|
562
|
-
async function
|
|
565
|
+
async function T() {
|
|
563
566
|
n || y("closeSelf()");
|
|
564
567
|
const r = await t.closeBlade(n.value.id);
|
|
565
|
-
return r ||
|
|
568
|
+
return r || c()?.syncUrlReplace(), r;
|
|
566
569
|
}
|
|
567
570
|
async function R() {
|
|
568
|
-
n || y("closeChildren()"), await t.closeChildren(n.value.id),
|
|
571
|
+
n || y("closeChildren()"), await t.closeChildren(n.value.id), c()?.syncUrlReplace();
|
|
569
572
|
}
|
|
570
573
|
async function Z(r) {
|
|
571
574
|
n || y("replaceWith()"), await t.replaceCurrentBlade({
|
|
572
575
|
...r,
|
|
573
576
|
parentId: n.value.parentId
|
|
574
|
-
}), t.activeBlade.value?.url &&
|
|
577
|
+
}), t.activeBlade.value?.url && c()?.syncUrlReplace();
|
|
575
578
|
}
|
|
576
579
|
async function X(r) {
|
|
577
580
|
n || y("coverWith()"), await t.coverCurrentBlade({
|
|
578
581
|
...r,
|
|
579
582
|
parentId: n.value.parentId
|
|
580
|
-
}), t.activeBlade.value?.url &&
|
|
583
|
+
}), t.activeBlade.value?.url && c()?.syncUrlPush();
|
|
581
584
|
}
|
|
582
585
|
async function Y(r, m) {
|
|
583
586
|
return n || y("callParent()"), s.callParent(n.value.id, r, m);
|
|
@@ -596,19 +599,19 @@ function It() {
|
|
|
596
599
|
}
|
|
597
600
|
let ue = 0;
|
|
598
601
|
function pe(r) {
|
|
599
|
-
|
|
602
|
+
l || y("addBanner()");
|
|
600
603
|
const m = `banner-${n.value.id}-${++ue}`;
|
|
601
|
-
return
|
|
604
|
+
return l.value.push({
|
|
602
605
|
...r,
|
|
603
606
|
id: m,
|
|
604
607
|
dismissible: r.dismissible ?? !1
|
|
605
608
|
}), m;
|
|
606
609
|
}
|
|
607
610
|
function fe(r) {
|
|
608
|
-
|
|
611
|
+
l || y("removeBanner()"), l.value = l.value.filter((m) => m.id !== r);
|
|
609
612
|
}
|
|
610
613
|
function ge() {
|
|
611
|
-
|
|
614
|
+
l || y("clearBanners()"), l.value = l.value.filter((r) => r._system);
|
|
612
615
|
}
|
|
613
616
|
let a = !1, i = !1;
|
|
614
617
|
function p(r) {
|
|
@@ -616,7 +619,7 @@ function It() {
|
|
|
616
619
|
console.warn("[useBlade] onActivated() already registered in this blade.");
|
|
617
620
|
return;
|
|
618
621
|
}
|
|
619
|
-
a = !0, q(
|
|
622
|
+
a = !0, q(E, (m) => {
|
|
620
623
|
m && r();
|
|
621
624
|
});
|
|
622
625
|
}
|
|
@@ -625,22 +628,22 @@ function It() {
|
|
|
625
628
|
console.warn("[useBlade] onDeactivated() already registered in this blade.");
|
|
626
629
|
return;
|
|
627
630
|
}
|
|
628
|
-
i = !0, q(
|
|
631
|
+
i = !0, q(E, (m) => {
|
|
629
632
|
m || r();
|
|
630
633
|
});
|
|
631
634
|
}
|
|
632
635
|
return {
|
|
633
636
|
id: d,
|
|
634
637
|
param: u,
|
|
635
|
-
activeChildParam:
|
|
638
|
+
activeChildParam: A,
|
|
636
639
|
options: h,
|
|
637
|
-
query:
|
|
638
|
-
closable:
|
|
639
|
-
expanded:
|
|
640
|
-
name:
|
|
641
|
-
provideBladeData:
|
|
642
|
-
openBlade:
|
|
643
|
-
closeSelf:
|
|
640
|
+
query: C,
|
|
641
|
+
closable: f,
|
|
642
|
+
expanded: E,
|
|
643
|
+
name: v,
|
|
644
|
+
provideBladeData: k,
|
|
645
|
+
openBlade: P,
|
|
646
|
+
closeSelf: T,
|
|
644
647
|
closeChildren: R,
|
|
645
648
|
replaceWith: Z,
|
|
646
649
|
coverWith: X,
|
|
@@ -703,28 +706,28 @@ function Ot(e, o, t) {
|
|
|
703
706
|
visible: !0
|
|
704
707
|
};
|
|
705
708
|
}
|
|
706
|
-
let
|
|
707
|
-
function
|
|
708
|
-
return `blade_${++
|
|
709
|
+
let kt = 0;
|
|
710
|
+
function Pt() {
|
|
711
|
+
return `blade_${++kt}_${Math.random().toString(36).slice(2, 8)}`;
|
|
709
712
|
}
|
|
710
|
-
function
|
|
711
|
-
const t =
|
|
713
|
+
function Tn(e, o) {
|
|
714
|
+
const t = L([]), s = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), c = b(() => t.value[0]), d = b(() => t.value), u = b(() => {
|
|
712
715
|
for (let a = t.value.length - 1; a >= 0; a--)
|
|
713
716
|
if (t.value[a].visible) return t.value[a];
|
|
714
717
|
});
|
|
715
718
|
function h(a) {
|
|
716
|
-
s.delete(a), n.delete(a),
|
|
719
|
+
s.delete(a), n.delete(a), l.delete(a), g.delete(a);
|
|
717
720
|
}
|
|
718
|
-
function
|
|
721
|
+
function C(a) {
|
|
719
722
|
const i = e.getBlade(a);
|
|
720
723
|
if (i)
|
|
721
724
|
return i.route;
|
|
722
725
|
}
|
|
723
|
-
const
|
|
724
|
-
generateId:
|
|
725
|
-
resolveUrl:
|
|
726
|
+
const f = {
|
|
727
|
+
generateId: Pt,
|
|
728
|
+
resolveUrl: C
|
|
726
729
|
};
|
|
727
|
-
async function
|
|
730
|
+
async function E(a) {
|
|
728
731
|
for (let i = a.length - 1; i >= 0; i--) {
|
|
729
732
|
const p = s.get(a[i].id);
|
|
730
733
|
if (p && await p())
|
|
@@ -732,12 +735,12 @@ function In(e, o) {
|
|
|
732
735
|
}
|
|
733
736
|
return !1;
|
|
734
737
|
}
|
|
735
|
-
function
|
|
738
|
+
function v(a) {
|
|
736
739
|
for (const i of a)
|
|
737
|
-
|
|
740
|
+
l.get(i.id)?.(), h(i.id);
|
|
738
741
|
}
|
|
739
|
-
async function
|
|
740
|
-
if (
|
|
742
|
+
async function A(a) {
|
|
743
|
+
if (c.value?.name === a.name) return;
|
|
741
744
|
const p = e.getBlade(a.name);
|
|
742
745
|
if (!p)
|
|
743
746
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
@@ -745,32 +748,32 @@ function In(e, o) {
|
|
|
745
748
|
console.warn(`[BladeStack] Access denied to workspace '${a.name}'`);
|
|
746
749
|
return;
|
|
747
750
|
}
|
|
748
|
-
|
|
749
|
-
const _ = Tt(a,
|
|
750
|
-
t.value = [_], a.onOpen && n.set(_.id, a.onOpen), a.onClose &&
|
|
751
|
+
v([...t.value]);
|
|
752
|
+
const _ = Tt(a, f);
|
|
753
|
+
t.value = [_], a.onOpen && n.set(_.id, a.onOpen), a.onClose && l.set(_.id, a.onClose), a.onOpen?.();
|
|
751
754
|
}
|
|
752
|
-
async function
|
|
755
|
+
async function I(a) {
|
|
753
756
|
if (!e.getBlade(a.name))
|
|
754
757
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
755
|
-
const i = a.parentId ?? u.value?.id ??
|
|
758
|
+
const i = a.parentId ?? u.value?.id ?? c.value?.id;
|
|
756
759
|
if (!i)
|
|
757
760
|
throw new Error("[BladeStack] Cannot open blade: no parent blade found");
|
|
758
761
|
const p = t.value.findIndex((m) => m.id === i);
|
|
759
762
|
if (p === -1)
|
|
760
763
|
throw new Error(`[BladeStack] Parent blade '${i}' not found in stack`);
|
|
761
764
|
const _ = t.value.slice(p + 1);
|
|
762
|
-
if (_.length > 0 && await
|
|
765
|
+
if (_.length > 0 && await E(_))
|
|
763
766
|
return;
|
|
764
|
-
|
|
765
|
-
const r = xt(a, i,
|
|
766
|
-
t.value = [...t.value.slice(0, p + 1), r], a.onOpen && n.set(r.id, a.onOpen), a.onClose &&
|
|
767
|
+
v(_);
|
|
768
|
+
const r = xt(a, i, f);
|
|
769
|
+
t.value = [...t.value.slice(0, p + 1), r], a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
|
|
767
770
|
}
|
|
768
|
-
async function
|
|
771
|
+
async function k(a) {
|
|
769
772
|
const i = t.value.findIndex((m) => m.id === a);
|
|
770
773
|
if (i === -1 || i === 0) return !1;
|
|
771
774
|
const p = t.value.slice(i);
|
|
772
|
-
if (await
|
|
773
|
-
|
|
775
|
+
if (await E(p)) return !0;
|
|
776
|
+
v(p), t.value = t.value.slice(0, i);
|
|
774
777
|
const r = t.value.length - 1;
|
|
775
778
|
if (r > 0 && !t.value[r].visible) {
|
|
776
779
|
const m = [...t.value];
|
|
@@ -778,47 +781,47 @@ function In(e, o) {
|
|
|
778
781
|
}
|
|
779
782
|
return !1;
|
|
780
783
|
}
|
|
781
|
-
async function
|
|
784
|
+
async function P(a) {
|
|
782
785
|
const i = u.value;
|
|
783
786
|
if (!i)
|
|
784
787
|
throw new Error("[BladeStack] No active blade to replace");
|
|
785
788
|
if (!e.getBlade(a.name))
|
|
786
789
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
787
|
-
const p = t.value.findIndex((
|
|
790
|
+
const p = t.value.findIndex((D) => D.id === i.id);
|
|
788
791
|
if (p === -1)
|
|
789
792
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
790
793
|
const _ = t.value.slice(p + 1);
|
|
791
794
|
if (_.length > 0) {
|
|
792
|
-
if (await
|
|
793
|
-
|
|
795
|
+
if (await E(_)) return;
|
|
796
|
+
v(_);
|
|
794
797
|
}
|
|
795
|
-
const r = St(a, i.parentId,
|
|
796
|
-
|
|
798
|
+
const r = St(a, i.parentId, f);
|
|
799
|
+
v([i]);
|
|
797
800
|
const m = [...t.value.slice(0, p), r, ...t.value.slice(p + 1)];
|
|
798
|
-
t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose &&
|
|
801
|
+
t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
|
|
799
802
|
}
|
|
800
|
-
async function
|
|
803
|
+
async function T(a) {
|
|
801
804
|
const i = u.value;
|
|
802
805
|
if (!i)
|
|
803
806
|
throw new Error("[BladeStack] No active blade to cover");
|
|
804
807
|
if (!e.getBlade(a.name))
|
|
805
808
|
throw new Error(`[BladeStack] Blade '${a.name}' not found in registry`);
|
|
806
|
-
const p = t.value.findIndex((
|
|
809
|
+
const p = t.value.findIndex((D) => D.id === i.id);
|
|
807
810
|
if (p === -1)
|
|
808
811
|
throw new Error(`[BladeStack] Active blade '${i.id}' not found in stack`);
|
|
809
812
|
const _ = t.value.slice(p + 1);
|
|
810
813
|
if (_.length > 0) {
|
|
811
|
-
if (await
|
|
812
|
-
|
|
814
|
+
if (await E(_)) return;
|
|
815
|
+
v(_);
|
|
813
816
|
}
|
|
814
|
-
const r = Ot(a, i.id,
|
|
815
|
-
m.push({ ...i, visible: !1 }), m.push(r), t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose &&
|
|
817
|
+
const r = Ot(a, i.id, f), m = t.value.slice(0, p);
|
|
818
|
+
m.push({ ...i, visible: !1 }), m.push(r), t.value = m, a.onOpen && n.set(r.id, a.onOpen), a.onClose && l.set(r.id, a.onClose), a.onOpen?.();
|
|
816
819
|
}
|
|
817
820
|
async function R(a) {
|
|
818
821
|
const i = t.value.findIndex((r) => r.id === a);
|
|
819
822
|
if (i === -1) return;
|
|
820
823
|
const p = t.value.slice(i + 1);
|
|
821
|
-
p.length === 0 || await
|
|
824
|
+
p.length === 0 || await E(p) || (v(p), t.value = t.value.slice(0, i + 1));
|
|
822
825
|
}
|
|
823
826
|
function Z(a, i) {
|
|
824
827
|
s.set(a, i);
|
|
@@ -845,23 +848,23 @@ function In(e, o) {
|
|
|
845
848
|
_[p] = { ..._[p], title: i }, t.value = _;
|
|
846
849
|
}
|
|
847
850
|
function de(a, i) {
|
|
848
|
-
const p = t.value.findIndex((
|
|
851
|
+
const p = t.value.findIndex((N) => N.id === a);
|
|
849
852
|
if (p === -1) return;
|
|
850
853
|
const _ = t.value[p].query ?? {}, r = { ..._ };
|
|
851
|
-
for (const [
|
|
852
|
-
ve === "" || ve == null ? delete r[
|
|
853
|
-
const m = Object.keys(_),
|
|
854
|
-
if (m.length ===
|
|
854
|
+
for (const [N, ve] of Object.entries(i))
|
|
855
|
+
ve === "" || ve == null ? delete r[N] : r[N] = ve;
|
|
856
|
+
const m = Object.keys(_), D = Object.keys(r);
|
|
857
|
+
if (m.length === D.length && D.every((N) => _[N] === r[N]))
|
|
855
858
|
return;
|
|
856
859
|
const J = [...t.value];
|
|
857
860
|
J[p] = { ...J[p], query: r }, t.value = J;
|
|
858
861
|
}
|
|
859
862
|
function j(a) {
|
|
860
|
-
let i =
|
|
861
|
-
return i || (i =
|
|
863
|
+
let i = g.get(a);
|
|
864
|
+
return i || (i = L(!1), g.set(a, i)), i;
|
|
862
865
|
}
|
|
863
866
|
function ue(a) {
|
|
864
|
-
return
|
|
867
|
+
return g.get(a)?.value ?? !1;
|
|
865
868
|
}
|
|
866
869
|
function pe(a, i) {
|
|
867
870
|
j(a).value = i;
|
|
@@ -876,15 +879,15 @@ function In(e, o) {
|
|
|
876
879
|
t.value = a;
|
|
877
880
|
}
|
|
878
881
|
return {
|
|
879
|
-
workspace:
|
|
882
|
+
workspace: c,
|
|
880
883
|
blades: d,
|
|
881
884
|
activeBlade: u,
|
|
882
|
-
openWorkspace:
|
|
883
|
-
openBlade:
|
|
884
|
-
closeBlade:
|
|
885
|
+
openWorkspace: A,
|
|
886
|
+
openBlade: I,
|
|
887
|
+
closeBlade: k,
|
|
885
888
|
closeChildren: R,
|
|
886
|
-
replaceCurrentBlade:
|
|
887
|
-
coverCurrentBlade:
|
|
889
|
+
replaceCurrentBlade: P,
|
|
890
|
+
coverCurrentBlade: T,
|
|
888
891
|
registerBeforeClose: Z,
|
|
889
892
|
unregisterBeforeClose: X,
|
|
890
893
|
setBladeError: Y,
|
|
@@ -899,14 +902,14 @@ function In(e, o) {
|
|
|
899
902
|
};
|
|
900
903
|
}
|
|
901
904
|
function Mt() {
|
|
902
|
-
const e =
|
|
905
|
+
const e = $(De);
|
|
903
906
|
if (!e)
|
|
904
907
|
throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
|
|
905
908
|
return e;
|
|
906
909
|
}
|
|
907
910
|
const V = W("use-ai-agent");
|
|
908
|
-
function
|
|
909
|
-
const o =
|
|
911
|
+
function xn(e) {
|
|
912
|
+
const o = $(je), { user: t, getAccessToken: s } = Qe(), { openBlade: n } = It(), { blades: l, activeBlade: g } = Mt(), c = e?.isEmbedded, d = dt({
|
|
910
913
|
userGetter: () => {
|
|
911
914
|
if (t.value)
|
|
912
915
|
return {
|
|
@@ -917,7 +920,7 @@ function Tn(e) {
|
|
|
917
920
|
};
|
|
918
921
|
},
|
|
919
922
|
bladeGetter: () => {
|
|
920
|
-
const h =
|
|
923
|
+
const h = g.value ?? l.value[l.value.length - 1];
|
|
921
924
|
return h ? {
|
|
922
925
|
id: h.id,
|
|
923
926
|
name: h.name,
|
|
@@ -928,18 +931,18 @@ function Tn(e) {
|
|
|
928
931
|
},
|
|
929
932
|
localeGetter: () => o?.currentLocale.value ?? "en",
|
|
930
933
|
tokenGetter: s,
|
|
931
|
-
navigateToBlade: (h,
|
|
932
|
-
n({ name: h, param:
|
|
934
|
+
navigateToBlade: (h, C, f) => {
|
|
935
|
+
n({ name: h, param: C, options: f }).then(() => {
|
|
933
936
|
V.debug(`Navigated to blade: ${h}`);
|
|
934
|
-
}).catch((
|
|
935
|
-
V.warn(`Blade not found or cannot be opened: ${h}`,
|
|
937
|
+
}).catch((E) => {
|
|
938
|
+
V.warn(`Blade not found or cannot be opened: ${h}`, E);
|
|
936
939
|
});
|
|
937
940
|
},
|
|
938
941
|
initialConfig: e?.config,
|
|
939
|
-
isEmbedded:
|
|
942
|
+
isEmbedded: c
|
|
940
943
|
});
|
|
941
|
-
if (
|
|
942
|
-
const h =
|
|
944
|
+
if (ke(be, d), V.debug("AiAgentService provided"), e?.addGlobalToolbarButton ?? !0) {
|
|
945
|
+
const h = $(Je, null);
|
|
943
946
|
h ? (h.registerToolbarItem(
|
|
944
947
|
{
|
|
945
948
|
id: ot,
|
|
@@ -956,8 +959,8 @@ function Tn(e) {
|
|
|
956
959
|
}
|
|
957
960
|
return d;
|
|
958
961
|
}
|
|
959
|
-
function
|
|
960
|
-
const e =
|
|
962
|
+
function Sn() {
|
|
963
|
+
const e = $(be);
|
|
961
964
|
if (!e) {
|
|
962
965
|
V.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
|
|
963
966
|
return;
|
|
@@ -983,7 +986,7 @@ function xn() {
|
|
|
983
986
|
onMessage: e.onMessage
|
|
984
987
|
};
|
|
985
988
|
}
|
|
986
|
-
function
|
|
989
|
+
function On(e) {
|
|
987
990
|
return {
|
|
988
991
|
id: "ai-agent-toggle",
|
|
989
992
|
icon: e?.icon ?? "lucide-sparkles",
|
|
@@ -997,7 +1000,7 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
997
1000
|
key: 1,
|
|
998
1001
|
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",
|
|
999
1002
|
fill: "url(#virto-oz-gradient-animated)"
|
|
1000
|
-
},
|
|
1003
|
+
}, $t = ["id"], Ft = {
|
|
1001
1004
|
key: 1,
|
|
1002
1005
|
id: "virto-oz-gradient-animated",
|
|
1003
1006
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -1022,7 +1025,7 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1022
1025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1023
1026
|
class: "vc-virto-oz-logo"
|
|
1024
1027
|
}, [
|
|
1025
|
-
s[3] || (s[3] =
|
|
1028
|
+
s[3] || (s[3] = w("path", {
|
|
1026
1029
|
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",
|
|
1027
1030
|
fill: "white"
|
|
1028
1031
|
}, null, -1)),
|
|
@@ -1030,14 +1033,14 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1030
1033
|
key: 0,
|
|
1031
1034
|
"clip-path": `url(#${o.value})`
|
|
1032
1035
|
}, [...s[0] || (s[0] = [
|
|
1033
|
-
|
|
1034
|
-
|
|
1036
|
+
w("g", { transform: "matrix(0 -0.161514 0.160417 0 49.1357 53.9479)" }, [
|
|
1037
|
+
w("foreignObject", {
|
|
1035
1038
|
x: "-334.01",
|
|
1036
1039
|
y: "-334.01",
|
|
1037
1040
|
width: "668.02",
|
|
1038
1041
|
height: "668.02"
|
|
1039
1042
|
}, [
|
|
1040
|
-
|
|
1043
|
+
w("div", {
|
|
1041
1044
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
1042
1045
|
style: { background: `conic-gradient(
|
|
1043
1046
|
from 90deg,
|
|
@@ -1052,39 +1055,39 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1052
1055
|
])
|
|
1053
1056
|
], -1)
|
|
1054
1057
|
])], 8, Lt)),
|
|
1055
|
-
s[4] || (s[4] =
|
|
1058
|
+
s[4] || (s[4] = w("path", {
|
|
1056
1059
|
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",
|
|
1057
1060
|
fill: "white"
|
|
1058
1061
|
}, null, -1)),
|
|
1059
|
-
s[5] || (s[5] =
|
|
1062
|
+
s[5] || (s[5] = w("ellipse", {
|
|
1060
1063
|
cx: "49.12",
|
|
1061
1064
|
cy: "54.09",
|
|
1062
1065
|
rx: "4.05",
|
|
1063
1066
|
ry: "4.05",
|
|
1064
1067
|
fill: "#6C6C6C"
|
|
1065
1068
|
}, null, -1)),
|
|
1066
|
-
s[6] || (s[6] =
|
|
1069
|
+
s[6] || (s[6] = w("ellipse", {
|
|
1067
1070
|
cx: "60.62",
|
|
1068
1071
|
cy: "54.09",
|
|
1069
1072
|
rx: "4.05",
|
|
1070
1073
|
ry: "4.05",
|
|
1071
1074
|
fill: "#6C6C6C"
|
|
1072
1075
|
}, null, -1)),
|
|
1073
|
-
s[7] || (s[7] =
|
|
1076
|
+
s[7] || (s[7] = w("ellipse", {
|
|
1074
1077
|
cx: "37.62",
|
|
1075
1078
|
cy: "54.09",
|
|
1076
1079
|
rx: "4.05",
|
|
1077
1080
|
ry: "4.05",
|
|
1078
1081
|
fill: "#6C6C6C"
|
|
1079
1082
|
}, null, -1)),
|
|
1080
|
-
|
|
1083
|
+
w("defs", null, [
|
|
1081
1084
|
e.animated ? z("", !0) : (B(), S("clipPath", {
|
|
1082
1085
|
key: 0,
|
|
1083
1086
|
id: o.value
|
|
1084
1087
|
}, [...s[1] || (s[1] = [
|
|
1085
|
-
|
|
1086
|
-
])], 8,
|
|
1087
|
-
e.animated ? (B(), S("linearGradient",
|
|
1088
|
+
w("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)
|
|
1089
|
+
])], 8, $t)),
|
|
1090
|
+
e.animated ? (B(), S("linearGradient", Ft, [...s[2] || (s[2] = [
|
|
1088
1091
|
Ke('<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)
|
|
1089
1092
|
])])) : z("", !0)
|
|
1090
1093
|
])
|
|
@@ -1101,9 +1104,9 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1101
1104
|
},
|
|
1102
1105
|
setup(e) {
|
|
1103
1106
|
return (o, t) => (B(), S("span", Rt, [
|
|
1104
|
-
(B(!0), S(
|
|
1107
|
+
(B(!0), S(we, null, qe(e.parts, (s, n) => (B(), S(we, { key: n }, [
|
|
1105
1108
|
e.separated && n > 0 ? (B(), S("span", Ut, "+")) : z("", !0),
|
|
1106
|
-
|
|
1109
|
+
w("kbd", Gt, K(s), 1)
|
|
1107
1110
|
], 64))), 128))
|
|
1108
1111
|
]));
|
|
1109
1112
|
}
|
|
@@ -1116,48 +1119,48 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1116
1119
|
},
|
|
1117
1120
|
emits: ["close", "expand", "collapse"],
|
|
1118
1121
|
setup(e) {
|
|
1119
|
-
const { t: o } = nt(), { isMac: t } = Ne(), s = b(() => Ee(Q.escape, t)), n = b(() => Ee(Q.mod.backslash, t)),
|
|
1120
|
-
return (
|
|
1121
|
-
|
|
1122
|
-
|
|
1122
|
+
const { t: o } = nt(), { isMac: t } = Ne(), s = b(() => Ee(Q.escape, t)), n = b(() => Ee(Q.mod.backslash, t)), l = b(() => s.value.aria), g = b(() => n.value.aria);
|
|
1123
|
+
return (c, d) => (B(), S("div", Vt, [
|
|
1124
|
+
w("div", Kt, [
|
|
1125
|
+
M(Ue, {
|
|
1123
1126
|
width: 22,
|
|
1124
1127
|
height: 24,
|
|
1125
1128
|
"show-dots": ""
|
|
1126
1129
|
})
|
|
1127
1130
|
]),
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
+
w("div", qt, [
|
|
1132
|
+
w("div", zt, [
|
|
1133
|
+
w("div", Ht, K(e.title), 1)
|
|
1131
1134
|
])
|
|
1132
1135
|
]),
|
|
1133
|
-
|
|
1136
|
+
w("div", Wt, [
|
|
1134
1137
|
e.isExpanded ? (B(), se(x(me), {
|
|
1135
1138
|
key: 0,
|
|
1136
1139
|
placement: "bottom"
|
|
1137
1140
|
}, {
|
|
1138
|
-
tooltip:
|
|
1139
|
-
|
|
1141
|
+
tooltip: F(() => [
|
|
1142
|
+
w("span", Xt, [
|
|
1140
1143
|
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE")) + " ", 1),
|
|
1141
|
-
|
|
1144
|
+
M(_e, {
|
|
1142
1145
|
parts: n.value.parts,
|
|
1143
1146
|
separated: !x(t)
|
|
1144
1147
|
}, null, 8, ["parts", "separated"])
|
|
1145
1148
|
])
|
|
1146
1149
|
]),
|
|
1147
|
-
default:
|
|
1148
|
-
|
|
1150
|
+
default: F(() => [
|
|
1151
|
+
w("div", {
|
|
1149
1152
|
class: "vc-ai-agent-header__button",
|
|
1150
1153
|
role: "button",
|
|
1151
1154
|
tabindex: "0",
|
|
1152
1155
|
"aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.RESTORE"),
|
|
1153
|
-
"aria-keyshortcuts":
|
|
1154
|
-
onClick: d[0] || (d[0] = (u) =>
|
|
1156
|
+
"aria-keyshortcuts": g.value,
|
|
1157
|
+
onClick: d[0] || (d[0] = (u) => c.$emit("collapse")),
|
|
1155
1158
|
onKeydown: [
|
|
1156
|
-
d[1] || (d[1] = U(G((u) =>
|
|
1157
|
-
d[2] || (d[2] = U(G((u) =>
|
|
1159
|
+
d[1] || (d[1] = U(G((u) => c.$emit("collapse"), ["prevent"]), ["enter"])),
|
|
1160
|
+
d[2] || (d[2] = U(G((u) => c.$emit("collapse"), ["prevent"]), ["space"]))
|
|
1158
1161
|
]
|
|
1159
1162
|
}, [
|
|
1160
|
-
|
|
1163
|
+
M(x(ie), { icon: "lucide-minus" })
|
|
1161
1164
|
], 40, Zt)
|
|
1162
1165
|
]),
|
|
1163
1166
|
_: 1
|
|
@@ -1165,57 +1168,57 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1165
1168
|
key: 1,
|
|
1166
1169
|
placement: "bottom"
|
|
1167
1170
|
}, {
|
|
1168
|
-
tooltip:
|
|
1169
|
-
|
|
1171
|
+
tooltip: F(() => [
|
|
1172
|
+
w("span", jt, [
|
|
1170
1173
|
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE")) + " ", 1),
|
|
1171
|
-
|
|
1174
|
+
M(_e, {
|
|
1172
1175
|
parts: n.value.parts,
|
|
1173
1176
|
separated: !x(t)
|
|
1174
1177
|
}, null, 8, ["parts", "separated"])
|
|
1175
1178
|
])
|
|
1176
1179
|
]),
|
|
1177
|
-
default:
|
|
1178
|
-
|
|
1180
|
+
default: F(() => [
|
|
1181
|
+
w("div", {
|
|
1179
1182
|
class: "vc-ai-agent-header__button",
|
|
1180
1183
|
role: "button",
|
|
1181
1184
|
tabindex: "0",
|
|
1182
1185
|
"aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.MAXIMIZE"),
|
|
1183
|
-
"aria-keyshortcuts":
|
|
1184
|
-
onClick: d[3] || (d[3] = (u) =>
|
|
1186
|
+
"aria-keyshortcuts": g.value,
|
|
1187
|
+
onClick: d[3] || (d[3] = (u) => c.$emit("expand")),
|
|
1185
1188
|
onKeydown: [
|
|
1186
|
-
d[4] || (d[4] = U(G((u) =>
|
|
1187
|
-
d[5] || (d[5] = U(G((u) =>
|
|
1189
|
+
d[4] || (d[4] = U(G((u) => c.$emit("expand"), ["prevent"]), ["enter"])),
|
|
1190
|
+
d[5] || (d[5] = U(G((u) => c.$emit("expand"), ["prevent"]), ["space"]))
|
|
1188
1191
|
]
|
|
1189
1192
|
}, [
|
|
1190
|
-
|
|
1193
|
+
M(x(ie), { icon: "lucide-panel-top" })
|
|
1191
1194
|
], 40, Yt)
|
|
1192
1195
|
]),
|
|
1193
1196
|
_: 1
|
|
1194
1197
|
})),
|
|
1195
|
-
|
|
1196
|
-
tooltip:
|
|
1197
|
-
|
|
1198
|
+
M(x(me), { placement: "bottom" }, {
|
|
1199
|
+
tooltip: F(() => [
|
|
1200
|
+
w("span", Jt, [
|
|
1198
1201
|
Ce(K(x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE")) + " ", 1),
|
|
1199
|
-
|
|
1202
|
+
M(_e, {
|
|
1200
1203
|
parts: s.value.parts,
|
|
1201
1204
|
separated: !x(t)
|
|
1202
1205
|
}, null, 8, ["parts", "separated"])
|
|
1203
1206
|
])
|
|
1204
1207
|
]),
|
|
1205
|
-
default:
|
|
1206
|
-
|
|
1208
|
+
default: F(() => [
|
|
1209
|
+
w("div", {
|
|
1207
1210
|
class: "vc-ai-agent-header__button",
|
|
1208
1211
|
role: "button",
|
|
1209
1212
|
tabindex: "0",
|
|
1210
1213
|
"aria-label": x(o)("COMPONENTS.ORGANISMS.VC_BLADE_HEADER.CLOSE"),
|
|
1211
|
-
"aria-keyshortcuts":
|
|
1212
|
-
onClick: d[6] || (d[6] = (u) =>
|
|
1214
|
+
"aria-keyshortcuts": l.value,
|
|
1215
|
+
onClick: d[6] || (d[6] = (u) => c.$emit("close")),
|
|
1213
1216
|
onKeydown: [
|
|
1214
|
-
d[7] || (d[7] = U(G((u) =>
|
|
1215
|
-
d[8] || (d[8] = U(G((u) =>
|
|
1217
|
+
d[7] || (d[7] = U(G((u) => c.$emit("close"), ["prevent"]), ["enter"])),
|
|
1218
|
+
d[8] || (d[8] = U(G((u) => c.$emit("close"), ["prevent"]), ["space"]))
|
|
1216
1219
|
]
|
|
1217
1220
|
}, [
|
|
1218
|
-
|
|
1221
|
+
M(x(ie), { icon: "lucide-x" })
|
|
1219
1222
|
], 40, Qt)
|
|
1220
1223
|
]),
|
|
1221
1224
|
_: 1
|
|
@@ -1233,9 +1236,9 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1233
1236
|
},
|
|
1234
1237
|
setup(e) {
|
|
1235
1238
|
return (o, t) => (B(), S("div", tn, [
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
+
w("div", nn, [
|
|
1240
|
+
w("div", an, [
|
|
1241
|
+
M(Ue, {
|
|
1239
1242
|
width: 80,
|
|
1240
1243
|
height: 87,
|
|
1241
1244
|
animated: ""
|
|
@@ -1255,26 +1258,26 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1255
1258
|
},
|
|
1256
1259
|
emits: ["iframe-ready"],
|
|
1257
1260
|
setup(e, { emit: o }) {
|
|
1258
|
-
const t = W("ai-agent-iframe"), s = e, n = o,
|
|
1261
|
+
const t = W("ai-agent-iframe"), s = e, n = o, l = L(null), g = L(!0);
|
|
1259
1262
|
q(
|
|
1260
|
-
|
|
1263
|
+
l,
|
|
1261
1264
|
(d) => {
|
|
1262
1265
|
d && n("iframe-ready", d);
|
|
1263
1266
|
},
|
|
1264
1267
|
{ immediate: !0 }
|
|
1265
1268
|
);
|
|
1266
|
-
const
|
|
1267
|
-
|
|
1269
|
+
const c = () => {
|
|
1270
|
+
g.value = !1, t.debug("Iframe loaded");
|
|
1268
1271
|
};
|
|
1269
1272
|
return q(
|
|
1270
1273
|
() => s.url,
|
|
1271
1274
|
() => {
|
|
1272
|
-
|
|
1275
|
+
g.value = !0;
|
|
1273
1276
|
}
|
|
1274
1277
|
), (d, u) => (B(), S("div", sn, [
|
|
1275
|
-
|
|
1276
|
-
default:
|
|
1277
|
-
|
|
1278
|
+
M(Pe, { name: "fade" }, {
|
|
1279
|
+
default: F(() => [
|
|
1280
|
+
g.value && e.url ? (B(), se(rn, {
|
|
1278
1281
|
key: 0,
|
|
1279
1282
|
text: d.$t("AI_AGENT.LOADING")
|
|
1280
1283
|
}, null, 8, ["text"])) : z("", !0)
|
|
@@ -1284,106 +1287,116 @@ const Dt = ["width", "height"], Lt = ["clip-path"], Nt = {
|
|
|
1284
1287
|
e.url ? (B(), S("iframe", {
|
|
1285
1288
|
key: 0,
|
|
1286
1289
|
ref_key: "iframeRef",
|
|
1287
|
-
ref:
|
|
1290
|
+
ref: l,
|
|
1288
1291
|
src: e.url,
|
|
1289
|
-
class: Me(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading":
|
|
1292
|
+
class: Me(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": g.value }]),
|
|
1290
1293
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
1291
1294
|
allow: "clipboard-read; clipboard-write",
|
|
1292
|
-
onLoad:
|
|
1295
|
+
onLoad: c
|
|
1293
1296
|
}, null, 42, ln)) : (B(), S("div", cn, [
|
|
1294
|
-
|
|
1297
|
+
M(x(ie), {
|
|
1295
1298
|
icon: "lucide-sparkles",
|
|
1296
1299
|
size: "xl",
|
|
1297
1300
|
class: "vc-ai-agent-iframe__placeholder-icon"
|
|
1298
1301
|
}),
|
|
1299
|
-
u[0] || (u[0] =
|
|
1302
|
+
u[0] || (u[0] = w("p", { class: "vc-ai-agent-iframe__placeholder-text" }, "AI Agent URL not configured", -1))
|
|
1300
1303
|
]))
|
|
1301
1304
|
]));
|
|
1302
1305
|
}
|
|
1303
|
-
}), un = { class: "vc-ai-agent-panel__content" },
|
|
1306
|
+
}), un = ["inert"], pn = { class: "vc-ai-agent-panel__content" }, kn = /* @__PURE__ */ H({
|
|
1304
1307
|
__name: "VcAiAgentPanel",
|
|
1308
|
+
props: {
|
|
1309
|
+
inert: { type: Boolean }
|
|
1310
|
+
},
|
|
1305
1311
|
setup(e) {
|
|
1306
|
-
const { isMac: o } = Ne(), t =
|
|
1312
|
+
const { isMac: o } = Ne(), t = $(be), s = $(et, !1);
|
|
1307
1313
|
t || console.error("[VcAiAgentPanel] AiAgentService not provided");
|
|
1308
1314
|
const n = b(
|
|
1309
1315
|
() => t?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
|
|
1310
|
-
),
|
|
1311
|
-
width:
|
|
1312
|
-
})), u = () => t?.closePanel(), h = () => t?.expandPanel(),
|
|
1313
|
-
tt(document, "keydown", (
|
|
1314
|
-
if (
|
|
1315
|
-
if (
|
|
1316
|
-
|
|
1316
|
+
), l = b(() => !s && (t?.isOpen.value ?? !1)), g = b(() => t?.isExpanded.value ?? !1), c = b(() => t?.totalItemsCount.value ?? 0), d = b(() => ({
|
|
1317
|
+
width: g.value ? `${n.value.expandedWidth ?? 500}px` : `${n.value.width ?? 362}px`
|
|
1318
|
+
})), u = () => t?.closePanel(), h = () => t?.expandPanel(), C = () => t?.collapsePanel(), f = L(null);
|
|
1319
|
+
tt(document, "keydown", (v) => {
|
|
1320
|
+
if (l.value && !v.isComposing && !v.defaultPrevented) {
|
|
1321
|
+
if (v.key === "Escape") {
|
|
1322
|
+
v.preventDefault(), u();
|
|
1317
1323
|
return;
|
|
1318
1324
|
}
|
|
1319
|
-
Et(Q.mod.backslash,
|
|
1325
|
+
if (Et(Q.mod.backslash, v, o)) {
|
|
1326
|
+
const A = document.activeElement;
|
|
1327
|
+
if (!A || !f.value?.contains(A)) return;
|
|
1328
|
+
v.preventDefault(), g.value ? C() : h();
|
|
1329
|
+
}
|
|
1320
1330
|
}
|
|
1321
1331
|
});
|
|
1322
|
-
const
|
|
1323
|
-
t?._setIframeRef(
|
|
1332
|
+
const E = (v) => {
|
|
1333
|
+
t?._setIframeRef(v);
|
|
1324
1334
|
};
|
|
1325
1335
|
return ze(() => {
|
|
1326
1336
|
t?._setIframeRef(null);
|
|
1327
|
-
}), (
|
|
1328
|
-
default:
|
|
1329
|
-
|
|
1337
|
+
}), (v, A) => (B(), se(Pe, { name: "ai-panel-slide" }, {
|
|
1338
|
+
default: F(() => [
|
|
1339
|
+
l.value ? (B(), S("div", {
|
|
1330
1340
|
key: 0,
|
|
1341
|
+
ref_key: "panelRef",
|
|
1342
|
+
ref: f,
|
|
1331
1343
|
class: Me(["vc-ai-agent-panel", {
|
|
1332
|
-
"vc-ai-agent-panel--expanded":
|
|
1344
|
+
"vc-ai-agent-panel--expanded": g.value
|
|
1333
1345
|
}]),
|
|
1334
|
-
style: He(d.value)
|
|
1346
|
+
style: He(d.value),
|
|
1347
|
+
inert: e.inert || void 0
|
|
1335
1348
|
}, [
|
|
1336
|
-
|
|
1349
|
+
M(en, {
|
|
1337
1350
|
title: n.value.title,
|
|
1338
|
-
"is-expanded":
|
|
1339
|
-
"items-count":
|
|
1351
|
+
"is-expanded": g.value,
|
|
1352
|
+
"items-count": c.value,
|
|
1340
1353
|
onClose: u,
|
|
1341
1354
|
onExpand: h,
|
|
1342
|
-
onCollapse:
|
|
1355
|
+
onCollapse: C
|
|
1343
1356
|
}, null, 8, ["title", "is-expanded", "items-count"]),
|
|
1344
|
-
|
|
1345
|
-
|
|
1357
|
+
w("div", pn, [
|
|
1358
|
+
M(dn, {
|
|
1346
1359
|
url: n.value.url,
|
|
1347
|
-
onIframeReady:
|
|
1360
|
+
onIframeReady: E
|
|
1348
1361
|
}, null, 8, ["url"])
|
|
1349
1362
|
])
|
|
1350
|
-
],
|
|
1363
|
+
], 14, un)) : z("", !0)
|
|
1351
1364
|
]),
|
|
1352
1365
|
_: 1
|
|
1353
1366
|
}));
|
|
1354
1367
|
}
|
|
1355
1368
|
});
|
|
1356
1369
|
export {
|
|
1357
|
-
|
|
1358
|
-
|
|
1370
|
+
hn as A,
|
|
1371
|
+
xn as B,
|
|
1359
1372
|
at as D,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1373
|
+
_n as E,
|
|
1374
|
+
En as H,
|
|
1375
|
+
kn as _,
|
|
1376
|
+
Tn as a,
|
|
1364
1377
|
xe as b,
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1378
|
+
On as c,
|
|
1379
|
+
yn as d,
|
|
1380
|
+
wn as e,
|
|
1381
|
+
Bn as f,
|
|
1369
1382
|
It as g,
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1383
|
+
$e as h,
|
|
1384
|
+
Fe as i,
|
|
1385
|
+
At as j,
|
|
1373
1386
|
Re as k,
|
|
1374
1387
|
Oe as l,
|
|
1375
1388
|
yt as m,
|
|
1376
1389
|
mt as n,
|
|
1377
1390
|
ht as o,
|
|
1378
|
-
|
|
1391
|
+
In as p,
|
|
1379
1392
|
Ee as q,
|
|
1380
1393
|
Q as r,
|
|
1381
1394
|
An as s,
|
|
1382
|
-
|
|
1383
|
-
|
|
1395
|
+
bn as t,
|
|
1396
|
+
Sn as u,
|
|
1384
1397
|
Et as v,
|
|
1385
1398
|
Mt as w,
|
|
1386
|
-
|
|
1399
|
+
wt as x,
|
|
1387
1400
|
Ne as y,
|
|
1388
1401
|
_e as z
|
|
1389
1402
|
};
|