@ddd-tool/domain-designer-generator 0.1.0-beta.2 → 0.1.0-beta.4
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.
- package/domain/define.d.ts +4 -3
- package/domain/generator-agg.d.ts +22 -0
- package/domain-plugin/generator-csharp-plugin.d.ts +8 -6
- package/domain-plugin/generator-go-plugin.d.ts +2 -0
- package/domain-plugin/generator-java-plugin.d.ts +10 -8
- package/domain-plugin/generator-kotlin-plugin.d.ts +2 -0
- package/index.js +1729 -1601
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,161 +5,161 @@
|
|
|
5
5
|
**/
|
|
6
6
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
7
7
|
// @__NO_SIDE_EFFECTS__
|
|
8
|
-
function
|
|
8
|
+
function Gn(e) {
|
|
9
9
|
const n = /* @__PURE__ */ Object.create(null);
|
|
10
10
|
for (const t of e.split(",")) n[t] = 1;
|
|
11
11
|
return (t) => t in n;
|
|
12
12
|
}
|
|
13
13
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
14
14
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
15
|
-
const
|
|
15
|
+
const Ve = Object.assign, Un = Object.prototype.hasOwnProperty, Re = (e, n) => Un.call(e, n), Y = Array.isArray, oe = (e) => mn(e) === "[object Map]", zn = (e) => typeof e == "function", Jn = (e) => typeof e == "string", le = (e) => typeof e == "symbol", je = (e) => e !== null && typeof e == "object", Wn = Object.prototype.toString, mn = (e) => Wn.call(e), fn = (e) => mn(e).slice(8, -1), Ye = (e) => Jn(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, qn = (e) => {
|
|
16
16
|
const n = /* @__PURE__ */ Object.create(null);
|
|
17
17
|
return (t) => n[t] || (n[t] = e(t));
|
|
18
|
-
},
|
|
18
|
+
}, Yn = qn((e) => e.charAt(0).toUpperCase() + e.slice(1)), Z = (e, n) => !Object.is(e, n);
|
|
19
19
|
/**
|
|
20
20
|
* @vue/reactivity v3.5.13
|
|
21
21
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
22
22
|
* @license MIT
|
|
23
23
|
**/
|
|
24
|
-
function
|
|
24
|
+
function ee(e, ...n) {
|
|
25
25
|
}
|
|
26
|
-
let
|
|
27
|
-
function
|
|
26
|
+
let A, hn = 0, se, re;
|
|
27
|
+
function Zn(e, n = !1) {
|
|
28
28
|
if (e.flags |= 8, n) {
|
|
29
|
-
e.next =
|
|
29
|
+
e.next = re, re = e;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
e.next =
|
|
33
|
-
}
|
|
34
|
-
function Ye() {
|
|
35
|
-
fn++;
|
|
32
|
+
e.next = se, se = e;
|
|
36
33
|
}
|
|
37
34
|
function Ze() {
|
|
38
|
-
|
|
35
|
+
hn++;
|
|
36
|
+
}
|
|
37
|
+
function Xe() {
|
|
38
|
+
if (--hn > 0)
|
|
39
39
|
return;
|
|
40
|
-
if (
|
|
41
|
-
let n =
|
|
42
|
-
for (
|
|
40
|
+
if (re) {
|
|
41
|
+
let n = re;
|
|
42
|
+
for (re = void 0; n; ) {
|
|
43
43
|
const t = n.next;
|
|
44
44
|
n.next = void 0, n.flags &= -9, n = t;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
let e;
|
|
48
|
-
for (;
|
|
49
|
-
let n =
|
|
50
|
-
for (
|
|
48
|
+
for (; se; ) {
|
|
49
|
+
let n = se;
|
|
50
|
+
for (se = void 0; n; ) {
|
|
51
51
|
const t = n.next;
|
|
52
52
|
if (n.next = void 0, n.flags &= -9, n.flags & 1)
|
|
53
53
|
try {
|
|
54
54
|
n.trigger();
|
|
55
|
-
} catch (
|
|
56
|
-
e || (e =
|
|
55
|
+
} catch (s) {
|
|
56
|
+
e || (e = s);
|
|
57
57
|
}
|
|
58
58
|
n = t;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
if (e) throw e;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Xn(e) {
|
|
64
64
|
for (let n = e.deps; n; n = n.nextDep)
|
|
65
65
|
n.version = -1, n.prevActiveLink = n.dep.activeLink, n.dep.activeLink = n;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let n, t = e.depsTail,
|
|
69
|
-
for (;
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
function Qn(e) {
|
|
68
|
+
let n, t = e.depsTail, s = t;
|
|
69
|
+
for (; s; ) {
|
|
70
|
+
const o = s.prevDep;
|
|
71
|
+
s.version === -1 ? (s === t && (t = o), gn(s), nt(s)) : n = s, s.dep.activeLink = s.prevActiveLink, s.prevActiveLink = void 0, s = o;
|
|
72
72
|
}
|
|
73
73
|
e.deps = n, e.depsTail = t;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function et(e) {
|
|
76
76
|
for (let n = e.deps; n; n = n.nextDep)
|
|
77
|
-
if (n.dep.version !== n.version || n.dep.computed && (
|
|
77
|
+
if (n.dep.version !== n.version || n.dep.computed && (vn(n.dep.computed) || n.dep.version !== n.version))
|
|
78
78
|
return !0;
|
|
79
79
|
return !!e._dirty;
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion ===
|
|
81
|
+
function vn(e) {
|
|
82
|
+
if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === ae))
|
|
83
83
|
return;
|
|
84
|
-
e.globalVersion =
|
|
84
|
+
e.globalVersion = ae;
|
|
85
85
|
const n = e.dep;
|
|
86
|
-
if (e.flags |= 2, n.version > 0 && !e.isSSR && e.deps && !
|
|
86
|
+
if (e.flags |= 2, n.version > 0 && !e.isSSR && e.deps && !et(e)) {
|
|
87
87
|
e.flags &= -3;
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
const t =
|
|
91
|
-
|
|
90
|
+
const t = A, s = H;
|
|
91
|
+
A = e, H = !0;
|
|
92
92
|
try {
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
(n.version === 0 ||
|
|
96
|
-
} catch (
|
|
97
|
-
throw n.version++,
|
|
93
|
+
Xn(e);
|
|
94
|
+
const o = e.fn(e._value);
|
|
95
|
+
(n.version === 0 || Z(o, e._value)) && (e._value = o, n.version++);
|
|
96
|
+
} catch (o) {
|
|
97
|
+
throw n.version++, o;
|
|
98
98
|
} finally {
|
|
99
|
-
|
|
99
|
+
A = t, H = s, Qn(e), e.flags &= -3;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
const { dep: t, prevSub:
|
|
104
|
-
if (
|
|
102
|
+
function gn(e, n = !1) {
|
|
103
|
+
const { dep: t, prevSub: s, nextSub: o } = e;
|
|
104
|
+
if (s && (s.nextSub = o, e.prevSub = void 0), o && (o.prevSub = s, e.nextSub = void 0), process.env.NODE_ENV !== "production" && t.subsHead === e && (t.subsHead = o), t.subs === e && (t.subs = s, !s && t.computed)) {
|
|
105
105
|
t.computed.flags &= -5;
|
|
106
|
-
for (let
|
|
107
|
-
|
|
106
|
+
for (let r = t.computed.deps; r; r = r.nextDep)
|
|
107
|
+
gn(r, !0);
|
|
108
108
|
}
|
|
109
109
|
!n && !--t.sc && t.map && t.map.delete(t.key);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function nt(e) {
|
|
112
112
|
const { prevDep: n, nextDep: t } = e;
|
|
113
113
|
n && (n.nextDep = t, e.prevDep = void 0), t && (t.prevDep = n, e.nextDep = void 0);
|
|
114
114
|
}
|
|
115
|
-
let
|
|
116
|
-
const
|
|
117
|
-
function
|
|
118
|
-
|
|
115
|
+
let H = !0;
|
|
116
|
+
const _n = [];
|
|
117
|
+
function tt() {
|
|
118
|
+
_n.push(H), H = !1;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const e =
|
|
122
|
-
|
|
120
|
+
function ot() {
|
|
121
|
+
const e = _n.pop();
|
|
122
|
+
H = e === void 0 ? !0 : e;
|
|
123
123
|
}
|
|
124
|
-
let
|
|
125
|
-
class
|
|
124
|
+
let ae = 0;
|
|
125
|
+
class st {
|
|
126
126
|
constructor(n, t) {
|
|
127
127
|
this.sub = n, this.dep = t, this.version = t.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class Qe {
|
|
131
131
|
constructor(n) {
|
|
132
132
|
this.computed = n, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, process.env.NODE_ENV !== "production" && (this.subsHead = void 0);
|
|
133
133
|
}
|
|
134
134
|
track(n) {
|
|
135
|
-
if (!
|
|
135
|
+
if (!A || !H || A === this.computed)
|
|
136
136
|
return;
|
|
137
137
|
let t = this.activeLink;
|
|
138
|
-
if (t === void 0 || t.sub !==
|
|
139
|
-
t = this.activeLink = new
|
|
138
|
+
if (t === void 0 || t.sub !== A)
|
|
139
|
+
t = this.activeLink = new st(A, this), A.deps ? (t.prevDep = A.depsTail, A.depsTail.nextDep = t, A.depsTail = t) : A.deps = A.depsTail = t, Cn(t);
|
|
140
140
|
else if (t.version === -1 && (t.version = this.version, t.nextDep)) {
|
|
141
|
-
const
|
|
142
|
-
|
|
141
|
+
const s = t.nextDep;
|
|
142
|
+
s.prevDep = t.prevDep, t.prevDep && (t.prevDep.nextDep = s), t.prevDep = A.depsTail, t.nextDep = void 0, A.depsTail.nextDep = t, A.depsTail = t, A.deps === t && (A.deps = s);
|
|
143
143
|
}
|
|
144
|
-
return process.env.NODE_ENV !== "production" &&
|
|
145
|
-
|
|
144
|
+
return process.env.NODE_ENV !== "production" && A.onTrack && A.onTrack(
|
|
145
|
+
Ve(
|
|
146
146
|
{
|
|
147
|
-
effect:
|
|
147
|
+
effect: A
|
|
148
148
|
},
|
|
149
149
|
n
|
|
150
150
|
)
|
|
151
151
|
), t;
|
|
152
152
|
}
|
|
153
153
|
trigger(n) {
|
|
154
|
-
this.version++,
|
|
154
|
+
this.version++, ae++, this.notify(n);
|
|
155
155
|
}
|
|
156
156
|
notify(n) {
|
|
157
|
-
|
|
157
|
+
Ze();
|
|
158
158
|
try {
|
|
159
159
|
if (process.env.NODE_ENV !== "production")
|
|
160
160
|
for (let t = this.subsHead; t; t = t.nextSub)
|
|
161
161
|
t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(
|
|
162
|
-
|
|
162
|
+
Ve(
|
|
163
163
|
{
|
|
164
164
|
effect: t.sub
|
|
165
165
|
},
|
|
@@ -169,252 +169,252 @@ class qe {
|
|
|
169
169
|
for (let t = this.subs; t; t = t.prevSub)
|
|
170
170
|
t.sub.notify() && t.sub.dep.notify();
|
|
171
171
|
} finally {
|
|
172
|
-
|
|
172
|
+
Xe();
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Cn(e) {
|
|
177
177
|
if (e.dep.sc++, e.sub.flags & 4) {
|
|
178
178
|
const n = e.dep.computed;
|
|
179
179
|
if (n && !e.dep.subs) {
|
|
180
180
|
n.flags |= 20;
|
|
181
|
-
for (let
|
|
182
|
-
|
|
181
|
+
for (let s = n.deps; s; s = s.nextDep)
|
|
182
|
+
Cn(s);
|
|
183
183
|
}
|
|
184
184
|
const t = e.dep.subs;
|
|
185
185
|
t !== e && (e.prevSub = t, t && (t.nextSub = e)), process.env.NODE_ENV !== "production" && e.dep.subsHead === void 0 && (e.dep.subsHead = e), e.dep.subs = e;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const He = /* @__PURE__ */ new WeakMap(), B = Symbol(
|
|
189
189
|
process.env.NODE_ENV !== "production" ? "Object iterate" : ""
|
|
190
|
-
),
|
|
190
|
+
), Le = Symbol(
|
|
191
191
|
process.env.NODE_ENV !== "production" ? "Map keys iterate" : ""
|
|
192
|
-
),
|
|
192
|
+
), ie = Symbol(
|
|
193
193
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
194
194
|
);
|
|
195
|
-
function
|
|
196
|
-
if (
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
let
|
|
200
|
-
|
|
195
|
+
function T(e, n, t) {
|
|
196
|
+
if (H && A) {
|
|
197
|
+
let s = He.get(e);
|
|
198
|
+
s || He.set(e, s = /* @__PURE__ */ new Map());
|
|
199
|
+
let o = s.get(t);
|
|
200
|
+
o || (s.set(t, o = new Qe()), o.map = s, o.key = t), process.env.NODE_ENV !== "production" ? o.track({
|
|
201
201
|
target: e,
|
|
202
202
|
type: n,
|
|
203
203
|
key: t
|
|
204
|
-
}) :
|
|
204
|
+
}) : o.track();
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const c =
|
|
207
|
+
function R(e, n, t, s, o, r) {
|
|
208
|
+
const c = He.get(e);
|
|
209
209
|
if (!c) {
|
|
210
|
-
|
|
210
|
+
ae++;
|
|
211
211
|
return;
|
|
212
212
|
}
|
|
213
|
-
const g = (
|
|
214
|
-
|
|
213
|
+
const g = (_) => {
|
|
214
|
+
_ && (process.env.NODE_ENV !== "production" ? _.trigger({
|
|
215
215
|
target: e,
|
|
216
216
|
type: n,
|
|
217
217
|
key: t,
|
|
218
|
-
newValue:
|
|
219
|
-
oldValue:
|
|
220
|
-
oldTarget:
|
|
221
|
-
}) :
|
|
218
|
+
newValue: s,
|
|
219
|
+
oldValue: o,
|
|
220
|
+
oldTarget: r
|
|
221
|
+
}) : _.trigger());
|
|
222
222
|
};
|
|
223
|
-
if (
|
|
223
|
+
if (Ze(), n === "clear")
|
|
224
224
|
c.forEach(g);
|
|
225
225
|
else {
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
228
|
-
const
|
|
229
|
-
c.forEach((
|
|
230
|
-
(
|
|
226
|
+
const _ = Y(e), m = _ && Ye(t);
|
|
227
|
+
if (_ && t === "length") {
|
|
228
|
+
const a = Number(s);
|
|
229
|
+
c.forEach((u, i) => {
|
|
230
|
+
(i === "length" || i === ie || !le(i) && i >= a) && g(u);
|
|
231
231
|
});
|
|
232
232
|
} else
|
|
233
|
-
switch ((t !== void 0 || c.has(void 0)) && g(c.get(t)),
|
|
233
|
+
switch ((t !== void 0 || c.has(void 0)) && g(c.get(t)), m && g(c.get(ie)), n) {
|
|
234
234
|
case "add":
|
|
235
|
-
|
|
235
|
+
_ ? m && g(c.get("length")) : (g(c.get(B)), oe(e) && g(c.get(Le)));
|
|
236
236
|
break;
|
|
237
237
|
case "delete":
|
|
238
|
-
|
|
238
|
+
_ || (g(c.get(B)), oe(e) && g(c.get(Le)));
|
|
239
239
|
break;
|
|
240
240
|
case "set":
|
|
241
|
-
|
|
241
|
+
oe(e) && g(c.get(B));
|
|
242
242
|
break;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
|
|
245
|
+
Xe();
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
const n =
|
|
249
|
-
return n === e ? n : (
|
|
247
|
+
function W(e) {
|
|
248
|
+
const n = S(e);
|
|
249
|
+
return n === e ? n : (T(n, "iterate", ie), L(e) ? n : n.map(x));
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
return
|
|
251
|
+
function en(e) {
|
|
252
|
+
return T(e = S(e), "iterate", ie), e;
|
|
253
253
|
}
|
|
254
|
-
const
|
|
254
|
+
const rt = {
|
|
255
255
|
__proto__: null,
|
|
256
256
|
[Symbol.iterator]() {
|
|
257
|
-
return Oe(this, Symbol.iterator,
|
|
257
|
+
return Oe(this, Symbol.iterator, x);
|
|
258
258
|
},
|
|
259
259
|
concat(...e) {
|
|
260
|
-
return
|
|
261
|
-
...e.map((n) =>
|
|
260
|
+
return W(this).concat(
|
|
261
|
+
...e.map((n) => Y(n) ? W(n) : n)
|
|
262
262
|
);
|
|
263
263
|
},
|
|
264
264
|
entries() {
|
|
265
|
-
return Oe(this, "entries", (e) => (e[1] =
|
|
265
|
+
return Oe(this, "entries", (e) => (e[1] = x(e[1]), e));
|
|
266
266
|
},
|
|
267
267
|
every(e, n) {
|
|
268
|
-
return
|
|
268
|
+
return D(this, "every", e, n, void 0, arguments);
|
|
269
269
|
},
|
|
270
270
|
filter(e, n) {
|
|
271
|
-
return
|
|
271
|
+
return D(this, "filter", e, n, (t) => t.map(x), arguments);
|
|
272
272
|
},
|
|
273
273
|
find(e, n) {
|
|
274
|
-
return
|
|
274
|
+
return D(this, "find", e, n, x, arguments);
|
|
275
275
|
},
|
|
276
276
|
findIndex(e, n) {
|
|
277
|
-
return
|
|
277
|
+
return D(this, "findIndex", e, n, void 0, arguments);
|
|
278
278
|
},
|
|
279
279
|
findLast(e, n) {
|
|
280
|
-
return
|
|
280
|
+
return D(this, "findLast", e, n, x, arguments);
|
|
281
281
|
},
|
|
282
282
|
findLastIndex(e, n) {
|
|
283
|
-
return
|
|
283
|
+
return D(this, "findLastIndex", e, n, void 0, arguments);
|
|
284
284
|
},
|
|
285
285
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
286
286
|
forEach(e, n) {
|
|
287
|
-
return
|
|
287
|
+
return D(this, "forEach", e, n, void 0, arguments);
|
|
288
288
|
},
|
|
289
289
|
includes(...e) {
|
|
290
|
-
return
|
|
290
|
+
return xe(this, "includes", e);
|
|
291
291
|
},
|
|
292
292
|
indexOf(...e) {
|
|
293
|
-
return
|
|
293
|
+
return xe(this, "indexOf", e);
|
|
294
294
|
},
|
|
295
295
|
join(e) {
|
|
296
|
-
return
|
|
296
|
+
return W(this).join(e);
|
|
297
297
|
},
|
|
298
298
|
// keys() iterator only reads `length`, no optimisation required
|
|
299
299
|
lastIndexOf(...e) {
|
|
300
|
-
return
|
|
300
|
+
return xe(this, "lastIndexOf", e);
|
|
301
301
|
},
|
|
302
302
|
map(e, n) {
|
|
303
|
-
return
|
|
303
|
+
return D(this, "map", e, n, void 0, arguments);
|
|
304
304
|
},
|
|
305
305
|
pop() {
|
|
306
|
-
return
|
|
306
|
+
return te(this, "pop");
|
|
307
307
|
},
|
|
308
308
|
push(...e) {
|
|
309
|
-
return
|
|
309
|
+
return te(this, "push", e);
|
|
310
310
|
},
|
|
311
311
|
reduce(e, ...n) {
|
|
312
|
-
return
|
|
312
|
+
return un(this, "reduce", e, n);
|
|
313
313
|
},
|
|
314
314
|
reduceRight(e, ...n) {
|
|
315
|
-
return
|
|
315
|
+
return un(this, "reduceRight", e, n);
|
|
316
316
|
},
|
|
317
317
|
shift() {
|
|
318
|
-
return
|
|
318
|
+
return te(this, "shift");
|
|
319
319
|
},
|
|
320
320
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
321
321
|
some(e, n) {
|
|
322
|
-
return
|
|
322
|
+
return D(this, "some", e, n, void 0, arguments);
|
|
323
323
|
},
|
|
324
324
|
splice(...e) {
|
|
325
|
-
return
|
|
325
|
+
return te(this, "splice", e);
|
|
326
326
|
},
|
|
327
327
|
toReversed() {
|
|
328
|
-
return
|
|
328
|
+
return W(this).toReversed();
|
|
329
329
|
},
|
|
330
330
|
toSorted(e) {
|
|
331
|
-
return
|
|
331
|
+
return W(this).toSorted(e);
|
|
332
332
|
},
|
|
333
333
|
toSpliced(...e) {
|
|
334
|
-
return
|
|
334
|
+
return W(this).toSpliced(...e);
|
|
335
335
|
},
|
|
336
336
|
unshift(...e) {
|
|
337
|
-
return
|
|
337
|
+
return te(this, "unshift", e);
|
|
338
338
|
},
|
|
339
339
|
values() {
|
|
340
|
-
return Oe(this, "values",
|
|
340
|
+
return Oe(this, "values", x);
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
function Oe(e, n, t) {
|
|
344
|
-
const
|
|
345
|
-
return
|
|
346
|
-
const
|
|
347
|
-
return
|
|
348
|
-
}),
|
|
349
|
-
}
|
|
350
|
-
const
|
|
351
|
-
function
|
|
352
|
-
const c =
|
|
353
|
-
if (
|
|
354
|
-
const
|
|
355
|
-
return g ?
|
|
356
|
-
}
|
|
357
|
-
let
|
|
358
|
-
c !== e && (g ?
|
|
359
|
-
return t.call(this,
|
|
360
|
-
} : t.length > 2 && (
|
|
361
|
-
return t.call(this,
|
|
344
|
+
const s = en(e), o = s[n]();
|
|
345
|
+
return s !== e && !L(e) && (o._next = o.next, o.next = () => {
|
|
346
|
+
const r = o._next();
|
|
347
|
+
return r.value && (r.value = t(r.value)), r;
|
|
348
|
+
}), o;
|
|
349
|
+
}
|
|
350
|
+
const at = Array.prototype;
|
|
351
|
+
function D(e, n, t, s, o, r) {
|
|
352
|
+
const c = en(e), g = c !== e && !L(e), _ = c[n];
|
|
353
|
+
if (_ !== at[n]) {
|
|
354
|
+
const u = _.apply(e, r);
|
|
355
|
+
return g ? x(u) : u;
|
|
356
|
+
}
|
|
357
|
+
let m = t;
|
|
358
|
+
c !== e && (g ? m = function(u, i) {
|
|
359
|
+
return t.call(this, x(u), i, e);
|
|
360
|
+
} : t.length > 2 && (m = function(u, i) {
|
|
361
|
+
return t.call(this, u, i, e);
|
|
362
362
|
}));
|
|
363
|
-
const
|
|
364
|
-
return g &&
|
|
365
|
-
}
|
|
366
|
-
function
|
|
367
|
-
const
|
|
368
|
-
let
|
|
369
|
-
return
|
|
370
|
-
return t.call(this, c, g,
|
|
371
|
-
}) :
|
|
372
|
-
return t.call(this, c,
|
|
373
|
-
}),
|
|
374
|
-
}
|
|
375
|
-
function
|
|
376
|
-
const
|
|
377
|
-
|
|
378
|
-
const
|
|
379
|
-
return (
|
|
380
|
-
}
|
|
381
|
-
function
|
|
382
|
-
|
|
383
|
-
const
|
|
384
|
-
return
|
|
385
|
-
}
|
|
386
|
-
const
|
|
387
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
363
|
+
const a = _.call(c, m, s);
|
|
364
|
+
return g && o ? o(a) : a;
|
|
365
|
+
}
|
|
366
|
+
function un(e, n, t, s) {
|
|
367
|
+
const o = en(e);
|
|
368
|
+
let r = t;
|
|
369
|
+
return o !== e && (L(e) ? t.length > 3 && (r = function(c, g, _) {
|
|
370
|
+
return t.call(this, c, g, _, e);
|
|
371
|
+
}) : r = function(c, g, _) {
|
|
372
|
+
return t.call(this, c, x(g), _, e);
|
|
373
|
+
}), o[n](r, ...s);
|
|
374
|
+
}
|
|
375
|
+
function xe(e, n, t) {
|
|
376
|
+
const s = S(e);
|
|
377
|
+
T(s, "iterate", ie);
|
|
378
|
+
const o = s[n](...t);
|
|
379
|
+
return (o === -1 || o === !1) && bt(t[0]) ? (t[0] = S(t[0]), s[n](...t)) : o;
|
|
380
|
+
}
|
|
381
|
+
function te(e, n, t = []) {
|
|
382
|
+
tt(), Ze();
|
|
383
|
+
const s = S(e)[n].apply(e, t);
|
|
384
|
+
return Xe(), ot(), s;
|
|
385
|
+
}
|
|
386
|
+
const it = /* @__PURE__ */ Gn("__proto__,__v_isRef,__isVue"), $n = new Set(
|
|
387
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(le)
|
|
388
388
|
);
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
const n =
|
|
392
|
-
return
|
|
389
|
+
function ct(e) {
|
|
390
|
+
le(e) || (e = String(e));
|
|
391
|
+
const n = S(this);
|
|
392
|
+
return T(n, "has", e), n.hasOwnProperty(e);
|
|
393
393
|
}
|
|
394
|
-
class
|
|
394
|
+
class bn {
|
|
395
395
|
constructor(n = !1, t = !1) {
|
|
396
396
|
this._isReadonly = n, this._isShallow = t;
|
|
397
397
|
}
|
|
398
|
-
get(n, t,
|
|
398
|
+
get(n, t, s) {
|
|
399
399
|
if (t === "__v_skip") return n.__v_skip;
|
|
400
|
-
const
|
|
400
|
+
const o = this._isReadonly, r = this._isShallow;
|
|
401
401
|
if (t === "__v_isReactive")
|
|
402
|
-
return !
|
|
402
|
+
return !o;
|
|
403
403
|
if (t === "__v_isReadonly")
|
|
404
|
-
return
|
|
404
|
+
return o;
|
|
405
405
|
if (t === "__v_isShallow")
|
|
406
|
-
return
|
|
406
|
+
return r;
|
|
407
407
|
if (t === "__v_raw")
|
|
408
|
-
return
|
|
408
|
+
return s === (o ? r ? En : yn : r ? _t : 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
|
-
Object.getPrototypeOf(n) === Object.getPrototypeOf(
|
|
411
|
-
const c =
|
|
412
|
-
if (!
|
|
413
|
-
let
|
|
414
|
-
if (c && (
|
|
415
|
-
return
|
|
410
|
+
Object.getPrototypeOf(n) === Object.getPrototypeOf(s) ? n : void 0;
|
|
411
|
+
const c = Y(n);
|
|
412
|
+
if (!o) {
|
|
413
|
+
let _;
|
|
414
|
+
if (c && (_ = rt[t]))
|
|
415
|
+
return _;
|
|
416
416
|
if (t === "hasOwnProperty")
|
|
417
|
-
return
|
|
417
|
+
return ct;
|
|
418
418
|
}
|
|
419
419
|
const g = Reflect.get(
|
|
420
420
|
n,
|
|
@@ -422,78 +422,78 @@ class Cn {
|
|
|
422
422
|
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
423
423
|
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
424
424
|
// its class methods
|
|
425
|
-
|
|
425
|
+
X(n) ? n : s
|
|
426
426
|
);
|
|
427
|
-
return (
|
|
427
|
+
return (le(t) ? $n.has(t) : it(t)) || (o || T(n, "get", t), r) ? g : X(g) ? c && Ye(t) ? g : g.value : je(g) ? o ? ge(g) : jn(g) : g;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
class
|
|
430
|
+
class ut extends bn {
|
|
431
431
|
constructor(n = !1) {
|
|
432
432
|
super(!1, n);
|
|
433
433
|
}
|
|
434
|
-
set(n, t,
|
|
435
|
-
let
|
|
434
|
+
set(n, t, s, o) {
|
|
435
|
+
let r = n[t];
|
|
436
436
|
if (!this._isShallow) {
|
|
437
|
-
const
|
|
438
|
-
if (!
|
|
439
|
-
return
|
|
437
|
+
const _ = ne(r);
|
|
438
|
+
if (!L(s) && !ne(s) && (r = S(r), s = S(s)), !Y(n) && X(r) && !X(s))
|
|
439
|
+
return _ ? !1 : (r.value = s, !0);
|
|
440
440
|
}
|
|
441
|
-
const c =
|
|
441
|
+
const c = Y(n) && Ye(t) ? Number(t) < n.length : Re(n, t), g = Reflect.set(
|
|
442
442
|
n,
|
|
443
443
|
t,
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
s,
|
|
445
|
+
X(n) ? n : o
|
|
446
446
|
);
|
|
447
|
-
return n ===
|
|
447
|
+
return n === S(o) && (c ? Z(s, r) && R(n, "set", t, s, r) : R(n, "add", t, s)), g;
|
|
448
448
|
}
|
|
449
449
|
deleteProperty(n, t) {
|
|
450
|
-
const
|
|
451
|
-
return
|
|
450
|
+
const s = Re(n, t), o = n[t], r = Reflect.deleteProperty(n, t);
|
|
451
|
+
return r && s && R(n, "delete", t, void 0, o), r;
|
|
452
452
|
}
|
|
453
453
|
has(n, t) {
|
|
454
|
-
const
|
|
455
|
-
return (!
|
|
454
|
+
const s = Reflect.has(n, t);
|
|
455
|
+
return (!le(t) || !$n.has(t)) && T(n, "has", t), s;
|
|
456
456
|
}
|
|
457
457
|
ownKeys(n) {
|
|
458
|
-
return
|
|
458
|
+
return T(
|
|
459
459
|
n,
|
|
460
460
|
"iterate",
|
|
461
|
-
|
|
461
|
+
Y(n) ? "length" : B
|
|
462
462
|
), Reflect.ownKeys(n);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
class
|
|
465
|
+
class wn extends bn {
|
|
466
466
|
constructor(n = !1) {
|
|
467
467
|
super(!0, n);
|
|
468
468
|
}
|
|
469
469
|
set(n, t) {
|
|
470
|
-
return process.env.NODE_ENV !== "production" &&
|
|
470
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
471
471
|
`Set operation on key "${String(t)}" failed: target is readonly.`,
|
|
472
472
|
n
|
|
473
473
|
), !0;
|
|
474
474
|
}
|
|
475
475
|
deleteProperty(n, t) {
|
|
476
|
-
return process.env.NODE_ENV !== "production" &&
|
|
476
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
477
477
|
`Delete operation on key "${String(t)}" failed: target is readonly.`,
|
|
478
478
|
n
|
|
479
479
|
), !0;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
const
|
|
483
|
-
function
|
|
484
|
-
return function(...
|
|
485
|
-
const
|
|
486
|
-
return !n &&
|
|
487
|
-
|
|
482
|
+
const lt = /* @__PURE__ */ new ut(), pt = /* @__PURE__ */ new wn(), dt = /* @__PURE__ */ new wn(!0), Me = (e) => e, de = (e) => Reflect.getPrototypeOf(e);
|
|
483
|
+
function mt(e, n, t) {
|
|
484
|
+
return function(...s) {
|
|
485
|
+
const o = this.__v_raw, r = S(o), c = oe(r), g = e === "entries" || e === Symbol.iterator && c, _ = e === "keys" && c, m = o[e](...s), a = t ? Me : n ? Ke : x;
|
|
486
|
+
return !n && T(
|
|
487
|
+
r,
|
|
488
488
|
"iterate",
|
|
489
|
-
|
|
489
|
+
_ ? Le : B
|
|
490
490
|
), {
|
|
491
491
|
// iterator protocol
|
|
492
492
|
next() {
|
|
493
|
-
const { value:
|
|
494
|
-
return
|
|
495
|
-
value: g ? [
|
|
496
|
-
done:
|
|
493
|
+
const { value: u, done: i } = m.next();
|
|
494
|
+
return i ? { value: u, done: i } : {
|
|
495
|
+
value: g ? [a(u[0]), a(u[1])] : a(u),
|
|
496
|
+
done: i
|
|
497
497
|
};
|
|
498
498
|
},
|
|
499
499
|
// iterable protocol
|
|
@@ -503,75 +503,75 @@ function pt(e, n, t) {
|
|
|
503
503
|
};
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function me(e) {
|
|
507
507
|
return function(...n) {
|
|
508
508
|
if (process.env.NODE_ENV !== "production") {
|
|
509
509
|
const t = n[0] ? `on key "${n[0]}" ` : "";
|
|
510
|
-
|
|
511
|
-
`${
|
|
512
|
-
|
|
510
|
+
ee(
|
|
511
|
+
`${Yn(e)} operation ${t}failed: target is readonly.`,
|
|
512
|
+
S(this)
|
|
513
513
|
);
|
|
514
514
|
}
|
|
515
515
|
return e === "delete" ? !1 : e === "clear" ? void 0 : this;
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function ft(e, n) {
|
|
519
519
|
const t = {
|
|
520
|
-
get(
|
|
521
|
-
const
|
|
522
|
-
e || (
|
|
523
|
-
const { has:
|
|
524
|
-
if (
|
|
525
|
-
return
|
|
526
|
-
if (
|
|
527
|
-
return
|
|
528
|
-
|
|
520
|
+
get(o) {
|
|
521
|
+
const r = this.__v_raw, c = S(r), g = S(o);
|
|
522
|
+
e || (Z(o, g) && T(c, "get", o), T(c, "get", g));
|
|
523
|
+
const { has: _ } = de(c), m = n ? Me : e ? Ke : x;
|
|
524
|
+
if (_.call(c, o))
|
|
525
|
+
return m(r.get(o));
|
|
526
|
+
if (_.call(c, g))
|
|
527
|
+
return m(r.get(g));
|
|
528
|
+
r !== c && r.get(o);
|
|
529
529
|
},
|
|
530
530
|
get size() {
|
|
531
|
-
const
|
|
532
|
-
return !e &&
|
|
531
|
+
const o = this.__v_raw;
|
|
532
|
+
return !e && T(S(o), "iterate", B), Reflect.get(o, "size", o);
|
|
533
533
|
},
|
|
534
|
-
has(
|
|
535
|
-
const
|
|
536
|
-
return e || (
|
|
534
|
+
has(o) {
|
|
535
|
+
const r = this.__v_raw, c = S(r), g = S(o);
|
|
536
|
+
return e || (Z(o, g) && T(c, "has", o), T(c, "has", g)), o === g ? r.has(o) : r.has(o) || r.has(g);
|
|
537
537
|
},
|
|
538
|
-
forEach(
|
|
539
|
-
const c = this, g = c.__v_raw,
|
|
540
|
-
return !e &&
|
|
538
|
+
forEach(o, r) {
|
|
539
|
+
const c = this, g = c.__v_raw, _ = S(g), m = n ? Me : e ? Ke : x;
|
|
540
|
+
return !e && T(_, "iterate", B), g.forEach((a, u) => o.call(r, m(a), m(u), c));
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
return
|
|
543
|
+
return Ve(
|
|
544
544
|
t,
|
|
545
545
|
e ? {
|
|
546
|
-
add:
|
|
547
|
-
set:
|
|
548
|
-
delete:
|
|
549
|
-
clear:
|
|
546
|
+
add: me("add"),
|
|
547
|
+
set: me("set"),
|
|
548
|
+
delete: me("delete"),
|
|
549
|
+
clear: me("clear")
|
|
550
550
|
} : {
|
|
551
|
-
add(
|
|
552
|
-
!n && !
|
|
553
|
-
const
|
|
554
|
-
return
|
|
551
|
+
add(o) {
|
|
552
|
+
!n && !L(o) && !ne(o) && (o = S(o));
|
|
553
|
+
const r = S(this);
|
|
554
|
+
return de(r).has.call(r, o) || (r.add(o), R(r, "add", o, o)), this;
|
|
555
555
|
},
|
|
556
|
-
set(
|
|
557
|
-
!n && !
|
|
558
|
-
const c =
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
const
|
|
562
|
-
return c.set(
|
|
556
|
+
set(o, r) {
|
|
557
|
+
!n && !L(r) && !ne(r) && (r = S(r));
|
|
558
|
+
const c = S(this), { has: g, get: _ } = de(c);
|
|
559
|
+
let m = g.call(c, o);
|
|
560
|
+
m ? process.env.NODE_ENV !== "production" && ln(c, g, o) : (o = S(o), m = g.call(c, o));
|
|
561
|
+
const a = _.call(c, o);
|
|
562
|
+
return c.set(o, r), m ? Z(r, a) && R(c, "set", o, r, a) : R(c, "add", o, r), this;
|
|
563
563
|
},
|
|
564
|
-
delete(
|
|
565
|
-
const
|
|
566
|
-
let
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
return
|
|
564
|
+
delete(o) {
|
|
565
|
+
const r = S(this), { has: c, get: g } = de(r);
|
|
566
|
+
let _ = c.call(r, o);
|
|
567
|
+
_ ? process.env.NODE_ENV !== "production" && ln(r, c, o) : (o = S(o), _ = c.call(r, o));
|
|
568
|
+
const m = g ? g.call(r, o) : void 0, a = r.delete(o);
|
|
569
|
+
return _ && R(r, "delete", o, void 0, m), a;
|
|
570
570
|
},
|
|
571
571
|
clear() {
|
|
572
|
-
const
|
|
573
|
-
return
|
|
574
|
-
|
|
572
|
+
const o = S(this), r = o.size !== 0, c = process.env.NODE_ENV !== "production" ? oe(o) ? new Map(o) : new Set(o) : void 0, g = o.clear();
|
|
573
|
+
return r && R(
|
|
574
|
+
o,
|
|
575
575
|
"clear",
|
|
576
576
|
void 0,
|
|
577
577
|
void 0,
|
|
@@ -584,36 +584,36 @@ function dt(e, n) {
|
|
|
584
584
|
"values",
|
|
585
585
|
"entries",
|
|
586
586
|
Symbol.iterator
|
|
587
|
-
].forEach((
|
|
588
|
-
t[
|
|
587
|
+
].forEach((o) => {
|
|
588
|
+
t[o] = mt(o, e, n);
|
|
589
589
|
}), t;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
const t =
|
|
593
|
-
return (
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
591
|
+
function nn(e, n) {
|
|
592
|
+
const t = ft(e, n);
|
|
593
|
+
return (s, o, r) => o === "__v_isReactive" ? !e : o === "__v_isReadonly" ? e : o === "__v_raw" ? s : Reflect.get(
|
|
594
|
+
Re(t, o) && o in s ? t : s,
|
|
595
|
+
o,
|
|
596
|
+
r
|
|
597
597
|
);
|
|
598
598
|
}
|
|
599
|
-
const
|
|
600
|
-
get: /* @__PURE__ */
|
|
601
|
-
},
|
|
602
|
-
get: /* @__PURE__ */
|
|
603
|
-
},
|
|
604
|
-
get: /* @__PURE__ */
|
|
599
|
+
const ht = {
|
|
600
|
+
get: /* @__PURE__ */ nn(!1, !1)
|
|
601
|
+
}, vt = {
|
|
602
|
+
get: /* @__PURE__ */ nn(!0, !1)
|
|
603
|
+
}, gt = {
|
|
604
|
+
get: /* @__PURE__ */ nn(!0, !0)
|
|
605
605
|
};
|
|
606
|
-
function
|
|
607
|
-
const
|
|
608
|
-
if (
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
`Reactive ${
|
|
606
|
+
function ln(e, n, t) {
|
|
607
|
+
const s = S(t);
|
|
608
|
+
if (s !== t && n.call(e, s)) {
|
|
609
|
+
const o = fn(e);
|
|
610
|
+
ee(
|
|
611
|
+
`Reactive ${o} contains both the raw and reactive versions of the same object${o === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
|
|
612
612
|
);
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
function
|
|
615
|
+
const Nn = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), En = /* @__PURE__ */ new WeakMap();
|
|
616
|
+
function Ct(e) {
|
|
617
617
|
switch (e) {
|
|
618
618
|
case "Object":
|
|
619
619
|
case "Array":
|
|
@@ -627,83 +627,83 @@ function vt(e) {
|
|
|
627
627
|
return 0;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return e.__v_skip || !Object.isExtensible(e) ? 0 :
|
|
630
|
+
function $t(e) {
|
|
631
|
+
return e.__v_skip || !Object.isExtensible(e) ? 0 : Ct(fn(e));
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
633
|
+
function jn(e) {
|
|
634
|
+
return ne(e) ? e : tn(
|
|
635
635
|
e,
|
|
636
636
|
!1,
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
637
|
+
lt,
|
|
638
|
+
ht,
|
|
639
|
+
Nn
|
|
640
640
|
);
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
return
|
|
642
|
+
function ge(e) {
|
|
643
|
+
return tn(
|
|
644
644
|
e,
|
|
645
645
|
!0,
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
646
|
+
pt,
|
|
647
|
+
vt,
|
|
648
|
+
yn
|
|
649
649
|
);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
return
|
|
651
|
+
function he(e) {
|
|
652
|
+
return tn(
|
|
653
653
|
e,
|
|
654
654
|
!0,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
dt,
|
|
656
|
+
gt,
|
|
657
|
+
En
|
|
658
658
|
);
|
|
659
659
|
}
|
|
660
|
-
function
|
|
661
|
-
if (!
|
|
662
|
-
return process.env.NODE_ENV !== "production" &&
|
|
660
|
+
function tn(e, n, t, s, o) {
|
|
661
|
+
if (!je(e))
|
|
662
|
+
return process.env.NODE_ENV !== "production" && ee(
|
|
663
663
|
`value cannot be made ${n ? "readonly" : "reactive"}: ${String(
|
|
664
664
|
e
|
|
665
665
|
)}`
|
|
666
666
|
), e;
|
|
667
667
|
if (e.__v_raw && !(n && e.__v_isReactive))
|
|
668
668
|
return e;
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
671
|
-
return
|
|
672
|
-
const c =
|
|
669
|
+
const r = o.get(e);
|
|
670
|
+
if (r)
|
|
671
|
+
return r;
|
|
672
|
+
const c = $t(e);
|
|
673
673
|
if (c === 0)
|
|
674
674
|
return e;
|
|
675
675
|
const g = new Proxy(
|
|
676
676
|
e,
|
|
677
|
-
c === 2 ?
|
|
677
|
+
c === 2 ? s : t
|
|
678
678
|
);
|
|
679
|
-
return
|
|
679
|
+
return o.set(e, g), g;
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function ne(e) {
|
|
682
682
|
return !!(e && e.__v_isReadonly);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function L(e) {
|
|
685
685
|
return !!(e && e.__v_isShallow);
|
|
686
686
|
}
|
|
687
|
-
function
|
|
687
|
+
function bt(e) {
|
|
688
688
|
return e ? !!e.__v_raw : !1;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function S(e) {
|
|
691
691
|
const n = e && e.__v_raw;
|
|
692
|
-
return n ?
|
|
692
|
+
return n ? S(n) : e;
|
|
693
693
|
}
|
|
694
|
-
const
|
|
695
|
-
function
|
|
694
|
+
const x = (e) => je(e) ? jn(e) : e, Ke = (e) => je(e) ? ge(e) : e;
|
|
695
|
+
function X(e) {
|
|
696
696
|
return e ? e.__v_isRef === !0 : !1;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
699
|
-
return
|
|
698
|
+
function _e(e) {
|
|
699
|
+
return wt(e, !1);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
return
|
|
701
|
+
function wt(e, n) {
|
|
702
|
+
return X(e) ? e : new Nt(e, n);
|
|
703
703
|
}
|
|
704
|
-
class
|
|
704
|
+
class Nt {
|
|
705
705
|
constructor(n, t) {
|
|
706
|
-
this.dep = new
|
|
706
|
+
this.dep = new Qe(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = t ? n : S(n), this._value = t ? n : x(n), this.__v_isShallow = t;
|
|
707
707
|
}
|
|
708
708
|
get value() {
|
|
709
709
|
return process.env.NODE_ENV !== "production" ? this.dep.track({
|
|
@@ -713,8 +713,8 @@ class bt {
|
|
|
713
713
|
}) : this.dep.track(), this._value;
|
|
714
714
|
}
|
|
715
715
|
set value(n) {
|
|
716
|
-
const t = this._rawValue,
|
|
717
|
-
n =
|
|
716
|
+
const t = this._rawValue, s = this.__v_isShallow || L(n) || ne(n);
|
|
717
|
+
n = s ? n : S(n), Z(n, t) && (this._rawValue = n, this._value = s ? n : x(n), process.env.NODE_ENV !== "production" ? this.dep.trigger({
|
|
718
718
|
target: this,
|
|
719
719
|
type: "set",
|
|
720
720
|
key: "value",
|
|
@@ -723,17 +723,17 @@ class bt {
|
|
|
723
723
|
}) : this.dep.trigger());
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
class
|
|
727
|
-
constructor(n, t,
|
|
728
|
-
this.fn = n, this.setter = t, this._value = void 0, this.dep = new
|
|
726
|
+
class yt {
|
|
727
|
+
constructor(n, t, s) {
|
|
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 = ae - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !t, this.isSSR = s;
|
|
729
729
|
}
|
|
730
730
|
/**
|
|
731
731
|
* @internal
|
|
732
732
|
*/
|
|
733
733
|
notify() {
|
|
734
734
|
if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
|
|
735
|
-
|
|
736
|
-
return
|
|
735
|
+
A !== this)
|
|
736
|
+
return Zn(this, !0), !0;
|
|
737
737
|
process.env.NODE_ENV;
|
|
738
738
|
}
|
|
739
739
|
get value() {
|
|
@@ -742,230 +742,230 @@ class wt {
|
|
|
742
742
|
type: "get",
|
|
743
743
|
key: "value"
|
|
744
744
|
}) : this.dep.track();
|
|
745
|
-
return
|
|
745
|
+
return vn(this), n && (n.version = this.dep.version), this._value;
|
|
746
746
|
}
|
|
747
747
|
set value(n) {
|
|
748
|
-
this.setter ? this.setter(n) : process.env.NODE_ENV !== "production" &&
|
|
748
|
+
this.setter ? this.setter(n) : process.env.NODE_ENV !== "production" && ee("Write operation failed: computed value is readonly");
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
function
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
return process.env.NODE_ENV,
|
|
751
|
+
function Be(e, n, t = !1) {
|
|
752
|
+
let s, o;
|
|
753
|
+
zn(e) ? s = e : (s = e.get, o = e.set);
|
|
754
|
+
const r = new yt(s, o, t);
|
|
755
|
+
return process.env.NODE_ENV, r;
|
|
756
756
|
}
|
|
757
|
-
const
|
|
758
|
-
let
|
|
757
|
+
const Et = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
758
|
+
let jt = (e = 21) => {
|
|
759
759
|
let n = "", t = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
760
760
|
for (; e--; )
|
|
761
|
-
n +=
|
|
761
|
+
n += Et[t[e] & 63];
|
|
762
762
|
return n;
|
|
763
763
|
};
|
|
764
|
-
function
|
|
765
|
-
const
|
|
766
|
-
let
|
|
767
|
-
const
|
|
764
|
+
function St(e, n = !0, t = !1) {
|
|
765
|
+
const s = _e();
|
|
766
|
+
let o;
|
|
767
|
+
const r = _e(!1);
|
|
768
768
|
let c = () => {
|
|
769
769
|
};
|
|
770
770
|
const g = new Proxy(e, {
|
|
771
|
-
apply: function(
|
|
772
|
-
let
|
|
771
|
+
apply: function(a, u, i) {
|
|
772
|
+
let p;
|
|
773
773
|
try {
|
|
774
|
-
|
|
775
|
-
} catch (
|
|
776
|
-
|
|
774
|
+
p = a(...i);
|
|
775
|
+
} catch (b) {
|
|
776
|
+
p = b;
|
|
777
777
|
}
|
|
778
|
-
if (
|
|
779
|
-
if (
|
|
780
|
-
throw c(),
|
|
778
|
+
if (p instanceof Error) {
|
|
779
|
+
if (s.value = p, o = p, n)
|
|
780
|
+
throw c(), p;
|
|
781
781
|
} else
|
|
782
|
-
|
|
782
|
+
r.value = !0, s.value = void 0, o = !0, c();
|
|
783
783
|
}
|
|
784
|
-
}),
|
|
785
|
-
},
|
|
786
|
-
(
|
|
787
|
-
|
|
784
|
+
}), _ = () => {
|
|
785
|
+
}, m = new Proxy(
|
|
786
|
+
(a) => {
|
|
787
|
+
s.value = a;
|
|
788
788
|
},
|
|
789
789
|
{
|
|
790
|
-
apply: function(
|
|
791
|
-
|
|
790
|
+
apply: function(a, u, i) {
|
|
791
|
+
a(...i), _(...i);
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
794
|
);
|
|
795
795
|
return {
|
|
796
|
-
promise: new Promise((
|
|
797
|
-
if (n &&
|
|
798
|
-
|
|
796
|
+
promise: new Promise((a, u) => {
|
|
797
|
+
if (n && o instanceof Error) {
|
|
798
|
+
u(o);
|
|
799
799
|
return;
|
|
800
|
-
} else if (
|
|
801
|
-
|
|
800
|
+
} else if (o === !0) {
|
|
801
|
+
a();
|
|
802
802
|
return;
|
|
803
803
|
}
|
|
804
|
-
let
|
|
805
|
-
t && (
|
|
806
|
-
const
|
|
807
|
-
|
|
804
|
+
let i;
|
|
805
|
+
t && (i = setTimeout(() => {
|
|
806
|
+
const p = new Error("timeout!");
|
|
807
|
+
s.value = p, n && u(p);
|
|
808
808
|
}, t)), c = () => {
|
|
809
|
-
|
|
809
|
+
i && (clearTimeout(i), i = void 0), a();
|
|
810
810
|
};
|
|
811
811
|
}),
|
|
812
812
|
callback: g,
|
|
813
|
-
onError:
|
|
814
|
-
resolved:
|
|
815
|
-
error:
|
|
813
|
+
onError: m,
|
|
814
|
+
resolved: Be(() => r.value),
|
|
815
|
+
error: Be(() => s.value)
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
return
|
|
818
|
+
function Ge() {
|
|
819
|
+
return jt();
|
|
820
820
|
}
|
|
821
|
-
function
|
|
822
|
-
const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(),
|
|
821
|
+
function At() {
|
|
822
|
+
const e = {}, n = {}, t = /* @__PURE__ */ new WeakMap(), s = {};
|
|
823
823
|
return Object.freeze({
|
|
824
|
-
registerAgg(
|
|
825
|
-
if (
|
|
824
|
+
registerAgg(o) {
|
|
825
|
+
if (o.isInitialized.value)
|
|
826
826
|
throw new Error("Agg must register before initialized");
|
|
827
|
-
if (o
|
|
827
|
+
if (s[o.__id])
|
|
828
828
|
throw new Error("Agg already registered");
|
|
829
|
-
|
|
830
|
-
delete o
|
|
831
|
-
}), o
|
|
832
|
-
const
|
|
829
|
+
o.type === "MultiInstance" && o.api.events.destroyed.watchPublish(() => {
|
|
830
|
+
delete s[o.__id];
|
|
831
|
+
}), s[o.__id] = o;
|
|
832
|
+
const r = [];
|
|
833
833
|
for (const c of Object.values(e))
|
|
834
|
-
c.mount({ api:
|
|
834
|
+
c.mount({ api: o.api, __aggId: o.__id, isInitialized: o.isInitialized });
|
|
835
835
|
for (const c of Object.values(n))
|
|
836
|
-
c.mount({ api:
|
|
837
|
-
t.set(
|
|
836
|
+
c.mount({ api: o.api, __aggId: o.__id }), r.push(c.__id);
|
|
837
|
+
t.set(o, r);
|
|
838
838
|
},
|
|
839
|
-
createSetupPlugin(
|
|
840
|
-
let
|
|
841
|
-
return
|
|
842
|
-
__id:
|
|
839
|
+
createSetupPlugin(o) {
|
|
840
|
+
let r;
|
|
841
|
+
return o instanceof Function ? r = o() : r = o, Object.freeze({
|
|
842
|
+
__id: Ge(),
|
|
843
843
|
type: "Setup",
|
|
844
844
|
mount(c) {
|
|
845
845
|
if (c.isInitialized.value)
|
|
846
846
|
throw new Error("Can not setup after initialized");
|
|
847
|
-
|
|
847
|
+
r.mount({ api: c.api, __aggId: c.__aggId });
|
|
848
848
|
}
|
|
849
849
|
});
|
|
850
850
|
},
|
|
851
|
-
createHotSwapPlugin(
|
|
852
|
-
let
|
|
853
|
-
return
|
|
854
|
-
__id:
|
|
851
|
+
createHotSwapPlugin(o) {
|
|
852
|
+
let r;
|
|
853
|
+
return o instanceof Function ? r = o() : r = o, Object.freeze({
|
|
854
|
+
__id: Ge(),
|
|
855
855
|
type: "HotSwap",
|
|
856
|
-
mount:
|
|
857
|
-
unmount:
|
|
856
|
+
mount: r.mount,
|
|
857
|
+
unmount: r.unmount
|
|
858
858
|
});
|
|
859
859
|
},
|
|
860
|
-
registerPlugin(
|
|
861
|
-
if (
|
|
862
|
-
if (e[
|
|
860
|
+
registerPlugin(o) {
|
|
861
|
+
if (o.type === "Setup") {
|
|
862
|
+
if (e[o.__id])
|
|
863
863
|
throw new Error("Plugin already registered");
|
|
864
|
-
e[
|
|
865
|
-
for (const
|
|
866
|
-
|
|
867
|
-
api:
|
|
868
|
-
__aggId:
|
|
869
|
-
isInitialized:
|
|
864
|
+
e[o.__id] = o;
|
|
865
|
+
for (const r in s)
|
|
866
|
+
o.mount({
|
|
867
|
+
api: s[r].api,
|
|
868
|
+
__aggId: s[r].__id,
|
|
869
|
+
isInitialized: s[r].isInitialized
|
|
870
870
|
});
|
|
871
|
-
} else if (
|
|
872
|
-
n[
|
|
873
|
-
for (const
|
|
874
|
-
t.has(
|
|
871
|
+
} else if (o.type === "HotSwap") {
|
|
872
|
+
n[o.__id] = o;
|
|
873
|
+
for (const r in s)
|
|
874
|
+
t.has(s[r]) && !t.get(s[r]).includes(o.__id) && (o.mount({ api: s[r].api, __aggId: s[r].__id }), t.get(s[r]).push(o.__id));
|
|
875
875
|
} else
|
|
876
|
-
isNever(
|
|
876
|
+
isNever(o);
|
|
877
877
|
},
|
|
878
|
-
unregisterPlugin(
|
|
879
|
-
if (
|
|
878
|
+
unregisterPlugin(o) {
|
|
879
|
+
if (o.type === "Setup")
|
|
880
880
|
throw new Error("Can not unregister setup plugin");
|
|
881
|
-
if (
|
|
882
|
-
for (const
|
|
883
|
-
t.has(
|
|
884
|
-
delete n[
|
|
881
|
+
if (o.type === "HotSwap") {
|
|
882
|
+
for (const r in s)
|
|
883
|
+
t.has(s[r]) && t.get(s[r]).includes(o.__id) && o.unmount({ api: s[r].api, __aggId: s[r].__id });
|
|
884
|
+
delete n[o.__id];
|
|
885
885
|
} else
|
|
886
|
-
isNever(
|
|
886
|
+
isNever(o);
|
|
887
887
|
}
|
|
888
888
|
});
|
|
889
889
|
}
|
|
890
|
-
function
|
|
891
|
-
return
|
|
890
|
+
function It(e) {
|
|
891
|
+
return At();
|
|
892
892
|
}
|
|
893
893
|
function Ot(e) {
|
|
894
|
-
const n =
|
|
895
|
-
return
|
|
894
|
+
const n = xt(e);
|
|
895
|
+
return he({
|
|
896
896
|
states: n.states,
|
|
897
897
|
commands: n.commands,
|
|
898
898
|
events: n.events
|
|
899
899
|
});
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function xt(e) {
|
|
902
902
|
const n = e.states;
|
|
903
903
|
for (const c of Object.keys(e.states))
|
|
904
|
-
n[c] =
|
|
905
|
-
const t =
|
|
904
|
+
n[c] = ge(n[c]);
|
|
905
|
+
const t = he(e.states), s = ge(e.commands), o = {}, r = e.events;
|
|
906
906
|
for (const c in e.events)
|
|
907
|
-
|
|
908
|
-
return
|
|
907
|
+
o[c] = r[c].api;
|
|
908
|
+
return he({
|
|
909
909
|
states: t,
|
|
910
|
-
commands:
|
|
911
|
-
events:
|
|
910
|
+
commands: s,
|
|
911
|
+
events: he(o),
|
|
912
912
|
destroy: e.destroy
|
|
913
913
|
});
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function Tt(e) {
|
|
916
916
|
const {
|
|
917
917
|
callback: n,
|
|
918
918
|
onError: t,
|
|
919
|
-
promise:
|
|
920
|
-
resolved:
|
|
921
|
-
} =
|
|
919
|
+
promise: s,
|
|
920
|
+
resolved: o
|
|
921
|
+
} = St(() => {
|
|
922
922
|
}, !1, 5e3);
|
|
923
|
-
function
|
|
924
|
-
if (
|
|
923
|
+
function r(u) {
|
|
924
|
+
if (o.value === !0)
|
|
925
925
|
throw new Error("Agg already initialized");
|
|
926
|
-
c.push(
|
|
926
|
+
c.push(u());
|
|
927
927
|
}
|
|
928
928
|
const c = [], g = e({
|
|
929
|
-
onCreated(
|
|
930
|
-
Promise.resolve().then(
|
|
929
|
+
onCreated(u) {
|
|
930
|
+
Promise.resolve().then(u);
|
|
931
931
|
},
|
|
932
|
-
onBeforeInitialize:
|
|
933
|
-
isInitialized:
|
|
934
|
-
untilInitialized:
|
|
932
|
+
onBeforeInitialize: r,
|
|
933
|
+
isInitialized: Be(() => o.value),
|
|
934
|
+
untilInitialized: s
|
|
935
935
|
});
|
|
936
936
|
setTimeout(
|
|
937
937
|
() => Promise.all(c).then(() => {
|
|
938
938
|
n();
|
|
939
|
-
}).catch((
|
|
940
|
-
t(
|
|
939
|
+
}).catch((u) => {
|
|
940
|
+
t(u);
|
|
941
941
|
}),
|
|
942
942
|
0
|
|
943
943
|
);
|
|
944
|
-
const
|
|
944
|
+
const _ = g.states || {}, m = g.commands || {}, a = g.events || {};
|
|
945
945
|
return {
|
|
946
|
-
__id:
|
|
946
|
+
__id: Ge(),
|
|
947
947
|
type: "Singleton",
|
|
948
948
|
api: Ot({
|
|
949
|
-
states:
|
|
950
|
-
commands:
|
|
951
|
-
events:
|
|
949
|
+
states: _,
|
|
950
|
+
commands: m,
|
|
951
|
+
events: a,
|
|
952
952
|
destroy: () => {
|
|
953
953
|
}
|
|
954
954
|
}),
|
|
955
|
-
isInitialized:
|
|
955
|
+
isInitialized: o,
|
|
956
956
|
async untilInitialized() {
|
|
957
|
-
return await
|
|
958
|
-
throw new Error(`Failed to initialize Agg: ${
|
|
959
|
-
Stack : ${
|
|
957
|
+
return await s.catch((u) => {
|
|
958
|
+
throw new Error(`Failed to initialize Agg: ${u.message}
|
|
959
|
+
Stack : ${u.stack || "unkown"}`);
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
let
|
|
965
|
-
function
|
|
966
|
-
return
|
|
967
|
-
const n =
|
|
968
|
-
let
|
|
964
|
+
let fe;
|
|
965
|
+
function Pt(e) {
|
|
966
|
+
return Tt(() => {
|
|
967
|
+
const n = _e(e), t = _e({});
|
|
968
|
+
let s = () => [], o = () => [], r = () => [], c = () => [], g = () => [], _ = () => [], m = () => [];
|
|
969
969
|
return {
|
|
970
970
|
states: {
|
|
971
971
|
designer: n,
|
|
@@ -973,126 +973,126 @@ function xt(e) {
|
|
|
973
973
|
},
|
|
974
974
|
commands: {
|
|
975
975
|
genCodeFiles() {
|
|
976
|
-
return
|
|
976
|
+
return m();
|
|
977
977
|
},
|
|
978
978
|
clearCaches() {
|
|
979
979
|
},
|
|
980
|
-
setContext(
|
|
981
|
-
t.value =
|
|
980
|
+
setContext(a) {
|
|
981
|
+
t.value = a;
|
|
982
982
|
},
|
|
983
|
-
setDomainDesigner(
|
|
984
|
-
this.clearCaches(), n.value =
|
|
983
|
+
setDomainDesigner(a) {
|
|
984
|
+
this.clearCaches(), n.value = a;
|
|
985
985
|
},
|
|
986
|
-
_genInfoCode(...
|
|
987
|
-
return
|
|
986
|
+
_genInfoCode(...a) {
|
|
987
|
+
return s(...a);
|
|
988
988
|
},
|
|
989
|
-
_setInfoCodeProvider(
|
|
990
|
-
|
|
989
|
+
_setInfoCodeProvider(a) {
|
|
990
|
+
s = a;
|
|
991
991
|
},
|
|
992
|
-
_genCommandCode(...
|
|
993
|
-
return
|
|
992
|
+
_genCommandCode(...a) {
|
|
993
|
+
return o(...a);
|
|
994
994
|
},
|
|
995
|
-
_setCommandCodeProvider(
|
|
996
|
-
|
|
995
|
+
_setCommandCodeProvider(a) {
|
|
996
|
+
o = a;
|
|
997
997
|
},
|
|
998
|
-
_genFacadeCommandCode(...
|
|
999
|
-
return
|
|
998
|
+
_genFacadeCommandCode(...a) {
|
|
999
|
+
return r(...a);
|
|
1000
1000
|
},
|
|
1001
|
-
_setFacadeCommandCodeProvider(
|
|
1002
|
-
|
|
1001
|
+
_setFacadeCommandCodeProvider(a) {
|
|
1002
|
+
r = a;
|
|
1003
1003
|
},
|
|
1004
|
-
_genAggCode(...
|
|
1005
|
-
return c(...
|
|
1004
|
+
_genAggCode(...a) {
|
|
1005
|
+
return c(...a);
|
|
1006
1006
|
},
|
|
1007
|
-
_setAggCodeProvider(
|
|
1008
|
-
c =
|
|
1007
|
+
_setAggCodeProvider(a) {
|
|
1008
|
+
c = a;
|
|
1009
1009
|
},
|
|
1010
|
-
_genEventCode(...
|
|
1011
|
-
return g(...
|
|
1010
|
+
_genEventCode(...a) {
|
|
1011
|
+
return g(...a);
|
|
1012
1012
|
},
|
|
1013
|
-
_setEventCodeProvider(
|
|
1014
|
-
g =
|
|
1013
|
+
_setEventCodeProvider(a) {
|
|
1014
|
+
g = a;
|
|
1015
1015
|
},
|
|
1016
|
-
_genReadModelCode(...
|
|
1017
|
-
return
|
|
1016
|
+
_genReadModelCode(...a) {
|
|
1017
|
+
return _(...a);
|
|
1018
1018
|
},
|
|
1019
|
-
_setReadModelCodeProvider(
|
|
1020
|
-
|
|
1019
|
+
_setReadModelCodeProvider(a) {
|
|
1020
|
+
_ = a;
|
|
1021
1021
|
},
|
|
1022
|
-
_setCodeFileProvider(
|
|
1023
|
-
|
|
1022
|
+
_setCodeFileProvider(a) {
|
|
1023
|
+
m = a;
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
};
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1031
|
-
if (!
|
|
1029
|
+
const pe = It();
|
|
1030
|
+
function Ao(e) {
|
|
1031
|
+
if (!fe) {
|
|
1032
1032
|
if (!e)
|
|
1033
1033
|
throw new Error("designer is required");
|
|
1034
|
-
|
|
1034
|
+
fe = Pt(e), pe.registerAgg(fe);
|
|
1035
1035
|
}
|
|
1036
|
-
return
|
|
1036
|
+
return fe.api;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Se(e) {
|
|
1039
1039
|
return e && e._attributes && e._attributes.rule === "Info";
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function Ft(e) {
|
|
1042
1042
|
return e && e._attributes && e._attributes.rule === "Agg";
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function Dt(e) {
|
|
1045
1045
|
return e && e._attributes && e._attributes.rule === "Command";
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function kt(e) {
|
|
1048
1048
|
return e && e._attributes && e._attributes.rule === "FacadeCommand";
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Vt(e) {
|
|
1051
1051
|
return e && e._attributes && e._attributes.rule === "Event";
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Rt(e) {
|
|
1054
1054
|
return e && e._attributes && e._attributes.rule === "ReadModel";
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Ue = process.env.NODE_ENV !== "production" ? Object.freeze({}) : {};
|
|
1057
1057
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
1058
|
-
const
|
|
1059
|
-
},
|
|
1060
|
-
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97),
|
|
1061
|
-
let
|
|
1062
|
-
const
|
|
1063
|
-
function
|
|
1064
|
-
if (
|
|
1058
|
+
const Ht = () => {
|
|
1059
|
+
}, Lt = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
1060
|
+
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Ae = Object.assign, F = Array.isArray, J = (e) => typeof e == "function", M = (e) => typeof e == "string", Mt = (e) => typeof e == "symbol", G = (e) => e !== null && typeof e == "object";
|
|
1061
|
+
let pn;
|
|
1062
|
+
const Ie = () => pn || (pn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
1063
|
+
function on(e) {
|
|
1064
|
+
if (F(e)) {
|
|
1065
1065
|
const n = {};
|
|
1066
1066
|
for (let t = 0; t < e.length; t++) {
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
for (const
|
|
1070
|
-
n[
|
|
1067
|
+
const s = e[t], o = M(s) ? Ut(s) : on(s);
|
|
1068
|
+
if (o)
|
|
1069
|
+
for (const r in o)
|
|
1070
|
+
n[r] = o[r];
|
|
1071
1071
|
}
|
|
1072
1072
|
return n;
|
|
1073
|
-
} else if (
|
|
1073
|
+
} else if (M(e) || G(e))
|
|
1074
1074
|
return e;
|
|
1075
1075
|
}
|
|
1076
|
-
const
|
|
1077
|
-
function
|
|
1076
|
+
const Kt = /;(?![^(]*\))/g, Bt = /:([^]+)/, Gt = /\/\*[^]*?\*\//g;
|
|
1077
|
+
function Ut(e) {
|
|
1078
1078
|
const n = {};
|
|
1079
|
-
return e.replace(
|
|
1079
|
+
return e.replace(Gt, "").split(Kt).forEach((t) => {
|
|
1080
1080
|
if (t) {
|
|
1081
|
-
const
|
|
1082
|
-
|
|
1081
|
+
const s = t.split(Bt);
|
|
1082
|
+
s.length > 1 && (n[s[0].trim()] = s[1].trim());
|
|
1083
1083
|
}
|
|
1084
1084
|
}), n;
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function sn(e) {
|
|
1087
1087
|
let n = "";
|
|
1088
|
-
if (
|
|
1088
|
+
if (M(e))
|
|
1089
1089
|
n = e;
|
|
1090
|
-
else if (
|
|
1090
|
+
else if (F(e))
|
|
1091
1091
|
for (let t = 0; t < e.length; t++) {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1092
|
+
const s = sn(e[t]);
|
|
1093
|
+
s && (n += s + " ");
|
|
1094
1094
|
}
|
|
1095
|
-
else if (
|
|
1095
|
+
else if (G(e))
|
|
1096
1096
|
for (const t in e)
|
|
1097
1097
|
e[t] && (n += t + " ");
|
|
1098
1098
|
return n.trim();
|
|
@@ -1107,25 +1107,25 @@ Symbol(
|
|
|
1107
1107
|
process.env.NODE_ENV !== "production" ? "Array iterate" : ""
|
|
1108
1108
|
);
|
|
1109
1109
|
new Set(
|
|
1110
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
1110
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Mt)
|
|
1111
1111
|
);
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1112
|
+
function Sn(e) {
|
|
1113
|
+
return ze(e) ? Sn(e.__v_raw) : !!(e && e.__v_isReactive);
|
|
1114
1114
|
}
|
|
1115
|
-
function
|
|
1115
|
+
function ze(e) {
|
|
1116
1116
|
return !!(e && e.__v_isReadonly);
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function Te(e) {
|
|
1119
1119
|
return !!(e && e.__v_isShallow);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function Je(e) {
|
|
1122
1122
|
return e ? !!e.__v_raw : !1;
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function U(e) {
|
|
1125
1125
|
const n = e && e.__v_raw;
|
|
1126
|
-
return n ?
|
|
1126
|
+
return n ? U(n) : e;
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function rn(e) {
|
|
1129
1129
|
return e ? e.__v_isRef === !0 : !1;
|
|
1130
1130
|
}
|
|
1131
1131
|
/**
|
|
@@ -1134,44 +1134,44 @@ function on(e) {
|
|
|
1134
1134
|
* @license MIT
|
|
1135
1135
|
**/
|
|
1136
1136
|
const z = [];
|
|
1137
|
-
function
|
|
1137
|
+
function zt(e) {
|
|
1138
1138
|
z.push(e);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1140
|
+
function Jt() {
|
|
1141
1141
|
z.pop();
|
|
1142
1142
|
}
|
|
1143
|
-
let
|
|
1144
|
-
function
|
|
1145
|
-
if (
|
|
1146
|
-
|
|
1147
|
-
const t = z.length ? z[z.length - 1].component : null,
|
|
1148
|
-
if (
|
|
1149
|
-
|
|
1150
|
-
|
|
1143
|
+
let Pe = !1;
|
|
1144
|
+
function ce(e, ...n) {
|
|
1145
|
+
if (Pe) return;
|
|
1146
|
+
Pe = !0;
|
|
1147
|
+
const t = z.length ? z[z.length - 1].component : null, s = t && t.appContext.config.warnHandler, o = Wt();
|
|
1148
|
+
if (s)
|
|
1149
|
+
an(
|
|
1150
|
+
s,
|
|
1151
1151
|
t,
|
|
1152
1152
|
11,
|
|
1153
1153
|
[
|
|
1154
1154
|
// eslint-disable-next-line no-restricted-syntax
|
|
1155
|
-
e + n.map((
|
|
1155
|
+
e + n.map((r) => {
|
|
1156
1156
|
var c, g;
|
|
1157
|
-
return (g = (c =
|
|
1157
|
+
return (g = (c = r.toString) == null ? void 0 : c.call(r)) != null ? g : JSON.stringify(r);
|
|
1158
1158
|
}).join(""),
|
|
1159
1159
|
t && t.proxy,
|
|
1160
|
-
|
|
1161
|
-
({ vnode:
|
|
1160
|
+
o.map(
|
|
1161
|
+
({ vnode: r }) => `at <${Mn(t, r.type)}>`
|
|
1162
1162
|
).join(`
|
|
1163
1163
|
`),
|
|
1164
|
-
|
|
1164
|
+
o
|
|
1165
1165
|
]
|
|
1166
1166
|
);
|
|
1167
1167
|
else {
|
|
1168
|
-
const
|
|
1169
|
-
|
|
1170
|
-
`, ...
|
|
1168
|
+
const r = [`[Vue warn]: ${e}`, ...n];
|
|
1169
|
+
o.length && r.push(`
|
|
1170
|
+
`, ...qt(o));
|
|
1171
1171
|
}
|
|
1172
|
-
|
|
1172
|
+
Pe = !1;
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Wt() {
|
|
1175
1175
|
let e = z[z.length - 1];
|
|
1176
1176
|
if (!e)
|
|
1177
1177
|
return [];
|
|
@@ -1182,36 +1182,36 @@ function Gt() {
|
|
|
1182
1182
|
vnode: e,
|
|
1183
1183
|
recurseCount: 0
|
|
1184
1184
|
});
|
|
1185
|
-
const
|
|
1186
|
-
e =
|
|
1185
|
+
const s = e.component && e.component.parent;
|
|
1186
|
+
e = s && s.vnode;
|
|
1187
1187
|
}
|
|
1188
1188
|
return n;
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function qt(e) {
|
|
1191
1191
|
const n = [];
|
|
1192
|
-
return e.forEach((t,
|
|
1193
|
-
n.push(...
|
|
1194
|
-
`], ...
|
|
1192
|
+
return e.forEach((t, s) => {
|
|
1193
|
+
n.push(...s === 0 ? [] : [`
|
|
1194
|
+
`], ...Yt(t));
|
|
1195
1195
|
}), n;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
const t = n > 0 ? `... (${n} recursive calls)` : "",
|
|
1197
|
+
function Yt({ vnode: e, recurseCount: n }) {
|
|
1198
|
+
const t = n > 0 ? `... (${n} recursive calls)` : "", s = e.component ? e.component.parent == null : !1, o = ` at <${Mn(
|
|
1199
1199
|
e.component,
|
|
1200
1200
|
e.type,
|
|
1201
|
-
|
|
1202
|
-
)}`,
|
|
1203
|
-
return e.props ? [
|
|
1201
|
+
s
|
|
1202
|
+
)}`, r = ">" + t;
|
|
1203
|
+
return e.props ? [o, ...Zt(e.props), r] : [o + r];
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Zt(e) {
|
|
1206
1206
|
const n = [], t = Object.keys(e);
|
|
1207
|
-
return t.slice(0, 3).forEach((
|
|
1208
|
-
n.push(...
|
|
1207
|
+
return t.slice(0, 3).forEach((s) => {
|
|
1208
|
+
n.push(...An(s, e[s]));
|
|
1209
1209
|
}), t.length > 3 && n.push(" ..."), n;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return
|
|
1211
|
+
function An(e, n, t) {
|
|
1212
|
+
return M(n) ? (n = JSON.stringify(n), t ? n : [`${e}=${n}`]) : typeof n == "number" || typeof n == "boolean" || n == null ? t ? n : [`${e}=${n}`] : rn(n) ? (n = An(e, U(n.value), !0), t ? n : [`${e}=Ref<`, n, ">"]) : J(n) ? [`${e}=fn${n.name ? `<${n.name}>` : ""}`] : (n = U(n), t ? n : [`${e}=`, n]);
|
|
1213
1213
|
}
|
|
1214
|
-
const
|
|
1214
|
+
const In = {
|
|
1215
1215
|
sp: "serverPrefetch hook",
|
|
1216
1216
|
bc: "beforeCreate hook",
|
|
1217
1217
|
c: "created hook",
|
|
@@ -1244,101 +1244,101 @@ const jn = {
|
|
|
1244
1244
|
15: "component update",
|
|
1245
1245
|
16: "app unmount cleanup function"
|
|
1246
1246
|
};
|
|
1247
|
-
function
|
|
1247
|
+
function an(e, n, t, s) {
|
|
1248
1248
|
try {
|
|
1249
|
-
return
|
|
1250
|
-
} catch (
|
|
1251
|
-
On(
|
|
1249
|
+
return s ? e(...s) : e();
|
|
1250
|
+
} catch (o) {
|
|
1251
|
+
On(o, n, t);
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
|
-
function On(e, n, t,
|
|
1255
|
-
const
|
|
1254
|
+
function On(e, n, t, s = !0) {
|
|
1255
|
+
const o = n ? n.vnode : null, { errorHandler: r, throwUnhandledErrorInProduction: c } = n && n.appContext.config || Ue;
|
|
1256
1256
|
if (n) {
|
|
1257
1257
|
let g = n.parent;
|
|
1258
|
-
const
|
|
1258
|
+
const _ = n.proxy, m = process.env.NODE_ENV !== "production" ? In[t] : `https://vuejs.org/error-reference/#runtime-${t}`;
|
|
1259
1259
|
for (; g; ) {
|
|
1260
|
-
const
|
|
1261
|
-
if (
|
|
1262
|
-
for (let
|
|
1263
|
-
if (
|
|
1260
|
+
const a = g.ec;
|
|
1261
|
+
if (a) {
|
|
1262
|
+
for (let u = 0; u < a.length; u++)
|
|
1263
|
+
if (a[u](e, _, m) === !1)
|
|
1264
1264
|
return;
|
|
1265
1265
|
}
|
|
1266
1266
|
g = g.parent;
|
|
1267
1267
|
}
|
|
1268
|
-
if (
|
|
1269
|
-
|
|
1268
|
+
if (r) {
|
|
1269
|
+
an(r, null, 10, [
|
|
1270
1270
|
e,
|
|
1271
|
-
|
|
1272
|
-
|
|
1271
|
+
_,
|
|
1272
|
+
m
|
|
1273
1273
|
]);
|
|
1274
1274
|
return;
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
|
-
|
|
1277
|
+
Xt(e, t, o, s, c);
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function Xt(e, n, t, s = !0, o = !1) {
|
|
1280
1280
|
if (process.env.NODE_ENV !== "production") {
|
|
1281
|
-
const
|
|
1282
|
-
if (t &&
|
|
1281
|
+
const r = In[n];
|
|
1282
|
+
if (t && zt(t), ce(`Unhandled error${r ? ` during execution of ${r}` : ""}`), t && Jt(), s)
|
|
1283
1283
|
throw e;
|
|
1284
|
-
} else if (
|
|
1284
|
+
} else if (o)
|
|
1285
1285
|
throw e;
|
|
1286
1286
|
}
|
|
1287
|
-
const
|
|
1288
|
-
let
|
|
1289
|
-
const
|
|
1290
|
-
let
|
|
1291
|
-
const
|
|
1292
|
-
let
|
|
1293
|
-
const
|
|
1294
|
-
function
|
|
1295
|
-
let n =
|
|
1287
|
+
const P = [];
|
|
1288
|
+
let k = -1;
|
|
1289
|
+
const Q = [];
|
|
1290
|
+
let V = null, q = 0;
|
|
1291
|
+
const Qt = /* @__PURE__ */ Promise.resolve();
|
|
1292
|
+
let We = null;
|
|
1293
|
+
const eo = 100;
|
|
1294
|
+
function no(e) {
|
|
1295
|
+
let n = k + 1, t = P.length;
|
|
1296
1296
|
for (; n < t; ) {
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1297
|
+
const s = n + t >>> 1, o = P[s], r = ue(o);
|
|
1298
|
+
r < e || r === e && o.flags & 2 ? n = s + 1 : t = s;
|
|
1299
1299
|
}
|
|
1300
1300
|
return n;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function to(e) {
|
|
1303
1303
|
if (!(e.flags & 1)) {
|
|
1304
|
-
const n =
|
|
1304
|
+
const n = ue(e), t = P[P.length - 1];
|
|
1305
1305
|
!t || // fast path when the job id is larger than the tail
|
|
1306
|
-
!(e.flags & 2) && n >=
|
|
1306
|
+
!(e.flags & 2) && n >= ue(t) ? P.push(e) : P.splice(no(n), 0, e), e.flags |= 1, xn();
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
|
|
1309
|
+
function xn() {
|
|
1310
|
+
We || (We = Qt.then(Tn));
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1313
|
-
|
|
1312
|
+
function oo(e) {
|
|
1313
|
+
F(e) ? Q.push(...e) : V && e.id === -1 ? V.splice(q + 1, 0, e) : e.flags & 1 || (Q.push(e), e.flags |= 1), xn();
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
if (
|
|
1317
|
-
const n = [...new Set(
|
|
1318
|
-
(t,
|
|
1315
|
+
function so(e) {
|
|
1316
|
+
if (Q.length) {
|
|
1317
|
+
const n = [...new Set(Q)].sort(
|
|
1318
|
+
(t, s) => ue(t) - ue(s)
|
|
1319
1319
|
);
|
|
1320
|
-
if (
|
|
1321
|
-
|
|
1320
|
+
if (Q.length = 0, V) {
|
|
1321
|
+
V.push(...n);
|
|
1322
1322
|
return;
|
|
1323
1323
|
}
|
|
1324
|
-
for (
|
|
1325
|
-
const t =
|
|
1326
|
-
process.env.NODE_ENV !== "production" &&
|
|
1324
|
+
for (V = n, process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), q = 0; q < V.length; q++) {
|
|
1325
|
+
const t = V[q];
|
|
1326
|
+
process.env.NODE_ENV !== "production" && Pn(e, t) || (t.flags & 4 && (t.flags &= -2), t.flags & 8 || t(), t.flags &= -2);
|
|
1327
1327
|
}
|
|
1328
|
-
|
|
1328
|
+
V = null, q = 0;
|
|
1329
1329
|
}
|
|
1330
1330
|
}
|
|
1331
|
-
const
|
|
1332
|
-
function
|
|
1331
|
+
const ue = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
|
|
1332
|
+
function Tn(e) {
|
|
1333
1333
|
process.env.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
|
|
1334
|
-
const n = process.env.NODE_ENV !== "production" ? (t) =>
|
|
1334
|
+
const n = process.env.NODE_ENV !== "production" ? (t) => Pn(e, t) : Ht;
|
|
1335
1335
|
try {
|
|
1336
|
-
for (
|
|
1337
|
-
const t =
|
|
1336
|
+
for (k = 0; k < P.length; k++) {
|
|
1337
|
+
const t = P[k];
|
|
1338
1338
|
if (t && !(t.flags & 8)) {
|
|
1339
1339
|
if (process.env.NODE_ENV !== "production" && n(t))
|
|
1340
1340
|
continue;
|
|
1341
|
-
t.flags & 4 && (t.flags &= -2),
|
|
1341
|
+
t.flags & 4 && (t.flags &= -2), an(
|
|
1342
1342
|
t,
|
|
1343
1343
|
t.i,
|
|
1344
1344
|
t.i ? 15 : 14
|
|
@@ -1346,69 +1346,69 @@ function In(e) {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
1348
|
} finally {
|
|
1349
|
-
for (;
|
|
1350
|
-
const t =
|
|
1349
|
+
for (; k < P.length; k++) {
|
|
1350
|
+
const t = P[k];
|
|
1351
1351
|
t && (t.flags &= -2);
|
|
1352
1352
|
}
|
|
1353
|
-
|
|
1353
|
+
k = -1, P.length = 0, so(e), We = null, (P.length || Q.length) && Tn(e);
|
|
1354
1354
|
}
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Pn(e, n) {
|
|
1357
1357
|
const t = e.get(n) || 0;
|
|
1358
|
-
if (t >
|
|
1359
|
-
const
|
|
1358
|
+
if (t > eo) {
|
|
1359
|
+
const s = n.i, o = s && Ln(s.type);
|
|
1360
1360
|
return On(
|
|
1361
|
-
`Maximum recursive updates exceeded${
|
|
1361
|
+
`Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
|
|
1362
1362
|
null,
|
|
1363
1363
|
10
|
|
1364
1364
|
), !0;
|
|
1365
1365
|
}
|
|
1366
1366
|
return e.set(n, t + 1), !1;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
process.env.NODE_ENV !== "production" && (
|
|
1370
|
-
createRecord:
|
|
1371
|
-
rerender:
|
|
1372
|
-
reload:
|
|
1368
|
+
const Fe = /* @__PURE__ */ new Map();
|
|
1369
|
+
process.env.NODE_ENV !== "production" && (Ie().__VUE_HMR_RUNTIME__ = {
|
|
1370
|
+
createRecord: De(ro),
|
|
1371
|
+
rerender: De(ao),
|
|
1372
|
+
reload: De(io)
|
|
1373
1373
|
});
|
|
1374
|
-
const
|
|
1375
|
-
function
|
|
1376
|
-
return
|
|
1377
|
-
initialDef:
|
|
1374
|
+
const Ce = /* @__PURE__ */ new Map();
|
|
1375
|
+
function ro(e, n) {
|
|
1376
|
+
return Ce.has(e) ? !1 : (Ce.set(e, {
|
|
1377
|
+
initialDef: $e(n),
|
|
1378
1378
|
instances: /* @__PURE__ */ new Set()
|
|
1379
1379
|
}), !0);
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
return
|
|
1381
|
+
function $e(e) {
|
|
1382
|
+
return Kn(e) ? e.__vccOpts : e;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
const t =
|
|
1386
|
-
t && (t.initialDef.render = n, [...t.instances].forEach((
|
|
1387
|
-
n && (
|
|
1384
|
+
function ao(e, n) {
|
|
1385
|
+
const t = Ce.get(e);
|
|
1386
|
+
t && (t.initialDef.render = n, [...t.instances].forEach((s) => {
|
|
1387
|
+
n && (s.render = n, $e(s.type).render = n), s.renderCache = [], s.update();
|
|
1388
1388
|
}));
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1391
|
-
const t =
|
|
1390
|
+
function io(e, n) {
|
|
1391
|
+
const t = Ce.get(e);
|
|
1392
1392
|
if (!t) return;
|
|
1393
|
-
n =
|
|
1394
|
-
const
|
|
1395
|
-
for (let
|
|
1396
|
-
const
|
|
1397
|
-
let g =
|
|
1398
|
-
g || (c !== t.initialDef &&
|
|
1399
|
-
|
|
1400
|
-
}) :
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1393
|
+
n = $e(n), dn(t.initialDef, n);
|
|
1394
|
+
const s = [...t.instances];
|
|
1395
|
+
for (let o = 0; o < s.length; o++) {
|
|
1396
|
+
const r = s[o], c = $e(r.type);
|
|
1397
|
+
let g = Fe.get(c);
|
|
1398
|
+
g || (c !== t.initialDef && dn(c, n), Fe.set(c, g = /* @__PURE__ */ new Set())), g.add(r), r.appContext.propsCache.delete(r.type), r.appContext.emitsCache.delete(r.type), r.appContext.optionsCache.delete(r.type), r.ceReload ? (g.add(r), r.ceReload(n.styles), g.delete(r)) : r.parent ? to(() => {
|
|
1399
|
+
r.parent.update(), g.delete(r);
|
|
1400
|
+
}) : r.appContext.reload ? r.appContext.reload() : typeof window < "u" && window.location.reload(), r.root.ce && r !== r.root && r.root.ce._removeChildStyle(c);
|
|
1401
|
+
}
|
|
1402
|
+
oo(() => {
|
|
1403
|
+
Fe.clear();
|
|
1404
1404
|
});
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
|
|
1406
|
+
function dn(e, n) {
|
|
1407
|
+
Ae(e, n);
|
|
1408
1408
|
for (const t in e)
|
|
1409
1409
|
t !== "__file" && !(t in n) && delete e[t];
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function De(e) {
|
|
1412
1412
|
return (n, t) => {
|
|
1413
1413
|
try {
|
|
1414
1414
|
return e(n, t);
|
|
@@ -1416,35 +1416,35 @@ function Pe(e) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
};
|
|
1418
1418
|
}
|
|
1419
|
-
let
|
|
1420
|
-
const
|
|
1421
|
-
function
|
|
1422
|
-
e.shapeFlag & 6 && e.component ? (e.transition = n,
|
|
1419
|
+
let be = null, co = null;
|
|
1420
|
+
const uo = (e) => e.__isTeleport;
|
|
1421
|
+
function Fn(e, n) {
|
|
1422
|
+
e.shapeFlag & 6 && e.component ? (e.transition = n, Fn(e.component.subTree, n)) : e.shapeFlag & 128 ? (e.ssContent.transition = n.clone(e.ssContent), e.ssFallback.transition = n.clone(e.ssFallback)) : e.transition = n;
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
const
|
|
1424
|
+
Ie().requestIdleCallback;
|
|
1425
|
+
Ie().cancelIdleCallback;
|
|
1426
|
+
const lo = Symbol.for("v-ndc");
|
|
1427
1427
|
process.env.NODE_ENV;
|
|
1428
|
-
const
|
|
1429
|
-
function
|
|
1428
|
+
const po = {}, Dn = (e) => Object.getPrototypeOf(e) === po, mo = (e) => e.__isSuspense, kn = Symbol.for("v-fgt"), fo = Symbol.for("v-txt"), ho = Symbol.for("v-cmt");
|
|
1429
|
+
function vo(e) {
|
|
1430
1430
|
return e ? e.__v_isVNode === !0 : !1;
|
|
1431
1431
|
}
|
|
1432
|
-
const
|
|
1432
|
+
const go = (...e) => Rn(
|
|
1433
1433
|
...e
|
|
1434
|
-
),
|
|
1434
|
+
), Vn = ({ key: e }) => e ?? null, ve = ({
|
|
1435
1435
|
ref: e,
|
|
1436
1436
|
ref_key: n,
|
|
1437
1437
|
ref_for: t
|
|
1438
|
-
}) => (typeof e == "number" && (e = "" + e), e != null ?
|
|
1439
|
-
function
|
|
1440
|
-
const
|
|
1438
|
+
}) => (typeof e == "number" && (e = "" + e), e != null ? M(e) || rn(e) || J(e) ? { i: be, r: e, k: n, f: !!t } : e : null);
|
|
1439
|
+
function _o(e, n = null, t = null, s = 0, o = null, r = e === kn ? 0 : 1, c = !1, g = !1) {
|
|
1440
|
+
const _ = {
|
|
1441
1441
|
__v_isVNode: !0,
|
|
1442
1442
|
__v_skip: !0,
|
|
1443
1443
|
type: e,
|
|
1444
1444
|
props: n,
|
|
1445
|
-
key: n &&
|
|
1446
|
-
ref: n &&
|
|
1447
|
-
scopeId:
|
|
1445
|
+
key: n && Vn(n),
|
|
1446
|
+
ref: n && ve(n),
|
|
1447
|
+
scopeId: co,
|
|
1448
1448
|
slotScopeIds: null,
|
|
1449
1449
|
children: t,
|
|
1450
1450
|
component: null,
|
|
@@ -1459,67 +1459,67 @@ function go(e, n = null, t = null, o = 0, s = null, a = e === Tn ? 0 : 1, c = !1
|
|
|
1459
1459
|
targetStart: null,
|
|
1460
1460
|
targetAnchor: null,
|
|
1461
1461
|
staticCount: 0,
|
|
1462
|
-
shapeFlag:
|
|
1463
|
-
patchFlag:
|
|
1464
|
-
dynamicProps:
|
|
1462
|
+
shapeFlag: r,
|
|
1463
|
+
patchFlag: s,
|
|
1464
|
+
dynamicProps: o,
|
|
1465
1465
|
dynamicChildren: null,
|
|
1466
1466
|
appContext: null,
|
|
1467
|
-
ctx:
|
|
1467
|
+
ctx: be
|
|
1468
1468
|
};
|
|
1469
|
-
return g ? (
|
|
1469
|
+
return g ? (cn(_, t), r & 128 && e.normalize(_)) : t && (_.shapeFlag |= M(t) ? 8 : 16), process.env.NODE_ENV !== "production" && _.key !== _.key && ce("VNode created with invalid key (NaN). VNode type:", _.type), _;
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1472
|
-
function
|
|
1473
|
-
if ((!e || e ===
|
|
1474
|
-
const g =
|
|
1471
|
+
const Co = process.env.NODE_ENV !== "production" ? go : Rn;
|
|
1472
|
+
function Rn(e, n = null, t = null, s = 0, o = null, r = !1) {
|
|
1473
|
+
if ((!e || e === lo) && (process.env.NODE_ENV !== "production" && !e && ce(`Invalid vnode type when creating vnode: ${e}.`), e = ho), vo(e)) {
|
|
1474
|
+
const g = we(
|
|
1475
1475
|
e,
|
|
1476
1476
|
n,
|
|
1477
1477
|
!0
|
|
1478
1478
|
/* mergeRef: true */
|
|
1479
1479
|
);
|
|
1480
|
-
return t &&
|
|
1480
|
+
return t && cn(g, t), g.patchFlag = -2, g;
|
|
1481
1481
|
}
|
|
1482
|
-
if (
|
|
1483
|
-
n =
|
|
1484
|
-
let { class: g, style:
|
|
1485
|
-
g && !
|
|
1482
|
+
if (Kn(e) && (e = e.__vccOpts), n) {
|
|
1483
|
+
n = $o(n);
|
|
1484
|
+
let { class: g, style: _ } = n;
|
|
1485
|
+
g && !M(g) && (n.class = sn(g)), G(_) && (Je(_) && !F(_) && (_ = Ae({}, _)), n.style = on(_));
|
|
1486
1486
|
}
|
|
1487
|
-
const c =
|
|
1488
|
-
return process.env.NODE_ENV !== "production" && c & 4 &&
|
|
1487
|
+
const c = M(e) ? 1 : mo(e) ? 128 : uo(e) ? 64 : G(e) ? 4 : J(e) ? 2 : 0;
|
|
1488
|
+
return process.env.NODE_ENV !== "production" && c & 4 && Je(e) && (e = U(e), ce(
|
|
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: `,
|
|
1492
1492
|
e
|
|
1493
|
-
)),
|
|
1493
|
+
)), _o(
|
|
1494
1494
|
e,
|
|
1495
1495
|
n,
|
|
1496
1496
|
t,
|
|
1497
|
-
o,
|
|
1498
1497
|
s,
|
|
1498
|
+
o,
|
|
1499
1499
|
c,
|
|
1500
|
-
|
|
1500
|
+
r,
|
|
1501
1501
|
!0
|
|
1502
1502
|
);
|
|
1503
1503
|
}
|
|
1504
|
-
function
|
|
1505
|
-
return e ?
|
|
1504
|
+
function $o(e) {
|
|
1505
|
+
return e ? Je(e) || Dn(e) ? Ae({}, e) : e : null;
|
|
1506
1506
|
}
|
|
1507
|
-
function
|
|
1508
|
-
const { props:
|
|
1507
|
+
function we(e, n, t = !1, s = !1) {
|
|
1508
|
+
const { props: o, ref: r, patchFlag: c, children: g, transition: _ } = e, m = n ? wo(o || {}, n) : o, a = {
|
|
1509
1509
|
__v_isVNode: !0,
|
|
1510
1510
|
__v_skip: !0,
|
|
1511
1511
|
type: e.type,
|
|
1512
|
-
props:
|
|
1513
|
-
key:
|
|
1512
|
+
props: m,
|
|
1513
|
+
key: m && Vn(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
|
|
1517
1517
|
// the refs so the single vnode can be set on multiple refs
|
|
1518
|
-
t &&
|
|
1519
|
-
) :
|
|
1518
|
+
t && r ? F(r) ? r.concat(ve(n)) : [r, ve(n)] : ve(n)
|
|
1519
|
+
) : r,
|
|
1520
1520
|
scopeId: e.scopeId,
|
|
1521
1521
|
slotScopeIds: e.slotScopeIds,
|
|
1522
|
-
children: process.env.NODE_ENV !== "production" && c === -1 &&
|
|
1522
|
+
children: process.env.NODE_ENV !== "production" && c === -1 && F(g) ? g.map(Hn) : g,
|
|
1523
1523
|
target: e.target,
|
|
1524
1524
|
targetStart: e.targetStart,
|
|
1525
1525
|
targetAnchor: e.targetAnchor,
|
|
@@ -1529,75 +1529,75 @@ function $e(e, n, t = !1, o = !1) {
|
|
|
1529
1529
|
// existing patch flag to be reliable and need to add the FULL_PROPS flag.
|
|
1530
1530
|
// note: preserve flag for fragments since they use the flag for children
|
|
1531
1531
|
// fast paths only.
|
|
1532
|
-
patchFlag: n && e.type !==
|
|
1532
|
+
patchFlag: n && e.type !== kn ? c === -1 ? 16 : c | 16 : c,
|
|
1533
1533
|
dynamicProps: e.dynamicProps,
|
|
1534
1534
|
dynamicChildren: e.dynamicChildren,
|
|
1535
1535
|
appContext: e.appContext,
|
|
1536
1536
|
dirs: e.dirs,
|
|
1537
|
-
transition:
|
|
1537
|
+
transition: _,
|
|
1538
1538
|
// These should technically only be non-null on mounted VNodes. However,
|
|
1539
1539
|
// they *should* be copied for kept-alive vnodes. So we just always copy
|
|
1540
1540
|
// them since them being non-null during a mount doesn't affect the logic as
|
|
1541
1541
|
// they will simply be overwritten.
|
|
1542
1542
|
component: e.component,
|
|
1543
1543
|
suspense: e.suspense,
|
|
1544
|
-
ssContent: e.ssContent &&
|
|
1545
|
-
ssFallback: e.ssFallback &&
|
|
1544
|
+
ssContent: e.ssContent && we(e.ssContent),
|
|
1545
|
+
ssFallback: e.ssFallback && we(e.ssFallback),
|
|
1546
1546
|
el: e.el,
|
|
1547
1547
|
anchor: e.anchor,
|
|
1548
1548
|
ctx: e.ctx,
|
|
1549
1549
|
ce: e.ce
|
|
1550
1550
|
};
|
|
1551
|
-
return
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
),
|
|
1551
|
+
return _ && s && Fn(
|
|
1552
|
+
a,
|
|
1553
|
+
_.clone(a)
|
|
1554
|
+
), a;
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1557
|
-
const n =
|
|
1558
|
-
return
|
|
1556
|
+
function Hn(e) {
|
|
1557
|
+
const n = we(e);
|
|
1558
|
+
return F(e.children) && (n.children = e.children.map(Hn)), n;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1560
|
+
function bo(e = " ", n = 0) {
|
|
1561
|
+
return Co(fo, null, e, n);
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function cn(e, n) {
|
|
1564
1564
|
let t = 0;
|
|
1565
|
-
const { shapeFlag:
|
|
1565
|
+
const { shapeFlag: s } = e;
|
|
1566
1566
|
if (n == null)
|
|
1567
1567
|
n = null;
|
|
1568
|
-
else if (
|
|
1568
|
+
else if (F(n))
|
|
1569
1569
|
t = 16;
|
|
1570
1570
|
else if (typeof n == "object")
|
|
1571
|
-
if (
|
|
1572
|
-
const
|
|
1573
|
-
|
|
1571
|
+
if (s & 65) {
|
|
1572
|
+
const o = n.default;
|
|
1573
|
+
o && (o._c && (o._d = !1), cn(e, o()), o._c && (o._d = !0));
|
|
1574
1574
|
return;
|
|
1575
1575
|
} else
|
|
1576
|
-
t = 32, !n._ && !
|
|
1577
|
-
else
|
|
1576
|
+
t = 32, !n._ && !Dn(n) && (n._ctx = be);
|
|
1577
|
+
else J(n) ? (n = { default: n, _ctx: be }, t = 32) : (n = String(n), s & 64 ? (t = 16, n = [bo(n)]) : t = 8);
|
|
1578
1578
|
e.children = n, e.shapeFlag |= t;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function wo(...e) {
|
|
1581
1581
|
const n = {};
|
|
1582
1582
|
for (let t = 0; t < e.length; t++) {
|
|
1583
|
-
const
|
|
1584
|
-
for (const
|
|
1585
|
-
if (
|
|
1586
|
-
n.class !==
|
|
1587
|
-
else if (
|
|
1588
|
-
n.style =
|
|
1589
|
-
else if (
|
|
1590
|
-
const
|
|
1591
|
-
c &&
|
|
1592
|
-
} else
|
|
1583
|
+
const s = e[t];
|
|
1584
|
+
for (const o in s)
|
|
1585
|
+
if (o === "class")
|
|
1586
|
+
n.class !== s.class && (n.class = sn([n.class, s.class]));
|
|
1587
|
+
else if (o === "style")
|
|
1588
|
+
n.style = on([n.style, s.style]);
|
|
1589
|
+
else if (Lt(o)) {
|
|
1590
|
+
const r = n[o], c = s[o];
|
|
1591
|
+
c && r !== c && !(F(r) && r.includes(c)) && (n[o] = r ? [].concat(r, c) : c);
|
|
1592
|
+
} else o !== "" && (n[o] = s[o]);
|
|
1593
1593
|
}
|
|
1594
1594
|
return n;
|
|
1595
1595
|
}
|
|
1596
1596
|
{
|
|
1597
|
-
const e =
|
|
1598
|
-
let
|
|
1599
|
-
return (
|
|
1600
|
-
|
|
1597
|
+
const e = Ie(), n = (t, s) => {
|
|
1598
|
+
let o;
|
|
1599
|
+
return (o = e[t]) || (o = e[t] = []), o.push(s), (r) => {
|
|
1600
|
+
o.length > 1 ? o.forEach((c) => c(r)) : o[0](r);
|
|
1601
1601
|
};
|
|
1602
1602
|
};
|
|
1603
1603
|
n(
|
|
@@ -1609,94 +1609,94 @@ function $o(...e) {
|
|
|
1609
1609
|
);
|
|
1610
1610
|
}
|
|
1611
1611
|
process.env.NODE_ENV;
|
|
1612
|
-
const
|
|
1613
|
-
function
|
|
1614
|
-
return
|
|
1615
|
-
}
|
|
1616
|
-
function
|
|
1617
|
-
let
|
|
1618
|
-
if (!
|
|
1619
|
-
const
|
|
1620
|
-
|
|
1621
|
-
}
|
|
1622
|
-
if (!
|
|
1623
|
-
const
|
|
1624
|
-
for (const c in
|
|
1625
|
-
if (
|
|
1612
|
+
const No = /(?:^|[-_])(\w)/g, yo = (e) => e.replace(No, (n) => n.toUpperCase()).replace(/[-_]/g, "");
|
|
1613
|
+
function Ln(e, n = !0) {
|
|
1614
|
+
return J(e) ? e.displayName || e.name : e.name || n && e.__name;
|
|
1615
|
+
}
|
|
1616
|
+
function Mn(e, n, t = !1) {
|
|
1617
|
+
let s = Ln(n);
|
|
1618
|
+
if (!s && n.__file) {
|
|
1619
|
+
const o = n.__file.match(/([^/\\]+)\.\w+$/);
|
|
1620
|
+
o && (s = o[1]);
|
|
1621
|
+
}
|
|
1622
|
+
if (!s && e && e.parent) {
|
|
1623
|
+
const o = (r) => {
|
|
1624
|
+
for (const c in r)
|
|
1625
|
+
if (r[c] === n)
|
|
1626
1626
|
return c;
|
|
1627
1627
|
};
|
|
1628
|
-
|
|
1628
|
+
s = o(
|
|
1629
1629
|
e.components || e.parent.type.components
|
|
1630
|
-
) ||
|
|
1630
|
+
) || o(e.appContext.components);
|
|
1631
1631
|
}
|
|
1632
|
-
return
|
|
1632
|
+
return s ? yo(s) : t ? "App" : "Anonymous";
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return
|
|
1634
|
+
function Kn(e) {
|
|
1635
|
+
return J(e) && "__vccOpts" in e;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function Eo() {
|
|
1638
1638
|
if (process.env.NODE_ENV === "production" || typeof window > "u")
|
|
1639
1639
|
return;
|
|
1640
|
-
const e = { style: "color:#3ba776" }, n = { style: "color:#1677ff" }, t = { style: "color:#f5222d" },
|
|
1640
|
+
const e = { style: "color:#3ba776" }, n = { style: "color:#1677ff" }, t = { style: "color:#f5222d" }, s = { style: "color:#eb2f96" }, o = {
|
|
1641
1641
|
__vue_custom_formatter: !0,
|
|
1642
|
-
header(
|
|
1643
|
-
return
|
|
1642
|
+
header(u) {
|
|
1643
|
+
return G(u) ? u.__isVue ? ["div", e, "VueInstance"] : rn(u) ? [
|
|
1644
1644
|
"div",
|
|
1645
1645
|
{},
|
|
1646
|
-
["span", e,
|
|
1646
|
+
["span", e, a(u)],
|
|
1647
1647
|
"<",
|
|
1648
1648
|
// avoid debugger accessing value affecting behavior
|
|
1649
|
-
g("_value" in
|
|
1649
|
+
g("_value" in u ? u._value : u),
|
|
1650
1650
|
">"
|
|
1651
|
-
] :
|
|
1651
|
+
] : Sn(u) ? [
|
|
1652
1652
|
"div",
|
|
1653
1653
|
{},
|
|
1654
|
-
["span", e,
|
|
1654
|
+
["span", e, Te(u) ? "ShallowReactive" : "Reactive"],
|
|
1655
1655
|
"<",
|
|
1656
|
-
g(
|
|
1657
|
-
`>${
|
|
1658
|
-
] :
|
|
1656
|
+
g(u),
|
|
1657
|
+
`>${ze(u) ? " (readonly)" : ""}`
|
|
1658
|
+
] : ze(u) ? [
|
|
1659
1659
|
"div",
|
|
1660
1660
|
{},
|
|
1661
|
-
["span", e,
|
|
1661
|
+
["span", e, Te(u) ? "ShallowReadonly" : "Readonly"],
|
|
1662
1662
|
"<",
|
|
1663
|
-
g(
|
|
1663
|
+
g(u),
|
|
1664
1664
|
">"
|
|
1665
1665
|
] : null : null;
|
|
1666
1666
|
},
|
|
1667
|
-
hasBody(
|
|
1668
|
-
return
|
|
1667
|
+
hasBody(u) {
|
|
1668
|
+
return u && u.__isVue;
|
|
1669
1669
|
},
|
|
1670
|
-
body(
|
|
1671
|
-
if (
|
|
1670
|
+
body(u) {
|
|
1671
|
+
if (u && u.__isVue)
|
|
1672
1672
|
return [
|
|
1673
1673
|
"div",
|
|
1674
1674
|
{},
|
|
1675
|
-
...
|
|
1675
|
+
...r(u.$)
|
|
1676
1676
|
];
|
|
1677
1677
|
}
|
|
1678
1678
|
};
|
|
1679
|
-
function
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1682
|
-
const
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1685
|
-
return
|
|
1679
|
+
function r(u) {
|
|
1680
|
+
const i = [];
|
|
1681
|
+
u.type.props && u.props && i.push(c("props", U(u.props))), u.setupState !== Ue && i.push(c("setup", u.setupState)), u.data !== Ue && i.push(c("data", U(u.data)));
|
|
1682
|
+
const p = _(u, "computed");
|
|
1683
|
+
p && i.push(c("computed", p));
|
|
1684
|
+
const b = _(u, "inject");
|
|
1685
|
+
return b && i.push(c("injected", b)), i.push([
|
|
1686
1686
|
"div",
|
|
1687
1687
|
{},
|
|
1688
1688
|
[
|
|
1689
1689
|
"span",
|
|
1690
1690
|
{
|
|
1691
|
-
style:
|
|
1691
|
+
style: s.style + ";opacity:0.66"
|
|
1692
1692
|
},
|
|
1693
1693
|
"$ (internal): "
|
|
1694
1694
|
],
|
|
1695
|
-
["object", { object:
|
|
1696
|
-
]),
|
|
1695
|
+
["object", { object: u }]
|
|
1696
|
+
]), i;
|
|
1697
1697
|
}
|
|
1698
|
-
function c(
|
|
1699
|
-
return
|
|
1698
|
+
function c(u, i) {
|
|
1699
|
+
return i = Ae({}, i), Object.keys(i).length ? [
|
|
1700
1700
|
"div",
|
|
1701
1701
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
1702
1702
|
[
|
|
@@ -1704,43 +1704,43 @@ function No() {
|
|
|
1704
1704
|
{
|
|
1705
1705
|
style: "color:#476582"
|
|
1706
1706
|
},
|
|
1707
|
-
|
|
1707
|
+
u
|
|
1708
1708
|
],
|
|
1709
1709
|
[
|
|
1710
1710
|
"div",
|
|
1711
1711
|
{
|
|
1712
1712
|
style: "padding-left:1.25em"
|
|
1713
1713
|
},
|
|
1714
|
-
...Object.keys(
|
|
1714
|
+
...Object.keys(i).map((p) => [
|
|
1715
1715
|
"div",
|
|
1716
1716
|
{},
|
|
1717
|
-
["span",
|
|
1718
|
-
g(
|
|
1717
|
+
["span", s, p + ": "],
|
|
1718
|
+
g(i[p], !1)
|
|
1719
1719
|
])
|
|
1720
1720
|
]
|
|
1721
1721
|
] : ["span", {}];
|
|
1722
1722
|
}
|
|
1723
|
-
function g(
|
|
1724
|
-
return typeof
|
|
1723
|
+
function g(u, i = !0) {
|
|
1724
|
+
return typeof u == "number" ? ["span", n, u] : typeof u == "string" ? ["span", t, JSON.stringify(u)] : typeof u == "boolean" ? ["span", s, u] : G(u) ? ["object", { object: i ? U(u) : u }] : ["span", t, String(u)];
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1726
|
+
function _(u, i) {
|
|
1727
|
+
const p = u.type;
|
|
1728
|
+
if (J(p))
|
|
1729
1729
|
return;
|
|
1730
|
-
const
|
|
1731
|
-
for (const
|
|
1732
|
-
|
|
1733
|
-
return
|
|
1734
|
-
}
|
|
1735
|
-
function
|
|
1736
|
-
const
|
|
1737
|
-
if (
|
|
1730
|
+
const b = {};
|
|
1731
|
+
for (const C in u.ctx)
|
|
1732
|
+
m(p, C, i) && (b[C] = u.ctx[C]);
|
|
1733
|
+
return b;
|
|
1734
|
+
}
|
|
1735
|
+
function m(u, i, p) {
|
|
1736
|
+
const b = u[p];
|
|
1737
|
+
if (F(b) && b.includes(i) || G(b) && i in b || u.extends && m(u.extends, i, p) || u.mixins && u.mixins.some((C) => m(C, i, p)))
|
|
1738
1738
|
return !0;
|
|
1739
1739
|
}
|
|
1740
|
-
function
|
|
1741
|
-
return
|
|
1740
|
+
function a(u) {
|
|
1741
|
+
return Te(u) ? "ShallowRef" : u.effect ? "ComputedRef" : "Ref";
|
|
1742
1742
|
}
|
|
1743
|
-
window.devtoolsFormatters ? window.devtoolsFormatters.push(
|
|
1743
|
+
window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
|
|
1744
1744
|
}
|
|
1745
1745
|
process.env.NODE_ENV;
|
|
1746
1746
|
process.env.NODE_ENV;
|
|
@@ -1750,15 +1750,15 @@ process.env.NODE_ENV;
|
|
|
1750
1750
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1751
1751
|
* @license MIT
|
|
1752
1752
|
**/
|
|
1753
|
-
function
|
|
1754
|
-
|
|
1753
|
+
function jo() {
|
|
1754
|
+
Eo();
|
|
1755
1755
|
}
|
|
1756
|
-
process.env.NODE_ENV !== "production" &&
|
|
1757
|
-
function
|
|
1758
|
-
return
|
|
1756
|
+
process.env.NODE_ENV !== "production" && jo();
|
|
1757
|
+
function So(e) {
|
|
1758
|
+
return Dt(e) || kt(e) || Ft(e) || Vt(e) || Rt(e);
|
|
1759
1759
|
}
|
|
1760
|
-
var
|
|
1761
|
-
class
|
|
1760
|
+
var Bn = /* @__PURE__ */ ((e) => (e.Java = "java", e.Kotlin = "kotlin", e.CSharp = "csharp", e.Go = "go", e))(Bn || {});
|
|
1761
|
+
class I {
|
|
1762
1762
|
imports = /* @__PURE__ */ new Set();
|
|
1763
1763
|
parentDir;
|
|
1764
1764
|
name;
|
|
@@ -1799,869 +1799,967 @@ class j {
|
|
|
1799
1799
|
this.parentDir = n;
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1802
|
+
var Ne;
|
|
1803
1803
|
((e) => {
|
|
1804
1804
|
((n) => {
|
|
1805
|
-
n.Lombok = "Lombok", n.LombokBuilder = "LombokBuilder", n.
|
|
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 = {}));
|
|
1807
|
-
})(
|
|
1808
|
-
var
|
|
1807
|
+
})(Ne || (Ne = {}));
|
|
1808
|
+
var ye;
|
|
1809
1809
|
((e) => {
|
|
1810
1810
|
((n) => {
|
|
1811
1811
|
n.ValueClass = "ValueClass", n.CommandHandler = "CommandHandler", n.Timezone = "Timezone";
|
|
1812
1812
|
})(e.KotlinGeneratorAddition || (e.KotlinGeneratorAddition = {}));
|
|
1813
|
-
})(
|
|
1814
|
-
var
|
|
1813
|
+
})(ye || (ye = {}));
|
|
1814
|
+
var Ee;
|
|
1815
1815
|
((e) => {
|
|
1816
1816
|
((n) => {
|
|
1817
1817
|
n.Timezone = "Timezone", n.RecordStruct = "RecordStruct", n.PrimaryConstructor = "PrimaryConstructor", n.CommandHandlerInterface = "CommandHandlerInterface", n.AggInterface = "AggInterface";
|
|
1818
1818
|
})(e.CSharpGeneratorAddition || (e.CSharpGeneratorAddition = {}));
|
|
1819
|
-
})(
|
|
1820
|
-
var
|
|
1819
|
+
})(Ee || (Ee = {}));
|
|
1820
|
+
var qe;
|
|
1821
1821
|
((e) => {
|
|
1822
1822
|
((n) => {
|
|
1823
1823
|
n.SinglePackageEachDesigner = "SinglePackageEachDesigner";
|
|
1824
1824
|
})(e.GoGeneratorAddition || (e.GoGeneratorAddition = {}));
|
|
1825
|
-
})(
|
|
1826
|
-
const
|
|
1825
|
+
})(qe || (qe = {}));
|
|
1826
|
+
const Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1827
1827
|
__proto__: null,
|
|
1828
|
-
CodeFile:
|
|
1829
|
-
Language:
|
|
1828
|
+
CodeFile: I,
|
|
1829
|
+
Language: Bn,
|
|
1830
1830
|
get csharp() {
|
|
1831
|
-
return
|
|
1831
|
+
return Ee;
|
|
1832
1832
|
},
|
|
1833
1833
|
get go() {
|
|
1834
|
-
return
|
|
1834
|
+
return qe;
|
|
1835
1835
|
},
|
|
1836
|
-
isStruct:
|
|
1836
|
+
isStruct: So,
|
|
1837
1837
|
get java() {
|
|
1838
|
-
return
|
|
1838
|
+
return Ne;
|
|
1839
1839
|
},
|
|
1840
1840
|
get kotlin() {
|
|
1841
|
-
return
|
|
1841
|
+
return ye;
|
|
1842
1842
|
}
|
|
1843
1843
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1844
|
-
var
|
|
1844
|
+
var y;
|
|
1845
1845
|
((e) => {
|
|
1846
|
-
function n(
|
|
1847
|
-
return
|
|
1846
|
+
function n(m) {
|
|
1847
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((a) => a.charAt(0).toUpperCase() + a.toLowerCase().slice(1)).join("");
|
|
1848
1848
|
}
|
|
1849
1849
|
e.stringToUpperCamel = n;
|
|
1850
|
-
function t(
|
|
1851
|
-
let
|
|
1852
|
-
return
|
|
1850
|
+
function t(m) {
|
|
1851
|
+
let a = !0;
|
|
1852
|
+
return m.trim().split(m.includes("_") || m.includes("-") || m.includes(" ") ? /_|\s|-/ : /(?=[A-Z])/g).map((u) => a ? (a = !1, u.toLowerCase()) : u.charAt(0).toUpperCase() + u.toLowerCase().slice(1)).join("");
|
|
1853
1853
|
}
|
|
1854
1854
|
e.stringToLowerCamel = t;
|
|
1855
|
-
function
|
|
1856
|
-
return
|
|
1855
|
+
function s(m) {
|
|
1856
|
+
return m = m.trim(), m.includes("_") ? m.toLowerCase() : m.includes(" ") || m.includes("-") ? m.split(/\s|-/).join("_").toLowerCase() : r(m);
|
|
1857
1857
|
}
|
|
1858
|
-
e.stringToLowerSnake =
|
|
1859
|
-
function
|
|
1860
|
-
return
|
|
1858
|
+
e.stringToLowerSnake = s;
|
|
1859
|
+
function o(m) {
|
|
1860
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toUpperCase();
|
|
1861
1861
|
}
|
|
1862
|
-
e.camelToUpperSnake =
|
|
1863
|
-
function
|
|
1864
|
-
return
|
|
1862
|
+
e.camelToUpperSnake = o;
|
|
1863
|
+
function r(m) {
|
|
1864
|
+
return m.trim().split(/(?=[A-Z])/g).join("_").toLowerCase();
|
|
1865
1865
|
}
|
|
1866
|
-
e.camelToLowerSnake =
|
|
1867
|
-
function c(
|
|
1868
|
-
return
|
|
1866
|
+
e.camelToLowerSnake = r;
|
|
1867
|
+
function c(m) {
|
|
1868
|
+
return m.trim().split("_").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("");
|
|
1869
1869
|
}
|
|
1870
1870
|
e.snakeToUpperCamel = c;
|
|
1871
|
-
function g(
|
|
1872
|
-
return
|
|
1871
|
+
function g(m) {
|
|
1872
|
+
return m.trim().charAt(0).toLowerCase() + m.slice(1);
|
|
1873
1873
|
}
|
|
1874
1874
|
e.lowerFirst = g;
|
|
1875
|
-
function
|
|
1876
|
-
return
|
|
1875
|
+
function _(m) {
|
|
1876
|
+
return m.trim().charAt(0).toUpperCase() + m.slice(1);
|
|
1877
1877
|
}
|
|
1878
|
-
e.upperFirst =
|
|
1879
|
-
})(
|
|
1880
|
-
const
|
|
1881
|
-
const e = "value";
|
|
1882
|
-
function
|
|
1883
|
-
return
|
|
1878
|
+
e.upperFirst = _;
|
|
1879
|
+
})(y || (y = {}));
|
|
1880
|
+
const j = Ne.JavaGeneratorAddition, Oo = pe.createHotSwapPlugin(() => {
|
|
1881
|
+
const e = "value", n = "command", t = "event";
|
|
1882
|
+
function s(o) {
|
|
1883
|
+
return y.stringToUpperCamel(o._attributes.name);
|
|
1884
1884
|
}
|
|
1885
1885
|
return {
|
|
1886
|
-
unmount({ api:
|
|
1887
|
-
|
|
1886
|
+
unmount({ api: o }) {
|
|
1887
|
+
o.commands.clearCaches(), o.commands._setCommandCodeProvider(() => []), o.commands._setFacadeCommandCodeProvider(() => []), o.commands._setAggCodeProvider(() => []), o.commands._setEventCodeProvider(() => []), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => []), o.commands.setContext({});
|
|
1888
1888
|
},
|
|
1889
|
-
mount({ api:
|
|
1890
|
-
const
|
|
1891
|
-
function
|
|
1892
|
-
return !
|
|
1889
|
+
mount({ api: o }) {
|
|
1890
|
+
const r = o.states.context, c = o.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((i) => y.stringToLowerCamel(i));
|
|
1891
|
+
function g(i) {
|
|
1892
|
+
return !c.includes(y.stringToLowerCamel(i._attributes.name));
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1895
|
-
return
|
|
1894
|
+
function _(i, p) {
|
|
1895
|
+
return g(p) ? y.stringToUpperCamel(p._attributes.name) : a(i, p);
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1898
|
-
for (const
|
|
1899
|
-
if (!
|
|
1900
|
-
|
|
1897
|
+
function m(i, p) {
|
|
1898
|
+
for (const b of p) {
|
|
1899
|
+
if (!g(b)) {
|
|
1900
|
+
a(i, b);
|
|
1901
1901
|
continue;
|
|
1902
1902
|
}
|
|
1903
|
-
|
|
1904
|
-
`${
|
|
1903
|
+
i.add(
|
|
1904
|
+
`${r.value.namespace}.${r.value.moduleName}.${e}.${s(b)}`
|
|
1905
1905
|
);
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1909
|
-
const
|
|
1910
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
1908
|
+
function a(i, p) {
|
|
1909
|
+
const b = r.value.additions, C = y.stringToLowerSnake(p._attributes.name).replace(/_/, " ");
|
|
1910
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(C) ? b.has(j.Timezone) ? (i.add("java.time.OffsetDateTime"), "OffsetDateTime") : (i.add("java.time.LocalDateTime"), "LocalDateTime") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(C) ? "Integer" : /\b(price)$/.test(C) ? (i.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(C) ? "Boolean" : Se(p) && (p._attributes.type === "Id" || p._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(C)) ? "Long" : "String";
|
|
1911
1911
|
}
|
|
1912
|
-
|
|
1913
|
-
(
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1916
|
-
const
|
|
1917
|
-
return
|
|
1912
|
+
o.commands._setInfoCodeProvider(
|
|
1913
|
+
(i) => {
|
|
1914
|
+
const p = /* @__PURE__ */ new Set();
|
|
1915
|
+
p.add(r.value.nonNullAnnotation);
|
|
1916
|
+
const b = r.value.nonNullAnnotation.split(".").pop(), C = s(i), h = r.value.additions, $ = [];
|
|
1917
|
+
return h.has(j.RecordValueObject) ? (h.has(j.Jpa) && (p.add("javax.persistence.Embeddable"), $.push("@Embeddable")), $.push(`public record ${C}(@${b} ${a(p, i)} value) {`), $.push(` public ${C} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}")) : h.has(j.Lombok) ? ($.push("@lombok.Getter"), h.has(j.Jpa) && (p.add("javax.persistence.Embeddable"), $.push("@Embeddable")), $.push(`public class ${C} {`), $.push(` private final ${a(p, i)} value;`), $.push(""), $.push(` public ${C} (@${b} ${a(p, i)} value) {`), $.push(" // HACK check value"), $.push(" this.value = value;"), $.push(" }"), $.push("}")) : (h.has(j.Jpa) && (p.add("javax.persistence.Embeddable"), $.push("@Embeddable")), $.push(`public class ${s(i)} {`), $.push(` private final ${a(p, i)} value;`), $.push(""), $.push(` public ${C} (@${b} ${a(p, i)} value) {`), $.push(" // HACK check value"), $.push(" this.value = value;"), $.push(" }"), $.push(""), $.push(` public ${a(p, i)} getValue() {`), $.push(" return this.value;"), $.push(" }"), $.push("}")), [
|
|
1918
1918
|
{
|
|
1919
1919
|
type: "Info",
|
|
1920
|
-
imports:
|
|
1921
|
-
content:
|
|
1920
|
+
imports: p,
|
|
1921
|
+
content: $.join(`
|
|
1922
1922
|
`)
|
|
1923
1923
|
}
|
|
1924
1924
|
];
|
|
1925
1925
|
}
|
|
1926
1926
|
);
|
|
1927
|
-
function
|
|
1928
|
-
const
|
|
1927
|
+
function u(i) {
|
|
1928
|
+
const p = [], b = r.value.additions, C = r.value.nonNullAnnotation.split(".").pop();
|
|
1929
1929
|
{
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1932
|
-
const
|
|
1933
|
-
if (
|
|
1934
|
-
|
|
1935
|
-
const
|
|
1936
|
-
for (const
|
|
1937
|
-
const
|
|
1938
|
-
|
|
1939
|
-
` @${
|
|
1940
|
-
${
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
)} ${
|
|
1930
|
+
const h = /* @__PURE__ */ new Set();
|
|
1931
|
+
h.add(r.value.nonNullAnnotation);
|
|
1932
|
+
const $ = s(i), l = [], d = Object.values(i.inner);
|
|
1933
|
+
if (m(h, d), b.has(j.RecordValueObject)) {
|
|
1934
|
+
b.has(j.LombokBuilder) && l.push("@lombok.Builder(toBuilder = true)"), l.push(`public record ${$}(`);
|
|
1935
|
+
const w = [];
|
|
1936
|
+
for (const f of d) {
|
|
1937
|
+
const v = s(f);
|
|
1938
|
+
w.push(
|
|
1939
|
+
` @${C}
|
|
1940
|
+
${_(
|
|
1941
|
+
h,
|
|
1942
|
+
f
|
|
1943
|
+
)} ${y.lowerFirst(v)}`
|
|
1944
1944
|
);
|
|
1945
1945
|
}
|
|
1946
|
-
|
|
1947
|
-
`)),
|
|
1948
|
-
} else if (
|
|
1949
|
-
|
|
1950
|
-
for (const
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
` private final ${
|
|
1946
|
+
l.push(w.join(`,
|
|
1947
|
+
`)), l.push(") {"), l.push(` public ${$} {`), l.push(" // HACK check value"), l.push(" }"), l.push("}");
|
|
1948
|
+
} else if (b.has(j.Lombok)) {
|
|
1949
|
+
l.push("@lombok.AllArgsConstructor"), l.push("@lombok.Getter"), b.has(j.LombokBuilder) && l.push("@lombok.Builder(toBuilder = true)"), l.push(`public class ${$} {`);
|
|
1950
|
+
for (const w of d) {
|
|
1951
|
+
const f = s(w);
|
|
1952
|
+
l.push(` @${C}`), l.push(
|
|
1953
|
+
` private final ${_(h, w)} ${y.lowerFirst(f)};`
|
|
1954
1954
|
);
|
|
1955
1955
|
}
|
|
1956
|
-
|
|
1956
|
+
l.push("}");
|
|
1957
1957
|
} else {
|
|
1958
|
-
|
|
1959
|
-
for (const
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1962
|
-
` private final ${
|
|
1958
|
+
l.push(`public class ${$} {`);
|
|
1959
|
+
for (const v of d) {
|
|
1960
|
+
const N = s(v);
|
|
1961
|
+
l.push(` @${C}`), l.push(
|
|
1962
|
+
` private final ${_(h, v)} ${y.lowerFirst(N)};`
|
|
1963
1963
|
);
|
|
1964
1964
|
}
|
|
1965
|
-
|
|
1966
|
-
const
|
|
1967
|
-
for (const
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
`@${
|
|
1971
|
-
),
|
|
1965
|
+
l.push("");
|
|
1966
|
+
const w = [], f = [];
|
|
1967
|
+
for (const v of d) {
|
|
1968
|
+
const N = s(v);
|
|
1969
|
+
w.push(
|
|
1970
|
+
`@${C} ${a(h, v)} ${y.lowerFirst(N)}`
|
|
1971
|
+
), f.push(`this.${y.lowerFirst(N)} = ${y.lowerFirst(N)};`);
|
|
1972
1972
|
}
|
|
1973
|
-
|
|
1974
|
-
`)}`),
|
|
1975
|
-
for (const
|
|
1976
|
-
const
|
|
1977
|
-
|
|
1973
|
+
l.push(` public ${$}(${w.join(", ")}) {`), l.push(` ${f.join(`
|
|
1974
|
+
`)}`), l.push(" }");
|
|
1975
|
+
for (const v of d) {
|
|
1976
|
+
const N = s(v);
|
|
1977
|
+
l.push(""), l.push(` public ${_(h, v)} get${N} () {`), l.push(` return this.${y.lowerFirst(N)};`), l.push(" }");
|
|
1978
1978
|
}
|
|
1979
|
-
|
|
1979
|
+
l.push("}");
|
|
1980
1980
|
}
|
|
1981
|
-
|
|
1981
|
+
p.push({
|
|
1982
1982
|
type: "Command",
|
|
1983
|
-
imports:
|
|
1984
|
-
content:
|
|
1983
|
+
imports: h,
|
|
1984
|
+
content: l.join(`
|
|
1985
1985
|
`)
|
|
1986
1986
|
});
|
|
1987
1987
|
}
|
|
1988
|
-
if (!
|
|
1989
|
-
return
|
|
1988
|
+
if (!b.has(j.CommandHandler))
|
|
1989
|
+
return p;
|
|
1990
1990
|
{
|
|
1991
|
-
const
|
|
1992
|
-
|
|
1993
|
-
const
|
|
1994
|
-
|
|
1995
|
-
const
|
|
1996
|
-
(
|
|
1991
|
+
const h = /* @__PURE__ */ new Set();
|
|
1992
|
+
h.add(r.value.nonNullAnnotation);
|
|
1993
|
+
const $ = s(i), l = [];
|
|
1994
|
+
b.has(j.SpringFramework) && (h.add("org.springframework.stereotype.Component"), l.push("@Component")), b.has(j.Lombok) && l.push("@lombok.RequiredArgsConstructor"), l.push(`public class ${$}Handler {`);
|
|
1995
|
+
const d = [...o.states.designer.value._getContext().getAssociationMap()[i._attributes.__id]].filter(
|
|
1996
|
+
(w) => w._attributes.rule === "Agg"
|
|
1997
1997
|
);
|
|
1998
|
-
for (const
|
|
1999
|
-
|
|
2000
|
-
|
|
1998
|
+
for (const w of d)
|
|
1999
|
+
h.add(`${r.value.namespace}.${r.value.moduleName}.${s(w)}`), l.push(` public ${s(w)} handle(@${C} ${$} command) {`), l.push(" // HACK Implement"), l.push(" }");
|
|
2000
|
+
l.push("}"), p.push({
|
|
2001
2001
|
type: "CommandHandler",
|
|
2002
|
-
imports:
|
|
2003
|
-
content:
|
|
2002
|
+
imports: h,
|
|
2003
|
+
content: l.join(`
|
|
2004
2004
|
`)
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
|
-
return
|
|
2007
|
+
return p;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2009
|
+
o.commands._setCommandCodeProvider(u), o.commands._setFacadeCommandCodeProvider((i) => {
|
|
2010
|
+
const p = [], b = r.value.additions, C = r.value.nonNullAnnotation.split(".").pop();
|
|
2011
|
+
{
|
|
2012
|
+
const h = /* @__PURE__ */ new Set();
|
|
2013
|
+
h.add(r.value.nonNullAnnotation);
|
|
2014
|
+
const $ = s(i), l = [], d = Object.values(i.inner);
|
|
2015
|
+
if (m(h, d), b.has(j.RecordValueObject)) {
|
|
2016
|
+
b.has(j.LombokBuilder) && l.push("@lombok.Builder(toBuilder = true)"), l.push(`public record ${$}(`);
|
|
2017
|
+
const w = [];
|
|
2018
|
+
for (const f of d) {
|
|
2019
|
+
const v = s(f);
|
|
2020
|
+
w.push(
|
|
2021
|
+
` @${C}
|
|
2022
|
+
${_(
|
|
2023
|
+
h,
|
|
2024
|
+
f
|
|
2025
|
+
)} ${y.lowerFirst(v)}`
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
l.push(w.join(`,
|
|
2029
|
+
`)), l.push(") {"), l.push(` public ${$} {`), l.push(" // HACK check value"), l.push(" }"), l.push("}");
|
|
2030
|
+
} else if (b.has(j.Lombok)) {
|
|
2031
|
+
l.push("@lombok.AllArgsConstructor"), l.push("@lombok.Getter"), b.has(j.LombokBuilder) && l.push("@lombok.Builder(toBuilder = true)"), l.push(`public class ${$} {`);
|
|
2032
|
+
for (const w of d) {
|
|
2033
|
+
const f = s(w);
|
|
2034
|
+
l.push(` @${C}`), l.push(
|
|
2035
|
+
` private final ${_(h, w)} ${y.lowerFirst(f)};`
|
|
2036
|
+
);
|
|
2037
|
+
}
|
|
2038
|
+
l.push("}");
|
|
2039
|
+
} else {
|
|
2040
|
+
l.push(`public class ${$} {`);
|
|
2041
|
+
for (const v of d) {
|
|
2042
|
+
const N = s(v);
|
|
2043
|
+
l.push(` @${C}`), l.push(
|
|
2044
|
+
` private final ${_(h, v)} ${y.lowerFirst(N)};`
|
|
2045
|
+
);
|
|
2046
|
+
}
|
|
2047
|
+
l.push("");
|
|
2048
|
+
const w = [], f = [];
|
|
2049
|
+
for (const v of d) {
|
|
2050
|
+
const N = s(v);
|
|
2051
|
+
w.push(
|
|
2052
|
+
`@${C} ${a(h, v)} ${y.lowerFirst(N)}`
|
|
2053
|
+
), f.push(`this.${y.lowerFirst(N)} = ${y.lowerFirst(N)};`);
|
|
2054
|
+
}
|
|
2055
|
+
l.push(` public ${$}(${w.join(", ")}) {`), l.push(` ${f.join(`
|
|
2056
|
+
`)}`), l.push(" }");
|
|
2057
|
+
for (const v of d) {
|
|
2058
|
+
const N = s(v);
|
|
2059
|
+
l.push(""), l.push(` public ${_(h, v)} get${N} () {`), l.push(` return this.${y.lowerFirst(N)};`), l.push(" }");
|
|
2060
|
+
}
|
|
2061
|
+
l.push("}");
|
|
2062
|
+
}
|
|
2063
|
+
p.push({
|
|
2064
|
+
type: "FacadeCommand",
|
|
2065
|
+
imports: h,
|
|
2066
|
+
content: l.join(`
|
|
2067
|
+
`)
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
if (!b.has(j.CommandHandler))
|
|
2071
|
+
return p;
|
|
2072
|
+
{
|
|
2073
|
+
const h = /* @__PURE__ */ new Set();
|
|
2074
|
+
h.add(r.value.nonNullAnnotation);
|
|
2075
|
+
const $ = s(i), l = [];
|
|
2076
|
+
b.has(j.SpringFramework) && (h.add("org.springframework.stereotype.Component"), l.push("@Component")), b.has(j.Lombok) && l.push("@lombok.RequiredArgsConstructor"), l.push(`public class ${$}Handler {`);
|
|
2077
|
+
const d = [...o.states.designer.value._getContext().getAssociationMap()[i._attributes.__id]].filter(
|
|
2078
|
+
(w) => w._attributes.rule === "Agg"
|
|
2079
|
+
);
|
|
2080
|
+
for (const w of d)
|
|
2081
|
+
h.add(`${r.value.namespace}.${r.value.moduleName}.${s(w)}`), l.push(` public ${s(w)} handle(@${C} ${$} command) {`), l.push(" // HACK Implement"), l.push(" }");
|
|
2082
|
+
l.push("}"), p.push({
|
|
2083
|
+
type: "FacadeCommandHandler",
|
|
2084
|
+
imports: h,
|
|
2085
|
+
content: l.join(`
|
|
2086
|
+
`)
|
|
2087
|
+
});
|
|
2088
|
+
}
|
|
2089
|
+
return p;
|
|
2090
|
+
}), o.commands._setAggCodeProvider(
|
|
2091
|
+
(i) => {
|
|
2092
|
+
const p = r.value.additions, b = o.states.designer.value, C = r.value.nonNullAnnotation.split(".").pop(), h = s(i), $ = [];
|
|
2012
2093
|
{
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
const
|
|
2016
|
-
for (const
|
|
2017
|
-
const
|
|
2018
|
-
|
|
2094
|
+
const l = /* @__PURE__ */ new Set();
|
|
2095
|
+
l.add(r.value.nonNullAnnotation);
|
|
2096
|
+
const d = [], w = [], f = [...b._getContext().getAssociationMap()[i._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2097
|
+
for (const v of f) {
|
|
2098
|
+
const N = s(v);
|
|
2099
|
+
w.push(`public void handle${N}(@${C} ${N} command);`);
|
|
2019
2100
|
}
|
|
2020
|
-
|
|
2101
|
+
d.push(`public interface ${h} {`), d.push(` ${w.join(`
|
|
2021
2102
|
|
|
2022
|
-
`)}`),
|
|
2103
|
+
`)}`), d.push("}"), $.push({
|
|
2023
2104
|
type: "Agg",
|
|
2024
|
-
imports:
|
|
2025
|
-
content:
|
|
2105
|
+
imports: l,
|
|
2106
|
+
content: d.join(`
|
|
2026
2107
|
`)
|
|
2027
2108
|
});
|
|
2028
2109
|
}
|
|
2029
2110
|
{
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2032
|
-
const
|
|
2033
|
-
if (
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2111
|
+
const l = /* @__PURE__ */ new Set();
|
|
2112
|
+
l.add(r.value.nonNullAnnotation);
|
|
2113
|
+
const d = [], w = Object.values(i.inner);
|
|
2114
|
+
if (m(l, w), p.has(j.Lombok)) {
|
|
2115
|
+
d.push(
|
|
2116
|
+
p.has(j.Jpa) ? "@lombok.NoArgsConstructor" : "@lombok.AllArgsConstructor"
|
|
2117
|
+
), d.push("@lombok.Getter"), p.has(j.Jpa) && (l.add("javax.persistence.Entity"), d.push("@Entity"), l.add("javax.persistence.Table"), d.push(`@Table(name = "${y.camelToLowerSnake(h)}")`)), d.push(`public class ${h}Impl implements ${h} {`);
|
|
2118
|
+
for (const v of w) {
|
|
2119
|
+
const N = s(v);
|
|
2120
|
+
d.push(` @${C}`), p.has(j.Jpa) && (v._attributes.type === "Id" && (l.add("javax.persistence.Id"), d.push(` @GeneratedValue(strategy = GenerationType.${r.value.idGenStrategy})`), d.push(" @Id")), l.add("javax.persistence.AttributeOverride"), l.add("javax.persistence.Column"), d.push(
|
|
2121
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${y.camelToUpperSnake(
|
|
2122
|
+
N
|
|
2123
|
+
)}", unique = true))`
|
|
2124
|
+
)), d.push(` private ${_(l, v)} ${y.lowerFirst(N)};`);
|
|
2038
2125
|
}
|
|
2039
|
-
const
|
|
2040
|
-
for (const
|
|
2041
|
-
const
|
|
2042
|
-
|
|
2043
|
-
` public void handle${
|
|
2044
|
-
|
|
2126
|
+
const f = [...b._getContext().getAssociationMap()[i._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2127
|
+
for (const v of f) {
|
|
2128
|
+
const N = s(v);
|
|
2129
|
+
d.push(""), d.push(
|
|
2130
|
+
` public void handle${N}(@${C} ${N} ${y.lowerFirst(
|
|
2131
|
+
N
|
|
2045
2132
|
)}) {`
|
|
2046
|
-
),
|
|
2133
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2047
2134
|
}
|
|
2048
|
-
|
|
2135
|
+
d.push("}");
|
|
2049
2136
|
} else {
|
|
2050
|
-
|
|
2051
|
-
for (const
|
|
2052
|
-
const
|
|
2053
|
-
|
|
2137
|
+
p.has(j.Jpa) && (l.add("javax.persistence.Entity"), d.push("@Entity"), l.add("javax.persistence.Table"), d.push(`@Table(name = "${y.camelToLowerSnake(h)}")`)), d.push(`public class ${h}Impl implements ${h} {`);
|
|
2138
|
+
for (const E of w) {
|
|
2139
|
+
const O = s(E);
|
|
2140
|
+
d.push(` @${C}`), p.has(j.Jpa) && (E._attributes.type === "Id" && (l.add("javax.persistence.Id"), d.push(` @GeneratedValue(strategy = GenerationType.${r.value.idGenStrategy})`), d.push(" @Id")), l.add("javax.persistence.AttributeOverride"), l.add("javax.persistence.Column"), d.push(
|
|
2141
|
+
` @AttributeOverride(name = "value", column = @Column(name = "${y.camelToUpperSnake(
|
|
2142
|
+
O
|
|
2143
|
+
)}"))`
|
|
2144
|
+
)), d.push(` private ${_(l, E)} ${y.lowerFirst(O)};`);
|
|
2054
2145
|
}
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
for (const
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2146
|
+
d.push("");
|
|
2147
|
+
const f = [], v = [];
|
|
2148
|
+
for (const E of w) {
|
|
2149
|
+
if (p.has(j.Jpa))
|
|
2150
|
+
break;
|
|
2151
|
+
const O = s(E);
|
|
2152
|
+
f.push(
|
|
2153
|
+
`@${C} ${_(l, E)} ${y.lowerFirst(O)}`
|
|
2154
|
+
), v.push(`this.${y.lowerFirst(O)} = ${y.lowerFirst(O)};`);
|
|
2062
2155
|
}
|
|
2063
|
-
|
|
2064
|
-
`)}`),
|
|
2065
|
-
for (const
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2156
|
+
d.push(` public ${h}Impl(${f.join(", ")}) {`), d.push(` ${v.join(`
|
|
2157
|
+
`)}`), d.push(" }");
|
|
2158
|
+
for (const E of w) {
|
|
2159
|
+
const O = s(E);
|
|
2160
|
+
d.push(""), d.push(` @${C}`), d.push(` public ${_(l, E)} get${O}() {`), d.push(` return this.${y.lowerFirst(O)};`), d.push(" }");
|
|
2068
2161
|
}
|
|
2069
|
-
const
|
|
2070
|
-
(
|
|
2162
|
+
const N = [...b._getContext().getAssociationMap()[i._attributes.__id]].filter(
|
|
2163
|
+
(E) => E._attributes.rule === "Command" || E._attributes.rule === "FacadeCommand"
|
|
2071
2164
|
);
|
|
2072
|
-
for (const
|
|
2073
|
-
const
|
|
2074
|
-
|
|
2075
|
-
` public void handle${
|
|
2076
|
-
|
|
2165
|
+
for (const E of N) {
|
|
2166
|
+
const O = s(E);
|
|
2167
|
+
d.push(""), d.push(
|
|
2168
|
+
` public void handle${O}(@${C} ${O} ${y.lowerFirst(
|
|
2169
|
+
O
|
|
2077
2170
|
)}) {`
|
|
2078
|
-
),
|
|
2171
|
+
), d.push(" // HACK need implement"), d.push(" }");
|
|
2079
2172
|
}
|
|
2080
|
-
|
|
2173
|
+
d.push("}");
|
|
2081
2174
|
}
|
|
2082
|
-
|
|
2175
|
+
$.push({
|
|
2083
2176
|
type: "AggImpl",
|
|
2084
|
-
imports:
|
|
2085
|
-
content:
|
|
2177
|
+
imports: l,
|
|
2178
|
+
content: d.join(`
|
|
2086
2179
|
`)
|
|
2087
2180
|
});
|
|
2088
2181
|
}
|
|
2089
|
-
return
|
|
2182
|
+
return $;
|
|
2090
2183
|
}
|
|
2091
|
-
),
|
|
2092
|
-
(
|
|
2093
|
-
const
|
|
2094
|
-
|
|
2095
|
-
const
|
|
2096
|
-
if (
|
|
2097
|
-
|
|
2098
|
-
const
|
|
2099
|
-
for (const
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2102
|
-
` @${
|
|
2103
|
-
${
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
)} ${
|
|
2184
|
+
), o.commands._setEventCodeProvider(
|
|
2185
|
+
(i) => {
|
|
2186
|
+
const p = /* @__PURE__ */ new Set();
|
|
2187
|
+
p.add(r.value.nonNullAnnotation);
|
|
2188
|
+
const b = r.value.nonNullAnnotation.split(".").pop(), C = r.value.additions, h = s(i), $ = [], l = Object.values(i.inner);
|
|
2189
|
+
if (m(p, l), C.has(j.RecordValueObject)) {
|
|
2190
|
+
C.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public record ${h}(`);
|
|
2191
|
+
const d = [];
|
|
2192
|
+
for (const w of l) {
|
|
2193
|
+
const f = s(w);
|
|
2194
|
+
d.push(
|
|
2195
|
+
` @${b}
|
|
2196
|
+
${_(
|
|
2197
|
+
p,
|
|
2198
|
+
w
|
|
2199
|
+
)} ${y.lowerFirst(f)}`
|
|
2107
2200
|
);
|
|
2108
2201
|
}
|
|
2109
|
-
|
|
2110
|
-
`)),
|
|
2111
|
-
} else if (
|
|
2112
|
-
|
|
2113
|
-
for (const
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
` private final ${
|
|
2202
|
+
$.push(d.join(`,
|
|
2203
|
+
`)), $.push(") {"), $.push(` public ${h} {`), $.push(" // HACK check value"), $.push(" }"), $.push("}");
|
|
2204
|
+
} else if (C.has(j.Lombok)) {
|
|
2205
|
+
$.push("@lombok.AllArgsConstructor"), $.push("@lombok.Getter"), C.has(j.LombokBuilder) && $.push("@lombok.Builder(toBuilder = true)"), $.push(`public class ${h} {`);
|
|
2206
|
+
for (const d of l) {
|
|
2207
|
+
const w = s(d);
|
|
2208
|
+
$.push(` @${b}`), $.push(
|
|
2209
|
+
` private final ${_(p, d)} ${y.lowerFirst(w)};`
|
|
2117
2210
|
);
|
|
2118
2211
|
}
|
|
2119
|
-
|
|
2212
|
+
$.push("}");
|
|
2120
2213
|
} else {
|
|
2121
|
-
|
|
2122
|
-
for (const
|
|
2123
|
-
const
|
|
2124
|
-
|
|
2214
|
+
$.push(`public class ${h} {`);
|
|
2215
|
+
for (const f of l) {
|
|
2216
|
+
const v = s(f);
|
|
2217
|
+
$.push(` @${b}`), $.push(` private final ${v} ${y.lowerFirst(v)};`);
|
|
2125
2218
|
}
|
|
2126
|
-
|
|
2127
|
-
const
|
|
2128
|
-
for (const
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
`@${
|
|
2132
|
-
),
|
|
2219
|
+
$.push("");
|
|
2220
|
+
const d = [], w = [];
|
|
2221
|
+
for (const f of l) {
|
|
2222
|
+
const v = s(f);
|
|
2223
|
+
d.push(
|
|
2224
|
+
`@${b} ${a(p, f)} ${y.lowerFirst(v)}`
|
|
2225
|
+
), w.push(`this.${y.lowerFirst(v)} = ${y.lowerFirst(v)};`);
|
|
2133
2226
|
}
|
|
2134
|
-
|
|
2135
|
-
`)}`),
|
|
2136
|
-
for (const
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2227
|
+
$.push(` public ${h}(${d.join(", ")}) {`), $.push(` ${w.join(`
|
|
2228
|
+
`)}`), $.push(" }");
|
|
2229
|
+
for (const f of l) {
|
|
2230
|
+
const v = s(f);
|
|
2231
|
+
$.push(""), $.push(` public ${v} get${v} () {`), $.push(` return this.${y.lowerFirst(v)};`), $.push(" }");
|
|
2139
2232
|
}
|
|
2140
|
-
|
|
2233
|
+
$.push("}");
|
|
2141
2234
|
}
|
|
2142
2235
|
return [
|
|
2143
2236
|
{
|
|
2144
2237
|
type: "Event",
|
|
2145
|
-
imports:
|
|
2146
|
-
content:
|
|
2238
|
+
imports: p,
|
|
2239
|
+
content: $.join(`
|
|
2147
2240
|
`)
|
|
2148
2241
|
}
|
|
2149
2242
|
];
|
|
2150
2243
|
}
|
|
2151
|
-
),
|
|
2152
|
-
const
|
|
2153
|
-
function
|
|
2154
|
-
for (const
|
|
2155
|
-
if (!
|
|
2244
|
+
), o.commands._setReadModelCodeProvider(() => []), o.commands._setCodeFileProvider(() => {
|
|
2245
|
+
const i = [], p = {};
|
|
2246
|
+
function b(d) {
|
|
2247
|
+
for (const w of Object.values(d)) {
|
|
2248
|
+
if (!g(w))
|
|
2156
2249
|
continue;
|
|
2157
|
-
const
|
|
2158
|
-
if (
|
|
2250
|
+
const f = [...r.value.namespace.split(/\./), r.value.moduleName, e], v = s(w) + ".java";
|
|
2251
|
+
if (p[`${f.join("/")}/${v}`] === !0)
|
|
2159
2252
|
continue;
|
|
2160
|
-
const
|
|
2161
|
-
if (
|
|
2253
|
+
const N = o.commands._genInfoCode(w);
|
|
2254
|
+
if (N.length === 0)
|
|
2162
2255
|
continue;
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2165
|
-
for (const
|
|
2166
|
-
|
|
2167
|
-
|
|
2256
|
+
const E = new I(f, v);
|
|
2257
|
+
E.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${e};`), E.appendContentln("");
|
|
2258
|
+
for (const O of N[0].imports)
|
|
2259
|
+
E.appendContentln(`import ${O};`);
|
|
2260
|
+
E.appendContentln(""), E.appendContentln(N[0].content), i.push(E), p[`${f.join("/")}/${v}`] = !0;
|
|
2168
2261
|
}
|
|
2169
2262
|
}
|
|
2170
|
-
const
|
|
2171
|
-
for (const
|
|
2172
|
-
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2175
|
-
if (
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2178
|
-
for (const
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
} else if (
|
|
2182
|
-
const
|
|
2183
|
-
|
|
2184
|
-
for (const
|
|
2185
|
-
|
|
2186
|
-
|
|
2263
|
+
const C = o.states.designer.value._getContext().getCommands();
|
|
2264
|
+
for (const d of C) {
|
|
2265
|
+
b(d.inner);
|
|
2266
|
+
const w = o.commands._genCommandCode(d), f = [...r.value.namespace.split(/\./), r.value.moduleName, n];
|
|
2267
|
+
w.forEach((v) => {
|
|
2268
|
+
if (v.type === "Command") {
|
|
2269
|
+
const N = new I(f, s(d) + ".java");
|
|
2270
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${n};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2271
|
+
for (const E of v.imports)
|
|
2272
|
+
N.appendContentln(`import ${E};`);
|
|
2273
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2274
|
+
} else if (v.type === "CommandHandler") {
|
|
2275
|
+
const N = new I(f, s(d) + "Handler.java");
|
|
2276
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${n};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2277
|
+
for (const E of v.imports)
|
|
2278
|
+
N.appendContentln(`import ${E};`);
|
|
2279
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2187
2280
|
} else
|
|
2188
|
-
isNever(
|
|
2281
|
+
isNever(v.type);
|
|
2189
2282
|
});
|
|
2190
2283
|
}
|
|
2191
|
-
const
|
|
2192
|
-
for (const
|
|
2193
|
-
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2196
|
-
if (
|
|
2197
|
-
const
|
|
2198
|
-
|
|
2199
|
-
for (const
|
|
2200
|
-
|
|
2201
|
-
|
|
2284
|
+
const h = o.states.designer.value._getContext().getFacadeCommands();
|
|
2285
|
+
for (const d of h) {
|
|
2286
|
+
b(d.inner);
|
|
2287
|
+
const w = o.commands._genFacadeCommandCode(d), f = [...r.value.namespace.split(/\./), r.value.moduleName, n];
|
|
2288
|
+
w.forEach((v) => {
|
|
2289
|
+
if (v.type === "FacadeCommand") {
|
|
2290
|
+
const N = new I(f, s(d) + ".java");
|
|
2291
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${n};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2292
|
+
for (const E of v.imports)
|
|
2293
|
+
N.appendContentln(`import ${E};`);
|
|
2294
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2295
|
+
} else if (v.type === "FacadeCommandHandler") {
|
|
2296
|
+
const N = new I(f, s(d) + "Handler.java");
|
|
2297
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${n};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2298
|
+
for (const E of v.imports)
|
|
2299
|
+
N.appendContentln(`import ${E};`);
|
|
2300
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2202
2301
|
} else
|
|
2203
|
-
isNever(
|
|
2302
|
+
isNever(v.type);
|
|
2204
2303
|
});
|
|
2205
2304
|
}
|
|
2206
|
-
const
|
|
2207
|
-
for (const
|
|
2208
|
-
|
|
2209
|
-
const
|
|
2210
|
-
|
|
2211
|
-
if (
|
|
2212
|
-
const
|
|
2213
|
-
|
|
2214
|
-
for (const
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
} else if (
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2220
|
-
for (const
|
|
2221
|
-
|
|
2222
|
-
|
|
2305
|
+
const $ = o.states.designer.value._getContext().getAggs();
|
|
2306
|
+
for (const d of $) {
|
|
2307
|
+
b(d.inner);
|
|
2308
|
+
const w = o.commands._genAggCode(d), f = [...r.value.namespace.split(/\./), r.value.moduleName];
|
|
2309
|
+
w.forEach((v) => {
|
|
2310
|
+
if (v.type === "Agg") {
|
|
2311
|
+
const N = new I(f, s(d) + ".java");
|
|
2312
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2313
|
+
for (const E of v.imports)
|
|
2314
|
+
N.appendContentln(`import ${E};`);
|
|
2315
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2316
|
+
} else if (v.type === "AggImpl") {
|
|
2317
|
+
const N = new I(f, s(d) + "Impl.java");
|
|
2318
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2319
|
+
for (const E of v.imports)
|
|
2320
|
+
N.appendContentln(`import ${E};`);
|
|
2321
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2223
2322
|
} else
|
|
2224
|
-
isNever(
|
|
2323
|
+
isNever(v.type);
|
|
2225
2324
|
});
|
|
2226
2325
|
}
|
|
2227
|
-
const
|
|
2228
|
-
for (const
|
|
2229
|
-
|
|
2230
|
-
const
|
|
2231
|
-
|
|
2232
|
-
const
|
|
2233
|
-
|
|
2234
|
-
for (const
|
|
2235
|
-
|
|
2236
|
-
|
|
2326
|
+
const l = o.states.designer.value._getContext().getEvents();
|
|
2327
|
+
for (const d of l) {
|
|
2328
|
+
b(d.inner);
|
|
2329
|
+
const w = o.commands._genEventCode(d), f = [...r.value.namespace.split(/\./), r.value.moduleName, t];
|
|
2330
|
+
w.forEach((v) => {
|
|
2331
|
+
const N = new I(f, s(d) + ".java");
|
|
2332
|
+
N.appendContentln(`package ${r.value.namespace}.${r.value.moduleName}.${t};`), N.appendContentln(""), N.addImports(v.imports);
|
|
2333
|
+
for (const E of v.imports)
|
|
2334
|
+
N.appendContentln(`import ${E};`);
|
|
2335
|
+
N.appendContentln(""), N.appendContentln(v.content), i.push(N);
|
|
2237
2336
|
});
|
|
2238
2337
|
}
|
|
2239
|
-
return
|
|
2338
|
+
return i;
|
|
2240
2339
|
});
|
|
2241
2340
|
}
|
|
2242
2341
|
};
|
|
2243
|
-
}),
|
|
2342
|
+
}), ke = ye.KotlinGeneratorAddition, xo = pe.createHotSwapPlugin(() => ({
|
|
2244
2343
|
unmount({ api: e }) {
|
|
2245
2344
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2246
2345
|
},
|
|
2247
2346
|
mount({ api: e }) {
|
|
2248
|
-
const n = "value", t = e.states.context,
|
|
2249
|
-
function
|
|
2250
|
-
return !
|
|
2347
|
+
const n = "value", t = e.states.context, s = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((m) => y.stringToLowerCamel(m));
|
|
2348
|
+
function o(m) {
|
|
2349
|
+
return !s.includes(y.stringToLowerCamel(m._attributes.name));
|
|
2251
2350
|
}
|
|
2252
|
-
function
|
|
2253
|
-
return
|
|
2351
|
+
function r(m, a) {
|
|
2352
|
+
return o(a) ? y.stringToUpperCamel(a._attributes.name) : _(m, a);
|
|
2254
2353
|
}
|
|
2255
|
-
function c(
|
|
2256
|
-
return
|
|
2354
|
+
function c(m) {
|
|
2355
|
+
return y.stringToUpperCamel(m._attributes.name);
|
|
2257
2356
|
}
|
|
2258
|
-
function g(
|
|
2259
|
-
for (const
|
|
2260
|
-
if (!
|
|
2261
|
-
|
|
2357
|
+
function g(m, a) {
|
|
2358
|
+
for (const u of a) {
|
|
2359
|
+
if (!o(u)) {
|
|
2360
|
+
_(m, u);
|
|
2262
2361
|
continue;
|
|
2263
2362
|
}
|
|
2264
|
-
|
|
2265
|
-
`${t.value.namespace}.${t.value.moduleName}.${n}.${c(
|
|
2363
|
+
m.add(
|
|
2364
|
+
`${t.value.namespace}.${t.value.moduleName}.${n}.${c(u)}`
|
|
2266
2365
|
);
|
|
2267
2366
|
}
|
|
2268
2367
|
}
|
|
2269
|
-
function
|
|
2270
|
-
const
|
|
2271
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2368
|
+
function _(m, a) {
|
|
2369
|
+
const u = t.value.additions, i = y.stringToLowerSnake(a._attributes.name).replace(/_/, " ");
|
|
2370
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(i) ? u.has(ke.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(i) ? "Integer" : /\b(price)$/.test(i) ? (m.add("java.math.BigDecimal"), "BigDecimal") : /^(if|is)\b/.test(i) ? "Boolean" : Se(a) && (a._attributes.type === "Id" || a._attributes.type === "Version") || /\b(id|identifier|ver|version)$/.test(i) ? "Long" : "String";
|
|
2272
2371
|
}
|
|
2273
2372
|
e.commands._setInfoCodeProvider(
|
|
2274
|
-
(
|
|
2275
|
-
const
|
|
2276
|
-
return
|
|
2373
|
+
(m) => {
|
|
2374
|
+
const a = /* @__PURE__ */ new Set(), u = c(m), i = t.value.additions, p = [];
|
|
2375
|
+
return i.has(ke.ValueClass) ? (a.add("kotlin.jvm.JvmInline"), p.push("@JvmInline"), p.push(`value class ${u}(val value: ${_(a, m)})`)) : p.push(`data class ${u}(val value: ${_(a, m)})`), [
|
|
2277
2376
|
{
|
|
2278
2377
|
type: "Info",
|
|
2279
|
-
imports:
|
|
2280
|
-
content:
|
|
2378
|
+
imports: a,
|
|
2379
|
+
content: p.join(`
|
|
2281
2380
|
`)
|
|
2282
2381
|
}
|
|
2283
2382
|
];
|
|
2284
2383
|
}
|
|
2285
2384
|
), e.commands._setCommandCodeProvider(
|
|
2286
|
-
(
|
|
2287
|
-
const
|
|
2385
|
+
(m) => {
|
|
2386
|
+
const a = [], u = t.value.additions;
|
|
2288
2387
|
{
|
|
2289
|
-
const
|
|
2290
|
-
g(
|
|
2291
|
-
const
|
|
2292
|
-
for (const $ of
|
|
2293
|
-
const
|
|
2294
|
-
|
|
2388
|
+
const i = /* @__PURE__ */ new Set(), p = c(m), b = [], C = Object.values(m.inner);
|
|
2389
|
+
g(i, C);
|
|
2390
|
+
const h = [];
|
|
2391
|
+
for (const $ of C) {
|
|
2392
|
+
const l = c($);
|
|
2393
|
+
h.push(`val ${y.lowerFirst(l)}: ${r(i, $)}`);
|
|
2295
2394
|
}
|
|
2296
|
-
|
|
2395
|
+
b.push(`data class ${p}(${h.join(", ")})`), a.push({
|
|
2297
2396
|
type: "Command",
|
|
2298
|
-
imports:
|
|
2299
|
-
content:
|
|
2397
|
+
imports: i,
|
|
2398
|
+
content: b.join(`
|
|
2300
2399
|
`)
|
|
2301
2400
|
});
|
|
2302
2401
|
}
|
|
2303
|
-
if (!
|
|
2304
|
-
return
|
|
2402
|
+
if (!u.has(ke.CommandHandler))
|
|
2403
|
+
return a;
|
|
2305
2404
|
{
|
|
2306
|
-
const
|
|
2307
|
-
|
|
2308
|
-
const
|
|
2309
|
-
(
|
|
2405
|
+
const i = /* @__PURE__ */ new Set(), p = c(m), b = [];
|
|
2406
|
+
b.push(`class ${p}Handler {`);
|
|
2407
|
+
const C = [...e.states.designer.value._getContext().getAssociationMap()[m._attributes.__id]].filter(
|
|
2408
|
+
(h) => h._attributes.rule === "Agg"
|
|
2310
2409
|
);
|
|
2311
|
-
for (const
|
|
2312
|
-
|
|
2313
|
-
|
|
2410
|
+
for (const h of C)
|
|
2411
|
+
i.add(`${t.value.namespace}.${t.value.moduleName}.${c(h)}`), b.push(` fun handle(command: ${p}): ${c(h)} {`), b.push(" // HACK Implement"), b.push(" }");
|
|
2412
|
+
b.push("}"), a.push({
|
|
2314
2413
|
type: "CommandHandler",
|
|
2315
|
-
imports:
|
|
2316
|
-
content:
|
|
2414
|
+
imports: i,
|
|
2415
|
+
content: b.join(`
|
|
2317
2416
|
`)
|
|
2318
2417
|
});
|
|
2319
2418
|
}
|
|
2320
|
-
return
|
|
2419
|
+
return a;
|
|
2321
2420
|
}
|
|
2322
2421
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2323
|
-
(
|
|
2324
|
-
const
|
|
2325
|
-
g(
|
|
2326
|
-
const
|
|
2327
|
-
for (const
|
|
2328
|
-
const
|
|
2329
|
-
|
|
2422
|
+
(m) => {
|
|
2423
|
+
const a = /* @__PURE__ */ new Set(), u = c(m), i = [], p = Object.values(m.inner);
|
|
2424
|
+
g(a, p);
|
|
2425
|
+
const b = [];
|
|
2426
|
+
for (const C of p) {
|
|
2427
|
+
const h = c(C);
|
|
2428
|
+
b.push(`val ${y.lowerFirst(h)}: ${r(a, C)}`);
|
|
2330
2429
|
}
|
|
2331
|
-
return
|
|
2430
|
+
return i.push(`data class ${u}(${b.join(", ")})`), [
|
|
2332
2431
|
{
|
|
2333
2432
|
type: "FacadeCommand",
|
|
2334
|
-
imports:
|
|
2335
|
-
content:
|
|
2433
|
+
imports: a,
|
|
2434
|
+
content: i.join(`
|
|
2336
2435
|
`)
|
|
2337
2436
|
}
|
|
2338
2437
|
];
|
|
2339
2438
|
}
|
|
2340
|
-
), e.commands._setAggCodeProvider((
|
|
2341
|
-
const
|
|
2342
|
-
g(
|
|
2343
|
-
const
|
|
2344
|
-
for (const
|
|
2345
|
-
const
|
|
2346
|
-
|
|
2439
|
+
), e.commands._setAggCodeProvider((m) => {
|
|
2440
|
+
const a = /* @__PURE__ */ new Set(), u = e.states.designer.value, i = c(m), p = [], b = Object.values(m.inner);
|
|
2441
|
+
g(a, b);
|
|
2442
|
+
const C = [], h = [...u._getContext().getAssociationMap()[m._attributes.__id]].filter((l) => l._attributes.rule === "Command" || l._attributes.rule === "FacadeCommand");
|
|
2443
|
+
for (const l of h) {
|
|
2444
|
+
const d = c(l);
|
|
2445
|
+
C.push(`fun handle(command: ${d})`);
|
|
2347
2446
|
}
|
|
2348
|
-
|
|
2349
|
-
`)}`),
|
|
2447
|
+
p.push(`interface ${i} {`), p.push(` ${C.join(`
|
|
2448
|
+
`)}`), p.push("}"), p.push(""), p.push(`class ${i}Impl(`);
|
|
2350
2449
|
const $ = [];
|
|
2351
|
-
for (const
|
|
2352
|
-
const
|
|
2353
|
-
$.push(`val ${
|
|
2450
|
+
for (const l of b) {
|
|
2451
|
+
const d = c(l);
|
|
2452
|
+
$.push(`val ${y.lowerFirst(d)}: ${r(a, l)}`);
|
|
2354
2453
|
}
|
|
2355
|
-
|
|
2356
|
-
`)}`),
|
|
2357
|
-
for (const
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2454
|
+
p.push(` ${$.join(`,
|
|
2455
|
+
`)}`), p.push(`): ${i} {`);
|
|
2456
|
+
for (const l of h) {
|
|
2457
|
+
const d = c(l);
|
|
2458
|
+
p.push(` override fun handle(command: ${d}) {`), p.push(" // HACK Implement"), p.push(" }");
|
|
2360
2459
|
}
|
|
2361
|
-
return
|
|
2460
|
+
return p.push("}"), [
|
|
2362
2461
|
{
|
|
2363
2462
|
type: "Agg",
|
|
2364
|
-
imports:
|
|
2365
|
-
content:
|
|
2463
|
+
imports: a,
|
|
2464
|
+
content: p.join(`
|
|
2366
2465
|
`)
|
|
2367
2466
|
}
|
|
2368
2467
|
];
|
|
2369
2468
|
}), e.commands._setEventCodeProvider(
|
|
2370
|
-
(
|
|
2371
|
-
const
|
|
2372
|
-
g(
|
|
2373
|
-
const
|
|
2374
|
-
for (const
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2469
|
+
(m) => {
|
|
2470
|
+
const a = /* @__PURE__ */ new Set(), u = c(m), i = [], p = Object.values(m.inner);
|
|
2471
|
+
g(a, p);
|
|
2472
|
+
const b = [];
|
|
2473
|
+
for (const C of p) {
|
|
2474
|
+
const h = c(C);
|
|
2475
|
+
b.push(`val ${y.lowerFirst(h)}: ${r(a, C)}`);
|
|
2377
2476
|
}
|
|
2378
|
-
return
|
|
2477
|
+
return i.push(`data class ${u}(${b.join(", ")})`), [
|
|
2379
2478
|
{
|
|
2380
2479
|
type: "Event",
|
|
2381
|
-
imports:
|
|
2382
|
-
content:
|
|
2480
|
+
imports: a,
|
|
2481
|
+
content: i.join(`
|
|
2383
2482
|
`)
|
|
2384
2483
|
}
|
|
2385
2484
|
];
|
|
2386
2485
|
}
|
|
2387
2486
|
), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => {
|
|
2388
|
-
const
|
|
2389
|
-
function
|
|
2390
|
-
for (const $ of Object.values(
|
|
2391
|
-
if (!
|
|
2487
|
+
const m = [], a = {};
|
|
2488
|
+
function u(h) {
|
|
2489
|
+
for (const $ of Object.values(h)) {
|
|
2490
|
+
if (!o($))
|
|
2392
2491
|
continue;
|
|
2393
|
-
const
|
|
2394
|
-
if (
|
|
2492
|
+
const l = [...t.value.namespace.split(/\./), t.value.moduleName, n], d = c($) + ".kt";
|
|
2493
|
+
if (a[`${l.join("/")}/${d}`] === !0)
|
|
2395
2494
|
continue;
|
|
2396
|
-
const
|
|
2397
|
-
if (
|
|
2495
|
+
const w = e.commands._genInfoCode($);
|
|
2496
|
+
if (w.length === 0)
|
|
2398
2497
|
continue;
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2401
|
-
for (const
|
|
2402
|
-
|
|
2403
|
-
|
|
2498
|
+
const f = new I(l, d);
|
|
2499
|
+
f.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}.${n}`), f.appendContentln("");
|
|
2500
|
+
for (const v of w[0].imports)
|
|
2501
|
+
f.appendContentln(`import ${v}`);
|
|
2502
|
+
f.appendContentln(""), f.appendContentln(w[0].content), m.push(f), a[`${l.join("/")}/${d}`] = !0;
|
|
2404
2503
|
}
|
|
2405
2504
|
}
|
|
2406
|
-
const
|
|
2407
|
-
for (const
|
|
2408
|
-
|
|
2409
|
-
const $ = e.commands._genCommandCode(
|
|
2410
|
-
|
|
2411
|
-
|
|
2505
|
+
const i = e.states.designer.value._getContext().getCommands();
|
|
2506
|
+
for (const h of i) {
|
|
2507
|
+
u(h.inner);
|
|
2508
|
+
const $ = e.commands._genCommandCode(h), l = [...t.value.namespace.split(/\./), t.value.moduleName], d = new I(l, c(h) + ".kt"), w = [];
|
|
2509
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((f) => {
|
|
2510
|
+
f.type === "Command" || f.type === "CommandHandler" ? (d.addImports(f.imports), w.push(f.content)) : isNever(f.type);
|
|
2412
2511
|
});
|
|
2413
|
-
for (const
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
for (const
|
|
2417
|
-
|
|
2418
|
-
|
|
2512
|
+
for (const f of d.getImports())
|
|
2513
|
+
d.appendContentln(`import ${f}`);
|
|
2514
|
+
d.appendContentln("");
|
|
2515
|
+
for (const f of w)
|
|
2516
|
+
d.appendContentln(f);
|
|
2517
|
+
m.push(d);
|
|
2419
2518
|
}
|
|
2420
|
-
const
|
|
2421
|
-
for (const
|
|
2422
|
-
|
|
2423
|
-
const $ = e.commands._genFacadeCommandCode(
|
|
2424
|
-
$.forEach((
|
|
2425
|
-
|
|
2426
|
-
const h = new j(_, c(f) + ".kt");
|
|
2427
|
-
h.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), h.appendContentln(""), h.addImports(b.imports);
|
|
2428
|
-
for (const u of b.imports)
|
|
2429
|
-
h.appendContentln(`import ${u}`);
|
|
2430
|
-
h.appendContentln(""), h.appendContentln(b.content), d.push(h);
|
|
2431
|
-
} else
|
|
2432
|
-
isNever(b.type);
|
|
2519
|
+
const p = e.states.designer.value._getContext().getFacadeCommands();
|
|
2520
|
+
for (const h of p) {
|
|
2521
|
+
u(h.inner);
|
|
2522
|
+
const $ = e.commands._genFacadeCommandCode(h), l = [...t.value.namespace.split(/\./), t.value.moduleName], d = new I(l, c(h) + ".kt"), w = [];
|
|
2523
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((f) => {
|
|
2524
|
+
f.type === "FacadeCommand" || f.type === "FacadeCommandHandler" ? (d.addImports(f.imports), w.push(f.content)) : isNever(f.type);
|
|
2433
2525
|
});
|
|
2526
|
+
for (const f of d.getImports())
|
|
2527
|
+
d.appendContentln(`import ${f}`);
|
|
2528
|
+
d.appendContentln("");
|
|
2529
|
+
for (const f of w)
|
|
2530
|
+
d.appendContentln(f);
|
|
2531
|
+
m.push(d);
|
|
2434
2532
|
}
|
|
2435
|
-
const
|
|
2436
|
-
for (const
|
|
2437
|
-
|
|
2438
|
-
const $ = e.commands._genAggCode(
|
|
2439
|
-
|
|
2440
|
-
|
|
2533
|
+
const b = e.states.designer.value._getContext().getAggs();
|
|
2534
|
+
for (const h of b) {
|
|
2535
|
+
u(h.inner);
|
|
2536
|
+
const $ = e.commands._genAggCode(h), l = [...t.value.namespace.split(/\./), t.value.moduleName], d = new I(l, c(h) + ".kt"), w = [];
|
|
2537
|
+
d.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), d.appendContentln(""), $.forEach((f) => {
|
|
2538
|
+
f.type === "Agg" || f.type === "AggImpl" ? (d.addImports(f.imports), w.push(f.content)) : isNever(f.type);
|
|
2441
2539
|
});
|
|
2442
|
-
for (const
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
for (const
|
|
2446
|
-
|
|
2447
|
-
|
|
2540
|
+
for (const f of d.getImports())
|
|
2541
|
+
d.appendContentln(`import ${f}`);
|
|
2542
|
+
d.appendContentln("");
|
|
2543
|
+
for (const f of w)
|
|
2544
|
+
d.appendContentln(f);
|
|
2545
|
+
m.push(d);
|
|
2448
2546
|
}
|
|
2449
|
-
const
|
|
2450
|
-
for (const
|
|
2451
|
-
|
|
2452
|
-
const $ = e.commands._genEventCode(
|
|
2453
|
-
$.forEach((
|
|
2454
|
-
if (
|
|
2455
|
-
const
|
|
2456
|
-
|
|
2457
|
-
for (const
|
|
2458
|
-
|
|
2459
|
-
|
|
2547
|
+
const C = e.states.designer.value._getContext().getEvents();
|
|
2548
|
+
for (const h of C) {
|
|
2549
|
+
u(h.inner);
|
|
2550
|
+
const $ = e.commands._genEventCode(h), l = [...t.value.namespace.split(/\./), t.value.moduleName];
|
|
2551
|
+
$.forEach((d) => {
|
|
2552
|
+
if (d.type === "Event") {
|
|
2553
|
+
const w = new I(l, c(h) + ".kt");
|
|
2554
|
+
w.appendContentln(`package ${t.value.namespace}.${t.value.moduleName}`), w.appendContentln(""), w.addImports(d.imports);
|
|
2555
|
+
for (const f of d.imports)
|
|
2556
|
+
w.appendContentln(`import ${f}`);
|
|
2557
|
+
w.appendContentln(""), w.appendContentln(d.content), m.push(w);
|
|
2460
2558
|
} else
|
|
2461
|
-
isNever(
|
|
2559
|
+
isNever(d.type);
|
|
2462
2560
|
});
|
|
2463
2561
|
}
|
|
2464
|
-
return
|
|
2562
|
+
return m;
|
|
2465
2563
|
});
|
|
2466
2564
|
}
|
|
2467
|
-
})),
|
|
2565
|
+
})), To = pe.createHotSwapPlugin(() => ({
|
|
2468
2566
|
unmount({ api: e }) {
|
|
2469
2567
|
e.commands.clearCaches(), e.commands._setCommandCodeProvider(() => []), e.commands._setFacadeCommandCodeProvider(() => []), e.commands._setAggCodeProvider(() => []), e.commands._setEventCodeProvider(() => []), e.commands._setReadModelCodeProvider(() => []), e.commands._setCodeFileProvider(() => []), e.commands.setContext({});
|
|
2470
2568
|
},
|
|
2471
2569
|
mount({ api: e }) {
|
|
2472
|
-
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((
|
|
2473
|
-
function
|
|
2474
|
-
return !t.includes(
|
|
2570
|
+
const n = e.states.context, t = e.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((_) => y.stringToLowerCamel(_));
|
|
2571
|
+
function s(_) {
|
|
2572
|
+
return !t.includes(y.stringToLowerCamel(_._attributes.name));
|
|
2475
2573
|
}
|
|
2476
|
-
function
|
|
2477
|
-
return
|
|
2574
|
+
function o(_, m) {
|
|
2575
|
+
return s(m) ? y.stringToUpperCamel(m._attributes.name) : g(_, m);
|
|
2478
2576
|
}
|
|
2479
|
-
function
|
|
2480
|
-
return
|
|
2577
|
+
function r(_) {
|
|
2578
|
+
return y.stringToUpperCamel(_._attributes.name);
|
|
2481
2579
|
}
|
|
2482
|
-
function c(
|
|
2483
|
-
return
|
|
2580
|
+
function c(_) {
|
|
2581
|
+
return y.stringToLowerCamel(_._attributes.name);
|
|
2484
2582
|
}
|
|
2485
|
-
function g(
|
|
2486
|
-
const
|
|
2487
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2583
|
+
function g(_, m) {
|
|
2584
|
+
const a = y.stringToLowerSnake(m._attributes.name).replace(/_/, " ");
|
|
2585
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(a) ? (_.add("time"), "time.Time") : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(a) ? "int" : /\b(price)$/.test(a) ? "string" : /^(if|is)\b/.test(a) ? "bool" : Se(m) && (m._attributes.type === "Id" || m._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(a)) ? "int64" : "string";
|
|
2488
2586
|
}
|
|
2489
2587
|
e.commands._setInfoCodeProvider(
|
|
2490
|
-
(
|
|
2491
|
-
const
|
|
2492
|
-
return
|
|
2493
|
-
`func New${
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
)}) ${
|
|
2497
|
-
),
|
|
2498
|
-
`func (${c(
|
|
2499
|
-
|
|
2500
|
-
|
|
2588
|
+
(_) => {
|
|
2589
|
+
const m = /* @__PURE__ */ new Set(), a = [];
|
|
2590
|
+
return a.push(`type ${r(_)} struct {`), a.push(` value ${g(m, _)}`), a.push("}"), a.push(""), a.push(
|
|
2591
|
+
`func New${r(_)}(value ${g(
|
|
2592
|
+
m,
|
|
2593
|
+
_
|
|
2594
|
+
)}) ${r(_)} {`
|
|
2595
|
+
), a.push(" // HACK check value"), a.push(` return ${r(_)}{value}`), a.push("}"), a.push(
|
|
2596
|
+
`func (${c(_)} ${r(_)}) GetValue() ${g(
|
|
2597
|
+
m,
|
|
2598
|
+
_
|
|
2501
2599
|
)} {`
|
|
2502
|
-
),
|
|
2600
|
+
), a.push(` return ${c(_)}.value`), a.push("}"), [{ type: "Info", imports: m, content: a.join(`
|
|
2503
2601
|
`) }];
|
|
2504
2602
|
}
|
|
2505
2603
|
), e.commands._setCommandCodeProvider(
|
|
2506
|
-
(
|
|
2507
|
-
const
|
|
2508
|
-
|
|
2509
|
-
const
|
|
2510
|
-
for (const
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
for (const
|
|
2514
|
-
|
|
2515
|
-
`func (${
|
|
2516
|
-
|
|
2517
|
-
|
|
2604
|
+
(_) => {
|
|
2605
|
+
const m = r(_), a = c(_), u = /* @__PURE__ */ new Set(), i = [];
|
|
2606
|
+
i.push(`type ${m} struct {`);
|
|
2607
|
+
const p = Object.values(_.inner);
|
|
2608
|
+
for (const h of p)
|
|
2609
|
+
i.push(` ${c(h)} ${o(u, h)}`);
|
|
2610
|
+
i.push("}");
|
|
2611
|
+
for (const h of p)
|
|
2612
|
+
i.push(
|
|
2613
|
+
`func (${a} ${m}) Get${r(h)} () ${o(
|
|
2614
|
+
u,
|
|
2615
|
+
h
|
|
2518
2616
|
)} {`
|
|
2519
|
-
),
|
|
2520
|
-
const
|
|
2521
|
-
for (const
|
|
2522
|
-
|
|
2523
|
-
return
|
|
2524
|
-
`)},`),
|
|
2617
|
+
), i.push(` return ${a}.${c(h)}`), i.push("}");
|
|
2618
|
+
const b = [], C = [];
|
|
2619
|
+
for (const h of p)
|
|
2620
|
+
b.push(`${c(h)} ${o(u, h)}`), C.push(c(h));
|
|
2621
|
+
return i.push(`func New${m}(${b.join(", ")}) ${m} {`), i.push(" // HACK check value"), i.push(` return ${m}{`), i.push(` ${C.join(`,
|
|
2622
|
+
`)},`), i.push(" }"), i.push("}"), [{ type: "Command", imports: u, content: i.join(`
|
|
2525
2623
|
`) }];
|
|
2526
2624
|
}
|
|
2527
2625
|
), e.commands._setFacadeCommandCodeProvider(
|
|
2528
|
-
(
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2531
|
-
for (const
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
for (const
|
|
2535
|
-
|
|
2536
|
-
`func (${
|
|
2537
|
-
|
|
2538
|
-
|
|
2626
|
+
(_) => {
|
|
2627
|
+
const m = r(_), a = c(_), u = Object.values(_.inner), i = /* @__PURE__ */ new Set(), p = [];
|
|
2628
|
+
p.push(`type ${m} struct {`);
|
|
2629
|
+
for (const h of u)
|
|
2630
|
+
p.push(` ${c(h)} ${o(i, h)}`);
|
|
2631
|
+
p.push("}");
|
|
2632
|
+
for (const h of u)
|
|
2633
|
+
p.push(
|
|
2634
|
+
`func (${a} ${m}) Get${r(h)} () ${o(
|
|
2635
|
+
i,
|
|
2636
|
+
h
|
|
2539
2637
|
)} {`
|
|
2540
|
-
),
|
|
2541
|
-
const
|
|
2542
|
-
for (const
|
|
2543
|
-
|
|
2544
|
-
return
|
|
2545
|
-
`)},`),
|
|
2638
|
+
), p.push(` return ${a}.${c(h)}`), p.push("}");
|
|
2639
|
+
const b = [], C = [];
|
|
2640
|
+
for (const h of u)
|
|
2641
|
+
b.push(`${c(h)} ${o(i, h)}`), C.push(c(h));
|
|
2642
|
+
return p.push(`func New${m}(${b.join(", ")}) ${m} {`), p.push(" // HACK check value"), p.push(` return ${m}{`), p.push(` ${C.join(`,
|
|
2643
|
+
`)},`), p.push(" }"), p.push("}"), [
|
|
2546
2644
|
{
|
|
2547
2645
|
type: "FacadeCommand",
|
|
2548
|
-
imports:
|
|
2549
|
-
content:
|
|
2646
|
+
imports: i,
|
|
2647
|
+
content: p.join(`
|
|
2550
2648
|
`)
|
|
2551
2649
|
}
|
|
2552
2650
|
];
|
|
2553
2651
|
}
|
|
2554
|
-
), e.commands._setAggCodeProvider((
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
for (const
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
for (const
|
|
2561
|
-
|
|
2562
|
-
`func (${
|
|
2563
|
-
|
|
2564
|
-
|
|
2652
|
+
), e.commands._setAggCodeProvider((_) => {
|
|
2653
|
+
const m = e.states.designer.value, a = r(_), u = c(_), i = Object.values(_.inner), p = /* @__PURE__ */ new Set(), b = [];
|
|
2654
|
+
b.push(`type ${a} struct {`);
|
|
2655
|
+
for (const l of i)
|
|
2656
|
+
b.push(` ${c(l)} ${o(p, l)}`);
|
|
2657
|
+
b.push("}");
|
|
2658
|
+
for (const l of i)
|
|
2659
|
+
b.push(
|
|
2660
|
+
`func (${u} ${a}) Get${r(l)} () ${o(
|
|
2661
|
+
p,
|
|
2662
|
+
l
|
|
2565
2663
|
)} {`
|
|
2566
|
-
),
|
|
2567
|
-
const
|
|
2568
|
-
for (const
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
`)},`),
|
|
2572
|
-
const $ = [...
|
|
2573
|
-
for (const
|
|
2574
|
-
const
|
|
2575
|
-
|
|
2664
|
+
), b.push(` return ${u}.${c(l)}`), b.push("}");
|
|
2665
|
+
const C = [], h = [];
|
|
2666
|
+
for (const l of i)
|
|
2667
|
+
C.push(`${c(l)} ${o(p, l)}`), h.push(c(l));
|
|
2668
|
+
b.push(`func New${a}(${C.join(", ")}) ${a} {`), b.push(" // HACK check value"), b.push(` return ${a}{`), b.push(` ${h.join(`,
|
|
2669
|
+
`)},`), b.push(" }"), b.push("}"), b.push("");
|
|
2670
|
+
const $ = [...m._getContext().getAssociationMap()[_._attributes.__id]].filter((l) => l._attributes.rule === "Command" || l._attributes.rule === "FacadeCommand");
|
|
2671
|
+
for (const l of $) {
|
|
2672
|
+
const d = r(l), w = c(l);
|
|
2673
|
+
b.push(`func (${u} ${a}) Handle${d} (${w} ${d}) {`), b.push(" // HACK implement"), b.push("}");
|
|
2576
2674
|
}
|
|
2577
2675
|
return [
|
|
2578
2676
|
{
|
|
2579
2677
|
type: "Agg",
|
|
2580
|
-
imports:
|
|
2581
|
-
content:
|
|
2678
|
+
imports: p,
|
|
2679
|
+
content: b.join(`
|
|
2582
2680
|
`)
|
|
2583
2681
|
}
|
|
2584
2682
|
];
|
|
2585
2683
|
}), e.commands._setEventCodeProvider(
|
|
2586
|
-
(
|
|
2587
|
-
const
|
|
2588
|
-
|
|
2589
|
-
for (const
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
for (const
|
|
2593
|
-
|
|
2594
|
-
`func (${
|
|
2595
|
-
|
|
2596
|
-
|
|
2684
|
+
(_) => {
|
|
2685
|
+
const m = [], a = /* @__PURE__ */ new Set(), u = Object.values(_.inner), i = r(_), p = c(_);
|
|
2686
|
+
m.push(`type ${i} struct {`);
|
|
2687
|
+
for (const h of u)
|
|
2688
|
+
m.push(` ${c(h)} ${o(a, h)}`);
|
|
2689
|
+
m.push("}");
|
|
2690
|
+
for (const h of u)
|
|
2691
|
+
m.push(
|
|
2692
|
+
`func (${p} ${i}) Get${r(h)} () ${o(
|
|
2693
|
+
a,
|
|
2694
|
+
h
|
|
2597
2695
|
)} {`
|
|
2598
|
-
),
|
|
2599
|
-
const
|
|
2600
|
-
for (const
|
|
2601
|
-
|
|
2602
|
-
return
|
|
2603
|
-
`)},`),
|
|
2696
|
+
), m.push(` return ${p}.${c(h)}`), m.push("}");
|
|
2697
|
+
const b = [], C = [];
|
|
2698
|
+
for (const h of u)
|
|
2699
|
+
b.push(`${c(h)} ${o(a, h)}`), C.push(c(h));
|
|
2700
|
+
return m.push(`func New${i}(${b.join(", ")}) ${i} {`), m.push(" // HACK check value"), m.push(` return ${i}{`), m.push(` ${C.join(`,
|
|
2701
|
+
`)},`), m.push(" }"), m.push("}"), [
|
|
2604
2702
|
{
|
|
2605
2703
|
type: "Event",
|
|
2606
|
-
imports:
|
|
2607
|
-
content:
|
|
2704
|
+
imports: a,
|
|
2705
|
+
content: m.join(`
|
|
2608
2706
|
`)
|
|
2609
2707
|
}
|
|
2610
2708
|
];
|
|
2611
2709
|
}
|
|
2612
2710
|
), e.commands._setCodeFileProvider(() => {
|
|
2613
|
-
const
|
|
2614
|
-
function
|
|
2615
|
-
for (const
|
|
2616
|
-
if (!
|
|
2711
|
+
const _ = [], m = {}, a = [...n.value.namespace.split(/\./), n.value.moduleName], u = new I(a, `${n.value.moduleName}.go`), i = [], p = new I(a, `${n.value.moduleName}_value_object.go`), b = [];
|
|
2712
|
+
function C(w) {
|
|
2713
|
+
for (const f of Object.values(w)) {
|
|
2714
|
+
if (!s(f))
|
|
2617
2715
|
continue;
|
|
2618
|
-
const
|
|
2619
|
-
if (
|
|
2716
|
+
const v = r(f);
|
|
2717
|
+
if (m[`${a.join("/")}/${v}`] === !0)
|
|
2620
2718
|
continue;
|
|
2621
|
-
const
|
|
2622
|
-
|
|
2719
|
+
const N = e.commands._genInfoCode(f);
|
|
2720
|
+
N.length !== 0 && (p.addImports(N[0].imports), b.push(N[0].content), b.push(""), m[`${a.join("/")}/${v}`] = !0);
|
|
2623
2721
|
}
|
|
2624
2722
|
}
|
|
2625
|
-
const
|
|
2626
|
-
for (const
|
|
2627
|
-
|
|
2628
|
-
const
|
|
2629
|
-
for (const
|
|
2630
|
-
|
|
2723
|
+
const h = e.states.designer.value._getContext().getCommands();
|
|
2724
|
+
for (const w of h) {
|
|
2725
|
+
C(w.inner);
|
|
2726
|
+
const f = e.commands._genCommandCode(w);
|
|
2727
|
+
for (const v of f)
|
|
2728
|
+
m[v.content] !== !0 && (u.addImports(v.imports), i.push(v.content));
|
|
2631
2729
|
}
|
|
2632
2730
|
const $ = e.states.designer.value._getContext().getFacadeCommands();
|
|
2633
|
-
for (const
|
|
2634
|
-
|
|
2635
|
-
const
|
|
2636
|
-
for (const
|
|
2637
|
-
|
|
2731
|
+
for (const w of $) {
|
|
2732
|
+
C(w.inner);
|
|
2733
|
+
const f = e.commands._genFacadeCommandCode(w);
|
|
2734
|
+
for (const v of f)
|
|
2735
|
+
m[v.content] !== !0 && (u.addImports(v.imports), i.push(v.content));
|
|
2638
2736
|
}
|
|
2639
|
-
const
|
|
2640
|
-
for (const
|
|
2641
|
-
|
|
2642
|
-
const
|
|
2643
|
-
for (const
|
|
2644
|
-
|
|
2737
|
+
const l = e.states.designer.value._getContext().getAggs();
|
|
2738
|
+
for (const w of l) {
|
|
2739
|
+
C(w.inner);
|
|
2740
|
+
const f = e.commands._genAggCode(w);
|
|
2741
|
+
for (const v of f)
|
|
2742
|
+
m[v.content] !== !0 && (u.addImports(v.imports), i.push(v.content));
|
|
2645
2743
|
}
|
|
2646
|
-
const
|
|
2647
|
-
for (const
|
|
2648
|
-
|
|
2649
|
-
const
|
|
2650
|
-
for (const
|
|
2651
|
-
|
|
2744
|
+
const d = e.states.designer.value._getContext().getEvents();
|
|
2745
|
+
for (const w of d) {
|
|
2746
|
+
C(w.inner);
|
|
2747
|
+
const f = e.commands._genEventCode(w);
|
|
2748
|
+
for (const v of f)
|
|
2749
|
+
m[v.content] !== !0 && (u.addImports(v.imports), i.push(v.content));
|
|
2652
2750
|
}
|
|
2653
|
-
return
|
|
2654
|
-
`)}`),
|
|
2655
|
-
`)),
|
|
2656
|
-
`)}`),
|
|
2657
|
-
`)),
|
|
2751
|
+
return u.appendContentln(`package ${n.value.moduleName}`), u.appendContentln(""), u.getImports().length > 0 && (u.appendContentln("import ("), u.appendContentln(` ${[...u.getImports()].join(`
|
|
2752
|
+
`)}`), u.appendContentln(")")), u.appendContentln(i.join(`
|
|
2753
|
+
`)), p.appendContentln(`package ${n.value.moduleName}`), p.appendContentln(""), p.getImports().length > 0 && (p.appendContentln("import ("), p.appendContentln(` ${[...p.getImports()].map((w) => `"${w}"`).join(`
|
|
2754
|
+
`)}`), p.appendContentln(")"), p.appendContentln("")), p.appendContentln(b.join(`
|
|
2755
|
+
`)), _.push(u), _.push(p), _;
|
|
2658
2756
|
});
|
|
2659
2757
|
}
|
|
2660
|
-
})),
|
|
2758
|
+
})), K = Ee.CSharpGeneratorAddition, Po = pe.createHotSwapPlugin(() => {
|
|
2661
2759
|
const e = " ";
|
|
2662
|
-
function n(t,
|
|
2760
|
+
function n(t, s = 1) {
|
|
2663
2761
|
return t.split(`
|
|
2664
|
-
`).map((
|
|
2762
|
+
`).map((o) => e.repeat(s) + o).join(`
|
|
2665
2763
|
`);
|
|
2666
2764
|
}
|
|
2667
2765
|
return {
|
|
@@ -2669,259 +2767,289 @@ const O = be.JavaGeneratorAddition, Oo = ue.createHotSwapPlugin(() => {
|
|
|
2669
2767
|
t.commands.clearCaches(), t.commands._setCommandCodeProvider(() => []), t.commands._setFacadeCommandCodeProvider(() => []), t.commands._setAggCodeProvider(() => []), t.commands._setEventCodeProvider(() => []), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => []), t.commands.setContext({});
|
|
2670
2768
|
},
|
|
2671
2769
|
mount({ api: t }) {
|
|
2672
|
-
const
|
|
2673
|
-
function a
|
|
2674
|
-
return !
|
|
2770
|
+
const s = t.states.context, o = t.states.designer.value._getContext().getDesignerOptions().ignoreValueObjects.map((a) => y.stringToLowerCamel(a));
|
|
2771
|
+
function r(a) {
|
|
2772
|
+
return !o.includes(y.stringToLowerCamel(a._attributes.name));
|
|
2675
2773
|
}
|
|
2676
|
-
function c(
|
|
2677
|
-
return
|
|
2774
|
+
function c(a, u) {
|
|
2775
|
+
return r(u) ? y.stringToUpperCamel(u._attributes.name) : m(a, u);
|
|
2678
2776
|
}
|
|
2679
|
-
function g(
|
|
2680
|
-
return
|
|
2777
|
+
function g(a) {
|
|
2778
|
+
return y.stringToUpperCamel(a._attributes.name);
|
|
2681
2779
|
}
|
|
2682
|
-
function
|
|
2683
|
-
return
|
|
2780
|
+
function _(a) {
|
|
2781
|
+
return a.has(K.RecordStruct) ? " struct" : "";
|
|
2684
2782
|
}
|
|
2685
|
-
function
|
|
2686
|
-
const
|
|
2687
|
-
return /\b(time|timestamp|date|deadline|expire)\b/.test(
|
|
2783
|
+
function m(a, u) {
|
|
2784
|
+
const i = s.value.additions, p = y.stringToLowerSnake(u._attributes.name).replace(/_/, " ");
|
|
2785
|
+
return /\b(time|timestamp|date|deadline|expire)\b/.test(p) ? i.has(K.Timezone) ? "System.DateTimeOffset" : "System.DateTime" : /\b(enum|gender|sex|count|amount|num|number|flag|times)\b/.test(p) ? "int" : /\b(price)$/.test(p) ? "decimal" : /^(if|is)\b/.test(p) ? "bool" : Se(u) && (u._attributes.type === "Id" || u._attributes.type === "Version" || /\b(id|identifier|ver|version)$/.test(p)) ? "long" : "string";
|
|
2688
2786
|
}
|
|
2689
2787
|
t.commands._setInfoCodeProvider(
|
|
2690
|
-
(
|
|
2691
|
-
const
|
|
2692
|
-
return
|
|
2693
|
-
`public record${
|
|
2694
|
-
|
|
2695
|
-
|
|
2788
|
+
(a) => {
|
|
2789
|
+
const u = s.value.additions, i = /* @__PURE__ */ new Set(), p = [];
|
|
2790
|
+
return p.push(
|
|
2791
|
+
`public record${_(u)} ${g(a)}(${m(
|
|
2792
|
+
i,
|
|
2793
|
+
a
|
|
2696
2794
|
)} value);`
|
|
2697
2795
|
), [
|
|
2698
2796
|
{
|
|
2699
2797
|
type: "Info",
|
|
2700
|
-
content:
|
|
2798
|
+
content: p.join(`
|
|
2701
2799
|
`),
|
|
2702
|
-
imports:
|
|
2800
|
+
imports: i
|
|
2703
2801
|
}
|
|
2704
2802
|
];
|
|
2705
2803
|
}
|
|
2706
2804
|
), t.commands._setCommandCodeProvider(
|
|
2707
|
-
(
|
|
2708
|
-
const
|
|
2805
|
+
(a) => {
|
|
2806
|
+
const u = [], i = s.value.additions, p = /* @__PURE__ */ new Set(), b = g(a);
|
|
2709
2807
|
{
|
|
2710
|
-
const
|
|
2711
|
-
|
|
2808
|
+
const C = [], h = Object.values(a.inner);
|
|
2809
|
+
C.push(`public record${_(i)} ${b}`), C.push("(");
|
|
2712
2810
|
const $ = [];
|
|
2713
|
-
for (const
|
|
2714
|
-
const
|
|
2715
|
-
$.push(`${c(
|
|
2811
|
+
for (const l of h) {
|
|
2812
|
+
const d = g(l);
|
|
2813
|
+
$.push(`${c(p, l)} ${y.upperFirst(d)}`);
|
|
2716
2814
|
}
|
|
2717
|
-
|
|
2718
|
-
`)}`),
|
|
2815
|
+
C.push(` ${$.join(`,
|
|
2816
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), u.push({
|
|
2719
2817
|
type: "Command",
|
|
2720
|
-
content:
|
|
2818
|
+
content: C.join(`
|
|
2721
2819
|
`),
|
|
2722
|
-
imports:
|
|
2820
|
+
imports: p
|
|
2723
2821
|
});
|
|
2724
2822
|
}
|
|
2725
2823
|
{
|
|
2726
|
-
const
|
|
2727
|
-
|
|
2824
|
+
const C = i.has(K.CommandHandlerInterface) ? ` : ${s.value.commandHandlerInterface}` : "", h = [];
|
|
2825
|
+
h.push(`public class ${b}Handler${C}`), h.push("{"), h.push(` public void Handle(${b} command)`), h.push(" {"), h.push(" // HACK implement"), h.push(" }"), h.push("}"), u.push({
|
|
2728
2826
|
type: "CommandHandler",
|
|
2729
|
-
content:
|
|
2827
|
+
content: h.join(`
|
|
2730
2828
|
`),
|
|
2731
|
-
imports:
|
|
2829
|
+
imports: p
|
|
2732
2830
|
});
|
|
2733
2831
|
}
|
|
2734
|
-
return
|
|
2832
|
+
return u;
|
|
2833
|
+
}
|
|
2834
|
+
), t.commands._setFacadeCommandCodeProvider(
|
|
2835
|
+
(a) => {
|
|
2836
|
+
const u = [], i = s.value.additions, p = /* @__PURE__ */ new Set(), b = g(a);
|
|
2837
|
+
{
|
|
2838
|
+
const C = [], h = Object.values(a.inner);
|
|
2839
|
+
C.push(`public record${_(i)} ${b}`), C.push("(");
|
|
2840
|
+
const $ = [];
|
|
2841
|
+
for (const l of h) {
|
|
2842
|
+
const d = g(l);
|
|
2843
|
+
$.push(`${c(p, l)} ${y.upperFirst(d)}`);
|
|
2844
|
+
}
|
|
2845
|
+
C.push(` ${$.join(`,
|
|
2846
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), u.push({
|
|
2847
|
+
type: "FacadeCommand",
|
|
2848
|
+
content: C.join(`
|
|
2849
|
+
`),
|
|
2850
|
+
imports: p
|
|
2851
|
+
});
|
|
2852
|
+
}
|
|
2853
|
+
{
|
|
2854
|
+
const C = i.has(K.CommandHandlerInterface) ? ` : ${s.value.commandHandlerInterface}` : "", h = [];
|
|
2855
|
+
h.push(`public class ${b}Handler${C}`), h.push("{"), h.push(` public void Handle(${b} command)`), h.push(" {"), h.push(" // HACK implement"), h.push(" }"), h.push("}"), u.push({
|
|
2856
|
+
type: "FacadeCommandHandler",
|
|
2857
|
+
content: h.join(`
|
|
2858
|
+
`),
|
|
2859
|
+
imports: p
|
|
2860
|
+
});
|
|
2861
|
+
}
|
|
2862
|
+
return u;
|
|
2735
2863
|
}
|
|
2736
2864
|
), t.commands._setAggCodeProvider(
|
|
2737
|
-
(
|
|
2738
|
-
const
|
|
2865
|
+
(a) => {
|
|
2866
|
+
const u = [], i = t.states.designer.value, p = s.value.additions;
|
|
2739
2867
|
{
|
|
2740
|
-
const
|
|
2741
|
-
|
|
2742
|
-
const $ = [],
|
|
2743
|
-
for (const
|
|
2744
|
-
const
|
|
2745
|
-
$.push(`void Handle${
|
|
2868
|
+
const b = /* @__PURE__ */ new Set(), C = [], h = p.has(K.AggInterface) ? ` : ${s.value.aggInterface}` : "";
|
|
2869
|
+
C.push(`public interface I${g(a)}${h}`), C.push("{");
|
|
2870
|
+
const $ = [], l = [...i._getContext().getAssociationMap()[a._attributes.__id]].filter((d) => d._attributes.rule === "Command" || d._attributes.rule === "FacadeCommand");
|
|
2871
|
+
for (const d of l) {
|
|
2872
|
+
const w = g(d);
|
|
2873
|
+
$.push(`void Handle${w}(${w} command);`);
|
|
2746
2874
|
}
|
|
2747
|
-
|
|
2875
|
+
C.push(` ${$.join(`
|
|
2748
2876
|
|
|
2749
|
-
`)}`),
|
|
2877
|
+
`)}`), C.push("}"), C.push(""), u.push({
|
|
2750
2878
|
type: "Agg",
|
|
2751
|
-
content:
|
|
2879
|
+
content: C.join(`
|
|
2752
2880
|
`),
|
|
2753
|
-
imports:
|
|
2881
|
+
imports: b
|
|
2754
2882
|
});
|
|
2755
2883
|
}
|
|
2756
2884
|
{
|
|
2757
|
-
const
|
|
2758
|
-
if (
|
|
2759
|
-
const
|
|
2760
|
-
for (const
|
|
2761
|
-
const
|
|
2762
|
-
|
|
2885
|
+
const b = /* @__PURE__ */ new Set(), C = [], h = g(a), $ = Object.values(a.inner), l = p.has(K.AggInterface) ? `, ${s.value.aggInterface}` : "";
|
|
2886
|
+
if (p.has(K.PrimaryConstructor)) {
|
|
2887
|
+
const d = [...i._getContext().getAssociationMap()[a._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand"), w = [];
|
|
2888
|
+
for (const v of $) {
|
|
2889
|
+
const N = g(v);
|
|
2890
|
+
w.push(`${c(b, v)} ${y.lowerFirst(N)}`);
|
|
2763
2891
|
}
|
|
2764
|
-
|
|
2765
|
-
`)}`),
|
|
2766
|
-
for (const
|
|
2767
|
-
const
|
|
2768
|
-
|
|
2769
|
-
` public ${c(
|
|
2770
|
-
|
|
2771
|
-
)} { get; private set; } = ${
|
|
2772
|
-
),
|
|
2892
|
+
C.push(`public class ${h}`), C.push("("), C.push(` ${w.join(`,
|
|
2893
|
+
`)}`), C.push(`): I${h}${l}`), C.push("{");
|
|
2894
|
+
for (const v of $) {
|
|
2895
|
+
const N = g(v);
|
|
2896
|
+
C.push(
|
|
2897
|
+
` public ${c(b, v)} ${y.upperFirst(
|
|
2898
|
+
N
|
|
2899
|
+
)} { get; private set; } = ${y.lowerFirst(N)};`
|
|
2900
|
+
), C.push("");
|
|
2773
2901
|
}
|
|
2774
|
-
const
|
|
2775
|
-
for (const
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2902
|
+
const f = [];
|
|
2903
|
+
for (const v of d) {
|
|
2904
|
+
const N = g(v);
|
|
2905
|
+
f.push(`public void Handle${N}(${N} command)`), f.push("{"), f.push(" // HACK implement"), f.push("}"), f.push("");
|
|
2778
2906
|
}
|
|
2779
|
-
|
|
2780
|
-
`)}`),
|
|
2907
|
+
C.push(` ${f.join(`
|
|
2908
|
+
`)}`), C.push("}");
|
|
2781
2909
|
} else {
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2784
|
-
for (const
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2787
|
-
` public ${c(
|
|
2788
|
-
|
|
2910
|
+
const d = [...i._getContext().getAssociationMap()[a._attributes.__id]].filter((v) => v._attributes.rule === "Command" || v._attributes.rule === "FacadeCommand");
|
|
2911
|
+
C.push(`public class ${h} : I${h}${l}`), C.push("{");
|
|
2912
|
+
for (const v of $) {
|
|
2913
|
+
const N = g(v);
|
|
2914
|
+
C.push(
|
|
2915
|
+
` public ${c(b, v)} ${y.lowerFirst(
|
|
2916
|
+
N
|
|
2789
2917
|
)} { get; private set; }`
|
|
2790
2918
|
);
|
|
2791
2919
|
}
|
|
2792
|
-
|
|
2793
|
-
const
|
|
2794
|
-
for (const
|
|
2795
|
-
const
|
|
2796
|
-
|
|
2920
|
+
C.push("");
|
|
2921
|
+
const w = [];
|
|
2922
|
+
for (const v of $) {
|
|
2923
|
+
const N = g(v);
|
|
2924
|
+
w.push(`${c(b, v)} ${N}`);
|
|
2797
2925
|
}
|
|
2798
|
-
|
|
2799
|
-
for (const
|
|
2800
|
-
const
|
|
2801
|
-
|
|
2926
|
+
C.push(` public ${h}(${w.join(", ")})`), C.push(" {");
|
|
2927
|
+
for (const v of $) {
|
|
2928
|
+
const N = g(v);
|
|
2929
|
+
C.push(` ${N} = ${y.lowerFirst(N)};`);
|
|
2802
2930
|
}
|
|
2803
|
-
|
|
2804
|
-
const
|
|
2805
|
-
for (const
|
|
2806
|
-
const
|
|
2807
|
-
|
|
2931
|
+
C.push(" }");
|
|
2932
|
+
const f = [];
|
|
2933
|
+
for (const v of d) {
|
|
2934
|
+
const N = g(v);
|
|
2935
|
+
f.push(`public void Handle${N}(${N} command)`), f.push("{"), f.push(" // HACK implement"), f.push("}"), f.push("");
|
|
2808
2936
|
}
|
|
2809
|
-
|
|
2810
|
-
`)}`),
|
|
2937
|
+
C.push(` ${f.join(`
|
|
2938
|
+
`)}`), C.push("}");
|
|
2811
2939
|
}
|
|
2812
|
-
|
|
2940
|
+
u.push({
|
|
2813
2941
|
type: "AggImpl",
|
|
2814
|
-
content:
|
|
2942
|
+
content: C.join(`
|
|
2815
2943
|
`),
|
|
2816
|
-
imports:
|
|
2944
|
+
imports: b
|
|
2817
2945
|
});
|
|
2818
2946
|
}
|
|
2819
|
-
return
|
|
2947
|
+
return u;
|
|
2820
2948
|
}
|
|
2821
2949
|
), t.commands._setEventCodeProvider(
|
|
2822
|
-
(
|
|
2823
|
-
const
|
|
2824
|
-
|
|
2825
|
-
const
|
|
2826
|
-
for (const $ of
|
|
2827
|
-
const
|
|
2828
|
-
|
|
2950
|
+
(a) => {
|
|
2951
|
+
const u = s.value.additions, i = g(a), p = /* @__PURE__ */ new Set(), b = Object.values(a.inner), C = [];
|
|
2952
|
+
C.push(`public record${_(u)} ${i}`), C.push("(");
|
|
2953
|
+
const h = [];
|
|
2954
|
+
for (const $ of b) {
|
|
2955
|
+
const l = g($);
|
|
2956
|
+
h.push(`${c(p, $)} ${y.upperFirst(l)}`);
|
|
2829
2957
|
}
|
|
2830
|
-
return
|
|
2831
|
-
`)}`),
|
|
2958
|
+
return C.push(` ${h.join(`,
|
|
2959
|
+
`)}`), C.push(")"), C.push("{"), C.push("}"), [
|
|
2832
2960
|
{
|
|
2833
2961
|
type: "Event",
|
|
2834
|
-
content:
|
|
2962
|
+
content: C.join(`
|
|
2835
2963
|
`),
|
|
2836
|
-
imports:
|
|
2964
|
+
imports: p
|
|
2837
2965
|
}
|
|
2838
2966
|
];
|
|
2839
2967
|
}
|
|
2840
2968
|
), t.commands._setReadModelCodeProvider(() => []), t.commands._setCodeFileProvider(() => {
|
|
2841
|
-
const
|
|
2842
|
-
function
|
|
2843
|
-
for (const
|
|
2844
|
-
if (!
|
|
2969
|
+
const a = [], u = {}, i = [...s.value.namespace.split(/\./), y.stringToUpperCamel(s.value.moduleName)];
|
|
2970
|
+
function p(l) {
|
|
2971
|
+
for (const d of Object.values(l)) {
|
|
2972
|
+
if (!r(d))
|
|
2845
2973
|
continue;
|
|
2846
|
-
const
|
|
2847
|
-
if (
|
|
2974
|
+
const w = g(d) + ".cs";
|
|
2975
|
+
if (u[`${i.join("/")}/${w}`] === !0)
|
|
2848
2976
|
continue;
|
|
2849
|
-
const
|
|
2850
|
-
if (
|
|
2977
|
+
const f = t.commands._genInfoCode(d);
|
|
2978
|
+
if (f.length === 0)
|
|
2851
2979
|
continue;
|
|
2852
|
-
const
|
|
2853
|
-
for (const
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
`namespace ${
|
|
2857
|
-
),
|
|
2980
|
+
const v = new I(i, w);
|
|
2981
|
+
for (const N of f[0].imports)
|
|
2982
|
+
v.appendContentln(`using ${N};`);
|
|
2983
|
+
v.appendContentln(""), v.appendContentln(
|
|
2984
|
+
`namespace ${s.value.namespace}.${y.stringToUpperCamel(s.value.moduleName)}`
|
|
2985
|
+
), v.appendContentln("{"), v.appendContentln(n(f[0].content)), v.appendContentln("}"), a.push(v), u[`${i.join("/")}/${w}`] = !0;
|
|
2858
2986
|
}
|
|
2859
2987
|
}
|
|
2860
|
-
const
|
|
2861
|
-
for (const
|
|
2862
|
-
|
|
2863
|
-
const
|
|
2864
|
-
for (const
|
|
2865
|
-
if (
|
|
2866
|
-
|
|
2867
|
-
for (const
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
`namespace ${
|
|
2871
|
-
),
|
|
2988
|
+
const b = t.states.designer.value._getContext().getCommands();
|
|
2989
|
+
for (const l of b) {
|
|
2990
|
+
p(l.inner);
|
|
2991
|
+
const d = g(l) + ".cs", w = t.commands._genCommandCode(l), f = new I(i, d);
|
|
2992
|
+
for (const v of w)
|
|
2993
|
+
if (v.type === "Command") {
|
|
2994
|
+
f.addImports(v.imports);
|
|
2995
|
+
for (const N of v.imports)
|
|
2996
|
+
f.appendContentln(`using ${N};`);
|
|
2997
|
+
f.appendContentln(""), f.appendContentln(
|
|
2998
|
+
`namespace ${s.value.namespace}.${y.stringToUpperCamel(s.value.moduleName)}`
|
|
2999
|
+
), f.appendContentln("{"), f.appendContentln(n(v.content)), f.appendContentln("}");
|
|
2872
3000
|
}
|
|
2873
|
-
|
|
3001
|
+
a.push(f);
|
|
2874
3002
|
}
|
|
2875
|
-
const
|
|
2876
|
-
for (const
|
|
2877
|
-
|
|
2878
|
-
const
|
|
2879
|
-
|
|
2880
|
-
for (const
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
`namespace ${
|
|
2884
|
-
),
|
|
3003
|
+
const C = t.states.designer.value._getContext().getFacadeCommands();
|
|
3004
|
+
for (const l of C) {
|
|
3005
|
+
p(l.inner);
|
|
3006
|
+
const d = g(l) + ".cs", w = t.commands._genFacadeCommandCode(l), f = new I(i, d);
|
|
3007
|
+
f.addImports(w[0].imports);
|
|
3008
|
+
for (const v of w[0].imports)
|
|
3009
|
+
f.appendContentln(`using ${v};`);
|
|
3010
|
+
f.appendContentln(""), f.appendContentln(
|
|
3011
|
+
`namespace ${s.value.namespace}.${y.stringToUpperCamel(s.value.moduleName)}`
|
|
3012
|
+
), f.appendContentln("{"), f.appendContentln(n(w[0].content)), f.appendContentln("}"), a.push(f);
|
|
2885
3013
|
}
|
|
2886
|
-
const
|
|
2887
|
-
for (const
|
|
2888
|
-
|
|
2889
|
-
const
|
|
2890
|
-
for (const
|
|
2891
|
-
|
|
2892
|
-
for (const
|
|
2893
|
-
|
|
2894
|
-
|
|
3014
|
+
const h = t.states.designer.value._getContext().getAggs();
|
|
3015
|
+
for (const l of h) {
|
|
3016
|
+
p(l.inner);
|
|
3017
|
+
const d = t.commands._genAggCode(l), w = g(l) + ".cs", f = new I(i, w);
|
|
3018
|
+
for (const v of d) {
|
|
3019
|
+
f.addImports(v.imports);
|
|
3020
|
+
for (const N of v.imports)
|
|
3021
|
+
f.appendContentln(`using ${N};`);
|
|
3022
|
+
f.appendContentln("");
|
|
2895
3023
|
}
|
|
2896
|
-
|
|
2897
|
-
`namespace ${
|
|
2898
|
-
),
|
|
2899
|
-
for (const
|
|
2900
|
-
|
|
2901
|
-
|
|
3024
|
+
f.appendContentln(
|
|
3025
|
+
`namespace ${s.value.namespace}.${y.stringToUpperCamel(s.value.moduleName)}`
|
|
3026
|
+
), f.appendContentln("{");
|
|
3027
|
+
for (const v of d)
|
|
3028
|
+
f.appendContentln(n(v.content));
|
|
3029
|
+
f.appendContentln("}"), a.push(f);
|
|
2902
3030
|
}
|
|
2903
3031
|
const $ = t.states.designer.value._getContext().getEvents();
|
|
2904
|
-
for (const
|
|
2905
|
-
|
|
2906
|
-
const
|
|
2907
|
-
|
|
2908
|
-
for (const
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
`namespace ${
|
|
2912
|
-
),
|
|
3032
|
+
for (const l of $) {
|
|
3033
|
+
p(l.inner);
|
|
3034
|
+
const d = g(l) + ".cs", w = t.commands._genEventCode(l), f = new I(i, d);
|
|
3035
|
+
f.addImports(w[0].imports);
|
|
3036
|
+
for (const v of w[0].imports)
|
|
3037
|
+
f.appendContentln(`using ${v};`);
|
|
3038
|
+
f.appendContentln(""), f.appendContentln(
|
|
3039
|
+
`namespace ${s.value.namespace}.${y.stringToUpperCamel(s.value.moduleName)}`
|
|
3040
|
+
), f.appendContentln("{"), f.appendContentln(n(w[0].content)), f.appendContentln("}"), a.push(f);
|
|
2913
3041
|
}
|
|
2914
|
-
return
|
|
3042
|
+
return a;
|
|
2915
3043
|
});
|
|
2916
3044
|
}
|
|
2917
3045
|
};
|
|
2918
3046
|
});
|
|
2919
3047
|
export {
|
|
2920
|
-
|
|
2921
|
-
|
|
3048
|
+
Po as GENERATOR_CSHARP_PLUGIN,
|
|
3049
|
+
To as GENERATOR_GO_PLUGIN,
|
|
2922
3050
|
Oo as GENERATOR_JAVA_PLUGIN,
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
3051
|
+
xo as GENERATOR_KOTLIN_PLUGIN,
|
|
3052
|
+
pe as GeneratorPliginHelper,
|
|
3053
|
+
Io as define,
|
|
3054
|
+
Ao as useGeneratorAgg
|
|
2927
3055
|
};
|