base-screen 0.3.0 → 0.4.0

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 (210) hide show
  1. package/dist/_internal/contracts/document/schema.d.ts +7 -0
  2. package/dist/_internal/contracts/document/schema.js +1 -1
  3. package/dist/_internal/contracts/document/validate-value-ref.js +6 -1
  4. package/dist/_internal/contracts/screen-document.schema.json +15 -3
  5. package/dist/_internal/contracts/types/diagnostics.d.ts +1 -1
  6. package/dist/_internal/contracts/types/document.d.ts +3 -1
  7. package/dist/_internal/core/blueprint/runtime-simulate.d.ts +57 -0
  8. package/dist/_internal/core/blueprint/runtime-simulate.js +177 -0
  9. package/dist/_internal/core/blueprint/runtime.d.ts +1 -0
  10. package/dist/_internal/core/blueprint/runtime.js +1 -0
  11. package/dist/_internal/core/commands/apply-collection-commands.d.ts +32 -0
  12. package/dist/_internal/core/commands/apply-collection-commands.js +174 -0
  13. package/dist/_internal/core/commands/apply.js +13 -0
  14. package/dist/_internal/core/commands/parse-command.js +12 -0
  15. package/dist/_internal/core/commands/types.d.ts +29 -1
  16. package/dist/_internal/core/data/data-candidates.d.ts +38 -0
  17. package/dist/_internal/core/data/data-candidates.js +186 -0
  18. package/dist/_internal/core/data/dataset-profile.d.ts +71 -0
  19. package/dist/_internal/core/data/dataset-profile.js +170 -0
  20. package/dist/_internal/core/data/sample-values.d.ts +25 -0
  21. package/dist/_internal/core/data/sample-values.js +45 -0
  22. package/dist/_internal/core/diff/screen-diff.js +6 -0
  23. package/dist/_internal/core/index.d.ts +7 -1
  24. package/dist/_internal/core/index.js +7 -1
  25. package/dist/_internal/core/state/state-preset.d.ts +32 -0
  26. package/dist/_internal/core/state/state-preset.js +37 -0
  27. package/dist/_internal/core/validation/layout-audit.d.ts +17 -0
  28. package/dist/_internal/core/validation/layout-audit.js +228 -0
  29. package/dist/_internal/core/validation/legibility.d.ts +9 -0
  30. package/dist/_internal/core/validation/legibility.js +33 -0
  31. package/dist/_internal/engine/browser/controllers/dataset/designer-dataset-draft-controller.d.ts +6 -1
  32. package/dist/_internal/engine/browser/controllers/designer-change-controller.d.ts +27 -0
  33. package/dist/_internal/engine/browser/dom/change/designer-change-dom.d.ts +21 -5
  34. package/dist/_internal/engine/browser/dom/dataset/designer-data-section-diff.d.ts +4 -6
  35. package/dist/_internal/engine/browser/dom/value-ref/designer-value-ref-types.d.ts +2 -0
  36. package/dist/_internal/engine/browser/viewport/designer-canvas-aids-types.d.ts +3 -3
  37. package/dist/_internal/engine/browser/viewport/designer-canvas-aids.d.ts +5 -3
  38. package/dist/_internal/engine/browser/viewport/designer-canvas-measurements.d.ts +2 -14
  39. package/dist/_internal/engine/browser/viewport/designer-guide-overlay-nodes.d.ts +2 -0
  40. package/dist/_internal/engine/browser/viewport/designer-snap-tuning.d.ts +14 -0
  41. package/dist/_internal/engine/common/operations/change/designer-change-events.d.ts +2 -0
  42. package/dist/_internal/engine/common/operations/change/designer-change-proposal.d.ts +35 -2
  43. package/dist/_internal/engine/common/operations/display/designer-target-display.d.ts +2 -2
  44. package/dist/_internal/engine/common/operations/style/designer-component-states.d.ts +7 -2
  45. package/dist/_internal/engine/common/ui-text/designer-ui-text.d.ts +42 -2
  46. package/dist/_internal/engine/{designer-blueprint-workbench-panel-CJ3iZo5v.js → designer-blueprint-workbench-panel-BWSglfAb.js} +210 -290
  47. package/dist/_internal/engine/{designer-dataset-controller-CrfOg2Ys.js → designer-dataset-controller-DdbY4ILC.js} +619 -561
  48. package/dist/_internal/engine/designer-element/api/designer-element-change.d.ts +24 -0
  49. package/dist/_internal/engine/designer-element/base-screen-designer-element.d.ts +12 -0
  50. package/dist/_internal/engine/designer-element/designer-element-public-api.d.ts +2 -1
  51. package/dist/_internal/engine/designer-element/runtime/designer-element-rendering.d.ts +1 -1
  52. package/dist/_internal/engine/designer-element/runtime/designer-element-runtime.d.ts +4 -1
  53. package/dist/_internal/engine/designer-element/runtime/designer-element-sample-data.d.ts +23 -0
  54. package/dist/_internal/engine/{designer-field-primitives-KBZuWN_D.js → designer-field-primitives-Crn464Qg.js} +44 -3
  55. package/dist/_internal/engine/{designer-left-panel-groups-dom-N2OHOWjl.js → designer-left-panel-groups-dom-DFdLWxxY.js} +2 -2
  56. package/dist/_internal/engine/{host-resource-selection-xo2mLCD4.js → host-resource-selection-CWrPLVOc.js} +2 -2
  57. package/dist/_internal/engine/index.js +4742 -4360
  58. package/dist/_internal/host-kit/index.d.ts +1 -0
  59. package/dist/_internal/host-kit/index.js +1 -0
  60. package/dist/_internal/host-kit/intent/index.d.ts +16 -0
  61. package/dist/_internal/host-kit/intent/index.js +13 -0
  62. package/dist/_internal/host-kit/intent/intent-behavior.d.ts +59 -0
  63. package/dist/_internal/host-kit/intent/intent-behavior.js +812 -0
  64. package/dist/_internal/host-kit/intent/intent-block.d.ts +59 -0
  65. package/dist/_internal/host-kit/intent/intent-block.js +359 -0
  66. package/dist/_internal/host-kit/intent/intent-catalog.d.ts +105 -0
  67. package/dist/_internal/host-kit/intent/intent-catalog.js +60 -0
  68. package/dist/_internal/host-kit/intent/intent-compile-types.d.ts +222 -0
  69. package/dist/_internal/host-kit/intent/intent-compile-types.js +10 -0
  70. package/dist/_internal/host-kit/intent/intent-compile.d.ts +35 -0
  71. package/dist/_internal/host-kit/intent/intent-compile.js +465 -0
  72. package/dist/_internal/host-kit/intent/intent-data-check.d.ts +50 -0
  73. package/dist/_internal/host-kit/intent/intent-data-check.js +163 -0
  74. package/dist/_internal/host-kit/intent/intent-data-context.d.ts +53 -0
  75. package/dist/_internal/host-kit/intent/intent-data-context.js +200 -0
  76. package/dist/_internal/host-kit/intent/intent-dataset.d.ts +52 -0
  77. package/dist/_internal/host-kit/intent/intent-dataset.js +125 -0
  78. package/dist/_internal/host-kit/intent/intent-format.d.ts +33 -0
  79. package/dist/_internal/host-kit/intent/intent-format.js +94 -0
  80. package/dist/_internal/host-kit/intent/intent-kpi-bind.d.ts +29 -0
  81. package/dist/_internal/host-kit/intent/intent-kpi-bind.js +59 -0
  82. package/dist/_internal/host-kit/intent/intent-layout.d.ts +102 -0
  83. package/dist/_internal/host-kit/intent/intent-layout.js +264 -0
  84. package/dist/_internal/host-kit/intent/intent-parse.d.ts +39 -0
  85. package/dist/_internal/host-kit/intent/intent-parse.js +930 -0
  86. package/dist/_internal/host-kit/intent/intent-prepare.d.ts +52 -0
  87. package/dist/_internal/host-kit/intent/intent-prepare.js +104 -0
  88. package/dist/_internal/host-kit/intent/intent-session.d.ts +202 -0
  89. package/dist/_internal/host-kit/intent/intent-session.js +1001 -0
  90. package/dist/_internal/host-kit/intent/intent-stream.d.ts +28 -0
  91. package/dist/_internal/host-kit/intent/intent-stream.js +183 -0
  92. package/dist/_internal/host-kit/intent/intent-style.d.ts +37 -0
  93. package/dist/_internal/host-kit/intent/intent-style.js +77 -0
  94. package/dist/_internal/host-kit/intent/intent-types.d.ts +234 -0
  95. package/dist/_internal/host-kit/intent/intent-types.js +10 -0
  96. package/dist/_internal/material/chart.js +34 -12
  97. package/dist/_internal/material/table.js +52 -21
  98. package/dist/_internal/plugin-sdk/index.d.ts +6 -0
  99. package/dist/_internal/plugin-sdk/index.js +6 -0
  100. package/dist/_internal/plugin-sdk/material-isolated-csp.d.ts +38 -0
  101. package/dist/_internal/plugin-sdk/material-isolated-csp.js +67 -0
  102. package/dist/_internal/plugin-sdk/material-isolated-runtime.d.ts +22 -0
  103. package/dist/_internal/plugin-sdk/material-isolated-runtime.js +262 -0
  104. package/dist/_internal/plugin-sdk/material-isolated.d.ts +94 -0
  105. package/dist/_internal/plugin-sdk/material-isolated.js +1024 -0
  106. package/dist/_internal/plugin-sdk/material-rendered-element.d.ts +10 -2
  107. package/dist/_internal/plugin-sdk/material-rendered-element.js +71 -7
  108. package/dist/_internal/plugin-sdk/material-spec-audit.d.ts +2 -0
  109. package/dist/_internal/plugin-sdk/material-spec-audit.js +26 -6
  110. package/dist/_internal/plugin-sdk/material-spec.d.ts +20 -0
  111. package/dist/_internal/plugin-sdk/material-spec.js +78 -3
  112. package/dist/_internal/plugin-sdk/material-template-audit.d.ts +12 -0
  113. package/dist/_internal/plugin-sdk/material-template-audit.js +302 -0
  114. package/dist/_internal/plugin-sdk/material-template-expression.d.ts +98 -0
  115. package/dist/_internal/plugin-sdk/material-template-expression.js +549 -0
  116. package/dist/_internal/plugin-sdk/material-template-render.d.ts +32 -0
  117. package/dist/_internal/plugin-sdk/material-template-render.js +579 -0
  118. package/dist/_internal/plugin-sdk/material-template.d.ts +185 -0
  119. package/dist/_internal/plugin-sdk/material-template.js +879 -0
  120. package/dist/auto-register.js +10 -10
  121. package/dist/contracts.js +5 -5
  122. package/dist/contrast-DRPezUIl.js +131 -0
  123. package/dist/contrast-DRPezUIl.js.map +1 -0
  124. package/dist/core.js +156 -136
  125. package/dist/core.js.map +1 -1
  126. package/dist/dataset-profile-Dk6xdtsM.js +261 -0
  127. package/dist/dataset-profile-Dk6xdtsM.js.map +1 -0
  128. package/dist/{designer-3Tb0EIDV.js → designer-CFOvOmLn.js} +2 -2
  129. package/dist/{designer-3Tb0EIDV.js.map → designer-CFOvOmLn.js.map} +1 -1
  130. package/dist/designer-auto-register.js +5 -5
  131. package/dist/{designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js → designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js} +452 -531
  132. package/dist/designer-blueprint-workbench-panel-BWSglfAb-ktaj6Ci9.js.map +1 -0
  133. package/dist/{designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js → designer-dataset-controller-DdbY4ILC-CMdGdGbr.js} +862 -804
  134. package/dist/designer-dataset-controller-DdbY4ILC-CMdGdGbr.js.map +1 -0
  135. package/dist/{designer-field-primitives-KBZuWN_D-B3h4jpYe.js → designer-field-primitives-Crn464Qg-Bi7q8s5J.js} +45 -4
  136. package/dist/designer-field-primitives-Crn464Qg-Bi7q8s5J.js.map +1 -0
  137. package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js} +4 -4
  138. package/dist/{designer-left-panel-groups-dom-N2OHOWjl-D8CzGwbF.js.map → designer-left-panel-groups-dom-DFdLWxxY-BarlWMLY.js.map} +1 -1
  139. package/dist/designer.js +5 -5
  140. package/dist/{dist-6GRboBs-.js → dist-B2bW2Tru.js} +4 -4
  141. package/dist/{dist-6GRboBs-.js.map → dist-B2bW2Tru.js.map} +1 -1
  142. package/dist/{dist-BjLjFUy1.js → dist-CHK9BTXX.js} +3833 -3453
  143. package/dist/dist-CHK9BTXX.js.map +1 -0
  144. package/dist/engine.js +5 -5
  145. package/dist/{fragment-Y6YnW6wy.js → fragment-B-oP0Fru.js} +3 -3
  146. package/dist/{fragment-Y6YnW6wy.js.map → fragment-B-oP0Fru.js.map} +1 -1
  147. package/dist/host-kit.js +3963 -187
  148. package/dist/host-kit.js.map +1 -1
  149. package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js → host-resource-selection-CWrPLVOc-DPDq3jau.js} +5 -5
  150. package/dist/{host-resource-selection-xo2mLCD4-BR5XCcim.js.map → host-resource-selection-CWrPLVOc-DPDq3jau.js.map} +1 -1
  151. package/dist/index.js +10 -10
  152. package/dist/legibility-CS28ivEz.js +12 -0
  153. package/dist/legibility-CS28ivEz.js.map +1 -0
  154. package/dist/{level-scale-BzUjE31V.js → level-scale-CwHqFEVd.js} +2 -2
  155. package/dist/{level-scale-BzUjE31V.js.map → level-scale-CwHqFEVd.js.map} +1 -1
  156. package/dist/{manager-Ch0RTu_i.js → manager-CeB4Jnr9.js} +3 -3
  157. package/dist/{manager-Ch0RTu_i.js.map → manager-CeB4Jnr9.js.map} +1 -1
  158. package/dist/{material-UbSfiuZq.js → material-DeVkzSoT.js} +2 -2
  159. package/dist/{material-UbSfiuZq.js.map → material-DeVkzSoT.js.map} +1 -1
  160. package/dist/material-auto-register.js +1 -1
  161. package/dist/material.js +2 -2
  162. package/dist/{migrate-document-D3HhCVlZ.js → migrate-document-BM888PtC.js} +2 -2
  163. package/dist/{migrate-document-D3HhCVlZ.js.map → migrate-document-BM888PtC.js.map} +1 -1
  164. package/dist/{parse-AOTE9WnD.js → parse-Ji7kE9ZT.js} +9 -4
  165. package/dist/parse-Ji7kE9ZT.js.map +1 -0
  166. package/dist/{parse-B1OD1teS.js → parse-aZat9tAS.js} +3 -3
  167. package/dist/{parse-B1OD1teS.js.map → parse-aZat9tAS.js.map} +1 -1
  168. package/dist/{parse-parts-BNrpdG5o.js → parse-parts-qzl4suzk.js} +2 -2
  169. package/dist/{parse-parts-BNrpdG5o.js.map → parse-parts-qzl4suzk.js.map} +1 -1
  170. package/dist/{plugin-DHgh9uHh.js → plugin-CstHQ5ws.js} +4 -4
  171. package/dist/{plugin-DHgh9uHh.js.map → plugin-CstHQ5ws.js.map} +1 -1
  172. package/dist/plugin-core.js +2 -2
  173. package/dist/plugin-manager.js +1 -1
  174. package/dist/plugin-package-DWifuHi1.js +4206 -0
  175. package/dist/plugin-package-DWifuHi1.js.map +1 -0
  176. package/dist/{plugin-registration-rsmb4GvS.js → plugin-registration-DTwBvnHX.js} +2 -2
  177. package/dist/{plugin-registration-rsmb4GvS.js.map → plugin-registration-DTwBvnHX.js.map} +1 -1
  178. package/dist/plugin-sdk.js +6 -6
  179. package/dist/{plugins-DGRHgREK.js → plugins-QDL0yIql.js} +2 -2
  180. package/dist/{plugins-DGRHgREK.js.map → plugins-QDL0yIql.js.map} +1 -1
  181. package/dist/plugins.js +8 -8
  182. package/dist/renderer.js +1 -1
  183. package/dist/{runtime-dispatch-BfnRDtMe.js → runtime-dispatch-C0gyIrTv.js} +2 -2
  184. package/dist/{runtime-dispatch-BfnRDtMe.js.map → runtime-dispatch-C0gyIrTv.js.map} +1 -1
  185. package/dist/runtime-simulate-aSYO9yDX.js +147 -0
  186. package/dist/runtime-simulate-aSYO9yDX.js.map +1 -0
  187. package/dist/{src-Bm7u11mN-_0u6cMEw.js → src-Bm7u11mN-Bi1hDVkh.js} +39 -39
  188. package/dist/{src-Bm7u11mN-_0u6cMEw.js.map → src-Bm7u11mN-Bi1hDVkh.js.map} +1 -1
  189. package/dist/state-preset-DtpygJOH.js +22 -0
  190. package/dist/state-preset-DtpygJOH.js.map +1 -0
  191. package/dist/{text-BNksUr5J.js → text-BSTz0pFQ.js} +87 -34
  192. package/dist/text-BSTz0pFQ.js.map +1 -0
  193. package/dist/{value-ref-BG_MV9C-.js → value-ref-XkLuckGV.js} +2 -2
  194. package/dist/{value-ref-BG_MV9C-.js.map → value-ref-XkLuckGV.js.map} +1 -1
  195. package/dist/{viewer-CrJupI8I-D9dVcNw4.js → viewer-CrJupI8I-BJiz1cvW.js} +4 -4
  196. package/dist/{viewer-CrJupI8I-D9dVcNw4.js.map → viewer-CrJupI8I-BJiz1cvW.js.map} +1 -1
  197. package/dist/viewer-auto-register.js +2 -2
  198. package/dist/viewer.js +2 -2
  199. package/dist/{viewport-CiCKeAQH.js → viewport-BNIRWjiT.js} +354 -155
  200. package/dist/viewport-BNIRWjiT.js.map +1 -0
  201. package/package.json +12 -12
  202. package/dist/designer-blueprint-workbench-panel-CJ3iZo5v-BebifP4x.js.map +0 -1
  203. package/dist/designer-dataset-controller-CrfOg2Ys-DhKUEJJe.js.map +0 -1
  204. package/dist/designer-field-primitives-KBZuWN_D-B3h4jpYe.js.map +0 -1
  205. package/dist/dist-BjLjFUy1.js.map +0 -1
  206. package/dist/parse-AOTE9WnD.js.map +0 -1
  207. package/dist/plugin-package-Dr5ro6h6.js +0 -1221
  208. package/dist/plugin-package-Dr5ro6h6.js.map +0 -1
  209. package/dist/text-BNksUr5J.js.map +0 -1
  210. package/dist/viewport-CiCKeAQH.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { A as e, D as t, F as n, G as r, H as i, I as a, K as o, L as s, M as c, N as l, O as u, R as d, U as f, W as p, _ as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as ee, l as te, m as ne, n as C, p as re, q as w, r as ie, s as ae, t as oe, u as T, w as E, y as se, z as D } from "./designer-left-panel-groups-dom-N2OHOWjl.js";
2
- import { A as O, O as k, a as ce, c as le, p as A } from "./designer-field-primitives-KBZuWN_D.js";
3
- import { compileScreenBlueprint as ue, traceScreenBlueprintEvent as de } from "@base-screen/core";
4
- import { MAX_VALUE_REF_PATH_SEGMENTS as fe, SCREEN_BLUEPRINT_CAPABILITIES as pe, SCREEN_BLUEPRINT_FIXED_INPUT_PORTS as j, SCREEN_BLUEPRINT_FIXED_OUTPUT_PORTS as M, VALUE_REF_PATH_SEGMENT_PATTERN as me, parseScreenDocument as he, parseScreenJsonValue as ge, readScreenBlueprintActionPort as _e, readScreenBlueprintEdgeCategory as ve, readScreenBlueprintEventPort as N, resolveScreenStartPageId as ye, screenBlueprintPortTrigger as be, screenJsonEquals as xe } from "@base-screen/contracts";
1
+ import { A as e, D as t, F as n, G as r, H as i, I as a, K as o, L as s, M as c, N as l, O as u, R as d, U as f, W as p, _ as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as ee, l as te, m as ne, n as C, p as re, q as w, r as ie, s as ae, t as oe, u as T, w as E, y as se, z as D } from "./designer-left-panel-groups-dom-DFdLWxxY.js";
2
+ import { A as O, O as k, a as ce, c as le, p as A } from "./designer-field-primitives-Crn464Qg.js";
3
+ import { compileScreenBlueprint as ue, simulateScreenBlueprint as de } from "@base-screen/core";
4
+ import { MAX_VALUE_REF_PATH_SEGMENTS as fe, SCREEN_BLUEPRINT_CAPABILITIES as pe, SCREEN_BLUEPRINT_FIXED_INPUT_PORTS as j, SCREEN_BLUEPRINT_FIXED_OUTPUT_PORTS as M, VALUE_REF_PATH_SEGMENT_PATTERN as me, parseScreenDocument as he, parseScreenJsonValue as ge, readScreenBlueprintActionPort as _e, readScreenBlueprintEdgeCategory as ve, readScreenBlueprintEventPort as N, screenBlueprintPortTrigger as ye, screenJsonEquals as be } from "@base-screen/contracts";
5
5
  //#region src/common/operations/blueprint/designer-blueprint-model.ts
6
- var Se = 260, Ce = 176, P = 80;
6
+ var xe = 260, Se = 176, P = 80;
7
7
  function F(e, t, n) {
8
8
  let r = ae(n, pe.materialEvent);
9
9
  return e.components.flatMap((e) => {
@@ -22,7 +22,7 @@ function F(e, t, n) {
22
22
  });
23
23
  });
24
24
  }
25
- function we(e, t, n) {
25
+ function Ce(e, t, n) {
26
26
  let r = F(e, t, n);
27
27
  return {
28
28
  isEventAvailable: (e, t) => r.some((n) => n.componentId === e && n.name === t && n.available),
@@ -30,8 +30,8 @@ function we(e, t, n) {
30
30
  componentStateIds: (t) => e.components.find((e) => e.id === t)?.states?.items.map((e) => e.id) ?? []
31
31
  };
32
32
  }
33
- function Te(e, t, n) {
34
- let r = F(e, t, n), i = Pe(e);
33
+ function we(e, t, n) {
34
+ let r = F(e, t, n), i = Ne(e);
35
35
  return e.components.map((t) => {
36
36
  let n = s(e.blueprint, t.id);
37
37
  return {
@@ -45,7 +45,7 @@ function Te(e, t, n) {
45
45
  };
46
46
  });
47
47
  }
48
- function Ee(e, t) {
48
+ function Te(e, t) {
49
49
  return A(e).map((n) => {
50
50
  let r = d(e.blueprint, n.id);
51
51
  return {
@@ -59,8 +59,8 @@ function Ee(e, t) {
59
59
  };
60
60
  });
61
61
  }
62
- function De(e, n, r, a) {
63
- let o = a.graph, s = e.blueprint, c = F(e, n, r), l = te(r), u = new Map(e.components.map((e) => [e.id, e])), d = new Map(A(e).map((e) => [e.id, e])), f = new Map((e.subCanvases ?? []).map((e) => [e.id, e])), p = new Map(s.layout?.nodes.map((e) => [e.id, e])), m = Ne(s.nodes, s.edges), h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
62
+ function Ee(e, n, r, a) {
63
+ let o = a.graph, s = e.blueprint, c = F(e, n, r), l = te(r), u = new Map(e.components.map((e) => [e.id, e])), d = new Map(A(e).map((e) => [e.id, e])), f = new Map((e.subCanvases ?? []).map((e) => [e.id, e])), p = new Map(s.layout?.nodes.map((e) => [e.id, e])), m = Me(s.nodes, s.edges), h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
64
64
  for (let e of s.edges) _.set(e.from.node, (_.get(e.from.node) ?? 0) + 1), g.set(e.to.node, (g.get(e.to.node) ?? 0) + 1), e.kind === "flow" && (h.add(`${e.from.node}\u0000out\u0000${e.from.port}`), h.add(`${e.to.node}\u0000in\u0000${e.to.port}`));
65
65
  let v = (e, t, n, r, i = !0) => ({
66
66
  id: n,
@@ -134,7 +134,7 @@ function De(e, n, r, a) {
134
134
  let r = N(n);
135
135
  r !== void 0 && t.push(v(e, "in", n, o.hostEventPort(r)));
136
136
  }
137
- t.push(v(e, "in", `event:${ke(s, e.id)}`, o.newHostEventPort));
137
+ t.push(v(e, "in", `event:${Oe(s, e.id)}`, o.newHostEventPort));
138
138
  for (let n of l) t.push(v(e, "in", `action:${n.actionId}`, o.hostActionPort(n.name)));
139
139
  for (let n of y(e, "in")) {
140
140
  let r = _e(n);
@@ -186,7 +186,7 @@ function De(e, n, r, a) {
186
186
  case "condition": return {
187
187
  ...i,
188
188
  title: e.name ?? o.conditionTitle,
189
- subtitle: Ae(e.condition, a),
189
+ subtitle: ke(e.condition, a),
190
190
  outputs: r,
191
191
  inputs: n,
192
192
  condition: e.condition,
@@ -194,7 +194,7 @@ function De(e, n, r, a) {
194
194
  };
195
195
  }
196
196
  });
197
- Me(b, p);
197
+ je(b, p);
198
198
  let x = new Map(b.map((e) => [e.id, e])), S = t(s);
199
199
  return {
200
200
  nodes: b,
@@ -236,12 +236,12 @@ function De(e, n, r, a) {
236
236
  ...s.layout?.viewport === void 0 ? {} : { viewport: s.layout.viewport }
237
237
  };
238
238
  }
239
- function Oe(e, t) {
239
+ function De(e, t) {
240
240
  let n = [];
241
241
  for (let r of t.blueprint.nodes) {
242
242
  if (r.enabled === !1) continue;
243
243
  let t = e.nodes.find((e) => e.id === r.id);
244
- for (let e of t?.outputs ?? []) e.connected && be(r, e.id) !== void 0 && n.push({
244
+ for (let e of t?.outputs ?? []) e.connected && ye(r, e.id) !== void 0 && n.push({
245
245
  nodeId: r.id,
246
246
  port: e.id,
247
247
  label: `${t?.title ?? r.id} · ${e.label}`
@@ -249,11 +249,11 @@ function Oe(e, t) {
249
249
  }
250
250
  return n;
251
251
  }
252
- function ke(e, t) {
252
+ function Oe(e, t) {
253
253
  let n = new Set(e.edges.flatMap((e) => e.kind === "flow" && e.to.node === t ? [e.to.port] : []));
254
254
  for (let e = 1;; e++) if (!n.has(`event:event${e}`)) return `event${e}`;
255
255
  }
256
- function Ae(e, t) {
256
+ function ke(e, t) {
257
257
  let n = (e) => {
258
258
  switch (e.kind) {
259
259
  case "literal": return JSON.stringify(e.value) ?? "null";
@@ -264,11 +264,11 @@ function Ae(e, t) {
264
264
  }, r = t.conditionOperator(e.operator);
265
265
  return e.right === void 0 ? `${n(e.left)} ${r}` : `${n(e.left)} ${r} ${n(e.right)}`;
266
266
  }
267
- function je(e) {
267
+ function Ae(e) {
268
268
  let t = e.inputs.length + e.outputs.length + +!!e.semantic;
269
269
  return Math.max(108, 71 + t * 27);
270
270
  }
271
- function Me(e, t) {
271
+ function je(e, t) {
272
272
  let n = /* @__PURE__ */ new Map();
273
273
  e.forEach((e, r) => {
274
274
  if (t.has(e.id)) return;
@@ -282,11 +282,11 @@ function Me(e, t) {
282
282
  e[r] = {
283
283
  ...t,
284
284
  y: n
285
- }, n += je(t) + 28;
285
+ }, n += Ae(t) + 28;
286
286
  }
287
287
  }
288
288
  }
289
- function Ne(e, t) {
289
+ function Me(e, t) {
290
290
  let n = /* @__PURE__ */ new Map();
291
291
  for (let e of t) {
292
292
  if (e.kind !== "flow") continue;
@@ -305,13 +305,13 @@ function Ne(e, t) {
305
305
  for (let t of e) {
306
306
  let e = a(t.id), n = o.get(e) ?? 0;
307
307
  o.set(e, n + 1), s.set(t.id, {
308
- x: P + e * Se,
309
- y: P + n * Ce
308
+ x: P + e * xe,
309
+ y: P + n * Se
310
310
  });
311
311
  }
312
312
  return s;
313
313
  }
314
- function Pe(e) {
314
+ function Ne(e) {
315
315
  let t = new Map(e.components.map((e) => [e.id, e])), n = /* @__PURE__ */ new Map();
316
316
  for (let r of e.components) {
317
317
  let e = 0, i = r.parentId, a = /* @__PURE__ */ new Set([r.id]);
@@ -322,12 +322,12 @@ function Pe(e) {
322
322
  }
323
323
  //#endregion
324
324
  //#region src/browser/dom/blueprint/designer-blueprint-default-canvas.ts
325
- var Fe = 0, I = 8, L = .3, Ie = 2, R = O.blueprint.graph, Le = [
325
+ var Pe = 0, I = 8, L = .3, Fe = 2, R = O.blueprint.graph, Ie = [
326
326
  "lifecycle",
327
327
  "timer",
328
328
  "condition",
329
329
  "host"
330
- ], Re = {
330
+ ], Le = {
331
331
  component: "cube",
332
332
  variable: "variable",
333
333
  host: "database",
@@ -337,14 +337,14 @@ var Fe = 0, I = 8, L = .3, Ie = 2, R = O.blueprint.graph, Le = [
337
337
  "sub-canvas": "copy",
338
338
  "main-canvas": "grid"
339
339
  };
340
- function ze(e) {
341
- let t = new Be(e);
340
+ function Re(e) {
341
+ let t = new ze(e);
342
342
  return {
343
343
  element: t.element,
344
344
  destroy: () => t.destroy()
345
345
  };
346
346
  }
347
- var Be = class {
347
+ var ze = class {
348
348
  element;
349
349
  #e;
350
350
  #t;
@@ -429,7 +429,7 @@ var Be = class {
429
429
  this.#d = e, this.#h = e.selection, (t === void 0 || t.documentRevision !== e.documentRevision) && this.#m.clear(), !this.#p && e.graph.viewport !== void 0 && (this.#f = {
430
430
  x: e.graph.viewport.x,
431
431
  y: e.graph.viewport.y,
432
- z: z(e.graph.viewport.zoom, L, Ie)
432
+ z: z(e.graph.viewport.zoom, L, Fe)
433
433
  }, this.#p = !0), this.element.dataset.active = String(e.active), this.render();
434
434
  let n = e.viewRequest;
435
435
  n !== void 0 && n.id !== this.#T ? (this.#T = n.id, n.type === "fit" ? this.fit() : n.type === "auto-layout" ? this.autoLayout() : n.targetId !== void 0 && this.focus(n.targetId)) : !this.#p && e.graph.nodes.length > 0 && (this.#p = !0, this.fit());
@@ -481,7 +481,7 @@ var Be = class {
481
481
  portPoint(e, t, n) {
482
482
  let r = this.rows(e), i = Math.max(0, r.findIndex((e) => t === "semantic" ? e === "semantic" : e !== "semantic" && e.id === t && e.direction === n)), a = this.position(e);
483
483
  return {
484
- x: n === "out" ? a.x + 164 + Fe : a.x - Fe,
484
+ x: n === "out" ? a.x + 164 + Pe : a.x - Pe,
485
485
  y: a.y + 1 + 44 + 12 + i * 27 + 27 / 2
486
486
  };
487
487
  }
@@ -511,7 +511,7 @@ var Be = class {
511
511
  }
512
512
  let i = r.unavailableReason === void 0 ? r.id : `${r.id} · ${r.unavailableReason}`, a = n.get(`${e.id}\u0000${r.direction}\u0000${r.id}`);
513
513
  return `<div class="bp-anchor" data-dir="${r.direction}" data-available="${String(r.available)}" title="${T(i)}"><span class="bp-port${r.connected ? " is-used" : ""}" data-bp-node="${T(e.id)}" data-bp-port="${T(r.id)}" data-bp-dir="${r.direction}" data-available="${String(r.available)}"${a === void 0 ? "" : ` data-category="${a}"`}></span><span class="bp-anchor-label">${_(r.label)}</span></div>`;
514
- }).join(""), a = e.kind === "sub-canvas" && e.canvasDisplay !== void 0 ? R.subCanvasKinds[e.canvasDisplay] : R.nodeKinds[e.kind], o = e.kind === "sub-canvas" && e.canvasDisplay === "page" ? "doc" : Re[e.kind], s = this.#v === e.id ? `<input class="bp-rename" data-bp-rename-input value="${T(e.name ?? e.title)}" maxlength="64" aria-label="${T(R.nodeName)}">` : _(e.title);
514
+ }).join(""), a = e.kind === "sub-canvas" && e.canvasDisplay !== void 0 ? R.subCanvasKinds[e.canvasDisplay] : R.nodeKinds[e.kind], o = e.kind === "sub-canvas" && e.canvasDisplay === "page" ? "doc" : Le[e.kind], s = this.#v === e.id ? `<input class="bp-rename" data-bp-rename-input value="${T(e.name ?? e.title)}" maxlength="64" aria-label="${T(R.nodeName)}">` : _(e.title);
515
515
  return `<div class="bp-node" data-bp-node-id="${T(e.id)}" data-kind="${e.kind}" data-enabled="${String(e.enabled)}" style="left:${r.x}px;top:${r.y}px;min-height:${this.height(e)}px" role="group" aria-label="${T(`${a} ${e.title}`)}">
516
516
  <div class="bp-node-header" data-bp-drag="${T(e.id)}" title="${T(`${e.title} · ${e.subtitle}`)}"><span class="bp-node-icon" aria-hidden="true">${k(o)}</span><span class="bp-node-heading"><span class="bp-node-title" data-bp-rename="${T(e.id)}">${s}</span>${e.title === a ? "" : `<span class="bp-node-kind">${_(a)}</span>`}</span></div>
517
517
  <div class="bp-node-content">${i}</div>
@@ -547,7 +547,7 @@ var Be = class {
547
547
  if (!this.visibleEdge(e)) continue;
548
548
  let t = this.node(e.source), a = this.node(e.target);
549
549
  if (t === void 0 || a === void 0) continue;
550
- let o = Ve(this.portPoint(t, e.sourcePort, "out"), this.portPoint(a, e.targetPort, "in")), s = [
550
+ let o = Be(this.portPoint(t, e.sourcePort, "out"), this.portPoint(a, e.targetPort, "in")), s = [
551
551
  "bp-edge",
552
552
  `is-${e.kind}`,
553
553
  e.active ? "" : "is-off",
@@ -557,7 +557,7 @@ var Be = class {
557
557
  let c = e.order !== void 0 && (e.siblingCount ?? 1) > 1 ? `#${e.order} ` : "";
558
558
  i += `<div class="bp-edge-label" data-bp-edge-label="${T(e.id)}" data-category="${e.category}" style="left:${o.mid.x}px;top:${o.mid.y}px">${_(c + e.label)}</div>`;
559
559
  }
560
- e !== void 0 && (r += `<path class="bp-edge-ghost" d="${Ve(e.from, e.to).d}"/><circle class="bp-edge-ghost-end" cx="${e.to.x}" cy="${e.to.y}" r="4"/>`);
560
+ e !== void 0 && (r += `<path class="bp-edge-ghost" d="${Be(e.from, e.to).d}"/><circle class="bp-edge-ghost-end" cx="${e.to.x}" cy="${e.to.y}" r="4"/>`);
561
561
  let a = `${r}\u0000${i}`;
562
562
  a !== this.#O && (this.#O = a, this.#r.innerHTML = r, this.#a.innerHTML = i), this.applyEdgeState();
563
563
  }
@@ -648,7 +648,7 @@ var Be = class {
648
648
  e !== null && (e.textContent = `${Math.round(this.#f.z * 100)}%`);
649
649
  }
650
650
  zoomAt(e, t, n) {
651
- let r = z(this.#f.z * e, L, Ie), i = r / this.#f.z;
651
+ let r = z(this.#f.z * e, L, Fe), i = r / this.#f.z;
652
652
  this.#f = {
653
653
  x: t - (t - this.#f.x) * i,
654
654
  y: n - (n - this.#f.y) * i,
@@ -677,7 +677,7 @@ var Be = class {
677
677
  x: i.width / 2 - (a.x + 164 / 2) * this.#f.z,
678
678
  y: i.height / 2 - (a.y + this.height(r) / 2) * this.#f.z
679
679
  }, this.applyView();
680
- let o = this.#i.querySelector(`[data-bp-node-id="${Ue(r.id)}"]`);
680
+ let o = this.#i.querySelector(`[data-bp-node-id="${He(r.id)}"]`);
681
681
  o?.classList.add("is-flash"), setTimeout(() => o?.classList.remove("is-flash"), 600);
682
682
  }
683
683
  autoLayout() {
@@ -856,7 +856,7 @@ var Be = class {
856
856
  y: Math.round((a.y + r) / I) * I
857
857
  };
858
858
  this.#m.set(e, o);
859
- let s = this.#i.querySelector(`[data-bp-node-id="${Ue(e)}"]`);
859
+ let s = this.#i.querySelector(`[data-bp-node-id="${He(e)}"]`);
860
860
  s !== null && (s.style.left = `${o.x}px`, s.style.top = `${o.y}px`);
861
861
  }), this.#D = "", this.renderEdges();
862
862
  return;
@@ -1104,7 +1104,7 @@ var Be = class {
1104
1104
  }
1105
1105
  addItems() {
1106
1106
  let e = new Set(this.graph.nodes.map((e) => e.kind));
1107
- return Le.map((t) => this.menuItem(`add:${t}`, Re[t], R.nodeKinds[t], { disabled: (t === "host" || t === "lifecycle") && e.has(t) })).join("");
1107
+ return Ie.map((t) => this.menuItem(`add:${t}`, Le[t], R.nodeKinds[t], { disabled: (t === "host" || t === "lifecycle") && e.has(t) })).join("");
1108
1108
  }
1109
1109
  openMenu(e, t, n, r) {
1110
1110
  let i = n?.closest("[data-bp-node-id]") ?? null, a = n?.closest("[data-bp-edge]") ?? null;
@@ -1125,7 +1125,7 @@ var Be = class {
1125
1125
  edges: []
1126
1126
  });
1127
1127
  this.#w = this.toWorld(e, t);
1128
- let o = R.menu, s = this.#h.nodes.map((e) => this.node(e)).filter(He), c = s.length === 1 ? s[0] : void 0, l = "";
1128
+ let o = R.menu, s = this.#h.nodes.map((e) => this.node(e)).filter(Ve), c = s.length === 1 ? s[0] : void 0, l = "";
1129
1129
  if (s.length > 1 && (l += `<div class="designer-context-menu-heading"><span class="designer-context-menu-heading-icon" aria-hidden="true">${k("select-all")}</span><span class="designer-context-menu-heading-label">${_(R.multiSelection(s.length, this.#h.edges.length))}</span></div>`), s.length > 0) {
1130
1130
  let e = s.some((e) => e.enabled);
1131
1131
  l += this.menuItem("delete", "trash", o.delete, {
@@ -1222,7 +1222,7 @@ var Be = class {
1222
1222
  }
1223
1223
  }
1224
1224
  };
1225
- function Ve(e, t) {
1225
+ function Be(e, t) {
1226
1226
  let n = Math.abs(t.x - e.x), r = t.x < e.x ? .8 : .5, i = {
1227
1227
  x: e.x + n * r,
1228
1228
  y: e.y
@@ -1242,15 +1242,15 @@ function Ve(e, t) {
1242
1242
  function z(e, t, n) {
1243
1243
  return Math.min(n, Math.max(t, e));
1244
1244
  }
1245
- function He(e) {
1245
+ function Ve(e) {
1246
1246
  return e !== void 0;
1247
1247
  }
1248
- function Ue(e) {
1248
+ function He(e) {
1249
1249
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&");
1250
1250
  }
1251
1251
  //#endregion
1252
1252
  //#region src/browser/dom/blueprint/designer-blueprint-workbench-dom.ts
1253
- function We(e, t, n, r) {
1253
+ function Ue(e, t, n, r) {
1254
1254
  let i = e.querySelector(".designer");
1255
1255
  i !== null && (i.dataset.authoringMode = t);
1256
1256
  let a = e.querySelector("[data-blueprint-surface]");
@@ -1264,23 +1264,23 @@ function We(e, t, n, r) {
1264
1264
  let o = t === "blueprint" ? O.commandPalette.blueprintTrigger : O.commandPalette.trigger, s = e.querySelector("[data-command-palette-trigger-label]");
1265
1265
  s !== null && (s.textContent = o);
1266
1266
  let c = e.querySelector("[data-command-palette-toggle]");
1267
- if (c !== null && (c.ariaLabel = o, c.setAttribute("data-tip", o)), Ge(e, t, r.nodes), t !== "blueprint") return;
1267
+ if (c !== null && (c.ariaLabel = o, c.setAttribute("data-tip", o)), We(e, t, r.nodes), t !== "blueprint") return;
1268
1268
  let l = e.querySelector("[data-status-selection]");
1269
1269
  l !== null && (l.textContent = O.blueprint.workbench);
1270
1270
  let u = e.querySelector("[data-status-canvas]");
1271
1271
  u !== null && (u.textContent = O.blueprint.status(r.nodes, r.relations, r.semantic, r.structural, r.problems));
1272
1272
  }
1273
- function Ge(e, t, n) {
1273
+ function We(e, t, n) {
1274
1274
  let r = t === "blueprint", i = e.querySelector("[data-blueprint-library]"), a = e.querySelector("[data-blueprint-inspector]");
1275
- i !== null && (i.hidden = !r), a !== null && (a.hidden = !r), Ke(e, "left", r, O.blueprint.library, n), Ke(e, "right", r, O.blueprint.inspector);
1275
+ i !== null && (i.hidden = !r), a !== null && (a.hidden = !r), Ge(e, "left", r, O.blueprint.library, n), Ge(e, "right", r, O.blueprint.inspector);
1276
1276
  }
1277
- function Ke(e, t, n, r, i) {
1277
+ function Ge(e, t, n, r, i) {
1278
1278
  let a = e.querySelector(`[data-${t}-panel-title]`), o = e.querySelector(`[data-${t}-panel-count]`);
1279
1279
  a !== null && (n ? (a.dataset.canvasTitle ??= a.textContent ?? "", a.textContent = r) : a.dataset.canvasTitle !== void 0 && (a.textContent = a.dataset.canvasTitle, delete a.dataset.canvasTitle)), o !== null && (n ? (o.dataset.canvasCount ??= o.textContent ?? "", o.dataset.canvasAriaLabel ??= o.getAttribute("aria-label") ?? "", o.textContent = String(i ?? 0), o.setAttribute("aria-label", O.blueprint.panelCount(r, i ?? 0))) : o.dataset.canvasCount !== void 0 && (o.textContent = o.dataset.canvasCount, o.setAttribute("aria-label", o.dataset.canvasAriaLabel ?? ""), delete o.dataset.canvasCount, delete o.dataset.canvasAriaLabel));
1280
1280
  }
1281
1281
  //#endregion
1282
1282
  //#region src/browser/controllers/blueprint/designer-blueprint-canvas-bridge-helpers.ts
1283
- function qe(e) {
1283
+ function Ke(e) {
1284
1284
  return typeof e == "object" && !!e && !Array.isArray(e);
1285
1285
  }
1286
1286
  function B(e, t) {
@@ -1297,15 +1297,15 @@ function V(e, t) {
1297
1297
  diagnostics: [B(e, t)]
1298
1298
  };
1299
1299
  }
1300
- function Je(e, t) {
1301
- let n = qe(e) && typeof e.commandId == "string" ? e.commandId.slice(0, 128) : "invalid-command";
1300
+ function qe(e, t) {
1301
+ let n = Ke(e) && typeof e.commandId == "string" ? e.commandId.slice(0, 128) : "invalid-command";
1302
1302
  return w({
1303
1303
  commandId: n,
1304
1304
  status: "rejected",
1305
1305
  diagnostics: t
1306
1306
  });
1307
1307
  }
1308
- function Ye(e) {
1308
+ function Je(e) {
1309
1309
  return { hasBlueprintCapability: (t) => {
1310
1310
  try {
1311
1311
  return e()?.hasBlueprintCapability(t) === !0;
@@ -1314,13 +1314,13 @@ function Ye(e) {
1314
1314
  }
1315
1315
  } };
1316
1316
  }
1317
- function Xe(e) {
1317
+ function Ye(e) {
1318
1318
  let t = O.blueprint.graph.connection;
1319
1319
  return e === "duplicate" ? t.duplicate : e === "cycle" ? t.cycle : e === "unavailable" ? t.unavailable : t.invalid;
1320
1320
  }
1321
1321
  //#endregion
1322
1322
  //#region src/browser/controllers/blueprint/designer-blueprint-canvas-bridge.ts
1323
- var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1323
+ var Xe = 256, H = O.blueprint.graph, Ze = class {
1324
1324
  callbacks;
1325
1325
  #e;
1326
1326
  #t;
@@ -1367,7 +1367,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1367
1367
  selection: this.callbacks.getSelection(),
1368
1368
  diagnostics: this.stateDiagnostics(),
1369
1369
  trace: this.#n,
1370
- simulationTriggers: n === void 0 ? [] : Oe(e, n),
1370
+ simulationTriggers: n === void 0 ? [] : De(e, n),
1371
1371
  showSemantic: this.callbacks.getShowSemantic(),
1372
1372
  ...r === void 0 ? {} : { viewRequest: r },
1373
1373
  ...this.#r === void 0 ? {} : { lastCommand: this.#r }
@@ -1378,7 +1378,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1378
1378
  let t = this.callbacks.getDocument();
1379
1379
  if (t === void 0) return V("AUTHORING_EXPIRED", O.lifecycle.unloaded);
1380
1380
  if (e === null) return V("AUTHORING_REQUEST_INVALID", O.blueprint.invalidCommand);
1381
- if (xe(e, t.blueprint)) return {
1381
+ if (be(e, t.blueprint)) return {
1382
1382
  ok: !0,
1383
1383
  value: t,
1384
1384
  diagnostics: []
@@ -1402,7 +1402,7 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1402
1402
  }
1403
1403
  receive(e) {
1404
1404
  if (this.#t === void 0 || !e.composedPath().includes(this.#t)) return;
1405
- let t = e.detail, n = qe(t) && Object.keys(t).length === 1 && "command" in t ? t.command : void 0, r = ne(n);
1405
+ let t = e.detail, n = Ke(t) && Object.keys(t).length === 1 && "command" in t ? t.command : void 0, r = ne(n);
1406
1406
  if (!r.ok) {
1407
1407
  this.rejectUnknown(n, r.diagnostics);
1408
1408
  return;
@@ -1439,8 +1439,8 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1439
1439
  r = this.callbacks.select(t.selection, !1);
1440
1440
  break;
1441
1441
  case "connect": {
1442
- let i = e(n.blueprint, t.from, t.to, we(n, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions()));
1443
- r = i.ok ? this.commitBlueprint(i.blueprint) : V("AUTHORING_REQUEST_INVALID", Xe(i.reason)), r.ok && i.ok && (r = this.callbacks.select({
1442
+ let i = e(n.blueprint, t.from, t.to, Ce(n, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions()));
1443
+ r = i.ok ? this.commitBlueprint(i.blueprint) : V("AUTHORING_REQUEST_INVALID", Ye(i.reason)), r.ok && i.ok && (r = this.callbacks.select({
1444
1444
  nodes: [],
1445
1445
  edges: [i.edgeId]
1446
1446
  }, !1));
@@ -1499,147 +1499,67 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1499
1499
  runSimulation(e, t, n) {
1500
1500
  let r = this.callbacks.getDocument();
1501
1501
  if (r === void 0) return V("AUTHORING_EXPIRED", O.lifecycle.unloaded);
1502
- let i = a(r.blueprint, e), o = i === void 0 ? void 0 : et(i, t, n);
1502
+ let i = a(r.blueprint, e), o = i === void 0 ? void 0 : Qe(i, t, n);
1503
1503
  if (o === void 0) return V("AUTHORING_REQUEST_INVALID", O.blueprint.invalidCommand);
1504
- let s = ue(r, { hasBlueprintCapability: () => !0 });
1504
+ let s = de(r, o);
1505
1505
  if (!s.ok) return s;
1506
- let c = s.value, l = [], u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set([e]), f = new Map(this.callbacks.getGraph().nodes.map((e) => [e.id, e.title])), p = c.initialVariables, m = /* @__PURE__ */ new Set(), h = (r.subCanvases ?? []).filter((e) => e.display === "page").map((e) => e.id), g = ye(r), _ = [], v = (e, t) => {
1507
- x.push({
1508
- event: e,
1509
- depth: t
1506
+ let { plan: c, dispatches: l } = s.value, u = [], d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set([e]), p = new Map(this.callbacks.getGraph().nodes.map((e) => [e.id, e.title]));
1507
+ for (let { depth: e, ruleTraces: t } of l) for (let n of t) {
1508
+ if (!n.triggerMatched) continue;
1509
+ let t = c.rules.find((e) => e.id === n.ruleId);
1510
+ if (t === void 0) continue;
1511
+ f.add(t.nodeId), u.push({
1512
+ kind: e === 0 ? "trigger" : "cascade",
1513
+ nodeId: t.nodeId,
1514
+ depth: e,
1515
+ text: p.get(t.nodeId) ?? t.nodeId
1510
1516
  });
1511
- }, y = (e, t, n, r) => {
1512
- if (e === void 0 || e === g || !h.includes(e)) return;
1513
- for (let e of [...m].reverse()) m.delete(e), v({
1514
- type: "canvas-event",
1515
- canvasId: e,
1516
- name: "closed",
1517
- payload: null
1518
- }, r);
1519
- let i = g;
1520
- i !== null && (n && _.push(i), v({
1521
- type: "canvas-event",
1522
- canvasId: i,
1523
- name: "closed",
1524
- payload: null
1525
- }, r)), g = e, v({
1526
- type: "canvas-event",
1527
- canvasId: e,
1528
- name: "opened",
1529
- payload: t ?? null
1530
- }, r), v({
1531
- type: "page-changed",
1532
- name: "page-changed",
1533
- payload: {
1534
- from: i,
1535
- to: e
1536
- }
1537
- }, r);
1538
- }, b = !1, x = [{
1539
- event: o,
1540
- depth: 0
1541
- }];
1542
- for (; x.length > 0;) {
1543
- let { event: e, depth: t } = x.shift();
1544
- if (t > Qe) {
1545
- l.push({
1546
- kind: "error",
1547
- depth: t,
1548
- text: H.simulation.depthExceeded
1549
- }), b = !0;
1550
- break;
1551
- }
1552
- let n = de(c, p, e);
1553
- if (!n.ok) {
1554
- l.push({
1555
- kind: "error",
1556
- depth: t,
1557
- text: n.diagnostics[0]?.message ?? O.blueprint.invalidCommand
1558
- }), b = !0;
1559
- break;
1560
- }
1561
- for (let e of n.value.ruleTraces) {
1562
- if (!e.triggerMatched) continue;
1563
- let n = c.rules.find((t) => t.id === e.ruleId);
1564
- if (n === void 0) continue;
1565
- d.add(n.nodeId), l.push({
1566
- kind: t === 0 ? "trigger" : "cascade",
1567
- nodeId: n.nodeId,
1568
- depth: t,
1569
- text: f.get(n.nodeId) ?? n.nodeId
1570
- });
1571
- let i = [...e.conditions], a = [...e.actions], o = (e, t) => {
1572
- for (let n of e) {
1573
- if (n.type === "condition") {
1574
- let e = i[0];
1575
- if (e === void 0 || e.nodeId !== n.nodeId) return;
1576
- i.shift(), u.add(n.edgeId), d.add(n.nodeId), l.push({
1577
- kind: "condition",
1578
- nodeId: n.nodeId,
1579
- edgeId: n.edgeId,
1580
- passed: e.passed,
1581
- depth: t,
1582
- text: `${f.get(n.nodeId) ?? n.nodeId} · ${e.passed ? H.simulation.passed : H.simulation.failed}`
1583
- }), o(e.passed ? n.yes : n.no, t + 1);
1584
- continue;
1585
- }
1586
- let e = a[0];
1587
- if (e === void 0 || e.edgeId !== n.edgeId) continue;
1588
- a.shift(), u.add(n.edgeId);
1589
- let s = r.blueprint.edges.find((e) => e.id === n.edgeId)?.to.node;
1590
- s !== void 0 && d.add(s), l.push({
1591
- kind: n.action.type === "request-variable" || n.action.type === "request-component-data" ? "request" : "action",
1517
+ let i = [...n.conditions], a = [...n.actions], o = (e, t) => {
1518
+ for (let n of e) {
1519
+ if (n.type === "condition") {
1520
+ let e = i[0];
1521
+ if (e === void 0 || e.nodeId !== n.nodeId) return;
1522
+ i.shift(), d.add(n.edgeId), f.add(n.nodeId), u.push({
1523
+ kind: "condition",
1524
+ nodeId: n.nodeId,
1592
1525
  edgeId: n.edgeId,
1593
- ...s === void 0 ? {} : { nodeId: s },
1526
+ passed: e.passed,
1594
1527
  depth: t,
1595
- text: tt(n.action, r)
1596
- });
1597
- }
1598
- };
1599
- o(n.steps, t + 1);
1600
- }
1601
- let i = n.value.variables;
1602
- for (let [e, n] of Object.entries(i)) xe(n, p[e] ?? null) && e in p || x.push({
1603
- event: {
1604
- type: "variable-event",
1605
- variableId: e,
1606
- name: "data-updated",
1607
- payload: n
1608
- },
1609
- depth: t + 1
1610
- });
1611
- p = i;
1612
- for (let e of n.value.canvasEffects) {
1613
- if (e.type === "page-navigation") {
1614
- if (e.operation === "back") y(_.pop(), void 0, !1, t + 1);
1615
- else {
1616
- let n = g === null ? -1 : h.indexOf(g);
1617
- y(h[e.operation === "next" ? n + 1 : n - 1], void 0, !0, t + 1);
1528
+ text: `${p.get(n.nodeId) ?? n.nodeId} · ${e.passed ? H.simulation.passed : H.simulation.failed}`
1529
+ }), o(e.passed ? n.yes : n.no, t + 1);
1530
+ continue;
1618
1531
  }
1619
- continue;
1620
- }
1621
- if (h.includes(e.canvasId)) {
1622
- e.operation === "open" || e.operation === "toggle" && e.canvasId !== g ? y(e.canvasId, e.payload, !0, t + 1) : e.canvasId === g && y(_.pop(), void 0, !1, t + 1);
1623
- continue;
1532
+ let e = a[0];
1533
+ if (e === void 0 || e.edgeId !== n.edgeId) continue;
1534
+ a.shift(), d.add(n.edgeId);
1535
+ let s = r.blueprint.edges.find((e) => e.id === n.edgeId)?.to.node;
1536
+ s !== void 0 && f.add(s), u.push({
1537
+ kind: n.action.type === "request-variable" || n.action.type === "request-component-data" ? "request" : "action",
1538
+ edgeId: n.edgeId,
1539
+ ...s === void 0 ? {} : { nodeId: s },
1540
+ depth: t,
1541
+ text: $e(n.action, r)
1542
+ });
1624
1543
  }
1625
- let n = e.operation === "open" || e.operation !== "close" && !m.has(e.canvasId);
1626
- n !== m.has(e.canvasId) && (n ? m.add(e.canvasId) : m.delete(e.canvasId), v({
1627
- type: "canvas-event",
1628
- canvasId: e.canvasId,
1629
- name: n ? "opened" : "closed",
1630
- payload: n ? e.payload ?? null : null
1631
- }, t + 1));
1632
- }
1544
+ };
1545
+ o(t.steps, e + 1);
1633
1546
  }
1547
+ let m = s.value.failure;
1548
+ m !== void 0 && u.push({
1549
+ kind: "error",
1550
+ depth: m.depth,
1551
+ text: m.kind === "depth-exceeded" ? H.simulation.depthExceeded : m.message
1552
+ });
1553
+ let h = m !== void 0;
1634
1554
  return this.#n = {
1635
1555
  trigger: {
1636
1556
  nodeId: e,
1637
1557
  port: t
1638
1558
  },
1639
- executedEdgeIds: [...u],
1640
- visitedNodeIds: [...d],
1641
- steps: l,
1642
- failed: b
1559
+ executedEdgeIds: [...d],
1560
+ visitedNodeIds: [...f],
1561
+ steps: u,
1562
+ failed: h
1643
1563
  }, {
1644
1564
  ok: !0,
1645
1565
  value: null,
@@ -1652,16 +1572,16 @@ var Ze = 256, Qe = 32, H = O.blueprint.graph, $e = class {
1652
1572
  status: t,
1653
1573
  diagnostics: n
1654
1574
  });
1655
- this.#r = r, this.#a.set(e, r), this.#a.size > Ze && this.#a.delete(this.#a.keys().next().value), this.callbacks.render(), t === "rejected" && this.callbacks.emitDiagnostics(n);
1575
+ this.#r = r, this.#a.set(e, r), this.#a.size > Xe && this.#a.delete(this.#a.keys().next().value), this.callbacks.render(), t === "rejected" && this.callbacks.emitDiagnostics(n);
1656
1576
  }
1657
1577
  rejectUnknown(e, t) {
1658
- this.#r = Je(e, t), this.callbacks.render(), this.callbacks.emitDiagnostics(t);
1578
+ this.#r = qe(e, t), this.callbacks.render(), this.callbacks.emitDiagnostics(t);
1659
1579
  }
1660
1580
  get capabilities() {
1661
- return Ye(this.callbacks.getRuntimeContributions);
1581
+ return Je(this.callbacks.getRuntimeContributions);
1662
1582
  }
1663
1583
  };
1664
- function et(e, t, n) {
1584
+ function Qe(e, t, n) {
1665
1585
  if (e.kind === "component") {
1666
1586
  if (t === "state-changed") return {
1667
1587
  type: "component-state-changed",
@@ -1705,7 +1625,7 @@ function et(e, t, n) {
1705
1625
  payload: n
1706
1626
  };
1707
1627
  }
1708
- function tt(e, t) {
1628
+ function $e(e, t) {
1709
1629
  let n = (e) => t.components.find((t) => t.id === e)?.name ?? e;
1710
1630
  switch (e.type) {
1711
1631
  case "component-visibility": return `${H.ports[e.operation] ?? e.operation} · ${n(e.componentId)}`;
@@ -1727,18 +1647,18 @@ function tt(e, t) {
1727
1647
  }
1728
1648
  //#endregion
1729
1649
  //#region src/common/operations/blueprint/designer-blueprint-value-sources.ts
1730
- var nt = new RegExp(me);
1731
- function rt(e, t) {
1650
+ var et = new RegExp(me);
1651
+ function tt(e, t) {
1732
1652
  return c(e.blueprint, t).some((e) => e.node.kind === "component" || e.node.kind === "sub-canvas" && e.port === "opened" || e.node.kind === "main-canvas" && e.port === "page-changed");
1733
1653
  }
1734
- function it(e) {
1654
+ function nt(e) {
1735
1655
  let t = e.split(".").map((e) => e.trim());
1736
- return t.length === 0 || t.length > fe || t.some((e) => e === "" || !nt.test(e)) ? null : t;
1656
+ return t.length === 0 || t.length > fe || t.some((e) => e === "" || !et.test(e)) ? null : t;
1737
1657
  }
1738
- function at(e) {
1658
+ function rt(e) {
1739
1659
  return e.kind === "literal" ? "literal" : e.kind === "event-payload" ? e.path.length === 0 ? "event" : "event-field" : e.kind === "variable" ? "variable" : "advanced";
1740
1660
  }
1741
- function ot(e, t, n) {
1661
+ function it(e, t, n) {
1742
1662
  let r = [], i = /* @__PURE__ */ new Set();
1743
1663
  for (let a of c(e.blueprint, t)) {
1744
1664
  if (a.node.kind !== "component") continue;
@@ -1751,22 +1671,22 @@ function ot(e, t, n) {
1751
1671
  continue;
1752
1672
  }
1753
1673
  let t = a.node.componentId, o = N(a.port), s = e.components.find((e) => e.id === t), c = n?.get(s?.type ?? "")?.manifest.editorDescriptor?.events?.find((e) => e.name === o)?.payloadSchema;
1754
- if (c !== void 0) for (let e of st(c)) {
1674
+ if (c !== void 0) for (let e of at(c)) {
1755
1675
  let t = e.join(".");
1756
1676
  i.has(t) || (i.add(t), r.push(e));
1757
1677
  }
1758
1678
  }
1759
1679
  return r;
1760
1680
  }
1761
- function st(e, t = []) {
1681
+ function at(e, t = []) {
1762
1682
  return Object.entries(e.properties).flatMap(([e, n]) => {
1763
1683
  let r = [...t, e];
1764
- return n.kind === "object" ? [r, ...st(n, r)] : [r];
1684
+ return n.kind === "object" ? [r, ...at(n, r)] : [r];
1765
1685
  });
1766
1686
  }
1767
1687
  //#endregion
1768
1688
  //#region src/browser/dom/blueprint/designer-blueprint-host-left-panel-dom.ts
1769
- function ct(e, t, n) {
1689
+ function ot(e, t, n) {
1770
1690
  for (let n of e.querySelectorAll(".host-left-panel-view[data-host-left-panel-group]")) {
1771
1691
  let e = n.dataset.hostLeftPanelGroup === t?.id;
1772
1692
  n.hidden = !e, e && t !== void 0 && n.setAttribute("aria-labelledby", oe(t.id));
@@ -1780,7 +1700,7 @@ function ct(e, t, n) {
1780
1700
  }
1781
1701
  //#endregion
1782
1702
  //#region src/browser/dom/blueprint/designer-blueprint-inspector-configuration.ts
1783
- var U = O.blueprint, W = U.graph, lt = [
1703
+ var U = O.blueprint, W = U.graph, st = [
1784
1704
  "eq",
1785
1705
  "neq",
1786
1706
  "gt",
@@ -1789,34 +1709,34 @@ var U = O.blueprint, W = U.graph, lt = [
1789
1709
  "lte",
1790
1710
  "contains",
1791
1711
  "exists"
1792
- ], ut = [
1712
+ ], ct = [
1793
1713
  "appear",
1794
1714
  "fade",
1795
1715
  "slide-up"
1796
- ], dt = [
1716
+ ], lt = [
1797
1717
  "related",
1798
1718
  "detail",
1799
1719
  "group",
1800
1720
  "drill-down"
1801
1721
  ];
1802
- function ft(e, t, n, r) {
1722
+ function ut(e, t, n, r) {
1803
1723
  let i = n.nodes.length + n.edges.length;
1804
1724
  if (e === void 0 || i === 0) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${k("sliders")}</span><p class="designer-empty-title">${U.inspectorEmpty}</p><p class="designer-empty-hint">${U.inspectorEmptyHint}</p></div>`;
1805
- if (i > 1) return pt(n);
1725
+ if (i > 1) return dt(n);
1806
1726
  let a = n.nodes[0];
1807
1727
  if (a !== void 0) {
1808
1728
  let n = t.nodes.find((e) => e.id === a);
1809
- return n === void 0 ? "" : gt(e, t, n);
1729
+ return n === void 0 ? "" : mt(e, t, n);
1810
1730
  }
1811
1731
  let o = t.edges.find((e) => e.id === n.edges[0]);
1812
- return o === void 0 ? "" : vt(e, t, o, r);
1732
+ return o === void 0 ? "" : gt(e, t, o, r);
1813
1733
  }
1814
- function pt(e) {
1734
+ function dt(e) {
1815
1735
  let t = e.nodes.length === 0 ? "" : `<button type="button" class="designer-control designer-button" data-blueprint-nodes-enabled="true">${W.enableNodes}</button><button type="button" class="designer-control designer-button" data-blueprint-nodes-enabled="false">${W.disableNodes}</button>`;
1816
1736
  return `<div class="blueprint-config" data-blueprint-multi>
1817
1737
  ${G("multi", U.selectionOverview, `<p class="blueprint-config-summary">${_(W.multiSelection(e.nodes.length, e.edges.length))}</p>
1818
1738
  <div class="blueprint-config-actions">${t}</div>`)}
1819
- ${ht(W.menu.delete)}
1739
+ ${pt(W.menu.delete)}
1820
1740
  </div>`;
1821
1741
  }
1822
1742
  function G(e, t, n, r = "") {
@@ -1828,17 +1748,17 @@ function K(e, t, n = "row") {
1828
1748
  function q(e, t, n = "") {
1829
1749
  return K(e, `<span class="blueprint-config-value">${t === "" ? "" : `<span>${_(t)}</span>`}${n === "" ? "" : `<code>${_(n)}</code>`}</span>`);
1830
1750
  }
1831
- function mt(e, t, n) {
1751
+ function ft(e, t, n) {
1832
1752
  return `<span data-blueprint-field-switch="${T(e)}" data-checked="${String(t)}" ${n}></span>`;
1833
1753
  }
1834
- function ht(e) {
1754
+ function pt(e) {
1835
1755
  return `<div class="blueprint-config-footer"><button type="button" class="designer-control designer-button blueprint-delete-button" data-variant="danger" data-blueprint-delete>${_(e)}</button></div>`;
1836
1756
  }
1837
1757
  function J(e) {
1838
1758
  return `<p class="blueprint-config-empty">${_(e)}</p>`;
1839
1759
  }
1840
- function gt(e, t, n) {
1841
- let r = (e, t) => e.map((e) => `<li class="blueprint-anchor" data-direction="${t}" data-connected="${String(e.connected)}" data-available="${String(e.available)}"><span class="designer-badge" data-tone="${t === "in" ? "success" : "accent"}">${t === "in" ? W.inputs : W.outputs}</span><span class="blueprint-anchor-label">${_(e.label)}</span><code>${_(e.id)}</code></li>`).join(""), i = `${r(n.outputs, "out")}${r(n.inputs, "in")}`, a = i === "" ? J(W.noEdges) : `<ul class="blueprint-anchor-list">${i}</ul>`, o = T(n.id), s = [n.renamable ? K(W.nodeName, `<input type="text" class="designer-control designer-input" data-blueprint-node-field="name" data-node-id="${o}" value="${T(n.name ?? "")}" placeholder="${T(W.nodeNamePlaceholder)}" maxlength="64">`) : "", mt(W.enabledState, n.enabled, `data-blueprint-node-field="enabled" data-node-id="${o}"`)].join(""), c = _t(e, n), l = t.edges.filter((e) => e.source === n.id || e.target === n.id), u = new Map(t.nodes.map((e) => [e.id, e.title])), d = l.length === 0 ? J(W.noEdges) : `<ul class="blueprint-config-edges">${l.map((e) => {
1760
+ function mt(e, t, n) {
1761
+ let r = (e, t) => e.map((e) => `<li class="blueprint-anchor" data-direction="${t}" data-connected="${String(e.connected)}" data-available="${String(e.available)}"><span class="designer-badge" data-tone="${t === "in" ? "success" : "accent"}">${t === "in" ? W.inputs : W.outputs}</span><span class="blueprint-anchor-label">${_(e.label)}</span><code>${_(e.id)}</code></li>`).join(""), i = `${r(n.outputs, "out")}${r(n.inputs, "in")}`, a = i === "" ? J(W.noEdges) : `<ul class="blueprint-anchor-list">${i}</ul>`, o = T(n.id), s = [n.renamable ? K(W.nodeName, `<input type="text" class="designer-control designer-input" data-blueprint-node-field="name" data-node-id="${o}" value="${T(n.name ?? "")}" placeholder="${T(W.nodeNamePlaceholder)}" maxlength="64">`) : "", ft(W.enabledState, n.enabled, `data-blueprint-node-field="enabled" data-node-id="${o}"`)].join(""), c = ht(e, n), l = t.edges.filter((e) => e.source === n.id || e.target === n.id), u = new Map(t.nodes.map((e) => [e.id, e.title])), d = l.length === 0 ? J(W.noEdges) : `<ul class="blueprint-config-edges">${l.map((e) => {
1842
1762
  let t = e.target === n.id, r = t ? e.source : e.target;
1843
1763
  return `<li><button type="button" class="blueprint-config-link" data-blueprint-select-edge="${T(e.id)}" data-category="${e.category}"><span class="designer-badge" data-tone="${t ? "success" : "accent"}">${t ? W.upstream : W.downstream}</span><span class="blueprint-config-link-copy"><strong>${_(u.get(r) ?? r)}</strong><small>${_(e.label)}</small></span><span class="blueprint-config-link-arrow" aria-hidden="true">${k("chevron-right")}</span></button></li>`;
1844
1764
  }).join("")}</ul>`;
@@ -1849,7 +1769,7 @@ function gt(e, t, n) {
1849
1769
  ${G("edges", W.edgeList, d, String(l.length))}
1850
1770
  </div>`;
1851
1771
  }
1852
- function _t(e, t) {
1772
+ function ht(e, t) {
1853
1773
  let n = T(t.id);
1854
1774
  switch (t.kind) {
1855
1775
  case "timer": return K(U.timerInterval, `<input type="number" class="designer-control designer-input" min="1" max="86400" step="1" data-blueprint-node-field="interval" data-node-id="${n}" value="${t.intervalSeconds ?? 5}">`);
@@ -1857,26 +1777,26 @@ function _t(e, t) {
1857
1777
  let r = t.condition;
1858
1778
  return r === void 0 ? "" : [
1859
1779
  Y(e, "node", t.id, "left", W.conditionLeft, r.left, !0),
1860
- K(U.conditionOperatorLabel, `<select class="designer-control designer-select" data-blueprint-node-field="operator" data-node-id="${n}">${lt.map((e) => `<option value="${e}"${e === r.operator ? " selected" : ""}>${_(U.conditionOperator(e))}</option>`).join("")}</select>`),
1780
+ K(U.conditionOperatorLabel, `<select class="designer-control designer-select" data-blueprint-node-field="operator" data-node-id="${n}">${st.map((e) => `<option value="${e}"${e === r.operator ? " selected" : ""}>${_(U.conditionOperator(e))}</option>`).join("")}</select>`),
1861
1781
  r.operator === "exists" || r.right === void 0 ? "" : Y(e, "node", t.id, "right", W.conditionRight, r.right, !0)
1862
1782
  ].join("");
1863
1783
  }
1864
1784
  case "component": return q(W.material, "", t.materialType ?? t.subtitle);
1865
1785
  case "variable": {
1866
1786
  let n = A(e).find((e) => e.id === t.variableId);
1867
- return [q(U.variableId, "", t.variableId ?? ""), q(W.initialValue, "", bt(JSON.stringify(n?.initialValue ?? null) ?? "null"))].join("");
1787
+ return [q(U.variableId, "", t.variableId ?? ""), q(W.initialValue, "", vt(JSON.stringify(n?.initialValue ?? null) ?? "null"))].join("");
1868
1788
  }
1869
1789
  default: return J(t.subtitle);
1870
1790
  }
1871
1791
  }
1872
- function vt(e, t, n, r) {
1792
+ function gt(e, t, n, r) {
1873
1793
  let i = new Map(t.nodes.map((e) => [e.id, e])), a = i.get(n.source), o = i.get(n.target), s = T(n.id), c = a?.outputs.find((e) => e.id === n.sourcePort), l = o?.inputs.find((e) => e.id === n.targetPort), u = [q(W.source, `${a?.title ?? n.source} · ${c?.label ?? n.sourcePort}`, n.sourcePort), q(W.target, n.kind === "semantic" ? o?.title ?? n.target : `${o?.title ?? n.target} · ${l?.label ?? n.targetPort}`, n.kind === "semantic" ? "" : n.targetPort)].join(""), d = [];
1874
- if (n.kind === "semantic") d.push(K(W.role, `<select class="designer-control designer-select" data-blueprint-edge-field="role" data-edge-id="${s}">${dt.map((e) => `<option value="${e}"${e === n.role ? " selected" : ""}>${_(U.semanticRoles[e])}</option>`).join("")}</select>`), J(U.semanticHint));
1794
+ if (n.kind === "semantic") d.push(K(W.role, `<select class="designer-control designer-select" data-blueprint-edge-field="role" data-edge-id="${s}">${lt.map((e) => `<option value="${e}"${e === n.role ? " selected" : ""}>${_(U.semanticRoles[e])}</option>`).join("")}</select>`), J(U.semanticHint));
1875
1795
  else {
1876
1796
  let t = o?.inputs.filter((e) => e.available) ?? [];
1877
1797
  o?.kind === "host" && n.targetPort.startsWith("event:") ? d.push(K(W.hostEventName, `<input type="text" class="designer-control designer-input" data-blueprint-edge-field="host-event" data-edge-id="${s}" value="${T(n.targetPort.slice(6))}" maxlength="128">`)) : t.length > 1 && d.push(K(W.targetPort, `<select class="designer-control designer-select" data-blueprint-edge-field="target-port" data-edge-id="${s}">${t.map((e) => `<option value="${T(e.id)}"${e.id === n.targetPort ? " selected" : ""}>${_(e.label)}</option>`).join("")}</select>`));
1878
- let i = rt(e, n.id);
1879
- if (n.value !== void 0 && d.push(Y(e, "edge", n.id, "value", W.writeValue, n.value, i, r)), o?.kind === "sub-canvas" && (n.targetPort === "open" || n.targetPort === "toggle") && d.push(mt(W.popupPayload, n.payload !== void 0, `data-blueprint-edge-field="payload-enabled" data-edge-id="${s}"`)), n.payload !== void 0 && d.push(Y(e, "edge", n.id, "payload", o?.kind === "sub-canvas" ? W.popupPayloadValue : W.payload, n.payload, i, r)), o?.kind === "component" && n.targetPort === "set-state") {
1798
+ let i = tt(e, n.id);
1799
+ if (n.value !== void 0 && d.push(Y(e, "edge", n.id, "value", W.writeValue, n.value, i, r)), o?.kind === "sub-canvas" && (n.targetPort === "open" || n.targetPort === "toggle") && d.push(ft(W.popupPayload, n.payload !== void 0, `data-blueprint-edge-field="payload-enabled" data-edge-id="${s}"`)), n.payload !== void 0 && d.push(Y(e, "edge", n.id, "payload", o?.kind === "sub-canvas" ? W.popupPayloadValue : W.payload, n.payload, i, r)), o?.kind === "component" && n.targetPort === "set-state") {
1880
1800
  let t = e.components.find((e) => e.id === o.componentId)?.states?.items ?? [];
1881
1801
  d.push(K(W.targetState, `<select class="designer-control designer-select" data-blueprint-edge-field="state" data-edge-id="${s}">${t.map((e) => `<option value="${T(e.id)}"${e.id === n.stateId ? " selected" : ""}>${_(e.name)}</option>`).join("")}</select>`));
1882
1802
  }
@@ -1888,7 +1808,7 @@ function vt(e, t, n, r) {
1888
1808
  let e = n.transition;
1889
1809
  d.push(K(W.transition, `<select class="designer-control designer-select" data-blueprint-edge-field="transition-effect" data-edge-id="${s}">
1890
1810
  <option value=""${e === void 0 ? " selected" : ""}>${W.noTransition}</option>
1891
- ${ut.map((t) => `<option value="${t}"${e?.effect === t ? " selected" : ""}>${_(W.transitionEffects[t])}</option>`).join("")}
1811
+ ${ct.map((t) => `<option value="${t}"${e?.effect === t ? " selected" : ""}>${_(W.transitionEffects[t])}</option>`).join("")}
1892
1812
  </select>`), e === void 0 ? "" : K(W.durationMs, `<input type="number" class="designer-control designer-input" min="0" max="10000" step="50" data-blueprint-edge-field="transition-duration" data-edge-id="${s}" value="${e.durationMs}">`));
1893
1813
  }
1894
1814
  n.order !== void 0 && (n.siblingCount ?? 1) > 1 && d.push(K(W.executionOrder, `<span class="blueprint-config-order"><span>${_(W.edgeOrder(n.order, n.siblingCount ?? 1))}</span><button type="button" class="designer-control designer-icon-button" data-blueprint-edge-order="earlier" data-edge-id="${s}" data-tip="${T(W.earlier)}" aria-label="${T(W.earlier)}"${n.order <= 1 ? " disabled" : ""}>${k("arrow-up")}</button><button type="button" class="designer-control designer-icon-button" data-blueprint-edge-order="later" data-edge-id="${s}" data-tip="${T(W.later)}" aria-label="${T(W.later)}"${n.order >= (n.siblingCount ?? 1) ? " disabled" : ""}>${k("arrow-down")}</button></span>`));
@@ -1896,11 +1816,11 @@ function vt(e, t, n, r) {
1896
1816
  return `<div class="blueprint-config" data-blueprint-edge-config="${s}" data-category="${n.category}">
1897
1817
  ${G("anchors", W.anchorInfo, u)}
1898
1818
  ${d.length === 0 ? "" : G("edge", W.edgeConfig, d.join(""))}
1899
- ${ht(W.menu.deleteEdge)}
1819
+ ${pt(W.menu.deleteEdge)}
1900
1820
  </div>`;
1901
1821
  }
1902
1822
  function Y(e, t, n, r, i, a, o, s) {
1903
- let c = at(a), l = `data-blueprint-expression="${r}" data-expression-owner="${t}" data-expression-owner-id="${T(n)}"`, u = [
1823
+ let c = rt(a), l = `data-blueprint-expression="${r}" data-expression-owner="${t}" data-expression-owner-id="${T(n)}"`, u = [
1904
1824
  ["literal", U.valueSources.literal],
1905
1825
  ["event", U.valueSources.event],
1906
1826
  ["event-field", U.valueSources.eventField],
@@ -1909,15 +1829,15 @@ function Y(e, t, n, r, i, a, o, s) {
1909
1829
  ].filter(([e]) => e !== "event-field" || o || c === "event-field").map(([e, t]) => `<option value="${e}"${e === c ? " selected" : ""}${e === "advanced" ? " disabled" : ""}>${_(t)}</option>`).join(""), d = "";
1910
1830
  if (a.kind === "literal") d = `<input type="text" class="designer-control designer-input" data-expression-part="literal" value="${T(JSON.stringify(a.value) ?? "null")}" aria-label="${T(U.literalJson)}">`;
1911
1831
  else if (a.kind === "event-payload" && a.path.length > 0) {
1912
- let i = `blueprint-fields-${t}-${n}-${r}`.replace(/[^A-Za-z0-9_-]/g, "-"), o = t === "edge" ? ot(e, n, s) : [];
1832
+ let i = `blueprint-fields-${t}-${n}-${r}`.replace(/[^A-Za-z0-9_-]/g, "-"), o = t === "edge" ? it(e, n, s) : [];
1913
1833
  d = `<input type="text" class="designer-control designer-input" data-expression-part="field" list="${i}" value="${T(a.path.join("."))}" aria-label="${T(U.eventField)}"><datalist id="${i}">${o.map((e) => `<option value="${T(e.join("."))}"></option>`).join("")}</datalist>`;
1914
1834
  } else if (a.kind === "variable") {
1915
1835
  let t = A(e);
1916
1836
  d = `<select class="designer-control designer-select" data-expression-part="variable" aria-label="${T(U.sourceVariable)}">${t.map((e) => `<option value="${T(e.id)}"${e.id === a.variableId ? " selected" : ""}>${_(e.name)}</option>`).join("")}</select>`;
1917
- } else c === "advanced" && (d = `<code class="blueprint-config-advanced">${_(bt(JSON.stringify(a) ?? ""))}</code>`);
1837
+ } else c === "advanced" && (d = `<code class="blueprint-config-advanced">${_(vt(JSON.stringify(a) ?? ""))}</code>`);
1918
1838
  return `<div class="blueprint-expression" ${l}>${K(i, `<span class="blueprint-expression-stack"><select class="designer-control designer-select" data-expression-part="source" aria-label="${T(U.valueSource)}">${u}</select>${d}</span>`, "expression")}</div>`;
1919
1839
  }
1920
- function yt(e) {
1840
+ function _t(e) {
1921
1841
  if (typeof e.querySelectorAll != "function") return;
1922
1842
  let t = e.ownerDocument ?? e;
1923
1843
  for (let n of e.querySelectorAll("[data-blueprint-field-row]")) {
@@ -1942,43 +1862,43 @@ function yt(e) {
1942
1862
  n.replaceWith(e);
1943
1863
  }
1944
1864
  }
1945
- function bt(e, t = 96) {
1865
+ function vt(e, t = 96) {
1946
1866
  return e.length <= t ? e : `${e.slice(0, t - 1)}…`;
1947
1867
  }
1948
1868
  //#endregion
1949
1869
  //#region src/browser/dom/blueprint/designer-blueprint-inspector-dom.ts
1950
- var xt = [
1870
+ var yt = [
1951
1871
  "configuration",
1952
1872
  "problems",
1953
1873
  "trace"
1954
1874
  ];
1955
- function St(e, t, n, r, i, a, o, s) {
1875
+ function bt(e, t, n, r, i, a, o, s) {
1956
1876
  if (e === void 0) return;
1957
1877
  let c = {
1958
1878
  configuration: 0,
1959
1879
  problems: a.length,
1960
1880
  trace: o?.steps.length ?? 0
1961
- }, l = Et(t, n, r, i);
1881
+ }, l = wt(t, n, r, i);
1962
1882
  e.innerHTML = `<div class="blueprint-inspector-shell">
1963
1883
  <header class="blueprint-inspector-topbar">
1964
1884
  <span><strong>${_(l.title)}</strong><small>${_(l.detail)}</small></span>
1965
1885
  <div class="blueprint-inspector-modes" role="tablist" aria-label="${O.blueprint.inspector}">
1966
- ${xt.map((e) => Dt(e, i, c[e])).join("")}
1886
+ ${yt.map((e) => Tt(e, i, c[e])).join("")}
1967
1887
  </div>
1968
1888
  </header>
1969
1889
  <div class="blueprint-panel-scroll inspector-pane" data-blueprint-inspector-pane id="designer-blueprint-inspector-${i}-panel" role="tabpanel" aria-labelledby="designer-blueprint-inspector-${i}-tab" tabindex="0" aria-live="polite">
1970
- ${Ct(i, t, n, r, a, o, s)}
1890
+ ${xt(i, t, n, r, a, o, s)}
1971
1891
  </div>
1972
- </div>`, yt(e);
1892
+ </div>`, _t(e);
1973
1893
  }
1974
- function Ct(e, t, n, r, i, a, o) {
1975
- return e === "problems" ? wt(i) : e === "trace" ? Tt(a) : ft(t, n, r, o);
1894
+ function xt(e, t, n, r, i, a, o) {
1895
+ return e === "problems" ? St(i) : e === "trace" ? Ct(a) : ut(t, n, r, o);
1976
1896
  }
1977
- function wt(e) {
1897
+ function St(e) {
1978
1898
  let t = e.slice(0, 8);
1979
1899
  return t.length === 0 ? `<div class="designer-empty" data-tone="success"><span class="designer-empty-icon" aria-hidden="true">${k("check")}</span><p class="designer-empty-title">${O.blueprint.problemsHealthy}</p><p class="designer-empty-hint">${O.blueprint.problemsHealthyHint}</p></div>` : `<section class="blueprint-inspector-status" data-blueprint-problems><ul>${t.map((e) => `<li data-severity="${e.severity}"><strong>${_(e.code)}</strong><span>${_(e.message)}</span><small>${_(e.path.join(".") || "—")}</small></li>`).join("")}</ul></section>`;
1980
1900
  }
1981
- function Tt(e) {
1901
+ function Ct(e) {
1982
1902
  if (e === null) return `<div class="designer-empty"><span class="designer-empty-icon" aria-hidden="true">${k("terminal")}</span><p class="designer-empty-title">${O.blueprint.noTrace}</p><p class="designer-empty-hint">${O.blueprint.noTraceHint}</p></div>`;
1983
1903
  let t = e.steps.filter((e) => e.kind === "condition" && e.passed === !1).length;
1984
1904
  return `<section class="blueprint-inspector-status" data-blueprint-trace data-failed="${String(e.failed)}">
@@ -1987,7 +1907,7 @@ function Tt(e) {
1987
1907
  <button type="button" class="designer-button" data-blueprint-clear-trace>${O.blueprint.graph.simulation.clear}</button>
1988
1908
  </section>`;
1989
1909
  }
1990
- function Et(e, t, n, r) {
1910
+ function wt(e, t, n, r) {
1991
1911
  let i = O.blueprint;
1992
1912
  if (r === "problems") return {
1993
1913
  title: i.problemsTitle,
@@ -2017,29 +1937,29 @@ function Et(e, t, n, r) {
2017
1937
  detail: s === void 0 ? i.selectionType.edge : `${s.id} | ${i.graph.edgeCategories[s.category]}`
2018
1938
  };
2019
1939
  }
2020
- function Dt(e, t, n) {
1940
+ function Tt(e, t, n) {
2021
1941
  let r = O.blueprint.inspectorTabs[e];
2022
1942
  return `<button type="button" class="blueprint-inspector-mode" id="designer-blueprint-inspector-${e}-tab" role="tab" aria-controls="designer-blueprint-inspector-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-inspector-tab="${e}" data-tip="${r}" aria-label="${r}"><span aria-hidden="true">${k(e === "configuration" ? "sliders" : e === "problems" ? "check" : "terminal")}</span>${n === 0 ? "" : `<em data-tone="${e === "problems" ? "danger" : "neutral"}">${n}</em>`}</button>`;
2023
1943
  }
2024
1944
  //#endregion
2025
1945
  //#region src/browser/dom/blueprint/designer-blueprint-library-dom.ts
2026
- var Ot = [
1946
+ var Et = [
2027
1947
  "components",
2028
1948
  "relations",
2029
1949
  "variables"
2030
- ], kt = [
1950
+ ], Dt = [
2031
1951
  "lifecycle",
2032
1952
  "timer",
2033
1953
  "condition",
2034
1954
  "host"
2035
1955
  ], X = O.blueprint;
2036
- function At(e, t) {
1956
+ function Ot(e, t) {
2037
1957
  if (e === void 0) return;
2038
- let n = (t.groups ?? []).filter((e) => E(e, "blueprint")), r = C(t.activeTab), i = n.some((e) => e.id === r) ? r : void 0, a = Rt(t.activeTab) ? t.activeTab : "components", o = i === void 0 ? a : x(i), s = a === "relations" ? X.relationList.search : X.librarySearch;
1958
+ let n = (t.groups ?? []).filter((e) => E(e, "blueprint")), r = C(t.activeTab), i = n.some((e) => e.id === r) ? r : void 0, a = It(t.activeTab) ? t.activeTab : "components", o = i === void 0 ? a : x(i), s = a === "relations" ? X.relationList.search : X.librarySearch;
2039
1959
  e.innerHTML = `<div class="blueprint-library-shell">
2040
1960
  <nav class="rail-tabs blueprint-library-rail" role="tablist" aria-orientation="vertical" aria-label="${X.library}">
2041
- ${Ot.map((e) => It(e, o)).join("")}
2042
- ${n.map((e) => Lt(e, i)).join("")}
1961
+ ${Et.map((e) => Pt(e, o)).join("")}
1962
+ ${n.map((e) => Ft(e, i)).join("")}
2043
1963
  </nav>
2044
1964
  <section class="rail-view blueprint-library-main"${i === void 0 ? "" : " hidden"}>
2045
1965
  <div class="layer-panel-controls blueprint-library-controls">
@@ -2049,26 +1969,26 @@ function At(e, t) {
2049
1969
  </label>
2050
1970
  </div>
2051
1971
  <div class="blueprint-panel-scroll" id="designer-blueprint-library-${a}-panel" role="tabpanel" aria-labelledby="designer-blueprint-library-${a}-tab" tabindex="0">
2052
- ${jt(a, t)}
1972
+ ${kt(a, t)}
2053
1973
  </div>
2054
1974
  </section>
2055
1975
  </div>`;
2056
1976
  }
2057
- function jt(e, t) {
1977
+ function kt(e, t) {
2058
1978
  let n = t.query.trim().toLocaleLowerCase();
2059
- return e === "components" ? Mt(t.components, t.selection, n, X.layers, X.noComponentNodes) : e === "variables" ? Mt(t.variables, t.selection, n, X.globalVariables, X.noVariables) : Pt(t, n);
1979
+ return e === "components" ? At(t.components, t.selection, n, X.layers, X.noComponentNodes) : e === "variables" ? At(t.variables, t.selection, n, X.globalVariables, X.noVariables) : Mt(t, n);
2060
1980
  }
2061
- function Mt(e, t, n, r, i) {
1981
+ function At(e, t, n, r, i) {
2062
1982
  let a = e.filter((e) => n.length === 0 || `${e.name} ${e.entityId} ${e.subtitle}`.toLocaleLowerCase().includes(n));
2063
1983
  return a.length === 0 ? Z(i) : `<section class="blueprint-palette-group" aria-label="${T(r)}">
2064
1984
  <header><strong>${_(r)}</strong><span>${a.length}</span></header>
2065
1985
  <div class="blueprint-palette-list">
2066
- ${a.map((e) => Nt(e, t)).join("")}
1986
+ ${a.map((e) => jt(e, t)).join("")}
2067
1987
  </div>
2068
1988
  <p class="blueprint-library-hint">${X.componentNodeHint}</p>
2069
1989
  </section>`;
2070
1990
  }
2071
- function Nt(e, t) {
1991
+ function jt(e, t) {
2072
1992
  let n = e.nodeId !== void 0, r = n && t.nodes.includes(e.nodeId ?? ""), i = e.kind === "component", a = n ? `data-blueprint-select-node="${T(e.nodeId ?? "")}"` : i ? `data-blueprint-add-component="${T(e.entityId)}"` : `data-blueprint-add-variable="${T(e.entityId)}"`, o = n ? i ? X.locateComponent(e.name) : X.locateVariable(e.name) : i ? X.addComponent(e.name) : X.addVariableNode(e.name), s = n ? "" : ` draggable="true" data-blueprint-drag-kind="${e.kind}" data-${i ? "component" : "variable"}-id="${T(e.entityId)}" data-blueprint-drag-label="${T(e.name)}"`, c = i ? "layers" : "variable", l = i ? X.componentEventCount(e.eventCount) : e.subtitle;
2073
1993
  return `<div class="designer-list-row blueprint-palette-item" data-density="default" data-depth="${e.depth}" style="--bp-indent: ${e.depth * 16}px" data-placed="${String(n)}" data-selected="${String(r)}" data-node-kind="${e.kind}"${s}>
2074
1994
  <button type="button" class="blueprint-palette-primary" ${a} aria-label="${T(o)}" data-tip="${T(o)}">
@@ -2078,8 +1998,8 @@ function Nt(e, t) {
2078
1998
  </button>
2079
1999
  </div>`;
2080
2000
  }
2081
- function Pt(e, t) {
2082
- let n = X.graph, r = new Set(e.graph.nodes.filter((e) => e.kind === "host" || e.kind === "lifecycle").map((e) => e.kind)), i = kt.filter((e) => t.length === 0 || `${n.nodeKinds[e]} ${n.nodeKindHints[e]} ${e}`.toLocaleLowerCase().includes(t)), a = i.map((t) => {
2001
+ function Mt(e, t) {
2002
+ let n = X.graph, r = new Set(e.graph.nodes.filter((e) => e.kind === "host" || e.kind === "lifecycle").map((e) => e.kind)), i = Dt.filter((e) => t.length === 0 || `${n.nodeKinds[e]} ${n.nodeKindHints[e]} ${e}`.toLocaleLowerCase().includes(t)), a = i.map((t) => {
2083
2003
  let i = t === "host" || t === "lifecycle" ? e.graph.nodes.find((e) => e.kind === t) : void 0, a = r.has(t), o = i === void 0 ? `data-blueprint-insert-node="${t}"` : `data-blueprint-select-node="${T(i.id)}"`, s = X.addLogicNode(n.nodeKinds[t]), c = t === "timer" ? "activity" : t === "condition" ? "sliders" : t === "host" ? "terminal" : "play";
2084
2004
  return `<div class="designer-list-row blueprint-palette-item" data-density="default" data-placed="${String(a)}" data-node-kind="${t}"${a ? "" : ` draggable="true" data-blueprint-drag-kind="${t}" data-blueprint-drag-label="${T(n.nodeKinds[t])}"`}>
2085
2005
  <button type="button" class="blueprint-palette-primary" ${o} aria-label="${T(s)}" data-tip="${T(s)}">
@@ -2102,13 +2022,13 @@ function Pt(e, t) {
2102
2022
  <div class="blueprint-palette-list">${a || Z(X.noLogicNodes)}</div>
2103
2023
  <p class="blueprint-library-hint">${X.directNodeHint}</p>
2104
2024
  </section>
2105
- ${Ft(e, t)}
2025
+ ${Nt(e, t)}
2106
2026
  <section class="blueprint-palette-group" aria-label="${X.graph.edgeList}">
2107
2027
  <header><strong>${X.graph.edgeList}</strong><span>${s.length}</span></header>
2108
2028
  <div class="blueprint-palette-list">${c || Z(n.noEdges)}</div>
2109
2029
  </section>`;
2110
2030
  }
2111
- function Ft(e, t) {
2031
+ function Nt(e, t) {
2112
2032
  let n = e.document?.subCanvases ?? [], r = [...n.some((e) => e.display === "page") ? [{
2113
2033
  id: "",
2114
2034
  name: X.graph.nodeKinds["main-canvas"],
@@ -2136,15 +2056,15 @@ function Ft(e, t) {
2136
2056
  <div class="blueprint-palette-list">${i || Z(X.noSubCanvases)}</div>
2137
2057
  </section>`;
2138
2058
  }
2139
- function It(e, t) {
2059
+ function Pt(e, t) {
2140
2060
  let n = X.libraryTabs[e], r = e === "components" ? X.layers : e === "relations" ? X.logic : X.globalVariables;
2141
2061
  return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="designer-blueprint-library-${e}-tab" role="tab" aria-controls="designer-blueprint-library-${e}-panel" aria-selected="${String(e === t)}" tabindex="${e === t ? 0 : -1}" data-blueprint-library-tab="${e}" data-tip="${r}" aria-label="${r}"><span class="rail-tab-glyph" aria-hidden="true">${k(e === "components" ? "layers" : e === "relations" ? "link" : "variable")}</span><span class="rail-tab-label">${n}</span></button>`;
2142
2062
  }
2143
- function Lt(e, t) {
2063
+ function Ft(e, t) {
2144
2064
  let n = e.id === t, r = x(e.id), i = T(e.label);
2145
2065
  return `<button type="button" class="designer-tab blueprint-library-rail-tab" id="${oe(e.id)}" role="tab" aria-controls="${ie(e.id)}" aria-selected="${String(n)}" tabindex="${n ? 0 : -1}" data-blueprint-library-tab="${r}" data-host-left-panel-group="${T(e.id)}" data-host-left-panel-mode="blueprint" data-tip="${i}" aria-label="${i}"><span class="rail-tab-glyph" aria-hidden="true">${k(e.icon ?? "shapes")}</span><span class="rail-tab-label">${_(e.label)}</span></button>`;
2146
2066
  }
2147
- function Rt(e) {
2067
+ function It(e) {
2148
2068
  return e === "components" || e === "relations" || e === "variables";
2149
2069
  }
2150
2070
  function Z(e) {
@@ -2152,18 +2072,18 @@ function Z(e) {
2152
2072
  }
2153
2073
  //#endregion
2154
2074
  //#region src/browser/controllers/blueprint/designer-blueprint-panel-tabs.ts
2155
- function zt(e, t) {
2075
+ function Lt(e, t) {
2156
2076
  if (e === void 0) return !1;
2157
- if (Rt(e)) return !0;
2077
+ if (It(e)) return !0;
2158
2078
  let n = C(e);
2159
2079
  return n !== void 0 && t?.some((e) => e.id === n && E(e, "blueprint")) === !0;
2160
2080
  }
2161
- function Bt(e) {
2081
+ function Rt(e) {
2162
2082
  return e === "configuration" || e === "problems" || e === "trace";
2163
2083
  }
2164
2084
  //#endregion
2165
2085
  //#region src/browser/controllers/blueprint/designer-blueprint-panels-controller.ts
2166
- var Vt = /* @__PURE__ */ new Set([
2086
+ var zt = /* @__PURE__ */ new Set([
2167
2087
  "eq",
2168
2088
  "neq",
2169
2089
  "gt",
@@ -2172,7 +2092,7 @@ var Vt = /* @__PURE__ */ new Set([
2172
2092
  "lte",
2173
2093
  "contains",
2174
2094
  "exists"
2175
- ]), Ht = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/, Ut = class {
2095
+ ]), Bt = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/, Vt = class {
2176
2096
  callbacks;
2177
2097
  #e;
2178
2098
  #t;
@@ -2207,23 +2127,23 @@ var Vt = /* @__PURE__ */ new Set([
2207
2127
  render() {
2208
2128
  let e = this.hasLibraryTabFocus();
2209
2129
  this.reconcileLibraryTab();
2210
- let t = this.callbacks.getDocument(), n = this.callbacks.getGraph(), r = this.callbacks.getSelection(), i = t === void 0 ? [] : Te(t, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions());
2211
- At(this.#e, {
2130
+ let t = this.callbacks.getDocument(), n = this.callbacks.getGraph(), r = this.callbacks.getSelection(), i = t === void 0 ? [] : we(t, this.callbacks.getCatalog(), this.callbacks.getRuntimeContributions());
2131
+ Ot(this.#e, {
2212
2132
  document: t,
2213
2133
  graph: n,
2214
2134
  components: i,
2215
- variables: t === void 0 ? [] : Ee(t, O.blueprint),
2135
+ variables: t === void 0 ? [] : Te(t, O.blueprint),
2216
2136
  selection: r,
2217
2137
  query: this.#n,
2218
2138
  activeTab: this.#r,
2219
2139
  groups: this.callbacks.getLeftPanelGroups()
2220
- }), St(this.#t, t, n, r, this.#i, this.callbacks.getDiagnostics(), this.callbacks.getTrace(), this.callbacks.getCatalog()), this.#e !== void 0 && v(this.#e), this.#t !== void 0 && v(this.#t), this.callbacks.getMode() === "blueprint" && this.#e !== void 0 && (ct(this.#e.getRootNode(), this.blueprintHostGroup(this.selectedLeftPanelGroupId), n.nodes.length), this.callbacks.onActiveLeftPanelGroupChange()), e && this.#e?.querySelector(`[data-blueprint-library-tab="${this.#r}"]`)?.focus();
2140
+ }), bt(this.#t, t, n, r, this.#i, this.callbacks.getDiagnostics(), this.callbacks.getTrace(), this.callbacks.getCatalog()), this.#e !== void 0 && v(this.#e), this.#t !== void 0 && v(this.#t), this.callbacks.getMode() === "blueprint" && this.#e !== void 0 && (ot(this.#e.getRootNode(), this.blueprintHostGroup(this.selectedLeftPanelGroupId), n.nodes.length), this.callbacks.onActiveLeftPanelGroupChange()), e && this.#e?.querySelector(`[data-blueprint-library-tab="${this.#r}"]`)?.focus();
2221
2141
  }
2222
2142
  onClick(e) {
2223
2143
  let t = e.closest("[data-blueprint-library-tab]")?.dataset.blueprintLibraryTab;
2224
- if (zt(t, this.callbacks.getLeftPanelGroups())) return this.#r = t, this.callbacks.expandLeftPanel(), this.render(), this.#e?.querySelector(`[data-blueprint-library-tab="${t}"]`)?.focus(), !0;
2144
+ if (Lt(t, this.callbacks.getLeftPanelGroups())) return this.#r = t, this.callbacks.expandLeftPanel(), this.render(), this.#e?.querySelector(`[data-blueprint-library-tab="${t}"]`)?.focus(), !0;
2225
2145
  let n = e.closest("[data-blueprint-inspector-tab]")?.dataset.blueprintInspectorTab;
2226
- if (Bt(n)) return this.#i = n, this.render(), this.#t?.querySelector(`[data-blueprint-inspector-tab="${n}"]`)?.focus(), !0;
2146
+ if (Rt(n)) return this.#i = n, this.render(), this.#t?.querySelector(`[data-blueprint-inspector-tab="${n}"]`)?.focus(), !0;
2227
2147
  let r = e.closest("[data-blueprint-select-node], [data-blueprint-select-edge], [data-blueprint-add-component], [data-blueprint-add-variable], [data-blueprint-add-canvas], [data-blueprint-insert-node], [data-blueprint-delete], [data-blueprint-nodes-enabled], [data-blueprint-edge-order], [data-blueprint-clear-trace]");
2228
2148
  if (r === null) return !1;
2229
2149
  let i = r.dataset;
@@ -2355,7 +2275,7 @@ var Vt = /* @__PURE__ */ new Set([
2355
2275
  type: "interval",
2356
2276
  intervalSeconds: Number(r)
2357
2277
  });
2358
- else if (n === "operator" && i.kind === "condition" && Vt.has(r)) {
2278
+ else if (n === "operator" && i.kind === "condition" && zt.has(r)) {
2359
2279
  let n = r, a = n === "exists" ? {
2360
2280
  left: i.condition.left,
2361
2281
  operator: n
@@ -2393,7 +2313,7 @@ var Vt = /* @__PURE__ */ new Set([
2393
2313
  type: "state",
2394
2314
  stateId: a
2395
2315
  });
2396
- else if (i === "host-event" && Ht.test(a.trim())) s = r(e.blueprint, t, {
2316
+ else if (i === "host-event" && Bt.test(a.trim())) s = r(e.blueprint, t, {
2397
2317
  type: "target-port",
2398
2318
  port: `event:${a.trim()}`
2399
2319
  });
@@ -2440,7 +2360,7 @@ var Vt = /* @__PURE__ */ new Set([
2440
2360
  };
2441
2361
  else if (t === "event-field") u = {
2442
2362
  kind: "event-payload",
2443
- path: (s === "edge" ? ot(e, c, this.callbacks.getCatalog()) : [])[0] ?? ["value"]
2363
+ path: (s === "edge" ? it(e, c, this.callbacks.getCatalog()) : [])[0] ?? ["value"]
2444
2364
  };
2445
2365
  else if (t === "variable") {
2446
2366
  let t = A(e)[0];
@@ -2459,7 +2379,7 @@ var Vt = /* @__PURE__ */ new Set([
2459
2379
  u = void 0;
2460
2380
  }
2461
2381
  else if (l === "field") {
2462
- let e = it(n.value);
2382
+ let e = nt(n.value);
2463
2383
  e !== null && (u = {
2464
2384
  kind: "event-payload",
2465
2385
  path: e
@@ -2521,10 +2441,10 @@ var Vt = /* @__PURE__ */ new Set([
2521
2441
  blueprintHostGroup(e) {
2522
2442
  if (e !== void 0) return this.callbacks.getLeftPanelGroups()?.find((t) => t.id === e && E(t, "blueprint"));
2523
2443
  }
2524
- }, Wt = Object.freeze({
2444
+ }, Ht = Object.freeze({
2525
2445
  nodes: Object.freeze([]),
2526
2446
  edges: Object.freeze([])
2527
- }), Gt = class {
2447
+ }), Ut = class {
2528
2448
  callbacks;
2529
2449
  #e;
2530
2450
  #t;
@@ -2540,7 +2460,7 @@ var Vt = /* @__PURE__ */ new Set([
2540
2460
  #d;
2541
2461
  #f = () => this.resolveCanvas();
2542
2462
  constructor(e) {
2543
- this.callbacks = e, this.#u = new $e({
2463
+ this.callbacks = e, this.#u = new Ze({
2544
2464
  getDocument: e.getDocument,
2545
2465
  getGraph: () => this.graph,
2546
2466
  getMode: () => this.#i,
@@ -2560,7 +2480,7 @@ var Vt = /* @__PURE__ */ new Set([
2560
2480
  render: () => this.render(),
2561
2481
  emitDiagnostics: e.emitDiagnostics,
2562
2482
  onSimulated: () => this.#d.showTrace()
2563
- }), this.#d = new Ut({
2483
+ }), this.#d = new Vt({
2564
2484
  getDocument: e.getDocument,
2565
2485
  getGraph: () => this.graph,
2566
2486
  getCatalog: e.getCatalog,
@@ -2693,7 +2613,7 @@ var Vt = /* @__PURE__ */ new Set([
2693
2613
  }
2694
2614
  let n = e.closest("[data-blueprint-search-id]")?.dataset.blueprintSearchId;
2695
2615
  if (n !== void 0) {
2696
- let e = qt(n), t = e === void 0 ? $("AUTHORING_REQUEST_INVALID", O.blueprint.invalidSelection) : this.focusOrInsert(e);
2616
+ let e = Gt(n), t = e === void 0 ? $("AUTHORING_REQUEST_INVALID", O.blueprint.invalidSelection) : this.focusOrInsert(e);
2697
2617
  return t.ok || this.callbacks.emitDiagnostics(t.diagnostics), !0;
2698
2618
  }
2699
2619
  return this.#d.onClick(e);
@@ -2724,10 +2644,10 @@ var Vt = /* @__PURE__ */ new Set([
2724
2644
  }
2725
2645
  get graph() {
2726
2646
  let e = this.callbacks.getDocument();
2727
- if (e === void 0) return Wt;
2647
+ if (e === void 0) return Ht;
2728
2648
  let t = this.callbacks.getCatalog(), n = this.callbacks.getRuntimeContributions(), r = this.#l;
2729
2649
  if (r !== void 0 && r.document === e && r.catalog === t && r.contributions === n) return r.graph;
2730
- let i = De(e, t, n, O.blueprint);
2650
+ let i = Ee(e, t, n, O.blueprint);
2731
2651
  return this.#l = {
2732
2652
  document: e,
2733
2653
  catalog: t,
@@ -2763,7 +2683,7 @@ var Vt = /* @__PURE__ */ new Set([
2763
2683
  }
2764
2684
  mountDefaultCanvas() {
2765
2685
  if (this.#r !== void 0 || this.#n === void 0) return;
2766
- let e = ze(this.#n.ownerDocument);
2686
+ let e = Re(this.#n.ownerDocument);
2767
2687
  this.#n.append(e.element), this.#r = e;
2768
2688
  }
2769
2689
  resolveCanvas() {
@@ -2782,7 +2702,7 @@ var Vt = /* @__PURE__ */ new Set([
2782
2702
  }
2783
2703
  fallbackToCanvas(e) {
2784
2704
  let t = this.#i;
2785
- this.#i = "canvas", this.render(), this.emitModeChange(t, "canvas", "fallback"), e && this.callbacks.emitDiagnostics([Kt("BLUEPRINT_CAPABILITY_UNAVAILABLE", O.blueprint.noHostCanvas)]);
2705
+ this.#i = "canvas", this.render(), this.emitModeChange(t, "canvas", "fallback"), e && this.callbacks.emitDiagnostics([Wt("BLUEPRINT_CAPABILITY_UNAVAILABLE", O.blueprint.noHostCanvas)]);
2786
2706
  }
2787
2707
  select(e, t) {
2788
2708
  let n = this.graph, r = new Set(n.nodes.map((e) => e.id)), i = new Set(n.edges.map((e) => e.id));
@@ -2816,7 +2736,7 @@ var Vt = /* @__PURE__ */ new Set([
2816
2736
  let e = this.#e;
2817
2737
  if (e === void 0) return;
2818
2738
  let t = this.callbacks.getDocument(), n = this.#u.stateDiagnostics().filter((e) => e.severity === "error").length, r = t?.blueprint.edges ?? [];
2819
- We(e, this.#i, this.available, {
2739
+ Ue(e, this.#i, this.available, {
2820
2740
  nodes: t?.blueprint.nodes.length ?? 0,
2821
2741
  relations: r.filter((e) => e.kind === "flow").length,
2822
2742
  semantic: r.filter((e) => e.kind === "semantic").length,
@@ -2836,7 +2756,7 @@ var Vt = /* @__PURE__ */ new Set([
2836
2756
  }));
2837
2757
  }
2838
2758
  };
2839
- function Kt(e, t) {
2759
+ function Wt(e, t) {
2840
2760
  return {
2841
2761
  severity: "error",
2842
2762
  code: e,
@@ -2854,10 +2774,10 @@ function Q(e) {
2854
2774
  function $(e, t) {
2855
2775
  return {
2856
2776
  ok: !1,
2857
- diagnostics: [Kt(e, t)]
2777
+ diagnostics: [Wt(e, t)]
2858
2778
  };
2859
2779
  }
2860
- function qt(e) {
2780
+ function Gt(e) {
2861
2781
  let t = e.indexOf(":");
2862
2782
  if (t <= 0) return;
2863
2783
  let n = e.slice(0, t), r = e.slice(t + 1);
@@ -2867,6 +2787,6 @@ function qt(e) {
2867
2787
  } : void 0;
2868
2788
  }
2869
2789
  //#endregion
2870
- export { Gt as DesignerBlueprintWorkbenchPanel };
2790
+ export { Ut as DesignerBlueprintWorkbenchPanel };
2871
2791
 
2872
- //# sourceMappingURL=designer-blueprint-workbench-panel-CJ3iZo5v.js.map
2792
+ //# sourceMappingURL=designer-blueprint-workbench-panel-BWSglfAb.js.map