@fses/workbench-app 0.2.13 → 0.2.14

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.
Files changed (26) hide show
  1. package/WORKBENCH-CLOSURE.json +12 -12
  2. package/dist/{Workspace-Zcro-FS-.js → Workspace-BJlQDkH9.js} +1057 -1056
  3. package/dist/canvas/api/index.js +1 -1
  4. package/dist/{canvasFacade-B0oy__da.js → canvasFacade-B2EHgdqA.js} +1 -1
  5. package/dist/{cardFactory-CoDF-zsR.js → cardFactory-BK3CA-Gn.js} +240 -189
  6. package/dist/config/workbenchAppConfig.d.ts +5 -0
  7. package/dist/extensions/index.js +1 -1
  8. package/dist/fses-workbench-app.js +16 -16
  9. package/dist/{index-BPItQZvf.js → index-CBS49_nQ.js} +256 -281
  10. package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +14 -3
  11. package/dist/internal/personal-workbench/lib/echartsTemplateAssets.d.ts +25 -0
  12. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationReturnItemUpsert.d.ts +1 -0
  13. package/dist/runtime/index.js +1 -1
  14. package/dist/style.css +1 -1
  15. package/dist/{useWorkbenchRuntime-DxtdDpY1.js → useWorkbenchRuntime-DLf_FgC7.js} +6256 -6187
  16. package/dist/version.d.ts +1 -1
  17. package/dist/{workbenchCustomComponentRegistry-6GHzavdM.js → workbenchCustomComponentRegistry-Bt94Lgko.js} +1 -1
  18. package/node_modules/@fses/ai-chat/dist/components/FsesAiChat.vue.d.ts +2 -0
  19. package/node_modules/@fses/ai-chat/dist/composables/useSystemEChartsIcon.d.ts +19 -2
  20. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +4816 -4789
  21. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +16 -16
  22. package/node_modules/@fses/ai-chat/dist/plugin.d.ts +7 -2
  23. package/node_modules/@fses/ai-chat/dist/style.css +1 -1
  24. package/node_modules/@fses/ai-chat/package.json +5 -5
  25. package/node_modules/@fses/workbench-card/package.json +1 -1
  26. package/package.json +3 -3
@@ -1,7 +1,27 @@
1
1
  import "@fses/workbench-card";
2
- import { resolveCardRegistryEntry as E, compositeCardPatternById as j } from "@fses/workbench-card/registry";
2
+ import { resolveCardRegistryEntry as X, compositeCardPatternById as J } from "@fses/workbench-card/registry";
3
3
  import "@fses/workbench-card/renderers";
4
- const Y = {
4
+ let I = {}, E = {}, N = {};
5
+ function Q(e) {
6
+ I = e;
7
+ }
8
+ function Je(e, a, t) {
9
+ E = e, N = a, Q(t);
10
+ }
11
+ function Qe() {
12
+ return E;
13
+ }
14
+ function Z() {
15
+ return N;
16
+ }
17
+ function Ze() {
18
+ return I;
19
+ }
20
+ function ea() {
21
+ var e;
22
+ return (e = I.fde) == null ? void 0 : e.generatedTemplateShell;
23
+ }
24
+ const ee = {
5
25
  "card.metric.numeric": { previewKind: "metricNumeric", layoutHint: "metric", sampleTone: "info", sampleTitle: "核心数值" },
6
26
  "card.metric.combo": { previewKind: "metricCombo", layoutHint: "metric", sampleTone: "info", sampleTitle: "组合指标" },
7
27
  "card.metric.comparison": { previewKind: "metricComparison", layoutHint: "metric", sampleTone: "success", sampleTitle: "指标对比" },
@@ -86,8 +106,8 @@ const Y = {
86
106
  "card.entity.assetDetail": { previewKind: "entityAsset", layoutHint: "profile", sampleTone: "info", sampleTitle: "资产详情" },
87
107
  "card.entity.ticketDetail": { previewKind: "entityTicket", layoutHint: "workflow", sampleTone: "danger", sampleTitle: "工单详情" }
88
108
  };
89
- function U(e) {
90
- const a = Y[e.capabilityId];
109
+ function ae(e) {
110
+ const a = ee[e.capabilityId];
91
111
  if (a) return { capabilityId: e.capabilityId, explicit: !0, ...a };
92
112
  const t = e.dataShape === "metricSummary" ? "metric" : e.dataShape === "rows" ? "table" : e.dataShape === "networkGraph" ? "network" : e.dataShape === "customCanvas" ? "customCanvas" : e.dataShape === "embeddedFrame" ? "embed" : "metric";
93
113
  return {
@@ -99,42 +119,42 @@ function U(e) {
99
119
  explicit: !1
100
120
  };
101
121
  }
102
- const d = 100, g = 5, R = {
122
+ const d = 100, g = 5, x = {
103
123
  small: { w: 33.333, h: 20 },
104
124
  medium: { w: 33.333, h: 34 },
105
125
  componentTall: { w: 33.333, h: 42 },
106
126
  large: { w: 100, h: 32 },
107
127
  screen: { w: 100, h: 50 }
108
- }, V = {
128
+ }, te = {
109
129
  small: 3,
110
130
  medium: 3,
111
131
  componentTall: 3,
112
132
  large: 1,
113
133
  screen: 1
114
- }, X = 0.75;
134
+ }, ie = 0.75;
115
135
  function h(e, a) {
116
136
  const t = Number(e);
117
137
  return Number.isFinite(t) ? t : a;
118
138
  }
119
- function Ne(e) {
139
+ function aa(e) {
120
140
  return Math.max(1, e) / d;
121
141
  }
122
- function We(e, a) {
142
+ function ta(e, a) {
123
143
  return e * a;
124
144
  }
125
- function Oe(e, a) {
145
+ function ia(e, a) {
126
146
  return e / Math.max(1e-4, a);
127
147
  }
128
- function Ge(e, a = g) {
148
+ function ra(e, a = g) {
129
149
  return Math.round(e / a) * a;
130
150
  }
131
151
  function o(e) {
132
152
  return Math.round(e * 1e3) / 1e3;
133
153
  }
134
- function _(e = "small") {
135
- return { ...R[e] };
154
+ function W(e = "small") {
155
+ return { ...x[e] };
136
156
  }
137
- function K(e) {
157
+ function C(e) {
138
158
  const a = Math.min(d, Math.max(g, o(h(e.w, 30)))), t = Math.max(g, o(h(e.h, 20))), i = Math.min(d - a, Math.max(0, o(h(e.x, 0)))), r = Math.max(0, o(h(e.y, 0)));
139
159
  return { x: i, y: r, w: a, h: t };
140
160
  }
@@ -142,76 +162,76 @@ function y(e) {
142
162
  const a = Math.min(d, Math.max(g, o(h(e.w, 30)))), t = Math.max(g, o(h(e.h, 20))), i = Math.min(d - a, Math.max(0, o(h(e.x, 0)))), r = Math.max(0, o(h(e.y, 0)));
143
163
  return { x: i, y: r, w: a, h: t };
144
164
  }
145
- function Q(e, a) {
165
+ function re(e, a) {
146
166
  return !(e.x + e.w <= a.x || a.x + a.w <= e.x || e.y + e.h <= a.y || a.y + a.h <= e.y);
147
167
  }
148
- function C(e, a) {
149
- return e.x >= 0 && e.y >= 0 && e.x + e.w <= d && a.every((t) => !Q(e, t));
168
+ function K(e, a) {
169
+ return e.x >= 0 && e.y >= 0 && e.x + e.w <= d && a.every((t) => !re(e, t));
150
170
  }
151
- function J(e, a) {
171
+ function ne(e, a) {
152
172
  return o(e.w) === o(a.w) && o(e.h) === o(a.h);
153
173
  }
154
- function D(e) {
174
+ function A(e) {
155
175
  return [...new Set(e.map((a) => o(a)))].filter((a) => Number.isFinite(a)).sort((a, t) => a - t);
156
176
  }
157
- function Z(e) {
158
- return e.map(K).sort((a, t) => {
177
+ function le(e) {
178
+ return e.map(C).sort((a, t) => {
159
179
  const i = a.y - t.y;
160
180
  if (i !== 0) return i;
161
181
  const r = a.x - t.x;
162
182
  return r !== 0 ? r : a.w - t.w || a.h - t.h;
163
183
  });
164
184
  }
165
- function ee(e) {
185
+ function se(e) {
166
186
  const a = /* @__PURE__ */ new Map();
167
- return Z(e).forEach((t) => {
187
+ return le(e).forEach((t) => {
168
188
  const i = o(t.y);
169
189
  a.set(i, [...a.get(i) || [], t]);
170
190
  }), [...a.entries()].map(([t, i]) => ({ y: t, rects: i.sort((r, l) => r.x - l.x) })).sort((t, i) => t.y - i.y);
171
191
  }
172
- function x(e) {
192
+ function H(e) {
173
193
  return e.reduce((a, t) => Math.max(a, t.h), 0);
174
194
  }
175
- function ae(e) {
195
+ function oe(e) {
176
196
  return e.reduce((a, t) => a + t.w, 0);
177
197
  }
178
- function te(e, a) {
179
- return e >= a * X;
198
+ function ce(e, a) {
199
+ return e >= a * ie;
180
200
  }
181
- function F(e) {
201
+ function O(e) {
182
202
  for (const a of ["screen", "large", "componentTall", "medium", "small"]) {
183
- const t = R[a].w, i = V[a];
203
+ const t = x[a].w, i = te[a];
184
204
  if (e.length >= i && e.every((r) => r.w === t))
185
205
  return a;
186
206
  }
187
207
  return null;
188
208
  }
189
- function z(e, a) {
190
- const t = ee(a), i = t.map((n) => ({
209
+ function G(e, a) {
210
+ const t = se(a), i = t.map((n) => ({
191
211
  ...n,
192
- width: ae(n.rects),
193
- height: x(n.rects),
194
- hasSameSize: n.rects.some((c) => J(c, e))
212
+ width: oe(n.rects),
213
+ height: H(n.rects),
214
+ hasSameSize: n.rects.some((c) => ne(c, e))
195
215
  })).filter(
196
- (n) => n.width + e.w <= d && te(n.height, e.h)
216
+ (n) => n.width + e.w <= d && ce(n.height, e.h)
197
217
  ), l = i.filter((n) => n.height === e.h || n.hasSameSize).sort((n, c) => n.hasSameSize !== c.hasSameSize ? n.hasSameSize ? -1 : 1 : n.y - c.y)[0] || i[0];
198
218
  if (l) {
199
219
  const n = { ...e, x: o(l.width), y: l.y };
200
- if (C(n, a)) return n;
220
+ if (K(n, a)) return n;
201
221
  }
202
- const s = t.reduce((n, c) => Math.max(n, c.y + x(c.rects)), 0);
222
+ const s = t.reduce((n, c) => Math.max(n, c.y + H(c.rects)), 0);
203
223
  return { ...e, x: 0, y: o(s) };
204
224
  }
205
- function N(e, a) {
206
- const t = K(e);
207
- if (C(t, a)) return t;
208
- const i = z(t, a);
209
- if (C(i, a)) return i;
210
- const r = a.reduce((n, c) => Math.max(n, c.y + c.h), 0), l = D([
225
+ function q(e, a) {
226
+ const t = C(e);
227
+ if (K(t, a)) return t;
228
+ const i = G(t, a);
229
+ if (K(i, a)) return i;
230
+ const r = a.reduce((n, c) => Math.max(n, c.y + c.h), 0), l = A([
211
231
  0,
212
232
  t.x,
213
233
  ...a.flatMap((n) => [n.x, n.x + n.w])
214
- ]).filter((n) => n >= 0 && n + t.w <= d), s = D([
234
+ ]).filter((n) => n >= 0 && n + t.w <= d), s = A([
215
235
  0,
216
236
  t.y,
217
237
  r,
@@ -220,66 +240,66 @@ function N(e, a) {
220
240
  for (const n of s)
221
241
  for (const c of l) {
222
242
  const p = { ...t, x: c, y: n };
223
- if (C(p, a)) return p;
243
+ if (K(p, a)) return p;
224
244
  }
225
245
  return { ...t, x: 0, y: o(r + g) };
226
246
  }
227
- function ie(e, a) {
228
- const t = K(e), i = z(t, a);
229
- return C(i, a) ? i : N(t, a);
247
+ function ue(e, a) {
248
+ const t = C(e), i = G(t, a);
249
+ return K(i, a) ? i : q(t, a);
230
250
  }
231
- function qe(e) {
251
+ function na(e) {
232
252
  const a = /* @__PURE__ */ new Map();
233
253
  return e.forEach((t) => {
234
254
  const i = o(y(t.layout).y);
235
255
  a.set(i, [...a.get(i) || [], t]);
236
256
  }), [...a.entries()].sort((t, i) => t[0] - i[0]).flatMap(([t, i]) => {
237
257
  const r = i.slice().sort((u, b) => {
238
- const v = y(u.layout), f = y(b.layout), k = v.x - f.x;
239
- return k !== 0 ? k : v.w - f.w || v.h - f.h;
240
- }), l = r.reduce((u, b) => u + y(b.layout).w, 0), s = Math.max(0, d - l), n = r.reduce((u, b) => Math.min(u, y(b.layout).w), d), c = F(r.map((u) => y(u.layout))), p = !!c && s > 0 && s < n, w = p ? r.filter((u) => y(u.layout).w === R[c].w) : [], m = w.length > 0 ? s / w.length : 0;
258
+ const f = y(u.layout), v = y(b.layout), k = f.x - v.x;
259
+ return k !== 0 ? k : f.w - v.w || f.h - v.h;
260
+ }), l = r.reduce((u, b) => u + y(b.layout).w, 0), s = Math.max(0, d - l), n = r.reduce((u, b) => Math.min(u, y(b.layout).w), d), c = O(r.map((u) => y(u.layout))), p = !!c && s > 0 && s < n, w = p ? r.filter((u) => y(u.layout).w === x[c].w) : [], m = w.length > 0 ? s / w.length : 0;
241
261
  let T = 0;
242
262
  return r.map((u, b) => {
243
- const v = y(u.layout), f = b === r.length - 1, k = w.length > 0 ? w.includes(u) : p && f, q = p && f ? Math.max(g, o(d - T)) : Math.max(g, o(k ? v.w + m : v.w)), M = {
244
- ...v,
263
+ const f = y(u.layout), v = b === r.length - 1, k = w.length > 0 ? w.includes(u) : p && v, V = p && v ? Math.max(g, o(d - T)) : Math.max(g, o(k ? f.w + m : f.w)), P = {
264
+ ...f,
245
265
  x: o(T),
246
266
  y: t,
247
- w: q
267
+ w: V
248
268
  };
249
- return T += M.w, {
269
+ return T += P.w, {
250
270
  ...u,
251
271
  layout: {
252
272
  ...u.layout,
253
- ...M
273
+ ...P
254
274
  }
255
275
  };
256
276
  });
257
277
  });
258
278
  }
259
- function re(e, a) {
260
- const t = e.reduce((m, T) => m + T.rect.w, 0), i = Math.max(0, d - t), r = F(e.map((m) => m.rect)), l = !!r, s = l ? e.filter((m) => m.rect.w === R[r].w) : [], n = l && s.length === 0 ? e[e.length - 1] : null, c = s.length || (n ? 1 : 0), p = c > 0 ? i / c : 0;
279
+ function de(e, a) {
280
+ const t = e.reduce((m, T) => m + T.rect.w, 0), i = Math.max(0, d - t), r = O(e.map((m) => m.rect)), l = !!r, s = l ? e.filter((m) => m.rect.w === x[r].w) : [], n = l && s.length === 0 ? e[e.length - 1] : null, c = s.length || (n ? 1 : 0), p = c > 0 ? i / c : 0;
261
281
  let w = 0;
262
282
  return e.map((m, T) => {
263
- const u = T === e.length - 1, b = s.includes(m) || m === n, v = u && l ? Math.max(g, o(d - w)) : Math.max(g, o(m.rect.w + (b ? p : 0))), f = {
283
+ const u = T === e.length - 1, b = s.includes(m) || m === n, f = u && l ? Math.max(g, o(d - w)) : Math.max(g, o(m.rect.w + (b ? p : 0))), v = {
264
284
  ...m.rect,
265
285
  x: o(w),
266
286
  y: a,
267
- w: v
287
+ w: f
268
288
  };
269
- return w += f.w, {
289
+ return w += v.w, {
270
290
  ...m.item,
271
291
  layout: {
272
292
  ...m.item.layout,
273
- ...f
293
+ ...v
274
294
  }
275
295
  };
276
296
  });
277
297
  }
278
- function ne(e) {
298
+ function me(e) {
279
299
  const a = [];
280
300
  let t = 0, i = [];
281
301
  const r = () => {
282
- i.length !== 0 && (a.push(...re(i, o(t))), t += x(i.map((l) => l.rect)), i = []);
302
+ i.length !== 0 && (a.push(...de(i, o(t))), t += H(i.map((l) => l.rect)), i = []);
283
303
  };
284
304
  return e.forEach((l) => {
285
305
  const s = y(l.layout);
@@ -291,7 +311,7 @@ function ne(e) {
291
311
  i.length > 0 && n + s.w > d && r(), i.push({ item: l, rect: s });
292
312
  }), r(), a;
293
313
  }
294
- function Ee(e) {
314
+ function la(e) {
295
315
  const a = [...e].sort((l, s) => {
296
316
  const n = y(l.layout), c = y(s.layout), p = n.y - c.y;
297
317
  if (p !== 0) return p;
@@ -317,14 +337,14 @@ function Ee(e) {
317
337
  };
318
338
  });
319
339
  }
320
- function je(e) {
340
+ function sa(e) {
321
341
  const a = [...e].sort((t, i) => {
322
342
  const r = y(t.layout), l = y(i.layout), s = r.y - l.y;
323
343
  if (s !== 0) return s;
324
344
  const n = r.x - l.x;
325
345
  return n !== 0 ? n : t.id.localeCompare(i.id);
326
346
  });
327
- return ne(a).map((t) => ({
347
+ return me(a).map((t) => ({
328
348
  ...t,
329
349
  layout: {
330
350
  ...t.layout,
@@ -332,72 +352,98 @@ function je(e) {
332
352
  }
333
353
  }));
334
354
  }
335
- function Ye(e, a = 20) {
355
+ function oa(e, a = 20) {
336
356
  return e.reduce((t, i) => Math.max(t, i.y + i.h), 0) + a;
337
357
  }
338
- function le(e) {
358
+ function pe(e) {
339
359
  var i, r, l, s;
340
- const a = _(e.preset), t = K({
360
+ const a = W(e.preset), t = C({
341
361
  x: h((i = e.layout) == null ? void 0 : i.x, 0),
342
362
  y: h((r = e.layout) == null ? void 0 : r.y, 0),
343
363
  w: h(((l = e.layout) == null ? void 0 : l.w) ?? e.width, a.w),
344
364
  h: h(((s = e.layout) == null ? void 0 : s.h) ?? e.height, a.h)
345
365
  });
346
- return N(t, e.placed);
366
+ return q(t, e.placed);
347
367
  }
348
- function se(e) {
368
+ function he(e) {
349
369
  var i, r, l, s;
350
- const a = _(e.preset), t = K({
370
+ const a = W(e.preset), t = C({
351
371
  x: h((i = e.layout) == null ? void 0 : i.x, 0),
352
372
  y: h((r = e.layout) == null ? void 0 : r.y, 0),
353
373
  w: h(((l = e.layout) == null ? void 0 : l.w) ?? e.width, a.w),
354
374
  h: h(((s = e.layout) == null ? void 0 : s.h) ?? e.height, a.h)
355
375
  });
356
- return ie(t, e.placed);
376
+ return ue(t, e.placed);
357
377
  }
358
- function oe(e, a) {
378
+ function we(e, a) {
359
379
  return {
360
380
  i: e,
361
- ...K(a),
381
+ ...C(a),
362
382
  minW: g,
363
383
  minH: g,
364
384
  maxW: d,
365
385
  static: !1
366
386
  };
367
387
  }
368
- async function P(e) {
369
- const a = await fetch(e, { credentials: "same-origin" });
370
- if (!a.ok)
371
- throw new Error(`加载 ECharts 模板资源失败:${e} (${a.status})`);
372
- return await a.json();
388
+ const $ = "echarts-system-card-templates", L = /* @__PURE__ */ new Map();
389
+ async function B(e) {
390
+ const a = L.get(e);
391
+ if (a) return await a;
392
+ const t = ye(e);
393
+ return L.set(e, t), t.catch(() => {
394
+ L.get(e) === t && L.delete(e);
395
+ }), await t;
396
+ }
397
+ async function ye(e) {
398
+ const t = ve(e, fe()) ?? e, i = await be(t);
399
+ if (i.ok) return i.value;
400
+ throw i.error;
401
+ }
402
+ async function be(e) {
403
+ try {
404
+ const a = await fetch(e, { credentials: "same-origin" });
405
+ return a.ok ? { ok: !0, value: await a.json() } : { ok: !1, error: new Error(`加载 ECharts 模板资源失败:${e} (${a.status})`) };
406
+ } catch (a) {
407
+ const t = a instanceof Error ? a.message : String(a);
408
+ return { ok: !1, error: new Error(`加载 ECharts 模板资源失败:${e}: ${t}`) };
409
+ }
410
+ }
411
+ function fe() {
412
+ var a, t;
413
+ return ((t = (a = Z().assets) == null ? void 0 : a.echartsTemplateCdnBaseUrl) == null ? void 0 : t.trim()) || void 0;
373
414
  }
374
- const ce = ["extraction", "officialComparison", "officialSourceReplay"], ue = ["params", "reloadPolicy", "extraction"];
375
- function Ue(e) {
415
+ function ve(e, a) {
416
+ if (!a) return;
417
+ const t = a.replace(/\/+$/u, ""), i = e.replace(/^\/+/u, "");
418
+ return t.endsWith(`/${$}`) ? `${t}/${i.slice(`${$}/`.length)}` : `${t}/${i}`;
419
+ }
420
+ const ge = ["extraction", "officialComparison", "officialSourceReplay"], Te = ["params", "reloadPolicy", "extraction"];
421
+ function ca(e) {
376
422
  let a = !1;
377
423
  const t = e.blocks.map((i) => {
378
- const r = de(i);
424
+ const r = Se(i);
379
425
  return r !== i && (a = !0), r;
380
426
  });
381
427
  return a ? { ...e, blocks: t } : e;
382
428
  }
383
- function de(e) {
429
+ function Se(e) {
384
430
  if (!S(e.data)) return e;
385
- const a = L(e.data);
431
+ const a = R(e.data);
386
432
  return a === e.data ? e : { ...e, data: a };
387
433
  }
388
- function L(e) {
434
+ function R(e) {
389
435
  let a = !1;
390
- const t = me(e) ? { ...e } : e;
436
+ const t = Ce(e) ? { ...e } : e;
391
437
  if (S(t.protocolConfig)) {
392
- const i = A(t.protocolConfig, ce);
438
+ const i = _(t.protocolConfig, ge);
393
439
  i !== t.protocolConfig && (t.protocolConfig = i, a = !0);
394
440
  }
395
441
  if (S(t.protocolData)) {
396
- const i = A(t.protocolData, ue);
442
+ const i = _(t.protocolData, Te);
397
443
  i !== t.protocolData && (t.protocolData = i, a = !0);
398
444
  }
399
445
  if (Array.isArray(t.nestedBlocks)) {
400
- const i = t.nestedBlocks.map((r) => S(r) ? pe(r) : r);
446
+ const i = t.nestedBlocks.map((r) => S(r) ? Ke(r) : r);
401
447
  if (i.some((r, l) => r !== t.nestedBlocks[l])) {
402
448
  if (t === e) return { ...e, nestedBlocks: i };
403
449
  t.nestedBlocks = i, a = !0;
@@ -405,13 +451,13 @@ function L(e) {
405
451
  }
406
452
  return a ? t : e;
407
453
  }
408
- function me(e) {
454
+ function Ce(e) {
409
455
  return e.shape === "protocolRender" && e.rendererType === "echarts" && S(e.protocolConfig);
410
456
  }
411
- function pe(e) {
412
- let a = !1, t = L(e);
457
+ function Ke(e) {
458
+ let a = !1, t = R(e);
413
459
  if (t !== e && (a = !0), S(t.data)) {
414
- const i = L(t.data);
460
+ const i = R(t.data);
415
461
  i !== t.data && (t = t === e ? { ...e, data: i } : { ...t, data: i }, a = !0);
416
462
  }
417
463
  return a ? t : e;
@@ -419,16 +465,16 @@ function pe(e) {
419
465
  function S(e) {
420
466
  return !!(e && typeof e == "object" && !Array.isArray(e));
421
467
  }
422
- function A(e, a) {
468
+ function _(e, a) {
423
469
  let t = !1;
424
470
  const i = { ...e };
425
471
  return a.forEach((r) => {
426
472
  r in i && (delete i[r], t = !0);
427
473
  }), t ? i : e;
428
474
  }
429
- async function he(e) {
475
+ async function ke(e) {
430
476
  try {
431
- const a = await P(e.echarts.configPath), t = e.echarts.dataPath ? await P(e.echarts.dataPath) : void 0, i = L({
477
+ const a = await B(e.echarts.configPath), t = e.echarts.dataPath ? await B(e.echarts.dataPath) : void 0, i = R({
432
478
  shape: "protocolRender",
433
479
  rendererType: "echarts",
434
480
  protocolConfig: a,
@@ -467,13 +513,13 @@ async function he(e) {
467
513
  };
468
514
  }
469
515
  }
470
- function we(e) {
516
+ function Le(e) {
471
517
  return !!(e && typeof e == "object" && typeof e.capabilityId == "string" && e.capabilityId.startsWith("card.echarts.") && typeof e.echarts == "object");
472
518
  }
473
- function ye(e = "canvas-card") {
519
+ function Re(e = "canvas-card") {
474
520
  return typeof crypto < "u" && "randomUUID" in crypto ? `${e}-${crypto.randomUUID()}` : `${e}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
475
521
  }
476
- function be() {
522
+ function xe() {
477
523
  return {
478
524
  mode: "final",
479
525
  status: "ready",
@@ -484,15 +530,15 @@ function be() {
484
530
  submitable: !1
485
531
  };
486
532
  }
487
- function ve(e) {
533
+ function He(e) {
488
534
  if (e.category !== "card.composite_cards") return null;
489
- const a = j(e.type);
535
+ const a = J(e.type);
490
536
  if (!a) return null;
491
- if (a.id === "threePanelAnalysis") return fe(a.scene);
537
+ if (a.id === "threePanelAnalysis") return Ie(a.scene);
492
538
  const t = a.dataContract.nestedBlockKinds.slice(0, 4).map((i, r) => ({
493
539
  id: `${a.id}-sample-${r + 1}`,
494
- title: B(a.id, i, r),
495
- kind: ge(i),
540
+ title: F(a.id, i, r),
541
+ kind: Me(i),
496
542
  visualKind: i,
497
543
  slot: r < 2 ? "body" : "footer",
498
544
  dataBindingStatus: r === 0 ? "business_input" : "none",
@@ -501,7 +547,7 @@ function ve(e) {
501
547
  dataBinding: {
502
548
  id: `binding-${a.id}-sample-${r + 1}`,
503
549
  status: "business_input",
504
- queryIntent: `查询${B(a.id, i, r)}`,
550
+ queryIntent: `查询${F(a.id, i, r)}`,
505
551
  refreshApi: `/workbench/v2/documents/{workspaceId}/data-bindings/binding-${a.id}-sample-${r + 1}/query`
506
552
  },
507
553
  humanIntervention: {
@@ -510,7 +556,7 @@ function ve(e) {
510
556
  hint: "补充业务口径后由宿主问数并 setData。"
511
557
  }
512
558
  } : {},
513
- data: Te(i)
559
+ data: De(i)
514
560
  }));
515
561
  return {
516
562
  shape: "customCanvas",
@@ -525,7 +571,7 @@ function ve(e) {
525
571
  nestedBlocks: t
526
572
  };
527
573
  }
528
- function fe(e) {
574
+ function Ie(e) {
529
575
  return {
530
576
  shape: "customCanvas",
531
577
  sourceLabel: "Workbench Card Library",
@@ -620,7 +666,7 @@ function fe(e) {
620
666
  })
621
667
  };
622
668
  }
623
- function B(e, a, t) {
669
+ function F(e, a, t) {
624
670
  var r;
625
671
  return ((r = {
626
672
  asset: ["资产台账", "成本分析", "资产异常", "成本优化"],
@@ -630,10 +676,10 @@ function B(e, a, t) {
630
676
  businessMetricMatrix: ["核心 KPI", "趋势缩略图", "业务动态", "风险提醒"]
631
677
  }[e]) == null ? void 0 : r[t]) || a;
632
678
  }
633
- function ge(e) {
679
+ function Me(e) {
634
680
  return /metric|score/i.test(e) ? "metric" : /chart|donut|bars/i.test(e) ? "chart" : "list";
635
681
  }
636
- function Te(e) {
682
+ function De(e) {
637
683
  return /metric|score/i.test(e) ? { shape: "metricSummary", primaryValue: "待补口径", primaryLabel: "示例指标" } : /donut/i.test(e) ? { shape: "pieSlices", slices: [{ label: "已用", value: 62 }, { label: "剩余", value: 38 }] } : /chart|bars/i.test(e) ? { shape: "singleSeries", categories: ["周一", "周二", "周三"], series: [{ name: "趋势", type: "line", data: [82, 88, 91] }] } : {
638
684
  shape: "categoryRanking",
639
685
  items: [
@@ -642,7 +688,7 @@ function Te(e) {
642
688
  ]
643
689
  };
644
690
  }
645
- function Se(e, a) {
691
+ function Pe(e, a) {
646
692
  const t = {
647
693
  multiPanel: ["核心指标趋势", "业务分布", "结构占比", "健康度监控"],
648
694
  executiveCockpit: ["经营目标达成", "收入趋势", "费用结构", "风险预警"],
@@ -718,7 +764,7 @@ function Se(e, a) {
718
764
  ]
719
765
  };
720
766
  }
721
- function Ke() {
767
+ function Ae() {
722
768
  return {
723
769
  shape: "customCanvas",
724
770
  sourceLabel: "Canvas Runtime",
@@ -729,7 +775,7 @@ function Ke() {
729
775
  containerRole: "nested-card-container"
730
776
  };
731
777
  }
732
- function Ce(e, a) {
778
+ function $e(e, a) {
733
779
  const i = {
734
780
  metricNumeric: { value: 128, delta: 0.062, compare: "较上期", secondary: [{ label: "本期值", format: "number", value: 128 }, { label: "样本数", format: "number", value: 24 }] },
735
781
  metricCombo: { value: 386, delta: 0.094, compare: "组合提升", secondary: [{ label: "收入", format: "currency", value: 218 }, { label: "订单", format: "number", value: 168 }] },
@@ -760,7 +806,7 @@ function Ce(e, a) {
760
806
  secondary: i.secondary
761
807
  };
762
808
  }
763
- function ke(e, a) {
809
+ function Be(e, a) {
764
810
  const t = {
765
811
  analysisInsight: ["核心指标保持稳定。", "结构变化主要来自重点分组。", "建议继续观察趋势拐点。"],
766
812
  analysisRootCause: ["波动来源集中在输入、过程、结果三层。", "主因需要结合明细数据确认。", "建议优先排查异常链路。"],
@@ -787,7 +833,7 @@ function ke(e, a) {
787
833
  sourceLabel: "Canvas Runtime"
788
834
  };
789
835
  }
790
- function W() {
836
+ function U() {
791
837
  return {
792
838
  shape: "rows",
793
839
  sourceLabel: "Canvas Runtime",
@@ -799,7 +845,7 @@ function W() {
799
845
  ]
800
846
  };
801
847
  }
802
- function Le(e, a) {
848
+ function _e(e, a) {
803
849
  return {
804
850
  tableRecordList: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableRecordList", columns: ["事项", "负责人", "状态", "数值"], rows: [
805
851
  { id: "row-1", cells: ["客户跟进", "张明", "进行中", "12"] },
@@ -858,7 +904,7 @@ function Le(e, a) {
858
904
  { id: "row-2", cells: ["响应时长", "首次响应耗时", "分钟"] }
859
905
  ] }
860
906
  }[a.previewKind] || {
861
- ...W(),
907
+ ...U(),
862
908
  visualKind: a.previewKind,
863
909
  columns: ["类型", "状态", "说明"],
864
910
  rows: [
@@ -867,16 +913,16 @@ function Le(e, a) {
867
913
  ]
868
914
  };
869
915
  }
870
- function Re(e, a) {
871
- return e.category === "card.table_cards" ? Le(e, a) : e.capabilityId === "card.identity.directory" ? { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "identityDirectory", columns: ["姓名", "角色", "状态"], rows: [
916
+ function Fe(e, a) {
917
+ return e.category === "card.table_cards" ? _e(e, a) : e.capabilityId === "card.identity.directory" ? { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "identityDirectory", columns: ["姓名", "角色", "状态"], rows: [
872
918
  { id: "row-1", cells: ["张明", "销售负责人", "在线"] },
873
919
  { id: "row-2", cells: ["李然", "交付负责人", "忙碌"] }
874
920
  ] } : e.capabilityId === "card.workflow.approvalList" ? { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "workflowApprovalList", columns: ["单据", "节点", "状态"], rows: [
875
921
  { id: "row-1", cells: ["合同审批", "法务复核", "待处理"] },
876
922
  { id: "row-2", cells: ["费用申请", "部门确认", "进行中"] }
877
- ] } : W();
923
+ ] } : U();
878
924
  }
879
- function xe(e, a) {
925
+ function ze(e, a) {
880
926
  if (a.previewKind === "chartBubbleScale")
881
927
  return {
882
928
  shape: "scatterPoints",
@@ -926,7 +972,7 @@ function xe(e, a) {
926
972
  ]
927
973
  };
928
974
  }
929
- function He(e) {
975
+ function Ee(e) {
930
976
  return e.previewKind === "chartDonutProgress" ? {
931
977
  shape: "pieSlices",
932
978
  innerRadius: 0.58,
@@ -945,7 +991,7 @@ function He(e) {
945
991
  narrative: `${e.sampleTitle}预览。`
946
992
  };
947
993
  }
948
- function Ie(e) {
994
+ function Ne(e) {
949
995
  return {
950
996
  shape: "mapRegions",
951
997
  regions: e.previewKind === "geoRegionalHeat" ? [
@@ -960,7 +1006,7 @@ function Ie(e) {
960
1006
  narrative: `${e.sampleTitle}预览。`
961
1007
  };
962
1008
  }
963
- function Me(e, a) {
1009
+ function We(e, a) {
964
1010
  const t = a.previewKind === "chartDrilldownTree" || a.previewKind === "workflowApprovalChain";
965
1011
  return {
966
1012
  shape: "treeHierarchy",
@@ -979,7 +1025,7 @@ function Me(e, a) {
979
1025
  narrative: `${a.sampleTitle}预览。`
980
1026
  };
981
1027
  }
982
- function De(e) {
1028
+ function Oe(e) {
983
1029
  return {
984
1030
  shape: "geoGlobe",
985
1031
  title: e.sampleTitle,
@@ -996,7 +1042,7 @@ function De(e) {
996
1042
  narrative: `${e.sampleTitle}预览。`
997
1043
  };
998
1044
  }
999
- function Pe(e, a) {
1045
+ function Ge(e, a) {
1000
1046
  const t = a.sampleTitle || e.title, i = a.previewKind === "geoMigrationFlow" ? ["出发地", "中转点", "目的地"] : a.previewKind === "geoRouteTrack" ? ["起点", "途经站", "终点"] : a.previewKind.includes("Permission") || a.previewKind.includes("permission") ? ["用户", "角色", "权限"] : a.previewKind.includes("Lineage") || a.previewKind.includes("lineage") ? ["来源表", "指标", "报表"] : a.previewKind === "graphKnowledge" ? ["概念", "属性", "事实"] : ["对象 A", "关系", "对象 B"];
1001
1047
  return {
1002
1048
  shape: "networkGraph",
@@ -1014,7 +1060,7 @@ function Pe(e, a) {
1014
1060
  narrative: `${t}预览关系。`
1015
1061
  };
1016
1062
  }
1017
- function Ae(e, a) {
1063
+ function qe(e, a) {
1018
1064
  return e.dataShape === "weatherCurrent" ? {
1019
1065
  shape: "weatherCurrent",
1020
1066
  location: "上海",
@@ -1058,8 +1104,8 @@ function Ae(e, a) {
1058
1104
  fallbackText: a.previewKind === "fdeTemplateWeather" ? "模板天气组件预览。" : "注册 FDE 组件后展示定制内容。"
1059
1105
  } : null;
1060
1106
  }
1061
- function $(e, a) {
1062
- if (a.previewKind === "customNestedContainer") return Ke();
1107
+ function z(e, a) {
1108
+ if (a.previewKind === "customNestedContainer") return Ae();
1063
1109
  const i = {
1064
1110
  customBlankCanvas: "blank-card-canvas",
1065
1111
  utilityQuickLinks: "quick-links",
@@ -1094,17 +1140,17 @@ function $(e, a) {
1094
1140
  elements: r
1095
1141
  };
1096
1142
  }
1097
- function Be(e, a) {
1143
+ function Ue(e, a) {
1098
1144
  if (a && typeof a == "object") return a;
1099
- const t = `${e.title}由左画布 Canvas Runtime 生成。`, i = U(e), r = ve(e);
1145
+ const t = `${e.title}由左画布 Canvas Runtime 生成。`, i = ae(e), r = He(e);
1100
1146
  if (r) return r;
1101
- if (e.dataShape === "metricSummary") return Ce(e, i);
1102
- if (e.dataShape === "rows") return Re(e, i);
1103
- if (e.dataShape === "insightNarrative" || e.dataShape === "reportSummary") return ke(e, i);
1147
+ if (e.dataShape === "metricSummary") return $e(e, i);
1148
+ if (e.dataShape === "rows") return Fe(e, i);
1149
+ if (e.dataShape === "insightNarrative" || e.dataShape === "reportSummary") return Be(e, i);
1104
1150
  if (e.dataShape === "dashboardGrid")
1105
- return Se(e, t);
1106
- if (e.dataShape === "pieSlices") return He(i);
1107
- if (e.dataShape === "singleSeries" || e.dataShape === "multiSeries" || e.dataShape === "scatterPoints") return xe(e, i);
1151
+ return Pe(e, t);
1152
+ if (e.dataShape === "pieSlices") return Ee(i);
1153
+ if (e.dataShape === "singleSeries" || e.dataShape === "multiSeries" || e.dataShape === "scatterPoints") return ze(e, i);
1108
1154
  if (e.dataShape === "waterfallSteps")
1109
1155
  return {
1110
1156
  shape: "waterfallSteps",
@@ -1182,7 +1228,7 @@ function Be(e, a) {
1182
1228
  ],
1183
1229
  narrative: t
1184
1230
  };
1185
- if (e.dataShape === "mapRegions") return Ie(i);
1231
+ if (e.dataShape === "mapRegions") return Ne(i);
1186
1232
  if (e.dataShape === "sankeyFlow")
1187
1233
  return {
1188
1234
  shape: "sankeyFlow",
@@ -1199,7 +1245,7 @@ function Be(e, a) {
1199
1245
  ],
1200
1246
  narrative: t
1201
1247
  };
1202
- if (e.dataShape === "treeHierarchy") return Me(e, i);
1248
+ if (e.dataShape === "treeHierarchy") return We(e, i);
1203
1249
  if (e.dataShape === "ganttTasks")
1204
1250
  return {
1205
1251
  shape: "ganttTasks",
@@ -1245,8 +1291,8 @@ function Be(e, a) {
1245
1291
  cumulative: [42, 73, 91, 100],
1246
1292
  narrative: t
1247
1293
  };
1248
- if (e.dataShape === "networkGraph") return Pe(e, i);
1249
- if (e.dataShape === "geoGlobe") return De(i);
1294
+ if (e.dataShape === "networkGraph") return Ge(e, i);
1295
+ if (e.dataShape === "geoGlobe") return Oe(i);
1250
1296
  if (e.dataShape === "taskSummary")
1251
1297
  return {
1252
1298
  shape: "taskSummary",
@@ -1260,18 +1306,18 @@ function Be(e, a) {
1260
1306
  { id: "task-2", title: "确认回款计划", type: "document", owner: "李经理", status: "reading", dueAt: "明日" }
1261
1307
  ]
1262
1308
  };
1263
- const l = Ae(e, i);
1264
- return l || (e.dataShape === "customCanvas", $(e, i));
1309
+ const l = qe(e, i);
1310
+ return l || (e.dataShape === "customCanvas", z(e, i));
1265
1311
  }
1266
- function Ve(e, a) {
1267
- const t = G(e), i = O(e, t);
1268
- return i || (t ? I(e, a, t) : H(e));
1312
+ function ua(e, a) {
1313
+ const t = Y(e), i = j(e, t);
1314
+ return i || (t ? D(e, a, t) : M(e));
1269
1315
  }
1270
- async function Xe(e, a) {
1271
- const t = G(e), i = O(e, t);
1272
- return i || (t ? we(t) ? await $e(e, a, t) : I(e, a, t) : H(e));
1316
+ async function da(e, a) {
1317
+ const t = Y(e), i = j(e, t);
1318
+ return i || (t ? Le(t) ? await je(e, a, t) : D(e, a, t) : M(e));
1273
1319
  }
1274
- function O(e, a) {
1320
+ function j(e, a) {
1275
1321
  return a ? e.registryEntry && e.capabilityId && e.capabilityId !== e.registryEntry.capabilityId ? {
1276
1322
  status: "failed",
1277
1323
  registryEntry: a,
@@ -1287,21 +1333,21 @@ function O(e, a) {
1287
1333
  registryEntry: a,
1288
1334
  reason: `生命周期能力不能通过 insertCard 创建:${a.capabilityId}`,
1289
1335
  suggestion: "请使用 updateCard.operation 进入改卡生命周期。"
1290
- } : null : H(e);
1336
+ } : null : M(e);
1291
1337
  }
1292
- function G(e) {
1293
- return e.registryEntry ?? E(e);
1338
+ function Y(e) {
1339
+ return e.registryEntry ?? X(e);
1294
1340
  }
1295
- function H(e) {
1341
+ function M(e) {
1296
1342
  return {
1297
1343
  status: "failed",
1298
1344
  reason: `能力不存在或未登记:${e.capabilityId || `${e.category || "-"}/${e.type || "-"}`}`,
1299
1345
  suggestion: "请使用 Card Registry 中已登记的 capabilityId,或补齐对应卡片能力。"
1300
1346
  };
1301
1347
  }
1302
- function I(e, a, t, i) {
1303
- var p, w, m, T, u, b, v, f;
1304
- const r = String(((p = e.meta) == null ? void 0 : p.id) || ((w = e.layout) == null ? void 0 : w.i) || ye()), s = (e.layout ? le : se)({
1348
+ function D(e, a, t, i) {
1349
+ var p, w, m, T, u, b, f, v;
1350
+ const r = String(((p = e.meta) == null ? void 0 : p.id) || ((w = e.layout) == null ? void 0 : w.i) || Re()), s = (e.layout ? pe : he)({
1305
1351
  preset: ((m = e.size) == null ? void 0 : m.preset) || "medium",
1306
1352
  width: (T = e.size) == null ? void 0 : T.width,
1307
1353
  height: (u = e.size) == null ? void 0 : u.height,
@@ -1315,7 +1361,7 @@ function I(e, a, t, i) {
1315
1361
  subType: t.subType,
1316
1362
  title: e.title || t.title,
1317
1363
  subtitle: e.subtitle || t.description,
1318
- layout: oe(r, s),
1364
+ layout: we(r, s),
1319
1365
  intent: {
1320
1366
  scene: "personal_workbench_canvas_runtime",
1321
1367
  bizIntent: e.title || t.title,
@@ -1333,12 +1379,12 @@ function I(e, a, t, i) {
1333
1379
  }
1334
1380
  },
1335
1381
  renderer: (i == null ? void 0 : i.renderer) ?? {
1336
- engine: ((v = e.renderer) == null ? void 0 : v.engine) || "echarts",
1382
+ engine: ((f = e.renderer) == null ? void 0 : f.engine) || "echarts",
1337
1383
  rendererKey: n,
1338
- preset: (f = e.renderer) == null ? void 0 : f.preset
1384
+ preset: (v = e.renderer) == null ? void 0 : v.preset
1339
1385
  },
1340
- state: be(),
1341
- data: (i == null ? void 0 : i.data) ?? Be(t, e.data),
1386
+ state: xe(),
1387
+ data: (i == null ? void 0 : i.data) ?? Ue(t, e.data),
1342
1388
  meta: {
1343
1389
  ...e.meta,
1344
1390
  ...(i == null ? void 0 : i.meta) ?? {},
@@ -1357,36 +1403,41 @@ function I(e, a, t, i) {
1357
1403
  }
1358
1404
  }, registryEntry: t };
1359
1405
  }
1360
- async function $e(e, a, t) {
1361
- const i = await he(t);
1362
- return i.ok ? I(e, a, t, {
1406
+ async function je(e, a, t) {
1407
+ const i = await ke(t);
1408
+ return i.ok ? D(e, a, t, {
1363
1409
  renderer: i.renderer,
1364
1410
  data: i.data,
1365
1411
  meta: i.meta
1366
1412
  }) : { status: "failed", registryEntry: t, reason: i.reason };
1367
1413
  }
1368
1414
  export {
1369
- R as D,
1415
+ x as D,
1370
1416
  d as L,
1371
1417
  g as S,
1372
- Xe as a,
1373
- je as b,
1374
- Ve as c,
1375
- Ye as d,
1376
- K as e,
1377
- qe as f,
1378
- _ as g,
1379
- ie as h,
1380
- N as i,
1381
- Ne as j,
1382
- C as k,
1383
- oe as l,
1384
- We as m,
1385
- Q as n,
1386
- Ee as o,
1387
- Oe as p,
1388
- se as q,
1389
- le as r,
1390
- Ge as s,
1391
- Ue as t
1418
+ da as a,
1419
+ sa as b,
1420
+ ua as c,
1421
+ Je as d,
1422
+ oa as e,
1423
+ C as f,
1424
+ na as g,
1425
+ W as h,
1426
+ ue as i,
1427
+ q as j,
1428
+ aa as k,
1429
+ we as l,
1430
+ K as m,
1431
+ ta as n,
1432
+ re as o,
1433
+ ia as p,
1434
+ la as q,
1435
+ pe as r,
1436
+ he as s,
1437
+ ra as t,
1438
+ ca as u,
1439
+ Ze as v,
1440
+ ea as w,
1441
+ Z as x,
1442
+ Qe as y
1392
1443
  };