@fses/workbench-app 0.2.16 → 0.2.17

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 (61) hide show
  1. package/WORKBENCH-CLOSURE.json +18 -12
  2. package/dist/Workspace-r8ayksVF.js +23176 -0
  3. package/dist/canvas/api/index.js +1 -1
  4. package/dist/{canvasFacade-B2EHgdqA.js → canvasFacade-B8jYm_aO.js} +748 -748
  5. package/dist/cardFactory-DmEBcCf4.js +1460 -0
  6. package/dist/extensions/index.js +1 -1
  7. package/dist/fses-workbench-app.js +5 -5
  8. package/dist/{index-CMM-5ObU.js → index-DEOR_GPc.js} +350 -346
  9. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDisplayData.d.ts +0 -5
  10. package/dist/internal/personal-workbench/lib/assistantPersonaProfiles.d.ts +6 -6
  11. package/dist/internal/personal-workbench/lib/cardStyleConfig.d.ts +26 -26
  12. package/dist/internal/personal-workbench/lib/echartsOptionEditorBridge.d.ts +0 -5
  13. package/dist/internal/personal-workbench/lib/historyCardBindingRestore.fixture.d.ts +0 -5
  14. package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +1 -1
  15. package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +0 -5
  16. package/dist/internal/personal-workbench/lib/workbenchCanvasBusinessGapChecklist.d.ts +1 -1
  17. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationFallback.d.ts +1 -1
  18. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationReturnItemUpsert.d.ts +0 -5
  19. package/dist/internal/personal-workbench/lib/workbenchDataBindingBadge.d.ts +0 -5
  20. package/dist/internal/personal-workbench/lib/workbenchImageComposeEntry.d.ts +1 -1
  21. package/dist/internal/personal-workbench/lib/workbenchLayout.d.ts +0 -5
  22. package/dist/runtime/index.js +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/{useWorkbenchRuntime-DLf_FgC7.js → useWorkbenchRuntime-DDD22mdF.js} +7817 -7813
  25. package/dist/version.d.ts +1 -1
  26. package/dist/{workbenchCustomComponentRegistry-Bt94Lgko.js → workbenchCustomComponentRegistry-CWUPjCnJ.js} +74 -74
  27. package/node_modules/@byteluck-fe/locale-message/README.md +2 -0
  28. package/node_modules/@byteluck-fe/locale-message/dist/index.d.ts +37 -0
  29. package/node_modules/@byteluck-fe/locale-message/dist/locale-message.js +55 -0
  30. package/node_modules/@byteluck-fe/locale-message/package.json +37 -0
  31. package/node_modules/@fses/ai-chat/dist/components/ContextUsageRing.vue.d.ts +5 -0
  32. package/node_modules/@fses/ai-chat/dist/components/FsesAiChat.vue.d.ts +5 -0
  33. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +5446 -5321
  34. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +16 -18
  35. package/node_modules/@fses/ai-chat/dist/style.css +1 -1
  36. package/node_modules/@fses/ai-chat/dist/utils/attachment-upload.d.ts +0 -5
  37. package/node_modules/@fses/ai-chat/package.json +6 -5
  38. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +10144 -9914
  39. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.js +1517 -1503
  40. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.umd.cjs +1 -1
  41. package/node_modules/@fses/workbench-card/dist/renderers/chart/chartRendererRegistry.d.ts +97 -97
  42. package/node_modules/@fses/workbench-card/dist/renderers/style.css +1 -1
  43. package/node_modules/@fses/workbench-card/package.json +4 -1
  44. package/node_modules/@fses/workbench-card/src/registry/cardRegistry.ts +99 -98
  45. package/node_modules/@fses/workbench-card/src/registry/compositeCardPatterns.ts +31 -30
  46. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateCategories.ts +24 -23
  47. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +765 -764
  48. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.ts +765 -764
  49. package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +143 -129
  50. package/node_modules/@fses/workbench-card/src/renderers/chart/ChartRegistry.vue +4 -3
  51. package/node_modules/@fses/workbench-card/src/renderers/chart/EChartsProtocolRenderer.vue +2 -1
  52. package/node_modules/@fses/workbench-card/src/renderers/chart/chartRendererRegistry.ts +99 -98
  53. package/node_modules/@fses/workbench-card/src/renderers/chart/useEchart.ts +30 -29
  54. package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +11 -10
  55. package/node_modules/@fses/workbench-card/src/renderers/nested/nestedBlockBindings.ts +102 -101
  56. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceCompositeBindings.ts +364 -363
  57. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceRiskAndStrategyBindings.ts +90 -89
  58. package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts +33 -32
  59. package/package.json +4 -3
  60. package/dist/Workspace-CfKvji6S.js +0 -22896
  61. package/dist/cardFactory-BK3CA-Gn.js +0 -1443
@@ -0,0 +1,1460 @@
1
+ import "@fses/workbench-card";
2
+ import { resolveCardRegistryEntry as J, compositeCardPatternById as Q } from "@fses/workbench-card/registry";
3
+ import "@fses/workbench-card/renderers";
4
+ const e = (a, t, i) => {
5
+ if (!a)
6
+ return console.error("getLocaleText的key不能为空"), "";
7
+ const r = a.split(".");
8
+ let n;
9
+ const s = (window.baitedaWorkers || {}).languageMessages || {};
10
+ r.forEach((l, d) => {
11
+ d === 0 ? n = s[l] : n && (n = n[l]);
12
+ });
13
+ let o = "";
14
+ return n && (o = n), t && Object.keys(t).forEach((l) => {
15
+ const d = t[l];
16
+ o = o.replace(new RegExp(`\\{\\s*${l}\\s*\\}`, "g"), d);
17
+ }), o || (i ? o = i : o = a), o;
18
+ };
19
+ let x = {}, N = {}, E = {};
20
+ function Z(a) {
21
+ x = a;
22
+ }
23
+ function Qe(a, t, i) {
24
+ N = a, E = t, Z(i);
25
+ }
26
+ function Ze() {
27
+ return N;
28
+ }
29
+ function ee() {
30
+ return E;
31
+ }
32
+ function ea() {
33
+ return x;
34
+ }
35
+ function aa() {
36
+ var a;
37
+ return (a = x.fde) == null ? void 0 : a.generatedTemplateShell;
38
+ }
39
+ const ae = {
40
+ "card.metric.numeric": { previewKind: "metricNumeric", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.877e1787571438961") },
41
+ "card.metric.combo": { previewKind: "metricCombo", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.386b1787571438967") },
42
+ "card.metric.comparison": { previewKind: "metricComparison", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.f04a1787571438972") },
43
+ "card.metric.alert": { previewKind: "metricAlert", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.75901787571438979") },
44
+ "card.metric.targetAchievement": { previewKind: "metricTarget", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.ac541787571349524") },
45
+ "card.metric.yoyMom": { previewKind: "metricYoyMom", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.6e1d1787571348047") },
46
+ "card.metric.segmentedProgress": { previewKind: "metricSegmentedProgress", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.85091787571438985") },
47
+ "card.metric.abnormalMetric": { previewKind: "metricAbnormal", layoutHint: "metric", sampleTone: "danger", sampleTitle: e("FWA.74fa1787571438991") },
48
+ "card.metric.slaMetric": { previewKind: "metricSla", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.4d0f1787571150119") },
49
+ "card.table.list": { previewKind: "tableRecordList", layoutHint: "table", sampleTone: "neutral", sampleTitle: e("FWA.78711787571438997") },
50
+ "card.analysis.insight": { previewKind: "analysisInsight", layoutHint: "narrative", sampleTone: "info", sampleTitle: e("FWA.4e9a1787571439004") },
51
+ "card.analysis.reportSummary": { previewKind: "analysisReportSummary", layoutHint: "narrative", sampleTone: "info", sampleTitle: e("FWA.e1af1787571439011") },
52
+ "card.analysis.rootCause": { previewKind: "analysisRootCause", layoutHint: "narrative", sampleTone: "warning", sampleTitle: e("FWA.60bf1787571439018") },
53
+ "card.analysis.riskInterpretation": { previewKind: "analysisRisk", layoutHint: "narrative", sampleTone: "danger", sampleTitle: e("FWA.f9761787571439025") },
54
+ "card.analysis.businessSuggestion": { previewKind: "analysisSuggestion", layoutHint: "narrative", sampleTone: "success", sampleTitle: e("FWA.ea041787571439033") },
55
+ "card.analysis.weeklyReport": { previewKind: "analysisWeeklyReport", layoutHint: "narrative", sampleTone: "info", sampleTitle: e("FWA.98c61787571439040") },
56
+ "card.analysis.retrospective": { previewKind: "analysisRetrospective", layoutHint: "narrative", sampleTone: "neutral", sampleTitle: e("FWA.37dc1787571439047") },
57
+ "card.graph.knowledge": { previewKind: "graphKnowledge", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.0d051787571439054") },
58
+ "card.graph.ontology": { previewKind: "graphOntology", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.92d81787571439061") },
59
+ "card.graph.relationship": { previewKind: "graphRelationship", layoutHint: "network", sampleTone: "neutral", sampleTitle: e("FWA.59ea1787571439069") },
60
+ "card.graph.dataLineage": { previewKind: "graphDataLineage", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.0bda1787571439076") },
61
+ "card.graph.impactChain": { previewKind: "graphImpactChain", layoutHint: "network", sampleTone: "warning", sampleTitle: e("FWA.db631787571439083") },
62
+ "card.graph.metricLineage": { previewKind: "graphMetricLineage", layoutHint: "network", sampleTone: "success", sampleTitle: e("FWA.86411787571439091") },
63
+ "card.graph.permissionRelation": { previewKind: "graphPermission", layoutHint: "network", sampleTone: "warning", sampleTitle: e("FWA.4fb91787571439099") },
64
+ "card.identity.directory": { previewKind: "identityDirectory", layoutHint: "table", sampleTone: "neutral", sampleTitle: e("FWA.e7a41787571593724") },
65
+ "card.identity.orgChart": { previewKind: "identityOrgChart", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.b3421787571439107") },
66
+ "card.identity.personProfile": { previewKind: "identityPersonProfile", layoutHint: "profile", sampleTone: "info", sampleTitle: e("FWA.79821787571439115") },
67
+ "card.identity.teamDistribution": { previewKind: "identityTeamDistribution", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.da301787571439123") },
68
+ "card.identity.permissionRelation": { previewKind: "identityPermission", layoutHint: "network", sampleTone: "warning", sampleTitle: e("FWA.93171787571439131") },
69
+ "card.workflow.todoList": { previewKind: "workflowTodo", layoutHint: "workflow", sampleTone: "warning", sampleTitle: e("FWA.5b531787571439139") },
70
+ "card.workflow.approvalList": { previewKind: "workflowApprovalList", layoutHint: "table", sampleTone: "warning", sampleTitle: e("FWA.b1391787571439148") },
71
+ "card.workflow.processStatus": { previewKind: "workflowProcessStatus", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.ddc41787571439156") },
72
+ "card.workflow.approvalChain": { previewKind: "workflowApprovalChain", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.7b9d1787571439165") },
73
+ "card.workflow.sla": { previewKind: "workflowSla", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.c2f91787571150644") },
74
+ "card.workflow.taskTimeline": { previewKind: "workflowTaskTimeline", layoutHint: "timeline", sampleTone: "info", sampleTitle: e("FWA.1b5a1787571265462") },
75
+ "card.workflow.bottleneck": { previewKind: "workflowBottleneck", layoutHint: "metric", sampleTone: "danger", sampleTitle: e("FWA.f3571787571439173") },
76
+ "card.utility.quickLinks": { previewKind: "utilityQuickLinks", layoutHint: "customCanvas", sampleTone: "info", sampleTitle: e("FWA.bc911787571338178") },
77
+ "card.utility.announcement": { previewKind: "utilityAnnouncement", layoutHint: "customCanvas", sampleTone: "warning", sampleTitle: e("FWA.99531787571439182") },
78
+ "card.utility.search": { previewKind: "utilitySearch", layoutHint: "customCanvas", sampleTone: "info", sampleTitle: e("FWA.06a01787571439197") },
79
+ "card.utility.reminder": { previewKind: "utilityReminder", layoutHint: "workflow", sampleTone: "warning", sampleTitle: e("FWA.dbf31787571442170") },
80
+ "card.utility.favorites": { previewKind: "utilityFavorites", layoutHint: "customCanvas", sampleTone: "success", sampleTitle: e("FWA.fe6a1787571594188") },
81
+ "card.utility.weather": { previewKind: "utilityWeather", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.0d951787571442694") },
82
+ "card.utility.calendar": { previewKind: "utilityCalendar", layoutHint: "timeline", sampleTone: "info", sampleTitle: e("FWA.e7d11787571442853") },
83
+ "card.chart.bar": { previewKind: "chartBarComparison", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.36051787571443278") },
84
+ "card.chart.customEcharts": { previewKind: "chartCustomEcharts", layoutHint: "metric", sampleTone: "neutral", sampleTitle: e("FWA.89e91787571258125") },
85
+ "card.chart.mixedBarLine": { previewKind: "chartMixedTrend", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.6a831787571443751") },
86
+ "card.chart.line": { previewKind: "chartLineTrend", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.af3a1787571444366") },
87
+ "card.chart.waterfall": { previewKind: "chartWaterfallSteps", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.db8c1787571444766") },
88
+ "card.chart.heatmap": { previewKind: "chartHeatmapMatrix", layoutHint: "matrix", sampleTone: "warning", sampleTitle: e("FWA.10041787571445316") },
89
+ "card.chart.area": { previewKind: "chartAreaAccumulation", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.4d001787571362537") },
90
+ "card.chart.pie": { previewKind: "chartPieShare", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.d0ae1787571445816") },
91
+ "card.chart.donut": { previewKind: "chartDonutProgress", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.8ced1787571446340") },
92
+ "card.chart.radar": { previewKind: "chartRadarMetrics", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.ea8a1787571446381") },
93
+ "card.chart.scatter": { previewKind: "chartScatterDistribution", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.56bf1787571446864") },
94
+ "card.chart.bubble": { previewKind: "chartBubbleScale", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.57361787571447098") },
95
+ "card.chart.funnel": { previewKind: "chartFunnelStages", layoutHint: "workflow", sampleTone: "info", sampleTitle: e("FWA.ce6d1787571447593") },
96
+ "card.chart.gauge": { previewKind: "chartGaugeMetric", layoutHint: "metric", sampleTone: "success", sampleTitle: e("FWA.8b761787571594309") },
97
+ "card.chart.map": { previewKind: "chartMapRegion", layoutHint: "map", sampleTone: "info", sampleTitle: e("FWA.faaa1787571447912") },
98
+ "card.chart.sankey": { previewKind: "chartSankeyFlow", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.44c11787571448442") },
99
+ "card.chart.tree": { previewKind: "chartTreeHierarchy", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.5f9a1787571448962") },
100
+ "card.chart.gantt": { previewKind: "chartGanttTasks", layoutHint: "timeline", sampleTone: "info", sampleTitle: e("FWA.e3661787571449063") },
101
+ "card.chart.candlestick": { previewKind: "chartCandlestickSeries", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.d3111787571265989") },
102
+ "card.chart.boxplot": { previewKind: "chartBoxplotSeries", layoutHint: "metric", sampleTone: "neutral", sampleTitle: e("FWA.d4161787571449488") },
103
+ "card.chart.stackedBar": { previewKind: "chartStackedBar", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.0d691787571450013") },
104
+ "card.chart.pareto": { previewKind: "chartParetoSeries", layoutHint: "metric", sampleTone: "warning", sampleTitle: e("FWA.a1f81787571266511") },
105
+ "card.chart.drilldownTree": { previewKind: "chartDrilldownTree", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.d2a91787571450533") },
106
+ "card.chart.network": { previewKind: "chartNetworkRelation", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.7a511787571451059") },
107
+ "card.geo.earth3d": { previewKind: "geoEarthArc", layoutHint: "map", sampleTone: "info", sampleTitle: e("FWA.64bc1787571451078") },
108
+ "card.geo.siteDistribution": { previewKind: "geoSiteDistribution", layoutHint: "map", sampleTone: "success", sampleTitle: e("FWA.008f1787571451583") },
109
+ "card.geo.regionalHeat": { previewKind: "geoRegionalHeat", layoutHint: "map", sampleTone: "warning", sampleTitle: e("FWA.0b741787571451752") },
110
+ "card.geo.migrationFlow": { previewKind: "geoMigrationFlow", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.8e191787571452132") },
111
+ "card.geo.routeTrack": { previewKind: "geoRouteTrack", layoutHint: "network", sampleTone: "info", sampleTitle: e("FWA.6f1e1787571452668") },
112
+ "card.embedded.iframe": { previewKind: "embeddedIframe", layoutHint: "embed", sampleTone: "neutral", sampleTitle: e("FWA.d5c81787571453154") },
113
+ "card.fde.customComponent": { previewKind: "fdeCustomComponent", layoutHint: "embed", sampleTone: "neutral", sampleTitle: e("FWA.34bb1787571150853") },
114
+ "card.fde.templateWeather": { previewKind: "fdeTemplateWeather", layoutHint: "metric", sampleTone: "info", sampleTitle: e("FWA.f4d61787571453361") },
115
+ "card.custom.blankCanvas": { previewKind: "customBlankCanvas", layoutHint: "customCanvas", sampleTone: "neutral", sampleTitle: e("FWA.61041787571453757") },
116
+ "card.custom.nestedContainer": { previewKind: "customNestedContainer", layoutHint: "customCanvas", sampleTone: "info", sampleTitle: e("FWA.66dd1787571454202") },
117
+ "card.entity.customerDetail": { previewKind: "entityCustomer", layoutHint: "profile", sampleTone: "info", sampleTitle: e("FWA.59951787571454727") },
118
+ "card.entity.projectDetail": { previewKind: "entityProject", layoutHint: "profile", sampleTone: "success", sampleTitle: e("FWA.499f1787571454862") },
119
+ "card.entity.contractDetail": { previewKind: "entityContract", layoutHint: "profile", sampleTone: "warning", sampleTitle: e("FWA.31421787571455252") },
120
+ "card.entity.supplierDetail": { previewKind: "entitySupplier", layoutHint: "profile", sampleTone: "neutral", sampleTitle: e("FWA.e3ac1787571267037") },
121
+ "card.entity.assetDetail": { previewKind: "entityAsset", layoutHint: "profile", sampleTone: "info", sampleTitle: e("FWA.6f7f1787571455361") },
122
+ "card.entity.ticketDetail": { previewKind: "entityTicket", layoutHint: "workflow", sampleTone: "danger", sampleTitle: e("FWA.a81b1787571455839") }
123
+ };
124
+ function te(a) {
125
+ const t = ae[a.capabilityId];
126
+ if (t) return { capabilityId: a.capabilityId, explicit: !0, ...t };
127
+ const i = a.dataShape === "metricSummary" ? "metric" : a.dataShape === "rows" ? "table" : a.dataShape === "networkGraph" ? "network" : a.dataShape === "customCanvas" ? "customCanvas" : a.dataShape === "embeddedFrame" ? "embed" : "metric";
128
+ return {
129
+ capabilityId: a.capabilityId,
130
+ previewKind: `${a.category.replace(/^card\./u, "").replace(/[^a-z0-9]+/giu, "_")}_${a.type}`,
131
+ layoutHint: i,
132
+ sampleTone: "neutral",
133
+ sampleTitle: a.title,
134
+ explicit: !1
135
+ };
136
+ }
137
+ const p = 100, y = 5, L = {
138
+ small: { w: 33.333, h: 20 },
139
+ medium: { w: 33.333, h: 34 },
140
+ componentTall: { w: 33.333, h: 42 },
141
+ large: { w: 100, h: 32 },
142
+ screen: { w: 100, h: 50 }
143
+ }, ie = {
144
+ small: 3,
145
+ medium: 3,
146
+ componentTall: 3,
147
+ large: 1,
148
+ screen: 1
149
+ }, re = 0.75;
150
+ function F(a, t) {
151
+ const i = Number(a);
152
+ return Number.isFinite(i) ? i : t;
153
+ }
154
+ function ta(a) {
155
+ return Math.max(1, a) / p;
156
+ }
157
+ function ia(a, t) {
158
+ return a * t;
159
+ }
160
+ function ra(a, t) {
161
+ return a / Math.max(1e-4, t);
162
+ }
163
+ function na(a, t = y) {
164
+ return Math.round(a / t) * t;
165
+ }
166
+ function c(a) {
167
+ return Math.round(a * 1e3) / 1e3;
168
+ }
169
+ function O(a = "small") {
170
+ return { ...L[a] };
171
+ }
172
+ function T(a) {
173
+ const t = Math.min(p, Math.max(y, c(F(a.w, 30)))), i = Math.max(y, c(F(a.h, 20))), r = Math.min(p - t, Math.max(0, c(F(a.x, 0)))), n = Math.max(0, c(F(a.y, 0)));
174
+ return { x: r, y: n, w: t, h: i };
175
+ }
176
+ function f(a) {
177
+ const t = Math.min(p, Math.max(y, c(F(a.w, 30)))), i = Math.max(y, c(F(a.h, 20))), r = Math.min(p - t, Math.max(0, c(F(a.x, 0)))), n = Math.max(0, c(F(a.y, 0)));
178
+ return { x: r, y: n, w: t, h: i };
179
+ }
180
+ function ne(a, t) {
181
+ return !(a.x + a.w <= t.x || t.x + t.w <= a.x || a.y + a.h <= t.y || t.y + t.h <= a.y);
182
+ }
183
+ function S(a, t) {
184
+ return a.x >= 0 && a.y >= 0 && a.x + a.w <= p && t.every((i) => !ne(a, i));
185
+ }
186
+ function le(a, t) {
187
+ return c(a.w) === c(t.w) && c(a.h) === c(t.h);
188
+ }
189
+ function D(a) {
190
+ return [...new Set(a.map((t) => c(t)))].filter((t) => Number.isFinite(t)).sort((t, i) => t - i);
191
+ }
192
+ function se(a) {
193
+ return a.map(T).sort((t, i) => {
194
+ const r = t.y - i.y;
195
+ if (r !== 0) return r;
196
+ const n = t.x - i.x;
197
+ return n !== 0 ? n : t.w - i.w || t.h - i.h;
198
+ });
199
+ }
200
+ function oe(a) {
201
+ const t = /* @__PURE__ */ new Map();
202
+ return se(a).forEach((i) => {
203
+ const r = c(i.y);
204
+ t.set(r, [...t.get(r) || [], i]);
205
+ }), [...t.entries()].map(([i, r]) => ({ y: i, rects: r.sort((n, s) => n.x - s.x) })).sort((i, r) => i.y - r.y);
206
+ }
207
+ function R(a) {
208
+ return a.reduce((t, i) => Math.max(t, i.h), 0);
209
+ }
210
+ function ce(a) {
211
+ return a.reduce((t, i) => t + i.w, 0);
212
+ }
213
+ function de(a, t) {
214
+ return a >= t * re;
215
+ }
216
+ function G(a) {
217
+ for (const t of ["screen", "large", "componentTall", "medium", "small"]) {
218
+ const i = L[t].w, r = ie[t];
219
+ if (a.length >= r && a.every((n) => n.w === i))
220
+ return t;
221
+ }
222
+ return null;
223
+ }
224
+ function q(a, t) {
225
+ const i = oe(t), r = i.map((l) => ({
226
+ ...l,
227
+ width: ce(l.rects),
228
+ height: R(l.rects),
229
+ hasSameSize: l.rects.some((d) => le(d, a))
230
+ })).filter(
231
+ (l) => l.width + a.w <= p && de(l.height, a.h)
232
+ ), s = r.filter((l) => l.height === a.h || l.hasSameSize).sort((l, d) => l.hasSameSize !== d.hasSameSize ? l.hasSameSize ? -1 : 1 : l.y - d.y)[0] || r[0];
233
+ if (s) {
234
+ const l = { ...a, x: c(s.width), y: s.y };
235
+ if (S(l, t)) return l;
236
+ }
237
+ const o = i.reduce((l, d) => Math.max(l, d.y + R(d.rects)), 0);
238
+ return { ...a, x: 0, y: c(o) };
239
+ }
240
+ function U(a, t) {
241
+ const i = T(a);
242
+ if (S(i, t)) return i;
243
+ const r = q(i, t);
244
+ if (S(r, t)) return r;
245
+ const n = t.reduce((l, d) => Math.max(l, d.y + d.h), 0), s = D([
246
+ 0,
247
+ i.x,
248
+ ...t.flatMap((l) => [l.x, l.x + l.w])
249
+ ]).filter((l) => l >= 0 && l + i.w <= p), o = D([
250
+ 0,
251
+ i.y,
252
+ n,
253
+ ...t.flatMap((l) => [l.y, l.y + l.h])
254
+ ]).filter((l) => l >= 0);
255
+ for (const l of o)
256
+ for (const d of s) {
257
+ const A = { ...i, x: d, y: l };
258
+ if (S(A, t)) return A;
259
+ }
260
+ return { ...i, x: 0, y: c(n + y) };
261
+ }
262
+ function ue(a, t) {
263
+ const i = T(a), r = q(i, t);
264
+ return S(r, t) ? r : U(i, t);
265
+ }
266
+ function la(a) {
267
+ const t = /* @__PURE__ */ new Map();
268
+ return a.forEach((i) => {
269
+ const r = c(f(i.layout).y);
270
+ t.set(r, [...t.get(r) || [], i]);
271
+ }), [...t.entries()].sort((i, r) => i[0] - r[0]).flatMap(([i, r]) => {
272
+ const n = r.slice().sort((u, b) => {
273
+ const h = f(u.layout), w = f(b.layout), K = h.x - w.x;
274
+ return K !== 0 ? K : h.w - w.w || h.h - w.h;
275
+ }), s = n.reduce((u, b) => u + f(b.layout).w, 0), o = Math.max(0, p - s), l = n.reduce((u, b) => Math.min(u, f(b.layout).w), p), d = G(n.map((u) => f(u.layout))), A = !!d && o > 0 && o < l, W = A ? n.filter((u) => f(u.layout).w === L[d].w) : [], m = W.length > 0 ? o / W.length : 0;
276
+ let v = 0;
277
+ return n.map((u, b) => {
278
+ const h = f(u.layout), w = b === n.length - 1, K = W.length > 0 ? W.includes(u) : A && w, X = A && w ? Math.max(y, c(p - v)) : Math.max(y, c(K ? h.w + m : h.w)), M = {
279
+ ...h,
280
+ x: c(v),
281
+ y: i,
282
+ w: X
283
+ };
284
+ return v += M.w, {
285
+ ...u,
286
+ layout: {
287
+ ...u.layout,
288
+ ...M
289
+ }
290
+ };
291
+ });
292
+ });
293
+ }
294
+ function pe(a, t) {
295
+ const i = a.reduce((m, v) => m + v.rect.w, 0), r = Math.max(0, p - i), n = G(a.map((m) => m.rect)), s = !!n, o = s ? a.filter((m) => m.rect.w === L[n].w) : [], l = s && o.length === 0 ? a[a.length - 1] : null, d = o.length || (l ? 1 : 0), A = d > 0 ? r / d : 0;
296
+ let W = 0;
297
+ return a.map((m, v) => {
298
+ const u = v === a.length - 1, b = o.includes(m) || m === l, h = u && s ? Math.max(y, c(p - W)) : Math.max(y, c(m.rect.w + (b ? A : 0))), w = {
299
+ ...m.rect,
300
+ x: c(W),
301
+ y: t,
302
+ w: h
303
+ };
304
+ return W += w.w, {
305
+ ...m.item,
306
+ layout: {
307
+ ...m.item.layout,
308
+ ...w
309
+ }
310
+ };
311
+ });
312
+ }
313
+ function me(a) {
314
+ const t = [];
315
+ let i = 0, r = [];
316
+ const n = () => {
317
+ r.length !== 0 && (t.push(...pe(r, c(i))), i += R(r.map((s) => s.rect)), r = []);
318
+ };
319
+ return a.forEach((s) => {
320
+ const o = f(s.layout);
321
+ if (o.w >= p) {
322
+ n(), r = [{ item: s, rect: { ...o, x: 0, w: p } }], n();
323
+ return;
324
+ }
325
+ const l = r.reduce((d, A) => d + A.rect.w, 0);
326
+ r.length > 0 && l + o.w > p && n(), r.push({ item: s, rect: o });
327
+ }), n(), t;
328
+ }
329
+ function sa(a) {
330
+ const t = [...a].sort((s, o) => {
331
+ const l = f(s.layout), d = f(o.layout), A = l.y - d.y;
332
+ if (A !== 0) return A;
333
+ const W = l.x - d.x;
334
+ return W !== 0 ? W : s.id.localeCompare(o.id);
335
+ });
336
+ let i = 0, r = 0, n = 0;
337
+ return t.map((s) => {
338
+ const o = f(s.layout);
339
+ i > 0 && i + o.w > p && (i = 0, r = c(r + n), n = 0);
340
+ const l = {
341
+ ...o,
342
+ x: c(i),
343
+ y: c(r)
344
+ };
345
+ return i = c(i + l.w), n = Math.max(n, l.h), {
346
+ ...s,
347
+ layout: {
348
+ ...s.layout,
349
+ ...l,
350
+ i: s.id
351
+ }
352
+ };
353
+ });
354
+ }
355
+ function oa(a) {
356
+ const t = [...a].sort((i, r) => {
357
+ const n = f(i.layout), s = f(r.layout), o = n.y - s.y;
358
+ if (o !== 0) return o;
359
+ const l = n.x - s.x;
360
+ return l !== 0 ? l : i.id.localeCompare(r.id);
361
+ });
362
+ return me(t).map((i) => ({
363
+ ...i,
364
+ layout: {
365
+ ...i.layout,
366
+ i: i.id
367
+ }
368
+ }));
369
+ }
370
+ function ca(a, t = 20) {
371
+ return a.reduce((i, r) => Math.max(i, r.y + r.h), 0) + t;
372
+ }
373
+ function Ae(a) {
374
+ var r, n, s, o;
375
+ const t = O(a.preset), i = T({
376
+ x: F((r = a.layout) == null ? void 0 : r.x, 0),
377
+ y: F((n = a.layout) == null ? void 0 : n.y, 0),
378
+ w: F(((s = a.layout) == null ? void 0 : s.w) ?? a.width, t.w),
379
+ h: F(((o = a.layout) == null ? void 0 : o.h) ?? a.height, t.h)
380
+ });
381
+ return U(i, a.placed);
382
+ }
383
+ function Fe(a) {
384
+ var r, n, s, o;
385
+ const t = O(a.preset), i = T({
386
+ x: F((r = a.layout) == null ? void 0 : r.x, 0),
387
+ y: F((n = a.layout) == null ? void 0 : n.y, 0),
388
+ w: F(((s = a.layout) == null ? void 0 : s.w) ?? a.width, t.w),
389
+ h: F(((o = a.layout) == null ? void 0 : o.h) ?? a.height, t.h)
390
+ });
391
+ return ue(i, a.placed);
392
+ }
393
+ function We(a, t) {
394
+ return {
395
+ i: a,
396
+ ...T(t),
397
+ minW: y,
398
+ minH: y,
399
+ maxW: p,
400
+ static: !1
401
+ };
402
+ }
403
+ const P = "echarts-system-card-templates", C = /* @__PURE__ */ new Map();
404
+ async function _(a) {
405
+ const t = C.get(a);
406
+ if (t) return await t;
407
+ const i = fe(a);
408
+ return C.set(a, i), i.catch(() => {
409
+ C.get(a) === i && C.delete(a);
410
+ }), await i;
411
+ }
412
+ async function fe(a) {
413
+ const i = we(a, he()) ?? a, r = await be(i);
414
+ if (r.ok) return r.value;
415
+ throw r.error;
416
+ }
417
+ async function be(a) {
418
+ try {
419
+ const t = await fetch(a, { credentials: "same-origin" });
420
+ return t.ok ? { ok: !0, value: await t.json() } : { ok: !1, error: new Error(e("FWA.f9781787570308100", { p0: a, p1: t.status })) };
421
+ } catch (t) {
422
+ const i = t instanceof Error ? t.message : String(t);
423
+ return { ok: !1, error: new Error(e("FWA.698e1787570315934", { p0: a, p1: i })) };
424
+ }
425
+ }
426
+ function he() {
427
+ var t, i;
428
+ return ((i = (t = ee().assets) == null ? void 0 : t.echartsTemplateCdnBaseUrl) == null ? void 0 : i.trim()) || void 0;
429
+ }
430
+ function we(a, t) {
431
+ if (!t) return;
432
+ const i = t.replace(/\/+$/u, ""), r = a.replace(/^\/+/u, "");
433
+ return i.endsWith(`/${P}`) ? `${i}/${r.slice(`${P}/`.length)}` : `${i}/${r}`;
434
+ }
435
+ const ye = ["extraction", "officialComparison", "officialSourceReplay"], ve = ["params", "reloadPolicy", "extraction"];
436
+ function da(a) {
437
+ let t = !1;
438
+ const i = a.blocks.map((r) => {
439
+ const n = ge(r);
440
+ return n !== r && (t = !0), n;
441
+ });
442
+ return t ? { ...a, blocks: i } : a;
443
+ }
444
+ function ge(a) {
445
+ if (!g(a.data)) return a;
446
+ const t = k(a.data);
447
+ return t === a.data ? a : { ...a, data: t };
448
+ }
449
+ function k(a) {
450
+ let t = !1;
451
+ const i = Te(a) ? { ...a } : a;
452
+ if (g(i.protocolConfig)) {
453
+ const r = B(i.protocolConfig, ye);
454
+ r !== i.protocolConfig && (i.protocolConfig = r, t = !0);
455
+ }
456
+ if (g(i.protocolData)) {
457
+ const r = B(i.protocolData, ve);
458
+ r !== i.protocolData && (i.protocolData = r, t = !0);
459
+ }
460
+ if (Array.isArray(i.nestedBlocks)) {
461
+ const r = i.nestedBlocks.map((n) => g(n) ? Se(n) : n);
462
+ if (r.some((n, s) => n !== i.nestedBlocks[s])) {
463
+ if (i === a) return { ...a, nestedBlocks: r };
464
+ i.nestedBlocks = r, t = !0;
465
+ }
466
+ }
467
+ return t ? i : a;
468
+ }
469
+ function Te(a) {
470
+ return a.shape === "protocolRender" && a.rendererType === "echarts" && g(a.protocolConfig);
471
+ }
472
+ function Se(a) {
473
+ let t = !1, i = k(a);
474
+ if (i !== a && (t = !0), g(i.data)) {
475
+ const r = k(i.data);
476
+ r !== i.data && (i = i === a ? { ...a, data: r } : { ...i, data: r }, t = !0);
477
+ }
478
+ return t ? i : a;
479
+ }
480
+ function g(a) {
481
+ return !!(a && typeof a == "object" && !Array.isArray(a));
482
+ }
483
+ function B(a, t) {
484
+ let i = !1;
485
+ const r = { ...a };
486
+ return t.forEach((n) => {
487
+ n in r && (delete r[n], i = !0);
488
+ }), i ? r : a;
489
+ }
490
+ async function Ke(a) {
491
+ try {
492
+ const t = await _(a.echarts.configPath), i = a.echarts.dataPath ? await _(a.echarts.dataPath) : void 0, r = k({
493
+ shape: "protocolRender",
494
+ rendererType: "echarts",
495
+ protocolConfig: t,
496
+ ...i ? { protocolData: i } : {}
497
+ }), n = r.protocolConfig, s = r.protocolData;
498
+ return {
499
+ ok: !0,
500
+ data: {
501
+ shape: "protocolRender",
502
+ rendererType: "echarts",
503
+ sourceLabel: e("FWA.f1b21787570871236"),
504
+ protocolConfig: n,
505
+ ...s ? { protocolData: s } : {},
506
+ template: {
507
+ exampleId: a.echarts.exampleId,
508
+ mainCategory: a.echarts.mainCategory,
509
+ tags: a.echarts.tags,
510
+ requires: a.echarts.requires
511
+ }
512
+ },
513
+ renderer: {
514
+ engine: "echarts",
515
+ rendererKey: "echartsProtocol"
516
+ },
517
+ meta: {
518
+ capabilityId: a.capabilityId,
519
+ rendererKey: a.rendererKey,
520
+ dataShape: a.dataShape,
521
+ echartsTemplate: a.echarts
522
+ }
523
+ };
524
+ } catch (t) {
525
+ return {
526
+ ok: !1,
527
+ reason: t instanceof Error ? t.message : e("FWA.68a51787570683474")
528
+ };
529
+ }
530
+ }
531
+ function Ce(a) {
532
+ return !!(a && typeof a == "object" && typeof a.capabilityId == "string" && a.capabilityId.startsWith("card.echarts.") && typeof a.echarts == "object");
533
+ }
534
+ function ke(a = "canvas-card") {
535
+ return typeof crypto < "u" && "randomUUID" in crypto ? `${a}-${crypto.randomUUID()}` : `${a}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
536
+ }
537
+ function Le() {
538
+ return {
539
+ mode: "final",
540
+ status: "ready",
541
+ refreshable: !0,
542
+ cacheable: !0,
543
+ drilldown: !1,
544
+ editable: !0,
545
+ submitable: !1
546
+ };
547
+ }
548
+ function Re(a) {
549
+ if (a.category !== "card.composite_cards") return null;
550
+ const t = Q(a.type);
551
+ if (!t) return null;
552
+ if (t.id === "threePanelAnalysis") return xe(t.scene);
553
+ const i = t.dataContract.nestedBlockKinds.slice(0, 4).map((r, n) => ({
554
+ id: `${t.id}-sample-${n + 1}`,
555
+ title: $(t.id, r, n),
556
+ kind: He(r),
557
+ visualKind: r,
558
+ slot: n < 2 ? "body" : "footer",
559
+ dataBindingStatus: n === 0 ? "business_input" : "none",
560
+ ...n === 0 ? {
561
+ dataBindingId: `binding-${t.id}-sample-${n + 1}`,
562
+ dataBinding: {
563
+ id: `binding-${t.id}-sample-${n + 1}`,
564
+ status: "business_input",
565
+ queryIntent: e("FWA.a37b1787570935730", { p0: $(t.id, r, n) }),
566
+ refreshApi: `/workbench/v2/documents/{workspaceId}/data-bindings/binding-${t.id}-sample-${n + 1}/query`
567
+ },
568
+ humanIntervention: {
569
+ required: !0,
570
+ reason: "sample_business_input",
571
+ hint: e("FWA.ec2a1787570563978")
572
+ }
573
+ } : {},
574
+ data: Ie(r)
575
+ }));
576
+ return {
577
+ shape: "customCanvas",
578
+ sourceLabel: "Workbench Card Library",
579
+ narrative: t.scene,
580
+ elements: [],
581
+ nestedLayoutMode: "stack",
582
+ nestedLayoutStacks: [
583
+ { id: `${t.id}-left`, childIds: i.filter((r, n) => n % 2 === 0).map((r) => r.id) },
584
+ { id: `${t.id}-right`, childIds: i.filter((r, n) => n % 2 === 1).map((r) => r.id) }
585
+ ],
586
+ nestedBlocks: i
587
+ };
588
+ }
589
+ function xe(a) {
590
+ const t = [
591
+ {
592
+ id: "three-panel-bar",
593
+ title: e("FWA.099c1787571242282"),
594
+ capabilityId: "card.chart.bar",
595
+ dataShape: "multiSeries",
596
+ visualKind: "bar",
597
+ renderer: { engine: "custom", rendererKey: "bar" },
598
+ layout: { i: "three-panel-bar", x: 0, y: 0, w: 6, h: 10, parentId: "three-panel-analysis" },
599
+ data: {
600
+ shape: "multiSeries",
601
+ categories: ["A", "B", "C"],
602
+ series: [{ name: e("FWA.90201787571548054"), type: "bar", data: [0, 0, 0] }]
603
+ }
604
+ },
605
+ {
606
+ id: "three-panel-line",
607
+ title: e("FWA.fb9f1787571242321"),
608
+ capabilityId: "card.chart.line",
609
+ dataShape: "singleSeries",
610
+ visualKind: "line",
611
+ renderer: { engine: "custom", rendererKey: "line" },
612
+ layout: { i: "three-panel-line", x: 6, y: 0, w: 6, h: 5, parentId: "three-panel-analysis" },
613
+ data: {
614
+ shape: "singleSeries",
615
+ categories: [e("FWA.66c31787571616448"), e("FWA.74eb1787571617098"), e("FWA.c6a01787571617766")],
616
+ series: [{ name: e("FWA.90201787571548054"), type: "line", data: [0, 0, 0] }]
617
+ }
618
+ },
619
+ {
620
+ id: "three-panel-metric",
621
+ title: e("FWA.13c31787571242363"),
622
+ capabilityId: "card.metric.numeric",
623
+ dataShape: "metricSummary",
624
+ visualKind: "metric",
625
+ renderer: { engine: "custom", rendererKey: "metricStrip" },
626
+ layout: { i: "three-panel-metric", x: 6, y: 5, w: 6, h: 5, parentId: "three-panel-analysis" },
627
+ data: {
628
+ shape: "metricSummary",
629
+ primaryLabel: e("FWA.06741787571242405"),
630
+ primaryValue: e("FWA.0d711787571337185")
631
+ }
632
+ }
633
+ ];
634
+ return {
635
+ shape: "customCanvas",
636
+ sourceLabel: "Workbench Card Library",
637
+ narrative: a,
638
+ elements: [],
639
+ nestedLayoutMode: "grid",
640
+ nestedBlocks: t.map((i, r) => {
641
+ const n = `binding-three-panel-${r + 1}`;
642
+ return {
643
+ id: i.id,
644
+ title: i.title,
645
+ kind: i.visualKind === "metric" ? "metric" : "chart",
646
+ capabilityId: i.capabilityId,
647
+ dataShape: i.dataShape,
648
+ visualKind: i.visualKind,
649
+ slot: "main",
650
+ renderer: i.renderer,
651
+ dataBindingId: n,
652
+ dataBindingStatus: "business_input",
653
+ dataBinding: {
654
+ id: n,
655
+ bindingId: n,
656
+ status: "business_input",
657
+ queryIntent: e("FWA.68d21787570935772", { p0: i.title }),
658
+ refreshApi: `/workbench/v2/documents/{workspaceId}/data-bindings/${n}/query`
659
+ },
660
+ humanIntervention: {
661
+ required: !0,
662
+ reason: "sample_business_input",
663
+ hint: e("FWA.ec2a1787570563978")
664
+ },
665
+ queryIntent: e("FWA.68d21787570935772", { p0: i.title }),
666
+ layout: i.layout,
667
+ data: {
668
+ ...i.data,
669
+ dataBindingStatus: "business_input",
670
+ dataBindingId: n,
671
+ humanIntervention: {
672
+ required: !0,
673
+ reason: "sample_business_input"
674
+ },
675
+ capabilityId: i.capabilityId,
676
+ dataShape: i.dataShape,
677
+ visualKind: i.visualKind,
678
+ rendererKey: i.renderer.rendererKey,
679
+ queryIntent: e("FWA.68d21787570935772", { p0: i.title })
680
+ }
681
+ };
682
+ })
683
+ };
684
+ }
685
+ function $(a, t, i) {
686
+ var n;
687
+ return ((n = {
688
+ asset: [e("FWA.67c21787571337690"), e("FWA.84641787571337744"), e("FWA.19cd1787571337802"), e("FWA.fafd1787571337934")],
689
+ project: [e("FWA.f72e1787570936352"), e("FWA.81231787571338073"), e("FWA.3fbd1787571338124"), e("FWA.30161787571066468")],
690
+ ops: [e("FWA.ca561787571129505"), e("FWA.31821787571129546"), e("FWA.048d1787571066506"), e("FWA.727f1787571242449")],
691
+ security: [e("FWA.3f911787571129586"), e("FWA.59af1787571129626"), e("FWA.8d851787571338183"), e("FWA.217f1787571338234")],
692
+ businessMetricMatrix: [e("FWA.25e01787571129662"), e("FWA.a0961787571242490"), e("FWA.e42d1787571338288"), e("FWA.ac7c1787571338344")]
693
+ }[a]) == null ? void 0 : n[i]) || t;
694
+ }
695
+ function He(a) {
696
+ return /metric|score/i.test(a) ? "metric" : /chart|donut|bars/i.test(a) ? "chart" : "list";
697
+ }
698
+ function Ie(a) {
699
+ return /metric|score/i.test(a) ? { shape: "metricSummary", primaryValue: e("FWA.0d711787571337185"), primaryLabel: e("FWA.e2111787571338404") } : /donut/i.test(a) ? { shape: "pieSlices", slices: [{ label: e("FWA.43dd1787571618441"), value: 62 }, { label: e("FWA.052e1787571618580"), value: 38 }] } : /chart|bars/i.test(a) ? { shape: "singleSeries", categories: [e("FWA.55e41787571618717"), e("FWA.5b001787571618852"), e("FWA.64471787571618994")], series: [{ name: e("FWA.71261787571619150"), type: "line", data: [82, 88, 91] }] } : {
700
+ shape: "categoryRanking",
701
+ items: [
702
+ { label: e("FWA.63e91787571129699"), value: e("FWA.d7361787571550548") },
703
+ { label: e("FWA.2b6e1787571129738"), value: e("FWA.667b1787571551140") }
704
+ ]
705
+ };
706
+ }
707
+ function Me(a, t) {
708
+ const i = {
709
+ multiPanel: [e("FWA.53761787571129780"), e("FWA.0ff71787571338461"), e("FWA.39661787571338520"), e("FWA.64681787571242533")],
710
+ executiveCockpit: [e("FWA.76001787571129820"), e("FWA.d8731787571338577"), e("FWA.6dc41787571338637"), e("FWA.1d191787571338696")],
711
+ projectCockpit: [e("FWA.a8c91787571342641"), e("FWA.1e2d1787571242577"), e("FWA.5daa1787571343093"), e("FWA.544c1787571242621")],
712
+ riskCockpit: [e("FWA.ef071787571343582"), e("FWA.992c1787571344105"), e("FWA.4e611787571129859"), e("FWA.94ef1787571242665")],
713
+ regionalCockpit: [e("FWA.e27c1787571344628"), e("FWA.780d1787571344799"), e("FWA.dc301787571345209"), e("FWA.c10c1787571242715")]
714
+ }, [r, n, s, o] = i[a.type] || i.multiPanel;
715
+ return {
716
+ shape: "dashboardGrid",
717
+ sourceLabel: "Canvas Runtime",
718
+ narrative: t,
719
+ panels: [
720
+ {
721
+ id: `${a.type}-trend`,
722
+ title: r,
723
+ subtitle: e("FWA.22a51787571345679"),
724
+ rendererKey: "line",
725
+ data: {
726
+ shape: "singleSeries",
727
+ categories: [e("FWA.66c31787571616448"), e("FWA.74eb1787571617098"), e("FWA.c6a01787571617766"), e("FWA.30f61787571619441"), e("FWA.74011787571620023"), e("FWA.9ebb1787571620486")],
728
+ metricFormat: "number",
729
+ unit: e("FWA.9a911787571551230"),
730
+ series: [{ name: e("FWA.1e141787571620934"), type: "line", data: [82, 96, 91, 118, 126, 138] }]
731
+ }
732
+ },
733
+ {
734
+ id: `${a.type}-bars`,
735
+ title: n,
736
+ subtitle: e("FWA.b7dc1787571346203"),
737
+ rendererKey: "bar",
738
+ data: {
739
+ shape: "multiSeries",
740
+ categories: [e("FWA.3e1c1787571621538"), e("FWA.daf81787571622084"), e("FWA.1efd1787571622627"), e("FWA.b0ef1787571622889")],
741
+ metricFormat: "number",
742
+ unit: e("FWA.0b411787571551414"),
743
+ series: [
744
+ { name: e("FWA.1e141787571620934"), type: "bar", data: [128, 96, 112, 78] },
745
+ { name: e("FWA.bc1a1787571623143"), type: "bar", data: [110, 88, 104, 72] }
746
+ ]
747
+ }
748
+ },
749
+ {
750
+ id: `${a.type}-structure`,
751
+ title: s,
752
+ subtitle: e("FWA.8dff1787571346726"),
753
+ rendererKey: "donut",
754
+ data: {
755
+ shape: "pieSlices",
756
+ innerRadius: 0.52,
757
+ slices: [
758
+ { label: e("FWA.298c1787571551602"), value: 45, share: 0.45 },
759
+ { label: e("FWA.22c91787571551702"), value: 32, share: 0.32 },
760
+ { label: e("FWA.c1db1787571551800"), value: 23, share: 0.23 }
761
+ ]
762
+ }
763
+ },
764
+ {
765
+ id: `${a.type}-combo`,
766
+ title: o,
767
+ subtitle: e("FWA.582b1787571242776"),
768
+ rendererKey: "mixedBarLine",
769
+ data: {
770
+ shape: "multiSeries",
771
+ categories: [e("FWA.66c31787571616448"), e("FWA.74eb1787571617098"), e("FWA.c6a01787571617766"), e("FWA.30f61787571619441")],
772
+ metricFormat: "percent",
773
+ unit: e("FWA.6f711787571551905"),
774
+ series: [
775
+ { name: e("FWA.6f711787571551905"), type: "bar", data: [66, 72, 79, 84] },
776
+ { name: e("FWA.3c381787571552515"), type: "line", data: [61, 69, 77, 88] }
777
+ ]
778
+ }
779
+ }
780
+ ]
781
+ };
782
+ }
783
+ function De() {
784
+ return {
785
+ shape: "customCanvas",
786
+ sourceLabel: "Canvas Runtime",
787
+ narrative: e("FWA.91db1787570579328"),
788
+ elements: [],
789
+ nestedLayoutMode: "grid",
790
+ nestedBlocks: [],
791
+ containerRole: "nested-card-container"
792
+ };
793
+ }
794
+ function Pe(a, t) {
795
+ const r = {
796
+ metricNumeric: { value: 128, delta: 0.062, compare: e("FWA.5d301787571552615"), secondary: [{ label: e("FWA.623d1787571552810"), format: "number", value: 128 }, { label: e("FWA.f08b1787571552912"), format: "number", value: 24 }] },
797
+ metricCombo: { value: 386, delta: 0.094, compare: e("FWA.9a9f1787571347249"), secondary: [{ label: e("FWA.96181787571623667"), format: "currency", value: 218 }, { label: e("FWA.1cfc1787571624253"), format: "number", value: 168 }] },
798
+ metricComparison: { value: 112, delta: 0.047, compare: e("FWA.672b1787571245678"), secondary: [{ label: e("FWA.c7b81787571553292"), format: "number", value: 112 }, { label: e("FWA.3b8b1787571553816"), format: "number", value: 97 }] },
799
+ metricAlert: { value: 7, delta: -0.18, compare: e("FWA.7f3a1787571347775"), secondary: [{ label: e("FWA.85111787571554045"), format: "number", value: 3 }, { label: e("FWA.b1571787571554533"), format: "percent", value: 0.62 }] },
800
+ metricYoyMom: { value: 128, delta: 0.062, compare: e("FWA.9e0f1787571347983"), secondary: [{ label: e("FWA.1ae21787571624403"), format: "percent", value: 0.12 }, { label: e("FWA.78ef1787571624553"), format: "percent", value: -0.03 }] },
801
+ metricAbnormal: { value: 12, delta: 0.24, compare: e("FWA.03d11787571348446"), secondary: [{ label: e("FWA.13171787571554980"), format: "number", value: 12 }, { label: e("FWA.178b1787571555422"), format: "percent", value: 0.18 }] },
802
+ metricSegmentedProgress: { value: 76, delta: 0.08, compare: e("FWA.ce071787571349039"), secondary: [{ label: e("FWA.8ce91787571555916"), format: "number", value: 76 }, { label: e("FWA.6f711787571551905"), format: "percent", value: 0.76 }] },
803
+ metricTarget: { value: 0.92, delta: 0.12, compare: e("FWA.24831787571349455"), secondary: [{ label: e("FWA.c5691787571624691"), format: "number", value: 100 }, { label: e("FWA.8d481787571556318"), format: "percent", value: 0.92 }] },
804
+ metricSla: { value: 0.96, delta: -0.03, compare: e("FWA.e7f61787571129898"), secondary: [{ label: e("FWA.d8ca1787571556569"), format: "percent", value: 0.98 }, { label: e("FWA.62561787571556999"), format: "percent", value: 0.96 }] },
805
+ workflowSla: { value: 0.94, delta: -0.04, compare: e("FWA.22871787571350102"), secondary: [{ label: e("FWA.65f41787571559014"), format: "number", value: 2 }, { label: e("FWA.c2591787571559135"), format: "percent", value: 0.94 }] },
806
+ workflowProcessStatus: { value: 18, delta: 0.11, compare: e("FWA.e3c91787571559244"), secondary: [{ label: e("FWA.78d21787571559370"), format: "number", value: 18 }, { label: e("FWA.6f711787571551905"), format: "percent", value: 0.71 }] }
807
+ }[t.previewKind] || {
808
+ value: 128,
809
+ delta: 0.062,
810
+ compare: e("FWA.5d301787571552615"),
811
+ secondary: [{ label: e("FWA.c5691787571624691"), format: "number", value: 150 }, { label: e("FWA.6f711787571551905"), format: "percent", value: 0.85 }]
812
+ };
813
+ return {
814
+ shape: "metricSummary",
815
+ primaryLabel: t.sampleTitle || a.title,
816
+ primaryFormat: t.previewKind === "metricTarget" || t.previewKind === "metricSla" ? "percent" : "number",
817
+ primaryValue: r.value,
818
+ deltaPct: r.delta,
819
+ compareLabel: r.compare,
820
+ periodLabel: e("FWA.39fa1787571350919"),
821
+ sourceLabel: "Canvas Runtime",
822
+ secondary: r.secondary
823
+ };
824
+ }
825
+ function _e(a, t) {
826
+ const i = {
827
+ analysisInsight: [e("FWA.c0a11787570980837"), e("FWA.4dc31787570821893"), e("FWA.93581787570895296")],
828
+ analysisRootCause: [e("FWA.f1a71787570648345"), e("FWA.268c1787570822649"), e("FWA.fe0b1787570896346")],
829
+ analysisRisk: [e("FWA.882a1787570937242"), e("FWA.c1801787570864381"), e("FWA.398a1787570823576")],
830
+ analysisSuggestion: [e("FWA.684e1787570937888"), e("FWA.c81c1787570938815"), e("FWA.65ca1787570980872")],
831
+ analysisWeeklyReport: [e("FWA.48e51787570980905"), e("FWA.3ad51787570939862"), e("FWA.63401787570940525")],
832
+ analysisRetrospective: [e("FWA.81591787570784181"), e("FWA.444b1787570864409"), e("FWA.c0ce1787570864434")]
833
+ };
834
+ if (a.dataShape === "reportSummary") {
835
+ const r = i[t.previewKind] || [e("FWA.90271787571020402"), e("FWA.7c4d1787571020472")];
836
+ return {
837
+ shape: "reportSummary",
838
+ summary: e("FWA.b44b1787570824515", { p0: t.sampleTitle || a.title }),
839
+ highlights: r,
840
+ sourceLabel: "Canvas Runtime",
841
+ dataStatus: "sample"
842
+ };
843
+ }
844
+ return {
845
+ shape: "insightNarrative",
846
+ bullets: i[t.previewKind] || [e("FWA.e79a1787571020543"), e("FWA.90271787571020402"), e("FWA.7c4d1787571020472")],
847
+ confidence: t.sampleTone === "danger" ? 0.74 : 0.86,
848
+ owner: t.sampleTitle,
849
+ sourceLabel: "Canvas Runtime"
850
+ };
851
+ }
852
+ function j() {
853
+ return {
854
+ shape: "rows",
855
+ sourceLabel: "Canvas Runtime",
856
+ visualKind: "genericRows",
857
+ columns: [e("FWA.daa71787571625009"), e("FWA.ee021787571625156"), e("FWA.af1b1787571627074")],
858
+ rows: [
859
+ { id: "row-1", cells: [e("FWA.f9291787571351445"), e("FWA.89051787571627386"), "128"] },
860
+ { id: "row-2", cells: [e("FWA.0fcf1787571351509"), e("FWA.035c1787571628053"), "76"] }
861
+ ]
862
+ };
863
+ }
864
+ function Be(a, t) {
865
+ return {
866
+ tableRecordList: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableRecordList", columns: [e("FWA.e57a1787571628465"), e("FWA.e3461787571559959"), e("FWA.ee021787571625156"), e("FWA.af1b1787571627074")], rows: [
867
+ { id: "row-1", cells: [e("FWA.9aea1787571352081"), e("FWA.944d1787571628728"), e("FWA.78d21787571559370"), "12"] },
868
+ { id: "row-2", cells: [e("FWA.6e801787571352516"), e("FWA.ec991787571629051"), e("FWA.e9f11787571560367"), "8"] }
869
+ ] },
870
+ tableCompactList: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableCompactList", columns: [e("FWA.e6d71787571629342"), e("FWA.ee021787571625156"), e("FWA.32911787571629659")], rows: [
871
+ { id: "row-1", cells: [e("FWA.39111787571246075"), e("FWA.89051787571627386"), e("FWA.7e301787571560602")] },
872
+ { id: "row-2", cells: [e("FWA.54bf1787571246588"), e("FWA.035c1787571628053"), e("FWA.d7361787571550548")] }
873
+ ] },
874
+ tableSummary: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableSummary", columns: [e("FWA.b79d1787571630027"), e("FWA.1e141787571620934"), e("FWA.bc1a1787571623143"), e("FWA.f7cc1787571630178")], rows: [
875
+ { id: "row-1", cells: [e("FWA.b6981787571630333"), "128", "116", "+12"] },
876
+ { id: "row-2", cells: [e("FWA.e82a1787571631102"), "92", "88", "+4"] }
877
+ ] },
878
+ tableComparison: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableComparison", columns: [e("FWA.f0991787571631862"), e("FWA.cbf21787571632197"), e("FWA.94ee1787571632697"), e("FWA.5eb81787571633248")], rows: [
879
+ { id: "row-1", cells: [e("FWA.c7b81787571553292"), e("FWA.e68d1787571710809"), e("FWA.41791787571634227"), e("FWA.74551787571711746")] },
880
+ { id: "row-2", cells: [e("FWA.3b8b1787571553816"), e("FWA.7b701787571712586"), e("FWA.9e2f1787571634394"), e("FWA.7b701787571712586")] }
881
+ ] },
882
+ tableParameter: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableParameter", columns: [e("FWA.95fc1787571634680"), e("FWA.62561787571556999"), e("FWA.b97c1787571634848")], rows: [
883
+ { id: "row-1", cells: [e("FWA.73f31787571353021"), e("FWA.e69e1787571247111"), e("FWA.a5b41787571353543")] },
884
+ { id: "row-2", cells: [e("FWA.7b1a1787571354071"), "80%", e("FWA.37431787571354591")] }
885
+ ] },
886
+ tableIndex: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableIndex", columns: [e("FWA.fceb1787571635191"), e("FWA.a3581787571636174"), e("FWA.e3461787571559959")], rows: [
887
+ { id: "row-1", cells: [e("FWA.96181787571623667"), e("FWA.f9e91787571247637"), e("FWA.e1881787571636369")] },
888
+ { id: "row-2", cells: [e("FWA.6bf61787571560721"), e("FWA.93d01787571129937"), e("FWA.e82a1787571631102")] }
889
+ ] },
890
+ tablePartition: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tablePartition", columns: [e("FWA.b5f41787571637062"), e("FWA.8fa31787571561160"), e("FWA.dece1787571355116")], rows: [
891
+ { id: "row-1", cells: [e("FWA.3e1c1787571621538"), "12,680", "09:20"] },
892
+ { id: "row-2", cells: [e("FWA.daf81787571622084"), "8,914", "09:18"] }
893
+ ] },
894
+ tableMapping: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableMapping", columns: [e("FWA.c7041787571355640"), e("FWA.0def1787571356163"), e("FWA.ee021787571625156")], rows: [
895
+ { id: "row-1", cells: ["customer_id", e("FWA.b56c1787571247862"), e("FWA.a8021787571561683")] },
896
+ { id: "row-2", cells: ["owner_id", e("FWA.e3461787571559959"), e("FWA.d7361787571550548")] }
897
+ ] },
898
+ tableLevel: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableLevel", columns: [e("FWA.09621787571637245"), e("FWA.5a0b1787571637431"), e("FWA.2b051787571637627")], rows: [
899
+ { id: "row-1", cells: [e("FWA.e68d1787571710809"), "> 90%", e("FWA.db671787571356340")] },
900
+ { id: "row-2", cells: [e("FWA.7b701787571712586"), "70%-90%", e("FWA.724c1787571356853")] }
901
+ ] },
902
+ tableTimeline: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableTimeline", columns: [e("FWA.2d101787571638019"), e("FWA.f2d91787571638223"), e("FWA.ee021787571625156")], rows: [
903
+ { id: "row-1", cells: ["09:00", e("FWA.ed371787571357272"), e("FWA.b2421787571638815")] },
904
+ { id: "row-2", cells: ["10:30", e("FWA.98061787571357736"), e("FWA.78d21787571559370")] }
905
+ ] },
906
+ tableMatrix: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableMatrix", columns: [e("FWA.ea721787571639210"), e("FWA.b6981787571630333"), e("FWA.e82a1787571631102"), e("FWA.e1881787571636369")], rows: [
907
+ { id: "row-1", cells: [e("FWA.5eb81787571633248"), e("FWA.74551787571711746"), e("FWA.7b701787571712586"), e("FWA.74551787571711746")] },
908
+ { id: "row-2", cells: [e("FWA.72be1787571561853"), e("FWA.e68d1787571710809"), e("FWA.7b701787571712586"), e("FWA.e68d1787571710809")] }
909
+ ] },
910
+ tableNested: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableNested", columns: [e("FWA.31e61787571639440"), e("FWA.f0991787571631862"), e("FWA.ee021787571625156")], rows: [
911
+ { id: "row-1", cells: [e("FWA.4f0e1787571639742"), e("FWA.3e321787571562206"), e("FWA.90ac1787571562730")] },
912
+ { id: "row-2", cells: [e("FWA.08611787571639930"), e("FWA.5d7c1787571358260"), e("FWA.d7361787571550548")] }
913
+ ] },
914
+ tableSteps: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableSteps", columns: [e("FWA.2eb11787571640119"), e("FWA.2b051787571637627"), e("FWA.ee021787571625156")], rows: [
915
+ { id: "row-1", cells: ["1", e("FWA.fb491787571640308"), e("FWA.b2421787571638815")] },
916
+ { id: "row-2", cells: ["2", e("FWA.8b2e1787571640505"), e("FWA.78d21787571559370")] }
917
+ ] },
918
+ tableDescription: { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "tableDescription", columns: [e("FWA.e6d71787571629342"), e("FWA.19b81787571640712"), e("FWA.32911787571629659")], rows: [
919
+ { id: "row-1", cells: [e("FWA.6f711787571551905"), e("FWA.7f401787571020576"), e("FWA.ae401787571563256")] },
920
+ { id: "row-2", cells: [e("FWA.9de01787571358785"), e("FWA.c5ea1787571129976"), e("FWA.9c511787571640913")] }
921
+ ] }
922
+ }[t.previewKind] || {
923
+ ...j(),
924
+ visualKind: t.previewKind,
925
+ columns: [e("FWA.c9fe1787571643688"), e("FWA.ee021787571625156"), e("FWA.b97c1787571634848")],
926
+ rows: [
927
+ { id: "row-1", cells: [t.sampleTitle || a.title, e("FWA.89051787571627386"), e("FWA.39fa1787571350919")] },
928
+ { id: "row-2", cells: [e("FWA.d8e41787571644021"), e("FWA.d7361787571550548"), e("FWA.a4081787571069372")] }
929
+ ]
930
+ };
931
+ }
932
+ function $e(a, t) {
933
+ return a.category === "card.table_cards" ? Be(a, t) : a.capabilityId === "card.identity.directory" ? { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "identityDirectory", columns: [e("FWA.55241787571644519"), e("FWA.d7021787571644744"), e("FWA.ee021787571625156")], rows: [
934
+ { id: "row-1", cells: [e("FWA.944d1787571628728"), e("FWA.592f1787571248352"), e("FWA.7db31787571645198")] },
935
+ { id: "row-2", cells: [e("FWA.ec991787571629051"), e("FWA.432f1787571248802"), e("FWA.81781787571645570")] }
936
+ ] } : a.capabilityId === "card.workflow.approvalList" ? { shape: "rows", sourceLabel: "Canvas Runtime", visualKind: "workflowApprovalList", columns: [e("FWA.41391787571646095"), e("FWA.f2d91787571638223"), e("FWA.ee021787571625156")], rows: [
937
+ { id: "row-1", cells: [e("FWA.deda1787571358997"), e("FWA.08571787571359477"), e("FWA.e9f11787571560367")] },
938
+ { id: "row-2", cells: [e("FWA.2ed71787571359949"), e("FWA.efe51787571360380"), e("FWA.78d21787571559370")] }
939
+ ] } : j();
940
+ }
941
+ function ze(a, t) {
942
+ if (t.previewKind === "chartBubbleScale")
943
+ return {
944
+ shape: "scatterPoints",
945
+ xLabel: e("FWA.dc551787571646259"),
946
+ yLabel: e("FWA.d7911787571646774"),
947
+ sizeLabel: e("FWA.dd2c1787571647345"),
948
+ points: [
949
+ { label: "A", x: 18, y: 42, size: 18 },
950
+ { label: "B", x: 38, y: 70, size: 44 },
951
+ { label: "C", x: 66, y: 76, size: 30 }
952
+ ],
953
+ narrative: e("FWA.78111787570896869", { p0: t.sampleTitle })
954
+ };
955
+ if (a.dataShape === "scatterPoints")
956
+ return {
957
+ shape: "scatterPoints",
958
+ xLabel: e("FWA.dc551787571646259"),
959
+ yLabel: e("FWA.d7911787571646774"),
960
+ sizeLabel: e("FWA.dd2c1787571647345"),
961
+ points: [
962
+ { label: e("FWA.b6b41787571360883"), x: 18, y: 42, size: 24 },
963
+ { label: e("FWA.bb221787571361407"), x: 36, y: 68, size: 36 },
964
+ { label: e("FWA.92751787571361516"), x: 56, y: 72, size: 18 },
965
+ { label: e("FWA.da9d1787571361931"), x: 74, y: 84, size: 28 }
966
+ ],
967
+ narrative: e("FWA.78111787570896869", { p0: t.sampleTitle })
968
+ };
969
+ if (t.previewKind === "chartAreaAccumulation")
970
+ return {
971
+ shape: a.dataShape,
972
+ categories: [e("FWA.66c31787571616448"), e("FWA.74eb1787571617098"), e("FWA.c6a01787571617766"), e("FWA.30f61787571619441"), e("FWA.74011787571620023"), e("FWA.9ebb1787571620486")],
973
+ metricFormat: "number",
974
+ unit: e("FWA.95581787571563412"),
975
+ narrative: e("FWA.78111787570896869", { p0: t.sampleTitle }),
976
+ series: [{ name: e("FWA.4a8f1787571362456"), type: "line", data: [32, 68, 105, 149, 188, 236] }]
977
+ };
978
+ const i = a.rendererKey === "line" || a.rendererKey === "area" ? "line" : "bar";
979
+ return {
980
+ shape: a.dataShape,
981
+ categories: [e("FWA.66c31787571616448"), e("FWA.74eb1787571617098"), e("FWA.c6a01787571617766"), e("FWA.30f61787571619441"), e("FWA.74011787571620023"), e("FWA.9ebb1787571620486")],
982
+ metricFormat: "number",
983
+ unit: t.previewKind === "chartLineTrend" ? e("FWA.9a911787571551230") : e("FWA.0b411787571551414"),
984
+ narrative: e("FWA.78111787570896869", { p0: t.sampleTitle }),
985
+ series: [
986
+ { name: t.previewKind === "chartLineTrend" ? e("FWA.71261787571619150") : t.sampleTitle, type: i, data: [88, 112, 96, 128, 142, 156] },
987
+ ...a.dataShape === "multiSeries" ? [{ name: e("FWA.bc1a1787571623143"), type: "bar", data: [76, 90, 105, 118, 124, 136] }] : []
988
+ ]
989
+ };
990
+ }
991
+ function Ne(a) {
992
+ return a.previewKind === "chartDonutProgress" ? {
993
+ shape: "pieSlices",
994
+ innerRadius: 0.58,
995
+ slices: [
996
+ { label: e("FWA.8ce91787571555916"), value: 68, share: 0.68 },
997
+ { label: e("FWA.5f491787571563813"), value: 32, share: 0.32 }
998
+ ],
999
+ narrative: e("FWA.78111787570896869", { p0: a.sampleTitle })
1000
+ } : {
1001
+ shape: "pieSlices",
1002
+ slices: [
1003
+ { label: e("FWA.3e1c1787571621538"), value: 45, share: 0.45 },
1004
+ { label: e("FWA.daf81787571622084"), value: 35, share: 0.35 },
1005
+ { label: e("FWA.1efd1787571622627"), value: 20, share: 0.2 }
1006
+ ],
1007
+ narrative: e("FWA.78111787570896869", { p0: a.sampleTitle })
1008
+ };
1009
+ }
1010
+ function Ee(a) {
1011
+ return {
1012
+ shape: "mapRegions",
1013
+ regions: a.previewKind === "geoRegionalHeat" ? [
1014
+ { name: e("FWA.3e1c1787571621538"), value: 96, status: "high" },
1015
+ { name: e("FWA.daf81787571622084"), value: 82, status: "high" },
1016
+ { name: e("FWA.b0ef1787571622889"), value: 44, status: "low" }
1017
+ ] : [
1018
+ { name: e("FWA.17091787571363132"), value: 28, status: "high" },
1019
+ { name: e("FWA.85571787571363502"), value: 18, status: "medium" },
1020
+ { name: e("FWA.326e1787571363642"), value: 16, status: "medium" }
1021
+ ],
1022
+ narrative: e("FWA.78111787570896869", { p0: a.sampleTitle })
1023
+ };
1024
+ }
1025
+ function Oe(a, t) {
1026
+ const i = t.previewKind === "chartDrilldownTree" || t.previewKind === "workflowApprovalChain";
1027
+ return {
1028
+ shape: "treeHierarchy",
1029
+ root: {
1030
+ id: "root",
1031
+ label: t.sampleTitle || a.title,
1032
+ children: i ? [
1033
+ { id: "node-a", label: e("FWA.f4281787571364149"), value: 42, children: [{ id: "node-a-1", label: e("FWA.20e11787571364573"), value: 18 }] },
1034
+ { id: "node-b", label: e("FWA.65f31787571365077"), value: 31, children: [{ id: "node-b-1", label: e("FWA.19181787571365601"), value: 12 }] }
1035
+ ] : [
1036
+ { id: "node-a", label: e("FWA.96181787571623667"), value: 42 },
1037
+ { id: "node-b", label: e("FWA.a0821787571647876"), value: 31 },
1038
+ { id: "node-c", label: e("FWA.5eb81787571633248"), value: 18 }
1039
+ ]
1040
+ },
1041
+ narrative: e("FWA.78111787570896869", { p0: t.sampleTitle })
1042
+ };
1043
+ }
1044
+ function Ge(a) {
1045
+ return {
1046
+ shape: "geoGlobe",
1047
+ title: a.sampleTitle,
1048
+ centerLabel: a.sampleTitle,
1049
+ arcs: [
1050
+ { from: e("FWA.dc881787571648412"), to: e("FWA.721f1787571564305"), value: 76 },
1051
+ { from: e("FWA.dc881787571648412"), to: e("FWA.ba171787571649318"), value: 54 },
1052
+ { from: e("FWA.dc881787571648412"), to: e("FWA.3e441787571366137"), value: 38 }
1053
+ ],
1054
+ metrics: [
1055
+ { label: e("FWA.f2d91787571638223"), value: "18" },
1056
+ { label: e("FWA.4c9a1787571649495"), value: "3" }
1057
+ ],
1058
+ narrative: e("FWA.78111787570896869", { p0: a.sampleTitle })
1059
+ };
1060
+ }
1061
+ function qe(a, t) {
1062
+ const i = t.sampleTitle || a.title, r = t.previewKind === "geoMigrationFlow" ? [e("FWA.70a31787571564827"), e("FWA.1b6f1787571565352"), e("FWA.2a821787571565490")] : t.previewKind === "geoRouteTrack" ? [e("FWA.366a1787571649681"), e("FWA.91831787571565887"), e("FWA.d4881787571649857")] : t.previewKind.includes("Permission") || t.previewKind.includes("permission") ? [e("FWA.85ad1787571650036"), e("FWA.d7021787571644744"), e("FWA.cbd71787571650213")] : t.previewKind.includes("Lineage") || t.previewKind.includes("lineage") ? [e("FWA.fe7c1787571566400"), e("FWA.fceb1787571635191"), e("FWA.f0f41787571650402")] : t.previewKind === "graphKnowledge" ? [e("FWA.0eb11787571650583"), e("FWA.63721787571650811"), e("FWA.aa671787571651078")] : [e("FWA.a22b1787571366237"), e("FWA.1f791787571651380"), e("FWA.0ce21787571366650")];
1063
+ return {
1064
+ shape: "networkGraph",
1065
+ nodes: [
1066
+ { id: "root", label: i, value: 48, category: "root" },
1067
+ { id: "node-a", label: r[0], value: 30, category: "object" },
1068
+ { id: "node-b", label: r[1], value: 28, category: "metric" },
1069
+ { id: "node-c", label: r[2], value: 24, category: "target" }
1070
+ ],
1071
+ links: [
1072
+ { source: "root", target: "node-a", value: 2 },
1073
+ { source: "node-a", target: "node-b", value: 1 },
1074
+ { source: "node-b", target: "node-c", value: 1 }
1075
+ ],
1076
+ narrative: e("FWA.e3aa1787570825040", { p0: i })
1077
+ };
1078
+ }
1079
+ function Ue(a, t) {
1080
+ return a.dataShape === "weatherCurrent" ? {
1081
+ shape: "weatherCurrent",
1082
+ location: e("FWA.dc881787571648412"),
1083
+ observedAt: (/* @__PURE__ */ new Date()).toISOString(),
1084
+ condition: "cloudy",
1085
+ conditionLabel: e("FWA.bc751787571651859"),
1086
+ temperatureC: 22,
1087
+ sourceLabel: "Canvas Runtime",
1088
+ dataStatus: "sample",
1089
+ forecast: [
1090
+ { label: e("FWA.9d4a1787571652053"), conditionLabel: e("FWA.3ea61787571652559"), highC: 24, lowC: 19, precipitationPct: 0.62 },
1091
+ { label: e("FWA.57fc1787571652912"), conditionLabel: e("FWA.0b4b1787571713699"), highC: 27, lowC: 21, precipitationPct: 0.12 }
1092
+ ]
1093
+ } : a.dataShape === "calendarCard" ? {
1094
+ shape: "calendarCard",
1095
+ timezone: "Asia/Shanghai",
1096
+ today: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
1097
+ dateLabel: e("FWA.f8701787571653134"),
1098
+ weekLabel: e("FWA.70ef1787571566924"),
1099
+ sourceLabel: "Canvas Runtime",
1100
+ dataStatus: "sample",
1101
+ items: [
1102
+ { id: "event-1", time: "09:30", title: e("FWA.2f751787571367198"), type: "meeting", status: "scheduled" },
1103
+ { id: "event-2", time: "14:00", title: e("FWA.e7ea1787571367720"), type: "deadline", status: "due" }
1104
+ ]
1105
+ } : a.dataShape === "embeddedFrame" ? {
1106
+ shape: "embeddedFrame",
1107
+ title: t.sampleTitle,
1108
+ srcUrl: "",
1109
+ sandbox: "allow-scripts allow-same-origin",
1110
+ status: "missing_url",
1111
+ sourceLabel: "Canvas Runtime",
1112
+ fallbackText: e("FWA.53701787570649393")
1113
+ } : a.dataShape === "fdeCustomComponent" ? {
1114
+ shape: "fdeCustomComponent",
1115
+ componentRef: t.previewKind === "fdeTemplateWeather" ? "@byteluck-fe/workbench-template/weather" : "unregistered-component",
1116
+ componentName: t.sampleTitle,
1117
+ props: t.previewKind === "fdeTemplateWeather" ? { city: e("FWA.dc881787571648412"), mode: "compact" } : {},
1118
+ status: t.previewKind === "fdeTemplateWeather" ? "ready" : "unregistered",
1119
+ sourceLabel: "Canvas Runtime",
1120
+ fallbackText: t.previewKind === "fdeTemplateWeather" ? e("FWA.77cf1787570980944") : e("FWA.4e041787570677202")
1121
+ } : null;
1122
+ }
1123
+ function z(a, t) {
1124
+ if (t.previewKind === "customNestedContainer") return De();
1125
+ const r = {
1126
+ customBlankCanvas: "blank-card-canvas",
1127
+ utilityQuickLinks: "quick-links",
1128
+ utilityAnnouncement: "announcement",
1129
+ utilitySearch: "search-entry",
1130
+ utilityReminder: "reminder-list",
1131
+ utilityFavorites: "favorite-list",
1132
+ identityPersonProfile: "identity-profile",
1133
+ entityCustomer: "customer-profile",
1134
+ entityProject: "project-profile",
1135
+ entityContract: "contract-profile",
1136
+ entitySupplier: "supplier-profile",
1137
+ entityAsset: "asset-profile",
1138
+ entityTicket: "ticket-workflow"
1139
+ }[t.previewKind] || "profile-card", n = t.previewKind === "utilitySearch" ? [
1140
+ { id: "search", kind: "text", label: e("FWA.2fca1787571653570"), value: e("FWA.95bc1787570980978") },
1141
+ { id: "scope", kind: "badge", label: e("FWA.63341787571653990"), value: e("FWA.74841787571654480") }
1142
+ ] : t.previewKind === "utilityQuickLinks" ? [
1143
+ { id: "link-a", kind: "badge", label: e("FWA.95d71787571654737"), value: e("FWA.0d7a1787571368329") },
1144
+ { id: "link-b", kind: "badge", label: e("FWA.95d71787571654737"), value: e("FWA.912b1787571368745") },
1145
+ { id: "link-c", kind: "badge", label: e("FWA.95d71787571654737"), value: e("FWA.faf31787571369271") }
1146
+ ] : [
1147
+ { id: "title", kind: "text", label: t.sampleTitle || a.title, value: t.sampleTitle || a.title },
1148
+ { id: "status", kind: "text", label: e("FWA.ee021787571625156"), value: t.sampleTone === "danger" ? e("FWA.09bc1787571567142") : t.sampleTone === "warning" ? e("FWA.6bd31787571567612") : e("FWA.89051787571627386") },
1149
+ { id: "summary", kind: "text", label: e("FWA.a8ac1787571655309"), value: e("FWA.85841787570825564", { p0: r }) }
1150
+ ];
1151
+ return {
1152
+ shape: "customCanvas",
1153
+ sourceLabel: "Canvas Runtime",
1154
+ narrative: e("FWA.c30d1787570897123", { p0: t.sampleTitle || a.title }),
1155
+ containerRole: r,
1156
+ elements: n
1157
+ };
1158
+ }
1159
+ function je(a, t) {
1160
+ if (t && typeof t == "object") return t;
1161
+ const i = e("FWA.97aa1787570384619", { p0: a.title }), r = te(a), n = Re(a);
1162
+ if (n) return n;
1163
+ if (a.dataShape === "metricSummary") return Pe(a, r);
1164
+ if (a.dataShape === "rows") return $e(a, r);
1165
+ if (a.dataShape === "insightNarrative" || a.dataShape === "reportSummary") return _e(a, r);
1166
+ if (a.dataShape === "dashboardGrid")
1167
+ return Me(a, i);
1168
+ if (a.dataShape === "pieSlices") return Ne(r);
1169
+ if (a.dataShape === "singleSeries" || a.dataShape === "multiSeries" || a.dataShape === "scatterPoints") return ze(a, r);
1170
+ if (a.dataShape === "waterfallSteps")
1171
+ return {
1172
+ shape: "waterfallSteps",
1173
+ unit: e("FWA.ca7e1787571655550"),
1174
+ steps: [
1175
+ { label: e("FWA.f3251787571656053"), value: 860 },
1176
+ { label: e("FWA.af341787571656233"), delta: 120 },
1177
+ { label: e("FWA.cc031787571369795"), delta: -68 },
1178
+ { label: e("FWA.f30f1787571656580"), value: 912 }
1179
+ ],
1180
+ narrative: i
1181
+ };
1182
+ if (a.dataShape === "heatmapMatrix")
1183
+ return {
1184
+ shape: "heatmapMatrix",
1185
+ rows: [e("FWA.b6981787571630333"), e("FWA.e82a1787571631102"), e("FWA.fea21787571656762"), e("FWA.62571787571657336")],
1186
+ columns: [e("FWA.cbf21787571632197"), e("FWA.94ee1787571632697"), e("FWA.a0821787571647876"), e("FWA.5eb81787571633248")],
1187
+ values: [
1188
+ [86, 74, 68, 42],
1189
+ [79, 88, 73, 51],
1190
+ [92, 81, 64, 48],
1191
+ [76, 69, 72, 57]
1192
+ ],
1193
+ narrative: i
1194
+ };
1195
+ if (a.dataShape === "radarMetrics")
1196
+ return {
1197
+ shape: "radarMetrics",
1198
+ max: 100,
1199
+ axes: [
1200
+ { label: e("FWA.96181787571623667"), value: 82 },
1201
+ { label: e("FWA.cbf21787571632197"), value: 76 },
1202
+ { label: e("FWA.5eb81787571633248"), value: 54 },
1203
+ { label: e("FWA.94ee1787571632697"), value: 88 },
1204
+ { label: e("FWA.a0821787571647876"), value: 69 }
1205
+ ],
1206
+ narrative: i
1207
+ };
1208
+ if (a.dataShape === "scatterPoints")
1209
+ return {
1210
+ shape: "scatterPoints",
1211
+ xLabel: e("FWA.dc551787571646259"),
1212
+ yLabel: e("FWA.d7911787571646774"),
1213
+ sizeLabel: e("FWA.dd2c1787571647345"),
1214
+ points: [
1215
+ { label: "A", x: 18, y: 42, size: 24 },
1216
+ { label: "B", x: 36, y: 68, size: 36 },
1217
+ { label: "C", x: 56, y: 72, size: 18 },
1218
+ { label: "D", x: 74, y: 84, size: 28 }
1219
+ ],
1220
+ narrative: i
1221
+ };
1222
+ if (a.dataShape === "funnelStages")
1223
+ return {
1224
+ shape: "funnelStages",
1225
+ stages: [
1226
+ { label: e("FWA.10161787571657755"), value: 1200, rate: 1 },
1227
+ { label: e("FWA.241b1787571658154"), value: 760, rate: 0.63 },
1228
+ { label: e("FWA.9a4c1787571658338"), value: 420, rate: 0.35 },
1229
+ { label: e("FWA.27d01787571658676"), value: 180, rate: 0.15 }
1230
+ ],
1231
+ narrative: i
1232
+ };
1233
+ if (a.dataShape === "gaugeMetric")
1234
+ return {
1235
+ shape: "gaugeMetric",
1236
+ label: a.title,
1237
+ value: 78,
1238
+ max: 100,
1239
+ unit: "%",
1240
+ thresholds: [
1241
+ { label: e("FWA.5eb81787571633248"), value: 60, color: "#dc2626" },
1242
+ { label: e("FWA.92d01787571659199"), value: 80, color: "#d97706" },
1243
+ { label: e("FWA.27771787571659430"), value: 100, color: "#16a34a" }
1244
+ ],
1245
+ narrative: i
1246
+ };
1247
+ if (a.dataShape === "mapRegions") return Ee(r);
1248
+ if (a.dataShape === "sankeyFlow")
1249
+ return {
1250
+ shape: "sankeyFlow",
1251
+ nodes: [
1252
+ { id: "market", label: e("FWA.298a1787571659723") },
1253
+ { id: "sales", label: e("FWA.b6981787571630333") },
1254
+ { id: "service", label: e("FWA.d7231787571660249") },
1255
+ { id: "renew", label: e("FWA.032c1787571660432") }
1256
+ ],
1257
+ links: [
1258
+ { source: "market", target: "sales", value: 120 },
1259
+ { source: "sales", target: "service", value: 86 },
1260
+ { source: "service", target: "renew", value: 54 }
1261
+ ],
1262
+ narrative: i
1263
+ };
1264
+ if (a.dataShape === "treeHierarchy") return Oe(a, r);
1265
+ if (a.dataShape === "ganttTasks")
1266
+ return {
1267
+ shape: "ganttTasks",
1268
+ timeline: ["05-01", "05-08", "05-15", "05-22", "05-29"],
1269
+ tasks: [
1270
+ { label: e("FWA.2c031787571660774"), start: 0, end: 1, status: "done", owner: e("FWA.0bd21787571661298") },
1271
+ { label: e("FWA.c6ec1787571661499"), start: 1, end: 3, status: "running", owner: e("FWA.fea21787571656762") },
1272
+ { label: e("FWA.81dc1787571661822"), start: 3, end: 4, status: "pending", owner: e("FWA.fc7d1787571662052") }
1273
+ ],
1274
+ narrative: i
1275
+ };
1276
+ if (a.dataShape === "candlestickSeries")
1277
+ return {
1278
+ shape: "candlestickSeries",
1279
+ categories: ["05-01", "05-08", "05-15", "05-22", "05-29"],
1280
+ values: [
1281
+ { open: 92, close: 98, low: 88, high: 104 },
1282
+ { open: 99, close: 95, low: 90, high: 108 },
1283
+ { open: 96, close: 112, low: 94, high: 118 },
1284
+ { open: 111, close: 108, low: 102, high: 121 },
1285
+ { open: 109, close: 124, low: 106, high: 130 }
1286
+ ],
1287
+ narrative: i
1288
+ };
1289
+ if (a.dataShape === "boxplotSeries")
1290
+ return {
1291
+ shape: "boxplotSeries",
1292
+ categories: [e("FWA.b6981787571630333"), e("FWA.e82a1787571631102"), e("FWA.e1881787571636369"), e("FWA.fea21787571656762"), e("FWA.62571787571657336")],
1293
+ values: [
1294
+ [18, 32, 48, 66, 78],
1295
+ [22, 38, 55, 72, 86],
1296
+ [14, 28, 43, 61, 74],
1297
+ [20, 36, 58, 76, 92],
1298
+ [16, 31, 49, 68, 82]
1299
+ ],
1300
+ narrative: i
1301
+ };
1302
+ if (a.dataShape === "paretoSeries")
1303
+ return {
1304
+ shape: "paretoSeries",
1305
+ categories: [e("FWA.b4d51787571370318"), e("FWA.6c8d1787571370844"), e("FWA.09981787571371368"), e("FWA.c91a1787571371892")],
1306
+ bars: [42, 31, 18, 9],
1307
+ cumulative: [42, 73, 91, 100],
1308
+ narrative: i
1309
+ };
1310
+ if (a.dataShape === "networkGraph") return qe(a, r);
1311
+ if (a.dataShape === "geoGlobe") return Ge(r);
1312
+ if (a.dataShape === "taskSummary")
1313
+ return {
1314
+ shape: "taskSummary",
1315
+ total: 12,
1316
+ overdue: 1,
1317
+ dueToday: 4,
1318
+ completed: 7,
1319
+ sourceLabel: "Canvas Runtime",
1320
+ items: [
1321
+ { id: "task-1", title: e("FWA.d7471787571130016"), type: "workflow", owner: e("FWA.e07a1787571662542"), status: "pending", dueAt: e("FWA.f8701787571653134") },
1322
+ { id: "task-2", title: e("FWA.91961787571130062"), type: "document", owner: e("FWA.ad161787571568154"), status: "reading", dueAt: e("FWA.9d4a1787571652053") }
1323
+ ]
1324
+ };
1325
+ const s = Ue(a, r);
1326
+ return s || (a.dataShape === "customCanvas", z(a, r));
1327
+ }
1328
+ function ua(a, t) {
1329
+ const i = V(a), r = Y(a, i);
1330
+ return r || (i ? I(a, t, i) : H(a));
1331
+ }
1332
+ async function pa(a, t) {
1333
+ const i = V(a), r = Y(a, i);
1334
+ return r || (i ? Ce(i) ? await Ye(a, t, i) : I(a, t, i) : H(a));
1335
+ }
1336
+ function Y(a, t) {
1337
+ return t ? a.registryEntry && a.capabilityId && a.capabilityId !== a.registryEntry.capabilityId ? {
1338
+ status: "failed",
1339
+ registryEntry: t,
1340
+ reason: e("FWA.19601787570371606", { p0: a.capabilityId }),
1341
+ suggestion: e("FWA.9d5e1787570280829")
1342
+ } : t.status === "placeholder" ? {
1343
+ status: "failed",
1344
+ registryEntry: t,
1345
+ reason: t.honestFailure || e("FWA.12801787570751930", { p0: t.capabilityId }),
1346
+ suggestion: e("FWA.fa891787570710214")
1347
+ } : t.status === "lifecycle" ? {
1348
+ status: "failed",
1349
+ registryEntry: t,
1350
+ reason: e("FWA.d1461787570357548", { p0: t.capabilityId }),
1351
+ suggestion: e("FWA.65e31787570341627")
1352
+ } : null : H(a);
1353
+ }
1354
+ function V(a) {
1355
+ return a.registryEntry ?? J(a);
1356
+ }
1357
+ function H(a) {
1358
+ return {
1359
+ status: "failed",
1360
+ reason: e("FWA.a4581787570650442", { p0: a.capabilityId || `${a.category || "-"}/${a.type || "-"}` }),
1361
+ suggestion: e("FWA.8dbd1787570217430")
1362
+ };
1363
+ }
1364
+ function I(a, t, i, r) {
1365
+ var A, W, m, v, u, b, h, w;
1366
+ const n = String(((A = a.meta) == null ? void 0 : A.id) || ((W = a.layout) == null ? void 0 : W.i) || ke()), o = (a.layout ? Ae : Fe)({
1367
+ preset: ((m = a.size) == null ? void 0 : m.preset) || "medium",
1368
+ width: (v = a.size) == null ? void 0 : v.width,
1369
+ height: (u = a.size) == null ? void 0 : u.height,
1370
+ layout: a.layout,
1371
+ placed: t
1372
+ }), l = ((b = a.renderer) == null ? void 0 : b.rendererKey) || i.rendererKey;
1373
+ return { status: "success", block: {
1374
+ id: n,
1375
+ version: 1,
1376
+ blockType: i.blockType,
1377
+ subType: i.subType,
1378
+ title: a.title || i.title,
1379
+ subtitle: a.subtitle || i.description,
1380
+ layout: We(n, o),
1381
+ intent: {
1382
+ scene: "personal_workbench_canvas_runtime",
1383
+ bizIntent: a.title || i.title,
1384
+ roleTemplate: "canvas_runtime"
1385
+ },
1386
+ source: {
1387
+ sourceType: "canvas_runtime",
1388
+ service: "card_factory",
1389
+ resourceKey: i.capabilityId,
1390
+ params: {
1391
+ capabilityId: i.capabilityId,
1392
+ category: i.category,
1393
+ type: i.type,
1394
+ variant: i.variant
1395
+ }
1396
+ },
1397
+ renderer: (r == null ? void 0 : r.renderer) ?? {
1398
+ engine: ((h = a.renderer) == null ? void 0 : h.engine) || "echarts",
1399
+ rendererKey: l,
1400
+ preset: (w = a.renderer) == null ? void 0 : w.preset
1401
+ },
1402
+ state: Le(),
1403
+ data: (r == null ? void 0 : r.data) ?? je(i, a.data),
1404
+ meta: {
1405
+ ...a.meta,
1406
+ ...(r == null ? void 0 : r.meta) ?? {},
1407
+ capabilityId: i.capabilityId,
1408
+ macroCapabilityId: i.category,
1409
+ handlerClassName: i.handlerClassName,
1410
+ dataShape: i.dataShape,
1411
+ shell: i.shell,
1412
+ styleVariants: i.styleVariants,
1413
+ canvasRuntime: !0,
1414
+ layoutBasis: {
1415
+ baseCols: 100,
1416
+ w: o.w,
1417
+ h: o.h
1418
+ }
1419
+ }
1420
+ }, registryEntry: i };
1421
+ }
1422
+ async function Ye(a, t, i) {
1423
+ const r = await Ke(i);
1424
+ return r.ok ? I(a, t, i, {
1425
+ renderer: r.renderer,
1426
+ data: r.data,
1427
+ meta: r.meta
1428
+ }) : { status: "failed", registryEntry: i, reason: r.reason };
1429
+ }
1430
+ export {
1431
+ L as D,
1432
+ p as L,
1433
+ y as S,
1434
+ pa as a,
1435
+ oa as b,
1436
+ ua as c,
1437
+ e as d,
1438
+ Qe as e,
1439
+ ca as f,
1440
+ T as g,
1441
+ la as h,
1442
+ O as i,
1443
+ ue as j,
1444
+ U as k,
1445
+ We as l,
1446
+ ta as m,
1447
+ S as n,
1448
+ ia as o,
1449
+ ra as p,
1450
+ ne as q,
1451
+ Ae as r,
1452
+ sa as s,
1453
+ Fe as t,
1454
+ na as u,
1455
+ da as v,
1456
+ ea as w,
1457
+ aa as x,
1458
+ ee as y,
1459
+ Ze as z
1460
+ };