ss-component-new 1.1.16 → 1.1.18
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/array-DLhSgLgc.js +3394 -0
- package/dist/{index-hjkvqVVf.js → index-BFdnTJMh.js} +1 -1
- package/dist/{index-CeOZHsL0.js → index-DM0qZDHo.js} +3 -3
- package/dist/{index-CNi8ZfN3.js → index-DjrQsQms.js} +41 -41
- package/dist/index-MSbODhhD.js +3282 -0
- package/dist/{main-BoW2J7gM.js → main-U3be2-RR.js} +3 -3
- package/dist/{menu-3a4UTvU1.js → menu-hS9inuNL.js} +1 -0
- package/dist/{modelComp-CFwQm9Yp.js → modelComp-Eh2O6nl8.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component.umd.cjs +16 -16
- package/package.json +2 -1
- package/dist/array-Dm3HqOxD.js +0 -3434
- package/dist/index-CKbmw71j.js +0 -3102
|
@@ -0,0 +1,3394 @@
|
|
|
1
|
+
import { ref as U, onMounted as $n, watch as pe, createElementBlock as Z, openBlock as K, createElementVNode as j, createBlock as Pe, createVNode as Q, Fragment as Ue, renderList as Be, normalizeStyle as $t, toDisplayString as G, createSlots as Ln, withCtx as ie, createCommentVNode as en, resolveComponent as Ke, createTextVNode as Fe, unref as tn, resolveDynamicComponent as kt } from "vue";
|
|
2
|
+
import { g as qn, a as In, d as nn, c as k, _ as Se, s as Ee, E as Jn, u as zn } from "./menu-hS9inuNL.js";
|
|
3
|
+
import { u as Ze } from "./modelComp-Eh2O6nl8.js";
|
|
4
|
+
import { s as _e, a as Hn, b as Qe, E as Oe } from "./index-MSbODhhD.js";
|
|
5
|
+
const Lt = (e, t) => {
|
|
6
|
+
const n = e.storage || sessionStorage, r = e.key || t.$id;
|
|
7
|
+
if (e.paths) {
|
|
8
|
+
const o = e.paths.reduce((s, a) => (s[a] = t.$state[a], s), {});
|
|
9
|
+
n.setItem(r, JSON.stringify(o));
|
|
10
|
+
} else
|
|
11
|
+
n.setItem(r, JSON.stringify(t.$state));
|
|
12
|
+
};
|
|
13
|
+
var Mn = ({ options: e, store: t }) => {
|
|
14
|
+
var n, r, o, s;
|
|
15
|
+
if ((n = e.persist) != null && n.enabled) {
|
|
16
|
+
const a = [{
|
|
17
|
+
key: t.$id,
|
|
18
|
+
storage: sessionStorage
|
|
19
|
+
}], l = (o = (r = e.persist) == null ? void 0 : r.strategies) != null && o.length ? (s = e.persist) == null ? void 0 : s.strategies : a;
|
|
20
|
+
l.forEach((d) => {
|
|
21
|
+
const p = d.storage || sessionStorage, m = d.key || t.$id, c = p.getItem(m);
|
|
22
|
+
c && (t.$patch(JSON.parse(c)), Lt(d, t));
|
|
23
|
+
}), t.$subscribe(() => {
|
|
24
|
+
l.forEach((d) => {
|
|
25
|
+
Lt(d, t);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const de = qn() || In();
|
|
31
|
+
de.use(Mn);
|
|
32
|
+
const rn = nn("formToTableComp", {
|
|
33
|
+
state: () => ({
|
|
34
|
+
selectArray: [],
|
|
35
|
+
selectString: ""
|
|
36
|
+
}),
|
|
37
|
+
actions: {
|
|
38
|
+
setSelectArray(e) {
|
|
39
|
+
this.selectArray = e;
|
|
40
|
+
},
|
|
41
|
+
setSelectString(e) {
|
|
42
|
+
this.selectString = e;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}), Vn = nn("unit", {
|
|
46
|
+
state: () => ({
|
|
47
|
+
selectIndex: "",
|
|
48
|
+
selectMenu: "",
|
|
49
|
+
selectTitle: ""
|
|
50
|
+
}),
|
|
51
|
+
actions: {
|
|
52
|
+
setSelectIndex(e) {
|
|
53
|
+
this.selectIndex = e;
|
|
54
|
+
},
|
|
55
|
+
setSelectMenu(e) {
|
|
56
|
+
this.selectMenu = e;
|
|
57
|
+
},
|
|
58
|
+
setSelectTitle(e) {
|
|
59
|
+
this.selectTitle = e;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}), Kn = (e, t) => {
|
|
63
|
+
const n = t == null ? void 0 : t.split("-");
|
|
64
|
+
return on(e, n);
|
|
65
|
+
}, on = (e, t) => {
|
|
66
|
+
var o;
|
|
67
|
+
let n = e, r = t;
|
|
68
|
+
return Array.isArray(n) ? n = n == null ? void 0 : n[parseInt(k(r == null ? void 0 : r[0]))] : Array.isArray(n == null ? void 0 : n.children) && (n = (o = n == null ? void 0 : n.children) == null ? void 0 : o[parseInt(k(r == null ? void 0 : r[0]))]), r == null || r.shift(), (r == null ? void 0 : r.length) > 0 && (n = on(n, r)), n;
|
|
69
|
+
}, sn = (e, t) => {
|
|
70
|
+
let n = e, r = t == null ? void 0 : t.filter((o) => (o == null ? void 0 : o.prop) !== "index");
|
|
71
|
+
return Array.isArray(n) && (n = n == null ? void 0 : n.map((o, s) => {
|
|
72
|
+
if (Array.isArray(o)) {
|
|
73
|
+
let a = {};
|
|
74
|
+
return o = o == null ? void 0 : o.forEach((l, d) => {
|
|
75
|
+
var p;
|
|
76
|
+
(p = r == null ? void 0 : r[d]) != null && p.prop ? a[r[d].prop] = l : Array.isArray(l) && (a.children = sn(l, r));
|
|
77
|
+
}), Object.assign(a, { id: s });
|
|
78
|
+
} else
|
|
79
|
+
return o;
|
|
80
|
+
})), n;
|
|
81
|
+
}, Wn = { class: "table-content" }, Gn = { class: "extra-header" }, Xn = ["onClick"], Zn = ["onClick"], Qn = {
|
|
82
|
+
key: 0,
|
|
83
|
+
class: "dialog-footer"
|
|
84
|
+
}, Yn = {
|
|
85
|
+
__name: "index",
|
|
86
|
+
props: {
|
|
87
|
+
itemData: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: () => []
|
|
90
|
+
},
|
|
91
|
+
childItemData: {
|
|
92
|
+
type: Array,
|
|
93
|
+
default: () => []
|
|
94
|
+
},
|
|
95
|
+
index: Number
|
|
96
|
+
},
|
|
97
|
+
emits: ["change", "contentChange"],
|
|
98
|
+
setup(e, { emit: t }) {
|
|
99
|
+
const n = e, r = t, o = U([]), s = U([]), a = U(""), l = U(), d = U(!0), p = U(0), m = U(!1), c = U(""), R = U(!1), T = U([]), g = U(!1), _ = U([]), u = U([]), h = U(), y = U(), S = rn(de), v = Vn(de), { selectIndex: b, selectMenu: E } = Ee(v), { selectString: w } = Ee(S), C = U(720), P = () => {
|
|
100
|
+
R.value = !1;
|
|
101
|
+
}, O = (i) => {
|
|
102
|
+
var N, J;
|
|
103
|
+
X(i), i != null && i.children && Array.isArray(i == null ? void 0 : i.children) && (v.setSelectMenu(E.value === "" ? (N = i == null ? void 0 : i.id) == null ? void 0 : N.toString() : E.value + "-" + ((J = i == null ? void 0 : i.id) == null ? void 0 : J.toString())), v.setSelectIndex(n != null && n.index ? n == null ? void 0 : n.index.toString() : ""));
|
|
104
|
+
}, X = (i) => {
|
|
105
|
+
var N, J, x;
|
|
106
|
+
if (i != null && i.children && Array.isArray(i == null ? void 0 : i.children)) {
|
|
107
|
+
let $ = [];
|
|
108
|
+
const q = (N = k(h.value)) == null ? void 0 : N.filter((I) => (I == null ? void 0 : I.prop) !== "index");
|
|
109
|
+
(J = i == null ? void 0 : i.children) == null || J.forEach((I, M) => {
|
|
110
|
+
if (!Array.isArray(I))
|
|
111
|
+
$.push(I);
|
|
112
|
+
else {
|
|
113
|
+
let ee = {};
|
|
114
|
+
I == null || I.forEach((he, se) => {
|
|
115
|
+
var ae;
|
|
116
|
+
(ae = q == null ? void 0 : q[se]) != null && ae.prop ? ee[q[se].prop] = he : Array.isArray(he) && (ee.children = he);
|
|
117
|
+
}), $.push(Object.assign(ee, { id: M }));
|
|
118
|
+
}
|
|
119
|
+
}), o.value = (x = k(o.value)) == null ? void 0 : x.filter((I) => (I == null ? void 0 : I.prop) !== "index"), s.value = $;
|
|
120
|
+
}
|
|
121
|
+
}, D = (i, N) => {
|
|
122
|
+
var J, x;
|
|
123
|
+
if (a.value = "", g.value = !0, d.value = !0, i === "删除") {
|
|
124
|
+
const $ = (J = k(s.value)) == null ? void 0 : J.filter((q) => (q == null ? void 0 : q.id) === (N == null ? void 0 : N.id));
|
|
125
|
+
s.value = (x = k(s.value)) == null ? void 0 : x.filter((q) => (q == null ? void 0 : q.id) !== (N == null ? void 0 : N.id)), H(), r("change", {
|
|
126
|
+
content: $,
|
|
127
|
+
index: n == null ? void 0 : n.index,
|
|
128
|
+
buttonName: i
|
|
129
|
+
});
|
|
130
|
+
} else i === "新增" ? (c.value = "新增", L(""), R.value = !0) : i === "编辑" ? (c.value = "编辑", L(N), R.value = !0) : i === "详情" && (c.value = "详情", L(N), g.value = !1, d.value = !1, R.value = !0);
|
|
131
|
+
}, L = (i) => {
|
|
132
|
+
var J;
|
|
133
|
+
const N = [];
|
|
134
|
+
(J = k(o.value)) == null || J.forEach((x, $) => {
|
|
135
|
+
x.label !== "" && (x == null ? void 0 : x.label) !== "操作" && N.push({
|
|
136
|
+
label: (x == null ? void 0 : x.label) ?? "",
|
|
137
|
+
name: (x == null ? void 0 : x.prop) ?? "t" + $,
|
|
138
|
+
type: !(x != null && x.type) || (x == null ? void 0 : x.type) === "" ? "Input" : x == null ? void 0 : x.type,
|
|
139
|
+
value: (i == null ? void 0 : i[x == null ? void 0 : x.prop]) ?? "",
|
|
140
|
+
id: (x == null ? void 0 : x.id) ?? $,
|
|
141
|
+
contents: (x == null ? void 0 : x.options) ?? [],
|
|
142
|
+
width: 1
|
|
143
|
+
});
|
|
144
|
+
}), i === "" || !i || (a.value = i == null ? void 0 : i.id), u.value = N;
|
|
145
|
+
};
|
|
146
|
+
$n(() => {
|
|
147
|
+
});
|
|
148
|
+
const z = () => {
|
|
149
|
+
let i = k(s.value);
|
|
150
|
+
a.value === "" ? (p.value++, i.push(Object.assign(y.value, { id: p.value }))) : i = i == null ? void 0 : i.map((N) => ((N == null ? void 0 : N.id) === a.value && (N = Object.assign(N, y.value)), N)), s.value = i, H(), R.value = !1, r("change", {
|
|
151
|
+
content: i == null ? void 0 : i[i.length - 1],
|
|
152
|
+
index: n == null ? void 0 : n.index,
|
|
153
|
+
buttonName: c.value
|
|
154
|
+
});
|
|
155
|
+
}, H = () => {
|
|
156
|
+
let i = k(n.itemData);
|
|
157
|
+
i = i == null ? void 0 : i.map((N) => ((N == null ? void 0 : N.key) === "tableContents" && (N.contents = s.value), N)), r("contentChange", {
|
|
158
|
+
contents: i,
|
|
159
|
+
index: n.index
|
|
160
|
+
});
|
|
161
|
+
}, V = (i) => {
|
|
162
|
+
y.value = i;
|
|
163
|
+
};
|
|
164
|
+
return pe(
|
|
165
|
+
() => [n.itemData, w.value, b.value, E.value],
|
|
166
|
+
() => {
|
|
167
|
+
var ee, he, se, ae, Rt, Tt, Ot, _t, At, Ct, xt, Dt, Nt, Ft, Pt, Ut, Bt, jt;
|
|
168
|
+
const i = (ee = k(n.itemData)) == null ? void 0 : ee.filter((F) => (F == null ? void 0 : F.key) === "header"), N = (he = k(n.itemData)) == null ? void 0 : he.find((F) => (F == null ? void 0 : F.key) === "page"), J = (se = k(n.itemData)) == null ? void 0 : se.find((F) => (F == null ? void 0 : F.key) === "rowButton"), x = (ae = k(n.itemData)) == null ? void 0 : ae.find((F) => (F == null ? void 0 : F.key) === "extraButton"), $ = (Rt = k(n.itemData)) == null ? void 0 : Rt.filter((F) => (F == null ? void 0 : F.key) === "tableContents"), q = (Tt = k(n.itemData)) == null ? void 0 : Tt.filter((F) => (F == null ? void 0 : F.key) === "tableIndex");
|
|
169
|
+
m.value = (N == null ? void 0 : N.contents) ?? !0;
|
|
170
|
+
let I = [];
|
|
171
|
+
w.value === "" ? I = i == null ? void 0 : i[0] : I = (i == null ? void 0 : i.find((F) => (F == null ? void 0 : F.selectLabel) === "(" + w.value + ")")) ?? (i == null ? void 0 : i.find((F) => !(F != null && F.selectLabel)));
|
|
172
|
+
let M = [];
|
|
173
|
+
if (w.value === "" ? M = q == null ? void 0 : q[0] : M = (q == null ? void 0 : q.find((F) => (F == null ? void 0 : F.selectLabel) === "(" + w.value + ")")) ?? (q == null ? void 0 : q.find((F) => !(F != null && F.selectLabel))), ((Ot = I == null ? void 0 : I.contents) == null ? void 0 : Ot.length) > 0) {
|
|
174
|
+
const F = [];
|
|
175
|
+
M != null && M.contents && ((_t = M == null ? void 0 : M.contents) == null ? void 0 : _t.length) !== 0 && F.push({
|
|
176
|
+
label: "",
|
|
177
|
+
prop: "index",
|
|
178
|
+
sortable: !1
|
|
179
|
+
}), (At = I == null ? void 0 : I.contents) == null || At.forEach((A, ue) => {
|
|
180
|
+
(A == null ? void 0 : A.label) !== "" && F.push({
|
|
181
|
+
label: (A == null ? void 0 : A.label) ?? "",
|
|
182
|
+
prop: (A == null ? void 0 : A.label) === "操作" ? "operate" : (A == null ? void 0 : A.prop) ?? "a" + ue,
|
|
183
|
+
width: A != null && A.width ? parseInt(A.width) : "",
|
|
184
|
+
fixed: (A == null ? void 0 : A.fixed) ?? void 0,
|
|
185
|
+
sortable: (A == null ? void 0 : A.sortable) ?? !1,
|
|
186
|
+
align: (A == null ? void 0 : A.align) ?? "center",
|
|
187
|
+
showOverflowTooltip: (A == null ? void 0 : A.showOverflowTooltip) ?? !0,
|
|
188
|
+
isNotDrag: (A == null ? void 0 : A.isNotDrag) ?? !1,
|
|
189
|
+
isEditCol: (A == null ? void 0 : A.isEditCol) ?? !1,
|
|
190
|
+
isOperate: (A == null ? void 0 : A.isOperate) ?? !1,
|
|
191
|
+
id: (A == null ? void 0 : A.id) ?? ue,
|
|
192
|
+
type: (A == null ? void 0 : A.label) === "操作" ? "operate" : void 0
|
|
193
|
+
});
|
|
194
|
+
}), o.value = F;
|
|
195
|
+
let ye = (xt = (Ct = k(o.value)) == null ? void 0 : Ct.filter((A) => (A == null ? void 0 : A.type) !== "operate")) == null ? void 0 : xt.map((A, ue) => ({
|
|
196
|
+
prop: (A == null ? void 0 : A.prop) ?? "a" + ue
|
|
197
|
+
}));
|
|
198
|
+
h.value = ye;
|
|
199
|
+
let me = [];
|
|
200
|
+
if (w.value === "" ? me = $ == null ? void 0 : $[0] : me = ($ == null ? void 0 : $.find((A) => (A == null ? void 0 : A.selectLabel) === "(" + w.value + ")")) ?? ($ == null ? void 0 : $.find((A) => !(A != null && A.selectLabel))), ((Dt = me == null ? void 0 : me.contents) == null ? void 0 : Dt.length) !== 0) {
|
|
201
|
+
let A = k(me == null ? void 0 : me.contents);
|
|
202
|
+
M != null && M.contents && ((Nt = M == null ? void 0 : M.contents) == null ? void 0 : Nt.length) !== 0 && (A = (Ft = k(A)) == null ? void 0 : Ft.map((le, at) => {
|
|
203
|
+
var Re, Te;
|
|
204
|
+
if (!Array.isArray(le)) {
|
|
205
|
+
let xe = {};
|
|
206
|
+
for (let be in le)
|
|
207
|
+
be !== "id" && be !== "index" && (xe[be] = le[be]);
|
|
208
|
+
le = Object.values(xe);
|
|
209
|
+
}
|
|
210
|
+
return le.unshift(((Te = (Re = M == null ? void 0 : M.contents) == null ? void 0 : Re[at]) == null ? void 0 : Te.label) ?? ""), le;
|
|
211
|
+
}));
|
|
212
|
+
const ue = [];
|
|
213
|
+
A == null || A.forEach((le, at) => {
|
|
214
|
+
let Re = {};
|
|
215
|
+
le == null || le.forEach((Te, xe) => {
|
|
216
|
+
var be;
|
|
217
|
+
(be = ye == null ? void 0 : ye[xe]) != null && be.prop ? Re[ye[xe].prop] = Te : Array.isArray(Te) && (Re.children = sn(Te, ye));
|
|
218
|
+
}), ue.push(Object.assign(Re, { id: at }));
|
|
219
|
+
}), s.value = ue;
|
|
220
|
+
} else {
|
|
221
|
+
let A = (Pt = k(ye)) == null ? void 0 : Pt.reduce((ue, le) => (ue[le.prop] = "测试数据", ue), {});
|
|
222
|
+
l.value = A, s.value = [Object.assign({}, l.value, { id: p.value })];
|
|
223
|
+
}
|
|
224
|
+
} else
|
|
225
|
+
o.value = [], s.value = [];
|
|
226
|
+
if (((Ut = J == null ? void 0 : J.contents) == null ? void 0 : Ut.length) > 0 ? T.value = J == null ? void 0 : J.contents : T.value = [], ((Bt = x == null ? void 0 : x.contents) == null ? void 0 : Bt.length) > 0 ? _.value = x == null ? void 0 : x.contents : _.value = [], p.value = ((jt = s == null ? void 0 : s.value) == null ? void 0 : jt.length) ?? 0, b.value !== "") {
|
|
227
|
+
const F = Kn(k(s.value), E.value);
|
|
228
|
+
X(F);
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{ deep: !0, immediate: !0 }
|
|
232
|
+
), (i, N) => {
|
|
233
|
+
var J;
|
|
234
|
+
return K(), Z("div", Wn, [
|
|
235
|
+
j("div", Gn, [
|
|
236
|
+
(K(!0), Z(Ue, null, Be(_.value, (x, $) => (K(), Z("div", {
|
|
237
|
+
class: "extra-contents",
|
|
238
|
+
key: $
|
|
239
|
+
}, [
|
|
240
|
+
j("div", {
|
|
241
|
+
class: "extra-content",
|
|
242
|
+
style: $t({ background: x == null ? void 0 : x.background }),
|
|
243
|
+
onClick: (q) => D(x == null ? void 0 : x.label, "")
|
|
244
|
+
}, G(x == null ? void 0 : x.label), 13, Xn)
|
|
245
|
+
]))), 128))
|
|
246
|
+
]),
|
|
247
|
+
(K(), Pe(_e, {
|
|
248
|
+
columns: o.value,
|
|
249
|
+
key: o.value,
|
|
250
|
+
tableData: s.value,
|
|
251
|
+
isShowPagination: m.value,
|
|
252
|
+
isShowEdit: !1,
|
|
253
|
+
isShowDelete: !1,
|
|
254
|
+
onDbClickRow: O
|
|
255
|
+
}, Ln({ _: 2 }, [
|
|
256
|
+
((J = T.value) == null ? void 0 : J.length) > 0 ? {
|
|
257
|
+
name: "actions",
|
|
258
|
+
fn: ie(({ item: x }) => [
|
|
259
|
+
(K(!0), Z(Ue, null, Be(T.value, ($, q) => (K(), Z("div", { key: q }, [
|
|
260
|
+
j("div", {
|
|
261
|
+
style: $t({ color: $ == null ? void 0 : $.textColor }),
|
|
262
|
+
class: "extra-button-label",
|
|
263
|
+
onClick: (I) => D($ == null ? void 0 : $.label, x)
|
|
264
|
+
}, G($ == null ? void 0 : $.label), 13, Zn)
|
|
265
|
+
]))), 128))
|
|
266
|
+
]),
|
|
267
|
+
key: "0"
|
|
268
|
+
} : void 0
|
|
269
|
+
]), 1032, ["columns", "tableData", "isShowPagination"])),
|
|
270
|
+
Q(Hn, {
|
|
271
|
+
title: c.value,
|
|
272
|
+
visible: R.value,
|
|
273
|
+
width: C.value,
|
|
274
|
+
onBeforeDestroy: P
|
|
275
|
+
}, {
|
|
276
|
+
default: ie(() => [
|
|
277
|
+
Q(Qe, {
|
|
278
|
+
rowContents: u.value,
|
|
279
|
+
isEnableWrap: !1,
|
|
280
|
+
onChange: V,
|
|
281
|
+
isEdit: d.value
|
|
282
|
+
}, null, 8, ["rowContents", "isEdit"])
|
|
283
|
+
]),
|
|
284
|
+
footer: ie(() => [
|
|
285
|
+
g.value ? (K(), Z("div", Qn, [
|
|
286
|
+
j("div", {
|
|
287
|
+
onClick: N[0] || (N[0] = (x) => R.value = !1),
|
|
288
|
+
class: "cancel-button"
|
|
289
|
+
}, G("取消")),
|
|
290
|
+
j("div", {
|
|
291
|
+
class: "ok-button",
|
|
292
|
+
onClick: z
|
|
293
|
+
}, G("确认"))
|
|
294
|
+
])) : en("", !0)
|
|
295
|
+
]),
|
|
296
|
+
_: 1
|
|
297
|
+
}, 8, ["title", "visible", "width"])
|
|
298
|
+
]);
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
}, er = /* @__PURE__ */ Se(Yn, [["__scopeId", "data-v-43e3c66f"]]), tr = [
|
|
302
|
+
{
|
|
303
|
+
key: "单选",
|
|
304
|
+
value: "Select"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
key: "日期",
|
|
308
|
+
value: "Date"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
key: "长文本",
|
|
312
|
+
value: "TextArea"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
key: "上传",
|
|
316
|
+
value: "Upload"
|
|
317
|
+
}
|
|
318
|
+
], nr = { class: "form-content" }, rr = {
|
|
319
|
+
__name: "index",
|
|
320
|
+
props: {
|
|
321
|
+
itemData: {
|
|
322
|
+
type: Array,
|
|
323
|
+
default: () => []
|
|
324
|
+
},
|
|
325
|
+
childItemData: {
|
|
326
|
+
type: Array,
|
|
327
|
+
default: () => []
|
|
328
|
+
},
|
|
329
|
+
index: Number
|
|
330
|
+
},
|
|
331
|
+
emits: ["change", "contentChange"],
|
|
332
|
+
setup(e, { emit: t }) {
|
|
333
|
+
const n = e, r = t, o = U([]), s = U(!1), a = U([]), l = rn(de), d = U(), p = (c) => {
|
|
334
|
+
var u, h, y, S;
|
|
335
|
+
const R = (h = (u = k(n.itemData)) == null ? void 0 : u.find((v) => (v == null ? void 0 : v.key) === "formContent")) == null ? void 0 : h.contents, T = k(c.content);
|
|
336
|
+
let g = {};
|
|
337
|
+
T && ((y = Object.values(T)) == null ? void 0 : y.length) > 0 && ((S = Object.values(T)) == null || S.forEach((v, b) => {
|
|
338
|
+
g[R[b].key] = v;
|
|
339
|
+
}));
|
|
340
|
+
const _ = {
|
|
341
|
+
content: g,
|
|
342
|
+
index: n == null ? void 0 : n.index,
|
|
343
|
+
buttonName: c == null ? void 0 : c.buttonName
|
|
344
|
+
};
|
|
345
|
+
r("change", _);
|
|
346
|
+
}, m = (c) => {
|
|
347
|
+
var g, _;
|
|
348
|
+
if (!c) return;
|
|
349
|
+
if (((g = Object.values(k(c))) == null ? void 0 : g.length) > 0) {
|
|
350
|
+
const u = (_ = Object.values(k(c))) == null ? void 0 : _.map((y) => y);
|
|
351
|
+
let h = "";
|
|
352
|
+
u == null || u.forEach((y) => {
|
|
353
|
+
y !== "" && y !== void 0 && (h = h === "" ? y : h + "/" + y);
|
|
354
|
+
}), l.setSelectArray(u), l.setSelectString(h);
|
|
355
|
+
}
|
|
356
|
+
const R = k(n.itemData), T = R == null ? void 0 : R.map((u) => {
|
|
357
|
+
var h;
|
|
358
|
+
return (u == null ? void 0 : u.key) === "formContent" && ((h = u.contents) == null || h.map((y, S) => {
|
|
359
|
+
var v, b, E, w, C;
|
|
360
|
+
return y != null && y.key.includes("$") && (y.key = (v = y == null ? void 0 : y.key.split("$")) == null ? void 0 : v[0]), y.value = Array.isArray((b = Object.values(c)) == null ? void 0 : b[S]) ? (w = (E = Object.values(c)) == null ? void 0 : E[S]) == null ? void 0 : w[0] : (C = Object.values(c)) == null ? void 0 : C[S], y;
|
|
361
|
+
})), u;
|
|
362
|
+
});
|
|
363
|
+
r("contentChange", {
|
|
364
|
+
contents: T,
|
|
365
|
+
index: n.index
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
return pe(
|
|
369
|
+
() => n.itemData,
|
|
370
|
+
() => {
|
|
371
|
+
var _, u, h, y, S, v, b, E, w, C;
|
|
372
|
+
const c = (_ = k(n.itemData)) == null ? void 0 : _.find((P) => (P == null ? void 0 : P.key) === "formContent"), R = (u = k(n.itemData)) == null ? void 0 : u.find((P) => (P == null ? void 0 : P.key) === "formButton"), T = (h = k(n.itemData)) == null ? void 0 : h.find((P) => (P == null ? void 0 : P.key) === "formFlex"), g = (y = k(n.itemData)) == null ? void 0 : y.find((P) => (P == null ? void 0 : P.key) === "formWrap");
|
|
373
|
+
if ((g == null ? void 0 : g.contents) === "纵向" ? s.value = !1 : s.value = !0, d.value = !(!(T != null && T.contents) === "" || ((S = T == null ? void 0 : T.contents) == null ? void 0 : S.toUpperCase()) === "VERTICAL"), ((v = c == null ? void 0 : c.contents) == null ? void 0 : v.length) > 0) {
|
|
374
|
+
const P = [];
|
|
375
|
+
(b = c == null ? void 0 : c.contents) == null || b.forEach((D, L) => {
|
|
376
|
+
var z, H, V, i, N, J, x, $, q;
|
|
377
|
+
if ((D == null ? void 0 : D.label) !== "") {
|
|
378
|
+
let I = (D == null ? void 0 : D.key) ?? "", M = (D == null ? void 0 : D.type) ?? "", ee = (D == null ? void 0 : D.options) ?? [];
|
|
379
|
+
if (D != null && D.key.includes("$") && (I = (z = k(D == null ? void 0 : D.key).split("$")) == null ? void 0 : z[0], ((V = (H = k(D == null ? void 0 : D.key).split("$")) == null ? void 0 : H[1]) == null ? void 0 : V.length) > 0)) {
|
|
380
|
+
const [he, se] = (N = (i = k(D == null ? void 0 : D.key).split("$")) == null ? void 0 : i[1]) == null ? void 0 : N.split(/[()]/);
|
|
381
|
+
M = ((J = tr.find((ae) => (ae == null ? void 0 : ae.key) === he)) == null ? void 0 : J.value) ?? "", ((x = se == null ? void 0 : se.split(",")) == null ? void 0 : x.length) > 0 && (ee = ($ = se == null ? void 0 : se.split(",")) == null ? void 0 : $.map((ae) => ({
|
|
382
|
+
label: ae,
|
|
383
|
+
value: ae
|
|
384
|
+
})));
|
|
385
|
+
}
|
|
386
|
+
P.push({
|
|
387
|
+
label: I ?? "",
|
|
388
|
+
name: "t" + L,
|
|
389
|
+
type: M === "" ? "Input" : M,
|
|
390
|
+
value: (ee == null ? void 0 : ee.length) > 0 ? (q = ee == null ? void 0 : ee[0]) == null ? void 0 : q.value : (D == null ? void 0 : D.value) ?? "",
|
|
391
|
+
id: (D == null ? void 0 : D.id) ?? L,
|
|
392
|
+
contents: ee ?? [],
|
|
393
|
+
width: (D == null ? void 0 : D.width) ?? 1
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
const O = (E = k(P)) == null ? void 0 : E.map((D) => D.value);
|
|
398
|
+
let X = "";
|
|
399
|
+
O == null || O.forEach((D) => {
|
|
400
|
+
D !== "" && D !== void 0 && (X = X === "" ? D : X + "/" + D);
|
|
401
|
+
}), l.setSelectArray(O), l.setSelectString(X), o.value = P;
|
|
402
|
+
} else
|
|
403
|
+
o.value = [];
|
|
404
|
+
if (((w = R == null ? void 0 : R.contents) == null ? void 0 : w.length) > 0) {
|
|
405
|
+
const P = [];
|
|
406
|
+
(C = R == null ? void 0 : R.contents) == null || C.forEach((O, X) => {
|
|
407
|
+
(O == null ? void 0 : O.label) !== "" && P.push({
|
|
408
|
+
label: (O == null ? void 0 : O.label) ?? "",
|
|
409
|
+
id: (O == null ? void 0 : O.id) ?? X,
|
|
410
|
+
type: (O == null ? void 0 : O.type) ?? "",
|
|
411
|
+
background: O == null ? void 0 : O.background
|
|
412
|
+
});
|
|
413
|
+
}), a.value = P;
|
|
414
|
+
} else
|
|
415
|
+
a.value = [];
|
|
416
|
+
},
|
|
417
|
+
{ deep: !0, immediate: !0 }
|
|
418
|
+
), (c, R) => (K(), Z("div", nr, [
|
|
419
|
+
Q(Qe, {
|
|
420
|
+
rowContents: o.value,
|
|
421
|
+
buttonValue: a.value,
|
|
422
|
+
isRowFlex: d.value,
|
|
423
|
+
isEnableWrap: !1,
|
|
424
|
+
onOnButtonClick: p,
|
|
425
|
+
onChange: m,
|
|
426
|
+
isButtonRow: s.value
|
|
427
|
+
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
428
|
+
]));
|
|
429
|
+
}
|
|
430
|
+
}, or = /* @__PURE__ */ Se(rr, [["__scopeId", "data-v-3cdc719b"]]), sr = { class: "table-operate-content" }, ar = { class: "table-operate-item" }, lr = { class: "operate-title" }, ir = { class: "operate-content" }, cr = { class: "operate-title" }, ur = { class: "operate-content" }, fr = { class: "operate-title" }, pr = { class: "operate-content" }, dr = { class: "operate-content" }, hr = {
|
|
431
|
+
__name: "operate",
|
|
432
|
+
props: {
|
|
433
|
+
itemContents: {
|
|
434
|
+
type: Array,
|
|
435
|
+
default: () => []
|
|
436
|
+
},
|
|
437
|
+
originalItemContents: {
|
|
438
|
+
type: Array,
|
|
439
|
+
default: () => []
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
emits: ["change"],
|
|
443
|
+
setup(e, { emit: t }) {
|
|
444
|
+
const n = e, r = t, o = U([]), s = U([]), a = U([]), l = U([{
|
|
445
|
+
label: "按钮名称",
|
|
446
|
+
prop: "label",
|
|
447
|
+
type: "edit"
|
|
448
|
+
}, {
|
|
449
|
+
label: "按钮类型",
|
|
450
|
+
prop: "type",
|
|
451
|
+
type: "edit"
|
|
452
|
+
}, {
|
|
453
|
+
label: "按钮背景颜色",
|
|
454
|
+
prop: "background",
|
|
455
|
+
type: "edit",
|
|
456
|
+
columnType: "Color"
|
|
457
|
+
}, {
|
|
458
|
+
label: "操作",
|
|
459
|
+
prop: "operate",
|
|
460
|
+
type: "operate",
|
|
461
|
+
sortable: !1
|
|
462
|
+
}]), d = U([{
|
|
463
|
+
label: "标签名称",
|
|
464
|
+
prop: "label",
|
|
465
|
+
type: "edit"
|
|
466
|
+
}, {
|
|
467
|
+
label: "标签类型",
|
|
468
|
+
prop: "type",
|
|
469
|
+
type: "edit"
|
|
470
|
+
}, {
|
|
471
|
+
label: "按钮文字颜色",
|
|
472
|
+
prop: "textColor",
|
|
473
|
+
type: "edit",
|
|
474
|
+
columnType: "Color"
|
|
475
|
+
}, {
|
|
476
|
+
label: "操作",
|
|
477
|
+
prop: "operate",
|
|
478
|
+
type: "operate",
|
|
479
|
+
sortable: !1
|
|
480
|
+
}]), p = U([]), m = U(0), c = U([{
|
|
481
|
+
name: "isPagination",
|
|
482
|
+
label: "是否显示分页",
|
|
483
|
+
type: "Switch",
|
|
484
|
+
value: !0
|
|
485
|
+
}]), R = [{
|
|
486
|
+
label: "标签名",
|
|
487
|
+
prop: "label",
|
|
488
|
+
type: "edit"
|
|
489
|
+
}, {
|
|
490
|
+
label: "属性名",
|
|
491
|
+
prop: "prop",
|
|
492
|
+
type: "edit"
|
|
493
|
+
}, {
|
|
494
|
+
label: "宽度",
|
|
495
|
+
prop: "width",
|
|
496
|
+
type: "edit",
|
|
497
|
+
columnType: "Number"
|
|
498
|
+
}, {
|
|
499
|
+
label: "是否固定列",
|
|
500
|
+
prop: "fixed",
|
|
501
|
+
type: "edit",
|
|
502
|
+
columnType: "Radio",
|
|
503
|
+
contents: [{
|
|
504
|
+
label: "left",
|
|
505
|
+
value: "左"
|
|
506
|
+
}, {
|
|
507
|
+
label: "right",
|
|
508
|
+
value: "右"
|
|
509
|
+
}]
|
|
510
|
+
}, {
|
|
511
|
+
label: "是否支持排序",
|
|
512
|
+
prop: "sortable",
|
|
513
|
+
type: "edit",
|
|
514
|
+
columnType: "Switch"
|
|
515
|
+
}, {
|
|
516
|
+
label: "文本所在位置",
|
|
517
|
+
prop: "align",
|
|
518
|
+
type: "edit",
|
|
519
|
+
columnType: "Radio",
|
|
520
|
+
contents: [{
|
|
521
|
+
label: "left",
|
|
522
|
+
value: "左"
|
|
523
|
+
}, {
|
|
524
|
+
label: "center",
|
|
525
|
+
value: "中"
|
|
526
|
+
}, {
|
|
527
|
+
label: "right",
|
|
528
|
+
value: "右"
|
|
529
|
+
}]
|
|
530
|
+
}, {
|
|
531
|
+
label: "溢出悬浮文字",
|
|
532
|
+
prop: "showOverflowTooltip",
|
|
533
|
+
type: "edit",
|
|
534
|
+
columnType: "Switch"
|
|
535
|
+
}, {
|
|
536
|
+
label: "是否不可拖动",
|
|
537
|
+
prop: "isNotDrag",
|
|
538
|
+
type: "edit",
|
|
539
|
+
columnType: "Switch"
|
|
540
|
+
}, {
|
|
541
|
+
label: "是否可编辑列名",
|
|
542
|
+
//暂不支持
|
|
543
|
+
prop: "isEditCol",
|
|
544
|
+
type: "edit",
|
|
545
|
+
columnType: "Switch"
|
|
546
|
+
}, {
|
|
547
|
+
label: "是否出现在附属界面",
|
|
548
|
+
//暂不支持
|
|
549
|
+
prop: "isOperate",
|
|
550
|
+
type: "edit",
|
|
551
|
+
columnType: "Switch"
|
|
552
|
+
}, {
|
|
553
|
+
label: "操作",
|
|
554
|
+
prop: "operate",
|
|
555
|
+
type: "operate",
|
|
556
|
+
sortable: !1
|
|
557
|
+
}], T = (v) => {
|
|
558
|
+
let b = k(o.value);
|
|
559
|
+
const E = b == null ? void 0 : b.find((w) => w.key === "page");
|
|
560
|
+
(E == null ? void 0 : E.contents) !== void 0 ? b = b == null ? void 0 : b.map((w) => ((w == null ? void 0 : w.key) === "page" && (w.contents = v == null ? void 0 : v.isPagination), w)) : b.push({
|
|
561
|
+
key: "page",
|
|
562
|
+
contents: v == null ? void 0 : v.isPagination
|
|
563
|
+
}), o.value = b;
|
|
564
|
+
};
|
|
565
|
+
pe(
|
|
566
|
+
() => n.originalItemContents,
|
|
567
|
+
() => {
|
|
568
|
+
var v, b, E, w, C, P, O, X, D, L, z, H, V;
|
|
569
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (o.value = k(n.originalItemContents), s.value = (b = (v = o.value) == null ? void 0 : v.find((i) => (i == null ? void 0 : i.key) === "header")) == null ? void 0 : b.contents, a.value = (w = (E = o.value) == null ? void 0 : E.find((i) => (i == null ? void 0 : i.key) === "rowButton")) == null ? void 0 : w.contents, l.value = (P = (C = o.value) == null ? void 0 : C.find((i) => (i == null ? void 0 : i.key) === "extraButton")) == null ? void 0 : P.contents, c.value = (X = (O = o.value) == null ? void 0 : O.find((i) => (i == null ? void 0 : i.key) === "page")) != null && X.contents ? [{
|
|
570
|
+
name: "isPagination",
|
|
571
|
+
label: "是否显示分页",
|
|
572
|
+
type: "Switch",
|
|
573
|
+
value: (L = (D = o.value) == null ? void 0 : D.find((i) => (i == null ? void 0 : i.key) === "page")) == null ? void 0 : L.contents
|
|
574
|
+
}] : [{
|
|
575
|
+
name: "isPagination",
|
|
576
|
+
label: "是否显示分页",
|
|
577
|
+
type: "Switch",
|
|
578
|
+
value: !0
|
|
579
|
+
}], s.value = (z = s.value) == null ? void 0 : z.map((i, N) => i = {
|
|
580
|
+
label: (i == null ? void 0 : i.label) ?? "",
|
|
581
|
+
prop: (i == null ? void 0 : i.label) === "操作" ? "operate" : i == null ? void 0 : i.prop,
|
|
582
|
+
width: i != null && i.width ? parseInt(i.width) : "",
|
|
583
|
+
fixed: (i == null ? void 0 : i.fixed) ?? void 0,
|
|
584
|
+
sortable: (i == null ? void 0 : i.sortable) ?? !1,
|
|
585
|
+
align: (i == null ? void 0 : i.align) ?? "center",
|
|
586
|
+
showOverflowTooltip: (i == null ? void 0 : i.showOverflowTooltip) ?? !0,
|
|
587
|
+
isNotDrag: (i == null ? void 0 : i.isNotDrag) ?? !1,
|
|
588
|
+
isEditCol: (i == null ? void 0 : i.isEditCol) ?? !1,
|
|
589
|
+
isOperate: (i == null ? void 0 : i.isOperate) ?? !1,
|
|
590
|
+
id: (i == null ? void 0 : i.id) ?? N
|
|
591
|
+
}), a.value = (H = a.value) == null ? void 0 : H.map((i, N) => i = {
|
|
592
|
+
label: (i == null ? void 0 : i.label) ?? "",
|
|
593
|
+
type: (i == null ? void 0 : i.type) ?? "",
|
|
594
|
+
textColor: (i == null ? void 0 : i.textColor) ?? "#000000",
|
|
595
|
+
id: (i == null ? void 0 : i.id) ?? N
|
|
596
|
+
}), l.value = (V = l.value) == null ? void 0 : V.map((i, N) => i = {
|
|
597
|
+
label: (i == null ? void 0 : i.label) ?? "",
|
|
598
|
+
type: (i == null ? void 0 : i.type) ?? "",
|
|
599
|
+
background: (i == null ? void 0 : i.textColor) ?? "#FFFFFF",
|
|
600
|
+
id: (i == null ? void 0 : i.id) ?? N
|
|
601
|
+
}));
|
|
602
|
+
},
|
|
603
|
+
{ deep: !0, immediate: !0 }
|
|
604
|
+
), pe(
|
|
605
|
+
() => c.value,
|
|
606
|
+
() => {
|
|
607
|
+
var E;
|
|
608
|
+
let v = k(o.value);
|
|
609
|
+
const b = v == null ? void 0 : v.find((w) => w.key === "page");
|
|
610
|
+
b != null && b.contents ? v = v == null ? void 0 : v.map((w) => {
|
|
611
|
+
var C;
|
|
612
|
+
return (w == null ? void 0 : w.key) === "page" && (w.contents = (C = c.value) == null ? void 0 : C[0].value), w;
|
|
613
|
+
}) : v.push({
|
|
614
|
+
key: "page",
|
|
615
|
+
contents: (E = c.value) == null ? void 0 : E[0].value
|
|
616
|
+
}), o.value = v;
|
|
617
|
+
},
|
|
618
|
+
{ immediate: !0, deep: !0 }
|
|
619
|
+
);
|
|
620
|
+
const g = () => {
|
|
621
|
+
const v = k(s.value);
|
|
622
|
+
let b = k(o.value);
|
|
623
|
+
v.push({
|
|
624
|
+
label: "",
|
|
625
|
+
prop: "",
|
|
626
|
+
width: "",
|
|
627
|
+
fixed: void 0,
|
|
628
|
+
sortable: !1,
|
|
629
|
+
align: "center",
|
|
630
|
+
showOverflowTooltip: !0,
|
|
631
|
+
isNotDrag: !1,
|
|
632
|
+
isEditCol: !1,
|
|
633
|
+
isOperate: !1,
|
|
634
|
+
id: m.value
|
|
635
|
+
}), s.value = v, m.value++;
|
|
636
|
+
const E = b == null ? void 0 : b.find((w) => (w == null ? void 0 : w.key) === "header");
|
|
637
|
+
E != null && E.contents ? (E.contents = v, b = b == null ? void 0 : b.map((w) => ((w == null ? void 0 : w.key) === "header" && (w.contents = v), w))) : b.push({
|
|
638
|
+
key: "header",
|
|
639
|
+
contents: v
|
|
640
|
+
}), o.value = b;
|
|
641
|
+
}, _ = () => {
|
|
642
|
+
const v = k(a.value);
|
|
643
|
+
let b = k(o.value);
|
|
644
|
+
v.push({
|
|
645
|
+
label: "",
|
|
646
|
+
type: "",
|
|
647
|
+
textColor: "#000000",
|
|
648
|
+
id: m.value
|
|
649
|
+
}), a.value = v, m.value++;
|
|
650
|
+
const E = b == null ? void 0 : b.find((w) => (w == null ? void 0 : w.key) === "rowButton");
|
|
651
|
+
E != null && E.contents ? (E.contents = v, b = b == null ? void 0 : b.map((w) => ((w == null ? void 0 : w.key) === "rowButton" && (w.contents = v), w))) : b.push({
|
|
652
|
+
key: "rowButton",
|
|
653
|
+
contents: v
|
|
654
|
+
}), o.value = b;
|
|
655
|
+
}, u = () => {
|
|
656
|
+
const v = k(p.value);
|
|
657
|
+
let b = k(o.value);
|
|
658
|
+
v.push({
|
|
659
|
+
label: "",
|
|
660
|
+
type: "",
|
|
661
|
+
background: "#FFFFFF",
|
|
662
|
+
id: m.value
|
|
663
|
+
}), p.value = v, m.value++;
|
|
664
|
+
const E = b == null ? void 0 : b.find((w) => (w == null ? void 0 : w.key) === "extraButton");
|
|
665
|
+
E != null && E.contents ? (E.contents = v, b = b == null ? void 0 : b.map((w) => ((w == null ? void 0 : w.key) === "extraButton" && (w.contents = v), w))) : b.push({
|
|
666
|
+
key: "extraButton",
|
|
667
|
+
contents: v
|
|
668
|
+
}), o.value = b;
|
|
669
|
+
}, h = (v) => {
|
|
670
|
+
const b = k(a.value);
|
|
671
|
+
let E = k(o.value);
|
|
672
|
+
a.value = b.filter((C) => C.id !== v.id);
|
|
673
|
+
const w = E == null ? void 0 : E.find((C) => C.key === "rowButton");
|
|
674
|
+
w != null && w.contents && (E = E == null ? void 0 : E.map((C) => ((C == null ? void 0 : C.key) === "rowButton" && (C.contents = b.filter((P) => P.id !== v.id)), C))), o.value = E;
|
|
675
|
+
}, y = (v) => {
|
|
676
|
+
const b = k(p.value);
|
|
677
|
+
let E = k(o.value);
|
|
678
|
+
p.value = b.filter((C) => C.id !== v.id);
|
|
679
|
+
const w = E == null ? void 0 : E.find((C) => C.key === "extraButton");
|
|
680
|
+
w != null && w.contents && (E = E == null ? void 0 : E.map((C) => ((C == null ? void 0 : C.key) === "extraButton" && (C.contents = b.filter((P) => P.id !== v.id)), C))), o.value = E;
|
|
681
|
+
}, S = (v) => {
|
|
682
|
+
const b = k(s.value);
|
|
683
|
+
let E = k(o.value);
|
|
684
|
+
s.value = b.filter((C) => C.id !== v.id);
|
|
685
|
+
const w = E == null ? void 0 : E.find((C) => C.key === "header");
|
|
686
|
+
w != null && w.contents && (E = E == null ? void 0 : E.map((C) => ((C == null ? void 0 : C.key) === "header" && (C.contents = b.filter((P) => P.id !== v.id)), C))), o.value = E;
|
|
687
|
+
};
|
|
688
|
+
return pe(
|
|
689
|
+
() => [o.value, s.value],
|
|
690
|
+
() => {
|
|
691
|
+
let v = k(o.value);
|
|
692
|
+
const b = v == null ? void 0 : v.find((E) => (E == null ? void 0 : E.key) === "header");
|
|
693
|
+
b != null && b.contents ? (b.contents = s.value, v = v == null ? void 0 : v.map((E) => ((E == null ? void 0 : E.key) === "header" && (E.contents = s.value), E))) : v.push({
|
|
694
|
+
key: "header",
|
|
695
|
+
contents: s.value
|
|
696
|
+
}), r("change", v);
|
|
697
|
+
},
|
|
698
|
+
{ deep: !0, immediate: !0 }
|
|
699
|
+
), (v, b) => {
|
|
700
|
+
const E = Ke("el-button");
|
|
701
|
+
return K(), Z("div", sr, [
|
|
702
|
+
j("div", ar, [
|
|
703
|
+
j("div", lr, [
|
|
704
|
+
b[1] || (b[1] = j("div", null, G("表头"), -1)),
|
|
705
|
+
Q(E, {
|
|
706
|
+
class: "blue-operate-button",
|
|
707
|
+
icon: "ele-Plus",
|
|
708
|
+
onClick: g
|
|
709
|
+
}, {
|
|
710
|
+
default: ie(() => b[0] || (b[0] = [
|
|
711
|
+
Fe(G("新建"))
|
|
712
|
+
])),
|
|
713
|
+
_: 1
|
|
714
|
+
})
|
|
715
|
+
]),
|
|
716
|
+
j("div", ir, [
|
|
717
|
+
Q(_e, {
|
|
718
|
+
columns: R,
|
|
719
|
+
isShowPagination: !1,
|
|
720
|
+
isShowEdit: !1,
|
|
721
|
+
isMoveColumn: !1,
|
|
722
|
+
tableData: s.value,
|
|
723
|
+
onDeleteRow: S
|
|
724
|
+
}, null, 8, ["tableData"])
|
|
725
|
+
]),
|
|
726
|
+
j("div", cr, [
|
|
727
|
+
b[3] || (b[3] = j("div", null, G("行内按钮"), -1)),
|
|
728
|
+
Q(E, {
|
|
729
|
+
class: "blue-operate-button",
|
|
730
|
+
icon: "ele-Plus",
|
|
731
|
+
onClick: _
|
|
732
|
+
}, {
|
|
733
|
+
default: ie(() => b[2] || (b[2] = [
|
|
734
|
+
Fe(G("新建"))
|
|
735
|
+
])),
|
|
736
|
+
_: 1
|
|
737
|
+
})
|
|
738
|
+
]),
|
|
739
|
+
j("div", ur, [
|
|
740
|
+
Q(_e, {
|
|
741
|
+
columns: d.value,
|
|
742
|
+
isShowPagination: !1,
|
|
743
|
+
isShowEdit: !1,
|
|
744
|
+
isMoveColumn: !1,
|
|
745
|
+
tableData: a.value,
|
|
746
|
+
onDeleteRow: h
|
|
747
|
+
}, null, 8, ["columns", "tableData"])
|
|
748
|
+
]),
|
|
749
|
+
j("div", fr, [
|
|
750
|
+
b[5] || (b[5] = j("div", null, G("表格外部按钮"), -1)),
|
|
751
|
+
Q(E, {
|
|
752
|
+
class: "blue-operate-button",
|
|
753
|
+
icon: "ele-Plus",
|
|
754
|
+
onClick: u
|
|
755
|
+
}, {
|
|
756
|
+
default: ie(() => b[4] || (b[4] = [
|
|
757
|
+
Fe(G("新建"))
|
|
758
|
+
])),
|
|
759
|
+
_: 1
|
|
760
|
+
})
|
|
761
|
+
]),
|
|
762
|
+
j("div", pr, [
|
|
763
|
+
Q(_e, {
|
|
764
|
+
columns: l.value,
|
|
765
|
+
isShowPagination: !1,
|
|
766
|
+
isShowEdit: !1,
|
|
767
|
+
isMoveColumn: !1,
|
|
768
|
+
tableData: p.value,
|
|
769
|
+
onDeleteRow: y
|
|
770
|
+
}, null, 8, ["columns", "tableData"])
|
|
771
|
+
]),
|
|
772
|
+
b[6] || (b[6] = j("div", { class: "operate-title" }, [
|
|
773
|
+
j("div", null, G("分页"))
|
|
774
|
+
], -1)),
|
|
775
|
+
j("div", dr, [
|
|
776
|
+
Q(Qe, {
|
|
777
|
+
rowContents: c.value,
|
|
778
|
+
onChange: T
|
|
779
|
+
}, null, 8, ["rowContents"])
|
|
780
|
+
])
|
|
781
|
+
])
|
|
782
|
+
]);
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
}, mr = /* @__PURE__ */ Se(hr, [["__scopeId", "data-v-877911eb"]]), yr = { class: "form-operate-content" }, br = { class: "form-operate-item" }, gr = { class: "operate-title" }, vr = { class: "operate-content" }, kr = { class: "operate-title" }, Er = { class: "operate-content" }, wr = { class: "operate-content" }, Sr = {
|
|
786
|
+
__name: "operate",
|
|
787
|
+
props: {
|
|
788
|
+
itemContents: {
|
|
789
|
+
type: Array,
|
|
790
|
+
default: () => []
|
|
791
|
+
},
|
|
792
|
+
originalItemContents: {
|
|
793
|
+
type: Array,
|
|
794
|
+
default: () => []
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
emits: ["change"],
|
|
798
|
+
setup(e, { emit: t }) {
|
|
799
|
+
const n = e, r = t, o = U([{
|
|
800
|
+
name: "isRowFlex",
|
|
801
|
+
label: "是否横向布局",
|
|
802
|
+
type: "Switch",
|
|
803
|
+
value: !0
|
|
804
|
+
}]), s = U([{
|
|
805
|
+
label: "字段名称",
|
|
806
|
+
prop: "label",
|
|
807
|
+
type: "edit"
|
|
808
|
+
}, {
|
|
809
|
+
label: "字段类型",
|
|
810
|
+
prop: "type",
|
|
811
|
+
type: "edit"
|
|
812
|
+
}, {
|
|
813
|
+
label: "字段值",
|
|
814
|
+
prop: "key",
|
|
815
|
+
type: "edit"
|
|
816
|
+
}, {
|
|
817
|
+
label: "字段选项值",
|
|
818
|
+
prop: "options",
|
|
819
|
+
type: "edit"
|
|
820
|
+
}, {
|
|
821
|
+
label: "操作",
|
|
822
|
+
prop: "operate",
|
|
823
|
+
type: "operate",
|
|
824
|
+
sortable: !1
|
|
825
|
+
}]), a = U([{
|
|
826
|
+
label: "字段名称",
|
|
827
|
+
prop: "label",
|
|
828
|
+
type: "edit"
|
|
829
|
+
}, {
|
|
830
|
+
label: "字段类型",
|
|
831
|
+
prop: "type",
|
|
832
|
+
type: "edit"
|
|
833
|
+
}, {
|
|
834
|
+
label: "按钮背景颜色",
|
|
835
|
+
prop: "background",
|
|
836
|
+
type: "edit",
|
|
837
|
+
columnType: "Color"
|
|
838
|
+
}, {
|
|
839
|
+
label: "操作",
|
|
840
|
+
prop: "operate",
|
|
841
|
+
type: "operate",
|
|
842
|
+
sortable: !1
|
|
843
|
+
}]), l = U([]), d = U([]), p = U([]), m = U(0);
|
|
844
|
+
pe(
|
|
845
|
+
() => n.originalItemContents,
|
|
846
|
+
() => {
|
|
847
|
+
var u, h, y, S, v, b, E, w, C, P;
|
|
848
|
+
!n.originalItemContents || n.originalItemContents.length === 0 || (d.value = k(n.originalItemContents), p.value = (h = (u = d.value) == null ? void 0 : u.find((O) => (O == null ? void 0 : O.key) === "formContent")) == null ? void 0 : h.contents, l.value = (S = (y = d.value) == null ? void 0 : y.find((O) => (O == null ? void 0 : O.key) === "formButton")) == null ? void 0 : S.contents, p.value = (v = p.value) == null ? void 0 : v.map((O, X) => O = {
|
|
849
|
+
label: (O == null ? void 0 : O.label) ?? "",
|
|
850
|
+
type: (O == null ? void 0 : O.type) ?? "",
|
|
851
|
+
key: (O == null ? void 0 : O.key) ?? "",
|
|
852
|
+
options: (O == null ? void 0 : O.options) ?? "",
|
|
853
|
+
id: (O == null ? void 0 : O.id) ?? X
|
|
854
|
+
}), l.value = (b = l.value) == null ? void 0 : b.map((O, X) => O = {
|
|
855
|
+
label: (O == null ? void 0 : O.label) ?? "",
|
|
856
|
+
type: (O == null ? void 0 : O.type) ?? "",
|
|
857
|
+
background: (O == null ? void 0 : O.background) ?? "#000000",
|
|
858
|
+
id: (O == null ? void 0 : O.id) ?? X
|
|
859
|
+
}), o.value = (w = (E = d.value) == null ? void 0 : E.find((O) => (O == null ? void 0 : O.key) === "formFlex")) != null && w.contents ? [{
|
|
860
|
+
name: "isRowFlex",
|
|
861
|
+
label: "是否横向布局",
|
|
862
|
+
type: "Switch",
|
|
863
|
+
value: (P = (C = d.value) == null ? void 0 : C.find((O) => (O == null ? void 0 : O.key) === "formFlex")) == null ? void 0 : P.contents
|
|
864
|
+
}] : [{
|
|
865
|
+
name: "isRowFlex",
|
|
866
|
+
label: "是否横向布局",
|
|
867
|
+
type: "Switch",
|
|
868
|
+
value: !0
|
|
869
|
+
}]);
|
|
870
|
+
},
|
|
871
|
+
{ deep: !0, immediate: !0 }
|
|
872
|
+
);
|
|
873
|
+
const c = () => {
|
|
874
|
+
const u = k(l.value);
|
|
875
|
+
let h = k(d.value);
|
|
876
|
+
u.push({
|
|
877
|
+
label: "",
|
|
878
|
+
type: "",
|
|
879
|
+
background: "#000000",
|
|
880
|
+
id: m.value
|
|
881
|
+
}), l.value = u, m.value++;
|
|
882
|
+
const y = h == null ? void 0 : h.find((S) => (S == null ? void 0 : S.key) === "formButton");
|
|
883
|
+
y != null && y.contents ? (y.contents = u, h = h == null ? void 0 : h.map((S) => ((S == null ? void 0 : S.key) === "formButton" && (S.contents = u), S))) : h.push({
|
|
884
|
+
key: "formButton",
|
|
885
|
+
contents: u
|
|
886
|
+
}), d.value = h;
|
|
887
|
+
}, R = () => {
|
|
888
|
+
const u = k(p.value);
|
|
889
|
+
let h = k(d.value);
|
|
890
|
+
u.push({
|
|
891
|
+
label: "",
|
|
892
|
+
type: "",
|
|
893
|
+
key: "",
|
|
894
|
+
options: "",
|
|
895
|
+
id: m.value
|
|
896
|
+
}), p.value = u, m.value++;
|
|
897
|
+
const y = h == null ? void 0 : h.find((S) => (S == null ? void 0 : S.key) === "formContent");
|
|
898
|
+
y != null && y.contents ? (y.contents = u, h = h == null ? void 0 : h.map((S) => ((S == null ? void 0 : S.key) === "formContent" && (S.contents = u), S))) : h.push({
|
|
899
|
+
key: "formContent",
|
|
900
|
+
contents: u
|
|
901
|
+
}), d.value = h;
|
|
902
|
+
}, T = (u) => {
|
|
903
|
+
const h = k(l.value);
|
|
904
|
+
let y = k(d.value);
|
|
905
|
+
l.value = h.filter((v) => v.id !== u.id);
|
|
906
|
+
const S = y == null ? void 0 : y.find((v) => v.key === "formButton");
|
|
907
|
+
S != null && S.contents && (y = y == null ? void 0 : y.map((v) => ((v == null ? void 0 : v.key) === "formButton" && (v.contents = h.filter((b) => b.id !== u.id)), v))), d.value = y;
|
|
908
|
+
}, g = (u) => {
|
|
909
|
+
const h = k(p.value);
|
|
910
|
+
let y = k(d.value);
|
|
911
|
+
p.value = h.filter((v) => v.id !== u.id);
|
|
912
|
+
const S = y == null ? void 0 : y.find((v) => v.key === "formContent");
|
|
913
|
+
S != null && S.contents && (y = y == null ? void 0 : y.map((v) => ((v == null ? void 0 : v.key) === "formContent" && (v.contents = h.filter((b) => b.id !== u.id)), v))), d.value = y;
|
|
914
|
+
}, _ = (u) => {
|
|
915
|
+
let h = k(d.value);
|
|
916
|
+
const y = h == null ? void 0 : h.find((S) => S.key === "formFlex");
|
|
917
|
+
(y == null ? void 0 : y.contents) !== void 0 ? h = h == null ? void 0 : h.map((S) => ((S == null ? void 0 : S.key) === "formFlex" && (S.contents = u == null ? void 0 : u.isRowFlex), S)) : h.push({
|
|
918
|
+
key: "formFlex",
|
|
919
|
+
contents: u == null ? void 0 : u.isRowFlex
|
|
920
|
+
}), d.value = h;
|
|
921
|
+
};
|
|
922
|
+
return pe(
|
|
923
|
+
() => [d.value, p.value],
|
|
924
|
+
() => {
|
|
925
|
+
let u = k(d.value);
|
|
926
|
+
const h = u == null ? void 0 : u.find((y) => (y == null ? void 0 : y.key) === "formContent");
|
|
927
|
+
h != null && h.contents ? (h.contents = p.value, u = u == null ? void 0 : u.map((y) => ((y == null ? void 0 : y.key) === "formContent" && (y.contents = p.value), y))) : u.push({
|
|
928
|
+
key: "formContent",
|
|
929
|
+
contents: p.value
|
|
930
|
+
}), r("change", u);
|
|
931
|
+
},
|
|
932
|
+
{ deep: !0, immediate: !0 }
|
|
933
|
+
), (u, h) => {
|
|
934
|
+
const y = Ke("el-button");
|
|
935
|
+
return K(), Z("div", yr, [
|
|
936
|
+
j("div", br, [
|
|
937
|
+
j("div", gr, [
|
|
938
|
+
h[1] || (h[1] = j("div", null, G("表单信息"), -1)),
|
|
939
|
+
Q(y, {
|
|
940
|
+
class: "blue-operate-button",
|
|
941
|
+
icon: "ele-Plus",
|
|
942
|
+
onClick: R
|
|
943
|
+
}, {
|
|
944
|
+
default: ie(() => h[0] || (h[0] = [
|
|
945
|
+
Fe(G("新建"))
|
|
946
|
+
])),
|
|
947
|
+
_: 1
|
|
948
|
+
})
|
|
949
|
+
]),
|
|
950
|
+
j("div", vr, [
|
|
951
|
+
Q(_e, {
|
|
952
|
+
columns: s.value,
|
|
953
|
+
isShowPagination: !1,
|
|
954
|
+
isShowEdit: !1,
|
|
955
|
+
isMoveColumn: !1,
|
|
956
|
+
tableData: p.value,
|
|
957
|
+
onDeleteRow: g
|
|
958
|
+
}, null, 8, ["columns", "tableData"])
|
|
959
|
+
]),
|
|
960
|
+
j("div", kr, [
|
|
961
|
+
h[3] || (h[3] = j("div", null, G("表单按钮"), -1)),
|
|
962
|
+
Q(y, {
|
|
963
|
+
class: "blue-operate-button",
|
|
964
|
+
icon: "ele-Plus",
|
|
965
|
+
onClick: c
|
|
966
|
+
}, {
|
|
967
|
+
default: ie(() => h[2] || (h[2] = [
|
|
968
|
+
Fe(G("新建"))
|
|
969
|
+
])),
|
|
970
|
+
_: 1
|
|
971
|
+
})
|
|
972
|
+
]),
|
|
973
|
+
j("div", Er, [
|
|
974
|
+
Q(_e, {
|
|
975
|
+
columns: a.value,
|
|
976
|
+
isShowPagination: !1,
|
|
977
|
+
isShowEdit: !1,
|
|
978
|
+
isMoveColumn: !1,
|
|
979
|
+
tableData: l.value,
|
|
980
|
+
onDeleteRow: T
|
|
981
|
+
}, null, 8, ["columns", "tableData"])
|
|
982
|
+
]),
|
|
983
|
+
h[4] || (h[4] = j("div", { class: "operate-title" }, [
|
|
984
|
+
j("div", null, G("表单布局"))
|
|
985
|
+
], -1)),
|
|
986
|
+
j("div", wr, [
|
|
987
|
+
Q(Qe, {
|
|
988
|
+
rowContents: o.value,
|
|
989
|
+
onChange: _
|
|
990
|
+
}, null, 8, ["rowContents"])
|
|
991
|
+
])
|
|
992
|
+
])
|
|
993
|
+
]);
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
}, Rr = /* @__PURE__ */ Se(Sr, [["__scopeId", "data-v-a36b8468"]]), Tr = U([
|
|
997
|
+
{
|
|
998
|
+
name: "表格",
|
|
999
|
+
type: "table",
|
|
1000
|
+
comp: "Table",
|
|
1001
|
+
icon: "Grid"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
name: "表单",
|
|
1005
|
+
type: "form",
|
|
1006
|
+
comp: "Form",
|
|
1007
|
+
icon: "Film"
|
|
1008
|
+
}
|
|
1009
|
+
]), Or = {
|
|
1010
|
+
Table: er,
|
|
1011
|
+
Form: or,
|
|
1012
|
+
TableOperate: mr,
|
|
1013
|
+
FormOperate: Rr
|
|
1014
|
+
// 添加其他组件...
|
|
1015
|
+
};
|
|
1016
|
+
function an(e) {
|
|
1017
|
+
return Or[e] || null;
|
|
1018
|
+
}
|
|
1019
|
+
const _r = { class: "type-select" }, Ar = ["onClick"], Cr = { class: "list-icon" }, xr = {
|
|
1020
|
+
__name: "index",
|
|
1021
|
+
setup(e) {
|
|
1022
|
+
const t = Ze(de), { itemData: n } = Ee(t), r = (s) => Jn[s], o = (s) => {
|
|
1023
|
+
const a = k(n.value);
|
|
1024
|
+
a.push({
|
|
1025
|
+
comp: s.comp,
|
|
1026
|
+
name: s.name,
|
|
1027
|
+
compData: []
|
|
1028
|
+
}), t.setItemData(a);
|
|
1029
|
+
};
|
|
1030
|
+
return (s, a) => (K(), Z("div", _r, [
|
|
1031
|
+
(K(!0), Z(Ue, null, Be(tn(Tr), (l, d) => (K(), Z("div", {
|
|
1032
|
+
class: "type-list",
|
|
1033
|
+
key: d
|
|
1034
|
+
}, [
|
|
1035
|
+
j("div", {
|
|
1036
|
+
class: "list-content",
|
|
1037
|
+
onClick: (p) => o(l)
|
|
1038
|
+
}, [
|
|
1039
|
+
j("div", Cr, [
|
|
1040
|
+
(K(), Pe(kt(r(l.icon))))
|
|
1041
|
+
]),
|
|
1042
|
+
j("div", null, G(l.name), 1)
|
|
1043
|
+
], 8, Ar)
|
|
1044
|
+
]))), 128))
|
|
1045
|
+
]));
|
|
1046
|
+
}
|
|
1047
|
+
}, Ps = /* @__PURE__ */ Se(xr, [["__scopeId", "data-v-fe4aecc8"]]), Dr = { class: "fill-content" }, Nr = { class: "operate-content" }, Fr = { class: "collapse-title" }, Pr = { class: "comp-child" }, Ur = {
|
|
1048
|
+
__name: "index",
|
|
1049
|
+
setup(e) {
|
|
1050
|
+
const t = Ze(de), { itemData: n, originalData: r } = Ee(t), o = U([]), s = U([]);
|
|
1051
|
+
pe(
|
|
1052
|
+
() => n.value,
|
|
1053
|
+
() => {
|
|
1054
|
+
var d;
|
|
1055
|
+
!n.value || ((d = n.value) == null ? void 0 : d.length) === 0 || (o.value = k(n.value));
|
|
1056
|
+
},
|
|
1057
|
+
{ deep: !0, immediate: !0 }
|
|
1058
|
+
);
|
|
1059
|
+
const a = (d) => an(d), l = (d, p, m) => {
|
|
1060
|
+
if (!d || d.length === 0) return;
|
|
1061
|
+
let c = k(n.value);
|
|
1062
|
+
const R = k(p);
|
|
1063
|
+
R.compData = d, c = c == null ? void 0 : c.map((T, g) => (g === m && (T = R), T)), t.setItemData(c);
|
|
1064
|
+
};
|
|
1065
|
+
return (d, p) => {
|
|
1066
|
+
const m = Ke("el-collapse-item"), c = Ke("el-collapse");
|
|
1067
|
+
return K(), Z("div", Dr, [
|
|
1068
|
+
p[1] || (p[1] = j("div", { class: "fill-operate" }, G("操作栏"), -1)),
|
|
1069
|
+
j("div", Nr, [
|
|
1070
|
+
Q(c, {
|
|
1071
|
+
modelValue: s.value,
|
|
1072
|
+
"onUpdate:modelValue": p[0] || (p[0] = (R) => s.value = R),
|
|
1073
|
+
class: "collapse-content"
|
|
1074
|
+
}, {
|
|
1075
|
+
default: ie(() => [
|
|
1076
|
+
(K(!0), Z(Ue, null, Be(o.value, (R, T) => (K(), Pe(m, {
|
|
1077
|
+
key: T,
|
|
1078
|
+
name: T
|
|
1079
|
+
}, {
|
|
1080
|
+
title: ie(() => [
|
|
1081
|
+
j("div", Fr, G(R.name), 1)
|
|
1082
|
+
]),
|
|
1083
|
+
default: ie(() => {
|
|
1084
|
+
var g, _;
|
|
1085
|
+
return [
|
|
1086
|
+
j("div", Pr, [
|
|
1087
|
+
(K(), Pe(kt(a(R.comp + "Operate")), {
|
|
1088
|
+
itemContents: R == null ? void 0 : R.compData,
|
|
1089
|
+
originalItemContents: (_ = (g = tn(r)) == null ? void 0 : g.find((u, h) => h === T)) == null ? void 0 : _.compData,
|
|
1090
|
+
onChange: (u) => l(u, R, T)
|
|
1091
|
+
}, null, 40, ["itemContents", "originalItemContents", "onChange"]))
|
|
1092
|
+
])
|
|
1093
|
+
];
|
|
1094
|
+
}),
|
|
1095
|
+
_: 2
|
|
1096
|
+
}, 1032, ["name"]))), 128))
|
|
1097
|
+
]),
|
|
1098
|
+
_: 1
|
|
1099
|
+
}, 8, ["modelValue"])
|
|
1100
|
+
])
|
|
1101
|
+
]);
|
|
1102
|
+
};
|
|
1103
|
+
}
|
|
1104
|
+
}, Us = /* @__PURE__ */ Se(Ur, [["__scopeId", "data-v-a216b035"]]), Br = {
|
|
1105
|
+
key: 0,
|
|
1106
|
+
class: "show-content"
|
|
1107
|
+
}, jr = {
|
|
1108
|
+
__name: "index",
|
|
1109
|
+
setup(e) {
|
|
1110
|
+
const t = Ze(de), { itemData: n } = Ee(t), r = U([]);
|
|
1111
|
+
pe(
|
|
1112
|
+
() => n.value,
|
|
1113
|
+
() => {
|
|
1114
|
+
var s;
|
|
1115
|
+
!n.value || ((s = n.value) == null ? void 0 : s.length) === 0 || (r.value = k(n.value));
|
|
1116
|
+
},
|
|
1117
|
+
{ deep: !0, immediate: !0 }
|
|
1118
|
+
);
|
|
1119
|
+
const o = (s) => an(s);
|
|
1120
|
+
return (s, a) => {
|
|
1121
|
+
var l;
|
|
1122
|
+
return ((l = r.value) == null ? void 0 : l.length) > 0 ? (K(), Z("div", Br, [
|
|
1123
|
+
(K(!0), Z(Ue, null, Be(r.value, (d, p) => (K(), Z("div", {
|
|
1124
|
+
class: "item-content",
|
|
1125
|
+
key: p
|
|
1126
|
+
}, [
|
|
1127
|
+
j("div", null, G(d.name), 1),
|
|
1128
|
+
(K(), Pe(kt(o(d.comp)), {
|
|
1129
|
+
itemData: d == null ? void 0 : d.compData,
|
|
1130
|
+
childItemData: d == null ? void 0 : d.itemChildData,
|
|
1131
|
+
key: p
|
|
1132
|
+
}, null, 8, ["itemData", "childItemData"]))
|
|
1133
|
+
]))), 128))
|
|
1134
|
+
])) : en("", !0);
|
|
1135
|
+
};
|
|
1136
|
+
}
|
|
1137
|
+
}, Bs = /* @__PURE__ */ Se(jr, [["__scopeId", "data-v-79320497"]]), ne = [
|
|
1138
|
+
{
|
|
1139
|
+
key: "FormName",
|
|
1140
|
+
value: "Form"
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
key: "TableName",
|
|
1144
|
+
value: "Table"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
key: "MenuName",
|
|
1148
|
+
value: "Menu"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
key: "GroupName",
|
|
1152
|
+
value: "Group"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
key: "SystemKey",
|
|
1156
|
+
value: "System"
|
|
1157
|
+
}
|
|
1158
|
+
], te = [
|
|
1159
|
+
{
|
|
1160
|
+
key: "FormDirect",
|
|
1161
|
+
value: "formFlex"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
key: "Form",
|
|
1165
|
+
value: "formContent"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
key: "FormButton",
|
|
1169
|
+
value: "formButton"
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
key: "FormFlex",
|
|
1173
|
+
value: "formWrap"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
key: "TableColumns",
|
|
1177
|
+
value: "header"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
key: "TableButton",
|
|
1181
|
+
value: "extraButton"
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
key: "LineButton",
|
|
1185
|
+
value: "rowButton"
|
|
1186
|
+
},
|
|
1187
|
+
{
|
|
1188
|
+
key: "Table",
|
|
1189
|
+
value: "tableContents"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
key: "TableIndex",
|
|
1193
|
+
value: "tableIndex"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
key: "Menus",
|
|
1197
|
+
value: "menuContents"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
key: "GroupContents",
|
|
1201
|
+
value: "groupContents"
|
|
1202
|
+
}
|
|
1203
|
+
], Ie = U(0), lt = U(0), $r = (e) => {
|
|
1204
|
+
let t;
|
|
1205
|
+
e.includes(`\r
|
|
1206
|
+
`) ? t = e.split(`\r
|
|
1207
|
+
`).filter((o) => o.trim() !== "") : t = e.split(`
|
|
1208
|
+
`).filter((o) => o.trim() !== "");
|
|
1209
|
+
const n = [];
|
|
1210
|
+
let r = "";
|
|
1211
|
+
for (const o of t)
|
|
1212
|
+
o.includes("{") || r.includes("{") || o.includes("[") || r.includes("[") || o.includes("【") || r.includes("【") || o.includes("(") || r.includes("(") || o.includes("(") || r.includes("(") ? (r += o.trim(), k(r).split("{").length - 1 === k(r).split("}").length - 1 && k(r).split("【").length - 1 === k(r).split("】").length - 1 && k(r).split("[").length - 1 === k(r).split("]").length - 1 && k(r).split("(").length - 1 === k(r).split(")").length - 1 && k(r).split("(").length - 1 === k(r).split(")").length - 1 && (n.push(r), r = "")) : n.push(o.trim());
|
|
1213
|
+
return n;
|
|
1214
|
+
}, Lr = (e) => {
|
|
1215
|
+
const t = e.trim().replace(/^'|'$/g, ""), n = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, r = {};
|
|
1216
|
+
let o;
|
|
1217
|
+
for (; (o = n.exec(t)) !== null; ) {
|
|
1218
|
+
const s = o[1];
|
|
1219
|
+
let a = o[2].trim();
|
|
1220
|
+
(a.match(/\[/g) || []).length !== (a.match(/\]/g) || []).length && (a = a == null ? void 0 : a.replace(/]$/, "")), r[s] ? (r[s + lt.value] && lt.value++, r[s + lt.value] = s + "=" + a) : r[s] = s + "=" + a;
|
|
1221
|
+
}
|
|
1222
|
+
return r;
|
|
1223
|
+
}, ln = (e) => {
|
|
1224
|
+
const [t, n] = e.split("=").map((s) => s.trim()), r = t.replace(/['"]/g, ""), o = n.replace(/^['"]|['"]$/g, "");
|
|
1225
|
+
return console.log("parseKeyValue:", r, o), { key: r, value: o };
|
|
1226
|
+
}, qr = (e) => {
|
|
1227
|
+
var a;
|
|
1228
|
+
let t = [];
|
|
1229
|
+
const [n, r] = e.split(/=(.+)/), o = n.replace(/['"]/g, "").trim(), s = r.replace(/^['"]|['"]$/g, "");
|
|
1230
|
+
return (a = Object.values(Lr(s))) == null || a.forEach((l) => {
|
|
1231
|
+
t.push(ln(l));
|
|
1232
|
+
}), { key: o, value: t };
|
|
1233
|
+
}, ze = (e) => {
|
|
1234
|
+
try {
|
|
1235
|
+
return JSON.parse(e), !0;
|
|
1236
|
+
} catch {
|
|
1237
|
+
return !1;
|
|
1238
|
+
}
|
|
1239
|
+
}, cn = (e) => {
|
|
1240
|
+
try {
|
|
1241
|
+
const t = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1242
|
+
if (k(t).split("{").length - 1 > 1) {
|
|
1243
|
+
let n = k(t).replace(/^\{(.*)\}$/, "[$1]");
|
|
1244
|
+
if (ze(n) && !n.includes("$") || (n = n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), ze(n)) {
|
|
1245
|
+
const r = JSON.parse(n);
|
|
1246
|
+
let o = [];
|
|
1247
|
+
return r == null || r.forEach((s) => {
|
|
1248
|
+
var a;
|
|
1249
|
+
(a = Object.entries(k(s))) == null || a.forEach((l) => {
|
|
1250
|
+
Ie.value++, o.push({
|
|
1251
|
+
id: Ie.value,
|
|
1252
|
+
key: (l == null ? void 0 : l[0]) ?? "",
|
|
1253
|
+
value: (l == null ? void 0 : l[1]) === "" ? "" : l == null ? void 0 : l[1],
|
|
1254
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1255
|
+
width: Object.keys(k(s)).length
|
|
1256
|
+
});
|
|
1257
|
+
});
|
|
1258
|
+
}), o;
|
|
1259
|
+
} else
|
|
1260
|
+
return console.error("转换类型不正确:"), [];
|
|
1261
|
+
} else if (ze(t)) {
|
|
1262
|
+
const n = JSON.parse(t);
|
|
1263
|
+
return Object.entries(n).map(([r, o]) => (Ie.value++, {
|
|
1264
|
+
id: Ie.value,
|
|
1265
|
+
key: r,
|
|
1266
|
+
value: o === "" ? "" : o,
|
|
1267
|
+
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1268
|
+
width: 1
|
|
1269
|
+
}));
|
|
1270
|
+
} else
|
|
1271
|
+
return t;
|
|
1272
|
+
} catch (t) {
|
|
1273
|
+
return console.error("转换失败:", t), [];
|
|
1274
|
+
}
|
|
1275
|
+
}, Ir = (e, t) => {
|
|
1276
|
+
try {
|
|
1277
|
+
if (ne != null && ne.find((n) => (n == null ? void 0 : n.key) === t))
|
|
1278
|
+
return JSON.parse(e.replace(/[’]|[‘]|[']/g, '"'));
|
|
1279
|
+
if (k(e).split("[").length - 1 > 1) {
|
|
1280
|
+
const n = k(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1281
|
+
return JSON.parse(n);
|
|
1282
|
+
} else {
|
|
1283
|
+
const n = k(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1284
|
+
if (ze(n)) {
|
|
1285
|
+
const r = JSON.parse(n);
|
|
1286
|
+
return Array.isArray(r) ? r.map((o) => ({ label: o })) : r;
|
|
1287
|
+
} else
|
|
1288
|
+
return cn(k(e));
|
|
1289
|
+
}
|
|
1290
|
+
} catch (n) {
|
|
1291
|
+
return console.error("解析失败:", n), e;
|
|
1292
|
+
}
|
|
1293
|
+
}, Jr = (e) => ({ [e == null ? void 0 : e.key]: Ir(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), zr = (e) => {
|
|
1294
|
+
try {
|
|
1295
|
+
if (k(e).split("[").length - 1 > 1) {
|
|
1296
|
+
const t = k(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1297
|
+
return JSON.parse(t);
|
|
1298
|
+
} else
|
|
1299
|
+
return JSON.parse(k(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((n) => ({ label: n }));
|
|
1300
|
+
} catch (t) {
|
|
1301
|
+
return console.error("解析失败:", t), e;
|
|
1302
|
+
}
|
|
1303
|
+
}, js = (e) => {
|
|
1304
|
+
var s, a, l, d, p, m;
|
|
1305
|
+
const t = $r((a = (s = k(e)) == null ? void 0 : s.replace("(", "(")) == null ? void 0 : a.replace(")", ")")), n = (l = k(t)) == null ? void 0 : l.map((c) => {
|
|
1306
|
+
var T, g;
|
|
1307
|
+
let R = (g = (T = k(c)) == null ? void 0 : T.split("=")) == null ? void 0 : g[0];
|
|
1308
|
+
return R != null && R.includes("GroupContents") ? qr(c) : ln(c);
|
|
1309
|
+
}), r = [];
|
|
1310
|
+
console.log("transContents", n), (d = k(n)) == null || d.forEach((c) => {
|
|
1311
|
+
var R, T, g, _, u;
|
|
1312
|
+
ne != null && ne.find((h) => {
|
|
1313
|
+
var y, S;
|
|
1314
|
+
return ((y = h == null ? void 0 : h.key) == null ? void 0 : y.toUpperCase()) === ((S = c == null ? void 0 : c.key) == null ? void 0 : S.toUpperCase());
|
|
1315
|
+
}) ? r.push({
|
|
1316
|
+
comp: ((R = ne == null ? void 0 : ne.find((h) => {
|
|
1317
|
+
var y, S;
|
|
1318
|
+
return ((y = h == null ? void 0 : h.key) == null ? void 0 : y.toUpperCase()) === ((S = c == null ? void 0 : c.key) == null ? void 0 : S.toUpperCase());
|
|
1319
|
+
})) == null ? void 0 : R.value) ?? "",
|
|
1320
|
+
name: (T = c == null ? void 0 : c.value) == null ? void 0 : T.replace(/[’]|[‘]|[']/g, ""),
|
|
1321
|
+
compData: []
|
|
1322
|
+
}) : te != null && te.find((h) => {
|
|
1323
|
+
var y, S;
|
|
1324
|
+
return ((y = h == null ? void 0 : h.key) == null ? void 0 : y.toUpperCase()) === ((S = c == null ? void 0 : c.key) == null ? void 0 : S.toUpperCase());
|
|
1325
|
+
}) && ((r == null ? void 0 : r.length) === 0 && (g = c.key) != null && g.includes("Menus") && r.push({
|
|
1326
|
+
comp: "Menu",
|
|
1327
|
+
name: "",
|
|
1328
|
+
compData: []
|
|
1329
|
+
}), (_ = r == null ? void 0 : r[(r == null ? void 0 : r.length) - 1]) != null && _.compData && r[(r == null ? void 0 : r.length) - 1].compData.push({
|
|
1330
|
+
key: (u = te == null ? void 0 : te.find((h) => {
|
|
1331
|
+
var y, S;
|
|
1332
|
+
return ((y = h == null ? void 0 : h.key) == null ? void 0 : y.toUpperCase()) === ((S = c == null ? void 0 : c.key) == null ? void 0 : S.toUpperCase());
|
|
1333
|
+
})) == null ? void 0 : u.value,
|
|
1334
|
+
contents: c == null ? void 0 : c.value
|
|
1335
|
+
}));
|
|
1336
|
+
}), console.log("newContents", r);
|
|
1337
|
+
let o = (p = k(r)) == null ? void 0 : p.map((c) => {
|
|
1338
|
+
var R;
|
|
1339
|
+
return c != null && c.compData && (c.compData = (R = c == null ? void 0 : c.compData) == null ? void 0 : R.map((T) => {
|
|
1340
|
+
var g, _, u, h, y, S, v, b, E, w, C;
|
|
1341
|
+
if ((T == null ? void 0 : T.key) === "formFlex")
|
|
1342
|
+
T.contents = ((_ = (g = T.contents) == null ? void 0 : g.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : _.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1343
|
+
else if ((T == null ? void 0 : T.key) === "groupContents")
|
|
1344
|
+
T.contents = (u = k(T.contents)) == null ? void 0 : u.map((P) => Jr(k(P)));
|
|
1345
|
+
else if (((y = (h = T.contents) == null ? void 0 : h.trim()) != null && y.startsWith("[") || (v = (S = T.contents) == null ? void 0 : S.trim()) != null && v.startsWith("【")) && ((E = (b = T.contents) == null ? void 0 : b.trim()) != null && E.endsWith("]") || (C = (w = T.contents) == null ? void 0 : w.trim()) != null && C.endsWith("】")))
|
|
1346
|
+
T.contents = zr(k(T.contents));
|
|
1347
|
+
else {
|
|
1348
|
+
if (!T.contents) return;
|
|
1349
|
+
T.contents = cn(k(T.contents));
|
|
1350
|
+
}
|
|
1351
|
+
return T;
|
|
1352
|
+
})), c;
|
|
1353
|
+
});
|
|
1354
|
+
return o = (m = k(o)) == null ? void 0 : m.map((c) => {
|
|
1355
|
+
var R;
|
|
1356
|
+
return (c == null ? void 0 : c.comp) === "Group" && (c.compData = (R = c.compData) == null ? void 0 : R.map((T) => {
|
|
1357
|
+
var _;
|
|
1358
|
+
let g = [];
|
|
1359
|
+
return (_ = T.contents) == null || _.forEach((u) => {
|
|
1360
|
+
var h, y, S, v, b, E, w, C, P, O, X, D;
|
|
1361
|
+
if (ne != null && ne.find((L) => {
|
|
1362
|
+
var z, H, V;
|
|
1363
|
+
return ((z = L == null ? void 0 : L.key) == null ? void 0 : z.toUpperCase()) === ((V = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : V.toUpperCase());
|
|
1364
|
+
}))
|
|
1365
|
+
g.push({
|
|
1366
|
+
comp: (h = ne == null ? void 0 : ne.find((L) => {
|
|
1367
|
+
var z, H, V;
|
|
1368
|
+
return ((z = L == null ? void 0 : L.key) == null ? void 0 : z.toUpperCase()) === ((V = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : V.toUpperCase());
|
|
1369
|
+
})) == null ? void 0 : h.value,
|
|
1370
|
+
name: (S = (y = Object.values(u)) == null ? void 0 : y[0]) == null ? void 0 : S.replace(/[’]|[‘]|[']/g, ""),
|
|
1371
|
+
compData: []
|
|
1372
|
+
});
|
|
1373
|
+
else if (te != null && te.find((L) => {
|
|
1374
|
+
var z, H, V;
|
|
1375
|
+
return ((z = L == null ? void 0 : L.key) == null ? void 0 : z.toUpperCase()) === ((V = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : V.toUpperCase());
|
|
1376
|
+
})) {
|
|
1377
|
+
if ((g == null ? void 0 : g.length) === 0) return;
|
|
1378
|
+
(v = g == null ? void 0 : g[(g == null ? void 0 : g.length) - 1]) != null && v.compData && g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
1379
|
+
key: (b = te == null ? void 0 : te.find((L) => {
|
|
1380
|
+
var z, H, V;
|
|
1381
|
+
return ((z = L == null ? void 0 : L.key) == null ? void 0 : z.toUpperCase()) === ((V = (H = Object.keys(u)) == null ? void 0 : H[0]) == null ? void 0 : V.toUpperCase());
|
|
1382
|
+
})) == null ? void 0 : b.value,
|
|
1383
|
+
contents: (E = Object.values(u)) == null ? void 0 : E[0]
|
|
1384
|
+
});
|
|
1385
|
+
} else if ((C = (w = Object.keys(u)) == null ? void 0 : w[0]) != null && C.includes("$")) {
|
|
1386
|
+
const L = (O = (P = Object.keys(k(u))) == null ? void 0 : P[0]) == null ? void 0 : O.split("$");
|
|
1387
|
+
g[(g == null ? void 0 : g.length) - 1].compData.push({
|
|
1388
|
+
key: (X = te == null ? void 0 : te.find((z) => {
|
|
1389
|
+
var H, V;
|
|
1390
|
+
return ((H = z == null ? void 0 : z.key) == null ? void 0 : H.toUpperCase()) === ((V = L == null ? void 0 : L[0]) == null ? void 0 : V.toUpperCase());
|
|
1391
|
+
})) == null ? void 0 : X.value,
|
|
1392
|
+
contents: (D = Object.values(u)) == null ? void 0 : D[0],
|
|
1393
|
+
selectLabel: L == null ? void 0 : L[1]
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
return u;
|
|
1397
|
+
}), T.contents = g, T;
|
|
1398
|
+
})), c;
|
|
1399
|
+
}), o;
|
|
1400
|
+
};
|
|
1401
|
+
function un(e, t) {
|
|
1402
|
+
return function() {
|
|
1403
|
+
return e.apply(t, arguments);
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
const { toString: Hr } = Object.prototype, { getPrototypeOf: Et } = Object, { iterator: Ye, toStringTag: fn } = Symbol, et = /* @__PURE__ */ ((e) => (t) => {
|
|
1407
|
+
const n = Hr.call(t);
|
|
1408
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
1409
|
+
})(/* @__PURE__ */ Object.create(null)), ce = (e) => (e = e.toLowerCase(), (t) => et(t) === e), tt = (e) => (t) => typeof t === e, { isArray: Ae } = Array, je = tt("undefined");
|
|
1410
|
+
function Mr(e) {
|
|
1411
|
+
return e !== null && !je(e) && e.constructor !== null && !je(e.constructor) && re(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
1412
|
+
}
|
|
1413
|
+
const pn = ce("ArrayBuffer");
|
|
1414
|
+
function Vr(e) {
|
|
1415
|
+
let t;
|
|
1416
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && pn(e.buffer), t;
|
|
1417
|
+
}
|
|
1418
|
+
const Kr = tt("string"), re = tt("function"), dn = tt("number"), nt = (e) => e !== null && typeof e == "object", Wr = (e) => e === !0 || e === !1, He = (e) => {
|
|
1419
|
+
if (et(e) !== "object")
|
|
1420
|
+
return !1;
|
|
1421
|
+
const t = Et(e);
|
|
1422
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(fn in e) && !(Ye in e);
|
|
1423
|
+
}, Gr = ce("Date"), Xr = ce("File"), Zr = ce("Blob"), Qr = ce("FileList"), Yr = (e) => nt(e) && re(e.pipe), eo = (e) => {
|
|
1424
|
+
let t;
|
|
1425
|
+
return e && (typeof FormData == "function" && e instanceof FormData || re(e.append) && ((t = et(e)) === "formdata" || // detect form-data instance
|
|
1426
|
+
t === "object" && re(e.toString) && e.toString() === "[object FormData]"));
|
|
1427
|
+
}, to = ce("URLSearchParams"), [no, ro, oo, so] = ["ReadableStream", "Request", "Response", "Headers"].map(ce), ao = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1428
|
+
function $e(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1429
|
+
if (e === null || typeof e > "u")
|
|
1430
|
+
return;
|
|
1431
|
+
let r, o;
|
|
1432
|
+
if (typeof e != "object" && (e = [e]), Ae(e))
|
|
1433
|
+
for (r = 0, o = e.length; r < o; r++)
|
|
1434
|
+
t.call(null, e[r], r, e);
|
|
1435
|
+
else {
|
|
1436
|
+
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length;
|
|
1437
|
+
let l;
|
|
1438
|
+
for (r = 0; r < a; r++)
|
|
1439
|
+
l = s[r], t.call(null, e[l], l, e);
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
function hn(e, t) {
|
|
1443
|
+
t = t.toLowerCase();
|
|
1444
|
+
const n = Object.keys(e);
|
|
1445
|
+
let r = n.length, o;
|
|
1446
|
+
for (; r-- > 0; )
|
|
1447
|
+
if (o = n[r], t === o.toLowerCase())
|
|
1448
|
+
return o;
|
|
1449
|
+
return null;
|
|
1450
|
+
}
|
|
1451
|
+
const ge = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, mn = (e) => !je(e) && e !== ge;
|
|
1452
|
+
function ft() {
|
|
1453
|
+
const { caseless: e } = mn(this) && this || {}, t = {}, n = (r, o) => {
|
|
1454
|
+
const s = e && hn(t, o) || o;
|
|
1455
|
+
He(t[s]) && He(r) ? t[s] = ft(t[s], r) : He(r) ? t[s] = ft({}, r) : Ae(r) ? t[s] = r.slice() : t[s] = r;
|
|
1456
|
+
};
|
|
1457
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
1458
|
+
arguments[r] && $e(arguments[r], n);
|
|
1459
|
+
return t;
|
|
1460
|
+
}
|
|
1461
|
+
const lo = (e, t, n, { allOwnKeys: r } = {}) => ($e(t, (o, s) => {
|
|
1462
|
+
n && re(o) ? e[s] = un(o, n) : e[s] = o;
|
|
1463
|
+
}, { allOwnKeys: r }), e), io = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), co = (e, t, n, r) => {
|
|
1464
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
1465
|
+
value: t.prototype
|
|
1466
|
+
}), n && Object.assign(e.prototype, n);
|
|
1467
|
+
}, uo = (e, t, n, r) => {
|
|
1468
|
+
let o, s, a;
|
|
1469
|
+
const l = {};
|
|
1470
|
+
if (t = t || {}, e == null) return t;
|
|
1471
|
+
do {
|
|
1472
|
+
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
1473
|
+
a = o[s], (!r || r(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
|
|
1474
|
+
e = n !== !1 && Et(e);
|
|
1475
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
1476
|
+
return t;
|
|
1477
|
+
}, fo = (e, t, n) => {
|
|
1478
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
1479
|
+
const r = e.indexOf(t, n);
|
|
1480
|
+
return r !== -1 && r === n;
|
|
1481
|
+
}, po = (e) => {
|
|
1482
|
+
if (!e) return null;
|
|
1483
|
+
if (Ae(e)) return e;
|
|
1484
|
+
let t = e.length;
|
|
1485
|
+
if (!dn(t)) return null;
|
|
1486
|
+
const n = new Array(t);
|
|
1487
|
+
for (; t-- > 0; )
|
|
1488
|
+
n[t] = e[t];
|
|
1489
|
+
return n;
|
|
1490
|
+
}, ho = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Et(Uint8Array)), mo = (e, t) => {
|
|
1491
|
+
const r = (e && e[Ye]).call(e);
|
|
1492
|
+
let o;
|
|
1493
|
+
for (; (o = r.next()) && !o.done; ) {
|
|
1494
|
+
const s = o.value;
|
|
1495
|
+
t.call(e, s[0], s[1]);
|
|
1496
|
+
}
|
|
1497
|
+
}, yo = (e, t) => {
|
|
1498
|
+
let n;
|
|
1499
|
+
const r = [];
|
|
1500
|
+
for (; (n = e.exec(t)) !== null; )
|
|
1501
|
+
r.push(n);
|
|
1502
|
+
return r;
|
|
1503
|
+
}, bo = ce("HTMLFormElement"), go = (e) => e.toLowerCase().replace(
|
|
1504
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
1505
|
+
function(n, r, o) {
|
|
1506
|
+
return r.toUpperCase() + o;
|
|
1507
|
+
}
|
|
1508
|
+
), qt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), vo = ce("RegExp"), yn = (e, t) => {
|
|
1509
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
1510
|
+
$e(n, (o, s) => {
|
|
1511
|
+
let a;
|
|
1512
|
+
(a = t(o, s, e)) !== !1 && (r[s] = a || o);
|
|
1513
|
+
}), Object.defineProperties(e, r);
|
|
1514
|
+
}, ko = (e) => {
|
|
1515
|
+
yn(e, (t, n) => {
|
|
1516
|
+
if (re(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
1517
|
+
return !1;
|
|
1518
|
+
const r = e[n];
|
|
1519
|
+
if (re(r)) {
|
|
1520
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
1521
|
+
t.writable = !1;
|
|
1522
|
+
return;
|
|
1523
|
+
}
|
|
1524
|
+
t.set || (t.set = () => {
|
|
1525
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
1526
|
+
});
|
|
1527
|
+
}
|
|
1528
|
+
});
|
|
1529
|
+
}, Eo = (e, t) => {
|
|
1530
|
+
const n = {}, r = (o) => {
|
|
1531
|
+
o.forEach((s) => {
|
|
1532
|
+
n[s] = !0;
|
|
1533
|
+
});
|
|
1534
|
+
};
|
|
1535
|
+
return Ae(e) ? r(e) : r(String(e).split(t)), n;
|
|
1536
|
+
}, wo = () => {
|
|
1537
|
+
}, So = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
1538
|
+
function Ro(e) {
|
|
1539
|
+
return !!(e && re(e.append) && e[fn] === "FormData" && e[Ye]);
|
|
1540
|
+
}
|
|
1541
|
+
const To = (e) => {
|
|
1542
|
+
const t = new Array(10), n = (r, o) => {
|
|
1543
|
+
if (nt(r)) {
|
|
1544
|
+
if (t.indexOf(r) >= 0)
|
|
1545
|
+
return;
|
|
1546
|
+
if (!("toJSON" in r)) {
|
|
1547
|
+
t[o] = r;
|
|
1548
|
+
const s = Ae(r) ? [] : {};
|
|
1549
|
+
return $e(r, (a, l) => {
|
|
1550
|
+
const d = n(a, o + 1);
|
|
1551
|
+
!je(d) && (s[l] = d);
|
|
1552
|
+
}), t[o] = void 0, s;
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
return r;
|
|
1556
|
+
};
|
|
1557
|
+
return n(e, 0);
|
|
1558
|
+
}, Oo = ce("AsyncFunction"), _o = (e) => e && (nt(e) || re(e)) && re(e.then) && re(e.catch), bn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ge.addEventListener("message", ({ source: o, data: s }) => {
|
|
1559
|
+
o === ge && s === n && r.length && r.shift()();
|
|
1560
|
+
}, !1), (o) => {
|
|
1561
|
+
r.push(o), ge.postMessage(n, "*");
|
|
1562
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
1563
|
+
typeof setImmediate == "function",
|
|
1564
|
+
re(ge.postMessage)
|
|
1565
|
+
), Ao = typeof queueMicrotask < "u" ? queueMicrotask.bind(ge) : typeof process < "u" && process.nextTick || bn, Co = (e) => e != null && re(e[Ye]), f = {
|
|
1566
|
+
isArray: Ae,
|
|
1567
|
+
isArrayBuffer: pn,
|
|
1568
|
+
isBuffer: Mr,
|
|
1569
|
+
isFormData: eo,
|
|
1570
|
+
isArrayBufferView: Vr,
|
|
1571
|
+
isString: Kr,
|
|
1572
|
+
isNumber: dn,
|
|
1573
|
+
isBoolean: Wr,
|
|
1574
|
+
isObject: nt,
|
|
1575
|
+
isPlainObject: He,
|
|
1576
|
+
isReadableStream: no,
|
|
1577
|
+
isRequest: ro,
|
|
1578
|
+
isResponse: oo,
|
|
1579
|
+
isHeaders: so,
|
|
1580
|
+
isUndefined: je,
|
|
1581
|
+
isDate: Gr,
|
|
1582
|
+
isFile: Xr,
|
|
1583
|
+
isBlob: Zr,
|
|
1584
|
+
isRegExp: vo,
|
|
1585
|
+
isFunction: re,
|
|
1586
|
+
isStream: Yr,
|
|
1587
|
+
isURLSearchParams: to,
|
|
1588
|
+
isTypedArray: ho,
|
|
1589
|
+
isFileList: Qr,
|
|
1590
|
+
forEach: $e,
|
|
1591
|
+
merge: ft,
|
|
1592
|
+
extend: lo,
|
|
1593
|
+
trim: ao,
|
|
1594
|
+
stripBOM: io,
|
|
1595
|
+
inherits: co,
|
|
1596
|
+
toFlatObject: uo,
|
|
1597
|
+
kindOf: et,
|
|
1598
|
+
kindOfTest: ce,
|
|
1599
|
+
endsWith: fo,
|
|
1600
|
+
toArray: po,
|
|
1601
|
+
forEachEntry: mo,
|
|
1602
|
+
matchAll: yo,
|
|
1603
|
+
isHTMLForm: bo,
|
|
1604
|
+
hasOwnProperty: qt,
|
|
1605
|
+
hasOwnProp: qt,
|
|
1606
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
1607
|
+
reduceDescriptors: yn,
|
|
1608
|
+
freezeMethods: ko,
|
|
1609
|
+
toObjectSet: Eo,
|
|
1610
|
+
toCamelCase: go,
|
|
1611
|
+
noop: wo,
|
|
1612
|
+
toFiniteNumber: So,
|
|
1613
|
+
findKey: hn,
|
|
1614
|
+
global: ge,
|
|
1615
|
+
isContextDefined: mn,
|
|
1616
|
+
isSpecCompliantForm: Ro,
|
|
1617
|
+
toJSONObject: To,
|
|
1618
|
+
isAsyncFn: Oo,
|
|
1619
|
+
isThenable: _o,
|
|
1620
|
+
setImmediate: bn,
|
|
1621
|
+
asap: Ao,
|
|
1622
|
+
isIterable: Co
|
|
1623
|
+
};
|
|
1624
|
+
function B(e, t, n, r, o) {
|
|
1625
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
1626
|
+
}
|
|
1627
|
+
f.inherits(B, Error, {
|
|
1628
|
+
toJSON: function() {
|
|
1629
|
+
return {
|
|
1630
|
+
// Standard
|
|
1631
|
+
message: this.message,
|
|
1632
|
+
name: this.name,
|
|
1633
|
+
// Microsoft
|
|
1634
|
+
description: this.description,
|
|
1635
|
+
number: this.number,
|
|
1636
|
+
// Mozilla
|
|
1637
|
+
fileName: this.fileName,
|
|
1638
|
+
lineNumber: this.lineNumber,
|
|
1639
|
+
columnNumber: this.columnNumber,
|
|
1640
|
+
stack: this.stack,
|
|
1641
|
+
// Axios
|
|
1642
|
+
config: f.toJSONObject(this.config),
|
|
1643
|
+
code: this.code,
|
|
1644
|
+
status: this.status
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
const gn = B.prototype, vn = {};
|
|
1649
|
+
[
|
|
1650
|
+
"ERR_BAD_OPTION_VALUE",
|
|
1651
|
+
"ERR_BAD_OPTION",
|
|
1652
|
+
"ECONNABORTED",
|
|
1653
|
+
"ETIMEDOUT",
|
|
1654
|
+
"ERR_NETWORK",
|
|
1655
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
1656
|
+
"ERR_DEPRECATED",
|
|
1657
|
+
"ERR_BAD_RESPONSE",
|
|
1658
|
+
"ERR_BAD_REQUEST",
|
|
1659
|
+
"ERR_CANCELED",
|
|
1660
|
+
"ERR_NOT_SUPPORT",
|
|
1661
|
+
"ERR_INVALID_URL"
|
|
1662
|
+
// eslint-disable-next-line func-names
|
|
1663
|
+
].forEach((e) => {
|
|
1664
|
+
vn[e] = { value: e };
|
|
1665
|
+
});
|
|
1666
|
+
Object.defineProperties(B, vn);
|
|
1667
|
+
Object.defineProperty(gn, "isAxiosError", { value: !0 });
|
|
1668
|
+
B.from = (e, t, n, r, o, s) => {
|
|
1669
|
+
const a = Object.create(gn);
|
|
1670
|
+
return f.toFlatObject(e, a, function(d) {
|
|
1671
|
+
return d !== Error.prototype;
|
|
1672
|
+
}, (l) => l !== "isAxiosError"), B.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
|
|
1673
|
+
};
|
|
1674
|
+
const xo = null;
|
|
1675
|
+
function pt(e) {
|
|
1676
|
+
return f.isPlainObject(e) || f.isArray(e);
|
|
1677
|
+
}
|
|
1678
|
+
function kn(e) {
|
|
1679
|
+
return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
1680
|
+
}
|
|
1681
|
+
function It(e, t, n) {
|
|
1682
|
+
return e ? e.concat(t).map(function(o, s) {
|
|
1683
|
+
return o = kn(o), !n && s ? "[" + o + "]" : o;
|
|
1684
|
+
}).join(n ? "." : "") : t;
|
|
1685
|
+
}
|
|
1686
|
+
function Do(e) {
|
|
1687
|
+
return f.isArray(e) && !e.some(pt);
|
|
1688
|
+
}
|
|
1689
|
+
const No = f.toFlatObject(f, {}, null, function(t) {
|
|
1690
|
+
return /^is[A-Z]/.test(t);
|
|
1691
|
+
});
|
|
1692
|
+
function rt(e, t, n) {
|
|
1693
|
+
if (!f.isObject(e))
|
|
1694
|
+
throw new TypeError("target must be an object");
|
|
1695
|
+
t = t || new FormData(), n = f.toFlatObject(n, {
|
|
1696
|
+
metaTokens: !0,
|
|
1697
|
+
dots: !1,
|
|
1698
|
+
indexes: !1
|
|
1699
|
+
}, !1, function(_, u) {
|
|
1700
|
+
return !f.isUndefined(u[_]);
|
|
1701
|
+
});
|
|
1702
|
+
const r = n.metaTokens, o = n.visitor || m, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
|
|
1703
|
+
if (!f.isFunction(o))
|
|
1704
|
+
throw new TypeError("visitor must be a function");
|
|
1705
|
+
function p(g) {
|
|
1706
|
+
if (g === null) return "";
|
|
1707
|
+
if (f.isDate(g))
|
|
1708
|
+
return g.toISOString();
|
|
1709
|
+
if (!d && f.isBlob(g))
|
|
1710
|
+
throw new B("Blob is not supported. Use a Buffer instead.");
|
|
1711
|
+
return f.isArrayBuffer(g) || f.isTypedArray(g) ? d && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
1712
|
+
}
|
|
1713
|
+
function m(g, _, u) {
|
|
1714
|
+
let h = g;
|
|
1715
|
+
if (g && !u && typeof g == "object") {
|
|
1716
|
+
if (f.endsWith(_, "{}"))
|
|
1717
|
+
_ = r ? _ : _.slice(0, -2), g = JSON.stringify(g);
|
|
1718
|
+
else if (f.isArray(g) && Do(g) || (f.isFileList(g) || f.endsWith(_, "[]")) && (h = f.toArray(g)))
|
|
1719
|
+
return _ = kn(_), h.forEach(function(S, v) {
|
|
1720
|
+
!(f.isUndefined(S) || S === null) && t.append(
|
|
1721
|
+
// eslint-disable-next-line no-nested-ternary
|
|
1722
|
+
a === !0 ? It([_], v, s) : a === null ? _ : _ + "[]",
|
|
1723
|
+
p(S)
|
|
1724
|
+
);
|
|
1725
|
+
}), !1;
|
|
1726
|
+
}
|
|
1727
|
+
return pt(g) ? !0 : (t.append(It(u, _, s), p(g)), !1);
|
|
1728
|
+
}
|
|
1729
|
+
const c = [], R = Object.assign(No, {
|
|
1730
|
+
defaultVisitor: m,
|
|
1731
|
+
convertValue: p,
|
|
1732
|
+
isVisitable: pt
|
|
1733
|
+
});
|
|
1734
|
+
function T(g, _) {
|
|
1735
|
+
if (!f.isUndefined(g)) {
|
|
1736
|
+
if (c.indexOf(g) !== -1)
|
|
1737
|
+
throw Error("Circular reference detected in " + _.join("."));
|
|
1738
|
+
c.push(g), f.forEach(g, function(h, y) {
|
|
1739
|
+
(!(f.isUndefined(h) || h === null) && o.call(
|
|
1740
|
+
t,
|
|
1741
|
+
h,
|
|
1742
|
+
f.isString(y) ? y.trim() : y,
|
|
1743
|
+
_,
|
|
1744
|
+
R
|
|
1745
|
+
)) === !0 && T(h, _ ? _.concat(y) : [y]);
|
|
1746
|
+
}), c.pop();
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
if (!f.isObject(e))
|
|
1750
|
+
throw new TypeError("data must be an object");
|
|
1751
|
+
return T(e), t;
|
|
1752
|
+
}
|
|
1753
|
+
function Jt(e) {
|
|
1754
|
+
const t = {
|
|
1755
|
+
"!": "%21",
|
|
1756
|
+
"'": "%27",
|
|
1757
|
+
"(": "%28",
|
|
1758
|
+
")": "%29",
|
|
1759
|
+
"~": "%7E",
|
|
1760
|
+
"%20": "+",
|
|
1761
|
+
"%00": "\0"
|
|
1762
|
+
};
|
|
1763
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
1764
|
+
return t[r];
|
|
1765
|
+
});
|
|
1766
|
+
}
|
|
1767
|
+
function wt(e, t) {
|
|
1768
|
+
this._pairs = [], e && rt(e, this, t);
|
|
1769
|
+
}
|
|
1770
|
+
const En = wt.prototype;
|
|
1771
|
+
En.append = function(t, n) {
|
|
1772
|
+
this._pairs.push([t, n]);
|
|
1773
|
+
};
|
|
1774
|
+
En.toString = function(t) {
|
|
1775
|
+
const n = t ? function(r) {
|
|
1776
|
+
return t.call(this, r, Jt);
|
|
1777
|
+
} : Jt;
|
|
1778
|
+
return this._pairs.map(function(o) {
|
|
1779
|
+
return n(o[0]) + "=" + n(o[1]);
|
|
1780
|
+
}, "").join("&");
|
|
1781
|
+
};
|
|
1782
|
+
function Fo(e) {
|
|
1783
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
1784
|
+
}
|
|
1785
|
+
function wn(e, t, n) {
|
|
1786
|
+
if (!t)
|
|
1787
|
+
return e;
|
|
1788
|
+
const r = n && n.encode || Fo;
|
|
1789
|
+
f.isFunction(n) && (n = {
|
|
1790
|
+
serialize: n
|
|
1791
|
+
});
|
|
1792
|
+
const o = n && n.serialize;
|
|
1793
|
+
let s;
|
|
1794
|
+
if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new wt(t, n).toString(r), s) {
|
|
1795
|
+
const a = e.indexOf("#");
|
|
1796
|
+
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
1797
|
+
}
|
|
1798
|
+
return e;
|
|
1799
|
+
}
|
|
1800
|
+
class zt {
|
|
1801
|
+
constructor() {
|
|
1802
|
+
this.handlers = [];
|
|
1803
|
+
}
|
|
1804
|
+
/**
|
|
1805
|
+
* Add a new interceptor to the stack
|
|
1806
|
+
*
|
|
1807
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
1808
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
1809
|
+
*
|
|
1810
|
+
* @return {Number} An ID used to remove interceptor later
|
|
1811
|
+
*/
|
|
1812
|
+
use(t, n, r) {
|
|
1813
|
+
return this.handlers.push({
|
|
1814
|
+
fulfilled: t,
|
|
1815
|
+
rejected: n,
|
|
1816
|
+
synchronous: r ? r.synchronous : !1,
|
|
1817
|
+
runWhen: r ? r.runWhen : null
|
|
1818
|
+
}), this.handlers.length - 1;
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Remove an interceptor from the stack
|
|
1822
|
+
*
|
|
1823
|
+
* @param {Number} id The ID that was returned by `use`
|
|
1824
|
+
*
|
|
1825
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
1826
|
+
*/
|
|
1827
|
+
eject(t) {
|
|
1828
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
1829
|
+
}
|
|
1830
|
+
/**
|
|
1831
|
+
* Clear all interceptors from the stack
|
|
1832
|
+
*
|
|
1833
|
+
* @returns {void}
|
|
1834
|
+
*/
|
|
1835
|
+
clear() {
|
|
1836
|
+
this.handlers && (this.handlers = []);
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Iterate over all the registered interceptors
|
|
1840
|
+
*
|
|
1841
|
+
* This method is particularly useful for skipping over any
|
|
1842
|
+
* interceptors that may have become `null` calling `eject`.
|
|
1843
|
+
*
|
|
1844
|
+
* @param {Function} fn The function to call for each interceptor
|
|
1845
|
+
*
|
|
1846
|
+
* @returns {void}
|
|
1847
|
+
*/
|
|
1848
|
+
forEach(t) {
|
|
1849
|
+
f.forEach(this.handlers, function(r) {
|
|
1850
|
+
r !== null && t(r);
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
const Sn = {
|
|
1855
|
+
silentJSONParsing: !0,
|
|
1856
|
+
forcedJSONParsing: !0,
|
|
1857
|
+
clarifyTimeoutError: !1
|
|
1858
|
+
}, Po = typeof URLSearchParams < "u" ? URLSearchParams : wt, Uo = typeof FormData < "u" ? FormData : null, Bo = typeof Blob < "u" ? Blob : null, jo = {
|
|
1859
|
+
isBrowser: !0,
|
|
1860
|
+
classes: {
|
|
1861
|
+
URLSearchParams: Po,
|
|
1862
|
+
FormData: Uo,
|
|
1863
|
+
Blob: Bo
|
|
1864
|
+
},
|
|
1865
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1866
|
+
}, St = typeof window < "u" && typeof document < "u", dt = typeof navigator == "object" && navigator || void 0, $o = St && (!dt || ["ReactNative", "NativeScript", "NS"].indexOf(dt.product) < 0), Lo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1867
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", qo = St && window.location.href || "http://localhost", Io = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1868
|
+
__proto__: null,
|
|
1869
|
+
hasBrowserEnv: St,
|
|
1870
|
+
hasStandardBrowserEnv: $o,
|
|
1871
|
+
hasStandardBrowserWebWorkerEnv: Lo,
|
|
1872
|
+
navigator: dt,
|
|
1873
|
+
origin: qo
|
|
1874
|
+
}, Symbol.toStringTag, { value: "Module" })), Y = {
|
|
1875
|
+
...Io,
|
|
1876
|
+
...jo
|
|
1877
|
+
};
|
|
1878
|
+
function Jo(e, t) {
|
|
1879
|
+
return rt(e, new Y.classes.URLSearchParams(), Object.assign({
|
|
1880
|
+
visitor: function(n, r, o, s) {
|
|
1881
|
+
return Y.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
1882
|
+
}
|
|
1883
|
+
}, t));
|
|
1884
|
+
}
|
|
1885
|
+
function zo(e) {
|
|
1886
|
+
return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
1887
|
+
}
|
|
1888
|
+
function Ho(e) {
|
|
1889
|
+
const t = {}, n = Object.keys(e);
|
|
1890
|
+
let r;
|
|
1891
|
+
const o = n.length;
|
|
1892
|
+
let s;
|
|
1893
|
+
for (r = 0; r < o; r++)
|
|
1894
|
+
s = n[r], t[s] = e[s];
|
|
1895
|
+
return t;
|
|
1896
|
+
}
|
|
1897
|
+
function Rn(e) {
|
|
1898
|
+
function t(n, r, o, s) {
|
|
1899
|
+
let a = n[s++];
|
|
1900
|
+
if (a === "__proto__") return !0;
|
|
1901
|
+
const l = Number.isFinite(+a), d = s >= n.length;
|
|
1902
|
+
return a = !a && f.isArray(o) ? o.length : a, d ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !l) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] = Ho(o[a])), !l);
|
|
1903
|
+
}
|
|
1904
|
+
if (f.isFormData(e) && f.isFunction(e.entries)) {
|
|
1905
|
+
const n = {};
|
|
1906
|
+
return f.forEachEntry(e, (r, o) => {
|
|
1907
|
+
t(zo(r), o, n, 0);
|
|
1908
|
+
}), n;
|
|
1909
|
+
}
|
|
1910
|
+
return null;
|
|
1911
|
+
}
|
|
1912
|
+
function Mo(e, t, n) {
|
|
1913
|
+
if (f.isString(e))
|
|
1914
|
+
try {
|
|
1915
|
+
return (t || JSON.parse)(e), f.trim(e);
|
|
1916
|
+
} catch (r) {
|
|
1917
|
+
if (r.name !== "SyntaxError")
|
|
1918
|
+
throw r;
|
|
1919
|
+
}
|
|
1920
|
+
return (n || JSON.stringify)(e);
|
|
1921
|
+
}
|
|
1922
|
+
const Le = {
|
|
1923
|
+
transitional: Sn,
|
|
1924
|
+
adapter: ["xhr", "http", "fetch"],
|
|
1925
|
+
transformRequest: [function(t, n) {
|
|
1926
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = f.isObject(t);
|
|
1927
|
+
if (s && f.isHTMLForm(t) && (t = new FormData(t)), f.isFormData(t))
|
|
1928
|
+
return o ? JSON.stringify(Rn(t)) : t;
|
|
1929
|
+
if (f.isArrayBuffer(t) || f.isBuffer(t) || f.isStream(t) || f.isFile(t) || f.isBlob(t) || f.isReadableStream(t))
|
|
1930
|
+
return t;
|
|
1931
|
+
if (f.isArrayBufferView(t))
|
|
1932
|
+
return t.buffer;
|
|
1933
|
+
if (f.isURLSearchParams(t))
|
|
1934
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
1935
|
+
let l;
|
|
1936
|
+
if (s) {
|
|
1937
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1938
|
+
return Jo(t, this.formSerializer).toString();
|
|
1939
|
+
if ((l = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
1940
|
+
const d = this.env && this.env.FormData;
|
|
1941
|
+
return rt(
|
|
1942
|
+
l ? { "files[]": t } : t,
|
|
1943
|
+
d && new d(),
|
|
1944
|
+
this.formSerializer
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
return s || o ? (n.setContentType("application/json", !1), Mo(t)) : t;
|
|
1949
|
+
}],
|
|
1950
|
+
transformResponse: [function(t) {
|
|
1951
|
+
const n = this.transitional || Le.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
1952
|
+
if (f.isResponse(t) || f.isReadableStream(t))
|
|
1953
|
+
return t;
|
|
1954
|
+
if (t && f.isString(t) && (r && !this.responseType || o)) {
|
|
1955
|
+
const a = !(n && n.silentJSONParsing) && o;
|
|
1956
|
+
try {
|
|
1957
|
+
return JSON.parse(t);
|
|
1958
|
+
} catch (l) {
|
|
1959
|
+
if (a)
|
|
1960
|
+
throw l.name === "SyntaxError" ? B.from(l, B.ERR_BAD_RESPONSE, this, null, this.response) : l;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
return t;
|
|
1964
|
+
}],
|
|
1965
|
+
/**
|
|
1966
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1967
|
+
* timeout is not created.
|
|
1968
|
+
*/
|
|
1969
|
+
timeout: 0,
|
|
1970
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
1971
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1972
|
+
maxContentLength: -1,
|
|
1973
|
+
maxBodyLength: -1,
|
|
1974
|
+
env: {
|
|
1975
|
+
FormData: Y.classes.FormData,
|
|
1976
|
+
Blob: Y.classes.Blob
|
|
1977
|
+
},
|
|
1978
|
+
validateStatus: function(t) {
|
|
1979
|
+
return t >= 200 && t < 300;
|
|
1980
|
+
},
|
|
1981
|
+
headers: {
|
|
1982
|
+
common: {
|
|
1983
|
+
Accept: "application/json, text/plain, */*",
|
|
1984
|
+
"Content-Type": void 0
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
};
|
|
1988
|
+
f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
1989
|
+
Le.headers[e] = {};
|
|
1990
|
+
});
|
|
1991
|
+
const Vo = f.toObjectSet([
|
|
1992
|
+
"age",
|
|
1993
|
+
"authorization",
|
|
1994
|
+
"content-length",
|
|
1995
|
+
"content-type",
|
|
1996
|
+
"etag",
|
|
1997
|
+
"expires",
|
|
1998
|
+
"from",
|
|
1999
|
+
"host",
|
|
2000
|
+
"if-modified-since",
|
|
2001
|
+
"if-unmodified-since",
|
|
2002
|
+
"last-modified",
|
|
2003
|
+
"location",
|
|
2004
|
+
"max-forwards",
|
|
2005
|
+
"proxy-authorization",
|
|
2006
|
+
"referer",
|
|
2007
|
+
"retry-after",
|
|
2008
|
+
"user-agent"
|
|
2009
|
+
]), Ko = (e) => {
|
|
2010
|
+
const t = {};
|
|
2011
|
+
let n, r, o;
|
|
2012
|
+
return e && e.split(`
|
|
2013
|
+
`).forEach(function(a) {
|
|
2014
|
+
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Vo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
2015
|
+
}), t;
|
|
2016
|
+
}, Ht = Symbol("internals");
|
|
2017
|
+
function De(e) {
|
|
2018
|
+
return e && String(e).trim().toLowerCase();
|
|
2019
|
+
}
|
|
2020
|
+
function Me(e) {
|
|
2021
|
+
return e === !1 || e == null ? e : f.isArray(e) ? e.map(Me) : String(e);
|
|
2022
|
+
}
|
|
2023
|
+
function Wo(e) {
|
|
2024
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2025
|
+
let r;
|
|
2026
|
+
for (; r = n.exec(e); )
|
|
2027
|
+
t[r[1]] = r[2];
|
|
2028
|
+
return t;
|
|
2029
|
+
}
|
|
2030
|
+
const Go = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
2031
|
+
function it(e, t, n, r, o) {
|
|
2032
|
+
if (f.isFunction(r))
|
|
2033
|
+
return r.call(this, t, n);
|
|
2034
|
+
if (o && (t = n), !!f.isString(t)) {
|
|
2035
|
+
if (f.isString(r))
|
|
2036
|
+
return t.indexOf(r) !== -1;
|
|
2037
|
+
if (f.isRegExp(r))
|
|
2038
|
+
return r.test(t);
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
function Xo(e) {
|
|
2042
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
2043
|
+
}
|
|
2044
|
+
function Zo(e, t) {
|
|
2045
|
+
const n = f.toCamelCase(" " + t);
|
|
2046
|
+
["get", "set", "has"].forEach((r) => {
|
|
2047
|
+
Object.defineProperty(e, r + n, {
|
|
2048
|
+
value: function(o, s, a) {
|
|
2049
|
+
return this[r].call(this, t, o, s, a);
|
|
2050
|
+
},
|
|
2051
|
+
configurable: !0
|
|
2052
|
+
});
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
let oe = class {
|
|
2056
|
+
constructor(t) {
|
|
2057
|
+
t && this.set(t);
|
|
2058
|
+
}
|
|
2059
|
+
set(t, n, r) {
|
|
2060
|
+
const o = this;
|
|
2061
|
+
function s(l, d, p) {
|
|
2062
|
+
const m = De(d);
|
|
2063
|
+
if (!m)
|
|
2064
|
+
throw new Error("header name must be a non-empty string");
|
|
2065
|
+
const c = f.findKey(o, m);
|
|
2066
|
+
(!c || o[c] === void 0 || p === !0 || p === void 0 && o[c] !== !1) && (o[c || d] = Me(l));
|
|
2067
|
+
}
|
|
2068
|
+
const a = (l, d) => f.forEach(l, (p, m) => s(p, m, d));
|
|
2069
|
+
if (f.isPlainObject(t) || t instanceof this.constructor)
|
|
2070
|
+
a(t, n);
|
|
2071
|
+
else if (f.isString(t) && (t = t.trim()) && !Go(t))
|
|
2072
|
+
a(Ko(t), n);
|
|
2073
|
+
else if (f.isObject(t) && f.isIterable(t)) {
|
|
2074
|
+
let l = {}, d, p;
|
|
2075
|
+
for (const m of t) {
|
|
2076
|
+
if (!f.isArray(m))
|
|
2077
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
2078
|
+
l[p = m[0]] = (d = l[p]) ? f.isArray(d) ? [...d, m[1]] : [d, m[1]] : m[1];
|
|
2079
|
+
}
|
|
2080
|
+
a(l, n);
|
|
2081
|
+
} else
|
|
2082
|
+
t != null && s(n, t, r);
|
|
2083
|
+
return this;
|
|
2084
|
+
}
|
|
2085
|
+
get(t, n) {
|
|
2086
|
+
if (t = De(t), t) {
|
|
2087
|
+
const r = f.findKey(this, t);
|
|
2088
|
+
if (r) {
|
|
2089
|
+
const o = this[r];
|
|
2090
|
+
if (!n)
|
|
2091
|
+
return o;
|
|
2092
|
+
if (n === !0)
|
|
2093
|
+
return Wo(o);
|
|
2094
|
+
if (f.isFunction(n))
|
|
2095
|
+
return n.call(this, o, r);
|
|
2096
|
+
if (f.isRegExp(n))
|
|
2097
|
+
return n.exec(o);
|
|
2098
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
has(t, n) {
|
|
2103
|
+
if (t = De(t), t) {
|
|
2104
|
+
const r = f.findKey(this, t);
|
|
2105
|
+
return !!(r && this[r] !== void 0 && (!n || it(this, this[r], r, n)));
|
|
2106
|
+
}
|
|
2107
|
+
return !1;
|
|
2108
|
+
}
|
|
2109
|
+
delete(t, n) {
|
|
2110
|
+
const r = this;
|
|
2111
|
+
let o = !1;
|
|
2112
|
+
function s(a) {
|
|
2113
|
+
if (a = De(a), a) {
|
|
2114
|
+
const l = f.findKey(r, a);
|
|
2115
|
+
l && (!n || it(r, r[l], l, n)) && (delete r[l], o = !0);
|
|
2116
|
+
}
|
|
2117
|
+
}
|
|
2118
|
+
return f.isArray(t) ? t.forEach(s) : s(t), o;
|
|
2119
|
+
}
|
|
2120
|
+
clear(t) {
|
|
2121
|
+
const n = Object.keys(this);
|
|
2122
|
+
let r = n.length, o = !1;
|
|
2123
|
+
for (; r--; ) {
|
|
2124
|
+
const s = n[r];
|
|
2125
|
+
(!t || it(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
2126
|
+
}
|
|
2127
|
+
return o;
|
|
2128
|
+
}
|
|
2129
|
+
normalize(t) {
|
|
2130
|
+
const n = this, r = {};
|
|
2131
|
+
return f.forEach(this, (o, s) => {
|
|
2132
|
+
const a = f.findKey(r, s);
|
|
2133
|
+
if (a) {
|
|
2134
|
+
n[a] = Me(o), delete n[s];
|
|
2135
|
+
return;
|
|
2136
|
+
}
|
|
2137
|
+
const l = t ? Xo(s) : String(s).trim();
|
|
2138
|
+
l !== s && delete n[s], n[l] = Me(o), r[l] = !0;
|
|
2139
|
+
}), this;
|
|
2140
|
+
}
|
|
2141
|
+
concat(...t) {
|
|
2142
|
+
return this.constructor.concat(this, ...t);
|
|
2143
|
+
}
|
|
2144
|
+
toJSON(t) {
|
|
2145
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
2146
|
+
return f.forEach(this, (r, o) => {
|
|
2147
|
+
r != null && r !== !1 && (n[o] = t && f.isArray(r) ? r.join(", ") : r);
|
|
2148
|
+
}), n;
|
|
2149
|
+
}
|
|
2150
|
+
[Symbol.iterator]() {
|
|
2151
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
2152
|
+
}
|
|
2153
|
+
toString() {
|
|
2154
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
2155
|
+
`);
|
|
2156
|
+
}
|
|
2157
|
+
getSetCookie() {
|
|
2158
|
+
return this.get("set-cookie") || [];
|
|
2159
|
+
}
|
|
2160
|
+
get [Symbol.toStringTag]() {
|
|
2161
|
+
return "AxiosHeaders";
|
|
2162
|
+
}
|
|
2163
|
+
static from(t) {
|
|
2164
|
+
return t instanceof this ? t : new this(t);
|
|
2165
|
+
}
|
|
2166
|
+
static concat(t, ...n) {
|
|
2167
|
+
const r = new this(t);
|
|
2168
|
+
return n.forEach((o) => r.set(o)), r;
|
|
2169
|
+
}
|
|
2170
|
+
static accessor(t) {
|
|
2171
|
+
const r = (this[Ht] = this[Ht] = {
|
|
2172
|
+
accessors: {}
|
|
2173
|
+
}).accessors, o = this.prototype;
|
|
2174
|
+
function s(a) {
|
|
2175
|
+
const l = De(a);
|
|
2176
|
+
r[l] || (Zo(o, a), r[l] = !0);
|
|
2177
|
+
}
|
|
2178
|
+
return f.isArray(t) ? t.forEach(s) : s(t), this;
|
|
2179
|
+
}
|
|
2180
|
+
};
|
|
2181
|
+
oe.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
2182
|
+
f.reduceDescriptors(oe.prototype, ({ value: e }, t) => {
|
|
2183
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
2184
|
+
return {
|
|
2185
|
+
get: () => e,
|
|
2186
|
+
set(r) {
|
|
2187
|
+
this[n] = r;
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
});
|
|
2191
|
+
f.freezeMethods(oe);
|
|
2192
|
+
function ct(e, t) {
|
|
2193
|
+
const n = this || Le, r = t || n, o = oe.from(r.headers);
|
|
2194
|
+
let s = r.data;
|
|
2195
|
+
return f.forEach(e, function(l) {
|
|
2196
|
+
s = l.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
2197
|
+
}), o.normalize(), s;
|
|
2198
|
+
}
|
|
2199
|
+
function Tn(e) {
|
|
2200
|
+
return !!(e && e.__CANCEL__);
|
|
2201
|
+
}
|
|
2202
|
+
function Ce(e, t, n) {
|
|
2203
|
+
B.call(this, e ?? "canceled", B.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
2204
|
+
}
|
|
2205
|
+
f.inherits(Ce, B, {
|
|
2206
|
+
__CANCEL__: !0
|
|
2207
|
+
});
|
|
2208
|
+
function On(e, t, n) {
|
|
2209
|
+
const r = n.config.validateStatus;
|
|
2210
|
+
!n.status || !r || r(n.status) ? e(n) : t(new B(
|
|
2211
|
+
"Request failed with status code " + n.status,
|
|
2212
|
+
[B.ERR_BAD_REQUEST, B.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
2213
|
+
n.config,
|
|
2214
|
+
n.request,
|
|
2215
|
+
n
|
|
2216
|
+
));
|
|
2217
|
+
}
|
|
2218
|
+
function Qo(e) {
|
|
2219
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
2220
|
+
return t && t[1] || "";
|
|
2221
|
+
}
|
|
2222
|
+
function Yo(e, t) {
|
|
2223
|
+
e = e || 10;
|
|
2224
|
+
const n = new Array(e), r = new Array(e);
|
|
2225
|
+
let o = 0, s = 0, a;
|
|
2226
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
2227
|
+
const p = Date.now(), m = r[s];
|
|
2228
|
+
a || (a = p), n[o] = d, r[o] = p;
|
|
2229
|
+
let c = s, R = 0;
|
|
2230
|
+
for (; c !== o; )
|
|
2231
|
+
R += n[c++], c = c % e;
|
|
2232
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), p - a < t)
|
|
2233
|
+
return;
|
|
2234
|
+
const T = m && p - m;
|
|
2235
|
+
return T ? Math.round(R * 1e3 / T) : void 0;
|
|
2236
|
+
};
|
|
2237
|
+
}
|
|
2238
|
+
function es(e, t) {
|
|
2239
|
+
let n = 0, r = 1e3 / t, o, s;
|
|
2240
|
+
const a = (p, m = Date.now()) => {
|
|
2241
|
+
n = m, o = null, s && (clearTimeout(s), s = null), e.apply(null, p);
|
|
2242
|
+
};
|
|
2243
|
+
return [(...p) => {
|
|
2244
|
+
const m = Date.now(), c = m - n;
|
|
2245
|
+
c >= r ? a(p, m) : (o = p, s || (s = setTimeout(() => {
|
|
2246
|
+
s = null, a(o);
|
|
2247
|
+
}, r - c)));
|
|
2248
|
+
}, () => o && a(o)];
|
|
2249
|
+
}
|
|
2250
|
+
const We = (e, t, n = 3) => {
|
|
2251
|
+
let r = 0;
|
|
2252
|
+
const o = Yo(50, 250);
|
|
2253
|
+
return es((s) => {
|
|
2254
|
+
const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r, p = o(d), m = a <= l;
|
|
2255
|
+
r = a;
|
|
2256
|
+
const c = {
|
|
2257
|
+
loaded: a,
|
|
2258
|
+
total: l,
|
|
2259
|
+
progress: l ? a / l : void 0,
|
|
2260
|
+
bytes: d,
|
|
2261
|
+
rate: p || void 0,
|
|
2262
|
+
estimated: p && l && m ? (l - a) / p : void 0,
|
|
2263
|
+
event: s,
|
|
2264
|
+
lengthComputable: l != null,
|
|
2265
|
+
[t ? "download" : "upload"]: !0
|
|
2266
|
+
};
|
|
2267
|
+
e(c);
|
|
2268
|
+
}, n);
|
|
2269
|
+
}, Mt = (e, t) => {
|
|
2270
|
+
const n = e != null;
|
|
2271
|
+
return [(r) => t[0]({
|
|
2272
|
+
lengthComputable: n,
|
|
2273
|
+
total: e,
|
|
2274
|
+
loaded: r
|
|
2275
|
+
}), t[1]];
|
|
2276
|
+
}, Vt = (e) => (...t) => f.asap(() => e(...t)), ts = Y.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Y.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
2277
|
+
new URL(Y.origin),
|
|
2278
|
+
Y.navigator && /(msie|trident)/i.test(Y.navigator.userAgent)
|
|
2279
|
+
) : () => !0, ns = Y.hasStandardBrowserEnv ? (
|
|
2280
|
+
// Standard browser envs support document.cookie
|
|
2281
|
+
{
|
|
2282
|
+
write(e, t, n, r, o, s) {
|
|
2283
|
+
const a = [e + "=" + encodeURIComponent(t)];
|
|
2284
|
+
f.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), f.isString(r) && a.push("path=" + r), f.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
2285
|
+
},
|
|
2286
|
+
read(e) {
|
|
2287
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
2288
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
2289
|
+
},
|
|
2290
|
+
remove(e) {
|
|
2291
|
+
this.write(e, "", Date.now() - 864e5);
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
) : (
|
|
2295
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
2296
|
+
{
|
|
2297
|
+
write() {
|
|
2298
|
+
},
|
|
2299
|
+
read() {
|
|
2300
|
+
return null;
|
|
2301
|
+
},
|
|
2302
|
+
remove() {
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
);
|
|
2306
|
+
function rs(e) {
|
|
2307
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
2308
|
+
}
|
|
2309
|
+
function os(e, t) {
|
|
2310
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
2311
|
+
}
|
|
2312
|
+
function _n(e, t, n) {
|
|
2313
|
+
let r = !rs(t);
|
|
2314
|
+
return e && (r || n == !1) ? os(e, t) : t;
|
|
2315
|
+
}
|
|
2316
|
+
const Kt = (e) => e instanceof oe ? { ...e } : e;
|
|
2317
|
+
function we(e, t) {
|
|
2318
|
+
t = t || {};
|
|
2319
|
+
const n = {};
|
|
2320
|
+
function r(p, m, c, R) {
|
|
2321
|
+
return f.isPlainObject(p) && f.isPlainObject(m) ? f.merge.call({ caseless: R }, p, m) : f.isPlainObject(m) ? f.merge({}, m) : f.isArray(m) ? m.slice() : m;
|
|
2322
|
+
}
|
|
2323
|
+
function o(p, m, c, R) {
|
|
2324
|
+
if (f.isUndefined(m)) {
|
|
2325
|
+
if (!f.isUndefined(p))
|
|
2326
|
+
return r(void 0, p, c, R);
|
|
2327
|
+
} else return r(p, m, c, R);
|
|
2328
|
+
}
|
|
2329
|
+
function s(p, m) {
|
|
2330
|
+
if (!f.isUndefined(m))
|
|
2331
|
+
return r(void 0, m);
|
|
2332
|
+
}
|
|
2333
|
+
function a(p, m) {
|
|
2334
|
+
if (f.isUndefined(m)) {
|
|
2335
|
+
if (!f.isUndefined(p))
|
|
2336
|
+
return r(void 0, p);
|
|
2337
|
+
} else return r(void 0, m);
|
|
2338
|
+
}
|
|
2339
|
+
function l(p, m, c) {
|
|
2340
|
+
if (c in t)
|
|
2341
|
+
return r(p, m);
|
|
2342
|
+
if (c in e)
|
|
2343
|
+
return r(void 0, p);
|
|
2344
|
+
}
|
|
2345
|
+
const d = {
|
|
2346
|
+
url: s,
|
|
2347
|
+
method: s,
|
|
2348
|
+
data: s,
|
|
2349
|
+
baseURL: a,
|
|
2350
|
+
transformRequest: a,
|
|
2351
|
+
transformResponse: a,
|
|
2352
|
+
paramsSerializer: a,
|
|
2353
|
+
timeout: a,
|
|
2354
|
+
timeoutMessage: a,
|
|
2355
|
+
withCredentials: a,
|
|
2356
|
+
withXSRFToken: a,
|
|
2357
|
+
adapter: a,
|
|
2358
|
+
responseType: a,
|
|
2359
|
+
xsrfCookieName: a,
|
|
2360
|
+
xsrfHeaderName: a,
|
|
2361
|
+
onUploadProgress: a,
|
|
2362
|
+
onDownloadProgress: a,
|
|
2363
|
+
decompress: a,
|
|
2364
|
+
maxContentLength: a,
|
|
2365
|
+
maxBodyLength: a,
|
|
2366
|
+
beforeRedirect: a,
|
|
2367
|
+
transport: a,
|
|
2368
|
+
httpAgent: a,
|
|
2369
|
+
httpsAgent: a,
|
|
2370
|
+
cancelToken: a,
|
|
2371
|
+
socketPath: a,
|
|
2372
|
+
responseEncoding: a,
|
|
2373
|
+
validateStatus: l,
|
|
2374
|
+
headers: (p, m, c) => o(Kt(p), Kt(m), c, !0)
|
|
2375
|
+
};
|
|
2376
|
+
return f.forEach(Object.keys(Object.assign({}, e, t)), function(m) {
|
|
2377
|
+
const c = d[m] || o, R = c(e[m], t[m], m);
|
|
2378
|
+
f.isUndefined(R) && c !== l || (n[m] = R);
|
|
2379
|
+
}), n;
|
|
2380
|
+
}
|
|
2381
|
+
const An = (e) => {
|
|
2382
|
+
const t = we({}, e);
|
|
2383
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: l } = t;
|
|
2384
|
+
t.headers = a = oe.from(a), t.url = wn(_n(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), l && a.set(
|
|
2385
|
+
"Authorization",
|
|
2386
|
+
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
2387
|
+
);
|
|
2388
|
+
let d;
|
|
2389
|
+
if (f.isFormData(n)) {
|
|
2390
|
+
if (Y.hasStandardBrowserEnv || Y.hasStandardBrowserWebWorkerEnv)
|
|
2391
|
+
a.setContentType(void 0);
|
|
2392
|
+
else if ((d = a.getContentType()) !== !1) {
|
|
2393
|
+
const [p, ...m] = d ? d.split(";").map((c) => c.trim()).filter(Boolean) : [];
|
|
2394
|
+
a.setContentType([p || "multipart/form-data", ...m].join("; "));
|
|
2395
|
+
}
|
|
2396
|
+
}
|
|
2397
|
+
if (Y.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && ts(t.url))) {
|
|
2398
|
+
const p = o && s && ns.read(s);
|
|
2399
|
+
p && a.set(o, p);
|
|
2400
|
+
}
|
|
2401
|
+
return t;
|
|
2402
|
+
}, ss = typeof XMLHttpRequest < "u", as = ss && function(e) {
|
|
2403
|
+
return new Promise(function(n, r) {
|
|
2404
|
+
const o = An(e);
|
|
2405
|
+
let s = o.data;
|
|
2406
|
+
const a = oe.from(o.headers).normalize();
|
|
2407
|
+
let { responseType: l, onUploadProgress: d, onDownloadProgress: p } = o, m, c, R, T, g;
|
|
2408
|
+
function _() {
|
|
2409
|
+
T && T(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(m), o.signal && o.signal.removeEventListener("abort", m);
|
|
2410
|
+
}
|
|
2411
|
+
let u = new XMLHttpRequest();
|
|
2412
|
+
u.open(o.method.toUpperCase(), o.url, !0), u.timeout = o.timeout;
|
|
2413
|
+
function h() {
|
|
2414
|
+
if (!u)
|
|
2415
|
+
return;
|
|
2416
|
+
const S = oe.from(
|
|
2417
|
+
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
2418
|
+
), b = {
|
|
2419
|
+
data: !l || l === "text" || l === "json" ? u.responseText : u.response,
|
|
2420
|
+
status: u.status,
|
|
2421
|
+
statusText: u.statusText,
|
|
2422
|
+
headers: S,
|
|
2423
|
+
config: e,
|
|
2424
|
+
request: u
|
|
2425
|
+
};
|
|
2426
|
+
On(function(w) {
|
|
2427
|
+
n(w), _();
|
|
2428
|
+
}, function(w) {
|
|
2429
|
+
r(w), _();
|
|
2430
|
+
}, b), u = null;
|
|
2431
|
+
}
|
|
2432
|
+
"onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
|
|
2433
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(h);
|
|
2434
|
+
}, u.onabort = function() {
|
|
2435
|
+
u && (r(new B("Request aborted", B.ECONNABORTED, e, u)), u = null);
|
|
2436
|
+
}, u.onerror = function() {
|
|
2437
|
+
r(new B("Network Error", B.ERR_NETWORK, e, u)), u = null;
|
|
2438
|
+
}, u.ontimeout = function() {
|
|
2439
|
+
let v = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
2440
|
+
const b = o.transitional || Sn;
|
|
2441
|
+
o.timeoutErrorMessage && (v = o.timeoutErrorMessage), r(new B(
|
|
2442
|
+
v,
|
|
2443
|
+
b.clarifyTimeoutError ? B.ETIMEDOUT : B.ECONNABORTED,
|
|
2444
|
+
e,
|
|
2445
|
+
u
|
|
2446
|
+
)), u = null;
|
|
2447
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in u && f.forEach(a.toJSON(), function(v, b) {
|
|
2448
|
+
u.setRequestHeader(b, v);
|
|
2449
|
+
}), f.isUndefined(o.withCredentials) || (u.withCredentials = !!o.withCredentials), l && l !== "json" && (u.responseType = o.responseType), p && ([R, g] = We(p, !0), u.addEventListener("progress", R)), d && u.upload && ([c, T] = We(d), u.upload.addEventListener("progress", c), u.upload.addEventListener("loadend", T)), (o.cancelToken || o.signal) && (m = (S) => {
|
|
2450
|
+
u && (r(!S || S.type ? new Ce(null, e, u) : S), u.abort(), u = null);
|
|
2451
|
+
}, o.cancelToken && o.cancelToken.subscribe(m), o.signal && (o.signal.aborted ? m() : o.signal.addEventListener("abort", m)));
|
|
2452
|
+
const y = Qo(o.url);
|
|
2453
|
+
if (y && Y.protocols.indexOf(y) === -1) {
|
|
2454
|
+
r(new B("Unsupported protocol " + y + ":", B.ERR_BAD_REQUEST, e));
|
|
2455
|
+
return;
|
|
2456
|
+
}
|
|
2457
|
+
u.send(s || null);
|
|
2458
|
+
});
|
|
2459
|
+
}, ls = (e, t) => {
|
|
2460
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
2461
|
+
if (t || n) {
|
|
2462
|
+
let r = new AbortController(), o;
|
|
2463
|
+
const s = function(p) {
|
|
2464
|
+
if (!o) {
|
|
2465
|
+
o = !0, l();
|
|
2466
|
+
const m = p instanceof Error ? p : this.reason;
|
|
2467
|
+
r.abort(m instanceof B ? m : new Ce(m instanceof Error ? m.message : m));
|
|
2468
|
+
}
|
|
2469
|
+
};
|
|
2470
|
+
let a = t && setTimeout(() => {
|
|
2471
|
+
a = null, s(new B(`timeout ${t} of ms exceeded`, B.ETIMEDOUT));
|
|
2472
|
+
}, t);
|
|
2473
|
+
const l = () => {
|
|
2474
|
+
e && (a && clearTimeout(a), a = null, e.forEach((p) => {
|
|
2475
|
+
p.unsubscribe ? p.unsubscribe(s) : p.removeEventListener("abort", s);
|
|
2476
|
+
}), e = null);
|
|
2477
|
+
};
|
|
2478
|
+
e.forEach((p) => p.addEventListener("abort", s));
|
|
2479
|
+
const { signal: d } = r;
|
|
2480
|
+
return d.unsubscribe = () => f.asap(l), d;
|
|
2481
|
+
}
|
|
2482
|
+
}, is = function* (e, t) {
|
|
2483
|
+
let n = e.byteLength;
|
|
2484
|
+
if (n < t) {
|
|
2485
|
+
yield e;
|
|
2486
|
+
return;
|
|
2487
|
+
}
|
|
2488
|
+
let r = 0, o;
|
|
2489
|
+
for (; r < n; )
|
|
2490
|
+
o = r + t, yield e.slice(r, o), r = o;
|
|
2491
|
+
}, cs = async function* (e, t) {
|
|
2492
|
+
for await (const n of us(e))
|
|
2493
|
+
yield* is(n, t);
|
|
2494
|
+
}, us = async function* (e) {
|
|
2495
|
+
if (e[Symbol.asyncIterator]) {
|
|
2496
|
+
yield* e;
|
|
2497
|
+
return;
|
|
2498
|
+
}
|
|
2499
|
+
const t = e.getReader();
|
|
2500
|
+
try {
|
|
2501
|
+
for (; ; ) {
|
|
2502
|
+
const { done: n, value: r } = await t.read();
|
|
2503
|
+
if (n)
|
|
2504
|
+
break;
|
|
2505
|
+
yield r;
|
|
2506
|
+
}
|
|
2507
|
+
} finally {
|
|
2508
|
+
await t.cancel();
|
|
2509
|
+
}
|
|
2510
|
+
}, Wt = (e, t, n, r) => {
|
|
2511
|
+
const o = cs(e, t);
|
|
2512
|
+
let s = 0, a, l = (d) => {
|
|
2513
|
+
a || (a = !0, r && r(d));
|
|
2514
|
+
};
|
|
2515
|
+
return new ReadableStream({
|
|
2516
|
+
async pull(d) {
|
|
2517
|
+
try {
|
|
2518
|
+
const { done: p, value: m } = await o.next();
|
|
2519
|
+
if (p) {
|
|
2520
|
+
l(), d.close();
|
|
2521
|
+
return;
|
|
2522
|
+
}
|
|
2523
|
+
let c = m.byteLength;
|
|
2524
|
+
if (n) {
|
|
2525
|
+
let R = s += c;
|
|
2526
|
+
n(R);
|
|
2527
|
+
}
|
|
2528
|
+
d.enqueue(new Uint8Array(m));
|
|
2529
|
+
} catch (p) {
|
|
2530
|
+
throw l(p), p;
|
|
2531
|
+
}
|
|
2532
|
+
},
|
|
2533
|
+
cancel(d) {
|
|
2534
|
+
return l(d), o.return();
|
|
2535
|
+
}
|
|
2536
|
+
}, {
|
|
2537
|
+
highWaterMark: 2
|
|
2538
|
+
});
|
|
2539
|
+
}, ot = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Cn = ot && typeof ReadableStream == "function", fs = ot && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), xn = (e, ...t) => {
|
|
2540
|
+
try {
|
|
2541
|
+
return !!e(...t);
|
|
2542
|
+
} catch {
|
|
2543
|
+
return !1;
|
|
2544
|
+
}
|
|
2545
|
+
}, ps = Cn && xn(() => {
|
|
2546
|
+
let e = !1;
|
|
2547
|
+
const t = new Request(Y.origin, {
|
|
2548
|
+
body: new ReadableStream(),
|
|
2549
|
+
method: "POST",
|
|
2550
|
+
get duplex() {
|
|
2551
|
+
return e = !0, "half";
|
|
2552
|
+
}
|
|
2553
|
+
}).headers.has("Content-Type");
|
|
2554
|
+
return e && !t;
|
|
2555
|
+
}), Gt = 64 * 1024, ht = Cn && xn(() => f.isReadableStream(new Response("").body)), Ge = {
|
|
2556
|
+
stream: ht && ((e) => e.body)
|
|
2557
|
+
};
|
|
2558
|
+
ot && ((e) => {
|
|
2559
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
2560
|
+
!Ge[t] && (Ge[t] = f.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
2561
|
+
throw new B(`Response type '${t}' is not supported`, B.ERR_NOT_SUPPORT, r);
|
|
2562
|
+
});
|
|
2563
|
+
});
|
|
2564
|
+
})(new Response());
|
|
2565
|
+
const ds = async (e) => {
|
|
2566
|
+
if (e == null)
|
|
2567
|
+
return 0;
|
|
2568
|
+
if (f.isBlob(e))
|
|
2569
|
+
return e.size;
|
|
2570
|
+
if (f.isSpecCompliantForm(e))
|
|
2571
|
+
return (await new Request(Y.origin, {
|
|
2572
|
+
method: "POST",
|
|
2573
|
+
body: e
|
|
2574
|
+
}).arrayBuffer()).byteLength;
|
|
2575
|
+
if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
|
|
2576
|
+
return e.byteLength;
|
|
2577
|
+
if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
|
|
2578
|
+
return (await fs(e)).byteLength;
|
|
2579
|
+
}, hs = async (e, t) => {
|
|
2580
|
+
const n = f.toFiniteNumber(e.getContentLength());
|
|
2581
|
+
return n ?? ds(t);
|
|
2582
|
+
}, ms = ot && (async (e) => {
|
|
2583
|
+
let {
|
|
2584
|
+
url: t,
|
|
2585
|
+
method: n,
|
|
2586
|
+
data: r,
|
|
2587
|
+
signal: o,
|
|
2588
|
+
cancelToken: s,
|
|
2589
|
+
timeout: a,
|
|
2590
|
+
onDownloadProgress: l,
|
|
2591
|
+
onUploadProgress: d,
|
|
2592
|
+
responseType: p,
|
|
2593
|
+
headers: m,
|
|
2594
|
+
withCredentials: c = "same-origin",
|
|
2595
|
+
fetchOptions: R
|
|
2596
|
+
} = An(e);
|
|
2597
|
+
p = p ? (p + "").toLowerCase() : "text";
|
|
2598
|
+
let T = ls([o, s && s.toAbortSignal()], a), g;
|
|
2599
|
+
const _ = T && T.unsubscribe && (() => {
|
|
2600
|
+
T.unsubscribe();
|
|
2601
|
+
});
|
|
2602
|
+
let u;
|
|
2603
|
+
try {
|
|
2604
|
+
if (d && ps && n !== "get" && n !== "head" && (u = await hs(m, r)) !== 0) {
|
|
2605
|
+
let b = new Request(t, {
|
|
2606
|
+
method: "POST",
|
|
2607
|
+
body: r,
|
|
2608
|
+
duplex: "half"
|
|
2609
|
+
}), E;
|
|
2610
|
+
if (f.isFormData(r) && (E = b.headers.get("content-type")) && m.setContentType(E), b.body) {
|
|
2611
|
+
const [w, C] = Mt(
|
|
2612
|
+
u,
|
|
2613
|
+
We(Vt(d))
|
|
2614
|
+
);
|
|
2615
|
+
r = Wt(b.body, Gt, w, C);
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
f.isString(c) || (c = c ? "include" : "omit");
|
|
2619
|
+
const h = "credentials" in Request.prototype;
|
|
2620
|
+
g = new Request(t, {
|
|
2621
|
+
...R,
|
|
2622
|
+
signal: T,
|
|
2623
|
+
method: n.toUpperCase(),
|
|
2624
|
+
headers: m.normalize().toJSON(),
|
|
2625
|
+
body: r,
|
|
2626
|
+
duplex: "half",
|
|
2627
|
+
credentials: h ? c : void 0
|
|
2628
|
+
});
|
|
2629
|
+
let y = await fetch(g);
|
|
2630
|
+
const S = ht && (p === "stream" || p === "response");
|
|
2631
|
+
if (ht && (l || S && _)) {
|
|
2632
|
+
const b = {};
|
|
2633
|
+
["status", "statusText", "headers"].forEach((P) => {
|
|
2634
|
+
b[P] = y[P];
|
|
2635
|
+
});
|
|
2636
|
+
const E = f.toFiniteNumber(y.headers.get("content-length")), [w, C] = l && Mt(
|
|
2637
|
+
E,
|
|
2638
|
+
We(Vt(l), !0)
|
|
2639
|
+
) || [];
|
|
2640
|
+
y = new Response(
|
|
2641
|
+
Wt(y.body, Gt, w, () => {
|
|
2642
|
+
C && C(), _ && _();
|
|
2643
|
+
}),
|
|
2644
|
+
b
|
|
2645
|
+
);
|
|
2646
|
+
}
|
|
2647
|
+
p = p || "text";
|
|
2648
|
+
let v = await Ge[f.findKey(Ge, p) || "text"](y, e);
|
|
2649
|
+
return !S && _ && _(), await new Promise((b, E) => {
|
|
2650
|
+
On(b, E, {
|
|
2651
|
+
data: v,
|
|
2652
|
+
headers: oe.from(y.headers),
|
|
2653
|
+
status: y.status,
|
|
2654
|
+
statusText: y.statusText,
|
|
2655
|
+
config: e,
|
|
2656
|
+
request: g
|
|
2657
|
+
});
|
|
2658
|
+
});
|
|
2659
|
+
} catch (h) {
|
|
2660
|
+
throw _ && _(), h && h.name === "TypeError" && /Load failed|fetch/i.test(h.message) ? Object.assign(
|
|
2661
|
+
new B("Network Error", B.ERR_NETWORK, e, g),
|
|
2662
|
+
{
|
|
2663
|
+
cause: h.cause || h
|
|
2664
|
+
}
|
|
2665
|
+
) : B.from(h, h && h.code, e, g);
|
|
2666
|
+
}
|
|
2667
|
+
}), mt = {
|
|
2668
|
+
http: xo,
|
|
2669
|
+
xhr: as,
|
|
2670
|
+
fetch: ms
|
|
2671
|
+
};
|
|
2672
|
+
f.forEach(mt, (e, t) => {
|
|
2673
|
+
if (e) {
|
|
2674
|
+
try {
|
|
2675
|
+
Object.defineProperty(e, "name", { value: t });
|
|
2676
|
+
} catch {
|
|
2677
|
+
}
|
|
2678
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
2679
|
+
}
|
|
2680
|
+
});
|
|
2681
|
+
const Xt = (e) => `- ${e}`, ys = (e) => f.isFunction(e) || e === null || e === !1, Dn = {
|
|
2682
|
+
getAdapter: (e) => {
|
|
2683
|
+
e = f.isArray(e) ? e : [e];
|
|
2684
|
+
const { length: t } = e;
|
|
2685
|
+
let n, r;
|
|
2686
|
+
const o = {};
|
|
2687
|
+
for (let s = 0; s < t; s++) {
|
|
2688
|
+
n = e[s];
|
|
2689
|
+
let a;
|
|
2690
|
+
if (r = n, !ys(n) && (r = mt[(a = String(n)).toLowerCase()], r === void 0))
|
|
2691
|
+
throw new B(`Unknown adapter '${a}'`);
|
|
2692
|
+
if (r)
|
|
2693
|
+
break;
|
|
2694
|
+
o[a || "#" + s] = r;
|
|
2695
|
+
}
|
|
2696
|
+
if (!r) {
|
|
2697
|
+
const s = Object.entries(o).map(
|
|
2698
|
+
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2699
|
+
);
|
|
2700
|
+
let a = t ? s.length > 1 ? `since :
|
|
2701
|
+
` + s.map(Xt).join(`
|
|
2702
|
+
`) : " " + Xt(s[0]) : "as no adapter specified";
|
|
2703
|
+
throw new B(
|
|
2704
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
2705
|
+
"ERR_NOT_SUPPORT"
|
|
2706
|
+
);
|
|
2707
|
+
}
|
|
2708
|
+
return r;
|
|
2709
|
+
},
|
|
2710
|
+
adapters: mt
|
|
2711
|
+
};
|
|
2712
|
+
function ut(e) {
|
|
2713
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
2714
|
+
throw new Ce(null, e);
|
|
2715
|
+
}
|
|
2716
|
+
function Zt(e) {
|
|
2717
|
+
return ut(e), e.headers = oe.from(e.headers), e.data = ct.call(
|
|
2718
|
+
e,
|
|
2719
|
+
e.transformRequest
|
|
2720
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Dn.getAdapter(e.adapter || Le.adapter)(e).then(function(r) {
|
|
2721
|
+
return ut(e), r.data = ct.call(
|
|
2722
|
+
e,
|
|
2723
|
+
e.transformResponse,
|
|
2724
|
+
r
|
|
2725
|
+
), r.headers = oe.from(r.headers), r;
|
|
2726
|
+
}, function(r) {
|
|
2727
|
+
return Tn(r) || (ut(e), r && r.response && (r.response.data = ct.call(
|
|
2728
|
+
e,
|
|
2729
|
+
e.transformResponse,
|
|
2730
|
+
r.response
|
|
2731
|
+
), r.response.headers = oe.from(r.response.headers))), Promise.reject(r);
|
|
2732
|
+
});
|
|
2733
|
+
}
|
|
2734
|
+
const Nn = "1.9.0", st = {};
|
|
2735
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
2736
|
+
st[e] = function(r) {
|
|
2737
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
2738
|
+
};
|
|
2739
|
+
});
|
|
2740
|
+
const Qt = {};
|
|
2741
|
+
st.transitional = function(t, n, r) {
|
|
2742
|
+
function o(s, a) {
|
|
2743
|
+
return "[Axios v" + Nn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
2744
|
+
}
|
|
2745
|
+
return (s, a, l) => {
|
|
2746
|
+
if (t === !1)
|
|
2747
|
+
throw new B(
|
|
2748
|
+
o(a, " has been removed" + (n ? " in " + n : "")),
|
|
2749
|
+
B.ERR_DEPRECATED
|
|
2750
|
+
);
|
|
2751
|
+
return n && !Qt[a] && (Qt[a] = !0, console.warn(
|
|
2752
|
+
o(
|
|
2753
|
+
a,
|
|
2754
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2755
|
+
)
|
|
2756
|
+
)), t ? t(s, a, l) : !0;
|
|
2757
|
+
};
|
|
2758
|
+
};
|
|
2759
|
+
st.spelling = function(t) {
|
|
2760
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
2761
|
+
};
|
|
2762
|
+
function bs(e, t, n) {
|
|
2763
|
+
if (typeof e != "object")
|
|
2764
|
+
throw new B("options must be an object", B.ERR_BAD_OPTION_VALUE);
|
|
2765
|
+
const r = Object.keys(e);
|
|
2766
|
+
let o = r.length;
|
|
2767
|
+
for (; o-- > 0; ) {
|
|
2768
|
+
const s = r[o], a = t[s];
|
|
2769
|
+
if (a) {
|
|
2770
|
+
const l = e[s], d = l === void 0 || a(l, s, e);
|
|
2771
|
+
if (d !== !0)
|
|
2772
|
+
throw new B("option " + s + " must be " + d, B.ERR_BAD_OPTION_VALUE);
|
|
2773
|
+
continue;
|
|
2774
|
+
}
|
|
2775
|
+
if (n !== !0)
|
|
2776
|
+
throw new B("Unknown option " + s, B.ERR_BAD_OPTION);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
const Ve = {
|
|
2780
|
+
assertOptions: bs,
|
|
2781
|
+
validators: st
|
|
2782
|
+
}, fe = Ve.validators;
|
|
2783
|
+
let ve = class {
|
|
2784
|
+
constructor(t) {
|
|
2785
|
+
this.defaults = t || {}, this.interceptors = {
|
|
2786
|
+
request: new zt(),
|
|
2787
|
+
response: new zt()
|
|
2788
|
+
};
|
|
2789
|
+
}
|
|
2790
|
+
/**
|
|
2791
|
+
* Dispatch a request
|
|
2792
|
+
*
|
|
2793
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
2794
|
+
* @param {?Object} config
|
|
2795
|
+
*
|
|
2796
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
2797
|
+
*/
|
|
2798
|
+
async request(t, n) {
|
|
2799
|
+
try {
|
|
2800
|
+
return await this._request(t, n);
|
|
2801
|
+
} catch (r) {
|
|
2802
|
+
if (r instanceof Error) {
|
|
2803
|
+
let o = {};
|
|
2804
|
+
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
2805
|
+
const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
2806
|
+
try {
|
|
2807
|
+
r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
2808
|
+
` + s) : r.stack = s;
|
|
2809
|
+
} catch {
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
throw r;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
_request(t, n) {
|
|
2816
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = we(this.defaults, n);
|
|
2817
|
+
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
2818
|
+
r !== void 0 && Ve.assertOptions(r, {
|
|
2819
|
+
silentJSONParsing: fe.transitional(fe.boolean),
|
|
2820
|
+
forcedJSONParsing: fe.transitional(fe.boolean),
|
|
2821
|
+
clarifyTimeoutError: fe.transitional(fe.boolean)
|
|
2822
|
+
}, !1), o != null && (f.isFunction(o) ? n.paramsSerializer = {
|
|
2823
|
+
serialize: o
|
|
2824
|
+
} : Ve.assertOptions(o, {
|
|
2825
|
+
encode: fe.function,
|
|
2826
|
+
serialize: fe.function
|
|
2827
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ve.assertOptions(n, {
|
|
2828
|
+
baseUrl: fe.spelling("baseURL"),
|
|
2829
|
+
withXsrfToken: fe.spelling("withXSRFToken")
|
|
2830
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
2831
|
+
let a = s && f.merge(
|
|
2832
|
+
s.common,
|
|
2833
|
+
s[n.method]
|
|
2834
|
+
);
|
|
2835
|
+
s && f.forEach(
|
|
2836
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
2837
|
+
(g) => {
|
|
2838
|
+
delete s[g];
|
|
2839
|
+
}
|
|
2840
|
+
), n.headers = oe.concat(a, s);
|
|
2841
|
+
const l = [];
|
|
2842
|
+
let d = !0;
|
|
2843
|
+
this.interceptors.request.forEach(function(_) {
|
|
2844
|
+
typeof _.runWhen == "function" && _.runWhen(n) === !1 || (d = d && _.synchronous, l.unshift(_.fulfilled, _.rejected));
|
|
2845
|
+
});
|
|
2846
|
+
const p = [];
|
|
2847
|
+
this.interceptors.response.forEach(function(_) {
|
|
2848
|
+
p.push(_.fulfilled, _.rejected);
|
|
2849
|
+
});
|
|
2850
|
+
let m, c = 0, R;
|
|
2851
|
+
if (!d) {
|
|
2852
|
+
const g = [Zt.bind(this), void 0];
|
|
2853
|
+
for (g.unshift.apply(g, l), g.push.apply(g, p), R = g.length, m = Promise.resolve(n); c < R; )
|
|
2854
|
+
m = m.then(g[c++], g[c++]);
|
|
2855
|
+
return m;
|
|
2856
|
+
}
|
|
2857
|
+
R = l.length;
|
|
2858
|
+
let T = n;
|
|
2859
|
+
for (c = 0; c < R; ) {
|
|
2860
|
+
const g = l[c++], _ = l[c++];
|
|
2861
|
+
try {
|
|
2862
|
+
T = g(T);
|
|
2863
|
+
} catch (u) {
|
|
2864
|
+
_.call(this, u);
|
|
2865
|
+
break;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
try {
|
|
2869
|
+
m = Zt.call(this, T);
|
|
2870
|
+
} catch (g) {
|
|
2871
|
+
return Promise.reject(g);
|
|
2872
|
+
}
|
|
2873
|
+
for (c = 0, R = p.length; c < R; )
|
|
2874
|
+
m = m.then(p[c++], p[c++]);
|
|
2875
|
+
return m;
|
|
2876
|
+
}
|
|
2877
|
+
getUri(t) {
|
|
2878
|
+
t = we(this.defaults, t);
|
|
2879
|
+
const n = _n(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
2880
|
+
return wn(n, t.params, t.paramsSerializer);
|
|
2881
|
+
}
|
|
2882
|
+
};
|
|
2883
|
+
f.forEach(["delete", "get", "head", "options"], function(t) {
|
|
2884
|
+
ve.prototype[t] = function(n, r) {
|
|
2885
|
+
return this.request(we(r || {}, {
|
|
2886
|
+
method: t,
|
|
2887
|
+
url: n,
|
|
2888
|
+
data: (r || {}).data
|
|
2889
|
+
}));
|
|
2890
|
+
};
|
|
2891
|
+
});
|
|
2892
|
+
f.forEach(["post", "put", "patch"], function(t) {
|
|
2893
|
+
function n(r) {
|
|
2894
|
+
return function(s, a, l) {
|
|
2895
|
+
return this.request(we(l || {}, {
|
|
2896
|
+
method: t,
|
|
2897
|
+
headers: r ? {
|
|
2898
|
+
"Content-Type": "multipart/form-data"
|
|
2899
|
+
} : {},
|
|
2900
|
+
url: s,
|
|
2901
|
+
data: a
|
|
2902
|
+
}));
|
|
2903
|
+
};
|
|
2904
|
+
}
|
|
2905
|
+
ve.prototype[t] = n(), ve.prototype[t + "Form"] = n(!0);
|
|
2906
|
+
});
|
|
2907
|
+
let gs = class Fn {
|
|
2908
|
+
constructor(t) {
|
|
2909
|
+
if (typeof t != "function")
|
|
2910
|
+
throw new TypeError("executor must be a function.");
|
|
2911
|
+
let n;
|
|
2912
|
+
this.promise = new Promise(function(s) {
|
|
2913
|
+
n = s;
|
|
2914
|
+
});
|
|
2915
|
+
const r = this;
|
|
2916
|
+
this.promise.then((o) => {
|
|
2917
|
+
if (!r._listeners) return;
|
|
2918
|
+
let s = r._listeners.length;
|
|
2919
|
+
for (; s-- > 0; )
|
|
2920
|
+
r._listeners[s](o);
|
|
2921
|
+
r._listeners = null;
|
|
2922
|
+
}), this.promise.then = (o) => {
|
|
2923
|
+
let s;
|
|
2924
|
+
const a = new Promise((l) => {
|
|
2925
|
+
r.subscribe(l), s = l;
|
|
2926
|
+
}).then(o);
|
|
2927
|
+
return a.cancel = function() {
|
|
2928
|
+
r.unsubscribe(s);
|
|
2929
|
+
}, a;
|
|
2930
|
+
}, t(function(s, a, l) {
|
|
2931
|
+
r.reason || (r.reason = new Ce(s, a, l), n(r.reason));
|
|
2932
|
+
});
|
|
2933
|
+
}
|
|
2934
|
+
/**
|
|
2935
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2936
|
+
*/
|
|
2937
|
+
throwIfRequested() {
|
|
2938
|
+
if (this.reason)
|
|
2939
|
+
throw this.reason;
|
|
2940
|
+
}
|
|
2941
|
+
/**
|
|
2942
|
+
* Subscribe to the cancel signal
|
|
2943
|
+
*/
|
|
2944
|
+
subscribe(t) {
|
|
2945
|
+
if (this.reason) {
|
|
2946
|
+
t(this.reason);
|
|
2947
|
+
return;
|
|
2948
|
+
}
|
|
2949
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2950
|
+
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Unsubscribe from the cancel signal
|
|
2953
|
+
*/
|
|
2954
|
+
unsubscribe(t) {
|
|
2955
|
+
if (!this._listeners)
|
|
2956
|
+
return;
|
|
2957
|
+
const n = this._listeners.indexOf(t);
|
|
2958
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2959
|
+
}
|
|
2960
|
+
toAbortSignal() {
|
|
2961
|
+
const t = new AbortController(), n = (r) => {
|
|
2962
|
+
t.abort(r);
|
|
2963
|
+
};
|
|
2964
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2968
|
+
* cancels the `CancelToken`.
|
|
2969
|
+
*/
|
|
2970
|
+
static source() {
|
|
2971
|
+
let t;
|
|
2972
|
+
return {
|
|
2973
|
+
token: new Fn(function(o) {
|
|
2974
|
+
t = o;
|
|
2975
|
+
}),
|
|
2976
|
+
cancel: t
|
|
2977
|
+
};
|
|
2978
|
+
}
|
|
2979
|
+
};
|
|
2980
|
+
function vs(e) {
|
|
2981
|
+
return function(n) {
|
|
2982
|
+
return e.apply(null, n);
|
|
2983
|
+
};
|
|
2984
|
+
}
|
|
2985
|
+
function ks(e) {
|
|
2986
|
+
return f.isObject(e) && e.isAxiosError === !0;
|
|
2987
|
+
}
|
|
2988
|
+
const yt = {
|
|
2989
|
+
Continue: 100,
|
|
2990
|
+
SwitchingProtocols: 101,
|
|
2991
|
+
Processing: 102,
|
|
2992
|
+
EarlyHints: 103,
|
|
2993
|
+
Ok: 200,
|
|
2994
|
+
Created: 201,
|
|
2995
|
+
Accepted: 202,
|
|
2996
|
+
NonAuthoritativeInformation: 203,
|
|
2997
|
+
NoContent: 204,
|
|
2998
|
+
ResetContent: 205,
|
|
2999
|
+
PartialContent: 206,
|
|
3000
|
+
MultiStatus: 207,
|
|
3001
|
+
AlreadyReported: 208,
|
|
3002
|
+
ImUsed: 226,
|
|
3003
|
+
MultipleChoices: 300,
|
|
3004
|
+
MovedPermanently: 301,
|
|
3005
|
+
Found: 302,
|
|
3006
|
+
SeeOther: 303,
|
|
3007
|
+
NotModified: 304,
|
|
3008
|
+
UseProxy: 305,
|
|
3009
|
+
Unused: 306,
|
|
3010
|
+
TemporaryRedirect: 307,
|
|
3011
|
+
PermanentRedirect: 308,
|
|
3012
|
+
BadRequest: 400,
|
|
3013
|
+
Unauthorized: 401,
|
|
3014
|
+
PaymentRequired: 402,
|
|
3015
|
+
Forbidden: 403,
|
|
3016
|
+
NotFound: 404,
|
|
3017
|
+
MethodNotAllowed: 405,
|
|
3018
|
+
NotAcceptable: 406,
|
|
3019
|
+
ProxyAuthenticationRequired: 407,
|
|
3020
|
+
RequestTimeout: 408,
|
|
3021
|
+
Conflict: 409,
|
|
3022
|
+
Gone: 410,
|
|
3023
|
+
LengthRequired: 411,
|
|
3024
|
+
PreconditionFailed: 412,
|
|
3025
|
+
PayloadTooLarge: 413,
|
|
3026
|
+
UriTooLong: 414,
|
|
3027
|
+
UnsupportedMediaType: 415,
|
|
3028
|
+
RangeNotSatisfiable: 416,
|
|
3029
|
+
ExpectationFailed: 417,
|
|
3030
|
+
ImATeapot: 418,
|
|
3031
|
+
MisdirectedRequest: 421,
|
|
3032
|
+
UnprocessableEntity: 422,
|
|
3033
|
+
Locked: 423,
|
|
3034
|
+
FailedDependency: 424,
|
|
3035
|
+
TooEarly: 425,
|
|
3036
|
+
UpgradeRequired: 426,
|
|
3037
|
+
PreconditionRequired: 428,
|
|
3038
|
+
TooManyRequests: 429,
|
|
3039
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
3040
|
+
UnavailableForLegalReasons: 451,
|
|
3041
|
+
InternalServerError: 500,
|
|
3042
|
+
NotImplemented: 501,
|
|
3043
|
+
BadGateway: 502,
|
|
3044
|
+
ServiceUnavailable: 503,
|
|
3045
|
+
GatewayTimeout: 504,
|
|
3046
|
+
HttpVersionNotSupported: 505,
|
|
3047
|
+
VariantAlsoNegotiates: 506,
|
|
3048
|
+
InsufficientStorage: 507,
|
|
3049
|
+
LoopDetected: 508,
|
|
3050
|
+
NotExtended: 510,
|
|
3051
|
+
NetworkAuthenticationRequired: 511
|
|
3052
|
+
};
|
|
3053
|
+
Object.entries(yt).forEach(([e, t]) => {
|
|
3054
|
+
yt[t] = e;
|
|
3055
|
+
});
|
|
3056
|
+
function Pn(e) {
|
|
3057
|
+
const t = new ve(e), n = un(ve.prototype.request, t);
|
|
3058
|
+
return f.extend(n, ve.prototype, t, { allOwnKeys: !0 }), f.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
3059
|
+
return Pn(we(e, o));
|
|
3060
|
+
}, n;
|
|
3061
|
+
}
|
|
3062
|
+
const W = Pn(Le);
|
|
3063
|
+
W.Axios = ve;
|
|
3064
|
+
W.CanceledError = Ce;
|
|
3065
|
+
W.CancelToken = gs;
|
|
3066
|
+
W.isCancel = Tn;
|
|
3067
|
+
W.VERSION = Nn;
|
|
3068
|
+
W.toFormData = rt;
|
|
3069
|
+
W.AxiosError = B;
|
|
3070
|
+
W.Cancel = W.CanceledError;
|
|
3071
|
+
W.all = function(t) {
|
|
3072
|
+
return Promise.all(t);
|
|
3073
|
+
};
|
|
3074
|
+
W.spread = vs;
|
|
3075
|
+
W.isAxiosError = ks;
|
|
3076
|
+
W.mergeConfig = we;
|
|
3077
|
+
W.AxiosHeaders = oe;
|
|
3078
|
+
W.formToJSON = (e) => Rn(f.isHTMLForm(e) ? new FormData(e) : e);
|
|
3079
|
+
W.getAdapter = Dn.getAdapter;
|
|
3080
|
+
W.HttpStatusCode = yt;
|
|
3081
|
+
W.default = W;
|
|
3082
|
+
const {
|
|
3083
|
+
Axios: qs,
|
|
3084
|
+
AxiosError: Is,
|
|
3085
|
+
CanceledError: Js,
|
|
3086
|
+
isCancel: zs,
|
|
3087
|
+
CancelToken: Hs,
|
|
3088
|
+
VERSION: Ms,
|
|
3089
|
+
all: Vs,
|
|
3090
|
+
Cancel: Ks,
|
|
3091
|
+
isAxiosError: Ws,
|
|
3092
|
+
spread: Gs,
|
|
3093
|
+
toFormData: Xs,
|
|
3094
|
+
AxiosHeaders: Zs,
|
|
3095
|
+
HttpStatusCode: Qs,
|
|
3096
|
+
formToJSON: Ys,
|
|
3097
|
+
getAdapter: ea,
|
|
3098
|
+
mergeConfig: ta
|
|
3099
|
+
} = W;
|
|
3100
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
3101
|
+
function Je(e) {
|
|
3102
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3103
|
+
var n = arguments[t];
|
|
3104
|
+
for (var r in n)
|
|
3105
|
+
e[r] = n[r];
|
|
3106
|
+
}
|
|
3107
|
+
return e;
|
|
3108
|
+
}
|
|
3109
|
+
var Es = {
|
|
3110
|
+
read: function(e) {
|
|
3111
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
3112
|
+
},
|
|
3113
|
+
write: function(e) {
|
|
3114
|
+
return encodeURIComponent(e).replace(
|
|
3115
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
3116
|
+
decodeURIComponent
|
|
3117
|
+
);
|
|
3118
|
+
}
|
|
3119
|
+
};
|
|
3120
|
+
function bt(e, t) {
|
|
3121
|
+
function n(o, s, a) {
|
|
3122
|
+
if (!(typeof document > "u")) {
|
|
3123
|
+
a = Je({}, t, a), typeof a.expires == "number" && (a.expires = new Date(Date.now() + a.expires * 864e5)), a.expires && (a.expires = a.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
3124
|
+
var l = "";
|
|
3125
|
+
for (var d in a)
|
|
3126
|
+
a[d] && (l += "; " + d, a[d] !== !0 && (l += "=" + a[d].split(";")[0]));
|
|
3127
|
+
return document.cookie = o + "=" + e.write(s, o) + l;
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
function r(o) {
|
|
3131
|
+
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
3132
|
+
for (var s = document.cookie ? document.cookie.split("; ") : [], a = {}, l = 0; l < s.length; l++) {
|
|
3133
|
+
var d = s[l].split("="), p = d.slice(1).join("=");
|
|
3134
|
+
try {
|
|
3135
|
+
var m = decodeURIComponent(d[0]);
|
|
3136
|
+
if (a[m] = e.read(p, m), o === m)
|
|
3137
|
+
break;
|
|
3138
|
+
} catch {
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
return o ? a[o] : a;
|
|
3142
|
+
}
|
|
3143
|
+
}
|
|
3144
|
+
return Object.create(
|
|
3145
|
+
{
|
|
3146
|
+
set: n,
|
|
3147
|
+
get: r,
|
|
3148
|
+
remove: function(o, s) {
|
|
3149
|
+
n(
|
|
3150
|
+
o,
|
|
3151
|
+
"",
|
|
3152
|
+
Je({}, s, {
|
|
3153
|
+
expires: -1
|
|
3154
|
+
})
|
|
3155
|
+
);
|
|
3156
|
+
},
|
|
3157
|
+
withAttributes: function(o) {
|
|
3158
|
+
return bt(this.converter, Je({}, this.attributes, o));
|
|
3159
|
+
},
|
|
3160
|
+
withConverter: function(o) {
|
|
3161
|
+
return bt(Je({}, this.converter, o), this.attributes);
|
|
3162
|
+
}
|
|
3163
|
+
},
|
|
3164
|
+
{
|
|
3165
|
+
attributes: { value: Object.freeze(t) },
|
|
3166
|
+
converter: { value: Object.freeze(e) }
|
|
3167
|
+
}
|
|
3168
|
+
);
|
|
3169
|
+
}
|
|
3170
|
+
bt(Es, { path: "/" });
|
|
3171
|
+
const ke = {
|
|
3172
|
+
// 查看 v2.4.3版本更新日志
|
|
3173
|
+
setKey(e) {
|
|
3174
|
+
return `ss-component-new:${e}`;
|
|
3175
|
+
},
|
|
3176
|
+
// 设置永久缓存
|
|
3177
|
+
set(e, t) {
|
|
3178
|
+
window.localStorage.setItem(ke.setKey(e), JSON.stringify(t));
|
|
3179
|
+
},
|
|
3180
|
+
// 获取永久缓存
|
|
3181
|
+
get(e) {
|
|
3182
|
+
let t = window.localStorage.getItem(ke.setKey(e));
|
|
3183
|
+
return JSON.parse(t);
|
|
3184
|
+
},
|
|
3185
|
+
// 移除永久缓存
|
|
3186
|
+
remove(e) {
|
|
3187
|
+
window.localStorage.removeItem(ke.setKey(e));
|
|
3188
|
+
},
|
|
3189
|
+
// 移除全部永久缓存
|
|
3190
|
+
clear() {
|
|
3191
|
+
window.localStorage.clear();
|
|
3192
|
+
}
|
|
3193
|
+
}, Un = /* @__PURE__ */ new Map();
|
|
3194
|
+
console.log("import.meta.env.VITE_API_URL", "http://139.196.154.85:20013");
|
|
3195
|
+
const qe = W.create({
|
|
3196
|
+
baseURL: "http://139.196.154.85:20013",
|
|
3197
|
+
timeout: 5e4
|
|
3198
|
+
//headers: { 'Content-Type': 'application/json' }, 这个会导致生成代码的上传文件 file为空
|
|
3199
|
+
}), Xe = "access-token", gt = `x-${Xe}`;
|
|
3200
|
+
qe.interceptors.request.use(
|
|
3201
|
+
(e) => {
|
|
3202
|
+
var o;
|
|
3203
|
+
const t = new AbortController();
|
|
3204
|
+
e.signal = t.signal;
|
|
3205
|
+
const n = e.url || "";
|
|
3206
|
+
Un.set(n, t);
|
|
3207
|
+
const r = ke.get(Xe);
|
|
3208
|
+
if (r) {
|
|
3209
|
+
e.headers.Authorization = `Bearer ${r}`;
|
|
3210
|
+
const s = Ss(r), a = Rs(s.exp);
|
|
3211
|
+
if (/* @__PURE__ */ new Date() >= a) {
|
|
3212
|
+
const l = ke.get(gt);
|
|
3213
|
+
l && (e.headers["X-Authorization"] = `Bearer ${l}`);
|
|
3214
|
+
}
|
|
3215
|
+
if (((o = e.method) == null ? void 0 : o.toLowerCase()) === "get" && e.data) {
|
|
3216
|
+
let l = e.url + "?" + ws(e.data);
|
|
3217
|
+
l = l.slice(0, -1), e.data = {}, e.url = l;
|
|
3218
|
+
}
|
|
3219
|
+
}
|
|
3220
|
+
return e;
|
|
3221
|
+
},
|
|
3222
|
+
(e) => Promise.reject(e)
|
|
3223
|
+
);
|
|
3224
|
+
qe.interceptors.response.use(
|
|
3225
|
+
(e) => {
|
|
3226
|
+
const t = e.config.url || "";
|
|
3227
|
+
Un.delete(t);
|
|
3228
|
+
var n = e.status, r = e.data;
|
|
3229
|
+
if (n === 401)
|
|
3230
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3231
|
+
if (n >= 400)
|
|
3232
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3233
|
+
if (r && r.hasOwnProperty("errors") && r.errors)
|
|
3234
|
+
throw new Error(JSON.stringify(r.errors || "Request Error."));
|
|
3235
|
+
var o = e.headers[Xe], s = e.headers[gt];
|
|
3236
|
+
if (o === "invalid_token")
|
|
3237
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3238
|
+
if (s && o && (ke.set(Xe, o), ke.set(gt, s)), r.code === 401)
|
|
3239
|
+
throw new Error(e.statusText || "Request Error.");
|
|
3240
|
+
if (r.code === void 0)
|
|
3241
|
+
return Promise.resolve(e);
|
|
3242
|
+
if (r.code !== 200) {
|
|
3243
|
+
var a;
|
|
3244
|
+
throw r.message && typeof r.message == "object" ? a = JSON.stringify(r.message) : a = r.message, Oe({
|
|
3245
|
+
dangerouslyUseHTMLString: !0,
|
|
3246
|
+
message: a,
|
|
3247
|
+
type: "error"
|
|
3248
|
+
}), new Error(a);
|
|
3249
|
+
}
|
|
3250
|
+
return e;
|
|
3251
|
+
},
|
|
3252
|
+
(e) => {
|
|
3253
|
+
var t, n;
|
|
3254
|
+
if (e.response && e.response.status === 401)
|
|
3255
|
+
throw new Error(res.statusText || "Request Error.");
|
|
3256
|
+
return e.message.indexOf("timeout") != -1 ? Oe.error("网络超时") : e.message == "Network Error" ? Oe.error("网络连接错误") : (t = e.response) != null && t.data ? Oe.error((n = e.response) == null ? void 0 : n.statusText) : Oe.error("接口路径找不到"), Promise.reject(e);
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3259
|
+
function ws(e) {
|
|
3260
|
+
let t = "";
|
|
3261
|
+
for (const o of Object.keys(e)) {
|
|
3262
|
+
const s = e[o];
|
|
3263
|
+
var n = encodeURIComponent(o) + "=";
|
|
3264
|
+
if (s !== null && s !== "" && typeof s < "u")
|
|
3265
|
+
if (typeof s == "object") {
|
|
3266
|
+
for (const a of Object.keys(s))
|
|
3267
|
+
if (s[a] !== null && s[a] !== "" && typeof s[a] < "u") {
|
|
3268
|
+
let l = o + "[" + a + "]";
|
|
3269
|
+
var r = encodeURIComponent(l) + "=";
|
|
3270
|
+
t += r + encodeURIComponent(s[a]) + "&";
|
|
3271
|
+
}
|
|
3272
|
+
} else
|
|
3273
|
+
t += n + encodeURIComponent(s) + "&";
|
|
3274
|
+
}
|
|
3275
|
+
return t;
|
|
3276
|
+
}
|
|
3277
|
+
function Ss(e) {
|
|
3278
|
+
e = e.replace(/_/g, "/").replace(/-/g, "+");
|
|
3279
|
+
var t = decodeURIComponent(escape(window.atob(e.split(".")[1])));
|
|
3280
|
+
return JSON.parse(t);
|
|
3281
|
+
}
|
|
3282
|
+
function Rs(e) {
|
|
3283
|
+
return new Date(e * 1e3);
|
|
3284
|
+
}
|
|
3285
|
+
function Ts(e) {
|
|
3286
|
+
return qe({
|
|
3287
|
+
url: "/api/insofData/add",
|
|
3288
|
+
method: "post",
|
|
3289
|
+
data: e
|
|
3290
|
+
});
|
|
3291
|
+
}
|
|
3292
|
+
function Os(e) {
|
|
3293
|
+
return qe({
|
|
3294
|
+
url: "/api/insofData/get",
|
|
3295
|
+
method: "post",
|
|
3296
|
+
data: e
|
|
3297
|
+
});
|
|
3298
|
+
}
|
|
3299
|
+
function _s(e) {
|
|
3300
|
+
return qe({
|
|
3301
|
+
url: "/api/insofData/update",
|
|
3302
|
+
method: "post",
|
|
3303
|
+
data: e
|
|
3304
|
+
});
|
|
3305
|
+
}
|
|
3306
|
+
const Bn = Ze(de), { itemData: Yt } = Ee(Bn), As = zn(de), { systemKey: jn, activeMenuPath: vt } = Ee(As), Ne = U(0), na = (e) => e.reduce((n, r) => {
|
|
3307
|
+
var s, a;
|
|
3308
|
+
const o = Object.values(n);
|
|
3309
|
+
return (((s = Object.keys(n)) == null ? void 0 : s.length) === 0 || o[o.length - 1].length >= (r == null ? void 0 : r.width)) && (n[Ne.value] = [], Ne.value++), n[Ne.value - 1].push(r), ((a = Object.keys(n)) == null ? void 0 : a.length) === (r == null ? void 0 : r.width) && (n[Ne.value] = [], Ne.value++), n;
|
|
3310
|
+
}, {}), Cs = async () => {
|
|
3311
|
+
var r, o, s;
|
|
3312
|
+
const e = `${jn.value}/${vt.value}`;
|
|
3313
|
+
let t = !1;
|
|
3314
|
+
const n = await Os({
|
|
3315
|
+
key: {
|
|
3316
|
+
compKey: e
|
|
3317
|
+
}
|
|
3318
|
+
});
|
|
3319
|
+
return n.data.code === 200 && Array.isArray((r = n.data) == null ? void 0 : r.result) && (t = (s = (o = n.data) == null ? void 0 : o.result) == null ? void 0 : s.find((a) => {
|
|
3320
|
+
var l;
|
|
3321
|
+
return ((l = a.key) == null ? void 0 : l.compKey) === e;
|
|
3322
|
+
})), t;
|
|
3323
|
+
}, ra = (e, t, n) => {
|
|
3324
|
+
const r = `${jn.value}/${vt.value}`;
|
|
3325
|
+
Cs().then(async (o) => {
|
|
3326
|
+
var s, a;
|
|
3327
|
+
console.log("submitData", e, t, o);
|
|
3328
|
+
try {
|
|
3329
|
+
const l = o ? _s : Ts, d = {
|
|
3330
|
+
instanceId: 1,
|
|
3331
|
+
unitDefinitionId: 1,
|
|
3332
|
+
key: {
|
|
3333
|
+
compKey: r
|
|
3334
|
+
},
|
|
3335
|
+
value: {
|
|
3336
|
+
compData: e
|
|
3337
|
+
}
|
|
3338
|
+
}, p = await l(o ? {
|
|
3339
|
+
...d,
|
|
3340
|
+
id: o == null ? void 0 : o.id
|
|
3341
|
+
} : d);
|
|
3342
|
+
if (((s = p == null ? void 0 : p.data) == null ? void 0 : s.code) === 200) {
|
|
3343
|
+
let m = k(e);
|
|
3344
|
+
m = m == null ? void 0 : m.map((R) => {
|
|
3345
|
+
var T;
|
|
3346
|
+
return R.comp === "Table" ? {
|
|
3347
|
+
...R,
|
|
3348
|
+
compData: (T = R.compData) == null ? void 0 : T.map((g) => {
|
|
3349
|
+
var _;
|
|
3350
|
+
return {
|
|
3351
|
+
...g,
|
|
3352
|
+
contents: (_ = g.contents) == null ? void 0 : _.map((u) => {
|
|
3353
|
+
var h;
|
|
3354
|
+
return u.id === (t == null ? void 0 : t.id) ? {
|
|
3355
|
+
...u,
|
|
3356
|
+
id: (h = p == null ? void 0 : p.data) == null ? void 0 : h.result
|
|
3357
|
+
} : u;
|
|
3358
|
+
})
|
|
3359
|
+
};
|
|
3360
|
+
})
|
|
3361
|
+
} : R;
|
|
3362
|
+
});
|
|
3363
|
+
const c = (a = Yt.value) == null ? void 0 : a.map((R) => {
|
|
3364
|
+
var T;
|
|
3365
|
+
return R.name === vt.value ? {
|
|
3366
|
+
...R,
|
|
3367
|
+
compData: (T = R.compData) == null ? void 0 : T.map((g) => g.key === "groupContents" ? {
|
|
3368
|
+
...g,
|
|
3369
|
+
contents: m
|
|
3370
|
+
} : g)
|
|
3371
|
+
} : R;
|
|
3372
|
+
});
|
|
3373
|
+
console.log("submitData-tempItemData", Yt.value, c), Bn.setItemData(c), Oe({
|
|
3374
|
+
type: "success",
|
|
3375
|
+
message: `${n}成功`
|
|
3376
|
+
});
|
|
3377
|
+
}
|
|
3378
|
+
} catch (l) {
|
|
3379
|
+
throw new Error(`${l.message}`);
|
|
3380
|
+
}
|
|
3381
|
+
});
|
|
3382
|
+
};
|
|
3383
|
+
export {
|
|
3384
|
+
Bs as a,
|
|
3385
|
+
Us as b,
|
|
3386
|
+
na as c,
|
|
3387
|
+
Vn as d,
|
|
3388
|
+
js as e,
|
|
3389
|
+
an as g,
|
|
3390
|
+
Ps as m,
|
|
3391
|
+
de as p,
|
|
3392
|
+
ra as s,
|
|
3393
|
+
rn as u
|
|
3394
|
+
};
|