@babsey/code-graph 0.1.3 → 0.1.5

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.
@@ -1,11 +1,11 @@
1
- import { AbstractNode as We, sortTopologically as Ne, NodeInterface as Xe, displayInSidebar as Me, NodeInterfaceType as R, BaklavaInterfaceTypes as qe, CheckboxInterfaceComponent as Je, setType as S, IntegerInterfaceComponent as Ye, TextInputInterfaceComponent as $e, NumberInterfaceComponent as Qe, SelectInterfaceComponent as Ke, SliderInterfaceComponent as Ze, TextareaInputInterfaceComponent as et, allowMultipleConnections as K, IntegerInterface as tt, TextInputInterface as st, useViewModel as q, useTemporaryConnection as nt, Components as ke, useGraph as ae, GRAPH_NODE_TYPE_PREFIX as se, useTransform as ot, useNodeCategories as at, BaklavaEditor as it, DEFAULT_TOOLBAR_COMMANDS as rt, useBaklava as lt, DependencyEngine as dt, applyResult as ut } from "baklavajs";
2
1
  import Z from "mustache";
3
- import { reactive as P, defineComponent as U, createElementBlock as r, openBlock as i, toDisplayString as j, markRaw as E, computed as b, createElementVNode as l, withDirectives as ee, vModelText as te, ref as B, onMounted as ie, onUpdated as Oe, normalizeClass as G, createCommentVNode as I, unref as _, renderSlot as W, createStaticVNode as J, onBeforeUnmount as ct, normalizeStyle as re, withModifiers as A, createBlock as O, Fragment as T, createTextVNode as pt, createVNode as z, withKeys as ne, renderList as D, nextTick as ht, toRef as Te, resolveDynamicComponent as Ce, inject as vt, Transition as mt, withCtx as F, onUnmounted as ft, normalizeProps as gt, guardReactiveProps as bt, mergeProps as yt } from "vue";
4
- import _t from "toposort";
5
- import { v4 as kt } from "uuid";
6
- import { usePointer as Ct } from "@vueuse/core";
2
+ import Xe from "toposort";
3
+ import { AbstractNode as qe, sortTopologically as Me, NodeInterface as Je, displayInSidebar as $e, NodeInterfaceType as R, BaklavaInterfaceTypes as Ye, CheckboxInterfaceComponent as Qe, setType as B, IntegerInterfaceComponent as Ke, TextInputInterfaceComponent as Oe, NumberInterfaceComponent as Ze, SelectInterfaceComponent as et, SliderInterfaceComponent as tt, TextareaInputInterfaceComponent as st, allowMultipleConnections as K, IntegerInterface as nt, TextInputInterface as ot, Commands as ke, useViewModel as q, useTemporaryConnection as at, Components as Ce, useGraph as ae, GRAPH_NODE_TYPE_PREFIX as se, useTransform as it, useNodeCategories as rt, BaklavaEditor as dt, useBaklava as lt, DependencyEngine as ut, applyResult as ct, DEFAULT_TOOLBAR_COMMANDS as pt } from "baklavajs";
4
+ import { reactive as D, defineComponent as U, createElementBlock as r, openBlock as i, toDisplayString as j, markRaw as E, computed as b, createElementVNode as d, withDirectives as ee, vModelText as te, ref as V, onMounted as ie, onUpdated as Te, normalizeClass as G, createCommentVNode as I, unref as _, renderSlot as W, createStaticVNode as J, onBeforeUnmount as ht, normalizeStyle as re, withModifiers as A, createBlock as O, Fragment as T, createTextVNode as vt, createVNode as z, withKeys as ne, renderList as H, nextTick as mt, toRef as Ee, resolveDynamicComponent as we, inject as ft, Transition as gt, withCtx as F, onUnmounted as bt, normalizeProps as yt, guardReactiveProps as _t, mergeProps as kt } from "vue";
5
+ import { v4 as Ct } from "uuid";
6
+ import { usePointer as wt } from "@vueuse/core";
7
7
  Z.escape = (s) => s;
8
- class wt extends We {
8
+ class xt extends qe {
9
9
  state;
10
10
  code;
11
11
  isCodeNode = !0;
@@ -14,7 +14,7 @@ class wt extends We {
14
14
  inputs = {};
15
15
  outputs = {};
16
16
  constructor() {
17
- super(), this.initializeIo(), this.width = 400, this.twoColumn = !0, this.state = P({
17
+ super(), this.initializeIo(), this.width = 400, this.twoColumn = !0, this.state = D({
18
18
  codeTemplate: "",
19
19
  hidden: !1,
20
20
  integrated: !1,
@@ -24,7 +24,7 @@ class wt extends We {
24
24
  script: "",
25
25
  variableName: ""
26
26
  }), this.codeTemplate = function() {
27
- return `${this.name}(${xt(this.codeNodeInputs).join(", ")})`;
27
+ return `${this.name}(${It(this.codeNodeInputs).join(", ")})`;
28
28
  };
29
29
  }
30
30
  get codeNodeInputs() {
@@ -151,14 +151,14 @@ class wt extends We {
151
151
  * Reset script of input interfaces.
152
152
  */
153
153
  resetInputInterfaceScript() {
154
- Object.values(this.inputs).forEach((e) => e.state.script = "");
154
+ Object.values(this.codeNodeInputs).forEach((e) => e.resetScript());
155
155
  }
156
156
  updateCodeTemplate() {
157
157
  this.state.codeTemplate = this.codeTemplate.call(this);
158
158
  }
159
159
  updateConnectedInputInterfaces() {
160
160
  if (!this.graph) return;
161
- const { connectionsFromNode: e } = Ne(this.graph);
161
+ const { connectionsFromNode: e } = Me(this.graph);
162
162
  if (!e.has(this)) return;
163
163
  const t = e.get(this);
164
164
  t && t.forEach((n) => {
@@ -176,7 +176,7 @@ class wt extends We {
176
176
  this.state.props = e;
177
177
  }
178
178
  }
179
- class Ee extends wt {
179
+ class Se extends xt {
180
180
  /**
181
181
  * The default implementation does nothing.
182
182
  * Overwrite this method to do calculation.
@@ -190,7 +190,7 @@ class Ee extends wt {
190
190
  }
191
191
  save() {
192
192
  const e = super.save();
193
- return It(this.graph, e), e;
193
+ return Nt(this.graph, e), e;
194
194
  }
195
195
  updateModules(e) {
196
196
  if (e)
@@ -201,12 +201,12 @@ class Ee extends wt {
201
201
  }
202
202
  }
203
203
  }
204
- const xt = (s, e = !0) => {
204
+ const It = (s, e = !0) => {
205
205
  const t = [], n = Object.keys(s);
206
206
  return n.forEach((o) => {
207
207
  if (s[o]?.hidden) return;
208
- const d = e && t.length < n.indexOf(o) ? `${o}=` : "";
209
- t.push(`${d}{{ inputs.${o} }}`);
208
+ const l = e && t.length < n.indexOf(o) ? `${o}=` : "";
209
+ t.push(`${l}{{ inputs.${o} }}`);
210
210
  }), t;
211
211
  }, Ve = (s, e) => {
212
212
  if (!s) return;
@@ -218,7 +218,7 @@ const xt = (s, e = !0) => {
218
218
  }), Object.entries(e.outputs).forEach(([o, a]) => {
219
219
  o !== "_node" && n.outputs[o] && (n.outputs[o].hidden = a.hidden);
220
220
  });
221
- }, It = (s, e) => {
221
+ }, Nt = (s, e) => {
222
222
  if (!s) return;
223
223
  const t = s.findNodeById(e.id);
224
224
  if (!t || t.subgraph) return;
@@ -228,7 +228,7 @@ const xt = (s, e = !0) => {
228
228
  }), Object.entries(e.outputs).forEach(([o, a]) => {
229
229
  o !== "_node" && n.outputs[o] && (a.hidden = n.outputs[o].hidden);
230
230
  });
231
- }, Nt = ["title"], le = /* @__PURE__ */ U({
231
+ }, Mt = ["title"], de = /* @__PURE__ */ U({
232
232
  __name: "CodeNodeInterface",
233
233
  props: {
234
234
  intf: {}
@@ -236,16 +236,16 @@ const xt = (s, e = !0) => {
236
236
  setup(s) {
237
237
  return (e, t) => (i(), r("div", {
238
238
  title: s.intf.state?.script
239
- }, j(s.intf.name), 9, Nt));
239
+ }, j(s.intf.name), 9, Mt));
240
240
  }
241
241
  });
242
- class H extends Xe {
242
+ class P extends Je {
243
243
  isCodeNode = !0;
244
244
  code;
245
245
  state;
246
246
  type = null;
247
247
  constructor(e, t) {
248
- super(e, t), this.setComponent(E(le)), this.state = P({
248
+ super(e, t), this.setComponent(E(de)), this.state = D({
249
249
  optional: !1,
250
250
  script: ""
251
251
  });
@@ -263,13 +263,14 @@ class H extends Xe {
263
263
  return this.id.slice(0, 6);
264
264
  }
265
265
  getValue = () => `${this.value ?? "None"}`;
266
+ resetScript = () => this.state.script = "";
266
267
  }
267
- const yn = (s, e) => {
268
+ const _n = (s, e) => {
268
269
  s.state.optional = e, s.setHidden(e);
269
270
  };
270
- class Y extends H {
271
+ class Y extends P {
271
272
  constructor(e = "", t) {
272
- super(e, t), this.setComponent(E(le)), this.use(Me, !0);
273
+ super(e, t), this.setComponent(E(de)), this.use($e, !0);
273
274
  }
274
275
  set script(e) {
275
276
  if (this.state.script && this.allowMultipleConnections) {
@@ -285,19 +286,19 @@ class Y extends H {
285
286
  super.value = e, this.name !== "_node" && this.setHidden(!1);
286
287
  }
287
288
  }
288
- const Be = new R("boolean"), Mt = new R("dict"), Se = new R("list"), X = new R("node"), de = new R("number"), ue = new R("string"), ze = new R("tuple"), _n = (s) => {
289
- new qe(s.editor, { viewPlugin: s }).addTypes(Be, Mt, Se, X, de, ue, ze);
289
+ const Be = new R("boolean"), $t = new R("dict"), ze = new R("list"), X = new R("node"), le = new R("number"), ue = new R("string"), je = new R("tuple"), kn = (s) => {
290
+ new Ye(s.editor, { viewPlugin: s }).addTypes(Be, $t, ze, X, le, ue, je);
290
291
  };
291
- class kn extends Y {
292
+ class Cn extends Y {
292
293
  constructor(e, t) {
293
- super(e, t), this.setComponent(E(Je)), this.use(S, Be);
294
+ super(e, t), this.setComponent(E(Qe)), this.use(B, Be);
294
295
  }
295
296
  getValue = () => this.value ? "True" : "False";
296
297
  }
297
- class $t extends H {
298
+ class Ot extends P {
298
299
  isCodeNodeOutput = !0;
299
300
  constructor(e = "", t = "") {
300
- super(e, t), this.setComponent(E(le));
301
+ super(e, t), this.setComponent(E(de));
301
302
  }
302
303
  get script() {
303
304
  return this.name ? this.name : this.state.script;
@@ -307,42 +308,42 @@ class ce extends Y {
307
308
  min;
308
309
  max;
309
310
  constructor(e, t, n, o) {
310
- super(e, t), this.min = n, this.max = o, this.use(S, de);
311
+ super(e, t), this.min = n, this.max = o, this.use(B, le);
311
312
  }
312
313
  validate(e) {
313
314
  return (this.min === void 0 || e >= this.min) && (this.max === void 0 || e <= this.max);
314
315
  }
315
316
  }
316
- class Cn extends ce {
317
- component = E(Ye);
317
+ class wn extends ce {
318
+ component = E(Ke);
318
319
  validate(e) {
319
320
  return Number.isInteger(e) && super.validate(e);
320
321
  }
321
322
  }
322
- class wn extends Y {
323
+ class xn extends Y {
323
324
  constructor(e = "", t = "") {
324
- super(e, t), this.setComponent(E($e)), this.use(S, Se);
325
+ super(e, t), this.setComponent(E(Oe)), this.use(B, ze);
325
326
  }
326
327
  getValue = () => `[${this.value}]`;
327
328
  }
328
- class xn extends ce {
329
- component = E(Qe);
329
+ class In extends ce {
330
+ component = E(Ze);
330
331
  }
331
332
  class pe extends Y {
332
333
  constructor(e, t) {
333
- super(e, t), this.use(S, ue);
334
+ super(e, t), this.use(B, ue);
334
335
  }
335
336
  getValue = () => `"${this.value}"`;
336
337
  }
337
- class In extends pe {
338
- component = E(Ke);
338
+ class Nn extends pe {
339
+ component = E(et);
339
340
  items;
340
341
  constructor(e, t, n) {
341
342
  super(e, t), this.items = n;
342
343
  }
343
344
  }
344
- class Nn extends ce {
345
- component = E(Ze);
345
+ class Mn extends ce {
346
+ component = E(tt);
346
347
  min;
347
348
  max;
348
349
  constructor(e, t, n, o) {
@@ -350,7 +351,7 @@ class Nn extends ce {
350
351
  }
351
352
  getValue = () => `${Math.round(this.value * 1e3) / 1e3}`;
352
353
  }
353
- const Ot = U({
354
+ const Tt = U({
354
355
  props: {
355
356
  intf: {
356
357
  type: Object,
@@ -375,12 +376,12 @@ const Ot = U({
375
376
  for (const [n, o] of e)
376
377
  t[n] = o;
377
378
  return t;
378
- }, Tt = { style: { position: "relative" } }, Et = { style: { "font-size": "12px", padding: "0 6px", position: "absolute", top: "-8px", "background-color": "var(--baklava-node-color-background)" } }, Vt = ["placeholder", "title"];
379
+ }, Et = { style: { position: "relative" } }, St = { style: { "font-size": "12px", padding: "0 6px", position: "absolute", top: "-8px", "background-color": "var(--baklava-node-color-background)" } }, Vt = ["placeholder", "title"];
379
380
  function Bt(s, e, t, n, o, a) {
380
- return i(), r("div", Tt, [
381
- l("label", Et, j(s.intf.name), 1),
382
- ee(l("input", {
383
- "onUpdate:modelValue": e[0] || (e[0] = (d) => s.v = d),
381
+ return i(), r("div", Et, [
382
+ d("label", St, j(s.intf.name), 1),
383
+ ee(d("input", {
384
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => s.v = l),
384
385
  type: "text",
385
386
  class: "baklava-input",
386
387
  placeholder: s.intf.name,
@@ -390,31 +391,31 @@ function Bt(s, e, t, n, o, a) {
390
391
  ])
391
392
  ]);
392
393
  }
393
- const St = /* @__PURE__ */ $(Ot, [["render", Bt]]);
394
- class Mn extends pe {
395
- component = E(St);
396
- }
394
+ const zt = /* @__PURE__ */ $(Tt, [["render", Bt]]);
397
395
  class $n extends pe {
398
- component = E(et);
396
+ component = E(zt);
399
397
  }
400
- class On extends Y {
398
+ class On extends pe {
399
+ component = E(st);
400
+ }
401
+ class Tn extends Y {
401
402
  constructor(e = "", t = "") {
402
- super(e, t), this.setComponent(E($e)), this.use(S, ze);
403
+ super(e, t), this.setComponent(E(Oe)), this.use(B, je);
403
404
  }
404
405
  getValue = () => `(${this.value})`;
405
406
  }
406
- function Tn(s) {
407
- return class extends Ee {
407
+ function En(s) {
408
+ return class extends Se {
408
409
  type = s.type;
409
410
  inputs = {};
410
411
  outputs = {};
411
412
  constructor() {
412
413
  super(), this._title = s.title ?? s.type, this.name = s.name ?? s.type, this.updateModules(s.modules), s.variableName && (this.state.variableName = s.variableName), s.codeTemplate && (this.codeTemplate = s.codeTemplate), this.addInput(
413
414
  "_node",
414
- new H("", []).use(S, X).use(K).setHidden(!0)
415
+ new P("", []).use(B, X).use(K).setHidden(!0)
415
416
  ), this.addOutput(
416
417
  "_node",
417
- new H("", []).use(S, X).use(K).setHidden(!0)
418
+ new P("", []).use(B, X).use(K).setHidden(!0)
418
419
  ), this.executeFactory("input", s.inputs), this.executeFactory("output", s.outputs), s.onCreate?.call(this);
419
420
  }
420
421
  // public calculate = definition.calculate
@@ -446,7 +447,7 @@ function Tn(s) {
446
447
  }
447
448
  };
448
449
  }
449
- class zt extends Ee {
450
+ class jt extends Se {
450
451
  /**
451
452
  * The default implementation does nothing.
452
453
  * Overwrite this method to do calculation.
@@ -456,8 +457,8 @@ class zt extends Ee {
456
457
  */
457
458
  calculate;
458
459
  }
459
- function En(s) {
460
- return class extends zt {
460
+ function Sn(s) {
461
+ return class extends jt {
461
462
  type = s.type;
462
463
  inputs = {};
463
464
  outputs = {};
@@ -468,10 +469,10 @@ function En(s) {
468
469
  constructor() {
469
470
  super(), this._title = s.title ?? s.type, this.name = s.name ?? s.type, this.updateModules(s.modules), s.codeTemplate && (this.codeTemplate = s.codeTemplate), s.variableName && (this.state.variableName = s.variableName), this.addInput(
470
471
  "_node",
471
- new H("", []).use(S, X).use(K).setHidden(!0)
472
+ new P("", []).use(B, X).use(K).setHidden(!0)
472
473
  ), this.addOutput(
473
474
  "_node",
474
- new H("", []).use(S, X).use(K).setHidden(!0)
475
+ new P("", []).use(B, X).use(K).setHidden(!0)
475
476
  ), this.staticInputKeys.push("_node"), this.staticOutputKeys.push("_node"), this.executeFactory("input", s.inputs), this.executeFactory("output", s.outputs), s.onCreate?.call(this);
476
477
  }
477
478
  onPlaced() {
@@ -503,14 +504,14 @@ function En(s) {
503
504
  if (!this.inputs[t]) {
504
505
  const n = e.inputs[t].value;
505
506
  let o;
506
- typeof n == "number" ? o = new tt(t, n).use(S, de) : o = new st(t, JSON.stringify(n)).use(S, ue), o.use(Me, !0), this.addInput(t, o);
507
+ typeof n == "number" ? o = new nt(t, n).use(B, le) : o = new ot(t, JSON.stringify(n)).use(B, ue), o.use($e, !0), this.addInput(t, o);
507
508
  }
508
509
  this.inputs[t] && (this.inputs[t].load(e.inputs[t]), this.inputs[t].nodeId = this.id);
509
510
  }
510
511
  for (const t of Object.keys(e.outputs))
511
512
  if (!this.staticOutputKeys.includes(t)) {
512
513
  if (!this.outputs[t]) {
513
- const n = new $t(t);
514
+ const n = new Ot(t);
514
515
  this.addOutput(t, n);
515
516
  }
516
517
  this.outputs[t] && (this.outputs[t].load(e.outputs[t]), this.outputs[t].nodeId = this.id);
@@ -531,12 +532,12 @@ function En(s) {
531
532
  }
532
533
  updateInterfaces(e, t, n) {
533
534
  const o = e === "input" ? this.staticInputKeys : this.staticOutputKeys, a = e === "input" ? this.inputs : this.outputs;
534
- for (const d of Object.keys(a))
535
- o.includes(d) || t[d] && !n.includes(d) || (e === "input" ? this.removeInput(d) : this.removeOutput(d));
536
- for (const d of Object.keys(t)) {
537
- if (a[d]) continue;
538
- const u = t[d]();
539
- e === "input" ? this.addInput(d, u) : this.addOutput(d, u);
535
+ for (const l of Object.keys(a))
536
+ o.includes(l) || t[l] && !n.includes(l) || (e === "input" ? this.removeInput(l) : this.removeOutput(l));
537
+ for (const l of Object.keys(t)) {
538
+ if (a[l]) continue;
539
+ const u = t[l]();
540
+ e === "input" ? this.addInput(l, u) : this.addOutput(l, u);
540
541
  }
541
542
  }
542
543
  updateProps(e) {
@@ -551,12 +552,12 @@ function En(s) {
551
552
  };
552
553
  }
553
554
  Z.escape = (s) => s;
554
- class jt {
555
+ class Lt {
555
556
  _id;
556
557
  _viewModel;
557
558
  _state;
558
559
  constructor(e) {
559
- this._id = kt(), this._viewModel = e, this._state = P({
560
+ this._id = Ct(), this._viewModel = e, this._state = D({
560
561
  autosort: !1,
561
562
  lockCode: !1,
562
563
  modules: {},
@@ -652,7 +653,7 @@ class jt {
652
653
  * Clear code graph.
653
654
  */
654
655
  clear() {
655
- this.state.modules = {}, this.nodes = [], this.connections = [], this.state.script = "";
656
+ this.state.modules = {}, this.nodes = [], this.connections = [], this.state.script = "", this.viewModel.commandHandler.executeCommand(ke.CLEAR_CLIPBOARD_COMMAND), this.viewModel.commandHandler.executeCommand(ke.CLEAR_HISTORY_COMMAND), this.viewModel.engine && this.viewModel.engine.runOnce(null);
656
657
  }
657
658
  findNodeById(e) {
658
659
  return this.graph.findNodeById(e);
@@ -735,10 +736,10 @@ class jt {
735
736
  saveNodeStates(e) {
736
737
  e.forEach((t, n) => {
737
738
  const o = this.nodes[n];
738
- Object.entries(t.inputs).forEach(([a, d]) => {
739
- t.inputs && o.inputs[a] && (d.hidden = o.inputs[a].hidden);
740
- }), Object.entries(t.outputs).forEach(([a, d]) => {
741
- t.outputs && o.outputs[a] && (d.hidden = o.outputs[a].hidden);
739
+ Object.entries(t.inputs).forEach(([a, l]) => {
740
+ t.inputs && o.inputs[a] && (l.hidden = o.inputs[a].hidden);
741
+ }), Object.entries(t.outputs).forEach(([a, l]) => {
742
+ t.outputs && o.outputs[a] && (l.hidden = o.outputs[a].hidden);
742
743
  });
743
744
  });
744
745
  }
@@ -753,7 +754,7 @@ class jt {
753
754
  a.from.nodeId
754
755
  ]);
755
756
  let t = [...this.nodeIds];
756
- t.reverse(), t = _t.array(t, e), t.reverse();
757
+ t.reverse(), t = Xe.array(t, e), t.reverse();
757
758
  const n = this.graph.nodes.map((a) => a.id).filter((a) => !t.includes(a));
758
759
  t = t.concat(n);
759
760
  const o = t.map((a) => this.findNodeById(a));
@@ -786,8 +787,8 @@ const oe = (s) => {
786
787
  }), Bn = (s) => {
787
788
  const e = { ...s.position };
788
789
  return e.x -= 440, e.y += 50, e;
789
- }, Sn = (s) => {
790
- const { calculationOrder: e, connectionsFromNode: t } = Ne(s);
790
+ }, zn = (s) => {
791
+ const { calculationOrder: e, connectionsFromNode: t } = Me(s);
791
792
  e.forEach((n) => {
792
793
  if (!n.isCodeNode) return;
793
794
  const o = n;
@@ -795,15 +796,15 @@ const oe = (s) => {
795
796
  a.to.state && a.from.script && (a.to.state.script = a.from.script);
796
797
  });
797
798
  });
798
- }, Lt = ["id"], Ut = { class: "align-middle" }, we = /* @__PURE__ */ U({
799
+ }, Ut = ["id"], Gt = { class: "align-middle" }, xe = /* @__PURE__ */ U({
799
800
  __name: "CodeGraphNodeInterface",
800
801
  props: {
801
802
  node: {},
802
803
  intf: {}
803
804
  },
804
805
  setup(s) {
805
- const e = s, { viewModel: t } = q(), { hoveredOver: n, temporaryConnection: o } = nt(), a = B(null), d = b(() => e.intf.connectionCount > 0), u = b(() => ({
806
- "--connected": d.value
806
+ const e = s, { viewModel: t } = q(), { hoveredOver: n, temporaryConnection: o } = at(), a = V(null), l = b(() => e.intf.connectionCount > 0), u = b(() => ({
807
+ "--connected": l.value
807
808
  })), v = () => {
808
809
  n(e.intf);
809
810
  }, k = () => {
@@ -811,7 +812,7 @@ const oe = (s) => {
811
812
  }, w = () => {
812
813
  a.value && t.value.hooks.renderInterface.execute({ intf: e.intf, el: a.value });
813
814
  };
814
- return ie(w), Oe(w), (V, L) => (i(), r("div", {
815
+ return ie(w), Te(w), (S, L) => (i(), r("div", {
815
816
  id: s.intf.id,
816
817
  ref_key: "el",
817
818
  ref: a,
@@ -823,12 +824,12 @@ const oe = (s) => {
823
824
  onPointerover: v,
824
825
  onPointerout: k
825
826
  }, null, 34)) : I("", !0),
826
- l("span", Ut, [
827
- W(V.$slots, "default")
827
+ d("span", Gt, [
828
+ W(S.$slots, "default")
828
829
  ])
829
- ], 10, Lt));
830
+ ], 10, Ut));
830
831
  }
831
- }), Gt = {}, Rt = {
832
+ }), Rt = {}, Dt = {
832
833
  xmlns: "http://www.w3.org/2000/svg",
833
834
  width: "24",
834
835
  height: "24",
@@ -840,17 +841,17 @@ const oe = (s) => {
840
841
  "stroke-linejoin": "round",
841
842
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-code-variable"
842
843
  };
843
- function Pt(s, e) {
844
- return i(), r("svg", Rt, [...e[0] || (e[0] = [
845
- l("path", {
844
+ function Ht(s, e) {
845
+ return i(), r("svg", Dt, [...e[0] || (e[0] = [
846
+ d("path", {
846
847
  stroke: "none",
847
848
  d: "M0 0h24v24H0z",
848
849
  fill: "none"
849
850
  }, null, -1),
850
- l("path", { d: "M4 8m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1)
851
+ d("path", { d: "M4 8m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1)
851
852
  ])]);
852
853
  }
853
- const Dt = /* @__PURE__ */ $(Gt, [["render", Pt]]), Ht = {}, At = {
854
+ const Pt = /* @__PURE__ */ $(Rt, [["render", Ht]]), At = {}, Ft = {
854
855
  xmlns: "http://www.w3.org/2000/svg",
855
856
  width: "24",
856
857
  height: "24",
@@ -862,19 +863,19 @@ const Dt = /* @__PURE__ */ $(Gt, [["render", Pt]]), Ht = {}, At = {
862
863
  "stroke-linejoin": "round",
863
864
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"
864
865
  };
865
- function Ft(s, e) {
866
- return i(), r("svg", At, [...e[0] || (e[0] = [
867
- l("path", {
866
+ function Wt(s, e) {
867
+ return i(), r("svg", Ft, [...e[0] || (e[0] = [
868
+ d("path", {
868
869
  stroke: "none",
869
870
  d: "M0 0h24v24H0z",
870
871
  fill: "none"
871
872
  }, null, -1),
872
- l("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
873
- l("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
874
- l("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
873
+ d("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
874
+ d("path", { d: "M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1),
875
+ d("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
875
876
  ])]);
876
877
  }
877
- const Wt = /* @__PURE__ */ $(Ht, [["render", Ft]]), Xt = {}, qt = {
878
+ const Xt = /* @__PURE__ */ $(At, [["render", Wt]]), qt = {}, Jt = {
878
879
  xmlns: "http://www.w3.org/2000/svg",
879
880
  width: "24",
880
881
  height: "24",
@@ -882,17 +883,17 @@ const Wt = /* @__PURE__ */ $(Ht, [["render", Ft]]), Xt = {}, qt = {
882
883
  fill: "currentColor",
883
884
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-collapse"
884
885
  };
885
- function Jt(s, e) {
886
- return i(), r("svg", qt, [...e[0] || (e[0] = [
887
- l("path", {
886
+ function Yt(s, e) {
887
+ return i(), r("svg", Jt, [...e[0] || (e[0] = [
888
+ d("path", {
888
889
  stroke: "none",
889
890
  d: "M0 0h24v24H0z",
890
891
  fill: "none"
891
892
  }, null, -1),
892
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
893
+ d("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
893
894
  ])]);
894
895
  }
895
- const Yt = /* @__PURE__ */ $(Xt, [["render", Jt]]), Qt = {}, Kt = {
896
+ const Qt = /* @__PURE__ */ $(qt, [["render", Yt]]), Kt = {}, Zt = {
896
897
  xmlns: "http://www.w3.org/2000/svg",
897
898
  width: "24",
898
899
  height: "24",
@@ -900,17 +901,17 @@ const Yt = /* @__PURE__ */ $(Xt, [["render", Jt]]), Qt = {}, Kt = {
900
901
  fill: "currentColor",
901
902
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-expand"
902
903
  };
903
- function Zt(s, e) {
904
- return i(), r("svg", Kt, [...e[0] || (e[0] = [
905
- l("path", {
904
+ function es(s, e) {
905
+ return i(), r("svg", Zt, [...e[0] || (e[0] = [
906
+ d("path", {
906
907
  stroke: "none",
907
908
  d: "M0 0h24v24H0z",
908
909
  fill: "none"
909
910
  }, null, -1),
910
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-4.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
911
+ d("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-4.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
911
912
  ])]);
912
913
  }
913
- const es = /* @__PURE__ */ $(Qt, [["render", Zt]]), ts = {}, ss = {
914
+ const ts = /* @__PURE__ */ $(Kt, [["render", es]]), ss = {}, ns = {
914
915
  xmlns: "http://www.w3.org/2000/svg",
915
916
  width: "24",
916
917
  height: "24",
@@ -918,17 +919,17 @@ const es = /* @__PURE__ */ $(Qt, [["render", Zt]]), ts = {}, ss = {
918
919
  fill: "currentColor",
919
920
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right"
920
921
  };
921
- function ns(s, e) {
922
- return i(), r("svg", ss, [...e[0] || (e[0] = [
923
- l("path", {
922
+ function os(s, e) {
923
+ return i(), r("svg", ns, [...e[0] || (e[0] = [
924
+ d("path", {
924
925
  stroke: "none",
925
926
  d: "M0 0h24v24H0z",
926
927
  fill: "none"
927
928
  }, null, -1),
928
- l("path", { d: "M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm8 -16h-8a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h8z" }, null, -1)
929
+ d("path", { d: "M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm8 -16h-8a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h8z" }, null, -1)
929
930
  ])]);
930
931
  }
931
- const os = /* @__PURE__ */ $(ts, [["render", ns]]), as = {}, is = {
932
+ const as = /* @__PURE__ */ $(ss, [["render", os]]), is = {}, rs = {
932
933
  xmlns: "http://www.w3.org/2000/svg",
933
934
  width: "24",
934
935
  height: "24",
@@ -936,17 +937,17 @@ const os = /* @__PURE__ */ $(ts, [["render", ns]]), as = {}, is = {
936
937
  fill: "currentColor",
937
938
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-collapse"
938
939
  };
939
- function rs(s, e) {
940
- return i(), r("svg", is, [...e[0] || (e[0] = [
941
- l("path", {
940
+ function ds(s, e) {
941
+ return i(), r("svg", rs, [...e[0] || (e[0] = [
942
+ d("path", {
942
943
  stroke: "none",
943
944
  d: "M0 0h24v24H0z",
944
945
  fill: "none"
945
946
  }, null, -1),
946
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-5.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
947
+ d("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-5.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
947
948
  ])]);
948
949
  }
949
- const ls = /* @__PURE__ */ $(as, [["render", rs]]), ds = {}, us = {
950
+ const ls = /* @__PURE__ */ $(is, [["render", ds]]), us = {}, cs = {
950
951
  xmlns: "http://www.w3.org/2000/svg",
951
952
  width: "24",
952
953
  height: "24",
@@ -954,17 +955,17 @@ const ls = /* @__PURE__ */ $(as, [["render", rs]]), ds = {}, us = {
954
955
  fill: "currentColor",
955
956
  class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-expand"
956
957
  };
957
- function cs(s, e) {
958
- return i(), r("svg", us, [...e[0] || (e[0] = [
959
- l("path", {
958
+ function ps(s, e) {
959
+ return i(), r("svg", cs, [...e[0] || (e[0] = [
960
+ d("path", {
960
961
  stroke: "none",
961
962
  d: "M0 0h24v24H0z",
962
963
  fill: "none"
963
964
  }, null, -1),
964
- l("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-3.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
965
+ d("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-3.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
965
966
  ])]);
966
967
  }
967
- const ps = /* @__PURE__ */ $(ds, [["render", cs]]), hs = {}, vs = {
968
+ const hs = /* @__PURE__ */ $(us, [["render", ps]]), vs = {}, ms = {
968
969
  xmlns: "http://www.w3.org/2000/svg",
969
970
  width: "24",
970
971
  height: "24",
@@ -976,12 +977,12 @@ const ps = /* @__PURE__ */ $(ds, [["render", cs]]), hs = {}, vs = {
976
977
  "stroke-linejoin": "round",
977
978
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-lock-code"
978
979
  };
979
- function ms(s, e) {
980
- return i(), r("svg", vs, [...e[0] || (e[0] = [
980
+ function fs(s, e) {
981
+ return i(), r("svg", ms, [...e[0] || (e[0] = [
981
982
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M11.5 21h-4.5a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2"></path><path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path><path d="M8 11v-4a4 4 0 1 1 8 0v4"></path><path d="M20 21l2 -2l-2 -2"></path><path d="M17 17l-2 2l2 2"></path>', 6)
982
983
  ])]);
983
984
  }
984
- const fs = /* @__PURE__ */ $(hs, [["render", ms]]), gs = {}, bs = {
985
+ const gs = /* @__PURE__ */ $(vs, [["render", fs]]), bs = {}, ys = {
985
986
  xmlns: "http://www.w3.org/2000/svg",
986
987
  width: "24",
987
988
  height: "24",
@@ -993,12 +994,12 @@ const fs = /* @__PURE__ */ $(hs, [["render", ms]]), gs = {}, bs = {
993
994
  "stroke-linejoin": "round",
994
995
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema"
995
996
  };
996
- function ys(s, e) {
997
- return i(), r("svg", bs, [...e[0] || (e[0] = [
997
+ function _s(s, e) {
998
+ return i(), r("svg", ys, [...e[0] || (e[0] = [
998
999
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 2h5v4h-5z"></path><path d="M15 10h5v4h-5z"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h5"></path><path d="M7.5 6v4"></path><path d="M7.5 14v4"></path>', 8)
999
1000
  ])]);
1000
1001
  }
1001
- const _s = /* @__PURE__ */ $(gs, [["render", ys]]), ks = {}, Cs = {
1002
+ const ks = /* @__PURE__ */ $(bs, [["render", _s]]), Cs = {}, ws = {
1002
1003
  xmlns: "http://www.w3.org/2000/svg",
1003
1004
  width: "24",
1004
1005
  height: "24",
@@ -1010,12 +1011,12 @@ const _s = /* @__PURE__ */ $(gs, [["render", ys]]), ks = {}, Cs = {
1010
1011
  "stroke-linejoin": "round",
1011
1012
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema-off"
1012
1013
  };
1013
- function ws(s, e) {
1014
- return i(), r("svg", Cs, [...e[0] || (e[0] = [
1014
+ function xs(s, e) {
1015
+ return i(), r("svg", ws, [...e[0] || (e[0] = [
1015
1016
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 2h4v4m-4 0h-1v-1"></path><path d="M15 11v-1h5v4h-2"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h2"></path><path d="M7.5 7.5v2.5"></path><path d="M7.5 14v4"></path><path d="M3 3l18 18"></path>', 9)
1016
1017
  ])]);
1017
1018
  }
1018
- const xs = /* @__PURE__ */ $(ks, [["render", ws]]), Is = {}, Ns = {
1019
+ const Is = /* @__PURE__ */ $(Cs, [["render", xs]]), Ns = {}, Ms = {
1019
1020
  xmlns: "http://www.w3.org/2000/svg",
1020
1021
  width: "24",
1021
1022
  height: "24",
@@ -1027,12 +1028,12 @@ const xs = /* @__PURE__ */ $(ks, [["render", ws]]), Is = {}, Ns = {
1027
1028
  "stroke-linejoin": "round",
1028
1029
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-transition-bottom"
1029
1030
  };
1030
- function Ms(s, e) {
1031
- return i(), r("svg", Ns, [...e[0] || (e[0] = [
1031
+ function $s(s, e) {
1032
+ return i(), r("svg", Ms, [...e[0] || (e[0] = [
1032
1033
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M21 18a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3"></path><path d="M3 3m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"></path><path d="M12 9v8"></path><path d="M9 14l3 3l3 -3"></path>', 5)
1033
1034
  ])]);
1034
1035
  }
1035
- const $s = /* @__PURE__ */ $(Is, [["render", Ms]]), Os = {}, Ts = {
1036
+ const Os = /* @__PURE__ */ $(Ns, [["render", $s]]), Ts = {}, Es = {
1036
1037
  xmlns: "http://www.w3.org/2000/svg",
1037
1038
  width: "24",
1038
1039
  height: "24",
@@ -1044,18 +1045,18 @@ const $s = /* @__PURE__ */ $(Is, [["render", Ms]]), Os = {}, Ts = {
1044
1045
  "stroke-linejoin": "round",
1045
1046
  class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-trash-off"
1046
1047
  };
1047
- function Es(s, e) {
1048
- return i(), r("svg", Ts, [...e[0] || (e[0] = [
1048
+ function Ss(s, e) {
1049
+ return i(), r("svg", Es, [...e[0] || (e[0] = [
1049
1050
  J('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 3l18 18"></path><path d="M4 7h3m4 0h9"></path><path d="M10 11l0 6"></path><path d="M14 14l0 3"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l.077 -.923"></path><path d="M18.384 14.373l.616 -7.373"></path><path d="M9 5v-1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 8)
1050
1051
  ])]);
1051
1052
  }
1052
- const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"], Ss = {
1053
+ const Vs = /* @__PURE__ */ $(Ts, [["render", Ss]]), Bs = ["id", "data-node-type"], zs = {
1053
1054
  class: "__title-label",
1054
1055
  style: { "flex-grow": "1" }
1055
- }, zs = { key: 0 }, js = {
1056
+ }, js = { key: 0 }, Ls = {
1056
1057
  class: "__menu",
1057
1058
  style: { display: "flex" }
1058
- }, Ls = { class: "__outputs" }, Us = { key: 0 }, Gs = ["id", "title"], Rs = { class: "__inputs" }, Ps = { key: 0 }, Ds = ["id", "title"], Hs = /* @__PURE__ */ U({
1059
+ }, Us = { class: "__outputs" }, Gs = { key: 0 }, Rs = ["id", "title"], Ds = { class: "__inputs" }, Hs = { key: 0 }, Ps = ["id", "title"], As = /* @__PURE__ */ U({
1059
1060
  __name: "CodeGraphNode",
1060
1061
  props: {
1061
1062
  node: {},
@@ -1064,9 +1065,9 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1064
1065
  },
1065
1066
  emits: ["select", "start-drag", "update"],
1066
1067
  setup(s, { emit: e }) {
1067
- const t = ke.ContextMenu, n = ke.NodeInterface, o = s, a = b(() => o.node), d = e, { viewModel: u } = q(), { graph: v, switchGraph: k } = ae(), w = B(null), V = B(!1), L = B(""), N = B(null), m = B(!1);
1068
+ const t = Ce.ContextMenu, n = Ce.NodeInterface, o = s, a = b(() => o.node), l = e, { viewModel: u } = q(), { graph: v, switchGraph: k } = ae(), w = V(null), S = V(!1), L = V(""), N = V(null), m = V(!1);
1068
1069
  let y = 0, x = 0;
1069
- const f = B(!1), C = b(() => {
1070
+ const f = V(!1), C = b(() => {
1070
1071
  const c = [
1071
1072
  { value: "edit", label: "Edit" },
1072
1073
  { value: "rename", label: "Rename" },
@@ -1080,26 +1081,26 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1080
1081
  "--hidden": a.value.state?.hidden
1081
1082
  })), M = b(() => ({
1082
1083
  "--reverse-y": o.node.reverseY ?? u.value.settings.nodes.reverseY
1083
- })), je = b(() => ({
1084
+ })), Le = b(() => ({
1084
1085
  top: `${o.node.position?.y ?? 0}px`,
1085
1086
  left: `${o.node.position?.x ?? 0}px`,
1086
1087
  "--width": `${o.node.width ?? u.value.settings.nodes.defaultWidth}px`
1087
- })), Le = b(() => Object.values(o.node.inputs).filter((c) => !c.hidden)), Ue = b(() => Object.values(o.node.outputs).filter((c) => !c.hidden)), he = () => {
1088
- d("select");
1089
- }, Ge = (c) => {
1090
- o.selected || he(), d("start-drag", c);
1088
+ })), Ue = b(() => Object.values(o.node.inputs).filter((c) => !c.hidden)), Ge = b(() => Object.values(o.node.outputs).filter((c) => !c.hidden)), he = () => {
1089
+ l("select");
1090
+ }, Re = (c) => {
1091
+ o.selected || he(), l("start-drag", c);
1091
1092
  }, ve = () => {
1092
1093
  f.value = !0;
1093
- }, Re = () => {
1094
+ }, De = () => {
1094
1095
  const c = u.value.displayedGraph.sidebar;
1095
1096
  c.nodeId = "", c.visible = !1;
1096
1097
  }, me = () => {
1097
1098
  const c = u.value.displayedGraph.sidebar;
1098
1099
  c.nodeId = o.node.id, c.visible = !0;
1099
- }, Pe = () => {
1100
+ }, He = () => {
1100
1101
  const c = u.value.displayedGraph.sidebar;
1101
1102
  c.nodeId = o.node.id;
1102
- }, De = async (c) => {
1103
+ }, Pe = async (c) => {
1103
1104
  switch (c) {
1104
1105
  case "edit":
1105
1106
  me();
@@ -1108,30 +1109,30 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1108
1109
  v.value.removeNode(o.node);
1109
1110
  break;
1110
1111
  case "rename":
1111
- L.value = o.node.title, V.value = !0, await ht(), N.value?.focus();
1112
+ L.value = o.node.title, S.value = !0, await mt(), N.value?.focus();
1112
1113
  break;
1113
1114
  case "editSubgraph":
1114
1115
  k(o.node.template);
1115
1116
  break;
1116
1117
  }
1117
1118
  }, fe = () => {
1118
- a.value.title = L.value, V.value = !1;
1119
+ a.value.title = L.value, S.value = !1;
1119
1120
  }, ge = () => {
1120
1121
  w.value && u.value.hooks.renderNode.execute({ node: o.node, el: w.value });
1121
- }, He = (c) => {
1122
+ }, Ae = (c) => {
1122
1123
  m.value = !0, y = o.node.width, x = c.clientX, c.preventDefault();
1123
1124
  }, be = (c) => {
1124
- a.value.state && (a.value.state.integrated = c, d("update"));
1125
+ a.value.state && (a.value.state.integrated = c, l("update"));
1125
1126
  }, ye = (c) => {
1126
1127
  if (!m.value) return;
1127
- const g = c.clientX - x, h = y + g / v.value.scaling, Ae = u.value.settings.nodes.minWidth, Fe = u.value.settings.nodes.maxWidth;
1128
- a.value.width = Math.max(Ae, Math.min(Fe, h));
1128
+ const g = c.clientX - x, h = y + g / v.value.scaling, Fe = u.value.settings.nodes.minWidth, We = u.value.settings.nodes.maxWidth;
1129
+ a.value.width = Math.max(Fe, Math.min(We, h));
1129
1130
  }, _e = () => {
1130
1131
  m.value = !1;
1131
1132
  };
1132
1133
  return ie(() => {
1133
1134
  ge(), window.addEventListener("mousemove", ye), window.addEventListener("mouseup", _e);
1134
- }), Oe(ge), ct(() => {
1135
+ }), Te(ge), ht(() => {
1135
1136
  window.removeEventListener("mousemove", ye), window.removeEventListener("mouseup", _e);
1136
1137
  }), (c, g) => (i(), r("div", {
1137
1138
  id: a.value.id,
@@ -1139,20 +1140,20 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1139
1140
  ref: w,
1140
1141
  class: G([p.value, "baklava-node"]),
1141
1142
  "data-node-type": a.value.type,
1142
- style: re(je.value),
1143
+ style: re(Le.value),
1143
1144
  onPointerdown: he
1144
1145
  }, [
1145
1146
  _(u).settings.nodes.resizable ? (i(), r("div", {
1146
1147
  key: 0,
1147
1148
  class: "__resize-handle",
1148
- onMousedown: He
1149
+ onMousedown: Ae
1149
1150
  }, null, 32)) : I("", !0),
1150
- l("div", {
1151
+ d("div", {
1151
1152
  class: "__title",
1152
- onPointerdown: A(Ge, ["self", "stop"]),
1153
+ onPointerdown: A(Re, ["self", "stop"]),
1153
1154
  onContextmenu: A(ve, ["prevent"])
1154
1155
  }, [
1155
- a.value.inputs._node ? (i(), O(we, {
1156
+ a.value.inputs._node ? (i(), O(xe, {
1156
1157
  key: 0,
1157
1158
  node: a.value,
1158
1159
  intf: a.value.inputs._node,
@@ -1160,7 +1161,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1160
1161
  "data-interface-type": "node",
1161
1162
  style: { "flex-grow": "0" }
1162
1163
  }, null, 8, ["node", "intf"])) : I("", !0),
1163
- V.value ? ee((i(), r("input", {
1164
+ S.value ? ee((i(), r("input", {
1164
1165
  key: 2,
1165
1166
  ref_key: "renameInputEl",
1166
1167
  ref: N,
@@ -1174,41 +1175,41 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1174
1175
  }, null, 544)), [
1175
1176
  [te, L.value]
1176
1177
  ]) : (i(), r(T, { key: 1 }, [
1177
- l("div", Ss, [
1178
- a.value.idx > -1 ? (i(), r("span", zs, j(a.value.idx + 1) + " - ", 1)) : I("", !0),
1179
- pt(j(a.value.title), 1)
1178
+ d("div", zs, [
1179
+ a.value.idx > -1 ? (i(), r("span", js, j(a.value.idx + 1) + " - ", 1)) : I("", !0),
1180
+ vt(j(a.value.title), 1)
1180
1181
  ]),
1181
- l("div", js, [
1182
+ d("div", Ls, [
1182
1183
  a.value.subgraph ? I("", !0) : (i(), r(T, { key: 0 }, [
1183
- a.value.state.lockCode ? (i(), O(_(fs), {
1184
+ a.value.state.lockCode ? (i(), O(_(gs), {
1184
1185
  key: 0,
1185
1186
  class: "--clickable mx-1",
1186
1187
  onClick: g[0] || (g[0] = (h) => a.value.lockCode = !1)
1187
1188
  })) : I("", !0),
1188
- a.value.state.integrated ? (i(), O(_(Dt), {
1189
+ a.value.state.integrated ? (i(), O(_(Pt), {
1189
1190
  key: 1,
1190
1191
  class: "--clickable mx-1",
1191
1192
  onClick: g[1] || (g[1] = (h) => be(!1))
1192
- })) : (i(), O(_($s), {
1193
+ })) : (i(), O(_(Os), {
1193
1194
  key: 2,
1194
1195
  class: "--clickable mx-1",
1195
1196
  onClick: g[2] || (g[2] = (h) => be(!0))
1196
1197
  })),
1197
- !_(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(ps), {
1198
+ !_(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(hs), {
1198
1199
  key: 3,
1199
1200
  class: "--clickable mx-1",
1200
1201
  onClick: me
1201
- })) : _(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(os), {
1202
+ })) : _(u).displayedGraph.sidebar.visible && _(u).displayedGraph.sidebar.nodeId !== a.value.id ? (i(), O(_(as), {
1202
1203
  key: 4,
1203
1204
  class: "--clickable mx-1",
1204
- onClick: Pe
1205
+ onClick: He
1205
1206
  })) : (i(), O(_(ls), {
1206
1207
  key: 5,
1207
1208
  class: "--clickable mx-1",
1208
- onClick: Re
1209
+ onClick: De
1209
1210
  }))
1210
1211
  ], 64)),
1211
- z(_(Wt), {
1212
+ z(_(Xt), {
1212
1213
  class: "--clickable mx-1",
1213
1214
  onClick: ve
1214
1215
  }),
@@ -1218,11 +1219,11 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1218
1219
  x: 0,
1219
1220
  y: 0,
1220
1221
  items: C.value,
1221
- onClick: De
1222
+ onClick: Pe
1222
1223
  }, null, 8, ["modelValue", "items"])
1223
1224
  ])
1224
1225
  ], 64)),
1225
- a.value.outputs._node ? (i(), O(we, {
1226
+ a.value.outputs._node ? (i(), O(xe, {
1226
1227
  key: 3,
1227
1228
  node: a.value,
1228
1229
  intf: a.value.outputs._node,
@@ -1230,26 +1231,26 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1230
1231
  "data-interface-type": "node"
1231
1232
  }, null, 8, ["node", "intf"])) : I("", !0)
1232
1233
  ], 32),
1233
- l("div", {
1234
+ d("div", {
1234
1235
  class: G(["__content", M.value]),
1235
1236
  onKeydown: g[5] || (g[5] = ne(A(() => {
1236
1237
  }, ["stop"]), ["delete"])),
1237
1238
  onContextmenu: g[6] || (g[6] = A(() => {
1238
1239
  }, ["prevent"]))
1239
1240
  }, [
1240
- l("div", Ls, [
1241
- (i(!0), r(T, null, D(Ue.value, (h) => (i(), r(T, {
1241
+ d("div", Us, [
1242
+ (i(!0), r(T, null, H(Ge.value, (h) => (i(), r(T, {
1242
1243
  key: h.id
1243
1244
  }, [
1244
- a.value.state?.hidden ? (i(), r("div", Us, [
1245
+ a.value.state?.hidden ? (i(), r("div", Gs, [
1245
1246
  h.port ? (i(), r("div", {
1246
1247
  key: 0,
1247
1248
  id: h.id,
1248
1249
  title: h.name,
1249
1250
  class: "baklava-node-interface --output --connected"
1250
1251
  }, [...g[7] || (g[7] = [
1251
- l("div", { class: "__port" }, null, -1)
1252
- ])], 8, Gs)) : I("", !0)
1252
+ d("div", { class: "__port" }, null, -1)
1253
+ ])], 8, Rs)) : I("", !0)
1253
1254
  ])) : W(c.$slots, "nodeInterface", {
1254
1255
  key: 1,
1255
1256
  type: "output",
@@ -1264,19 +1265,19 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1264
1265
  ])
1265
1266
  ], 64))), 128))
1266
1267
  ]),
1267
- l("div", Rs, [
1268
- (i(!0), r(T, null, D(Le.value, (h) => (i(), r(T, {
1268
+ d("div", Ds, [
1269
+ (i(!0), r(T, null, H(Ue.value, (h) => (i(), r(T, {
1269
1270
  key: h.id
1270
1271
  }, [
1271
- a.value.state?.hidden ? (i(), r("div", Ps, [
1272
+ a.value.state?.hidden ? (i(), r("div", Hs, [
1272
1273
  h.port ? (i(), r("div", {
1273
1274
  key: 0,
1274
1275
  id: h.id,
1275
1276
  title: h.name,
1276
1277
  class: "baklava-node-interface --input --connected"
1277
1278
  }, [...g[8] || (g[8] = [
1278
- l("div", { class: "__port" }, null, -1)
1279
- ])], 8, Ds)) : I("", !0)
1279
+ d("div", { class: "__port" }, null, -1)
1280
+ ])], 8, Ps)) : I("", !0)
1280
1281
  ])) : W(c.$slots, "nodeInterface", {
1281
1282
  key: 1,
1282
1283
  node: a.value,
@@ -1294,10 +1295,10 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1294
1295
  ], 34)
1295
1296
  ], 46, Bs));
1296
1297
  }
1297
- }), As = ["title"], Fs = {
1298
+ }), Fs = ["title"], Ws = {
1298
1299
  key: 0,
1299
1300
  class: "__label"
1300
- }, xe = /* @__PURE__ */ U({
1301
+ }, Ie = /* @__PURE__ */ U({
1301
1302
  __name: "Checkbox",
1302
1303
  props: {
1303
1304
  disabled: { type: Boolean },
@@ -1313,42 +1314,42 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1313
1314
  title: s.name,
1314
1315
  onClick: o[0] || (o[0] = (a) => t("update:modelValue", !s.modelValue))
1315
1316
  }, [
1316
- o[1] || (o[1] = l("div", { class: "__checkmark-container" }, [
1317
- l("svg", {
1317
+ o[1] || (o[1] = d("div", { class: "__checkmark-container" }, [
1318
+ d("svg", {
1318
1319
  xmlns: "http://www.w3.org/2000/svg",
1319
1320
  width: "18",
1320
1321
  height: "18",
1321
1322
  viewBox: "0 0 18 18"
1322
1323
  }, [
1323
- l("path", {
1324
+ d("path", {
1324
1325
  class: "__checkmark",
1325
1326
  d: "M 6 5 L 6 10 L 16 10",
1326
1327
  transform: "rotate(-45 10 10)"
1327
1328
  })
1328
1329
  ])
1329
1330
  ], -1)),
1330
- s.name ? (i(), r("div", Fs, j(s.name), 1)) : I("", !0)
1331
- ], 10, As));
1331
+ s.name ? (i(), r("div", Ws, j(s.name), 1)) : I("", !0)
1332
+ ], 10, Fs));
1332
1333
  }
1333
- }), Ws = { class: "__header" }, Xs = { class: "__node-name" }, qs = { class: "__interfaces" }, Js = { class: "__inputs" }, Ys = { style: { display: "flex" } }, Qs = { class: "__outputs" }, Ks = {
1334
+ }), Xs = { class: "__header" }, qs = { class: "__node-name" }, Js = { class: "__interfaces" }, Ys = { class: "__inputs" }, Qs = { style: { display: "flex" } }, Ks = { class: "__outputs" }, Zs = {
1334
1335
  key: 0,
1335
1336
  class: "__interface"
1336
- }, Zs = { style: { display: "flex" } }, en = /* @__PURE__ */ U({
1337
+ }, en = { style: { display: "flex" } }, tn = /* @__PURE__ */ U({
1337
1338
  __name: "CodeGraphSidebar",
1338
1339
  setup(s) {
1339
- const { viewModel: e } = q(), { graph: t } = ae(), n = B(null), o = Te(e.value.settings.sidebar, "width"), a = b(() => e.value.settings.sidebar.resizable);
1340
- let d = 0, u = 0;
1340
+ const { viewModel: e } = q(), { graph: t } = ae(), n = V(null), o = Ee(e.value.settings.sidebar, "width"), a = b(() => e.value.settings.sidebar.resizable);
1341
+ let l = 0, u = 0;
1341
1342
  const v = b(() => {
1342
1343
  const f = t.value.sidebar.nodeId;
1343
1344
  return t.value.nodes.find((C) => C.id === f);
1344
1345
  }), k = b(() => v.value), w = b(() => ({
1345
1346
  width: `${o.value}px`
1346
- })), V = b(() => k.value ? Object.values(k.value.inputs).filter((f) => f.displayInSidebar && f.component) : []), L = b(() => k.value ? Object.values(k.value.outputs).filter((f) => f.displayInSidebar && f.component) : []), N = () => {
1347
+ })), S = b(() => k.value ? Object.values(k.value.inputs).filter((f) => f.displayInSidebar && f.component) : []), L = b(() => k.value ? Object.values(k.value.outputs).filter((f) => f.displayInSidebar && f.component) : []), N = () => {
1347
1348
  t.value.sidebar.visible = !1;
1348
1349
  }, m = () => {
1349
1350
  v.value?.events.update.emit(null);
1350
1351
  }, y = (f) => {
1351
- d = o.value, u = f.clientX, window.addEventListener("mousemove", x), window.addEventListener(
1352
+ l = o.value, u = f.clientX, window.addEventListener("mousemove", x), window.addEventListener(
1352
1353
  "mouseup",
1353
1354
  () => {
1354
1355
  window.removeEventListener("mousemove", x);
@@ -1357,7 +1358,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1357
1358
  );
1358
1359
  }, x = (f) => {
1359
1360
  const C = n.value?.parentElement?.getBoundingClientRect().width ?? 500, p = f.clientX - u;
1360
- let M = d - p;
1361
+ let M = l - p;
1361
1362
  M < 300 ? M = 300 : M > 0.9 * C && (M = 0.9 * C), o.value = M;
1362
1363
  };
1363
1364
  return (f, C) => (i(), r("div", {
@@ -1372,24 +1373,24 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1372
1373
  onMousedown: y
1373
1374
  }, null, 32)) : I("", !0),
1374
1375
  v.value ? (i(), r(T, { key: 1 }, [
1375
- l("div", Ws, [
1376
- l("button", {
1376
+ d("div", Xs, [
1377
+ d("button", {
1377
1378
  tabindex: "-1",
1378
1379
  class: "__close",
1379
1380
  onClick: N
1380
1381
  }, "×"),
1381
- l("div", Xs, [
1382
- l("b", null, j(v.value.title), 1)
1382
+ d("div", qs, [
1383
+ d("b", null, j(v.value.title), 1)
1383
1384
  ])
1384
1385
  ]),
1385
- l("div", qs, [
1386
- l("div", Js, [
1387
- (i(!0), r(T, null, D(V.value, (p) => (i(), r("div", {
1386
+ d("div", Js, [
1387
+ d("div", Ys, [
1388
+ (i(!0), r(T, null, H(S.value, (p) => (i(), r("div", {
1388
1389
  key: p.id,
1389
1390
  class: "__interface"
1390
1391
  }, [
1391
- l("div", Ys, [
1392
- z(xe, {
1392
+ d("div", Qs, [
1393
+ z(Ie, {
1393
1394
  modelValue: p.hidden,
1394
1395
  "onUpdate:modelValue": [
1395
1396
  (M) => p.hidden = M,
@@ -1399,7 +1400,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1399
1400
  inversed: "",
1400
1401
  style: { "padding-right": "8px" }
1401
1402
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]),
1402
- (i(), O(Ce(p.component), {
1403
+ (i(), O(we(p.component), {
1403
1404
  modelValue: p.value,
1404
1405
  "onUpdate:modelValue": (M) => p.value = M,
1405
1406
  node: v.value,
@@ -1409,10 +1410,10 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1409
1410
  ])
1410
1411
  ]))), 128))
1411
1412
  ]),
1412
- l("div", Qs, [
1413
- k.value && k.value.state ? (i(), r("div", Ks, [
1414
- C[3] || (C[3] = l("label", null, "Variable name", -1)),
1415
- ee(l("input", {
1413
+ d("div", Ks, [
1414
+ k.value && k.value.state ? (i(), r("div", Zs, [
1415
+ C[3] || (C[3] = d("label", null, "Variable name", -1)),
1416
+ ee(d("input", {
1416
1417
  "onUpdate:modelValue": C[1] || (C[1] = (p) => k.value.state.variableName = p),
1417
1418
  type: "text",
1418
1419
  class: "baklava-input",
@@ -1423,12 +1424,12 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1423
1424
  [te, k.value.state.variableName]
1424
1425
  ])
1425
1426
  ])) : I("", !0),
1426
- (i(!0), r(T, null, D(L.value, (p) => (i(), r("div", {
1427
+ (i(!0), r(T, null, H(L.value, (p) => (i(), r("div", {
1427
1428
  key: p.id,
1428
1429
  class: "__interface"
1429
1430
  }, [
1430
- l("div", Zs, [
1431
- z(xe, {
1431
+ d("div", en, [
1432
+ z(Ie, {
1432
1433
  modelValue: p.hidden,
1433
1434
  "onUpdate:modelValue": [
1434
1435
  (M) => p.hidden = M,
@@ -1438,7 +1439,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1438
1439
  inversed: "",
1439
1440
  style: { "padding-right": "8px" }
1440
1441
  }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"]),
1441
- (i(), O(Ce(p.component), {
1442
+ (i(), O(we(p.component), {
1442
1443
  modelValue: p.value,
1443
1444
  "onUpdate:modelValue": (M) => p.value = M,
1444
1445
  node: v.value,
@@ -1453,7 +1454,7 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1453
1454
  ], 64)) : I("", !0)
1454
1455
  ], 6));
1455
1456
  }
1456
- }), tn = U({
1457
+ }), sn = U({
1457
1458
  props: {
1458
1459
  type: {
1459
1460
  type: String,
@@ -1465,14 +1466,14 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1465
1466
  }
1466
1467
  },
1467
1468
  setup(s) {
1468
- const { viewModel: e } = q(), { switchGraph: t } = ae(), n = B(!1), o = b(() => s.type.startsWith(se));
1469
+ const { viewModel: e } = q(), { switchGraph: t } = ae(), n = V(!1), o = b(() => s.type.startsWith(se));
1469
1470
  return { showContextMenu: n, hasContextMenu: o, contextMenuItems: [
1470
1471
  { label: "Edit Subgraph", value: "editSubgraph" },
1471
1472
  { label: "Delete Subgraph", value: "deleteSubgraph" }
1472
1473
  ], openContextMenu: () => {
1473
1474
  n.value = !0;
1474
1475
  }, onContextMenuClick: (v) => {
1475
- const k = s.type.substring(se.length), w = e.value.editor.graphTemplates.find((V) => V.id === k);
1476
+ const k = s.type.substring(se.length), w = e.value.editor.graphTemplates.find((S) => S.id === k);
1476
1477
  if (w)
1477
1478
  switch (v) {
1478
1479
  case "editSubgraph":
@@ -1484,38 +1485,38 @@ const Vs = /* @__PURE__ */ $(Os, [["render", Es]]), Bs = ["id", "data-node-type"
1484
1485
  }
1485
1486
  } };
1486
1487
  }
1487
- }), sn = ["data-node-type"], nn = { class: "__title" }, on = { class: "__title-label" };
1488
- function an(s, e, t, n, o, a) {
1488
+ }), nn = ["data-node-type"], on = { class: "__title" }, an = { class: "__title-label" };
1489
+ function rn(s, e, t, n, o, a) {
1489
1490
  return i(), r("div", {
1490
1491
  class: "baklava-node --palette",
1491
1492
  "data-node-type": s.type
1492
1493
  }, [
1493
- l("div", nn, [
1494
- l("div", on, j(s.title), 1)
1494
+ d("div", on, [
1495
+ d("div", an, j(s.title), 1)
1495
1496
  ])
1496
- ], 8, sn);
1497
+ ], 8, nn);
1497
1498
  }
1498
- const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1499
+ const Ne = /* @__PURE__ */ $(sn, [["render", rn]]), dn = {
1499
1500
  class: "baklava-node --palette",
1500
1501
  style: { "margin-top": "-20px", "margin-bottom": "20px" }
1501
1502
  }, ln = {
1502
1503
  key: 0,
1503
1504
  style: { display: "flex", "justify-content": "space-between" }
1504
- }, dn = ["onClick"], un = {
1505
+ }, un = ["onClick"], cn = {
1505
1506
  key: 0,
1506
1507
  style: { margin: "auto 0", "font-size": "12px" }
1507
- }, cn = /* @__PURE__ */ U({
1508
+ }, pn = /* @__PURE__ */ U({
1508
1509
  __name: "CodeNodePalette",
1509
1510
  setup(s) {
1510
- const { viewModel: e } = q(), { x: t, y: n } = Ct(), { transform: o } = ot(), a = at(e), d = vt("editorEl"), u = B(""), v = B(null), k = () => u.value ? a.value.filter(
1511
+ const { viewModel: e } = q(), { x: t, y: n } = wt(), { transform: o } = it(), a = rt(e), l = ft("editorEl"), u = V(""), v = V(null), k = () => u.value ? a.value.filter(
1511
1512
  (N) => N.name.toLowerCase().includes(u.value.toLowerCase()) || Object.values(N.nodeTypes).some(
1512
1513
  (m) => m.title.toLowerCase().includes(u.value.toLowerCase())
1513
1514
  )
1514
1515
  ) : a.value, w = (N) => u.value ? Object.values(N).filter(
1515
1516
  (m) => m.category.toLowerCase().includes(u.value.toLowerCase()) || m.title.toLowerCase().includes(u.value.toLowerCase())
1516
- ) : Object.values(N), V = b(() => {
1517
- if (!v.value || !d?.value) return {};
1518
- const { left: N, top: m } = d.value.getBoundingClientRect();
1517
+ ) : Object.values(N), S = b(() => {
1518
+ if (!v.value || !l?.value) return {};
1519
+ const { left: N, top: m } = l.value.getBoundingClientRect();
1519
1520
  return {
1520
1521
  top: `${n.value - m}px`,
1521
1522
  left: `${t.value - N}px`
@@ -1526,21 +1527,21 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1526
1527
  nodeInformation: m
1527
1528
  };
1528
1529
  const y = () => {
1529
- const x = P(new m.type());
1530
+ const x = D(new m.type());
1530
1531
  e.value.displayedGraph.addNode(x);
1531
- const f = d.value.getBoundingClientRect(), [C, p] = o(t.value - f.left, n.value - f.top);
1532
+ const f = l.value.getBoundingClientRect(), [C, p] = o(t.value - f.left, n.value - f.top);
1532
1533
  x.position.x = C, x.position.y = p, v.value = null, document.removeEventListener("pointerup", y);
1533
1534
  };
1534
1535
  document.addEventListener("pointerup", y);
1535
1536
  };
1536
1537
  return (N, m) => (i(), r(T, null, [
1537
- l("div", {
1538
+ d("div", {
1538
1539
  class: G([{ "--open": _(e).settings.palette.enabled }, "baklava-node-palette"]),
1539
1540
  onContextmenu: m[1] || (m[1] = A(() => {
1540
1541
  }, ["stop", "prevent"]))
1541
1542
  }, [
1542
- l("div", rn, [
1543
- ee(l("input", {
1543
+ d("div", dn, [
1544
+ ee(d("input", {
1544
1545
  "onUpdate:modelValue": m[0] || (m[0] = (y) => u.value = y),
1545
1546
  type: "text",
1546
1547
  class: "baklava-input",
@@ -1550,17 +1551,17 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1550
1551
  [te, u.value]
1551
1552
  ])
1552
1553
  ]),
1553
- (i(!0), r(T, null, D(k(), (y) => (i(), r("section", {
1554
+ (i(!0), r(T, null, H(k(), (y) => (i(), r("section", {
1554
1555
  key: y.name
1555
1556
  }, [
1556
1557
  y.name !== "default" ? (i(), r("h3", ln, [
1557
- l("div", {
1558
+ d("div", {
1558
1559
  onClick: (x) => u.value = y.name,
1559
1560
  style: { cursor: "pointer" }
1560
- }, j(y.name), 9, dn),
1561
- w(y.nodeTypes).length < Object.values(y.nodeTypes).length ? (i(), r("div", un, " ( " + j(w(y.nodeTypes).length) + " / " + j(Object.values(y.nodeTypes).length) + " ) ", 1)) : I("", !0)
1561
+ }, j(y.name), 9, un),
1562
+ w(y.nodeTypes).length < Object.values(y.nodeTypes).length ? (i(), r("div", cn, " ( " + j(w(y.nodeTypes).length) + " / " + j(Object.values(y.nodeTypes).length) + " ) ", 1)) : I("", !0)
1562
1563
  ])) : I("", !0),
1563
- (i(!0), r(T, null, D(w(y.nodeTypes), (x) => (i(), O(Ie, {
1564
+ (i(!0), r(T, null, H(w(y.nodeTypes), (x) => (i(), O(Ne, {
1564
1565
  key: x.type,
1565
1566
  type: x.type,
1566
1567
  title: x.title,
@@ -1568,14 +1569,14 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1568
1569
  }, null, 8, ["type", "title", "onPointerdown"]))), 128))
1569
1570
  ]))), 128))
1570
1571
  ], 34),
1571
- z(mt, { name: "fade" }, {
1572
+ z(gt, { name: "fade" }, {
1572
1573
  default: F(() => [
1573
1574
  v.value ? (i(), r("div", {
1574
1575
  key: 0,
1575
1576
  class: "baklava-dragged-node",
1576
- style: re(V.value)
1577
+ style: re(S.value)
1577
1578
  }, [
1578
- z(Ie, {
1579
+ z(Ne, {
1579
1580
  type: v.value.type,
1580
1581
  title: v.value.nodeInformation.title
1581
1582
  }, null, 8, ["type", "title"])
@@ -1585,28 +1586,28 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1585
1586
  })
1586
1587
  ], 64));
1587
1588
  }
1588
- }), zn = /* @__PURE__ */ U({
1589
+ }), jn = /* @__PURE__ */ U({
1589
1590
  __name: "CodeGraphEditor",
1590
1591
  props: {
1591
1592
  viewModel: {}
1592
1593
  },
1593
1594
  setup(s) {
1594
- const t = Te(s, "viewModel"), n = (o) => o.events.update.emit(null);
1595
+ const t = Ee(s, "viewModel"), n = (o) => o.events.update.emit(null);
1595
1596
  return ie(() => {
1596
1597
  t.value.subscribe(), t.value.engine.start();
1597
- }), ft(() => {
1598
+ }), bt(() => {
1598
1599
  t.value.unsubscribe(), t.value.engine.stop();
1599
- }), (o, a) => (i(), O(_(it), { "view-model": t.value }, {
1600
+ }), (o, a) => (i(), O(_(dt), { "view-model": t.value }, {
1600
1601
  palette: F(() => [
1601
- z(cn)
1602
+ z(pn)
1602
1603
  ]),
1603
- node: F((d) => [
1604
- z(Hs, yt(d, {
1605
- onUpdate: (u) => n(d.node)
1604
+ node: F((l) => [
1605
+ z(As, kt(l, {
1606
+ onUpdate: (u) => n(l.node)
1606
1607
  }), null, 16, ["onUpdate"])
1607
1608
  ]),
1608
- sidebar: F((d) => [
1609
- z(en, gt(bt(d)), {
1609
+ sidebar: F((l) => [
1610
+ z(tn, yt(_t(l)), {
1610
1611
  codeEditor: F(({ node: u }) => [
1611
1612
  W(o.$slots, "sidebarCodeEditor", { node: u })
1612
1613
  ]),
@@ -1616,7 +1617,43 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1616
1617
  _: 3
1617
1618
  }, 8, ["view-model"]));
1618
1619
  }
1619
- }), pn = (s) => {
1620
+ });
1621
+ function Ln(s) {
1622
+ const e = lt(s?.existingEditor);
1623
+ e.code = s?.code ? new s.code(e) : new Lt(e), hn(e);
1624
+ const t = {};
1625
+ return Object.keys(Q).forEach((n) => {
1626
+ t[n] = typeof Q[n] == "object" ? { ...e.settings[n], ...Q[n] } : Q[n];
1627
+ }), e.settings = D({ ...e.settings, ...t }), e.settings.nodes.defaultWidth = 350, e.state = D({
1628
+ modules: {},
1629
+ token: null
1630
+ }), e.init = () => {
1631
+ e.unsubscribe(), e.engine = new ut(e.editor);
1632
+ }, e.subscribe = () => {
1633
+ e.state.token && e.unsubscribe();
1634
+ const n = Symbol(), o = e.displayedGraph;
1635
+ o.events.addNode.subscribe(n, (a) => {
1636
+ a.code = e.code;
1637
+ }), o.events.addConnection.subscribe(n, (a) => {
1638
+ e.code.findNodeById(a.to.nodeId)?.onConnected(), e.code.findNodeById(a.from.nodeId)?.onConnected();
1639
+ }), o.events.removeConnection.subscribe(n, (a) => {
1640
+ e.code.findNodeById(a.to.nodeId)?.onUnconnected(), e.code.findNodeById(a.from.nodeId)?.onUnconnected();
1641
+ }), e.engine.events.beforeRun.subscribe(n, () => {
1642
+ e.engine.pause(), e.code && (e.code.updateCodeNodes(), e.code.sortNodes(), e.code.updateCodeTemplates(), e.code.resetInputInterfaceScript()), e.engine.resume();
1643
+ }), e.engine.events.beforeNodeCalculation.subscribe(n, (a) => {
1644
+ e.engine.pause();
1645
+ const l = a.node;
1646
+ l.isCodeNode && (l.updateOutputNames(), l.updateConnectedInputInterfaces()), e.engine.resume();
1647
+ }), e.engine.events.afterRun.subscribe(n, (a) => {
1648
+ e.engine.pause(), ct(a, e.editor), e.code && (e.code.renderNodeCodes(), e.code.renderCode()), e.engine.resume();
1649
+ }), e.state.token = n;
1650
+ }, e.unsubscribe = () => {
1651
+ if (!e.state.token) return;
1652
+ const n = e.state.token;
1653
+ e.displayedGraph.events.addNode.unsubscribe(n), e.displayedGraph.events.addConnection.unsubscribe(n), e.engine.events.beforeRun.unsubscribe(n), e.engine.events.afterRun.unsubscribe(n), e.state.token = null;
1654
+ }, e;
1655
+ }
1656
+ const hn = (s) => {
1620
1657
  const e = "TOGGLE_PALETTE";
1621
1658
  s.commandHandler.registerCommand(e, {
1622
1659
  execute: () => s.settings.palette.enabled = !s.settings.palette.enabled,
@@ -1636,9 +1673,9 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1636
1673
  command: e,
1637
1674
  title: "Toggle palette",
1638
1675
  // Tooltip text
1639
- icon: b(() => s.settings.palette.enabled ? Yt : es)
1676
+ icon: b(() => s.settings.palette.enabled ? Qt : ts)
1640
1677
  },
1641
- ...rt,
1678
+ ...pt,
1642
1679
  {
1643
1680
  command: t,
1644
1681
  title: "Clear all",
@@ -1649,7 +1686,7 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1649
1686
  command: n,
1650
1687
  title: "Toggle minimap",
1651
1688
  // Tooltip text
1652
- icon: b(() => s.settings.enableMinimap ? xs : _s)
1689
+ icon: b(() => s.settings.enableMinimap ? Is : ks)
1653
1690
  }
1654
1691
  ];
1655
1692
  }, Q = {
@@ -1667,92 +1704,57 @@ const Ie = /* @__PURE__ */ $(tn, [["render", an]]), rn = {
1667
1704
  },
1668
1705
  displayValueOnHover: !1
1669
1706
  };
1670
- function jn(s) {
1671
- const e = lt(s?.existingEditor);
1672
- e.code = s?.code ? new s.code(e) : new jt(e), pn(e);
1673
- const t = {};
1674
- return Object.keys(Q).forEach((n) => {
1675
- t[n] = typeof Q[n] == "object" ? { ...e.settings[n], ...Q[n] } : Q[n];
1676
- }), e.settings = P({ ...e.settings, ...t }), e.settings.nodes.defaultWidth = 350, e.state = P({
1677
- modules: {},
1678
- token: null
1679
- }), e.init = () => {
1680
- e.unsubscribe(), e.engine = new dt(e.editor);
1681
- }, e.subscribe = () => {
1682
- e.state.token && e.unsubscribe();
1683
- const n = Symbol(), o = e.displayedGraph;
1684
- o.events.addNode.subscribe(n, (a) => {
1685
- a.code = e.code;
1686
- }), o.events.addConnection.subscribe(n, (a) => {
1687
- e.code.findNodeById(a.to.nodeId)?.onConnected(), e.code.findNodeById(a.from.nodeId)?.onConnected();
1688
- }), o.events.removeConnection.subscribe(n, (a) => {
1689
- e.code.findNodeById(a.to.nodeId)?.onUnconnected(), e.code.findNodeById(a.from.nodeId)?.onUnconnected();
1690
- }), e.engine.events.beforeRun.subscribe(n, () => {
1691
- e.engine.pause(), e.code && (e.code.updateCodeNodes(), e.code.sortNodes(), e.code.updateCodeTemplates(), e.code.resetInputInterfaceScript()), e.engine.resume();
1692
- }), e.engine.events.beforeNodeCalculation.subscribe(n, (a) => {
1693
- e.engine.pause();
1694
- const d = a.node;
1695
- d.isCodeNode && (d.updateOutputNames(), d.updateConnectedInputInterfaces()), e.engine.resume();
1696
- }), e.engine.events.afterRun.subscribe(n, (a) => {
1697
- e.engine.pause(), ut(a, e.editor), e.code && (e.code.renderNodeCodes(), e.code.renderCode()), e.engine.resume();
1698
- }), e.state.token = n;
1699
- }, e.unsubscribe = () => {
1700
- if (!e.state.token) return;
1701
- const n = e.state.token;
1702
- e.displayedGraph.events.addNode.unsubscribe(n), e.displayedGraph.events.addConnection.unsubscribe(n), e.engine.events.beforeRun.unsubscribe(n), e.engine.events.afterRun.unsubscribe(n), e.state.token = null;
1703
- }, e;
1704
- }
1705
1707
  export {
1706
- wt as AbstractCodeNode,
1707
- kn as CheckboxInterface,
1708
- jt as Code,
1709
- zn as CodeGraphEditor,
1710
- Ee as CodeNode,
1708
+ xt as AbstractCodeNode,
1709
+ Cn as CheckboxInterface,
1710
+ Lt as Code,
1711
+ jn as CodeGraphEditor,
1712
+ Se as CodeNode,
1711
1713
  Y as CodeNodeInputInterface,
1712
- H as CodeNodeInterface,
1713
- le as CodeNodeInterfaceComponent,
1714
- $t as CodeNodeOutputInterface,
1715
- Dt as CodeVariable,
1714
+ P as CodeNodeInterface,
1715
+ de as CodeNodeInterfaceComponent,
1716
+ Ot as CodeNodeOutputInterface,
1717
+ Pt as CodeVariable,
1716
1718
  Q as DEFAULT_SETTINGS,
1717
- Wt as DotsVertical,
1718
- zt as DynamicCodeNode,
1719
- Cn as IntegerInterface,
1720
- Yt as LayoutSidebarLeftCollapse,
1721
- es as LayoutSidebarLeftExpand,
1722
- os as LayoutSidebarRight,
1719
+ Xt as DotsVertical,
1720
+ jt as DynamicCodeNode,
1721
+ wn as IntegerInterface,
1722
+ Qt as LayoutSidebarLeftCollapse,
1723
+ ts as LayoutSidebarLeftExpand,
1724
+ as as LayoutSidebarRight,
1723
1725
  ls as LayoutSidebarRightCollapse,
1724
- ps as LayoutSidebarRightExpand,
1725
- wn as ListInputInterface,
1726
- fs as LockCode,
1727
- xn as NumberInterface,
1728
- _s as Schema,
1729
- xs as SchemaOff,
1730
- In as SelectInterface,
1731
- Nn as SliderInterface,
1732
- Mn as TextInputInterface,
1733
- St as TextInputInterfaceComponent,
1734
- $n as TextareaInputInterface,
1735
- $s as TransitionBottom,
1726
+ hs as LayoutSidebarRightExpand,
1727
+ xn as ListInputInterface,
1728
+ gs as LockCode,
1729
+ In as NumberInterface,
1730
+ ks as Schema,
1731
+ Is as SchemaOff,
1732
+ Nn as SelectInterface,
1733
+ Mn as SliderInterface,
1734
+ $n as TextInputInterface,
1735
+ zt as TextInputInterfaceComponent,
1736
+ On as TextareaInputInterface,
1737
+ Os as TransitionBottom,
1736
1738
  Vs as TrashOff,
1737
- On as TupleInputInterface,
1738
- _n as addDefaultInterfaceTypes,
1739
- pn as addToolbarCommands,
1739
+ Tn as TupleInputInterface,
1740
+ kn as addDefaultInterfaceTypes,
1741
+ hn as addToolbarCommands,
1740
1742
  Be as booleanType,
1741
- Tn as defineCodeNode,
1742
- En as defineDynamicCodeNode,
1743
- Mt as dictType,
1744
- xt as formatInputs,
1743
+ En as defineCodeNode,
1744
+ Sn as defineDynamicCodeNode,
1745
+ $t as dictType,
1746
+ It as formatInputs,
1745
1747
  oe as getCodeNodes,
1746
1748
  Vn as getPositionAtColumn,
1747
1749
  Bn as getPositionBeforeNode,
1748
- Se as listType,
1750
+ ze as listType,
1749
1751
  Ve as loadNodeState,
1750
1752
  X as nodeType,
1751
- de as numberType,
1752
- It as saveNodeState,
1753
- yn as setOptional,
1753
+ le as numberType,
1754
+ Nt as saveNodeState,
1755
+ _n as setOptional,
1754
1756
  ue as stringType,
1755
- Sn as transferCodeScript,
1756
- ze as tupleType,
1757
- jn as useCodeGraph
1757
+ zn as transferCodeScript,
1758
+ je as tupleType,
1759
+ Ln as useCodeGraph
1758
1760
  };