comfy-tool 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +20 -1
- package/dist/index.min.js +1 -1
- package/es/index.mjs +378 -354
- package/lib/index.js +1 -1
- package/package.json +5 -3
package/es/index.mjs
CHANGED
|
@@ -1,50 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var Se = Object.defineProperty, Te = Object.defineProperties;
|
|
2
|
+
var ke = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Q = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ie = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var F = Math.pow, W = (e, t, n) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, m = (e, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
Ie.call(t, n) && W(e, n, t[n]);
|
|
8
|
+
if (Q)
|
|
9
|
+
for (var n of Q(t))
|
|
10
|
+
Le.call(t, n) && W(e, n, t[n]);
|
|
11
|
+
return e;
|
|
12
|
+
}, S = (e, t) => Te(e, ke(t));
|
|
13
|
+
var C = (e, t, n) => W(e, typeof t != "symbol" ? t + "" : t, n);
|
|
14
|
+
var q = (e, t, n) => new Promise((r, o) => {
|
|
15
|
+
var l = (f) => {
|
|
16
|
+
try {
|
|
17
|
+
a(n.next(f));
|
|
18
|
+
} catch (s) {
|
|
19
|
+
o(s);
|
|
20
|
+
}
|
|
21
|
+
}, i = (f) => {
|
|
22
|
+
try {
|
|
23
|
+
a(n.throw(f));
|
|
24
|
+
} catch (s) {
|
|
25
|
+
o(s);
|
|
26
|
+
}
|
|
27
|
+
}, a = (f) => f.done ? r(f.value) : Promise.resolve(f.value).then(l, i);
|
|
28
|
+
a((n = n.apply(e, t)).next());
|
|
29
|
+
});
|
|
30
|
+
import { h as Y, reactive as Me, unref as He, createVNode as k, render as Pe, Fragment as Ne, defineComponent as H, shallowRef as ee, ref as Re, shallowReactive as Ue, watch as je, provide as We, nextTick as Fe, createElementBlock as K, openBlock as G, mergeProps as J, renderSlot as g, createElementVNode as ae } from "vue";
|
|
31
|
+
function ue(e) {
|
|
3
32
|
return Array.isArray(e) ? e[e.length - 1] : e;
|
|
4
33
|
}
|
|
5
|
-
function
|
|
6
|
-
|
|
34
|
+
function Ve(e, t = {}) {
|
|
35
|
+
var r;
|
|
36
|
+
t.allParam = (r = t.allParam) != null ? r : !0, e = decodeURI(decodeURI(e));
|
|
7
37
|
let n = null;
|
|
8
38
|
if (t.allParam) {
|
|
9
|
-
let
|
|
10
|
-
if (!
|
|
11
|
-
for (const
|
|
12
|
-
|
|
39
|
+
let o = e.match(/\?([^\?#]*)/g);
|
|
40
|
+
if (!o) return null;
|
|
41
|
+
for (const l of o)
|
|
42
|
+
l.includes("=") && (n || (n = {}), Object.assign(n, te(l.substring(1))));
|
|
13
43
|
} else {
|
|
14
|
-
let
|
|
15
|
-
if (!
|
|
16
|
-
n =
|
|
44
|
+
let o = e.match(/\?([^\?]*$)/);
|
|
45
|
+
if (!o && !e.includes("=")) return null;
|
|
46
|
+
n = te(o ? o[1] : e);
|
|
17
47
|
}
|
|
18
|
-
return n && !t.repeat && Object.entries(n).forEach(([
|
|
19
|
-
n[
|
|
48
|
+
return n && !t.repeat && Object.entries(n).forEach(([o, l]) => {
|
|
49
|
+
n[o] = ue(l);
|
|
20
50
|
}), n;
|
|
21
51
|
}
|
|
22
|
-
function
|
|
23
|
-
return decodeURI(
|
|
52
|
+
function fe(e, t) {
|
|
53
|
+
return decodeURI(Je(e, {
|
|
24
54
|
sort: (n, r) => n > r ? 0 : -1
|
|
25
55
|
}));
|
|
26
56
|
}
|
|
27
|
-
function
|
|
28
|
-
return t ? (typeof t != "string" && (t =
|
|
57
|
+
function Ye(e, t) {
|
|
58
|
+
return t ? (typeof t != "string" && (t = fe(t)), t ? e + (/^([^#]*\?[^#]*$)|(.*#.*\?.*$)/.test(e) ? "&" : "?") + t : e) : e;
|
|
29
59
|
}
|
|
30
|
-
function
|
|
60
|
+
function Be(e) {
|
|
31
61
|
return /^https?:\/\//.test(e);
|
|
32
62
|
}
|
|
33
|
-
function
|
|
63
|
+
function Ke(e) {
|
|
34
64
|
return /^(https?:\/\/|blob:|data:)/.test(e);
|
|
35
65
|
}
|
|
36
|
-
function
|
|
66
|
+
function Ge(e) {
|
|
37
67
|
let [t, n] = e.split("//"), [r, o] = n.split("/");
|
|
38
68
|
return [t + "//", r, o];
|
|
39
69
|
}
|
|
40
|
-
function
|
|
70
|
+
function te(e) {
|
|
41
71
|
return e ? (e.startsWith("?") && (e = e.slice(1)), e.split("&").reduce((t, n) => {
|
|
42
72
|
if (!n) return t;
|
|
43
73
|
const [r, o] = n.split("="), l = decodeURIComponent(r || ""), i = decodeURIComponent(o || "");
|
|
44
74
|
return t[l] !== void 0 ? (Array.isArray(t[l]) || (t[l] = [t[l]]), t[l].push(i)) : t[l] = i, t;
|
|
45
75
|
}, {})) : {};
|
|
46
76
|
}
|
|
47
|
-
function
|
|
77
|
+
function Je(e, t = {}) {
|
|
48
78
|
if (!e || typeof e != "object") return "";
|
|
49
79
|
const { sort: n } = t;
|
|
50
80
|
let r = Object.keys(e);
|
|
@@ -53,33 +83,33 @@ function Pe(e, t = {}) {
|
|
|
53
83
|
return Array.isArray(l) ? l.map((i) => `${encodeURIComponent(o)}=${encodeURIComponent(String(i))}`).join("&") : `${encodeURIComponent(o)}=${encodeURIComponent(String(l))}`;
|
|
54
84
|
}).join("&");
|
|
55
85
|
}
|
|
56
|
-
function
|
|
86
|
+
function ze() {
|
|
57
87
|
}
|
|
58
|
-
function
|
|
88
|
+
function Xe(e) {
|
|
59
89
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
90
|
+
function Ze(e) {
|
|
91
|
+
z(e);
|
|
62
92
|
}
|
|
63
|
-
const
|
|
64
|
-
function
|
|
93
|
+
const B = Object.assign;
|
|
94
|
+
function ce(e) {
|
|
65
95
|
return Object.keys(e);
|
|
66
96
|
}
|
|
67
|
-
function
|
|
97
|
+
function Qe(e) {
|
|
68
98
|
return Object.values(e);
|
|
69
99
|
}
|
|
70
|
-
function
|
|
100
|
+
function pe(e) {
|
|
71
101
|
return Object.entries(e);
|
|
72
102
|
}
|
|
73
|
-
function
|
|
103
|
+
function de(e, t, n = !1) {
|
|
74
104
|
return t.reduce((r, o) => ((!n || e[o] !== void 0) && (r[o] = e[o]), r), {});
|
|
75
105
|
}
|
|
76
|
-
function
|
|
106
|
+
function I(e, t, n = !1) {
|
|
77
107
|
return Object.keys(e).filter((o) => !t.includes(o)).reduce((o, l) => ((!n || e[l] !== void 0) && (o[l] = e[l]), o), {});
|
|
78
108
|
}
|
|
79
|
-
function
|
|
109
|
+
function L(e) {
|
|
80
110
|
return Object.prototype.toString.call(e).match(/\[object (.+)\]/)[1];
|
|
81
111
|
}
|
|
82
|
-
function
|
|
112
|
+
function qe(e, t) {
|
|
83
113
|
let n = e;
|
|
84
114
|
if (t) {
|
|
85
115
|
const r = typeof t == "string" ? t.split(".") : t;
|
|
@@ -91,16 +121,16 @@ function We(e, t) {
|
|
|
91
121
|
}
|
|
92
122
|
return n;
|
|
93
123
|
}
|
|
94
|
-
function
|
|
124
|
+
function M(e, t, { arrayMergeStrategy: n, deepMerge: r } = {}) {
|
|
95
125
|
if (!t || Object.keys(t).length === 0)
|
|
96
|
-
return
|
|
126
|
+
return $(e);
|
|
97
127
|
if (!e || Object.keys(e).length === 0)
|
|
98
|
-
return
|
|
99
|
-
let o =
|
|
128
|
+
return $(t);
|
|
129
|
+
let o = $(e);
|
|
100
130
|
for (const l of Object.keys(t)) {
|
|
101
131
|
let i = e[l], a = t[l];
|
|
102
|
-
if (r &&
|
|
103
|
-
o[l] =
|
|
132
|
+
if (r && L(i) == "Object" && L(a) == "Object")
|
|
133
|
+
o[l] = M(i, a);
|
|
104
134
|
else if (r && Array.isArray(i) && Array.isArray(a))
|
|
105
135
|
switch (n) {
|
|
106
136
|
case "concat":
|
|
@@ -108,7 +138,7 @@ function k(e, t, { arrayMergeStrategy: n, deepMerge: r } = {}) {
|
|
|
108
138
|
break;
|
|
109
139
|
case "merge":
|
|
110
140
|
o[l] = i.map(
|
|
111
|
-
(f, s) => s < a.length ?
|
|
141
|
+
(f, s) => s < a.length ? M({ value: f }, { value: a[s] }).value : f
|
|
112
142
|
);
|
|
113
143
|
break;
|
|
114
144
|
case "replace":
|
|
@@ -121,31 +151,31 @@ function k(e, t, { arrayMergeStrategy: n, deepMerge: r } = {}) {
|
|
|
121
151
|
}
|
|
122
152
|
return o;
|
|
123
153
|
}
|
|
124
|
-
const
|
|
154
|
+
const he = (e) => JSON.parse(JSON.stringify(e)), $ = function(e) {
|
|
125
155
|
if (e == null || typeof e != "object")
|
|
126
156
|
return e;
|
|
127
157
|
if (Array.isArray(e))
|
|
128
|
-
return e.length ? e.map((n) =>
|
|
129
|
-
if (
|
|
158
|
+
return e.length ? e.map((n) => $(n)) : [];
|
|
159
|
+
if (L(e) === "Object") {
|
|
130
160
|
var t = {};
|
|
131
161
|
return Object.keys(e).forEach((n) => {
|
|
132
|
-
t[n] =
|
|
162
|
+
t[n] = $(e[n]);
|
|
133
163
|
}), t;
|
|
134
164
|
}
|
|
135
165
|
return e;
|
|
136
166
|
};
|
|
137
|
-
function
|
|
167
|
+
function me(e) {
|
|
138
168
|
return e.replace(/^-(\w)/g, (t, n) => n.toLocaleUpperCase());
|
|
139
169
|
}
|
|
140
|
-
function
|
|
170
|
+
function et(e) {
|
|
141
171
|
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
142
172
|
}
|
|
143
|
-
function
|
|
173
|
+
function tt(e, t = 2) {
|
|
144
174
|
for (var n = e + ""; n.length < t; )
|
|
145
175
|
n = "0" + n;
|
|
146
176
|
return n;
|
|
147
177
|
}
|
|
148
|
-
function
|
|
178
|
+
function nt(e, t = 2) {
|
|
149
179
|
if (e.length === 0 || !t) return [];
|
|
150
180
|
const n = [];
|
|
151
181
|
let r = [];
|
|
@@ -153,7 +183,7 @@ function Ye(e, t = 2) {
|
|
|
153
183
|
r.push(e[o]), r.length === t && (n.push(r), r = []);
|
|
154
184
|
return r.length > 0 && n.push(r), n;
|
|
155
185
|
}
|
|
156
|
-
function
|
|
186
|
+
function ot(e) {
|
|
157
187
|
let t = [];
|
|
158
188
|
for (const n in e)
|
|
159
189
|
Object.prototype.hasOwnProperty.call(e, n) && t.push({
|
|
@@ -163,68 +193,67 @@ function Be(e) {
|
|
|
163
193
|
});
|
|
164
194
|
return t;
|
|
165
195
|
}
|
|
166
|
-
function
|
|
196
|
+
function rt(e) {
|
|
167
197
|
let t = {};
|
|
168
198
|
return e.forEach((n) => {
|
|
169
199
|
t[n.value] = n.text;
|
|
170
200
|
}), t;
|
|
171
201
|
}
|
|
172
|
-
function
|
|
202
|
+
function lt(e) {
|
|
173
203
|
let t = new FormData();
|
|
174
204
|
return Object.entries(e).forEach(([n, r]) => {
|
|
175
205
|
t.append(n, r);
|
|
176
206
|
}), t;
|
|
177
207
|
}
|
|
178
|
-
function
|
|
208
|
+
function ye(e, t = {}) {
|
|
179
209
|
let { labelKey: n, valueKey: r, childrenKey: o, keepEmptyChildren: l } = t;
|
|
180
210
|
return n = n || "label", r = r || "value", o = o || "children", l = l !== !1, e.map((i) => {
|
|
181
|
-
const a = {
|
|
182
|
-
...i,
|
|
211
|
+
const a = S(m({}, i), {
|
|
183
212
|
label: i[n] || i.label || "",
|
|
184
213
|
// 默认值为空字符串
|
|
185
214
|
value: i[r] || i.value || "",
|
|
186
215
|
// 默认值为空字符串
|
|
187
216
|
text: i[r] || i.value || ""
|
|
188
217
|
// 默认值为空字符串
|
|
189
|
-
};
|
|
190
|
-
return i[o] && Array.isArray(i[o]) && (l || i[o].length) && (a.children =
|
|
218
|
+
});
|
|
219
|
+
return i[o] && Array.isArray(i[o]) && (l || i[o].length) && (a.children = ye(i[o], t)), a;
|
|
191
220
|
});
|
|
192
221
|
}
|
|
193
|
-
function
|
|
222
|
+
function it(e, t) {
|
|
194
223
|
if (!t) return e;
|
|
195
224
|
const n = e.indexOf(t);
|
|
196
225
|
return n === -1 ? e : e.filter((r, o) => o !== n);
|
|
197
226
|
}
|
|
198
|
-
function
|
|
227
|
+
function st(e, t) {
|
|
199
228
|
if (!t) return;
|
|
200
229
|
let n = e.indexOf(t);
|
|
201
230
|
n >= 0 && e.splice(n, 1);
|
|
202
231
|
}
|
|
203
|
-
function
|
|
232
|
+
function at(e) {
|
|
204
233
|
return e.filter((t) => t != null);
|
|
205
234
|
}
|
|
206
|
-
function
|
|
235
|
+
function ut(e) {
|
|
207
236
|
return e.filter((t) => !!t);
|
|
208
237
|
}
|
|
209
|
-
function
|
|
238
|
+
function ft(e) {
|
|
210
239
|
e.splice(0, e.length);
|
|
211
240
|
}
|
|
212
|
-
function
|
|
241
|
+
function ct(e, t) {
|
|
213
242
|
if (!e || !t || !e.length || !t.length) return !1;
|
|
214
243
|
var n = t.some((r) => e.includes(r));
|
|
215
244
|
return n;
|
|
216
245
|
}
|
|
217
|
-
function
|
|
246
|
+
function pt(e, t = 2) {
|
|
218
247
|
return n(e, t);
|
|
219
248
|
function n(r, o) {
|
|
220
249
|
return o--, r.map((l) => (o <= 0 ? delete l.children : l.children = l.children ? n(l.children, o) : [], l));
|
|
221
250
|
}
|
|
222
251
|
}
|
|
223
|
-
function
|
|
252
|
+
function dt(e, t = 1, n = !0) {
|
|
224
253
|
let r = [...e];
|
|
225
|
-
return t >= r.length && n ? r :
|
|
254
|
+
return t >= r.length && n ? r : ge(r).slice(0, t);
|
|
226
255
|
}
|
|
227
|
-
function
|
|
256
|
+
function ge(e) {
|
|
228
257
|
const t = [...e];
|
|
229
258
|
for (let n = t.length; --n; ) {
|
|
230
259
|
const r = Math.floor(Math.random() * (n + 1));
|
|
@@ -232,13 +261,13 @@ function fe(e) {
|
|
|
232
261
|
}
|
|
233
262
|
return t;
|
|
234
263
|
}
|
|
235
|
-
function
|
|
264
|
+
function ht(e, t) {
|
|
236
265
|
const [n, r, o] = t;
|
|
237
266
|
let l = {};
|
|
238
267
|
i(e, []);
|
|
239
268
|
function i(a, f) {
|
|
240
269
|
a.forEach((s, h) => {
|
|
241
|
-
let c =
|
|
270
|
+
let c = he(f);
|
|
242
271
|
if (c.push(h), Array.isArray(s))
|
|
243
272
|
i(s, c);
|
|
244
273
|
else {
|
|
@@ -249,26 +278,26 @@ function nt(e, t) {
|
|
|
249
278
|
}
|
|
250
279
|
return l;
|
|
251
280
|
}
|
|
252
|
-
function
|
|
281
|
+
function ve(e) {
|
|
253
282
|
return typeof e == "number" || /^[+-]?\d*(\.\d+)?$/.test(e);
|
|
254
283
|
}
|
|
255
|
-
function
|
|
256
|
-
return typeof e == "number" ? e + t : e + (
|
|
284
|
+
function w(e, t) {
|
|
285
|
+
return typeof e == "number" ? e + t : e + (ve(e) ? t : "");
|
|
257
286
|
}
|
|
258
|
-
function
|
|
259
|
-
return Math.floor(e / t * 100 * 10
|
|
287
|
+
function mt(e, t, n = 2) {
|
|
288
|
+
return Math.floor(e / t * 100 * F(10, n)) / F(10, n);
|
|
260
289
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
290
|
+
function we(e, t) {
|
|
291
|
+
return be(P(e).getDay(), t);
|
|
263
292
|
}
|
|
264
|
-
function
|
|
293
|
+
function be(e, t = 0) {
|
|
265
294
|
return typeof e == "string" && (e = parseInt(e)), [
|
|
266
295
|
["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期天"],
|
|
267
296
|
["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"]
|
|
268
297
|
][t][e];
|
|
269
298
|
}
|
|
270
299
|
function p(e, t = "YYYY-MM-DD") {
|
|
271
|
-
(typeof e == "number" || typeof e == "string") && (e =
|
|
300
|
+
(typeof e == "number" || typeof e == "string") && (e = P(e));
|
|
272
301
|
let n = {
|
|
273
302
|
"Y+": e.getFullYear(),
|
|
274
303
|
// 年
|
|
@@ -288,10 +317,10 @@ function p(e, t = "YYYY-MM-DD") {
|
|
|
288
317
|
(i = t.match(l)) && (i[0].length > 1 && n[o] < 10 ? t = t.replace(l, "0" + n[o]) : t = t.replace(l, n[o].toString()));
|
|
289
318
|
}), t;
|
|
290
319
|
}
|
|
291
|
-
function
|
|
320
|
+
function P(e) {
|
|
292
321
|
return e ? (typeof e == "string" && (e = e.replace(/\-/g, "/")), e = new Date(e), e.getTime() ? e : /* @__PURE__ */ new Date()) : /* @__PURE__ */ new Date();
|
|
293
322
|
}
|
|
294
|
-
function
|
|
323
|
+
function yt(e) {
|
|
295
324
|
let t = /* @__PURE__ */ new Date(), n = t.getDay(), r = t.getDate(), o = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date(), a = /* @__PURE__ */ new Date(), f = /* @__PURE__ */ new Date(), s, h, c = t.getFullYear(), d = t.getMonth();
|
|
296
325
|
return o = new Date(c, d, r - (n || 7) + 1), l = new Date(o), l.setDate(o.getDate() - 7), i = new Date(l), i.setDate(l.getDate() + 6), s = new Date(c, d, 1), h = new Date(c, d + 1, 0), a = new Date(c, d - 1, 1), f = new Date(c, d, 0), e && (t = p(t), o = p(o), l = p(l), i = p(i), s = p(s), h = p(h), a = p(a), f = p(f)), {
|
|
297
326
|
today: t,
|
|
@@ -304,16 +333,16 @@ function rt(e) {
|
|
|
304
333
|
lastMonthEnd: f
|
|
305
334
|
};
|
|
306
335
|
}
|
|
307
|
-
function
|
|
336
|
+
function gt(e, t, n) {
|
|
308
337
|
typeof e == "string" && (e = e.replace(/\-/g, "/"));
|
|
309
|
-
let r = 60 * 1e3, o = 60 * r, l = 24 * o, i = new Date(e), a = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), f = (/* @__PURE__ */ new Date()).toString().slice(0, 15) === i.toString().slice(0, 15), s =
|
|
310
|
-
return n = n || 7, c > n ? p(i, "MM月DD日 HH:mm") : c > 2 ? s + " " + p(i, "HH:mm") : c > 1 ? "前天 " + p(i, "HH:mm") : c > 0 ? "昨天 " + p(i, "HH:mm") : d >= 11 ? (f ? h : "昨天 ") + p(i, "HH:mm") : d >= 1 ? f ? d + "小时前" : "昨天 " + p(i, "HH:mm") :
|
|
338
|
+
let r = 60 * 1e3, o = 60 * r, l = 24 * o, i = new Date(e), a = (/* @__PURE__ */ new Date()).getTime() - i.getTime(), f = (/* @__PURE__ */ new Date()).toString().slice(0, 15) === i.toString().slice(0, 15), s = we(i), h = t ? "今天" : "", c = Math.floor(a / l), d = Math.floor(a / o), A = Math.floor(a / r);
|
|
339
|
+
return n = n || 7, c > n ? p(i, "MM月DD日 HH:mm") : c > 2 ? s + " " + p(i, "HH:mm") : c > 1 ? "前天 " + p(i, "HH:mm") : c > 0 ? "昨天 " + p(i, "HH:mm") : d >= 11 ? (f ? h : "昨天 ") + p(i, "HH:mm") : d >= 1 ? f ? d + "小时前" : "昨天 " + p(i, "HH:mm") : A >= 1 ? A + "分钟前" : "刚刚";
|
|
311
340
|
}
|
|
312
|
-
function
|
|
313
|
-
let n =
|
|
341
|
+
function vt(e, t) {
|
|
342
|
+
let n = P(e);
|
|
314
343
|
return p(n.setDate(n.getDate() + t));
|
|
315
344
|
}
|
|
316
|
-
function
|
|
345
|
+
function wt(e, t = 1e3) {
|
|
317
346
|
let n = null;
|
|
318
347
|
return function() {
|
|
319
348
|
let r = this, o = arguments;
|
|
@@ -322,25 +351,27 @@ function st(e, t = 1e3) {
|
|
|
322
351
|
}, t);
|
|
323
352
|
};
|
|
324
353
|
}
|
|
325
|
-
function
|
|
354
|
+
function bt(e, t = 1e3) {
|
|
326
355
|
let n;
|
|
327
356
|
return function() {
|
|
328
357
|
(!n || Date.now() - n > t) && (e.apply(this, arguments), n = Date.now());
|
|
329
358
|
};
|
|
330
359
|
}
|
|
331
|
-
function
|
|
360
|
+
function Dt(e, t = 1e3) {
|
|
332
361
|
let n;
|
|
333
|
-
return
|
|
334
|
-
|
|
335
|
-
|
|
362
|
+
return function(...r) {
|
|
363
|
+
return q(this, null, function* () {
|
|
364
|
+
if (!n || Date.now() - n > t)
|
|
365
|
+
return n = Date.now(), yield e.apply(this, r);
|
|
366
|
+
});
|
|
336
367
|
};
|
|
337
368
|
}
|
|
338
|
-
function
|
|
369
|
+
function De(e, t = []) {
|
|
339
370
|
Array.isArray(e) ? e.forEach((n) => {
|
|
340
371
|
n && typeof n == "function" && n.apply(void 0, t);
|
|
341
372
|
}) : e && typeof e == "function" && e.apply(void 0, t);
|
|
342
373
|
}
|
|
343
|
-
const
|
|
374
|
+
const Ct = {
|
|
344
375
|
cacheResult(e) {
|
|
345
376
|
let t = null, n = null;
|
|
346
377
|
return function(...r) {
|
|
@@ -348,74 +379,74 @@ const ft = {
|
|
|
348
379
|
};
|
|
349
380
|
}
|
|
350
381
|
};
|
|
351
|
-
function
|
|
382
|
+
function Ce(e) {
|
|
352
383
|
return e ? /^\[.*\]$/.test(e) : !1;
|
|
353
384
|
}
|
|
354
|
-
function
|
|
385
|
+
function $e(e) {
|
|
355
386
|
return e ? /^\{.*\}$/.test(e) : !1;
|
|
356
387
|
}
|
|
357
|
-
function
|
|
388
|
+
function Oe(e) {
|
|
358
389
|
return /^\/.+\/[img]{0,3}$/.test(e);
|
|
359
390
|
}
|
|
360
|
-
function
|
|
361
|
-
return typeof e == "string" ?
|
|
391
|
+
function $t(e) {
|
|
392
|
+
return typeof e == "string" ? Ce(e) ? JSON.parse(e || "[]") : [] : e || [];
|
|
362
393
|
}
|
|
363
|
-
function
|
|
364
|
-
return typeof e == "string" ?
|
|
394
|
+
function Ot(e) {
|
|
395
|
+
return typeof e == "string" ? $e(e) ? JSON.parse(e || "{}") : {} : e || {};
|
|
365
396
|
}
|
|
366
|
-
function
|
|
367
|
-
if (typeof e == "string" &&
|
|
397
|
+
function Et(e) {
|
|
398
|
+
if (typeof e == "string" && Oe(e)) {
|
|
368
399
|
let t = e.match(/^\/(.+)\/([img]{0,3})$/);
|
|
369
400
|
return new RegExp(t[1], t[2]);
|
|
370
401
|
} else
|
|
371
402
|
return new RegExp("");
|
|
372
403
|
}
|
|
373
|
-
function
|
|
404
|
+
function At(e, t = "i") {
|
|
374
405
|
return e = `^${e.replace(/\b|\B/g, ".*")}$`, new RegExp(e, t);
|
|
375
406
|
}
|
|
376
|
-
function
|
|
407
|
+
function _t(e) {
|
|
377
408
|
const t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), o = r.length, l = new Uint8Array(o);
|
|
378
409
|
for (let i = 0; i < o; i += 1)
|
|
379
410
|
l[i] = r.charCodeAt(i);
|
|
380
411
|
return new Blob([l], { type: n });
|
|
381
412
|
}
|
|
382
|
-
function
|
|
413
|
+
function xt(e) {
|
|
383
414
|
return e.install = (t) => {
|
|
384
415
|
let { name: n } = e;
|
|
385
|
-
t.component(n, e), t.component(
|
|
416
|
+
t.component(n, e), t.component(me("-" + n), e);
|
|
386
417
|
}, e;
|
|
387
418
|
}
|
|
388
|
-
function
|
|
389
|
-
return e ? typeof e == "function" ? e() || t :
|
|
419
|
+
function St(e, t = Y("div"), n) {
|
|
420
|
+
return e ? typeof e == "function" ? e() || t : Y(e, n && Me(n)) : t;
|
|
390
421
|
}
|
|
391
|
-
function
|
|
422
|
+
function Tt(e) {
|
|
392
423
|
return !!(e && e.$el && e.$props && e.$options && e.$emit);
|
|
393
424
|
}
|
|
394
|
-
function
|
|
395
|
-
let t =
|
|
425
|
+
function kt(e) {
|
|
426
|
+
let t = Ee(e);
|
|
396
427
|
t && (t.scrollTop = 0);
|
|
397
428
|
}
|
|
398
|
-
function
|
|
429
|
+
function Ee(e) {
|
|
399
430
|
return document.getElementById(e);
|
|
400
431
|
}
|
|
401
|
-
function
|
|
402
|
-
let t =
|
|
403
|
-
return
|
|
432
|
+
function Ae(e) {
|
|
433
|
+
let t = He(e);
|
|
434
|
+
return Tt(t) ? t.$el : t instanceof HTMLElement ? t : null;
|
|
404
435
|
}
|
|
405
|
-
function
|
|
436
|
+
function It(e, t) {
|
|
406
437
|
return getComputedStyle(e).getPropertyValue(t);
|
|
407
438
|
}
|
|
408
|
-
function
|
|
439
|
+
function Lt(e, t, n = !0) {
|
|
409
440
|
e.classList.remove(...t.split(" ")), n && e.classList.add(t);
|
|
410
441
|
}
|
|
411
|
-
const
|
|
442
|
+
const v = {
|
|
412
443
|
rootId: "app",
|
|
413
444
|
app: void 0
|
|
414
445
|
};
|
|
415
|
-
function
|
|
416
|
-
e.rootId && (
|
|
446
|
+
function Mt(e = {}) {
|
|
447
|
+
e.rootId && (v.rootId = e.rootId), e.app && (v.app = e.app);
|
|
417
448
|
}
|
|
418
|
-
const
|
|
449
|
+
const E = {
|
|
419
450
|
toast(e) {
|
|
420
451
|
},
|
|
421
452
|
alert(e) {
|
|
@@ -426,110 +457,110 @@ const $ = {
|
|
|
426
457
|
hideLoading() {
|
|
427
458
|
}
|
|
428
459
|
};
|
|
429
|
-
function
|
|
430
|
-
let t =
|
|
431
|
-
|
|
460
|
+
function Ht(e) {
|
|
461
|
+
let t = ce(v);
|
|
462
|
+
Mt(de(e, t)), M(E, I(e, t), {
|
|
432
463
|
deepMerge: !0,
|
|
433
464
|
arrayMergeStrategy: "concat"
|
|
434
465
|
});
|
|
435
466
|
}
|
|
436
|
-
function
|
|
437
|
-
|
|
467
|
+
function z(e) {
|
|
468
|
+
E.toast(e);
|
|
438
469
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
470
|
+
function Pt(e) {
|
|
471
|
+
E.alert(e);
|
|
441
472
|
}
|
|
442
|
-
const
|
|
473
|
+
const T = {
|
|
443
474
|
show(e = "") {
|
|
444
|
-
|
|
475
|
+
E.showLoading(e);
|
|
445
476
|
},
|
|
446
477
|
hide() {
|
|
447
|
-
|
|
478
|
+
E.hideLoading();
|
|
448
479
|
}
|
|
449
480
|
};
|
|
450
|
-
let
|
|
451
|
-
function
|
|
452
|
-
if (!e) return
|
|
453
|
-
e = typeof e == "number" ? e.toString() : e,
|
|
481
|
+
let ne = document.createElement("a");
|
|
482
|
+
function Nt(e, t = "未获取到联系电话") {
|
|
483
|
+
if (!e) return z(t);
|
|
484
|
+
e = typeof e == "number" ? e.toString() : e, ne.href = /^tel:.*/.test(e) ? e : "tel:" + e, ne.click();
|
|
454
485
|
}
|
|
455
|
-
const
|
|
486
|
+
const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
456
487
|
__proto__: null,
|
|
457
|
-
$:
|
|
458
|
-
$alert:
|
|
459
|
-
$loading:
|
|
460
|
-
$refDOM:
|
|
461
|
-
$toast:
|
|
462
|
-
Fn:
|
|
463
|
-
addUnit:
|
|
464
|
-
arrayToGroup:
|
|
465
|
-
base64ToBlob:
|
|
466
|
-
camelize:
|
|
467
|
-
cloneJSON:
|
|
468
|
-
dateGo:
|
|
469
|
-
dealTime:
|
|
470
|
-
debounce:
|
|
471
|
-
deepClone:
|
|
472
|
-
deleteItemForArr:
|
|
473
|
-
emptyArray:
|
|
474
|
-
entriesOf:
|
|
475
|
-
errorCatch:
|
|
476
|
-
extend:
|
|
488
|
+
$: Ee,
|
|
489
|
+
$alert: Pt,
|
|
490
|
+
$loading: T,
|
|
491
|
+
$refDOM: Ae,
|
|
492
|
+
$toast: z,
|
|
493
|
+
Fn: Ct,
|
|
494
|
+
addUnit: w,
|
|
495
|
+
arrayToGroup: nt,
|
|
496
|
+
base64ToBlob: _t,
|
|
497
|
+
camelize: me,
|
|
498
|
+
cloneJSON: he,
|
|
499
|
+
dateGo: vt,
|
|
500
|
+
dealTime: gt,
|
|
501
|
+
debounce: wt,
|
|
502
|
+
deepClone: $,
|
|
503
|
+
deleteItemForArr: st,
|
|
504
|
+
emptyArray: ft,
|
|
505
|
+
entriesOf: pe,
|
|
506
|
+
errorCatch: Ze,
|
|
507
|
+
extend: B,
|
|
477
508
|
formatDate: p,
|
|
478
|
-
formatSelectedData:
|
|
479
|
-
formatToSelectData:
|
|
480
|
-
getArrayDataIndex:
|
|
481
|
-
getDateConfig:
|
|
482
|
-
getElementPropertyValue:
|
|
483
|
-
getFuzzyMatchRegExp:
|
|
484
|
-
getPercentage:
|
|
485
|
-
getProperty:
|
|
486
|
-
getRandomElements:
|
|
487
|
-
getUniqueParam:
|
|
488
|
-
getWeek:
|
|
489
|
-
getWeekByNo:
|
|
490
|
-
hasSameItem:
|
|
491
|
-
isArrayString:
|
|
492
|
-
isFullUrl:
|
|
493
|
-
isNumber:
|
|
494
|
-
isObjectString:
|
|
495
|
-
isRegExpString:
|
|
496
|
-
isWebUrl:
|
|
497
|
-
kebabCase:
|
|
498
|
-
keysOf:
|
|
499
|
-
merge:
|
|
500
|
-
methodApply:
|
|
501
|
-
noop:
|
|
502
|
-
noopCatch:
|
|
503
|
-
padZero:
|
|
504
|
-
parseArray:
|
|
505
|
-
parseDate:
|
|
506
|
-
parseObject:
|
|
507
|
-
parseRegExp:
|
|
508
|
-
parseUrl:
|
|
509
|
-
pick:
|
|
510
|
-
pickEx:
|
|
511
|
-
queryParse:
|
|
512
|
-
queryStringify:
|
|
513
|
-
removeEmptyForArr:
|
|
514
|
-
removeFalseForArr:
|
|
515
|
-
removeItemForArr:
|
|
516
|
-
scrollToTop:
|
|
517
|
-
selectDataToObj:
|
|
518
|
-
shuffleArray:
|
|
519
|
-
telephoneCall:
|
|
520
|
-
throttle:
|
|
521
|
-
throttleAsync:
|
|
522
|
-
toFormData:
|
|
523
|
-
toSelectData:
|
|
524
|
-
toggleClass:
|
|
525
|
-
typeOf:
|
|
526
|
-
urlAddParams:
|
|
527
|
-
valuesOf:
|
|
528
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
529
|
-
function
|
|
530
|
-
return
|
|
531
|
-
|
|
532
|
-
}) : e.production ? Promise.resolve("Ignored in development environment!") : (
|
|
509
|
+
formatSelectedData: pt,
|
|
510
|
+
formatToSelectData: ye,
|
|
511
|
+
getArrayDataIndex: ht,
|
|
512
|
+
getDateConfig: yt,
|
|
513
|
+
getElementPropertyValue: It,
|
|
514
|
+
getFuzzyMatchRegExp: At,
|
|
515
|
+
getPercentage: mt,
|
|
516
|
+
getProperty: qe,
|
|
517
|
+
getRandomElements: dt,
|
|
518
|
+
getUniqueParam: ue,
|
|
519
|
+
getWeek: we,
|
|
520
|
+
getWeekByNo: be,
|
|
521
|
+
hasSameItem: ct,
|
|
522
|
+
isArrayString: Ce,
|
|
523
|
+
isFullUrl: Ke,
|
|
524
|
+
isNumber: ve,
|
|
525
|
+
isObjectString: $e,
|
|
526
|
+
isRegExpString: Oe,
|
|
527
|
+
isWebUrl: Be,
|
|
528
|
+
kebabCase: et,
|
|
529
|
+
keysOf: ce,
|
|
530
|
+
merge: M,
|
|
531
|
+
methodApply: De,
|
|
532
|
+
noop: ze,
|
|
533
|
+
noopCatch: Xe,
|
|
534
|
+
padZero: tt,
|
|
535
|
+
parseArray: $t,
|
|
536
|
+
parseDate: P,
|
|
537
|
+
parseObject: Ot,
|
|
538
|
+
parseRegExp: Et,
|
|
539
|
+
parseUrl: Ge,
|
|
540
|
+
pick: de,
|
|
541
|
+
pickEx: I,
|
|
542
|
+
queryParse: Ve,
|
|
543
|
+
queryStringify: fe,
|
|
544
|
+
removeEmptyForArr: at,
|
|
545
|
+
removeFalseForArr: ut,
|
|
546
|
+
removeItemForArr: it,
|
|
547
|
+
scrollToTop: kt,
|
|
548
|
+
selectDataToObj: rt,
|
|
549
|
+
shuffleArray: ge,
|
|
550
|
+
telephoneCall: Nt,
|
|
551
|
+
throttle: bt,
|
|
552
|
+
throttleAsync: Dt,
|
|
553
|
+
toFormData: lt,
|
|
554
|
+
toSelectData: ot,
|
|
555
|
+
toggleClass: Lt,
|
|
556
|
+
typeOf: L,
|
|
557
|
+
urlAddParams: Ye,
|
|
558
|
+
valuesOf: Qe
|
|
559
|
+
}, Symbol.toStringTag, { value: "Module" })), y = {};
|
|
560
|
+
function oe(e) {
|
|
561
|
+
return y[e.url] && y[e.url].status === 1 ? Promise.resolve("The resource is already loaded!") : y[e.url] && y[e.url].status === 2 ? new Promise((t, n) => {
|
|
562
|
+
y[e.url].waiters.push(t);
|
|
563
|
+
}) : e.production ? Promise.resolve("Ignored in development environment!") : (T.show("资源加载中"), y[e.url] ? y[e.url].status = 2 : y[e.url] = {
|
|
533
564
|
status: 2,
|
|
534
565
|
waiters: []
|
|
535
566
|
}, new Promise((t, n) => {
|
|
@@ -541,39 +572,39 @@ function X(e) {
|
|
|
541
572
|
let l = null;
|
|
542
573
|
e.type === "js" ? (l = document.createElement("script"), l.src = e.url, l.onload = r, l.onerror = o) : e.type === "css" && (l = document.createElement("link"), l.rel = "stylesheet", l.href = e.url, l.onload = r, l.onerror = o), l && document.head.appendChild(l);
|
|
543
574
|
function i() {
|
|
544
|
-
|
|
575
|
+
y[e.url].status = 1, T.hide(), t(e.url), De(y[e.url].waiters, [e.url]);
|
|
545
576
|
}
|
|
546
577
|
function a() {
|
|
547
|
-
|
|
578
|
+
y[e.url].status = 0, T.hide(), n(new Error("Failed to load " + e.url));
|
|
548
579
|
}
|
|
549
580
|
function f() {
|
|
550
581
|
l && (l.onload = null, l.onerror = null);
|
|
551
582
|
}
|
|
552
583
|
}));
|
|
553
584
|
}
|
|
554
|
-
function
|
|
555
|
-
return Array.isArray(e) ? Promise.all(e.map((t) =>
|
|
585
|
+
function an(e) {
|
|
586
|
+
return Array.isArray(e) ? Promise.all(e.map((t) => oe(t))) : oe(e);
|
|
556
587
|
}
|
|
557
|
-
class
|
|
558
|
-
component;
|
|
559
|
-
appDOM;
|
|
560
|
-
instance;
|
|
561
|
-
container;
|
|
562
|
-
properties;
|
|
588
|
+
class Ut {
|
|
563
589
|
constructor(t, n) {
|
|
590
|
+
C(this, "component");
|
|
591
|
+
C(this, "appDOM");
|
|
592
|
+
C(this, "instance");
|
|
593
|
+
C(this, "container");
|
|
594
|
+
C(this, "properties");
|
|
564
595
|
this.properties = n, this.component = t, this.container = document.createElement("div");
|
|
565
|
-
const r =
|
|
566
|
-
|
|
596
|
+
const r = k(t, this.properties);
|
|
597
|
+
v.app && (r.appContext = v.app._context), Pe(r, this.container), this.instance = r.component, this.appDOM = this.container.firstChild, this.init();
|
|
567
598
|
}
|
|
568
599
|
init() {
|
|
569
|
-
this.properties.teleport ? this.properties.teleport :
|
|
600
|
+
this.properties.teleport ? this.properties.teleport : v.rootId, this.appDOM && !this.appDOM.nodeName.startsWith("#") && document.body.appendChild(this.appDOM);
|
|
570
601
|
}
|
|
571
602
|
// 声明静态方法
|
|
572
603
|
static use(t) {
|
|
573
|
-
Object.assign(
|
|
604
|
+
Object.assign(v, t);
|
|
574
605
|
}
|
|
575
606
|
unmount() {
|
|
576
|
-
this.properties.teleport ? this.properties.teleport :
|
|
607
|
+
this.properties.teleport ? this.properties.teleport : v.rootId, document.body.removeChild(this.appDOM), this.instance.unmount();
|
|
577
608
|
}
|
|
578
609
|
close() {
|
|
579
610
|
this.toggle(!1);
|
|
@@ -582,14 +613,14 @@ class _t {
|
|
|
582
613
|
t ? this.instance.open(n) : this.instance.close(n);
|
|
583
614
|
}
|
|
584
615
|
}
|
|
585
|
-
|
|
616
|
+
k(Ne, null, [k("div", {
|
|
586
617
|
class: "dialog"
|
|
587
618
|
}, null)]);
|
|
588
|
-
const
|
|
619
|
+
const re = {
|
|
589
620
|
show: !1,
|
|
590
621
|
// 扩展
|
|
591
622
|
keepAlive: !1
|
|
592
|
-
},
|
|
623
|
+
}, X = /* @__PURE__ */ H({
|
|
593
624
|
name: "comfy-tool-layer",
|
|
594
625
|
components: {},
|
|
595
626
|
emits: ["confirm", "close", "cancel"],
|
|
@@ -599,18 +630,14 @@ const Z = {
|
|
|
599
630
|
slots: r,
|
|
600
631
|
expose: o
|
|
601
632
|
}) {
|
|
602
|
-
const l =
|
|
633
|
+
const l = ee(null), i = ee(null), a = Re(!0);
|
|
603
634
|
let f;
|
|
604
|
-
const s =
|
|
605
|
-
...Z,
|
|
606
|
-
...t,
|
|
607
|
-
...e
|
|
608
|
-
}), h = {
|
|
635
|
+
const s = Ue(m(m(m({}, re), t), e)), h = {
|
|
609
636
|
onConfirm() {
|
|
610
637
|
},
|
|
611
638
|
onClose() {
|
|
612
639
|
}
|
|
613
|
-
}, c =
|
|
640
|
+
}, c = k("div", {
|
|
614
641
|
style: {
|
|
615
642
|
height: "150px"
|
|
616
643
|
}
|
|
@@ -618,74 +645,72 @@ const Z = {
|
|
|
618
645
|
function d(u) {
|
|
619
646
|
s.show = u;
|
|
620
647
|
}
|
|
621
|
-
function
|
|
622
|
-
return f =
|
|
623
|
-
...s.contentProps,
|
|
648
|
+
function A() {
|
|
649
|
+
return f = St(i.value, c, S(m({}, s.contentProps), {
|
|
624
650
|
LAYERSHOW: s.show
|
|
625
|
-
}), f;
|
|
651
|
+
})), f;
|
|
626
652
|
}
|
|
627
|
-
function
|
|
653
|
+
function _e() {
|
|
628
654
|
let u;
|
|
629
|
-
return !s.keepAlive && !s.show && !a.value ? u = () => c : u = r.default ? r.default :
|
|
655
|
+
return !s.keepAlive && !s.show && !a.value ? u = () => c : u = r.default ? r.default : A, () => u();
|
|
630
656
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
657
|
+
function xe() {
|
|
658
|
+
D.cancel();
|
|
633
659
|
}
|
|
634
|
-
function
|
|
660
|
+
function _(u) {
|
|
635
661
|
if (f && f.component) {
|
|
636
662
|
let {
|
|
637
|
-
ctx:
|
|
638
|
-
exposed:
|
|
663
|
+
ctx: O,
|
|
664
|
+
exposed: j
|
|
639
665
|
} = f.component;
|
|
640
|
-
|
|
666
|
+
j && j[u] ? j[u]() : O && O[u] && O[u]();
|
|
641
667
|
}
|
|
642
668
|
}
|
|
643
|
-
let
|
|
644
|
-
function
|
|
645
|
-
s.show = u, s.show || s.keepAlive ? (a.value = !0,
|
|
669
|
+
let x;
|
|
670
|
+
function U(u) {
|
|
671
|
+
s.show = u, s.show || s.keepAlive ? (a.value = !0, x && clearTimeout(x), x = null) : x = setTimeout(() => {
|
|
646
672
|
a.value = !1;
|
|
647
|
-
}, 500),
|
|
648
|
-
s.show && (
|
|
673
|
+
}, 500), Fe(() => {
|
|
674
|
+
s.show && (_("onLayerShow"), _("queryData"));
|
|
649
675
|
});
|
|
650
676
|
}
|
|
651
|
-
const
|
|
652
|
-
init(u = {},
|
|
653
|
-
|
|
677
|
+
const D = {
|
|
678
|
+
init(u = {}, O = re) {
|
|
679
|
+
B(s, O, u && I(u, ["content", "baseContent"])), u.onConfirm && (h.onConfirm = u.onConfirm), u.onClose && (h.onClose = u.onClose), u.baseContent && (l.value = u.baseContent), i.value = u.content;
|
|
654
680
|
},
|
|
655
681
|
open(u) {
|
|
656
|
-
|
|
682
|
+
D.init(u, {}), U(!0);
|
|
657
683
|
},
|
|
658
684
|
confirm(u) {
|
|
659
|
-
n("confirm"),
|
|
685
|
+
n("confirm"), U(!!h.onConfirm(u, D.close));
|
|
660
686
|
},
|
|
661
687
|
close(u = "complete") {
|
|
662
|
-
h.onClose(u), n("close"),
|
|
688
|
+
h.onClose(u), n("close"), U(!1), _("onClose");
|
|
663
689
|
},
|
|
664
690
|
cancel() {
|
|
665
|
-
|
|
691
|
+
D.close("cancel"), n("cancel"), _("onCancel");
|
|
666
692
|
}
|
|
667
693
|
};
|
|
668
|
-
return
|
|
669
|
-
|
|
670
|
-
}), o(
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
}) : "";
|
|
694
|
+
return je(() => t, (u) => {
|
|
695
|
+
B(s, {}, u);
|
|
696
|
+
}), o(D), We("Layer", D), () => {
|
|
697
|
+
var u;
|
|
698
|
+
return l.value ? Y(l.value, S(m(m(m({
|
|
699
|
+
class: ["comfy-tool--layer", (u = s.class) != null ? u : ""],
|
|
700
|
+
style: m({}, s.style)
|
|
701
|
+
}, t), s.baseContentProps), I(s, ["show", "content", "contentProps", "onClose", "width", "height", "class", "style", "baseContent", "baseContentProps"])), {
|
|
702
|
+
show: s.show,
|
|
703
|
+
"onUpdate:show": d,
|
|
704
|
+
onClose: xe
|
|
705
|
+
}), {
|
|
706
|
+
default: _e(),
|
|
707
|
+
overlayContent: r.overlayContent
|
|
708
|
+
}) : "";
|
|
709
|
+
};
|
|
685
710
|
}
|
|
686
711
|
});
|
|
687
|
-
var
|
|
688
|
-
class
|
|
712
|
+
var b;
|
|
713
|
+
class N extends Ut {
|
|
689
714
|
constructor(t, n) {
|
|
690
715
|
super(t, n);
|
|
691
716
|
}
|
|
@@ -693,55 +718,54 @@ class M extends _t {
|
|
|
693
718
|
return this.appDOM && document.body.appendChild(this.appDOM), this.instance.exposed.open(t);
|
|
694
719
|
}
|
|
695
720
|
static create(t = {}, n = !0) {
|
|
696
|
-
if (!
|
|
697
|
-
let r = new
|
|
721
|
+
if (!b || n) {
|
|
722
|
+
let r = new N(X, t);
|
|
698
723
|
if (n) return r;
|
|
699
|
-
|
|
724
|
+
b || (b = r);
|
|
700
725
|
} else
|
|
701
|
-
|
|
702
|
-
return
|
|
726
|
+
b.instance.exposed.init(t);
|
|
727
|
+
return b;
|
|
703
728
|
}
|
|
704
729
|
}
|
|
705
|
-
function
|
|
730
|
+
function R(e, t = !1) {
|
|
706
731
|
return new Promise((n, r) => {
|
|
707
|
-
|
|
732
|
+
N.create({}, t).open(m({
|
|
708
733
|
onConfirm(o, l) {
|
|
709
734
|
n(o);
|
|
710
735
|
},
|
|
711
736
|
onClose(o) {
|
|
712
737
|
r(o);
|
|
713
|
-
}
|
|
714
|
-
|
|
715
|
-
});
|
|
738
|
+
}
|
|
739
|
+
}, e));
|
|
716
740
|
});
|
|
717
741
|
}
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
742
|
+
R.create = N.create;
|
|
743
|
+
R.close = () => {
|
|
744
|
+
b && b.close();
|
|
721
745
|
};
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
const
|
|
746
|
+
R.Component = xt(X);
|
|
747
|
+
R.Component = X;
|
|
748
|
+
const jt = {
|
|
725
749
|
mounted(e, t, n, r) {
|
|
726
750
|
typeof t.value == "function" && t.value(e);
|
|
727
751
|
},
|
|
728
752
|
unmounted(e, t, n, r) {
|
|
729
753
|
typeof t.value == "function" && t.value(null);
|
|
730
754
|
}
|
|
731
|
-
},
|
|
755
|
+
}, Wt = {
|
|
732
756
|
mounted(e, t, n, r) {
|
|
733
757
|
e.focus();
|
|
734
758
|
},
|
|
735
759
|
updated(e, t, n, r) {
|
|
736
760
|
}
|
|
737
|
-
},
|
|
761
|
+
}, Ft = function(t, n, r, o) {
|
|
738
762
|
t.style.height = t.parentElement.offsetHeight + "px", t.style.minHeight = "100%";
|
|
739
763
|
};
|
|
740
|
-
function
|
|
764
|
+
function Vt(e, t, n, r) {
|
|
741
765
|
if (t.value.__used) return;
|
|
742
|
-
let o = {
|
|
766
|
+
let o = m({}, t.value);
|
|
743
767
|
if (o.behavior = o.behavior || "smooth", typeof o.right == "number" && (o.left = e.scrollWidth - o.right), typeof o.bottom == "number" && (o.top = e.scrollHeight - o.bottom), o.target) {
|
|
744
|
-
let l =
|
|
768
|
+
let l = Ae(o.target);
|
|
745
769
|
if (l) {
|
|
746
770
|
let { offsetTop: i, offsetLeft: a } = l.offsetParent || { offsetTop: 0, offsetLeft: 0 };
|
|
747
771
|
o.left = l.offsetLeft - e.offsetLeft + a, o.top = l.offsetTop - e.offsetTop + i;
|
|
@@ -755,20 +779,20 @@ function kt(e, t, n, r) {
|
|
|
755
779
|
e.scrollTo(o);
|
|
756
780
|
}, o, e) : e.scrollTo(o);
|
|
757
781
|
}
|
|
758
|
-
const
|
|
759
|
-
dom:
|
|
760
|
-
focus:
|
|
761
|
-
maxHeight:
|
|
762
|
-
scroll:
|
|
782
|
+
const le = Symbol("INSTALLED_KEY"), ie = Symbol("COMPONENT_INSTALLED_KEY"), se = Symbol("DIRECTIVES_INSTALLED_KEY"), V = {
|
|
783
|
+
dom: jt,
|
|
784
|
+
focus: Wt,
|
|
785
|
+
maxHeight: Ft,
|
|
786
|
+
scroll: Vt
|
|
763
787
|
};
|
|
764
|
-
function
|
|
765
|
-
if (!e[
|
|
766
|
-
e[
|
|
767
|
-
for (const t of Object.keys(
|
|
768
|
-
e.directive(
|
|
788
|
+
function Yt(e) {
|
|
789
|
+
if (!e[se]) {
|
|
790
|
+
e[se] = !0;
|
|
791
|
+
for (const t of Object.keys(V))
|
|
792
|
+
e.directive(V[t].name || t, V[t]);
|
|
769
793
|
}
|
|
770
794
|
}
|
|
771
|
-
const
|
|
795
|
+
const Bt = H({
|
|
772
796
|
name: "column",
|
|
773
797
|
inheritAttrs: !1,
|
|
774
798
|
props: {
|
|
@@ -784,26 +808,26 @@ const Lt = I({
|
|
|
784
808
|
},
|
|
785
809
|
setup() {
|
|
786
810
|
}
|
|
787
|
-
}),
|
|
811
|
+
}), Z = (e, t) => {
|
|
788
812
|
const n = e.__vccOpts || e;
|
|
789
813
|
for (const [r, o] of t)
|
|
790
814
|
n[r] = o;
|
|
791
815
|
return n;
|
|
792
|
-
},
|
|
793
|
-
function
|
|
794
|
-
return
|
|
816
|
+
}, Kt = { class: "main-content" };
|
|
817
|
+
function Gt(e, t, n, r, o, l) {
|
|
818
|
+
return G(), K("div", J({
|
|
795
819
|
class: ["layoututil_column", { reverse: e.reverse }]
|
|
796
820
|
}, e.$attrs), [
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
821
|
+
g(e.$slots, "before"),
|
|
822
|
+
g(e.$slots, "before-content"),
|
|
823
|
+
ae("div", Kt, [
|
|
824
|
+
g(e.$slots, "default")
|
|
801
825
|
]),
|
|
802
|
-
|
|
803
|
-
|
|
826
|
+
g(e.$slots, "after-content"),
|
|
827
|
+
g(e.$slots, "after")
|
|
804
828
|
], 16);
|
|
805
829
|
}
|
|
806
|
-
const
|
|
830
|
+
const Jt = /* @__PURE__ */ Z(Bt, [["render", Gt]]), zt = H({
|
|
807
831
|
name: "row",
|
|
808
832
|
inheritAttrs: !1,
|
|
809
833
|
props: {
|
|
@@ -819,21 +843,21 @@ const Pt = /* @__PURE__ */ K(Lt, [["render", Ht]]), Nt = I({
|
|
|
819
843
|
},
|
|
820
844
|
setup() {
|
|
821
845
|
}
|
|
822
|
-
}),
|
|
823
|
-
function
|
|
824
|
-
return
|
|
846
|
+
}), Xt = { class: "main-content" };
|
|
847
|
+
function Zt(e, t, n, r, o, l) {
|
|
848
|
+
return G(), K("div", J({
|
|
825
849
|
class: ["layoututil_row", { reverse: e.reverse }]
|
|
826
850
|
}, e.$attrs), [
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
851
|
+
g(e.$slots, "before"),
|
|
852
|
+
g(e.$slots, "before-content"),
|
|
853
|
+
ae("div", Xt, [
|
|
854
|
+
g(e.$slots, "default")
|
|
831
855
|
]),
|
|
832
|
-
|
|
833
|
-
|
|
856
|
+
g(e.$slots, "after-content"),
|
|
857
|
+
g(e.$slots, "after")
|
|
834
858
|
], 16);
|
|
835
859
|
}
|
|
836
|
-
const
|
|
860
|
+
const Qt = /* @__PURE__ */ Z(zt, [["render", Zt]]), qt = H({
|
|
837
861
|
name: "expended",
|
|
838
862
|
inheritAttrs: !1,
|
|
839
863
|
props: {
|
|
@@ -865,45 +889,45 @@ const jt = /* @__PURE__ */ K(Nt, [["render", Ut]]), Wt = I({
|
|
|
865
889
|
t.flex = e.flex;
|
|
866
890
|
break;
|
|
867
891
|
}
|
|
868
|
-
return e.minWidth && (t.minWidth =
|
|
892
|
+
return e.minWidth && (t.minWidth = w(e.minWidth, "px")), e.minHeight && (t.minHeight = w(e.minHeight, "px")), e.maxWidth && (t.maxWidth = w(e.maxWidth, "px")), e.maxHeight && (t.maxHeight = w(e.maxHeight, "px")), e.width && (t.width = w(e.width, "px")), e.height && (t.height = w(e.height, "px")), e.column ? n.push("u-flex-nowrap u-box-flex-col") : e.row && n.push("u-flex-wrap"), {
|
|
869
893
|
style: t,
|
|
870
894
|
className: n
|
|
871
895
|
};
|
|
872
896
|
}
|
|
873
897
|
});
|
|
874
|
-
function
|
|
875
|
-
return
|
|
898
|
+
function en(e, t, n, r, o, l) {
|
|
899
|
+
return G(), K("div", J({
|
|
876
900
|
class: ["layoututil_expended", e.className],
|
|
877
901
|
style: e.style
|
|
878
902
|
}, e.$attrs), [
|
|
879
|
-
|
|
903
|
+
g(e.$slots, "default")
|
|
880
904
|
], 16);
|
|
881
905
|
}
|
|
882
|
-
const
|
|
883
|
-
column:
|
|
884
|
-
row:
|
|
885
|
-
expended:
|
|
906
|
+
const tn = /* @__PURE__ */ Z(qt, [["render", en]]), nn = {
|
|
907
|
+
column: Jt,
|
|
908
|
+
row: Qt,
|
|
909
|
+
expended: tn
|
|
886
910
|
};
|
|
887
|
-
function
|
|
888
|
-
e[
|
|
911
|
+
function on(e) {
|
|
912
|
+
e[ie] || (e[ie] = !0, pe(nn).forEach(([t, n]) => {
|
|
889
913
|
e.component(t, n);
|
|
890
914
|
}));
|
|
891
915
|
}
|
|
892
|
-
const
|
|
893
|
-
function
|
|
894
|
-
|
|
916
|
+
const un = "1.0.3", fn = Rt;
|
|
917
|
+
function rn(e) {
|
|
918
|
+
Ht({ app: e }), Yt(e), on(e);
|
|
895
919
|
}
|
|
896
|
-
const
|
|
920
|
+
const cn = {
|
|
897
921
|
install(e) {
|
|
898
|
-
e[
|
|
922
|
+
e[le] || (e[le] = !0, rn(e));
|
|
899
923
|
}
|
|
900
924
|
};
|
|
901
925
|
export {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
926
|
+
fn as ComfyTool,
|
|
927
|
+
R as Layer,
|
|
928
|
+
Ht as configComfyTool,
|
|
929
|
+
cn as default,
|
|
930
|
+
an as resourceLoader,
|
|
931
|
+
rn as useComfyTool,
|
|
932
|
+
un as version
|
|
909
933
|
};
|