@ddd-tool/domain-designer-generator 0.1.0-beta.7 → 0.1.0-beta.8

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 (2) hide show
  1. package/index.js +769 -765
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -12,7 +12,7 @@ function Bn(e) {
12
12
  }
13
13
  process.env.NODE_ENV !== "production" && Object.freeze({});
14
14
  process.env.NODE_ENV !== "production" && Object.freeze([]);
15
- const Pe = Object.assign, Gn = Object.prototype.hasOwnProperty, Ve = (e, n) => Gn.call(e, n), Y = Array.isArray, te = (e) => dn(e) === "[object Map]", Un = (e) => typeof e == "function", zn = (e) => typeof e == "string", ue = (e) => typeof e == "symbol", je = (e) => e !== null && typeof e == "object", Jn = Object.prototype.toString, dn = (e) => Jn.call(e), mn = (e) => dn(e).slice(8, -1), Ye = (e) => zn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Wn = (e) => {
15
+ const Pe = Object.assign, Un = Object.prototype.hasOwnProperty, Ve = (e, n) => Un.call(e, n), Y = Array.isArray, te = (e) => dn(e) === "[object Map]", zn = (e) => typeof e == "function", Gn = (e) => typeof e == "string", ue = (e) => typeof e == "symbol", Ee = (e) => e !== null && typeof e == "object", Jn = Object.prototype.toString, dn = (e) => Jn.call(e), mn = (e) => dn(e).slice(8, -1), Ye = (e) => Gn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Wn = (e) => {
16
16
  const n = /* @__PURE__ */ Object.create(null);
17
17
  return (t) => n[t] || (n[t] = e(t));
18
18
  }, Yn = Wn((e) => e.charAt(0).toUpperCase() + e.slice(1)), q = (e, n) => !Object.is(e, n);
@@ -192,7 +192,7 @@ const Re = /* @__PURE__ */ new WeakMap(), K = Symbol(
192
192
  ), ae = Symbol(
193
193
  process.env.NODE_ENV !== "production" ? "Array iterate" : ""
194
194
  );
195
- function T(e, n, t) {
195
+ function x(e, n, t) {
196
196
  if (R && A) {
197
197
  let r = Re.get(e);
198
198
  r || Re.set(e, r = /* @__PURE__ */ new Map());
@@ -223,16 +223,16 @@ function V(e, n, t, r, o, s) {
223
223
  if (qe(), n === "clear")
224
224
  p.forEach(_);
225
225
  else {
226
- const C = Y(e), d = C && Ye(t);
226
+ const C = Y(e), m = C && Ye(t);
227
227
  if (C && t === "length") {
228
228
  const i = Number(r);
229
229
  p.forEach((a, l) => {
230
230
  (l === "length" || l === ae || !ue(l) && l >= i) && _(a);
231
231
  });
232
232
  } else
233
- switch ((t !== void 0 || p.has(void 0)) && _(p.get(t)), d && _(p.get(ae)), n) {
233
+ switch ((t !== void 0 || p.has(void 0)) && _(p.get(t)), m && _(p.get(ae)), n) {
234
234
  case "add":
235
- C ? d && _(p.get("length")) : (_(p.get(K)), te(e) && _(p.get(He)));
235
+ C ? m && _(p.get("length")) : (_(p.get(K)), te(e) && _(p.get(He)));
236
236
  break;
237
237
  case "delete":
238
238
  C || (_(p.get(K)), te(e) && _(p.get(He)));
@@ -245,11 +245,11 @@ function V(e, n, t, r, o, s) {
245
245
  Ze();
246
246
  }
247
247
  function J(e) {
248
- const n = E(e);
249
- return n === e ? n : (T(n, "iterate", ae), H(e) ? n : n.map(O));
248
+ const n = j(e);
249
+ return n === e ? n : (x(n, "iterate", ae), H(e) ? n : n.map(O));
250
250
  }
251
251
  function Xe(e) {
252
- return T(e = E(e), "iterate", ae), e;
252
+ return x(e = j(e), "iterate", ae), e;
253
253
  }
254
254
  const st = {
255
255
  __proto__: null,
@@ -354,13 +354,13 @@ function D(e, n, t, r, o, s) {
354
354
  const a = C.apply(e, s);
355
355
  return _ ? O(a) : a;
356
356
  }
357
- let d = t;
358
- p !== e && (_ ? d = function(a, l) {
357
+ let m = t;
358
+ p !== e && (_ ? m = function(a, l) {
359
359
  return t.call(this, O(a), l, e);
360
- } : t.length > 2 && (d = function(a, l) {
360
+ } : t.length > 2 && (m = function(a, l) {
361
361
  return t.call(this, a, l, e);
362
362
  }));
363
- const i = C.call(p, d, r);
363
+ const i = C.call(p, m, r);
364
364
  return _ && o ? o(i) : i;
365
365
  }
366
366
  function cn(e, n, t, r) {
@@ -373,14 +373,14 @@ function cn(e, n, t, r) {
373
373
  }), o[n](s, ...r);
374
374
  }
375
375
  function Oe(e, n, t) {
376
- const r = E(e);
377
- T(r, "iterate", ae);
376
+ const r = j(e);
377
+ x(r, "iterate", ae);
378
378
  const o = r[n](...t);
379
- return (o === -1 || o === !1) && $t(t[0]) ? (t[0] = E(t[0]), r[n](...t)) : o;
379
+ return (o === -1 || o === !1) && $t(t[0]) ? (t[0] = j(t[0]), r[n](...t)) : o;
380
380
  }
381
381
  function ne(e, n, t = []) {
382
382
  nt(), qe();
383
- const r = E(e)[n].apply(e, t);
383
+ const r = j(e)[n].apply(e, t);
384
384
  return Ze(), tt(), r;
385
385
  }
386
386
  const at = /* @__PURE__ */ Bn("__proto__,__v_isRef,__isVue"), Cn = new Set(
@@ -388,8 +388,8 @@ const at = /* @__PURE__ */ Bn("__proto__,__v_isRef,__isVue"), Cn = new Set(
388
388
  );
389
389
  function it(e) {
390
390
  ue(e) || (e = String(e));
391
- const n = E(this);
392
- return T(n, "has", e), n.hasOwnProperty(e);
391
+ const n = j(this);
392
+ return x(n, "has", e), n.hasOwnProperty(e);
393
393
  }
394
394
  class $n {
395
395
  constructor(n = !1, t = !1) {
@@ -405,7 +405,7 @@ class $n {
405
405
  if (t === "__v_isShallow")
406
406
  return s;
407
407
  if (t === "__v_raw")
408
- return r === (o ? s ? yn : Nn : s ? gt : wn).get(n) || // receiver is not the reactive proxy, but has the same prototype
408
+ return r === (o ? s ? yn : wn : s ? gt : Nn).get(n) || // receiver is not the reactive proxy, but has the same prototype
409
409
  // this means the receiver is a user proxy of the reactive proxy
410
410
  Object.getPrototypeOf(n) === Object.getPrototypeOf(r) ? n : void 0;
411
411
  const p = Y(n);
@@ -424,7 +424,7 @@ class $n {
424
424
  // its class methods
425
425
  Z(n) ? n : r
426
426
  );
427
- return (ue(t) ? Cn.has(t) : at(t)) || (o || T(n, "get", t), s) ? _ : Z(_) ? p && Ye(t) ? _ : _.value : je(_) ? o ? ve(_) : jn(_) : _;
427
+ return (ue(t) ? Cn.has(t) : at(t)) || (o || x(n, "get", t), s) ? _ : Z(_) ? p && Ye(t) ? _ : _.value : Ee(_) ? o ? ve(_) : En(_) : _;
428
428
  }
429
429
  }
430
430
  class ct extends $n {
@@ -435,7 +435,7 @@ class ct extends $n {
435
435
  let s = n[t];
436
436
  if (!this._isShallow) {
437
437
  const C = ee(s);
438
- if (!H(r) && !ee(r) && (s = E(s), r = E(r)), !Y(n) && Z(s) && !Z(r))
438
+ if (!H(r) && !ee(r) && (s = j(s), r = j(r)), !Y(n) && Z(s) && !Z(r))
439
439
  return C ? !1 : (s.value = r, !0);
440
440
  }
441
441
  const p = Y(n) && Ye(t) ? Number(t) < n.length : Ve(n, t), _ = Reflect.set(
@@ -444,7 +444,7 @@ class ct extends $n {
444
444
  r,
445
445
  Z(n) ? n : o
446
446
  );
447
- return n === E(o) && (p ? q(r, s) && V(n, "set", t, r, s) : V(n, "add", t, r)), _;
447
+ return n === j(o) && (p ? q(r, s) && V(n, "set", t, r, s) : V(n, "add", t, r)), _;
448
448
  }
449
449
  deleteProperty(n, t) {
450
450
  const r = Ve(n, t), o = n[t], s = Reflect.deleteProperty(n, t);
@@ -452,10 +452,10 @@ class ct extends $n {
452
452
  }
453
453
  has(n, t) {
454
454
  const r = Reflect.has(n, t);
455
- return (!ue(t) || !Cn.has(t)) && T(n, "has", t), r;
455
+ return (!ue(t) || !Cn.has(t)) && x(n, "has", t), r;
456
456
  }
457
457
  ownKeys(n) {
458
- return T(
458
+ return x(
459
459
  n,
460
460
  "iterate",
461
461
  Y(n) ? "length" : K
@@ -482,15 +482,15 @@ class bn extends $n {
482
482
  const ut = /* @__PURE__ */ new ct(), lt = /* @__PURE__ */ new bn(), pt = /* @__PURE__ */ new bn(!0), Le = (e) => e, pe = (e) => Reflect.getPrototypeOf(e);
483
483
  function dt(e, n, t) {
484
484
  return function(...r) {
485
- const o = this.__v_raw, s = E(o), p = te(s), _ = e === "entries" || e === Symbol.iterator && p, C = e === "keys" && p, d = o[e](...r), i = t ? Le : n ? Me : O;
486
- return !n && T(
485
+ const o = this.__v_raw, s = j(o), p = te(s), _ = e === "entries" || e === Symbol.iterator && p, C = e === "keys" && p, m = o[e](...r), i = t ? Le : n ? Me : O;
486
+ return !n && x(
487
487
  s,
488
488
  "iterate",
489
489
  C ? He : K
490
490
  ), {
491
491
  // iterator protocol
492
492
  next() {
493
- const { value: a, done: l } = d.next();
493
+ const { value: a, done: l } = m.next();
494
494
  return l ? { value: a, done: l } : {
495
495
  value: _ ? [i(a[0]), i(a[1])] : i(a),
496
496
  done: l
@@ -509,7 +509,7 @@ function de(e) {
509
509
  const t = n[0] ? `on key "${n[0]}" ` : "";
510
510
  X(
511
511
  `${Yn(e)} operation ${t}failed: target is readonly.`,
512
- E(this)
512
+ j(this)
513
513
  );
514
514
  }
515
515
  return e === "delete" ? !1 : e === "clear" ? void 0 : this;
@@ -518,26 +518,26 @@ function de(e) {
518
518
  function mt(e, n) {
519
519
  const t = {
520
520
  get(o) {
521
- const s = this.__v_raw, p = E(s), _ = E(o);
522
- e || (q(o, _) && T(p, "get", o), T(p, "get", _));
523
- const { has: C } = pe(p), d = n ? Le : e ? Me : O;
521
+ const s = this.__v_raw, p = j(s), _ = j(o);
522
+ e || (q(o, _) && x(p, "get", o), x(p, "get", _));
523
+ const { has: C } = pe(p), m = n ? Le : e ? Me : O;
524
524
  if (C.call(p, o))
525
- return d(s.get(o));
525
+ return m(s.get(o));
526
526
  if (C.call(p, _))
527
- return d(s.get(_));
527
+ return m(s.get(_));
528
528
  s !== p && s.get(o);
529
529
  },
530
530
  get size() {
531
531
  const o = this.__v_raw;
532
- return !e && T(E(o), "iterate", K), Reflect.get(o, "size", o);
532
+ return !e && x(j(o), "iterate", K), Reflect.get(o, "size", o);
533
533
  },
534
534
  has(o) {
535
- const s = this.__v_raw, p = E(s), _ = E(o);
536
- return e || (q(o, _) && T(p, "has", o), T(p, "has", _)), o === _ ? s.has(o) : s.has(o) || s.has(_);
535
+ const s = this.__v_raw, p = j(s), _ = j(o);
536
+ return e || (q(o, _) && x(p, "has", o), x(p, "has", _)), o === _ ? s.has(o) : s.has(o) || s.has(_);
537
537
  },
538
538
  forEach(o, s) {
539
- const p = this, _ = p.__v_raw, C = E(_), d = n ? Le : e ? Me : O;
540
- return !e && T(C, "iterate", K), _.forEach((i, a) => o.call(s, d(i), d(a), p));
539
+ const p = this, _ = p.__v_raw, C = j(_), m = n ? Le : e ? Me : O;
540
+ return !e && x(C, "iterate", K), _.forEach((i, a) => o.call(s, m(i), m(a), p));
541
541
  }
542
542
  };
543
543
  return Pe(
@@ -549,27 +549,27 @@ function mt(e, n) {
549
549
  clear: de("clear")
550
550
  } : {
551
551
  add(o) {
552
- !n && !H(o) && !ee(o) && (o = E(o));
553
- const s = E(this);
552
+ !n && !H(o) && !ee(o) && (o = j(o));
553
+ const s = j(this);
554
554
  return pe(s).has.call(s, o) || (s.add(o), V(s, "add", o, o)), this;
555
555
  },
556
556
  set(o, s) {
557
- !n && !H(s) && !ee(s) && (s = E(s));
558
- const p = E(this), { has: _, get: C } = pe(p);
559
- let d = _.call(p, o);
560
- d ? process.env.NODE_ENV !== "production" && un(p, _, o) : (o = E(o), d = _.call(p, o));
557
+ !n && !H(s) && !ee(s) && (s = j(s));
558
+ const p = j(this), { has: _, get: C } = pe(p);
559
+ let m = _.call(p, o);
560
+ m ? process.env.NODE_ENV !== "production" && un(p, _, o) : (o = j(o), m = _.call(p, o));
561
561
  const i = C.call(p, o);
562
- return p.set(o, s), d ? q(s, i) && V(p, "set", o, s, i) : V(p, "add", o, s), this;
562
+ return p.set(o, s), m ? q(s, i) && V(p, "set", o, s, i) : V(p, "add", o, s), this;
563
563
  },
564
564
  delete(o) {
565
- const s = E(this), { has: p, get: _ } = pe(s);
565
+ const s = j(this), { has: p, get: _ } = pe(s);
566
566
  let C = p.call(s, o);
567
- C ? process.env.NODE_ENV !== "production" && un(s, p, o) : (o = E(o), C = p.call(s, o));
568
- const d = _ ? _.call(s, o) : void 0, i = s.delete(o);
569
- return C && V(s, "delete", o, void 0, d), i;
567
+ C ? process.env.NODE_ENV !== "production" && un(s, p, o) : (o = j(o), C = p.call(s, o));
568
+ const m = _ ? _.call(s, o) : void 0, i = s.delete(o);
569
+ return C && V(s, "delete", o, void 0, m), i;
570
570
  },
571
571
  clear() {
572
- const o = E(this), s = o.size !== 0, p = process.env.NODE_ENV !== "production" ? te(o) ? new Map(o) : new Set(o) : void 0, _ = o.clear();
572
+ const o = j(this), s = o.size !== 0, p = process.env.NODE_ENV !== "production" ? te(o) ? new Map(o) : new Set(o) : void 0, _ = o.clear();
573
573
  return s && V(
574
574
  o,
575
575
  "clear",
@@ -604,7 +604,7 @@ const ft = {
604
604
  get: /* @__PURE__ */ en(!0, !0)
605
605
  };
606
606
  function un(e, n, t) {
607
- const r = E(t);
607
+ const r = j(t);
608
608
  if (r !== t && n.call(e, r)) {
609
609
  const o = mn(e);
610
610
  X(
@@ -612,7 +612,7 @@ function un(e, n, t) {
612
612
  );
613
613
  }
614
614
  }
615
- const wn = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), Nn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
615
+ const Nn = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap();
616
616
  function _t(e) {
617
617
  switch (e) {
618
618
  case "Object":
@@ -630,13 +630,13 @@ function _t(e) {
630
630
  function Ct(e) {
631
631
  return e.__v_skip || !Object.isExtensible(e) ? 0 : _t(mn(e));
632
632
  }
633
- function jn(e) {
633
+ function En(e) {
634
634
  return ee(e) ? e : nn(
635
635
  e,
636
636
  !1,
637
637
  ut,
638
638
  ft,
639
- wn
639
+ Nn
640
640
  );
641
641
  }
642
642
  function ve(e) {
@@ -645,7 +645,7 @@ function ve(e) {
645
645
  !0,
646
646
  lt,
647
647
  ht,
648
- Nn
648
+ wn
649
649
  );
650
650
  }
651
651
  function fe(e) {
@@ -658,7 +658,7 @@ function fe(e) {
658
658
  );
659
659
  }
660
660
  function nn(e, n, t, r, o) {
661
- if (!je(e))
661
+ if (!Ee(e))
662
662
  return process.env.NODE_ENV !== "production" && X(
663
663
  `value cannot be made ${n ? "readonly" : "reactive"}: ${String(
664
664
  e
@@ -687,11 +687,11 @@ function H(e) {
687
687
  function $t(e) {
688
688
  return e ? !!e.__v_raw : !1;
689
689
  }
690
- function E(e) {
690
+ function j(e) {
691
691
  const n = e && e.__v_raw;
692
- return n ? E(n) : e;
692
+ return n ? j(n) : e;
693
693
  }
694
- const O = (e) => je(e) ? jn(e) : e, Me = (e) => je(e) ? ve(e) : e;
694
+ const O = (e) => Ee(e) ? En(e) : e, Me = (e) => Ee(e) ? ve(e) : e;
695
695
  function Z(e) {
696
696
  return e ? e.__v_isRef === !0 : !1;
697
697
  }
@@ -699,11 +699,11 @@ function ge(e) {
699
699
  return bt(e, !1);
700
700
  }
701
701
  function bt(e, n) {
702
- return Z(e) ? e : new wt(e, n);
702
+ return Z(e) ? e : new Nt(e, n);
703
703
  }
704
- class wt {
704
+ class Nt {
705
705
  constructor(n, t) {
706
- this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n : E(n), this._value = t ? n : O(n), this.__v_isShallow = t;
706
+ this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n : j(n), this._value = t ? n : O(n), this.__v_isShallow = t;
707
707
  }
708
708
  get value() {
709
709
  return process.env.NODE_ENV !== "production" ? this.dep.track({
@@ -714,7 +714,7 @@ class wt {
714
714
  }
715
715
  set value(n) {
716
716
  const t = this._rawValue, r = this.__v_isShallow || H(n) || ee(n);
717
- n = r ? n : E(n), q(n, t) && (this._rawValue = n, this._value = r ? n : O(n), process.env.NODE_ENV !== "production" ? this.dep.trigger({
717
+ n = r ? n : j(n), q(n, t) && (this._rawValue = n, this._value = r ? n : O(n), process.env.NODE_ENV !== "production" ? this.dep.trigger({
718
718
  target: this,
719
719
  type: "set",
720
720
  key: "value",
@@ -723,7 +723,7 @@ class wt {
723
723
  }) : this.dep.trigger());
724
724
  }
725
725
  }
726
- class Nt {
726
+ class wt {
727
727
  constructor(n, t, r) {
728
728
  this.fn = n, this.setter = t, this._value = void 0, this.dep = new Qe(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = re - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !t, this.isSSR = r;
729
729
  }
@@ -750,18 +750,18 @@ class Nt {
750
750
  }
751
751
  function Ke(e, n, t = !1) {
752
752
  let r, o;
753
- Un(e) ? r = e : (r = e.get, o = e.set);
754
- const s = new Nt(r, o, t);
753
+ zn(e) ? r = e : (r = e.get, o = e.set);
754
+ const s = new wt(r, o, t);
755
755
  return process.env.NODE_ENV, s;
756
756
  }
757
757
  const yt = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
758
- let jt = (e = 21) => {
758
+ let Et = (e = 21) => {
759
759
  let n = "", t = crypto.getRandomValues(new Uint8Array(e |= 0));
760
760
  for (; e--; )
761
761
  n += yt[t[e] & 63];
762
762
  return n;
763
763
  };
764
- function Et(e, n = !0, t = !1) {
764
+ function jt(e, n = !0, t = !1) {
765
765
  const r = ge();
766
766
  let o;
767
767
  const s = ge(!1);
@@ -769,20 +769,20 @@ function Et(e, n = !0, t = !1) {
769
769
  };
770
770
  const _ = new Proxy(e, {
771
771
  apply: function(i, a, l) {
772
- let f;
772
+ let h;
773
773
  try {
774
- f = i(...l);
774
+ h = i(...l);
775
775
  } catch (b) {
776
- f = b;
776
+ h = b;
777
777
  }
778
- if (f instanceof Error) {
779
- if (r.value = f, o = f, n)
780
- throw p(), f;
778
+ if (h instanceof Error) {
779
+ if (r.value = h, o = h, n)
780
+ throw p(), h;
781
781
  } else
782
782
  s.value = !0, r.value = void 0, o = !0, p();
783
783
  }
784
784
  }), C = () => {
785
- }, d = new Proxy(
785
+ }, m = new Proxy(
786
786
  (i) => {
787
787
  r.value = i;
788
788
  },
@@ -803,20 +803,20 @@ function Et(e, n = !0, t = !1) {
803
803
  }
804
804
  let l;
805
805
  t && (l = setTimeout(() => {
806
- const f = new Error("timeout!");
807
- r.value = f, n && a(f);
806
+ const h = new Error("timeout!");
807
+ r.value = h, n && a(h);
808
808
  }, t)), p = () => {
809
809
  l && (clearTimeout(l), l = void 0), i();
810
810
  };
811
811
  }),
812
812
  callback: _,
813
- onError: d,
813
+ onError: m,
814
814
  resolved: Ke(() => s.value),
815
815
  error: Ke(() => r.value)
816
816
  };
817
817
  }
818
818
  function Be() {
819
- return jt();
819
+ return Et();
820
820
  }
821
821
  function At() {
822
822
  const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(), r = {};
@@ -912,13 +912,13 @@ function Ot(e) {
912
912
  destroy: e.destroy
913
913
  });
914
914
  }
915
- function Tt(e) {
915
+ function xt(e) {
916
916
  const {
917
917
  callback: n,
918
918
  onError: t,
919
919
  promise: r,
920
920
  resolved: o
921
- } = Et(() => {
921
+ } = jt(() => {
922
922
  }, !1, 5e3);
923
923
  function s(a) {
924
924
  if (o.value === !0)
@@ -941,13 +941,13 @@ function Tt(e) {
941
941
  }),
942
942
  0
943
943
  );
944
- const C = _.states || {}, d = _.commands || {}, i = _.events || {};
944
+ const C = _.states || {}, m = _.commands || {}, i = _.events || {};
945
945
  return {
946
946
  __id: Be(),
947
947
  type: "Singleton",
948
948
  api: It({
949
949
  states: C,
950
- commands: d,
950
+ commands: m,
951
951
  events: i,
952
952
  destroy: () => {
953
953
  }
@@ -962,10 +962,10 @@ Stack : ${a.stack || "unkown"}`);
962
962
  };
963
963
  }
964
964
  let me;
965
- function xt(e) {
966
- return Tt(() => {
965
+ function Tt(e) {
966
+ return xt(() => {
967
967
  const n = ge(e), t = ge({});
968
- let r = () => [], o = () => [], s = () => [], p = () => [], _ = () => [], C = () => [], d = () => [];
968
+ let r = () => [], o = () => [], s = () => [], p = () => [], _ = () => [], C = () => [], m = () => [];
969
969
  return {
970
970
  states: {
971
971
  designer: n,
@@ -973,7 +973,7 @@ function xt(e) {
973
973
  },
974
974
  commands: {
975
975
  genCodeFiles() {
976
- return d();
976
+ return m();
977
977
  },
978
978
  clearCaches() {
979
979
  },
@@ -1020,7 +1020,7 @@ function xt(e) {
1020
1020
  C = i;
1021
1021
  },
1022
1022
  _setCodeFileProvider(i) {
1023
- d = i;
1023
+ m = i;
1024
1024
  }
1025
1025
  }
1026
1026
  };
@@ -1031,11 +1031,11 @@ function Ao(e) {
1031
1031
  if (!me) {
1032
1032
  if (!e)
1033
1033
  throw new Error("designer is required");
1034
- me = xt(e), le.registerAgg(me);
1034
+ me = Tt(e), le.registerAgg(me);
1035
1035
  }
1036
1036
  return me.api;
1037
1037
  }
1038
- function Ee(e) {
1038
+ function je(e) {
1039
1039
  return e && e._attributes && e._attributes.rule === "Info";
1040
1040
  }
1041
1041
  function kt(e) {
@@ -1053,18 +1053,18 @@ function Pt(e) {
1053
1053
  function Vt(e) {
1054
1054
  return e && e._attributes && e._attributes.rule === "ReadModel";
1055
1055
  }
1056
- const Ge = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
1056
+ const Ue = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
1057
1057
  process.env.NODE_ENV !== "production" && Object.freeze([]);
1058
1058
  const Rt = () => {
1059
1059
  }, Ht = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
1060
- (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, k = Array.isArray, z = (e) => typeof e == "function", L = (e) => typeof e == "string", Lt = (e) => typeof e == "symbol", B = (e) => e !== null && typeof e == "object";
1060
+ (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, k = Array.isArray, G = (e) => typeof e == "function", L = (e) => typeof e == "string", Lt = (e) => typeof e == "symbol", B = (e) => e !== null && typeof e == "object";
1061
1061
  let ln;
1062
1062
  const Se = () => ln || (ln = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
1063
1063
  function tn(e) {
1064
1064
  if (k(e)) {
1065
1065
  const n = {};
1066
1066
  for (let t = 0; t < e.length; t++) {
1067
- const r = e[t], o = L(r) ? Gt(r) : tn(r);
1067
+ const r = e[t], o = L(r) ? Ut(r) : tn(r);
1068
1068
  if (o)
1069
1069
  for (const s in o)
1070
1070
  n[s] = o[s];
@@ -1074,7 +1074,7 @@ function tn(e) {
1074
1074
  return e;
1075
1075
  }
1076
1076
  const Mt = /;(?![^(]*\))/g, Kt = /:([^]+)/, Bt = /\/\*[^]*?\*\//g;
1077
- function Gt(e) {
1077
+ function Ut(e) {
1078
1078
  const n = {};
1079
1079
  return e.replace(Bt, "").split(Mt).forEach((t) => {
1080
1080
  if (t) {
@@ -1109,21 +1109,21 @@ Symbol(
1109
1109
  new Set(
1110
1110
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Lt)
1111
1111
  );
1112
- function En(e) {
1113
- return Ue(e) ? En(e.__v_raw) : !!(e && e.__v_isReactive);
1112
+ function jn(e) {
1113
+ return ze(e) ? jn(e.__v_raw) : !!(e && e.__v_isReactive);
1114
1114
  }
1115
- function Ue(e) {
1115
+ function ze(e) {
1116
1116
  return !!(e && e.__v_isReadonly);
1117
1117
  }
1118
- function Te(e) {
1118
+ function xe(e) {
1119
1119
  return !!(e && e.__v_isShallow);
1120
1120
  }
1121
- function ze(e) {
1121
+ function Ge(e) {
1122
1122
  return e ? !!e.__v_raw : !1;
1123
1123
  }
1124
- function G(e) {
1124
+ function U(e) {
1125
1125
  const n = e && e.__v_raw;
1126
- return n ? G(n) : e;
1126
+ return n ? U(n) : e;
1127
1127
  }
1128
1128
  function sn(e) {
1129
1129
  return e ? e.__v_isRef === !0 : !1;
@@ -1133,18 +1133,18 @@ function sn(e) {
1133
1133
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
1134
1134
  * @license MIT
1135
1135
  **/
1136
- const U = [];
1137
- function Ut(e) {
1138
- U.push(e);
1136
+ const z = [];
1137
+ function zt(e) {
1138
+ z.push(e);
1139
1139
  }
1140
- function zt() {
1141
- U.pop();
1140
+ function Gt() {
1141
+ z.pop();
1142
1142
  }
1143
- let xe = !1;
1143
+ let Te = !1;
1144
1144
  function ie(e, ...n) {
1145
- if (xe) return;
1146
- xe = !0;
1147
- const t = U.length ? U[U.length - 1].component : null, r = t && t.appContext.config.warnHandler, o = Jt();
1145
+ if (Te) return;
1146
+ Te = !0;
1147
+ const t = z.length ? z[z.length - 1].component : null, r = t && t.appContext.config.warnHandler, o = Jt();
1148
1148
  if (r)
1149
1149
  rn(
1150
1150
  r,
@@ -1169,10 +1169,10 @@ function ie(e, ...n) {
1169
1169
  o.length && s.push(`
1170
1170
  `, ...Wt(o));
1171
1171
  }
1172
- xe = !1;
1172
+ Te = !1;
1173
1173
  }
1174
1174
  function Jt() {
1175
- let e = U[U.length - 1];
1175
+ let e = z[z.length - 1];
1176
1176
  if (!e)
1177
1177
  return [];
1178
1178
  const n = [];
@@ -1209,7 +1209,7 @@ function qt(e) {
1209
1209
  }), t.length > 3 && n.push(" ..."), n;
1210
1210
  }
1211
1211
  function An(e, n, t) {
1212
- return L(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : sn(n) ? (n = An(e, G(n.value), !0), t ? n : [`${e}=Ref<`, n, ">"]) : z(n) ? [`${e}=fn${n.name ? `<${n.name}>` : ""}`] : (n = G(n), t ? n : [`${e}=`, n]);
1212
+ return L(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : sn(n) ? (n = An(e, U(n.value), !0), t ? n : [`${e}=Ref<`, n, ">"]) : G(n) ? [`${e}=fn${n.name ? `<${n.name}>` : ""}`] : (n = U(n), t ? n : [`${e}=`, n]);
1213
1213
  }
1214
1214
  const Sn = {
1215
1215
  sp: "serverPrefetch hook",
@@ -1252,15 +1252,15 @@ function rn(e, n, t, r) {
1252
1252
  }
1253
1253
  }
1254
1254
  function In(e, n, t, r = !0) {
1255
- const o = n ? n.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: p } = n && n.appContext.config || Ge;
1255
+ const o = n ? n.vnode : null, { errorHandler: s, throwUnhandledErrorInProduction: p } = n && n.appContext.config || Ue;
1256
1256
  if (n) {
1257
1257
  let _ = n.parent;
1258
- const C = n.proxy, d = process.env.NODE_ENV !== "production" ? Sn[t] : `https://vuejs.org/error-reference/#runtime-${t}`;
1258
+ const C = n.proxy, m = process.env.NODE_ENV !== "production" ? Sn[t] : `https://vuejs.org/error-reference/#runtime-${t}`;
1259
1259
  for (; _; ) {
1260
1260
  const i = _.ec;
1261
1261
  if (i) {
1262
1262
  for (let a = 0; a < i.length; a++)
1263
- if (i[a](e, C, d) === !1)
1263
+ if (i[a](e, C, m) === !1)
1264
1264
  return;
1265
1265
  }
1266
1266
  _ = _.parent;
@@ -1269,7 +1269,7 @@ function In(e, n, t, r = !0) {
1269
1269
  rn(s, null, 10, [
1270
1270
  e,
1271
1271
  C,
1272
- d
1272
+ m
1273
1273
  ]);
1274
1274
  return;
1275
1275
  }
@@ -1279,12 +1279,12 @@ function In(e, n, t, r = !0) {
1279
1279
  function Zt(e, n, t, r = !0, o = !1) {
1280
1280
  if (process.env.NODE_ENV !== "production") {
1281
1281
  const s = Sn[n];
1282
- if (t && Ut(t), ie(`Unhandled error${s ? ` during execution of ${s}` : ""}`), t && zt(), r)
1282
+ if (t && zt(t), ie(`Unhandled error${s ? ` during execution of ${s}` : ""}`), t && Gt(), r)
1283
1283
  throw e;
1284
1284
  } else if (o)
1285
1285
  throw e;
1286
1286
  }
1287
- const x = [];
1287
+ const T = [];
1288
1288
  let F = -1;
1289
1289
  const Q = [];
1290
1290
  let P = null, W = 0;
@@ -1292,22 +1292,22 @@ const Qt = /* @__PURE__ */ Promise.resolve();
1292
1292
  let Je = null;
1293
1293
  const Xt = 100;
1294
1294
  function eo(e) {
1295
- let n = F + 1, t = x.length;
1295
+ let n = F + 1, t = T.length;
1296
1296
  for (; n < t; ) {
1297
- const r = n + t >>> 1, o = x[r], s = ce(o);
1297
+ const r = n + t >>> 1, o = T[r], s = ce(o);
1298
1298
  s < e || s === e && o.flags & 2 ? n = r + 1 : t = r;
1299
1299
  }
1300
1300
  return n;
1301
1301
  }
1302
1302
  function no(e) {
1303
1303
  if (!(e.flags & 1)) {
1304
- const n = ce(e), t = x[x.length - 1];
1304
+ const n = ce(e), t = T[T.length - 1];
1305
1305
  !t || // fast path when the job id is larger than the tail
1306
- !(e.flags & 2) && n >= ce(t) ? x.push(e) : x.splice(eo(n), 0, e), e.flags |= 1, On();
1306
+ !(e.flags & 2) && n >= ce(t) ? T.push(e) : T.splice(eo(n), 0, e), e.flags |= 1, On();
1307
1307
  }
1308
1308
  }
1309
1309
  function On() {
1310
- Je || (Je = Qt.then(Tn));
1310
+ Je || (Je = Qt.then(xn));
1311
1311
  }
1312
1312
  function to(e) {
1313
1313
  k(e) ? Q.push(...e) : P && e.id === -1 ? P.splice(W + 1, 0, e) : e.flags & 1 || (Q.push(e), e.flags |= 1), On();
@@ -1323,18 +1323,18 @@ function oo(e) {
1323
1323
  }
1324
1324
  for (P = n, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), W = 0; W < P.length; W++) {
1325
1325
  const t = P[W];
1326
- process.env.NODE_ENV !== "production" && xn(e, t) || (t.flags & 4 && (t.flags &= -2), t.flags & 8 || t(), t.flags &= -2);
1326
+ process.env.NODE_ENV !== "production" && Tn(e, t) || (t.flags & 4 && (t.flags &= -2), t.flags & 8 || t(), t.flags &= -2);
1327
1327
  }
1328
1328
  P = null, W = 0;
1329
1329
  }
1330
1330
  }
1331
1331
  const ce = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
1332
- function Tn(e) {
1332
+ function xn(e) {
1333
1333
  process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
1334
- const n = process.env.NODE_ENV !== "production" ? (t) => xn(e, t) : Rt;
1334
+ const n = process.env.NODE_ENV !== "production" ? (t) => Tn(e, t) : Rt;
1335
1335
  try {
1336
- for (F = 0; F < x.length; F++) {
1337
- const t = x[F];
1336
+ for (F = 0; F < T.length; F++) {
1337
+ const t = T[F];
1338
1338
  if (t && !(t.flags & 8)) {
1339
1339
  if (process.env.NODE_ENV !== "production" && n(t))
1340
1340
  continue;
@@ -1346,14 +1346,14 @@ function Tn(e) {
1346
1346
  }
1347
1347
  }
1348
1348
  } finally {
1349
- for (; F < x.length; F++) {
1350
- const t = x[F];
1349
+ for (; F < T.length; F++) {
1350
+ const t = T[F];
1351
1351
  t && (t.flags &= -2);
1352
1352
  }
1353
- F = -1, x.length = 0, oo(e), Je = null, (x.length || Q.length) && Tn(e);
1353
+ F = -1, T.length = 0, oo(e), Je = null, (T.length || Q.length) && xn(e);
1354
1354
  }
1355
1355
  }
1356
- function xn(e, n) {
1356
+ function Tn(e, n) {
1357
1357
  const t = e.get(n) || 0;
1358
1358
  if (t > Xt) {
1359
1359
  const r = n.i, o = r && Hn(r.type);
@@ -1435,7 +1435,7 @@ const vo = (...e) => Vn(
1435
1435
  ref: e,
1436
1436
  ref_key: n,
1437
1437
  ref_for: t
1438
- }) => (typeof e == "number" && (e = "" + e), e != null ? L(e) || sn(e) || z(e) ? { i: $e, r: e, k: n, f: !!t } : e : null);
1438
+ }) => (typeof e == "number" && (e = "" + e), e != null ? L(e) || sn(e) || G(e) ? { i: $e, r: e, k: n, f: !!t } : e : null);
1439
1439
  function go(e, n = null, t = null, r = 0, o = null, s = e === Fn ? 0 : 1, p = !1, _ = !1) {
1440
1440
  const C = {
1441
1441
  __v_isVNode: !0,
@@ -1482,10 +1482,10 @@ function Vn(e, n = null, t = null, r = 0, o = null, s = !1) {
1482
1482
  if (Mn(e) && (e = e.__vccOpts), n) {
1483
1483
  n = Co(n);
1484
1484
  let { class: _, style: C } = n;
1485
- _ && !L(_) && (n.class = on(_)), B(C) && (ze(C) && !k(C) && (C = Ae({}, C)), n.style = tn(C));
1485
+ _ && !L(_) && (n.class = on(_)), B(C) && (Ge(C) && !k(C) && (C = Ae({}, C)), n.style = tn(C));
1486
1486
  }
1487
- const p = L(e) ? 1 : po(e) ? 128 : co(e) ? 64 : B(e) ? 4 : z(e) ? 2 : 0;
1488
- return process.env.NODE_ENV !== "production" && p & 4 && ze(e) && (e = G(e), ie(
1487
+ const p = L(e) ? 1 : po(e) ? 128 : co(e) ? 64 : B(e) ? 4 : G(e) ? 2 : 0;
1488
+ return process.env.NODE_ENV !== "production" && p & 4 && Ge(e) && (e = U(e), ie(
1489
1489
  "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
1490
1490
  `
1491
1491
  Component that was made reactive: `,
@@ -1502,15 +1502,15 @@ Component that was made reactive: `,
1502
1502
  );
1503
1503
  }
1504
1504
  function Co(e) {
1505
- return e ? ze(e) || Dn(e) ? Ae({}, e) : e : null;
1505
+ return e ? Ge(e) || Dn(e) ? Ae({}, e) : e : null;
1506
1506
  }
1507
1507
  function be(e, n, t = !1, r = !1) {
1508
- const { props: o, ref: s, patchFlag: p, children: _, transition: C } = e, d = n ? bo(o || {}, n) : o, i = {
1508
+ const { props: o, ref: s, patchFlag: p, children: _, transition: C } = e, m = n ? bo(o || {}, n) : o, i = {
1509
1509
  __v_isVNode: !0,
1510
1510
  __v_skip: !0,
1511
1511
  type: e.type,
1512
- props: d,
1513
- key: d && Pn(d),
1512
+ props: m,
1513
+ key: m && Pn(m),
1514
1514
  ref: n && n.ref ? (
1515
1515
  // #2078 in the case of <component :is="vnode" ref="extra"/>
1516
1516
  // if the vnode itself already has a ref, cloneVNode will need to merge
@@ -1574,7 +1574,7 @@ function an(e, n) {
1574
1574
  return;
1575
1575
  } else
1576
1576
  t = 32, !n._ && !Dn(n) && (n._ctx = $e);
1577
- else z(n) ? (n = { default: n, _ctx: $e }, t = 32) : (n = String(n), r & 64 ? (t = 16, n = [$o(n)]) : t = 8);
1577
+ else G(n) ? (n = { default: n, _ctx: $e }, t = 32) : (n = String(n), r & 64 ? (t = 16, n = [$o(n)]) : t = 8);
1578
1578
  e.children = n, e.shapeFlag |= t;
1579
1579
  }
1580
1580
  function bo(...e) {
@@ -1609,9 +1609,9 @@ function bo(...e) {
1609
1609
  );
1610
1610
  }
1611
1611
  process.env.NODE_ENV;
1612
- const wo = /(?:^|[-_])(\w)/g, No = (e) => e.replace(wo, (n) => n.toUpperCase()).replace(/[-_]/g, "");
1612
+ const No = /(?:^|[-_])(\w)/g, wo = (e) => e.replace(No, (n) => n.toUpperCase()).replace(/[-_]/g, "");
1613
1613
  function Hn(e, n = !0) {
1614
- return z(e) ? e.displayName || e.name : e.name || n && e.__name;
1614
+ return G(e) ? e.displayName || e.name : e.name || n && e.__name;
1615
1615
  }
1616
1616
  function Ln(e, n, t = !1) {
1617
1617
  let r = Hn(n);
@@ -1629,10 +1629,10 @@ function Ln(e, n, t = !1) {
1629
1629
  e.components || e.parent.type.components
1630
1630
  ) || o(e.appContext.components);
1631
1631
  }
1632
- return r ? No(r) : t ? "App" : "Anonymous";
1632
+ return r ? wo(r) : t ? "App" : "Anonymous";
1633
1633
  }
1634
1634
  function Mn(e) {
1635
- return z(e) && "__vccOpts" in e;
1635
+ return G(e) && "__vccOpts" in e;
1636
1636
  }
1637
1637
  function yo() {
1638
1638
  if (process.env.NODE_ENV === "production" || typeof window > "u")
@@ -1648,17 +1648,17 @@ function yo() {
1648
1648
  // avoid debugger accessing value affecting behavior
1649
1649
  _("_value" in a ? a._value : a),
1650
1650
  ">"
1651
- ] : En(a) ? [
1651
+ ] : jn(a) ? [
1652
1652
  "div",
1653
1653
  {},
1654
- ["span", e, Te(a) ? "ShallowReactive" : "Reactive"],
1654
+ ["span", e, xe(a) ? "ShallowReactive" : "Reactive"],
1655
1655
  "<",
1656
1656
  _(a),
1657
- `>${Ue(a) ? " (readonly)" : ""}`
1658
- ] : Ue(a) ? [
1657
+ `>${ze(a) ? " (readonly)" : ""}`
1658
+ ] : ze(a) ? [
1659
1659
  "div",
1660
1660
  {},
1661
- ["span", e, Te(a) ? "ShallowReadonly" : "Readonly"],
1661
+ ["span", e, xe(a) ? "ShallowReadonly" : "Readonly"],
1662
1662
  "<",
1663
1663
  _(a),
1664
1664
  ">"
@@ -1678,9 +1678,9 @@ function yo() {
1678
1678
  };
1679
1679
  function s(a) {
1680
1680
  const l = [];
1681
- a.type.props && a.props && l.push(p("props", G(a.props))), a.setupState !== Ge && l.push(p("setup", a.setupState)), a.data !== Ge && l.push(p("data", G(a.data)));
1682
- const f = C(a, "computed");
1683
- f && l.push(p("computed", f));
1681
+ a.type.props && a.props && l.push(p("props", U(a.props))), a.setupState !== Ue && l.push(p("setup", a.setupState)), a.data !== Ue && l.push(p("data", U(a.data)));
1682
+ const h = C(a, "computed");
1683
+ h && l.push(p("computed", h));
1684
1684
  const b = C(a, "inject");
1685
1685
  return b && l.push(p("injected", b)), l.push([
1686
1686
  "div",
@@ -1711,34 +1711,34 @@ function yo() {
1711
1711
  {
1712
1712
  style: "padding-left:1.25em"
1713
1713
  },
1714
- ...Object.keys(l).map((f) => [
1714
+ ...Object.keys(l).map((h) => [
1715
1715
  "div",
1716
1716
  {},
1717
- ["span", r, f + ": "],
1718
- _(l[f], !1)
1717
+ ["span", r, h + ": "],
1718
+ _(l[h], !1)
1719
1719
  ])
1720
1720
  ]
1721
1721
  ] : ["span", {}];
1722
1722
  }
1723
1723
  function _(a, l = !0) {
1724
- return typeof a == "number" ? ["span", n, a] : typeof a == "string" ? ["span", t, JSON.stringify(a)] : typeof a == "boolean" ? ["span", r, a] : B(a) ? ["object", { object: l ? G(a) : a }] : ["span", t, String(a)];
1724
+ return typeof a == "number" ? ["span", n, a] : typeof a == "string" ? ["span", t, JSON.stringify(a)] : typeof a == "boolean" ? ["span", r, a] : B(a) ? ["object", { object: l ? U(a) : a }] : ["span", t, String(a)];
1725
1725
  }
1726
1726
  function C(a, l) {
1727
- const f = a.type;
1728
- if (z(f))
1727
+ const h = a.type;
1728
+ if (G(h))
1729
1729
  return;
1730
1730
  const b = {};
1731
1731
  for (const g in a.ctx)
1732
- d(f, g, l) && (b[g] = a.ctx[g]);
1732
+ m(h, g, l) && (b[g] = a.ctx[g]);
1733
1733
  return b;
1734
1734
  }
1735
- function d(a, l, f) {
1736
- const b = a[f];
1737
- if (k(b) && b.includes(l) || B(b) && l in b || a.extends && d(a.extends, l, f) || a.mixins && a.mixins.some((g) => d(g, l, f)))
1735
+ function m(a, l, h) {
1736
+ const b = a[h];
1737
+ if (k(b) && b.includes(l) || B(b) && l in b || a.extends && m(a.extends, l, h) || a.mixins && a.mixins.some((g) => m(g, l, h)))
1738
1738
  return !0;
1739
1739
  }
1740
1740
  function i(a) {
1741
- return Te(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
1741
+ return xe(a) ? "ShallowRef" : a.effect ? "ComputedRef" : "Ref";
1742
1742
  }
1743
1743
  window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
1744
1744
  }
@@ -1750,11 +1750,11 @@ process.env.NODE_ENV;
1750
1750
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
1751
1751
  * @license MIT
1752
1752
  **/
1753
- function jo() {
1753
+ function Eo() {
1754
1754
  yo();
1755
1755
  }
1756
- process.env.NODE_ENV !== "production" && jo();
1757
- function Eo(e) {
1756
+ process.env.NODE_ENV !== "production" && Eo();
1757
+ function jo(e) {
1758
1758
  return Dt(e) || Ft(e) || kt(e) || Pt(e) || Vt(e);
1759
1759
  }
1760
1760
  var Kn = /* @__PURE__ */ ((e) => (e.Java = "java", e.Kotlin = "kotlin", e.CSharp = "csharp", e.Go = "go", e))(Kn || {});
@@ -1799,20 +1799,20 @@ class S {
1799
1799
  this.parentDir = n;
1800
1800
  }
1801
1801
  }
1802
- var we;
1802
+ var Ne;
1803
1803
  ((e) => {
1804
1804
  ((n) => {
1805
1805
  n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.RecordValueObject = "RecordValueObject", n.CommandHandler = "CommandHandler", n.Jpa = "Jpa", n.Timezone = "Timezone", n.SpringFramework = "SpringFramework";
1806
1806
  })(e.JavaGeneratorAddition || (e.JavaGeneratorAddition = {})), ((n) => {
1807
1807
  n.TABLE = "TABLE", n.SEQUENCE = "SEQUENCE", n.IDENTITY = "IDENTITY", n.UUID = "UUID", n.AUTO = "AUTO";
1808
1808
  })(e.IdGenStrategy || (e.IdGenStrategy = {}));
1809
- })(we || (we = {}));
1810
- var Ne;
1809
+ })(Ne || (Ne = {}));
1810
+ var we;
1811
1811
  ((e) => {
1812
1812
  ((n) => {
1813
1813
  n.ValueClass = "ValueClass", n.CommandHandler = "CommandHandler", n.Timezone = "Timezone";
1814
1814
  })(e.KotlinGeneratorAddition || (e.KotlinGeneratorAddition = {}));
1815
- })(Ne || (Ne = {}));
1815
+ })(we || (we = {}));
1816
1816
  var ye;
1817
1817
  ((e) => {
1818
1818
  ((n) => {
@@ -1835,94 +1835,94 @@ const So = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1835
1835
  get go() {
1836
1836
  return We;
1837
1837
  },
1838
- isStruct: Eo,
1838
+ isStruct: jo,
1839
1839
  get java() {
1840
- return we;
1840
+ return Ne;
1841
1841
  },
1842
1842
  get kotlin() {
1843
- return Ne;
1843
+ return we;
1844
1844
  }
1845
1845
  }, Symbol.toStringTag, { value: "Module" }));
1846
- var N;
1846
+ var w;
1847
1847
  ((e) => {
1848
- function n(d) {
1849
- return d.trim().split(d.includes("_") || d.includes("-") || d.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((i) => i.charAt(0).toUpperCase() + i.toLowerCase().slice(1)).join("");
1848
+ function n(m) {
1849
+ return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((i) => i.charAt(0).toUpperCase() + i.toLowerCase().slice(1)).join("");
1850
1850
  }
1851
1851
  e.stringToUpperCamel = n;
1852
- function t(d) {
1852
+ function t(m) {
1853
1853
  let i = !0;
1854
- return d.trim().split(d.includes("_") || d.includes("-") || d.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((a) => i ? (i = !1, a.toLowerCase()) : a.charAt(0).toUpperCase() + a.toLowerCase().slice(1)).join("");
1854
+ return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((a) => i ? (i = !1, a.toLowerCase()) : a.charAt(0).toUpperCase() + a.toLowerCase().slice(1)).join("");
1855
1855
  }
1856
1856
  e.stringToLowerCamel = t;
1857
- function r(d) {
1858
- return d = d.trim(), d.includes("_") ? d.toLowerCase() : d.includes(" ") || d.includes("-") ? d.split(/\s|-/).join("_").toLowerCase() : s(d);
1857
+ function r(m) {
1858
+ return m = m.trim(), m.includes("_") ? m.toLowerCase() : m.includes(" ") || m.includes("-") ? m.split(/\s|-/).join("_").toLowerCase() : s(m);
1859
1859
  }
1860
1860
  e.stringToLowerSnake = r;
1861
- function o(d) {
1862
- return d.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
1861
+ function o(m) {
1862
+ return m.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
1863
1863
  }
1864
1864
  e.camelToUpperSnake = o;
1865
- function s(d) {
1866
- return d.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
1865
+ function s(m) {
1866
+ return m.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
1867
1867
  }
1868
1868
  e.camelToLowerSnake = s;
1869
- function p(d) {
1870
- return d.trim().split("_").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join("");
1869
+ function p(m) {
1870
+ return m.trim().split("_").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join("");
1871
1871
  }
1872
1872
  e.snakeToUpperCamel = p;
1873
- function _(d) {
1874
- return d.trim().charAt(0).toLowerCase() + d.slice(1);
1873
+ function _(m) {
1874
+ return m.trim().charAt(0).toLowerCase() + m.slice(1);
1875
1875
  }
1876
1876
  e.lowerFirst = _;
1877
- function C(d) {
1878
- return d.trim().charAt(0).toUpperCase() + d.slice(1);
1877
+ function C(m) {
1878
+ return m.trim().charAt(0).toUpperCase() + m.slice(1);
1879
1879
  }
1880
1880
  e.upperFirst = C;
1881
- })(N || (N = {}));
1882
- const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
1881
+ })(w || (w = {}));
1882
+ const E = Ne.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
1883
1883
  const e = "value", n = "command", t = "event";
1884
1884
  function r(o) {
1885
- return N.stringToUpperCamel(o._attributes.name);
1885
+ return w.stringToUpperCamel(o._attributes.name);
1886
1886
  }
1887
1887
  return {
1888
1888
  unmount({ api: o }) {
1889
1889
  o.commands.clearCaches(), o.commands._setCommandCodeProvider(() => []), o.commands._setFacadeCommandCodeProvider(() => []), o.commands._setAggCodeProvider(() => []), o.commands._setEventCodeProvider(() => []), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => []), o.commands.setContext({});
1890
1890
  },
1891
1891
  mount({ api: o }) {
1892
- const s = o.states.context, p = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) => N.stringToLowerCamel(a));
1892
+ const s = o.states.context, p = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) => w.stringToLowerCamel(a));
1893
1893
  function _(a) {
1894
- return !p.includes(N.stringToLowerCamel(a._attributes.name));
1894
+ return !p.includes(w.stringToLowerCamel(a._attributes.name));
1895
1895
  }
1896
1896
  function C(a, l) {
1897
- return _(l) ? N.stringToUpperCamel(l._attributes.name) : i(a, l);
1897
+ return _(l) ? w.stringToUpperCamel(l._attributes.name) : i(a, l);
1898
1898
  }
1899
- function d(a, l) {
1900
- for (const f of l) {
1901
- if (!_(f)) {
1902
- i(a, f);
1899
+ function m(a, l) {
1900
+ for (const h of l) {
1901
+ if (!_(h)) {
1902
+ i(a, h);
1903
1903
  continue;
1904
1904
  }
1905
1905
  a.add(
1906
- `${s.value.namespace}.${s.value.moduleName}.${e}.${r(f)}`
1906
+ `${s.value.namespace}.${s.value.moduleName}.${e}.${r(h)}`
1907
1907
  );
1908
1908
  }
1909
1909
  }
1910
1910
  function i(a, l) {
1911
- const f = s.value.additions, b = N.stringToLowerSnake(l._attributes.name).replace(/_/, " ");
1912
- return /\b(time|timestamp|date|deadline|expire)\b/.test(b) ? f.has(j.Timezone) ? (a.add("java.time.OffsetDateTime"), "OffsetDateTime") : (a.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(b) ? "Integer" : /\b(price)$/.test(b) ? (a.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(b) ? "Boolean" : Ee(l) && (l._attributes.type === "Id" || l._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(b)) ? "Long" : "String";
1911
+ const h = s.value.additions, b = w.stringToLowerSnake(l._attributes.name).replace(/_/, " ");
1912
+ return /\b(time|timestamp|date|deadline|expire)\b/.test(b) ? h.has(E.Timezone) ? (a.add("java.time.OffsetDateTime"), "OffsetDateTime") : (a.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(b) ? "Integer" : /\b(price)$/.test(b) ? (a.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(b) ? "Boolean" : je(l) && (l._attributes.type === "Id" || l._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(b)) ? "Long" : "String";
1913
1913
  }
1914
1914
  o.commands._setInfoCodeProvider(
1915
1915
  (a) => {
1916
1916
  const l = /* @__PURE__ */ new Set();
1917
1917
  l.add(s.value.nonNullAnnotation);
1918
- const f = s.value.nonNullAnnotation.split(".").pop(), b = r(a), g = s.value.additions, u = [];
1919
- return g.has(j.RecordValueObject) ? (g.has(j.Jpa) && (l.add(
1918
+ const h = s.value.nonNullAnnotation.split(".").pop(), b = r(a), g = s.value.additions, u = [];
1919
+ return g.has(E.RecordValueObject) ? (g.has(E.Jpa) && (l.add(
1920
1920
  s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
1921
- ), u.push("@Embeddable")), u.push(`public record ${b}(@${f} ${i(l, a)} value) {`), u.push(` public ${b} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}")) : g.has(j.Lombok) ? (u.push("@lombok.Getter"), g.has(j.Jpa) && (l.add(
1921
+ ), u.push("@Embeddable")), u.push(`public record ${b}(@${h} ${i(l, a)} value) {`), u.push(` public ${b} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}")) : g.has(E.Lombok) ? (u.push("@lombok.Getter"), g.has(E.Jpa) && (l.add(
1922
1922
  s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
1923
- ), u.push("@Embeddable")), u.push(`public class ${b} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${f} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push("}")) : (g.has(j.Jpa) && (l.add(
1923
+ ), u.push("@Embeddable")), u.push(`public class ${b} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${h} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push("}")) : (g.has(E.Jpa) && (l.add(
1924
1924
  s.value.jdkVersion === "8" ? "javax.persistence.Embeddable" : "jakarta.persistence.Embeddable"
1925
- ), u.push("@Embeddable")), u.push(`public class ${r(a)} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${f} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push(""), u.push(` public ${i(l, a)} getValue() {`), u.push(" return this.value;"), u.push(" }"), u.push("}")), [
1925
+ ), u.push("@Embeddable")), u.push(`public class ${r(a)} {`), u.push(` private final ${i(l, a)} value;`), u.push(""), u.push(` public ${b} (@${h} ${i(l, a)} value) {`), u.push(" // HACK check value"), u.push(" this.value = value;"), u.push(" }"), u.push(""), u.push(` public ${i(l, a)} getValue() {`), u.push(" return this.value;"), u.push(" }"), u.push("}")), [
1926
1926
  {
1927
1927
  type: "Info",
1928
1928
  imports: l,
@@ -1933,277 +1933,281 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
1933
1933
  }
1934
1934
  ), o.commands._setCommandCodeProvider(
1935
1935
  (a) => {
1936
- const l = [], f = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
1936
+ const l = [], h = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
1937
1937
  {
1938
1938
  const g = /* @__PURE__ */ new Set();
1939
1939
  g.add(s.value.nonNullAnnotation);
1940
- const u = r(a), v = [], m = Object.values(a.inner);
1941
- if (d(g, m), f.has(j.RecordValueObject)) {
1942
- f.has(j.LombokBuilder) && v.push("@lombok.Builder(toBuilder = true)"), v.push(`public record ${u}(`);
1943
- const $ = [];
1944
- for (const w of m) {
1945
- const c = r(w);
1946
- $.push(
1940
+ const u = r(a), $ = [], v = Object.values(a.inner);
1941
+ if (m(g, v), h.has(E.RecordValueObject)) {
1942
+ h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
1943
+ const d = [];
1944
+ for (const N of v) {
1945
+ const c = r(N);
1946
+ d.push(
1947
1947
  ` @${b}
1948
1948
  ${C(
1949
1949
  g,
1950
- w
1951
- )} ${N.lowerFirst(c)}`
1950
+ N
1951
+ )} ${w.lowerFirst(c)}`
1952
1952
  );
1953
1953
  }
1954
- v.push($.join(`,
1955
- `)), v.push(") {"), v.push(` public ${u} {`), v.push(" // HACK check value"), v.push(" }"), v.push("}");
1956
- } else if (f.has(j.Lombok)) {
1957
- v.push("@lombok.AllArgsConstructor"), v.push("@lombok.Getter"), f.has(j.LombokBuilder) && v.push("@lombok.Builder(toBuilder = true)"), v.push(`public class ${u} {`);
1958
- for (const $ of m) {
1959
- const w = r($);
1960
- v.push(` @${b}`), v.push(
1961
- ` private final ${C(g, $)} ${N.lowerFirst(w)};`
1954
+ $.push(d.join(`,
1955
+ `)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
1956
+ } else if (h.has(E.Lombok)) {
1957
+ $.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
1958
+ for (const d of v) {
1959
+ const N = r(d);
1960
+ $.push(` @${b}`), $.push(
1961
+ ` private final ${C(g, d)} ${w.lowerFirst(N)};`
1962
1962
  );
1963
1963
  }
1964
- v.push("}");
1964
+ $.push("}");
1965
1965
  } else {
1966
- v.push(`public class ${u} {`);
1967
- for (const c of m) {
1968
- const h = r(c);
1969
- v.push(` @${b}`), v.push(
1970
- ` private final ${C(g, c)} ${N.lowerFirst(h)};`
1966
+ $.push(`public class ${u} {`);
1967
+ for (const c of v) {
1968
+ const f = r(c);
1969
+ $.push(` @${b}`), $.push(
1970
+ ` private final ${C(g, c)} ${w.lowerFirst(f)};`
1971
1971
  );
1972
1972
  }
1973
- v.push("");
1974
- const $ = [], w = [];
1975
- for (const c of m) {
1976
- const h = r(c);
1977
- $.push(
1978
- `@${b} ${i(g, c)} ${N.lowerFirst(h)}`
1979
- ), w.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
1973
+ $.push("");
1974
+ const d = [], N = [];
1975
+ for (const c of v) {
1976
+ const f = r(c);
1977
+ d.push(
1978
+ `@${b} ${i(g, c)} ${w.lowerFirst(f)}`
1979
+ ), N.push(`this.${w.lowerFirst(f)} = ${w.lowerFirst(f)};`);
1980
1980
  }
1981
- v.push(` public ${u}(${$.join(", ")}) {`), v.push(` ${w.join(`
1982
- `)}`), v.push(" }");
1983
- for (const c of m) {
1984
- const h = r(c);
1985
- v.push(""), v.push(` public ${C(g, c)} get${h} () {`), v.push(` return this.${N.lowerFirst(h)};`), v.push(" }");
1981
+ $.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${N.join(`
1982
+ `)}`), $.push(" }");
1983
+ for (const c of v) {
1984
+ const f = r(c);
1985
+ $.push(""), $.push(` public ${C(g, c)} get${f} () {`), $.push(` return this.${w.lowerFirst(f)};`), $.push(" }");
1986
1986
  }
1987
- v.push("}");
1987
+ $.push("}");
1988
1988
  }
1989
1989
  l.push({
1990
1990
  type: "Command",
1991
1991
  imports: g,
1992
- content: v.join(`
1992
+ content: $.join(`
1993
1993
  `)
1994
1994
  });
1995
1995
  }
1996
- if (!f.has(j.CommandHandler))
1996
+ if (!h.has(E.CommandHandler))
1997
1997
  return l;
1998
1998
  {
1999
1999
  const g = /* @__PURE__ */ new Set();
2000
2000
  g.add(s.value.nonNullAnnotation);
2001
- const u = r(a), v = [];
2002
- f.has(j.SpringFramework) && (g.add("org.springframework.stereotype.Component"), v.push("@Component")), f.has(j.Lombok) && v.push("@lombok.RequiredArgsConstructor"), v.push(`public class ${u}Handler {`);
2003
- const m = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
2004
- ($) => $._attributes.rule === "Agg"
2001
+ const u = r(a), $ = [];
2002
+ h.has(E.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), h.has(E.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
2003
+ const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
2004
+ (d) => d._attributes.rule === "Agg"
2005
2005
  );
2006
- for (const $ of m)
2007
- g.add(`${s.value.namespace}.${s.value.moduleName}.${r($)}`), v.push(` public ${r($)} handle(@${b} ${u} command) {`), v.push(" // HACK Implement"), v.push(" }");
2008
- v.push("}"), l.push({
2006
+ for (const d of v)
2007
+ g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
2008
+ $.push("}"), l.push({
2009
2009
  type: "CommandHandler",
2010
2010
  imports: g,
2011
- content: v.join(`
2011
+ content: $.join(`
2012
2012
  `)
2013
2013
  });
2014
2014
  }
2015
2015
  return l;
2016
2016
  }
2017
2017
  ), o.commands._setFacadeCommandCodeProvider((a) => {
2018
- const l = [], f = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
2018
+ const l = [], h = s.value.additions, b = s.value.nonNullAnnotation.split(".").pop();
2019
2019
  {
2020
2020
  const g = /* @__PURE__ */ new Set();
2021
2021
  g.add(s.value.nonNullAnnotation);
2022
- const u = r(a), v = [], m = Object.values(a.inner);
2023
- if (d(g, m), f.has(j.RecordValueObject)) {
2024
- f.has(j.LombokBuilder) && v.push("@lombok.Builder(toBuilder = true)"), v.push(`public record ${u}(`);
2025
- const $ = [];
2026
- for (const w of m) {
2027
- const c = r(w);
2028
- $.push(
2022
+ const u = r(a), $ = [], v = Object.values(a.inner);
2023
+ if (m(g, v), h.has(E.RecordValueObject)) {
2024
+ h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${u}(`);
2025
+ const d = [];
2026
+ for (const N of v) {
2027
+ const c = r(N);
2028
+ d.push(
2029
2029
  ` @${b}
2030
2030
  ${C(
2031
2031
  g,
2032
- w
2033
- )} ${N.lowerFirst(c)}`
2032
+ N
2033
+ )} ${w.lowerFirst(c)}`
2034
2034
  );
2035
2035
  }
2036
- v.push($.join(`,
2037
- `)), v.push(") {"), v.push(` public ${u} {`), v.push(" // HACK check value"), v.push(" }"), v.push("}");
2038
- } else if (f.has(j.Lombok)) {
2039
- v.push("@lombok.AllArgsConstructor"), v.push("@lombok.Getter"), f.has(j.LombokBuilder) && v.push("@lombok.Builder(toBuilder = true)"), v.push(`public class ${u} {`);
2040
- for (const $ of m) {
2041
- const w = r($);
2042
- v.push(` @${b}`), v.push(
2043
- ` private final ${C(g, $)} ${N.lowerFirst(w)};`
2036
+ $.push(d.join(`,
2037
+ `)), $.push(") {"), $.push(` public ${u} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
2038
+ } else if (h.has(E.Lombok)) {
2039
+ $.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), h.has(E.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${u} {`);
2040
+ for (const d of v) {
2041
+ const N = r(d);
2042
+ $.push(` @${b}`), $.push(
2043
+ ` private final ${C(g, d)} ${w.lowerFirst(N)};`
2044
2044
  );
2045
2045
  }
2046
- v.push("}");
2046
+ $.push("}");
2047
2047
  } else {
2048
- v.push(`public class ${u} {`);
2049
- for (const c of m) {
2050
- const h = r(c);
2051
- v.push(` @${b}`), v.push(
2052
- ` private final ${C(g, c)} ${N.lowerFirst(h)};`
2048
+ $.push(`public class ${u} {`);
2049
+ for (const c of v) {
2050
+ const f = r(c);
2051
+ $.push(` @${b}`), $.push(
2052
+ ` private final ${C(g, c)} ${w.lowerFirst(f)};`
2053
2053
  );
2054
2054
  }
2055
- v.push("");
2056
- const $ = [], w = [];
2057
- for (const c of m) {
2058
- const h = r(c);
2059
- $.push(
2060
- `@${b} ${i(g, c)} ${N.lowerFirst(h)}`
2061
- ), w.push(`this.${N.lowerFirst(h)} = ${N.lowerFirst(h)};`);
2055
+ $.push("");
2056
+ const d = [], N = [];
2057
+ for (const c of v) {
2058
+ const f = r(c);
2059
+ d.push(
2060
+ `@${b} ${i(g, c)} ${w.lowerFirst(f)}`
2061
+ ), N.push(`this.${w.lowerFirst(f)} = ${w.lowerFirst(f)};`);
2062
2062
  }
2063
- v.push(` public ${u}(${$.join(", ")}) {`), v.push(` ${w.join(`
2064
- `)}`), v.push(" }");
2065
- for (const c of m) {
2066
- const h = r(c);
2067
- v.push(""), v.push(` public ${C(g, c)} get${h} () {`), v.push(` return this.${N.lowerFirst(h)};`), v.push(" }");
2063
+ $.push(` public ${u}(${d.join(", ")}) {`), $.push(` ${N.join(`
2064
+ `)}`), $.push(" }");
2065
+ for (const c of v) {
2066
+ const f = r(c);
2067
+ $.push(""), $.push(` public ${C(g, c)} get${f} () {`), $.push(` return this.${w.lowerFirst(f)};`), $.push(" }");
2068
2068
  }
2069
- v.push("}");
2069
+ $.push("}");
2070
2070
  }
2071
2071
  l.push({
2072
2072
  type: "FacadeCommand",
2073
2073
  imports: g,
2074
- content: v.join(`
2074
+ content: $.join(`
2075
2075
  `)
2076
2076
  });
2077
2077
  }
2078
- if (!f.has(j.CommandHandler))
2078
+ if (!h.has(E.CommandHandler))
2079
2079
  return l;
2080
2080
  {
2081
2081
  const g = /* @__PURE__ */ new Set();
2082
2082
  g.add(s.value.nonNullAnnotation);
2083
- const u = r(a), v = [];
2084
- f.has(j.SpringFramework) && (g.add("org.springframework.stereotype.Component"), v.push("@Component")), f.has(j.Lombok) && v.push("@lombok.RequiredArgsConstructor"), v.push(`public class ${u}Handler {`);
2085
- const m = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
2086
- ($) => $._attributes.rule === "Agg"
2083
+ const u = r(a), $ = [];
2084
+ h.has(E.SpringFramework) && (g.add("org.springframework.stereotype.Component"), $.push("@Component")), h.has(E.Lombok) && $.push("@lombok.RequiredArgsConstructor"), $.push(`public class ${u}Handler {`);
2085
+ const v = [...o.states.designer.value._getContext().getAssociationMap()[a._attributes.__id]].filter(
2086
+ (d) => d._attributes.rule === "Agg"
2087
2087
  );
2088
- for (const $ of m)
2089
- g.add(`${s.value.namespace}.${s.value.moduleName}.${r($)}`), v.push(` public ${r($)} handle(@${b} ${u} command) {`), v.push(" // HACK Implement"), v.push(" }");
2090
- v.push("}"), l.push({
2088
+ for (const d of v)
2089
+ g.add(`${s.value.namespace}.${s.value.moduleName}.${r(d)}`), $.push(` public ${r(d)} handle(@${b} ${u} command) {`), $.push(" // HACK Implement"), $.push(" }");
2090
+ $.push("}"), l.push({
2091
2091
  type: "FacadeCommandHandler",
2092
2092
  imports: g,
2093
- content: v.join(`
2093
+ content: $.join(`
2094
2094
  `)
2095
2095
  });
2096
2096
  }
2097
2097
  return l;
2098
2098
  }), o.commands._setAggCodeProvider(
2099
2099
  (a) => {
2100
- const l = s.value.additions, f = o.states.designer.value, b = s.value.nonNullAnnotation.split(".").pop(), g = r(a), u = [];
2100
+ const l = s.value.additions, h = o.states.designer.value, b = s.value.nonNullAnnotation.split(".").pop(), g = r(a), u = [], $ = Object.values(a.inner);
2101
2101
  {
2102
2102
  const v = /* @__PURE__ */ new Set();
2103
2103
  v.add(s.value.nonNullAnnotation);
2104
- const m = [], $ = [], w = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
2105
- for (const c of w) {
2106
- const h = r(c);
2107
- v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${h}`), $.push(`public void handle${h}(@${b} ${h} command);`);
2104
+ const d = [];
2105
+ d.push(`public interface ${g} {`);
2106
+ for (const c of $) {
2107
+ const f = r(c);
2108
+ v.add(`${s.value.namespace}.${s.value.moduleName}.${e}.${f}`), d.push(` public ${f} get${f}();`), d.push("");
2108
2109
  }
2109
- m.push(`public interface ${g} {`), m.push(` ${$.join(`
2110
-
2111
- `)}`), m.push("}"), u.push({
2110
+ const N = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
2111
+ for (const c of N) {
2112
+ const f = r(c);
2113
+ v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${f}`), d.push(` public void handle${f}(@${b} ${f} command);`), d.push("");
2114
+ }
2115
+ d.push("}"), u.push({
2112
2116
  type: "Agg",
2113
2117
  imports: v,
2114
- content: m.join(`
2118
+ content: d.join(`
2115
2119
  `)
2116
2120
  });
2117
2121
  }
2118
2122
  {
2119
2123
  const v = /* @__PURE__ */ new Set();
2120
2124
  v.add(s.value.nonNullAnnotation);
2121
- const m = [], $ = Object.values(a.inner);
2122
- if (d(v, $), l.has(j.Lombok)) {
2123
- m.push(
2124
- l.has(j.Jpa) ? "@lombok.NoArgsConstructor" : "@lombok.AllArgsConstructor"
2125
- ), m.push("@lombok.Getter"), l.has(j.Jpa) && (v.add(
2125
+ const d = [];
2126
+ if (m(v, $), l.has(E.Lombok)) {
2127
+ d.push(
2128
+ l.has(E.Jpa) ? "@lombok.NoArgsConstructor" : "@lombok.AllArgsConstructor"
2129
+ ), d.push("@lombok.Getter"), l.has(E.Jpa) && (v.add(
2126
2130
  s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
2127
- ), m.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), m.push(`@Table(name = "${N.camelToLowerSnake(g)}")`)), m.push(`public class ${g}Impl implements ${g} {`);
2131
+ ), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${w.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
2128
2132
  for (const c of $) {
2129
- const h = r(c);
2130
- m.push(` @${b}`), l.has(j.Jpa) && (c._attributes.type === "Id" && (v.add(s.value.jdkVersion === "8" ? "javax.persistence.Id" : "jakarta.persistence.Id"), v.add(
2131
- s.value.jdkVersion === "8" ? "javax.persistence.GeneratedValue" : "jakarta.persistence.GeneratedValue"
2132
- ), v.add(
2133
- s.value.jdkVersion === "8" ? "javax.persistence.GenerationType" : "jakarta.persistence.GenerationType"
2134
- ), m.push(` @GeneratedValue(strategy = GenerationType.${s.value.idGenStrategy})`), m.push(" @Id")), v.add(
2133
+ const f = r(c);
2134
+ d.push(` @${b}`), l.has(E.Jpa) && (c._attributes.type === "Id" ? (v.add(
2135
+ s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
2136
+ ), d.push(" @EmbeddedId")) : (v.add(
2137
+ s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
2138
+ ), d.push(" @Embedded")), v.add(
2135
2139
  s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
2136
2140
  ), v.add(
2137
2141
  s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
2138
- ), m.push(
2139
- ` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
2140
- h
2141
- )}"))`
2142
- )), m.push(` private ${C(v, c)} ${N.lowerFirst(h)};`);
2142
+ ), d.push(
2143
+ ` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
2144
+ f
2145
+ )}"${c._attributes.type === "Id" ? ", updatable = false" : ""}))`
2146
+ )), d.push(` private ${C(v, c)} ${w.lowerFirst(f)};`);
2143
2147
  }
2144
- const w = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
2145
- for (const c of w) {
2146
- const h = r(c);
2147
- v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${h}`), m.push(""), m.push(
2148
- ` public void handle${h}(@${b} ${h} ${N.lowerFirst(
2149
- h
2148
+ const N = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter((c) => c._attributes.rule === "Command" || c._attributes.rule === "FacadeCommand");
2149
+ for (const c of N) {
2150
+ const f = r(c);
2151
+ v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${f}`), d.push(""), d.push(
2152
+ ` public void handle${f}(@${b} ${f} ${w.lowerFirst(
2153
+ f
2150
2154
  )}) {`
2151
- ), m.push(" // HACK need implement"), m.push(" }");
2155
+ ), d.push(" // HACK need implement"), d.push(" }");
2152
2156
  }
2153
- m.push("}");
2157
+ d.push("}");
2154
2158
  } else {
2155
- l.has(j.Jpa) && (v.add(
2159
+ l.has(E.Jpa) && (v.add(
2156
2160
  s.value.jdkVersion === "8" ? "javax.persistence.Entity" : "jakarta.persistence.Entity"
2157
- ), m.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), m.push(`@Table(name = "${N.camelToLowerSnake(g)}")`)), m.push(`public class ${g}Impl implements ${g} {`);
2161
+ ), d.push("@Entity"), v.add(s.value.jdkVersion === "8" ? "javax.persistence.Table" : "jakarta.persistence.Table"), d.push(`@Table(name = "${w.camelToLowerSnake(g)}")`)), d.push(`public class ${g}Impl implements ${g} {`);
2158
2162
  for (const y of $) {
2159
2163
  const I = r(y);
2160
- m.push(` @${b}`), l.has(j.Jpa) && (y._attributes.type === "Id" && (v.add(s.value.jdkVersion === "8" ? "javax.persistence.Id" : "jakarta.persistence.Id"), v.add(
2161
- s.value.jdkVersion === "8" ? "javax.persistence.GeneratedValue" : "jakarta.persistence.GeneratedValue"
2162
- ), v.add(
2163
- s.value.jdkVersion === "8" ? "javax.persistence.GenerationType" : "jakarta.persistence.GenerationType"
2164
- ), m.push(` @GeneratedValue(strategy = GenerationType.${s.value.idGenStrategy})`), m.push(" @Id")), v.add(
2164
+ d.push(` @${b}`), l.has(E.Jpa) && (y._attributes.type === "Id" ? (v.add(
2165
+ s.value.jdkVersion === "8" ? "javax.persistence.EmbeddedId" : "jakarta.persistence.EmbeddedId"
2166
+ ), d.push(" @EmbeddedId")) : (v.add(
2167
+ s.value.jdkVersion === "8" ? "javax.persistence.Embedded" : "jakarta.persistence.Embedded"
2168
+ ), d.push(" @Embedded")), v.add(
2165
2169
  s.value.jdkVersion === "8" ? "javax.persistence.AttributeOverride" : "jakarta.persistence.AttributeOverride"
2166
2170
  ), v.add(
2167
2171
  s.value.jdkVersion === "8" ? "javax.persistence.Column" : "jakarta.persistence.Column"
2168
- ), m.push(
2169
- ` @AttributeOverride(name = "value", column = @Column(name = "${N.camelToLowerSnake(
2172
+ ), d.push(
2173
+ ` @AttributeOverride(name = "value", column = @Column(name = "${w.camelToLowerSnake(
2170
2174
  I
2171
- )}"))`
2172
- )), m.push(` private ${C(v, y)} ${N.lowerFirst(I)};`);
2175
+ )}"${y._attributes.type === "Id" ? ", updatable = false" : ""}))`
2176
+ )), d.push(` private ${C(v, y)} ${w.lowerFirst(I)};`);
2173
2177
  }
2174
- m.push("");
2175
- const w = [], c = [];
2178
+ d.push("");
2179
+ const N = [], c = [];
2176
2180
  for (const y of $) {
2177
- if (l.has(j.Jpa))
2181
+ if (l.has(E.Jpa))
2178
2182
  break;
2179
2183
  const I = r(y);
2180
- w.push(
2181
- `@${b} ${C(v, y)} ${N.lowerFirst(I)}`
2182
- ), c.push(`this.${N.lowerFirst(I)} = ${N.lowerFirst(I)};`);
2184
+ N.push(
2185
+ `@${b} ${C(v, y)} ${w.lowerFirst(I)}`
2186
+ ), c.push(`this.${w.lowerFirst(I)} = ${w.lowerFirst(I)};`);
2183
2187
  }
2184
- m.push(` public ${g}Impl(${w.join(", ")}) {`), m.push(` ${c.join(`
2185
- `)}`), m.push(" }");
2188
+ d.push(` public ${g}Impl(${N.join(", ")}) {`), d.push(` ${c.join(`
2189
+ `)}`), d.push(" }");
2186
2190
  for (const y of $) {
2187
2191
  const I = r(y);
2188
- m.push(""), m.push(` @${b}`), m.push(` public ${C(v, y)} get${I}() {`), m.push(` return this.${N.lowerFirst(I)};`), m.push(" }");
2192
+ d.push(""), d.push(` @${b}`), d.push(` public ${C(v, y)} get${I}() {`), d.push(` return this.${w.lowerFirst(I)};`), d.push(" }");
2189
2193
  }
2190
- const h = [...f._getContext().getAssociationMap()[a._attributes.__id]].filter(
2194
+ const f = [...h._getContext().getAssociationMap()[a._attributes.__id]].filter(
2191
2195
  (y) => y._attributes.rule === "Command" || y._attributes.rule === "FacadeCommand"
2192
2196
  );
2193
- for (const y of h) {
2197
+ for (const y of f) {
2194
2198
  const I = r(y);
2195
- v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${I}`), m.push(""), m.push(
2196
- ` public void handle${I}(@${b} ${I} ${N.lowerFirst(
2199
+ v.add(`${s.value.namespace}.${s.value.moduleName}.${n}.${I}`), d.push(""), d.push(
2200
+ ` public void handle${I}(@${b} ${I} ${w.lowerFirst(
2197
2201
  I
2198
2202
  )}) {`
2199
- ), m.push(" // HACK need implement"), m.push(" }");
2203
+ ), d.push(" // HACK need implement"), d.push(" }");
2200
2204
  }
2201
- m.push("}");
2205
+ d.push("}");
2202
2206
  }
2203
2207
  u.push({
2204
2208
  type: "AggImpl",
2205
2209
  imports: v,
2206
- content: m.join(`
2210
+ content: d.join(`
2207
2211
  `)
2208
2212
  });
2209
2213
  }
@@ -2213,50 +2217,50 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2213
2217
  (a) => {
2214
2218
  const l = /* @__PURE__ */ new Set();
2215
2219
  l.add(s.value.nonNullAnnotation);
2216
- const f = s.value.nonNullAnnotation.split(".").pop(), b = s.value.additions, g = r(a), u = [], v = Object.values(a.inner);
2217
- if (d(l, v), b.has(j.RecordValueObject)) {
2218
- b.has(j.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public record ${g}(`);
2219
- const m = [];
2220
- for (const $ of v) {
2221
- const w = r($);
2222
- m.push(
2223
- ` @${f}
2220
+ const h = s.value.nonNullAnnotation.split(".").pop(), b = s.value.additions, g = r(a), u = [], $ = Object.values(a.inner);
2221
+ if (m(l, $), b.has(E.RecordValueObject)) {
2222
+ b.has(E.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public record ${g}(`);
2223
+ const v = [];
2224
+ for (const d of $) {
2225
+ const N = r(d);
2226
+ v.push(
2227
+ ` @${h}
2224
2228
  ${C(
2225
2229
  l,
2226
- $
2227
- )} ${N.lowerFirst(w)}`
2230
+ d
2231
+ )} ${w.lowerFirst(N)}`
2228
2232
  );
2229
2233
  }
2230
- u.push(m.join(`,
2234
+ u.push(v.join(`,
2231
2235
  `)), u.push(") {"), u.push(` public ${g} {`), u.push(" // HACK check value"), u.push(" }"), u.push("}");
2232
- } else if (b.has(j.Lombok)) {
2233
- u.push("@lombok.AllArgsConstructor"), u.push("@lombok.Getter"), b.has(j.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public class ${g} {`);
2234
- for (const m of v) {
2235
- const $ = r(m);
2236
- u.push(` @${f}`), u.push(
2237
- ` private final ${C(l, m)} ${N.lowerFirst($)};`
2236
+ } else if (b.has(E.Lombok)) {
2237
+ u.push("@lombok.AllArgsConstructor"), u.push("@lombok.Getter"), b.has(E.LombokBuilder) && u.push("@lombok.Builder(toBuilder = true)"), u.push(`public class ${g} {`);
2238
+ for (const v of $) {
2239
+ const d = r(v);
2240
+ u.push(` @${h}`), u.push(
2241
+ ` private final ${C(l, v)} ${w.lowerFirst(d)};`
2238
2242
  );
2239
2243
  }
2240
2244
  u.push("}");
2241
2245
  } else {
2242
2246
  u.push(`public class ${g} {`);
2243
- for (const w of v) {
2244
- const c = r(w);
2245
- u.push(` @${f}`), u.push(` private final ${c} ${N.lowerFirst(c)};`);
2247
+ for (const N of $) {
2248
+ const c = r(N);
2249
+ u.push(` @${h}`), u.push(` private final ${c} ${w.lowerFirst(c)};`);
2246
2250
  }
2247
2251
  u.push("");
2248
- const m = [], $ = [];
2249
- for (const w of v) {
2250
- const c = r(w);
2251
- m.push(
2252
- `@${f} ${i(l, w)} ${N.lowerFirst(c)}`
2253
- ), $.push(`this.${N.lowerFirst(c)} = ${N.lowerFirst(c)};`);
2252
+ const v = [], d = [];
2253
+ for (const N of $) {
2254
+ const c = r(N);
2255
+ v.push(
2256
+ `@${h} ${i(l, N)} ${w.lowerFirst(c)}`
2257
+ ), d.push(`this.${w.lowerFirst(c)} = ${w.lowerFirst(c)};`);
2254
2258
  }
2255
- u.push(` public ${g}(${m.join(", ")}) {`), u.push(` ${$.join(`
2259
+ u.push(` public ${g}(${v.join(", ")}) {`), u.push(` ${d.join(`
2256
2260
  `)}`), u.push(" }");
2257
- for (const w of v) {
2258
- const c = r(w);
2259
- u.push(""), u.push(` public ${c} get${c} () {`), u.push(` return this.${N.lowerFirst(c)};`), u.push(" }");
2261
+ for (const N of $) {
2262
+ const c = r(N);
2263
+ u.push(""), u.push(` public ${c} get${c} () {`), u.push(` return this.${w.lowerFirst(c)};`), u.push(" }");
2260
2264
  }
2261
2265
  u.push("}");
2262
2266
  }
@@ -2271,156 +2275,156 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2271
2275
  }
2272
2276
  ), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => {
2273
2277
  const a = [], l = {};
2274
- function f(m) {
2275
- for (const $ of Object.values(m)) {
2276
- if (!_($))
2278
+ function h(v) {
2279
+ for (const d of Object.values(v)) {
2280
+ if (!_(d))
2277
2281
  continue;
2278
- const w = [...s.value.namespace.split(/\./), s.value.moduleName, e], c = r($) + ".java";
2279
- if (l[`${w.join("/")}/${c}`] === !0)
2282
+ const N = [...s.value.namespace.split(/\./), s.value.moduleName, e], c = r(d) + ".java";
2283
+ if (l[`${N.join("/")}/${c}`] === !0)
2280
2284
  continue;
2281
- const h = o.commands._genInfoCode($);
2282
- if (h.length === 0)
2285
+ const f = o.commands._genInfoCode(d);
2286
+ if (f.length === 0)
2283
2287
  continue;
2284
- const y = new S(w, c);
2288
+ const y = new S(N, c);
2285
2289
  y.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${e};`), y.appendContentln("");
2286
- for (const I of h[0].imports)
2290
+ for (const I of f[0].imports)
2287
2291
  y.appendContentln(`import ${I};`);
2288
- y.appendContentln(""), y.appendContentln(h[0].content), a.push(y), l[`${w.join("/")}/${c}`] = !0;
2292
+ y.appendContentln(""), y.appendContentln(f[0].content), a.push(y), l[`${N.join("/")}/${c}`] = !0;
2289
2293
  }
2290
2294
  }
2291
2295
  const b = o.states.designer.value._getContext().getCommands();
2292
- for (const m of b) {
2293
- f(m.inner);
2294
- const $ = o.commands._genCommandCode(m), w = [...s.value.namespace.split(/\./), s.value.moduleName, n];
2295
- $.forEach((c) => {
2296
+ for (const v of b) {
2297
+ h(v.inner);
2298
+ const d = o.commands._genCommandCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, n];
2299
+ d.forEach((c) => {
2296
2300
  if (c.type === "Command") {
2297
- const h = new S(w, r(m) + ".java");
2298
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
2301
+ const f = new S(N, r(v) + ".java");
2302
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
2299
2303
  for (const y of c.imports)
2300
- h.appendContentln(`import ${y};`);
2301
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2304
+ f.appendContentln(`import ${y};`);
2305
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2302
2306
  } else if (c.type === "CommandHandler") {
2303
- const h = new S(w, r(m) + "Handler.java");
2304
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
2307
+ const f = new S(N, r(v) + "Handler.java");
2308
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
2305
2309
  for (const y of c.imports)
2306
- h.appendContentln(`import ${y};`);
2307
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2310
+ f.appendContentln(`import ${y};`);
2311
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2308
2312
  } else
2309
2313
  isNever(c.type);
2310
2314
  });
2311
2315
  }
2312
2316
  const g = o.states.designer.value._getContext().getFacadeCommands();
2313
- for (const m of g) {
2314
- f(m.inner);
2315
- const $ = o.commands._genFacadeCommandCode(m), w = [...s.value.namespace.split(/\./), s.value.moduleName, n];
2316
- $.forEach((c) => {
2317
+ for (const v of g) {
2318
+ h(v.inner);
2319
+ const d = o.commands._genFacadeCommandCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, n];
2320
+ d.forEach((c) => {
2317
2321
  if (c.type === "FacadeCommand") {
2318
- const h = new S(w, r(m) + ".java");
2319
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
2322
+ const f = new S(N, r(v) + ".java");
2323
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
2320
2324
  for (const y of c.imports)
2321
- h.appendContentln(`import ${y};`);
2322
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2325
+ f.appendContentln(`import ${y};`);
2326
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2323
2327
  } else if (c.type === "FacadeCommandHandler") {
2324
- const h = new S(w, r(m) + "Handler.java");
2325
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), h.appendContentln(""), h.addImports(c.imports);
2328
+ const f = new S(N, r(v) + "Handler.java");
2329
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${n};`), f.appendContentln(""), f.addImports(c.imports);
2326
2330
  for (const y of c.imports)
2327
- h.appendContentln(`import ${y};`);
2328
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2331
+ f.appendContentln(`import ${y};`);
2332
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2329
2333
  } else
2330
2334
  isNever(c.type);
2331
2335
  });
2332
2336
  }
2333
2337
  const u = o.states.designer.value._getContext().getAggs();
2334
- for (const m of u) {
2335
- f(m.inner);
2336
- const $ = o.commands._genAggCode(m), w = [...s.value.namespace.split(/\./), s.value.moduleName];
2337
- $.forEach((c) => {
2338
+ for (const v of u) {
2339
+ h(v.inner);
2340
+ const d = o.commands._genAggCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName];
2341
+ d.forEach((c) => {
2338
2342
  if (c.type === "Agg") {
2339
- const h = new S(w, r(m) + ".java");
2340
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), h.appendContentln(""), h.addImports(c.imports);
2343
+ const f = new S(N, r(v) + ".java");
2344
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), f.appendContentln(""), f.addImports(c.imports);
2341
2345
  for (const y of c.imports)
2342
- h.appendContentln(`import ${y};`);
2343
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2346
+ f.appendContentln(`import ${y};`);
2347
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2344
2348
  } else if (c.type === "AggImpl") {
2345
- const h = new S(w, r(m) + "Impl.java");
2346
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), h.appendContentln(""), h.addImports(c.imports);
2349
+ const f = new S(N, r(v) + "Impl.java");
2350
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName};`), f.appendContentln(""), f.addImports(c.imports);
2347
2351
  for (const y of c.imports)
2348
- h.appendContentln(`import ${y};`);
2349
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2352
+ f.appendContentln(`import ${y};`);
2353
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2350
2354
  } else
2351
2355
  isNever(c.type);
2352
2356
  });
2353
2357
  }
2354
- const v = o.states.designer.value._getContext().getEvents();
2355
- for (const m of v) {
2356
- f(m.inner);
2357
- const $ = o.commands._genEventCode(m), w = [...s.value.namespace.split(/\./), s.value.moduleName, t];
2358
- $.forEach((c) => {
2359
- const h = new S(w, r(m) + ".java");
2360
- h.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${t};`), h.appendContentln(""), h.addImports(c.imports);
2358
+ const $ = o.states.designer.value._getContext().getEvents();
2359
+ for (const v of $) {
2360
+ h(v.inner);
2361
+ const d = o.commands._genEventCode(v), N = [...s.value.namespace.split(/\./), s.value.moduleName, t];
2362
+ d.forEach((c) => {
2363
+ const f = new S(N, r(v) + ".java");
2364
+ f.appendContentln(`package ${s.value.namespace}.${s.value.moduleName}.${t};`), f.appendContentln(""), f.addImports(c.imports);
2361
2365
  for (const y of c.imports)
2362
- h.appendContentln(`import ${y};`);
2363
- h.appendContentln(""), h.appendContentln(c.content), a.push(h);
2366
+ f.appendContentln(`import ${y};`);
2367
+ f.appendContentln(""), f.appendContentln(c.content), a.push(f);
2364
2368
  });
2365
2369
  }
2366
2370
  return a;
2367
2371
  });
2368
2372
  }
2369
2373
  };
2370
- }), Fe = Ne.KotlinGeneratorAddition, Oo = le.createHotSwapPlugin(() => ({
2374
+ }), Fe = we.KotlinGeneratorAddition, Oo = le.createHotSwapPlugin(() => ({
2371
2375
  unmount({ api: e }) {
2372
2376
  e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
2373
2377
  },
2374
2378
  mount({ api: e }) {
2375
- const n = "value", t = e.states.context, r = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((d) => N.stringToLowerCamel(d));
2376
- function o(d) {
2377
- return !r.includes(N.stringToLowerCamel(d._attributes.name));
2379
+ const n = "value", t = e.states.context, r = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((m) => w.stringToLowerCamel(m));
2380
+ function o(m) {
2381
+ return !r.includes(w.stringToLowerCamel(m._attributes.name));
2378
2382
  }
2379
- function s(d, i) {
2380
- return o(i) ? N.stringToUpperCamel(i._attributes.name) : C(d, i);
2383
+ function s(m, i) {
2384
+ return o(i) ? w.stringToUpperCamel(i._attributes.name) : C(m, i);
2381
2385
  }
2382
- function p(d) {
2383
- return N.stringToUpperCamel(d._attributes.name);
2386
+ function p(m) {
2387
+ return w.stringToUpperCamel(m._attributes.name);
2384
2388
  }
2385
- function _(d, i) {
2389
+ function _(m, i) {
2386
2390
  for (const a of i) {
2387
2391
  if (!o(a)) {
2388
- C(d, a);
2392
+ C(m, a);
2389
2393
  continue;
2390
2394
  }
2391
- d.add(
2395
+ m.add(
2392
2396
  `${t.value.namespace}.${t.value.moduleName}.${n}.${p(a)}`
2393
2397
  );
2394
2398
  }
2395
2399
  }
2396
- function C(d, i) {
2397
- const a = t.value.additions, l = N.stringToLowerSnake(i._attributes.name).replace(/_/, " ");
2398
- return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ? a.has(Fe.Timezone) ? (d.add("java.time.OffsetDateTime"), "OffsetDateTime") : (d.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(l) ? "Integer" : /\b(price)$/.test(l) ? (d.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(l) ? "Boolean" : Ee(i) && (i._attributes.type === "Id" || i._attributes.type === "Version") || /\b(id|identifier|ver|version)$/.test(l) ? "Long" : "String";
2400
+ function C(m, i) {
2401
+ const a = t.value.additions, l = w.stringToLowerSnake(i._attributes.name).replace(/_/, " ");
2402
+ return /\b(time|timestamp|date|deadline|expire)\b/.test(l) ? a.has(Fe.Timezone) ? (m.add("java.time.OffsetDateTime"), "OffsetDateTime") : (m.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(l) ? "Integer" : /\b(price)$/.test(l) ? (m.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(l) ? "Boolean" : je(i) && (i._attributes.type === "Id" || i._attributes.type === "Version") || /\b(id|identifier|ver|version)$/.test(l) ? "Long" : "String";
2399
2403
  }
2400
2404
  e.commands._setInfoCodeProvider(
2401
- (d) => {
2402
- const i = /* @__PURE__ */ new Set(), a = p(d), l = t.value.additions, f = [];
2403
- return l.has(Fe.ValueClass) ? (i.add("kotlin.jvm.JvmInline"), f.push("@JvmInline"), f.push(`value class ${a}(val value: ${C(i, d)})`)) : f.push(`data class ${a}(val value: ${C(i, d)})`), [
2405
+ (m) => {
2406
+ const i = /* @__PURE__ */ new Set(), a = p(m), l = t.value.additions, h = [];
2407
+ return l.has(Fe.ValueClass) ? (i.add("kotlin.jvm.JvmInline"), h.push("@JvmInline"), h.push(`value class ${a}(val value: ${C(i, m)})`)) : h.push(`data class ${a}(val value: ${C(i, m)})`), [
2404
2408
  {
2405
2409
  type: "Info",
2406
2410
  imports: i,
2407
- content: f.join(`
2411
+ content: h.join(`
2408
2412
  `)
2409
2413
  }
2410
2414
  ];
2411
2415
  }
2412
2416
  ), e.commands._setCommandCodeProvider(
2413
- (d) => {
2417
+ (m) => {
2414
2418
  const i = [], a = t.value.additions;
2415
2419
  {
2416
- const l = /* @__PURE__ */ new Set(), f = p(d), b = [], g = Object.values(d.inner);
2420
+ const l = /* @__PURE__ */ new Set(), h = p(m), b = [], g = Object.values(m.inner);
2417
2421
  _(l, g);
2418
2422
  const u = [];
2419
- for (const v of g) {
2420
- const m = p(v);
2421
- u.push(`val ${N.lowerFirst(m)}: ${s(l, v)}`);
2423
+ for (const $ of g) {
2424
+ const v = p($);
2425
+ u.push(`val ${w.lowerFirst(v)}: ${s(l, $)}`);
2422
2426
  }
2423
- b.push(`data class ${f}(${u.join(", ")})`), i.push({
2427
+ b.push(`data class ${h}(${u.join(", ")})`), i.push({
2424
2428
  type: "Command",
2425
2429
  imports: l,
2426
2430
  content: b.join(`
@@ -2430,13 +2434,13 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2430
2434
  if (!a.has(Fe.CommandHandler))
2431
2435
  return i;
2432
2436
  {
2433
- const l = /* @__PURE__ */ new Set(), f = p(d), b = [];
2434
- b.push(`class ${f}Handler {`);
2435
- const g = [...e.states.designer.value._getContext().getAssociationMap()[d._attributes.__id]].filter(
2437
+ const l = /* @__PURE__ */ new Set(), h = p(m), b = [];
2438
+ b.push(`class ${h}Handler {`);
2439
+ const g = [...e.states.designer.value._getContext().getAssociationMap()[m._attributes.__id]].filter(
2436
2440
  (u) => u._attributes.rule === "Agg"
2437
2441
  );
2438
2442
  for (const u of g)
2439
- l.add(`${t.value.namespace}.${t.value.moduleName}.${p(u)}`), b.push(` fun handle(command: ${f}): ${p(u)} {`), b.push(" // HACK Implement"), b.push(" }");
2443
+ l.add(`${t.value.namespace}.${t.value.moduleName}.${p(u)}`), b.push(` fun handle(command: ${h}): ${p(u)} {`), b.push(" // HACK Implement"), b.push(" }");
2440
2444
  b.push("}"), i.push({
2441
2445
  type: "CommandHandler",
2442
2446
  imports: l,
@@ -2447,13 +2451,13 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2447
2451
  return i;
2448
2452
  }
2449
2453
  ), e.commands._setFacadeCommandCodeProvider(
2450
- (d) => {
2451
- const i = /* @__PURE__ */ new Set(), a = p(d), l = [], f = Object.values(d.inner);
2452
- _(i, f);
2454
+ (m) => {
2455
+ const i = /* @__PURE__ */ new Set(), a = p(m), l = [], h = Object.values(m.inner);
2456
+ _(i, h);
2453
2457
  const b = [];
2454
- for (const g of f) {
2458
+ for (const g of h) {
2455
2459
  const u = p(g);
2456
- b.push(`val ${N.lowerFirst(u)}: ${s(i, g)}`);
2460
+ b.push(`val ${w.lowerFirst(u)}: ${s(i, g)}`);
2457
2461
  }
2458
2462
  return l.push(`data class ${a}(${b.join(", ")})`), [
2459
2463
  {
@@ -2464,43 +2468,43 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2464
2468
  }
2465
2469
  ];
2466
2470
  }
2467
- ), e.commands._setAggCodeProvider((d) => {
2468
- const i = /* @__PURE__ */ new Set(), a = e.states.designer.value, l = p(d), f = [], b = Object.values(d.inner);
2471
+ ), e.commands._setAggCodeProvider((m) => {
2472
+ const i = /* @__PURE__ */ new Set(), a = e.states.designer.value, l = p(m), h = [], b = Object.values(m.inner);
2469
2473
  _(i, b);
2470
- const g = [], u = [...a._getContext().getAssociationMap()[d._attributes.__id]].filter((m) => m._attributes.rule === "Command" || m._attributes.rule === "FacadeCommand");
2471
- for (const m of u) {
2472
- const $ = p(m);
2473
- g.push(`fun handle(command: ${$})`);
2474
+ const g = [], u = [...a._getContext().getAssociationMap()[m._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
2475
+ for (const v of u) {
2476
+ const d = p(v);
2477
+ g.push(`fun handle(command: ${d})`);
2474
2478
  }
2475
- f.push(`interface ${l} {`), f.push(` ${g.join(`
2476
- `)}`), f.push("}"), f.push(""), f.push(`class ${l}Impl(`);
2477
- const v = [];
2478
- for (const m of b) {
2479
- const $ = p(m);
2480
- v.push(`val ${N.lowerFirst($)}: ${s(i, m)}`);
2479
+ h.push(`interface ${l} {`), h.push(` ${g.join(`
2480
+ `)}`), h.push("}"), h.push(""), h.push(`class ${l}Impl(`);
2481
+ const $ = [];
2482
+ for (const v of b) {
2483
+ const d = p(v);
2484
+ $.push(`val ${w.lowerFirst(d)}: ${s(i, v)}`);
2481
2485
  }
2482
- f.push(` ${v.join(`,
2483
- `)}`), f.push(`): ${l} {`);
2484
- for (const m of u) {
2485
- const $ = p(m);
2486
- f.push(` override fun handle(command: ${$}) {`), f.push(" // HACK Implement"), f.push(" }");
2486
+ h.push(` ${$.join(`,
2487
+ `)}`), h.push(`): ${l} {`);
2488
+ for (const v of u) {
2489
+ const d = p(v);
2490
+ h.push(` override fun handle(command: ${d}) {`), h.push(" // HACK Implement"), h.push(" }");
2487
2491
  }
2488
- return f.push("}"), [
2492
+ return h.push("}"), [
2489
2493
  {
2490
2494
  type: "Agg",
2491
2495
  imports: i,
2492
- content: f.join(`
2496
+ content: h.join(`
2493
2497
  `)
2494
2498
  }
2495
2499
  ];
2496
2500
  }), e.commands._setEventCodeProvider(
2497
- (d) => {
2498
- const i = /* @__PURE__ */ new Set(), a = p(d), l = [], f = Object.values(d.inner);
2499
- _(i, f);
2501
+ (m) => {
2502
+ const i = /* @__PURE__ */ new Set(), a = p(m), l = [], h = Object.values(m.inner);
2503
+ _(i, h);
2500
2504
  const b = [];
2501
- for (const g of f) {
2505
+ for (const g of h) {
2502
2506
  const u = p(g);
2503
- b.push(`val ${N.lowerFirst(u)}: ${s(i, g)}`);
2507
+ b.push(`val ${w.lowerFirst(u)}: ${s(i, g)}`);
2504
2508
  }
2505
2509
  return l.push(`data class ${a}(${b.join(", ")})`), [
2506
2510
  {
@@ -2512,278 +2516,278 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2512
2516
  ];
2513
2517
  }
2514
2518
  ), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => {
2515
- const d = [], i = {};
2519
+ const m = [], i = {};
2516
2520
  function a(u) {
2517
- for (const v of Object.values(u)) {
2518
- if (!o(v))
2521
+ for (const $ of Object.values(u)) {
2522
+ if (!o($))
2519
2523
  continue;
2520
- const m = [...t.value.namespace.split(/\./), t.value.moduleName, n], $ = p(v) + ".kt";
2521
- if (i[`${m.join("/")}/${$}`] === !0)
2524
+ const v = [...t.value.namespace.split(/\./), t.value.moduleName, n], d = p($) + ".kt";
2525
+ if (i[`${v.join("/")}/${d}`] === !0)
2522
2526
  continue;
2523
- const w = e.commands._genInfoCode(v);
2524
- if (w.length === 0)
2527
+ const N = e.commands._genInfoCode($);
2528
+ if (N.length === 0)
2525
2529
  continue;
2526
- const c = new S(m, $);
2530
+ const c = new S(v, d);
2527
2531
  c.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}.${n}`), c.appendContentln("");
2528
- for (const h of w[0].imports)
2529
- c.appendContentln(`import ${h}`);
2530
- c.appendContentln(""), c.appendContentln(w[0].content), d.push(c), i[`${m.join("/")}/${$}`] = !0;
2532
+ for (const f of N[0].imports)
2533
+ c.appendContentln(`import ${f}`);
2534
+ c.appendContentln(""), c.appendContentln(N[0].content), m.push(c), i[`${v.join("/")}/${d}`] = !0;
2531
2535
  }
2532
2536
  }
2533
2537
  const l = e.states.designer.value._getContext().getCommands();
2534
2538
  for (const u of l) {
2535
2539
  a(u.inner);
2536
- const v = e.commands._genCommandCode(u), m = [...t.value.namespace.split(/\./), t.value.moduleName], $ = new S(m, p(u) + ".kt"), w = [];
2537
- $.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), $.appendContentln(""), v.forEach((c) => {
2538
- c.type === "Command" || c.type === "CommandHandler" ? ($.addImports(c.imports), w.push(c.content)) : isNever(c.type);
2540
+ const $ = e.commands._genCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
2541
+ d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
2542
+ c.type === "Command" || c.type === "CommandHandler" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
2539
2543
  });
2540
- for (const c of $.getImports())
2541
- $.appendContentln(`import ${c}`);
2542
- $.appendContentln("");
2543
- for (const c of w)
2544
- $.appendContentln(c);
2545
- d.push($);
2544
+ for (const c of d.getImports())
2545
+ d.appendContentln(`import ${c}`);
2546
+ d.appendContentln("");
2547
+ for (const c of N)
2548
+ d.appendContentln(c);
2549
+ m.push(d);
2546
2550
  }
2547
- const f = e.states.designer.value._getContext().getFacadeCommands();
2548
- for (const u of f) {
2551
+ const h = e.states.designer.value._getContext().getFacadeCommands();
2552
+ for (const u of h) {
2549
2553
  a(u.inner);
2550
- const v = e.commands._genFacadeCommandCode(u), m = [...t.value.namespace.split(/\./), t.value.moduleName], $ = new S(m, p(u) + ".kt"), w = [];
2551
- $.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), $.appendContentln(""), v.forEach((c) => {
2552
- c.type === "FacadeCommand" || c.type === "FacadeCommandHandler" ? ($.addImports(c.imports), w.push(c.content)) : isNever(c.type);
2554
+ const $ = e.commands._genFacadeCommandCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
2555
+ d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
2556
+ c.type === "FacadeCommand" || c.type === "FacadeCommandHandler" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
2553
2557
  });
2554
- for (const c of $.getImports())
2555
- $.appendContentln(`import ${c}`);
2556
- $.appendContentln("");
2557
- for (const c of w)
2558
- $.appendContentln(c);
2559
- d.push($);
2558
+ for (const c of d.getImports())
2559
+ d.appendContentln(`import ${c}`);
2560
+ d.appendContentln("");
2561
+ for (const c of N)
2562
+ d.appendContentln(c);
2563
+ m.push(d);
2560
2564
  }
2561
2565
  const b = e.states.designer.value._getContext().getAggs();
2562
2566
  for (const u of b) {
2563
2567
  a(u.inner);
2564
- const v = e.commands._genAggCode(u), m = [...t.value.namespace.split(/\./), t.value.moduleName], $ = new S(m, p(u) + ".kt"), w = [];
2565
- $.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), $.appendContentln(""), v.forEach((c) => {
2566
- c.type === "Agg" || c.type === "AggImpl" ? ($.addImports(c.imports), w.push(c.content)) : isNever(c.type);
2568
+ const $ = e.commands._genAggCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName], d = new S(v, p(u) + ".kt"), N = [];
2569
+ d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((c) => {
2570
+ c.type === "Agg" || c.type === "AggImpl" ? (d.addImports(c.imports), N.push(c.content)) : isNever(c.type);
2567
2571
  });
2568
- for (const c of $.getImports())
2569
- $.appendContentln(`import ${c}`);
2570
- $.appendContentln("");
2571
- for (const c of w)
2572
- $.appendContentln(c);
2573
- d.push($);
2572
+ for (const c of d.getImports())
2573
+ d.appendContentln(`import ${c}`);
2574
+ d.appendContentln("");
2575
+ for (const c of N)
2576
+ d.appendContentln(c);
2577
+ m.push(d);
2574
2578
  }
2575
2579
  const g = e.states.designer.value._getContext().getEvents();
2576
2580
  for (const u of g) {
2577
2581
  a(u.inner);
2578
- const v = e.commands._genEventCode(u), m = [...t.value.namespace.split(/\./), t.value.moduleName];
2579
- v.forEach(($) => {
2580
- if ($.type === "Event") {
2581
- const w = new S(m, p(u) + ".kt");
2582
- w.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), w.appendContentln(""), w.addImports($.imports);
2583
- for (const c of $.imports)
2584
- w.appendContentln(`import ${c}`);
2585
- w.appendContentln(""), w.appendContentln($.content), d.push(w);
2582
+ const $ = e.commands._genEventCode(u), v = [...t.value.namespace.split(/\./), t.value.moduleName];
2583
+ $.forEach((d) => {
2584
+ if (d.type === "Event") {
2585
+ const N = new S(v, p(u) + ".kt");
2586
+ N.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), N.appendContentln(""), N.addImports(d.imports);
2587
+ for (const c of d.imports)
2588
+ N.appendContentln(`import ${c}`);
2589
+ N.appendContentln(""), N.appendContentln(d.content), m.push(N);
2586
2590
  } else
2587
- isNever($.type);
2591
+ isNever(d.type);
2588
2592
  });
2589
2593
  }
2590
- return d;
2594
+ return m;
2591
2595
  });
2592
2596
  }
2593
- })), To = le.createHotSwapPlugin(() => ({
2597
+ })), xo = le.createHotSwapPlugin(() => ({
2594
2598
  unmount({ api: e }) {
2595
2599
  e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
2596
2600
  },
2597
2601
  mount({ api: e }) {
2598
- const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((C) => N.stringToLowerCamel(C));
2602
+ const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((C) => w.stringToLowerCamel(C));
2599
2603
  function r(C) {
2600
- return !t.includes(N.stringToLowerCamel(C._attributes.name));
2604
+ return !t.includes(w.stringToLowerCamel(C._attributes.name));
2601
2605
  }
2602
- function o(C, d) {
2603
- return r(d) ? N.stringToUpperCamel(d._attributes.name) : _(C, d);
2606
+ function o(C, m) {
2607
+ return r(m) ? w.stringToUpperCamel(m._attributes.name) : _(C, m);
2604
2608
  }
2605
2609
  function s(C) {
2606
- return N.stringToUpperCamel(C._attributes.name);
2610
+ return w.stringToUpperCamel(C._attributes.name);
2607
2611
  }
2608
2612
  function p(C) {
2609
- return N.stringToLowerCamel(C._attributes.name);
2613
+ return w.stringToLowerCamel(C._attributes.name);
2610
2614
  }
2611
- function _(C, d) {
2612
- const i = N.stringToLowerSnake(d._attributes.name).replace(/_/, " ");
2613
- return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? (C.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(i) ? "int" : /\b(price)$/.test(i) ? "string" : /^(if|is)\b/.test(i) ? "bool" : Ee(d) && (d._attributes.type === "Id" || d._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(i)) ? "int64" : "string";
2615
+ function _(C, m) {
2616
+ const i = w.stringToLowerSnake(m._attributes.name).replace(/_/, " ");
2617
+ return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? (C.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(i) ? "int" : /\b(price)$/.test(i) ? "string" : /^(if|is)\b/.test(i) ? "bool" : je(m) && (m._attributes.type === "Id" || m._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(i)) ? "int64" : "string";
2614
2618
  }
2615
2619
  e.commands._setInfoCodeProvider(
2616
2620
  (C) => {
2617
- const d = /* @__PURE__ */ new Set(), i = [];
2618
- return i.push(`type ${s(C)} struct {`), i.push(` value ${_(d, C)}`), i.push("}"), i.push(""), i.push(
2621
+ const m = /* @__PURE__ */ new Set(), i = [];
2622
+ return i.push(`type ${s(C)} struct {`), i.push(` value ${_(m, C)}`), i.push("}"), i.push(""), i.push(
2619
2623
  `func New${s(C)}(value ${_(
2620
- d,
2624
+ m,
2621
2625
  C
2622
2626
  )}) ${s(C)} {`
2623
2627
  ), i.push(" // HACK check value"), i.push(` return ${s(C)}{value}`), i.push("}"), i.push(
2624
2628
  `func (${p(C)} ${s(C)}) GetValue() ${_(
2625
- d,
2629
+ m,
2626
2630
  C
2627
2631
  )} {`
2628
- ), i.push(` return ${p(C)}.value`), i.push("}"), [{ type: "Info", imports: d, content: i.join(`
2632
+ ), i.push(` return ${p(C)}.value`), i.push("}"), [{ type: "Info", imports: m, content: i.join(`
2629
2633
  `) }];
2630
2634
  }
2631
2635
  ), e.commands._setCommandCodeProvider(
2632
2636
  (C) => {
2633
- const d = s(C), i = p(C), a = /* @__PURE__ */ new Set(), l = [];
2634
- l.push(`type ${d} struct {`);
2635
- const f = Object.values(C.inner);
2636
- for (const u of f)
2637
+ const m = s(C), i = p(C), a = /* @__PURE__ */ new Set(), l = [];
2638
+ l.push(`type ${m} struct {`);
2639
+ const h = Object.values(C.inner);
2640
+ for (const u of h)
2637
2641
  l.push(` ${p(u)} ${o(a, u)}`);
2638
2642
  l.push("}");
2639
- for (const u of f)
2643
+ for (const u of h)
2640
2644
  l.push(
2641
- `func (${i} ${d}) Get${s(u)} () ${o(
2645
+ `func (${i} ${m}) Get${s(u)} () ${o(
2642
2646
  a,
2643
2647
  u
2644
2648
  )} {`
2645
2649
  ), l.push(` return ${i}.${p(u)}`), l.push("}");
2646
2650
  const b = [], g = [];
2647
- for (const u of f)
2651
+ for (const u of h)
2648
2652
  b.push(`${p(u)} ${o(a, u)}`), g.push(p(u));
2649
- return l.push(`func New${d}(${b.join(", ")}) ${d} {`), l.push(" // HACK check value"), l.push(` return ${d}{`), l.push(` ${g.join(`,
2653
+ return l.push(`func New${m}(${b.join(", ")}) ${m} {`), l.push(" // HACK check value"), l.push(` return ${m}{`), l.push(` ${g.join(`,
2650
2654
  `)},`), l.push(" }"), l.push("}"), [{ type: "Command", imports: a, content: l.join(`
2651
2655
  `) }];
2652
2656
  }
2653
2657
  ), e.commands._setFacadeCommandCodeProvider(
2654
2658
  (C) => {
2655
- const d = s(C), i = p(C), a = Object.values(C.inner), l = /* @__PURE__ */ new Set(), f = [];
2656
- f.push(`type ${d} struct {`);
2659
+ const m = s(C), i = p(C), a = Object.values(C.inner), l = /* @__PURE__ */ new Set(), h = [];
2660
+ h.push(`type ${m} struct {`);
2657
2661
  for (const u of a)
2658
- f.push(` ${p(u)} ${o(l, u)}`);
2659
- f.push("}");
2662
+ h.push(` ${p(u)} ${o(l, u)}`);
2663
+ h.push("}");
2660
2664
  for (const u of a)
2661
- f.push(
2662
- `func (${i} ${d}) Get${s(u)} () ${o(
2665
+ h.push(
2666
+ `func (${i} ${m}) Get${s(u)} () ${o(
2663
2667
  l,
2664
2668
  u
2665
2669
  )} {`
2666
- ), f.push(` return ${i}.${p(u)}`), f.push("}");
2670
+ ), h.push(` return ${i}.${p(u)}`), h.push("}");
2667
2671
  const b = [], g = [];
2668
2672
  for (const u of a)
2669
2673
  b.push(`${p(u)} ${o(l, u)}`), g.push(p(u));
2670
- return f.push(`func New${d}(${b.join(", ")}) ${d} {`), f.push(" // HACK check value"), f.push(` return ${d}{`), f.push(` ${g.join(`,
2671
- `)},`), f.push(" }"), f.push("}"), [
2674
+ return h.push(`func New${m}(${b.join(", ")}) ${m} {`), h.push(" // HACK check value"), h.push(` return ${m}{`), h.push(` ${g.join(`,
2675
+ `)},`), h.push(" }"), h.push("}"), [
2672
2676
  {
2673
2677
  type: "FacadeCommand",
2674
2678
  imports: l,
2675
- content: f.join(`
2679
+ content: h.join(`
2676
2680
  `)
2677
2681
  }
2678
2682
  ];
2679
2683
  }
2680
2684
  ), e.commands._setAggCodeProvider((C) => {
2681
- const d = e.states.designer.value, i = s(C), a = p(C), l = Object.values(C.inner), f = /* @__PURE__ */ new Set(), b = [];
2685
+ const m = e.states.designer.value, i = s(C), a = p(C), l = Object.values(C.inner), h = /* @__PURE__ */ new Set(), b = [];
2682
2686
  b.push(`type ${i} struct {`);
2683
- for (const m of l)
2684
- b.push(` ${p(m)} ${o(f, m)}`);
2687
+ for (const v of l)
2688
+ b.push(` ${p(v)} ${o(h, v)}`);
2685
2689
  b.push("}");
2686
- for (const m of l)
2690
+ for (const v of l)
2687
2691
  b.push(
2688
- `func (${a} ${i}) Get${s(m)} () ${o(
2689
- f,
2690
- m
2692
+ `func (${a} ${i}) Get${s(v)} () ${o(
2693
+ h,
2694
+ v
2691
2695
  )} {`
2692
- ), b.push(` return ${a}.${p(m)}`), b.push("}");
2696
+ ), b.push(` return ${a}.${p(v)}`), b.push("}");
2693
2697
  const g = [], u = [];
2694
- for (const m of l)
2695
- g.push(`${p(m)} ${o(f, m)}`), u.push(p(m));
2698
+ for (const v of l)
2699
+ g.push(`${p(v)} ${o(h, v)}`), u.push(p(v));
2696
2700
  b.push(`func New${i}(${g.join(", ")}) ${i} {`), b.push(" // HACK check value"), b.push(` return ${i}{`), b.push(` ${u.join(`,
2697
2701
  `)},`), b.push(" }"), b.push("}"), b.push("");
2698
- const v = [...d._getContext().getAssociationMap()[C._attributes.__id]].filter((m) => m._attributes.rule === "Command" || m._attributes.rule === "FacadeCommand");
2699
- for (const m of v) {
2700
- const $ = s(m), w = p(m);
2701
- b.push(`func (${a} ${i}) Handle${$} (${w} ${$}) {`), b.push(" // HACK implement"), b.push("}");
2702
+ const $ = [...m._getContext().getAssociationMap()[C._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
2703
+ for (const v of $) {
2704
+ const d = s(v), N = p(v);
2705
+ b.push(`func (${a} ${i}) Handle${d} (${N} ${d}) {`), b.push(" // HACK implement"), b.push("}");
2702
2706
  }
2703
2707
  return [
2704
2708
  {
2705
2709
  type: "Agg",
2706
- imports: f,
2710
+ imports: h,
2707
2711
  content: b.join(`
2708
2712
  `)
2709
2713
  }
2710
2714
  ];
2711
2715
  }), e.commands._setEventCodeProvider(
2712
2716
  (C) => {
2713
- const d = [], i = /* @__PURE__ */ new Set(), a = Object.values(C.inner), l = s(C), f = p(C);
2714
- d.push(`type ${l} struct {`);
2717
+ const m = [], i = /* @__PURE__ */ new Set(), a = Object.values(C.inner), l = s(C), h = p(C);
2718
+ m.push(`type ${l} struct {`);
2715
2719
  for (const u of a)
2716
- d.push(` ${p(u)} ${o(i, u)}`);
2717
- d.push("}");
2720
+ m.push(` ${p(u)} ${o(i, u)}`);
2721
+ m.push("}");
2718
2722
  for (const u of a)
2719
- d.push(
2720
- `func (${f} ${l}) Get${s(u)} () ${o(
2723
+ m.push(
2724
+ `func (${h} ${l}) Get${s(u)} () ${o(
2721
2725
  i,
2722
2726
  u
2723
2727
  )} {`
2724
- ), d.push(` return ${f}.${p(u)}`), d.push("}");
2728
+ ), m.push(` return ${h}.${p(u)}`), m.push("}");
2725
2729
  const b = [], g = [];
2726
2730
  for (const u of a)
2727
2731
  b.push(`${p(u)} ${o(i, u)}`), g.push(p(u));
2728
- return d.push(`func New${l}(${b.join(", ")}) ${l} {`), d.push(" // HACK check value"), d.push(` return ${l}{`), d.push(` ${g.join(`,
2729
- `)},`), d.push(" }"), d.push("}"), [
2732
+ return m.push(`func New${l}(${b.join(", ")}) ${l} {`), m.push(" // HACK check value"), m.push(` return ${l}{`), m.push(` ${g.join(`,
2733
+ `)},`), m.push(" }"), m.push("}"), [
2730
2734
  {
2731
2735
  type: "Event",
2732
2736
  imports: i,
2733
- content: d.join(`
2737
+ content: m.join(`
2734
2738
  `)
2735
2739
  }
2736
2740
  ];
2737
2741
  }
2738
2742
  ), e.commands._setCodeFileProvider(() => {
2739
- const C = [], d = {}, i = [...n.value.namespace.split(/\./), n.value.moduleName], a = new S(i, `${n.value.moduleName}.go`), l = [], f = new S(i, `${n.value.moduleName}_value_object.go`), b = [];
2740
- function g(w) {
2741
- for (const c of Object.values(w)) {
2743
+ const C = [], m = {}, i = [...n.value.namespace.split(/\./), n.value.moduleName], a = new S(i, `${n.value.moduleName}.go`), l = [], h = new S(i, `${n.value.moduleName}_value_object.go`), b = [];
2744
+ function g(N) {
2745
+ for (const c of Object.values(N)) {
2742
2746
  if (!r(c))
2743
2747
  continue;
2744
- const h = s(c);
2745
- if (d[`${i.join("/")}/${h}`] === !0)
2748
+ const f = s(c);
2749
+ if (m[`${i.join("/")}/${f}`] === !0)
2746
2750
  continue;
2747
2751
  const y = e.commands._genInfoCode(c);
2748
- y.length !== 0 && (f.addImports(y[0].imports), b.push(y[0].content), b.push(""), d[`${i.join("/")}/${h}`] = !0);
2752
+ y.length !== 0 && (h.addImports(y[0].imports), b.push(y[0].content), b.push(""), m[`${i.join("/")}/${f}`] = !0);
2749
2753
  }
2750
2754
  }
2751
2755
  const u = e.states.designer.value._getContext().getCommands();
2752
- for (const w of u) {
2753
- g(w.inner);
2754
- const c = e.commands._genCommandCode(w);
2755
- for (const h of c)
2756
- d[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
2756
+ for (const N of u) {
2757
+ g(N.inner);
2758
+ const c = e.commands._genCommandCode(N);
2759
+ for (const f of c)
2760
+ m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
2757
2761
  }
2758
- const v = e.states.designer.value._getContext().getFacadeCommands();
2759
- for (const w of v) {
2760
- g(w.inner);
2761
- const c = e.commands._genFacadeCommandCode(w);
2762
- for (const h of c)
2763
- d[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
2762
+ const $ = e.states.designer.value._getContext().getFacadeCommands();
2763
+ for (const N of $) {
2764
+ g(N.inner);
2765
+ const c = e.commands._genFacadeCommandCode(N);
2766
+ for (const f of c)
2767
+ m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
2764
2768
  }
2765
- const m = e.states.designer.value._getContext().getAggs();
2766
- for (const w of m) {
2767
- g(w.inner);
2768
- const c = e.commands._genAggCode(w);
2769
- for (const h of c)
2770
- d[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
2769
+ const v = e.states.designer.value._getContext().getAggs();
2770
+ for (const N of v) {
2771
+ g(N.inner);
2772
+ const c = e.commands._genAggCode(N);
2773
+ for (const f of c)
2774
+ m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
2771
2775
  }
2772
- const $ = e.states.designer.value._getContext().getEvents();
2773
- for (const w of $) {
2774
- g(w.inner);
2775
- const c = e.commands._genEventCode(w);
2776
- for (const h of c)
2777
- d[h.content] !== !0 && (a.addImports(h.imports), l.push(h.content));
2776
+ const d = e.states.designer.value._getContext().getEvents();
2777
+ for (const N of d) {
2778
+ g(N.inner);
2779
+ const c = e.commands._genEventCode(N);
2780
+ for (const f of c)
2781
+ m[f.content] !== !0 && (a.addImports(f.imports), l.push(f.content));
2778
2782
  }
2779
2783
  return a.appendContentln(`package ${n.value.moduleName}`), a.appendContentln(""), a.getImports().length > 0 && (a.appendContentln("import ("), a.appendContentln(` ${[...a.getImports()].join(`
2780
2784
  `)}`), a.appendContentln(")")), a.appendContentln(l.join(`
2781
- `)), f.appendContentln(`package ${n.value.moduleName}`), f.appendContentln(""), f.getImports().length > 0 && (f.appendContentln("import ("), f.appendContentln(` ${[...f.getImports()].map((w) => `"${w}"`).join(`
2782
- `)}`), f.appendContentln(")"), f.appendContentln("")), f.appendContentln(b.join(`
2783
- `)), C.push(a), C.push(f), C;
2785
+ `)), h.appendContentln(`package ${n.value.moduleName}`), h.appendContentln(""), h.getImports().length > 0 && (h.appendContentln("import ("), h.appendContentln(` ${[...h.getImports()].map((N) => `"${N}"`).join(`
2786
+ `)}`), h.appendContentln(")"), h.appendContentln("")), h.appendContentln(b.join(`
2787
+ `)), C.push(a), C.push(h), C;
2784
2788
  });
2785
2789
  }
2786
- })), M = ye.CSharpGeneratorAddition, xo = le.createHotSwapPlugin(() => {
2790
+ })), M = ye.CSharpGeneratorAddition, To = le.createHotSwapPlugin(() => {
2787
2791
  const e = " ";
2788
2792
  function n(t, r = 1) {
2789
2793
  return t.split(`
@@ -2795,35 +2799,35 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2795
2799
  t.commands.clearCaches(), t.commands._setCommandCodeProvider(() => []), t.commands._setFacadeCommandCodeProvider(() => []), t.commands._setAggCodeProvider(() => []), t.commands._setEventCodeProvider(() => []), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => []), t.commands.setContext({});
2796
2800
  },
2797
2801
  mount({ api: t }) {
2798
- const r = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) => N.stringToLowerCamel(i));
2802
+ const r = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) => w.stringToLowerCamel(i));
2799
2803
  function s(i) {
2800
- return !o.includes(N.stringToLowerCamel(i._attributes.name));
2804
+ return !o.includes(w.stringToLowerCamel(i._attributes.name));
2801
2805
  }
2802
2806
  function p(i, a) {
2803
- return s(a) ? N.stringToUpperCamel(a._attributes.name) : d(i, a);
2807
+ return s(a) ? w.stringToUpperCamel(a._attributes.name) : m(i, a);
2804
2808
  }
2805
2809
  function _(i) {
2806
- return N.stringToUpperCamel(i._attributes.name);
2810
+ return w.stringToUpperCamel(i._attributes.name);
2807
2811
  }
2808
2812
  function C(i) {
2809
2813
  return i.has(M.RecordStruct) ? " struct" : "";
2810
2814
  }
2811
- function d(i, a) {
2812
- const l = r.value.additions, f = N.stringToLowerSnake(a._attributes.name).replace(/_/, " ");
2813
- return /\b(time|timestamp|date|deadline|expire)\b/.test(f) ? l.has(M.Timezone) ? "System.DateTimeOffset" : "System.DateTime" : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(f) ? "int" : /\b(price)$/.test(f) ? "decimal" : /^(if|is)\b/.test(f) ? "bool" : Ee(a) && (a._attributes.type === "Id" || a._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(f)) ? "long" : "string";
2815
+ function m(i, a) {
2816
+ const l = r.value.additions, h = w.stringToLowerSnake(a._attributes.name).replace(/_/, " ");
2817
+ return /\b(time|timestamp|date|deadline|expire)\b/.test(h) ? l.has(M.Timezone) ? "System.DateTimeOffset" : "System.DateTime" : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(h) ? "int" : /\b(price)$/.test(h) ? "decimal" : /^(if|is)\b/.test(h) ? "bool" : je(a) && (a._attributes.type === "Id" || a._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(h)) ? "long" : "string";
2814
2818
  }
2815
2819
  t.commands._setInfoCodeProvider(
2816
2820
  (i) => {
2817
- const a = r.value.additions, l = /* @__PURE__ */ new Set(), f = [];
2818
- return f.push(
2819
- `public record${C(a)} ${_(i)}(${d(
2821
+ const a = r.value.additions, l = /* @__PURE__ */ new Set(), h = [];
2822
+ return h.push(
2823
+ `public record${C(a)} ${_(i)}(${m(
2820
2824
  l,
2821
2825
  i
2822
2826
  )} value);`
2823
2827
  ), [
2824
2828
  {
2825
2829
  type: "Info",
2826
- content: f.join(`
2830
+ content: h.join(`
2827
2831
  `),
2828
2832
  imports: l
2829
2833
  }
@@ -2831,21 +2835,21 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2831
2835
  }
2832
2836
  ), t.commands._setCommandCodeProvider(
2833
2837
  (i) => {
2834
- const a = [], l = r.value.additions, f = /* @__PURE__ */ new Set(), b = _(i);
2838
+ const a = [], l = r.value.additions, h = /* @__PURE__ */ new Set(), b = _(i);
2835
2839
  {
2836
2840
  const g = [], u = Object.values(i.inner);
2837
2841
  g.push(`public record${C(l)} ${b}`), g.push("(");
2838
- const v = [];
2839
- for (const m of u) {
2840
- const $ = _(m);
2841
- v.push(`${p(f, m)} ${N.upperFirst($)}`);
2842
+ const $ = [];
2843
+ for (const v of u) {
2844
+ const d = _(v);
2845
+ $.push(`${p(h, v)} ${w.upperFirst(d)}`);
2842
2846
  }
2843
- g.push(` ${v.join(`,
2847
+ g.push(` ${$.join(`,
2844
2848
  `)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
2845
2849
  type: "Command",
2846
2850
  content: g.join(`
2847
2851
  `),
2848
- imports: f
2852
+ imports: h
2849
2853
  });
2850
2854
  }
2851
2855
  {
@@ -2854,28 +2858,28 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2854
2858
  type: "CommandHandler",
2855
2859
  content: u.join(`
2856
2860
  `),
2857
- imports: f
2861
+ imports: h
2858
2862
  });
2859
2863
  }
2860
2864
  return a;
2861
2865
  }
2862
2866
  ), t.commands._setFacadeCommandCodeProvider(
2863
2867
  (i) => {
2864
- const a = [], l = r.value.additions, f = /* @__PURE__ */ new Set(), b = _(i);
2868
+ const a = [], l = r.value.additions, h = /* @__PURE__ */ new Set(), b = _(i);
2865
2869
  {
2866
2870
  const g = [], u = Object.values(i.inner);
2867
2871
  g.push(`public record${C(l)} ${b}`), g.push("(");
2868
- const v = [];
2869
- for (const m of u) {
2870
- const $ = _(m);
2871
- v.push(`${p(f, m)} ${N.upperFirst($)}`);
2872
+ const $ = [];
2873
+ for (const v of u) {
2874
+ const d = _(v);
2875
+ $.push(`${p(h, v)} ${w.upperFirst(d)}`);
2872
2876
  }
2873
- g.push(` ${v.join(`,
2877
+ g.push(` ${$.join(`,
2874
2878
  `)}`), g.push(")"), g.push("{"), g.push("}"), a.push({
2875
2879
  type: "FacadeCommand",
2876
2880
  content: g.join(`
2877
2881
  `),
2878
- imports: f
2882
+ imports: h
2879
2883
  });
2880
2884
  }
2881
2885
  {
@@ -2884,23 +2888,23 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2884
2888
  type: "FacadeCommandHandler",
2885
2889
  content: u.join(`
2886
2890
  `),
2887
- imports: f
2891
+ imports: h
2888
2892
  });
2889
2893
  }
2890
2894
  return a;
2891
2895
  }
2892
2896
  ), t.commands._setAggCodeProvider(
2893
2897
  (i) => {
2894
- const a = [], l = t.states.designer.value, f = r.value.additions;
2898
+ const a = [], l = t.states.designer.value, h = r.value.additions;
2895
2899
  {
2896
- const b = /* @__PURE__ */ new Set(), g = [], u = f.has(M.AggInterface) ? ` : ${r.value.aggInterface}` : "";
2900
+ const b = /* @__PURE__ */ new Set(), g = [], u = h.has(M.AggInterface) ? ` : ${r.value.aggInterface}` : "";
2897
2901
  g.push(`public interface I${_(i)}${u}`), g.push("{");
2898
- const v = [], m = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter(($) => $._attributes.rule === "Command" || $._attributes.rule === "FacadeCommand");
2899
- for (const $ of m) {
2900
- const w = _($);
2901
- v.push(`void Handle${w}(${w} command);`);
2902
+ const $ = [], v = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((d) => d._attributes.rule === "Command" || d._attributes.rule === "FacadeCommand");
2903
+ for (const d of v) {
2904
+ const N = _(d);
2905
+ $.push(`void Handle${N}(${N} command);`);
2902
2906
  }
2903
- g.push(` ${v.join(`
2907
+ g.push(` ${$.join(`
2904
2908
 
2905
2909
  `)}`), g.push("}"), g.push(""), a.push({
2906
2910
  type: "Agg",
@@ -2910,56 +2914,56 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2910
2914
  });
2911
2915
  }
2912
2916
  {
2913
- const b = /* @__PURE__ */ new Set(), g = [], u = _(i), v = Object.values(i.inner), m = f.has(M.AggInterface) ? `, ${r.value.aggInterface}` : "";
2914
- if (f.has(M.PrimaryConstructor)) {
2915
- const $ = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand"), w = [];
2916
- for (const h of v) {
2917
- const y = _(h);
2918
- w.push(`${p(b, h)} ${N.lowerFirst(y)}`);
2917
+ const b = /* @__PURE__ */ new Set(), g = [], u = _(i), $ = Object.values(i.inner), v = h.has(M.AggInterface) ? `, ${r.value.aggInterface}` : "";
2918
+ if (h.has(M.PrimaryConstructor)) {
2919
+ const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((f) => f._attributes.rule === "Command" || f._attributes.rule === "FacadeCommand"), N = [];
2920
+ for (const f of $) {
2921
+ const y = _(f);
2922
+ N.push(`${p(b, f)} ${w.lowerFirst(y)}`);
2919
2923
  }
2920
- g.push(`public class ${u}`), g.push("("), g.push(` ${w.join(`,
2921
- `)}`), g.push(`): I${u}${m}`), g.push("{");
2922
- for (const h of v) {
2923
- const y = _(h);
2924
+ g.push(`public class ${u}`), g.push("("), g.push(` ${N.join(`,
2925
+ `)}`), g.push(`): I${u}${v}`), g.push("{");
2926
+ for (const f of $) {
2927
+ const y = _(f);
2924
2928
  g.push(
2925
- ` public ${p(b, h)} ${N.upperFirst(
2929
+ ` public ${p(b, f)} ${w.upperFirst(
2926
2930
  y
2927
- )} { get; private set; } = ${N.lowerFirst(y)};`
2931
+ )} { get; private set; } = ${w.lowerFirst(y)};`
2928
2932
  ), g.push("");
2929
2933
  }
2930
2934
  const c = [];
2931
- for (const h of $) {
2932
- const y = _(h);
2935
+ for (const f of d) {
2936
+ const y = _(f);
2933
2937
  c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
2934
2938
  }
2935
2939
  g.push(` ${c.join(`
2936
2940
  `)}`), g.push("}");
2937
2941
  } else {
2938
- const $ = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((h) => h._attributes.rule === "Command" || h._attributes.rule === "FacadeCommand");
2939
- g.push(`public class ${u} : I${u}${m}`), g.push("{");
2940
- for (const h of v) {
2941
- const y = _(h);
2942
+ const d = [...l._getContext().getAssociationMap()[i._attributes.__id]].filter((f) => f._attributes.rule === "Command" || f._attributes.rule === "FacadeCommand");
2943
+ g.push(`public class ${u} : I${u}${v}`), g.push("{");
2944
+ for (const f of $) {
2945
+ const y = _(f);
2942
2946
  g.push(
2943
- ` public ${p(b, h)} ${N.lowerFirst(
2947
+ ` public ${p(b, f)} ${w.lowerFirst(
2944
2948
  y
2945
2949
  )} { get; private set; }`
2946
2950
  );
2947
2951
  }
2948
2952
  g.push("");
2949
- const w = [];
2950
- for (const h of v) {
2951
- const y = _(h);
2952
- w.push(`${p(b, h)} ${y}`);
2953
+ const N = [];
2954
+ for (const f of $) {
2955
+ const y = _(f);
2956
+ N.push(`${p(b, f)} ${y}`);
2953
2957
  }
2954
- g.push(` public ${u}(${w.join(", ")})`), g.push(" {");
2955
- for (const h of v) {
2956
- const y = _(h);
2957
- g.push(` ${y} = ${N.lowerFirst(y)};`);
2958
+ g.push(` public ${u}(${N.join(", ")})`), g.push(" {");
2959
+ for (const f of $) {
2960
+ const y = _(f);
2961
+ g.push(` ${y} = ${w.lowerFirst(y)};`);
2958
2962
  }
2959
2963
  g.push(" }");
2960
2964
  const c = [];
2961
- for (const h of $) {
2962
- const y = _(h);
2965
+ for (const f of d) {
2966
+ const y = _(f);
2963
2967
  c.push(`public void Handle${y}(${y} command)`), c.push("{"), c.push(" // HACK implement"), c.push("}"), c.push("");
2964
2968
  }
2965
2969
  g.push(` ${c.join(`
@@ -2976,12 +2980,12 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2976
2980
  }
2977
2981
  ), t.commands._setEventCodeProvider(
2978
2982
  (i) => {
2979
- const a = r.value.additions, l = _(i), f = /* @__PURE__ */ new Set(), b = Object.values(i.inner), g = [];
2983
+ const a = r.value.additions, l = _(i), h = /* @__PURE__ */ new Set(), b = Object.values(i.inner), g = [];
2980
2984
  g.push(`public record${C(a)} ${l}`), g.push("(");
2981
2985
  const u = [];
2982
- for (const v of b) {
2983
- const m = _(v);
2984
- u.push(`${p(f, v)} ${N.upperFirst(m)}`);
2986
+ for (const $ of b) {
2987
+ const v = _($);
2988
+ u.push(`${p(h, $)} ${w.upperFirst(v)}`);
2985
2989
  }
2986
2990
  return g.push(` ${u.join(`,
2987
2991
  `)}`), g.push(")"), g.push("{"), g.push("}"), [
@@ -2989,83 +2993,83 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
2989
2993
  type: "Event",
2990
2994
  content: g.join(`
2991
2995
  `),
2992
- imports: f
2996
+ imports: h
2993
2997
  }
2994
2998
  ];
2995
2999
  }
2996
3000
  ), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => {
2997
- const i = [], a = {}, l = [...r.value.namespace.split(/\./), N.stringToUpperCamel(r.value.moduleName)];
2998
- function f(m) {
2999
- for (const $ of Object.values(m)) {
3000
- if (!s($))
3001
+ const i = [], a = {}, l = [...r.value.namespace.split(/\./), w.stringToUpperCamel(r.value.moduleName)];
3002
+ function h(v) {
3003
+ for (const d of Object.values(v)) {
3004
+ if (!s(d))
3001
3005
  continue;
3002
- const w = _($) + ".cs";
3003
- if (a[`${l.join("/")}/${w}`] === !0)
3006
+ const N = _(d) + ".cs";
3007
+ if (a[`${l.join("/")}/${N}`] === !0)
3004
3008
  continue;
3005
- const c = t.commands._genInfoCode($);
3009
+ const c = t.commands._genInfoCode(d);
3006
3010
  if (c.length === 0)
3007
3011
  continue;
3008
- const h = new S(l, w);
3012
+ const f = new S(l, N);
3009
3013
  for (const y of c[0].imports)
3010
- h.appendContentln(`using ${y};`);
3011
- h.appendContentln(""), h.appendContentln(
3012
- `namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
3013
- ), h.appendContentln("{"), h.appendContentln(n(c[0].content)), h.appendContentln("}"), i.push(h), a[`${l.join("/")}/${w}`] = !0;
3014
+ f.appendContentln(`using ${y};`);
3015
+ f.appendContentln(""), f.appendContentln(
3016
+ `namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
3017
+ ), f.appendContentln("{"), f.appendContentln(n(c[0].content)), f.appendContentln("}"), i.push(f), a[`${l.join("/")}/${N}`] = !0;
3014
3018
  }
3015
3019
  }
3016
3020
  const b = t.states.designer.value._getContext().getCommands();
3017
- for (const m of b) {
3018
- f(m.inner);
3019
- const $ = _(m) + ".cs", w = t.commands._genCommandCode(m), c = new S(l, $);
3020
- for (const h of w)
3021
- if (h.type === "Command") {
3022
- c.addImports(h.imports);
3023
- for (const y of h.imports)
3021
+ for (const v of b) {
3022
+ h(v.inner);
3023
+ const d = _(v) + ".cs", N = t.commands._genCommandCode(v), c = new S(l, d);
3024
+ for (const f of N)
3025
+ if (f.type === "Command") {
3026
+ c.addImports(f.imports);
3027
+ for (const y of f.imports)
3024
3028
  c.appendContentln(`using ${y};`);
3025
3029
  c.appendContentln(""), c.appendContentln(
3026
- `namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
3027
- ), c.appendContentln("{"), c.appendContentln(n(h.content)), c.appendContentln("}");
3030
+ `namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
3031
+ ), c.appendContentln("{"), c.appendContentln(n(f.content)), c.appendContentln("}");
3028
3032
  }
3029
3033
  i.push(c);
3030
3034
  }
3031
3035
  const g = t.states.designer.value._getContext().getFacadeCommands();
3032
- for (const m of g) {
3033
- f(m.inner);
3034
- const $ = _(m) + ".cs", w = t.commands._genFacadeCommandCode(m), c = new S(l, $);
3035
- c.addImports(w[0].imports);
3036
- for (const h of w[0].imports)
3037
- c.appendContentln(`using ${h};`);
3036
+ for (const v of g) {
3037
+ h(v.inner);
3038
+ const d = _(v) + ".cs", N = t.commands._genFacadeCommandCode(v), c = new S(l, d);
3039
+ c.addImports(N[0].imports);
3040
+ for (const f of N[0].imports)
3041
+ c.appendContentln(`using ${f};`);
3038
3042
  c.appendContentln(""), c.appendContentln(
3039
- `namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
3040
- ), c.appendContentln("{"), c.appendContentln(n(w[0].content)), c.appendContentln("}"), i.push(c);
3043
+ `namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
3044
+ ), c.appendContentln("{"), c.appendContentln(n(N[0].content)), c.appendContentln("}"), i.push(c);
3041
3045
  }
3042
3046
  const u = t.states.designer.value._getContext().getAggs();
3043
- for (const m of u) {
3044
- f(m.inner);
3045
- const $ = t.commands._genAggCode(m), w = _(m) + ".cs", c = new S(l, w);
3046
- for (const h of $) {
3047
- c.addImports(h.imports);
3048
- for (const y of h.imports)
3047
+ for (const v of u) {
3048
+ h(v.inner);
3049
+ const d = t.commands._genAggCode(v), N = _(v) + ".cs", c = new S(l, N);
3050
+ for (const f of d) {
3051
+ c.addImports(f.imports);
3052
+ for (const y of f.imports)
3049
3053
  c.appendContentln(`using ${y};`);
3050
3054
  c.appendContentln("");
3051
3055
  }
3052
3056
  c.appendContentln(
3053
- `namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
3057
+ `namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
3054
3058
  ), c.appendContentln("{");
3055
- for (const h of $)
3056
- c.appendContentln(n(h.content));
3059
+ for (const f of d)
3060
+ c.appendContentln(n(f.content));
3057
3061
  c.appendContentln("}"), i.push(c);
3058
3062
  }
3059
- const v = t.states.designer.value._getContext().getEvents();
3060
- for (const m of v) {
3061
- f(m.inner);
3062
- const $ = _(m) + ".cs", w = t.commands._genEventCode(m), c = new S(l, $);
3063
- c.addImports(w[0].imports);
3064
- for (const h of w[0].imports)
3065
- c.appendContentln(`using ${h};`);
3063
+ const $ = t.states.designer.value._getContext().getEvents();
3064
+ for (const v of $) {
3065
+ h(v.inner);
3066
+ const d = _(v) + ".cs", N = t.commands._genEventCode(v), c = new S(l, d);
3067
+ c.addImports(N[0].imports);
3068
+ for (const f of N[0].imports)
3069
+ c.appendContentln(`using ${f};`);
3066
3070
  c.appendContentln(""), c.appendContentln(
3067
- `namespace ${r.value.namespace}.${N.stringToUpperCamel(r.value.moduleName)}`
3068
- ), c.appendContentln("{"), c.appendContentln(n(w[0].content)), c.appendContentln("}"), i.push(c);
3071
+ `namespace ${r.value.namespace}.${w.stringToUpperCamel(r.value.moduleName)}`
3072
+ ), c.appendContentln("{"), c.appendContentln(n(N[0].content)), c.appendContentln("}"), i.push(c);
3069
3073
  }
3070
3074
  return i;
3071
3075
  });
@@ -3073,8 +3077,8 @@ const j = we.JavaGeneratorAddition, Io = le.createHotSwapPlugin(() => {
3073
3077
  };
3074
3078
  });
3075
3079
  export {
3076
- xo as GENERATOR_CSHARP_PLUGIN,
3077
- To as GENERATOR_GO_PLUGIN,
3080
+ To as GENERATOR_CSHARP_PLUGIN,
3081
+ xo as GENERATOR_GO_PLUGIN,
3078
3082
  Io as GENERATOR_JAVA_PLUGIN,
3079
3083
  Oo as GENERATOR_KOTLIN_PLUGIN,
3080
3084
  le as GeneratorPliginHelper,