best-unit 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/best-unit.cjs +60 -0
- package/dist/best-unit.js +3988 -0
- package/dist/types/global.d.ts +64 -0
- package/dist/types/index.ts +17 -0
- package/dist/types/preact-custom-element.d.ts +1 -0
- package/index.html +2 -2
- package/package.json +14 -7
- package/src/api/axiosInstance.ts +94 -0
- package/src/api/index.ts +118 -15
- package/src/api/proxy.ts +11 -0
- package/src/components/business/recharge-sdk/components/Button.tsx +42 -0
- package/src/components/business/recharge-sdk/components/OfflineTransferForm.tsx +365 -0
- package/src/components/business/recharge-sdk/components/OnlineRechargeForm.tsx +389 -0
- package/src/components/business/recharge-sdk/components/Recharge.tsx +288 -0
- package/src/components/business/recharge-sdk/index.tsx +39 -0
- package/src/components/business/statistical-balance/index.tsx +206 -0
- package/src/components/common/HoverPopover.tsx +215 -0
- package/src/components/common/Message.tsx +324 -0
- package/src/components/common/Select.tsx +278 -0
- package/src/components/common/Upload.tsx +207 -0
- package/src/demo/App.tsx +429 -0
- package/src/demo/index.tsx +4 -0
- package/src/local/en.ts +61 -0
- package/src/local/index.ts +36 -0
- package/src/local/zh.ts +60 -0
- package/src/main.ts +10 -0
- package/src/types/global.d.ts +64 -0
- package/src/types/index.ts +17 -0
- package/src/types/preact-custom-element.d.ts +1 -0
- package/src/utils/business/index.ts +48 -0
- package/src/utils/common/index.ts +8 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.app.json +31 -0
- package/tsconfig.json +15 -0
- package/tsconfig.node.json +24 -0
- package/vite.config.ts +18 -0
- package/example/index.html +0 -24
- package/public/vite.svg +0 -1
- package/src/App.jsx +0 -6
- package/src/api/define-api.ts +0 -49
- package/src/javascript.svg +0 -1
- package/src/main.jsx +0 -4
- package/src/sdk/index.ts +0 -33
- package/src/style.css +0 -96
- package/src/views/AccountModal.jsx +0 -125
- package/src/views/Home.jsx +0 -53
- package/vite.config.js +0 -31
|
@@ -0,0 +1,3988 @@
|
|
|
1
|
+
function Do() {
|
|
2
|
+
console.log("npm package test!!!");
|
|
3
|
+
}
|
|
4
|
+
function Uo() {
|
|
5
|
+
console.log("Current time:", (/* @__PURE__ */ new Date()).toISOString());
|
|
6
|
+
}
|
|
7
|
+
function At(e, t) {
|
|
8
|
+
return function() {
|
|
9
|
+
return e.apply(t, arguments);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const { toString: yn } = Object.prototype, { getPrototypeOf: Ve } = Object, { iterator: we, toStringTag: Ot } = Symbol, xe = /* @__PURE__ */ ((e) => (t) => {
|
|
13
|
+
const n = yn.call(t);
|
|
14
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
+
})(/* @__PURE__ */ Object.create(null)), D = (e) => (e = e.toLowerCase(), (t) => xe(t) === e), Ee = (e) => (t) => typeof t === e, { isArray: X } = Array, re = Ee("undefined");
|
|
16
|
+
function wn(e) {
|
|
17
|
+
return e !== null && !re(e) && e.constructor !== null && !re(e.constructor) && B(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
|
+
}
|
|
19
|
+
const Ft = D("ArrayBuffer");
|
|
20
|
+
function xn(e) {
|
|
21
|
+
let t;
|
|
22
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ft(e.buffer), t;
|
|
23
|
+
}
|
|
24
|
+
const En = Ee("string"), B = Ee("function"), Pt = Ee("number"), Se = (e) => e !== null && typeof e == "object", Sn = (e) => e === !0 || e === !1, ue = (e) => {
|
|
25
|
+
if (xe(e) !== "object")
|
|
26
|
+
return !1;
|
|
27
|
+
const t = Ve(e);
|
|
28
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ot in e) && !(we in e);
|
|
29
|
+
}, vn = D("Date"), Tn = D("File"), Rn = D("Blob"), kn = D("FileList"), Cn = (e) => Se(e) && B(e.pipe), An = (e) => {
|
|
30
|
+
let t;
|
|
31
|
+
return e && (typeof FormData == "function" && e instanceof FormData || B(e.append) && ((t = xe(e)) === "formdata" || // detect form-data instance
|
|
32
|
+
t === "object" && B(e.toString) && e.toString() === "[object FormData]"));
|
|
33
|
+
}, On = D("URLSearchParams"), [Fn, Pn, Bn, Nn] = ["ReadableStream", "Request", "Response", "Headers"].map(D), In = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
34
|
+
function se(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
|
+
if (e === null || typeof e > "u")
|
|
36
|
+
return;
|
|
37
|
+
let r, o;
|
|
38
|
+
if (typeof e != "object" && (e = [e]), X(e))
|
|
39
|
+
for (r = 0, o = e.length; r < o; r++)
|
|
40
|
+
t.call(null, e[r], r, e);
|
|
41
|
+
else {
|
|
42
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = i.length;
|
|
43
|
+
let a;
|
|
44
|
+
for (r = 0; r < s; r++)
|
|
45
|
+
a = i[r], t.call(null, e[a], a, e);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function Bt(e, t) {
|
|
49
|
+
t = t.toLowerCase();
|
|
50
|
+
const n = Object.keys(e);
|
|
51
|
+
let r = n.length, o;
|
|
52
|
+
for (; r-- > 0; )
|
|
53
|
+
if (o = n[r], t === o.toLowerCase())
|
|
54
|
+
return o;
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const W = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Nt = (e) => !re(e) && e !== W;
|
|
58
|
+
function De() {
|
|
59
|
+
const { caseless: e } = Nt(this) && this || {}, t = {}, n = (r, o) => {
|
|
60
|
+
const i = e && Bt(t, o) || o;
|
|
61
|
+
ue(t[i]) && ue(r) ? t[i] = De(t[i], r) : ue(r) ? t[i] = De({}, r) : X(r) ? t[i] = r.slice() : t[i] = r;
|
|
62
|
+
};
|
|
63
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
64
|
+
arguments[r] && se(arguments[r], n);
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
const Dn = (e, t, n, { allOwnKeys: r } = {}) => (se(t, (o, i) => {
|
|
68
|
+
n && B(o) ? e[i] = At(o, n) : e[i] = o;
|
|
69
|
+
}, { allOwnKeys: r }), e), Un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ln = (e, t, n, r) => {
|
|
70
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
71
|
+
value: t.prototype
|
|
72
|
+
}), n && Object.assign(e.prototype, n);
|
|
73
|
+
}, zn = (e, t, n, r) => {
|
|
74
|
+
let o, i, s;
|
|
75
|
+
const a = {};
|
|
76
|
+
if (t = t || {}, e == null) return t;
|
|
77
|
+
do {
|
|
78
|
+
for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
|
|
79
|
+
s = o[i], (!r || r(s, e, t)) && !a[s] && (t[s] = e[s], a[s] = !0);
|
|
80
|
+
e = n !== !1 && Ve(e);
|
|
81
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
82
|
+
return t;
|
|
83
|
+
}, Hn = (e, t, n) => {
|
|
84
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
85
|
+
const r = e.indexOf(t, n);
|
|
86
|
+
return r !== -1 && r === n;
|
|
87
|
+
}, Mn = (e) => {
|
|
88
|
+
if (!e) return null;
|
|
89
|
+
if (X(e)) return e;
|
|
90
|
+
let t = e.length;
|
|
91
|
+
if (!Pt(t)) return null;
|
|
92
|
+
const n = new Array(t);
|
|
93
|
+
for (; t-- > 0; )
|
|
94
|
+
n[t] = e[t];
|
|
95
|
+
return n;
|
|
96
|
+
}, jn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ve(Uint8Array)), $n = (e, t) => {
|
|
97
|
+
const r = (e && e[we]).call(e);
|
|
98
|
+
let o;
|
|
99
|
+
for (; (o = r.next()) && !o.done; ) {
|
|
100
|
+
const i = o.value;
|
|
101
|
+
t.call(e, i[0], i[1]);
|
|
102
|
+
}
|
|
103
|
+
}, Wn = (e, t) => {
|
|
104
|
+
let n;
|
|
105
|
+
const r = [];
|
|
106
|
+
for (; (n = e.exec(t)) !== null; )
|
|
107
|
+
r.push(n);
|
|
108
|
+
return r;
|
|
109
|
+
}, qn = D("HTMLFormElement"), Jn = (e) => e.toLowerCase().replace(
|
|
110
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
111
|
+
function(n, r, o) {
|
|
112
|
+
return r.toUpperCase() + o;
|
|
113
|
+
}
|
|
114
|
+
), nt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Vn = D("RegExp"), It = (e, t) => {
|
|
115
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
116
|
+
se(n, (o, i) => {
|
|
117
|
+
let s;
|
|
118
|
+
(s = t(o, i, e)) !== !1 && (r[i] = s || o);
|
|
119
|
+
}), Object.defineProperties(e, r);
|
|
120
|
+
}, Gn = (e) => {
|
|
121
|
+
It(e, (t, n) => {
|
|
122
|
+
if (B(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
123
|
+
return !1;
|
|
124
|
+
const r = e[n];
|
|
125
|
+
if (B(r)) {
|
|
126
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
127
|
+
t.writable = !1;
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
t.set || (t.set = () => {
|
|
131
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}, Kn = (e, t) => {
|
|
136
|
+
const n = {}, r = (o) => {
|
|
137
|
+
o.forEach((i) => {
|
|
138
|
+
n[i] = !0;
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
return X(e) ? r(e) : r(String(e).split(t)), n;
|
|
142
|
+
}, Xn = () => {
|
|
143
|
+
}, Zn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
144
|
+
function Qn(e) {
|
|
145
|
+
return !!(e && B(e.append) && e[Ot] === "FormData" && e[we]);
|
|
146
|
+
}
|
|
147
|
+
const Yn = (e) => {
|
|
148
|
+
const t = new Array(10), n = (r, o) => {
|
|
149
|
+
if (Se(r)) {
|
|
150
|
+
if (t.indexOf(r) >= 0)
|
|
151
|
+
return;
|
|
152
|
+
if (!("toJSON" in r)) {
|
|
153
|
+
t[o] = r;
|
|
154
|
+
const i = X(r) ? [] : {};
|
|
155
|
+
return se(r, (s, a) => {
|
|
156
|
+
const l = n(s, o + 1);
|
|
157
|
+
!re(l) && (i[a] = l);
|
|
158
|
+
}), t[o] = void 0, i;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return r;
|
|
162
|
+
};
|
|
163
|
+
return n(e, 0);
|
|
164
|
+
}, er = D("AsyncFunction"), tr = (e) => e && (Se(e) || B(e)) && B(e.then) && B(e.catch), Dt = ((e, t) => e ? setImmediate : t ? ((n, r) => (W.addEventListener("message", ({ source: o, data: i }) => {
|
|
165
|
+
o === W && i === n && r.length && r.shift()();
|
|
166
|
+
}, !1), (o) => {
|
|
167
|
+
r.push(o), W.postMessage(n, "*");
|
|
168
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
169
|
+
typeof setImmediate == "function",
|
|
170
|
+
B(W.postMessage)
|
|
171
|
+
), nr = typeof queueMicrotask < "u" ? queueMicrotask.bind(W) : typeof process < "u" && process.nextTick || Dt, rr = (e) => e != null && B(e[we]), d = {
|
|
172
|
+
isArray: X,
|
|
173
|
+
isArrayBuffer: Ft,
|
|
174
|
+
isBuffer: wn,
|
|
175
|
+
isFormData: An,
|
|
176
|
+
isArrayBufferView: xn,
|
|
177
|
+
isString: En,
|
|
178
|
+
isNumber: Pt,
|
|
179
|
+
isBoolean: Sn,
|
|
180
|
+
isObject: Se,
|
|
181
|
+
isPlainObject: ue,
|
|
182
|
+
isReadableStream: Fn,
|
|
183
|
+
isRequest: Pn,
|
|
184
|
+
isResponse: Bn,
|
|
185
|
+
isHeaders: Nn,
|
|
186
|
+
isUndefined: re,
|
|
187
|
+
isDate: vn,
|
|
188
|
+
isFile: Tn,
|
|
189
|
+
isBlob: Rn,
|
|
190
|
+
isRegExp: Vn,
|
|
191
|
+
isFunction: B,
|
|
192
|
+
isStream: Cn,
|
|
193
|
+
isURLSearchParams: On,
|
|
194
|
+
isTypedArray: jn,
|
|
195
|
+
isFileList: kn,
|
|
196
|
+
forEach: se,
|
|
197
|
+
merge: De,
|
|
198
|
+
extend: Dn,
|
|
199
|
+
trim: In,
|
|
200
|
+
stripBOM: Un,
|
|
201
|
+
inherits: Ln,
|
|
202
|
+
toFlatObject: zn,
|
|
203
|
+
kindOf: xe,
|
|
204
|
+
kindOfTest: D,
|
|
205
|
+
endsWith: Hn,
|
|
206
|
+
toArray: Mn,
|
|
207
|
+
forEachEntry: $n,
|
|
208
|
+
matchAll: Wn,
|
|
209
|
+
isHTMLForm: qn,
|
|
210
|
+
hasOwnProperty: nt,
|
|
211
|
+
hasOwnProp: nt,
|
|
212
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
|
+
reduceDescriptors: It,
|
|
214
|
+
freezeMethods: Gn,
|
|
215
|
+
toObjectSet: Kn,
|
|
216
|
+
toCamelCase: Jn,
|
|
217
|
+
noop: Xn,
|
|
218
|
+
toFiniteNumber: Zn,
|
|
219
|
+
findKey: Bt,
|
|
220
|
+
global: W,
|
|
221
|
+
isContextDefined: Nt,
|
|
222
|
+
isSpecCompliantForm: Qn,
|
|
223
|
+
toJSONObject: Yn,
|
|
224
|
+
isAsyncFn: er,
|
|
225
|
+
isThenable: tr,
|
|
226
|
+
setImmediate: Dt,
|
|
227
|
+
asap: nr,
|
|
228
|
+
isIterable: rr
|
|
229
|
+
};
|
|
230
|
+
function v(e, t, n, r, o) {
|
|
231
|
+
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);
|
|
232
|
+
}
|
|
233
|
+
d.inherits(v, Error, {
|
|
234
|
+
toJSON: function() {
|
|
235
|
+
return {
|
|
236
|
+
// Standard
|
|
237
|
+
message: this.message,
|
|
238
|
+
name: this.name,
|
|
239
|
+
// Microsoft
|
|
240
|
+
description: this.description,
|
|
241
|
+
number: this.number,
|
|
242
|
+
// Mozilla
|
|
243
|
+
fileName: this.fileName,
|
|
244
|
+
lineNumber: this.lineNumber,
|
|
245
|
+
columnNumber: this.columnNumber,
|
|
246
|
+
stack: this.stack,
|
|
247
|
+
// Axios
|
|
248
|
+
config: d.toJSONObject(this.config),
|
|
249
|
+
code: this.code,
|
|
250
|
+
status: this.status
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const Ut = v.prototype, Lt = {};
|
|
255
|
+
[
|
|
256
|
+
"ERR_BAD_OPTION_VALUE",
|
|
257
|
+
"ERR_BAD_OPTION",
|
|
258
|
+
"ECONNABORTED",
|
|
259
|
+
"ETIMEDOUT",
|
|
260
|
+
"ERR_NETWORK",
|
|
261
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
262
|
+
"ERR_DEPRECATED",
|
|
263
|
+
"ERR_BAD_RESPONSE",
|
|
264
|
+
"ERR_BAD_REQUEST",
|
|
265
|
+
"ERR_CANCELED",
|
|
266
|
+
"ERR_NOT_SUPPORT",
|
|
267
|
+
"ERR_INVALID_URL"
|
|
268
|
+
// eslint-disable-next-line func-names
|
|
269
|
+
].forEach((e) => {
|
|
270
|
+
Lt[e] = { value: e };
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperties(v, Lt);
|
|
273
|
+
Object.defineProperty(Ut, "isAxiosError", { value: !0 });
|
|
274
|
+
v.from = (e, t, n, r, o, i) => {
|
|
275
|
+
const s = Object.create(Ut);
|
|
276
|
+
return d.toFlatObject(e, s, function(l) {
|
|
277
|
+
return l !== Error.prototype;
|
|
278
|
+
}, (a) => a !== "isAxiosError"), v.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, i && Object.assign(s, i), s;
|
|
279
|
+
};
|
|
280
|
+
const or = null;
|
|
281
|
+
function Ue(e) {
|
|
282
|
+
return d.isPlainObject(e) || d.isArray(e);
|
|
283
|
+
}
|
|
284
|
+
function zt(e) {
|
|
285
|
+
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
286
|
+
}
|
|
287
|
+
function rt(e, t, n) {
|
|
288
|
+
return e ? e.concat(t).map(function(o, i) {
|
|
289
|
+
return o = zt(o), !n && i ? "[" + o + "]" : o;
|
|
290
|
+
}).join(n ? "." : "") : t;
|
|
291
|
+
}
|
|
292
|
+
function ir(e) {
|
|
293
|
+
return d.isArray(e) && !e.some(Ue);
|
|
294
|
+
}
|
|
295
|
+
const sr = d.toFlatObject(d, {}, null, function(t) {
|
|
296
|
+
return /^is[A-Z]/.test(t);
|
|
297
|
+
});
|
|
298
|
+
function ve(e, t, n) {
|
|
299
|
+
if (!d.isObject(e))
|
|
300
|
+
throw new TypeError("target must be an object");
|
|
301
|
+
t = t || new FormData(), n = d.toFlatObject(n, {
|
|
302
|
+
metaTokens: !0,
|
|
303
|
+
dots: !1,
|
|
304
|
+
indexes: !1
|
|
305
|
+
}, !1, function(x, p) {
|
|
306
|
+
return !d.isUndefined(p[x]);
|
|
307
|
+
});
|
|
308
|
+
const r = n.metaTokens, o = n.visitor || f, i = n.dots, s = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
|
|
309
|
+
if (!d.isFunction(o))
|
|
310
|
+
throw new TypeError("visitor must be a function");
|
|
311
|
+
function u(g) {
|
|
312
|
+
if (g === null) return "";
|
|
313
|
+
if (d.isDate(g))
|
|
314
|
+
return g.toISOString();
|
|
315
|
+
if (d.isBoolean(g))
|
|
316
|
+
return g.toString();
|
|
317
|
+
if (!l && d.isBlob(g))
|
|
318
|
+
throw new v("Blob is not supported. Use a Buffer instead.");
|
|
319
|
+
return d.isArrayBuffer(g) || d.isTypedArray(g) ? l && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
|
|
320
|
+
}
|
|
321
|
+
function f(g, x, p) {
|
|
322
|
+
let h = g;
|
|
323
|
+
if (g && !p && typeof g == "object") {
|
|
324
|
+
if (d.endsWith(x, "{}"))
|
|
325
|
+
x = r ? x : x.slice(0, -2), g = JSON.stringify(g);
|
|
326
|
+
else if (d.isArray(g) && ir(g) || (d.isFileList(g) || d.endsWith(x, "[]")) && (h = d.toArray(g)))
|
|
327
|
+
return x = zt(x), h.forEach(function(w, E) {
|
|
328
|
+
!(d.isUndefined(w) || w === null) && t.append(
|
|
329
|
+
// eslint-disable-next-line no-nested-ternary
|
|
330
|
+
s === !0 ? rt([x], E, i) : s === null ? x : x + "[]",
|
|
331
|
+
u(w)
|
|
332
|
+
);
|
|
333
|
+
}), !1;
|
|
334
|
+
}
|
|
335
|
+
return Ue(g) ? !0 : (t.append(rt(p, x, i), u(g)), !1);
|
|
336
|
+
}
|
|
337
|
+
const c = [], _ = Object.assign(sr, {
|
|
338
|
+
defaultVisitor: f,
|
|
339
|
+
convertValue: u,
|
|
340
|
+
isVisitable: Ue
|
|
341
|
+
});
|
|
342
|
+
function b(g, x) {
|
|
343
|
+
if (!d.isUndefined(g)) {
|
|
344
|
+
if (c.indexOf(g) !== -1)
|
|
345
|
+
throw Error("Circular reference detected in " + x.join("."));
|
|
346
|
+
c.push(g), d.forEach(g, function(h, y) {
|
|
347
|
+
(!(d.isUndefined(h) || h === null) && o.call(
|
|
348
|
+
t,
|
|
349
|
+
h,
|
|
350
|
+
d.isString(y) ? y.trim() : y,
|
|
351
|
+
x,
|
|
352
|
+
_
|
|
353
|
+
)) === !0 && b(h, x ? x.concat(y) : [y]);
|
|
354
|
+
}), c.pop();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (!d.isObject(e))
|
|
358
|
+
throw new TypeError("data must be an object");
|
|
359
|
+
return b(e), t;
|
|
360
|
+
}
|
|
361
|
+
function ot(e) {
|
|
362
|
+
const t = {
|
|
363
|
+
"!": "%21",
|
|
364
|
+
"'": "%27",
|
|
365
|
+
"(": "%28",
|
|
366
|
+
")": "%29",
|
|
367
|
+
"~": "%7E",
|
|
368
|
+
"%20": "+",
|
|
369
|
+
"%00": "\0"
|
|
370
|
+
};
|
|
371
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
372
|
+
return t[r];
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
function Ge(e, t) {
|
|
376
|
+
this._pairs = [], e && ve(e, this, t);
|
|
377
|
+
}
|
|
378
|
+
const Ht = Ge.prototype;
|
|
379
|
+
Ht.append = function(t, n) {
|
|
380
|
+
this._pairs.push([t, n]);
|
|
381
|
+
};
|
|
382
|
+
Ht.toString = function(t) {
|
|
383
|
+
const n = t ? function(r) {
|
|
384
|
+
return t.call(this, r, ot);
|
|
385
|
+
} : ot;
|
|
386
|
+
return this._pairs.map(function(o) {
|
|
387
|
+
return n(o[0]) + "=" + n(o[1]);
|
|
388
|
+
}, "").join("&");
|
|
389
|
+
};
|
|
390
|
+
function ar(e) {
|
|
391
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
392
|
+
}
|
|
393
|
+
function Mt(e, t, n) {
|
|
394
|
+
if (!t)
|
|
395
|
+
return e;
|
|
396
|
+
const r = n && n.encode || ar;
|
|
397
|
+
d.isFunction(n) && (n = {
|
|
398
|
+
serialize: n
|
|
399
|
+
});
|
|
400
|
+
const o = n && n.serialize;
|
|
401
|
+
let i;
|
|
402
|
+
if (o ? i = o(t, n) : i = d.isURLSearchParams(t) ? t.toString() : new Ge(t, n).toString(r), i) {
|
|
403
|
+
const s = e.indexOf("#");
|
|
404
|
+
s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
405
|
+
}
|
|
406
|
+
return e;
|
|
407
|
+
}
|
|
408
|
+
class it {
|
|
409
|
+
constructor() {
|
|
410
|
+
this.handlers = [];
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Add a new interceptor to the stack
|
|
414
|
+
*
|
|
415
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
416
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
417
|
+
*
|
|
418
|
+
* @return {Number} An ID used to remove interceptor later
|
|
419
|
+
*/
|
|
420
|
+
use(t, n, r) {
|
|
421
|
+
return this.handlers.push({
|
|
422
|
+
fulfilled: t,
|
|
423
|
+
rejected: n,
|
|
424
|
+
synchronous: r ? r.synchronous : !1,
|
|
425
|
+
runWhen: r ? r.runWhen : null
|
|
426
|
+
}), this.handlers.length - 1;
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Remove an interceptor from the stack
|
|
430
|
+
*
|
|
431
|
+
* @param {Number} id The ID that was returned by `use`
|
|
432
|
+
*
|
|
433
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
434
|
+
*/
|
|
435
|
+
eject(t) {
|
|
436
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Clear all interceptors from the stack
|
|
440
|
+
*
|
|
441
|
+
* @returns {void}
|
|
442
|
+
*/
|
|
443
|
+
clear() {
|
|
444
|
+
this.handlers && (this.handlers = []);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Iterate over all the registered interceptors
|
|
448
|
+
*
|
|
449
|
+
* This method is particularly useful for skipping over any
|
|
450
|
+
* interceptors that may have become `null` calling `eject`.
|
|
451
|
+
*
|
|
452
|
+
* @param {Function} fn The function to call for each interceptor
|
|
453
|
+
*
|
|
454
|
+
* @returns {void}
|
|
455
|
+
*/
|
|
456
|
+
forEach(t) {
|
|
457
|
+
d.forEach(this.handlers, function(r) {
|
|
458
|
+
r !== null && t(r);
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
const jt = {
|
|
463
|
+
silentJSONParsing: !0,
|
|
464
|
+
forcedJSONParsing: !0,
|
|
465
|
+
clarifyTimeoutError: !1
|
|
466
|
+
}, lr = typeof URLSearchParams < "u" ? URLSearchParams : Ge, cr = typeof FormData < "u" ? FormData : null, ur = typeof Blob < "u" ? Blob : null, fr = {
|
|
467
|
+
isBrowser: !0,
|
|
468
|
+
classes: {
|
|
469
|
+
URLSearchParams: lr,
|
|
470
|
+
FormData: cr,
|
|
471
|
+
Blob: ur
|
|
472
|
+
},
|
|
473
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
474
|
+
}, Ke = typeof window < "u" && typeof document < "u", Le = typeof navigator == "object" && navigator || void 0, dr = Ke && (!Le || ["ReactNative", "NativeScript", "NS"].indexOf(Le.product) < 0), pr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
475
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", hr = Ke && window.location.href || "http://localhost", mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
476
|
+
__proto__: null,
|
|
477
|
+
hasBrowserEnv: Ke,
|
|
478
|
+
hasStandardBrowserEnv: dr,
|
|
479
|
+
hasStandardBrowserWebWorkerEnv: pr,
|
|
480
|
+
navigator: Le,
|
|
481
|
+
origin: hr
|
|
482
|
+
}, Symbol.toStringTag, { value: "Module" })), F = {
|
|
483
|
+
...mr,
|
|
484
|
+
...fr
|
|
485
|
+
};
|
|
486
|
+
function _r(e, t) {
|
|
487
|
+
return ve(e, new F.classes.URLSearchParams(), Object.assign({
|
|
488
|
+
visitor: function(n, r, o, i) {
|
|
489
|
+
return F.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
490
|
+
}
|
|
491
|
+
}, t));
|
|
492
|
+
}
|
|
493
|
+
function gr(e) {
|
|
494
|
+
return d.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
495
|
+
}
|
|
496
|
+
function br(e) {
|
|
497
|
+
const t = {}, n = Object.keys(e);
|
|
498
|
+
let r;
|
|
499
|
+
const o = n.length;
|
|
500
|
+
let i;
|
|
501
|
+
for (r = 0; r < o; r++)
|
|
502
|
+
i = n[r], t[i] = e[i];
|
|
503
|
+
return t;
|
|
504
|
+
}
|
|
505
|
+
function $t(e) {
|
|
506
|
+
function t(n, r, o, i) {
|
|
507
|
+
let s = n[i++];
|
|
508
|
+
if (s === "__proto__") return !0;
|
|
509
|
+
const a = Number.isFinite(+s), l = i >= n.length;
|
|
510
|
+
return s = !s && d.isArray(o) ? o.length : s, l ? (d.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !a) : ((!o[s] || !d.isObject(o[s])) && (o[s] = []), t(n, r, o[s], i) && d.isArray(o[s]) && (o[s] = br(o[s])), !a);
|
|
511
|
+
}
|
|
512
|
+
if (d.isFormData(e) && d.isFunction(e.entries)) {
|
|
513
|
+
const n = {};
|
|
514
|
+
return d.forEachEntry(e, (r, o) => {
|
|
515
|
+
t(gr(r), o, n, 0);
|
|
516
|
+
}), n;
|
|
517
|
+
}
|
|
518
|
+
return null;
|
|
519
|
+
}
|
|
520
|
+
function yr(e, t, n) {
|
|
521
|
+
if (d.isString(e))
|
|
522
|
+
try {
|
|
523
|
+
return (t || JSON.parse)(e), d.trim(e);
|
|
524
|
+
} catch (r) {
|
|
525
|
+
if (r.name !== "SyntaxError")
|
|
526
|
+
throw r;
|
|
527
|
+
}
|
|
528
|
+
return (n || JSON.stringify)(e);
|
|
529
|
+
}
|
|
530
|
+
const ae = {
|
|
531
|
+
transitional: jt,
|
|
532
|
+
adapter: ["xhr", "http", "fetch"],
|
|
533
|
+
transformRequest: [function(t, n) {
|
|
534
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, i = d.isObject(t);
|
|
535
|
+
if (i && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
|
|
536
|
+
return o ? JSON.stringify($t(t)) : t;
|
|
537
|
+
if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
|
|
538
|
+
return t;
|
|
539
|
+
if (d.isArrayBufferView(t))
|
|
540
|
+
return t.buffer;
|
|
541
|
+
if (d.isURLSearchParams(t))
|
|
542
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
543
|
+
let a;
|
|
544
|
+
if (i) {
|
|
545
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
546
|
+
return _r(t, this.formSerializer).toString();
|
|
547
|
+
if ((a = d.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
548
|
+
const l = this.env && this.env.FormData;
|
|
549
|
+
return ve(
|
|
550
|
+
a ? { "files[]": t } : t,
|
|
551
|
+
l && new l(),
|
|
552
|
+
this.formSerializer
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return i || o ? (n.setContentType("application/json", !1), yr(t)) : t;
|
|
557
|
+
}],
|
|
558
|
+
transformResponse: [function(t) {
|
|
559
|
+
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
560
|
+
if (d.isResponse(t) || d.isReadableStream(t))
|
|
561
|
+
return t;
|
|
562
|
+
if (t && d.isString(t) && (r && !this.responseType || o)) {
|
|
563
|
+
const s = !(n && n.silentJSONParsing) && o;
|
|
564
|
+
try {
|
|
565
|
+
return JSON.parse(t);
|
|
566
|
+
} catch (a) {
|
|
567
|
+
if (s)
|
|
568
|
+
throw a.name === "SyntaxError" ? v.from(a, v.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
return t;
|
|
572
|
+
}],
|
|
573
|
+
/**
|
|
574
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
575
|
+
* timeout is not created.
|
|
576
|
+
*/
|
|
577
|
+
timeout: 0,
|
|
578
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
579
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
580
|
+
maxContentLength: -1,
|
|
581
|
+
maxBodyLength: -1,
|
|
582
|
+
env: {
|
|
583
|
+
FormData: F.classes.FormData,
|
|
584
|
+
Blob: F.classes.Blob
|
|
585
|
+
},
|
|
586
|
+
validateStatus: function(t) {
|
|
587
|
+
return t >= 200 && t < 300;
|
|
588
|
+
},
|
|
589
|
+
headers: {
|
|
590
|
+
common: {
|
|
591
|
+
Accept: "application/json, text/plain, */*",
|
|
592
|
+
"Content-Type": void 0
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
597
|
+
ae.headers[e] = {};
|
|
598
|
+
});
|
|
599
|
+
const wr = d.toObjectSet([
|
|
600
|
+
"age",
|
|
601
|
+
"authorization",
|
|
602
|
+
"content-length",
|
|
603
|
+
"content-type",
|
|
604
|
+
"etag",
|
|
605
|
+
"expires",
|
|
606
|
+
"from",
|
|
607
|
+
"host",
|
|
608
|
+
"if-modified-since",
|
|
609
|
+
"if-unmodified-since",
|
|
610
|
+
"last-modified",
|
|
611
|
+
"location",
|
|
612
|
+
"max-forwards",
|
|
613
|
+
"proxy-authorization",
|
|
614
|
+
"referer",
|
|
615
|
+
"retry-after",
|
|
616
|
+
"user-agent"
|
|
617
|
+
]), xr = (e) => {
|
|
618
|
+
const t = {};
|
|
619
|
+
let n, r, o;
|
|
620
|
+
return e && e.split(`
|
|
621
|
+
`).forEach(function(s) {
|
|
622
|
+
o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && wr[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
623
|
+
}), t;
|
|
624
|
+
}, st = Symbol("internals");
|
|
625
|
+
function te(e) {
|
|
626
|
+
return e && String(e).trim().toLowerCase();
|
|
627
|
+
}
|
|
628
|
+
function fe(e) {
|
|
629
|
+
return e === !1 || e == null ? e : d.isArray(e) ? e.map(fe) : String(e);
|
|
630
|
+
}
|
|
631
|
+
function Er(e) {
|
|
632
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
633
|
+
let r;
|
|
634
|
+
for (; r = n.exec(e); )
|
|
635
|
+
t[r[1]] = r[2];
|
|
636
|
+
return t;
|
|
637
|
+
}
|
|
638
|
+
const Sr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
639
|
+
function Pe(e, t, n, r, o) {
|
|
640
|
+
if (d.isFunction(r))
|
|
641
|
+
return r.call(this, t, n);
|
|
642
|
+
if (o && (t = n), !!d.isString(t)) {
|
|
643
|
+
if (d.isString(r))
|
|
644
|
+
return t.indexOf(r) !== -1;
|
|
645
|
+
if (d.isRegExp(r))
|
|
646
|
+
return r.test(t);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
function vr(e) {
|
|
650
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
651
|
+
}
|
|
652
|
+
function Tr(e, t) {
|
|
653
|
+
const n = d.toCamelCase(" " + t);
|
|
654
|
+
["get", "set", "has"].forEach((r) => {
|
|
655
|
+
Object.defineProperty(e, r + n, {
|
|
656
|
+
value: function(o, i, s) {
|
|
657
|
+
return this[r].call(this, t, o, i, s);
|
|
658
|
+
},
|
|
659
|
+
configurable: !0
|
|
660
|
+
});
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
let N = class {
|
|
664
|
+
constructor(t) {
|
|
665
|
+
t && this.set(t);
|
|
666
|
+
}
|
|
667
|
+
set(t, n, r) {
|
|
668
|
+
const o = this;
|
|
669
|
+
function i(a, l, u) {
|
|
670
|
+
const f = te(l);
|
|
671
|
+
if (!f)
|
|
672
|
+
throw new Error("header name must be a non-empty string");
|
|
673
|
+
const c = d.findKey(o, f);
|
|
674
|
+
(!c || o[c] === void 0 || u === !0 || u === void 0 && o[c] !== !1) && (o[c || l] = fe(a));
|
|
675
|
+
}
|
|
676
|
+
const s = (a, l) => d.forEach(a, (u, f) => i(u, f, l));
|
|
677
|
+
if (d.isPlainObject(t) || t instanceof this.constructor)
|
|
678
|
+
s(t, n);
|
|
679
|
+
else if (d.isString(t) && (t = t.trim()) && !Sr(t))
|
|
680
|
+
s(xr(t), n);
|
|
681
|
+
else if (d.isObject(t) && d.isIterable(t)) {
|
|
682
|
+
let a = {}, l, u;
|
|
683
|
+
for (const f of t) {
|
|
684
|
+
if (!d.isArray(f))
|
|
685
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
686
|
+
a[u = f[0]] = (l = a[u]) ? d.isArray(l) ? [...l, f[1]] : [l, f[1]] : f[1];
|
|
687
|
+
}
|
|
688
|
+
s(a, n);
|
|
689
|
+
} else
|
|
690
|
+
t != null && i(n, t, r);
|
|
691
|
+
return this;
|
|
692
|
+
}
|
|
693
|
+
get(t, n) {
|
|
694
|
+
if (t = te(t), t) {
|
|
695
|
+
const r = d.findKey(this, t);
|
|
696
|
+
if (r) {
|
|
697
|
+
const o = this[r];
|
|
698
|
+
if (!n)
|
|
699
|
+
return o;
|
|
700
|
+
if (n === !0)
|
|
701
|
+
return Er(o);
|
|
702
|
+
if (d.isFunction(n))
|
|
703
|
+
return n.call(this, o, r);
|
|
704
|
+
if (d.isRegExp(n))
|
|
705
|
+
return n.exec(o);
|
|
706
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
has(t, n) {
|
|
711
|
+
if (t = te(t), t) {
|
|
712
|
+
const r = d.findKey(this, t);
|
|
713
|
+
return !!(r && this[r] !== void 0 && (!n || Pe(this, this[r], r, n)));
|
|
714
|
+
}
|
|
715
|
+
return !1;
|
|
716
|
+
}
|
|
717
|
+
delete(t, n) {
|
|
718
|
+
const r = this;
|
|
719
|
+
let o = !1;
|
|
720
|
+
function i(s) {
|
|
721
|
+
if (s = te(s), s) {
|
|
722
|
+
const a = d.findKey(r, s);
|
|
723
|
+
a && (!n || Pe(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
return d.isArray(t) ? t.forEach(i) : i(t), o;
|
|
727
|
+
}
|
|
728
|
+
clear(t) {
|
|
729
|
+
const n = Object.keys(this);
|
|
730
|
+
let r = n.length, o = !1;
|
|
731
|
+
for (; r--; ) {
|
|
732
|
+
const i = n[r];
|
|
733
|
+
(!t || Pe(this, this[i], i, t, !0)) && (delete this[i], o = !0);
|
|
734
|
+
}
|
|
735
|
+
return o;
|
|
736
|
+
}
|
|
737
|
+
normalize(t) {
|
|
738
|
+
const n = this, r = {};
|
|
739
|
+
return d.forEach(this, (o, i) => {
|
|
740
|
+
const s = d.findKey(r, i);
|
|
741
|
+
if (s) {
|
|
742
|
+
n[s] = fe(o), delete n[i];
|
|
743
|
+
return;
|
|
744
|
+
}
|
|
745
|
+
const a = t ? vr(i) : String(i).trim();
|
|
746
|
+
a !== i && delete n[i], n[a] = fe(o), r[a] = !0;
|
|
747
|
+
}), this;
|
|
748
|
+
}
|
|
749
|
+
concat(...t) {
|
|
750
|
+
return this.constructor.concat(this, ...t);
|
|
751
|
+
}
|
|
752
|
+
toJSON(t) {
|
|
753
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
754
|
+
return d.forEach(this, (r, o) => {
|
|
755
|
+
r != null && r !== !1 && (n[o] = t && d.isArray(r) ? r.join(", ") : r);
|
|
756
|
+
}), n;
|
|
757
|
+
}
|
|
758
|
+
[Symbol.iterator]() {
|
|
759
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
760
|
+
}
|
|
761
|
+
toString() {
|
|
762
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
763
|
+
`);
|
|
764
|
+
}
|
|
765
|
+
getSetCookie() {
|
|
766
|
+
return this.get("set-cookie") || [];
|
|
767
|
+
}
|
|
768
|
+
get [Symbol.toStringTag]() {
|
|
769
|
+
return "AxiosHeaders";
|
|
770
|
+
}
|
|
771
|
+
static from(t) {
|
|
772
|
+
return t instanceof this ? t : new this(t);
|
|
773
|
+
}
|
|
774
|
+
static concat(t, ...n) {
|
|
775
|
+
const r = new this(t);
|
|
776
|
+
return n.forEach((o) => r.set(o)), r;
|
|
777
|
+
}
|
|
778
|
+
static accessor(t) {
|
|
779
|
+
const r = (this[st] = this[st] = {
|
|
780
|
+
accessors: {}
|
|
781
|
+
}).accessors, o = this.prototype;
|
|
782
|
+
function i(s) {
|
|
783
|
+
const a = te(s);
|
|
784
|
+
r[a] || (Tr(o, s), r[a] = !0);
|
|
785
|
+
}
|
|
786
|
+
return d.isArray(t) ? t.forEach(i) : i(t), this;
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
790
|
+
d.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
791
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
792
|
+
return {
|
|
793
|
+
get: () => e,
|
|
794
|
+
set(r) {
|
|
795
|
+
this[n] = r;
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
});
|
|
799
|
+
d.freezeMethods(N);
|
|
800
|
+
function Be(e, t) {
|
|
801
|
+
const n = this || ae, r = t || n, o = N.from(r.headers);
|
|
802
|
+
let i = r.data;
|
|
803
|
+
return d.forEach(e, function(a) {
|
|
804
|
+
i = a.call(n, i, o.normalize(), t ? t.status : void 0);
|
|
805
|
+
}), o.normalize(), i;
|
|
806
|
+
}
|
|
807
|
+
function Wt(e) {
|
|
808
|
+
return !!(e && e.__CANCEL__);
|
|
809
|
+
}
|
|
810
|
+
function Z(e, t, n) {
|
|
811
|
+
v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
812
|
+
}
|
|
813
|
+
d.inherits(Z, v, {
|
|
814
|
+
__CANCEL__: !0
|
|
815
|
+
});
|
|
816
|
+
function qt(e, t, n) {
|
|
817
|
+
const r = n.config.validateStatus;
|
|
818
|
+
!n.status || !r || r(n.status) ? e(n) : t(new v(
|
|
819
|
+
"Request failed with status code " + n.status,
|
|
820
|
+
[v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
821
|
+
n.config,
|
|
822
|
+
n.request,
|
|
823
|
+
n
|
|
824
|
+
));
|
|
825
|
+
}
|
|
826
|
+
function Rr(e) {
|
|
827
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
828
|
+
return t && t[1] || "";
|
|
829
|
+
}
|
|
830
|
+
function kr(e, t) {
|
|
831
|
+
e = e || 10;
|
|
832
|
+
const n = new Array(e), r = new Array(e);
|
|
833
|
+
let o = 0, i = 0, s;
|
|
834
|
+
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
835
|
+
const u = Date.now(), f = r[i];
|
|
836
|
+
s || (s = u), n[o] = l, r[o] = u;
|
|
837
|
+
let c = i, _ = 0;
|
|
838
|
+
for (; c !== o; )
|
|
839
|
+
_ += n[c++], c = c % e;
|
|
840
|
+
if (o = (o + 1) % e, o === i && (i = (i + 1) % e), u - s < t)
|
|
841
|
+
return;
|
|
842
|
+
const b = f && u - f;
|
|
843
|
+
return b ? Math.round(_ * 1e3 / b) : void 0;
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
function Cr(e, t) {
|
|
847
|
+
let n = 0, r = 1e3 / t, o, i;
|
|
848
|
+
const s = (u, f = Date.now()) => {
|
|
849
|
+
n = f, o = null, i && (clearTimeout(i), i = null), e.apply(null, u);
|
|
850
|
+
};
|
|
851
|
+
return [(...u) => {
|
|
852
|
+
const f = Date.now(), c = f - n;
|
|
853
|
+
c >= r ? s(u, f) : (o = u, i || (i = setTimeout(() => {
|
|
854
|
+
i = null, s(o);
|
|
855
|
+
}, r - c)));
|
|
856
|
+
}, () => o && s(o)];
|
|
857
|
+
}
|
|
858
|
+
const me = (e, t, n = 3) => {
|
|
859
|
+
let r = 0;
|
|
860
|
+
const o = kr(50, 250);
|
|
861
|
+
return Cr((i) => {
|
|
862
|
+
const s = i.loaded, a = i.lengthComputable ? i.total : void 0, l = s - r, u = o(l), f = s <= a;
|
|
863
|
+
r = s;
|
|
864
|
+
const c = {
|
|
865
|
+
loaded: s,
|
|
866
|
+
total: a,
|
|
867
|
+
progress: a ? s / a : void 0,
|
|
868
|
+
bytes: l,
|
|
869
|
+
rate: u || void 0,
|
|
870
|
+
estimated: u && a && f ? (a - s) / u : void 0,
|
|
871
|
+
event: i,
|
|
872
|
+
lengthComputable: a != null,
|
|
873
|
+
[t ? "download" : "upload"]: !0
|
|
874
|
+
};
|
|
875
|
+
e(c);
|
|
876
|
+
}, n);
|
|
877
|
+
}, at = (e, t) => {
|
|
878
|
+
const n = e != null;
|
|
879
|
+
return [(r) => t[0]({
|
|
880
|
+
lengthComputable: n,
|
|
881
|
+
total: e,
|
|
882
|
+
loaded: r
|
|
883
|
+
}), t[1]];
|
|
884
|
+
}, lt = (e) => (...t) => d.asap(() => e(...t)), Ar = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, F.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
885
|
+
new URL(F.origin),
|
|
886
|
+
F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
|
|
887
|
+
) : () => !0, Or = F.hasStandardBrowserEnv ? (
|
|
888
|
+
// Standard browser envs support document.cookie
|
|
889
|
+
{
|
|
890
|
+
write(e, t, n, r, o, i) {
|
|
891
|
+
const s = [e + "=" + encodeURIComponent(t)];
|
|
892
|
+
d.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), d.isString(r) && s.push("path=" + r), d.isString(o) && s.push("domain=" + o), i === !0 && s.push("secure"), document.cookie = s.join("; ");
|
|
893
|
+
},
|
|
894
|
+
read(e) {
|
|
895
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
896
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
897
|
+
},
|
|
898
|
+
remove(e) {
|
|
899
|
+
this.write(e, "", Date.now() - 864e5);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
) : (
|
|
903
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
904
|
+
{
|
|
905
|
+
write() {
|
|
906
|
+
},
|
|
907
|
+
read() {
|
|
908
|
+
return null;
|
|
909
|
+
},
|
|
910
|
+
remove() {
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
);
|
|
914
|
+
function Fr(e) {
|
|
915
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
916
|
+
}
|
|
917
|
+
function Pr(e, t) {
|
|
918
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
919
|
+
}
|
|
920
|
+
function Jt(e, t, n) {
|
|
921
|
+
let r = !Fr(t);
|
|
922
|
+
return e && (r || n == !1) ? Pr(e, t) : t;
|
|
923
|
+
}
|
|
924
|
+
const ct = (e) => e instanceof N ? { ...e } : e;
|
|
925
|
+
function J(e, t) {
|
|
926
|
+
t = t || {};
|
|
927
|
+
const n = {};
|
|
928
|
+
function r(u, f, c, _) {
|
|
929
|
+
return d.isPlainObject(u) && d.isPlainObject(f) ? d.merge.call({ caseless: _ }, u, f) : d.isPlainObject(f) ? d.merge({}, f) : d.isArray(f) ? f.slice() : f;
|
|
930
|
+
}
|
|
931
|
+
function o(u, f, c, _) {
|
|
932
|
+
if (d.isUndefined(f)) {
|
|
933
|
+
if (!d.isUndefined(u))
|
|
934
|
+
return r(void 0, u, c, _);
|
|
935
|
+
} else return r(u, f, c, _);
|
|
936
|
+
}
|
|
937
|
+
function i(u, f) {
|
|
938
|
+
if (!d.isUndefined(f))
|
|
939
|
+
return r(void 0, f);
|
|
940
|
+
}
|
|
941
|
+
function s(u, f) {
|
|
942
|
+
if (d.isUndefined(f)) {
|
|
943
|
+
if (!d.isUndefined(u))
|
|
944
|
+
return r(void 0, u);
|
|
945
|
+
} else return r(void 0, f);
|
|
946
|
+
}
|
|
947
|
+
function a(u, f, c) {
|
|
948
|
+
if (c in t)
|
|
949
|
+
return r(u, f);
|
|
950
|
+
if (c in e)
|
|
951
|
+
return r(void 0, u);
|
|
952
|
+
}
|
|
953
|
+
const l = {
|
|
954
|
+
url: i,
|
|
955
|
+
method: i,
|
|
956
|
+
data: i,
|
|
957
|
+
baseURL: s,
|
|
958
|
+
transformRequest: s,
|
|
959
|
+
transformResponse: s,
|
|
960
|
+
paramsSerializer: s,
|
|
961
|
+
timeout: s,
|
|
962
|
+
timeoutMessage: s,
|
|
963
|
+
withCredentials: s,
|
|
964
|
+
withXSRFToken: s,
|
|
965
|
+
adapter: s,
|
|
966
|
+
responseType: s,
|
|
967
|
+
xsrfCookieName: s,
|
|
968
|
+
xsrfHeaderName: s,
|
|
969
|
+
onUploadProgress: s,
|
|
970
|
+
onDownloadProgress: s,
|
|
971
|
+
decompress: s,
|
|
972
|
+
maxContentLength: s,
|
|
973
|
+
maxBodyLength: s,
|
|
974
|
+
beforeRedirect: s,
|
|
975
|
+
transport: s,
|
|
976
|
+
httpAgent: s,
|
|
977
|
+
httpsAgent: s,
|
|
978
|
+
cancelToken: s,
|
|
979
|
+
socketPath: s,
|
|
980
|
+
responseEncoding: s,
|
|
981
|
+
validateStatus: a,
|
|
982
|
+
headers: (u, f, c) => o(ct(u), ct(f), c, !0)
|
|
983
|
+
};
|
|
984
|
+
return d.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
985
|
+
const c = l[f] || o, _ = c(e[f], t[f], f);
|
|
986
|
+
d.isUndefined(_) && c !== a || (n[f] = _);
|
|
987
|
+
}), n;
|
|
988
|
+
}
|
|
989
|
+
const Vt = (e) => {
|
|
990
|
+
const t = J({}, e);
|
|
991
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: i, headers: s, auth: a } = t;
|
|
992
|
+
t.headers = s = N.from(s), t.url = Mt(Jt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && s.set(
|
|
993
|
+
"Authorization",
|
|
994
|
+
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
995
|
+
);
|
|
996
|
+
let l;
|
|
997
|
+
if (d.isFormData(n)) {
|
|
998
|
+
if (F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv)
|
|
999
|
+
s.setContentType(void 0);
|
|
1000
|
+
else if ((l = s.getContentType()) !== !1) {
|
|
1001
|
+
const [u, ...f] = l ? l.split(";").map((c) => c.trim()).filter(Boolean) : [];
|
|
1002
|
+
s.setContentType([u || "multipart/form-data", ...f].join("; "));
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
if (F.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && Ar(t.url))) {
|
|
1006
|
+
const u = o && i && Or.read(i);
|
|
1007
|
+
u && s.set(o, u);
|
|
1008
|
+
}
|
|
1009
|
+
return t;
|
|
1010
|
+
}, Br = typeof XMLHttpRequest < "u", Nr = Br && function(e) {
|
|
1011
|
+
return new Promise(function(n, r) {
|
|
1012
|
+
const o = Vt(e);
|
|
1013
|
+
let i = o.data;
|
|
1014
|
+
const s = N.from(o.headers).normalize();
|
|
1015
|
+
let { responseType: a, onUploadProgress: l, onDownloadProgress: u } = o, f, c, _, b, g;
|
|
1016
|
+
function x() {
|
|
1017
|
+
b && b(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
|
|
1018
|
+
}
|
|
1019
|
+
let p = new XMLHttpRequest();
|
|
1020
|
+
p.open(o.method.toUpperCase(), o.url, !0), p.timeout = o.timeout;
|
|
1021
|
+
function h() {
|
|
1022
|
+
if (!p)
|
|
1023
|
+
return;
|
|
1024
|
+
const w = N.from(
|
|
1025
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1026
|
+
), T = {
|
|
1027
|
+
data: !a || a === "text" || a === "json" ? p.responseText : p.response,
|
|
1028
|
+
status: p.status,
|
|
1029
|
+
statusText: p.statusText,
|
|
1030
|
+
headers: w,
|
|
1031
|
+
config: e,
|
|
1032
|
+
request: p
|
|
1033
|
+
};
|
|
1034
|
+
qt(function(I) {
|
|
1035
|
+
n(I), x();
|
|
1036
|
+
}, function(I) {
|
|
1037
|
+
r(I), x();
|
|
1038
|
+
}, T), p = null;
|
|
1039
|
+
}
|
|
1040
|
+
"onloadend" in p ? p.onloadend = h : p.onreadystatechange = function() {
|
|
1041
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(h);
|
|
1042
|
+
}, p.onabort = function() {
|
|
1043
|
+
p && (r(new v("Request aborted", v.ECONNABORTED, e, p)), p = null);
|
|
1044
|
+
}, p.onerror = function() {
|
|
1045
|
+
r(new v("Network Error", v.ERR_NETWORK, e, p)), p = null;
|
|
1046
|
+
}, p.ontimeout = function() {
|
|
1047
|
+
let E = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1048
|
+
const T = o.transitional || jt;
|
|
1049
|
+
o.timeoutErrorMessage && (E = o.timeoutErrorMessage), r(new v(
|
|
1050
|
+
E,
|
|
1051
|
+
T.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
|
|
1052
|
+
e,
|
|
1053
|
+
p
|
|
1054
|
+
)), p = null;
|
|
1055
|
+
}, i === void 0 && s.setContentType(null), "setRequestHeader" in p && d.forEach(s.toJSON(), function(E, T) {
|
|
1056
|
+
p.setRequestHeader(T, E);
|
|
1057
|
+
}), d.isUndefined(o.withCredentials) || (p.withCredentials = !!o.withCredentials), a && a !== "json" && (p.responseType = o.responseType), u && ([_, g] = me(u, !0), p.addEventListener("progress", _)), l && p.upload && ([c, b] = me(l), p.upload.addEventListener("progress", c), p.upload.addEventListener("loadend", b)), (o.cancelToken || o.signal) && (f = (w) => {
|
|
1058
|
+
p && (r(!w || w.type ? new Z(null, e, p) : w), p.abort(), p = null);
|
|
1059
|
+
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
1060
|
+
const y = Rr(o.url);
|
|
1061
|
+
if (y && F.protocols.indexOf(y) === -1) {
|
|
1062
|
+
r(new v("Unsupported protocol " + y + ":", v.ERR_BAD_REQUEST, e));
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
p.send(i || null);
|
|
1066
|
+
});
|
|
1067
|
+
}, Ir = (e, t) => {
|
|
1068
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1069
|
+
if (t || n) {
|
|
1070
|
+
let r = new AbortController(), o;
|
|
1071
|
+
const i = function(u) {
|
|
1072
|
+
if (!o) {
|
|
1073
|
+
o = !0, a();
|
|
1074
|
+
const f = u instanceof Error ? u : this.reason;
|
|
1075
|
+
r.abort(f instanceof v ? f : new Z(f instanceof Error ? f.message : f));
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
let s = t && setTimeout(() => {
|
|
1079
|
+
s = null, i(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
|
|
1080
|
+
}, t);
|
|
1081
|
+
const a = () => {
|
|
1082
|
+
e && (s && clearTimeout(s), s = null, e.forEach((u) => {
|
|
1083
|
+
u.unsubscribe ? u.unsubscribe(i) : u.removeEventListener("abort", i);
|
|
1084
|
+
}), e = null);
|
|
1085
|
+
};
|
|
1086
|
+
e.forEach((u) => u.addEventListener("abort", i));
|
|
1087
|
+
const { signal: l } = r;
|
|
1088
|
+
return l.unsubscribe = () => d.asap(a), l;
|
|
1089
|
+
}
|
|
1090
|
+
}, Dr = function* (e, t) {
|
|
1091
|
+
let n = e.byteLength;
|
|
1092
|
+
if (n < t) {
|
|
1093
|
+
yield e;
|
|
1094
|
+
return;
|
|
1095
|
+
}
|
|
1096
|
+
let r = 0, o;
|
|
1097
|
+
for (; r < n; )
|
|
1098
|
+
o = r + t, yield e.slice(r, o), r = o;
|
|
1099
|
+
}, Ur = async function* (e, t) {
|
|
1100
|
+
for await (const n of Lr(e))
|
|
1101
|
+
yield* Dr(n, t);
|
|
1102
|
+
}, Lr = async function* (e) {
|
|
1103
|
+
if (e[Symbol.asyncIterator]) {
|
|
1104
|
+
yield* e;
|
|
1105
|
+
return;
|
|
1106
|
+
}
|
|
1107
|
+
const t = e.getReader();
|
|
1108
|
+
try {
|
|
1109
|
+
for (; ; ) {
|
|
1110
|
+
const { done: n, value: r } = await t.read();
|
|
1111
|
+
if (n)
|
|
1112
|
+
break;
|
|
1113
|
+
yield r;
|
|
1114
|
+
}
|
|
1115
|
+
} finally {
|
|
1116
|
+
await t.cancel();
|
|
1117
|
+
}
|
|
1118
|
+
}, ut = (e, t, n, r) => {
|
|
1119
|
+
const o = Ur(e, t);
|
|
1120
|
+
let i = 0, s, a = (l) => {
|
|
1121
|
+
s || (s = !0, r && r(l));
|
|
1122
|
+
};
|
|
1123
|
+
return new ReadableStream({
|
|
1124
|
+
async pull(l) {
|
|
1125
|
+
try {
|
|
1126
|
+
const { done: u, value: f } = await o.next();
|
|
1127
|
+
if (u) {
|
|
1128
|
+
a(), l.close();
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
let c = f.byteLength;
|
|
1132
|
+
if (n) {
|
|
1133
|
+
let _ = i += c;
|
|
1134
|
+
n(_);
|
|
1135
|
+
}
|
|
1136
|
+
l.enqueue(new Uint8Array(f));
|
|
1137
|
+
} catch (u) {
|
|
1138
|
+
throw a(u), u;
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
cancel(l) {
|
|
1142
|
+
return a(l), o.return();
|
|
1143
|
+
}
|
|
1144
|
+
}, {
|
|
1145
|
+
highWaterMark: 2
|
|
1146
|
+
});
|
|
1147
|
+
}, Te = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Gt = Te && typeof ReadableStream == "function", zr = Te && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Kt = (e, ...t) => {
|
|
1148
|
+
try {
|
|
1149
|
+
return !!e(...t);
|
|
1150
|
+
} catch {
|
|
1151
|
+
return !1;
|
|
1152
|
+
}
|
|
1153
|
+
}, Hr = Gt && Kt(() => {
|
|
1154
|
+
let e = !1;
|
|
1155
|
+
const t = new Request(F.origin, {
|
|
1156
|
+
body: new ReadableStream(),
|
|
1157
|
+
method: "POST",
|
|
1158
|
+
get duplex() {
|
|
1159
|
+
return e = !0, "half";
|
|
1160
|
+
}
|
|
1161
|
+
}).headers.has("Content-Type");
|
|
1162
|
+
return e && !t;
|
|
1163
|
+
}), ft = 64 * 1024, ze = Gt && Kt(() => d.isReadableStream(new Response("").body)), _e = {
|
|
1164
|
+
stream: ze && ((e) => e.body)
|
|
1165
|
+
};
|
|
1166
|
+
Te && ((e) => {
|
|
1167
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1168
|
+
!_e[t] && (_e[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1169
|
+
throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
|
|
1170
|
+
});
|
|
1171
|
+
});
|
|
1172
|
+
})(new Response());
|
|
1173
|
+
const Mr = async (e) => {
|
|
1174
|
+
if (e == null)
|
|
1175
|
+
return 0;
|
|
1176
|
+
if (d.isBlob(e))
|
|
1177
|
+
return e.size;
|
|
1178
|
+
if (d.isSpecCompliantForm(e))
|
|
1179
|
+
return (await new Request(F.origin, {
|
|
1180
|
+
method: "POST",
|
|
1181
|
+
body: e
|
|
1182
|
+
}).arrayBuffer()).byteLength;
|
|
1183
|
+
if (d.isArrayBufferView(e) || d.isArrayBuffer(e))
|
|
1184
|
+
return e.byteLength;
|
|
1185
|
+
if (d.isURLSearchParams(e) && (e = e + ""), d.isString(e))
|
|
1186
|
+
return (await zr(e)).byteLength;
|
|
1187
|
+
}, jr = async (e, t) => {
|
|
1188
|
+
const n = d.toFiniteNumber(e.getContentLength());
|
|
1189
|
+
return n ?? Mr(t);
|
|
1190
|
+
}, $r = Te && (async (e) => {
|
|
1191
|
+
let {
|
|
1192
|
+
url: t,
|
|
1193
|
+
method: n,
|
|
1194
|
+
data: r,
|
|
1195
|
+
signal: o,
|
|
1196
|
+
cancelToken: i,
|
|
1197
|
+
timeout: s,
|
|
1198
|
+
onDownloadProgress: a,
|
|
1199
|
+
onUploadProgress: l,
|
|
1200
|
+
responseType: u,
|
|
1201
|
+
headers: f,
|
|
1202
|
+
withCredentials: c = "same-origin",
|
|
1203
|
+
fetchOptions: _
|
|
1204
|
+
} = Vt(e);
|
|
1205
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1206
|
+
let b = Ir([o, i && i.toAbortSignal()], s), g;
|
|
1207
|
+
const x = b && b.unsubscribe && (() => {
|
|
1208
|
+
b.unsubscribe();
|
|
1209
|
+
});
|
|
1210
|
+
let p;
|
|
1211
|
+
try {
|
|
1212
|
+
if (l && Hr && n !== "get" && n !== "head" && (p = await jr(f, r)) !== 0) {
|
|
1213
|
+
let T = new Request(t, {
|
|
1214
|
+
method: "POST",
|
|
1215
|
+
body: r,
|
|
1216
|
+
duplex: "half"
|
|
1217
|
+
}), k;
|
|
1218
|
+
if (d.isFormData(r) && (k = T.headers.get("content-type")) && f.setContentType(k), T.body) {
|
|
1219
|
+
const [I, M] = at(
|
|
1220
|
+
p,
|
|
1221
|
+
me(lt(l))
|
|
1222
|
+
);
|
|
1223
|
+
r = ut(T.body, ft, I, M);
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
d.isString(c) || (c = c ? "include" : "omit");
|
|
1227
|
+
const h = "credentials" in Request.prototype;
|
|
1228
|
+
g = new Request(t, {
|
|
1229
|
+
..._,
|
|
1230
|
+
signal: b,
|
|
1231
|
+
method: n.toUpperCase(),
|
|
1232
|
+
headers: f.normalize().toJSON(),
|
|
1233
|
+
body: r,
|
|
1234
|
+
duplex: "half",
|
|
1235
|
+
credentials: h ? c : void 0
|
|
1236
|
+
});
|
|
1237
|
+
let y = await fetch(g, _);
|
|
1238
|
+
const w = ze && (u === "stream" || u === "response");
|
|
1239
|
+
if (ze && (a || w && x)) {
|
|
1240
|
+
const T = {};
|
|
1241
|
+
["status", "statusText", "headers"].forEach((j) => {
|
|
1242
|
+
T[j] = y[j];
|
|
1243
|
+
});
|
|
1244
|
+
const k = d.toFiniteNumber(y.headers.get("content-length")), [I, M] = a && at(
|
|
1245
|
+
k,
|
|
1246
|
+
me(lt(a), !0)
|
|
1247
|
+
) || [];
|
|
1248
|
+
y = new Response(
|
|
1249
|
+
ut(y.body, ft, I, () => {
|
|
1250
|
+
M && M(), x && x();
|
|
1251
|
+
}),
|
|
1252
|
+
T
|
|
1253
|
+
);
|
|
1254
|
+
}
|
|
1255
|
+
u = u || "text";
|
|
1256
|
+
let E = await _e[d.findKey(_e, u) || "text"](y, e);
|
|
1257
|
+
return !w && x && x(), await new Promise((T, k) => {
|
|
1258
|
+
qt(T, k, {
|
|
1259
|
+
data: E,
|
|
1260
|
+
headers: N.from(y.headers),
|
|
1261
|
+
status: y.status,
|
|
1262
|
+
statusText: y.statusText,
|
|
1263
|
+
config: e,
|
|
1264
|
+
request: g
|
|
1265
|
+
});
|
|
1266
|
+
});
|
|
1267
|
+
} catch (h) {
|
|
1268
|
+
throw x && x(), h && h.name === "TypeError" && /Load failed|fetch/i.test(h.message) ? Object.assign(
|
|
1269
|
+
new v("Network Error", v.ERR_NETWORK, e, g),
|
|
1270
|
+
{
|
|
1271
|
+
cause: h.cause || h
|
|
1272
|
+
}
|
|
1273
|
+
) : v.from(h, h && h.code, e, g);
|
|
1274
|
+
}
|
|
1275
|
+
}), He = {
|
|
1276
|
+
http: or,
|
|
1277
|
+
xhr: Nr,
|
|
1278
|
+
fetch: $r
|
|
1279
|
+
};
|
|
1280
|
+
d.forEach(He, (e, t) => {
|
|
1281
|
+
if (e) {
|
|
1282
|
+
try {
|
|
1283
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1284
|
+
} catch {
|
|
1285
|
+
}
|
|
1286
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1287
|
+
}
|
|
1288
|
+
});
|
|
1289
|
+
const dt = (e) => `- ${e}`, Wr = (e) => d.isFunction(e) || e === null || e === !1, Xt = {
|
|
1290
|
+
getAdapter: (e) => {
|
|
1291
|
+
e = d.isArray(e) ? e : [e];
|
|
1292
|
+
const { length: t } = e;
|
|
1293
|
+
let n, r;
|
|
1294
|
+
const o = {};
|
|
1295
|
+
for (let i = 0; i < t; i++) {
|
|
1296
|
+
n = e[i];
|
|
1297
|
+
let s;
|
|
1298
|
+
if (r = n, !Wr(n) && (r = He[(s = String(n)).toLowerCase()], r === void 0))
|
|
1299
|
+
throw new v(`Unknown adapter '${s}'`);
|
|
1300
|
+
if (r)
|
|
1301
|
+
break;
|
|
1302
|
+
o[s || "#" + i] = r;
|
|
1303
|
+
}
|
|
1304
|
+
if (!r) {
|
|
1305
|
+
const i = Object.entries(o).map(
|
|
1306
|
+
([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1307
|
+
);
|
|
1308
|
+
let s = t ? i.length > 1 ? `since :
|
|
1309
|
+
` + i.map(dt).join(`
|
|
1310
|
+
`) : " " + dt(i[0]) : "as no adapter specified";
|
|
1311
|
+
throw new v(
|
|
1312
|
+
"There is no suitable adapter to dispatch the request " + s,
|
|
1313
|
+
"ERR_NOT_SUPPORT"
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
return r;
|
|
1317
|
+
},
|
|
1318
|
+
adapters: He
|
|
1319
|
+
};
|
|
1320
|
+
function Ne(e) {
|
|
1321
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1322
|
+
throw new Z(null, e);
|
|
1323
|
+
}
|
|
1324
|
+
function pt(e) {
|
|
1325
|
+
return Ne(e), e.headers = N.from(e.headers), e.data = Be.call(
|
|
1326
|
+
e,
|
|
1327
|
+
e.transformRequest
|
|
1328
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xt.getAdapter(e.adapter || ae.adapter)(e).then(function(r) {
|
|
1329
|
+
return Ne(e), r.data = Be.call(
|
|
1330
|
+
e,
|
|
1331
|
+
e.transformResponse,
|
|
1332
|
+
r
|
|
1333
|
+
), r.headers = N.from(r.headers), r;
|
|
1334
|
+
}, function(r) {
|
|
1335
|
+
return Wt(r) || (Ne(e), r && r.response && (r.response.data = Be.call(
|
|
1336
|
+
e,
|
|
1337
|
+
e.transformResponse,
|
|
1338
|
+
r.response
|
|
1339
|
+
), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
const Zt = "1.10.0", Re = {};
|
|
1343
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1344
|
+
Re[e] = function(r) {
|
|
1345
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1346
|
+
};
|
|
1347
|
+
});
|
|
1348
|
+
const ht = {};
|
|
1349
|
+
Re.transitional = function(t, n, r) {
|
|
1350
|
+
function o(i, s) {
|
|
1351
|
+
return "[Axios v" + Zt + "] Transitional option '" + i + "'" + s + (r ? ". " + r : "");
|
|
1352
|
+
}
|
|
1353
|
+
return (i, s, a) => {
|
|
1354
|
+
if (t === !1)
|
|
1355
|
+
throw new v(
|
|
1356
|
+
o(s, " has been removed" + (n ? " in " + n : "")),
|
|
1357
|
+
v.ERR_DEPRECATED
|
|
1358
|
+
);
|
|
1359
|
+
return n && !ht[s] && (ht[s] = !0, console.warn(
|
|
1360
|
+
o(
|
|
1361
|
+
s,
|
|
1362
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1363
|
+
)
|
|
1364
|
+
)), t ? t(i, s, a) : !0;
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
1367
|
+
Re.spelling = function(t) {
|
|
1368
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1369
|
+
};
|
|
1370
|
+
function qr(e, t, n) {
|
|
1371
|
+
if (typeof e != "object")
|
|
1372
|
+
throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
|
|
1373
|
+
const r = Object.keys(e);
|
|
1374
|
+
let o = r.length;
|
|
1375
|
+
for (; o-- > 0; ) {
|
|
1376
|
+
const i = r[o], s = t[i];
|
|
1377
|
+
if (s) {
|
|
1378
|
+
const a = e[i], l = a === void 0 || s(a, i, e);
|
|
1379
|
+
if (l !== !0)
|
|
1380
|
+
throw new v("option " + i + " must be " + l, v.ERR_BAD_OPTION_VALUE);
|
|
1381
|
+
continue;
|
|
1382
|
+
}
|
|
1383
|
+
if (n !== !0)
|
|
1384
|
+
throw new v("Unknown option " + i, v.ERR_BAD_OPTION);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
const de = {
|
|
1388
|
+
assertOptions: qr,
|
|
1389
|
+
validators: Re
|
|
1390
|
+
}, L = de.validators;
|
|
1391
|
+
let q = class {
|
|
1392
|
+
constructor(t) {
|
|
1393
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1394
|
+
request: new it(),
|
|
1395
|
+
response: new it()
|
|
1396
|
+
};
|
|
1397
|
+
}
|
|
1398
|
+
/**
|
|
1399
|
+
* Dispatch a request
|
|
1400
|
+
*
|
|
1401
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1402
|
+
* @param {?Object} config
|
|
1403
|
+
*
|
|
1404
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1405
|
+
*/
|
|
1406
|
+
async request(t, n) {
|
|
1407
|
+
try {
|
|
1408
|
+
return await this._request(t, n);
|
|
1409
|
+
} catch (r) {
|
|
1410
|
+
if (r instanceof Error) {
|
|
1411
|
+
let o = {};
|
|
1412
|
+
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1413
|
+
const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1414
|
+
try {
|
|
1415
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1416
|
+
` + i) : r.stack = i;
|
|
1417
|
+
} catch {
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
throw r;
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
_request(t, n) {
|
|
1424
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = J(this.defaults, n);
|
|
1425
|
+
const { transitional: r, paramsSerializer: o, headers: i } = n;
|
|
1426
|
+
r !== void 0 && de.assertOptions(r, {
|
|
1427
|
+
silentJSONParsing: L.transitional(L.boolean),
|
|
1428
|
+
forcedJSONParsing: L.transitional(L.boolean),
|
|
1429
|
+
clarifyTimeoutError: L.transitional(L.boolean)
|
|
1430
|
+
}, !1), o != null && (d.isFunction(o) ? n.paramsSerializer = {
|
|
1431
|
+
serialize: o
|
|
1432
|
+
} : de.assertOptions(o, {
|
|
1433
|
+
encode: L.function,
|
|
1434
|
+
serialize: L.function
|
|
1435
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), de.assertOptions(n, {
|
|
1436
|
+
baseUrl: L.spelling("baseURL"),
|
|
1437
|
+
withXsrfToken: L.spelling("withXSRFToken")
|
|
1438
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1439
|
+
let s = i && d.merge(
|
|
1440
|
+
i.common,
|
|
1441
|
+
i[n.method]
|
|
1442
|
+
);
|
|
1443
|
+
i && d.forEach(
|
|
1444
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1445
|
+
(g) => {
|
|
1446
|
+
delete i[g];
|
|
1447
|
+
}
|
|
1448
|
+
), n.headers = N.concat(s, i);
|
|
1449
|
+
const a = [];
|
|
1450
|
+
let l = !0;
|
|
1451
|
+
this.interceptors.request.forEach(function(x) {
|
|
1452
|
+
typeof x.runWhen == "function" && x.runWhen(n) === !1 || (l = l && x.synchronous, a.unshift(x.fulfilled, x.rejected));
|
|
1453
|
+
});
|
|
1454
|
+
const u = [];
|
|
1455
|
+
this.interceptors.response.forEach(function(x) {
|
|
1456
|
+
u.push(x.fulfilled, x.rejected);
|
|
1457
|
+
});
|
|
1458
|
+
let f, c = 0, _;
|
|
1459
|
+
if (!l) {
|
|
1460
|
+
const g = [pt.bind(this), void 0];
|
|
1461
|
+
for (g.unshift.apply(g, a), g.push.apply(g, u), _ = g.length, f = Promise.resolve(n); c < _; )
|
|
1462
|
+
f = f.then(g[c++], g[c++]);
|
|
1463
|
+
return f;
|
|
1464
|
+
}
|
|
1465
|
+
_ = a.length;
|
|
1466
|
+
let b = n;
|
|
1467
|
+
for (c = 0; c < _; ) {
|
|
1468
|
+
const g = a[c++], x = a[c++];
|
|
1469
|
+
try {
|
|
1470
|
+
b = g(b);
|
|
1471
|
+
} catch (p) {
|
|
1472
|
+
x.call(this, p);
|
|
1473
|
+
break;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
try {
|
|
1477
|
+
f = pt.call(this, b);
|
|
1478
|
+
} catch (g) {
|
|
1479
|
+
return Promise.reject(g);
|
|
1480
|
+
}
|
|
1481
|
+
for (c = 0, _ = u.length; c < _; )
|
|
1482
|
+
f = f.then(u[c++], u[c++]);
|
|
1483
|
+
return f;
|
|
1484
|
+
}
|
|
1485
|
+
getUri(t) {
|
|
1486
|
+
t = J(this.defaults, t);
|
|
1487
|
+
const n = Jt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1488
|
+
return Mt(n, t.params, t.paramsSerializer);
|
|
1489
|
+
}
|
|
1490
|
+
};
|
|
1491
|
+
d.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1492
|
+
q.prototype[t] = function(n, r) {
|
|
1493
|
+
return this.request(J(r || {}, {
|
|
1494
|
+
method: t,
|
|
1495
|
+
url: n,
|
|
1496
|
+
data: (r || {}).data
|
|
1497
|
+
}));
|
|
1498
|
+
};
|
|
1499
|
+
});
|
|
1500
|
+
d.forEach(["post", "put", "patch"], function(t) {
|
|
1501
|
+
function n(r) {
|
|
1502
|
+
return function(i, s, a) {
|
|
1503
|
+
return this.request(J(a || {}, {
|
|
1504
|
+
method: t,
|
|
1505
|
+
headers: r ? {
|
|
1506
|
+
"Content-Type": "multipart/form-data"
|
|
1507
|
+
} : {},
|
|
1508
|
+
url: i,
|
|
1509
|
+
data: s
|
|
1510
|
+
}));
|
|
1511
|
+
};
|
|
1512
|
+
}
|
|
1513
|
+
q.prototype[t] = n(), q.prototype[t + "Form"] = n(!0);
|
|
1514
|
+
});
|
|
1515
|
+
let Jr = class Qt {
|
|
1516
|
+
constructor(t) {
|
|
1517
|
+
if (typeof t != "function")
|
|
1518
|
+
throw new TypeError("executor must be a function.");
|
|
1519
|
+
let n;
|
|
1520
|
+
this.promise = new Promise(function(i) {
|
|
1521
|
+
n = i;
|
|
1522
|
+
});
|
|
1523
|
+
const r = this;
|
|
1524
|
+
this.promise.then((o) => {
|
|
1525
|
+
if (!r._listeners) return;
|
|
1526
|
+
let i = r._listeners.length;
|
|
1527
|
+
for (; i-- > 0; )
|
|
1528
|
+
r._listeners[i](o);
|
|
1529
|
+
r._listeners = null;
|
|
1530
|
+
}), this.promise.then = (o) => {
|
|
1531
|
+
let i;
|
|
1532
|
+
const s = new Promise((a) => {
|
|
1533
|
+
r.subscribe(a), i = a;
|
|
1534
|
+
}).then(o);
|
|
1535
|
+
return s.cancel = function() {
|
|
1536
|
+
r.unsubscribe(i);
|
|
1537
|
+
}, s;
|
|
1538
|
+
}, t(function(i, s, a) {
|
|
1539
|
+
r.reason || (r.reason = new Z(i, s, a), n(r.reason));
|
|
1540
|
+
});
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1544
|
+
*/
|
|
1545
|
+
throwIfRequested() {
|
|
1546
|
+
if (this.reason)
|
|
1547
|
+
throw this.reason;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Subscribe to the cancel signal
|
|
1551
|
+
*/
|
|
1552
|
+
subscribe(t) {
|
|
1553
|
+
if (this.reason) {
|
|
1554
|
+
t(this.reason);
|
|
1555
|
+
return;
|
|
1556
|
+
}
|
|
1557
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1558
|
+
}
|
|
1559
|
+
/**
|
|
1560
|
+
* Unsubscribe from the cancel signal
|
|
1561
|
+
*/
|
|
1562
|
+
unsubscribe(t) {
|
|
1563
|
+
if (!this._listeners)
|
|
1564
|
+
return;
|
|
1565
|
+
const n = this._listeners.indexOf(t);
|
|
1566
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1567
|
+
}
|
|
1568
|
+
toAbortSignal() {
|
|
1569
|
+
const t = new AbortController(), n = (r) => {
|
|
1570
|
+
t.abort(r);
|
|
1571
|
+
};
|
|
1572
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1576
|
+
* cancels the `CancelToken`.
|
|
1577
|
+
*/
|
|
1578
|
+
static source() {
|
|
1579
|
+
let t;
|
|
1580
|
+
return {
|
|
1581
|
+
token: new Qt(function(o) {
|
|
1582
|
+
t = o;
|
|
1583
|
+
}),
|
|
1584
|
+
cancel: t
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
function Vr(e) {
|
|
1589
|
+
return function(n) {
|
|
1590
|
+
return e.apply(null, n);
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
function Gr(e) {
|
|
1594
|
+
return d.isObject(e) && e.isAxiosError === !0;
|
|
1595
|
+
}
|
|
1596
|
+
const Me = {
|
|
1597
|
+
Continue: 100,
|
|
1598
|
+
SwitchingProtocols: 101,
|
|
1599
|
+
Processing: 102,
|
|
1600
|
+
EarlyHints: 103,
|
|
1601
|
+
Ok: 200,
|
|
1602
|
+
Created: 201,
|
|
1603
|
+
Accepted: 202,
|
|
1604
|
+
NonAuthoritativeInformation: 203,
|
|
1605
|
+
NoContent: 204,
|
|
1606
|
+
ResetContent: 205,
|
|
1607
|
+
PartialContent: 206,
|
|
1608
|
+
MultiStatus: 207,
|
|
1609
|
+
AlreadyReported: 208,
|
|
1610
|
+
ImUsed: 226,
|
|
1611
|
+
MultipleChoices: 300,
|
|
1612
|
+
MovedPermanently: 301,
|
|
1613
|
+
Found: 302,
|
|
1614
|
+
SeeOther: 303,
|
|
1615
|
+
NotModified: 304,
|
|
1616
|
+
UseProxy: 305,
|
|
1617
|
+
Unused: 306,
|
|
1618
|
+
TemporaryRedirect: 307,
|
|
1619
|
+
PermanentRedirect: 308,
|
|
1620
|
+
BadRequest: 400,
|
|
1621
|
+
Unauthorized: 401,
|
|
1622
|
+
PaymentRequired: 402,
|
|
1623
|
+
Forbidden: 403,
|
|
1624
|
+
NotFound: 404,
|
|
1625
|
+
MethodNotAllowed: 405,
|
|
1626
|
+
NotAcceptable: 406,
|
|
1627
|
+
ProxyAuthenticationRequired: 407,
|
|
1628
|
+
RequestTimeout: 408,
|
|
1629
|
+
Conflict: 409,
|
|
1630
|
+
Gone: 410,
|
|
1631
|
+
LengthRequired: 411,
|
|
1632
|
+
PreconditionFailed: 412,
|
|
1633
|
+
PayloadTooLarge: 413,
|
|
1634
|
+
UriTooLong: 414,
|
|
1635
|
+
UnsupportedMediaType: 415,
|
|
1636
|
+
RangeNotSatisfiable: 416,
|
|
1637
|
+
ExpectationFailed: 417,
|
|
1638
|
+
ImATeapot: 418,
|
|
1639
|
+
MisdirectedRequest: 421,
|
|
1640
|
+
UnprocessableEntity: 422,
|
|
1641
|
+
Locked: 423,
|
|
1642
|
+
FailedDependency: 424,
|
|
1643
|
+
TooEarly: 425,
|
|
1644
|
+
UpgradeRequired: 426,
|
|
1645
|
+
PreconditionRequired: 428,
|
|
1646
|
+
TooManyRequests: 429,
|
|
1647
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1648
|
+
UnavailableForLegalReasons: 451,
|
|
1649
|
+
InternalServerError: 500,
|
|
1650
|
+
NotImplemented: 501,
|
|
1651
|
+
BadGateway: 502,
|
|
1652
|
+
ServiceUnavailable: 503,
|
|
1653
|
+
GatewayTimeout: 504,
|
|
1654
|
+
HttpVersionNotSupported: 505,
|
|
1655
|
+
VariantAlsoNegotiates: 506,
|
|
1656
|
+
InsufficientStorage: 507,
|
|
1657
|
+
LoopDetected: 508,
|
|
1658
|
+
NotExtended: 510,
|
|
1659
|
+
NetworkAuthenticationRequired: 511
|
|
1660
|
+
};
|
|
1661
|
+
Object.entries(Me).forEach(([e, t]) => {
|
|
1662
|
+
Me[t] = e;
|
|
1663
|
+
});
|
|
1664
|
+
function Yt(e) {
|
|
1665
|
+
const t = new q(e), n = At(q.prototype.request, t);
|
|
1666
|
+
return d.extend(n, q.prototype, t, { allOwnKeys: !0 }), d.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1667
|
+
return Yt(J(e, o));
|
|
1668
|
+
}, n;
|
|
1669
|
+
}
|
|
1670
|
+
const A = Yt(ae);
|
|
1671
|
+
A.Axios = q;
|
|
1672
|
+
A.CanceledError = Z;
|
|
1673
|
+
A.CancelToken = Jr;
|
|
1674
|
+
A.isCancel = Wt;
|
|
1675
|
+
A.VERSION = Zt;
|
|
1676
|
+
A.toFormData = ve;
|
|
1677
|
+
A.AxiosError = v;
|
|
1678
|
+
A.Cancel = A.CanceledError;
|
|
1679
|
+
A.all = function(t) {
|
|
1680
|
+
return Promise.all(t);
|
|
1681
|
+
};
|
|
1682
|
+
A.spread = Vr;
|
|
1683
|
+
A.isAxiosError = Gr;
|
|
1684
|
+
A.mergeConfig = J;
|
|
1685
|
+
A.AxiosHeaders = N;
|
|
1686
|
+
A.formToJSON = (e) => $t(d.isHTMLForm(e) ? new FormData(e) : e);
|
|
1687
|
+
A.getAdapter = Xt.getAdapter;
|
|
1688
|
+
A.HttpStatusCode = Me;
|
|
1689
|
+
A.default = A;
|
|
1690
|
+
const {
|
|
1691
|
+
Axios: Ho,
|
|
1692
|
+
AxiosError: Mo,
|
|
1693
|
+
CanceledError: jo,
|
|
1694
|
+
isCancel: $o,
|
|
1695
|
+
CancelToken: Wo,
|
|
1696
|
+
VERSION: qo,
|
|
1697
|
+
all: Jo,
|
|
1698
|
+
Cancel: Vo,
|
|
1699
|
+
isAxiosError: Go,
|
|
1700
|
+
spread: Ko,
|
|
1701
|
+
toFormData: Xo,
|
|
1702
|
+
AxiosHeaders: Zo,
|
|
1703
|
+
HttpStatusCode: Qo,
|
|
1704
|
+
formToJSON: Yo,
|
|
1705
|
+
getAdapter: ei,
|
|
1706
|
+
mergeConfig: ti
|
|
1707
|
+
} = A;
|
|
1708
|
+
var le, R, en, $, mt, tn, nn, rn, Xe, je, $e, oe = {}, on = [], Kr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ke = Array.isArray;
|
|
1709
|
+
function z(e, t) {
|
|
1710
|
+
for (var n in t) e[n] = t[n];
|
|
1711
|
+
return e;
|
|
1712
|
+
}
|
|
1713
|
+
function Ze(e) {
|
|
1714
|
+
e && e.parentNode && e.parentNode.removeChild(e);
|
|
1715
|
+
}
|
|
1716
|
+
function G(e, t, n) {
|
|
1717
|
+
var r, o, i, s = {};
|
|
1718
|
+
for (i in t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : s[i] = t[i];
|
|
1719
|
+
if (arguments.length > 2 && (s.children = arguments.length > 3 ? le.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (i in e.defaultProps) s[i] === void 0 && (s[i] = e.defaultProps[i]);
|
|
1720
|
+
return ne(e, s, r, o, null);
|
|
1721
|
+
}
|
|
1722
|
+
function ne(e, t, n, r, o) {
|
|
1723
|
+
var i = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++en, __i: -1, __u: 0 };
|
|
1724
|
+
return o == null && R.vnode != null && R.vnode(i), i;
|
|
1725
|
+
}
|
|
1726
|
+
function Q(e) {
|
|
1727
|
+
return e.children;
|
|
1728
|
+
}
|
|
1729
|
+
function pe(e, t) {
|
|
1730
|
+
this.props = e, this.context = t;
|
|
1731
|
+
}
|
|
1732
|
+
function K(e, t) {
|
|
1733
|
+
if (t == null) return e.__ ? K(e.__, e.__i + 1) : null;
|
|
1734
|
+
for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
|
|
1735
|
+
return typeof e.type == "function" ? K(e) : null;
|
|
1736
|
+
}
|
|
1737
|
+
function sn(e) {
|
|
1738
|
+
var t, n;
|
|
1739
|
+
if ((e = e.__) != null && e.__c != null) {
|
|
1740
|
+
for (e.__e = e.__c.base = null, t = 0; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) {
|
|
1741
|
+
e.__e = e.__c.base = n.__e;
|
|
1742
|
+
break;
|
|
1743
|
+
}
|
|
1744
|
+
return sn(e);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
function _t(e) {
|
|
1748
|
+
(!e.__d && (e.__d = !0) && $.push(e) && !ge.__r++ || mt != R.debounceRendering) && ((mt = R.debounceRendering) || tn)(ge);
|
|
1749
|
+
}
|
|
1750
|
+
function ge() {
|
|
1751
|
+
for (var e, t, n, r, o, i, s, a = 1; $.length; ) $.length > a && $.sort(nn), e = $.shift(), a = $.length, e.__d && (n = void 0, o = (r = (t = e).__v).__e, i = [], s = [], t.__P && ((n = z({}, r)).__v = r.__v + 1, R.vnode && R.vnode(n), Qe(t.__P, n, r, t.__n, t.__P.namespaceURI, 32 & r.__u ? [o] : null, i, o ?? K(r), !!(32 & r.__u), s), n.__v = r.__v, n.__.__k[n.__i] = n, cn(i, n, s), n.__e != o && sn(n)));
|
|
1752
|
+
ge.__r = 0;
|
|
1753
|
+
}
|
|
1754
|
+
function an(e, t, n, r, o, i, s, a, l, u, f) {
|
|
1755
|
+
var c, _, b, g, x, p, h = r && r.__k || on, y = t.length;
|
|
1756
|
+
for (l = Xr(n, t, h, l, y), c = 0; c < y; c++) (b = n.__k[c]) != null && (_ = b.__i == -1 ? oe : h[b.__i] || oe, b.__i = c, p = Qe(e, b, _, o, i, s, a, l, u, f), g = b.__e, b.ref && _.ref != b.ref && (_.ref && Ye(_.ref, null, b), f.push(b.ref, b.__c || g, b)), x == null && g != null && (x = g), 4 & b.__u || _.__k === b.__k ? l = ln(b, l, e) : typeof b.type == "function" && p !== void 0 ? l = p : g && (l = g.nextSibling), b.__u &= -7);
|
|
1757
|
+
return n.__e = x, l;
|
|
1758
|
+
}
|
|
1759
|
+
function Xr(e, t, n, r, o) {
|
|
1760
|
+
var i, s, a, l, u, f = n.length, c = f, _ = 0;
|
|
1761
|
+
for (e.__k = new Array(o), i = 0; i < o; i++) (s = t[i]) != null && typeof s != "boolean" && typeof s != "function" ? (l = i + _, (s = e.__k[i] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? ne(null, s, null, null, null) : ke(s) ? ne(Q, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? ne(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = e, s.__b = e.__b + 1, a = null, (u = s.__i = Zr(s, n, l, c)) != -1 && (c--, (a = n[u]) && (a.__u |= 2)), a == null || a.__v == null ? (u == -1 && (o > f ? _-- : o < f && _++), typeof s.type != "function" && (s.__u |= 4)) : u != l && (u == l - 1 ? _-- : u == l + 1 ? _++ : (u > l ? _-- : _++, s.__u |= 4))) : e.__k[i] = null;
|
|
1762
|
+
if (c) for (i = 0; i < f; i++) (a = n[i]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = K(a)), fn(a, a));
|
|
1763
|
+
return r;
|
|
1764
|
+
}
|
|
1765
|
+
function ln(e, t, n) {
|
|
1766
|
+
var r, o;
|
|
1767
|
+
if (typeof e.type == "function") {
|
|
1768
|
+
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = ln(r[o], t, n));
|
|
1769
|
+
return t;
|
|
1770
|
+
}
|
|
1771
|
+
e.__e != t && (t && e.type && !n.contains(t) && (t = K(e)), n.insertBefore(e.__e, t || null), t = e.__e);
|
|
1772
|
+
do
|
|
1773
|
+
t = t && t.nextSibling;
|
|
1774
|
+
while (t != null && t.nodeType == 8);
|
|
1775
|
+
return t;
|
|
1776
|
+
}
|
|
1777
|
+
function Zr(e, t, n, r) {
|
|
1778
|
+
var o, i, s = e.key, a = e.type, l = t[n];
|
|
1779
|
+
if (l === null && e.key == null || l && s == l.key && a == l.type && (2 & l.__u) == 0) return n;
|
|
1780
|
+
if (r > (l != null && (2 & l.__u) == 0 ? 1 : 0)) for (o = n - 1, i = n + 1; o >= 0 || i < t.length; ) {
|
|
1781
|
+
if (o >= 0) {
|
|
1782
|
+
if ((l = t[o]) && (2 & l.__u) == 0 && s == l.key && a == l.type) return o;
|
|
1783
|
+
o--;
|
|
1784
|
+
}
|
|
1785
|
+
if (i < t.length) {
|
|
1786
|
+
if ((l = t[i]) && (2 & l.__u) == 0 && s == l.key && a == l.type) return i;
|
|
1787
|
+
i++;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return -1;
|
|
1791
|
+
}
|
|
1792
|
+
function gt(e, t, n) {
|
|
1793
|
+
t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || Kr.test(t) ? n : n + "px";
|
|
1794
|
+
}
|
|
1795
|
+
function ce(e, t, n, r, o) {
|
|
1796
|
+
var i, s;
|
|
1797
|
+
e: if (t == "style") if (typeof n == "string") e.style.cssText = n;
|
|
1798
|
+
else {
|
|
1799
|
+
if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || gt(e.style, t, "");
|
|
1800
|
+
if (n) for (t in n) r && n[t] == r[t] || gt(e.style, t, n[t]);
|
|
1801
|
+
}
|
|
1802
|
+
else if (t[0] == "o" && t[1] == "n") i = t != (t = t.replace(rn, "$1")), s = t.toLowerCase(), t = s in e || t == "onFocusOut" || t == "onFocusIn" ? s.slice(2) : t.slice(2), e.l || (e.l = {}), e.l[t + i] = n, n ? r ? n.u = r.u : (n.u = Xe, e.addEventListener(t, i ? $e : je, i)) : e.removeEventListener(t, i ? $e : je, i);
|
|
1803
|
+
else {
|
|
1804
|
+
if (o == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
1805
|
+
else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
|
|
1806
|
+
e[t] = n ?? "";
|
|
1807
|
+
break e;
|
|
1808
|
+
} catch {
|
|
1809
|
+
}
|
|
1810
|
+
typeof n == "function" || (n == null || n === !1 && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
function bt(e) {
|
|
1814
|
+
return function(t) {
|
|
1815
|
+
if (this.l) {
|
|
1816
|
+
var n = this.l[t.type + e];
|
|
1817
|
+
if (t.t == null) t.t = Xe++;
|
|
1818
|
+
else if (t.t < n.u) return;
|
|
1819
|
+
return n(R.event ? R.event(t) : t);
|
|
1820
|
+
}
|
|
1821
|
+
};
|
|
1822
|
+
}
|
|
1823
|
+
function Qe(e, t, n, r, o, i, s, a, l, u) {
|
|
1824
|
+
var f, c, _, b, g, x, p, h, y, w, E, T, k, I, M, j, Fe, U = t.type;
|
|
1825
|
+
if (t.constructor != null) return null;
|
|
1826
|
+
128 & n.__u && (l = !!(32 & n.__u), i = [a = t.__e = n.__e]), (f = R.__b) && f(t);
|
|
1827
|
+
e: if (typeof U == "function") try {
|
|
1828
|
+
if (h = t.props, y = "prototype" in U && U.prototype.render, w = (f = U.contextType) && r[f.__c], E = f ? w ? w.props.value : f.__ : r, n.__c ? p = (c = t.__c = n.__c).__ = c.__E : (y ? t.__c = c = new U(h, E) : (t.__c = c = new pe(h, E), c.constructor = U, c.render = Yr), w && w.sub(c), c.props = h, c.state || (c.state = {}), c.context = E, c.__n = r, _ = c.__d = !0, c.__h = [], c._sb = []), y && c.__s == null && (c.__s = c.state), y && U.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = z({}, c.__s)), z(c.__s, U.getDerivedStateFromProps(h, c.__s))), b = c.props, g = c.state, c.__v = t, _) y && U.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), y && c.componentDidMount != null && c.__h.push(c.componentDidMount);
|
|
1829
|
+
else {
|
|
1830
|
+
if (y && U.getDerivedStateFromProps == null && h !== b && c.componentWillReceiveProps != null && c.componentWillReceiveProps(h, E), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(h, c.__s, E) === !1 || t.__v == n.__v) {
|
|
1831
|
+
for (t.__v != n.__v && (c.props = h, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(ee) {
|
|
1832
|
+
ee && (ee.__ = t);
|
|
1833
|
+
}), T = 0; T < c._sb.length; T++) c.__h.push(c._sb[T]);
|
|
1834
|
+
c._sb = [], c.__h.length && s.push(c);
|
|
1835
|
+
break e;
|
|
1836
|
+
}
|
|
1837
|
+
c.componentWillUpdate != null && c.componentWillUpdate(h, c.__s, E), y && c.componentDidUpdate != null && c.__h.push(function() {
|
|
1838
|
+
c.componentDidUpdate(b, g, x);
|
|
1839
|
+
});
|
|
1840
|
+
}
|
|
1841
|
+
if (c.context = E, c.props = h, c.__P = e, c.__e = !1, k = R.__r, I = 0, y) {
|
|
1842
|
+
for (c.state = c.__s, c.__d = !1, k && k(t), f = c.render(c.props, c.state, c.context), M = 0; M < c._sb.length; M++) c.__h.push(c._sb[M]);
|
|
1843
|
+
c._sb = [];
|
|
1844
|
+
} else do
|
|
1845
|
+
c.__d = !1, k && k(t), f = c.render(c.props, c.state, c.context), c.state = c.__s;
|
|
1846
|
+
while (c.__d && ++I < 25);
|
|
1847
|
+
c.state = c.__s, c.getChildContext != null && (r = z(z({}, r), c.getChildContext())), y && !_ && c.getSnapshotBeforeUpdate != null && (x = c.getSnapshotBeforeUpdate(b, g)), j = f, f != null && f.type === Q && f.key == null && (j = un(f.props.children)), a = an(e, ke(j) ? j : [j], t, n, r, o, i, s, a, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), p && (c.__E = c.__ = null);
|
|
1848
|
+
} catch (ee) {
|
|
1849
|
+
if (t.__v = null, l || i != null) if (ee.then) {
|
|
1850
|
+
for (t.__u |= l ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
|
|
1851
|
+
i[i.indexOf(a)] = null, t.__e = a;
|
|
1852
|
+
} else for (Fe = i.length; Fe--; ) Ze(i[Fe]);
|
|
1853
|
+
else t.__e = n.__e, t.__k = n.__k;
|
|
1854
|
+
R.__e(ee, t, n);
|
|
1855
|
+
}
|
|
1856
|
+
else i == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : a = t.__e = Qr(n.__e, t, n, r, o, i, s, l, u);
|
|
1857
|
+
return (f = R.diffed) && f(t), 128 & t.__u ? void 0 : a;
|
|
1858
|
+
}
|
|
1859
|
+
function cn(e, t, n) {
|
|
1860
|
+
for (var r = 0; r < n.length; r++) Ye(n[r], n[++r], n[++r]);
|
|
1861
|
+
R.__c && R.__c(t, e), e.some(function(o) {
|
|
1862
|
+
try {
|
|
1863
|
+
e = o.__h, o.__h = [], e.some(function(i) {
|
|
1864
|
+
i.call(o);
|
|
1865
|
+
});
|
|
1866
|
+
} catch (i) {
|
|
1867
|
+
R.__e(i, o.__v);
|
|
1868
|
+
}
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
function un(e) {
|
|
1872
|
+
return typeof e != "object" || e == null || e.__b && e.__b > 0 ? e : ke(e) ? e.map(un) : z({}, e);
|
|
1873
|
+
}
|
|
1874
|
+
function Qr(e, t, n, r, o, i, s, a, l) {
|
|
1875
|
+
var u, f, c, _, b, g, x, p = n.props, h = t.props, y = t.type;
|
|
1876
|
+
if (y == "svg" ? o = "http://www.w3.org/2000/svg" : y == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), i != null) {
|
|
1877
|
+
for (u = 0; u < i.length; u++) if ((b = i[u]) && "setAttribute" in b == !!y && (y ? b.localName == y : b.nodeType == 3)) {
|
|
1878
|
+
e = b, i[u] = null;
|
|
1879
|
+
break;
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
if (e == null) {
|
|
1883
|
+
if (y == null) return document.createTextNode(h);
|
|
1884
|
+
e = document.createElementNS(o, y, h.is && h), a && (R.__m && R.__m(t, i), a = !1), i = null;
|
|
1885
|
+
}
|
|
1886
|
+
if (y == null) p === h || a && e.data == h || (e.data = h);
|
|
1887
|
+
else {
|
|
1888
|
+
if (i = i && le.call(e.childNodes), p = n.props || oe, !a && i != null) for (p = {}, u = 0; u < e.attributes.length; u++) p[(b = e.attributes[u]).name] = b.value;
|
|
1889
|
+
for (u in p) if (b = p[u], u != "children") {
|
|
1890
|
+
if (u == "dangerouslySetInnerHTML") c = b;
|
|
1891
|
+
else if (!(u in h)) {
|
|
1892
|
+
if (u == "value" && "defaultValue" in h || u == "checked" && "defaultChecked" in h) continue;
|
|
1893
|
+
ce(e, u, null, b, o);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
for (u in h) b = h[u], u == "children" ? _ = b : u == "dangerouslySetInnerHTML" ? f = b : u == "value" ? g = b : u == "checked" ? x = b : a && typeof b != "function" || p[u] === b || ce(e, u, b, p[u], o);
|
|
1897
|
+
if (f) a || c && (f.__html == c.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
|
|
1898
|
+
else if (c && (e.innerHTML = ""), an(t.type == "template" ? e.content : e, ke(_) ? _ : [_], t, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, i, s, i ? i[0] : n.__k && K(n, 0), a, l), i != null) for (u = i.length; u--; ) Ze(i[u]);
|
|
1899
|
+
a || (u = "value", y == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[u] || y == "progress" && !g || y == "option" && g != p[u]) && ce(e, u, g, p[u], o), u = "checked", x != null && x != e[u] && ce(e, u, x, p[u], o));
|
|
1900
|
+
}
|
|
1901
|
+
return e;
|
|
1902
|
+
}
|
|
1903
|
+
function Ye(e, t, n) {
|
|
1904
|
+
try {
|
|
1905
|
+
if (typeof e == "function") {
|
|
1906
|
+
var r = typeof e.__u == "function";
|
|
1907
|
+
r && e.__u(), r && t == null || (e.__u = e(t));
|
|
1908
|
+
} else e.current = t;
|
|
1909
|
+
} catch (o) {
|
|
1910
|
+
R.__e(o, n);
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
function fn(e, t, n) {
|
|
1914
|
+
var r, o;
|
|
1915
|
+
if (R.unmount && R.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || Ye(r, null, t)), (r = e.__c) != null) {
|
|
1916
|
+
if (r.componentWillUnmount) try {
|
|
1917
|
+
r.componentWillUnmount();
|
|
1918
|
+
} catch (i) {
|
|
1919
|
+
R.__e(i, t);
|
|
1920
|
+
}
|
|
1921
|
+
r.base = r.__P = null;
|
|
1922
|
+
}
|
|
1923
|
+
if (r = e.__k) for (o = 0; o < r.length; o++) r[o] && fn(r[o], t, n || typeof e.type != "function");
|
|
1924
|
+
n || Ze(e.__e), e.__c = e.__ = e.__e = void 0;
|
|
1925
|
+
}
|
|
1926
|
+
function Yr(e, t, n) {
|
|
1927
|
+
return this.constructor(e, n);
|
|
1928
|
+
}
|
|
1929
|
+
function Ce(e, t, n) {
|
|
1930
|
+
var r, o, i, s;
|
|
1931
|
+
t == document && (t = document.documentElement), R.__ && R.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], Qe(t, e = (!r && n || t).__k = G(Q, null, [e]), o || oe, oe, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? le.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), cn(i, e, s);
|
|
1932
|
+
}
|
|
1933
|
+
function dn(e, t) {
|
|
1934
|
+
Ce(e, t, dn);
|
|
1935
|
+
}
|
|
1936
|
+
function pn(e, t, n) {
|
|
1937
|
+
var r, o, i, s, a = z({}, e.props);
|
|
1938
|
+
for (i in e.type && e.type.defaultProps && (s = e.type.defaultProps), t) i == "key" ? r = t[i] : i == "ref" ? o = t[i] : a[i] = t[i] === void 0 && s != null ? s[i] : t[i];
|
|
1939
|
+
return arguments.length > 2 && (a.children = arguments.length > 3 ? le.call(arguments, 2) : n), ne(e.type, a, r || e.key, o || e.ref, null);
|
|
1940
|
+
}
|
|
1941
|
+
le = on.slice, R = { __e: function(e, t, n, r) {
|
|
1942
|
+
for (var o, i, s; t = t.__; ) if ((o = t.__c) && !o.__) try {
|
|
1943
|
+
if ((i = o.constructor) && i.getDerivedStateFromError != null && (o.setState(i.getDerivedStateFromError(e)), s = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), s = o.__d), s) return o.__E = o;
|
|
1944
|
+
} catch (a) {
|
|
1945
|
+
e = a;
|
|
1946
|
+
}
|
|
1947
|
+
throw e;
|
|
1948
|
+
} }, en = 0, pe.prototype.setState = function(e, t) {
|
|
1949
|
+
var n;
|
|
1950
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = z({}, this.state), typeof e == "function" && (e = e(z({}, n), this.props)), e && z(n, e), e != null && this.__v && (t && this._sb.push(t), _t(this));
|
|
1951
|
+
}, pe.prototype.forceUpdate = function(e) {
|
|
1952
|
+
this.__v && (this.__e = !0, e && this.__h.push(e), _t(this));
|
|
1953
|
+
}, pe.prototype.render = Q, $ = [], tn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, nn = function(e, t) {
|
|
1954
|
+
return e.__v.__b - t.__v.__b;
|
|
1955
|
+
}, ge.__r = 0, rn = /(PointerCapture)$|Capture$/i, Xe = 0, je = bt(!1), $e = bt(!0);
|
|
1956
|
+
var eo = 0;
|
|
1957
|
+
function m(e, t, n, r, o, i) {
|
|
1958
|
+
t || (t = {});
|
|
1959
|
+
var s, a, l = t;
|
|
1960
|
+
if ("ref" in l) for (a in l = {}, t) a == "ref" ? s = t[a] : l[a] = t[a];
|
|
1961
|
+
var u = { type: e, props: l, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --eo, __i: -1, __u: 0, __source: o, __self: i };
|
|
1962
|
+
if (typeof e == "function" && (s = e.defaultProps)) for (a in s) l[a] === void 0 && (l[a] = s[a]);
|
|
1963
|
+
return R.vnode && R.vnode(u), u;
|
|
1964
|
+
}
|
|
1965
|
+
var ie, C, Ie, yt, be = 0, hn = [], O = R, wt = O.__b, xt = O.__r, Et = O.diffed, St = O.__c, vt = O.unmount, Tt = O.__;
|
|
1966
|
+
function et(e, t) {
|
|
1967
|
+
O.__h && O.__h(C, e, be || t), be = 0;
|
|
1968
|
+
var n = C.__H || (C.__H = { __: [], __h: [] });
|
|
1969
|
+
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
1970
|
+
}
|
|
1971
|
+
function P(e) {
|
|
1972
|
+
return be = 1, to(_n, e);
|
|
1973
|
+
}
|
|
1974
|
+
function to(e, t, n) {
|
|
1975
|
+
var r = et(ie++, 2);
|
|
1976
|
+
if (r.t = e, !r.__c && (r.__ = [_n(void 0, t), function(a) {
|
|
1977
|
+
var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, a);
|
|
1978
|
+
l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
1979
|
+
}], r.__c = C, !C.__f)) {
|
|
1980
|
+
var o = function(a, l, u) {
|
|
1981
|
+
if (!r.__c.__H) return !0;
|
|
1982
|
+
var f = r.__c.__H.__.filter(function(_) {
|
|
1983
|
+
return !!_.__c;
|
|
1984
|
+
});
|
|
1985
|
+
if (f.every(function(_) {
|
|
1986
|
+
return !_.__N;
|
|
1987
|
+
})) return !i || i.call(this, a, l, u);
|
|
1988
|
+
var c = r.__c.props !== a;
|
|
1989
|
+
return f.forEach(function(_) {
|
|
1990
|
+
if (_.__N) {
|
|
1991
|
+
var b = _.__[0];
|
|
1992
|
+
_.__ = _.__N, _.__N = void 0, b !== _.__[0] && (c = !0);
|
|
1993
|
+
}
|
|
1994
|
+
}), i && i.call(this, a, l, u) || c;
|
|
1995
|
+
};
|
|
1996
|
+
C.__f = !0;
|
|
1997
|
+
var i = C.shouldComponentUpdate, s = C.componentWillUpdate;
|
|
1998
|
+
C.componentWillUpdate = function(a, l, u) {
|
|
1999
|
+
if (this.__e) {
|
|
2000
|
+
var f = i;
|
|
2001
|
+
i = void 0, o(a, l, u), i = f;
|
|
2002
|
+
}
|
|
2003
|
+
s && s.call(this, a, l, u);
|
|
2004
|
+
}, C.shouldComponentUpdate = o;
|
|
2005
|
+
}
|
|
2006
|
+
return r.__N || r.__;
|
|
2007
|
+
}
|
|
2008
|
+
function Ae(e, t) {
|
|
2009
|
+
var n = et(ie++, 3);
|
|
2010
|
+
!O.__s && mn(n.__H, t) && (n.__ = e, n.u = t, C.__H.__h.push(n));
|
|
2011
|
+
}
|
|
2012
|
+
function ye(e) {
|
|
2013
|
+
return be = 5, no(function() {
|
|
2014
|
+
return { current: e };
|
|
2015
|
+
}, []);
|
|
2016
|
+
}
|
|
2017
|
+
function no(e, t) {
|
|
2018
|
+
var n = et(ie++, 7);
|
|
2019
|
+
return mn(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
2020
|
+
}
|
|
2021
|
+
function ro() {
|
|
2022
|
+
for (var e; e = hn.shift(); ) if (e.__P && e.__H) try {
|
|
2023
|
+
e.__H.__h.forEach(he), e.__H.__h.forEach(We), e.__H.__h = [];
|
|
2024
|
+
} catch (t) {
|
|
2025
|
+
e.__H.__h = [], O.__e(t, e.__v);
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
O.__b = function(e) {
|
|
2029
|
+
C = null, wt && wt(e);
|
|
2030
|
+
}, O.__ = function(e, t) {
|
|
2031
|
+
e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Tt && Tt(e, t);
|
|
2032
|
+
}, O.__r = function(e) {
|
|
2033
|
+
xt && xt(e), ie = 0;
|
|
2034
|
+
var t = (C = e.__c).__H;
|
|
2035
|
+
t && (Ie === C ? (t.__h = [], C.__h = [], t.__.forEach(function(n) {
|
|
2036
|
+
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
2037
|
+
})) : (t.__h.forEach(he), t.__h.forEach(We), t.__h = [], ie = 0)), Ie = C;
|
|
2038
|
+
}, O.diffed = function(e) {
|
|
2039
|
+
Et && Et(e);
|
|
2040
|
+
var t = e.__c;
|
|
2041
|
+
t && t.__H && (t.__H.__h.length && (hn.push(t) !== 1 && yt === O.requestAnimationFrame || ((yt = O.requestAnimationFrame) || oo)(ro)), t.__H.__.forEach(function(n) {
|
|
2042
|
+
n.u && (n.__H = n.u), n.u = void 0;
|
|
2043
|
+
})), Ie = C = null;
|
|
2044
|
+
}, O.__c = function(e, t) {
|
|
2045
|
+
t.some(function(n) {
|
|
2046
|
+
try {
|
|
2047
|
+
n.__h.forEach(he), n.__h = n.__h.filter(function(r) {
|
|
2048
|
+
return !r.__ || We(r);
|
|
2049
|
+
});
|
|
2050
|
+
} catch (r) {
|
|
2051
|
+
t.some(function(o) {
|
|
2052
|
+
o.__h && (o.__h = []);
|
|
2053
|
+
}), t = [], O.__e(r, n.__v);
|
|
2054
|
+
}
|
|
2055
|
+
}), St && St(e, t);
|
|
2056
|
+
}, O.unmount = function(e) {
|
|
2057
|
+
vt && vt(e);
|
|
2058
|
+
var t, n = e.__c;
|
|
2059
|
+
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
2060
|
+
try {
|
|
2061
|
+
he(r);
|
|
2062
|
+
} catch (o) {
|
|
2063
|
+
t = o;
|
|
2064
|
+
}
|
|
2065
|
+
}), n.__H = void 0, t && O.__e(t, n.__v));
|
|
2066
|
+
};
|
|
2067
|
+
var Rt = typeof requestAnimationFrame == "function";
|
|
2068
|
+
function oo(e) {
|
|
2069
|
+
var t, n = function() {
|
|
2070
|
+
clearTimeout(r), Rt && cancelAnimationFrame(t), setTimeout(e);
|
|
2071
|
+
}, r = setTimeout(n, 35);
|
|
2072
|
+
Rt && (t = requestAnimationFrame(n));
|
|
2073
|
+
}
|
|
2074
|
+
function he(e) {
|
|
2075
|
+
var t = C, n = e.__c;
|
|
2076
|
+
typeof n == "function" && (e.__c = void 0, n()), C = t;
|
|
2077
|
+
}
|
|
2078
|
+
function We(e) {
|
|
2079
|
+
var t = C;
|
|
2080
|
+
e.__c = e.__(), C = t;
|
|
2081
|
+
}
|
|
2082
|
+
function mn(e, t) {
|
|
2083
|
+
return !e || e.length !== t.length || t.some(function(n, r) {
|
|
2084
|
+
return n !== e[r];
|
|
2085
|
+
});
|
|
2086
|
+
}
|
|
2087
|
+
function _n(e, t) {
|
|
2088
|
+
return typeof t == "function" ? t(e) : t;
|
|
2089
|
+
}
|
|
2090
|
+
class io {
|
|
2091
|
+
parseArg(t) {
|
|
2092
|
+
return typeof t == "string" ? { content: t } : t;
|
|
2093
|
+
}
|
|
2094
|
+
show(t, n) {
|
|
2095
|
+
const { content: r, duration: o, closable: i } = this.parseArg(n), s = document.createElement("div");
|
|
2096
|
+
if (s.style.cssText = `
|
|
2097
|
+
position: fixed;
|
|
2098
|
+
top: 20px;
|
|
2099
|
+
left: 50%;
|
|
2100
|
+
transform: translateX(-50%);
|
|
2101
|
+
z-index: 9999;
|
|
2102
|
+
background: #fff;
|
|
2103
|
+
border: 1px solid #fff;
|
|
2104
|
+
border-radius: 12px;
|
|
2105
|
+
padding: 8px 16px;
|
|
2106
|
+
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
|
|
2107
|
+
min-width: ${r.length < 20 ? "auto" : "300px"};
|
|
2108
|
+
max-width: 500px;
|
|
2109
|
+
display: flex;
|
|
2110
|
+
align-items: center;
|
|
2111
|
+
gap: 8px;
|
|
2112
|
+
font-size: 14px;
|
|
2113
|
+
color: #222;
|
|
2114
|
+
`, t === "error") {
|
|
2115
|
+
const l = document.createElementNS(
|
|
2116
|
+
"http://www.w3.org/2000/svg",
|
|
2117
|
+
"svg"
|
|
2118
|
+
);
|
|
2119
|
+
l.setAttribute("width", "16"), l.setAttribute("height", "16"), l.setAttribute("viewBox", "0 0 16 16"), l.innerHTML = `
|
|
2120
|
+
<circle cx="8" cy="8" r="8" fill="#ff4d4f"/>
|
|
2121
|
+
<path d="M10.5 5.5l-5 5m0-5l5 5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
2122
|
+
`, s.appendChild(l);
|
|
2123
|
+
}
|
|
2124
|
+
if (t === "success") {
|
|
2125
|
+
const l = document.createElementNS(
|
|
2126
|
+
"http://www.w3.org/2000/svg",
|
|
2127
|
+
"svg"
|
|
2128
|
+
);
|
|
2129
|
+
l.setAttribute("width", "16"), l.setAttribute("height", "16"), l.setAttribute("viewBox", "0 0 16 16"), l.innerHTML = `
|
|
2130
|
+
<circle cx="8" cy="8" r="8" fill="#52c41a"/>
|
|
2131
|
+
<path d="M5 8.5l2.2 2.2 3.8-3.4" stroke="white" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
2132
|
+
`, s.appendChild(l);
|
|
2133
|
+
}
|
|
2134
|
+
if (t === "warning") {
|
|
2135
|
+
const l = document.createElementNS(
|
|
2136
|
+
"http://www.w3.org/2000/svg",
|
|
2137
|
+
"svg"
|
|
2138
|
+
);
|
|
2139
|
+
l.setAttribute("width", "16"), l.setAttribute("height", "16"), l.setAttribute("viewBox", "0 0 16 16"), l.innerHTML = `
|
|
2140
|
+
<circle cx="8" cy="8" r="8" fill="#faad14"/>
|
|
2141
|
+
<path d="M8 4.5v5" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
|
2142
|
+
<circle cx="8" cy="12.5" r="1" fill="white"/>
|
|
2143
|
+
`, s.appendChild(l);
|
|
2144
|
+
}
|
|
2145
|
+
if (t === "info") {
|
|
2146
|
+
const l = document.createElementNS(
|
|
2147
|
+
"http://www.w3.org/2000/svg",
|
|
2148
|
+
"svg"
|
|
2149
|
+
);
|
|
2150
|
+
l.setAttribute("width", "16"), l.setAttribute("height", "16"), l.setAttribute("viewBox", "0 0 16 16"), l.innerHTML = `
|
|
2151
|
+
<circle cx="8" cy="8" r="8" fill="#1677ff"/>
|
|
2152
|
+
<rect x="7.25" y="7" width="1.5" height="6" rx="0.75" fill="white"/>
|
|
2153
|
+
<rect x="7.25" y="5" width="1.5" height="1.5" rx="0.75" fill="white"/>
|
|
2154
|
+
`, s.appendChild(l);
|
|
2155
|
+
}
|
|
2156
|
+
const a = document.createElement("div");
|
|
2157
|
+
if (a.textContent = r, a.style.flex = "1", s.appendChild(a), i) {
|
|
2158
|
+
const l = document.createElement("button");
|
|
2159
|
+
l.textContent = "✕", l.style.cssText = `
|
|
2160
|
+
background: none;
|
|
2161
|
+
border: none;
|
|
2162
|
+
cursor: pointer;
|
|
2163
|
+
padding: 4px;
|
|
2164
|
+
color: #999;
|
|
2165
|
+
font-size: 12px;
|
|
2166
|
+
`, l.onclick = () => {
|
|
2167
|
+
document.body.removeChild(s);
|
|
2168
|
+
}, s.appendChild(l);
|
|
2169
|
+
}
|
|
2170
|
+
document.body.appendChild(s), o !== 0 && setTimeout(() => {
|
|
2171
|
+
document.body.contains(s) && document.body.removeChild(s);
|
|
2172
|
+
}, o || 3e3);
|
|
2173
|
+
}
|
|
2174
|
+
success(t) {
|
|
2175
|
+
this.show("success", t);
|
|
2176
|
+
}
|
|
2177
|
+
error(t) {
|
|
2178
|
+
this.show("error", t);
|
|
2179
|
+
}
|
|
2180
|
+
warning(t) {
|
|
2181
|
+
this.show("warning", t);
|
|
2182
|
+
}
|
|
2183
|
+
info(t) {
|
|
2184
|
+
this.show("info", t);
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
const qe = new io();
|
|
2188
|
+
var Oe = /* @__PURE__ */ ((e) => (e.ZH = "zh", e.EN = "en", e))(Oe || {}), H = /* @__PURE__ */ ((e) => (e.WHITE = "white", e.DARK = "dark", e))(H || {}), V = /* @__PURE__ */ ((e) => (e.DEV = "dev", e.DEVELOPMENT = "development", e.TEST = "test", e.PROD = "prod", e.PRODUCTION = "production", e))(V || {});
|
|
2189
|
+
function so(e = {}) {
|
|
2190
|
+
const t = JSON.parse(
|
|
2191
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2192
|
+
), { env: n } = t;
|
|
2193
|
+
let r;
|
|
2194
|
+
switch (n) {
|
|
2195
|
+
case V.PROD:
|
|
2196
|
+
case V.PRODUCTION:
|
|
2197
|
+
r = "https://fund.bestfulfill.com/api/sdk";
|
|
2198
|
+
break;
|
|
2199
|
+
case V.TEST:
|
|
2200
|
+
r = "https://fund.bestfulfill.tech/api/sdk";
|
|
2201
|
+
break;
|
|
2202
|
+
case V.DEV:
|
|
2203
|
+
case V.DEVELOPMENT:
|
|
2204
|
+
default:
|
|
2205
|
+
r = "/api";
|
|
2206
|
+
break;
|
|
2207
|
+
}
|
|
2208
|
+
const { baseURL: o = r, timeout: i = 1e4, onError: s } = e, a = A.create({ baseURL: o, timeout: i });
|
|
2209
|
+
return a.interceptors.request.use((l) => {
|
|
2210
|
+
const { token: u, locale: f } = t;
|
|
2211
|
+
return l.headers = {
|
|
2212
|
+
...l.headers,
|
|
2213
|
+
Authorization: u,
|
|
2214
|
+
"x-locale": f === Oe.ZH ? "zh-CN" : "en-US"
|
|
2215
|
+
}, l;
|
|
2216
|
+
}), a.interceptors.response.use(
|
|
2217
|
+
(l) => {
|
|
2218
|
+
if (l.data && l.data.code === 0)
|
|
2219
|
+
return l.data;
|
|
2220
|
+
const u = l.data?.msg || l.data?.message || "未知错误";
|
|
2221
|
+
return qe.error(u), s && s(u, l), Promise.reject(l.data || { message: "未知错误" });
|
|
2222
|
+
},
|
|
2223
|
+
(l) => {
|
|
2224
|
+
const u = l.response?.data?.msg || l.response?.data?.message || l.message || "网络请求失败";
|
|
2225
|
+
return qe.error(u), s && s(u, l), Promise.reject(l);
|
|
2226
|
+
}
|
|
2227
|
+
), a;
|
|
2228
|
+
}
|
|
2229
|
+
const Y = so();
|
|
2230
|
+
function ao() {
|
|
2231
|
+
const e = JSON.parse(
|
|
2232
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2233
|
+
);
|
|
2234
|
+
return Y.get("/balance", {
|
|
2235
|
+
params: {
|
|
2236
|
+
merchant_id: e.merchantId,
|
|
2237
|
+
biz_type: e.bizType,
|
|
2238
|
+
fund_balance_id: e.fundBalanceId
|
|
2239
|
+
}
|
|
2240
|
+
}).then((t) => {
|
|
2241
|
+
const n = t.data;
|
|
2242
|
+
return {
|
|
2243
|
+
totalAmount: n.total_amount || 0,
|
|
2244
|
+
availableAmount: n.available_amount || 0,
|
|
2245
|
+
frozenAmount: n.frozen_amount || 0
|
|
2246
|
+
};
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
const lo = async () => Y.get("/all-dicts", {}).then((e) => (sessionStorage.setItem("all_dicts", JSON.stringify(e.data)), e.data || {})), co = async (e, t) => Y.post("/oss/upload", e, {
|
|
2250
|
+
headers: {
|
|
2251
|
+
"Content-Type": "multipart/form-data"
|
|
2252
|
+
},
|
|
2253
|
+
onUploadProgress: (n) => {
|
|
2254
|
+
if (n.total) {
|
|
2255
|
+
const r = Math.round(
|
|
2256
|
+
n.loaded * 100 / n.total
|
|
2257
|
+
);
|
|
2258
|
+
t && t(r);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}).then((n) => n.data?.url || ""), uo = async (e) => {
|
|
2262
|
+
const t = JSON.parse(
|
|
2263
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2264
|
+
), n = {
|
|
2265
|
+
merchant_id: Number(t.merchantId),
|
|
2266
|
+
biz_type: t.bizType,
|
|
2267
|
+
fund_balance_id: t.fundBalanceId,
|
|
2268
|
+
source_operator: t.userId ? String(t.userId) : void 0,
|
|
2269
|
+
transfer_no: e.transferNo,
|
|
2270
|
+
transfer_channel: e.transferChannel,
|
|
2271
|
+
voucher_urls: e.voucherUrls
|
|
2272
|
+
};
|
|
2273
|
+
return Y.post("/offline/recharge/create", n, {});
|
|
2274
|
+
}, fo = async (e) => {
|
|
2275
|
+
const t = JSON.parse(
|
|
2276
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2277
|
+
);
|
|
2278
|
+
console.log(t, "fundUnitParams");
|
|
2279
|
+
const n = {
|
|
2280
|
+
merchant_id: Number(t.merchantId),
|
|
2281
|
+
biz_type: t.bizType,
|
|
2282
|
+
fund_balance_id: t.fundBalanceId,
|
|
2283
|
+
source_operator: t.userId ? String(t.userId) : void 0,
|
|
2284
|
+
amount: e.amount,
|
|
2285
|
+
currency: e.currency,
|
|
2286
|
+
recharge_channel: e.rechargeChannel,
|
|
2287
|
+
return_url: window.location.href
|
|
2288
|
+
};
|
|
2289
|
+
return Y.post("/online/recharge/create", n, {}).then((r) => r.data.redirect_url);
|
|
2290
|
+
}, po = async (e) => Y.get("/calc-payment-amount", {
|
|
2291
|
+
params: e
|
|
2292
|
+
}).then((t) => t.data.payment_amount);
|
|
2293
|
+
function ni(e) {
|
|
2294
|
+
const {
|
|
2295
|
+
merchant_id: t,
|
|
2296
|
+
biz_type: n,
|
|
2297
|
+
fund_balance_id: r,
|
|
2298
|
+
user_id: o,
|
|
2299
|
+
theme: i = H.WHITE,
|
|
2300
|
+
locale: s = Oe.ZH,
|
|
2301
|
+
env: a
|
|
2302
|
+
} = e, l = "Bearer " + e.token;
|
|
2303
|
+
return sessionStorage.setItem(
|
|
2304
|
+
"fund_unit_params",
|
|
2305
|
+
JSON.stringify({
|
|
2306
|
+
merchantId: t,
|
|
2307
|
+
bizType: n,
|
|
2308
|
+
fundBalanceId: r,
|
|
2309
|
+
userId: o,
|
|
2310
|
+
token: l,
|
|
2311
|
+
theme: i,
|
|
2312
|
+
locale: s,
|
|
2313
|
+
env: a
|
|
2314
|
+
})
|
|
2315
|
+
), lo(), {
|
|
2316
|
+
token: l,
|
|
2317
|
+
merchantId: t,
|
|
2318
|
+
bizType: n,
|
|
2319
|
+
fundBalanceId: r,
|
|
2320
|
+
userId: o,
|
|
2321
|
+
theme: i,
|
|
2322
|
+
locale: s,
|
|
2323
|
+
env: a
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2326
|
+
const ri = {
|
|
2327
|
+
"/api": {
|
|
2328
|
+
target: "https://fund.bestfulfill.tech/api/sdk",
|
|
2329
|
+
changeOrigin: !0,
|
|
2330
|
+
rewrite: (e) => e.replace(/^\/api/, ""),
|
|
2331
|
+
secure: !1
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2334
|
+
function ho({ onClick: e, color: t, children: n }) {
|
|
2335
|
+
const i = JSON.parse(
|
|
2336
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2337
|
+
).theme === H.WHITE ? {
|
|
2338
|
+
background: t || "#1890ff",
|
|
2339
|
+
color: "#fff",
|
|
2340
|
+
border: "none",
|
|
2341
|
+
borderRadius: 6,
|
|
2342
|
+
padding: "8px 16px",
|
|
2343
|
+
cursor: "pointer",
|
|
2344
|
+
fontSize: 16,
|
|
2345
|
+
fontWeight: 600
|
|
2346
|
+
} : {
|
|
2347
|
+
background: t || "#00E8C6",
|
|
2348
|
+
color: "#fff",
|
|
2349
|
+
border: "none",
|
|
2350
|
+
borderRadius: 6,
|
|
2351
|
+
padding: "8px 16px",
|
|
2352
|
+
cursor: "pointer",
|
|
2353
|
+
fontSize: 16,
|
|
2354
|
+
fontWeight: 600
|
|
2355
|
+
};
|
|
2356
|
+
return /* @__PURE__ */ m("button", { style: i, onClick: e, type: "button", children: n });
|
|
2357
|
+
}
|
|
2358
|
+
const mo = {
|
|
2359
|
+
// 余额相关
|
|
2360
|
+
余额详情: "余额详情",
|
|
2361
|
+
真实金额: "真实金额",
|
|
2362
|
+
冻结金额: "冻结金额",
|
|
2363
|
+
总可用: "总可用",
|
|
2364
|
+
暂无数据: "暂无数据",
|
|
2365
|
+
"金额需在1到999999.99之间": "金额需在1到999999.99之间",
|
|
2366
|
+
// 充值相关
|
|
2367
|
+
"充值 / 转账": "充值 / 转账",
|
|
2368
|
+
在线充值: "在线充值",
|
|
2369
|
+
线下转账: "线下转账",
|
|
2370
|
+
充值币种: "充值币种",
|
|
2371
|
+
充值金额: "充值金额",
|
|
2372
|
+
支付平台: "支付平台",
|
|
2373
|
+
请选择充值币种: "请选择充值币种",
|
|
2374
|
+
请输入充值金额: "请输入充值金额",
|
|
2375
|
+
请选择支付平台: "请选择支付平台",
|
|
2376
|
+
"需要收取手续费,实际支付金额约为:": "需要收取手续费,实际支付金额约为:",
|
|
2377
|
+
"提交失败,请重试": "提交失败,请重试",
|
|
2378
|
+
"提交中...": "提交中...",
|
|
2379
|
+
去支付: "去支付",
|
|
2380
|
+
取消: "取消",
|
|
2381
|
+
关闭: "关闭",
|
|
2382
|
+
// 离线转账相关
|
|
2383
|
+
第三方支付平台: "第三方支付平台",
|
|
2384
|
+
交易ID: "交易ID",
|
|
2385
|
+
请输入转账交易ID: "请输入转账交易ID",
|
|
2386
|
+
上传文件: "上传文件",
|
|
2387
|
+
请上传转账凭证: "请上传转账凭证",
|
|
2388
|
+
离线充值创建成功: "离线充值创建成功",
|
|
2389
|
+
// 通用
|
|
2390
|
+
"加载中...": "加载中...",
|
|
2391
|
+
错误: "错误",
|
|
2392
|
+
成功: "成功",
|
|
2393
|
+
必填: "必填",
|
|
2394
|
+
// 按钮文本
|
|
2395
|
+
"充值/转账": "充值/转账",
|
|
2396
|
+
切换为暗黑主题: "切换为暗黑主题",
|
|
2397
|
+
切换为白色主题: "切换为白色主题",
|
|
2398
|
+
// 上传组件相关
|
|
2399
|
+
点击或拖拽文件到此处上传: "点击或拖拽文件到此处上传",
|
|
2400
|
+
"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传": "支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传",
|
|
2401
|
+
个文件: "个文件",
|
|
2402
|
+
"正在上传...": "正在上传...",
|
|
2403
|
+
已上传: "已上传",
|
|
2404
|
+
移除: "移除"
|
|
2405
|
+
};
|
|
2406
|
+
function _o(e) {
|
|
2407
|
+
return mo[e] || e;
|
|
2408
|
+
}
|
|
2409
|
+
const go = {
|
|
2410
|
+
// 余额相关
|
|
2411
|
+
余额详情: "Balance Details",
|
|
2412
|
+
真实金额: "Real Amount",
|
|
2413
|
+
冻结金额: "Frozen Amount",
|
|
2414
|
+
总可用: "Total Available",
|
|
2415
|
+
暂无数据: "No Data",
|
|
2416
|
+
"金额需在1到999999.99之间": "Amount must be between 1 and 999999.99",
|
|
2417
|
+
// 充值相关
|
|
2418
|
+
"充值 / 转账": "Recharge / Transfer",
|
|
2419
|
+
在线充值: "Online Recharge",
|
|
2420
|
+
线下转账: "Offline Transfer",
|
|
2421
|
+
充值币种: "Recharge Currency",
|
|
2422
|
+
充值金额: "Recharge Amount",
|
|
2423
|
+
支付平台: "Payment Platform",
|
|
2424
|
+
请选择充值币种: "Please select recharge currency",
|
|
2425
|
+
请输入充值金额: "Please enter recharge amount",
|
|
2426
|
+
请选择支付平台: "Please select payment platform",
|
|
2427
|
+
"需要收取手续费,实际支付金额约为:": "requires a handling fee, the actual payment amount is approximately: ",
|
|
2428
|
+
"提交失败,请重试": "Submit failed, please try again",
|
|
2429
|
+
"提交中...": "Submitting...",
|
|
2430
|
+
去支付: "Go to Pay",
|
|
2431
|
+
取消: "Cancel",
|
|
2432
|
+
关闭: "Close",
|
|
2433
|
+
// 离线转账相关
|
|
2434
|
+
第三方支付平台: "Third-party Payment Platform",
|
|
2435
|
+
交易ID: "Transaction ID",
|
|
2436
|
+
请输入转账交易ID: "Please enter transfer transaction ID",
|
|
2437
|
+
上传文件: "Upload Files",
|
|
2438
|
+
请上传转账凭证: "Please upload transfer voucher",
|
|
2439
|
+
离线充值创建成功: "Offline recharge created successfully",
|
|
2440
|
+
// 通用
|
|
2441
|
+
"加载中...": "Loading...",
|
|
2442
|
+
错误: "Error",
|
|
2443
|
+
成功: "Success",
|
|
2444
|
+
必填: "Required",
|
|
2445
|
+
// 按钮文本
|
|
2446
|
+
"充值/转账": "Recharge/Transfer",
|
|
2447
|
+
切换为暗黑主题: "Switch to Dark Theme",
|
|
2448
|
+
切换为白色主题: "Switch to Light Theme",
|
|
2449
|
+
// 上传组件相关
|
|
2450
|
+
点击或拖拽文件到此处上传: "Click or drag files here to upload",
|
|
2451
|
+
"支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传": "Supports JPG, PNG, PDF formats, single file not exceeding 20MB, maximum",
|
|
2452
|
+
个文件: "files can be uploaded",
|
|
2453
|
+
"正在上传...": "Uploading...",
|
|
2454
|
+
已上传: "Uploaded",
|
|
2455
|
+
移除: "Remove"
|
|
2456
|
+
};
|
|
2457
|
+
function bo(e) {
|
|
2458
|
+
return go[e] || e;
|
|
2459
|
+
}
|
|
2460
|
+
function yo() {
|
|
2461
|
+
return JSON.parse(
|
|
2462
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2463
|
+
).locale || Oe.ZH;
|
|
2464
|
+
}
|
|
2465
|
+
function S(e) {
|
|
2466
|
+
return yo() === "zh" ? _o(e) : bo(e);
|
|
2467
|
+
}
|
|
2468
|
+
const Je = ({
|
|
2469
|
+
value: e,
|
|
2470
|
+
onChange: t,
|
|
2471
|
+
options: n,
|
|
2472
|
+
placeholder: r,
|
|
2473
|
+
style: o,
|
|
2474
|
+
error: i,
|
|
2475
|
+
disabled: s,
|
|
2476
|
+
dropdownStyle: a,
|
|
2477
|
+
className: l,
|
|
2478
|
+
dropdownClassName: u,
|
|
2479
|
+
children: f
|
|
2480
|
+
}) => {
|
|
2481
|
+
const [c, _] = P(!1), b = ye(null), [g, x] = P(null), h = JSON.parse(
|
|
2482
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2483
|
+
).theme === H.WHITE, y = h ? {
|
|
2484
|
+
trigger: {
|
|
2485
|
+
background: s ? "#f5f5f5" : "#fff",
|
|
2486
|
+
color: s ? "#bfbfbf" : e ? "#222" : "#bfbfbf",
|
|
2487
|
+
border: i ? "1px solid #ff4d4f" : s ? "1px solid #f0f0f0" : "1px solid #d9d9d9"
|
|
2488
|
+
},
|
|
2489
|
+
dropdown: {
|
|
2490
|
+
background: "#fff",
|
|
2491
|
+
border: "1px solid #d9d9d9",
|
|
2492
|
+
color: "#222"
|
|
2493
|
+
},
|
|
2494
|
+
option: (E, T, k) => ({
|
|
2495
|
+
color: T ? "#bfbfbf" : E ? "#1890ff" : "#222",
|
|
2496
|
+
background: E ? "#e6f7ff" : k && !T || T ? "#f5f5f5" : "#fff"
|
|
2497
|
+
}),
|
|
2498
|
+
placeholder: { color: "#bfbfbf" }
|
|
2499
|
+
} : {
|
|
2500
|
+
trigger: {
|
|
2501
|
+
background: "#23262F",
|
|
2502
|
+
color: s ? "#666" : e ? "#fff" : "#666",
|
|
2503
|
+
border: i ? "1px solid #ff4d4f" : "1px solid #23262F"
|
|
2504
|
+
},
|
|
2505
|
+
dropdown: {
|
|
2506
|
+
background: "#23262F",
|
|
2507
|
+
border: "1px solid #23262F",
|
|
2508
|
+
color: "#fff"
|
|
2509
|
+
},
|
|
2510
|
+
option: (E, T, k) => ({
|
|
2511
|
+
color: T ? "#666" : E ? "#00E8C6" : "#fff",
|
|
2512
|
+
background: E ? "#23262F" : k && !T ? "#333843" : "#23262F"
|
|
2513
|
+
}),
|
|
2514
|
+
placeholder: { color: "#666" }
|
|
2515
|
+
};
|
|
2516
|
+
Ae(() => {
|
|
2517
|
+
if (!c) return;
|
|
2518
|
+
const E = (T) => {
|
|
2519
|
+
b.current && !b.current.contains(T.target) && _(!1);
|
|
2520
|
+
};
|
|
2521
|
+
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
2522
|
+
}, [c]);
|
|
2523
|
+
const w = n.find((E) => E.value === e);
|
|
2524
|
+
return /* @__PURE__ */ m(
|
|
2525
|
+
"div",
|
|
2526
|
+
{
|
|
2527
|
+
ref: b,
|
|
2528
|
+
className: l,
|
|
2529
|
+
style: { position: "relative", ...o },
|
|
2530
|
+
children: [
|
|
2531
|
+
/* @__PURE__ */ m("style", { children: `
|
|
2532
|
+
.custom-select-dropdown {
|
|
2533
|
+
scrollbar-width: thin;
|
|
2534
|
+
scrollbar-color: #bfbfbf #f5f5f5;
|
|
2535
|
+
}
|
|
2536
|
+
.custom-select-dropdown::-webkit-scrollbar {
|
|
2537
|
+
width: 8px;
|
|
2538
|
+
}
|
|
2539
|
+
.custom-select-dropdown::-webkit-scrollbar-thumb {
|
|
2540
|
+
border-radius: 4px;
|
|
2541
|
+
background: ${h ? "#e5e5e5" : "#444C5C"};
|
|
2542
|
+
}
|
|
2543
|
+
.custom-select-dropdown::-webkit-scrollbar-track {
|
|
2544
|
+
background: ${h ? "#f5f5f5" : "#23262F"};
|
|
2545
|
+
}
|
|
2546
|
+
` }),
|
|
2547
|
+
/* @__PURE__ */ m(
|
|
2548
|
+
"div",
|
|
2549
|
+
{
|
|
2550
|
+
onClick: () => !s && _((E) => !E),
|
|
2551
|
+
style: {
|
|
2552
|
+
minHeight: 40,
|
|
2553
|
+
borderRadius: 6,
|
|
2554
|
+
display: "flex",
|
|
2555
|
+
alignItems: "center",
|
|
2556
|
+
padding: "0 12px",
|
|
2557
|
+
fontSize: 15,
|
|
2558
|
+
cursor: s ? "not-allowed" : "pointer",
|
|
2559
|
+
boxSizing: "border-box",
|
|
2560
|
+
transition: "border 0.2s",
|
|
2561
|
+
opacity: s ? 0.6 : 1,
|
|
2562
|
+
width: "100%",
|
|
2563
|
+
...y.trigger,
|
|
2564
|
+
...o
|
|
2565
|
+
},
|
|
2566
|
+
tabIndex: 0,
|
|
2567
|
+
children: [
|
|
2568
|
+
/* @__PURE__ */ m("span", { style: { flex: 1 }, children: w ? w.label : /* @__PURE__ */ m("span", { style: y.placeholder, children: r || "请选择" }) }),
|
|
2569
|
+
/* @__PURE__ */ m("span", { style: { marginLeft: 8, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ m(
|
|
2570
|
+
"svg",
|
|
2571
|
+
{
|
|
2572
|
+
width: "20",
|
|
2573
|
+
height: "20",
|
|
2574
|
+
viewBox: "0 0 20 20",
|
|
2575
|
+
fill: "none",
|
|
2576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2577
|
+
children: /* @__PURE__ */ m(
|
|
2578
|
+
"path",
|
|
2579
|
+
{
|
|
2580
|
+
d: "M6 8L10 12L14 8",
|
|
2581
|
+
stroke: "#bfbfbf",
|
|
2582
|
+
"stroke-width": "1.5",
|
|
2583
|
+
"stroke-linecap": "round",
|
|
2584
|
+
"stroke-linejoin": "round"
|
|
2585
|
+
}
|
|
2586
|
+
)
|
|
2587
|
+
}
|
|
2588
|
+
) })
|
|
2589
|
+
]
|
|
2590
|
+
}
|
|
2591
|
+
),
|
|
2592
|
+
c && !s && /* @__PURE__ */ m(
|
|
2593
|
+
"div",
|
|
2594
|
+
{
|
|
2595
|
+
className: `custom-select-dropdown${u ? " " + u : ""}`,
|
|
2596
|
+
style: {
|
|
2597
|
+
position: "absolute",
|
|
2598
|
+
left: 0,
|
|
2599
|
+
right: 0,
|
|
2600
|
+
top: 44,
|
|
2601
|
+
zIndex: 10,
|
|
2602
|
+
borderRadius: 6,
|
|
2603
|
+
boxShadow: h ? "0 2px 8px rgba(0,0,0,0.08)" : "0 2px 8px rgba(0,0,0,0.32)",
|
|
2604
|
+
maxHeight: 220,
|
|
2605
|
+
overflowY: "auto",
|
|
2606
|
+
...y.dropdown,
|
|
2607
|
+
...a
|
|
2608
|
+
},
|
|
2609
|
+
children: [
|
|
2610
|
+
n.length === 0 && /* @__PURE__ */ m(
|
|
2611
|
+
"div",
|
|
2612
|
+
{
|
|
2613
|
+
style: {
|
|
2614
|
+
display: "flex",
|
|
2615
|
+
flexDirection: "column",
|
|
2616
|
+
alignItems: "center",
|
|
2617
|
+
justifyContent: "center",
|
|
2618
|
+
minHeight: 120,
|
|
2619
|
+
width: "100%",
|
|
2620
|
+
userSelect: "none"
|
|
2621
|
+
},
|
|
2622
|
+
children: [
|
|
2623
|
+
/* @__PURE__ */ m(
|
|
2624
|
+
"svg",
|
|
2625
|
+
{
|
|
2626
|
+
width: "64",
|
|
2627
|
+
height: "41",
|
|
2628
|
+
viewBox: "0 0 64 41",
|
|
2629
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2630
|
+
children: [
|
|
2631
|
+
/* @__PURE__ */ m("title", { children: S("暂无数据") }),
|
|
2632
|
+
/* @__PURE__ */ m("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [
|
|
2633
|
+
/* @__PURE__ */ m(
|
|
2634
|
+
"ellipse",
|
|
2635
|
+
{
|
|
2636
|
+
fill: "#f5f5f5",
|
|
2637
|
+
cx: "32",
|
|
2638
|
+
cy: "33",
|
|
2639
|
+
rx: "32",
|
|
2640
|
+
ry: "7"
|
|
2641
|
+
}
|
|
2642
|
+
),
|
|
2643
|
+
/* @__PURE__ */ m("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [
|
|
2644
|
+
/* @__PURE__ */ m("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }),
|
|
2645
|
+
/* @__PURE__ */ m(
|
|
2646
|
+
"path",
|
|
2647
|
+
{
|
|
2648
|
+
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
|
|
2649
|
+
fill: "#fafafa"
|
|
2650
|
+
}
|
|
2651
|
+
)
|
|
2652
|
+
] })
|
|
2653
|
+
] })
|
|
2654
|
+
]
|
|
2655
|
+
}
|
|
2656
|
+
),
|
|
2657
|
+
/* @__PURE__ */ m("div", { style: { marginTop: 8, color: "#bfbfbf", fontSize: 15 }, children: S("暂无数据") })
|
|
2658
|
+
]
|
|
2659
|
+
}
|
|
2660
|
+
),
|
|
2661
|
+
n.map((E, T) => /* @__PURE__ */ m(
|
|
2662
|
+
"div",
|
|
2663
|
+
{
|
|
2664
|
+
onClick: () => {
|
|
2665
|
+
E.disabled || (_(!1), t?.(E.value));
|
|
2666
|
+
},
|
|
2667
|
+
onMouseEnter: () => x(T),
|
|
2668
|
+
onMouseLeave: () => x(null),
|
|
2669
|
+
style: {
|
|
2670
|
+
padding: "10px 16px",
|
|
2671
|
+
cursor: E.disabled ? "not-allowed" : "pointer",
|
|
2672
|
+
fontWeight: e === E.value ? 600 : 400,
|
|
2673
|
+
opacity: E.disabled ? 0.6 : 1,
|
|
2674
|
+
...y.option(
|
|
2675
|
+
e === E.value,
|
|
2676
|
+
!!E.disabled,
|
|
2677
|
+
g === T
|
|
2678
|
+
)
|
|
2679
|
+
},
|
|
2680
|
+
children: E.label
|
|
2681
|
+
},
|
|
2682
|
+
E.value
|
|
2683
|
+
))
|
|
2684
|
+
]
|
|
2685
|
+
}
|
|
2686
|
+
),
|
|
2687
|
+
f
|
|
2688
|
+
]
|
|
2689
|
+
}
|
|
2690
|
+
);
|
|
2691
|
+
};
|
|
2692
|
+
function wo(e) {
|
|
2693
|
+
return e = e.replace(/[^\d.]/g, ""), e = e.replace(/\.(?=.*\.)/g, ""), e = e.replace(/^(\d+)(\.\d{0,2})?.*$/, "$1$2"), e = e.replace(/^0+(\d)/, "$1"), e.startsWith(".") && (e = "0" + e), e;
|
|
2694
|
+
}
|
|
2695
|
+
function xo(e) {
|
|
2696
|
+
if (!e) return "";
|
|
2697
|
+
const t = parseFloat(e);
|
|
2698
|
+
return isNaN(t) ? "" : t.toFixed(2);
|
|
2699
|
+
}
|
|
2700
|
+
const Eo = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
|
|
2701
|
+
const o = JSON.parse(sessionStorage.getItem("all_dicts") || "{}"), i = o?.currency || [], s = o?.channel?.filter((p) => p.payment_support) || [], l = JSON.parse(
|
|
2702
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
2703
|
+
).theme === H.WHITE, [u, f] = P(""), [c, _] = P(!1);
|
|
2704
|
+
Ae(() => {
|
|
2705
|
+
e.currency && e.amount && e.rechargeChannel ? po({
|
|
2706
|
+
channel: e.rechargeChannel,
|
|
2707
|
+
amount: e.amount,
|
|
2708
|
+
currency: e.currency
|
|
2709
|
+
}).then((p) => {
|
|
2710
|
+
f(p), _(!0);
|
|
2711
|
+
}).catch((p) => {
|
|
2712
|
+
console.error("计算支付金额失败:", p), _(!1);
|
|
2713
|
+
}) : _(!1);
|
|
2714
|
+
}, [e.currency, e.amount, e.rechargeChannel]);
|
|
2715
|
+
const b = l ? {
|
|
2716
|
+
label: {
|
|
2717
|
+
marginBottom: 8,
|
|
2718
|
+
fontSize: 14,
|
|
2719
|
+
color: "#222",
|
|
2720
|
+
textAlign: "left",
|
|
2721
|
+
display: "block"
|
|
2722
|
+
},
|
|
2723
|
+
input: {
|
|
2724
|
+
width: "100%",
|
|
2725
|
+
padding: "10px 12px",
|
|
2726
|
+
borderRadius: 6,
|
|
2727
|
+
boxSizing: "border-box",
|
|
2728
|
+
border: "1px solid #E5E6EB",
|
|
2729
|
+
background: "#fff",
|
|
2730
|
+
color: "#222",
|
|
2731
|
+
fontSize: 15,
|
|
2732
|
+
outline: "none",
|
|
2733
|
+
marginBottom: 0
|
|
2734
|
+
},
|
|
2735
|
+
inputError: {
|
|
2736
|
+
border: "1px solid #ff4d4f"
|
|
2737
|
+
},
|
|
2738
|
+
error: {
|
|
2739
|
+
color: "#ff4d4f",
|
|
2740
|
+
fontSize: 13,
|
|
2741
|
+
marginTop: 4,
|
|
2742
|
+
textAlign: "left"
|
|
2743
|
+
}
|
|
2744
|
+
} : {
|
|
2745
|
+
label: {
|
|
2746
|
+
marginBottom: 8,
|
|
2747
|
+
fontSize: 14,
|
|
2748
|
+
color: "#fff",
|
|
2749
|
+
textAlign: "left",
|
|
2750
|
+
display: "block"
|
|
2751
|
+
},
|
|
2752
|
+
input: {
|
|
2753
|
+
width: "100%",
|
|
2754
|
+
padding: "10px 12px",
|
|
2755
|
+
borderRadius: 6,
|
|
2756
|
+
boxSizing: "border-box",
|
|
2757
|
+
border: "1px solid #23262F",
|
|
2758
|
+
background: "#23262F",
|
|
2759
|
+
color: "#fff",
|
|
2760
|
+
fontSize: 15,
|
|
2761
|
+
outline: "none",
|
|
2762
|
+
marginBottom: 0
|
|
2763
|
+
},
|
|
2764
|
+
inputError: {
|
|
2765
|
+
border: "1px solid #ff4d4f"
|
|
2766
|
+
},
|
|
2767
|
+
error: {
|
|
2768
|
+
color: "#ff4d4f",
|
|
2769
|
+
fontSize: 13,
|
|
2770
|
+
marginTop: 4,
|
|
2771
|
+
textAlign: "left"
|
|
2772
|
+
}
|
|
2773
|
+
}, g = l ? {
|
|
2774
|
+
background: "#fff",
|
|
2775
|
+
color: "#222",
|
|
2776
|
+
border: "1px solid #E5E6EB",
|
|
2777
|
+
borderRadius: 6,
|
|
2778
|
+
padding: "8px 24px",
|
|
2779
|
+
fontSize: 15,
|
|
2780
|
+
cursor: "pointer"
|
|
2781
|
+
} : {
|
|
2782
|
+
background: "#23262F",
|
|
2783
|
+
color: "#fff",
|
|
2784
|
+
border: "none",
|
|
2785
|
+
borderRadius: 6,
|
|
2786
|
+
padding: "8px 24px",
|
|
2787
|
+
fontSize: 15,
|
|
2788
|
+
cursor: "pointer"
|
|
2789
|
+
}, x = l ? {
|
|
2790
|
+
background: "#1890ff",
|
|
2791
|
+
color: "#fff",
|
|
2792
|
+
border: "none",
|
|
2793
|
+
borderRadius: 6,
|
|
2794
|
+
padding: "8px 24px",
|
|
2795
|
+
fontSize: 15,
|
|
2796
|
+
cursor: "pointer",
|
|
2797
|
+
fontWeight: 600
|
|
2798
|
+
} : {
|
|
2799
|
+
background: "#00E8C6",
|
|
2800
|
+
color: "#fff",
|
|
2801
|
+
border: "none",
|
|
2802
|
+
borderRadius: 6,
|
|
2803
|
+
padding: "8px 24px",
|
|
2804
|
+
fontSize: 15,
|
|
2805
|
+
cursor: "pointer",
|
|
2806
|
+
fontWeight: 600
|
|
2807
|
+
};
|
|
2808
|
+
return /* @__PURE__ */ m(Q, { children: [
|
|
2809
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 18 }, children: [
|
|
2810
|
+
/* @__PURE__ */ m("div", { style: b.label, children: [
|
|
2811
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2812
|
+
" ",
|
|
2813
|
+
S("充值币种")
|
|
2814
|
+
] }),
|
|
2815
|
+
/* @__PURE__ */ m(
|
|
2816
|
+
Je,
|
|
2817
|
+
{
|
|
2818
|
+
value: e.currency,
|
|
2819
|
+
onChange: (p) => {
|
|
2820
|
+
t((h) => ({
|
|
2821
|
+
...h,
|
|
2822
|
+
currency: p
|
|
2823
|
+
}));
|
|
2824
|
+
},
|
|
2825
|
+
options: i?.map((p) => ({
|
|
2826
|
+
value: p.value,
|
|
2827
|
+
label: p.label
|
|
2828
|
+
})),
|
|
2829
|
+
placeholder: S("请选择充值币种")
|
|
2830
|
+
}
|
|
2831
|
+
)
|
|
2832
|
+
] }),
|
|
2833
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 18 }, children: [
|
|
2834
|
+
/* @__PURE__ */ m("div", { style: b.label, children: [
|
|
2835
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2836
|
+
" ",
|
|
2837
|
+
S("充值金额")
|
|
2838
|
+
] }),
|
|
2839
|
+
/* @__PURE__ */ m(
|
|
2840
|
+
"input",
|
|
2841
|
+
{
|
|
2842
|
+
type: "text",
|
|
2843
|
+
placeholder: S("请输入充值金额"),
|
|
2844
|
+
value: e.amount,
|
|
2845
|
+
onInput: (p) => {
|
|
2846
|
+
let h = p.target.value;
|
|
2847
|
+
h = wo(h);
|
|
2848
|
+
let y = "";
|
|
2849
|
+
if (h && !h.endsWith(".")) {
|
|
2850
|
+
let w = parseFloat(h);
|
|
2851
|
+
if (!isNaN(w) && (w < 1 && (w = 1), w > 999999.99 && (w = 999999.99), h = w.toString(), /\./.test(p.target.value))) {
|
|
2852
|
+
const E = p.target.value.split(".")[1];
|
|
2853
|
+
E !== void 0 && E.length > 0 && (h = w.toFixed(Math.min(E.length, 2)));
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
t((w) => ({
|
|
2857
|
+
...w,
|
|
2858
|
+
amount: h,
|
|
2859
|
+
amountError: y
|
|
2860
|
+
}));
|
|
2861
|
+
},
|
|
2862
|
+
onBlur: (p) => {
|
|
2863
|
+
let h = p.target.value;
|
|
2864
|
+
h = xo(h), t((y) => ({
|
|
2865
|
+
...y,
|
|
2866
|
+
amount: h,
|
|
2867
|
+
amountError: ""
|
|
2868
|
+
}));
|
|
2869
|
+
},
|
|
2870
|
+
style: {
|
|
2871
|
+
...b.input,
|
|
2872
|
+
...e.amountError ? b.inputError : {}
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
),
|
|
2876
|
+
e.amountError && /* @__PURE__ */ m("div", { style: b.error, children: e.amountError })
|
|
2877
|
+
] }),
|
|
2878
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 24 }, children: [
|
|
2879
|
+
/* @__PURE__ */ m("div", { style: b.label, children: [
|
|
2880
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
2881
|
+
" ",
|
|
2882
|
+
S("支付平台")
|
|
2883
|
+
] }),
|
|
2884
|
+
/* @__PURE__ */ m(
|
|
2885
|
+
Je,
|
|
2886
|
+
{
|
|
2887
|
+
value: e.rechargeChannel,
|
|
2888
|
+
onChange: (p) => {
|
|
2889
|
+
t((h) => ({
|
|
2890
|
+
...h,
|
|
2891
|
+
rechargeChannel: p,
|
|
2892
|
+
rechargeChannelError: p ? "" : h.rechargeChannelError
|
|
2893
|
+
}));
|
|
2894
|
+
},
|
|
2895
|
+
options: s?.map((p) => ({
|
|
2896
|
+
value: p.value,
|
|
2897
|
+
label: p.label
|
|
2898
|
+
})),
|
|
2899
|
+
placeholder: S("请选择支付平台")
|
|
2900
|
+
}
|
|
2901
|
+
),
|
|
2902
|
+
e.rechargeChannelError && /* @__PURE__ */ m("div", { style: b.error, children: e.rechargeChannelError })
|
|
2903
|
+
] }),
|
|
2904
|
+
c && u && /* @__PURE__ */ m(
|
|
2905
|
+
"div",
|
|
2906
|
+
{
|
|
2907
|
+
style: {
|
|
2908
|
+
marginBottom: 24,
|
|
2909
|
+
padding: "12px 16px",
|
|
2910
|
+
background: l ? "#f6ffed" : "#1a1a1a",
|
|
2911
|
+
border: `1px solid ${l ? "#b7eb8f" : "#333"}`,
|
|
2912
|
+
borderRadius: 6,
|
|
2913
|
+
fontSize: 14,
|
|
2914
|
+
color: "#52c41a"
|
|
2915
|
+
},
|
|
2916
|
+
children: [
|
|
2917
|
+
s.find(
|
|
2918
|
+
(p) => p.value === e.rechargeChannel
|
|
2919
|
+
)?.label || e.rechargeChannel,
|
|
2920
|
+
S("需要收取手续费,实际支付金额约为:"),
|
|
2921
|
+
"$",
|
|
2922
|
+
u
|
|
2923
|
+
]
|
|
2924
|
+
}
|
|
2925
|
+
),
|
|
2926
|
+
e.error && /* @__PURE__ */ m("div", { style: { color: "#ff4d4f", marginBottom: 12 }, children: e.error }),
|
|
2927
|
+
/* @__PURE__ */ m("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
2928
|
+
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: g, children: S("取消") }),
|
|
2929
|
+
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: x, children: S(r ? "提交中..." : "去支付") })
|
|
2930
|
+
] })
|
|
2931
|
+
] });
|
|
2932
|
+
}, So = {
|
|
2933
|
+
white: {
|
|
2934
|
+
container: {
|
|
2935
|
+
border: "1px dashed #E5E6EB",
|
|
2936
|
+
borderRadius: 8,
|
|
2937
|
+
background: "#FCFCFD",
|
|
2938
|
+
padding: 24,
|
|
2939
|
+
textAlign: "center",
|
|
2940
|
+
cursor: "pointer",
|
|
2941
|
+
minHeight: 120,
|
|
2942
|
+
display: "flex",
|
|
2943
|
+
flexDirection: "column",
|
|
2944
|
+
alignItems: "center",
|
|
2945
|
+
justifyContent: "center",
|
|
2946
|
+
color: "#999",
|
|
2947
|
+
fontSize: 15
|
|
2948
|
+
},
|
|
2949
|
+
fileItem: {
|
|
2950
|
+
display: "flex",
|
|
2951
|
+
alignItems: "center",
|
|
2952
|
+
background: "#F7F8FA",
|
|
2953
|
+
borderRadius: 8,
|
|
2954
|
+
padding: "12px 16px",
|
|
2955
|
+
marginBottom: 8,
|
|
2956
|
+
fontSize: 15,
|
|
2957
|
+
color: "#222",
|
|
2958
|
+
justifyContent: "space-between"
|
|
2959
|
+
},
|
|
2960
|
+
removeBtn: {
|
|
2961
|
+
background: "#FF4D4F",
|
|
2962
|
+
color: "#fff",
|
|
2963
|
+
border: "none",
|
|
2964
|
+
borderRadius: 6,
|
|
2965
|
+
padding: "4px 14px",
|
|
2966
|
+
fontSize: 15,
|
|
2967
|
+
marginLeft: 16,
|
|
2968
|
+
cursor: "pointer"
|
|
2969
|
+
}
|
|
2970
|
+
},
|
|
2971
|
+
dark: {
|
|
2972
|
+
container: {
|
|
2973
|
+
border: "1.5px dashed #444C5C",
|
|
2974
|
+
borderRadius: 8,
|
|
2975
|
+
background: "#181A20",
|
|
2976
|
+
padding: 24,
|
|
2977
|
+
textAlign: "center",
|
|
2978
|
+
cursor: "pointer",
|
|
2979
|
+
minHeight: 120,
|
|
2980
|
+
display: "flex",
|
|
2981
|
+
flexDirection: "column",
|
|
2982
|
+
alignItems: "center",
|
|
2983
|
+
justifyContent: "center",
|
|
2984
|
+
color: "#999",
|
|
2985
|
+
fontSize: 15
|
|
2986
|
+
},
|
|
2987
|
+
fileItem: {
|
|
2988
|
+
display: "flex",
|
|
2989
|
+
alignItems: "center",
|
|
2990
|
+
background: "#23262F",
|
|
2991
|
+
borderRadius: 8,
|
|
2992
|
+
padding: "12px 16px",
|
|
2993
|
+
marginBottom: 8,
|
|
2994
|
+
fontSize: 15,
|
|
2995
|
+
color: "#fff",
|
|
2996
|
+
justifyContent: "space-between"
|
|
2997
|
+
},
|
|
2998
|
+
removeBtn: {
|
|
2999
|
+
background: "#FF4D4F",
|
|
3000
|
+
color: "#fff",
|
|
3001
|
+
border: "none",
|
|
3002
|
+
borderRadius: 6,
|
|
3003
|
+
padding: "4px 14px",
|
|
3004
|
+
fontSize: 15,
|
|
3005
|
+
marginLeft: 16,
|
|
3006
|
+
cursor: "pointer"
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
}, vo = ({
|
|
3010
|
+
value: e = [],
|
|
3011
|
+
onChange: t,
|
|
3012
|
+
maxCount: n = 10,
|
|
3013
|
+
accept: r = ".jpg,.jpeg,.png,.pdf",
|
|
3014
|
+
multiple: o = !0,
|
|
3015
|
+
disabled: i = !1
|
|
3016
|
+
}) => {
|
|
3017
|
+
const s = ye(null), [a, l] = P(!1), [u, f] = P(0), b = JSON.parse(
|
|
3018
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
3019
|
+
).theme === H.WHITE ? "white" : "dark", g = So[b], x = async (h) => {
|
|
3020
|
+
const y = Array.from(h.target.files).slice(
|
|
3021
|
+
0,
|
|
3022
|
+
n
|
|
3023
|
+
);
|
|
3024
|
+
if (!y.length) return;
|
|
3025
|
+
l(!0);
|
|
3026
|
+
const w = [];
|
|
3027
|
+
for (let E = 0; E < y.length; E++) {
|
|
3028
|
+
f(0);
|
|
3029
|
+
const T = new FormData();
|
|
3030
|
+
T.append("file", y[E]);
|
|
3031
|
+
try {
|
|
3032
|
+
const k = await co(
|
|
3033
|
+
T,
|
|
3034
|
+
(I) => f(I)
|
|
3035
|
+
);
|
|
3036
|
+
k && w.push(k);
|
|
3037
|
+
} catch {
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
l(!1), f(0), t?.([...e, ...w]), s.current && (s.current.value = "");
|
|
3041
|
+
}, p = (h) => {
|
|
3042
|
+
const y = e.filter((w, E) => E !== h);
|
|
3043
|
+
t?.(y);
|
|
3044
|
+
};
|
|
3045
|
+
return /* @__PURE__ */ m("div", { children: [
|
|
3046
|
+
/* @__PURE__ */ m(
|
|
3047
|
+
"div",
|
|
3048
|
+
{
|
|
3049
|
+
style: {
|
|
3050
|
+
...g.container,
|
|
3051
|
+
cursor: i ? "not-allowed" : g.container.cursor,
|
|
3052
|
+
opacity: i ? 0.6 : 1
|
|
3053
|
+
},
|
|
3054
|
+
onClick: () => !i && s.current?.click(),
|
|
3055
|
+
children: [
|
|
3056
|
+
/* @__PURE__ */ m("div", { style: { fontSize: 48, marginBottom: 12 }, children: "📁" }),
|
|
3057
|
+
/* @__PURE__ */ m("div", { style: { color: "#222", fontSize: 15, marginBottom: 4 }, children: S("点击或拖拽文件到此处上传") }),
|
|
3058
|
+
/* @__PURE__ */ m("div", { style: { color: "#999", fontSize: 13 }, children: [
|
|
3059
|
+
S("支持 JPG、PNG、PDF 格式,单个文件不超过 20MB,最多上传"),
|
|
3060
|
+
" ",
|
|
3061
|
+
n,
|
|
3062
|
+
" ",
|
|
3063
|
+
S("个文件")
|
|
3064
|
+
] }),
|
|
3065
|
+
/* @__PURE__ */ m(
|
|
3066
|
+
"input",
|
|
3067
|
+
{
|
|
3068
|
+
ref: s,
|
|
3069
|
+
type: "file",
|
|
3070
|
+
multiple: o,
|
|
3071
|
+
accept: r,
|
|
3072
|
+
style: { display: "none" },
|
|
3073
|
+
onChange: x,
|
|
3074
|
+
disabled: i
|
|
3075
|
+
}
|
|
3076
|
+
),
|
|
3077
|
+
a && /* @__PURE__ */ m("div", { style: { marginTop: 12, color: "#1677ff" }, children: [
|
|
3078
|
+
S("正在上传..."),
|
|
3079
|
+
" ",
|
|
3080
|
+
u,
|
|
3081
|
+
"%"
|
|
3082
|
+
] })
|
|
3083
|
+
]
|
|
3084
|
+
}
|
|
3085
|
+
),
|
|
3086
|
+
e && e.length > 0 && /* @__PURE__ */ m("div", { style: { marginTop: 12 }, children: e.map((h, y) => /* @__PURE__ */ m("div", { style: g.fileItem, children: [
|
|
3087
|
+
/* @__PURE__ */ m("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
|
|
3088
|
+
/* @__PURE__ */ m("span", { style: { fontWeight: 500, wordBreak: "break-all" }, children: h.split("/").pop() }),
|
|
3089
|
+
/* @__PURE__ */ m("span", { style: { color: "#8C8F93", fontSize: 13, marginLeft: 8 }, children: [
|
|
3090
|
+
"[",
|
|
3091
|
+
S("已上传"),
|
|
3092
|
+
"]"
|
|
3093
|
+
] })
|
|
3094
|
+
] }),
|
|
3095
|
+
/* @__PURE__ */ m(
|
|
3096
|
+
"button",
|
|
3097
|
+
{
|
|
3098
|
+
type: "button",
|
|
3099
|
+
onClick: (w) => {
|
|
3100
|
+
w.stopPropagation(), p(y);
|
|
3101
|
+
},
|
|
3102
|
+
style: g.removeBtn,
|
|
3103
|
+
disabled: i,
|
|
3104
|
+
children: S("移除")
|
|
3105
|
+
}
|
|
3106
|
+
)
|
|
3107
|
+
] }, h)) })
|
|
3108
|
+
] });
|
|
3109
|
+
}, To = ({ formState: e, setFormState: t, onClose: n, loading: r }) => {
|
|
3110
|
+
const o = JSON.parse(sessionStorage.getItem("all_dicts") || "{}");
|
|
3111
|
+
console.log(o, "allDicts");
|
|
3112
|
+
const i = o?.channel || [], l = JSON.parse(
|
|
3113
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
3114
|
+
).theme === H.WHITE ? {
|
|
3115
|
+
label: {
|
|
3116
|
+
marginBottom: 8,
|
|
3117
|
+
fontSize: 14,
|
|
3118
|
+
color: "#222",
|
|
3119
|
+
textAlign: "left",
|
|
3120
|
+
display: "block"
|
|
3121
|
+
},
|
|
3122
|
+
input: {
|
|
3123
|
+
width: "100%",
|
|
3124
|
+
padding: "10px 12px",
|
|
3125
|
+
borderRadius: 6,
|
|
3126
|
+
boxSizing: "border-box",
|
|
3127
|
+
border: "1px solid #E5E6EB",
|
|
3128
|
+
background: "#fff",
|
|
3129
|
+
color: "#222",
|
|
3130
|
+
fontSize: 15,
|
|
3131
|
+
outline: "none",
|
|
3132
|
+
marginBottom: 0
|
|
3133
|
+
},
|
|
3134
|
+
inputError: {
|
|
3135
|
+
border: "1px solid #ff4d4f"
|
|
3136
|
+
},
|
|
3137
|
+
buttonCancel: {
|
|
3138
|
+
background: "#fff",
|
|
3139
|
+
color: "#222",
|
|
3140
|
+
border: "1px solid #E5E6EB",
|
|
3141
|
+
borderRadius: 6,
|
|
3142
|
+
padding: "8px 24px",
|
|
3143
|
+
fontSize: 15,
|
|
3144
|
+
cursor: "pointer"
|
|
3145
|
+
},
|
|
3146
|
+
buttonSubmit: {
|
|
3147
|
+
background: "#1890ff",
|
|
3148
|
+
color: "#fff",
|
|
3149
|
+
border: "none",
|
|
3150
|
+
borderRadius: 6,
|
|
3151
|
+
padding: "8px 24px",
|
|
3152
|
+
fontSize: 15,
|
|
3153
|
+
cursor: "pointer",
|
|
3154
|
+
fontWeight: 600
|
|
3155
|
+
},
|
|
3156
|
+
error: {
|
|
3157
|
+
color: "#ff4d4f",
|
|
3158
|
+
fontSize: 13,
|
|
3159
|
+
marginTop: 4,
|
|
3160
|
+
textAlign: "left"
|
|
3161
|
+
}
|
|
3162
|
+
} : {
|
|
3163
|
+
label: {
|
|
3164
|
+
marginBottom: 8,
|
|
3165
|
+
fontSize: 14,
|
|
3166
|
+
color: "#fff",
|
|
3167
|
+
textAlign: "left",
|
|
3168
|
+
display: "block"
|
|
3169
|
+
},
|
|
3170
|
+
input: {
|
|
3171
|
+
width: "100%",
|
|
3172
|
+
padding: "10px 12px",
|
|
3173
|
+
borderRadius: 6,
|
|
3174
|
+
boxSizing: "border-box",
|
|
3175
|
+
border: "1px solid #23262F",
|
|
3176
|
+
background: "#23262F",
|
|
3177
|
+
color: "#fff",
|
|
3178
|
+
fontSize: 15,
|
|
3179
|
+
outline: "none",
|
|
3180
|
+
marginBottom: 0
|
|
3181
|
+
},
|
|
3182
|
+
inputError: {
|
|
3183
|
+
border: "1px solid #ff4d4f"
|
|
3184
|
+
},
|
|
3185
|
+
buttonCancel: {
|
|
3186
|
+
background: "#23262F",
|
|
3187
|
+
color: "#fff",
|
|
3188
|
+
border: "none",
|
|
3189
|
+
borderRadius: 6,
|
|
3190
|
+
padding: "8px 24px",
|
|
3191
|
+
fontSize: 15,
|
|
3192
|
+
cursor: "pointer"
|
|
3193
|
+
},
|
|
3194
|
+
buttonSubmit: {
|
|
3195
|
+
background: "#00E8C6",
|
|
3196
|
+
color: "#fff",
|
|
3197
|
+
border: "none",
|
|
3198
|
+
borderRadius: 6,
|
|
3199
|
+
padding: "8px 24px",
|
|
3200
|
+
fontSize: 15,
|
|
3201
|
+
cursor: "pointer",
|
|
3202
|
+
fontWeight: 600
|
|
3203
|
+
},
|
|
3204
|
+
error: {
|
|
3205
|
+
color: "#ff4d4f",
|
|
3206
|
+
fontSize: 13,
|
|
3207
|
+
marginTop: 4,
|
|
3208
|
+
textAlign: "left"
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
return /* @__PURE__ */ m("form", { onSubmit: async (f) => {
|
|
3212
|
+
f.preventDefault();
|
|
3213
|
+
let c = !0;
|
|
3214
|
+
t((_) => ({
|
|
3215
|
+
..._,
|
|
3216
|
+
platformError: "",
|
|
3217
|
+
transactionIdError: "",
|
|
3218
|
+
filesError: ""
|
|
3219
|
+
})), e.platform || (t((_) => ({
|
|
3220
|
+
..._,
|
|
3221
|
+
platformError: S("请选择支付平台")
|
|
3222
|
+
})), c = !1), e.transactionId.trim() || (t((_) => ({
|
|
3223
|
+
..._,
|
|
3224
|
+
transactionIdError: S("请输入转账交易ID")
|
|
3225
|
+
})), c = !1), (!e.files || e.files.length === 0) && (t((_) => ({
|
|
3226
|
+
..._,
|
|
3227
|
+
filesError: S("请上传转账凭证")
|
|
3228
|
+
})), c = !1), c && (await uo({
|
|
3229
|
+
transferChannel: e.platform,
|
|
3230
|
+
transferNo: e.transactionId,
|
|
3231
|
+
voucherUrls: e.files
|
|
3232
|
+
}), n(), qe.success(S("离线充值创建成功")));
|
|
3233
|
+
}, children: [
|
|
3234
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 18 }, children: [
|
|
3235
|
+
/* @__PURE__ */ m("div", { style: l.label, children: [
|
|
3236
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3237
|
+
" ",
|
|
3238
|
+
S("第三方支付平台")
|
|
3239
|
+
] }),
|
|
3240
|
+
/* @__PURE__ */ m(
|
|
3241
|
+
Je,
|
|
3242
|
+
{
|
|
3243
|
+
value: e.platform,
|
|
3244
|
+
onChange: (f) => {
|
|
3245
|
+
t((c) => ({
|
|
3246
|
+
...c,
|
|
3247
|
+
platform: f,
|
|
3248
|
+
platformError: f ? "" : c.platformError
|
|
3249
|
+
}));
|
|
3250
|
+
},
|
|
3251
|
+
options: [
|
|
3252
|
+
...i?.map((f) => ({
|
|
3253
|
+
value: f.value,
|
|
3254
|
+
label: f.label
|
|
3255
|
+
}))
|
|
3256
|
+
],
|
|
3257
|
+
placeholder: S("请选择支付平台")
|
|
3258
|
+
}
|
|
3259
|
+
),
|
|
3260
|
+
e.platformError && /* @__PURE__ */ m("div", { style: l.error, children: e.platformError })
|
|
3261
|
+
] }),
|
|
3262
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 18 }, children: [
|
|
3263
|
+
/* @__PURE__ */ m("div", { style: l.label, children: [
|
|
3264
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3265
|
+
" ",
|
|
3266
|
+
S("交易ID")
|
|
3267
|
+
] }),
|
|
3268
|
+
/* @__PURE__ */ m(
|
|
3269
|
+
"input",
|
|
3270
|
+
{
|
|
3271
|
+
type: "text",
|
|
3272
|
+
placeholder: S("请输入转账交易ID"),
|
|
3273
|
+
value: e.transactionId,
|
|
3274
|
+
maxLength: 200,
|
|
3275
|
+
onInput: (f) => {
|
|
3276
|
+
let c = f.target.value;
|
|
3277
|
+
c.length > 200 && (c = c.slice(0, 200)), t((_) => ({
|
|
3278
|
+
..._,
|
|
3279
|
+
transactionId: c,
|
|
3280
|
+
transactionIdError: c ? "" : _.transactionIdError
|
|
3281
|
+
}));
|
|
3282
|
+
},
|
|
3283
|
+
style: {
|
|
3284
|
+
...l.input,
|
|
3285
|
+
...e.transactionIdError ? l.inputError : {}
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
),
|
|
3289
|
+
e.transactionIdError && /* @__PURE__ */ m("div", { style: l.error, children: e.transactionIdError })
|
|
3290
|
+
] }),
|
|
3291
|
+
/* @__PURE__ */ m("div", { style: { marginBottom: 24 }, children: [
|
|
3292
|
+
/* @__PURE__ */ m("div", { style: l.label, children: [
|
|
3293
|
+
/* @__PURE__ */ m("span", { style: { color: "#F53F3F" }, children: "*" }),
|
|
3294
|
+
" ",
|
|
3295
|
+
S("上传文件")
|
|
3296
|
+
] }),
|
|
3297
|
+
/* @__PURE__ */ m(
|
|
3298
|
+
vo,
|
|
3299
|
+
{
|
|
3300
|
+
value: e.files,
|
|
3301
|
+
onChange: (f) => t((c) => ({
|
|
3302
|
+
...c,
|
|
3303
|
+
files: f,
|
|
3304
|
+
filesError: ""
|
|
3305
|
+
})),
|
|
3306
|
+
maxCount: 10,
|
|
3307
|
+
accept: ".jpg,.jpeg,.png,.pdf",
|
|
3308
|
+
multiple: !0
|
|
3309
|
+
}
|
|
3310
|
+
),
|
|
3311
|
+
e.filesError && /* @__PURE__ */ m("div", { style: l.error, children: e.filesError })
|
|
3312
|
+
] }),
|
|
3313
|
+
/* @__PURE__ */ m("div", { style: { display: "flex", justifyContent: "flex-end", gap: 12 }, children: [
|
|
3314
|
+
/* @__PURE__ */ m("button", { type: "button", onClick: n, style: l.buttonCancel, children: S("取消") }),
|
|
3315
|
+
/* @__PURE__ */ m("button", { type: "submit", disabled: r, style: l.buttonSubmit, children: S("去支付") })
|
|
3316
|
+
] })
|
|
3317
|
+
] });
|
|
3318
|
+
};
|
|
3319
|
+
function Ro({ visible: e, onClose: t, onSubmit: n }) {
|
|
3320
|
+
const [r, o] = P({
|
|
3321
|
+
amount: "",
|
|
3322
|
+
rechargeChannel: "",
|
|
3323
|
+
currency: "USD",
|
|
3324
|
+
loading: !1,
|
|
3325
|
+
error: "",
|
|
3326
|
+
amountError: "",
|
|
3327
|
+
rechargeChannelError: "",
|
|
3328
|
+
currencyError: ""
|
|
3329
|
+
}), [i, s] = P("online"), [a, l] = P({
|
|
3330
|
+
platform: "",
|
|
3331
|
+
transactionId: "",
|
|
3332
|
+
files: [],
|
|
3333
|
+
platformError: "",
|
|
3334
|
+
transactionIdError: "",
|
|
3335
|
+
filesError: "",
|
|
3336
|
+
loading: !1
|
|
3337
|
+
});
|
|
3338
|
+
if (Ae(() => {
|
|
3339
|
+
e || (s("online"), o({
|
|
3340
|
+
amount: "",
|
|
3341
|
+
rechargeChannel: "",
|
|
3342
|
+
currency: "USD",
|
|
3343
|
+
loading: !1,
|
|
3344
|
+
error: "",
|
|
3345
|
+
amountError: "",
|
|
3346
|
+
rechargeChannelError: "",
|
|
3347
|
+
currencyError: ""
|
|
3348
|
+
}), l({
|
|
3349
|
+
platform: "",
|
|
3350
|
+
transactionId: "",
|
|
3351
|
+
files: [],
|
|
3352
|
+
platformError: "",
|
|
3353
|
+
transactionIdError: "",
|
|
3354
|
+
filesError: "",
|
|
3355
|
+
loading: !1
|
|
3356
|
+
}));
|
|
3357
|
+
}, [e]), !e) return null;
|
|
3358
|
+
const u = async (h) => {
|
|
3359
|
+
h.preventDefault();
|
|
3360
|
+
let y = !0;
|
|
3361
|
+
if (o((w) => ({
|
|
3362
|
+
...w,
|
|
3363
|
+
amountError: "",
|
|
3364
|
+
rechargeChannelError: ""
|
|
3365
|
+
})), r.amount.trim() || (o((w) => ({ ...w, amountError: S("请输入充值金额") })), y = !1), r.rechargeChannel || (o((w) => ({
|
|
3366
|
+
...w,
|
|
3367
|
+
rechargeChannelError: S("请选择支付平台")
|
|
3368
|
+
})), y = !1), !!y) {
|
|
3369
|
+
o((w) => ({ ...w, loading: !0, error: "" }));
|
|
3370
|
+
try {
|
|
3371
|
+
await n({
|
|
3372
|
+
amount: r.amount,
|
|
3373
|
+
rechargeChannel: r.rechargeChannel,
|
|
3374
|
+
currency: r.currency
|
|
3375
|
+
}), t();
|
|
3376
|
+
} catch {
|
|
3377
|
+
o((w) => ({ ...w, error: S("提交失败,请重试") }));
|
|
3378
|
+
} finally {
|
|
3379
|
+
o((w) => ({ ...w, loading: !1 }));
|
|
3380
|
+
}
|
|
3381
|
+
}
|
|
3382
|
+
}, [f, c] = P(!1), _ = (h) => {
|
|
3383
|
+
h.target === h.currentTarget ? c(!0) : c(!1);
|
|
3384
|
+
}, b = (h) => {
|
|
3385
|
+
h.target === h.currentTarget && f && t(), c(!1);
|
|
3386
|
+
}, p = JSON.parse(
|
|
3387
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
3388
|
+
).theme === H.WHITE ? {
|
|
3389
|
+
modalBg: "#fff",
|
|
3390
|
+
modalColor: "#222",
|
|
3391
|
+
modalBoxShadow: "0 4px 24px rgba(0,0,0,0.08)",
|
|
3392
|
+
mask: "rgba(0,0,0,0.3)",
|
|
3393
|
+
title: {
|
|
3394
|
+
fontWeight: 600,
|
|
3395
|
+
fontSize: 20,
|
|
3396
|
+
marginBottom: 24,
|
|
3397
|
+
textAlign: "left",
|
|
3398
|
+
color: "#222"
|
|
3399
|
+
},
|
|
3400
|
+
closeBtn: {
|
|
3401
|
+
position: "absolute",
|
|
3402
|
+
right: 16,
|
|
3403
|
+
top: 16,
|
|
3404
|
+
background: "none",
|
|
3405
|
+
border: "none",
|
|
3406
|
+
color: "#222",
|
|
3407
|
+
fontSize: 22,
|
|
3408
|
+
cursor: "pointer",
|
|
3409
|
+
lineHeight: 1
|
|
3410
|
+
},
|
|
3411
|
+
tabBtn: (h, y) => ({
|
|
3412
|
+
flex: 1,
|
|
3413
|
+
background: h ? "#fff" : "#F7F8FA",
|
|
3414
|
+
color: h ? "#1890ff" : "#222",
|
|
3415
|
+
border: "none",
|
|
3416
|
+
borderRadius: y ? "8px 0 0 8px" : "0 8px 8px 0",
|
|
3417
|
+
fontWeight: h ? 600 : 400,
|
|
3418
|
+
fontSize: 16,
|
|
3419
|
+
height: 48,
|
|
3420
|
+
boxShadow: h ? "0 2px 8px 0 rgba(20,20,20,0.04)" : "none",
|
|
3421
|
+
outline: "none",
|
|
3422
|
+
cursor: "pointer",
|
|
3423
|
+
borderRight: y ? "1px solid #F0F1F3" : void 0,
|
|
3424
|
+
borderLeft: y ? void 0 : "1px solid #F0F1F3",
|
|
3425
|
+
transition: "all 0.2s"
|
|
3426
|
+
})
|
|
3427
|
+
} : {
|
|
3428
|
+
modalBg: "#181A20",
|
|
3429
|
+
modalColor: "#fff",
|
|
3430
|
+
modalBoxShadow: "0 4px 24px rgba(0,0,0,0.5)",
|
|
3431
|
+
mask: "rgba(0,0,0,0.7)",
|
|
3432
|
+
title: {
|
|
3433
|
+
fontWeight: 600,
|
|
3434
|
+
fontSize: 20,
|
|
3435
|
+
marginBottom: 24,
|
|
3436
|
+
textAlign: "left",
|
|
3437
|
+
color: "#fff"
|
|
3438
|
+
},
|
|
3439
|
+
closeBtn: {
|
|
3440
|
+
position: "absolute",
|
|
3441
|
+
right: 16,
|
|
3442
|
+
top: 16,
|
|
3443
|
+
background: "none",
|
|
3444
|
+
border: "none",
|
|
3445
|
+
color: "#fff",
|
|
3446
|
+
fontSize: 22,
|
|
3447
|
+
cursor: "pointer",
|
|
3448
|
+
lineHeight: 1
|
|
3449
|
+
},
|
|
3450
|
+
tabBtn: (h, y) => ({
|
|
3451
|
+
flex: 1,
|
|
3452
|
+
background: h ? "#23262F" : "#181A20",
|
|
3453
|
+
color: h ? "#00E8C6" : "#fff",
|
|
3454
|
+
border: "none",
|
|
3455
|
+
borderRadius: y ? "8px 0 0 8px" : "0 8px 8px 0",
|
|
3456
|
+
fontWeight: h ? 600 : 400,
|
|
3457
|
+
fontSize: 16,
|
|
3458
|
+
height: 48,
|
|
3459
|
+
boxShadow: h ? "0 2px 8px 0 rgba(20,20,20,0.10)" : "none",
|
|
3460
|
+
outline: "none",
|
|
3461
|
+
cursor: "pointer",
|
|
3462
|
+
borderRight: y ? "1px solid #23262F" : void 0,
|
|
3463
|
+
borderLeft: y ? void 0 : "1px solid #23262F",
|
|
3464
|
+
transition: "all 0.2s"
|
|
3465
|
+
})
|
|
3466
|
+
};
|
|
3467
|
+
return /* @__PURE__ */ m(
|
|
3468
|
+
"div",
|
|
3469
|
+
{
|
|
3470
|
+
style: {
|
|
3471
|
+
position: "fixed",
|
|
3472
|
+
top: 0,
|
|
3473
|
+
left: 0,
|
|
3474
|
+
right: 0,
|
|
3475
|
+
bottom: 0,
|
|
3476
|
+
background: p.mask,
|
|
3477
|
+
display: "flex",
|
|
3478
|
+
alignItems: "center",
|
|
3479
|
+
justifyContent: "center",
|
|
3480
|
+
zIndex: 9999
|
|
3481
|
+
},
|
|
3482
|
+
onMouseDown: _,
|
|
3483
|
+
onMouseUp: b,
|
|
3484
|
+
children: /* @__PURE__ */ m(
|
|
3485
|
+
"form",
|
|
3486
|
+
{
|
|
3487
|
+
onSubmit: u,
|
|
3488
|
+
style: {
|
|
3489
|
+
background: p.modalBg,
|
|
3490
|
+
padding: 32,
|
|
3491
|
+
borderRadius: 12,
|
|
3492
|
+
minWidth: 400,
|
|
3493
|
+
maxWidth: 400,
|
|
3494
|
+
color: p.modalColor,
|
|
3495
|
+
boxShadow: p.modalBoxShadow,
|
|
3496
|
+
position: "relative"
|
|
3497
|
+
},
|
|
3498
|
+
onClick: (h) => h.stopPropagation(),
|
|
3499
|
+
children: [
|
|
3500
|
+
/* @__PURE__ */ m(
|
|
3501
|
+
"button",
|
|
3502
|
+
{
|
|
3503
|
+
type: "button",
|
|
3504
|
+
onClick: t,
|
|
3505
|
+
style: p.closeBtn,
|
|
3506
|
+
"aria-label": S("关闭"),
|
|
3507
|
+
children: "×"
|
|
3508
|
+
}
|
|
3509
|
+
),
|
|
3510
|
+
/* @__PURE__ */ m("div", { style: p.title, children: S("充值 / 转账") }),
|
|
3511
|
+
/* @__PURE__ */ m("div", { style: { display: "flex", marginBottom: 28 }, children: [
|
|
3512
|
+
/* @__PURE__ */ m(
|
|
3513
|
+
"button",
|
|
3514
|
+
{
|
|
3515
|
+
type: "button",
|
|
3516
|
+
onClick: () => s("online"),
|
|
3517
|
+
style: p.tabBtn(i === "online", !0),
|
|
3518
|
+
children: S("在线充值")
|
|
3519
|
+
}
|
|
3520
|
+
),
|
|
3521
|
+
/* @__PURE__ */ m(
|
|
3522
|
+
"button",
|
|
3523
|
+
{
|
|
3524
|
+
type: "button",
|
|
3525
|
+
onClick: () => s("offline"),
|
|
3526
|
+
style: p.tabBtn(i === "offline", !1),
|
|
3527
|
+
children: S("线下转账")
|
|
3528
|
+
}
|
|
3529
|
+
)
|
|
3530
|
+
] }),
|
|
3531
|
+
i === "online" ? /* @__PURE__ */ m(
|
|
3532
|
+
Eo,
|
|
3533
|
+
{
|
|
3534
|
+
formState: r,
|
|
3535
|
+
setFormState: o,
|
|
3536
|
+
onClose: t,
|
|
3537
|
+
loading: r.loading
|
|
3538
|
+
}
|
|
3539
|
+
) : /* @__PURE__ */ m(
|
|
3540
|
+
To,
|
|
3541
|
+
{
|
|
3542
|
+
formState: a,
|
|
3543
|
+
setFormState: l,
|
|
3544
|
+
onClose: t,
|
|
3545
|
+
loading: a.loading
|
|
3546
|
+
}
|
|
3547
|
+
)
|
|
3548
|
+
]
|
|
3549
|
+
}
|
|
3550
|
+
)
|
|
3551
|
+
}
|
|
3552
|
+
);
|
|
3553
|
+
}
|
|
3554
|
+
function tt() {
|
|
3555
|
+
return (tt = Object.assign ? Object.assign.bind() : function(e) {
|
|
3556
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
3557
|
+
var n = arguments[t];
|
|
3558
|
+
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3559
|
+
}
|
|
3560
|
+
return e;
|
|
3561
|
+
}).apply(this, arguments);
|
|
3562
|
+
}
|
|
3563
|
+
var ko = ["context", "children"];
|
|
3564
|
+
function Co(e) {
|
|
3565
|
+
this.getChildContext = function() {
|
|
3566
|
+
return e.context;
|
|
3567
|
+
};
|
|
3568
|
+
var t = e.children, n = function(r, o) {
|
|
3569
|
+
if (r == null) return {};
|
|
3570
|
+
var i, s, a = {}, l = Object.keys(r);
|
|
3571
|
+
for (s = 0; s < l.length; s++) o.indexOf(i = l[s]) >= 0 || (a[i] = r[i]);
|
|
3572
|
+
return a;
|
|
3573
|
+
}(e, ko);
|
|
3574
|
+
return pn(t, n);
|
|
3575
|
+
}
|
|
3576
|
+
function Ao() {
|
|
3577
|
+
var e = new CustomEvent("_preact", { detail: {}, bubbles: !0, cancelable: !0 });
|
|
3578
|
+
this.dispatchEvent(e), this._vdom = G(Co, tt({}, this._props, { context: e.detail.context }), function t(n, r) {
|
|
3579
|
+
if (n.nodeType === 3) return n.data;
|
|
3580
|
+
if (n.nodeType !== 1) return null;
|
|
3581
|
+
var o = [], i = {}, s = 0, a = n.attributes, l = n.childNodes;
|
|
3582
|
+
for (s = a.length; s--; ) a[s].name !== "slot" && (i[a[s].name] = a[s].value, i[gn(a[s].name)] = a[s].value);
|
|
3583
|
+
for (s = l.length; s--; ) {
|
|
3584
|
+
var u = t(l[s], null), f = l[s].slot;
|
|
3585
|
+
f ? i[f] = G(kt, { name: f }, u) : o[s] = u;
|
|
3586
|
+
}
|
|
3587
|
+
var c = r ? G(kt, null, o) : o;
|
|
3588
|
+
return G(r || n.nodeName.toLowerCase(), i, c);
|
|
3589
|
+
}(this, this._vdomComponent)), (this.hasAttribute("hydrate") ? dn : Ce)(this._vdom, this._root);
|
|
3590
|
+
}
|
|
3591
|
+
function gn(e) {
|
|
3592
|
+
return e.replace(/-(\w)/g, function(t, n) {
|
|
3593
|
+
return n ? n.toUpperCase() : "";
|
|
3594
|
+
});
|
|
3595
|
+
}
|
|
3596
|
+
function Oo(e, t, n) {
|
|
3597
|
+
if (this._vdom) {
|
|
3598
|
+
var r = {};
|
|
3599
|
+
r[e] = n = n ?? void 0, r[gn(e)] = n, this._vdom = pn(this._vdom, r), Ce(this._vdom, this._root);
|
|
3600
|
+
}
|
|
3601
|
+
}
|
|
3602
|
+
function Fo() {
|
|
3603
|
+
Ce(this._vdom = null, this._root);
|
|
3604
|
+
}
|
|
3605
|
+
function kt(e, t) {
|
|
3606
|
+
var n = this;
|
|
3607
|
+
return G("slot", tt({}, e, { ref: function(r) {
|
|
3608
|
+
r ? (n.ref = r, n._listener || (n._listener = function(o) {
|
|
3609
|
+
o.stopPropagation(), o.detail.context = t;
|
|
3610
|
+
}, r.addEventListener("_preact", n._listener))) : n.ref.removeEventListener("_preact", n._listener);
|
|
3611
|
+
} }));
|
|
3612
|
+
}
|
|
3613
|
+
function bn(e, t, n, r) {
|
|
3614
|
+
function o() {
|
|
3615
|
+
var i = Reflect.construct(HTMLElement, [], o);
|
|
3616
|
+
return i._vdomComponent = e, i._root = r && r.shadow ? i.attachShadow({ mode: r.mode || "open" }) : i, i;
|
|
3617
|
+
}
|
|
3618
|
+
return (o.prototype = Object.create(HTMLElement.prototype)).constructor = o, o.prototype.connectedCallback = Ao, o.prototype.attributeChangedCallback = Oo, o.prototype.disconnectedCallback = Fo, n = n || e.observedAttributes || Object.keys(e.propTypes || {}), o.observedAttributes = n, n.forEach(function(i) {
|
|
3619
|
+
Object.defineProperty(o.prototype, i, { get: function() {
|
|
3620
|
+
return this._vdom.props[i];
|
|
3621
|
+
}, set: function(s) {
|
|
3622
|
+
this._vdom ? this.attributeChangedCallback(i, null, s) : (this._props || (this._props = {}), this._props[i] = s, this.connectedCallback());
|
|
3623
|
+
var a = typeof s;
|
|
3624
|
+
s != null && a !== "string" && a !== "boolean" && a !== "number" || this.setAttribute(i, s);
|
|
3625
|
+
} });
|
|
3626
|
+
}), customElements.define(t || e.tagName || e.displayName || e.name, o);
|
|
3627
|
+
}
|
|
3628
|
+
function Po() {
|
|
3629
|
+
const [e, t] = P(!1), n = async (r) => {
|
|
3630
|
+
const o = await fo({
|
|
3631
|
+
amount: r.amount,
|
|
3632
|
+
currency: r.currency,
|
|
3633
|
+
rechargeChannel: r.rechargeChannel
|
|
3634
|
+
});
|
|
3635
|
+
window.open(o, "_blank");
|
|
3636
|
+
};
|
|
3637
|
+
return /* @__PURE__ */ m("div", { children: [
|
|
3638
|
+
/* @__PURE__ */ m(ho, { onClick: () => t(!0), children: S("充值/转账") }),
|
|
3639
|
+
/* @__PURE__ */ m(
|
|
3640
|
+
Ro,
|
|
3641
|
+
{
|
|
3642
|
+
visible: e,
|
|
3643
|
+
onClose: () => t(!1),
|
|
3644
|
+
onSubmit: n
|
|
3645
|
+
}
|
|
3646
|
+
)
|
|
3647
|
+
] });
|
|
3648
|
+
}
|
|
3649
|
+
bn(Po, "best-recharge", ["theme"], { shadow: !1 });
|
|
3650
|
+
const Bo = ({
|
|
3651
|
+
popover: e,
|
|
3652
|
+
children: t,
|
|
3653
|
+
popoverWidth: n = 300,
|
|
3654
|
+
popoverMinWidth: r = 200,
|
|
3655
|
+
offsetY: o = 16,
|
|
3656
|
+
offsetX: i = 16,
|
|
3657
|
+
popoverPosition: s = "top"
|
|
3658
|
+
}) => {
|
|
3659
|
+
const [a, l] = P(!1), [u, f] = P(s), c = ye(null), _ = ye(null), b = () => {
|
|
3660
|
+
if (_.current && (clearTimeout(_.current), _.current = null), s === "top" || s === "bottom")
|
|
3661
|
+
if (c.current) {
|
|
3662
|
+
const T = c.current.getBoundingClientRect();
|
|
3663
|
+
s === "top" && T.top < 100 ? f("bottom") : s === "bottom" && window.innerHeight - T.bottom < 100 ? f("top") : f(s);
|
|
3664
|
+
} else
|
|
3665
|
+
f(s);
|
|
3666
|
+
else
|
|
3667
|
+
f(s);
|
|
3668
|
+
l(!0);
|
|
3669
|
+
}, g = () => {
|
|
3670
|
+
_.current = window.setTimeout(() => {
|
|
3671
|
+
l(!1);
|
|
3672
|
+
}, 120);
|
|
3673
|
+
}, x = {
|
|
3674
|
+
white: {
|
|
3675
|
+
popover: {
|
|
3676
|
+
background: "#fff",
|
|
3677
|
+
color: "#222",
|
|
3678
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.12)",
|
|
3679
|
+
border: "none"
|
|
3680
|
+
},
|
|
3681
|
+
arrow: {
|
|
3682
|
+
top: "#fff",
|
|
3683
|
+
bottom: "#fff",
|
|
3684
|
+
left: "#fff",
|
|
3685
|
+
right: "#fff"
|
|
3686
|
+
}
|
|
3687
|
+
},
|
|
3688
|
+
dark: {
|
|
3689
|
+
popover: {
|
|
3690
|
+
background: "#23262F",
|
|
3691
|
+
color: "#fff",
|
|
3692
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.32)",
|
|
3693
|
+
border: "1px solid #444C5C"
|
|
3694
|
+
},
|
|
3695
|
+
arrow: {
|
|
3696
|
+
top: "#23262F",
|
|
3697
|
+
bottom: "#23262F",
|
|
3698
|
+
left: "#23262F",
|
|
3699
|
+
right: "#23262F"
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
}, h = JSON.parse(
|
|
3703
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
3704
|
+
).theme === H.WHITE, y = x[h ? "white" : "dark"];
|
|
3705
|
+
let w = {
|
|
3706
|
+
position: "absolute",
|
|
3707
|
+
zIndex: 999,
|
|
3708
|
+
borderRadius: 6,
|
|
3709
|
+
fontSize: 15,
|
|
3710
|
+
minWidth: r,
|
|
3711
|
+
width: n,
|
|
3712
|
+
padding: "8px 14px",
|
|
3713
|
+
pointerEvents: "auto",
|
|
3714
|
+
textAlign: "center",
|
|
3715
|
+
animation: "fadeInUp 0.3s",
|
|
3716
|
+
...y.popover
|
|
3717
|
+
}, E = {
|
|
3718
|
+
position: "absolute",
|
|
3719
|
+
zIndex: 11,
|
|
3720
|
+
width: 0,
|
|
3721
|
+
height: 0
|
|
3722
|
+
};
|
|
3723
|
+
return u === "top" ? (w = {
|
|
3724
|
+
...w,
|
|
3725
|
+
left: "50%",
|
|
3726
|
+
top: -48,
|
|
3727
|
+
transform: "translateX(-50%)"
|
|
3728
|
+
}, E = {
|
|
3729
|
+
...E,
|
|
3730
|
+
left: "50%",
|
|
3731
|
+
bottom: -8,
|
|
3732
|
+
transform: "translateX(-50%)",
|
|
3733
|
+
borderLeft: "8px solid transparent",
|
|
3734
|
+
borderRight: "8px solid transparent",
|
|
3735
|
+
borderTop: `8px solid ${y.arrow.top}`
|
|
3736
|
+
}) : u === "bottom" ? (w = {
|
|
3737
|
+
...w,
|
|
3738
|
+
left: "50%",
|
|
3739
|
+
top: "100%",
|
|
3740
|
+
marginTop: o,
|
|
3741
|
+
transform: "translateX(-50%)"
|
|
3742
|
+
}, E = {
|
|
3743
|
+
...E,
|
|
3744
|
+
left: "50%",
|
|
3745
|
+
top: -8,
|
|
3746
|
+
transform: "translateX(-50%)",
|
|
3747
|
+
borderLeft: "8px solid transparent",
|
|
3748
|
+
borderRight: "8px solid transparent",
|
|
3749
|
+
borderBottom: `8px solid ${y.arrow.bottom}`
|
|
3750
|
+
}) : u === "leftTop" ? (w = {
|
|
3751
|
+
...w,
|
|
3752
|
+
right: "100%",
|
|
3753
|
+
top: 0,
|
|
3754
|
+
marginRight: i,
|
|
3755
|
+
transform: "none"
|
|
3756
|
+
}, E = {
|
|
3757
|
+
...E,
|
|
3758
|
+
right: -8,
|
|
3759
|
+
top: 12,
|
|
3760
|
+
borderTop: "8px solid transparent",
|
|
3761
|
+
borderBottom: "8px solid transparent",
|
|
3762
|
+
borderLeft: `8px solid ${y.arrow.left}`
|
|
3763
|
+
}) : u === "rightTop" && (w = {
|
|
3764
|
+
...w,
|
|
3765
|
+
left: "100%",
|
|
3766
|
+
top: 0,
|
|
3767
|
+
marginLeft: i,
|
|
3768
|
+
transform: "translateY(0)"
|
|
3769
|
+
// 右上角对齐
|
|
3770
|
+
}, E = {
|
|
3771
|
+
...E,
|
|
3772
|
+
left: -8,
|
|
3773
|
+
top: 12,
|
|
3774
|
+
borderTop: "8px solid transparent",
|
|
3775
|
+
borderBottom: "8px solid transparent",
|
|
3776
|
+
borderRight: `8px solid ${y.arrow.right}`
|
|
3777
|
+
}), /* @__PURE__ */ m(
|
|
3778
|
+
"div",
|
|
3779
|
+
{
|
|
3780
|
+
ref: c,
|
|
3781
|
+
style: { position: "relative", display: "inline-block" },
|
|
3782
|
+
onMouseEnter: b,
|
|
3783
|
+
onMouseLeave: g,
|
|
3784
|
+
children: [
|
|
3785
|
+
t,
|
|
3786
|
+
a && /* @__PURE__ */ m(
|
|
3787
|
+
"div",
|
|
3788
|
+
{
|
|
3789
|
+
style: w,
|
|
3790
|
+
onMouseEnter: b,
|
|
3791
|
+
onMouseLeave: g,
|
|
3792
|
+
children: [
|
|
3793
|
+
e,
|
|
3794
|
+
/* @__PURE__ */ m("div", { style: E })
|
|
3795
|
+
]
|
|
3796
|
+
}
|
|
3797
|
+
)
|
|
3798
|
+
]
|
|
3799
|
+
}
|
|
3800
|
+
);
|
|
3801
|
+
};
|
|
3802
|
+
function Ct(e) {
|
|
3803
|
+
return e.toLocaleString("en-US", {
|
|
3804
|
+
minimumFractionDigits: 2,
|
|
3805
|
+
maximumFractionDigits: 2
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3808
|
+
const No = {
|
|
3809
|
+
white: {
|
|
3810
|
+
popoverTitle: {
|
|
3811
|
+
fontSize: 16,
|
|
3812
|
+
fontWeight: 600,
|
|
3813
|
+
color: "#222",
|
|
3814
|
+
marginBottom: 16,
|
|
3815
|
+
textAlign: "center"
|
|
3816
|
+
},
|
|
3817
|
+
detailRow: {
|
|
3818
|
+
display: "flex",
|
|
3819
|
+
justifyContent: "space-between",
|
|
3820
|
+
alignItems: "center",
|
|
3821
|
+
padding: "8px 0",
|
|
3822
|
+
borderBottom: "1px solid #e5e7eb",
|
|
3823
|
+
fontSize: 15
|
|
3824
|
+
},
|
|
3825
|
+
detailLabel: {
|
|
3826
|
+
display: "flex",
|
|
3827
|
+
alignItems: "center",
|
|
3828
|
+
color: "#6b7280",
|
|
3829
|
+
fontWeight: 500
|
|
3830
|
+
},
|
|
3831
|
+
detailDot: (e) => ({
|
|
3832
|
+
display: "inline-block",
|
|
3833
|
+
width: 8,
|
|
3834
|
+
height: 8,
|
|
3835
|
+
borderRadius: "50%",
|
|
3836
|
+
background: e,
|
|
3837
|
+
marginRight: 8
|
|
3838
|
+
}),
|
|
3839
|
+
detailValue: (e) => ({
|
|
3840
|
+
color: e,
|
|
3841
|
+
fontWeight: 600,
|
|
3842
|
+
fontSize: 15
|
|
3843
|
+
}),
|
|
3844
|
+
main: {
|
|
3845
|
+
fontSize: 24,
|
|
3846
|
+
fontWeight: 800,
|
|
3847
|
+
color: "#111827",
|
|
3848
|
+
display: "inline-block"
|
|
3849
|
+
},
|
|
3850
|
+
currency: {
|
|
3851
|
+
fontSize: 18,
|
|
3852
|
+
color: "#6b7280",
|
|
3853
|
+
marginLeft: 8,
|
|
3854
|
+
fontWeight: 600
|
|
3855
|
+
}
|
|
3856
|
+
},
|
|
3857
|
+
dark: {
|
|
3858
|
+
popoverTitle: {
|
|
3859
|
+
fontSize: 16,
|
|
3860
|
+
fontWeight: 600,
|
|
3861
|
+
color: "#fff",
|
|
3862
|
+
marginBottom: 16,
|
|
3863
|
+
textAlign: "center"
|
|
3864
|
+
},
|
|
3865
|
+
detailRow: {
|
|
3866
|
+
display: "flex",
|
|
3867
|
+
justifyContent: "space-between",
|
|
3868
|
+
alignItems: "center",
|
|
3869
|
+
padding: "8px 0",
|
|
3870
|
+
borderBottom: "1px solid #23262F",
|
|
3871
|
+
fontSize: 15
|
|
3872
|
+
},
|
|
3873
|
+
detailLabel: {
|
|
3874
|
+
display: "flex",
|
|
3875
|
+
alignItems: "center",
|
|
3876
|
+
color: "#B5B8BE",
|
|
3877
|
+
fontWeight: 500
|
|
3878
|
+
},
|
|
3879
|
+
detailDot: (e) => ({
|
|
3880
|
+
display: "inline-block",
|
|
3881
|
+
width: 8,
|
|
3882
|
+
height: 8,
|
|
3883
|
+
borderRadius: "50%",
|
|
3884
|
+
background: e,
|
|
3885
|
+
marginRight: 8
|
|
3886
|
+
}),
|
|
3887
|
+
detailValue: (e) => ({
|
|
3888
|
+
color: e,
|
|
3889
|
+
fontWeight: 600,
|
|
3890
|
+
fontSize: 15
|
|
3891
|
+
}),
|
|
3892
|
+
main: {
|
|
3893
|
+
fontSize: 24,
|
|
3894
|
+
fontWeight: 800,
|
|
3895
|
+
color: "#fff",
|
|
3896
|
+
display: "inline-block"
|
|
3897
|
+
},
|
|
3898
|
+
currency: {
|
|
3899
|
+
fontSize: 18,
|
|
3900
|
+
color: "#B5B8BE",
|
|
3901
|
+
marginLeft: 8,
|
|
3902
|
+
fontWeight: 600
|
|
3903
|
+
}
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3906
|
+
function Io(e) {
|
|
3907
|
+
const [t, n] = P({
|
|
3908
|
+
available: 0,
|
|
3909
|
+
currency: "USD",
|
|
3910
|
+
symbol: "$",
|
|
3911
|
+
details: [
|
|
3912
|
+
{ label: S("真实金额"), value: 0, color: "#15b36b", dot: "#15b36b" },
|
|
3913
|
+
{ label: S("冻结金额"), value: 0, color: "#f59e0b", dot: "#f59e0b" },
|
|
3914
|
+
{ label: S("总可用"), value: 0, color: "#1890ff", dot: "#15b36b" }
|
|
3915
|
+
]
|
|
3916
|
+
});
|
|
3917
|
+
Ae(() => {
|
|
3918
|
+
(async () => {
|
|
3919
|
+
try {
|
|
3920
|
+
const a = await ao(), l = {
|
|
3921
|
+
available: a.availableAmount,
|
|
3922
|
+
currency: "USD",
|
|
3923
|
+
// 可以根据实际 API 返回调整
|
|
3924
|
+
symbol: "$",
|
|
3925
|
+
details: [
|
|
3926
|
+
{
|
|
3927
|
+
label: S("真实金额"),
|
|
3928
|
+
value: a.availableAmount,
|
|
3929
|
+
color: "#15b36b",
|
|
3930
|
+
dot: "#15b36b"
|
|
3931
|
+
},
|
|
3932
|
+
{
|
|
3933
|
+
label: S("冻结金额"),
|
|
3934
|
+
value: a.frozenAmount,
|
|
3935
|
+
color: "#f59e0b",
|
|
3936
|
+
dot: "#f59e0b"
|
|
3937
|
+
},
|
|
3938
|
+
{
|
|
3939
|
+
label: S("总可用"),
|
|
3940
|
+
value: a.totalAmount,
|
|
3941
|
+
color: "#1890ff",
|
|
3942
|
+
dot: "#15b36b"
|
|
3943
|
+
}
|
|
3944
|
+
]
|
|
3945
|
+
};
|
|
3946
|
+
n(l);
|
|
3947
|
+
} catch (a) {
|
|
3948
|
+
console.error("获取余额失败:", a);
|
|
3949
|
+
}
|
|
3950
|
+
})();
|
|
3951
|
+
}, []);
|
|
3952
|
+
const o = JSON.parse(
|
|
3953
|
+
sessionStorage.getItem("fund_unit_params") || "{}"
|
|
3954
|
+
).theme === H.WHITE, i = No[o ? "white" : "dark"];
|
|
3955
|
+
return /* @__PURE__ */ m(
|
|
3956
|
+
Bo,
|
|
3957
|
+
{
|
|
3958
|
+
popover: /* @__PURE__ */ m(Q, { children: [
|
|
3959
|
+
/* @__PURE__ */ m("div", { style: i.popoverTitle, children: S("余额详情") }),
|
|
3960
|
+
t.details.map((s) => /* @__PURE__ */ m("div", { style: i.detailRow, children: [
|
|
3961
|
+
/* @__PURE__ */ m("span", { style: i.detailLabel, children: [
|
|
3962
|
+
/* @__PURE__ */ m("span", { style: i.detailDot(s.dot) }),
|
|
3963
|
+
s.label
|
|
3964
|
+
] }),
|
|
3965
|
+
/* @__PURE__ */ m("span", { style: i.detailValue(s.color), children: [
|
|
3966
|
+
t.symbol,
|
|
3967
|
+
Ct(s.value)
|
|
3968
|
+
] })
|
|
3969
|
+
] }, s.label))
|
|
3970
|
+
] }),
|
|
3971
|
+
popoverPosition: e.popoverPosition || "bottom",
|
|
3972
|
+
children: /* @__PURE__ */ m("div", { style: i.main, children: [
|
|
3973
|
+
t.symbol,
|
|
3974
|
+
Ct(t.available),
|
|
3975
|
+
/* @__PURE__ */ m("span", { style: i.currency, children: t.currency })
|
|
3976
|
+
] })
|
|
3977
|
+
}
|
|
3978
|
+
);
|
|
3979
|
+
}
|
|
3980
|
+
bn(Io, "best-statistical-balance");
|
|
3981
|
+
const oi = ["best-recharge", "best-statistical-balance"];
|
|
3982
|
+
export {
|
|
3983
|
+
oi as components,
|
|
3984
|
+
ni as initFundUnit,
|
|
3985
|
+
Do as npmTest,
|
|
3986
|
+
Uo as printCurrentTime,
|
|
3987
|
+
ri as viteProxy
|
|
3988
|
+
};
|