@opentiny/tiny-engine-setting-events 2.7.0-alpha.1 → 2.7.0-alpha.3

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