x-prop-tree 0.7.35 → 0.7.37

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,2392 +1,1968 @@
1
- import { provide as re, inject as ae, defineComponent as E, ref as O, computed as L, resolveComponent as $, createBlock as B, openBlock as k, unref as M, isRef as ue, withCtx as K, createVNode as w, createElementBlock as q, Fragment as me, renderList as Me, createTextVNode as ge, toDisplayString as J, resolveDirective as ee, withDirectives as Z, withModifiers as X, normalizeStyle as G, createElementVNode as D, createCommentVNode as Y, onMounted as Oe, onBeforeUnmount as Be, watch as ie, useModel as F, useId as _e, onUnmounted as Se, withKeys as Ae, mergeProps as Ve, mergeModels as j, useTemplateRef as Ye, watchEffect as He, h as S, renderSlot as St, reactive as Vt } from "vue";
2
- import { useI18n as ne } from "vue-i18n";
3
- import { useViewStack as ye, useColor as I, globalObjects as Ct, useSystem as le, eventBus as fe, injectDark as $t, injectLocale as Ut, openNumberDlg as We, openPromptDlg as bt } from "x-essential-lib";
4
- import { getPropertyDefault as H, pkgs as qe, getTag as wt, elements as Mt, makeSlotId as Fe, parsePixelStr as At, parsePercentStr as Pt } from "x-runtime-lib";
5
- import { c as Qe, i as Pe, r as pe, d as Ze, v as je } from "./vendor.f0ug048x.js";
6
- import { globalState as Ke } from "x-state-lib";
7
- import { useDisplay as Re } from "vuetify";
8
- import { XBlockly as Lt } from "x-block-lib";
9
- const ze = (t) => !(t instanceof Array), Ne = (t) => t instanceof Array, Dt = (t, s) => {
10
- const l = (e, n) => {
11
- if (e.ui !== n.ui || e.array !== n.array)
12
- return !1;
13
- if (e.ui || n.ui)
14
- return !0;
15
- if (e.children.length !== n.children.length)
16
- return !1;
17
- for (let o = 0; o < e.children.length; o++)
18
- if (!l(e.children[o], n.children[o]))
19
- return !1;
20
- return !0;
21
- };
22
- return l(t, s);
23
- }, be = (t, s) => {
24
- let l = {
25
- key: "",
26
- name: "",
27
- children: t
28
- };
29
- return s.forEach((e) => {
30
- if (typeof e != "number") {
31
- if (!l) {
32
- console.assert(!1, `unpkgProp invalid property keys=${s}`);
33
- return;
34
- }
35
- if (l.ui) {
36
- console.assert(
37
- !1,
38
- `unpkgProp property ui must be invalid keys=${s}`
39
- );
40
- return;
41
- }
42
- l = l.children.find((n) => n.key === e);
43
- }
44
- }), l;
45
- }, xe = (t, s) => {
46
- let l = t;
47
- return s.forEach((e) => {
48
- if (!l) {
49
- console.assert(!1, `unpkgObject object must be valid keys=${s}`);
50
- return;
51
- }
52
- l = l[e];
53
- }), l;
54
- }, te = (t, s, l, e, n, o) => {
55
- if (n !== void 0)
56
- if (o) {
57
- if (l[s.key] === void 0) {
58
- const i = H(s);
59
- i !== void 0 && (l[s.key] = i, e(t, l[s.key]));
60
- }
61
- return l[s.key];
62
- } else {
63
- if (l[n] === void 0) {
64
- const i = H(s, !0);
65
- i !== void 0 && (l[n] = i, e(t, l[n]));
66
- }
67
- return l[n];
68
- }
69
- else {
70
- if (l[s.key] === void 0) {
71
- const i = H(s);
72
- i !== void 0 && (l[s.key] = i, e(t, l[s.key]));
73
- }
74
- return l[s.key];
75
- }
76
- }, oe = (t, s, l, e, n, o, i) => {
77
- if (o !== void 0)
78
- i ? e !== l[s.key] && (l[s.key] = e, n(t, l[s.key])) : e !== l[o] && (l[o] = e, n(t, l[o]));
79
- else {
80
- let r = e;
81
- (s.ui === "switch" || s.ui === "select" || s.ui === "colorPicker" || s.ui === "multiTypes" || s.ui === "selectComp" || s.ui === "selectSlot" || s.ui === "selectAdaptSlot") && (e || (r = void 0)), r !== l[s.key] && (l[s.key] = r, n(t, l[s.key]));
82
- }
83
- }, Ee = (t) => !(t instanceof Array), Le = (t) => t instanceof Array, Tt = [
84
- ["basic", "id"],
85
- ["basic", "name"]
86
- ], Nt = (t) => Tt.find((s) => Pe(t, s)), De = (t, s, l, e, n, o, i) => (t = Qe(t), o !== void 0 ? (t.push(o), i && t.push(s.key)) : t.push(s.key), Nt(t) ? (e.change = !1, e.change) : s.ui ? s.array && e.children && Le(e.children) ? qt(
87
- t,
88
- s,
89
- l,
90
- e,
91
- n,
92
- o,
93
- i
94
- ) : Kt(
95
- s,
96
- l,
97
- e,
98
- o,
99
- i
100
- ) : s.array ? Ot(
101
- t,
102
- s,
103
- l,
104
- e,
105
- n,
106
- o,
107
- i
108
- ) : Bt(
109
- t,
110
- s,
111
- l,
112
- e,
113
- n,
114
- o,
115
- i
116
- )), Ot = (t, s, l, e, n, o, i) => {
117
- if (s.ui)
118
- return console.assert(!1, "execPropertyBranchArray property ui must be invalid"), !1;
119
- if (!s.array)
120
- return console.assert(
121
- !1,
122
- "execPropertyBranchArray property array must be valid"
123
- ), !1;
124
- if (!e.children || !Le(e.children))
125
- return console.assert(
126
- !1,
127
- "execPropertyBranchArray state children must be array"
128
- ), !1;
129
- let r;
130
- o !== void 0 && !i ? (l[o] instanceof Array || (l[o] = H(s), n?.(t, l[o])), r = l[o]) : (l[s.key] instanceof Array || (l[s.key] = H(s), n?.(t, l[s.key])), r = l[s.key]), e.change = !1;
131
- for (let u = 0; u < r.length; u++) {
132
- e.children.push({
133
- change: !1,
134
- children: {}
135
- });
136
- const a = e.children[u];
137
- s.children.forEach((c) => {
138
- if (!a.children || !Ee(a.children)) {
139
- console.assert(!1);
140
- return;
141
- }
142
- a.children[c.key] = {
143
- change: !1,
144
- children: c.array ? [] : {}
145
- }, De(
146
- t,
147
- c,
148
- r[u],
149
- a.children[c.key],
150
- n,
151
- u,
152
- !0
153
- ) && (a.change = !0), a.change && (e.change = !0);
154
- });
155
- }
156
- return e.change || (e.change = !Pe(r, H(s))), e.change;
157
- }, Bt = (t, s, l, e, n, o, i) => {
158
- if (s.ui)
159
- return console.assert(
160
- !1,
161
- "execPropertyBranchScalar property ui must be invalid"
162
- ), !1;
163
- if (s.array)
164
- return console.assert(
165
- !1,
166
- "execPropertyBranchScalar property array must be invalid"
167
- ), !1;
168
- if (!e.children || !Ee(e.children))
169
- return console.assert(!1, "execPropertyBranchScalar state children must be map"), !1;
170
- let r;
171
- o !== void 0 && !i ? (l[o] || (l[o] = {}), r = l[o]) : (l[s.key] || (l[s.key] = {}), r = l[s.key]), e.change = !1;
172
- for (let u = 0; u < s.children.length; u++) {
173
- const a = s.children[u];
174
- e.children[a.key] = {
175
- change: !1,
176
- children: a.array ? [] : {}
177
- }, De(t, a, r, e.children[a.key], n) && (e.change = !0);
178
- }
179
- return e.change;
180
- }, qt = (t, s, l, e, n, o, i) => {
181
- if (!s.ui)
182
- return console.assert(!1, "execPropertyLeafArray property ui must be valid"), !1;
183
- if (!s.array)
184
- return console.assert(!1, "execPropertyLeafArray property aray must be valid"), !1;
185
- if (!e.children || !Le(e.children))
186
- return console.assert(!1, "execPropertyLeafArray state children must be array"), !1;
187
- let r;
188
- o !== void 0 && !i ? (l[o] instanceof Array || (l[o] = H(s), n?.(t, l[o])), r = l[o]) : (l[s.key] instanceof Array || (l[s.key] = H(s), n?.(t, l[s.key])), r = l[s.key]), e.change = !1;
189
- for (let u = 0; u < r.length; u++)
190
- e.children[u] = {
191
- change: !1,
192
- children: {}
193
- }, De(
194
- t,
195
- s,
196
- r,
197
- e.children[u],
198
- n,
199
- u,
200
- !1
201
- ) && (e.change = !0);
202
- return e.change || (e.change = !Pe(r, H(s))), e.change;
203
- }, Kt = (t, s, l, e, n) => {
204
- if (!t.ui)
205
- return console.assert(!1, "execPropertyLeafScalar property ui must be valid"), !1;
206
- let o;
207
- return e !== void 0 && !n ? o = s[e] : o = s[t.key], l.change = !Pe(o, H(t, !0)), l.change;
208
- }, Ge = (t, s, l, e) => {
209
- if (s.length <= 0 || !l) {
210
- t.value = {};
211
- return;
212
- }
213
- const n = {};
214
- s.forEach((o) => {
215
- n[o.key] = {
216
- change: !1,
217
- children: o.array ? [] : {}
218
- }, De([], o, l, n[o.key], e);
219
- }), t.value = n;
220
- }, ve = (t, s) => {
221
- let l = {
222
- change: !1,
223
- children: t
224
- };
225
- return s.forEach((e) => {
226
- if (!l)
227
- return console.assert(!1, `isPropChanged state must be valid keys=${s}`), !1;
228
- if (!l.children)
229
- return console.assert(!1, `isPropChanged state must be valid keys=${s}`), !1;
230
- typeof e == "string" ? Ee(l.children) && (l = l.children[e]) : Le(l.children) && (l = l.children[e]);
231
- }), l?.change ?? !1;
232
- }, Ie = /* @__PURE__ */ Symbol(), et = /* @__PURE__ */ Symbol(), tt = /* @__PURE__ */ Symbol(), nt = /* @__PURE__ */ Symbol(), lt = /* @__PURE__ */ Symbol(), ot = /* @__PURE__ */ Symbol(), st = /* @__PURE__ */ Symbol(), it = /* @__PURE__ */ Symbol();
233
- function Rt(t) {
234
- re(Ie, t);
1
+ import { a as cloneDeep_default, i as isEqual_default, n as setCollapse, r as tidyList, t as getListEntry } from "./vendor.gmzhs72f.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, h, inject, isRef, mergeModels, mergeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveComponent, resolveDirective, toDisplayString, unref, useId, useModel, useTemplateRef, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
3
+ import { useI18n } from "vue-i18n";
4
+ import { eventBus, globalObjects, injectDark, injectLocale, openNumberDlg, openPromptDlg, useColor, useSystem, useViewStack } from "x-essential-lib";
5
+ import { elements, getPropertyDefault, getTag, makeSlotId, parsePercentStr, parsePixelStr, pkgs } from "x-runtime-lib";
6
+ import { globalState } from "x-state-lib";
7
+ import { useDisplay } from "vuetify";
8
+ import { XBlockly } from "x-block-lib";
9
+ const isBranchChildrenMap = (e) => !(e instanceof Array), isBranchChildrenArray = (e) => e instanceof Array, isPropertyCompatible = (e, m) => {
10
+ let g = (e, m) => {
11
+ if (e.ui !== m.ui || e.array !== m.array) return !1;
12
+ if (e.ui || m.ui) return !0;
13
+ if (e.children.length !== m.children.length) return !1;
14
+ for (let _ = 0; _ < e.children.length; _++) if (!g(e.children[_], m.children[_])) return !1;
15
+ return !0;
16
+ };
17
+ return g(e, m);
18
+ }, unpkgProperty = (e, m) => {
19
+ let g = {
20
+ key: "",
21
+ name: "",
22
+ children: e
23
+ };
24
+ return m.forEach((e) => {
25
+ if (typeof e != "number") {
26
+ if (!g) {
27
+ console.assert(!1, `unpkgProp invalid property keys=${m}`);
28
+ return;
29
+ }
30
+ if (g.ui) {
31
+ console.assert(!1, `unpkgProp property ui must be invalid keys=${m}`);
32
+ return;
33
+ }
34
+ g = g.children.find((m) => m.key === e);
35
+ }
36
+ }), g;
37
+ }, unpkgObject = (e, m) => {
38
+ let g = e;
39
+ return m.forEach((e) => {
40
+ if (!g) {
41
+ console.assert(!1, `unpkgObject object must be valid keys=${m}`);
42
+ return;
43
+ }
44
+ g = g[e];
45
+ }), g;
46
+ }, getModelValue = (e, m, g, _, v, y) => {
47
+ if (v !== void 0) if (y) {
48
+ if (g[m.key] === void 0) {
49
+ let v = getPropertyDefault(m);
50
+ v !== void 0 && (g[m.key] = v, _(e, g[m.key]));
51
+ }
52
+ return g[m.key];
53
+ } else {
54
+ if (g[v] === void 0) {
55
+ let y = getPropertyDefault(m, !0);
56
+ y !== void 0 && (g[v] = y, _(e, g[v]));
57
+ }
58
+ return g[v];
59
+ }
60
+ else {
61
+ if (g[m.key] === void 0) {
62
+ let v = getPropertyDefault(m);
63
+ v !== void 0 && (g[m.key] = v, _(e, g[m.key]));
64
+ }
65
+ return g[m.key];
66
+ }
67
+ }, setModelValue = (e, m, g, _, v, y, b) => {
68
+ if (y !== void 0) b ? _ !== g[m.key] && (g[m.key] = _, v(e, g[m.key])) : _ !== g[y] && (g[y] = _, v(e, g[y]));
69
+ else {
70
+ let y = _;
71
+ (m.ui === "switch" || m.ui === "select" || m.ui === "colorPicker" || m.ui === "multiTypes" || m.ui === "selectComp" || m.ui === "selectSlot" || m.ui === "selectAdaptSlot") && (_ || (y = void 0)), y !== g[m.key] && (g[m.key] = y, v(e, g[m.key]));
72
+ }
73
+ }, isPropertyStateChildrenMap = (e) => !(e instanceof Array), isPropertyStateChildrenArray = (e) => e instanceof Array;
74
+ var propertyStateIgnores = [["basic", "id"], ["basic", "name"]], isPropertyStateIgnored = (e) => propertyStateIgnores.find((g) => isEqual_default(e, g));
75
+ const execProperty = (m, g, _, v, y, b, x) => (m = cloneDeep_default(m), b === void 0 ? m.push(g.key) : (m.push(b), x && m.push(g.key)), isPropertyStateIgnored(m) ? (v.change = !1, v.change) : g.ui ? g.array && v.children && isPropertyStateChildrenArray(v.children) ? execPropertyLeafArray(m, g, _, v, y, b, x) : execPropertyLeafScalar(g, _, v, b, x) : g.array ? execPropertyBranchArray(m, g, _, v, y, b, x) : execPropertyBranchScalar(m, g, _, v, y, b, x));
76
+ var execPropertyBranchArray = (e, g, _, v, y, b, x) => {
77
+ if (g.ui) return console.assert(!1, "execPropertyBranchArray property ui must be invalid"), !1;
78
+ if (!g.array) return console.assert(!1, "execPropertyBranchArray property array must be valid"), !1;
79
+ if (!v.children || !isPropertyStateChildrenArray(v.children)) return console.assert(!1, "execPropertyBranchArray state children must be array"), !1;
80
+ let S;
81
+ b !== void 0 && !x ? (_[b] instanceof Array || (_[b] = getPropertyDefault(g), y?.(e, _[b])), S = _[b]) : (_[g.key] instanceof Array || (_[g.key] = getPropertyDefault(g), y?.(e, _[g.key])), S = _[g.key]), v.change = !1;
82
+ for (let m = 0; m < S.length; m++) {
83
+ v.children.push({
84
+ change: !1,
85
+ children: {}
86
+ });
87
+ let _ = v.children[m];
88
+ g.children.forEach((g) => {
89
+ if (!_.children || !isPropertyStateChildrenMap(_.children)) {
90
+ console.assert(!1);
91
+ return;
92
+ }
93
+ _.children[g.key] = {
94
+ change: !1,
95
+ children: g.array ? [] : {}
96
+ }, execProperty(e, g, S[m], _.children[g.key], y, m, !0) && (_.change = !0), _.change && (v.change = !0);
97
+ });
98
+ }
99
+ return v.change ||= !isEqual_default(S, getPropertyDefault(g)), v.change;
100
+ }, execPropertyBranchScalar = (e, m, g, _, v, y, b) => {
101
+ if (m.ui) return console.assert(!1, "execPropertyBranchScalar property ui must be invalid"), !1;
102
+ if (m.array) return console.assert(!1, "execPropertyBranchScalar property array must be invalid"), !1;
103
+ if (!_.children || !isPropertyStateChildrenMap(_.children)) return console.assert(!1, "execPropertyBranchScalar state children must be map"), !1;
104
+ let x;
105
+ y !== void 0 && !b ? (g[y] || (g[y] = {}), x = g[y]) : (g[m.key] || (g[m.key] = {}), x = g[m.key]), _.change = !1;
106
+ for (let g = 0; g < m.children.length; g++) {
107
+ let y = m.children[g];
108
+ _.children[y.key] = {
109
+ change: !1,
110
+ children: y.array ? [] : {}
111
+ }, execProperty(e, y, x, _.children[y.key], v) && (_.change = !0);
112
+ }
113
+ return _.change;
114
+ }, execPropertyLeafArray = (e, g, _, v, y, b, x) => {
115
+ if (!g.ui) return console.assert(!1, "execPropertyLeafArray property ui must be valid"), !1;
116
+ if (!g.array) return console.assert(!1, "execPropertyLeafArray property aray must be valid"), !1;
117
+ if (!v.children || !isPropertyStateChildrenArray(v.children)) return console.assert(!1, "execPropertyLeafArray state children must be array"), !1;
118
+ let S;
119
+ b !== void 0 && !x ? (_[b] instanceof Array || (_[b] = getPropertyDefault(g), y?.(e, _[b])), S = _[b]) : (_[g.key] instanceof Array || (_[g.key] = getPropertyDefault(g), y?.(e, _[g.key])), S = _[g.key]), v.change = !1;
120
+ for (let m = 0; m < S.length; m++) v.children[m] = {
121
+ change: !1,
122
+ children: {}
123
+ }, execProperty(e, g, S, v.children[m], y, m, !1) && (v.change = !0);
124
+ return v.change ||= !isEqual_default(S, getPropertyDefault(g)), v.change;
125
+ }, execPropertyLeafScalar = (e, g, _, v, y) => {
126
+ if (!e.ui) return console.assert(!1, "execPropertyLeafScalar property ui must be valid"), !1;
127
+ let b;
128
+ return b = v !== void 0 && !y ? g[v] : g[e.key], _.change = !isEqual_default(b, getPropertyDefault(e, !0)), _.change;
129
+ };
130
+ const rebuildPropertyState = (e, m, g, _) => {
131
+ if (m.length <= 0 || !g) {
132
+ e.value = {};
133
+ return;
134
+ }
135
+ let v = {};
136
+ m.forEach((e) => {
137
+ v[e.key] = {
138
+ change: !1,
139
+ children: e.array ? [] : {}
140
+ }, execProperty([], e, g, v[e.key], _);
141
+ }), e.value = v;
142
+ }, isPropertyChanged = (e, m) => {
143
+ let g = {
144
+ change: !1,
145
+ children: e
146
+ };
147
+ return m.forEach((e) => {
148
+ if (!g || !g.children) return console.assert(!1, `isPropChanged state must be valid keys=${m}`), !1;
149
+ typeof e == "string" ? isPropertyStateChildrenMap(g.children) && (g = g.children[e]) : isPropertyStateChildrenArray(g.children) && (g = g.children[e]);
150
+ }), g?.change ?? !1;
151
+ };
152
+ var versionKey = Symbol(), configKey = Symbol(), objectKey = Symbol(), propertyStatesKey = Symbol(), changeEventKey = Symbol(), compListKey = Symbol(), slotListKey = Symbol(), adaptSlotListKey = Symbol();
153
+ function provideVersion(e) {
154
+ provide(versionKey, e);
235
155
  }
236
- function Je() {
237
- return ae(Ie);
156
+ function injectVersion() {
157
+ return inject(versionKey);
238
158
  }
239
- function Et(t) {
240
- re(et, t);
159
+ function provideConfig(e) {
160
+ provide(configKey, e);
241
161
  }
242
- function Jt() {
243
- return ae(et);
162
+ function injectConfig() {
163
+ return inject(configKey);
244
164
  }
245
- function Xt(t) {
246
- re(tt, t);
165
+ function provideObject(e) {
166
+ provide(objectKey, e);
247
167
  }
248
- function Ht() {
249
- return ae(tt);
168
+ function injectObject() {
169
+ return inject(objectKey);
250
170
  }
251
- function Ft(t) {
252
- re(nt, t);
171
+ function providePropertyStates(e) {
172
+ provide(propertyStatesKey, e);
253
173
  }
254
- function zt() {
255
- return ae(nt);
174
+ function injectPropertyStates() {
175
+ return inject(propertyStatesKey);
256
176
  }
257
- function Gt(t) {
258
- re(lt, t);
177
+ function provideChangeEvent(e) {
178
+ provide(changeEventKey, e);
259
179
  }
260
- function Yt() {
261
- return ae(lt);
180
+ function injectChangeEvent() {
181
+ return inject(changeEventKey);
262
182
  }
263
- function Wt(t) {
264
- re(ot, t);
183
+ function provideCompList(e) {
184
+ provide(compListKey, e);
265
185
  }
266
- function ut() {
267
- return ae(ot);
186
+ function injectCompList() {
187
+ return inject(compListKey);
268
188
  }
269
- function Qt(t) {
270
- re(st, t);
189
+ function provideSlotList(e) {
190
+ provide(slotListKey, e);
271
191
  }
272
- function rt() {
273
- return ae(st);
192
+ function injectSlotList() {
193
+ return inject(slotListKey);
274
194
  }
275
- function Zt(t) {
276
- re(it, t);
195
+ function provideAdaptSlotList(e) {
196
+ provide(adaptSlotListKey, e);
277
197
  }
278
- function at() {
279
- return ae(it);
198
+ function injectAdaptSlotList() {
199
+ return inject(adaptSlotListKey);
280
200
  }
281
- const jt = /* @__PURE__ */ E({
282
- __name: "index",
283
- setup(t) {
284
- const { t: s } = ne(), l = Jt(), e = Ht(), n = zt(), o = Yt(), i = O(0), r = O(0), u = O([]), a = L(() => [i.value, r.value]), c = (x) => {
285
- const U = () => !(u.value.length <= 0 || !ve(n.value, u.value)), g = () => {
286
- const V = be(l.value, u.value);
287
- if (V)
288
- if (V.ui) {
289
- const A = xe(e.value, u.value.slice(0, -1));
290
- if (!A)
291
- return;
292
- A[u.value[u.value.length - 1]] = H(V), o(u.value, A[u.value[u.value.length - 1]]);
293
- } else if (V.array) {
294
- const A = u.value[u.value.length - 1];
295
- if (A === void 0) {
296
- console.assert(!1, "invalid last key");
297
- return;
298
- }
299
- if (typeof A == "string") {
300
- const T = xe(e.value, u.value.slice(0, -1));
301
- if (!T)
302
- return;
303
- T[u.value[u.value.length - 1]] = H(V), o(u.value, T[u.value[u.value.length - 1]]);
304
- } else {
305
- const T = xe(e.value, u.value);
306
- if (!T)
307
- return;
308
- V.children.forEach((Q) => {
309
- T[Q.key] = H(V), o([...u.value, Q.key], T[Q.key]);
310
- });
311
- }
312
- } else {
313
- const A = xe(e.value, u.value);
314
- if (!A)
315
- return;
316
- V.children.forEach((T) => {
317
- A[T.key] = H(V), o([...u.value, T.key], A[T.key]);
318
- });
319
- }
320
- };
321
- U() && x.push({
322
- title: s("x-prop-tree.reset"),
323
- func: g
324
- });
325
- }, v = (x) => {
326
- const U = () => {
327
- const g = be(l.value, u.value), V = xe(e.value, u.value);
328
- localStorage.setItem("propTreeCopy", JSON.stringify({ property: g, object: V }));
329
- };
330
- x.push({
331
- title: s("x-prop-tree.copy"),
332
- func: U
333
- });
334
- }, m = (x) => {
335
- const U = () => {
336
- const V = localStorage.getItem("propTreeCopy");
337
- if (!V)
338
- return !1;
339
- try {
340
- const { property: A } = JSON.parse(V);
341
- if (!A)
342
- return !1;
343
- const T = be(l.value, u.value);
344
- return Dt(A, T);
345
- } catch (A) {
346
- console.error(A);
347
- }
348
- return !1;
349
- }, g = () => {
350
- if (!U())
351
- return;
352
- const V = localStorage.getItem("propTreeCopy");
353
- if (V)
354
- try {
355
- const { object: A } = JSON.parse(V), T = be(l.value, u.value);
356
- console.log(A, T);
357
- } catch (A) {
358
- console.error(A);
359
- }
360
- };
361
- U() && x.push({
362
- title: s("x-prop-tree.paste"),
363
- func: g
364
- });
365
- }, p = L(() => {
366
- const x = [];
367
- return c(x), v(x), m(x), x;
368
- }), d = (x) => {
369
- i.value = x.x, r.value = x.y, u.value = x.keys;
370
- }, { open: C } = ye("propTreeMenu", d);
371
- return (x, U) => {
372
- const g = $("v-list-item-title"), V = $("v-list-item"), A = $("v-list"), T = $("v-menu");
373
- return k(), B(T, {
374
- modelValue: M(C),
375
- "onUpdate:modelValue": U[0] || (U[0] = (Q) => ue(C) ? C.value = Q : null),
376
- "location-strategy": "connected",
377
- scrim: "transparent",
378
- target: a.value
379
- }, {
380
- default: K(() => [
381
- w(A, null, {
382
- default: K(() => [
383
- (k(!0), q(me, null, Me(p.value, (Q, he) => (k(), B(V, {
384
- key: he,
385
- link: "",
386
- onClick: Q.func
387
- }, {
388
- default: K(() => [
389
- w(g, null, {
390
- default: K(() => [
391
- ge(J(Q.title), 1)
392
- ]),
393
- _: 2
394
- }, 1024)
395
- ]),
396
- _: 2
397
- }, 1032, ["onClick"]))), 128))
398
- ]),
399
- _: 1
400
- })
401
- ]),
402
- _: 1
403
- }, 8, ["modelValue", "target"]);
404
- };
405
- }
406
- }), It = { style: { pointerEvents: "none" } }, we = /* @__PURE__ */ E({
407
- __name: "index",
408
- props: {
409
- title: {},
410
- collapse: { type: Boolean },
411
- hasCreate: { type: Boolean, default: !1 },
412
- hasDelete: { type: Boolean, default: !1 },
413
- index: { default: 0 }
414
- },
415
- emits: ["collapse", "menu", "create", "delete"],
416
- setup(t, { emit: s }) {
417
- const { backgroundColor2: l, highlightColor: e } = I(), n = s, o = O(!1), i = L(() => ({
418
- background: o.value ? e.value : l.value,
419
- height: "36px",
420
- marginBottom: "1px",
421
- userSelect: "none"
422
- })), r = () => {
423
- n("collapse", !t.collapse);
424
- }, u = (a) => {
425
- n("menu", a.clientX, a.clientY);
426
- };
427
- return (a, c) => {
428
- const v = $("v-icon"), m = $("v-spacer"), p = $("v-btn"), d = ee("ripple");
429
- return Z((k(), q("div", {
430
- class: "d-flex align-center cursor-pointer",
431
- style: G(i.value),
432
- onClick: r,
433
- onContextmenu: X(u, ["self", "prevent"]),
434
- onMouseout: c[2] || (c[2] = (C) => o.value = !1),
435
- onMouseover: c[3] || (c[3] = (C) => o.value = !0)
436
- }, [
437
- w(v, {
438
- class: "mr-1",
439
- icon: t.collapse ? "mdi-chevron-right" : "mdi-chevron-down"
440
- }, null, 8, ["icon"]),
441
- D("span", It, J(t.title), 1),
442
- w(m),
443
- t.hasCreate ? (k(), B(p, {
444
- key: 0,
445
- class: "mx-3",
446
- density: "compact",
447
- icon: "mdi-plus",
448
- variant: "text",
449
- onClick: c[0] || (c[0] = X((C) => n("create"), ["stop"]))
450
- })) : Y("", !0),
451
- t.hasDelete ? (k(), B(p, {
452
- key: 1,
453
- class: "mx-3",
454
- density: "compact",
455
- icon: "mdi-minus",
456
- variant: "text",
457
- onClick: c[1] || (c[1] = X((C) => n("delete", t.index), ["stop"]))
458
- })) : Y("", !0)
459
- ], 36)), [
460
- [d]
461
- ]);
462
- };
463
- }
201
+ var menu_default = /* @__PURE__ */ defineComponent({
202
+ __name: "index",
203
+ setup(e) {
204
+ let { t: m } = useI18n(), g = injectConfig(), _ = injectObject(), v = injectPropertyStates(), S = injectChangeEvent(), w = ref(0), D = ref(0), O = ref([]), k = computed(() => [w.value, D.value]), j = (e) => {
205
+ (() => !(O.value.length <= 0 || !isPropertyChanged(v.value, O.value)))() && e.push({
206
+ title: m("x-prop-tree.reset"),
207
+ func: () => {
208
+ let e = unpkgProperty(g.value, O.value);
209
+ if (e) if (e.ui) {
210
+ let m = unpkgObject(_.value, O.value.slice(0, -1));
211
+ if (!m) return;
212
+ m[O.value[O.value.length - 1]] = getPropertyDefault(e), S(O.value, m[O.value[O.value.length - 1]]);
213
+ } else if (e.array) {
214
+ let m = O.value[O.value.length - 1];
215
+ if (m === void 0) {
216
+ console.assert(!1, "invalid last key");
217
+ return;
218
+ }
219
+ if (typeof m == "string") {
220
+ let m = unpkgObject(_.value, O.value.slice(0, -1));
221
+ if (!m) return;
222
+ m[O.value[O.value.length - 1]] = getPropertyDefault(e), S(O.value, m[O.value[O.value.length - 1]]);
223
+ } else {
224
+ let m = unpkgObject(_.value, O.value);
225
+ if (!m) return;
226
+ e.children.forEach((g) => {
227
+ m[g.key] = getPropertyDefault(e), S([...O.value, g.key], m[g.key]);
228
+ });
229
+ }
230
+ } else {
231
+ let m = unpkgObject(_.value, O.value);
232
+ if (!m) return;
233
+ e.children.forEach((g) => {
234
+ m[g.key] = getPropertyDefault(e), S([...O.value, g.key], m[g.key]);
235
+ });
236
+ }
237
+ }
238
+ });
239
+ }, M = (e) => {
240
+ (() => !0)() && e.push({
241
+ title: m("x-prop-tree.copy"),
242
+ func: () => {
243
+ let e = unpkgProperty(g.value, O.value), m = unpkgObject(_.value, O.value);
244
+ localStorage.setItem("propTreeCopy", JSON.stringify({
245
+ property: e,
246
+ object: m
247
+ }));
248
+ }
249
+ });
250
+ }, N = (e) => {
251
+ let _ = () => {
252
+ let e = localStorage.getItem("propTreeCopy");
253
+ if (!e) return !1;
254
+ try {
255
+ let { property: m } = JSON.parse(e);
256
+ return m ? isPropertyCompatible(m, unpkgProperty(g.value, O.value)) : !1;
257
+ } catch (e) {
258
+ console.error(e);
259
+ }
260
+ return !1;
261
+ };
262
+ _() && e.push({
263
+ title: m("x-prop-tree.paste"),
264
+ func: () => {
265
+ if (!_()) return;
266
+ let e = localStorage.getItem("propTreeCopy");
267
+ if (e) try {
268
+ let { object: m } = JSON.parse(e), _ = unpkgProperty(g.value, O.value);
269
+ console.log(m, _);
270
+ } catch (e) {
271
+ console.error(e);
272
+ }
273
+ }
274
+ });
275
+ }, P = computed(() => {
276
+ let e = [];
277
+ return j(e), M(e), N(e), e;
278
+ }), { open: F } = useViewStack("propTreeMenu", (e) => {
279
+ w.value = e.x, D.value = e.y, O.value = e.keys;
280
+ });
281
+ return (e, m) => {
282
+ let g = resolveComponent("v-list-item-title"), _ = resolveComponent("v-list-item"), v = resolveComponent("v-list"), b = resolveComponent("v-menu");
283
+ return openBlock(), createBlock(b, {
284
+ modelValue: unref(F),
285
+ "onUpdate:modelValue": m[0] ||= (e) => isRef(F) ? F.value = e : null,
286
+ "location-strategy": "connected",
287
+ scrim: "transparent",
288
+ target: k.value
289
+ }, {
290
+ default: withCtx(() => [createVNode(v, null, {
291
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(P.value, (e, m) => (openBlock(), createBlock(_, {
292
+ key: m,
293
+ link: "",
294
+ onClick: e.func
295
+ }, {
296
+ default: withCtx(() => [createVNode(g, null, {
297
+ default: withCtx(() => [createTextVNode(toDisplayString(e.title), 1)]),
298
+ _: 2
299
+ }, 1024)]),
300
+ _: 2
301
+ }, 1032, ["onClick"]))), 128))]),
302
+ _: 1
303
+ })]),
304
+ _: 1
305
+ }, 8, ["modelValue", "target"]);
306
+ };
307
+ }
308
+ }), _hoisted_1$18 = { style: { pointerEvents: "none" } }, title_default = /* @__PURE__ */ defineComponent({
309
+ __name: "index",
310
+ props: {
311
+ title: {},
312
+ collapse: { type: Boolean },
313
+ hasCreate: {
314
+ type: Boolean,
315
+ default: !1
316
+ },
317
+ hasDelete: {
318
+ type: Boolean,
319
+ default: !1
320
+ },
321
+ index: { default: 0 }
322
+ },
323
+ emits: [
324
+ "collapse",
325
+ "menu",
326
+ "create",
327
+ "delete"
328
+ ],
329
+ setup(e, { emit: m }) {
330
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = m, y = ref(!1), T = computed(() => ({
331
+ background: y.value ? _.value : g.value,
332
+ height: "36px",
333
+ marginBottom: "1px",
334
+ userSelect: "none"
335
+ })), D = () => {
336
+ v("collapse", !e.collapse);
337
+ }, O = (e) => {
338
+ v("menu", e.clientX, e.clientY);
339
+ };
340
+ return (m, g) => {
341
+ let _ = resolveComponent("v-icon"), b = resolveComponent("v-spacer"), k = resolveComponent("v-btn"), A = resolveDirective("ripple");
342
+ return withDirectives((openBlock(), createElementBlock("div", {
343
+ class: "d-flex align-center cursor-pointer",
344
+ style: normalizeStyle(T.value),
345
+ onClick: D,
346
+ onContextmenu: withModifiers(O, ["self", "prevent"]),
347
+ onMouseout: g[2] ||= (e) => y.value = !1,
348
+ onMouseover: g[3] ||= (e) => y.value = !0
349
+ }, [
350
+ createVNode(_, {
351
+ class: "mr-1",
352
+ icon: e.collapse ? "mdi-chevron-right" : "mdi-chevron-down"
353
+ }, null, 8, ["icon"]),
354
+ createElementVNode("span", _hoisted_1$18, toDisplayString(e.title), 1),
355
+ createVNode(b),
356
+ e.hasCreate ? (openBlock(), createBlock(k, {
357
+ key: 0,
358
+ class: "mx-3",
359
+ density: "compact",
360
+ icon: "mdi-plus",
361
+ variant: "text",
362
+ onClick: g[0] ||= withModifiers((e) => v("create"), ["stop"])
363
+ })) : createCommentVNode("", !0),
364
+ e.hasDelete ? (openBlock(), createBlock(k, {
365
+ key: 1,
366
+ class: "mx-3",
367
+ density: "compact",
368
+ icon: "mdi-minus",
369
+ variant: "text",
370
+ onClick: g[1] ||= withModifiers((m) => v("delete", e.index), ["stop"])
371
+ })) : createCommentVNode("", !0)
372
+ ], 36)), [[A]]);
373
+ };
374
+ }
464
375
  });
465
- function en(t, s, l) {
466
- const { i18n: e } = Ct, n = O([]);
467
- Zt(n);
468
- const o = () => {
469
- if (!t.value || !s.value || !l.value)
470
- return [];
471
- const c = qe[t.value];
472
- if (!c)
473
- return console.assert(!1, `invalid version=${t.value}`), [];
474
- const v = wt(s.value, l.value), m = [];
475
- for (let x = 0; x < c.groups[v].length; x++) {
476
- const U = c.groups[v][x], g = pe(n, U.key);
477
- m.push({
478
- id: U.key,
479
- type: 0,
480
- name: e.global.t(U.name),
481
- position: x,
482
- collapse: g?.collapse ?? !0,
483
- count: 0
484
- });
485
- let V = 0;
486
- for (const A of U.items) {
487
- const T = Mt[A];
488
- if (T && !T.internal && T.slots)
489
- for (const Q of T.slots) {
490
- const he = Fe("elementSlot", T.key, Q.key), Te = `${e.global.t(T.name)} / ${e.global.t(Q.name)}`;
491
- m.push({
492
- id: he,
493
- type: 1,
494
- name: Te,
495
- position: V++,
496
- group: U.key
497
- });
498
- }
499
- }
500
- }
501
- const { activeApp: p, depends: d } = Ke.app;
502
- for (const { id: x, name: U, position: g } of p.compGroups) {
503
- const V = pe(n, x);
504
- m.push({
505
- id: x,
506
- type: 0,
507
- name: U,
508
- position: g,
509
- collapse: V?.collapse ?? !0
510
- });
511
- }
512
- let C = 0;
513
- for (const x of p.comps) {
514
- const U = d[x.id];
515
- if (U && U.meta.slots)
516
- for (const g of U.meta.slots) {
517
- const V = Fe("customSlot", x.id, g.id), A = `${x.name} / ${g.name}`;
518
- m.push({
519
- id: V,
520
- type: 1,
521
- name: A,
522
- position: C++,
523
- group: x.groupId
524
- });
525
- }
526
- }
527
- return Ze(m, !0);
528
- }, i = () => {
529
- n.value = o();
530
- };
531
- let r;
532
- const u = () => {
533
- clearTimeout(r), r = window.setTimeout(() => {
534
- i(), r && u();
535
- }, 1e3);
536
- }, a = () => {
537
- clearTimeout(r), r = void 0;
538
- };
539
- Oe(() => {
540
- u();
541
- }), Be(() => {
542
- a();
543
- }), ie([t, s, l], () => {
544
- i(), u();
545
- });
376
+ function useAdaptSlotList(e, m, g) {
377
+ let { i18n: y } = globalObjects, b = ref([]);
378
+ provideAdaptSlotList(b);
379
+ let x = () => {
380
+ if (!e.value || !m.value || !g.value) return [];
381
+ let x = pkgs[e.value];
382
+ if (!x) return console.assert(!1, `invalid version=${e.value}`), [];
383
+ let S = getTag(m.value, g.value), C = [];
384
+ for (let e = 0; e < x.groups[S].length; e++) {
385
+ let m = x.groups[S][e], g = getListEntry(b, m.key);
386
+ C.push({
387
+ id: m.key,
388
+ type: 0,
389
+ name: y.global.t(m.name),
390
+ position: e,
391
+ collapse: g?.collapse ?? !0,
392
+ count: 0
393
+ });
394
+ let _ = 0;
395
+ for (let e of m.items) {
396
+ let g = elements[e];
397
+ if (g && !g.internal && g.slots) for (let e of g.slots) {
398
+ let v = makeSlotId("elementSlot", g.key, e.key), b = `${y.global.t(g.name)} / ${y.global.t(e.name)}`;
399
+ C.push({
400
+ id: v,
401
+ type: 1,
402
+ name: b,
403
+ position: _++,
404
+ group: m.key
405
+ });
406
+ }
407
+ }
408
+ }
409
+ let { activeApp: w, depends: T } = globalState.app;
410
+ for (let { id: e, name: m, position: g } of w.compGroups) {
411
+ let _ = getListEntry(b, e);
412
+ C.push({
413
+ id: e,
414
+ type: 0,
415
+ name: m,
416
+ position: g,
417
+ collapse: _?.collapse ?? !0
418
+ });
419
+ }
420
+ let E = 0;
421
+ for (let e of w.comps) {
422
+ let m = T[e.id];
423
+ if (m && m.meta.slots) for (let g of m.meta.slots) {
424
+ let m = makeSlotId("customSlot", e.id, g.id), _ = `${e.name} / ${g.name}`;
425
+ C.push({
426
+ id: m,
427
+ type: 1,
428
+ name: _,
429
+ position: E++,
430
+ group: e.groupId
431
+ });
432
+ }
433
+ }
434
+ return tidyList(C, !0);
435
+ }, S = () => {
436
+ b.value = x();
437
+ }, C, w = () => {
438
+ clearTimeout(C), C = window.setTimeout(() => {
439
+ S(), C && w();
440
+ }, 1e3);
441
+ }, T = () => {
442
+ clearTimeout(C), C = void 0;
443
+ };
444
+ onMounted(() => {
445
+ w();
446
+ }), onBeforeUnmount(() => {
447
+ T();
448
+ }), watch([
449
+ e,
450
+ m,
451
+ g
452
+ ], () => {
453
+ S(), w();
454
+ });
546
455
  }
547
- function tn() {
548
- const t = O([]);
549
- Wt(t);
550
- const s = () => {
551
- const { activeApp: o, depends: i } = Ke.app, r = [];
552
- for (const { id: u, name: a, position: c } of o.compGroups) {
553
- const v = t.value.find((m) => m.id === u);
554
- r.push({
555
- id: u,
556
- type: 0,
557
- name: a,
558
- position: c,
559
- collapse: v?.collapse ?? !0
560
- });
561
- }
562
- for (const { id: u, groupId: a, name: c, position: v } of o.comps)
563
- i[u] && r.push({ id: u, type: 1, name: c, position: v, group: a });
564
- Ze(r, !0), t.value = r;
565
- };
566
- let l;
567
- const e = () => {
568
- clearTimeout(l), l = window.setTimeout(() => {
569
- s(), l && e();
570
- }, 1e3);
571
- }, n = () => {
572
- clearTimeout(l), l = void 0;
573
- };
574
- Oe(() => {
575
- e();
576
- }), Be(() => {
577
- n();
578
- });
456
+ function useCompList() {
457
+ let e = ref([]);
458
+ provideCompList(e);
459
+ let m = () => {
460
+ let { activeApp: m, depends: g } = globalState.app, v = [];
461
+ for (let { id: g, name: _, position: y } of m.compGroups) {
462
+ let m = e.value.find((e) => e.id === g);
463
+ v.push({
464
+ id: g,
465
+ type: 0,
466
+ name: _,
467
+ position: y,
468
+ collapse: m?.collapse ?? !0
469
+ });
470
+ }
471
+ for (let { id: e, groupId: _, name: y, position: b } of m.comps) g[e] && v.push({
472
+ id: e,
473
+ type: 1,
474
+ name: y,
475
+ position: b,
476
+ group: _
477
+ });
478
+ tidyList(v, !0), e.value = v;
479
+ }, g, v = () => {
480
+ clearTimeout(g), g = window.setTimeout(() => {
481
+ m(), g && v();
482
+ }, 1e3);
483
+ }, y = () => {
484
+ clearTimeout(g), g = void 0;
485
+ };
486
+ onMounted(() => {
487
+ v();
488
+ }), onBeforeUnmount(() => {
489
+ y();
490
+ });
579
491
  }
580
- function nn() {
581
- const t = O([]);
582
- Qt(t);
583
- const s = () => {
584
- const { activeObject: i, activeComp: r } = Ke.app;
585
- if (i.type !== "comp")
586
- return [];
587
- if (!r.meta.slots)
588
- return [];
589
- const u = [];
590
- for (const { id: a, name: c } of r.meta.slots)
591
- u.push({ id: a, name: c });
592
- return u;
593
- }, l = () => {
594
- t.value = s();
595
- };
596
- let e;
597
- const n = () => {
598
- clearTimeout(e), e = window.setTimeout(() => {
599
- l(), e && n();
600
- }, 1e3);
601
- }, o = () => {
602
- clearTimeout(e), e = void 0;
603
- };
604
- Oe(() => {
605
- n();
606
- }), Be(() => {
607
- o();
608
- });
492
+ function useSlotList() {
493
+ let e = ref([]);
494
+ provideSlotList(e);
495
+ let m = () => {
496
+ let { activeObject: e, activeComp: m } = globalState.app;
497
+ if (e.type !== "comp" || !m.meta.slots) return [];
498
+ let g = [];
499
+ for (let { id: e, name: _ } of m.meta.slots) g.push({
500
+ id: e,
501
+ name: _
502
+ });
503
+ return g;
504
+ }, g = () => {
505
+ e.value = m();
506
+ }, _, v = () => {
507
+ clearTimeout(_), _ = window.setTimeout(() => {
508
+ g(), _ && v();
509
+ }, 1e3);
510
+ }, y = () => {
511
+ clearTimeout(_), _ = void 0;
512
+ };
513
+ onMounted(() => {
514
+ v();
515
+ }), onBeforeUnmount(() => {
516
+ y();
517
+ });
609
518
  }
610
- const ln = { class: "text-subtitle-2 ml-1" }, on = { class: "text-caption text-grey ml-1" }, sn = /* @__PURE__ */ E({
611
- __name: "group",
612
- props: {
613
- id: {},
614
- title: {},
615
- collapse: { type: Boolean },
616
- count: {}
617
- },
618
- emits: ["x-click"],
619
- setup(t, { emit: s }) {
620
- const { backgroundColor2: l, highlightColor: e } = I(), n = t, o = s, i = O(!1), r = L(() => ({
621
- background: i.value ? e.value : l.value,
622
- height: "30px",
623
- marginBottom: "1px",
624
- userSelect: "none"
625
- }));
626
- return (u, a) => {
627
- const c = $("v-icon"), v = ee("ripple");
628
- return Z((k(), q("div", {
629
- class: "d-flex align-center cursor-pointer",
630
- style: G(r.value),
631
- onClick: a[0] || (a[0] = (m) => o("x-click", n.id)),
632
- onMouseout: a[1] || (a[1] = (m) => i.value = !1),
633
- onMouseover: a[2] || (a[2] = (m) => i.value = !0)
634
- }, [
635
- w(c, {
636
- icon: n.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
637
- size: "small"
638
- }, null, 8, ["icon"]),
639
- D("span", ln, J(n.title), 1),
640
- D("span", on, J(n.count), 1)
641
- ], 36)), [
642
- [v]
643
- ]);
644
- };
645
- }
646
- }), un = { class: "text-subtitle-1 ml-6" }, rn = /* @__PURE__ */ E({
647
- __name: "item",
648
- props: {
649
- id: {},
650
- title: {}
651
- },
652
- emits: ["x-click"],
653
- setup(t, { emit: s }) {
654
- const { backgroundColor2: l, highlightColor: e } = I(), n = s, o = O(!1), i = L(() => ({
655
- background: o.value ? e.value : l.value,
656
- height: "48px",
657
- marginBottom: "1px",
658
- userSelect: "none"
659
- }));
660
- return (r, u) => {
661
- const a = ee("ripple");
662
- return Z((k(), q("div", {
663
- class: "d-flex align-center cursor-pointer",
664
- style: G(i.value),
665
- onClick: u[0] || (u[0] = (c) => n("x-click", t.id)),
666
- onMouseout: u[1] || (u[1] = (c) => o.value = !1),
667
- onMouseover: u[2] || (u[2] = (c) => o.value = !0)
668
- }, [
669
- D("span", un, J(t.title), 1)
670
- ], 36)), [
671
- [a]
672
- ]);
673
- };
674
- }
675
- }), an = { key: 0 }, cn = {
676
- key: 1,
677
- class: "text-body-2 text-grey ml-3"
678
- }, dn = /* @__PURE__ */ E({
679
- __name: "index",
680
- props: {
681
- modelValue: {},
682
- modelModifiers: {},
683
- open: { type: Boolean, required: !0 },
684
- openModifiers: {}
685
- },
686
- emits: ["update:modelValue", "update:open"],
687
- setup(t) {
688
- const { nameList: s } = le(), l = F(t, "modelValue"), e = F(t, "open"), n = at(), o = (r) => {
689
- const u = pe(n, r);
690
- u && je(n, r, !u.collapse);
691
- }, i = (r) => {
692
- l.value = r, e.value = !1;
693
- };
694
- return (r, u) => M(n).length > 0 ? (k(), q("div", an, [
695
- (k(!0), q(me, null, Me(M(n), (a) => (k(), q(me, {
696
- key: a.id
697
- }, [
698
- a.type === 0 ? (k(), B(sn, {
699
- key: 0,
700
- id: a.id,
701
- collapse: a.collapse,
702
- count: a.count ?? 0,
703
- title: a.name,
704
- onXClick: o
705
- }, null, 8, ["id", "collapse", "count", "title"])) : Y("", !0),
706
- a.type === 1 && a.show ? (k(), B(rn, {
707
- key: 1,
708
- id: a.id,
709
- title: a.name,
710
- onXClick: i
711
- }, null, 8, ["id", "title"])) : Y("", !0)
712
- ], 64))), 128))
713
- ])) : (k(), q("div", cn, J(M(s)(["x-prop-tree.no", "x-prop-tree.adapt", "x-prop-tree.slot"])), 1));
714
- }
715
- }), mn = { class: "text-subtitle-1" }, fn = /* @__PURE__ */ E({
716
- __name: "index",
717
- props: {
718
- modelValue: {},
719
- modelModifiers: {}
720
- },
721
- emits: ["update:modelValue"],
722
- setup(t) {
723
- const { t: s } = ne(), l = Re(), { sysBarAvail: e, nameList: n } = le(), { backgroundColor1: o } = I(), i = F(t, "modelValue"), r = at(), u = L(() => {
724
- let p = "100%";
725
- return l.mdAndUp.value && (p = "400px"), {
726
- background: o.value,
727
- width: p,
728
- height: "100%"
729
- };
730
- }), a = L(() => {
731
- let p = 48;
732
- return e.value && (p += 24), {
733
- position: "relative",
734
- height: `calc(100% - ${p}px)`
735
- };
736
- }), c = L(() => ({
737
- height: "60px"
738
- })), v = L(() => {
739
- if (!i.value)
740
- return s("x-runtime-lib.notSet");
741
- const p = pe(r, i.value);
742
- return p ? p.name : s("x-runtime-lib.slotNotAvail");
743
- }), { open: m } = ye(`propTreeAdaptSlotSelectDlg${_e()}`);
744
- return Se(() => {
745
- m.value = !1;
746
- }), (p, d) => {
747
- const C = $("v-btn"), x = $("v-sheet"), U = $("v-dialog");
748
- return k(), B(U, {
749
- modelValue: M(m),
750
- "onUpdate:modelValue": d[5] || (d[5] = (g) => ue(m) ? m.value = g : null),
751
- fullscreen: "",
752
- "no-click-animation": "",
753
- persistent: "",
754
- transition: "scroll-x-reverse-transition",
755
- onKeydown: d[6] || (d[6] = Ae(X((g) => m.value = !1, ["stop", "prevent"]), ["esc"]))
756
- }, {
757
- activator: K(({ props: g }) => [
758
- w(C, Ve(g, {
759
- block: "",
760
- density: "comfortable"
761
- }), {
762
- default: K(() => [
763
- ge(J(v.value), 1)
764
- ]),
765
- _: 1
766
- }, 16)
767
- ]),
768
- default: K(() => [
769
- D("div", {
770
- class: "w-100 h-100 d-flex flex-row-reverse",
771
- onClick: d[3] || (d[3] = X((g) => m.value = !1, ["self"])),
772
- onContextmenu: d[4] || (d[4] = X((g) => m.value = !1, ["self", "prevent"]))
773
- }, [
774
- D("div", {
775
- class: "elevation-2",
776
- style: G(u.value)
777
- }, [
778
- M(e) ? (k(), B(x, {
779
- key: 0,
780
- color: "transparent",
781
- height: 24
782
- })) : Y("", !0),
783
- w(x, {
784
- class: "d-flex align-center px-3",
785
- color: "transparent",
786
- height: 48
787
- }, {
788
- default: K(() => [
789
- w(C, {
790
- density: "comfortable",
791
- icon: "mdi-close",
792
- variant: "text",
793
- onClick: d[0] || (d[0] = (g) => m.value = !1)
794
- }),
795
- D("span", mn, J(M(n)([
796
- "x-prop-tree.select",
797
- "x-prop-tree.adapt",
798
- "x-prop-tree.slot"
799
- ])), 1)
800
- ]),
801
- _: 1
802
- }),
803
- D("div", {
804
- class: "overflow-y-auto",
805
- style: G(a.value)
806
- }, [
807
- w(dn, {
808
- modelValue: i.value,
809
- "onUpdate:modelValue": d[1] || (d[1] = (g) => i.value = g),
810
- open: M(m),
811
- "onUpdate:open": d[2] || (d[2] = (g) => ue(m) ? m.value = g : null)
812
- }, null, 8, ["modelValue", "open"]),
813
- D("div", {
814
- style: G(c.value)
815
- }, null, 4)
816
- ], 4)
817
- ], 4)
818
- ], 32)
819
- ]),
820
- _: 1
821
- }, 8, ["modelValue"]);
822
- };
823
- }
824
- }), vn = { class: "d-flex justify-space-between align-center" }, pn = /* @__PURE__ */ E({
825
- __name: "index",
826
- props: /* @__PURE__ */ j({
827
- hasDelete: { type: Boolean, default: !1 },
828
- readonly: { type: Boolean, default: !1 }
829
- }, {
830
- modelValue: {},
831
- modelModifiers: {}
832
- }),
833
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
834
- setup(t, { emit: s }) {
835
- const { t: l } = ne(), e = F(t, "modelValue"), n = s, o = L(() => {
836
- let u = "100%";
837
- return t.hasDelete && (u = "calc(100% - 37px)"), {
838
- width: u
839
- };
840
- }), i = L(() => t.readonly), { open: r } = ye(`propTreeColorPickerMenu${_e()}`);
841
- return Se(() => {
842
- r.value = !1;
843
- }), (u, a) => {
844
- const c = $("v-btn"), v = $("v-color-picker"), m = $("v-menu");
845
- return k(), B(m, {
846
- modelValue: M(r),
847
- "onUpdate:modelValue": a[2] || (a[2] = (p) => ue(r) ? r.value = p : null),
848
- "close-on-content-click": !1,
849
- scrim: "transparent"
850
- }, {
851
- activator: K(({ props: p }) => [
852
- D("div", vn, [
853
- D("div", {
854
- class: "flex-grow-1",
855
- style: G(o.value)
856
- }, [
857
- w(c, Ve(p, {
858
- block: "",
859
- color: e.value,
860
- density: "comfortable",
861
- disabled: i.value
862
- }), {
863
- default: K(() => [
864
- ge(J(e.value ? e.value : M(l)("x-runtime-lib.notSet")), 1)
865
- ]),
866
- _: 1
867
- }, 16, ["color", "disabled"])
868
- ], 4),
869
- t.hasDelete ? (k(), B(c, {
870
- key: 0,
871
- class: "mx-2",
872
- density: "compact",
873
- icon: "mdi-minus",
874
- variant: "text",
875
- onClick: a[0] || (a[0] = X((d) => n("delete"), ["stop"]))
876
- })) : Y("", !0)
877
- ])
878
- ]),
879
- default: K(() => [
880
- w(v, {
881
- modelValue: e.value,
882
- "onUpdate:modelValue": a[1] || (a[1] = (p) => e.value = p),
883
- mode: "hexa",
884
- "show-swatches": "",
885
- "swatches-max-height": "150px"
886
- }, null, 8, ["modelValue"])
887
- ]),
888
- _: 1
889
- }, 8, ["modelValue"]);
890
- };
891
- }
892
- }), gn = { class: "text-subtitle-2 ml-1" }, yn = { class: "text-caption text-grey ml-1" }, hn = /* @__PURE__ */ E({
893
- __name: "group",
894
- props: {
895
- id: {},
896
- title: {},
897
- collapse: { type: Boolean },
898
- count: {}
899
- },
900
- emits: ["x-click"],
901
- setup(t, { emit: s }) {
902
- const { backgroundColor2: l, highlightColor: e } = I(), n = t, o = s, i = O(!1), r = L(() => ({
903
- background: i.value ? e.value : l.value,
904
- height: "30px",
905
- marginBottom: "1px",
906
- userSelect: "none"
907
- }));
908
- return (u, a) => {
909
- const c = $("v-icon"), v = ee("ripple");
910
- return Z((k(), q("div", {
911
- class: "d-flex align-center cursor-pointer",
912
- style: G(r.value),
913
- onClick: a[0] || (a[0] = (m) => o("x-click", n.id)),
914
- onMouseout: a[1] || (a[1] = (m) => i.value = !1),
915
- onMouseover: a[2] || (a[2] = (m) => i.value = !0)
916
- }, [
917
- w(c, {
918
- icon: n.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
919
- size: "small"
920
- }, null, 8, ["icon"]),
921
- D("span", gn, J(n.title), 1),
922
- D("span", yn, J(n.count), 1)
923
- ], 36)), [
924
- [v]
925
- ]);
926
- };
927
- }
928
- }), kn = { class: "text-subtitle-1 ml-6" }, xn = /* @__PURE__ */ E({
929
- __name: "item",
930
- props: {
931
- id: {},
932
- title: {}
933
- },
934
- emits: ["x-click"],
935
- setup(t, { emit: s }) {
936
- const { backgroundColor2: l, highlightColor: e } = I(), n = t, o = s, i = O(!1), r = L(() => ({
937
- background: i.value ? e.value : l.value,
938
- height: "48px",
939
- marginBottom: "1px",
940
- userSelect: "none"
941
- }));
942
- return (u, a) => {
943
- const c = ee("ripple");
944
- return Z((k(), q("div", {
945
- class: "d-flex align-center cursor-pointer",
946
- style: G(r.value),
947
- onClick: a[0] || (a[0] = (v) => o("x-click", n.id)),
948
- onMouseout: a[1] || (a[1] = (v) => i.value = !1),
949
- onMouseover: a[2] || (a[2] = (v) => i.value = !0)
950
- }, [
951
- D("span", kn, J(n.title), 1)
952
- ], 36)), [
953
- [c]
954
- ]);
955
- };
956
- }
957
- }), _n = { key: 0 }, Sn = {
958
- key: 1,
959
- class: "text-body-2 text-grey ml-3"
960
- }, Vn = /* @__PURE__ */ E({
961
- __name: "index",
962
- props: {
963
- modelValue: {},
964
- modelModifiers: {},
965
- open: { type: Boolean, required: !0 },
966
- openModifiers: {}
967
- },
968
- emits: ["update:modelValue", "update:open"],
969
- setup(t) {
970
- const { nameList: s } = le(), l = F(t, "modelValue"), e = F(t, "open"), n = ut(), o = (r) => {
971
- const u = pe(n, r);
972
- u && je(n, r, !u.collapse);
973
- }, i = (r) => {
974
- l.value = r, e.value = !1, fe.emit("refreshDepends");
975
- };
976
- return (r, u) => M(n).length > 0 ? (k(), q("div", _n, [
977
- (k(!0), q(me, null, Me(M(n), (a) => (k(), q(me, {
978
- key: a.id
979
- }, [
980
- a.type === 0 ? (k(), B(hn, {
981
- key: 0,
982
- id: a.id,
983
- collapse: a.collapse,
984
- count: a.count ?? 0,
985
- title: a.name,
986
- onXClick: o
987
- }, null, 8, ["id", "collapse", "count", "title"])) : Y("", !0),
988
- a.type === 1 && a.show ? (k(), B(xn, {
989
- key: 1,
990
- id: a.id,
991
- title: a.name,
992
- onXClick: i
993
- }, null, 8, ["id", "title"])) : Y("", !0)
994
- ], 64))), 128))
995
- ])) : (k(), q("div", Sn, J(M(s)(["x-prop-tree.no", "x-prop-tree.comp"])), 1));
996
- }
997
- }), Cn = { class: "text-subtitle-1" }, $n = /* @__PURE__ */ E({
998
- __name: "index",
999
- props: {
1000
- modelValue: {},
1001
- modelModifiers: {}
1002
- },
1003
- emits: ["update:modelValue"],
1004
- setup(t) {
1005
- const { t: s } = ne(), l = Re(), { sysBarAvail: e, nameList: n } = le(), { backgroundColor1: o } = I(), i = F(t, "modelValue"), r = ut(), u = L(() => {
1006
- let p = "100%";
1007
- return l.mdAndUp.value && (p = "400px"), {
1008
- background: o.value,
1009
- width: p,
1010
- height: "100%"
1011
- };
1012
- }), a = L(() => {
1013
- let p = 48;
1014
- return e.value && (p += 24), {
1015
- position: "relative",
1016
- height: `calc(100% - ${p}px)`
1017
- };
1018
- }), c = L(() => ({
1019
- height: "60px"
1020
- })), v = L(() => {
1021
- if (!i.value)
1022
- return s("x-runtime-lib.notSet");
1023
- const p = pe(r, i.value);
1024
- return p ? p.name : s("x-runtime-lib.compNotAvail");
1025
- }), { open: m } = ye(`propTreeCompSelectDlg${_e()}`);
1026
- return Se(() => {
1027
- m.value = !1;
1028
- }), (p, d) => {
1029
- const C = $("v-btn"), x = $("v-sheet"), U = $("v-dialog");
1030
- return k(), B(U, {
1031
- modelValue: M(m),
1032
- "onUpdate:modelValue": d[5] || (d[5] = (g) => ue(m) ? m.value = g : null),
1033
- fullscreen: "",
1034
- "no-click-animation": "",
1035
- persistent: "",
1036
- transition: "scroll-x-reverse-transition",
1037
- onKeydown: d[6] || (d[6] = Ae(X((g) => m.value = !1, ["stop", "prevent"]), ["esc"]))
1038
- }, {
1039
- activator: K(({ props: g }) => [
1040
- w(C, Ve(g, {
1041
- block: "",
1042
- density: "comfortable"
1043
- }), {
1044
- default: K(() => [
1045
- ge(J(v.value), 1)
1046
- ]),
1047
- _: 1
1048
- }, 16)
1049
- ]),
1050
- default: K(() => [
1051
- D("div", {
1052
- class: "w-100 h-100 d-flex flex-row-reverse",
1053
- onClick: d[3] || (d[3] = X((g) => m.value = !1, ["self"])),
1054
- onContextmenu: d[4] || (d[4] = X((g) => m.value = !1, ["self", "prevent"]))
1055
- }, [
1056
- D("div", {
1057
- class: "elevation-2",
1058
- style: G(u.value)
1059
- }, [
1060
- M(e) ? (k(), B(x, {
1061
- key: 0,
1062
- color: "transparent",
1063
- height: 24
1064
- })) : Y("", !0),
1065
- w(x, {
1066
- class: "d-flex align-center px-3",
1067
- color: "transparent",
1068
- height: 48
1069
- }, {
1070
- default: K(() => [
1071
- w(C, {
1072
- density: "comfortable",
1073
- icon: "mdi-close",
1074
- variant: "text",
1075
- onClick: d[0] || (d[0] = (g) => m.value = !1)
1076
- }),
1077
- D("span", Cn, J(M(n)(["x-prop-tree.select", "x-prop-tree.comp"])), 1)
1078
- ]),
1079
- _: 1
1080
- }),
1081
- D("div", {
1082
- class: "overflow-y-auto",
1083
- style: G(a.value)
1084
- }, [
1085
- w(Vn, {
1086
- modelValue: i.value,
1087
- "onUpdate:modelValue": d[1] || (d[1] = (g) => i.value = g),
1088
- open: M(m),
1089
- "onUpdate:open": d[2] || (d[2] = (g) => ue(m) ? m.value = g : null)
1090
- }, null, 8, ["modelValue", "open"]),
1091
- D("div", {
1092
- style: G(c.value)
1093
- }, null, 4)
1094
- ], 4)
1095
- ], 4)
1096
- ], 32)
1097
- ]),
1098
- _: 1
1099
- }, 8, ["modelValue"]);
1100
- };
1101
- }
1102
- }), Un = /* @__PURE__ */ E({
1103
- __name: "editor",
1104
- props: {
1105
- modelValue: { required: !0 },
1106
- modelModifiers: {},
1107
- lock: { type: Boolean, required: !0 },
1108
- lockModifiers: {},
1109
- scale: { required: !0 },
1110
- scaleModifiers: {}
1111
- },
1112
- emits: ["update:modelValue", "update:lock", "update:scale"],
1113
- setup(t, { expose: s }) {
1114
- const l = F(t, "modelValue"), e = F(t, "lock"), n = F(t, "scale"), o = $t(), i = Ut(), r = Je(), u = Ye("target"), a = () => {
1115
- const v = JSON.parse(l.value);
1116
- u.value?.load(v);
1117
- };
1118
- return s({ save: () => {
1119
- const v = u.value.save();
1120
- l.value = JSON.stringify(v, null, 2);
1121
- } }), (v, m) => (k(), B(M(Lt), {
1122
- ref_key: "target",
1123
- ref: u,
1124
- lock: e.value,
1125
- "onUpdate:lock": m[0] || (m[0] = (p) => e.value = p),
1126
- scale: n.value,
1127
- "onUpdate:scale": m[1] || (m[1] = (p) => n.value = p),
1128
- dark: M(o),
1129
- locale: M(i),
1130
- type: "json",
1131
- version: M(r),
1132
- onReady: a
1133
- }, null, 8, ["lock", "scale", "dark", "locale", "version"]));
1134
- }
1135
- }), bn = { class: "text-subtitle-1" }, wn = /* @__PURE__ */ E({
1136
- __name: "index",
1137
- props: {
1138
- modelValue: { required: !0 },
1139
- modelModifiers: {}
1140
- },
1141
- emits: ["update:modelValue"],
1142
- setup(t) {
1143
- const { t: s } = ne(), { sysBarAvail: l } = le(), { backgroundColor0: e, backgroundColor1: n, backgroundColor2: o } = I(), i = F(t, "modelValue"), r = O(!1), u = O(1), a = L(() => {
1144
- let p = 48;
1145
- return l.value && (p += 24), {
1146
- position: "relative",
1147
- background: n.value,
1148
- height: `calc(100% - ${p}px)`
1149
- };
1150
- }), c = L(() => s("x-prop-tree.jsonEditor")), { open: v } = ye(`propTreejsonEditorDlg${_e()}`);
1151
- Se(() => {
1152
- v.value = !1;
1153
- });
1154
- const m = Ye("editor");
1155
- return ie(v, (p) => {
1156
- p || m.value?.save();
1157
- }), (p, d) => {
1158
- const C = $("v-btn"), x = $("v-sheet"), U = $("v-spacer"), g = $("v-dialog");
1159
- return k(), B(g, {
1160
- modelValue: M(v),
1161
- "onUpdate:modelValue": d[4] || (d[4] = (V) => ue(v) ? v.value = V : null),
1162
- attach: "",
1163
- fullscreen: "",
1164
- "no-click-animation": "",
1165
- persistent: "",
1166
- transition: "dialog-bottom-transition",
1167
- onKeydown: d[5] || (d[5] = Ae(X((V) => v.value = !1, ["stop", "prevent"]), ["esc"]))
1168
- }, {
1169
- activator: K(({ props: V }) => [
1170
- w(C, Ve(V, {
1171
- block: "",
1172
- density: "comfortable"
1173
- }), {
1174
- default: K(() => [
1175
- ge(J(c.value), 1)
1176
- ]),
1177
- _: 1
1178
- }, 16)
1179
- ]),
1180
- default: K(() => [
1181
- w(x, {
1182
- color: M(e),
1183
- height: "100%",
1184
- width: "100%"
1185
- }, {
1186
- default: K(() => [
1187
- M(l) ? (k(), B(x, {
1188
- key: 0,
1189
- color: M(o),
1190
- height: 24
1191
- }, null, 8, ["color"])) : Y("", !0),
1192
- w(x, {
1193
- class: "d-flex align-center px-2",
1194
- color: M(o),
1195
- height: 48
1196
- }, {
1197
- default: K(() => [
1198
- w(C, {
1199
- density: "comfortable",
1200
- icon: "mdi-close",
1201
- variant: "text",
1202
- onClick: d[0] || (d[0] = (V) => v.value = !1)
1203
- }),
1204
- D("span", bn, J(c.value), 1),
1205
- w(U)
1206
- ]),
1207
- _: 1
1208
- }, 8, ["color"]),
1209
- D("div", {
1210
- style: G(a.value)
1211
- }, [
1212
- w(Un, {
1213
- ref_key: "editor",
1214
- ref: m,
1215
- modelValue: i.value,
1216
- "onUpdate:modelValue": d[1] || (d[1] = (V) => i.value = V),
1217
- lock: r.value,
1218
- "onUpdate:lock": d[2] || (d[2] = (V) => r.value = V),
1219
- scale: u.value,
1220
- "onUpdate:scale": d[3] || (d[3] = (V) => u.value = V)
1221
- }, null, 8, ["modelValue", "lock", "scale"])
1222
- ], 4)
1223
- ]),
1224
- _: 1
1225
- }, 8, ["color"])
1226
- ]),
1227
- _: 1
1228
- }, 8, ["modelValue"]);
1229
- };
1230
- }
1231
- }), Mn = { class: "d-flex justify-space-between align-center my-2" }, An = { class: "flex-grow-1" }, Pn = /* @__PURE__ */ E({
1232
- __name: "index",
1233
- props: /* @__PURE__ */ j({
1234
- hasDelete: { type: Boolean, default: !1 },
1235
- types: {}
1236
- }, {
1237
- modelValue: {},
1238
- modelModifiers: {}
1239
- }),
1240
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
1241
- setup(t, { emit: s }) {
1242
- const { t: l } = ne(), { isMobile: e } = le(), n = F(t, "modelValue"), o = s, i = Je(), r = L(() => qe[i.value].types[t.types]), u = O(0), a = L(() => {
1243
- const d = [];
1244
- return r.value?.forEach(({ title: C }, x) => {
1245
- d.push({
1246
- title: l(C),
1247
- value: x
1248
- });
1249
- }), d;
1250
- });
1251
- He(() => {
1252
- r.value?.some((d, C) => d.validator(n.value) ? (u.value = C, !0) : !1);
1253
- });
1254
- const c = L(() => r.value?.[u.value]), v = () => {
1255
- n.value = c.value?.default;
1256
- }, m = O(0), p = async (d) => {
1257
- if (!d || !e() || c.value.ui !== "pixelInput" && c.value.ui !== "percentInput")
1258
- return;
1259
- const C = await We({
1260
- title: "",
1261
- value: m.value,
1262
- precision: c.value.precision,
1263
- min: c.value.min,
1264
- max: c.value.max,
1265
- step: c.value.step
1266
- });
1267
- C !== void 0 && (m.value = C);
1268
- };
1269
- return He(() => {
1270
- c.value?.ui === "pixelInput" ? m.value = At(n.value) : c.value?.ui === "percentInput" && (m.value = Pt(n.value));
1271
- }), ie(m, (d) => {
1272
- c.value?.ui === "pixelInput" ? n.value = d + "px" : c.value?.ui === "percentInput" && (n.value = d + "%");
1273
- }), (d, C) => {
1274
- const x = $("v-select"), U = $("v-number-input"), g = $("v-btn"), V = ee("ripple");
1275
- return k(), q("div", Mn, [
1276
- D("div", An, [
1277
- Z(w(x, {
1278
- modelValue: u.value,
1279
- "onUpdate:modelValue": [
1280
- C[0] || (C[0] = (A) => u.value = A),
1281
- v
1282
- ],
1283
- density: "compact",
1284
- "hide-details": "",
1285
- items: a.value,
1286
- "single-line": ""
1287
- }, null, 8, ["modelValue", "items"]), [
1288
- [
1289
- V,
1290
- void 0,
1291
- void 0,
1292
- { stop: !0 }
1293
- ]
1294
- ]),
1295
- c.value?.ui === "pixelInput" || c.value?.ui === "percentInput" ? Z((k(), B(U, {
1296
- key: 0,
1297
- modelValue: m.value,
1298
- "onUpdate:modelValue": C[1] || (C[1] = (A) => m.value = A),
1299
- "control-variant": "stacked",
1300
- density: "compact",
1301
- "hide-details": "",
1302
- max: c.value.max,
1303
- min: c.value.min,
1304
- precision: c.value.precision,
1305
- "single-line": "",
1306
- step: c.value.step,
1307
- "onUpdate:focused": p
1308
- }, null, 8, ["modelValue", "max", "min", "precision", "step"])), [
1309
- [
1310
- V,
1311
- void 0,
1312
- void 0,
1313
- { stop: !0 }
1314
- ]
1315
- ]) : Y("", !0)
1316
- ]),
1317
- t.hasDelete ? (k(), B(g, {
1318
- key: 0,
1319
- class: "mx-2",
1320
- density: "compact",
1321
- icon: "mdi-minus",
1322
- variant: "text",
1323
- onClick: C[2] || (C[2] = X((A) => o("delete"), ["stop"]))
1324
- })) : Y("", !0)
1325
- ]);
1326
- };
1327
- }
1328
- }), Ln = { class: "d-flex justify-space-between align-center" }, Dn = /* @__PURE__ */ E({
1329
- __name: "index",
1330
- props: /* @__PURE__ */ j({
1331
- hasDelete: { type: Boolean, default: !1 },
1332
- precision: { default: () => {
1333
- } },
1334
- min: { default: () => -1 / 0 },
1335
- max: { default: () => 1 / 0 },
1336
- step: { default: 1 },
1337
- readonly: { type: Boolean, default: !1 }
1338
- }, {
1339
- modelValue: { required: !0 },
1340
- modelModifiers: {}
1341
- }),
1342
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
1343
- setup(t, { emit: s }) {
1344
- const { isMobile: l } = le(), e = F(t, "modelValue"), n = s, o = async (i) => {
1345
- if (!i || t.readonly || !l())
1346
- return;
1347
- const r = await We({
1348
- title: "",
1349
- value: e.value,
1350
- precision: t.precision,
1351
- min: t.min,
1352
- max: t.max,
1353
- step: t.step
1354
- });
1355
- r !== void 0 && (e.value = r);
1356
- };
1357
- return (i, r) => {
1358
- const u = $("v-number-input"), a = $("v-btn"), c = ee("ripple");
1359
- return k(), q("div", Ln, [
1360
- Z(w(u, {
1361
- modelValue: e.value,
1362
- "onUpdate:modelValue": r[0] || (r[0] = (v) => e.value = v),
1363
- "control-variant": "stacked",
1364
- density: "compact",
1365
- "hide-details": "",
1366
- max: t.max,
1367
- min: t.min,
1368
- precision: t.precision,
1369
- readonly: t.readonly,
1370
- "single-line": "",
1371
- step: t.step,
1372
- "onUpdate:focused": o
1373
- }, null, 8, ["modelValue", "max", "min", "precision", "readonly", "step"]), [
1374
- [
1375
- c,
1376
- void 0,
1377
- void 0,
1378
- { stop: !0 }
1379
- ]
1380
- ]),
1381
- t.hasDelete ? (k(), B(a, {
1382
- key: 0,
1383
- class: "mx-2",
1384
- density: "compact",
1385
- icon: "mdi-minus",
1386
- variant: "text",
1387
- onClick: r[1] || (r[1] = X((v) => n("delete"), ["stop"]))
1388
- })) : Y("", !0)
1389
- ]);
1390
- };
1391
- }
1392
- }), Tn = { class: "d-flex justify-space-between align-center" }, Nn = /* @__PURE__ */ E({
1393
- __name: "index",
1394
- props: /* @__PURE__ */ j({
1395
- hasDelete: { type: Boolean, default: !1 },
1396
- readonly: { type: Boolean, default: !1 },
1397
- items: {}
1398
- }, {
1399
- modelValue: {},
1400
- modelModifiers: {}
1401
- }),
1402
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
1403
- setup(t, { emit: s }) {
1404
- const { t: l } = ne(), e = F(t, "modelValue"), n = s, o = Je(), i = L(() => {
1405
- const r = [];
1406
- return qe[o.value].items[t.items].forEach(({ title: a, value: c }) => {
1407
- r.push({ title: l(a), value: c });
1408
- }), r;
1409
- });
1410
- return (r, u) => {
1411
- const a = $("v-select"), c = $("v-btn"), v = ee("ripple");
1412
- return k(), q("div", Tn, [
1413
- Z(w(a, {
1414
- modelValue: e.value,
1415
- "onUpdate:modelValue": u[0] || (u[0] = (m) => e.value = m),
1416
- density: "compact",
1417
- "hide-details": "",
1418
- items: i.value,
1419
- readonly: t.readonly,
1420
- "single-line": ""
1421
- }, null, 8, ["modelValue", "items", "readonly"]), [
1422
- [
1423
- v,
1424
- void 0,
1425
- void 0,
1426
- { stop: !0 }
1427
- ]
1428
- ]),
1429
- t.hasDelete ? (k(), B(c, {
1430
- key: 0,
1431
- class: "mx-2",
1432
- density: "compact",
1433
- icon: "mdi-minus",
1434
- variant: "text",
1435
- onClick: u[1] || (u[1] = X((m) => n("delete"), ["stop"]))
1436
- })) : Y("", !0)
1437
- ]);
1438
- };
1439
- }
1440
- }), On = { class: "text-subtitle-1 ml-6" }, Bn = /* @__PURE__ */ E({
1441
- __name: "item",
1442
- props: {
1443
- id: {},
1444
- title: {}
1445
- },
1446
- emits: ["x-click"],
1447
- setup(t, { emit: s }) {
1448
- const { backgroundColor2: l, highlightColor: e } = I(), n = s, o = O(!1), i = L(() => ({
1449
- background: o.value ? e.value : l.value,
1450
- height: "48px",
1451
- marginBottom: "1px",
1452
- userSelect: "none"
1453
- }));
1454
- return (r, u) => {
1455
- const a = ee("ripple");
1456
- return Z((k(), q("div", {
1457
- class: "d-flex align-center cursor-pointer",
1458
- style: G(i.value),
1459
- onClick: u[0] || (u[0] = (c) => n("x-click", t.id)),
1460
- onMouseout: u[1] || (u[1] = (c) => o.value = !1),
1461
- onMouseover: u[2] || (u[2] = (c) => o.value = !0)
1462
- }, [
1463
- D("span", On, J(t.title), 1)
1464
- ], 36)), [
1465
- [a]
1466
- ]);
1467
- };
1468
- }
1469
- }), qn = { key: 0 }, Kn = {
1470
- key: 1,
1471
- class: "text-body-2 text-grey ml-3"
1472
- }, Rn = /* @__PURE__ */ E({
1473
- __name: "index",
1474
- props: {
1475
- modelValue: {},
1476
- modelModifiers: {},
1477
- open: { type: Boolean, required: !0 },
1478
- openModifiers: {}
1479
- },
1480
- emits: ["update:modelValue", "update:open"],
1481
- setup(t) {
1482
- const { nameList: s } = le(), l = F(t, "modelValue"), e = F(t, "open"), n = rt(), o = (i) => {
1483
- l.value = i, e.value = !1;
1484
- };
1485
- return (i, r) => M(n).length > 0 ? (k(), q("div", qn, [
1486
- (k(!0), q(me, null, Me(M(n), (u) => (k(), B(Bn, {
1487
- key: u.id,
1488
- id: u.id,
1489
- title: u.name,
1490
- onXClick: o
1491
- }, null, 8, ["id", "title"]))), 128))
1492
- ])) : (k(), q("div", Kn, J(M(s)(["x-prop-tree.no", "x-prop-tree.slot"])), 1));
1493
- }
1494
- }), En = { class: "text-subtitle-1" }, Jn = /* @__PURE__ */ E({
1495
- __name: "index",
1496
- props: {
1497
- modelValue: {},
1498
- modelModifiers: {}
1499
- },
1500
- emits: ["update:modelValue"],
1501
- setup(t) {
1502
- const { t: s } = ne(), l = Re(), { sysBarAvail: e, nameList: n } = le(), { backgroundColor1: o } = I(), i = F(t, "modelValue"), r = rt(), u = L(() => {
1503
- let p = "100%";
1504
- return l.mdAndUp.value && (p = "400px"), {
1505
- background: o.value,
1506
- width: p,
1507
- height: "100%"
1508
- };
1509
- }), a = L(() => {
1510
- let p = 48;
1511
- return e.value && (p += 24), {
1512
- position: "relative",
1513
- height: `calc(100% - ${p}px)`
1514
- };
1515
- }), c = L(() => ({
1516
- height: "60px"
1517
- })), v = L(() => {
1518
- if (!i.value)
1519
- return s("x-runtime-lib.notSet");
1520
- const p = r.value.find((d) => d.id === i.value);
1521
- return p ? p.name : s("x-runtime-lib.slotNotAvail");
1522
- }), { open: m } = ye(`propTreeSlotSelectDlg${_e()}`);
1523
- return Se(() => {
1524
- m.value = !1;
1525
- }), (p, d) => {
1526
- const C = $("v-btn"), x = $("v-sheet"), U = $("v-dialog");
1527
- return k(), B(U, {
1528
- modelValue: M(m),
1529
- "onUpdate:modelValue": d[5] || (d[5] = (g) => ue(m) ? m.value = g : null),
1530
- fullscreen: "",
1531
- "no-click-animation": "",
1532
- persistent: "",
1533
- transition: "scroll-x-reverse-transition",
1534
- onKeydown: d[6] || (d[6] = Ae(X((g) => m.value = !1, ["stop", "prevent"]), ["esc"]))
1535
- }, {
1536
- activator: K(({ props: g }) => [
1537
- w(C, Ve(g, {
1538
- block: "",
1539
- density: "comfortable"
1540
- }), {
1541
- default: K(() => [
1542
- ge(J(v.value), 1)
1543
- ]),
1544
- _: 1
1545
- }, 16)
1546
- ]),
1547
- default: K(() => [
1548
- D("div", {
1549
- class: "w-100 h-100 d-flex flex-row-reverse",
1550
- onClick: d[3] || (d[3] = X((g) => m.value = !1, ["self"])),
1551
- onContextmenu: d[4] || (d[4] = X((g) => m.value = !1, ["self", "prevent"]))
1552
- }, [
1553
- D("div", {
1554
- class: "elevation-2",
1555
- style: G(u.value)
1556
- }, [
1557
- M(e) ? (k(), B(x, {
1558
- key: 0,
1559
- color: "transparent",
1560
- height: 24
1561
- })) : Y("", !0),
1562
- w(x, {
1563
- class: "d-flex align-center px-3",
1564
- color: "transparent",
1565
- height: 48
1566
- }, {
1567
- default: K(() => [
1568
- w(C, {
1569
- density: "comfortable",
1570
- icon: "mdi-close",
1571
- variant: "text",
1572
- onClick: d[0] || (d[0] = (g) => m.value = !1)
1573
- }),
1574
- D("span", En, J(M(n)(["x-prop-tree.select", "x-prop-tree.slot"])), 1)
1575
- ]),
1576
- _: 1
1577
- }),
1578
- D("div", {
1579
- class: "overflow-y-auto",
1580
- style: G(a.value)
1581
- }, [
1582
- w(Rn, {
1583
- modelValue: i.value,
1584
- "onUpdate:modelValue": d[1] || (d[1] = (g) => i.value = g),
1585
- open: M(m),
1586
- "onUpdate:open": d[2] || (d[2] = (g) => ue(m) ? m.value = g : null)
1587
- }, null, 8, ["modelValue", "open"]),
1588
- D("div", {
1589
- style: G(c.value)
1590
- }, null, 4)
1591
- ], 4)
1592
- ], 4)
1593
- ], 32)
1594
- ]),
1595
- _: 1
1596
- }, 8, ["modelValue"]);
1597
- };
1598
- }
1599
- }), Xn = { class: "d-flex justify-space-between align-center" }, Hn = /* @__PURE__ */ E({
1600
- __name: "index",
1601
- props: /* @__PURE__ */ j({
1602
- hasDelete: { type: Boolean, default: !1 },
1603
- readonly: { type: Boolean, default: !1 }
1604
- }, {
1605
- modelValue: { required: !0 },
1606
- modelModifiers: {}
1607
- }),
1608
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
1609
- setup(t, { emit: s }) {
1610
- const { isMobile: l } = le(), e = F(t, "modelValue"), n = s, o = async (i) => {
1611
- if (!i || t.readonly || !l())
1612
- return;
1613
- const r = await bt({
1614
- title: "",
1615
- value: e.value
1616
- });
1617
- r !== void 0 && (e.value = r);
1618
- };
1619
- return (i, r) => {
1620
- const u = $("v-text-field"), a = $("v-btn"), c = ee("ripple");
1621
- return k(), q("div", Xn, [
1622
- Z(w(u, {
1623
- modelValue: e.value,
1624
- "onUpdate:modelValue": r[0] || (r[0] = (v) => e.value = v),
1625
- density: "compact",
1626
- "hide-details": "",
1627
- readonly: t.readonly,
1628
- "single-line": "",
1629
- "onUpdate:focused": o
1630
- }, null, 8, ["modelValue", "readonly"]), [
1631
- [
1632
- c,
1633
- void 0,
1634
- void 0,
1635
- { stop: !0 }
1636
- ]
1637
- ]),
1638
- t.hasDelete ? (k(), B(a, {
1639
- key: 0,
1640
- class: "mx-2",
1641
- density: "compact",
1642
- icon: "mdi-minus",
1643
- variant: "text",
1644
- onClick: r[1] || (r[1] = X((v) => n("delete"), ["stop"]))
1645
- })) : Y("", !0)
1646
- ]);
1647
- };
1648
- }
1649
- }), Fn = { class: "d-flex justify-space-between align-center" }, zn = /* @__PURE__ */ E({
1650
- __name: "index",
1651
- props: /* @__PURE__ */ j({
1652
- hasDelete: { type: Boolean, default: !1 },
1653
- readonly: { type: Boolean, default: !1 }
1654
- }, {
1655
- modelValue: { type: Boolean },
1656
- modelModifiers: {}
1657
- }),
1658
- emits: /* @__PURE__ */ j(["delete"], ["update:modelValue"]),
1659
- setup(t, { emit: s }) {
1660
- const l = F(t, "modelValue"), e = s;
1661
- return (n, o) => {
1662
- const i = $("v-switch"), r = $("v-btn");
1663
- return k(), q("div", Fn, [
1664
- w(i, {
1665
- modelValue: l.value,
1666
- "onUpdate:modelValue": o[0] || (o[0] = (u) => l.value = u),
1667
- class: "ml-1",
1668
- color: "primary",
1669
- density: "compact",
1670
- "hide-details": "",
1671
- readonly: t.readonly
1672
- }, null, 8, ["modelValue", "readonly"]),
1673
- t.hasDelete ? (k(), B(r, {
1674
- key: 0,
1675
- class: "mx-2",
1676
- density: "compact",
1677
- icon: "mdi-minus",
1678
- variant: "text",
1679
- onClick: o[1] || (o[1] = X((u) => e("delete"), ["stop"]))
1680
- })) : Y("", !0)
1681
- ]);
1682
- };
1683
- }
519
+ var _hoisted_1$17 = { class: "text-subtitle-2 ml-1" }, _hoisted_2$5 = { class: "text-caption text-grey ml-1" }, group_default$1 = /* @__PURE__ */ defineComponent({
520
+ __name: "group",
521
+ props: {
522
+ id: {},
523
+ title: {},
524
+ collapse: { type: Boolean },
525
+ count: {}
526
+ },
527
+ emits: ["x-click"],
528
+ setup(e, { emit: m }) {
529
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = e, y = m, x = ref(!1), S = computed(() => ({
530
+ background: x.value ? _.value : g.value,
531
+ height: "30px",
532
+ marginBottom: "1px",
533
+ userSelect: "none"
534
+ }));
535
+ return (e, m) => {
536
+ let g = resolveComponent("v-icon"), _ = resolveDirective("ripple");
537
+ return withDirectives((openBlock(), createElementBlock("div", {
538
+ class: "d-flex align-center cursor-pointer",
539
+ style: normalizeStyle(S.value),
540
+ onClick: m[0] ||= (e) => y("x-click", v.id),
541
+ onMouseout: m[1] ||= (e) => x.value = !1,
542
+ onMouseover: m[2] ||= (e) => x.value = !0
543
+ }, [
544
+ createVNode(g, {
545
+ icon: v.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
546
+ size: "small"
547
+ }, null, 8, ["icon"]),
548
+ createElementVNode("span", _hoisted_1$17, toDisplayString(v.title), 1),
549
+ createElementVNode("span", _hoisted_2$5, toDisplayString(v.count), 1)
550
+ ], 36)), [[_]]);
551
+ };
552
+ }
553
+ }), _hoisted_1$16 = { class: "text-subtitle-1 ml-6" }, item_default$2 = /* @__PURE__ */ defineComponent({
554
+ __name: "item",
555
+ props: {
556
+ id: {},
557
+ title: {}
558
+ },
559
+ emits: ["x-click"],
560
+ setup(e, { emit: m }) {
561
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = m, y = ref(!1), x = computed(() => ({
562
+ background: y.value ? _.value : g.value,
563
+ height: "48px",
564
+ marginBottom: "1px",
565
+ userSelect: "none"
566
+ }));
567
+ return (m, g) => {
568
+ let _ = resolveDirective("ripple");
569
+ return withDirectives((openBlock(), createElementBlock("div", {
570
+ class: "d-flex align-center cursor-pointer",
571
+ style: normalizeStyle(x.value),
572
+ onClick: g[0] ||= (m) => v("x-click", e.id),
573
+ onMouseout: g[1] ||= (e) => y.value = !1,
574
+ onMouseover: g[2] ||= (e) => y.value = !0
575
+ }, [createElementVNode("span", _hoisted_1$16, toDisplayString(e.title), 1)], 36)), [[_]]);
576
+ };
577
+ }
578
+ }), _hoisted_1$15 = { key: 0 }, _hoisted_2$4 = {
579
+ key: 1,
580
+ class: "text-body-2 text-grey ml-3"
581
+ }, adaptSlotList_default = /* @__PURE__ */ defineComponent({
582
+ __name: "index",
583
+ props: {
584
+ modelValue: {},
585
+ modelModifiers: {},
586
+ open: {
587
+ type: Boolean,
588
+ required: !0
589
+ },
590
+ openModifiers: {}
591
+ },
592
+ emits: ["update:modelValue", "update:open"],
593
+ setup(e) {
594
+ let { nameList: m } = useSystem(), _ = useModel(e, "modelValue"), b = useModel(e, "open"), w = injectAdaptSlotList(), T = (e) => {
595
+ let m = getListEntry(w, e);
596
+ m && setCollapse(w, e, !m.collapse);
597
+ }, E = (e) => {
598
+ _.value = e, b.value = !1;
599
+ };
600
+ return (e, g) => unref(w).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$15, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(w), (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [e.type === 0 ? (openBlock(), createBlock(group_default$1, {
601
+ key: 0,
602
+ id: e.id,
603
+ collapse: e.collapse,
604
+ count: e.count ?? 0,
605
+ title: e.name,
606
+ onXClick: T
607
+ }, null, 8, [
608
+ "id",
609
+ "collapse",
610
+ "count",
611
+ "title"
612
+ ])) : createCommentVNode("", !0), e.type === 1 && e.show ? (openBlock(), createBlock(item_default$2, {
613
+ key: 1,
614
+ id: e.id,
615
+ title: e.name,
616
+ onXClick: E
617
+ }, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$4, toDisplayString(unref(m)([
618
+ "x-prop-tree.no",
619
+ "x-prop-tree.adapt",
620
+ "x-prop-tree.slot"
621
+ ])), 1));
622
+ }
623
+ }), _hoisted_1$14 = { class: "text-subtitle-1" }, adaptSlotSelect_default = /* @__PURE__ */ defineComponent({
624
+ __name: "index",
625
+ props: {
626
+ modelValue: {},
627
+ modelModifiers: {}
628
+ },
629
+ emits: ["update:modelValue"],
630
+ setup(e) {
631
+ let { t: m } = useI18n(), g = useDisplay(), { sysBarAvail: _, nameList: y } = useSystem(), { backgroundColor1: C } = useColor(), D = useModel(e, "modelValue"), O = injectAdaptSlotList(), k = computed(() => {
632
+ let e = "100%";
633
+ return g.mdAndUp.value && (e = "400px"), {
634
+ background: C.value,
635
+ width: e,
636
+ height: "100%"
637
+ };
638
+ }), j = computed(() => {
639
+ let e = 48;
640
+ return _.value && (e += 24), {
641
+ position: "relative",
642
+ height: `calc(100% - ${e}px)`
643
+ };
644
+ }), P = computed(() => ({ height: "60px" })), F = computed(() => {
645
+ if (!D.value) return m("x-runtime-lib.notSet");
646
+ let e = getListEntry(O, D.value);
647
+ return e ? e.name : m("x-runtime-lib.slotNotAvail");
648
+ }), { open: L } = useViewStack(`propTreeAdaptSlotSelectDlg${useId()}`);
649
+ return onUnmounted(() => {
650
+ L.value = !1;
651
+ }), (e, m) => {
652
+ let g = resolveComponent("v-btn"), v = resolveComponent("v-sheet"), b = resolveComponent("v-dialog");
653
+ return openBlock(), createBlock(b, {
654
+ modelValue: unref(L),
655
+ "onUpdate:modelValue": m[5] ||= (e) => isRef(L) ? L.value = e : null,
656
+ fullscreen: "",
657
+ "no-click-animation": "",
658
+ persistent: "",
659
+ transition: "scroll-x-reverse-transition",
660
+ onKeydown: m[6] ||= withKeys(withModifiers((e) => L.value = !1, ["stop", "prevent"]), ["esc"])
661
+ }, {
662
+ activator: withCtx(({ props: e }) => [createVNode(g, mergeProps(e, {
663
+ block: "",
664
+ density: "comfortable"
665
+ }), {
666
+ default: withCtx(() => [createTextVNode(toDisplayString(F.value), 1)]),
667
+ _: 1
668
+ }, 16)]),
669
+ default: withCtx(() => [createElementVNode("div", {
670
+ class: "w-100 h-100 d-flex flex-row-reverse",
671
+ onClick: m[3] ||= withModifiers((e) => L.value = !1, ["self"]),
672
+ onContextmenu: m[4] ||= withModifiers((e) => L.value = !1, ["self", "prevent"])
673
+ }, [createElementVNode("div", {
674
+ class: "elevation-2",
675
+ style: normalizeStyle(k.value)
676
+ }, [
677
+ unref(_) ? (openBlock(), createBlock(v, {
678
+ key: 0,
679
+ color: "transparent",
680
+ height: 24
681
+ })) : createCommentVNode("", !0),
682
+ createVNode(v, {
683
+ class: "d-flex align-center px-3",
684
+ color: "transparent",
685
+ height: 48
686
+ }, {
687
+ default: withCtx(() => [createVNode(g, {
688
+ density: "comfortable",
689
+ icon: "mdi-close",
690
+ variant: "text",
691
+ onClick: m[0] ||= (e) => L.value = !1
692
+ }), createElementVNode("span", _hoisted_1$14, toDisplayString(unref(y)([
693
+ "x-prop-tree.select",
694
+ "x-prop-tree.adapt",
695
+ "x-prop-tree.slot"
696
+ ])), 1)]),
697
+ _: 1
698
+ }),
699
+ createElementVNode("div", {
700
+ class: "overflow-y-auto",
701
+ style: normalizeStyle(j.value)
702
+ }, [createVNode(adaptSlotList_default, {
703
+ modelValue: D.value,
704
+ "onUpdate:modelValue": m[1] ||= (e) => D.value = e,
705
+ open: unref(L),
706
+ "onUpdate:open": m[2] ||= (e) => isRef(L) ? L.value = e : null
707
+ }, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(P.value) }, null, 4)], 4)
708
+ ], 4)], 32)]),
709
+ _: 1
710
+ }, 8, ["modelValue"]);
711
+ };
712
+ }
713
+ }), _hoisted_1$13 = { class: "d-flex justify-space-between align-center" }, colorPicker_default = /* @__PURE__ */ defineComponent({
714
+ __name: "index",
715
+ props: /* @__PURE__ */ mergeModels({
716
+ hasDelete: {
717
+ type: Boolean,
718
+ default: !1
719
+ },
720
+ readonly: {
721
+ type: Boolean,
722
+ default: !1
723
+ }
724
+ }, {
725
+ modelValue: {},
726
+ modelModifiers: {}
727
+ }),
728
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
729
+ setup(e, { emit: m }) {
730
+ let { t: g } = useI18n(), _ = useModel(e, "modelValue"), v = m, y = computed(() => {
731
+ let m = "100%";
732
+ return e.hasDelete && (m = "calc(100% - 37px)"), { width: m };
733
+ }), C = computed(() => e.readonly), { open: D } = useViewStack(`propTreeColorPickerMenu${useId()}`);
734
+ return onUnmounted(() => {
735
+ D.value = !1;
736
+ }), (m, b) => {
737
+ let O = resolveComponent("v-btn"), k = resolveComponent("v-color-picker"), j = resolveComponent("v-menu");
738
+ return openBlock(), createBlock(j, {
739
+ modelValue: unref(D),
740
+ "onUpdate:modelValue": b[2] ||= (e) => isRef(D) ? D.value = e : null,
741
+ "close-on-content-click": !1,
742
+ scrim: "transparent"
743
+ }, {
744
+ activator: withCtx(({ props: m }) => [createElementVNode("div", _hoisted_1$13, [createElementVNode("div", {
745
+ class: "flex-grow-1",
746
+ style: normalizeStyle(y.value)
747
+ }, [createVNode(O, mergeProps(m, {
748
+ block: "",
749
+ color: _.value,
750
+ density: "comfortable",
751
+ disabled: C.value
752
+ }), {
753
+ default: withCtx(() => [createTextVNode(toDisplayString(_.value ? _.value : unref(g)("x-runtime-lib.notSet")), 1)]),
754
+ _: 1
755
+ }, 16, ["color", "disabled"])], 4), e.hasDelete ? (openBlock(), createBlock(O, {
756
+ key: 0,
757
+ class: "mx-2",
758
+ density: "compact",
759
+ icon: "mdi-minus",
760
+ variant: "text",
761
+ onClick: b[0] ||= withModifiers((e) => v("delete"), ["stop"])
762
+ })) : createCommentVNode("", !0)])]),
763
+ default: withCtx(() => [createVNode(k, {
764
+ modelValue: _.value,
765
+ "onUpdate:modelValue": b[1] ||= (e) => _.value = e,
766
+ mode: "hexa",
767
+ "show-swatches": "",
768
+ "swatches-max-height": "150px"
769
+ }, null, 8, ["modelValue"])]),
770
+ _: 1
771
+ }, 8, ["modelValue"]);
772
+ };
773
+ }
774
+ }), _hoisted_1$12 = { class: "text-subtitle-2 ml-1" }, _hoisted_2$3 = { class: "text-caption text-grey ml-1" }, group_default = /* @__PURE__ */ defineComponent({
775
+ __name: "group",
776
+ props: {
777
+ id: {},
778
+ title: {},
779
+ collapse: { type: Boolean },
780
+ count: {}
781
+ },
782
+ emits: ["x-click"],
783
+ setup(e, { emit: m }) {
784
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = e, y = m, x = ref(!1), S = computed(() => ({
785
+ background: x.value ? _.value : g.value,
786
+ height: "30px",
787
+ marginBottom: "1px",
788
+ userSelect: "none"
789
+ }));
790
+ return (e, m) => {
791
+ let g = resolveComponent("v-icon"), _ = resolveDirective("ripple");
792
+ return withDirectives((openBlock(), createElementBlock("div", {
793
+ class: "d-flex align-center cursor-pointer",
794
+ style: normalizeStyle(S.value),
795
+ onClick: m[0] ||= (e) => y("x-click", v.id),
796
+ onMouseout: m[1] ||= (e) => x.value = !1,
797
+ onMouseover: m[2] ||= (e) => x.value = !0
798
+ }, [
799
+ createVNode(g, {
800
+ icon: v.collapse ? "mdi-chevron-right" : "mdi-chevron-down",
801
+ size: "small"
802
+ }, null, 8, ["icon"]),
803
+ createElementVNode("span", _hoisted_1$12, toDisplayString(v.title), 1),
804
+ createElementVNode("span", _hoisted_2$3, toDisplayString(v.count), 1)
805
+ ], 36)), [[_]]);
806
+ };
807
+ }
808
+ }), _hoisted_1$11 = { class: "text-subtitle-1 ml-6" }, item_default$1 = /* @__PURE__ */ defineComponent({
809
+ __name: "item",
810
+ props: {
811
+ id: {},
812
+ title: {}
813
+ },
814
+ emits: ["x-click"],
815
+ setup(e, { emit: m }) {
816
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = e, y = m, x = ref(!1), S = computed(() => ({
817
+ background: x.value ? _.value : g.value,
818
+ height: "48px",
819
+ marginBottom: "1px",
820
+ userSelect: "none"
821
+ }));
822
+ return (e, m) => {
823
+ let g = resolveDirective("ripple");
824
+ return withDirectives((openBlock(), createElementBlock("div", {
825
+ class: "d-flex align-center cursor-pointer",
826
+ style: normalizeStyle(S.value),
827
+ onClick: m[0] ||= (e) => y("x-click", v.id),
828
+ onMouseout: m[1] ||= (e) => x.value = !1,
829
+ onMouseover: m[2] ||= (e) => x.value = !0
830
+ }, [createElementVNode("span", _hoisted_1$11, toDisplayString(v.title), 1)], 36)), [[g]]);
831
+ };
832
+ }
833
+ }), _hoisted_1$10 = { key: 0 }, _hoisted_2$2 = {
834
+ key: 1,
835
+ class: "text-body-2 text-grey ml-3"
836
+ }, compList_default = /* @__PURE__ */ defineComponent({
837
+ __name: "index",
838
+ props: {
839
+ modelValue: {},
840
+ modelModifiers: {},
841
+ open: {
842
+ type: Boolean,
843
+ required: !0
844
+ },
845
+ openModifiers: {}
846
+ },
847
+ emits: ["update:modelValue", "update:open"],
848
+ setup(e) {
849
+ let { nameList: m } = useSystem(), _ = useModel(e, "modelValue"), b = useModel(e, "open"), w = injectCompList(), T = (e) => {
850
+ let m = getListEntry(w, e);
851
+ m && setCollapse(w, e, !m.collapse);
852
+ }, E = (e) => {
853
+ _.value = e, b.value = !1, eventBus.emit("refreshDepends");
854
+ };
855
+ return (e, g) => unref(w).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$10, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(w), (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [e.type === 0 ? (openBlock(), createBlock(group_default, {
856
+ key: 0,
857
+ id: e.id,
858
+ collapse: e.collapse,
859
+ count: e.count ?? 0,
860
+ title: e.name,
861
+ onXClick: T
862
+ }, null, 8, [
863
+ "id",
864
+ "collapse",
865
+ "count",
866
+ "title"
867
+ ])) : createCommentVNode("", !0), e.type === 1 && e.show ? (openBlock(), createBlock(item_default$1, {
868
+ key: 1,
869
+ id: e.id,
870
+ title: e.name,
871
+ onXClick: E
872
+ }, null, 8, ["id", "title"])) : createCommentVNode("", !0)], 64))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(unref(m)(["x-prop-tree.no", "x-prop-tree.comp"])), 1));
873
+ }
874
+ }), _hoisted_1$9 = { class: "text-subtitle-1" }, compSelect_default = /* @__PURE__ */ defineComponent({
875
+ __name: "index",
876
+ props: {
877
+ modelValue: {},
878
+ modelModifiers: {}
879
+ },
880
+ emits: ["update:modelValue"],
881
+ setup(e) {
882
+ let { t: m } = useI18n(), g = useDisplay(), { sysBarAvail: _, nameList: y } = useSystem(), { backgroundColor1: C } = useColor(), D = useModel(e, "modelValue"), O = injectCompList(), k = computed(() => {
883
+ let e = "100%";
884
+ return g.mdAndUp.value && (e = "400px"), {
885
+ background: C.value,
886
+ width: e,
887
+ height: "100%"
888
+ };
889
+ }), j = computed(() => {
890
+ let e = 48;
891
+ return _.value && (e += 24), {
892
+ position: "relative",
893
+ height: `calc(100% - ${e}px)`
894
+ };
895
+ }), P = computed(() => ({ height: "60px" })), F = computed(() => {
896
+ if (!D.value) return m("x-runtime-lib.notSet");
897
+ let e = getListEntry(O, D.value);
898
+ return e ? e.name : m("x-runtime-lib.compNotAvail");
899
+ }), { open: L } = useViewStack(`propTreeCompSelectDlg${useId()}`);
900
+ return onUnmounted(() => {
901
+ L.value = !1;
902
+ }), (e, m) => {
903
+ let g = resolveComponent("v-btn"), v = resolveComponent("v-sheet"), b = resolveComponent("v-dialog");
904
+ return openBlock(), createBlock(b, {
905
+ modelValue: unref(L),
906
+ "onUpdate:modelValue": m[5] ||= (e) => isRef(L) ? L.value = e : null,
907
+ fullscreen: "",
908
+ "no-click-animation": "",
909
+ persistent: "",
910
+ transition: "scroll-x-reverse-transition",
911
+ onKeydown: m[6] ||= withKeys(withModifiers((e) => L.value = !1, ["stop", "prevent"]), ["esc"])
912
+ }, {
913
+ activator: withCtx(({ props: e }) => [createVNode(g, mergeProps(e, {
914
+ block: "",
915
+ density: "comfortable"
916
+ }), {
917
+ default: withCtx(() => [createTextVNode(toDisplayString(F.value), 1)]),
918
+ _: 1
919
+ }, 16)]),
920
+ default: withCtx(() => [createElementVNode("div", {
921
+ class: "w-100 h-100 d-flex flex-row-reverse",
922
+ onClick: m[3] ||= withModifiers((e) => L.value = !1, ["self"]),
923
+ onContextmenu: m[4] ||= withModifiers((e) => L.value = !1, ["self", "prevent"])
924
+ }, [createElementVNode("div", {
925
+ class: "elevation-2",
926
+ style: normalizeStyle(k.value)
927
+ }, [
928
+ unref(_) ? (openBlock(), createBlock(v, {
929
+ key: 0,
930
+ color: "transparent",
931
+ height: 24
932
+ })) : createCommentVNode("", !0),
933
+ createVNode(v, {
934
+ class: "d-flex align-center px-3",
935
+ color: "transparent",
936
+ height: 48
937
+ }, {
938
+ default: withCtx(() => [createVNode(g, {
939
+ density: "comfortable",
940
+ icon: "mdi-close",
941
+ variant: "text",
942
+ onClick: m[0] ||= (e) => L.value = !1
943
+ }), createElementVNode("span", _hoisted_1$9, toDisplayString(unref(y)(["x-prop-tree.select", "x-prop-tree.comp"])), 1)]),
944
+ _: 1
945
+ }),
946
+ createElementVNode("div", {
947
+ class: "overflow-y-auto",
948
+ style: normalizeStyle(j.value)
949
+ }, [createVNode(compList_default, {
950
+ modelValue: D.value,
951
+ "onUpdate:modelValue": m[1] ||= (e) => D.value = e,
952
+ open: unref(L),
953
+ "onUpdate:open": m[2] ||= (e) => isRef(L) ? L.value = e : null
954
+ }, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(P.value) }, null, 4)], 4)
955
+ ], 4)], 32)]),
956
+ _: 1
957
+ }, 8, ["modelValue"]);
958
+ };
959
+ }
960
+ }), editor_default = /* @__PURE__ */ defineComponent({
961
+ __name: "editor",
962
+ props: {
963
+ modelValue: { required: !0 },
964
+ modelModifiers: {},
965
+ lock: {
966
+ type: Boolean,
967
+ required: !0
968
+ },
969
+ lockModifiers: {},
970
+ scale: { required: !0 },
971
+ scaleModifiers: {}
972
+ },
973
+ emits: [
974
+ "update:modelValue",
975
+ "update:lock",
976
+ "update:scale"
977
+ ],
978
+ setup(e, { expose: m }) {
979
+ let g = useModel(e, "modelValue"), _ = useModel(e, "lock"), v = useModel(e, "scale"), y = injectDark(), b = injectLocale(), S = injectVersion(), C = useTemplateRef("target"), w = () => {
980
+ let e = JSON.parse(g.value);
981
+ C.value?.load(e);
982
+ };
983
+ return m({ save: () => {
984
+ let e = C.value.save();
985
+ g.value = JSON.stringify(e, null, 2);
986
+ } }), (e, m) => (openBlock(), createBlock(unref(XBlockly), {
987
+ ref_key: "target",
988
+ ref: C,
989
+ lock: _.value,
990
+ "onUpdate:lock": m[0] ||= (e) => _.value = e,
991
+ scale: v.value,
992
+ "onUpdate:scale": m[1] ||= (e) => v.value = e,
993
+ dark: unref(y),
994
+ locale: unref(b),
995
+ type: "json",
996
+ version: unref(S),
997
+ onReady: w
998
+ }, null, 8, [
999
+ "lock",
1000
+ "scale",
1001
+ "dark",
1002
+ "locale",
1003
+ "version"
1004
+ ]));
1005
+ }
1006
+ }), _hoisted_1$8 = { class: "text-subtitle-1" }, jsonEditor_default = /* @__PURE__ */ defineComponent({
1007
+ __name: "index",
1008
+ props: {
1009
+ modelValue: { required: !0 },
1010
+ modelModifiers: {}
1011
+ },
1012
+ emits: ["update:modelValue"],
1013
+ setup(e) {
1014
+ let { t: m } = useI18n(), { sysBarAvail: g } = useSystem(), { backgroundColor0: _, backgroundColor1: v, backgroundColor2: y } = useColor(), C = useModel(e, "modelValue"), D = ref(!1), O = ref(1), k = computed(() => {
1015
+ let e = 48;
1016
+ return g.value && (e += 24), {
1017
+ position: "relative",
1018
+ background: v.value,
1019
+ height: `calc(100% - ${e}px)`
1020
+ };
1021
+ }), j = computed(() => m("x-prop-tree.jsonEditor")), { open: P } = useViewStack(`propTreejsonEditorDlg${useId()}`);
1022
+ onUnmounted(() => {
1023
+ P.value = !1;
1024
+ });
1025
+ let F = useTemplateRef("editor");
1026
+ return watch(P, (e) => {
1027
+ e || F.value?.save();
1028
+ }), (e, m) => {
1029
+ let v = resolveComponent("v-btn"), b = resolveComponent("v-sheet"), I = resolveComponent("v-spacer"), L = resolveComponent("v-dialog");
1030
+ return openBlock(), createBlock(L, {
1031
+ modelValue: unref(P),
1032
+ "onUpdate:modelValue": m[4] ||= (e) => isRef(P) ? P.value = e : null,
1033
+ attach: "",
1034
+ fullscreen: "",
1035
+ "no-click-animation": "",
1036
+ persistent: "",
1037
+ transition: "dialog-bottom-transition",
1038
+ onKeydown: m[5] ||= withKeys(withModifiers((e) => P.value = !1, ["stop", "prevent"]), ["esc"])
1039
+ }, {
1040
+ activator: withCtx(({ props: e }) => [createVNode(v, mergeProps(e, {
1041
+ block: "",
1042
+ density: "comfortable"
1043
+ }), {
1044
+ default: withCtx(() => [createTextVNode(toDisplayString(j.value), 1)]),
1045
+ _: 1
1046
+ }, 16)]),
1047
+ default: withCtx(() => [createVNode(b, {
1048
+ color: unref(_),
1049
+ height: "100%",
1050
+ width: "100%"
1051
+ }, {
1052
+ default: withCtx(() => [
1053
+ unref(g) ? (openBlock(), createBlock(b, {
1054
+ key: 0,
1055
+ color: unref(y),
1056
+ height: 24
1057
+ }, null, 8, ["color"])) : createCommentVNode("", !0),
1058
+ createVNode(b, {
1059
+ class: "d-flex align-center px-2",
1060
+ color: unref(y),
1061
+ height: 48
1062
+ }, {
1063
+ default: withCtx(() => [
1064
+ createVNode(v, {
1065
+ density: "comfortable",
1066
+ icon: "mdi-close",
1067
+ variant: "text",
1068
+ onClick: m[0] ||= (e) => P.value = !1
1069
+ }),
1070
+ createElementVNode("span", _hoisted_1$8, toDisplayString(j.value), 1),
1071
+ createVNode(I)
1072
+ ]),
1073
+ _: 1
1074
+ }, 8, ["color"]),
1075
+ createElementVNode("div", { style: normalizeStyle(k.value) }, [createVNode(editor_default, {
1076
+ ref_key: "editor",
1077
+ ref: F,
1078
+ modelValue: C.value,
1079
+ "onUpdate:modelValue": m[1] ||= (e) => C.value = e,
1080
+ lock: D.value,
1081
+ "onUpdate:lock": m[2] ||= (e) => D.value = e,
1082
+ scale: O.value,
1083
+ "onUpdate:scale": m[3] ||= (e) => O.value = e
1084
+ }, null, 8, [
1085
+ "modelValue",
1086
+ "lock",
1087
+ "scale"
1088
+ ])], 4)
1089
+ ]),
1090
+ _: 1
1091
+ }, 8, ["color"])]),
1092
+ _: 1
1093
+ }, 8, ["modelValue"]);
1094
+ };
1095
+ }
1096
+ }), _hoisted_1$7 = { class: "d-flex justify-space-between align-center my-2" }, _hoisted_2$1 = { class: "flex-grow-1" }, multiTypes_default = /* @__PURE__ */ defineComponent({
1097
+ __name: "index",
1098
+ props: /* @__PURE__ */ mergeModels({
1099
+ hasDelete: {
1100
+ type: Boolean,
1101
+ default: !1
1102
+ },
1103
+ types: {}
1104
+ }, {
1105
+ modelValue: {},
1106
+ modelModifiers: {}
1107
+ }),
1108
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
1109
+ setup(e, { emit: m }) {
1110
+ let { t: g } = useI18n(), { isMobile: _ } = useSystem(), v = useModel(e, "modelValue"), y = m, T = injectVersion(), D = computed(() => pkgs[T.value].types[e.types]), O = ref(0), k = computed(() => {
1111
+ let e = [];
1112
+ return D.value?.forEach(({ title: m }, _) => {
1113
+ e.push({
1114
+ title: g(m),
1115
+ value: _
1116
+ });
1117
+ }), e;
1118
+ });
1119
+ watchEffect(() => {
1120
+ D.value?.some((e, m) => e.validator(v.value) ? (O.value = m, !0) : !1);
1121
+ });
1122
+ let A = computed(() => D.value?.[O.value]), j = () => {
1123
+ v.value = A.value?.default;
1124
+ }, M = ref(0), N = async (e) => {
1125
+ if (!e || !_() || A.value.ui !== "pixelInput" && A.value.ui !== "percentInput") return;
1126
+ let m = await openNumberDlg({
1127
+ title: "",
1128
+ value: M.value,
1129
+ precision: A.value.precision,
1130
+ min: A.value.min,
1131
+ max: A.value.max,
1132
+ step: A.value.step
1133
+ });
1134
+ m !== void 0 && (M.value = m);
1135
+ };
1136
+ return watchEffect(() => {
1137
+ A.value?.ui === "pixelInput" ? M.value = parsePixelStr(v.value) : A.value?.ui === "percentInput" && (M.value = parsePercentStr(v.value));
1138
+ }), watch(M, (e) => {
1139
+ A.value?.ui === "pixelInput" ? v.value = e + "px" : A.value?.ui === "percentInput" && (v.value = e + "%");
1140
+ }), (m, g) => {
1141
+ let _ = resolveComponent("v-select"), v = resolveComponent("v-number-input"), b = resolveComponent("v-btn"), T = resolveDirective("ripple");
1142
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", _hoisted_2$1, [withDirectives(createVNode(_, {
1143
+ modelValue: O.value,
1144
+ "onUpdate:modelValue": [g[0] ||= (e) => O.value = e, j],
1145
+ density: "compact",
1146
+ "hide-details": "",
1147
+ items: k.value,
1148
+ "single-line": ""
1149
+ }, null, 8, ["modelValue", "items"]), [[
1150
+ T,
1151
+ void 0,
1152
+ void 0,
1153
+ { stop: !0 }
1154
+ ]]), A.value?.ui === "pixelInput" || A.value?.ui === "percentInput" ? withDirectives((openBlock(), createBlock(v, {
1155
+ key: 0,
1156
+ modelValue: M.value,
1157
+ "onUpdate:modelValue": g[1] ||= (e) => M.value = e,
1158
+ "control-variant": "stacked",
1159
+ density: "compact",
1160
+ "hide-details": "",
1161
+ max: A.value.max,
1162
+ min: A.value.min,
1163
+ precision: A.value.precision,
1164
+ "single-line": "",
1165
+ step: A.value.step,
1166
+ "onUpdate:focused": N
1167
+ }, null, 8, [
1168
+ "modelValue",
1169
+ "max",
1170
+ "min",
1171
+ "precision",
1172
+ "step"
1173
+ ])), [[
1174
+ T,
1175
+ void 0,
1176
+ void 0,
1177
+ { stop: !0 }
1178
+ ]]) : createCommentVNode("", !0)]), e.hasDelete ? (openBlock(), createBlock(b, {
1179
+ key: 0,
1180
+ class: "mx-2",
1181
+ density: "compact",
1182
+ icon: "mdi-minus",
1183
+ variant: "text",
1184
+ onClick: g[2] ||= withModifiers((e) => y("delete"), ["stop"])
1185
+ })) : createCommentVNode("", !0)]);
1186
+ };
1187
+ }
1188
+ }), _hoisted_1$6 = { class: "d-flex justify-space-between align-center" }, numInput_default = /* @__PURE__ */ defineComponent({
1189
+ __name: "index",
1190
+ props: /* @__PURE__ */ mergeModels({
1191
+ hasDelete: {
1192
+ type: Boolean,
1193
+ default: !1
1194
+ },
1195
+ precision: { default: () => void 0 },
1196
+ min: { default: () => -Infinity },
1197
+ max: { default: () => Infinity },
1198
+ step: { default: 1 },
1199
+ readonly: {
1200
+ type: Boolean,
1201
+ default: !1
1202
+ }
1203
+ }, {
1204
+ modelValue: { required: !0 },
1205
+ modelModifiers: {}
1206
+ }),
1207
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
1208
+ setup(e, { emit: m }) {
1209
+ let { isMobile: g } = useSystem(), _ = useModel(e, "modelValue"), v = m, y = async (m) => {
1210
+ if (!m || e.readonly || !g()) return;
1211
+ let v = await openNumberDlg({
1212
+ title: "",
1213
+ value: _.value,
1214
+ precision: e.precision,
1215
+ min: e.min,
1216
+ max: e.max,
1217
+ step: e.step
1218
+ });
1219
+ v !== void 0 && (_.value = v);
1220
+ };
1221
+ return (m, g) => {
1222
+ let b = resolveComponent("v-number-input"), w = resolveComponent("v-btn"), T = resolveDirective("ripple");
1223
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [withDirectives(createVNode(b, {
1224
+ modelValue: _.value,
1225
+ "onUpdate:modelValue": g[0] ||= (e) => _.value = e,
1226
+ "control-variant": "stacked",
1227
+ density: "compact",
1228
+ "hide-details": "",
1229
+ max: e.max,
1230
+ min: e.min,
1231
+ precision: e.precision,
1232
+ readonly: e.readonly,
1233
+ "single-line": "",
1234
+ step: e.step,
1235
+ "onUpdate:focused": y
1236
+ }, null, 8, [
1237
+ "modelValue",
1238
+ "max",
1239
+ "min",
1240
+ "precision",
1241
+ "readonly",
1242
+ "step"
1243
+ ]), [[
1244
+ T,
1245
+ void 0,
1246
+ void 0,
1247
+ { stop: !0 }
1248
+ ]]), e.hasDelete ? (openBlock(), createBlock(w, {
1249
+ key: 0,
1250
+ class: "mx-2",
1251
+ density: "compact",
1252
+ icon: "mdi-minus",
1253
+ variant: "text",
1254
+ onClick: g[1] ||= withModifiers((e) => v("delete"), ["stop"])
1255
+ })) : createCommentVNode("", !0)]);
1256
+ };
1257
+ }
1258
+ }), _hoisted_1$5 = { class: "d-flex justify-space-between align-center" }, select_default = /* @__PURE__ */ defineComponent({
1259
+ __name: "index",
1260
+ props: /* @__PURE__ */ mergeModels({
1261
+ hasDelete: {
1262
+ type: Boolean,
1263
+ default: !1
1264
+ },
1265
+ readonly: {
1266
+ type: Boolean,
1267
+ default: !1
1268
+ },
1269
+ items: {}
1270
+ }, {
1271
+ modelValue: {},
1272
+ modelModifiers: {}
1273
+ }),
1274
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
1275
+ setup(e, { emit: m }) {
1276
+ let { t: g } = useI18n(), _ = useModel(e, "modelValue"), v = m, y = injectVersion(), w = computed(() => {
1277
+ let m = [];
1278
+ return pkgs[y.value].items[e.items].forEach(({ title: e, value: _ }) => {
1279
+ m.push({
1280
+ title: g(e),
1281
+ value: _
1282
+ });
1283
+ }), m;
1284
+ });
1285
+ return (m, g) => {
1286
+ let y = resolveComponent("v-select"), b = resolveComponent("v-btn"), T = resolveDirective("ripple");
1287
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [withDirectives(createVNode(y, {
1288
+ modelValue: _.value,
1289
+ "onUpdate:modelValue": g[0] ||= (e) => _.value = e,
1290
+ density: "compact",
1291
+ "hide-details": "",
1292
+ items: w.value,
1293
+ readonly: e.readonly,
1294
+ "single-line": ""
1295
+ }, null, 8, [
1296
+ "modelValue",
1297
+ "items",
1298
+ "readonly"
1299
+ ]), [[
1300
+ T,
1301
+ void 0,
1302
+ void 0,
1303
+ { stop: !0 }
1304
+ ]]), e.hasDelete ? (openBlock(), createBlock(b, {
1305
+ key: 0,
1306
+ class: "mx-2",
1307
+ density: "compact",
1308
+ icon: "mdi-minus",
1309
+ variant: "text",
1310
+ onClick: g[1] ||= withModifiers((e) => v("delete"), ["stop"])
1311
+ })) : createCommentVNode("", !0)]);
1312
+ };
1313
+ }
1314
+ }), _hoisted_1$4 = { class: "text-subtitle-1 ml-6" }, item_default = /* @__PURE__ */ defineComponent({
1315
+ __name: "item",
1316
+ props: {
1317
+ id: {},
1318
+ title: {}
1319
+ },
1320
+ emits: ["x-click"],
1321
+ setup(e, { emit: m }) {
1322
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = m, y = ref(!1), x = computed(() => ({
1323
+ background: y.value ? _.value : g.value,
1324
+ height: "48px",
1325
+ marginBottom: "1px",
1326
+ userSelect: "none"
1327
+ }));
1328
+ return (m, g) => {
1329
+ let _ = resolveDirective("ripple");
1330
+ return withDirectives((openBlock(), createElementBlock("div", {
1331
+ class: "d-flex align-center cursor-pointer",
1332
+ style: normalizeStyle(x.value),
1333
+ onClick: g[0] ||= (m) => v("x-click", e.id),
1334
+ onMouseout: g[1] ||= (e) => y.value = !1,
1335
+ onMouseover: g[2] ||= (e) => y.value = !0
1336
+ }, [createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)], 36)), [[_]]);
1337
+ };
1338
+ }
1339
+ }), _hoisted_1$3 = { key: 0 }, _hoisted_2 = {
1340
+ key: 1,
1341
+ class: "text-body-2 text-grey ml-3"
1342
+ }, slotList_default = /* @__PURE__ */ defineComponent({
1343
+ __name: "index",
1344
+ props: {
1345
+ modelValue: {},
1346
+ modelModifiers: {},
1347
+ open: {
1348
+ type: Boolean,
1349
+ required: !0
1350
+ },
1351
+ openModifiers: {}
1352
+ },
1353
+ emits: ["update:modelValue", "update:open"],
1354
+ setup(e) {
1355
+ let { nameList: m } = useSystem(), g = useModel(e, "modelValue"), _ = useModel(e, "open"), v = injectSlotList(), b = (e) => {
1356
+ g.value = e, _.value = !1;
1357
+ };
1358
+ return (e, g) => unref(v).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$3, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(v), (e) => (openBlock(), createBlock(item_default, {
1359
+ key: e.id,
1360
+ id: e.id,
1361
+ title: e.name,
1362
+ onXClick: b
1363
+ }, null, 8, ["id", "title"]))), 128))])) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(m)(["x-prop-tree.no", "x-prop-tree.slot"])), 1));
1364
+ }
1365
+ }), _hoisted_1$2 = { class: "text-subtitle-1" }, slotSelect_default = /* @__PURE__ */ defineComponent({
1366
+ __name: "index",
1367
+ props: {
1368
+ modelValue: {},
1369
+ modelModifiers: {}
1370
+ },
1371
+ emits: ["update:modelValue"],
1372
+ setup(e) {
1373
+ let { t: m } = useI18n(), g = useDisplay(), { sysBarAvail: _, nameList: v } = useSystem(), { backgroundColor1: y } = useColor(), C = useModel(e, "modelValue"), D = injectSlotList(), O = computed(() => {
1374
+ let e = "100%";
1375
+ return g.mdAndUp.value && (e = "400px"), {
1376
+ background: y.value,
1377
+ width: e,
1378
+ height: "100%"
1379
+ };
1380
+ }), k = computed(() => {
1381
+ let e = 48;
1382
+ return _.value && (e += 24), {
1383
+ position: "relative",
1384
+ height: `calc(100% - ${e}px)`
1385
+ };
1386
+ }), j = computed(() => ({ height: "60px" })), P = computed(() => {
1387
+ if (!C.value) return m("x-runtime-lib.notSet");
1388
+ let e = D.value.find((e) => e.id === C.value);
1389
+ return e ? e.name : m("x-runtime-lib.slotNotAvail");
1390
+ }), { open: F } = useViewStack(`propTreeSlotSelectDlg${useId()}`);
1391
+ return onUnmounted(() => {
1392
+ F.value = !1;
1393
+ }), (e, m) => {
1394
+ let g = resolveComponent("v-btn"), y = resolveComponent("v-sheet"), b = resolveComponent("v-dialog");
1395
+ return openBlock(), createBlock(b, {
1396
+ modelValue: unref(F),
1397
+ "onUpdate:modelValue": m[5] ||= (e) => isRef(F) ? F.value = e : null,
1398
+ fullscreen: "",
1399
+ "no-click-animation": "",
1400
+ persistent: "",
1401
+ transition: "scroll-x-reverse-transition",
1402
+ onKeydown: m[6] ||= withKeys(withModifiers((e) => F.value = !1, ["stop", "prevent"]), ["esc"])
1403
+ }, {
1404
+ activator: withCtx(({ props: e }) => [createVNode(g, mergeProps(e, {
1405
+ block: "",
1406
+ density: "comfortable"
1407
+ }), {
1408
+ default: withCtx(() => [createTextVNode(toDisplayString(P.value), 1)]),
1409
+ _: 1
1410
+ }, 16)]),
1411
+ default: withCtx(() => [createElementVNode("div", {
1412
+ class: "w-100 h-100 d-flex flex-row-reverse",
1413
+ onClick: m[3] ||= withModifiers((e) => F.value = !1, ["self"]),
1414
+ onContextmenu: m[4] ||= withModifiers((e) => F.value = !1, ["self", "prevent"])
1415
+ }, [createElementVNode("div", {
1416
+ class: "elevation-2",
1417
+ style: normalizeStyle(O.value)
1418
+ }, [
1419
+ unref(_) ? (openBlock(), createBlock(y, {
1420
+ key: 0,
1421
+ color: "transparent",
1422
+ height: 24
1423
+ })) : createCommentVNode("", !0),
1424
+ createVNode(y, {
1425
+ class: "d-flex align-center px-3",
1426
+ color: "transparent",
1427
+ height: 48
1428
+ }, {
1429
+ default: withCtx(() => [createVNode(g, {
1430
+ density: "comfortable",
1431
+ icon: "mdi-close",
1432
+ variant: "text",
1433
+ onClick: m[0] ||= (e) => F.value = !1
1434
+ }), createElementVNode("span", _hoisted_1$2, toDisplayString(unref(v)(["x-prop-tree.select", "x-prop-tree.slot"])), 1)]),
1435
+ _: 1
1436
+ }),
1437
+ createElementVNode("div", {
1438
+ class: "overflow-y-auto",
1439
+ style: normalizeStyle(k.value)
1440
+ }, [createVNode(slotList_default, {
1441
+ modelValue: C.value,
1442
+ "onUpdate:modelValue": m[1] ||= (e) => C.value = e,
1443
+ open: unref(F),
1444
+ "onUpdate:open": m[2] ||= (e) => isRef(F) ? F.value = e : null
1445
+ }, null, 8, ["modelValue", "open"]), createElementVNode("div", { style: normalizeStyle(j.value) }, null, 4)], 4)
1446
+ ], 4)], 32)]),
1447
+ _: 1
1448
+ }, 8, ["modelValue"]);
1449
+ };
1450
+ }
1451
+ }), _hoisted_1$1 = { class: "d-flex justify-space-between align-center" }, strInput_default = /* @__PURE__ */ defineComponent({
1452
+ __name: "index",
1453
+ props: /* @__PURE__ */ mergeModels({
1454
+ hasDelete: {
1455
+ type: Boolean,
1456
+ default: !1
1457
+ },
1458
+ readonly: {
1459
+ type: Boolean,
1460
+ default: !1
1461
+ }
1462
+ }, {
1463
+ modelValue: { required: !0 },
1464
+ modelModifiers: {}
1465
+ }),
1466
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
1467
+ setup(e, { emit: m }) {
1468
+ let { isMobile: g } = useSystem(), _ = useModel(e, "modelValue"), v = m, y = async (m) => {
1469
+ if (!m || e.readonly || !g()) return;
1470
+ let v = await openPromptDlg({
1471
+ title: "",
1472
+ value: _.value
1473
+ });
1474
+ v !== void 0 && (_.value = v);
1475
+ };
1476
+ return (m, g) => {
1477
+ let b = resolveComponent("v-text-field"), w = resolveComponent("v-btn"), T = resolveDirective("ripple");
1478
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [withDirectives(createVNode(b, {
1479
+ modelValue: _.value,
1480
+ "onUpdate:modelValue": g[0] ||= (e) => _.value = e,
1481
+ density: "compact",
1482
+ "hide-details": "",
1483
+ readonly: e.readonly,
1484
+ "single-line": "",
1485
+ "onUpdate:focused": y
1486
+ }, null, 8, ["modelValue", "readonly"]), [[
1487
+ T,
1488
+ void 0,
1489
+ void 0,
1490
+ { stop: !0 }
1491
+ ]]), e.hasDelete ? (openBlock(), createBlock(w, {
1492
+ key: 0,
1493
+ class: "mx-2",
1494
+ density: "compact",
1495
+ icon: "mdi-minus",
1496
+ variant: "text",
1497
+ onClick: g[1] ||= withModifiers((e) => v("delete"), ["stop"])
1498
+ })) : createCommentVNode("", !0)]);
1499
+ };
1500
+ }
1501
+ }), _hoisted_1 = { class: "d-flex justify-space-between align-center" }, switch_default = /* @__PURE__ */ defineComponent({
1502
+ __name: "index",
1503
+ props: /* @__PURE__ */ mergeModels({
1504
+ hasDelete: {
1505
+ type: Boolean,
1506
+ default: !1
1507
+ },
1508
+ readonly: {
1509
+ type: Boolean,
1510
+ default: !1
1511
+ }
1512
+ }, {
1513
+ modelValue: { type: Boolean },
1514
+ modelModifiers: {}
1515
+ }),
1516
+ emits: /* @__PURE__ */ mergeModels(["delete"], ["update:modelValue"]),
1517
+ setup(e, { emit: m }) {
1518
+ let g = useModel(e, "modelValue"), _ = m;
1519
+ return (m, v) => {
1520
+ let y = resolveComponent("v-switch"), b = resolveComponent("v-btn");
1521
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(y, {
1522
+ modelValue: g.value,
1523
+ "onUpdate:modelValue": v[0] ||= (e) => g.value = e,
1524
+ class: "ml-1",
1525
+ color: "primary",
1526
+ density: "compact",
1527
+ "hide-details": "",
1528
+ readonly: e.readonly
1529
+ }, null, 8, ["modelValue", "readonly"]), e.hasDelete ? (openBlock(), createBlock(b, {
1530
+ key: 0,
1531
+ class: "mx-2",
1532
+ density: "compact",
1533
+ icon: "mdi-minus",
1534
+ variant: "text",
1535
+ onClick: v[1] ||= withModifiers((e) => _("delete"), ["stop"])
1536
+ })) : createCommentVNode("", !0)]);
1537
+ };
1538
+ }
1684
1539
  });
1685
- function Gn(t) {
1686
- return { renderUiAdaptSlotSelect: (l, e, n, o, i) => e.ui !== "selectAdaptSlot" ? (console.assert(!1), S("div", "renderUiSlotSelect property ui must be selectAdaptSlot")) : S(fn, {
1687
- modelValue: te(
1688
- l,
1689
- e,
1690
- n,
1691
- t,
1692
- o,
1693
- i
1694
- ),
1695
- "onUpdate:modelValue": (r) => {
1696
- oe(
1697
- l,
1698
- e,
1699
- n,
1700
- r,
1701
- t,
1702
- o,
1703
- i
1704
- );
1705
- }
1706
- }) };
1540
+ function useUiAdaptSlotSelect(e) {
1541
+ return { renderUiAdaptSlotSelect: (m, g, _, v, y) => g.ui === "selectAdaptSlot" ? h(adaptSlotSelect_default, {
1542
+ modelValue: (() => getModelValue(m, g, _, e, v, y))(),
1543
+ "onUpdate:modelValue": (b) => {
1544
+ setModelValue(m, g, _, b, e, v, y);
1545
+ }
1546
+ }) : (console.assert(!1), h("div", "renderUiSlotSelect property ui must be selectAdaptSlot")) };
1707
1547
  }
1708
- function Yn(t) {
1709
- return { renderUiColorPicker: (l, e, n, o, i) => e.ui !== "colorPicker" ? (console.assert(!1), S("div", "renderUiColorPicker property ui must be colorPicker")) : S(pn, {
1710
- modelValue: te(
1711
- l,
1712
- e,
1713
- n,
1714
- t,
1715
- o,
1716
- i
1717
- ),
1718
- "onUpdate:modelValue": (r) => {
1719
- oe(
1720
- l,
1721
- e,
1722
- n,
1723
- r,
1724
- t,
1725
- o,
1726
- i
1727
- );
1728
- },
1729
- hasDelete: o !== void 0 && !i,
1730
- onDelete: () => {
1731
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, -1), n));
1732
- },
1733
- readonly: e.readonly
1734
- }) };
1548
+ function useUiColorPicker(e) {
1549
+ return { renderUiColorPicker: (m, g, _, v, y) => g.ui === "colorPicker" ? h(colorPicker_default, {
1550
+ modelValue: (() => getModelValue(m, g, _, e, v, y))(),
1551
+ "onUpdate:modelValue": (b) => {
1552
+ setModelValue(m, g, _, b, e, v, y);
1553
+ },
1554
+ hasDelete: v !== void 0 && !y,
1555
+ onDelete: () => {
1556
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
1557
+ },
1558
+ readonly: g.readonly
1559
+ }) : (console.assert(!1), h("div", "renderUiColorPicker property ui must be colorPicker")) };
1735
1560
  }
1736
- function Wn(t) {
1737
- return { renderUiCompSelect: (l, e, n, o, i) => e.ui !== "selectComp" ? (console.assert(!1), S("div", "renderUiCompSelect property ui must be selectComp")) : S($n, {
1738
- modelValue: te(
1739
- l,
1740
- e,
1741
- n,
1742
- t,
1743
- o,
1744
- i
1745
- ),
1746
- "onUpdate:modelValue": (r) => {
1747
- oe(
1748
- l,
1749
- e,
1750
- n,
1751
- r,
1752
- t,
1753
- o,
1754
- i
1755
- );
1756
- }
1757
- }) };
1561
+ function useUiCompSelect(e) {
1562
+ return { renderUiCompSelect: (m, g, _, v, y) => g.ui === "selectComp" ? h(compSelect_default, {
1563
+ modelValue: (() => getModelValue(m, g, _, e, v, y))(),
1564
+ "onUpdate:modelValue": (b) => {
1565
+ setModelValue(m, g, _, b, e, v, y);
1566
+ }
1567
+ }) : (console.assert(!1), h("div", "renderUiCompSelect property ui must be selectComp")) };
1758
1568
  }
1759
- function Qn(t) {
1760
- return { renderUiDummy: (l, e, n, o, i) => {
1761
- if (e.ui !== "dummy") {
1762
- console.assert(!1, "renderUiDummy property ui must be dummy");
1763
- return;
1764
- }
1765
- te(l, e, n, t, o, i);
1766
- } };
1569
+ function useUiDummy(e) {
1570
+ return { renderUiDummy: (m, g, _, v, y) => {
1571
+ if (g.ui !== "dummy") {
1572
+ console.assert(!1, "renderUiDummy property ui must be dummy");
1573
+ return;
1574
+ }
1575
+ getModelValue(m, g, _, e, v, y);
1576
+ } };
1767
1577
  }
1768
- function Zn(t) {
1769
- return { renderUiJsonEditor: (l, e, n, o, i) => e.ui !== "jsonEditor" ? S("div", "renderUijsonEditor property ui must be jsonEditor") : S(wn, {
1770
- modelValue: te(
1771
- l,
1772
- e,
1773
- n,
1774
- t,
1775
- o,
1776
- i
1777
- ) ?? "{}",
1778
- "onUpdate:modelValue": (r) => {
1779
- oe(
1780
- l,
1781
- e,
1782
- n,
1783
- r,
1784
- t,
1785
- o,
1786
- i
1787
- );
1788
- }
1789
- }) };
1578
+ function useUiJsonEditor(e) {
1579
+ return { renderUiJsonEditor: (m, g, _, v, y) => g.ui === "jsonEditor" ? h(jsonEditor_default, {
1580
+ modelValue: (() => getModelValue(m, g, _, e, v, y) ?? "{}")(),
1581
+ "onUpdate:modelValue": (b) => {
1582
+ setModelValue(m, g, _, b, e, v, y);
1583
+ }
1584
+ }) : h("div", "renderUijsonEditor property ui must be jsonEditor") };
1790
1585
  }
1791
- function jn(t) {
1792
- return { renderUiMultiTypes: (l, e, n, o, i) => e.ui !== "multiTypes" ? (console.assert(!1), S("div", "renderUiMultiTypes property ui must be multiTypes")) : S(Pn, {
1793
- modelValue: te(
1794
- l,
1795
- e,
1796
- n,
1797
- t,
1798
- o,
1799
- i
1800
- ) ?? "",
1801
- "onUpdate:modelValue": (r) => {
1802
- oe(
1803
- l,
1804
- e,
1805
- n,
1806
- r,
1807
- t,
1808
- o,
1809
- i
1810
- );
1811
- },
1812
- hasDelete: o !== void 0 && !i,
1813
- onDelete: () => {
1814
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, -1), n));
1815
- },
1816
- types: e.types
1817
- }) };
1586
+ function useUiMultiTypes(e) {
1587
+ return { renderUiMultiTypes: (m, g, _, v, y) => g.ui === "multiTypes" ? h(multiTypes_default, {
1588
+ modelValue: (() => getModelValue(m, g, _, e, v, y) ?? "")(),
1589
+ "onUpdate:modelValue": (b) => {
1590
+ setModelValue(m, g, _, b, e, v, y);
1591
+ },
1592
+ hasDelete: v !== void 0 && !y,
1593
+ onDelete: () => {
1594
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
1595
+ },
1596
+ types: g.types
1597
+ }) : (console.assert(!1), h("div", "renderUiMultiTypes property ui must be multiTypes")) };
1818
1598
  }
1819
- function In(t) {
1820
- return { renderUiNumInput: (l, e, n, o, i) => e.ui !== "numInput" ? (console.assert(!1), S("div", "renderUiNumInput property ui must be numInput")) : S(Dn, {
1821
- modelValue: te(
1822
- l,
1823
- e,
1824
- n,
1825
- t,
1826
- o,
1827
- i
1828
- ),
1829
- "onUpdate:modelValue": (r) => {
1830
- oe(
1831
- l,
1832
- e,
1833
- n,
1834
- r,
1835
- t,
1836
- o,
1837
- i
1838
- );
1839
- },
1840
- hasDelete: o !== void 0 && !i,
1841
- onDelete: () => {
1842
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, -1), n));
1843
- },
1844
- precision: e.precision,
1845
- min: e.min,
1846
- max: e.max,
1847
- step: e.step,
1848
- readonly: e.readonly
1849
- }) };
1599
+ function useUiNumInput(e) {
1600
+ return { renderUiNumInput: (m, g, _, v, y) => g.ui === "numInput" ? h(numInput_default, {
1601
+ modelValue: (() => getModelValue(m, g, _, e, v, y))(),
1602
+ "onUpdate:modelValue": (b) => {
1603
+ setModelValue(m, g, _, b, e, v, y);
1604
+ },
1605
+ hasDelete: v !== void 0 && !y,
1606
+ onDelete: () => {
1607
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
1608
+ },
1609
+ precision: g.precision,
1610
+ min: g.min,
1611
+ max: g.max,
1612
+ step: g.step,
1613
+ readonly: g.readonly
1614
+ }) : (console.assert(!1), h("div", "renderUiNumInput property ui must be numInput")) };
1850
1615
  }
1851
- const el = /* @__PURE__ */ E({
1852
- __name: "index",
1853
- props: {
1854
- minHeight: {}
1855
- },
1856
- emits: ["menu"],
1857
- setup(t, { emit: s }) {
1858
- const { backgroundColor2: l, highlightColor: e } = I(), n = s, o = O(!1), i = L(() => ({
1859
- background: o.value ? e.value : l.value,
1860
- minHeight: t.minHeight,
1861
- paddingRight: "4px",
1862
- marginBottom: "1px",
1863
- userSelect: "none"
1864
- })), r = (u) => {
1865
- n("menu", u.clientX, u.clientY);
1866
- };
1867
- return (u, a) => {
1868
- const c = ee("ripple");
1869
- return Z((k(), q("div", {
1870
- class: "d-flex justify-space-between align-center cursor-pointer",
1871
- style: G(i.value),
1872
- onContextmenu: X(r, ["self", "prevent"]),
1873
- onMouseout: a[0] || (a[0] = (v) => o.value = !1),
1874
- onMouseover: a[1] || (a[1] = (v) => o.value = !0)
1875
- }, [
1876
- St(u.$slots, "default")
1877
- ], 36)), [
1878
- [c]
1879
- ]);
1880
- };
1881
- }
1616
+ var entry_default = /* @__PURE__ */ defineComponent({
1617
+ __name: "index",
1618
+ props: { minHeight: {} },
1619
+ emits: ["menu"],
1620
+ setup(e, { emit: m }) {
1621
+ let { backgroundColor2: g, highlightColor: _ } = useColor(), v = m, y = ref(!1), x = computed(() => ({
1622
+ background: y.value ? _.value : g.value,
1623
+ minHeight: e.minHeight,
1624
+ paddingRight: "4px",
1625
+ marginBottom: "1px",
1626
+ userSelect: "none"
1627
+ })), S = (e) => {
1628
+ v("menu", e.clientX, e.clientY);
1629
+ };
1630
+ return (e, m) => {
1631
+ let g = resolveDirective("ripple");
1632
+ return withDirectives((openBlock(), createElementBlock("div", {
1633
+ class: "d-flex justify-space-between align-center cursor-pointer",
1634
+ style: normalizeStyle(x.value),
1635
+ onContextmenu: withModifiers(S, ["self", "prevent"]),
1636
+ onMouseout: m[0] ||= (e) => y.value = !1,
1637
+ onMouseover: m[1] ||= (e) => y.value = !0
1638
+ }, [renderSlot(e.$slots, "default")], 36)), [[g]]);
1639
+ };
1640
+ }
1882
1641
  });
1883
- function tl(t, s, l) {
1884
- const { t: e } = ne();
1885
- return { renderProperty: (o, i, r) => {
1886
- const u = o[o.length - 1];
1887
- let c = typeof u == "number" ? `[${u + 1}]` : e(i.name);
1888
- return ve(t.value, o) && (c += " *"), S(
1889
- el,
1890
- {
1891
- minHeight: s.value,
1892
- onMenu: (v, m) => {
1893
- fe.emit("propTreeMenu", { x: v, y: m, keys: o });
1894
- }
1895
- },
1896
- () => [
1897
- S("span", {
1898
- style: { marginLeft: "4px", pointerEvents: "none" },
1899
- innerHTML: c
1900
- }),
1901
- S("div", { style: { width: l.value } }, r)
1902
- ]
1903
- );
1904
- } };
1642
+ function useUiProperty(e, m, g) {
1643
+ let { t: _ } = useI18n();
1644
+ return { renderProperty: (v, y, b) => {
1645
+ let x = v[v.length - 1], S = typeof x == "number" ? `[${x + 1}]` : _(y.name);
1646
+ return isPropertyChanged(e.value, v) && (S += " *"), h(entry_default, {
1647
+ minHeight: m.value,
1648
+ onMenu: (e, m) => {
1649
+ eventBus.emit("propTreeMenu", {
1650
+ x: e,
1651
+ y: m,
1652
+ keys: v
1653
+ });
1654
+ }
1655
+ }, () => [h("span", {
1656
+ style: {
1657
+ marginLeft: "4px",
1658
+ pointerEvents: "none"
1659
+ },
1660
+ innerHTML: S
1661
+ }), h("div", { style: { width: g.value } }, b)]);
1662
+ } };
1905
1663
  }
1906
- function nl(t) {
1907
- return { renderUiSelect: (l, e, n, o, i) => e.ui !== "select" ? (console.assert(!1), S("div", "renderUiSelect property ui must be select")) : S(Nn, {
1908
- modelValue: te(
1909
- l,
1910
- e,
1911
- n,
1912
- t,
1913
- o,
1914
- i
1915
- ) ?? "",
1916
- "onUpdate:modelValue": (r) => {
1917
- oe(
1918
- l,
1919
- e,
1920
- n,
1921
- r,
1922
- t,
1923
- o,
1924
- i
1925
- );
1926
- },
1927
- hasDelete: o !== void 0 && !i,
1928
- onDelete: () => {
1929
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, -1), n));
1930
- },
1931
- items: e.items,
1932
- readonly: e.readonly
1933
- }) };
1664
+ function useUiSelect(e) {
1665
+ return { renderUiSelect: (m, g, _, v, y) => g.ui === "select" ? h(select_default, {
1666
+ modelValue: (() => getModelValue(m, g, _, e, v, y) ?? "")(),
1667
+ "onUpdate:modelValue": (b) => {
1668
+ setModelValue(m, g, _, b, e, v, y);
1669
+ },
1670
+ hasDelete: v !== void 0 && !y,
1671
+ onDelete: () => {
1672
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
1673
+ },
1674
+ items: g.items,
1675
+ readonly: g.readonly
1676
+ }) : (console.assert(!1), h("div", "renderUiSelect property ui must be select")) };
1934
1677
  }
1935
- function ll(t) {
1936
- return { renderUiSlotSelect: (l, e, n, o, i) => e.ui !== "selectSlot" ? (console.assert(!1), S("div", "renderUiSlotSelect property ui must be selectSlot")) : S(Jn, {
1937
- modelValue: te(
1938
- l,
1939
- e,
1940
- n,
1941
- t,
1942
- o,
1943
- i
1944
- ),
1945
- "onUpdate:modelValue": (r) => {
1946
- oe(
1947
- l,
1948
- e,
1949
- n,
1950
- r,
1951
- t,
1952
- o,
1953
- i
1954
- );
1955
- }
1956
- }) };
1678
+ function useUiSlotSelect(e) {
1679
+ return { renderUiSlotSelect: (m, g, _, v, y) => g.ui === "selectSlot" ? h(slotSelect_default, {
1680
+ modelValue: (() => getModelValue(m, g, _, e, v, y))(),
1681
+ "onUpdate:modelValue": (b) => {
1682
+ setModelValue(m, g, _, b, e, v, y);
1683
+ }
1684
+ }) : (console.assert(!1), h("div", "renderUiSlotSelect property ui must be selectSlot")) };
1957
1685
  }
1958
- function ol(t) {
1959
- return { renderUiStrInput: (l, e, n, o, i) => e.ui !== "strInput" ? (console.assert(!1), S("div", "renderUiStrInput property ui must be strInput")) : S(Hn, {
1960
- modelValue: e.static ? e.value : te(
1961
- l,
1962
- e,
1963
- n,
1964
- t,
1965
- o,
1966
- i
1967
- ),
1968
- "onUpdate:modelValue": (r) => {
1969
- e.static || oe(
1970
- l,
1971
- e,
1972
- n,
1973
- r,
1974
- t,
1975
- o,
1976
- i
1977
- );
1978
- },
1979
- hasDelete: o !== void 0 && !i,
1980
- onDelete: () => {
1981
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, -1), n));
1982
- },
1983
- readonly: e.static || e.readonly
1984
- }) };
1686
+ function useUiStrInput(e) {
1687
+ return { renderUiStrInput: (m, g, _, v, y) => g.ui === "strInput" ? h(strInput_default, {
1688
+ modelValue: (() => g.static ? g.value : getModelValue(m, g, _, e, v, y))(),
1689
+ "onUpdate:modelValue": (b) => {
1690
+ g.static || setModelValue(m, g, _, b, e, v, y);
1691
+ },
1692
+ hasDelete: v !== void 0 && !y,
1693
+ onDelete: () => {
1694
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, -1), _));
1695
+ },
1696
+ readonly: g.static || g.readonly
1697
+ }) : (console.assert(!1), h("div", "renderUiStrInput property ui must be strInput")) };
1985
1698
  }
1986
- function sl(t) {
1987
- return { renderUiSwitch: (l, e, n, o, i) => e.ui !== "switch" ? (console.assert(!1), S("div", "renderUiSwitch property ui must be switch")) : S(zn, {
1988
- modelValue: te(
1989
- l,
1990
- e,
1991
- n,
1992
- t,
1993
- o,
1994
- i
1995
- ) ?? !1,
1996
- "onUpdate:modelValue": (r) => {
1997
- oe(
1998
- l,
1999
- e,
2000
- n,
2001
- r,
2002
- t,
2003
- o,
2004
- i
2005
- );
2006
- },
2007
- hasDelete: o !== void 0 && !i,
2008
- onDelete: () => {
2009
- o === void 0 || i || (n.splice(o, 1), t(l.slice(0, 1), n));
2010
- },
2011
- readonly: e.readonly
2012
- }) };
1699
+ function useUiSwitch(e) {
1700
+ return { renderUiSwitch: (m, g, _, v, y) => g.ui === "switch" ? h(switch_default, {
1701
+ modelValue: (() => getModelValue(m, g, _, e, v, y) ?? !1)(),
1702
+ "onUpdate:modelValue": (b) => {
1703
+ setModelValue(m, g, _, b, e, v, y);
1704
+ },
1705
+ hasDelete: v !== void 0 && !y,
1706
+ onDelete: () => {
1707
+ v === void 0 || y || (_.splice(v, 1), e(m.slice(0, 1), _));
1708
+ },
1709
+ readonly: g.readonly
1710
+ }) : (console.assert(!1), h("div", "renderUiSwitch property ui must be switch")) };
2013
1711
  }
2014
- const il = /* @__PURE__ */ E({
2015
- __name: "index",
2016
- props: {
2017
- unique: {},
2018
- config: {},
2019
- object: {},
2020
- version: {},
2021
- type: {},
2022
- subtype: {}
2023
- },
2024
- emits: ["change"],
2025
- setup(t, { emit: s }) {
2026
- const { t: l } = ne(), { backgroundColor1: e } = I(), n = t, o = s, i = O("20px"), r = O("56px"), u = O("200px"), a = Vt({}), c = O({}), v = (y, f) => {
2027
- Ge(c, n.config, n.object), o("change", y, f);
2028
- };
2029
- ie(
2030
- [() => n.config, () => n.object],
2031
- () => {
2032
- Ge(
2033
- c,
2034
- n.config,
2035
- n.object,
2036
- (y, f) => {
2037
- o("change", y, f);
2038
- }
2039
- );
2040
- },
2041
- { immediate: !0 }
2042
- );
2043
- const m = O(n.version);
2044
- Rt(m), ie(
2045
- () => n.version,
2046
- () => {
2047
- m.value = n.version;
2048
- }
2049
- );
2050
- const p = O(n.type);
2051
- ie(
2052
- () => n.type,
2053
- () => {
2054
- p.value = n.type;
2055
- }
2056
- );
2057
- const d = O(n.subtype);
2058
- ie(
2059
- () => n.subtype,
2060
- () => {
2061
- d.value = n.subtype;
2062
- }
2063
- );
2064
- const C = O(n.config);
2065
- Et(C), ie(
2066
- () => n.config,
2067
- () => {
2068
- C.value = n.config;
2069
- }
2070
- );
2071
- const x = O(n.object);
2072
- Xt(x), ie(
2073
- () => n.object,
2074
- () => {
2075
- x.value = n.object;
2076
- }
2077
- ), Ft(c), Gt(v), tn(), nn(), en(m, p, d);
2078
- const { renderProperty: U } = tl(
2079
- c,
2080
- r,
2081
- u
2082
- ), { renderUiDummy: g } = Qn(v), { renderUiStrInput: V } = ol(v), { renderUiNumInput: A } = In(v), { renderUiSwitch: T } = sl(v), { renderUiSelect: Q } = nl(v), { renderUiColorPicker: he } = Yn(v), { renderUiJsonEditor: Te } = Zn(v), { renderUiMultiTypes: ct } = jn(v), { renderUiCompSelect: dt } = Wn(v), { renderUiSlotSelect: mt } = ll(v), { renderUiAdaptSlotSelect: ft } = Gn(v), Ce = (y, f, _, h, b, N) => (y = Qe(y), b !== void 0 ? (y.push(b), N && y.push(f.key)) : y.push(f.key), f.ui ? f.array && h ? gt(
2083
- y,
2084
- f,
2085
- _,
2086
- h,
2087
- b,
2088
- N
2089
- ) : yt(y, f, _, b, N) : f.array ? vt(
2090
- y,
2091
- f,
2092
- _,
2093
- h,
2094
- b,
2095
- N
2096
- ) : pt(
2097
- y,
2098
- f,
2099
- _,
2100
- h,
2101
- b,
2102
- N
2103
- )), vt = (y, f, _, h, b, N) => {
2104
- if (f.ui)
2105
- return console.assert(!1), S("div", "renderBranchArray property ui must be invalid");
2106
- if (!f.array)
2107
- return console.assert(!1), S("div", "renderBranchArray property array must be valid");
2108
- if (!h)
2109
- return console.assert(!1), S("div", "renderBranchArray branch must be valid");
2110
- let z;
2111
- b !== void 0 && !N ? (_[b] instanceof Array || (_[b] = H(f), v(y, _[f.key])), z = _[b]) : (_[f.key] instanceof Array || (_[f.key] = H(f), v(y, _[f.key])), z = _[f.key]);
2112
- let ce = l(f.name);
2113
- h.collapse && ve(c.value, y) && (ce += " *");
2114
- const ke = S(we, {
2115
- title: ce,
2116
- collapse: h.collapse,
2117
- hasCreate: !0,
2118
- onCollapse: (P) => {
2119
- h.collapse = P;
2120
- },
2121
- onMenu: (P, R) => {
2122
- fe.emit("propTreeMenu", { x: P, y: R, keys: y });
2123
- },
2124
- onCreate: () => {
2125
- z.push({}), v(y, z);
2126
- }
2127
- }), W = S(
2128
- "div",
2129
- {
2130
- style: {
2131
- paddingLeft: i.value
2132
- }
2133
- },
2134
- (() => {
2135
- const P = [];
2136
- for (let R = 0; R < z.length; R++) {
2137
- if (!Ne(h.children)) {
2138
- console.assert(!1);
2139
- break;
2140
- }
2141
- h.children[R] || h.children.push({
2142
- collapse: !0,
2143
- children: {}
2144
- });
2145
- const $e = [...y, R], Ue = h.children[R];
2146
- let Xe = `[${R + 1}]`;
2147
- h.children[R].collapse && ve(c.value, $e) && (Xe += " *");
2148
- const kt = S(we, {
2149
- title: Xe,
2150
- collapse: h.children[R].collapse,
2151
- hasDelete: !0,
2152
- index: R,
2153
- onCollapse: (se) => {
2154
- if (!Ne(h.children)) {
2155
- console.assert(!1);
2156
- return;
2157
- }
2158
- h.children[R].collapse = se;
2159
- },
2160
- onMenu: (se, de) => {
2161
- fe.emit("propTreeMenu", { x: se, y: de, keys: $e });
2162
- },
2163
- onDelete: (se) => {
2164
- if (!Ne(h.children)) {
2165
- console.assert(!1);
2166
- return;
2167
- }
2168
- h.children.splice(se, 1), z.splice(se, 1), v(y, z);
2169
- }
2170
- });
2171
- P.push(kt);
2172
- const xt = S(
2173
- "div",
2174
- {
2175
- style: {
2176
- paddingLeft: i.value
2177
- }
2178
- },
2179
- (() => {
2180
- const se = [];
2181
- return f.children.forEach((de) => {
2182
- if (!ze(Ue.children)) {
2183
- console.assert(!1);
2184
- return;
2185
- }
2186
- Ue.children[de.key] || (Ue.children[de.key] = {
2187
- collapse: !0,
2188
- children: de.array ? [] : {}
2189
- });
2190
- const _t = Ce(
2191
- y,
2192
- de,
2193
- z[R],
2194
- Ue.children[de.key],
2195
- R,
2196
- !0
2197
- );
2198
- se.push(_t);
2199
- }), se;
2200
- })()
2201
- );
2202
- h.children[R].collapse || P.push(xt);
2203
- }
2204
- return P;
2205
- })()
2206
- );
2207
- return S(
2208
- "div",
2209
- {
2210
- style: {
2211
- marginBottom: "1px"
2212
- }
2213
- },
2214
- (() => {
2215
- const P = [];
2216
- return P.push(ke), h.collapse || P.push(W), P;
2217
- })()
2218
- );
2219
- }, pt = (y, f, _, h, b, N) => {
2220
- if (f.ui)
2221
- return console.assert(!1), S("div", "renderBranchScalar property ui must be invalid");
2222
- if (f.array)
2223
- return console.assert(!1), S("div", "renderBranchScalar property array must be invalid");
2224
- if (!h)
2225
- return console.assert(!1), S("div", "renderBranchScalar branch must be valid");
2226
- let z = l(f.name);
2227
- h.collapse && ve(c.value, y) && (z += " *");
2228
- const ce = S(we, {
2229
- title: z,
2230
- collapse: h.collapse,
2231
- hasDelete: b !== void 0 && !N,
2232
- onCollapse: (W) => {
2233
- h.collapse = W;
2234
- },
2235
- onMenu: (W, P) => {
2236
- fe.emit("propTreeMenu", { x: W, y: P, keys: y });
2237
- },
2238
- onDelete: () => {
2239
- b === void 0 || N || (_.splice(b, 1), v(y.slice(0, -1), _));
2240
- }
2241
- }), ke = S(
2242
- "div",
2243
- {
2244
- style: {
2245
- paddingLeft: i.value
2246
- }
2247
- },
2248
- (() => {
2249
- const W = [];
2250
- return f.children.forEach((P) => {
2251
- if (!ze(h.children)) {
2252
- console.assert(!1);
2253
- return;
2254
- }
2255
- h.children[P.key] || (h.children[P.key] = {
2256
- collapse: !0,
2257
- children: !P.ui && P.array ? [] : {}
2258
- });
2259
- const R = Ce(
2260
- y,
2261
- P,
2262
- (typeof _[f.key] != "object" && (_[f.key] = {}, v(y, _[f.key])), _[f.key]),
2263
- h.children[P.key]
2264
- );
2265
- W.push(R);
2266
- }), W;
2267
- })()
2268
- );
2269
- return S(
2270
- "div",
2271
- {
2272
- style: {
2273
- marginBottom: "1px"
2274
- }
2275
- },
2276
- (() => {
2277
- const W = [];
2278
- return W.push(ce), h.collapse || W.push(ke), W;
2279
- })()
2280
- );
2281
- }, gt = (y, f, _, h, b, N) => {
2282
- if (!f.ui)
2283
- return console.assert(!1), S("div", "renderLeafArray property ui must be valid");
2284
- if (!f.array)
2285
- return console.assert(!1), S("div", "renderLeafArray property array must be valid");
2286
- if (!h)
2287
- return console.assert(!1), S("div", "renderLeafArray branch must be valid");
2288
- let z;
2289
- b !== void 0 && !N ? (_[b] instanceof Array || (_[b] = H(f), v(y, _[b])), z = _[b]) : (_[f.key] instanceof Array || (_[f.key] = H(f), v(y, _[f.key])), z = _[f.key]);
2290
- let ce = l(f.name);
2291
- h.collapse && ve(c.value, y) && (ce += " *");
2292
- const ke = S(we, {
2293
- title: ce,
2294
- collapse: h.collapse,
2295
- hasCreate: !0,
2296
- onCollapse: (P) => {
2297
- h.collapse = P;
2298
- },
2299
- onMenu: (P, R) => {
2300
- fe.emit("propTreeMenu", { x: P, y: R, keys: y });
2301
- },
2302
- onCreate: () => {
2303
- z.push(H(f, !0)), v(y, z);
2304
- }
2305
- }), W = S(
2306
- "div",
2307
- {
2308
- style: {
2309
- paddingLeft: i.value
2310
- }
2311
- },
2312
- (() => {
2313
- const P = [];
2314
- for (let R = 0; R < z.length; R++) {
2315
- const $e = Ce(y, f, z, void 0, R, !1);
2316
- P.push($e);
2317
- }
2318
- return P;
2319
- })()
2320
- );
2321
- return S(
2322
- "div",
2323
- {
2324
- style: {
2325
- marginBottom: "1px"
2326
- }
2327
- },
2328
- (() => {
2329
- const P = [];
2330
- return P.push(ke), h.collapse || P.push(W), P;
2331
- })()
2332
- );
2333
- }, yt = (y, f, _, h, b) => {
2334
- if (!f.ui)
2335
- return console.assert(!1), S("div", "renderLeafScalar property ui must be valid");
2336
- let N;
2337
- return f.ui === "dummy" ? N = g(y, f, _, h, b) : f.ui === "strInput" ? N = V(y, f, _, h, b) : f.ui === "numInput" ? N = A(y, f, _, h, b) : f.ui === "switch" ? N = T(y, f, _, h, b) : f.ui === "select" ? N = Q(y, f, _, h, b) : f.ui === "colorPicker" ? N = he(y, f, _, h, b) : f.ui === "jsonEditor" ? N = Te(y, f, _, h, b) : f.ui === "multiTypes" ? N = ct(y, f, _, h, b) : f.ui === "selectComp" ? N = dt(y, f, _, h, b) : f.ui === "selectSlot" ? N = mt(y, f, _, h, b) : f.ui === "selectAdaptSlot" ? N = ft(y, f, _, h, b) : console.assert(!1, "renderLeafScalar not implemented"), N ? U(y, f, N) : S("div");
2338
- }, ht = () => S(
2339
- "div",
2340
- {
2341
- class: "text-body-2",
2342
- style: {
2343
- background: e.value
2344
- }
2345
- },
2346
- (() => {
2347
- const y = [];
2348
- if (n.unique && n.config.length > 0 && n.object) {
2349
- a[n.unique] || (a[n.unique] = {});
2350
- const f = a[n.unique];
2351
- n.config.forEach((_) => {
2352
- f[_.key] || (f[_.key] = {
2353
- collapse: !0,
2354
- children: !_.ui && _.array ? [] : {}
2355
- });
2356
- const h = Ce(
2357
- [],
2358
- _,
2359
- n.object,
2360
- f[_.key]
2361
- );
2362
- y.push(h);
2363
- });
2364
- }
2365
- return y;
2366
- })()
2367
- );
2368
- return (y, f) => (k(), q(me, null, [
2369
- w(ht),
2370
- w(jt, {
2371
- config: n.config,
2372
- object: n.object,
2373
- "property-states": c.value
2374
- }, null, 8, ["config", "object", "property-states"])
2375
- ], 64));
2376
- }
2377
- }), ul = (t) => {
2378
- t.component("XPropTree", il);
2379
- }, rl = (t, s, l) => {
2380
- const e = t[s];
2381
- return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((n, o) => {
2382
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + s + (s.split("/").length !== l ? ". Note that variables only represent file names one level deep." : ""))));
2383
- });
1712
+ var propTree_default = /* @__PURE__ */ defineComponent({
1713
+ __name: "index",
1714
+ props: {
1715
+ unique: {},
1716
+ config: {},
1717
+ object: {},
1718
+ version: {},
1719
+ type: {},
1720
+ subtype: {}
1721
+ },
1722
+ emits: ["change"],
1723
+ setup(m, { emit: g }) {
1724
+ let { t: _ } = useI18n(), { backgroundColor1: v } = useColor(), b = m, x = g, S = ref("20px"), w = ref("56px"), T = ref("200px"), D = reactive({}), k = ref({}), A = (e, m) => {
1725
+ rebuildPropertyState(k, b.config, b.object), x("change", e, m);
1726
+ };
1727
+ watch([() => b.config, () => b.object], () => {
1728
+ rebuildPropertyState(k, b.config, b.object, (e, m) => {
1729
+ x("change", e, m);
1730
+ });
1731
+ }, { immediate: !0 });
1732
+ let j = ref(b.version);
1733
+ provideVersion(j), watch(() => b.version, () => {
1734
+ j.value = b.version;
1735
+ });
1736
+ let M = ref(b.type);
1737
+ watch(() => b.type, () => {
1738
+ M.value = b.type;
1739
+ });
1740
+ let N = ref(b.subtype);
1741
+ watch(() => b.subtype, () => {
1742
+ N.value = b.subtype;
1743
+ });
1744
+ let P = ref(b.config);
1745
+ provideConfig(P), watch(() => b.config, () => {
1746
+ P.value = b.config;
1747
+ });
1748
+ let F = ref(b.object);
1749
+ provideObject(F), watch(() => b.object, () => {
1750
+ F.value = b.object;
1751
+ }), providePropertyStates(k), provideChangeEvent(A), useCompList(), useSlotList(), useAdaptSlotList(j, M, N);
1752
+ let { renderProperty: I } = useUiProperty(k, w, T), { renderUiDummy: L } = useUiDummy(A), { renderUiStrInput: R } = useUiStrInput(A), { renderUiNumInput: z } = useUiNumInput(A), { renderUiSwitch: B } = useUiSwitch(A), { renderUiSelect: V } = useUiSelect(A), { renderUiColorPicker: H } = useUiColorPicker(A), { renderUiJsonEditor: U } = useUiJsonEditor(A), { renderUiMultiTypes: W } = useUiMultiTypes(A), { renderUiCompSelect: G } = useUiCompSelect(A), { renderUiSlotSelect: K } = useUiSlotSelect(A), { renderUiAdaptSlotSelect: q } = useUiAdaptSlotSelect(A), J = (m, g, _, v, y, b) => (m = cloneDeep_default(m), y === void 0 ? m.push(g.key) : (m.push(y), b && m.push(g.key)), g.ui ? g.array && v ? Z(m, g, _, v, y, b) : Q(m, g, _, y, b) : g.array ? Y(m, g, _, v, y, b) : X(m, g, _, v, y, b)), Y = (e, m, g, v, y, b) => {
1753
+ if (m.ui) return console.assert(!1), h("div", "renderBranchArray property ui must be invalid");
1754
+ if (!m.array) return console.assert(!1), h("div", "renderBranchArray property array must be valid");
1755
+ if (!v) return console.assert(!1), h("div", "renderBranchArray branch must be valid");
1756
+ let x;
1757
+ y !== void 0 && !b ? (g[y] instanceof Array || (g[y] = getPropertyDefault(m), A(e, g[m.key])), x = g[y]) : (g[m.key] instanceof Array || (g[m.key] = getPropertyDefault(m), A(e, g[m.key])), x = g[m.key]);
1758
+ let C = _(m.name);
1759
+ v.collapse && isPropertyChanged(k.value, e) && (C += " *");
1760
+ let w = h(title_default, {
1761
+ title: C,
1762
+ collapse: v.collapse,
1763
+ hasCreate: !0,
1764
+ onCollapse: (e) => {
1765
+ v.collapse = e;
1766
+ },
1767
+ onMenu: (m, g) => {
1768
+ eventBus.emit("propTreeMenu", {
1769
+ x: m,
1770
+ y: g,
1771
+ keys: e
1772
+ });
1773
+ },
1774
+ onCreate: () => {
1775
+ x.push({}), A(e, x);
1776
+ }
1777
+ }), T = h("div", { style: { paddingLeft: S.value } }, (() => {
1778
+ let g = [];
1779
+ for (let _ = 0; _ < x.length; _++) {
1780
+ if (!isBranchChildrenArray(v.children)) {
1781
+ console.assert(!1);
1782
+ break;
1783
+ }
1784
+ v.children[_] || v.children.push({
1785
+ collapse: !0,
1786
+ children: {}
1787
+ });
1788
+ let y = [...e, _], b = v.children[_], C = `[${_ + 1}]`;
1789
+ v.children[_].collapse && isPropertyChanged(k.value, y) && (C += " *");
1790
+ let w = h(title_default, {
1791
+ title: C,
1792
+ collapse: v.children[_].collapse,
1793
+ hasDelete: !0,
1794
+ index: _,
1795
+ onCollapse: (e) => {
1796
+ if (!isBranchChildrenArray(v.children)) {
1797
+ console.assert(!1);
1798
+ return;
1799
+ }
1800
+ v.children[_].collapse = e;
1801
+ },
1802
+ onMenu: (e, m) => {
1803
+ eventBus.emit("propTreeMenu", {
1804
+ x: e,
1805
+ y: m,
1806
+ keys: y
1807
+ });
1808
+ },
1809
+ onDelete: (m) => {
1810
+ if (!isBranchChildrenArray(v.children)) {
1811
+ console.assert(!1);
1812
+ return;
1813
+ }
1814
+ v.children.splice(m, 1), x.splice(m, 1), A(e, x);
1815
+ }
1816
+ });
1817
+ g.push(w);
1818
+ let T = h("div", { style: { paddingLeft: S.value } }, (() => {
1819
+ let g = [];
1820
+ return m.children.forEach((m) => {
1821
+ if (!isBranchChildrenMap(b.children)) {
1822
+ console.assert(!1);
1823
+ return;
1824
+ }
1825
+ b.children[m.key] || (b.children[m.key] = {
1826
+ collapse: !0,
1827
+ children: m.array ? [] : {}
1828
+ });
1829
+ let v = J(e, m, x[_], b.children[m.key], _, !0);
1830
+ g.push(v);
1831
+ }), g;
1832
+ })());
1833
+ v.children[_].collapse || g.push(T);
1834
+ }
1835
+ return g;
1836
+ })());
1837
+ return h("div", { style: { marginBottom: "1px" } }, (() => {
1838
+ let e = [];
1839
+ return e.push(w), v.collapse || e.push(T), e;
1840
+ })());
1841
+ }, X = (e, m, g, v, y, b) => {
1842
+ if (m.ui) return console.assert(!1), h("div", "renderBranchScalar property ui must be invalid");
1843
+ if (m.array) return console.assert(!1), h("div", "renderBranchScalar property array must be invalid");
1844
+ if (!v) return console.assert(!1), h("div", "renderBranchScalar branch must be valid");
1845
+ let x = _(m.name);
1846
+ v.collapse && isPropertyChanged(k.value, e) && (x += " *");
1847
+ let C = h(title_default, {
1848
+ title: x,
1849
+ collapse: v.collapse,
1850
+ hasDelete: y !== void 0 && !b,
1851
+ onCollapse: (e) => {
1852
+ v.collapse = e;
1853
+ },
1854
+ onMenu: (m, g) => {
1855
+ eventBus.emit("propTreeMenu", {
1856
+ x: m,
1857
+ y: g,
1858
+ keys: e
1859
+ });
1860
+ },
1861
+ onDelete: () => {
1862
+ y === void 0 || b || (g.splice(y, 1), A(e.slice(0, -1), g));
1863
+ }
1864
+ }), w = h("div", { style: { paddingLeft: S.value } }, (() => {
1865
+ let _ = [];
1866
+ return m.children.forEach((y) => {
1867
+ if (!isBranchChildrenMap(v.children)) {
1868
+ console.assert(!1);
1869
+ return;
1870
+ }
1871
+ v.children[y.key] || (v.children[y.key] = {
1872
+ collapse: !0,
1873
+ children: !y.ui && y.array ? [] : {}
1874
+ });
1875
+ let b = J(e, y, (() => (typeof g[m.key] != "object" && (g[m.key] = {}, A(e, g[m.key])), g[m.key]))(), v.children[y.key]);
1876
+ _.push(b);
1877
+ }), _;
1878
+ })());
1879
+ return h("div", { style: { marginBottom: "1px" } }, (() => {
1880
+ let e = [];
1881
+ return e.push(C), v.collapse || e.push(w), e;
1882
+ })());
1883
+ }, Z = (e, m, g, v, y, b) => {
1884
+ if (!m.ui) return console.assert(!1), h("div", "renderLeafArray property ui must be valid");
1885
+ if (!m.array) return console.assert(!1), h("div", "renderLeafArray property array must be valid");
1886
+ if (!v) return console.assert(!1), h("div", "renderLeafArray branch must be valid");
1887
+ let x;
1888
+ y !== void 0 && !b ? (g[y] instanceof Array || (g[y] = getPropertyDefault(m), A(e, g[y])), x = g[y]) : (g[m.key] instanceof Array || (g[m.key] = getPropertyDefault(m), A(e, g[m.key])), x = g[m.key]);
1889
+ let C = _(m.name);
1890
+ v.collapse && isPropertyChanged(k.value, e) && (C += " *");
1891
+ let w = h(title_default, {
1892
+ title: C,
1893
+ collapse: v.collapse,
1894
+ hasCreate: !0,
1895
+ onCollapse: (e) => {
1896
+ v.collapse = e;
1897
+ },
1898
+ onMenu: (m, g) => {
1899
+ eventBus.emit("propTreeMenu", {
1900
+ x: m,
1901
+ y: g,
1902
+ keys: e
1903
+ });
1904
+ },
1905
+ onCreate: () => {
1906
+ x.push(getPropertyDefault(m, !0)), A(e, x);
1907
+ }
1908
+ }), T = h("div", { style: { paddingLeft: S.value } }, (() => {
1909
+ let g = [];
1910
+ for (let _ = 0; _ < x.length; _++) {
1911
+ let v = J(e, m, x, void 0, _, !1);
1912
+ g.push(v);
1913
+ }
1914
+ return g;
1915
+ })());
1916
+ return h("div", { style: { marginBottom: "1px" } }, (() => {
1917
+ let e = [];
1918
+ return e.push(w), v.collapse || e.push(T), e;
1919
+ })());
1920
+ }, Q = (e, m, g, _, v) => {
1921
+ if (!m.ui) return console.assert(!1), h("div", "renderLeafScalar property ui must be valid");
1922
+ let y;
1923
+ return m.ui === "dummy" ? y = L(e, m, g, _, v) : m.ui === "strInput" ? y = R(e, m, g, _, v) : m.ui === "numInput" ? y = z(e, m, g, _, v) : m.ui === "switch" ? y = B(e, m, g, _, v) : m.ui === "select" ? y = V(e, m, g, _, v) : m.ui === "colorPicker" ? y = H(e, m, g, _, v) : m.ui === "jsonEditor" ? y = U(e, m, g, _, v) : m.ui === "multiTypes" ? y = W(e, m, g, _, v) : m.ui === "selectComp" ? y = G(e, m, g, _, v) : m.ui === "selectSlot" ? y = K(e, m, g, _, v) : m.ui === "selectAdaptSlot" ? y = q(e, m, g, _, v) : console.assert(!1, "renderLeafScalar not implemented"), y ? I(e, m, y) : h("div");
1924
+ }, $ = () => h("div", {
1925
+ class: "text-body-2",
1926
+ style: { background: v.value }
1927
+ }, (() => {
1928
+ let e = [];
1929
+ if (b.unique && b.config.length > 0 && b.object) {
1930
+ D[b.unique] || (D[b.unique] = {});
1931
+ let m = D[b.unique];
1932
+ b.config.forEach((g) => {
1933
+ m[g.key] || (m[g.key] = {
1934
+ collapse: !0,
1935
+ children: !g.ui && g.array ? [] : {}
1936
+ });
1937
+ let _ = J([], g, b.object, m[g.key]);
1938
+ e.push(_);
1939
+ });
1940
+ }
1941
+ return e;
1942
+ })());
1943
+ return (e, m) => (openBlock(), createElementBlock(Fragment, null, [createVNode($), createVNode(menu_default, {
1944
+ config: b.config,
1945
+ object: b.object,
1946
+ "property-states": k.value
1947
+ }, null, 8, [
1948
+ "config",
1949
+ "object",
1950
+ "property-states"
1951
+ ])], 64));
1952
+ }
1953
+ }), install = (e) => {
1954
+ e.component("XPropTree", propTree_default);
1955
+ }, __rolldown_dynamic_import_helper_default = (e, m, g) => {
1956
+ let _ = m.lastIndexOf("?"), v = e[_ === -1 || _ < m.lastIndexOf("/") ? m : m.slice(0, _)];
1957
+ return v ? typeof v == "function" ? v() : Promise.resolve(v) : new Promise((e, _) => {
1958
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(_.bind(null, /* @__PURE__ */ Error("Unknown variable dynamic import: " + m + (m.split("/").length === g ? "" : ". Note that variables only represent file names one level deep."))));
1959
+ });
2384
1960
  };
2385
- async function yl(t) {
2386
- return (await rl(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.iz9vb07b.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.o4ue3kpx.js") }), `./locales/${t}/index.ts`, 4)).default;
1961
+ async function loadLocaleMessagePropTree(e) {
1962
+ return (await __rolldown_dynamic_import_helper_default({
1963
+ "./locales/en/index.ts": () => import("./en.ce88mjes.js"),
1964
+ "./locales/zhHans/index.ts": () => import("./zhHans.dfzi966a.js")
1965
+ }, `./locales/${e}/index.ts`, 4)).default;
2387
1966
  }
2388
- const hl = { install: ul };
2389
- export {
2390
- hl as default,
2391
- yl as loadLocaleMessagePropTree
2392
- };
1967
+ var src_default = { install };
1968
+ export { src_default as default, loadLocaleMessagePropTree };