@opentiny/tiny-engine-setting-events 2.7.0-alpha.0 → 2.7.0-alpha.2

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/dist/index.js CHANGED
@@ -1,72 +1,956 @@
1
1
  import "./style.css";
2
- import { ref as Ve, reactive as we, provide as tt, nextTick as rt, resolveComponent as M, createBlock as te, openBlock as B, withCtx as I, createElementVNode as v, createVNode as b, resolveDynamicComponent as Ge, createTextVNode as ke, unref as S, createElementBlock as J, Fragment as Oe, withDirectives as qe, renderList as ze, normalizeClass as Ne, toDisplayString as Y, createCommentVNode as Se, vShow as Ye, computed as Me, watchEffect as nt, watch as Ze, inject as ot } from "vue";
3
- import { callEntry as h, META_APP as C, getMetaApi as k, getOptions as X, useLayout as V, useHistory as K, useCanvas as y, getMergeMeta as P, useBlock as ue, useMaterial as fe, useModal as _e, useMessage as he, useProperties as z } from "@opentiny/tiny-engine-meta-register";
4
- import { TinyAlert as mt, DialogBox as it, Button as Te, Form as gt, FormItem as We, Input as Fe, Popover as pt, Tooltip as vt, Collapse as ut, CollapseItem as Qe, Checkbox as ft, Search as _t } from "@opentiny/vue";
5
- import be from "@opentiny/tiny-engine-common/js/i18n";
6
- import { SvgButton as Ee, BlockLinkEvent as ye, PluginPanel as ht, VueMonaco as Ae } from "@opentiny/tiny-engine-common";
7
- import { iconChevronDown as xe } from "@opentiny/vue-icon";
8
- import { string2Ast as R, ast2String as H } from "@opentiny/tiny-engine-common/js/ast";
9
- import { CodeConfigurator as ae, InputConfigurator as se, VariableConfigurator as le, SwitchConfigurator as de } from "@opentiny/tiny-engine-configurator";
10
- import { PROP_DATA_TYPE as G } from "@opentiny/tiny-engine-common/js/constants";
11
- import { constants as me, utils as ge } from "@opentiny/tiny-engine-utils";
12
- const U = {
2
+ import { ref as Ye, reactive as rt, provide as Dt, nextTick as Bt, resolveComponent as X, createBlock as Ce, openBlock as j, withCtx as F, createElementVNode as E, createVNode as N, resolveDynamicComponent as bt, createTextVNode as Fe, unref as Z, createElementBlock as re, Fragment as at, withDirectives as _t, renderList as gt, normalizeClass as qe, toDisplayString as me, createCommentVNode as dt, vShow as Et, computed as it, watchEffect as St, watch as yt, inject as Nt } from "vue";
3
+ import { callEntry as D, META_APP as B, getMetaApi as O, getOptions as le, useLayout as J, useHistory as ae, useCanvas as I, getMergeMeta as K, useBlock as Oe, useMaterial as Ve, useModal as Me, useMessage as Re, useProperties as oe } from "@opentiny/tiny-engine-meta-register";
4
+ import { TinyAlert as Ot, DialogBox as At, Button as ct, Form as Vt, FormItem as Ct, Input as pt, Popover as Mt, Tooltip as Rt, Collapse as Tt, CollapseItem as xt, Checkbox as Ut, Search as jt } from "@opentiny/vue";
5
+ import Te from "@opentiny/tiny-engine-common/js/i18n";
6
+ import { SvgButton as Ue, BlockLinkEvent as je, PluginPanel as $t, VueMonaco as Xe } from "@opentiny/tiny-engine-common";
7
+ import { iconChevronDown as $e } from "@opentiny/vue-icon";
8
+ import { string2Ast as de } from "@opentiny/tiny-engine-common/js/ast";
9
+ import { CodeConfigurator as xe, InputConfigurator as we, VariableConfigurator as ke, SwitchConfigurator as De } from "@opentiny/tiny-engine-configurator";
10
+ import { PROP_DATA_TYPE as fe } from "@opentiny/tiny-engine-common/js/constants";
11
+ import { constants as Ae, utils as Ie } from "@opentiny/tiny-engine-utils";
12
+ const Q = {
13
13
  id: "engine.setting.event",
14
14
  title: "高级",
15
15
  type: "plugins",
16
16
  name: "event",
17
17
  icon: "target"
18
- }, Ie = (d, n) => {
19
- const o = d.__vccOpts || d;
20
- for (const [e, i] of n)
21
- o[e] = i;
22
- return o;
23
- }, j = Ve(!1), L = h(() => {
24
- j.value = !0;
18
+ };
19
+ var zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, mt = { exports: {} };
20
+ (function(u, e) {
21
+ (function(n, t, o, i) {
22
+ t(e, u);
23
+ })(zt, function(n, t) {
24
+ Object.getOwnPropertyDescriptors || (Object.getOwnPropertyDescriptors = function(f) {
25
+ return Reflect.ownKeys(f).reduce(function(h, d) {
26
+ return Object.defineProperty(h, d, Object.getOwnPropertyDescriptor(f, d)), h;
27
+ }, {});
28
+ });
29
+ var o = Object.defineProperty, i = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, a = Object.prototype.hasOwnProperty, l = (f, h) => {
30
+ for (var d in h)
31
+ o(f, d, { get: h[d], enumerable: !0 });
32
+ }, c = (f, h, d, g) => {
33
+ if (h && typeof h == "object" || typeof h == "function")
34
+ for (let C of r(h))
35
+ !a.call(f, C) && C !== d && o(f, C, { get: () => h[C], enumerable: !(g = i(h, C)) || g.enumerable });
36
+ return f;
37
+ }, _ = (f) => c(o({}, "__esModule", { value: !0 }), f), s = {};
38
+ l(s, {
39
+ decode: () => Ee,
40
+ decodeGeneratedRanges: () => ve,
41
+ decodeOriginalScopes: () => ce,
42
+ encode: () => Ze,
43
+ encodeGeneratedRanges: () => be,
44
+ encodeOriginalScopes: () => ne
45
+ }), t.exports = _(s);
46
+ var p = 44, m = 59, v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", x = new Uint8Array(64), S = new Uint8Array(128);
47
+ for (let f = 0; f < v.length; f++) {
48
+ const h = v.charCodeAt(f);
49
+ x[f] = h, S[h] = f;
50
+ }
51
+ function b(f, h) {
52
+ let d = 0, g = 0, C = 0;
53
+ do {
54
+ const R = f.next();
55
+ C = S[R], d |= (C & 31) << g, g += 5;
56
+ } while (C & 32);
57
+ const P = d & 1;
58
+ return d >>>= 1, P && (d = -2147483648 | -d), h + d;
59
+ }
60
+ function y(f, h, d) {
61
+ let g = h - d;
62
+ g = g < 0 ? -g << 1 | 1 : g << 1;
63
+ do {
64
+ let C = g & 31;
65
+ g >>>= 5, g > 0 && (C |= 32), f.write(x[C]);
66
+ } while (g > 0);
67
+ return h;
68
+ }
69
+ function V(f, h) {
70
+ return f.pos >= h ? !1 : f.peek() !== p;
71
+ }
72
+ var k = 1024 * 16, w = typeof TextDecoder < "u" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer < "u" ? {
73
+ decode(f) {
74
+ return Buffer.from(f.buffer, f.byteOffset, f.byteLength).toString();
75
+ }
76
+ } : {
77
+ decode(f) {
78
+ let h = "";
79
+ for (let d = 0; d < f.length; d++)
80
+ h += String.fromCharCode(f[d]);
81
+ return h;
82
+ }
83
+ }, L = class {
84
+ constructor() {
85
+ this.pos = 0, this.out = "", this.buffer = new Uint8Array(k);
86
+ }
87
+ write(f) {
88
+ const { buffer: h } = this;
89
+ h[this.pos++] = f, this.pos === k && (this.out += w.decode(h), this.pos = 0);
90
+ }
91
+ flush() {
92
+ const { buffer: f, out: h, pos: d } = this;
93
+ return d > 0 ? h + w.decode(f.subarray(0, d)) : h;
94
+ }
95
+ }, z = class {
96
+ constructor(f) {
97
+ this.pos = 0, this.buffer = f;
98
+ }
99
+ next() {
100
+ return this.buffer.charCodeAt(this.pos++);
101
+ }
102
+ peek() {
103
+ return this.buffer.charCodeAt(this.pos);
104
+ }
105
+ indexOf(f) {
106
+ const { buffer: h, pos: d } = this, g = h.indexOf(f, d);
107
+ return g === -1 ? h.length : g;
108
+ }
109
+ }, ge = [];
110
+ function ce(f) {
111
+ const { length: h } = f, d = new z(f), g = [], C = [];
112
+ let P = 0;
113
+ for (; d.pos < h; d.pos++) {
114
+ P = b(d, P);
115
+ const R = b(d, 0);
116
+ if (!V(d, h)) {
117
+ const q = C.pop();
118
+ q[2] = P, q[3] = R;
119
+ continue;
120
+ }
121
+ const A = b(d, 0), T = b(d, 0) & 1 ? [P, R, 0, 0, A, b(d, 0)] : [P, R, 0, 0, A];
122
+ let H = ge;
123
+ if (V(d, h)) {
124
+ H = [];
125
+ do {
126
+ const q = b(d, 0);
127
+ H.push(q);
128
+ } while (V(d, h));
129
+ }
130
+ T.vars = H, g.push(T), C.push(T);
131
+ }
132
+ return g;
133
+ }
134
+ function ne(f) {
135
+ const h = new L();
136
+ for (let d = 0; d < f.length; )
137
+ d = pe(f, d, h, [0]);
138
+ return h.flush();
139
+ }
140
+ function pe(f, h, d, g) {
141
+ const C = f[h], { 0: P, 1: R, 2: A, 3: $, 4: U, vars: T } = C;
142
+ h > 0 && d.write(p), g[0] = y(d, P, g[0]), y(d, R, 0), y(d, U, 0);
143
+ const H = C.length === 6 ? 1 : 0;
144
+ y(d, H, 0), C.length === 6 && y(d, C[5], 0);
145
+ for (const q of T)
146
+ y(d, q, 0);
147
+ for (h++; h < f.length; ) {
148
+ const q = f[h], { 0: M, 1: Y } = q;
149
+ if (M > A || M === A && Y >= $)
150
+ break;
151
+ h = pe(f, h, d, g);
152
+ }
153
+ return d.write(p), g[0] = y(d, A, g[0]), y(d, $, 0), h;
154
+ }
155
+ function ve(f) {
156
+ const { length: h } = f, d = new z(f), g = [], C = [];
157
+ let P = 0, R = 0, A = 0, $ = 0, U = 0, T = 0, H = 0, q = 0;
158
+ do {
159
+ const M = d.indexOf(";");
160
+ let Y = 0;
161
+ for (; d.pos < M; d.pos++) {
162
+ if (Y = b(d, Y), !V(d, M)) {
163
+ const ue = C.pop();
164
+ ue[2] = P, ue[3] = Y;
165
+ continue;
166
+ }
167
+ const _e = b(d, 0), lt = _e & 1, Qe = _e & 2, et = _e & 4;
168
+ let vt = null, ut = ge, Be;
169
+ if (lt) {
170
+ const ue = b(d, R);
171
+ A = b(
172
+ d,
173
+ R === ue ? A : 0
174
+ ), R = ue, Be = [P, Y, 0, 0, ue, A];
175
+ } else
176
+ Be = [P, Y, 0, 0];
177
+ if (Be.isScope = !!et, Qe) {
178
+ const ue = $, Ke = U;
179
+ $ = b(d, $);
180
+ const tt = ue === $;
181
+ U = b(d, tt ? U : 0), T = b(
182
+ d,
183
+ tt && Ke === U ? T : 0
184
+ ), vt = [$, U, T];
185
+ }
186
+ if (Be.callsite = vt, V(d, M)) {
187
+ ut = [];
188
+ do {
189
+ H = P, q = Y;
190
+ const ue = b(d, 0);
191
+ let Ke;
192
+ if (ue < -1) {
193
+ Ke = [[b(d, 0)]];
194
+ for (let tt = -1; tt > ue; tt--) {
195
+ const Lt = H;
196
+ H = b(d, H), q = b(d, H === Lt ? q : 0);
197
+ const Pt = b(d, 0);
198
+ Ke.push([Pt, H, q]);
199
+ }
200
+ } else
201
+ Ke = [[ue]];
202
+ ut.push(Ke);
203
+ } while (V(d, M));
204
+ }
205
+ Be.bindings = ut, g.push(Be), C.push(Be);
206
+ }
207
+ P++, d.pos = M + 1;
208
+ } while (d.pos < h);
209
+ return g;
210
+ }
211
+ function be(f) {
212
+ if (f.length === 0) return "";
213
+ const h = new L();
214
+ for (let d = 0; d < f.length; )
215
+ d = he(f, d, h, [0, 0, 0, 0, 0, 0, 0]);
216
+ return h.flush();
217
+ }
218
+ function he(f, h, d, g) {
219
+ const C = f[h], {
220
+ 0: P,
221
+ 1: R,
222
+ 2: A,
223
+ 3: $,
224
+ isScope: U,
225
+ callsite: T,
226
+ bindings: H
227
+ } = C;
228
+ g[0] < P ? (Le(d, g[0], P), g[0] = P, g[1] = 0) : h > 0 && d.write(p), g[1] = y(d, C[1], g[1]);
229
+ const q = (C.length === 6 ? 1 : 0) | (T ? 2 : 0) | (U ? 4 : 0);
230
+ if (y(d, q, 0), C.length === 6) {
231
+ const { 4: M, 5: Y } = C;
232
+ M !== g[2] && (g[3] = 0), g[2] = y(d, M, g[2]), g[3] = y(d, Y, g[3]);
233
+ }
234
+ if (T) {
235
+ const { 0: M, 1: Y, 2: _e } = C.callsite;
236
+ M !== g[4] ? (g[5] = 0, g[6] = 0) : Y !== g[5] && (g[6] = 0), g[4] = y(d, M, g[4]), g[5] = y(d, Y, g[5]), g[6] = y(d, _e, g[6]);
237
+ }
238
+ if (H)
239
+ for (const M of H) {
240
+ M.length > 1 && y(d, -M.length, 0);
241
+ const Y = M[0][0];
242
+ y(d, Y, 0);
243
+ let _e = P, lt = R;
244
+ for (let Qe = 1; Qe < M.length; Qe++) {
245
+ const et = M[Qe];
246
+ _e = y(d, et[1], _e), lt = y(d, et[2], lt), y(d, et[0], 0);
247
+ }
248
+ }
249
+ for (h++; h < f.length; ) {
250
+ const M = f[h], { 0: Y, 1: _e } = M;
251
+ if (Y > A || Y === A && _e >= $)
252
+ break;
253
+ h = he(f, h, d, g);
254
+ }
255
+ return g[0] < A ? (Le(d, g[0], A), g[0] = A, g[1] = 0) : d.write(p), g[1] = y(d, $, g[1]), h;
256
+ }
257
+ function Le(f, h, d) {
258
+ do
259
+ f.write(m);
260
+ while (++h < d);
261
+ }
262
+ function Ee(f) {
263
+ const { length: h } = f, d = new z(f), g = [];
264
+ let C = 0, P = 0, R = 0, A = 0, $ = 0;
265
+ do {
266
+ const U = d.indexOf(";"), T = [];
267
+ let H = !0, q = 0;
268
+ for (C = 0; d.pos < U; ) {
269
+ let M;
270
+ C = b(d, C), C < q && (H = !1), q = C, V(d, U) ? (P = b(d, P), R = b(d, R), A = b(d, A), V(d, U) ? ($ = b(d, $), M = [C, P, R, A, $]) : M = [C, P, R, A]) : M = [C], T.push(M), d.pos++;
271
+ }
272
+ H || W(T), g.push(T), d.pos = U + 1;
273
+ } while (d.pos <= h);
274
+ return g;
275
+ }
276
+ function W(f) {
277
+ f.sort(Pe);
278
+ }
279
+ function Pe(f, h) {
280
+ return f[0] - h[0];
281
+ }
282
+ function Ze(f) {
283
+ const h = new L();
284
+ let d = 0, g = 0, C = 0, P = 0;
285
+ for (let R = 0; R < f.length; R++) {
286
+ const A = f[R];
287
+ if (R > 0 && h.write(m), A.length === 0) continue;
288
+ let $ = 0;
289
+ for (let U = 0; U < A.length; U++) {
290
+ const T = A[U];
291
+ U > 0 && h.write(p), $ = y(h, T[0], $), T.length !== 1 && (d = y(h, T[1], d), g = y(h, T[2], g), C = y(h, T[3], C), T.length !== 4 && (P = y(h, T[4], P)));
292
+ }
293
+ }
294
+ return h.flush();
295
+ }
296
+ });
297
+ })(mt, mt.exports);
298
+ var Jt = mt.exports;
299
+ class ht {
300
+ constructor(e) {
301
+ this.bits = e instanceof ht ? e.bits.slice() : [];
302
+ }
303
+ add(e) {
304
+ this.bits[e >> 5] |= 1 << (e & 31);
305
+ }
306
+ has(e) {
307
+ return !!(this.bits[e >> 5] & 1 << (e & 31));
308
+ }
309
+ }
310
+ class st {
311
+ constructor(e, n, t) {
312
+ this.start = e, this.end = n, this.original = t, this.intro = "", this.outro = "", this.content = t, this.storeName = !1, this.edited = !1, this.previous = null, this.next = null;
313
+ }
314
+ appendLeft(e) {
315
+ this.outro += e;
316
+ }
317
+ appendRight(e) {
318
+ this.intro = this.intro + e;
319
+ }
320
+ clone() {
321
+ const e = new st(this.start, this.end, this.original);
322
+ return e.intro = this.intro, e.outro = this.outro, e.content = this.content, e.storeName = this.storeName, e.edited = this.edited, e;
323
+ }
324
+ contains(e) {
325
+ return this.start < e && e < this.end;
326
+ }
327
+ eachNext(e) {
328
+ let n = this;
329
+ for (; n; )
330
+ e(n), n = n.next;
331
+ }
332
+ eachPrevious(e) {
333
+ let n = this;
334
+ for (; n; )
335
+ e(n), n = n.previous;
336
+ }
337
+ edit(e, n, t) {
338
+ return this.content = e, t || (this.intro = "", this.outro = ""), this.storeName = n, this.edited = !0, this;
339
+ }
340
+ prependLeft(e) {
341
+ this.outro = e + this.outro;
342
+ }
343
+ prependRight(e) {
344
+ this.intro = e + this.intro;
345
+ }
346
+ reset() {
347
+ this.intro = "", this.outro = "", this.edited && (this.content = this.original, this.storeName = !1, this.edited = !1);
348
+ }
349
+ split(e) {
350
+ const n = e - this.start, t = this.original.slice(0, n), o = this.original.slice(n);
351
+ this.original = t;
352
+ const i = new st(e, this.end, o);
353
+ return i.outro = this.outro, this.outro = "", this.end = e, this.edited ? (i.edit("", !1), this.content = "") : this.content = t, i.next = this.next, i.next && (i.next.previous = i), i.previous = this, this.next = i, i;
354
+ }
355
+ toString() {
356
+ return this.intro + this.content + this.outro;
357
+ }
358
+ trimEnd(e) {
359
+ if (this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
360
+ const n = this.content.replace(e, "");
361
+ if (n.length)
362
+ return n !== this.content && (this.split(this.start + n.length).edit("", void 0, !0), this.edited && this.edit(n, this.storeName, !0)), !0;
363
+ if (this.edit("", void 0, !0), this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
364
+ }
365
+ trimStart(e) {
366
+ if (this.intro = this.intro.replace(e, ""), this.intro.length) return !0;
367
+ const n = this.content.replace(e, "");
368
+ if (n.length) {
369
+ if (n !== this.content) {
370
+ const t = this.split(this.end - n.length);
371
+ this.edited && t.edit(n, this.storeName, !0), this.edit("", void 0, !0);
372
+ }
373
+ return !0;
374
+ } else if (this.edit("", void 0, !0), this.outro = this.outro.replace(e, ""), this.outro.length) return !0;
375
+ }
376
+ }
377
+ function Ft() {
378
+ return typeof globalThis < "u" && typeof globalThis.btoa == "function" ? (u) => globalThis.btoa(unescape(encodeURIComponent(u))) : typeof Buffer == "function" ? (u) => Buffer.from(u, "utf-8").toString("base64") : () => {
379
+ throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.");
380
+ };
381
+ }
382
+ const Kt = /* @__PURE__ */ Ft();
383
+ class Xt {
384
+ constructor(e) {
385
+ this.version = 3, this.file = e.file, this.sources = e.sources, this.sourcesContent = e.sourcesContent, this.names = e.names, this.mappings = Jt.encode(e.mappings), typeof e.x_google_ignoreList < "u" && (this.x_google_ignoreList = e.x_google_ignoreList), typeof e.debugId < "u" && (this.debugId = e.debugId);
386
+ }
387
+ toString() {
388
+ return JSON.stringify(this);
389
+ }
390
+ toUrl() {
391
+ return "data:application/json;charset=utf-8;base64," + Kt(this.toString());
392
+ }
393
+ }
394
+ function Gt(u) {
395
+ const e = u.split(`
396
+ `), n = e.filter((i) => /^\t+/.test(i)), t = e.filter((i) => /^ {2,}/.test(i));
397
+ if (n.length === 0 && t.length === 0)
398
+ return null;
399
+ if (n.length >= t.length)
400
+ return " ";
401
+ const o = t.reduce((i, r) => {
402
+ const a = /^ +/.exec(r)[0].length;
403
+ return Math.min(a, i);
404
+ }, 1 / 0);
405
+ return new Array(o + 1).join(" ");
406
+ }
407
+ function Ht(u, e) {
408
+ const n = u.split(/[/\\]/), t = e.split(/[/\\]/);
409
+ for (n.pop(); n[0] === t[0]; )
410
+ n.shift(), t.shift();
411
+ if (n.length) {
412
+ let o = n.length;
413
+ for (; o--; ) n[o] = "..";
414
+ }
415
+ return n.concat(t).join("/");
416
+ }
417
+ const qt = Object.prototype.toString;
418
+ function Yt(u) {
419
+ return qt.call(u) === "[object Object]";
420
+ }
421
+ function wt(u) {
422
+ const e = u.split(`
423
+ `), n = [];
424
+ for (let t = 0, o = 0; t < e.length; t++)
425
+ n.push(o), o += e[t].length + 1;
426
+ return function(o) {
427
+ let i = 0, r = n.length;
428
+ for (; i < r; ) {
429
+ const c = i + r >> 1;
430
+ o < n[c] ? r = c : i = c + 1;
431
+ }
432
+ const a = i - 1, l = o - n[a];
433
+ return { line: a, column: l };
434
+ };
435
+ }
436
+ const Wt = /\w/;
437
+ class Zt {
438
+ constructor(e) {
439
+ this.hires = e, this.generatedCodeLine = 0, this.generatedCodeColumn = 0, this.raw = [], this.rawSegments = this.raw[this.generatedCodeLine] = [], this.pending = null;
440
+ }
441
+ addEdit(e, n, t, o) {
442
+ if (n.length) {
443
+ const i = n.length - 1;
444
+ let r = n.indexOf(`
445
+ `, 0), a = -1;
446
+ for (; r >= 0 && i > r; ) {
447
+ const c = [this.generatedCodeColumn, e, t.line, t.column];
448
+ o >= 0 && c.push(o), this.rawSegments.push(c), this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, a = r, r = n.indexOf(`
449
+ `, r + 1);
450
+ }
451
+ const l = [this.generatedCodeColumn, e, t.line, t.column];
452
+ o >= 0 && l.push(o), this.rawSegments.push(l), this.advance(n.slice(a + 1));
453
+ } else this.pending && (this.rawSegments.push(this.pending), this.advance(n));
454
+ this.pending = null;
455
+ }
456
+ addUneditedChunk(e, n, t, o, i) {
457
+ let r = n.start, a = !0, l = !1;
458
+ for (; r < n.end; ) {
459
+ if (t[r] === `
460
+ `)
461
+ o.line += 1, o.column = 0, this.generatedCodeLine += 1, this.raw[this.generatedCodeLine] = this.rawSegments = [], this.generatedCodeColumn = 0, a = !0, l = !1;
462
+ else {
463
+ if (this.hires || a || i.has(r)) {
464
+ const c = [this.generatedCodeColumn, e, o.line, o.column];
465
+ this.hires === "boundary" ? Wt.test(t[r]) ? l || (this.rawSegments.push(c), l = !0) : (this.rawSegments.push(c), l = !1) : this.rawSegments.push(c);
466
+ }
467
+ o.column += 1, this.generatedCodeColumn += 1, a = !1;
468
+ }
469
+ r += 1;
470
+ }
471
+ this.pending = null;
472
+ }
473
+ advance(e) {
474
+ if (!e) return;
475
+ const n = e.split(`
476
+ `);
477
+ if (n.length > 1) {
478
+ for (let t = 0; t < n.length - 1; t++)
479
+ this.generatedCodeLine++, this.raw[this.generatedCodeLine] = this.rawSegments = [];
480
+ this.generatedCodeColumn = 0;
481
+ }
482
+ this.generatedCodeColumn += n[n.length - 1].length;
483
+ }
484
+ }
485
+ const nt = `
486
+ `, Ge = {
487
+ insertLeft: !1,
488
+ insertRight: !1,
489
+ storeName: !1
490
+ };
491
+ class ee {
492
+ constructor(e, n = {}) {
493
+ const t = new st(0, e.length, e);
494
+ Object.defineProperties(this, {
495
+ original: { writable: !0, value: e },
496
+ outro: { writable: !0, value: "" },
497
+ intro: { writable: !0, value: "" },
498
+ firstChunk: { writable: !0, value: t },
499
+ lastChunk: { writable: !0, value: t },
500
+ lastSearchedChunk: { writable: !0, value: t },
501
+ byStart: { writable: !0, value: {} },
502
+ byEnd: { writable: !0, value: {} },
503
+ filename: { writable: !0, value: n.filename },
504
+ indentExclusionRanges: { writable: !0, value: n.indentExclusionRanges },
505
+ sourcemapLocations: { writable: !0, value: new ht() },
506
+ storedNames: { writable: !0, value: {} },
507
+ indentStr: { writable: !0, value: void 0 },
508
+ ignoreList: { writable: !0, value: n.ignoreList },
509
+ offset: { writable: !0, value: n.offset || 0 }
510
+ }), this.byStart[0] = t, this.byEnd[e.length] = t;
511
+ }
512
+ addSourcemapLocation(e) {
513
+ this.sourcemapLocations.add(e);
514
+ }
515
+ append(e) {
516
+ if (typeof e != "string") throw new TypeError("outro content must be a string");
517
+ return this.outro += e, this;
518
+ }
519
+ appendLeft(e, n) {
520
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
521
+ this._split(e);
522
+ const t = this.byEnd[e];
523
+ return t ? t.appendLeft(n) : this.intro += n, this;
524
+ }
525
+ appendRight(e, n) {
526
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
527
+ this._split(e);
528
+ const t = this.byStart[e];
529
+ return t ? t.appendRight(n) : this.outro += n, this;
530
+ }
531
+ clone() {
532
+ const e = new ee(this.original, { filename: this.filename, offset: this.offset });
533
+ let n = this.firstChunk, t = e.firstChunk = e.lastSearchedChunk = n.clone();
534
+ for (; n; ) {
535
+ e.byStart[t.start] = t, e.byEnd[t.end] = t;
536
+ const o = n.next, i = o && o.clone();
537
+ i && (t.next = i, i.previous = t, t = i), n = o;
538
+ }
539
+ return e.lastChunk = t, this.indentExclusionRanges && (e.indentExclusionRanges = this.indentExclusionRanges.slice()), e.sourcemapLocations = new ht(this.sourcemapLocations), e.intro = this.intro, e.outro = this.outro, e;
540
+ }
541
+ generateDecodedMap(e) {
542
+ e = e || {};
543
+ const n = 0, t = Object.keys(this.storedNames), o = new Zt(e.hires), i = wt(this.original);
544
+ return this.intro && o.advance(this.intro), this.firstChunk.eachNext((r) => {
545
+ const a = i(r.start);
546
+ r.intro.length && o.advance(r.intro), r.edited ? o.addEdit(
547
+ n,
548
+ r.content,
549
+ a,
550
+ r.storeName ? t.indexOf(r.original) : -1
551
+ ) : o.addUneditedChunk(n, r, this.original, a, this.sourcemapLocations), r.outro.length && o.advance(r.outro);
552
+ }), {
553
+ file: e.file ? e.file.split(/[/\\]/).pop() : void 0,
554
+ sources: [
555
+ e.source ? Ht(e.file || "", e.source) : e.file || ""
556
+ ],
557
+ sourcesContent: e.includeContent ? [this.original] : void 0,
558
+ names: t,
559
+ mappings: o.raw,
560
+ x_google_ignoreList: this.ignoreList ? [n] : void 0
561
+ };
562
+ }
563
+ generateMap(e) {
564
+ return new Xt(this.generateDecodedMap(e));
565
+ }
566
+ _ensureindentStr() {
567
+ this.indentStr === void 0 && (this.indentStr = Gt(this.original));
568
+ }
569
+ _getRawIndentString() {
570
+ return this._ensureindentStr(), this.indentStr;
571
+ }
572
+ getIndentString() {
573
+ return this._ensureindentStr(), this.indentStr === null ? " " : this.indentStr;
574
+ }
575
+ indent(e, n) {
576
+ const t = /^[^\r\n]/gm;
577
+ if (Yt(e) && (n = e, e = void 0), e === void 0 && (this._ensureindentStr(), e = this.indentStr || " "), e === "") return this;
578
+ n = n || {};
579
+ const o = {};
580
+ n.exclude && (typeof n.exclude[0] == "number" ? [n.exclude] : n.exclude).forEach((_) => {
581
+ for (let s = _[0]; s < _[1]; s += 1)
582
+ o[s] = !0;
583
+ });
584
+ let i = n.indentStart !== !1;
585
+ const r = (c) => i ? `${e}${c}` : (i = !0, c);
586
+ this.intro = this.intro.replace(t, r);
587
+ let a = 0, l = this.firstChunk;
588
+ for (; l; ) {
589
+ const c = l.end;
590
+ if (l.edited)
591
+ o[a] || (l.content = l.content.replace(t, r), l.content.length && (i = l.content[l.content.length - 1] === `
592
+ `));
593
+ else
594
+ for (a = l.start; a < c; ) {
595
+ if (!o[a]) {
596
+ const _ = this.original[a];
597
+ _ === `
598
+ ` ? i = !0 : _ !== "\r" && i && (i = !1, a === l.start || (this._splitChunk(l, a), l = l.next), l.prependRight(e));
599
+ }
600
+ a += 1;
601
+ }
602
+ a = l.end, l = l.next;
603
+ }
604
+ return this.outro = this.outro.replace(t, r), this;
605
+ }
606
+ insert() {
607
+ throw new Error(
608
+ "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)"
609
+ );
610
+ }
611
+ insertLeft(e, n) {
612
+ return Ge.insertLeft || (console.warn(
613
+ "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"
614
+ ), Ge.insertLeft = !0), this.appendLeft(e, n);
615
+ }
616
+ insertRight(e, n) {
617
+ return Ge.insertRight || (console.warn(
618
+ "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"
619
+ ), Ge.insertRight = !0), this.prependRight(e, n);
620
+ }
621
+ move(e, n, t) {
622
+ if (e = e + this.offset, n = n + this.offset, t = t + this.offset, t >= e && t <= n) throw new Error("Cannot move a selection inside itself");
623
+ this._split(e), this._split(n), this._split(t);
624
+ const o = this.byStart[e], i = this.byEnd[n], r = o.previous, a = i.next, l = this.byStart[t];
625
+ if (!l && i === this.lastChunk) return this;
626
+ const c = l ? l.previous : this.lastChunk;
627
+ return r && (r.next = a), a && (a.previous = r), c && (c.next = o), l && (l.previous = i), o.previous || (this.firstChunk = i.next), i.next || (this.lastChunk = o.previous, this.lastChunk.next = null), o.previous = c, i.next = l || null, c || (this.firstChunk = o), l || (this.lastChunk = i), this;
628
+ }
629
+ overwrite(e, n, t, o) {
630
+ return o = o || {}, this.update(e, n, t, { ...o, overwrite: !o.contentOnly });
631
+ }
632
+ update(e, n, t, o) {
633
+ if (e = e + this.offset, n = n + this.offset, typeof t != "string") throw new TypeError("replacement content must be a string");
634
+ if (this.original.length !== 0) {
635
+ for (; e < 0; ) e += this.original.length;
636
+ for (; n < 0; ) n += this.original.length;
637
+ }
638
+ if (n > this.original.length) throw new Error("end is out of bounds");
639
+ if (e === n)
640
+ throw new Error(
641
+ "Cannot overwrite a zero-length range – use appendLeft or prependRight instead"
642
+ );
643
+ this._split(e), this._split(n), o === !0 && (Ge.storeName || (console.warn(
644
+ "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"
645
+ ), Ge.storeName = !0), o = { storeName: !0 });
646
+ const i = o !== void 0 ? o.storeName : !1, r = o !== void 0 ? o.overwrite : !1;
647
+ if (i) {
648
+ const c = this.original.slice(e, n);
649
+ Object.defineProperty(this.storedNames, c, {
650
+ writable: !0,
651
+ value: !0,
652
+ enumerable: !0
653
+ });
654
+ }
655
+ const a = this.byStart[e], l = this.byEnd[n];
656
+ if (a) {
657
+ let c = a;
658
+ for (; c !== l; ) {
659
+ if (c.next !== this.byStart[c.end])
660
+ throw new Error("Cannot overwrite across a split point");
661
+ c = c.next, c.edit("", !1);
662
+ }
663
+ a.edit(t, i, !r);
664
+ } else {
665
+ const c = new st(e, n, "").edit(t, i);
666
+ l.next = c, c.previous = l;
667
+ }
668
+ return this;
669
+ }
670
+ prepend(e) {
671
+ if (typeof e != "string") throw new TypeError("outro content must be a string");
672
+ return this.intro = e + this.intro, this;
673
+ }
674
+ prependLeft(e, n) {
675
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
676
+ this._split(e);
677
+ const t = this.byEnd[e];
678
+ return t ? t.prependLeft(n) : this.intro = n + this.intro, this;
679
+ }
680
+ prependRight(e, n) {
681
+ if (e = e + this.offset, typeof n != "string") throw new TypeError("inserted content must be a string");
682
+ this._split(e);
683
+ const t = this.byStart[e];
684
+ return t ? t.prependRight(n) : this.outro = n + this.outro, this;
685
+ }
686
+ remove(e, n) {
687
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
688
+ for (; e < 0; ) e += this.original.length;
689
+ for (; n < 0; ) n += this.original.length;
690
+ }
691
+ if (e === n) return this;
692
+ if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
693
+ if (e > n) throw new Error("end must be greater than start");
694
+ this._split(e), this._split(n);
695
+ let t = this.byStart[e];
696
+ for (; t; )
697
+ t.intro = "", t.outro = "", t.edit(""), t = n > t.end ? this.byStart[t.end] : null;
698
+ return this;
699
+ }
700
+ reset(e, n) {
701
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
702
+ for (; e < 0; ) e += this.original.length;
703
+ for (; n < 0; ) n += this.original.length;
704
+ }
705
+ if (e === n) return this;
706
+ if (e < 0 || n > this.original.length) throw new Error("Character is out of bounds");
707
+ if (e > n) throw new Error("end must be greater than start");
708
+ this._split(e), this._split(n);
709
+ let t = this.byStart[e];
710
+ for (; t; )
711
+ t.reset(), t = n > t.end ? this.byStart[t.end] : null;
712
+ return this;
713
+ }
714
+ lastChar() {
715
+ if (this.outro.length) return this.outro[this.outro.length - 1];
716
+ let e = this.lastChunk;
717
+ do {
718
+ if (e.outro.length) return e.outro[e.outro.length - 1];
719
+ if (e.content.length) return e.content[e.content.length - 1];
720
+ if (e.intro.length) return e.intro[e.intro.length - 1];
721
+ } while (e = e.previous);
722
+ return this.intro.length ? this.intro[this.intro.length - 1] : "";
723
+ }
724
+ lastLine() {
725
+ let e = this.outro.lastIndexOf(nt);
726
+ if (e !== -1) return this.outro.substr(e + 1);
727
+ let n = this.outro, t = this.lastChunk;
728
+ do {
729
+ if (t.outro.length > 0) {
730
+ if (e = t.outro.lastIndexOf(nt), e !== -1) return t.outro.substr(e + 1) + n;
731
+ n = t.outro + n;
732
+ }
733
+ if (t.content.length > 0) {
734
+ if (e = t.content.lastIndexOf(nt), e !== -1) return t.content.substr(e + 1) + n;
735
+ n = t.content + n;
736
+ }
737
+ if (t.intro.length > 0) {
738
+ if (e = t.intro.lastIndexOf(nt), e !== -1) return t.intro.substr(e + 1) + n;
739
+ n = t.intro + n;
740
+ }
741
+ } while (t = t.previous);
742
+ return e = this.intro.lastIndexOf(nt), e !== -1 ? this.intro.substr(e + 1) + n : this.intro + n;
743
+ }
744
+ slice(e = 0, n = this.original.length - this.offset) {
745
+ if (e = e + this.offset, n = n + this.offset, this.original.length !== 0) {
746
+ for (; e < 0; ) e += this.original.length;
747
+ for (; n < 0; ) n += this.original.length;
748
+ }
749
+ let t = "", o = this.firstChunk;
750
+ for (; o && (o.start > e || o.end <= e); ) {
751
+ if (o.start < n && o.end >= n)
752
+ return t;
753
+ o = o.next;
754
+ }
755
+ if (o && o.edited && o.start !== e)
756
+ throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);
757
+ const i = o;
758
+ for (; o; ) {
759
+ o.intro && (i !== o || o.start === e) && (t += o.intro);
760
+ const r = o.start < n && o.end >= n;
761
+ if (r && o.edited && o.end !== n)
762
+ throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);
763
+ const a = i === o ? e - o.start : 0, l = r ? o.content.length + n - o.end : o.content.length;
764
+ if (t += o.content.slice(a, l), o.outro && (!r || o.end === n) && (t += o.outro), r)
765
+ break;
766
+ o = o.next;
767
+ }
768
+ return t;
769
+ }
770
+ // TODO deprecate this? not really very useful
771
+ snip(e, n) {
772
+ const t = this.clone();
773
+ return t.remove(0, e), t.remove(n, t.original.length), t;
774
+ }
775
+ _split(e) {
776
+ if (this.byStart[e] || this.byEnd[e]) return;
777
+ let n = this.lastSearchedChunk;
778
+ const t = e > n.end;
779
+ for (; n; ) {
780
+ if (n.contains(e)) return this._splitChunk(n, e);
781
+ n = t ? this.byStart[n.end] : this.byEnd[n.start];
782
+ }
783
+ }
784
+ _splitChunk(e, n) {
785
+ if (e.edited && e.content.length) {
786
+ const o = wt(this.original)(n);
787
+ throw new Error(
788
+ `Cannot split a chunk that has already been edited (${o.line}:${o.column} – "${e.original}")`
789
+ );
790
+ }
791
+ const t = e.split(n);
792
+ return this.byEnd[n] = e, this.byStart[n] = t, this.byEnd[t.end] = t, e === this.lastChunk && (this.lastChunk = t), this.lastSearchedChunk = e, !0;
793
+ }
794
+ toString() {
795
+ let e = this.intro, n = this.firstChunk;
796
+ for (; n; )
797
+ e += n.toString(), n = n.next;
798
+ return e + this.outro;
799
+ }
800
+ isEmpty() {
801
+ let e = this.firstChunk;
802
+ do
803
+ if (e.intro.length && e.intro.trim() || e.content.length && e.content.trim() || e.outro.length && e.outro.trim())
804
+ return !1;
805
+ while (e = e.next);
806
+ return !0;
807
+ }
808
+ length() {
809
+ let e = this.firstChunk, n = 0;
810
+ do
811
+ n += e.intro.length + e.content.length + e.outro.length;
812
+ while (e = e.next);
813
+ return n;
814
+ }
815
+ trimLines() {
816
+ return this.trim("[\\r\\n]");
817
+ }
818
+ trim(e) {
819
+ return this.trimStart(e).trimEnd(e);
820
+ }
821
+ trimEndAborted(e) {
822
+ const n = new RegExp((e || "\\s") + "+$");
823
+ if (this.outro = this.outro.replace(n, ""), this.outro.length) return !0;
824
+ let t = this.lastChunk;
825
+ do {
826
+ const o = t.end, i = t.trimEnd(n);
827
+ if (t.end !== o && (this.lastChunk === t && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
828
+ t = t.previous;
829
+ } while (t);
830
+ return !1;
831
+ }
832
+ trimEnd(e) {
833
+ return this.trimEndAborted(e), this;
834
+ }
835
+ trimStartAborted(e) {
836
+ const n = new RegExp("^" + (e || "\\s") + "+");
837
+ if (this.intro = this.intro.replace(n, ""), this.intro.length) return !0;
838
+ let t = this.firstChunk;
839
+ do {
840
+ const o = t.end, i = t.trimStart(n);
841
+ if (t.end !== o && (t === this.lastChunk && (this.lastChunk = t.next), this.byEnd[t.end] = t, this.byStart[t.next.start] = t.next, this.byEnd[t.next.end] = t.next), i) return !0;
842
+ t = t.next;
843
+ } while (t);
844
+ return !1;
845
+ }
846
+ trimStart(e) {
847
+ return this.trimStartAborted(e), this;
848
+ }
849
+ hasChanged() {
850
+ return this.original !== this.toString();
851
+ }
852
+ _replaceRegexp(e, n) {
853
+ function t(i, r) {
854
+ return typeof n == "string" ? n.replace(/\$(\$|&|\d+)/g, (a, l) => l === "$" ? "$" : l === "&" ? i[0] : +l < i.length ? i[+l] : `$${l}`) : n(...i, i.index, r, i.groups);
855
+ }
856
+ function o(i, r) {
857
+ let a;
858
+ const l = [];
859
+ for (; a = i.exec(r); )
860
+ l.push(a);
861
+ return l;
862
+ }
863
+ if (e.global)
864
+ o(e, this.original).forEach((r) => {
865
+ if (r.index != null) {
866
+ const a = t(r, this.original);
867
+ a !== r[0] && this.overwrite(r.index, r.index + r[0].length, a);
868
+ }
869
+ });
870
+ else {
871
+ const i = this.original.match(e);
872
+ if (i && i.index != null) {
873
+ const r = t(i, this.original);
874
+ r !== i[0] && this.overwrite(i.index, i.index + i[0].length, r);
875
+ }
876
+ }
877
+ return this;
878
+ }
879
+ _replaceString(e, n) {
880
+ const { original: t } = this, o = t.indexOf(e);
881
+ return o !== -1 && this.overwrite(o, o + e.length, n), this;
882
+ }
883
+ replace(e, n) {
884
+ return typeof e == "string" ? this._replaceString(e, n) : this._replaceRegexp(e, n);
885
+ }
886
+ _replaceAllString(e, n) {
887
+ const { original: t } = this, o = e.length;
888
+ for (let i = t.indexOf(e); i !== -1; i = t.indexOf(e, i + o))
889
+ t.slice(i, i + o) !== n && this.overwrite(i, i + o, n);
890
+ return this;
891
+ }
892
+ replaceAll(e, n) {
893
+ if (typeof e == "string")
894
+ return this._replaceAllString(e, n);
895
+ if (!e.global)
896
+ throw new TypeError(
897
+ "MagicString.prototype.replaceAll called with a non-global RegExp argument"
898
+ );
899
+ return this._replaceRegexp(e, n);
900
+ }
901
+ }
902
+ const We = (u, e) => {
903
+ const n = u.__vccOpts || u;
904
+ for (const [t, o] of e)
905
+ n[t] = o;
906
+ return n;
907
+ }, te = Ye(!1), G = D(() => {
908
+ te.value = !0;
25
909
  }, {
26
910
  metaData: {
27
911
  id: "engine.setting.event.BindEventsDialog.open"
28
912
  },
29
913
  ctx: () => ({
30
- ast2String: H,
31
- string2Ast: R,
32
- getMergeMeta: P,
33
- useCanvas: y,
34
- useHistory: K,
35
- useLayout: V,
36
- getOptions: X,
37
- getMetaApi: k,
38
- META_APP: C,
39
- meta: U,
40
- dialogVisible: j,
41
- open: L,
42
- close: $
914
+ string2Ast: de,
915
+ getMergeMeta: K,
916
+ useCanvas: I,
917
+ useHistory: ae,
918
+ useLayout: J,
919
+ getOptions: le,
920
+ getMetaApi: O,
921
+ META_APP: B,
922
+ MagicString: ee,
923
+ meta: Q,
924
+ dialogVisible: te,
925
+ open: G,
926
+ close: se
43
927
  })
44
- }), $ = h(() => {
45
- j.value = !1;
928
+ }), se = D(() => {
929
+ te.value = !1;
46
930
  }, {
47
931
  metaData: {
48
932
  id: "engine.setting.event.BindEventsDialog.close"
49
933
  },
50
934
  ctx: () => ({
51
- ast2String: H,
52
- string2Ast: R,
53
- getMergeMeta: P,
54
- useCanvas: y,
55
- useHistory: K,
56
- useLayout: V,
57
- getOptions: X,
58
- getMetaApi: k,
59
- META_APP: C,
60
- meta: U,
61
- dialogVisible: j,
62
- open: L,
63
- close: $
935
+ string2Ast: de,
936
+ getMergeMeta: K,
937
+ useCanvas: I,
938
+ useHistory: ae,
939
+ useLayout: J,
940
+ getOptions: le,
941
+ getMetaApi: O,
942
+ META_APP: B,
943
+ MagicString: ee,
944
+ meta: Q,
945
+ dialogVisible: te,
946
+ open: G,
947
+ close: se
64
948
  })
65
- }), bt = {
949
+ }), Qt = {
66
950
  components: {
67
- TinyButton: Te,
68
- TinyDialogBox: it,
69
- TinyAlert: mt
951
+ TinyButton: ct,
952
+ TinyDialogBox: At,
953
+ TinyAlert: Ot
70
954
  },
71
955
  inheritAttrs: !1,
72
956
  props: {
@@ -75,20 +959,20 @@ const U = {
75
959
  default: () => ({})
76
960
  }
77
961
  },
78
- setup(d) {
962
+ setup(u) {
79
963
  const {
80
- BindEventsDialogSidebar: n,
81
- BindEventsDialogContent: o
82
- } = P(U.id).components, {
83
- PLUGIN_NAME: e,
84
- activePlugin: i
85
- } = V(), {
86
- pageState: g
87
- } = y(), {
88
- getMethods: p,
964
+ BindEventsDialogSidebar: e,
965
+ BindEventsDialogContent: n
966
+ } = K(Q.id).components, {
967
+ PLUGIN_NAME: t,
968
+ activePlugin: o
969
+ } = J(), {
970
+ pageState: i
971
+ } = I(), {
972
+ getMethods: r,
89
973
  saveMethod: a,
90
974
  highlightMethod: l
91
- } = k(C.Page), s = we({
975
+ } = O(B.Page), c = rt({
92
976
  editorContent: "",
93
977
  bindMethodInfo: {},
94
978
  tip: "",
@@ -96,297 +980,297 @@ const U = {
96
980
  enableExtraParams: !1,
97
981
  isValidParams: !0
98
982
  });
99
- tt("context", s);
100
- const u = h((E) => {
101
- s.bindMethodInfo = E;
983
+ Dt("context", c);
984
+ const _ = D((k) => {
985
+ c.bindMethodInfo = k;
102
986
  }, {
103
987
  metaData: {
104
988
  id: "engine.setting.event.BindEventsDialog.selectMethod"
105
989
  },
106
990
  ctx: () => ({
107
- props: d,
108
- BindEventsDialogSidebar: n,
109
- BindEventsDialogContent: o,
110
- PLUGIN_NAME: e,
111
- activePlugin: i,
112
- pageState: g,
113
- getMethods: p,
991
+ props: u,
992
+ BindEventsDialogSidebar: e,
993
+ BindEventsDialogContent: n,
994
+ PLUGIN_NAME: t,
995
+ activePlugin: o,
996
+ pageState: i,
997
+ getMethods: r,
114
998
  saveMethod: a,
115
999
  highlightMethod: l,
116
- state: s,
117
- selectMethod: u,
118
- bindMethod: t,
119
- resetTipError: r,
120
- getExtraParams: c,
121
- getFormatParams: m,
122
- getFunctionBody: f,
123
- activePagePlugin: x,
124
- confirm: D,
125
- openedDialog: N,
126
- closeDialog: w,
127
- ast2String: H,
128
- string2Ast: R,
129
- getMergeMeta: P,
130
- useCanvas: y,
131
- useHistory: K,
132
- useLayout: V,
133
- getOptions: X,
134
- getMetaApi: k,
135
- META_APP: C,
136
- meta: U,
137
- dialogVisible: j,
138
- open: L,
139
- close: $
1000
+ state: c,
1001
+ selectMethod: _,
1002
+ bindMethod: s,
1003
+ resetTipError: p,
1004
+ getExtraParams: m,
1005
+ getFormatParams: v,
1006
+ rewriteMethodParams: x,
1007
+ activePagePlugin: S,
1008
+ confirm: b,
1009
+ openedDialog: y,
1010
+ closeDialog: V,
1011
+ string2Ast: de,
1012
+ getMergeMeta: K,
1013
+ useCanvas: I,
1014
+ useHistory: ae,
1015
+ useLayout: J,
1016
+ getOptions: le,
1017
+ getMetaApi: O,
1018
+ META_APP: B,
1019
+ MagicString: ee,
1020
+ meta: Q,
1021
+ dialogVisible: te,
1022
+ open: G,
1023
+ close: se
140
1024
  })
141
- }), t = h((E) => {
142
- var Z, q;
143
- if (!E)
1025
+ }), s = D((k) => {
1026
+ var ce, ne;
1027
+ if (!k)
144
1028
  return;
145
- const _ = (Z = d.eventBinding) == null ? void 0 : Z.eventName;
146
- if (!_)
1029
+ const w = (ce = u.eventBinding) == null ? void 0 : ce.eventName;
1030
+ if (!w)
147
1031
  return;
148
- const A = (q = g == null ? void 0 : g.currentSchema) == null ? void 0 : q.props;
149
- if (!A)
1032
+ const L = (ne = i == null ? void 0 : i.currentSchema) == null ? void 0 : ne.props;
1033
+ if (!L)
150
1034
  return;
151
1035
  const {
152
- name: O,
153
- extra: W
154
- } = E;
155
- d[_] || (A[_] = {
1036
+ name: z,
1037
+ extra: ge
1038
+ } = k;
1039
+ u[w] || (L[w] = {
156
1040
  type: "JSExpression",
157
1041
  value: ""
158
- }), W && s.enableExtraParams && (A[_].params = W), A[_].value = `this.${O}`, K().addHistory();
1042
+ }), ge && c.enableExtraParams && (L[w].params = ge), L[w].value = `this.${z}`, ae().addHistory();
159
1043
  }, {
160
1044
  metaData: {
161
1045
  id: "engine.setting.event.BindEventsDialog.bindMethod"
162
1046
  },
163
1047
  ctx: () => ({
164
- props: d,
165
- BindEventsDialogSidebar: n,
166
- BindEventsDialogContent: o,
167
- PLUGIN_NAME: e,
168
- activePlugin: i,
169
- pageState: g,
170
- getMethods: p,
1048
+ props: u,
1049
+ BindEventsDialogSidebar: e,
1050
+ BindEventsDialogContent: n,
1051
+ PLUGIN_NAME: t,
1052
+ activePlugin: o,
1053
+ pageState: i,
1054
+ getMethods: r,
171
1055
  saveMethod: a,
172
1056
  highlightMethod: l,
173
- state: s,
174
- selectMethod: u,
175
- bindMethod: t,
176
- resetTipError: r,
177
- getExtraParams: c,
178
- getFormatParams: m,
179
- getFunctionBody: f,
180
- activePagePlugin: x,
181
- confirm: D,
182
- openedDialog: N,
183
- closeDialog: w,
184
- ast2String: H,
185
- string2Ast: R,
186
- getMergeMeta: P,
187
- useCanvas: y,
188
- useHistory: K,
189
- useLayout: V,
190
- getOptions: X,
191
- getMetaApi: k,
192
- META_APP: C,
193
- meta: U,
194
- dialogVisible: j,
195
- open: L,
196
- close: $
1057
+ state: c,
1058
+ selectMethod: _,
1059
+ bindMethod: s,
1060
+ resetTipError: p,
1061
+ getExtraParams: m,
1062
+ getFormatParams: v,
1063
+ rewriteMethodParams: x,
1064
+ activePagePlugin: S,
1065
+ confirm: b,
1066
+ openedDialog: y,
1067
+ closeDialog: V,
1068
+ string2Ast: de,
1069
+ getMergeMeta: K,
1070
+ useCanvas: I,
1071
+ useHistory: ae,
1072
+ useLayout: J,
1073
+ getOptions: le,
1074
+ getMetaApi: O,
1075
+ META_APP: B,
1076
+ MagicString: ee,
1077
+ meta: Q,
1078
+ dialogVisible: te,
1079
+ open: G,
1080
+ close: se
197
1081
  })
198
- }), r = h(() => {
199
- s.tipError = !1, s.tip = "", s.isValidParams = !0;
1082
+ }), p = D(() => {
1083
+ c.tipError = !1, c.tip = "", c.isValidParams = !0;
200
1084
  }, {
201
1085
  metaData: {
202
1086
  id: "engine.setting.event.BindEventsDialog.resetTipError"
203
1087
  },
204
1088
  ctx: () => ({
205
- props: d,
206
- BindEventsDialogSidebar: n,
207
- BindEventsDialogContent: o,
208
- PLUGIN_NAME: e,
209
- activePlugin: i,
210
- pageState: g,
211
- getMethods: p,
1089
+ props: u,
1090
+ BindEventsDialogSidebar: e,
1091
+ BindEventsDialogContent: n,
1092
+ PLUGIN_NAME: t,
1093
+ activePlugin: o,
1094
+ pageState: i,
1095
+ getMethods: r,
212
1096
  saveMethod: a,
213
1097
  highlightMethod: l,
214
- state: s,
215
- selectMethod: u,
216
- bindMethod: t,
217
- resetTipError: r,
218
- getExtraParams: c,
219
- getFormatParams: m,
220
- getFunctionBody: f,
221
- activePagePlugin: x,
222
- confirm: D,
223
- openedDialog: N,
224
- closeDialog: w,
225
- ast2String: H,
226
- string2Ast: R,
227
- getMergeMeta: P,
228
- useCanvas: y,
229
- useHistory: K,
230
- useLayout: V,
231
- getOptions: X,
232
- getMetaApi: k,
233
- META_APP: C,
234
- meta: U,
235
- dialogVisible: j,
236
- open: L,
237
- close: $
1098
+ state: c,
1099
+ selectMethod: _,
1100
+ bindMethod: s,
1101
+ resetTipError: p,
1102
+ getExtraParams: m,
1103
+ getFormatParams: v,
1104
+ rewriteMethodParams: x,
1105
+ activePagePlugin: S,
1106
+ confirm: b,
1107
+ openedDialog: y,
1108
+ closeDialog: V,
1109
+ string2Ast: de,
1110
+ getMergeMeta: K,
1111
+ useCanvas: I,
1112
+ useHistory: ae,
1113
+ useLayout: J,
1114
+ getOptions: le,
1115
+ getMetaApi: O,
1116
+ META_APP: B,
1117
+ MagicString: ee,
1118
+ meta: Q,
1119
+ dialogVisible: te,
1120
+ open: G,
1121
+ close: se
238
1122
  })
239
- }), c = h(() => {
240
- let E = "";
241
- if (s.enableExtraParams)
1123
+ }), m = D(() => {
1124
+ let k = "";
1125
+ if (c.enableExtraParams)
242
1126
  try {
243
- E = JSON.parse(s.editorContent), s.isValidParams = Array.isArray(E);
1127
+ k = JSON.parse(c.editorContent), c.isValidParams = Array.isArray(k);
244
1128
  } catch {
245
- s.isValidParams = !1;
1129
+ c.isValidParams = !1;
246
1130
  }
247
- return E;
1131
+ return k;
248
1132
  }, {
249
1133
  metaData: {
250
1134
  id: "engine.setting.event.BindEventsDialog.getExtraParams"
251
1135
  },
252
1136
  ctx: () => ({
253
- props: d,
254
- BindEventsDialogSidebar: n,
255
- BindEventsDialogContent: o,
256
- PLUGIN_NAME: e,
257
- activePlugin: i,
258
- pageState: g,
259
- getMethods: p,
1137
+ props: u,
1138
+ BindEventsDialogSidebar: e,
1139
+ BindEventsDialogContent: n,
1140
+ PLUGIN_NAME: t,
1141
+ activePlugin: o,
1142
+ pageState: i,
1143
+ getMethods: r,
260
1144
  saveMethod: a,
261
1145
  highlightMethod: l,
262
- state: s,
263
- selectMethod: u,
264
- bindMethod: t,
265
- resetTipError: r,
266
- getExtraParams: c,
267
- getFormatParams: m,
268
- getFunctionBody: f,
269
- activePagePlugin: x,
270
- confirm: D,
271
- openedDialog: N,
272
- closeDialog: w,
273
- ast2String: H,
274
- string2Ast: R,
275
- getMergeMeta: P,
276
- useCanvas: y,
277
- useHistory: K,
278
- useLayout: V,
279
- getOptions: X,
280
- getMetaApi: k,
281
- META_APP: C,
282
- meta: U,
283
- dialogVisible: j,
284
- open: L,
285
- close: $
1146
+ state: c,
1147
+ selectMethod: _,
1148
+ bindMethod: s,
1149
+ resetTipError: p,
1150
+ getExtraParams: m,
1151
+ getFormatParams: v,
1152
+ rewriteMethodParams: x,
1153
+ activePagePlugin: S,
1154
+ confirm: b,
1155
+ openedDialog: y,
1156
+ closeDialog: V,
1157
+ string2Ast: de,
1158
+ getMergeMeta: K,
1159
+ useCanvas: I,
1160
+ useHistory: ae,
1161
+ useLayout: J,
1162
+ getOptions: le,
1163
+ getMetaApi: O,
1164
+ META_APP: B,
1165
+ MagicString: ee,
1166
+ meta: Q,
1167
+ dialogVisible: te,
1168
+ open: G,
1169
+ close: se
286
1170
  })
287
- }), m = h((E) => Array.from({
288
- length: E.length
289
- }, (_, A) => `args${A}`).join(","), {
1171
+ }), v = D((k) => Array.from({
1172
+ length: k.length
1173
+ }, (w, L) => `args${L}`).join(","), {
290
1174
  metaData: {
291
1175
  id: "engine.setting.event.BindEventsDialog.getFormatParams"
292
1176
  },
293
1177
  ctx: () => ({
294
- props: d,
295
- BindEventsDialogSidebar: n,
296
- BindEventsDialogContent: o,
297
- PLUGIN_NAME: e,
298
- activePlugin: i,
299
- pageState: g,
300
- getMethods: p,
1178
+ props: u,
1179
+ BindEventsDialogSidebar: e,
1180
+ BindEventsDialogContent: n,
1181
+ PLUGIN_NAME: t,
1182
+ activePlugin: o,
1183
+ pageState: i,
1184
+ getMethods: r,
301
1185
  saveMethod: a,
302
1186
  highlightMethod: l,
303
- state: s,
304
- selectMethod: u,
305
- bindMethod: t,
306
- resetTipError: r,
307
- getExtraParams: c,
308
- getFormatParams: m,
309
- getFunctionBody: f,
310
- activePagePlugin: x,
311
- confirm: D,
312
- openedDialog: N,
313
- closeDialog: w,
314
- ast2String: H,
315
- string2Ast: R,
316
- getMergeMeta: P,
317
- useCanvas: y,
318
- useHistory: K,
319
- useLayout: V,
320
- getOptions: X,
321
- getMetaApi: k,
322
- META_APP: C,
323
- meta: U,
324
- dialogVisible: j,
325
- open: L,
326
- close: $
1187
+ state: c,
1188
+ selectMethod: _,
1189
+ bindMethod: s,
1190
+ resetTipError: p,
1191
+ getExtraParams: m,
1192
+ getFormatParams: v,
1193
+ rewriteMethodParams: x,
1194
+ activePagePlugin: S,
1195
+ confirm: b,
1196
+ openedDialog: y,
1197
+ closeDialog: V,
1198
+ string2Ast: de,
1199
+ getMergeMeta: K,
1200
+ useCanvas: I,
1201
+ useHistory: ae,
1202
+ useLayout: J,
1203
+ getOptions: le,
1204
+ getMetaApi: O,
1205
+ META_APP: B,
1206
+ MagicString: ee,
1207
+ meta: Q,
1208
+ dialogVisible: te,
1209
+ open: G,
1210
+ close: se
327
1211
  })
328
- }), f = h(() => {
329
- var W, Z, q, ne, oe, ie, Q, Le;
330
- let E = (Z = (W = p()) == null ? void 0 : W[s.bindMethodInfo.name]) == null ? void 0 : Z.value, _ = "{}", A = !1, O = !1;
331
- if (E) {
332
- let T = {};
333
- try {
334
- T = R(E);
335
- } catch {
336
- E = E.replace("function", `function ${s.bindMethodInfo.name}`), T = R(E);
337
- }
338
- (ne = (q = T == null ? void 0 : T.program) == null ? void 0 : q.body[0]) != null && ne.body && (_ = H(T.program.body[0].body)), (ie = (oe = T == null ? void 0 : T.program) == null ? void 0 : oe.body[0]) != null && ie.async && (A = !0), (Le = (Q = T == null ? void 0 : T.program) == null ? void 0 : Q.body[0]) != null && Le.generator && (O = !0);
1212
+ }), x = D((k, w, L, z, ge) => {
1213
+ var pe, ve, be, he, Le;
1214
+ const ce = ge && z.length ? `event,${L}` : L, ne = `function ${w} (${ce}) {
1215
+ }
1216
+ `;
1217
+ if (!k)
1218
+ return ne;
1219
+ try {
1220
+ const Ee = new ee(k), W = de(k);
1221
+ if (((ve = (pe = W == null ? void 0 : W.program) == null ? void 0 : pe.body[0]) == null ? void 0 : ve.type) !== "FunctionDeclaration")
1222
+ return ne;
1223
+ if (((be = W == null ? void 0 : W.program) == null ? void 0 : be.body[0].params.length) === z.length + 1)
1224
+ return k;
1225
+ const Pe = (he = W == null ? void 0 : W.program) == null ? void 0 : he.body[0].id.end, Ze = (Le = W == null ? void 0 : W.program) == null ? void 0 : Le.body[0].body.start;
1226
+ return Ee.remove(Pe, Ze), Ee.appendLeft(Pe, `(${ce})`), Ee.toString();
1227
+ } catch {
1228
+ return ne;
339
1229
  }
340
- return {
341
- preBody: _ || `{
342
- }`,
343
- isAsync: A,
344
- isGenerator: O
345
- };
346
1230
  }, {
347
1231
  metaData: {
348
- id: "engine.setting.event.BindEventsDialog.getFunctionBody"
1232
+ id: "engine.setting.event.BindEventsDialog.rewriteMethodParams"
349
1233
  },
350
1234
  ctx: () => ({
351
- props: d,
352
- BindEventsDialogSidebar: n,
353
- BindEventsDialogContent: o,
354
- PLUGIN_NAME: e,
355
- activePlugin: i,
356
- pageState: g,
357
- getMethods: p,
1235
+ props: u,
1236
+ BindEventsDialogSidebar: e,
1237
+ BindEventsDialogContent: n,
1238
+ PLUGIN_NAME: t,
1239
+ activePlugin: o,
1240
+ pageState: i,
1241
+ getMethods: r,
358
1242
  saveMethod: a,
359
1243
  highlightMethod: l,
360
- state: s,
361
- selectMethod: u,
362
- bindMethod: t,
363
- resetTipError: r,
364
- getExtraParams: c,
365
- getFormatParams: m,
366
- getFunctionBody: f,
367
- activePagePlugin: x,
368
- confirm: D,
369
- openedDialog: N,
370
- closeDialog: w,
371
- ast2String: H,
372
- string2Ast: R,
373
- getMergeMeta: P,
374
- useCanvas: y,
375
- useHistory: K,
376
- useLayout: V,
377
- getOptions: X,
378
- getMetaApi: k,
379
- META_APP: C,
380
- meta: U,
381
- dialogVisible: j,
382
- open: L,
383
- close: $
1244
+ state: c,
1245
+ selectMethod: _,
1246
+ bindMethod: s,
1247
+ resetTipError: p,
1248
+ getExtraParams: m,
1249
+ getFormatParams: v,
1250
+ rewriteMethodParams: x,
1251
+ activePagePlugin: S,
1252
+ confirm: b,
1253
+ openedDialog: y,
1254
+ closeDialog: V,
1255
+ string2Ast: de,
1256
+ getMergeMeta: K,
1257
+ useCanvas: I,
1258
+ useHistory: ae,
1259
+ useLayout: J,
1260
+ getOptions: le,
1261
+ getMetaApi: O,
1262
+ META_APP: B,
1263
+ MagicString: ee,
1264
+ meta: Q,
1265
+ dialogVisible: te,
1266
+ open: G,
1267
+ close: se
384
1268
  })
385
- }), x = h(() => {
386
- i(e.Page).then(() => {
387
- rt(() => {
388
- var E;
389
- l && l((E = s.bindMethodInfo) == null ? void 0 : E.name);
1269
+ }), S = D(() => {
1270
+ o(t.Page).then(() => {
1271
+ Bt(() => {
1272
+ var k;
1273
+ l && l((k = c.bindMethodInfo) == null ? void 0 : k.name);
390
1274
  });
391
1275
  });
392
1276
  }, {
@@ -394,255 +1278,252 @@ const U = {
394
1278
  id: "engine.setting.event.BindEventsDialog.activePagePlugin"
395
1279
  },
396
1280
  ctx: () => ({
397
- props: d,
398
- BindEventsDialogSidebar: n,
399
- BindEventsDialogContent: o,
400
- PLUGIN_NAME: e,
401
- activePlugin: i,
402
- pageState: g,
403
- getMethods: p,
1281
+ props: u,
1282
+ BindEventsDialogSidebar: e,
1283
+ BindEventsDialogContent: n,
1284
+ PLUGIN_NAME: t,
1285
+ activePlugin: o,
1286
+ pageState: i,
1287
+ getMethods: r,
404
1288
  saveMethod: a,
405
1289
  highlightMethod: l,
406
- state: s,
407
- selectMethod: u,
408
- bindMethod: t,
409
- resetTipError: r,
410
- getExtraParams: c,
411
- getFormatParams: m,
412
- getFunctionBody: f,
413
- activePagePlugin: x,
414
- confirm: D,
415
- openedDialog: N,
416
- closeDialog: w,
417
- ast2String: H,
418
- string2Ast: R,
419
- getMergeMeta: P,
420
- useCanvas: y,
421
- useHistory: K,
422
- useLayout: V,
423
- getOptions: X,
424
- getMetaApi: k,
425
- META_APP: C,
426
- meta: U,
427
- dialogVisible: j,
428
- open: L,
429
- close: $
1290
+ state: c,
1291
+ selectMethod: _,
1292
+ bindMethod: s,
1293
+ resetTipError: p,
1294
+ getExtraParams: m,
1295
+ getFormatParams: v,
1296
+ rewriteMethodParams: x,
1297
+ activePagePlugin: S,
1298
+ confirm: b,
1299
+ openedDialog: y,
1300
+ closeDialog: V,
1301
+ string2Ast: de,
1302
+ getMergeMeta: K,
1303
+ useCanvas: I,
1304
+ useHistory: ae,
1305
+ useLayout: J,
1306
+ getOptions: le,
1307
+ getMetaApi: O,
1308
+ META_APP: B,
1309
+ MagicString: ee,
1310
+ meta: Q,
1311
+ dialogVisible: te,
1312
+ open: G,
1313
+ close: se
430
1314
  })
431
- }), D = h(async () => {
432
- if (s.tipError)
1315
+ }), b = D(async () => {
1316
+ var ve, be;
1317
+ if (c.tipError)
433
1318
  return;
434
- let E = "event";
435
- const _ = c();
436
- let A = E;
437
- if (!s.isValidParams)
1319
+ let k = "event";
1320
+ const w = m();
1321
+ let L = k;
1322
+ if (!c.isValidParams)
438
1323
  return;
439
- _ && (E = _.join(","), A = m(_)), t({
440
- ...s.bindMethodInfo,
441
- params: E,
442
- extra: _
1324
+ w && (k = w.join(","), L = v(w)), s({
1325
+ ...c.bindMethodInfo,
1326
+ params: k,
1327
+ extra: w
443
1328
  });
444
1329
  const {
445
- preBody: O,
446
- isAsync: W,
447
- isGenerator: Z
448
- } = f(), {
449
- name: q
450
- } = s.bindMethodInfo, ne = `${W ? "async" : ""} function${Z ? "*" : ""} ${q}`, oe = {
451
- name: q,
452
- content: s.enableExtraParams ? `${ne}(eventArgs,${A}) ${O}` : `${ne}(${A}) ${O}`
1330
+ name: z
1331
+ } = c.bindMethodInfo, ge = (be = (ve = r()) == null ? void 0 : ve[c.bindMethodInfo.name]) == null ? void 0 : be.value, ce = x(ge, z, L, w, c.enableExtraParams), ne = {
1332
+ name: z,
1333
+ content: ce
453
1334
  }, {
454
- beforeSaveMethod: ie
455
- } = X(U.id);
456
- typeof ie == "function" && await ie(oe, s.bindMethodInfo), a == null || a(oe), x(), $();
1335
+ beforeSaveMethod: pe
1336
+ } = le(Q.id);
1337
+ typeof pe == "function" && await pe(ne, c.bindMethodInfo), a == null || a(ne), S(), se();
457
1338
  }, {
458
1339
  metaData: {
459
1340
  id: "engine.setting.event.BindEventsDialog.confirm"
460
1341
  },
461
1342
  ctx: () => ({
462
- props: d,
463
- BindEventsDialogSidebar: n,
464
- BindEventsDialogContent: o,
465
- PLUGIN_NAME: e,
466
- activePlugin: i,
467
- pageState: g,
468
- getMethods: p,
1343
+ props: u,
1344
+ BindEventsDialogSidebar: e,
1345
+ BindEventsDialogContent: n,
1346
+ PLUGIN_NAME: t,
1347
+ activePlugin: o,
1348
+ pageState: i,
1349
+ getMethods: r,
469
1350
  saveMethod: a,
470
1351
  highlightMethod: l,
471
- state: s,
472
- selectMethod: u,
473
- bindMethod: t,
474
- resetTipError: r,
475
- getExtraParams: c,
476
- getFormatParams: m,
477
- getFunctionBody: f,
478
- activePagePlugin: x,
479
- confirm: D,
480
- openedDialog: N,
481
- closeDialog: w,
482
- ast2String: H,
483
- string2Ast: R,
484
- getMergeMeta: P,
485
- useCanvas: y,
486
- useHistory: K,
487
- useLayout: V,
488
- getOptions: X,
489
- getMetaApi: k,
490
- META_APP: C,
491
- meta: U,
492
- dialogVisible: j,
493
- open: L,
494
- close: $
1352
+ state: c,
1353
+ selectMethod: _,
1354
+ bindMethod: s,
1355
+ resetTipError: p,
1356
+ getExtraParams: m,
1357
+ getFormatParams: v,
1358
+ rewriteMethodParams: x,
1359
+ activePagePlugin: S,
1360
+ confirm: b,
1361
+ openedDialog: y,
1362
+ closeDialog: V,
1363
+ string2Ast: de,
1364
+ getMergeMeta: K,
1365
+ useCanvas: I,
1366
+ useHistory: ae,
1367
+ useLayout: J,
1368
+ getOptions: le,
1369
+ getMetaApi: O,
1370
+ META_APP: B,
1371
+ MagicString: ee,
1372
+ meta: Q,
1373
+ dialogVisible: te,
1374
+ open: G,
1375
+ close: se
495
1376
  })
496
- }), N = h(() => {
497
- var E, _, A;
498
- s.enableExtraParams = !!((_ = (E = d.eventBinding) == null ? void 0 : E.params) != null && _.length), s.editorContent = JSON.stringify(((A = d.eventBinding) == null ? void 0 : A.params) || [], null, 2), r();
1377
+ }), y = D(() => {
1378
+ var k, w, L;
1379
+ c.enableExtraParams = !!((w = (k = u.eventBinding) == null ? void 0 : k.params) != null && w.length), c.editorContent = JSON.stringify(((L = u.eventBinding) == null ? void 0 : L.params) || [], null, 2), p();
499
1380
  }, {
500
1381
  metaData: {
501
1382
  id: "engine.setting.event.BindEventsDialog.openedDialog"
502
1383
  },
503
1384
  ctx: () => ({
504
- props: d,
505
- BindEventsDialogSidebar: n,
506
- BindEventsDialogContent: o,
507
- PLUGIN_NAME: e,
508
- activePlugin: i,
509
- pageState: g,
510
- getMethods: p,
1385
+ props: u,
1386
+ BindEventsDialogSidebar: e,
1387
+ BindEventsDialogContent: n,
1388
+ PLUGIN_NAME: t,
1389
+ activePlugin: o,
1390
+ pageState: i,
1391
+ getMethods: r,
511
1392
  saveMethod: a,
512
1393
  highlightMethod: l,
513
- state: s,
514
- selectMethod: u,
515
- bindMethod: t,
516
- resetTipError: r,
517
- getExtraParams: c,
518
- getFormatParams: m,
519
- getFunctionBody: f,
520
- activePagePlugin: x,
521
- confirm: D,
522
- openedDialog: N,
523
- closeDialog: w,
524
- ast2String: H,
525
- string2Ast: R,
526
- getMergeMeta: P,
527
- useCanvas: y,
528
- useHistory: K,
529
- useLayout: V,
530
- getOptions: X,
531
- getMetaApi: k,
532
- META_APP: C,
533
- meta: U,
534
- dialogVisible: j,
535
- open: L,
536
- close: $
1394
+ state: c,
1395
+ selectMethod: _,
1396
+ bindMethod: s,
1397
+ resetTipError: p,
1398
+ getExtraParams: m,
1399
+ getFormatParams: v,
1400
+ rewriteMethodParams: x,
1401
+ activePagePlugin: S,
1402
+ confirm: b,
1403
+ openedDialog: y,
1404
+ closeDialog: V,
1405
+ string2Ast: de,
1406
+ getMergeMeta: K,
1407
+ useCanvas: I,
1408
+ useHistory: ae,
1409
+ useLayout: J,
1410
+ getOptions: le,
1411
+ getMetaApi: O,
1412
+ META_APP: B,
1413
+ MagicString: ee,
1414
+ meta: Q,
1415
+ dialogVisible: te,
1416
+ open: G,
1417
+ close: se
537
1418
  })
538
- }), w = h(() => {
539
- r(), $();
1419
+ }), V = D(() => {
1420
+ p(), se();
540
1421
  }, {
541
1422
  metaData: {
542
1423
  id: "engine.setting.event.BindEventsDialog.closeDialog"
543
1424
  },
544
1425
  ctx: () => ({
545
- props: d,
546
- BindEventsDialogSidebar: n,
547
- BindEventsDialogContent: o,
548
- PLUGIN_NAME: e,
549
- activePlugin: i,
550
- pageState: g,
551
- getMethods: p,
1426
+ props: u,
1427
+ BindEventsDialogSidebar: e,
1428
+ BindEventsDialogContent: n,
1429
+ PLUGIN_NAME: t,
1430
+ activePlugin: o,
1431
+ pageState: i,
1432
+ getMethods: r,
552
1433
  saveMethod: a,
553
1434
  highlightMethod: l,
554
- state: s,
555
- selectMethod: u,
556
- bindMethod: t,
557
- resetTipError: r,
558
- getExtraParams: c,
559
- getFormatParams: m,
560
- getFunctionBody: f,
561
- activePagePlugin: x,
562
- confirm: D,
563
- openedDialog: N,
564
- closeDialog: w,
565
- ast2String: H,
566
- string2Ast: R,
567
- getMergeMeta: P,
568
- useCanvas: y,
569
- useHistory: K,
570
- useLayout: V,
571
- getOptions: X,
572
- getMetaApi: k,
573
- META_APP: C,
574
- meta: U,
575
- dialogVisible: j,
576
- open: L,
577
- close: $
1435
+ state: c,
1436
+ selectMethod: _,
1437
+ bindMethod: s,
1438
+ resetTipError: p,
1439
+ getExtraParams: m,
1440
+ getFormatParams: v,
1441
+ rewriteMethodParams: x,
1442
+ activePagePlugin: S,
1443
+ confirm: b,
1444
+ openedDialog: y,
1445
+ closeDialog: V,
1446
+ string2Ast: de,
1447
+ getMergeMeta: K,
1448
+ useCanvas: I,
1449
+ useHistory: ae,
1450
+ useLayout: J,
1451
+ getOptions: le,
1452
+ getMetaApi: O,
1453
+ META_APP: B,
1454
+ MagicString: ee,
1455
+ meta: Q,
1456
+ dialogVisible: te,
1457
+ open: G,
1458
+ close: se
578
1459
  })
579
1460
  });
580
1461
  return {
581
- BindEventsDialogSidebar: n,
582
- BindEventsDialogContent: o,
583
- state: s,
584
- dialogVisible: j,
585
- confirm: D,
586
- closeDialog: w,
587
- openedDialog: N,
588
- selectMethod: u
1462
+ BindEventsDialogSidebar: e,
1463
+ BindEventsDialogContent: n,
1464
+ state: c,
1465
+ dialogVisible: te,
1466
+ confirm: b,
1467
+ closeDialog: V,
1468
+ openedDialog: y,
1469
+ selectMethod: _
589
1470
  };
590
1471
  }
591
- }, Et = { class: "bind-event-dialog-tip" }, yt = { class: "bind-event-dialog-content" }, xt = { class: "bind-dialog-footer" };
592
- function Dt(d, n, o, e, i, g) {
593
- const p = M("tiny-alert"), a = M("tiny-button"), l = M("tiny-dialog-box");
594
- return B(), te(l, {
595
- visible: e.dialogVisible,
1472
+ }, en = { class: "bind-event-dialog-tip" }, tn = { class: "bind-event-dialog-content" }, nn = { class: "bind-dialog-footer" };
1473
+ function on(u, e, n, t, o, i) {
1474
+ const r = X("tiny-alert"), a = X("tiny-button"), l = X("tiny-dialog-box");
1475
+ return j(), Ce(l, {
1476
+ visible: t.dialogVisible,
596
1477
  title: "事件绑定",
597
1478
  width: "50%",
598
1479
  "dialog-class": "bind-event-dialog",
599
1480
  draggable: "",
600
1481
  "append-to-body": !0,
601
- onClose: e.closeDialog,
602
- onOpened: e.openedDialog
1482
+ onClose: t.closeDialog,
1483
+ onOpened: t.openedDialog
603
1484
  }, {
604
- footer: I(() => [
605
- v("div", xt, [
606
- b(a, { onClick: e.closeDialog }, {
607
- default: I(() => n[0] || (n[0] = [
608
- ke("取 消")
1485
+ footer: F(() => [
1486
+ E("div", nn, [
1487
+ N(a, { onClick: t.closeDialog }, {
1488
+ default: F(() => e[0] || (e[0] = [
1489
+ Fe("取 消")
609
1490
  ])),
610
1491
  _: 1,
611
1492
  __: [0]
612
1493
  }, 8, ["onClick"]),
613
- b(a, {
1494
+ N(a, {
614
1495
  type: "info",
615
- onClick: e.confirm
1496
+ onClick: t.confirm
616
1497
  }, {
617
- default: I(() => n[1] || (n[1] = [
618
- ke("确 定")
1498
+ default: F(() => e[1] || (e[1] = [
1499
+ Fe("确 定")
619
1500
  ])),
620
1501
  _: 1,
621
1502
  __: [1]
622
1503
  }, 8, ["onClick"])
623
1504
  ])
624
1505
  ]),
625
- default: I(() => [
626
- v("div", Et, [
627
- b(p, {
1506
+ default: F(() => [
1507
+ E("div", en, [
1508
+ N(r, {
628
1509
  type: "info",
629
1510
  description: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)。",
630
1511
  class: "header-alert",
631
1512
  closable: !1
632
1513
  })
633
1514
  ]),
634
- v("div", yt, [
635
- (B(), te(Ge(e.BindEventsDialogSidebar), {
636
- dialogVisible: e.dialogVisible,
637
- eventBinding: o.eventBinding
1515
+ E("div", tn, [
1516
+ (j(), Ce(bt(t.BindEventsDialogSidebar), {
1517
+ dialogVisible: t.dialogVisible,
1518
+ eventBinding: n.eventBinding
638
1519
  }, null, 8, ["dialogVisible", "eventBinding"])),
639
- (B(), te(Ge(e.BindEventsDialogContent), { dialogVisible: e.dialogVisible }, null, 8, ["dialogVisible"]))
1520
+ (j(), Ce(bt(t.BindEventsDialogContent), { dialogVisible: t.dialogVisible }, null, 8, ["dialogVisible"]))
640
1521
  ])
641
1522
  ]),
642
1523
  _: 1
643
1524
  }, 8, ["visible", "onClose", "onOpened"]);
644
1525
  }
645
- const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-03166656"]]), at = {
1526
+ const ze = /* @__PURE__ */ We(Qt, [["render", on], ["__scopeId", "data-v-84897b97"]]), It = {
646
1527
  onClick: {
647
1528
  label: {
648
1529
  zh_CN: "点击事件"
@@ -699,19 +1580,19 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
699
1580
  },
700
1581
  defaultValue: ""
701
1582
  }
702
- }, et = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], Pe = h((d) => !!et.map((o) => {
703
- const e = o[2].toUpperCase();
704
- return `${o.substring(0, 2)}${e}${o.substring(3)}`;
705
- }).includes(d), {
1583
+ }, kt = ["onabort", "onafterprint", "onanimationend", "onanimationiteration", "onanimationstart", "onappinstalled", "onauxclick", "onbeforeinstallprompt", "onbeforeprint", "onbeforeunload", "onbeforexrselect", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextlost", "oncontextmenu", "oncontextrestored", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "onformdata", "ongotpointercapture", "onhashchange", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onlostpointercapture", "onmessage", "onmessageerror", "onmousedown", "onmouseenter", "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onoffline", "ononline", "onpagehide", "onpageshow", "onpause", "onplay", "onplaying", "onpointercancel", "onpointerdown", "onpointerenter", "onpointerleave", "onpointermove", "onpointerout", "onpointerover", "onpointerrawupdate", "onpointerup", "onpopstate", "onprogress", "onratechange", "onrejectionhandled", "onreset", "onresize", "onscroll", "onsearch", "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", "onselectionchange", "onselectstart", "onslotchange", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", "ontoggle", "ontransitioncancel", "ontransitionend", "ontransitionrun", "ontransitionstart", "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", "onwebkitanimationend", "onwebkitanimationiteration", "onwebkitanimationstart", "onwebkittransitionend", "onwheel"], ot = D((u) => !!kt.map((n) => {
1584
+ const t = n[2].toUpperCase();
1585
+ return `${n.substring(0, 2)}${t}${n.substring(3)}`;
1586
+ }).includes(u), {
706
1587
  metaData: {
707
1588
  id: "engine.setting.event.commonjs-events.checkEvent"
708
1589
  },
709
1590
  ctx: () => ({
710
- commonEvents: at,
711
- allEvents: et,
712
- checkEvent: Pe
1591
+ commonEvents: It,
1592
+ allEvents: kt,
1593
+ checkEvent: ot
713
1594
  })
714
- }), Ct = { class: "footer" }, kt = {
1595
+ }), sn = { class: "footer" }, rn = {
715
1596
  __name: "AddEventsDialog",
716
1597
  props: {
717
1598
  visible: {
@@ -724,34 +1605,34 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
724
1605
  }
725
1606
  },
726
1607
  emits: ["closeDialog", "addEvent"],
727
- setup(d, { emit: n }) {
728
- const o = d, e = n, i = we({
1608
+ setup(u, { emit: e }) {
1609
+ const n = u, t = e, o = rt({
729
1610
  eventDescription: "",
730
1611
  eventName: ""
731
- }), g = Ve(null), p = h((u, t, r) => {
732
- if (o.componentEvents[i.eventName]) {
733
- r(new Error("事件名已存在"));
1612
+ }), i = Ye(null), r = D((_, s, p) => {
1613
+ if (n.componentEvents[o.eventName]) {
1614
+ p(new Error("事件名已存在"));
734
1615
  return;
735
1616
  }
736
- if (!Pe(i.eventName)) {
737
- r(new Error("请输入正确的浏览器事件名"));
1617
+ if (!ot(o.eventName)) {
1618
+ p(new Error("请输入正确的浏览器事件名"));
738
1619
  return;
739
1620
  }
740
- r();
1621
+ p();
741
1622
  }, {
742
1623
  metaData: {
743
1624
  id: "engine.setting.event.AddEventsDialog.eventNameValidator"
744
1625
  },
745
1626
  ctx: () => ({
746
- checkEvent: Pe,
747
- props: o,
748
- emits: e,
749
- formData: i,
750
- ruleForm: g,
751
- eventNameValidator: p,
1627
+ checkEvent: ot,
1628
+ props: n,
1629
+ emits: t,
1630
+ formData: o,
1631
+ ruleForm: i,
1632
+ eventNameValidator: r,
752
1633
  rules: a,
753
1634
  closeDialog: l,
754
- addMethod: s
1635
+ addMethod: c
755
1636
  })
756
1637
  }), a = {
757
1638
  eventDescription: [{
@@ -762,36 +1643,36 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
762
1643
  required: !0,
763
1644
  message: "必填"
764
1645
  }, {
765
- validator: p
1646
+ validator: r
766
1647
  }]
767
- }, l = h(() => {
768
- e("closeDialog");
1648
+ }, l = D(() => {
1649
+ t("closeDialog");
769
1650
  }, {
770
1651
  metaData: {
771
1652
  id: "engine.setting.event.AddEventsDialog.closeDialog"
772
1653
  },
773
1654
  ctx: () => ({
774
- checkEvent: Pe,
775
- props: o,
776
- emits: e,
777
- formData: i,
778
- ruleForm: g,
779
- eventNameValidator: p,
1655
+ checkEvent: ot,
1656
+ props: n,
1657
+ emits: t,
1658
+ formData: o,
1659
+ ruleForm: i,
1660
+ eventNameValidator: r,
780
1661
  rules: a,
781
1662
  closeDialog: l,
782
- addMethod: s
1663
+ addMethod: c
783
1664
  })
784
- }), s = h(() => {
785
- g.value && g.value.validate((u) => {
786
- if (!u)
1665
+ }), c = D(() => {
1666
+ i.value && i.value.validate((_) => {
1667
+ if (!_)
787
1668
  return;
788
1669
  const {
789
- eventName: t,
790
- eventDescription: r
791
- } = i;
792
- e("addEvent", {
793
- eventName: t,
794
- eventDescription: r
1670
+ eventName: s,
1671
+ eventDescription: p
1672
+ } = o;
1673
+ t("addEvent", {
1674
+ eventName: s,
1675
+ eventDescription: p
795
1676
  });
796
1677
  });
797
1678
  }, {
@@ -799,51 +1680,51 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
799
1680
  id: "engine.setting.event.AddEventsDialog.addMethod"
800
1681
  },
801
1682
  ctx: () => ({
802
- checkEvent: Pe,
803
- props: o,
804
- emits: e,
805
- formData: i,
806
- ruleForm: g,
807
- eventNameValidator: p,
1683
+ checkEvent: ot,
1684
+ props: n,
1685
+ emits: t,
1686
+ formData: o,
1687
+ ruleForm: i,
1688
+ eventNameValidator: r,
808
1689
  rules: a,
809
1690
  closeDialog: l,
810
- addMethod: s
1691
+ addMethod: c
811
1692
  })
812
1693
  });
813
- return (u, t) => (B(), te(S(it), {
814
- visible: d.visible,
1694
+ return (_, s) => (j(), Ce(Z(At), {
1695
+ visible: u.visible,
815
1696
  title: "添加新事件",
816
1697
  width: "400px",
817
1698
  "append-to-body": !0,
818
1699
  "close-on-click-modal": !1,
819
- onClose: S(l)
1700
+ onClose: Z(l)
820
1701
  }, {
821
- footer: I(() => [
822
- v("div", Ct, [
823
- b(S(Te), { onClick: S(l) }, {
824
- default: I(() => t[2] || (t[2] = [
825
- ke(" 取消")
1702
+ footer: F(() => [
1703
+ E("div", sn, [
1704
+ N(Z(ct), { onClick: Z(l) }, {
1705
+ default: F(() => s[2] || (s[2] = [
1706
+ Fe(" 取消")
826
1707
  ])),
827
1708
  _: 1,
828
1709
  __: [2]
829
1710
  }, 8, ["onClick"]),
830
- b(S(Te), {
1711
+ N(Z(ct), {
831
1712
  type: "primary",
832
- onClick: S(s)
1713
+ onClick: Z(c)
833
1714
  }, {
834
- default: I(() => t[3] || (t[3] = [
835
- ke(" 确定")
1715
+ default: F(() => s[3] || (s[3] = [
1716
+ Fe(" 确定")
836
1717
  ])),
837
1718
  _: 1,
838
1719
  __: [3]
839
1720
  }, 8, ["onClick"])
840
1721
  ])
841
1722
  ]),
842
- default: I(() => [
843
- b(S(gt), {
1723
+ default: F(() => [
1724
+ N(Z(Vt), {
844
1725
  ref_key: "ruleForm",
845
- ref: g,
846
- model: i,
1726
+ ref: i,
1727
+ model: o,
847
1728
  rules: a,
848
1729
  "label-width": "80px",
849
1730
  "inline-message": !0,
@@ -851,30 +1732,30 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
851
1732
  "label-position": "left",
852
1733
  class: "add-custom-event-form"
853
1734
  }, {
854
- default: I(() => [
855
- b(S(We), {
1735
+ default: F(() => [
1736
+ N(Z(Ct), {
856
1737
  label: "事件函数名",
857
1738
  prop: "eventName",
858
1739
  required: ""
859
1740
  }, {
860
- default: I(() => [
861
- b(S(Fe), {
862
- modelValue: i.eventName,
863
- "onUpdate:modelValue": t[0] || (t[0] = (r) => i.eventName = r),
1741
+ default: F(() => [
1742
+ N(Z(pt), {
1743
+ modelValue: o.eventName,
1744
+ "onUpdate:modelValue": s[0] || (s[0] = (p) => o.eventName = p),
864
1745
  placeholder: "小驼峰格式,如:onDrag"
865
1746
  }, null, 8, ["modelValue"])
866
1747
  ]),
867
1748
  _: 1
868
1749
  }),
869
- b(S(We), {
1750
+ N(Z(Ct), {
870
1751
  label: "事件描述",
871
1752
  prop: "eventDescription",
872
1753
  required: ""
873
1754
  }, {
874
- default: I(() => [
875
- b(S(Fe), {
876
- modelValue: i.eventDescription,
877
- "onUpdate:modelValue": t[1] || (t[1] = (r) => i.eventDescription = r)
1755
+ default: F(() => [
1756
+ N(Z(pt), {
1757
+ modelValue: o.eventDescription,
1758
+ "onUpdate:modelValue": s[1] || (s[1] = (p) => o.eventDescription = p)
878
1759
  }, null, 8, ["modelValue"])
879
1760
  ]),
880
1761
  _: 1
@@ -886,128 +1767,128 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
886
1767
  _: 1
887
1768
  }, 8, ["visible", "onClose"]));
888
1769
  }
889
- }, Ce = /* @__PURE__ */ Ie(kt, [["__scopeId", "data-v-2ed7fac6"]]), At = {
1770
+ }, Je = /* @__PURE__ */ We(rn, [["__scopeId", "data-v-2ed7fac6"]]), ln = {
890
1771
  components: {
891
- BlockLinkEvent: ye,
892
- BindEventsDialog: De,
893
- TinyPopover: pt,
894
- TinyButton: Te,
895
- IconChevronDown: xe(),
896
- SvgButton: Ee,
897
- AddEventsDialog: Ce
1772
+ BlockLinkEvent: je,
1773
+ BindEventsDialog: ze,
1774
+ TinyPopover: Mt,
1775
+ TinyButton: ct,
1776
+ IconChevronDown: $e(),
1777
+ SvgButton: Ue,
1778
+ AddEventsDialog: Je
898
1779
  },
899
1780
  inheritAttrs: !1,
900
1781
  setup() {
901
1782
  const {
902
- PLUGIN_NAME: d,
903
- activePlugin: n
904
- } = V(), {
905
- pageState: o
906
- } = y(), {
907
- getBlockEvents: e,
908
- getCurrentBlock: i,
909
- removeEventLink: g
910
- } = ue(), {
911
- getMaterial: p
912
- } = fe(), {
1783
+ PLUGIN_NAME: u,
1784
+ activePlugin: e
1785
+ } = J(), {
1786
+ pageState: n
1787
+ } = I(), {
1788
+ getBlockEvents: t,
1789
+ getCurrentBlock: o,
1790
+ removeEventLink: i
1791
+ } = Oe(), {
1792
+ getMaterial: r
1793
+ } = Ve(), {
913
1794
  confirm: a
914
- } = _e(), l = be.global.locale.value, {
915
- highlightMethod: s
916
- } = k(C.Page), {
917
- commonEvents: u = {}
918
- } = P("engine.setting.event").options, t = we({
1795
+ } = Me(), l = Te.global.locale.value, {
1796
+ highlightMethod: c
1797
+ } = O(B.Page), {
1798
+ commonEvents: _ = {}
1799
+ } = K("engine.setting.event").options, s = rt({
919
1800
  eventName: "",
920
1801
  // 事件名称
921
1802
  eventBinding: null,
922
1803
  // 事件绑定的处理方法对象
923
1804
  componentEvent: {},
924
- customEvents: u,
1805
+ customEvents: _,
925
1806
  bindActions: {},
926
1807
  showBindEventDialog: !1
927
- }), r = Me(() => !!o.isBlock), c = Me(() => Object.keys(t.bindActions).length === 0), m = Me(() => ({
928
- ...t.componentEvent,
929
- ...t.customEvents
1808
+ }), p = it(() => !!n.isBlock), m = it(() => Object.keys(s.bindActions).length === 0), v = it(() => ({
1809
+ ...s.componentEvent,
1810
+ ...s.customEvents
930
1811
  }));
931
- nt(() => {
932
- var Z, q, ne, oe, ie;
933
- const _ = (Z = o == null ? void 0 : o.currentSchema) == null ? void 0 : Z.componentName, A = p(_);
934
- t.componentEvent = ((ne = (q = A == null ? void 0 : A.content) == null ? void 0 : q.schema) == null ? void 0 : ne.events) || ((oe = A == null ? void 0 : A.schema) == null ? void 0 : oe.events) || {};
935
- const O = ((ie = o == null ? void 0 : o.currentSchema) == null ? void 0 : ie.props) || {}, W = Object.keys(O);
936
- t.bindActions = {}, Object.entries(m.value).forEach(([Q, Le]) => {
937
- var T, Ue, Re;
938
- if (W.indexOf(Q) > -1) {
939
- const st = O[Q], {
940
- value: lt,
941
- params: $e
942
- } = st, dt = !$e && ((Ue = (T = lt.match(/\((.+)\)$/)) == null ? void 0 : T[1]) == null ? void 0 : Ue.split(",")) || $e, pe = {
943
- eventName: Q,
1812
+ St(() => {
1813
+ var ce, ne, pe, ve, be;
1814
+ const w = (ce = n == null ? void 0 : n.currentSchema) == null ? void 0 : ce.componentName, L = r(w);
1815
+ s.componentEvent = ((pe = (ne = L == null ? void 0 : L.content) == null ? void 0 : ne.schema) == null ? void 0 : pe.events) || ((ve = L == null ? void 0 : L.schema) == null ? void 0 : ve.events) || {};
1816
+ const z = ((be = n == null ? void 0 : n.currentSchema) == null ? void 0 : be.props) || {}, ge = Object.keys(z);
1817
+ s.bindActions = {}, Object.entries(v.value).forEach(([he, Le]) => {
1818
+ var Ee, W, Pe;
1819
+ if (ge.indexOf(he) > -1) {
1820
+ const Ze = z[he], {
1821
+ value: f,
1822
+ params: h
1823
+ } = Ze, d = !h && ((W = (Ee = f.match(/\((.+)\)$/)) == null ? void 0 : Ee[1]) == null ? void 0 : W.split(",")) || h, g = {
1824
+ eventName: he,
944
1825
  ref: "",
945
- event: O[Q],
946
- params: dt
1826
+ event: z[he],
1827
+ params: d
947
1828
  };
948
- if (pe.event.type === "JSExpression" && (pe.ref = pe.event.value.replace("this.", "").replace(/\(.*\)$/, "")), o.isBlock) {
949
- pe.metaEvent = Le;
950
- const Je = e(i()), Xe = (Re = o == null ? void 0 : o.currentSchema) == null ? void 0 : Re.id;
951
- Xe && Je && Object.entries(Je).forEach(([ct, ve]) => {
952
- var Ke, He;
953
- Xe === ((Ke = ve == null ? void 0 : ve.linked) == null ? void 0 : Ke.id) && Q === ((He = ve == null ? void 0 : ve.linked) == null ? void 0 : He.event) && (pe.linked = ve.linked, pe.linkedEventName = ct);
1829
+ if (g.event.type === "JSExpression" && (g.ref = g.event.value.replace("this.", "").replace(/\(.*\)$/, "")), n.isBlock) {
1830
+ g.metaEvent = Le;
1831
+ const C = t(o()), P = (Pe = n == null ? void 0 : n.currentSchema) == null ? void 0 : Pe.id;
1832
+ P && C && Object.entries(C).forEach(([R, A]) => {
1833
+ var $, U;
1834
+ P === (($ = A == null ? void 0 : A.linked) == null ? void 0 : $.id) && he === ((U = A == null ? void 0 : A.linked) == null ? void 0 : U.event) && (g.linked = A.linked, g.linkedEventName = R);
954
1835
  });
955
1836
  }
956
- t.bindActions[Q] = pe;
1837
+ s.bindActions[he] = g;
957
1838
  }
958
1839
  });
959
1840
  });
960
- const f = h((_, A) => {
961
- A && t.bindActions[_.eventName] || (t.eventBinding = _, L());
1841
+ const x = D((w, L) => {
1842
+ L && s.bindActions[w.eventName] || (s.eventBinding = w, G());
962
1843
  }, {
963
1844
  metaData: {
964
1845
  id: "engine.setting.event.BindEvents.openActionDialog"
965
1846
  },
966
1847
  ctx: () => ({
967
- PLUGIN_NAME: d,
968
- activePlugin: n,
969
- pageState: o,
970
- getBlockEvents: e,
971
- getCurrentBlock: i,
972
- removeEventLink: g,
973
- getMaterial: p,
1848
+ PLUGIN_NAME: u,
1849
+ activePlugin: e,
1850
+ pageState: n,
1851
+ getBlockEvents: t,
1852
+ getCurrentBlock: o,
1853
+ removeEventLink: i,
1854
+ getMaterial: r,
974
1855
  confirm: a,
975
1856
  locale: l,
976
- highlightMethod: s,
977
- commonEvents: u,
978
- state: t,
979
- isBlock: r,
980
- isEmpty: c,
981
- renderEventList: m,
982
- openActionDialog: f,
983
- deleteAction: x,
984
- delEvent: D,
985
- openCodePanel: N,
986
- handleToggleAddEventDialog: w,
987
- handleAddEvent: E,
988
- useModal: _e,
989
- getMergeMeta: P,
990
- useCanvas: y,
991
- useLayout: V,
992
- useBlock: ue,
993
- useMaterial: fe,
994
- getMetaApi: k,
995
- META_APP: C,
996
- useMessage: he,
997
- i18n: be,
998
- BlockLinkEvent: ye,
999
- SvgButton: Ee,
1000
- iconChevronDown: xe,
1001
- BindEventsDialog: De,
1002
- openDialog: L,
1003
- AddEventsDialog: Ce
1857
+ highlightMethod: c,
1858
+ commonEvents: _,
1859
+ state: s,
1860
+ isBlock: p,
1861
+ isEmpty: m,
1862
+ renderEventList: v,
1863
+ openActionDialog: x,
1864
+ deleteAction: S,
1865
+ delEvent: b,
1866
+ openCodePanel: y,
1867
+ handleToggleAddEventDialog: V,
1868
+ handleAddEvent: k,
1869
+ useModal: Me,
1870
+ getMergeMeta: K,
1871
+ useCanvas: I,
1872
+ useLayout: J,
1873
+ useBlock: Oe,
1874
+ useMaterial: Ve,
1875
+ getMetaApi: O,
1876
+ META_APP: B,
1877
+ useMessage: Re,
1878
+ i18n: Te,
1879
+ BlockLinkEvent: je,
1880
+ SvgButton: Ue,
1881
+ iconChevronDown: $e,
1882
+ BindEventsDialog: ze,
1883
+ openDialog: G,
1884
+ AddEventsDialog: Je
1004
1885
  })
1005
- }), x = h((_) => {
1006
- var O;
1007
- Object.keys(((O = o == null ? void 0 : o.currentSchema) == null ? void 0 : O.props) || {}).indexOf(_.eventName) > -1 && (delete o.currentSchema.props[_.eventName], he().publish({
1886
+ }), S = D((w) => {
1887
+ var z;
1888
+ Object.keys(((z = n == null ? void 0 : n.currentSchema) == null ? void 0 : z.props) || {}).indexOf(w.eventName) > -1 && (delete n.currentSchema.props[w.eventName], Re().publish({
1008
1889
  topic: "schemaChange",
1009
1890
  data: {
1010
- props: o.currentSchema.props
1891
+ props: n.currentSchema.props
1011
1892
  }
1012
1893
  }));
1013
1894
  }, {
@@ -1015,52 +1896,52 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1015
1896
  id: "engine.setting.event.BindEvents.deleteAction"
1016
1897
  },
1017
1898
  ctx: () => ({
1018
- PLUGIN_NAME: d,
1019
- activePlugin: n,
1020
- pageState: o,
1021
- getBlockEvents: e,
1022
- getCurrentBlock: i,
1023
- removeEventLink: g,
1024
- getMaterial: p,
1899
+ PLUGIN_NAME: u,
1900
+ activePlugin: e,
1901
+ pageState: n,
1902
+ getBlockEvents: t,
1903
+ getCurrentBlock: o,
1904
+ removeEventLink: i,
1905
+ getMaterial: r,
1025
1906
  confirm: a,
1026
1907
  locale: l,
1027
- highlightMethod: s,
1028
- commonEvents: u,
1029
- state: t,
1030
- isBlock: r,
1031
- isEmpty: c,
1032
- renderEventList: m,
1033
- openActionDialog: f,
1034
- deleteAction: x,
1035
- delEvent: D,
1036
- openCodePanel: N,
1037
- handleToggleAddEventDialog: w,
1038
- handleAddEvent: E,
1039
- useModal: _e,
1040
- getMergeMeta: P,
1041
- useCanvas: y,
1042
- useLayout: V,
1043
- useBlock: ue,
1044
- useMaterial: fe,
1045
- getMetaApi: k,
1046
- META_APP: C,
1047
- useMessage: he,
1048
- i18n: be,
1049
- BlockLinkEvent: ye,
1050
- SvgButton: Ee,
1051
- iconChevronDown: xe,
1052
- BindEventsDialog: De,
1053
- openDialog: L,
1054
- AddEventsDialog: Ce
1908
+ highlightMethod: c,
1909
+ commonEvents: _,
1910
+ state: s,
1911
+ isBlock: p,
1912
+ isEmpty: m,
1913
+ renderEventList: v,
1914
+ openActionDialog: x,
1915
+ deleteAction: S,
1916
+ delEvent: b,
1917
+ openCodePanel: y,
1918
+ handleToggleAddEventDialog: V,
1919
+ handleAddEvent: k,
1920
+ useModal: Me,
1921
+ getMergeMeta: K,
1922
+ useCanvas: I,
1923
+ useLayout: J,
1924
+ useBlock: Oe,
1925
+ useMaterial: Ve,
1926
+ getMetaApi: O,
1927
+ META_APP: B,
1928
+ useMessage: Re,
1929
+ i18n: Te,
1930
+ BlockLinkEvent: je,
1931
+ SvgButton: Ue,
1932
+ iconChevronDown: $e,
1933
+ BindEventsDialog: ze,
1934
+ openDialog: G,
1935
+ AddEventsDialog: Je
1055
1936
  })
1056
- }), D = h((_) => {
1937
+ }), b = D((w) => {
1057
1938
  a({
1058
1939
  title: "提示",
1059
- message: `您确定要删除事件 ${_.eventName} 吗?`,
1940
+ message: `您确定要删除事件 ${w.eventName} 吗?`,
1060
1941
  exec() {
1061
- o.isBlock && g({
1062
- linked: _.linked
1063
- }), x(_);
1942
+ n.isBlock && i({
1943
+ linked: w.linked
1944
+ }), S(w);
1064
1945
  }
1065
1946
  });
1066
1947
  }, {
@@ -1068,148 +1949,148 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1068
1949
  id: "engine.setting.event.BindEvents.delEvent"
1069
1950
  },
1070
1951
  ctx: () => ({
1071
- PLUGIN_NAME: d,
1072
- activePlugin: n,
1073
- pageState: o,
1074
- getBlockEvents: e,
1075
- getCurrentBlock: i,
1076
- removeEventLink: g,
1077
- getMaterial: p,
1952
+ PLUGIN_NAME: u,
1953
+ activePlugin: e,
1954
+ pageState: n,
1955
+ getBlockEvents: t,
1956
+ getCurrentBlock: o,
1957
+ removeEventLink: i,
1958
+ getMaterial: r,
1078
1959
  confirm: a,
1079
1960
  locale: l,
1080
- highlightMethod: s,
1081
- commonEvents: u,
1082
- state: t,
1083
- isBlock: r,
1084
- isEmpty: c,
1085
- renderEventList: m,
1086
- openActionDialog: f,
1087
- deleteAction: x,
1088
- delEvent: D,
1089
- openCodePanel: N,
1090
- handleToggleAddEventDialog: w,
1091
- handleAddEvent: E,
1092
- useModal: _e,
1093
- getMergeMeta: P,
1094
- useCanvas: y,
1095
- useLayout: V,
1096
- useBlock: ue,
1097
- useMaterial: fe,
1098
- getMetaApi: k,
1099
- META_APP: C,
1100
- useMessage: he,
1101
- i18n: be,
1102
- BlockLinkEvent: ye,
1103
- SvgButton: Ee,
1104
- iconChevronDown: xe,
1105
- BindEventsDialog: De,
1106
- openDialog: L,
1107
- AddEventsDialog: Ce
1961
+ highlightMethod: c,
1962
+ commonEvents: _,
1963
+ state: s,
1964
+ isBlock: p,
1965
+ isEmpty: m,
1966
+ renderEventList: v,
1967
+ openActionDialog: x,
1968
+ deleteAction: S,
1969
+ delEvent: b,
1970
+ openCodePanel: y,
1971
+ handleToggleAddEventDialog: V,
1972
+ handleAddEvent: k,
1973
+ useModal: Me,
1974
+ getMergeMeta: K,
1975
+ useCanvas: I,
1976
+ useLayout: J,
1977
+ useBlock: Oe,
1978
+ useMaterial: Ve,
1979
+ getMetaApi: O,
1980
+ META_APP: B,
1981
+ useMessage: Re,
1982
+ i18n: Te,
1983
+ BlockLinkEvent: je,
1984
+ SvgButton: Ue,
1985
+ iconChevronDown: $e,
1986
+ BindEventsDialog: ze,
1987
+ openDialog: G,
1988
+ AddEventsDialog: Je
1108
1989
  })
1109
- }), N = h((_) => {
1110
- _ && n(d.Page).then(() => {
1111
- s && s(_.ref);
1990
+ }), y = D((w) => {
1991
+ w && e(u.Page).then(() => {
1992
+ c && c(w.ref);
1112
1993
  });
1113
1994
  }, {
1114
1995
  metaData: {
1115
1996
  id: "engine.setting.event.BindEvents.openCodePanel"
1116
1997
  },
1117
1998
  ctx: () => ({
1118
- PLUGIN_NAME: d,
1119
- activePlugin: n,
1120
- pageState: o,
1121
- getBlockEvents: e,
1122
- getCurrentBlock: i,
1123
- removeEventLink: g,
1124
- getMaterial: p,
1999
+ PLUGIN_NAME: u,
2000
+ activePlugin: e,
2001
+ pageState: n,
2002
+ getBlockEvents: t,
2003
+ getCurrentBlock: o,
2004
+ removeEventLink: i,
2005
+ getMaterial: r,
1125
2006
  confirm: a,
1126
2007
  locale: l,
1127
- highlightMethod: s,
1128
- commonEvents: u,
1129
- state: t,
1130
- isBlock: r,
1131
- isEmpty: c,
1132
- renderEventList: m,
1133
- openActionDialog: f,
1134
- deleteAction: x,
1135
- delEvent: D,
1136
- openCodePanel: N,
1137
- handleToggleAddEventDialog: w,
1138
- handleAddEvent: E,
1139
- useModal: _e,
1140
- getMergeMeta: P,
1141
- useCanvas: y,
1142
- useLayout: V,
1143
- useBlock: ue,
1144
- useMaterial: fe,
1145
- getMetaApi: k,
1146
- META_APP: C,
1147
- useMessage: he,
1148
- i18n: be,
1149
- BlockLinkEvent: ye,
1150
- SvgButton: Ee,
1151
- iconChevronDown: xe,
1152
- BindEventsDialog: De,
1153
- openDialog: L,
1154
- AddEventsDialog: Ce
2008
+ highlightMethod: c,
2009
+ commonEvents: _,
2010
+ state: s,
2011
+ isBlock: p,
2012
+ isEmpty: m,
2013
+ renderEventList: v,
2014
+ openActionDialog: x,
2015
+ deleteAction: S,
2016
+ delEvent: b,
2017
+ openCodePanel: y,
2018
+ handleToggleAddEventDialog: V,
2019
+ handleAddEvent: k,
2020
+ useModal: Me,
2021
+ getMergeMeta: K,
2022
+ useCanvas: I,
2023
+ useLayout: J,
2024
+ useBlock: Oe,
2025
+ useMaterial: Ve,
2026
+ getMetaApi: O,
2027
+ META_APP: B,
2028
+ useMessage: Re,
2029
+ i18n: Te,
2030
+ BlockLinkEvent: je,
2031
+ SvgButton: Ue,
2032
+ iconChevronDown: $e,
2033
+ BindEventsDialog: ze,
2034
+ openDialog: G,
2035
+ AddEventsDialog: Je
1155
2036
  })
1156
- }), w = h((_) => {
1157
- t.showBindEventDialog = _;
2037
+ }), V = D((w) => {
2038
+ s.showBindEventDialog = w;
1158
2039
  }, {
1159
2040
  metaData: {
1160
2041
  id: "engine.setting.event.BindEvents.handleToggleAddEventDialog"
1161
2042
  },
1162
2043
  ctx: () => ({
1163
- PLUGIN_NAME: d,
1164
- activePlugin: n,
1165
- pageState: o,
1166
- getBlockEvents: e,
1167
- getCurrentBlock: i,
1168
- removeEventLink: g,
1169
- getMaterial: p,
2044
+ PLUGIN_NAME: u,
2045
+ activePlugin: e,
2046
+ pageState: n,
2047
+ getBlockEvents: t,
2048
+ getCurrentBlock: o,
2049
+ removeEventLink: i,
2050
+ getMaterial: r,
1170
2051
  confirm: a,
1171
2052
  locale: l,
1172
- highlightMethod: s,
1173
- commonEvents: u,
1174
- state: t,
1175
- isBlock: r,
1176
- isEmpty: c,
1177
- renderEventList: m,
1178
- openActionDialog: f,
1179
- deleteAction: x,
1180
- delEvent: D,
1181
- openCodePanel: N,
1182
- handleToggleAddEventDialog: w,
1183
- handleAddEvent: E,
1184
- useModal: _e,
1185
- getMergeMeta: P,
1186
- useCanvas: y,
1187
- useLayout: V,
1188
- useBlock: ue,
1189
- useMaterial: fe,
1190
- getMetaApi: k,
1191
- META_APP: C,
1192
- useMessage: he,
1193
- i18n: be,
1194
- BlockLinkEvent: ye,
1195
- SvgButton: Ee,
1196
- iconChevronDown: xe,
1197
- BindEventsDialog: De,
1198
- openDialog: L,
1199
- AddEventsDialog: Ce
2053
+ highlightMethod: c,
2054
+ commonEvents: _,
2055
+ state: s,
2056
+ isBlock: p,
2057
+ isEmpty: m,
2058
+ renderEventList: v,
2059
+ openActionDialog: x,
2060
+ deleteAction: S,
2061
+ delEvent: b,
2062
+ openCodePanel: y,
2063
+ handleToggleAddEventDialog: V,
2064
+ handleAddEvent: k,
2065
+ useModal: Me,
2066
+ getMergeMeta: K,
2067
+ useCanvas: I,
2068
+ useLayout: J,
2069
+ useBlock: Oe,
2070
+ useMaterial: Ve,
2071
+ getMetaApi: O,
2072
+ META_APP: B,
2073
+ useMessage: Re,
2074
+ i18n: Te,
2075
+ BlockLinkEvent: je,
2076
+ SvgButton: Ue,
2077
+ iconChevronDown: $e,
2078
+ BindEventsDialog: ze,
2079
+ openDialog: G,
2080
+ AddEventsDialog: Je
1200
2081
  })
1201
- }), E = h((_) => {
2082
+ }), k = D((w) => {
1202
2083
  const {
1203
- eventName: A,
1204
- eventDescription: O
1205
- } = _;
1206
- Object.assign(t.customEvents, {
1207
- [A]: {
2084
+ eventName: L,
2085
+ eventDescription: z
2086
+ } = w;
2087
+ Object.assign(s.customEvents, {
2088
+ [L]: {
1208
2089
  label: {
1209
- zh_CN: O
2090
+ zh_CN: z
1210
2091
  },
1211
2092
  description: {
1212
- zh_CN: `${O}的回调函数`
2093
+ zh_CN: `${z}的回调函数`
1213
2094
  },
1214
2095
  type: "event",
1215
2096
  functionInfo: {
@@ -1218,71 +2099,71 @@ const De = /* @__PURE__ */ Ie(bt, [["render", Dt], ["__scopeId", "data-v-0316665
1218
2099
  },
1219
2100
  defaultValue: ""
1220
2101
  }
1221
- }), t.showBindEventDialog = !1;
2102
+ }), s.showBindEventDialog = !1;
1222
2103
  }, {
1223
2104
  metaData: {
1224
2105
  id: "engine.setting.event.BindEvents.handleAddEvent"
1225
2106
  },
1226
2107
  ctx: () => ({
1227
- PLUGIN_NAME: d,
1228
- activePlugin: n,
1229
- pageState: o,
1230
- getBlockEvents: e,
1231
- getCurrentBlock: i,
1232
- removeEventLink: g,
1233
- getMaterial: p,
2108
+ PLUGIN_NAME: u,
2109
+ activePlugin: e,
2110
+ pageState: n,
2111
+ getBlockEvents: t,
2112
+ getCurrentBlock: o,
2113
+ removeEventLink: i,
2114
+ getMaterial: r,
1234
2115
  confirm: a,
1235
2116
  locale: l,
1236
- highlightMethod: s,
1237
- commonEvents: u,
1238
- state: t,
1239
- isBlock: r,
1240
- isEmpty: c,
1241
- renderEventList: m,
1242
- openActionDialog: f,
1243
- deleteAction: x,
1244
- delEvent: D,
1245
- openCodePanel: N,
1246
- handleToggleAddEventDialog: w,
1247
- handleAddEvent: E,
1248
- useModal: _e,
1249
- getMergeMeta: P,
1250
- useCanvas: y,
1251
- useLayout: V,
1252
- useBlock: ue,
1253
- useMaterial: fe,
1254
- getMetaApi: k,
1255
- META_APP: C,
1256
- useMessage: he,
1257
- i18n: be,
1258
- BlockLinkEvent: ye,
1259
- SvgButton: Ee,
1260
- iconChevronDown: xe,
1261
- BindEventsDialog: De,
1262
- openDialog: L,
1263
- AddEventsDialog: Ce
2117
+ highlightMethod: c,
2118
+ commonEvents: _,
2119
+ state: s,
2120
+ isBlock: p,
2121
+ isEmpty: m,
2122
+ renderEventList: v,
2123
+ openActionDialog: x,
2124
+ deleteAction: S,
2125
+ delEvent: b,
2126
+ openCodePanel: y,
2127
+ handleToggleAddEventDialog: V,
2128
+ handleAddEvent: k,
2129
+ useModal: Me,
2130
+ getMergeMeta: K,
2131
+ useCanvas: I,
2132
+ useLayout: J,
2133
+ useBlock: Oe,
2134
+ useMaterial: Ve,
2135
+ getMetaApi: O,
2136
+ META_APP: B,
2137
+ useMessage: Re,
2138
+ i18n: Te,
2139
+ BlockLinkEvent: je,
2140
+ SvgButton: Ue,
2141
+ iconChevronDown: $e,
2142
+ BindEventsDialog: ze,
2143
+ openDialog: G,
2144
+ AddEventsDialog: Je
1264
2145
  })
1265
2146
  });
1266
2147
  return {
1267
- state: t,
1268
- isBlock: r,
1269
- isEmpty: c,
1270
- delEvent: D,
1271
- openCodePanel: N,
1272
- openActionDialog: f,
1273
- handleAddEvent: E,
1274
- handleToggleAddEventDialog: w,
1275
- renderEventList: m,
2148
+ state: s,
2149
+ isBlock: p,
2150
+ isEmpty: m,
2151
+ delEvent: b,
2152
+ openCodePanel: y,
2153
+ openActionDialog: x,
2154
+ handleAddEvent: k,
2155
+ handleToggleAddEventDialog: V,
2156
+ renderEventList: v,
1276
2157
  locale: l
1277
2158
  };
1278
2159
  }
1279
- }, Bt = { class: "bind-action-list" }, Nt = { class: "popover-head" }, Vt = { class: "bind-event-list" }, It = ["onClick"], Pt = { class: "bind-actions" }, Mt = { class: "action-item bind-action-item" }, wt = ["onClick"], Lt = { class: "event-bind" }, Ot = { class: "action-buttons" }, St = { class: "empty-action" }, Tt = { class: "icon" };
1280
- function Ut(d, n, o, e, i, g) {
1281
- const p = M("icon-chevron-down"), a = M("tiny-button"), l = M("tiny-popover"), s = M("svg-icon"), u = M("block-link-event"), t = M("svg-button"), r = M("bind-events-dialog"), c = M("add-events-dialog");
1282
- return B(), J(Oe, null, [
1283
- v("div", Bt, [
1284
- v("div", Nt, [
1285
- b(l, {
2160
+ }, an = { class: "bind-action-list" }, dn = { class: "popover-head" }, cn = { class: "bind-event-list" }, hn = ["onClick"], un = { class: "bind-actions" }, fn = { class: "action-item bind-action-item" }, gn = ["onClick"], pn = { class: "event-bind" }, mn = { class: "action-buttons" }, vn = { class: "empty-action" }, bn = { class: "icon" };
2161
+ function _n(u, e, n, t, o, i) {
2162
+ const r = X("icon-chevron-down"), a = X("tiny-button"), l = X("tiny-popover"), c = X("svg-icon"), _ = X("block-link-event"), s = X("svg-button"), p = X("bind-events-dialog"), m = X("add-events-dialog");
2163
+ return j(), re(at, null, [
2164
+ E("div", an, [
2165
+ E("div", dn, [
2166
+ N(l, {
1286
2167
  popperClass: "option-popper setting-advanced-bind-event-list",
1287
2168
  placement: "bottom-start",
1288
2169
  trigger: "hover",
@@ -1290,340 +2171,340 @@ function Ut(d, n, o, e, i, g) {
1290
2171
  width: "256",
1291
2172
  "visible-arrow": !1
1292
2173
  }, {
1293
- reference: I(() => [
1294
- b(a, { class: "bind-event-btn" }, {
1295
- default: I(() => [
1296
- n[2] || (n[2] = v("span", null, "绑定事件", -1)),
1297
- b(p, { class: "icon-chevron-down bind-event-btn-icon" })
2174
+ reference: F(() => [
2175
+ N(a, { class: "bind-event-btn" }, {
2176
+ default: F(() => [
2177
+ e[2] || (e[2] = E("span", null, "绑定事件", -1)),
2178
+ N(r, { class: "icon-chevron-down bind-event-btn-icon" })
1298
2179
  ]),
1299
2180
  _: 1,
1300
2181
  __: [2]
1301
2182
  })
1302
2183
  ]),
1303
- default: I(() => [
1304
- v("ul", Vt, [
1305
- (B(!0), J(Oe, null, ze(e.renderEventList, (m, f) => {
1306
- var x;
1307
- return B(), J("li", {
1308
- key: f,
1309
- class: Ne(["bind-event-list-item", { "bind-event-list-item-notallow": e.state.bindActions[f] }]),
1310
- onClick: (D) => e.openActionDialog({ eventName: f }, !0)
2184
+ default: F(() => [
2185
+ E("ul", cn, [
2186
+ (j(!0), re(at, null, gt(t.renderEventList, (v, x) => {
2187
+ var S;
2188
+ return j(), re("li", {
2189
+ key: x,
2190
+ class: qe(["bind-event-list-item", { "bind-event-list-item-notallow": t.state.bindActions[x] }]),
2191
+ onClick: (b) => t.openActionDialog({ eventName: x }, !0)
1311
2192
  }, [
1312
- v("div", null, Y(f) + "  |  " + Y(((x = m == null ? void 0 : m.label) == null ? void 0 : x[e.locale]) || f), 1)
1313
- ], 10, It);
2193
+ E("div", null, me(x) + "  |  " + me(((S = v == null ? void 0 : v.label) == null ? void 0 : S[t.locale]) || x), 1)
2194
+ ], 10, hn);
1314
2195
  }), 128))
1315
2196
  ])
1316
2197
  ]),
1317
2198
  _: 1
1318
2199
  }),
1319
- b(a, {
2200
+ N(a, {
1320
2201
  class: "title add-custom-event-button bind-action-button-item",
1321
- onClick: n[0] || (n[0] = (m) => e.handleToggleAddEventDialog(!0))
2202
+ onClick: e[0] || (e[0] = (v) => t.handleToggleAddEventDialog(!0))
1322
2203
  }, {
1323
- default: I(() => [
1324
- b(s, {
2204
+ default: F(() => [
2205
+ N(c, {
1325
2206
  name: "add",
1326
2207
  class: "custom-event-button-icon"
1327
2208
  }),
1328
- n[3] || (n[3] = v("span", { class: "custom-event-button-text" }, "添加新事件", -1))
2209
+ e[3] || (e[3] = E("span", { class: "custom-event-button-text" }, "添加新事件", -1))
1329
2210
  ]),
1330
2211
  _: 1,
1331
2212
  __: [3]
1332
2213
  })
1333
2214
  ]),
1334
- qe(v("ul", Pt, [
1335
- (B(!0), J(Oe, null, ze(e.state.bindActions, (m) => {
1336
- var f, x;
1337
- return B(), J("li", {
1338
- key: m.eventName
2215
+ _t(E("ul", un, [
2216
+ (j(!0), re(at, null, gt(t.state.bindActions, (v) => {
2217
+ var x, S;
2218
+ return j(), re("li", {
2219
+ key: v.eventName
1339
2220
  }, [
1340
- v("div", Mt, [
1341
- v("div", {
2221
+ E("div", fn, [
2222
+ E("div", {
1342
2223
  class: "binding-name",
1343
- onClick: (D) => e.openActionDialog(m)
2224
+ onClick: (b) => t.openActionDialog(v)
1344
2225
  }, [
1345
- v("div", null, [
1346
- ke(Y(m.eventName), 1),
1347
- v("span", null, Y((x = (f = e.renderEventList[m.eventName]) == null ? void 0 : f.label) == null ? void 0 : x[e.locale]), 1)
2226
+ E("div", null, [
2227
+ Fe(me(v.eventName), 1),
2228
+ E("span", null, me((S = (x = t.renderEventList[v.eventName]) == null ? void 0 : x.label) == null ? void 0 : S[t.locale]), 1)
1348
2229
  ]),
1349
- v("div", {
1350
- class: Ne({ linked: m.linked })
1351
- }, Y(m.linkedEventName), 3),
1352
- v("span", Lt, Y(m.ref), 1)
1353
- ], 8, wt),
1354
- v("div", Ot, [
1355
- e.isBlock ? (B(), te(u, {
2230
+ E("div", {
2231
+ class: qe({ linked: v.linked })
2232
+ }, me(v.linkedEventName), 3),
2233
+ E("span", pn, me(v.ref), 1)
2234
+ ], 8, gn),
2235
+ E("div", mn, [
2236
+ t.isBlock ? (j(), Ce(_, {
1356
2237
  key: 0,
1357
- data: m
1358
- }, null, 8, ["data"])) : Se("", !0),
1359
- b(t, {
2238
+ data: v
2239
+ }, null, 8, ["data"])) : dt("", !0),
2240
+ N(s, {
1360
2241
  name: "plugin-icon-page-schema",
1361
2242
  tips: "定位到代码",
1362
2243
  placement: "top",
1363
2244
  hoverBgColor: !1,
1364
- onClick: (D) => e.openCodePanel(m)
2245
+ onClick: (b) => t.openCodePanel(v)
1365
2246
  }, null, 8, ["onClick"]),
1366
- b(t, {
2247
+ N(s, {
1367
2248
  name: "setting",
1368
2249
  hoverBgColor: !1,
1369
- onClick: (D) => e.openActionDialog(m, !1)
2250
+ onClick: (b) => t.openActionDialog(v, !1)
1370
2251
  }, null, 8, ["onClick"]),
1371
- b(t, {
2252
+ N(s, {
1372
2253
  name: "delete",
1373
2254
  hoverBgColor: !1,
1374
- onClick: (D) => e.delEvent(m)
2255
+ onClick: (b) => t.delEvent(v)
1375
2256
  }, null, 8, ["onClick"])
1376
2257
  ])
1377
2258
  ])
1378
2259
  ]);
1379
2260
  }), 128))
1380
2261
  ], 512), [
1381
- [Ye, !e.isEmpty]
2262
+ [Et, !t.isEmpty]
1382
2263
  ]),
1383
- qe(v("div", St, [
1384
- v("div", Tt, [
1385
- b(s, {
2264
+ _t(E("div", vn, [
2265
+ E("div", bn, [
2266
+ N(c, {
1386
2267
  name: "empty-action",
1387
2268
  class: "empty-action-icon"
1388
2269
  })
1389
2270
  ]),
1390
- n[4] || (n[4] = v("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
2271
+ e[4] || (e[4] = E("div", { class: "center" }, "支持添加原生DOM事件,然后点击 绑定事件 为画布所选元素增加事件", -1))
1391
2272
  ], 512), [
1392
- [Ye, e.isEmpty]
2273
+ [Et, t.isEmpty]
1393
2274
  ])
1394
2275
  ]),
1395
- b(r, {
1396
- eventBinding: e.state.eventBinding
2276
+ N(p, {
2277
+ eventBinding: t.state.eventBinding
1397
2278
  }, null, 8, ["eventBinding"]),
1398
- b(c, {
1399
- visible: e.state.showBindEventDialog,
1400
- componentEvents: e.renderEventList,
1401
- onCloseDialog: n[1] || (n[1] = (m) => e.handleToggleAddEventDialog(!1)),
1402
- onAddEvent: e.handleAddEvent
2279
+ N(m, {
2280
+ visible: t.state.showBindEventDialog,
2281
+ componentEvents: t.renderEventList,
2282
+ onCloseDialog: e[1] || (e[1] = (v) => t.handleToggleAddEventDialog(!1)),
2283
+ onAddEvent: t.handleAddEvent
1403
2284
  }, null, 8, ["visible", "componentEvents", "onAddEvent"])
1404
2285
  ], 64);
1405
2286
  }
1406
- const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b67"]]), {
1407
- DEFAULT_LOOP_NAME: F
1408
- } = me, {
1409
- string2Obj: ce
1410
- } = ge, zt = {
2287
+ const En = /* @__PURE__ */ We(ln, [["render", _n], ["__scopeId", "data-v-64f96b67"]]), {
2288
+ DEFAULT_LOOP_NAME: ie
2289
+ } = Ae, {
2290
+ string2Obj: Se
2291
+ } = Ie, yn = {
1411
2292
  components: {
1412
- SwitchConfigurator: de,
1413
- TinyTooltip: vt,
1414
- VariableConfigurator: le,
1415
- InputConfigurator: se,
1416
- CodeConfigurator: ae
2293
+ SwitchConfigurator: De,
2294
+ TinyTooltip: Rt,
2295
+ VariableConfigurator: ke,
2296
+ InputConfigurator: we,
2297
+ CodeConfigurator: xe
1417
2298
  },
1418
2299
  inheritAttrs: !1,
1419
2300
  setup() {
1420
2301
  const {
1421
- pageState: d
1422
- } = y(), n = Ve(!1), o = Me(() => {
1423
- var t;
1424
- return ((t = n.value) == null ? void 0 : t.type) === G.JSEXPRESSION;
1425
- }), e = h(() => {
1426
- var t, r;
1427
- return ((r = (t = z().getSchema()) == null ? void 0 : t.loopArgs) == null ? void 0 : r[1]) || F.INDEX;
2302
+ pageState: u
2303
+ } = I(), e = Ye(!1), n = it(() => {
2304
+ var s;
2305
+ return ((s = e.value) == null ? void 0 : s.type) === fe.JSEXPRESSION;
2306
+ }), t = D(() => {
2307
+ var s, p;
2308
+ return ((p = (s = oe().getSchema()) == null ? void 0 : s.loopArgs) == null ? void 0 : p[1]) || ie.INDEX;
1428
2309
  }, {
1429
2310
  metaData: {
1430
2311
  id: "engine.setting.event.AdvanceConfig.getIndexName"
1431
2312
  },
1432
2313
  ctx: () => ({
1433
- pageState: d,
1434
- condition: n,
1435
- isBind: o,
1436
- getIndexName: e,
1437
- state: i,
1438
- setLoopKey: g,
1439
- openEditor: p,
2314
+ pageState: u,
2315
+ condition: e,
2316
+ isBind: n,
2317
+ getIndexName: t,
2318
+ state: o,
2319
+ setLoopKey: i,
2320
+ openEditor: r,
1440
2321
  setConfig: a,
1441
2322
  setLoopIndex: l,
1442
- setLoop: s,
1443
- setLoopItem: u,
1444
- CodeConfigurator: ae,
1445
- InputConfigurator: se,
1446
- SwitchConfigurator: de,
1447
- VariableConfigurator: le,
1448
- useProperties: z,
1449
- useCanvas: y,
1450
- PROP_DATA_TYPE: G,
1451
- constants: me,
1452
- utils: ge,
1453
- DEFAULT_LOOP_NAME: F,
1454
- string2Obj: ce
2323
+ setLoop: c,
2324
+ setLoopItem: _,
2325
+ CodeConfigurator: xe,
2326
+ InputConfigurator: we,
2327
+ SwitchConfigurator: De,
2328
+ VariableConfigurator: ke,
2329
+ useProperties: oe,
2330
+ useCanvas: I,
2331
+ PROP_DATA_TYPE: fe,
2332
+ constants: Ae,
2333
+ utils: Ie,
2334
+ DEFAULT_LOOP_NAME: ie,
2335
+ string2Obj: Se
1455
2336
  })
1456
- }), i = we({
2337
+ }), o = rt({
1457
2338
  loopData: {
1458
- type: G.JSEXPRESSION,
2339
+ type: fe.JSEXPRESSION,
1459
2340
  value: "[]"
1460
2341
  },
1461
2342
  loopItem: "item",
1462
2343
  loopIndex: "index",
1463
- isLoop: Me(() => {
1464
- var t;
1465
- return ((t = i.loopData) == null ? void 0 : t.type) === G.JSEXPRESSION;
2344
+ isLoop: it(() => {
2345
+ var s;
2346
+ return ((s = o.loopData) == null ? void 0 : s.type) === fe.JSEXPRESSION;
1466
2347
  }),
1467
2348
  loopKey: "",
1468
2349
  shouldUpdate: !1
1469
2350
  });
1470
- Ze(() => [d == null ? void 0 : d.currentSchema, i.shouldUpdate], ([t]) => {
1471
- var r, c, m, f;
1472
- n.value = (t == null ? void 0 : t.condition) === void 0 ? !0 : t == null ? void 0 : t.condition, i.loopData = t == null ? void 0 : t.loop, i.loopItem = ((r = t == null ? void 0 : t.loopArgs) == null ? void 0 : r[0]) || "", i.loopIndex = ((c = t == null ? void 0 : t.loopArgs) == null ? void 0 : c[1]) || "", i.loopKey = ((f = (m = t == null ? void 0 : t.props) == null ? void 0 : m.key) == null ? void 0 : f.value) || "";
2351
+ yt(() => [u == null ? void 0 : u.currentSchema, o.shouldUpdate], ([s]) => {
2352
+ var p, m, v, x;
2353
+ e.value = (s == null ? void 0 : s.condition) === void 0 ? !0 : s == null ? void 0 : s.condition, o.loopData = s == null ? void 0 : s.loop, o.loopItem = ((p = s == null ? void 0 : s.loopArgs) == null ? void 0 : p[0]) || "", o.loopIndex = ((m = s == null ? void 0 : s.loopArgs) == null ? void 0 : m[1]) || "", o.loopKey = ((x = (v = s == null ? void 0 : s.props) == null ? void 0 : v.key) == null ? void 0 : x.value) || "";
1473
2354
  });
1474
- const g = h((t = "") => {
1475
- var D;
1476
- t = t.replace(/\s*/g, "");
2355
+ const i = D((s = "") => {
2356
+ var b;
2357
+ s = s.replace(/\s*/g, "");
1477
2358
  const {
1478
- getSchema: r,
1479
- setProp: c
1480
- } = z(), m = r();
1481
- if (!m)
2359
+ getSchema: p,
2360
+ setProp: m
2361
+ } = oe(), v = p();
2362
+ if (!v)
1482
2363
  return;
1483
- const f = Number(t).toString() !== "NaN";
1484
- let x = (D = m.props) == null ? void 0 : D.key;
1485
- t && !f && (x = {
1486
- type: G.JSEXPRESSION,
1487
- value: t
1488
- }), t || (i.isLoop ? x = {
1489
- type: G.JSEXPRESSION,
1490
- value: e()
1491
- } : x = ""), c("key", x);
2364
+ const x = Number(s).toString() !== "NaN";
2365
+ let S = (b = v.props) == null ? void 0 : b.key;
2366
+ s && !x && (S = {
2367
+ type: fe.JSEXPRESSION,
2368
+ value: s
2369
+ }), s || (o.isLoop ? S = {
2370
+ type: fe.JSEXPRESSION,
2371
+ value: t()
2372
+ } : S = ""), m("key", S);
1492
2373
  }, {
1493
2374
  metaData: {
1494
2375
  id: "engine.setting.event.AdvanceConfig.setLoopKey"
1495
2376
  },
1496
2377
  ctx: () => ({
1497
- pageState: d,
1498
- condition: n,
1499
- isBind: o,
1500
- getIndexName: e,
1501
- state: i,
1502
- setLoopKey: g,
1503
- openEditor: p,
2378
+ pageState: u,
2379
+ condition: e,
2380
+ isBind: n,
2381
+ getIndexName: t,
2382
+ state: o,
2383
+ setLoopKey: i,
2384
+ openEditor: r,
1504
2385
  setConfig: a,
1505
2386
  setLoopIndex: l,
1506
- setLoop: s,
1507
- setLoopItem: u,
1508
- CodeConfigurator: ae,
1509
- InputConfigurator: se,
1510
- SwitchConfigurator: de,
1511
- VariableConfigurator: le,
1512
- useProperties: z,
1513
- useCanvas: y,
1514
- PROP_DATA_TYPE: G,
1515
- constants: me,
1516
- utils: ge,
1517
- DEFAULT_LOOP_NAME: F,
1518
- string2Obj: ce
2387
+ setLoop: c,
2388
+ setLoopItem: _,
2389
+ CodeConfigurator: xe,
2390
+ InputConfigurator: we,
2391
+ SwitchConfigurator: De,
2392
+ VariableConfigurator: ke,
2393
+ useProperties: oe,
2394
+ useCanvas: I,
2395
+ PROP_DATA_TYPE: fe,
2396
+ constants: Ae,
2397
+ utils: Ie,
2398
+ DEFAULT_LOOP_NAME: ie,
2399
+ string2Obj: Se
1519
2400
  })
1520
2401
  });
1521
- Ze([() => i.isLoop, () => i.loopIndex], () => {
1522
- !i.loopKey && i.isLoop && g(e()), i.isLoop || g("");
2402
+ yt([() => o.isLoop, () => o.loopIndex], () => {
2403
+ !o.loopKey && o.isLoop && i(t()), o.isLoop || i("");
1523
2404
  });
1524
- const p = h(() => {
1525
- var t;
1526
- i.loopData = (t = z().getSchema()) == null ? void 0 : t.loop;
2405
+ const r = D(() => {
2406
+ var s;
2407
+ o.loopData = (s = oe().getSchema()) == null ? void 0 : s.loop;
1527
2408
  }, {
1528
2409
  metaData: {
1529
2410
  id: "engine.setting.event.AdvanceConfig.openEditor"
1530
2411
  },
1531
2412
  ctx: () => ({
1532
- pageState: d,
1533
- condition: n,
1534
- isBind: o,
1535
- getIndexName: e,
1536
- state: i,
1537
- setLoopKey: g,
1538
- openEditor: p,
2413
+ pageState: u,
2414
+ condition: e,
2415
+ isBind: n,
2416
+ getIndexName: t,
2417
+ state: o,
2418
+ setLoopKey: i,
2419
+ openEditor: r,
1539
2420
  setConfig: a,
1540
2421
  setLoopIndex: l,
1541
- setLoop: s,
1542
- setLoopItem: u,
1543
- CodeConfigurator: ae,
1544
- InputConfigurator: se,
1545
- SwitchConfigurator: de,
1546
- VariableConfigurator: le,
1547
- useProperties: z,
1548
- useCanvas: y,
1549
- PROP_DATA_TYPE: G,
1550
- constants: me,
1551
- utils: ge,
1552
- DEFAULT_LOOP_NAME: F,
1553
- string2Obj: ce
2422
+ setLoop: c,
2423
+ setLoopItem: _,
2424
+ CodeConfigurator: xe,
2425
+ InputConfigurator: we,
2426
+ SwitchConfigurator: De,
2427
+ VariableConfigurator: ke,
2428
+ useProperties: oe,
2429
+ useCanvas: I,
2430
+ PROP_DATA_TYPE: fe,
2431
+ constants: Ae,
2432
+ utils: Ie,
2433
+ DEFAULT_LOOP_NAME: ie,
2434
+ string2Obj: Se
1554
2435
  })
1555
- }), a = h((t) => {
2436
+ }), a = D((s) => {
1556
2437
  const {
1557
- getSchema: r
1558
- } = z(), c = r();
1559
- if (!c)
2438
+ getSchema: p
2439
+ } = oe(), m = p();
2440
+ if (!m)
1560
2441
  return;
1561
2442
  const {
1562
- operateNode: m
1563
- } = y();
1564
- if (t === !1 || t != null && t.type)
1565
- m({
2443
+ operateNode: v
2444
+ } = I();
2445
+ if (s === !1 || s != null && s.type)
2446
+ v({
1566
2447
  type: "updateAttributes",
1567
- id: c.id,
2448
+ id: m.id,
1568
2449
  value: {
1569
- condition: t
2450
+ condition: s
1570
2451
  }
1571
2452
  });
1572
2453
  else {
1573
2454
  const {
1574
- condition: f,
1575
- children: x,
1576
- ...D
1577
- } = c;
1578
- m({
2455
+ condition: x,
2456
+ children: S,
2457
+ ...b
2458
+ } = m;
2459
+ v({
1579
2460
  type: "updateAttributes",
1580
- id: c.id,
2461
+ id: m.id,
1581
2462
  value: {
1582
- ...D
2463
+ ...b
1583
2464
  },
1584
2465
  overwrite: !0
1585
2466
  });
1586
2467
  }
1587
- y().canvasApi.value.updateRect(), n.value = t;
2468
+ I().canvasApi.value.updateRect(), e.value = s;
1588
2469
  }, {
1589
2470
  metaData: {
1590
2471
  id: "engine.setting.event.AdvanceConfig.setConfig"
1591
2472
  },
1592
2473
  ctx: () => ({
1593
- pageState: d,
1594
- condition: n,
1595
- isBind: o,
1596
- getIndexName: e,
1597
- state: i,
1598
- setLoopKey: g,
1599
- openEditor: p,
2474
+ pageState: u,
2475
+ condition: e,
2476
+ isBind: n,
2477
+ getIndexName: t,
2478
+ state: o,
2479
+ setLoopKey: i,
2480
+ openEditor: r,
1600
2481
  setConfig: a,
1601
2482
  setLoopIndex: l,
1602
- setLoop: s,
1603
- setLoopItem: u,
1604
- CodeConfigurator: ae,
1605
- InputConfigurator: se,
1606
- SwitchConfigurator: de,
1607
- VariableConfigurator: le,
1608
- useProperties: z,
1609
- useCanvas: y,
1610
- PROP_DATA_TYPE: G,
1611
- constants: me,
1612
- utils: ge,
1613
- DEFAULT_LOOP_NAME: F,
1614
- string2Obj: ce
2483
+ setLoop: c,
2484
+ setLoopItem: _,
2485
+ CodeConfigurator: xe,
2486
+ InputConfigurator: we,
2487
+ SwitchConfigurator: De,
2488
+ VariableConfigurator: ke,
2489
+ useProperties: oe,
2490
+ useCanvas: I,
2491
+ PROP_DATA_TYPE: fe,
2492
+ constants: Ae,
2493
+ utils: Ie,
2494
+ DEFAULT_LOOP_NAME: ie,
2495
+ string2Obj: Se
1615
2496
  })
1616
- }), l = h((t) => {
1617
- const r = z().getSchema();
1618
- let c = r.loopArgs;
2497
+ }), l = D((s) => {
2498
+ const p = oe().getSchema();
2499
+ let m = p.loopArgs;
1619
2500
  const {
1620
- operateNode: m
1621
- } = y();
1622
- c ? c[1] = t || F.INDEX : c = [F.ITEM, t], m({
2501
+ operateNode: v
2502
+ } = I();
2503
+ m ? m[1] = s || ie.INDEX : m = [ie.ITEM, s], v({
1623
2504
  type: "updateAttributes",
1624
- id: r.id,
2505
+ id: p.id,
1625
2506
  value: {
1626
- loopArgs: c
2507
+ loopArgs: m
1627
2508
  }
1628
2509
  });
1629
2510
  }, {
@@ -1631,99 +2512,99 @@ const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b6
1631
2512
  id: "engine.setting.event.AdvanceConfig.setLoopIndex"
1632
2513
  },
1633
2514
  ctx: () => ({
1634
- pageState: d,
1635
- condition: n,
1636
- isBind: o,
1637
- getIndexName: e,
1638
- state: i,
1639
- setLoopKey: g,
1640
- openEditor: p,
2515
+ pageState: u,
2516
+ condition: e,
2517
+ isBind: n,
2518
+ getIndexName: t,
2519
+ state: o,
2520
+ setLoopKey: i,
2521
+ openEditor: r,
1641
2522
  setConfig: a,
1642
2523
  setLoopIndex: l,
1643
- setLoop: s,
1644
- setLoopItem: u,
1645
- CodeConfigurator: ae,
1646
- InputConfigurator: se,
1647
- SwitchConfigurator: de,
1648
- VariableConfigurator: le,
1649
- useProperties: z,
1650
- useCanvas: y,
1651
- PROP_DATA_TYPE: G,
1652
- constants: me,
1653
- utils: ge,
1654
- DEFAULT_LOOP_NAME: F,
1655
- string2Obj: ce
2524
+ setLoop: c,
2525
+ setLoopItem: _,
2526
+ CodeConfigurator: xe,
2527
+ InputConfigurator: we,
2528
+ SwitchConfigurator: De,
2529
+ VariableConfigurator: ke,
2530
+ useProperties: oe,
2531
+ useCanvas: I,
2532
+ PROP_DATA_TYPE: fe,
2533
+ constants: Ae,
2534
+ utils: Ie,
2535
+ DEFAULT_LOOP_NAME: ie,
2536
+ string2Obj: Se
1656
2537
  })
1657
- }), s = h((t) => {
2538
+ }), c = D((s) => {
1658
2539
  const {
1659
- operateNode: r
1660
- } = y(), {
1661
- getSchema: c
1662
- } = z(), m = c();
1663
- if (t) {
1664
- const f = t != null && t.type ? t : ce(t);
1665
- r({
2540
+ operateNode: p
2541
+ } = I(), {
2542
+ getSchema: m
2543
+ } = oe(), v = m();
2544
+ if (s) {
2545
+ const x = s != null && s.type ? s : Se(s);
2546
+ p({
1666
2547
  type: "updateAttributes",
1667
- id: m.id,
2548
+ id: v.id,
1668
2549
  value: {
1669
- loop: f
2550
+ loop: x
1670
2551
  }
1671
- }), l(F.INDEX);
2552
+ }), l(ie.INDEX);
1672
2553
  } else {
1673
- g();
2554
+ i();
1674
2555
  const {
1675
- loop: f,
1676
- loopArgs: x,
1677
- children: D,
1678
- ...N
1679
- } = m;
1680
- r({
2556
+ loop: x,
2557
+ loopArgs: S,
2558
+ children: b,
2559
+ ...y
2560
+ } = v;
2561
+ p({
1681
2562
  type: "updateAttributes",
1682
- id: m.id,
1683
- value: N,
2563
+ id: v.id,
2564
+ value: y,
1684
2565
  overwrite: !0
1685
2566
  });
1686
2567
  }
1687
- i.shouldUpdate = !i.shouldUpdate;
2568
+ o.shouldUpdate = !o.shouldUpdate;
1688
2569
  }, {
1689
2570
  metaData: {
1690
2571
  id: "engine.setting.event.AdvanceConfig.setLoop"
1691
2572
  },
1692
2573
  ctx: () => ({
1693
- pageState: d,
1694
- condition: n,
1695
- isBind: o,
1696
- getIndexName: e,
1697
- state: i,
1698
- setLoopKey: g,
1699
- openEditor: p,
2574
+ pageState: u,
2575
+ condition: e,
2576
+ isBind: n,
2577
+ getIndexName: t,
2578
+ state: o,
2579
+ setLoopKey: i,
2580
+ openEditor: r,
1700
2581
  setConfig: a,
1701
2582
  setLoopIndex: l,
1702
- setLoop: s,
1703
- setLoopItem: u,
1704
- CodeConfigurator: ae,
1705
- InputConfigurator: se,
1706
- SwitchConfigurator: de,
1707
- VariableConfigurator: le,
1708
- useProperties: z,
1709
- useCanvas: y,
1710
- PROP_DATA_TYPE: G,
1711
- constants: me,
1712
- utils: ge,
1713
- DEFAULT_LOOP_NAME: F,
1714
- string2Obj: ce
2583
+ setLoop: c,
2584
+ setLoopItem: _,
2585
+ CodeConfigurator: xe,
2586
+ InputConfigurator: we,
2587
+ SwitchConfigurator: De,
2588
+ VariableConfigurator: ke,
2589
+ useProperties: oe,
2590
+ useCanvas: I,
2591
+ PROP_DATA_TYPE: fe,
2592
+ constants: Ae,
2593
+ utils: Ie,
2594
+ DEFAULT_LOOP_NAME: ie,
2595
+ string2Obj: Se
1715
2596
  })
1716
- }), u = h((t) => {
1717
- const r = z().getSchema();
1718
- let c = r.loopArgs;
2597
+ }), _ = D((s) => {
2598
+ const p = oe().getSchema();
2599
+ let m = p.loopArgs;
1719
2600
  const {
1720
- operateNode: m
1721
- } = y();
1722
- c ? c[0] = t || F.ITEM : c = [t, F.INDEX], m({
2601
+ operateNode: v
2602
+ } = I();
2603
+ m ? m[0] = s || ie.ITEM : m = [s, ie.INDEX], v({
1723
2604
  type: "updateAttributes",
1724
- id: r.id,
2605
+ id: p.id,
1725
2606
  value: {
1726
- loopArgs: c
2607
+ loopArgs: m
1727
2608
  }
1728
2609
  });
1729
2610
  }, {
@@ -1731,139 +2612,139 @@ const jt = /* @__PURE__ */ Ie(At, [["render", Ut], ["__scopeId", "data-v-64f96b6
1731
2612
  id: "engine.setting.event.AdvanceConfig.setLoopItem"
1732
2613
  },
1733
2614
  ctx: () => ({
1734
- pageState: d,
1735
- condition: n,
1736
- isBind: o,
1737
- getIndexName: e,
1738
- state: i,
1739
- setLoopKey: g,
1740
- openEditor: p,
2615
+ pageState: u,
2616
+ condition: e,
2617
+ isBind: n,
2618
+ getIndexName: t,
2619
+ state: o,
2620
+ setLoopKey: i,
2621
+ openEditor: r,
1741
2622
  setConfig: a,
1742
2623
  setLoopIndex: l,
1743
- setLoop: s,
1744
- setLoopItem: u,
1745
- CodeConfigurator: ae,
1746
- InputConfigurator: se,
1747
- SwitchConfigurator: de,
1748
- VariableConfigurator: le,
1749
- useProperties: z,
1750
- useCanvas: y,
1751
- PROP_DATA_TYPE: G,
1752
- constants: me,
1753
- utils: ge,
1754
- DEFAULT_LOOP_NAME: F,
1755
- string2Obj: ce
2624
+ setLoop: c,
2625
+ setLoopItem: _,
2626
+ CodeConfigurator: xe,
2627
+ InputConfigurator: we,
2628
+ SwitchConfigurator: De,
2629
+ VariableConfigurator: ke,
2630
+ useProperties: oe,
2631
+ useCanvas: I,
2632
+ PROP_DATA_TYPE: fe,
2633
+ constants: Ae,
2634
+ utils: Ie,
2635
+ DEFAULT_LOOP_NAME: ie,
2636
+ string2Obj: Se
1756
2637
  })
1757
2638
  });
1758
2639
  return {
1759
- condition: n,
2640
+ condition: e,
1760
2641
  setConfig: a,
1761
- isBind: o,
1762
- state: i,
1763
- setLoop: s,
1764
- setLoopItem: u,
1765
- DEFAULT_LOOP_NAME: F,
1766
- openEditor: p,
2642
+ isBind: n,
2643
+ state: o,
2644
+ setLoop: c,
2645
+ setLoopItem: _,
2646
+ DEFAULT_LOOP_NAME: ie,
2647
+ openEditor: r,
1767
2648
  setLoopIndex: l,
1768
- setLoopKey: g,
1769
- getIndexName: e
2649
+ setLoopKey: i,
2650
+ getIndexName: t
1770
2651
  };
1771
2652
  }
1772
- }, Ft = { class: "advanced-config-container" }, Rt = { class: "advnce-config" }, $t = { class: "advanced-config-form-item" }, Jt = ["title"], Xt = { class: "advnce-config loop-data-item" }, Kt = { class: "advanced-config-form-item" }, Ht = ["title"], Gt = { class: "advnce-config" }, qt = { class: "advanced-config-form-item" }, Yt = { class: "advnce-config" }, Zt = { class: "advanced-config-form-item" }, Wt = { class: "advnce-config" }, Qt = { class: "advanced-config-form-item" };
1773
- function en(d, n, o, e, i, g) {
1774
- var t, r;
1775
- const p = M("switch-configurator"), a = M("variable-configurator"), l = M("code-configurator"), s = M("input-configurator"), u = M("tiny-tooltip");
1776
- return B(), J("div", Ft, [
1777
- v("div", Rt, [
1778
- n[6] || (n[6] = v("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
1779
- v("div", $t, [
1780
- e.isBind ? (B(), J("div", {
2653
+ }, Cn = { class: "advanced-config-container" }, xn = { class: "advnce-config" }, wn = { class: "advanced-config-form-item" }, kn = ["title"], Dn = { class: "advnce-config loop-data-item" }, Sn = { class: "advanced-config-form-item" }, Nn = ["title"], An = { class: "advnce-config" }, In = { class: "advanced-config-form-item" }, Ln = { class: "advnce-config" }, Pn = { class: "advanced-config-form-item" }, Bn = { class: "advnce-config" }, On = { class: "advanced-config-form-item" };
2654
+ function Vn(u, e, n, t, o, i) {
2655
+ var s, p;
2656
+ const r = X("switch-configurator"), a = X("variable-configurator"), l = X("code-configurator"), c = X("input-configurator"), _ = X("tiny-tooltip");
2657
+ return j(), re("div", Cn, [
2658
+ E("div", xn, [
2659
+ e[6] || (e[6] = E("label", { class: "text-ellipsis-multiple" }, "是否渲染", -1)),
2660
+ E("div", wn, [
2661
+ t.isBind ? (j(), re("div", {
1781
2662
  key: 1,
1782
2663
  class: "binding-state text-ellipsis-multiple",
1783
- title: e.condition.value
1784
- }, " 已绑定:" + Y(e.condition.value), 9, Jt)) : (B(), te(p, {
2664
+ title: t.condition.value
2665
+ }, " 已绑定:" + me(t.condition.value), 9, kn)) : (j(), Ce(r, {
1785
2666
  key: 0,
1786
- modelValue: e.condition,
1787
- "onUpdate:modelValue": e.setConfig
2667
+ modelValue: t.condition,
2668
+ "onUpdate:modelValue": t.setConfig
1788
2669
  }, null, 8, ["modelValue", "onUpdate:modelValue"])),
1789
- b(a, {
1790
- modelValue: e.condition,
2670
+ N(a, {
2671
+ modelValue: t.condition,
1791
2672
  "onUpdate:modelValue": [
1792
- n[0] || (n[0] = (c) => e.condition = c),
1793
- e.setConfig
2673
+ e[0] || (e[0] = (m) => t.condition = m),
2674
+ t.setConfig
1794
2675
  ],
1795
2676
  name: "advance"
1796
2677
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
1797
2678
  ])
1798
2679
  ]),
1799
- v("div", Xt, [
1800
- n[7] || (n[7] = v("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
1801
- v("div", Kt, [
1802
- e.state.isLoop ? (B(), J("div", {
2680
+ E("div", Dn, [
2681
+ e[7] || (e[7] = E("label", { class: "text-ellipsis-multiple" }, "循环数据", -1)),
2682
+ E("div", Sn, [
2683
+ t.state.isLoop ? (j(), re("div", {
1803
2684
  key: 1,
1804
2685
  class: "binding-state text-ellipsis-multiple",
1805
- title: (t = e.state.loopData) == null ? void 0 : t.value
1806
- }, " 已绑定:" + Y((r = e.state.loopData) == null ? void 0 : r.value), 9, Ht)) : (B(), te(l, {
2686
+ title: (s = t.state.loopData) == null ? void 0 : s.value
2687
+ }, " 已绑定:" + me((p = t.state.loopData) == null ? void 0 : p.value), 9, Nn)) : (j(), Ce(l, {
1807
2688
  key: 0,
1808
- modelValue: e.state.loopData,
2689
+ modelValue: t.state.loopData,
1809
2690
  "onUpdate:modelValue": [
1810
- n[1] || (n[1] = (c) => e.state.loopData = c),
1811
- e.setLoop
2691
+ e[1] || (e[1] = (m) => t.state.loopData = m),
2692
+ t.setLoop
1812
2693
  ],
1813
2694
  "data-type": "JSExpression",
1814
- onOpen: e.openEditor
2695
+ onOpen: t.openEditor
1815
2696
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onOpen"])),
1816
- b(a, {
1817
- modelValue: e.state.loopData,
2697
+ N(a, {
2698
+ modelValue: t.state.loopData,
1818
2699
  "onUpdate:modelValue": [
1819
- n[2] || (n[2] = (c) => e.state.loopData = c),
1820
- e.setLoop
2700
+ e[2] || (e[2] = (m) => t.state.loopData = m),
2701
+ t.setLoop
1821
2702
  ],
1822
2703
  name: "advance"
1823
2704
  }, null, 8, ["modelValue", "onUpdate:modelValue"])
1824
2705
  ])
1825
2706
  ]),
1826
- v("div", Gt, [
1827
- n[8] || (n[8] = v("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
1828
- v("div", qt, [
1829
- b(s, {
1830
- modelValue: e.state.loopItem,
2707
+ E("div", An, [
2708
+ e[8] || (e[8] = E("label", { class: "text-ellipsis-multiple" }, "迭代变量名", -1)),
2709
+ E("div", In, [
2710
+ N(c, {
2711
+ modelValue: t.state.loopItem,
1831
2712
  "onUpdate:modelValue": [
1832
- n[3] || (n[3] = (c) => e.state.loopItem = c),
1833
- e.setLoopItem
2713
+ e[3] || (e[3] = (m) => t.state.loopItem = m),
2714
+ t.setLoopItem
1834
2715
  ],
1835
- placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.ITEM}`
2716
+ placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.ITEM}`
1836
2717
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1837
2718
  ])
1838
2719
  ]),
1839
- v("div", Yt, [
1840
- n[9] || (n[9] = v("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
1841
- v("div", Zt, [
1842
- b(s, {
1843
- modelValue: e.state.loopIndex,
2720
+ E("div", Ln, [
2721
+ e[9] || (e[9] = E("label", { class: "text-ellipsis-multiple" }, "索引变量名", -1)),
2722
+ E("div", Pn, [
2723
+ N(c, {
2724
+ modelValue: t.state.loopIndex,
1844
2725
  "onUpdate:modelValue": [
1845
- n[4] || (n[4] = (c) => e.state.loopIndex = c),
1846
- e.setLoopIndex
2726
+ e[4] || (e[4] = (m) => t.state.loopIndex = m),
2727
+ t.setLoopIndex
1847
2728
  ],
1848
- placeholder: `默认值为:${e.DEFAULT_LOOP_NAME.INDEX}`
2729
+ placeholder: `默认值为:${t.DEFAULT_LOOP_NAME.INDEX}`
1849
2730
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1850
2731
  ])
1851
2732
  ]),
1852
- v("div", Wt, [
1853
- n[10] || (n[10] = v("label", { class: "text-ellipsis-multiple" }, "key", -1)),
1854
- v("div", Qt, [
1855
- b(u, {
2733
+ E("div", Bn, [
2734
+ e[10] || (e[10] = E("label", { class: "text-ellipsis-multiple" }, "key", -1)),
2735
+ E("div", On, [
2736
+ N(_, {
1856
2737
  content: "建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存",
1857
2738
  effect: "light"
1858
2739
  }, {
1859
- default: I(() => [
1860
- b(s, {
1861
- modelValue: e.state.loopKey,
2740
+ default: F(() => [
2741
+ N(c, {
2742
+ modelValue: t.state.loopKey,
1862
2743
  "onUpdate:modelValue": [
1863
- n[5] || (n[5] = (c) => e.state.loopKey = c),
1864
- e.setLoopKey
2744
+ e[5] || (e[5] = (m) => t.state.loopKey = m),
2745
+ t.setLoopKey
1865
2746
  ],
1866
- placeholder: `默认为索引名:${e.getIndexName()}`
2747
+ placeholder: `默认为索引名:${t.getIndexName()}`
1867
2748
  }, null, 8, ["modelValue", "placeholder", "onUpdate:modelValue"])
1868
2749
  ]),
1869
2750
  _: 1
@@ -1872,46 +2753,46 @@ function en(d, n, o, e, i, g) {
1872
2753
  ])
1873
2754
  ]);
1874
2755
  }
1875
- const tn = /* @__PURE__ */ Ie(zt, [["render", en], ["__scopeId", "data-v-275ffc6c"]]), nn = {
2756
+ const Mn = /* @__PURE__ */ We(yn, [["render", Vn], ["__scopeId", "data-v-275ffc6c"]]), Rn = {
1876
2757
  __name: "Main",
1877
2758
  props: {
1878
2759
  fixedPanels: Array
1879
2760
  },
1880
2761
  emits: [],
1881
- setup(d, { emit: n }) {
1882
- const o = Ve(["bindEvent", "advancedConfig"]), {
1883
- PLUGIN_NAME: e
1884
- } = V(), g = we({
1885
- emitEvent: n
2762
+ setup(u, { emit: e }) {
2763
+ const n = Ye(["bindEvent", "advancedConfig"]), {
2764
+ PLUGIN_NAME: t
2765
+ } = J(), i = rt({
2766
+ emitEvent: e
1886
2767
  });
1887
- return tt("panelState", g), (p, a) => (B(), te(S(ht), {
2768
+ return Dt("panelState", i), (r, a) => (j(), Ce(Z($t), {
1888
2769
  title: "高级",
1889
- "fixed-panels": d.fixedPanels,
1890
- "fixed-name": S(e).Event,
2770
+ "fixed-panels": u.fixedPanels,
2771
+ "fixed-name": Z(t).Event,
1891
2772
  "header-margin-bottom": 0,
1892
- onClose: a[1] || (a[1] = (l) => p.$emit("close"))
2773
+ onClose: a[1] || (a[1] = (l) => r.$emit("close"))
1893
2774
  }, {
1894
- content: I(() => [
1895
- b(S(ut), {
1896
- modelValue: o.value,
1897
- "onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l)
2775
+ content: F(() => [
2776
+ N(Z(Tt), {
2777
+ modelValue: n.value,
2778
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l)
1898
2779
  }, {
1899
- default: I(() => [
1900
- b(S(Qe), {
2780
+ default: F(() => [
2781
+ N(Z(xt), {
1901
2782
  title: "事件绑定",
1902
2783
  name: "bindEvent"
1903
2784
  }, {
1904
- default: I(() => [
1905
- b(jt)
2785
+ default: F(() => [
2786
+ N(En)
1906
2787
  ]),
1907
2788
  _: 1
1908
2789
  }),
1909
- b(S(Qe), {
2790
+ N(Z(xt), {
1910
2791
  title: "高级配置",
1911
2792
  name: "advancedConfig"
1912
2793
  }, {
1913
- default: I(() => [
1914
- b(tn)
2794
+ default: F(() => [
2795
+ N(Mn)
1915
2796
  ]),
1916
2797
  _: 1
1917
2798
  })
@@ -1922,222 +2803,222 @@ const tn = /* @__PURE__ */ Ie(zt, [["render", en], ["__scopeId", "data-v-275ffc6
1922
2803
  _: 1
1923
2804
  }, 8, ["fixed-panels", "fixed-name"]));
1924
2805
  }
1925
- }, ee = "newMethod", je = /[^0-9a-zA-Z_$]/, Be = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, re = {
2806
+ }, ye = "newMethod", ft = /[^0-9a-zA-Z_$]/, He = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, Ne = {
1926
2807
  default: "选择已有方法或者添加新方法(点击 确定 之后将在JS面板中创建一个该名称的新方法)",
1927
2808
  exist: "方法名称已存在",
1928
2809
  ruleInvalid: "请输入有效的方法名,可以由字母、数字、下划线、$ 符号组成,不能以数字开头",
1929
2810
  empty: "方法名称不能为空"
1930
- }, on = {
2811
+ }, Tn = {
1931
2812
  components: {
1932
- MonacoEditor: Ae,
1933
- TinyInput: Fe,
1934
- TinyCheckbox: ft
2813
+ MonacoEditor: Xe,
2814
+ TinyInput: pt,
2815
+ TinyCheckbox: Ut
1935
2816
  },
1936
2817
  props: {
1937
2818
  dialogVisible: Boolean
1938
2819
  },
1939
2820
  setup() {
1940
2821
  const {
1941
- getMethodNameList: d
1942
- } = k(C.Page), n = ot("context"), o = {
2822
+ getMethodNameList: u
2823
+ } = O(B.Page), e = Nt("context"), n = {
1943
2824
  language: "json",
1944
2825
  lineNumbers: !1,
1945
2826
  minimap: {
1946
2827
  enabled: !1
1947
2828
  }
1948
- }, e = h((l) => {
1949
- n.editorContent = l;
2829
+ }, t = D((l) => {
2830
+ e.editorContent = l;
1950
2831
  }, {
1951
2832
  metaData: {
1952
2833
  id: "engine.setting.event.BindEventsDialogContent.editorContentChange"
1953
2834
  },
1954
2835
  ctx: () => ({
1955
- getMethodNameList: d,
1956
- context: n,
1957
- editorOptions: o,
1958
- editorContentChange: e,
1959
- validMethodNameEmpty: i,
1960
- validMethodNameExist: g,
1961
- invalidMethodName: p,
2836
+ getMethodNameList: u,
2837
+ context: e,
2838
+ editorOptions: n,
2839
+ editorContentChange: t,
2840
+ validMethodNameEmpty: o,
2841
+ validMethodNameExist: i,
2842
+ invalidMethodName: r,
1962
2843
  change: a,
1963
- VueMonaco: Ae,
1964
- getMetaApi: k,
1965
- META_APP: C,
1966
- METHOD_TIPS_MAP: re,
1967
- NEW_METHOD_TYPE: ee,
1968
- VALID_VARNAME_RE: Be
2844
+ VueMonaco: Xe,
2845
+ getMetaApi: O,
2846
+ META_APP: B,
2847
+ METHOD_TIPS_MAP: Ne,
2848
+ NEW_METHOD_TYPE: ye,
2849
+ VALID_VARNAME_RE: He
1969
2850
  })
1970
- }), i = h((l) => !l, {
2851
+ }), o = D((l) => !l, {
1971
2852
  metaData: {
1972
2853
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameEmpty"
1973
2854
  },
1974
2855
  ctx: () => ({
1975
- getMethodNameList: d,
1976
- context: n,
1977
- editorOptions: o,
1978
- editorContentChange: e,
1979
- validMethodNameEmpty: i,
1980
- validMethodNameExist: g,
1981
- invalidMethodName: p,
2856
+ getMethodNameList: u,
2857
+ context: e,
2858
+ editorOptions: n,
2859
+ editorContentChange: t,
2860
+ validMethodNameEmpty: o,
2861
+ validMethodNameExist: i,
2862
+ invalidMethodName: r,
1982
2863
  change: a,
1983
- VueMonaco: Ae,
1984
- getMetaApi: k,
1985
- META_APP: C,
1986
- METHOD_TIPS_MAP: re,
1987
- NEW_METHOD_TYPE: ee,
1988
- VALID_VARNAME_RE: Be
2864
+ VueMonaco: Xe,
2865
+ getMetaApi: O,
2866
+ META_APP: B,
2867
+ METHOD_TIPS_MAP: Ne,
2868
+ NEW_METHOD_TYPE: ye,
2869
+ VALID_VARNAME_RE: He
1989
2870
  })
1990
- }), g = h((l) => d == null ? void 0 : d().includes(l), {
2871
+ }), i = D((l) => u == null ? void 0 : u().includes(l), {
1991
2872
  metaData: {
1992
2873
  id: "engine.setting.event.BindEventsDialogContent.validMethodNameExist"
1993
2874
  },
1994
2875
  ctx: () => ({
1995
- getMethodNameList: d,
1996
- context: n,
1997
- editorOptions: o,
1998
- editorContentChange: e,
1999
- validMethodNameEmpty: i,
2000
- validMethodNameExist: g,
2001
- invalidMethodName: p,
2876
+ getMethodNameList: u,
2877
+ context: e,
2878
+ editorOptions: n,
2879
+ editorContentChange: t,
2880
+ validMethodNameEmpty: o,
2881
+ validMethodNameExist: i,
2882
+ invalidMethodName: r,
2002
2883
  change: a,
2003
- VueMonaco: Ae,
2004
- getMetaApi: k,
2005
- META_APP: C,
2006
- METHOD_TIPS_MAP: re,
2007
- NEW_METHOD_TYPE: ee,
2008
- VALID_VARNAME_RE: Be
2884
+ VueMonaco: Xe,
2885
+ getMetaApi: O,
2886
+ META_APP: B,
2887
+ METHOD_TIPS_MAP: Ne,
2888
+ NEW_METHOD_TYPE: ye,
2889
+ VALID_VARNAME_RE: He
2009
2890
  })
2010
- }), p = h((l) => !Be.test(l), {
2891
+ }), r = D((l) => !He.test(l), {
2011
2892
  metaData: {
2012
2893
  id: "engine.setting.event.BindEventsDialogContent.invalidMethodName"
2013
2894
  },
2014
2895
  ctx: () => ({
2015
- getMethodNameList: d,
2016
- context: n,
2017
- editorOptions: o,
2018
- editorContentChange: e,
2019
- validMethodNameEmpty: i,
2020
- validMethodNameExist: g,
2021
- invalidMethodName: p,
2896
+ getMethodNameList: u,
2897
+ context: e,
2898
+ editorOptions: n,
2899
+ editorContentChange: t,
2900
+ validMethodNameEmpty: o,
2901
+ validMethodNameExist: i,
2902
+ invalidMethodName: r,
2022
2903
  change: a,
2023
- VueMonaco: Ae,
2024
- getMetaApi: k,
2025
- META_APP: C,
2026
- METHOD_TIPS_MAP: re,
2027
- NEW_METHOD_TYPE: ee,
2028
- VALID_VARNAME_RE: Be
2904
+ VueMonaco: Xe,
2905
+ getMetaApi: O,
2906
+ META_APP: B,
2907
+ METHOD_TIPS_MAP: Ne,
2908
+ NEW_METHOD_TYPE: ye,
2909
+ VALID_VARNAME_RE: He
2029
2910
  })
2030
- }), a = h((l) => {
2031
- const s = [{
2032
- validator: i,
2033
- tip: re.empty
2911
+ }), a = D((l) => {
2912
+ const c = [{
2913
+ validator: o,
2914
+ tip: Ne.empty
2034
2915
  }, {
2035
- validator: g,
2036
- tip: re.exist
2916
+ validator: i,
2917
+ tip: Ne.exist
2037
2918
  }, {
2038
- validator: p,
2039
- tip: re.ruleInvalid
2919
+ validator: r,
2920
+ tip: Ne.ruleInvalid
2040
2921
  }];
2041
- for (let u = 0; u < s.length; u++) {
2042
- const t = s[u];
2043
- if (t.validator(l)) {
2044
- n.tipError = !0, n.tip = t.tip;
2922
+ for (let _ = 0; _ < c.length; _++) {
2923
+ const s = c[_];
2924
+ if (s.validator(l)) {
2925
+ e.tipError = !0, e.tip = s.tip;
2045
2926
  return;
2046
2927
  }
2047
2928
  }
2048
- n.tipError = !1, n.tip = "";
2929
+ e.tipError = !1, e.tip = "";
2049
2930
  }, {
2050
2931
  metaData: {
2051
2932
  id: "engine.setting.event.BindEventsDialogContent.change"
2052
2933
  },
2053
2934
  ctx: () => ({
2054
- getMethodNameList: d,
2055
- context: n,
2056
- editorOptions: o,
2057
- editorContentChange: e,
2058
- validMethodNameEmpty: i,
2059
- validMethodNameExist: g,
2060
- invalidMethodName: p,
2935
+ getMethodNameList: u,
2936
+ context: e,
2937
+ editorOptions: n,
2938
+ editorContentChange: t,
2939
+ validMethodNameEmpty: o,
2940
+ validMethodNameExist: i,
2941
+ invalidMethodName: r,
2061
2942
  change: a,
2062
- VueMonaco: Ae,
2063
- getMetaApi: k,
2064
- META_APP: C,
2065
- METHOD_TIPS_MAP: re,
2066
- NEW_METHOD_TYPE: ee,
2067
- VALID_VARNAME_RE: Be
2943
+ VueMonaco: Xe,
2944
+ getMetaApi: O,
2945
+ META_APP: B,
2946
+ METHOD_TIPS_MAP: Ne,
2947
+ NEW_METHOD_TYPE: ye,
2948
+ VALID_VARNAME_RE: He
2068
2949
  })
2069
2950
  });
2070
2951
  return {
2071
- NEW_METHOD_TYPE: ee,
2072
- context: n,
2073
- editorOptions: o,
2952
+ NEW_METHOD_TYPE: ye,
2953
+ context: e,
2954
+ editorOptions: n,
2074
2955
  change: a,
2075
- editorContentChange: e
2956
+ editorContentChange: t
2076
2957
  };
2077
2958
  }
2078
- }, an = { class: "content-right" }, sn = { class: "new-action-tip" }, ln = { class: "content-right-title" }, dn = { class: "set-params-tip" }, cn = { class: "content-right-monaco" }, rn = {
2959
+ }, Un = { class: "content-right" }, jn = { class: "new-action-tip" }, $n = { class: "content-right-title" }, zn = { class: "set-params-tip" }, Jn = { class: "content-right-monaco" }, Fn = {
2079
2960
  key: 1,
2080
2961
  class: "mark"
2081
- }, mn = {
2962
+ }, Kn = {
2082
2963
  key: 0,
2083
2964
  class: "params-tip"
2084
2965
  };
2085
- function gn(d, n, o, e, i, g) {
2086
- const p = M("tiny-input"), a = M("tiny-checkbox"), l = M("monaco-editor");
2087
- return B(), J("div", an, [
2088
- v("div", {
2089
- class: Ne(["content-right-top", { "tip-error": e.context.tipError }])
2966
+ function Xn(u, e, n, t, o, i) {
2967
+ const r = X("tiny-input"), a = X("tiny-checkbox"), l = X("monaco-editor");
2968
+ return j(), re("div", Un, [
2969
+ E("div", {
2970
+ class: qe(["content-right-top", { "tip-error": t.context.tipError }])
2090
2971
  }, [
2091
- n[2] || (n[2] = v("div", { class: "content-right-title" }, "方法名称", -1)),
2092
- b(p, {
2093
- modelValue: e.context.bindMethodInfo.name,
2972
+ e[2] || (e[2] = E("div", { class: "content-right-title" }, "方法名称", -1)),
2973
+ N(r, {
2974
+ modelValue: t.context.bindMethodInfo.name,
2094
2975
  "onUpdate:modelValue": [
2095
- n[0] || (n[0] = (s) => e.context.bindMethodInfo.name = s),
2096
- e.change
2976
+ e[0] || (e[0] = (c) => t.context.bindMethodInfo.name = c),
2977
+ t.change
2097
2978
  ],
2098
- disabled: e.context.bindMethodInfo.type !== e.NEW_METHOD_TYPE,
2099
- class: Ne([{ "status-error": e.context.tipError }]),
2979
+ disabled: t.context.bindMethodInfo.type !== t.NEW_METHOD_TYPE,
2980
+ class: qe([{ "status-error": t.context.tipError }]),
2100
2981
  placeholder: "请从左侧选择一个方法进行绑定,或者选择添加新方法,输入自定义方法名称。"
2101
2982
  }, null, 8, ["modelValue", "disabled", "class", "onUpdate:modelValue"]),
2102
- v("div", sn, Y(e.context.tip), 1)
2983
+ E("div", jn, me(t.context.tip), 1)
2103
2984
  ], 2),
2104
- v("div", {
2105
- class: Ne(["content-right-bottom", { "tip-error": !e.context.isValidParams }])
2985
+ E("div", {
2986
+ class: qe(["content-right-bottom", { "tip-error": !t.context.isValidParams }])
2106
2987
  }, [
2107
- v("div", ln, [
2108
- b(a, {
2109
- modelValue: e.context.enableExtraParams,
2110
- "onUpdate:modelValue": n[1] || (n[1] = (s) => e.context.enableExtraParams = s),
2988
+ E("div", $n, [
2989
+ N(a, {
2990
+ modelValue: t.context.enableExtraParams,
2991
+ "onUpdate:modelValue": e[1] || (e[1] = (c) => t.context.enableExtraParams = c),
2111
2992
  name: "tiny-checkbox"
2112
2993
  }, {
2113
- default: I(() => n[3] || (n[3] = [
2114
- ke("扩展参数设置")
2994
+ default: F(() => e[3] || (e[3] = [
2995
+ Fe("扩展参数设置")
2115
2996
  ])),
2116
2997
  _: 1,
2117
2998
  __: [3]
2118
2999
  }, 8, ["modelValue"]),
2119
- v("div", dn, [
2120
- n[4] || (n[4] = v("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
2121
- ke(" 如: " + Y(e.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
3000
+ E("div", zn, [
3001
+ e[4] || (e[4] = E("div", null, "扩展参数:调用当前事件传入的真实参数,数组格式,追加在原有事件参数之后", -1)),
3002
+ Fe(" 如: " + me(t.context.bindMethodInfo.name) + "(eventArgs, extParam1, extParam2, ...) ", 1)
2122
3003
  ])
2123
3004
  ]),
2124
- v("div", cn, [
2125
- o.dialogVisible ? (B(), te(l, {
3005
+ E("div", Jn, [
3006
+ n.dialogVisible ? (j(), Ce(l, {
2126
3007
  key: 0,
2127
- value: e.context.editorContent,
2128
- options: e.editorOptions,
2129
- onChange: e.editorContentChange,
3008
+ value: t.context.editorContent,
3009
+ options: t.editorOptions,
3010
+ onChange: t.editorContentChange,
2130
3011
  class: "monaco-editor"
2131
- }, null, 8, ["value", "options", "onChange"])) : Se("", !0),
2132
- e.context.enableExtraParams ? Se("", !0) : (B(), J("div", rn))
3012
+ }, null, 8, ["value", "options", "onChange"])) : dt("", !0),
3013
+ t.context.enableExtraParams ? dt("", !0) : (j(), re("div", Fn))
2133
3014
  ]),
2134
- !e.context.isValidParams && e.context.enableExtraParams ? (B(), J("div", mn, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : Se("", !0)
3015
+ !t.context.isValidParams && t.context.enableExtraParams ? (j(), re("div", Kn, ' 请输入数组格式的参数,参数可以为表达式。例如:["extParam1", "item.status", 1, "getNames()"] ')) : dt("", !0)
2135
3016
  ], 2)
2136
3017
  ]);
2137
3018
  }
2138
- const pn = /* @__PURE__ */ Ie(on, [["render", gn], ["__scopeId", "data-v-fc0b367d"]]), vn = {
3019
+ const Gn = /* @__PURE__ */ We(Tn, [["render", Xn], ["__scopeId", "data-v-fc0b367d"]]), Hn = {
2139
3020
  components: {
2140
- TinySearch: _t
3021
+ TinySearch: jt
2141
3022
  },
2142
3023
  props: {
2143
3024
  eventBinding: {
@@ -2145,110 +3026,110 @@ const pn = /* @__PURE__ */ Ie(on, [["render", gn], ["__scopeId", "data-v-fc0b367
2145
3026
  default: () => ({})
2146
3027
  }
2147
3028
  },
2148
- setup(d) {
3029
+ setup(u) {
2149
3030
  const {
2150
- getMethodNameList: n
2151
- } = k(C.Page), o = Ve(""), e = Ve([]), i = ot("context"), g = h((a, l) => {
2152
- const s = a.map((r) => {
2153
- var c;
2154
- return Number.parseInt((c = r.match(/\d+$/)) == null ? void 0 : c[0]) || 0;
2155
- }).sort((r, c) => r - c).pop();
2156
- let t = `${(l == null ? void 0 : l.replace(je, "_")) || ""}New`;
2157
- return s > -1 && (t += `${s + 1}`), t;
3031
+ getMethodNameList: e
3032
+ } = O(B.Page), n = Ye(""), t = Ye([]), o = Nt("context"), i = D((a, l) => {
3033
+ const c = a.map((p) => {
3034
+ var m;
3035
+ return Number.parseInt((m = p.match(/\d+$/)) == null ? void 0 : m[0]) || 0;
3036
+ }).sort((p, m) => p - m).pop();
3037
+ let s = `${(l == null ? void 0 : l.replace(ft, "_")) || ""}New`;
3038
+ return c > -1 && (s += `${c + 1}`), s;
2158
3039
  }, {
2159
3040
  metaData: {
2160
3041
  id: "engine.setting.event.BindEventsDialogSidebar.generateMethodName"
2161
3042
  },
2162
3043
  ctx: () => ({
2163
- props: d,
2164
- getMethodNameList: n,
2165
- searchValue: o,
2166
- filteredMethodList: e,
2167
- context: i,
2168
- generateMethodName: g,
2169
- selectMethod: p,
2170
- getMetaApi: k,
2171
- META_APP: C,
2172
- INVALID_VARNAME_CHAR_RE: je,
2173
- NEW_METHOD_TYPE: ee
3044
+ props: u,
3045
+ getMethodNameList: e,
3046
+ searchValue: n,
3047
+ filteredMethodList: t,
3048
+ context: o,
3049
+ generateMethodName: i,
3050
+ selectMethod: r,
3051
+ getMetaApi: O,
3052
+ META_APP: B,
3053
+ INVALID_VARNAME_CHAR_RE: ft,
3054
+ NEW_METHOD_TYPE: ye
2174
3055
  })
2175
- }), p = h((a) => {
2176
- i.bindMethodInfo = a;
3056
+ }), r = D((a) => {
3057
+ o.bindMethodInfo = a;
2177
3058
  }, {
2178
3059
  metaData: {
2179
3060
  id: "engine.setting.event.BindEventsDialogSidebar.selectMethod"
2180
3061
  },
2181
3062
  ctx: () => ({
2182
- props: d,
2183
- getMethodNameList: n,
2184
- searchValue: o,
2185
- filteredMethodList: e,
2186
- context: i,
2187
- generateMethodName: g,
2188
- selectMethod: p,
2189
- getMetaApi: k,
2190
- META_APP: C,
2191
- INVALID_VARNAME_CHAR_RE: je,
2192
- NEW_METHOD_TYPE: ee
3063
+ props: u,
3064
+ getMethodNameList: e,
3065
+ searchValue: n,
3066
+ filteredMethodList: t,
3067
+ context: o,
3068
+ generateMethodName: i,
3069
+ selectMethod: r,
3070
+ getMetaApi: O,
3071
+ META_APP: B,
3072
+ INVALID_VARNAME_CHAR_RE: ft,
3073
+ NEW_METHOD_TYPE: ye
2193
3074
  })
2194
3075
  });
2195
- return nt(() => {
2196
- var r, c;
2197
- const a = (r = d.eventBinding) == null ? void 0 : r.eventName, l = (n == null ? void 0 : n().filter((m) => m.includes(a))) || [], u = {
3076
+ return St(() => {
3077
+ var p, m;
3078
+ const a = (p = u.eventBinding) == null ? void 0 : p.eventName, l = (e == null ? void 0 : e().filter((v) => v.includes(a))) || [], _ = {
2198
3079
  title: "添加新方法",
2199
- name: g(l, a),
2200
- type: ee
3080
+ name: i(l, a),
3081
+ type: ye
2201
3082
  };
2202
- (c = d.eventBinding) != null && c.ref ? p({
2203
- name: d.eventBinding.ref
2204
- }) : p(u);
2205
- const t = (n == null ? void 0 : n().filter((m) => m.includes(o.value)).map((m) => ({
2206
- name: m
3083
+ (m = u.eventBinding) != null && m.ref ? r({
3084
+ name: u.eventBinding.ref
3085
+ }) : r(_);
3086
+ const s = (e == null ? void 0 : e().filter((v) => v.includes(n.value)).map((v) => ({
3087
+ name: v
2207
3088
  }))) || [];
2208
- e.value = [u, ...t];
3089
+ t.value = [_, ...s];
2209
3090
  }), {
2210
- context: i,
2211
- searchValue: o,
2212
- filteredMethodList: e,
2213
- selectMethod: p
3091
+ context: o,
3092
+ searchValue: n,
3093
+ filteredMethodList: t,
3094
+ selectMethod: r
2214
3095
  };
2215
3096
  }
2216
- }, un = { class: "dialog-content-left" }, fn = { class: "left-list-wrap" }, _n = { class: "left-action-list" }, hn = { class: "action-list-wrap" }, bn = ["onClick"];
2217
- function En(d, n, o, e, i, g) {
2218
- const p = M("tiny-search");
2219
- return B(), J("div", un, [
2220
- n[1] || (n[1] = v("div", { class: "left-title" }, "响应方法", -1)),
2221
- v("div", fn, [
2222
- v("div", _n, [
2223
- b(p, {
2224
- modelValue: e.searchValue,
2225
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.searchValue = a),
3097
+ }, qn = { class: "dialog-content-left" }, Yn = { class: "left-list-wrap" }, Wn = { class: "left-action-list" }, Zn = { class: "action-list-wrap" }, Qn = ["onClick"];
3098
+ function eo(u, e, n, t, o, i) {
3099
+ const r = X("tiny-search");
3100
+ return j(), re("div", qn, [
3101
+ e[1] || (e[1] = E("div", { class: "left-title" }, "响应方法", -1)),
3102
+ E("div", Yn, [
3103
+ E("div", Wn, [
3104
+ N(r, {
3105
+ modelValue: t.searchValue,
3106
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => t.searchValue = a),
2226
3107
  placeholder: "搜索"
2227
3108
  }, null, 8, ["modelValue"]),
2228
- v("ul", hn, [
2229
- (B(!0), J(Oe, null, ze(e.filteredMethodList, (a) => (B(), J("li", {
3109
+ E("ul", Zn, [
3110
+ (j(!0), re(at, null, gt(t.filteredMethodList, (a) => (j(), re("li", {
2230
3111
  key: a.name,
2231
- onClick: (l) => e.selectMethod(a)
3112
+ onClick: (l) => t.selectMethod(a)
2232
3113
  }, [
2233
- v("div", {
2234
- class: Ne(["action-name", { active: a.name === e.context.bindMethodInfo.name }])
2235
- }, Y(a.title || a.name), 3)
2236
- ], 8, bn))), 128))
3114
+ E("div", {
3115
+ class: qe(["action-name", { active: a.name === t.context.bindMethodInfo.name }])
3116
+ }, me(a.title || a.name), 3)
3117
+ ], 8, Qn))), 128))
2237
3118
  ])
2238
3119
  ])
2239
3120
  ])
2240
3121
  ]);
2241
3122
  }
2242
- const yn = /* @__PURE__ */ Ie(vn, [["render", En], ["__scopeId", "data-v-9bcc2645"]]), wn = {
2243
- ...U,
2244
- entry: nn,
2245
- options: { commonEvents: at },
3123
+ const to = /* @__PURE__ */ We(Hn, [["render", eo], ["__scopeId", "data-v-9bcc2645"]]), go = {
3124
+ ...Q,
3125
+ entry: Rn,
3126
+ options: { commonEvents: It },
2246
3127
  components: {
2247
- BindEventsDialogSidebar: yn,
2248
- BindEventsDialogContent: pn
3128
+ BindEventsDialogSidebar: to,
3129
+ BindEventsDialogContent: Gn
2249
3130
  }
2250
3131
  };
2251
3132
  export {
2252
- wn as default
3133
+ go as default
2253
3134
  };
2254
3135
  //# sourceMappingURL=index.js.map