@libretexts/cxone-expert-node 1.3.0 → 1.4.0
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 +8 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1640 -1221
- package/dist/modules/pages.d.ts +11 -3
- package/dist/modules/pages.d.ts.map +1 -1
- package/dist/modules/requests.d.ts +3 -1
- package/dist/modules/requests.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createHmac as
|
|
2
|
-
class
|
|
1
|
+
import { createHmac as Ct } from "crypto";
|
|
2
|
+
class et {
|
|
3
3
|
token = null;
|
|
4
4
|
BrowserToken({ key: e }) {
|
|
5
5
|
return this.token = e, this;
|
|
@@ -7,10 +7,10 @@ class We {
|
|
|
7
7
|
ServerToken({ key: e, secret: t, user: s }) {
|
|
8
8
|
if (!e || !t || !s)
|
|
9
9
|
throw new Error("Missing required parameters: key, secret, user");
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const o =
|
|
13
|
-
return this.token = `${e}_${
|
|
10
|
+
const r = Math.floor(Date.now() / 1e3), n = Ct("sha256", t);
|
|
11
|
+
n.update(`${e}${r}=${s}`);
|
|
12
|
+
const o = n.digest("hex");
|
|
13
|
+
return this.token = `${e}_${r}_=${s}_${o}`, this;
|
|
14
14
|
}
|
|
15
15
|
getToken() {
|
|
16
16
|
return this.token;
|
|
@@ -21,180 +21,505 @@ class We {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function Ft(a) {
|
|
25
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
26
|
+
}
|
|
27
|
+
var re = { exports: {} }, fe, Ue;
|
|
28
|
+
function Et() {
|
|
29
|
+
if (Ue) return fe;
|
|
30
|
+
Ue = 1;
|
|
31
|
+
var a = 1e3, e = a * 60, t = e * 60, s = t * 24, r = s * 7, n = s * 365.25;
|
|
32
|
+
fe = function(u, h) {
|
|
33
|
+
h = h || {};
|
|
34
|
+
var m = typeof u;
|
|
35
|
+
if (m === "string" && u.length > 0)
|
|
36
|
+
return o(u);
|
|
37
|
+
if (m === "number" && isFinite(u))
|
|
38
|
+
return h.long ? l(u) : i(u);
|
|
39
|
+
throw new Error(
|
|
40
|
+
"val is not a non-empty string or a valid number. val=" + JSON.stringify(u)
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
function o(u) {
|
|
44
|
+
if (u = String(u), !(u.length > 100)) {
|
|
45
|
+
var h = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
46
|
+
u
|
|
47
|
+
);
|
|
48
|
+
if (h) {
|
|
49
|
+
var m = parseFloat(h[1]), q = (h[2] || "ms").toLowerCase();
|
|
50
|
+
switch (q) {
|
|
51
|
+
case "years":
|
|
52
|
+
case "year":
|
|
53
|
+
case "yrs":
|
|
54
|
+
case "yr":
|
|
55
|
+
case "y":
|
|
56
|
+
return m * n;
|
|
57
|
+
case "weeks":
|
|
58
|
+
case "week":
|
|
59
|
+
case "w":
|
|
60
|
+
return m * r;
|
|
61
|
+
case "days":
|
|
62
|
+
case "day":
|
|
63
|
+
case "d":
|
|
64
|
+
return m * s;
|
|
65
|
+
case "hours":
|
|
66
|
+
case "hour":
|
|
67
|
+
case "hrs":
|
|
68
|
+
case "hr":
|
|
69
|
+
case "h":
|
|
70
|
+
return m * t;
|
|
71
|
+
case "minutes":
|
|
72
|
+
case "minute":
|
|
73
|
+
case "mins":
|
|
74
|
+
case "min":
|
|
75
|
+
case "m":
|
|
76
|
+
return m * e;
|
|
77
|
+
case "seconds":
|
|
78
|
+
case "second":
|
|
79
|
+
case "secs":
|
|
80
|
+
case "sec":
|
|
81
|
+
case "s":
|
|
82
|
+
return m * a;
|
|
83
|
+
case "milliseconds":
|
|
84
|
+
case "millisecond":
|
|
85
|
+
case "msecs":
|
|
86
|
+
case "msec":
|
|
87
|
+
case "ms":
|
|
88
|
+
return m;
|
|
89
|
+
default:
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function i(u) {
|
|
96
|
+
var h = Math.abs(u);
|
|
97
|
+
return h >= s ? Math.round(u / s) + "d" : h >= t ? Math.round(u / t) + "h" : h >= e ? Math.round(u / e) + "m" : h >= a ? Math.round(u / a) + "s" : u + "ms";
|
|
98
|
+
}
|
|
99
|
+
function l(u) {
|
|
100
|
+
var h = Math.abs(u);
|
|
101
|
+
return h >= s ? d(u, h, s, "day") : h >= t ? d(u, h, t, "hour") : h >= e ? d(u, h, e, "minute") : h >= a ? d(u, h, a, "second") : u + " ms";
|
|
102
|
+
}
|
|
103
|
+
function d(u, h, m, q) {
|
|
104
|
+
var f = h >= m * 1.5;
|
|
105
|
+
return Math.round(u / m) + " " + q + (f ? "s" : "");
|
|
106
|
+
}
|
|
107
|
+
return fe;
|
|
108
|
+
}
|
|
109
|
+
var be, De;
|
|
110
|
+
function St() {
|
|
111
|
+
if (De) return be;
|
|
112
|
+
De = 1;
|
|
113
|
+
function a(e) {
|
|
114
|
+
s.debug = s, s.default = s, s.coerce = d, s.disable = i, s.enable = n, s.enabled = l, s.humanize = Et(), s.destroy = u, Object.keys(e).forEach((h) => {
|
|
115
|
+
s[h] = e[h];
|
|
116
|
+
}), s.names = [], s.skips = [], s.formatters = {};
|
|
117
|
+
function t(h) {
|
|
118
|
+
let m = 0;
|
|
119
|
+
for (let q = 0; q < h.length; q++)
|
|
120
|
+
m = (m << 5) - m + h.charCodeAt(q), m |= 0;
|
|
121
|
+
return s.colors[Math.abs(m) % s.colors.length];
|
|
122
|
+
}
|
|
123
|
+
s.selectColor = t;
|
|
124
|
+
function s(h) {
|
|
125
|
+
let m, q = null, f, y;
|
|
126
|
+
function b(...R) {
|
|
127
|
+
if (!b.enabled)
|
|
128
|
+
return;
|
|
129
|
+
const F = b, I = Number(/* @__PURE__ */ new Date()), E = I - (m || I);
|
|
130
|
+
F.diff = E, F.prev = m, F.curr = I, m = I, R[0] = s.coerce(R[0]), typeof R[0] != "string" && R.unshift("%O");
|
|
131
|
+
let S = 0;
|
|
132
|
+
R[0] = R[0].replace(/%([a-zA-Z%])/g, (T, J) => {
|
|
133
|
+
if (T === "%%")
|
|
134
|
+
return "%";
|
|
135
|
+
S++;
|
|
136
|
+
const L = s.formatters[J];
|
|
137
|
+
if (typeof L == "function") {
|
|
138
|
+
const ee = R[S];
|
|
139
|
+
T = L.call(F, ee), R.splice(S, 1), S--;
|
|
140
|
+
}
|
|
141
|
+
return T;
|
|
142
|
+
}), s.formatArgs.call(F, R), (F.log || s.log).apply(F, R);
|
|
143
|
+
}
|
|
144
|
+
return b.namespace = h, b.useColors = s.useColors(), b.color = s.selectColor(h), b.extend = r, b.destroy = s.destroy, Object.defineProperty(b, "enabled", {
|
|
145
|
+
enumerable: !0,
|
|
146
|
+
configurable: !1,
|
|
147
|
+
get: () => q !== null ? q : (f !== s.namespaces && (f = s.namespaces, y = s.enabled(h)), y),
|
|
148
|
+
set: (R) => {
|
|
149
|
+
q = R;
|
|
150
|
+
}
|
|
151
|
+
}), typeof s.init == "function" && s.init(b), b;
|
|
152
|
+
}
|
|
153
|
+
function r(h, m) {
|
|
154
|
+
const q = s(this.namespace + (typeof m > "u" ? ":" : m) + h);
|
|
155
|
+
return q.log = this.log, q;
|
|
156
|
+
}
|
|
157
|
+
function n(h) {
|
|
158
|
+
s.save(h), s.namespaces = h, s.names = [], s.skips = [];
|
|
159
|
+
const m = (typeof h == "string" ? h : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
160
|
+
for (const q of m)
|
|
161
|
+
q[0] === "-" ? s.skips.push(q.slice(1)) : s.names.push(q);
|
|
162
|
+
}
|
|
163
|
+
function o(h, m) {
|
|
164
|
+
let q = 0, f = 0, y = -1, b = 0;
|
|
165
|
+
for (; q < h.length; )
|
|
166
|
+
if (f < m.length && (m[f] === h[q] || m[f] === "*"))
|
|
167
|
+
m[f] === "*" ? (y = f, b = q, f++) : (q++, f++);
|
|
168
|
+
else if (y !== -1)
|
|
169
|
+
f = y + 1, b++, q = b;
|
|
170
|
+
else
|
|
171
|
+
return !1;
|
|
172
|
+
for (; f < m.length && m[f] === "*"; )
|
|
173
|
+
f++;
|
|
174
|
+
return f === m.length;
|
|
175
|
+
}
|
|
176
|
+
function i() {
|
|
177
|
+
const h = [
|
|
178
|
+
...s.names,
|
|
179
|
+
...s.skips.map((m) => "-" + m)
|
|
180
|
+
].join(",");
|
|
181
|
+
return s.enable(""), h;
|
|
182
|
+
}
|
|
183
|
+
function l(h) {
|
|
184
|
+
for (const m of s.skips)
|
|
185
|
+
if (o(h, m))
|
|
186
|
+
return !1;
|
|
187
|
+
for (const m of s.names)
|
|
188
|
+
if (o(h, m))
|
|
189
|
+
return !0;
|
|
190
|
+
return !1;
|
|
191
|
+
}
|
|
192
|
+
function d(h) {
|
|
193
|
+
return h instanceof Error ? h.stack || h.message : h;
|
|
194
|
+
}
|
|
195
|
+
function u() {
|
|
196
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
197
|
+
}
|
|
198
|
+
return s.enable(s.load()), s;
|
|
199
|
+
}
|
|
200
|
+
return be = a, be;
|
|
201
|
+
}
|
|
202
|
+
var ke;
|
|
203
|
+
function Tt() {
|
|
204
|
+
return ke || (ke = 1, (function(a, e) {
|
|
205
|
+
e.formatArgs = s, e.save = r, e.load = n, e.useColors = t, e.storage = o(), e.destroy = /* @__PURE__ */ (() => {
|
|
206
|
+
let l = !1;
|
|
207
|
+
return () => {
|
|
208
|
+
l || (l = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
209
|
+
};
|
|
210
|
+
})(), e.colors = [
|
|
211
|
+
"#0000CC",
|
|
212
|
+
"#0000FF",
|
|
213
|
+
"#0033CC",
|
|
214
|
+
"#0033FF",
|
|
215
|
+
"#0066CC",
|
|
216
|
+
"#0066FF",
|
|
217
|
+
"#0099CC",
|
|
218
|
+
"#0099FF",
|
|
219
|
+
"#00CC00",
|
|
220
|
+
"#00CC33",
|
|
221
|
+
"#00CC66",
|
|
222
|
+
"#00CC99",
|
|
223
|
+
"#00CCCC",
|
|
224
|
+
"#00CCFF",
|
|
225
|
+
"#3300CC",
|
|
226
|
+
"#3300FF",
|
|
227
|
+
"#3333CC",
|
|
228
|
+
"#3333FF",
|
|
229
|
+
"#3366CC",
|
|
230
|
+
"#3366FF",
|
|
231
|
+
"#3399CC",
|
|
232
|
+
"#3399FF",
|
|
233
|
+
"#33CC00",
|
|
234
|
+
"#33CC33",
|
|
235
|
+
"#33CC66",
|
|
236
|
+
"#33CC99",
|
|
237
|
+
"#33CCCC",
|
|
238
|
+
"#33CCFF",
|
|
239
|
+
"#6600CC",
|
|
240
|
+
"#6600FF",
|
|
241
|
+
"#6633CC",
|
|
242
|
+
"#6633FF",
|
|
243
|
+
"#66CC00",
|
|
244
|
+
"#66CC33",
|
|
245
|
+
"#9900CC",
|
|
246
|
+
"#9900FF",
|
|
247
|
+
"#9933CC",
|
|
248
|
+
"#9933FF",
|
|
249
|
+
"#99CC00",
|
|
250
|
+
"#99CC33",
|
|
251
|
+
"#CC0000",
|
|
252
|
+
"#CC0033",
|
|
253
|
+
"#CC0066",
|
|
254
|
+
"#CC0099",
|
|
255
|
+
"#CC00CC",
|
|
256
|
+
"#CC00FF",
|
|
257
|
+
"#CC3300",
|
|
258
|
+
"#CC3333",
|
|
259
|
+
"#CC3366",
|
|
260
|
+
"#CC3399",
|
|
261
|
+
"#CC33CC",
|
|
262
|
+
"#CC33FF",
|
|
263
|
+
"#CC6600",
|
|
264
|
+
"#CC6633",
|
|
265
|
+
"#CC9900",
|
|
266
|
+
"#CC9933",
|
|
267
|
+
"#CCCC00",
|
|
268
|
+
"#CCCC33",
|
|
269
|
+
"#FF0000",
|
|
270
|
+
"#FF0033",
|
|
271
|
+
"#FF0066",
|
|
272
|
+
"#FF0099",
|
|
273
|
+
"#FF00CC",
|
|
274
|
+
"#FF00FF",
|
|
275
|
+
"#FF3300",
|
|
276
|
+
"#FF3333",
|
|
277
|
+
"#FF3366",
|
|
278
|
+
"#FF3399",
|
|
279
|
+
"#FF33CC",
|
|
280
|
+
"#FF33FF",
|
|
281
|
+
"#FF6600",
|
|
282
|
+
"#FF6633",
|
|
283
|
+
"#FF9900",
|
|
284
|
+
"#FF9933",
|
|
285
|
+
"#FFCC00",
|
|
286
|
+
"#FFCC33"
|
|
287
|
+
];
|
|
288
|
+
function t() {
|
|
289
|
+
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs))
|
|
290
|
+
return !0;
|
|
291
|
+
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))
|
|
292
|
+
return !1;
|
|
293
|
+
let l;
|
|
294
|
+
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
295
|
+
typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
296
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
297
|
+
typeof navigator < "u" && navigator.userAgent && (l = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(l[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
298
|
+
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
299
|
+
}
|
|
300
|
+
function s(l) {
|
|
301
|
+
if (l[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + l[0] + (this.useColors ? "%c " : " ") + "+" + a.exports.humanize(this.diff), !this.useColors)
|
|
302
|
+
return;
|
|
303
|
+
const d = "color: " + this.color;
|
|
304
|
+
l.splice(1, 0, d, "color: inherit");
|
|
305
|
+
let u = 0, h = 0;
|
|
306
|
+
l[0].replace(/%[a-zA-Z%]/g, (m) => {
|
|
307
|
+
m !== "%%" && (u++, m === "%c" && (h = u));
|
|
308
|
+
}), l.splice(h, 0, d);
|
|
309
|
+
}
|
|
310
|
+
e.log = console.debug || console.log || (() => {
|
|
311
|
+
});
|
|
312
|
+
function r(l) {
|
|
313
|
+
try {
|
|
314
|
+
l ? e.storage.setItem("debug", l) : e.storage.removeItem("debug");
|
|
315
|
+
} catch {
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
function n() {
|
|
319
|
+
let l;
|
|
320
|
+
try {
|
|
321
|
+
l = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
|
|
322
|
+
} catch {
|
|
323
|
+
}
|
|
324
|
+
return !l && typeof process < "u" && "env" in process && (l = process.env.DEBUG), l;
|
|
325
|
+
}
|
|
326
|
+
function o() {
|
|
327
|
+
try {
|
|
328
|
+
return localStorage;
|
|
329
|
+
} catch {
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
a.exports = St()(e);
|
|
333
|
+
const { formatters: i } = a.exports;
|
|
334
|
+
i.j = function(l) {
|
|
335
|
+
try {
|
|
336
|
+
return JSON.stringify(l);
|
|
337
|
+
} catch (d) {
|
|
338
|
+
return "[UnexpectedJSONParseError]: " + d.message;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
})(re, re.exports)), re.exports;
|
|
342
|
+
}
|
|
343
|
+
var xt = Tt();
|
|
344
|
+
const Ot = /* @__PURE__ */ Ft(xt);
|
|
345
|
+
function Ce(a, e) {
|
|
346
|
+
const t = Ot(a);
|
|
347
|
+
return e !== void 0 && (t.enabled = e), t;
|
|
348
|
+
}
|
|
349
|
+
function p(a, e) {
|
|
350
|
+
if (!e && !a.tld)
|
|
26
351
|
throw new Error("TLD is required");
|
|
27
|
-
return e ??
|
|
352
|
+
return e ?? a.tld;
|
|
28
353
|
}
|
|
29
|
-
function
|
|
354
|
+
function g(a, e) {
|
|
30
355
|
if (e)
|
|
31
356
|
return e;
|
|
32
|
-
if (
|
|
33
|
-
const t = new
|
|
34
|
-
if (
|
|
35
|
-
return t.ServerToken(
|
|
36
|
-
if (
|
|
37
|
-
return t.BrowserToken(
|
|
357
|
+
if (a.auth) {
|
|
358
|
+
const t = new et();
|
|
359
|
+
if (a.auth.type === "server")
|
|
360
|
+
return t.ServerToken(a.auth.params).getHeader();
|
|
361
|
+
if (a.auth.type === "browser")
|
|
362
|
+
return t.BrowserToken(a.auth.params).getHeader();
|
|
38
363
|
}
|
|
39
364
|
throw new Error("Authentication is required. Configure auth in Expert constructor or pass auth to method call.");
|
|
40
365
|
}
|
|
41
|
-
function
|
|
366
|
+
function tt(a, e) {
|
|
42
367
|
return function() {
|
|
43
|
-
return
|
|
368
|
+
return a.apply(e, arguments);
|
|
44
369
|
};
|
|
45
370
|
}
|
|
46
|
-
const { toString:
|
|
47
|
-
const t =
|
|
48
|
-
return
|
|
49
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
50
|
-
function
|
|
51
|
-
return
|
|
371
|
+
const { toString: $t } = Object.prototype, { getPrototypeOf: Fe } = Object, { iterator: ue, toStringTag: st } = Symbol, ce = /* @__PURE__ */ ((a) => (e) => {
|
|
372
|
+
const t = $t.call(e);
|
|
373
|
+
return a[t] || (a[t] = t.slice(8, -1).toLowerCase());
|
|
374
|
+
})(/* @__PURE__ */ Object.create(null)), v = (a) => (a = a.toLowerCase(), (e) => ce(e) === a), de = (a) => (e) => typeof e === a, { isArray: z } = Array, K = de("undefined");
|
|
375
|
+
function G(a) {
|
|
376
|
+
return a !== null && !K(a) && a.constructor !== null && !K(a.constructor) && $(a.constructor.isBuffer) && a.constructor.isBuffer(a);
|
|
52
377
|
}
|
|
53
|
-
const
|
|
54
|
-
function
|
|
378
|
+
const rt = v("ArrayBuffer");
|
|
379
|
+
function _t(a) {
|
|
55
380
|
let e;
|
|
56
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(
|
|
381
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(a) : e = a && a.buffer && rt(a.buffer), e;
|
|
57
382
|
}
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
383
|
+
const Nt = de("string"), $ = de("function"), at = de("number"), X = (a) => a !== null && typeof a == "object", vt = (a) => a === !0 || a === !1, ne = (a) => {
|
|
384
|
+
if (ce(a) !== "object")
|
|
60
385
|
return !1;
|
|
61
|
-
const e =
|
|
62
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
63
|
-
},
|
|
64
|
-
if (!
|
|
386
|
+
const e = Fe(a);
|
|
387
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(st in a) && !(ue in a);
|
|
388
|
+
}, Ut = (a) => {
|
|
389
|
+
if (!X(a) || G(a))
|
|
65
390
|
return !1;
|
|
66
391
|
try {
|
|
67
|
-
return Object.keys(
|
|
392
|
+
return Object.keys(a).length === 0 && Object.getPrototypeOf(a) === Object.prototype;
|
|
68
393
|
} catch {
|
|
69
394
|
return !1;
|
|
70
395
|
}
|
|
71
|
-
},
|
|
396
|
+
}, Dt = v("Date"), kt = v("File"), Lt = v("Blob"), Bt = v("FileList"), At = (a) => X(a) && $(a.pipe), jt = (a) => {
|
|
72
397
|
let e;
|
|
73
|
-
return
|
|
74
|
-
e === "object" &&
|
|
75
|
-
},
|
|
398
|
+
return a && (typeof FormData == "function" && a instanceof FormData || $(a.append) && ((e = ce(a)) === "formdata" || // detect form-data instance
|
|
399
|
+
e === "object" && $(a.toString) && a.toString() === "[object FormData]"));
|
|
400
|
+
}, Mt = v("URLSearchParams"), [Ht, Kt, zt, Jt] = [
|
|
76
401
|
"ReadableStream",
|
|
77
402
|
"Request",
|
|
78
403
|
"Response",
|
|
79
404
|
"Headers"
|
|
80
|
-
].map(
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
405
|
+
].map(v), Wt = (a) => a.trim ? a.trim() : a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
406
|
+
function Q(a, e, { allOwnKeys: t = !1 } = {}) {
|
|
407
|
+
if (a === null || typeof a > "u")
|
|
83
408
|
return;
|
|
84
|
-
let s,
|
|
85
|
-
if (typeof
|
|
86
|
-
for (s = 0,
|
|
87
|
-
e.call(null,
|
|
409
|
+
let s, r;
|
|
410
|
+
if (typeof a != "object" && (a = [a]), z(a))
|
|
411
|
+
for (s = 0, r = a.length; s < r; s++)
|
|
412
|
+
e.call(null, a[s], s, a);
|
|
88
413
|
else {
|
|
89
|
-
if (
|
|
414
|
+
if (G(a))
|
|
90
415
|
return;
|
|
91
|
-
const
|
|
416
|
+
const n = t ? Object.getOwnPropertyNames(a) : Object.keys(a), o = n.length;
|
|
92
417
|
let i;
|
|
93
418
|
for (s = 0; s < o; s++)
|
|
94
|
-
i =
|
|
419
|
+
i = n[s], e.call(null, a[i], i, a);
|
|
95
420
|
}
|
|
96
421
|
}
|
|
97
|
-
function
|
|
98
|
-
if (
|
|
422
|
+
function nt(a, e) {
|
|
423
|
+
if (G(a))
|
|
99
424
|
return null;
|
|
100
425
|
e = e.toLowerCase();
|
|
101
|
-
const t = Object.keys(
|
|
102
|
-
let s = t.length,
|
|
426
|
+
const t = Object.keys(a);
|
|
427
|
+
let s = t.length, r;
|
|
103
428
|
for (; s-- > 0; )
|
|
104
|
-
if (
|
|
105
|
-
return
|
|
429
|
+
if (r = t[s], e === r.toLowerCase())
|
|
430
|
+
return r;
|
|
106
431
|
return null;
|
|
107
432
|
}
|
|
108
|
-
const
|
|
109
|
-
function
|
|
110
|
-
const { caseless:
|
|
111
|
-
if (
|
|
433
|
+
const A = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (a) => !K(a) && a !== A;
|
|
434
|
+
function Pe() {
|
|
435
|
+
const { caseless: a, skipUndefined: e } = ot(this) && this || {}, t = {}, s = (r, n) => {
|
|
436
|
+
if (n === "__proto__" || n === "constructor" || n === "prototype")
|
|
112
437
|
return;
|
|
113
|
-
const o =
|
|
114
|
-
|
|
438
|
+
const o = a && nt(t, n) || n;
|
|
439
|
+
ne(t[o]) && ne(r) ? t[o] = Pe(t[o], r) : ne(r) ? t[o] = Pe({}, r) : z(r) ? t[o] = r.slice() : (!e || !K(r)) && (t[o] = r);
|
|
115
440
|
};
|
|
116
|
-
for (let
|
|
117
|
-
arguments[
|
|
441
|
+
for (let r = 0, n = arguments.length; r < n; r++)
|
|
442
|
+
arguments[r] && Q(arguments[r], s);
|
|
118
443
|
return t;
|
|
119
444
|
}
|
|
120
|
-
const
|
|
445
|
+
const Vt = (a, e, t, { allOwnKeys: s } = {}) => (Q(
|
|
121
446
|
e,
|
|
122
|
-
(
|
|
123
|
-
t &&
|
|
124
|
-
value:
|
|
447
|
+
(r, n) => {
|
|
448
|
+
t && $(r) ? Object.defineProperty(a, n, {
|
|
449
|
+
value: tt(r, t),
|
|
125
450
|
writable: !0,
|
|
126
451
|
enumerable: !0,
|
|
127
452
|
configurable: !0
|
|
128
|
-
}) : Object.defineProperty(
|
|
129
|
-
value:
|
|
453
|
+
}) : Object.defineProperty(a, n, {
|
|
454
|
+
value: r,
|
|
130
455
|
writable: !0,
|
|
131
456
|
enumerable: !0,
|
|
132
457
|
configurable: !0
|
|
133
458
|
});
|
|
134
459
|
},
|
|
135
460
|
{ allOwnKeys: s }
|
|
136
|
-
),
|
|
137
|
-
|
|
461
|
+
), a), Gt = (a) => (a.charCodeAt(0) === 65279 && (a = a.slice(1)), a), Xt = (a, e, t, s) => {
|
|
462
|
+
a.prototype = Object.create(
|
|
138
463
|
e.prototype,
|
|
139
464
|
s
|
|
140
|
-
), Object.defineProperty(
|
|
141
|
-
value:
|
|
465
|
+
), Object.defineProperty(a.prototype, "constructor", {
|
|
466
|
+
value: a,
|
|
142
467
|
writable: !0,
|
|
143
468
|
enumerable: !1,
|
|
144
469
|
configurable: !0
|
|
145
|
-
}), Object.defineProperty(
|
|
470
|
+
}), Object.defineProperty(a, "super", {
|
|
146
471
|
value: e.prototype
|
|
147
|
-
}), t && Object.assign(
|
|
148
|
-
},
|
|
149
|
-
let
|
|
472
|
+
}), t && Object.assign(a.prototype, t);
|
|
473
|
+
}, Qt = (a, e, t, s) => {
|
|
474
|
+
let r, n, o;
|
|
150
475
|
const i = {};
|
|
151
|
-
if (e = e || {},
|
|
476
|
+
if (e = e || {}, a == null) return e;
|
|
152
477
|
do {
|
|
153
|
-
for (
|
|
154
|
-
o = n
|
|
155
|
-
|
|
156
|
-
} while (
|
|
478
|
+
for (r = Object.getOwnPropertyNames(a), n = r.length; n-- > 0; )
|
|
479
|
+
o = r[n], (!s || s(o, a, e)) && !i[o] && (e[o] = a[o], i[o] = !0);
|
|
480
|
+
a = t !== !1 && Fe(a);
|
|
481
|
+
} while (a && (!t || t(a, e)) && a !== Object.prototype);
|
|
157
482
|
return e;
|
|
158
|
-
},
|
|
159
|
-
|
|
160
|
-
const s =
|
|
483
|
+
}, Zt = (a, e, t) => {
|
|
484
|
+
a = String(a), (t === void 0 || t > a.length) && (t = a.length), t -= e.length;
|
|
485
|
+
const s = a.indexOf(e, t);
|
|
161
486
|
return s !== -1 && s === t;
|
|
162
|
-
},
|
|
163
|
-
if (!
|
|
164
|
-
if (
|
|
165
|
-
let e =
|
|
166
|
-
if (!
|
|
487
|
+
}, Yt = (a) => {
|
|
488
|
+
if (!a) return null;
|
|
489
|
+
if (z(a)) return a;
|
|
490
|
+
let e = a.length;
|
|
491
|
+
if (!at(e)) return null;
|
|
167
492
|
const t = new Array(e);
|
|
168
493
|
for (; e-- > 0; )
|
|
169
|
-
t[e] =
|
|
494
|
+
t[e] = a[e];
|
|
170
495
|
return t;
|
|
171
|
-
},
|
|
172
|
-
const s = (
|
|
173
|
-
let
|
|
174
|
-
for (; (
|
|
175
|
-
const
|
|
176
|
-
e.call(
|
|
177
|
-
}
|
|
178
|
-
},
|
|
496
|
+
}, es = /* @__PURE__ */ ((a) => (e) => a && e instanceof a)(typeof Uint8Array < "u" && Fe(Uint8Array)), ts = (a, e) => {
|
|
497
|
+
const s = (a && a[ue]).call(a);
|
|
498
|
+
let r;
|
|
499
|
+
for (; (r = s.next()) && !r.done; ) {
|
|
500
|
+
const n = r.value;
|
|
501
|
+
e.call(a, n[0], n[1]);
|
|
502
|
+
}
|
|
503
|
+
}, ss = (a, e) => {
|
|
179
504
|
let t;
|
|
180
505
|
const s = [];
|
|
181
|
-
for (; (t =
|
|
506
|
+
for (; (t = a.exec(e)) !== null; )
|
|
182
507
|
s.push(t);
|
|
183
508
|
return s;
|
|
184
|
-
},
|
|
185
|
-
return s.toUpperCase() +
|
|
186
|
-
}),
|
|
187
|
-
const t = Object.getOwnPropertyDescriptors(
|
|
188
|
-
|
|
509
|
+
}, rs = v("HTMLFormElement"), as = (a) => a.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, s, r) {
|
|
510
|
+
return s.toUpperCase() + r;
|
|
511
|
+
}), Le = (({ hasOwnProperty: a }) => (e, t) => a.call(e, t))(Object.prototype), ns = v("RegExp"), it = (a, e) => {
|
|
512
|
+
const t = Object.getOwnPropertyDescriptors(a), s = {};
|
|
513
|
+
Q(t, (r, n) => {
|
|
189
514
|
let o;
|
|
190
|
-
(o = e(n, a
|
|
191
|
-
}), Object.defineProperties(
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
if (
|
|
515
|
+
(o = e(r, n, a)) !== !1 && (s[n] = o || r);
|
|
516
|
+
}), Object.defineProperties(a, s);
|
|
517
|
+
}, os = (a) => {
|
|
518
|
+
it(a, (e, t) => {
|
|
519
|
+
if ($(a) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
195
520
|
return !1;
|
|
196
|
-
const s =
|
|
197
|
-
if (
|
|
521
|
+
const s = a[t];
|
|
522
|
+
if ($(s)) {
|
|
198
523
|
if (e.enumerable = !1, "writable" in e) {
|
|
199
524
|
e.writable = !1;
|
|
200
525
|
return;
|
|
@@ -204,108 +529,108 @@ const Dt = (r, e, t, { allOwnKeys: s } = {}) => (G(
|
|
|
204
529
|
});
|
|
205
530
|
}
|
|
206
531
|
});
|
|
207
|
-
},
|
|
208
|
-
const t = {}, s = (
|
|
209
|
-
|
|
210
|
-
t[
|
|
532
|
+
}, is = (a, e) => {
|
|
533
|
+
const t = {}, s = (r) => {
|
|
534
|
+
r.forEach((n) => {
|
|
535
|
+
t[n] = !0;
|
|
211
536
|
});
|
|
212
537
|
};
|
|
213
|
-
return
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
function
|
|
217
|
-
return !!(
|
|
538
|
+
return z(a) ? s(a) : s(String(a).split(e)), t;
|
|
539
|
+
}, ls = () => {
|
|
540
|
+
}, us = (a, e) => a != null && Number.isFinite(a = +a) ? a : e;
|
|
541
|
+
function cs(a) {
|
|
542
|
+
return !!(a && $(a.append) && a[st] === "FormData" && a[ue]);
|
|
218
543
|
}
|
|
219
|
-
const
|
|
220
|
-
const e = new Array(10), t = (s,
|
|
221
|
-
if (
|
|
544
|
+
const ds = (a) => {
|
|
545
|
+
const e = new Array(10), t = (s, r) => {
|
|
546
|
+
if (X(s)) {
|
|
222
547
|
if (e.indexOf(s) >= 0)
|
|
223
548
|
return;
|
|
224
|
-
if (
|
|
549
|
+
if (G(s))
|
|
225
550
|
return s;
|
|
226
551
|
if (!("toJSON" in s)) {
|
|
227
|
-
e[
|
|
228
|
-
const
|
|
229
|
-
return
|
|
230
|
-
const l = t(o,
|
|
231
|
-
!
|
|
232
|
-
}), e[
|
|
552
|
+
e[r] = s;
|
|
553
|
+
const n = z(s) ? [] : {};
|
|
554
|
+
return Q(s, (o, i) => {
|
|
555
|
+
const l = t(o, r + 1);
|
|
556
|
+
!K(l) && (n[i] = l);
|
|
557
|
+
}), e[r] = void 0, n;
|
|
233
558
|
}
|
|
234
559
|
}
|
|
235
560
|
return s;
|
|
236
561
|
};
|
|
237
|
-
return t(
|
|
238
|
-
},
|
|
562
|
+
return t(a, 0);
|
|
563
|
+
}, hs = v("AsyncFunction"), ps = (a) => a && (X(a) || $(a)) && $(a.then) && $(a.catch), lt = ((a, e) => a ? setImmediate : e ? ((t, s) => (A.addEventListener(
|
|
239
564
|
"message",
|
|
240
|
-
({ source:
|
|
241
|
-
|
|
565
|
+
({ source: r, data: n }) => {
|
|
566
|
+
r === A && n === t && s.length && s.shift()();
|
|
242
567
|
},
|
|
243
568
|
!1
|
|
244
|
-
), (
|
|
245
|
-
s.push(
|
|
246
|
-
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function",
|
|
247
|
-
isArray:
|
|
248
|
-
isArrayBuffer:
|
|
249
|
-
isBuffer:
|
|
250
|
-
isFormData:
|
|
251
|
-
isArrayBufferView:
|
|
252
|
-
isString:
|
|
253
|
-
isNumber:
|
|
254
|
-
isBoolean:
|
|
255
|
-
isObject:
|
|
256
|
-
isPlainObject:
|
|
257
|
-
isEmptyObject:
|
|
258
|
-
isReadableStream:
|
|
259
|
-
isRequest:
|
|
260
|
-
isResponse:
|
|
261
|
-
isHeaders:
|
|
262
|
-
isUndefined:
|
|
263
|
-
isDate:
|
|
264
|
-
isFile:
|
|
265
|
-
isBlob:
|
|
266
|
-
isRegExp:
|
|
267
|
-
isFunction:
|
|
268
|
-
isStream:
|
|
269
|
-
isURLSearchParams:
|
|
270
|
-
isTypedArray:
|
|
271
|
-
isFileList:
|
|
272
|
-
forEach:
|
|
273
|
-
merge:
|
|
274
|
-
extend:
|
|
275
|
-
trim:
|
|
276
|
-
stripBOM:
|
|
277
|
-
inherits:
|
|
278
|
-
toFlatObject:
|
|
279
|
-
kindOf:
|
|
280
|
-
kindOfTest:
|
|
281
|
-
endsWith:
|
|
282
|
-
toArray:
|
|
283
|
-
forEachEntry:
|
|
284
|
-
matchAll:
|
|
285
|
-
isHTMLForm:
|
|
286
|
-
hasOwnProperty:
|
|
287
|
-
hasOwnProp:
|
|
569
|
+
), (r) => {
|
|
570
|
+
s.push(r), A.postMessage(t, "*");
|
|
571
|
+
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", $(A.postMessage)), gs = typeof queueMicrotask < "u" ? queueMicrotask.bind(A) : typeof process < "u" && process.nextTick || lt, fs = (a) => a != null && $(a[ue]), c = {
|
|
572
|
+
isArray: z,
|
|
573
|
+
isArrayBuffer: rt,
|
|
574
|
+
isBuffer: G,
|
|
575
|
+
isFormData: jt,
|
|
576
|
+
isArrayBufferView: _t,
|
|
577
|
+
isString: Nt,
|
|
578
|
+
isNumber: at,
|
|
579
|
+
isBoolean: vt,
|
|
580
|
+
isObject: X,
|
|
581
|
+
isPlainObject: ne,
|
|
582
|
+
isEmptyObject: Ut,
|
|
583
|
+
isReadableStream: Ht,
|
|
584
|
+
isRequest: Kt,
|
|
585
|
+
isResponse: zt,
|
|
586
|
+
isHeaders: Jt,
|
|
587
|
+
isUndefined: K,
|
|
588
|
+
isDate: Dt,
|
|
589
|
+
isFile: kt,
|
|
590
|
+
isBlob: Lt,
|
|
591
|
+
isRegExp: ns,
|
|
592
|
+
isFunction: $,
|
|
593
|
+
isStream: At,
|
|
594
|
+
isURLSearchParams: Mt,
|
|
595
|
+
isTypedArray: es,
|
|
596
|
+
isFileList: Bt,
|
|
597
|
+
forEach: Q,
|
|
598
|
+
merge: Pe,
|
|
599
|
+
extend: Vt,
|
|
600
|
+
trim: Wt,
|
|
601
|
+
stripBOM: Gt,
|
|
602
|
+
inherits: Xt,
|
|
603
|
+
toFlatObject: Qt,
|
|
604
|
+
kindOf: ce,
|
|
605
|
+
kindOfTest: v,
|
|
606
|
+
endsWith: Zt,
|
|
607
|
+
toArray: Yt,
|
|
608
|
+
forEachEntry: ts,
|
|
609
|
+
matchAll: ss,
|
|
610
|
+
isHTMLForm: rs,
|
|
611
|
+
hasOwnProperty: Le,
|
|
612
|
+
hasOwnProp: Le,
|
|
288
613
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
289
|
-
reduceDescriptors:
|
|
290
|
-
freezeMethods:
|
|
291
|
-
toObjectSet:
|
|
292
|
-
toCamelCase:
|
|
293
|
-
noop:
|
|
294
|
-
toFiniteNumber:
|
|
295
|
-
findKey:
|
|
296
|
-
global:
|
|
297
|
-
isContextDefined:
|
|
298
|
-
isSpecCompliantForm:
|
|
299
|
-
toJSONObject:
|
|
300
|
-
isAsyncFn:
|
|
301
|
-
isThenable:
|
|
302
|
-
setImmediate:
|
|
303
|
-
asap:
|
|
304
|
-
isIterable:
|
|
614
|
+
reduceDescriptors: it,
|
|
615
|
+
freezeMethods: os,
|
|
616
|
+
toObjectSet: is,
|
|
617
|
+
toCamelCase: as,
|
|
618
|
+
noop: ls,
|
|
619
|
+
toFiniteNumber: us,
|
|
620
|
+
findKey: nt,
|
|
621
|
+
global: A,
|
|
622
|
+
isContextDefined: ot,
|
|
623
|
+
isSpecCompliantForm: cs,
|
|
624
|
+
toJSONObject: ds,
|
|
625
|
+
isAsyncFn: hs,
|
|
626
|
+
isThenable: ps,
|
|
627
|
+
setImmediate: lt,
|
|
628
|
+
asap: gs,
|
|
629
|
+
isIterable: fs
|
|
305
630
|
};
|
|
306
|
-
let
|
|
307
|
-
static from(e, t, s,
|
|
308
|
-
const i = new
|
|
631
|
+
let P = class ut extends Error {
|
|
632
|
+
static from(e, t, s, r, n, o) {
|
|
633
|
+
const i = new ut(e.message, t || e.code, s, r, n);
|
|
309
634
|
return i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
310
635
|
}
|
|
311
636
|
/**
|
|
@@ -319,8 +644,8 @@ let y = class st extends Error {
|
|
|
319
644
|
*
|
|
320
645
|
* @returns {Error} The created error.
|
|
321
646
|
*/
|
|
322
|
-
constructor(e, t, s,
|
|
323
|
-
super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), s && (this.config = s),
|
|
647
|
+
constructor(e, t, s, r, n) {
|
|
648
|
+
super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), s && (this.config = s), r && (this.request = r), n && (this.response = n, this.status = n.status);
|
|
324
649
|
}
|
|
325
650
|
toJSON() {
|
|
326
651
|
return {
|
|
@@ -342,48 +667,48 @@ let y = class st extends Error {
|
|
|
342
667
|
};
|
|
343
668
|
}
|
|
344
669
|
};
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
function
|
|
359
|
-
return c.isPlainObject(
|
|
670
|
+
P.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
671
|
+
P.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
672
|
+
P.ECONNABORTED = "ECONNABORTED";
|
|
673
|
+
P.ETIMEDOUT = "ETIMEDOUT";
|
|
674
|
+
P.ERR_NETWORK = "ERR_NETWORK";
|
|
675
|
+
P.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
676
|
+
P.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
677
|
+
P.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
678
|
+
P.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
679
|
+
P.ERR_CANCELED = "ERR_CANCELED";
|
|
680
|
+
P.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
681
|
+
P.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
682
|
+
const bs = null;
|
|
683
|
+
function qe(a) {
|
|
684
|
+
return c.isPlainObject(a) || c.isArray(a);
|
|
360
685
|
}
|
|
361
|
-
function
|
|
362
|
-
return c.endsWith(
|
|
686
|
+
function ct(a) {
|
|
687
|
+
return c.endsWith(a, "[]") ? a.slice(0, -2) : a;
|
|
363
688
|
}
|
|
364
|
-
function
|
|
365
|
-
return
|
|
366
|
-
return
|
|
689
|
+
function Be(a, e, t) {
|
|
690
|
+
return a ? a.concat(e).map(function(r, n) {
|
|
691
|
+
return r = ct(r), !t && n ? "[" + r + "]" : r;
|
|
367
692
|
}).join(t ? "." : "") : e;
|
|
368
693
|
}
|
|
369
|
-
function
|
|
370
|
-
return c.isArray(
|
|
694
|
+
function ms(a) {
|
|
695
|
+
return c.isArray(a) && !a.some(qe);
|
|
371
696
|
}
|
|
372
|
-
const
|
|
697
|
+
const ys = c.toFlatObject(c, {}, null, function(e) {
|
|
373
698
|
return /^is[A-Z]/.test(e);
|
|
374
699
|
});
|
|
375
|
-
function
|
|
376
|
-
if (!c.isObject(
|
|
700
|
+
function he(a, e, t) {
|
|
701
|
+
if (!c.isObject(a))
|
|
377
702
|
throw new TypeError("target must be an object");
|
|
378
703
|
e = e || new FormData(), t = c.toFlatObject(t, {
|
|
379
704
|
metaTokens: !0,
|
|
380
705
|
dots: !1,
|
|
381
706
|
indexes: !1
|
|
382
|
-
}, !1, function(
|
|
383
|
-
return !c.isUndefined(
|
|
707
|
+
}, !1, function(y, b) {
|
|
708
|
+
return !c.isUndefined(b[y]);
|
|
384
709
|
});
|
|
385
|
-
const s = t.metaTokens,
|
|
386
|
-
if (!c.isFunction(
|
|
710
|
+
const s = t.metaTokens, r = t.visitor || u, n = t.dots, o = t.indexes, l = (t.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
|
|
711
|
+
if (!c.isFunction(r))
|
|
387
712
|
throw new TypeError("visitor must be a function");
|
|
388
713
|
function d(f) {
|
|
389
714
|
if (f === null) return "";
|
|
@@ -392,50 +717,50 @@ function ce(r, e, t) {
|
|
|
392
717
|
if (c.isBoolean(f))
|
|
393
718
|
return f.toString();
|
|
394
719
|
if (!l && c.isBlob(f))
|
|
395
|
-
throw new
|
|
720
|
+
throw new P("Blob is not supported. Use a Buffer instead.");
|
|
396
721
|
return c.isArrayBuffer(f) || c.isTypedArray(f) ? l && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
397
722
|
}
|
|
398
|
-
function u(f,
|
|
723
|
+
function u(f, y, b) {
|
|
399
724
|
let R = f;
|
|
400
|
-
if (f && !
|
|
401
|
-
if (c.endsWith(
|
|
402
|
-
|
|
403
|
-
else if (c.isArray(f) &&
|
|
404
|
-
return
|
|
405
|
-
!(c.isUndefined(
|
|
725
|
+
if (f && !b && typeof f == "object") {
|
|
726
|
+
if (c.endsWith(y, "{}"))
|
|
727
|
+
y = s ? y : y.slice(0, -2), f = JSON.stringify(f);
|
|
728
|
+
else if (c.isArray(f) && ms(f) || (c.isFileList(f) || c.endsWith(y, "[]")) && (R = c.toArray(f)))
|
|
729
|
+
return y = ct(y), R.forEach(function(I, E) {
|
|
730
|
+
!(c.isUndefined(I) || I === null) && e.append(
|
|
406
731
|
// eslint-disable-next-line no-nested-ternary
|
|
407
|
-
o === !0 ?
|
|
408
|
-
d(
|
|
732
|
+
o === !0 ? Be([y], E, n) : o === null ? y : y + "[]",
|
|
733
|
+
d(I)
|
|
409
734
|
);
|
|
410
735
|
}), !1;
|
|
411
736
|
}
|
|
412
|
-
return
|
|
737
|
+
return qe(f) ? !0 : (e.append(Be(b, y, n), d(f)), !1);
|
|
413
738
|
}
|
|
414
|
-
const
|
|
739
|
+
const h = [], m = Object.assign(ys, {
|
|
415
740
|
defaultVisitor: u,
|
|
416
741
|
convertValue: d,
|
|
417
|
-
isVisitable:
|
|
742
|
+
isVisitable: qe
|
|
418
743
|
});
|
|
419
|
-
function
|
|
744
|
+
function q(f, y) {
|
|
420
745
|
if (!c.isUndefined(f)) {
|
|
421
|
-
if (
|
|
422
|
-
throw Error("Circular reference detected in " +
|
|
423
|
-
|
|
424
|
-
(!(c.isUndefined(R) || R === null) &&
|
|
746
|
+
if (h.indexOf(f) !== -1)
|
|
747
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
748
|
+
h.push(f), c.forEach(f, function(R, F) {
|
|
749
|
+
(!(c.isUndefined(R) || R === null) && r.call(
|
|
425
750
|
e,
|
|
426
751
|
R,
|
|
427
752
|
c.isString(F) ? F.trim() : F,
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
)) === !0 &&
|
|
431
|
-
}),
|
|
753
|
+
y,
|
|
754
|
+
m
|
|
755
|
+
)) === !0 && q(R, y ? y.concat(F) : [F]);
|
|
756
|
+
}), h.pop();
|
|
432
757
|
}
|
|
433
758
|
}
|
|
434
|
-
if (!c.isObject(
|
|
759
|
+
if (!c.isObject(a))
|
|
435
760
|
throw new TypeError("data must be an object");
|
|
436
|
-
return
|
|
761
|
+
return q(a), e;
|
|
437
762
|
}
|
|
438
|
-
function
|
|
763
|
+
function Ae(a) {
|
|
439
764
|
const e = {
|
|
440
765
|
"!": "%21",
|
|
441
766
|
"'": "%27",
|
|
@@ -445,42 +770,42 @@ function Ne(r) {
|
|
|
445
770
|
"%20": "+",
|
|
446
771
|
"%00": "\0"
|
|
447
772
|
};
|
|
448
|
-
return encodeURIComponent(
|
|
773
|
+
return encodeURIComponent(a).replace(/[!'()~]|%20|%00/g, function(s) {
|
|
449
774
|
return e[s];
|
|
450
775
|
});
|
|
451
776
|
}
|
|
452
|
-
function
|
|
453
|
-
this._pairs = [],
|
|
777
|
+
function Ee(a, e) {
|
|
778
|
+
this._pairs = [], a && he(a, this, e);
|
|
454
779
|
}
|
|
455
|
-
const
|
|
456
|
-
|
|
780
|
+
const dt = Ee.prototype;
|
|
781
|
+
dt.append = function(e, t) {
|
|
457
782
|
this._pairs.push([e, t]);
|
|
458
783
|
};
|
|
459
|
-
|
|
784
|
+
dt.toString = function(e) {
|
|
460
785
|
const t = e ? function(s) {
|
|
461
|
-
return e.call(this, s,
|
|
462
|
-
} :
|
|
463
|
-
return this._pairs.map(function(
|
|
464
|
-
return t(
|
|
786
|
+
return e.call(this, s, Ae);
|
|
787
|
+
} : Ae;
|
|
788
|
+
return this._pairs.map(function(r) {
|
|
789
|
+
return t(r[0]) + "=" + t(r[1]);
|
|
465
790
|
}, "").join("&");
|
|
466
791
|
};
|
|
467
|
-
function
|
|
468
|
-
return encodeURIComponent(
|
|
792
|
+
function ws(a) {
|
|
793
|
+
return encodeURIComponent(a).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
469
794
|
}
|
|
470
|
-
function
|
|
795
|
+
function ht(a, e, t) {
|
|
471
796
|
if (!e)
|
|
472
|
-
return
|
|
473
|
-
const s = t && t.encode ||
|
|
797
|
+
return a;
|
|
798
|
+
const s = t && t.encode || ws, r = c.isFunction(t) ? {
|
|
474
799
|
serialize: t
|
|
475
|
-
} : t,
|
|
800
|
+
} : t, n = r && r.serialize;
|
|
476
801
|
let o;
|
|
477
|
-
if (
|
|
478
|
-
const i =
|
|
479
|
-
i !== -1 && (
|
|
802
|
+
if (n ? o = n(e, r) : o = c.isURLSearchParams(e) ? e.toString() : new Ee(e, r).toString(s), o) {
|
|
803
|
+
const i = a.indexOf("#");
|
|
804
|
+
i !== -1 && (a = a.slice(0, i)), a += (a.indexOf("?") === -1 ? "?" : "&") + o;
|
|
480
805
|
}
|
|
481
|
-
return
|
|
806
|
+
return a;
|
|
482
807
|
}
|
|
483
|
-
class
|
|
808
|
+
class je {
|
|
484
809
|
constructor() {
|
|
485
810
|
this.handlers = [];
|
|
486
811
|
}
|
|
@@ -535,83 +860,83 @@ class Ue {
|
|
|
535
860
|
});
|
|
536
861
|
}
|
|
537
862
|
}
|
|
538
|
-
const
|
|
863
|
+
const Se = {
|
|
539
864
|
silentJSONParsing: !0,
|
|
540
865
|
forcedJSONParsing: !0,
|
|
541
866
|
clarifyTimeoutError: !1,
|
|
542
867
|
legacyInterceptorReqResOrdering: !0
|
|
543
|
-
},
|
|
868
|
+
}, Ps = typeof URLSearchParams < "u" ? URLSearchParams : Ee, qs = typeof FormData < "u" ? FormData : null, Rs = typeof Blob < "u" ? Blob : null, Is = {
|
|
544
869
|
isBrowser: !0,
|
|
545
870
|
classes: {
|
|
546
|
-
URLSearchParams:
|
|
547
|
-
FormData:
|
|
548
|
-
Blob:
|
|
871
|
+
URLSearchParams: Ps,
|
|
872
|
+
FormData: qs,
|
|
873
|
+
Blob: Rs
|
|
549
874
|
},
|
|
550
875
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
551
|
-
},
|
|
552
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
876
|
+
}, Te = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Cs = Te && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Fs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
877
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Es = Te && window.location.href || "http://localhost", Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
553
878
|
__proto__: null,
|
|
554
|
-
hasBrowserEnv:
|
|
555
|
-
hasStandardBrowserEnv:
|
|
556
|
-
hasStandardBrowserWebWorkerEnv:
|
|
557
|
-
navigator:
|
|
558
|
-
origin:
|
|
559
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
560
|
-
...
|
|
561
|
-
...
|
|
879
|
+
hasBrowserEnv: Te,
|
|
880
|
+
hasStandardBrowserEnv: Cs,
|
|
881
|
+
hasStandardBrowserWebWorkerEnv: Fs,
|
|
882
|
+
navigator: Re,
|
|
883
|
+
origin: Es
|
|
884
|
+
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
885
|
+
...Ss,
|
|
886
|
+
...Is
|
|
562
887
|
};
|
|
563
|
-
function
|
|
564
|
-
return
|
|
565
|
-
visitor: function(t, s,
|
|
566
|
-
return
|
|
888
|
+
function Ts(a, e) {
|
|
889
|
+
return he(a, new x.classes.URLSearchParams(), {
|
|
890
|
+
visitor: function(t, s, r, n) {
|
|
891
|
+
return x.isNode && c.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : n.defaultVisitor.apply(this, arguments);
|
|
567
892
|
},
|
|
568
893
|
...e
|
|
569
894
|
});
|
|
570
895
|
}
|
|
571
|
-
function
|
|
572
|
-
return c.matchAll(/\w+|\[(\w*)]/g,
|
|
896
|
+
function xs(a) {
|
|
897
|
+
return c.matchAll(/\w+|\[(\w*)]/g, a).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
573
898
|
}
|
|
574
|
-
function
|
|
575
|
-
const e = {}, t = Object.keys(
|
|
899
|
+
function Os(a) {
|
|
900
|
+
const e = {}, t = Object.keys(a);
|
|
576
901
|
let s;
|
|
577
|
-
const
|
|
578
|
-
let
|
|
579
|
-
for (s = 0; s <
|
|
580
|
-
|
|
902
|
+
const r = t.length;
|
|
903
|
+
let n;
|
|
904
|
+
for (s = 0; s < r; s++)
|
|
905
|
+
n = t[s], e[n] = a[n];
|
|
581
906
|
return e;
|
|
582
907
|
}
|
|
583
|
-
function
|
|
584
|
-
function e(t, s,
|
|
585
|
-
let o = t[
|
|
908
|
+
function pt(a) {
|
|
909
|
+
function e(t, s, r, n) {
|
|
910
|
+
let o = t[n++];
|
|
586
911
|
if (o === "__proto__") return !0;
|
|
587
|
-
const i = Number.isFinite(+o), l =
|
|
588
|
-
return o = !o && c.isArray(
|
|
912
|
+
const i = Number.isFinite(+o), l = n >= t.length;
|
|
913
|
+
return o = !o && c.isArray(r) ? r.length : o, l ? (c.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !i) : ((!r[o] || !c.isObject(r[o])) && (r[o] = []), e(t, s, r[o], n) && c.isArray(r[o]) && (r[o] = Os(r[o])), !i);
|
|
589
914
|
}
|
|
590
|
-
if (c.isFormData(
|
|
915
|
+
if (c.isFormData(a) && c.isFunction(a.entries)) {
|
|
591
916
|
const t = {};
|
|
592
|
-
return c.forEachEntry(
|
|
593
|
-
e(
|
|
917
|
+
return c.forEachEntry(a, (s, r) => {
|
|
918
|
+
e(xs(s), r, t, 0);
|
|
594
919
|
}), t;
|
|
595
920
|
}
|
|
596
921
|
return null;
|
|
597
922
|
}
|
|
598
|
-
function
|
|
599
|
-
if (c.isString(
|
|
923
|
+
function $s(a, e, t) {
|
|
924
|
+
if (c.isString(a))
|
|
600
925
|
try {
|
|
601
|
-
return (e || JSON.parse)(
|
|
926
|
+
return (e || JSON.parse)(a), c.trim(a);
|
|
602
927
|
} catch (s) {
|
|
603
928
|
if (s.name !== "SyntaxError")
|
|
604
929
|
throw s;
|
|
605
930
|
}
|
|
606
|
-
return (t || JSON.stringify)(
|
|
931
|
+
return (t || JSON.stringify)(a);
|
|
607
932
|
}
|
|
608
|
-
const
|
|
609
|
-
transitional:
|
|
933
|
+
const Z = {
|
|
934
|
+
transitional: Se,
|
|
610
935
|
adapter: ["xhr", "http", "fetch"],
|
|
611
936
|
transformRequest: [function(e, t) {
|
|
612
|
-
const s = t.getContentType() || "",
|
|
613
|
-
if (
|
|
614
|
-
return
|
|
937
|
+
const s = t.getContentType() || "", r = s.indexOf("application/json") > -1, n = c.isObject(e);
|
|
938
|
+
if (n && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
|
|
939
|
+
return r ? JSON.stringify(pt(e)) : e;
|
|
615
940
|
if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
|
|
616
941
|
return e;
|
|
617
942
|
if (c.isArrayBufferView(e))
|
|
@@ -619,31 +944,31 @@ const X = {
|
|
|
619
944
|
if (c.isURLSearchParams(e))
|
|
620
945
|
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
621
946
|
let i;
|
|
622
|
-
if (
|
|
947
|
+
if (n) {
|
|
623
948
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
624
|
-
return
|
|
949
|
+
return Ts(e, this.formSerializer).toString();
|
|
625
950
|
if ((i = c.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
|
626
951
|
const l = this.env && this.env.FormData;
|
|
627
|
-
return
|
|
952
|
+
return he(
|
|
628
953
|
i ? { "files[]": e } : e,
|
|
629
954
|
l && new l(),
|
|
630
955
|
this.formSerializer
|
|
631
956
|
);
|
|
632
957
|
}
|
|
633
958
|
}
|
|
634
|
-
return
|
|
959
|
+
return n || r ? (t.setContentType("application/json", !1), $s(e)) : e;
|
|
635
960
|
}],
|
|
636
961
|
transformResponse: [function(e) {
|
|
637
|
-
const t = this.transitional ||
|
|
962
|
+
const t = this.transitional || Z.transitional, s = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
638
963
|
if (c.isResponse(e) || c.isReadableStream(e))
|
|
639
964
|
return e;
|
|
640
|
-
if (e && c.isString(e) && (s && !this.responseType ||
|
|
641
|
-
const o = !(t && t.silentJSONParsing) &&
|
|
965
|
+
if (e && c.isString(e) && (s && !this.responseType || r)) {
|
|
966
|
+
const o = !(t && t.silentJSONParsing) && r;
|
|
642
967
|
try {
|
|
643
968
|
return JSON.parse(e, this.parseReviver);
|
|
644
969
|
} catch (i) {
|
|
645
970
|
if (o)
|
|
646
|
-
throw i.name === "SyntaxError" ?
|
|
971
|
+
throw i.name === "SyntaxError" ? P.from(i, P.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
647
972
|
}
|
|
648
973
|
}
|
|
649
974
|
return e;
|
|
@@ -658,8 +983,8 @@ const X = {
|
|
|
658
983
|
maxContentLength: -1,
|
|
659
984
|
maxBodyLength: -1,
|
|
660
985
|
env: {
|
|
661
|
-
FormData:
|
|
662
|
-
Blob:
|
|
986
|
+
FormData: x.classes.FormData,
|
|
987
|
+
Blob: x.classes.Blob
|
|
663
988
|
},
|
|
664
989
|
validateStatus: function(e) {
|
|
665
990
|
return e >= 200 && e < 300;
|
|
@@ -671,10 +996,10 @@ const X = {
|
|
|
671
996
|
}
|
|
672
997
|
}
|
|
673
998
|
};
|
|
674
|
-
c.forEach(["delete", "get", "head", "post", "put", "patch"], (
|
|
675
|
-
|
|
999
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (a) => {
|
|
1000
|
+
Z.headers[a] = {};
|
|
676
1001
|
});
|
|
677
|
-
const
|
|
1002
|
+
const _s = c.toObjectSet([
|
|
678
1003
|
"age",
|
|
679
1004
|
"authorization",
|
|
680
1005
|
"content-length",
|
|
@@ -692,47 +1017,47 @@ const ys = c.toObjectSet([
|
|
|
692
1017
|
"referer",
|
|
693
1018
|
"retry-after",
|
|
694
1019
|
"user-agent"
|
|
695
|
-
]),
|
|
1020
|
+
]), Ns = (a) => {
|
|
696
1021
|
const e = {};
|
|
697
|
-
let t, s,
|
|
698
|
-
return
|
|
1022
|
+
let t, s, r;
|
|
1023
|
+
return a && a.split(`
|
|
699
1024
|
`).forEach(function(o) {
|
|
700
|
-
|
|
1025
|
+
r = o.indexOf(":"), t = o.substring(0, r).trim().toLowerCase(), s = o.substring(r + 1).trim(), !(!t || e[t] && _s[t]) && (t === "set-cookie" ? e[t] ? e[t].push(s) : e[t] = [s] : e[t] = e[t] ? e[t] + ", " + s : s);
|
|
701
1026
|
}), e;
|
|
702
|
-
},
|
|
703
|
-
function
|
|
704
|
-
return
|
|
1027
|
+
}, Me = /* @__PURE__ */ Symbol("internals");
|
|
1028
|
+
function V(a) {
|
|
1029
|
+
return a && String(a).trim().toLowerCase();
|
|
705
1030
|
}
|
|
706
|
-
function
|
|
707
|
-
return
|
|
1031
|
+
function oe(a) {
|
|
1032
|
+
return a === !1 || a == null ? a : c.isArray(a) ? a.map(oe) : String(a);
|
|
708
1033
|
}
|
|
709
|
-
function
|
|
1034
|
+
function vs(a) {
|
|
710
1035
|
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
711
1036
|
let s;
|
|
712
|
-
for (; s = t.exec(
|
|
1037
|
+
for (; s = t.exec(a); )
|
|
713
1038
|
e[s[1]] = s[2];
|
|
714
1039
|
return e;
|
|
715
1040
|
}
|
|
716
|
-
const
|
|
717
|
-
function
|
|
1041
|
+
const Us = (a) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(a.trim());
|
|
1042
|
+
function me(a, e, t, s, r) {
|
|
718
1043
|
if (c.isFunction(s))
|
|
719
1044
|
return s.call(this, e, t);
|
|
720
|
-
if (
|
|
1045
|
+
if (r && (e = t), !!c.isString(e)) {
|
|
721
1046
|
if (c.isString(s))
|
|
722
1047
|
return e.indexOf(s) !== -1;
|
|
723
1048
|
if (c.isRegExp(s))
|
|
724
1049
|
return s.test(e);
|
|
725
1050
|
}
|
|
726
1051
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
1052
|
+
function Ds(a) {
|
|
1053
|
+
return a.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, s) => t.toUpperCase() + s);
|
|
729
1054
|
}
|
|
730
|
-
function
|
|
1055
|
+
function ks(a, e) {
|
|
731
1056
|
const t = c.toCamelCase(" " + e);
|
|
732
1057
|
["get", "set", "has"].forEach((s) => {
|
|
733
|
-
Object.defineProperty(
|
|
734
|
-
value: function(
|
|
735
|
-
return this[s].call(this, e,
|
|
1058
|
+
Object.defineProperty(a, s + t, {
|
|
1059
|
+
value: function(r, n, o) {
|
|
1060
|
+
return this[s].call(this, e, r, n, o);
|
|
736
1061
|
},
|
|
737
1062
|
configurable: !0
|
|
738
1063
|
});
|
|
@@ -743,19 +1068,19 @@ let _ = class {
|
|
|
743
1068
|
e && this.set(e);
|
|
744
1069
|
}
|
|
745
1070
|
set(e, t, s) {
|
|
746
|
-
const
|
|
747
|
-
function
|
|
748
|
-
const u =
|
|
1071
|
+
const r = this;
|
|
1072
|
+
function n(i, l, d) {
|
|
1073
|
+
const u = V(l);
|
|
749
1074
|
if (!u)
|
|
750
1075
|
throw new Error("header name must be a non-empty string");
|
|
751
|
-
const
|
|
752
|
-
(!
|
|
1076
|
+
const h = c.findKey(r, u);
|
|
1077
|
+
(!h || r[h] === void 0 || d === !0 || d === void 0 && r[h] !== !1) && (r[h || l] = oe(i));
|
|
753
1078
|
}
|
|
754
|
-
const o = (i, l) => c.forEach(i, (d, u) =>
|
|
1079
|
+
const o = (i, l) => c.forEach(i, (d, u) => n(d, u, l));
|
|
755
1080
|
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
756
1081
|
o(e, t);
|
|
757
|
-
else if (c.isString(e) && (e = e.trim()) && !
|
|
758
|
-
o(
|
|
1082
|
+
else if (c.isString(e) && (e = e.trim()) && !Us(e))
|
|
1083
|
+
o(Ns(e), t);
|
|
759
1084
|
else if (c.isObject(e) && c.isIterable(e)) {
|
|
760
1085
|
let i = {}, l, d;
|
|
761
1086
|
for (const u of e) {
|
|
@@ -765,63 +1090,63 @@ let _ = class {
|
|
|
765
1090
|
}
|
|
766
1091
|
o(i, t);
|
|
767
1092
|
} else
|
|
768
|
-
e != null &&
|
|
1093
|
+
e != null && n(t, e, s);
|
|
769
1094
|
return this;
|
|
770
1095
|
}
|
|
771
1096
|
get(e, t) {
|
|
772
|
-
if (e =
|
|
1097
|
+
if (e = V(e), e) {
|
|
773
1098
|
const s = c.findKey(this, e);
|
|
774
1099
|
if (s) {
|
|
775
|
-
const
|
|
1100
|
+
const r = this[s];
|
|
776
1101
|
if (!t)
|
|
777
|
-
return
|
|
1102
|
+
return r;
|
|
778
1103
|
if (t === !0)
|
|
779
|
-
return
|
|
1104
|
+
return vs(r);
|
|
780
1105
|
if (c.isFunction(t))
|
|
781
|
-
return t.call(this,
|
|
1106
|
+
return t.call(this, r, s);
|
|
782
1107
|
if (c.isRegExp(t))
|
|
783
|
-
return t.exec(
|
|
1108
|
+
return t.exec(r);
|
|
784
1109
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
785
1110
|
}
|
|
786
1111
|
}
|
|
787
1112
|
}
|
|
788
1113
|
has(e, t) {
|
|
789
|
-
if (e =
|
|
1114
|
+
if (e = V(e), e) {
|
|
790
1115
|
const s = c.findKey(this, e);
|
|
791
|
-
return !!(s && this[s] !== void 0 && (!t ||
|
|
1116
|
+
return !!(s && this[s] !== void 0 && (!t || me(this, this[s], s, t)));
|
|
792
1117
|
}
|
|
793
1118
|
return !1;
|
|
794
1119
|
}
|
|
795
1120
|
delete(e, t) {
|
|
796
1121
|
const s = this;
|
|
797
|
-
let
|
|
798
|
-
function
|
|
799
|
-
if (o =
|
|
1122
|
+
let r = !1;
|
|
1123
|
+
function n(o) {
|
|
1124
|
+
if (o = V(o), o) {
|
|
800
1125
|
const i = c.findKey(s, o);
|
|
801
|
-
i && (!t ||
|
|
1126
|
+
i && (!t || me(s, s[i], i, t)) && (delete s[i], r = !0);
|
|
802
1127
|
}
|
|
803
1128
|
}
|
|
804
|
-
return c.isArray(e) ? e.forEach(
|
|
1129
|
+
return c.isArray(e) ? e.forEach(n) : n(e), r;
|
|
805
1130
|
}
|
|
806
1131
|
clear(e) {
|
|
807
1132
|
const t = Object.keys(this);
|
|
808
|
-
let s = t.length,
|
|
1133
|
+
let s = t.length, r = !1;
|
|
809
1134
|
for (; s--; ) {
|
|
810
|
-
const
|
|
811
|
-
(!e ||
|
|
1135
|
+
const n = t[s];
|
|
1136
|
+
(!e || me(this, this[n], n, e, !0)) && (delete this[n], r = !0);
|
|
812
1137
|
}
|
|
813
|
-
return
|
|
1138
|
+
return r;
|
|
814
1139
|
}
|
|
815
1140
|
normalize(e) {
|
|
816
1141
|
const t = this, s = {};
|
|
817
|
-
return c.forEach(this, (
|
|
818
|
-
const o = c.findKey(s,
|
|
1142
|
+
return c.forEach(this, (r, n) => {
|
|
1143
|
+
const o = c.findKey(s, n);
|
|
819
1144
|
if (o) {
|
|
820
|
-
t[o] =
|
|
1145
|
+
t[o] = oe(r), delete t[n];
|
|
821
1146
|
return;
|
|
822
1147
|
}
|
|
823
|
-
const i = e ?
|
|
824
|
-
i !==
|
|
1148
|
+
const i = e ? Ds(n) : String(n).trim();
|
|
1149
|
+
i !== n && delete t[n], t[i] = oe(r), s[i] = !0;
|
|
825
1150
|
}), this;
|
|
826
1151
|
}
|
|
827
1152
|
concat(...e) {
|
|
@@ -829,8 +1154,8 @@ let _ = class {
|
|
|
829
1154
|
}
|
|
830
1155
|
toJSON(e) {
|
|
831
1156
|
const t = /* @__PURE__ */ Object.create(null);
|
|
832
|
-
return c.forEach(this, (s,
|
|
833
|
-
s != null && s !== !1 && (t[
|
|
1157
|
+
return c.forEach(this, (s, r) => {
|
|
1158
|
+
s != null && s !== !1 && (t[r] = e && c.isArray(s) ? s.join(", ") : s);
|
|
834
1159
|
}), t;
|
|
835
1160
|
}
|
|
836
1161
|
[Symbol.iterator]() {
|
|
@@ -851,41 +1176,41 @@ let _ = class {
|
|
|
851
1176
|
}
|
|
852
1177
|
static concat(e, ...t) {
|
|
853
1178
|
const s = new this(e);
|
|
854
|
-
return t.forEach((
|
|
1179
|
+
return t.forEach((r) => s.set(r)), s;
|
|
855
1180
|
}
|
|
856
1181
|
static accessor(e) {
|
|
857
|
-
const s = (this[
|
|
1182
|
+
const s = (this[Me] = this[Me] = {
|
|
858
1183
|
accessors: {}
|
|
859
|
-
}).accessors,
|
|
860
|
-
function
|
|
861
|
-
const i =
|
|
862
|
-
s[i] || (
|
|
1184
|
+
}).accessors, r = this.prototype;
|
|
1185
|
+
function n(o) {
|
|
1186
|
+
const i = V(o);
|
|
1187
|
+
s[i] || (ks(r, o), s[i] = !0);
|
|
863
1188
|
}
|
|
864
|
-
return c.isArray(e) ? e.forEach(
|
|
1189
|
+
return c.isArray(e) ? e.forEach(n) : n(e), this;
|
|
865
1190
|
}
|
|
866
1191
|
};
|
|
867
1192
|
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
868
|
-
c.reduceDescriptors(_.prototype, ({ value:
|
|
1193
|
+
c.reduceDescriptors(_.prototype, ({ value: a }, e) => {
|
|
869
1194
|
let t = e[0].toUpperCase() + e.slice(1);
|
|
870
1195
|
return {
|
|
871
|
-
get: () =>
|
|
1196
|
+
get: () => a,
|
|
872
1197
|
set(s) {
|
|
873
1198
|
this[t] = s;
|
|
874
1199
|
}
|
|
875
1200
|
};
|
|
876
1201
|
});
|
|
877
1202
|
c.freezeMethods(_);
|
|
878
|
-
function
|
|
879
|
-
const t = this ||
|
|
880
|
-
let
|
|
881
|
-
return c.forEach(
|
|
882
|
-
|
|
883
|
-
}),
|
|
1203
|
+
function ye(a, e) {
|
|
1204
|
+
const t = this || Z, s = e || t, r = _.from(s.headers);
|
|
1205
|
+
let n = s.data;
|
|
1206
|
+
return c.forEach(a, function(i) {
|
|
1207
|
+
n = i.call(t, n, r.normalize(), e ? e.status : void 0);
|
|
1208
|
+
}), r.normalize(), n;
|
|
884
1209
|
}
|
|
885
|
-
function
|
|
886
|
-
return !!(
|
|
1210
|
+
function gt(a) {
|
|
1211
|
+
return !!(a && a.__CANCEL__);
|
|
887
1212
|
}
|
|
888
|
-
let
|
|
1213
|
+
let Y = class extends P {
|
|
889
1214
|
/**
|
|
890
1215
|
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
891
1216
|
*
|
|
@@ -896,95 +1221,95 @@ let Q = class extends y {
|
|
|
896
1221
|
* @returns {CanceledError} The created error.
|
|
897
1222
|
*/
|
|
898
1223
|
constructor(e, t, s) {
|
|
899
|
-
super(e ?? "canceled",
|
|
1224
|
+
super(e ?? "canceled", P.ERR_CANCELED, t, s), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
900
1225
|
}
|
|
901
1226
|
};
|
|
902
|
-
function
|
|
1227
|
+
function ft(a, e, t) {
|
|
903
1228
|
const s = t.config.validateStatus;
|
|
904
|
-
!t.status || !s || s(t.status) ?
|
|
1229
|
+
!t.status || !s || s(t.status) ? a(t) : e(new P(
|
|
905
1230
|
"Request failed with status code " + t.status,
|
|
906
|
-
[
|
|
1231
|
+
[P.ERR_BAD_REQUEST, P.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
|
|
907
1232
|
t.config,
|
|
908
1233
|
t.request,
|
|
909
1234
|
t
|
|
910
1235
|
));
|
|
911
1236
|
}
|
|
912
|
-
function
|
|
913
|
-
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(
|
|
1237
|
+
function Ls(a) {
|
|
1238
|
+
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(a);
|
|
914
1239
|
return e && e[1] || "";
|
|
915
1240
|
}
|
|
916
|
-
function
|
|
917
|
-
|
|
918
|
-
const t = new Array(
|
|
919
|
-
let
|
|
1241
|
+
function Bs(a, e) {
|
|
1242
|
+
a = a || 10;
|
|
1243
|
+
const t = new Array(a), s = new Array(a);
|
|
1244
|
+
let r = 0, n = 0, o;
|
|
920
1245
|
return e = e !== void 0 ? e : 1e3, function(l) {
|
|
921
|
-
const d = Date.now(), u = s[
|
|
922
|
-
o || (o = d), t[
|
|
923
|
-
let
|
|
924
|
-
for (;
|
|
925
|
-
|
|
926
|
-
if (
|
|
1246
|
+
const d = Date.now(), u = s[n];
|
|
1247
|
+
o || (o = d), t[r] = l, s[r] = d;
|
|
1248
|
+
let h = n, m = 0;
|
|
1249
|
+
for (; h !== r; )
|
|
1250
|
+
m += t[h++], h = h % a;
|
|
1251
|
+
if (r = (r + 1) % a, r === n && (n = (n + 1) % a), d - o < e)
|
|
927
1252
|
return;
|
|
928
|
-
const
|
|
929
|
-
return
|
|
1253
|
+
const q = u && d - u;
|
|
1254
|
+
return q ? Math.round(m * 1e3 / q) : void 0;
|
|
930
1255
|
};
|
|
931
1256
|
}
|
|
932
|
-
function
|
|
933
|
-
let t = 0, s = 1e3 / e,
|
|
1257
|
+
function As(a, e) {
|
|
1258
|
+
let t = 0, s = 1e3 / e, r, n;
|
|
934
1259
|
const o = (d, u = Date.now()) => {
|
|
935
|
-
t = u,
|
|
1260
|
+
t = u, r = null, n && (clearTimeout(n), n = null), a(...d);
|
|
936
1261
|
};
|
|
937
1262
|
return [(...d) => {
|
|
938
|
-
const u = Date.now(),
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
}, s -
|
|
942
|
-
}, () =>
|
|
1263
|
+
const u = Date.now(), h = u - t;
|
|
1264
|
+
h >= s ? o(d, u) : (r = d, n || (n = setTimeout(() => {
|
|
1265
|
+
n = null, o(r);
|
|
1266
|
+
}, s - h)));
|
|
1267
|
+
}, () => r && o(r)];
|
|
943
1268
|
}
|
|
944
|
-
const
|
|
1269
|
+
const le = (a, e, t = 3) => {
|
|
945
1270
|
let s = 0;
|
|
946
|
-
const
|
|
947
|
-
return
|
|
948
|
-
const o =
|
|
1271
|
+
const r = Bs(50, 250);
|
|
1272
|
+
return As((n) => {
|
|
1273
|
+
const o = n.loaded, i = n.lengthComputable ? n.total : void 0, l = o - s, d = r(l), u = o <= i;
|
|
949
1274
|
s = o;
|
|
950
|
-
const
|
|
1275
|
+
const h = {
|
|
951
1276
|
loaded: o,
|
|
952
1277
|
total: i,
|
|
953
1278
|
progress: i ? o / i : void 0,
|
|
954
1279
|
bytes: l,
|
|
955
1280
|
rate: d || void 0,
|
|
956
1281
|
estimated: d && i && u ? (i - o) / d : void 0,
|
|
957
|
-
event:
|
|
1282
|
+
event: n,
|
|
958
1283
|
lengthComputable: i != null,
|
|
959
1284
|
[e ? "download" : "upload"]: !0
|
|
960
1285
|
};
|
|
961
|
-
|
|
1286
|
+
a(h);
|
|
962
1287
|
}, t);
|
|
963
|
-
},
|
|
964
|
-
const t =
|
|
1288
|
+
}, He = (a, e) => {
|
|
1289
|
+
const t = a != null;
|
|
965
1290
|
return [(s) => e[0]({
|
|
966
1291
|
lengthComputable: t,
|
|
967
|
-
total:
|
|
1292
|
+
total: a,
|
|
968
1293
|
loaded: s
|
|
969
1294
|
}), e[1]];
|
|
970
|
-
},
|
|
971
|
-
new URL(
|
|
972
|
-
|
|
973
|
-
) : () => !0,
|
|
1295
|
+
}, Ke = (a) => (...e) => c.asap(() => a(...e)), js = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((a, e) => (t) => (t = new URL(t, x.origin), a.protocol === t.protocol && a.host === t.host && (e || a.port === t.port)))(
|
|
1296
|
+
new URL(x.origin),
|
|
1297
|
+
x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
|
|
1298
|
+
) : () => !0, Ms = x.hasStandardBrowserEnv ? (
|
|
974
1299
|
// Standard browser envs support document.cookie
|
|
975
1300
|
{
|
|
976
|
-
write(
|
|
1301
|
+
write(a, e, t, s, r, n, o) {
|
|
977
1302
|
if (typeof document > "u") return;
|
|
978
|
-
const i = [`${
|
|
979
|
-
c.isNumber(t) && i.push(`expires=${new Date(t).toUTCString()}`), c.isString(s) && i.push(`path=${s}`), c.isString(
|
|
1303
|
+
const i = [`${a}=${encodeURIComponent(e)}`];
|
|
1304
|
+
c.isNumber(t) && i.push(`expires=${new Date(t).toUTCString()}`), c.isString(s) && i.push(`path=${s}`), c.isString(r) && i.push(`domain=${r}`), n === !0 && i.push("secure"), c.isString(o) && i.push(`SameSite=${o}`), document.cookie = i.join("; ");
|
|
980
1305
|
},
|
|
981
|
-
read(
|
|
1306
|
+
read(a) {
|
|
982
1307
|
if (typeof document > "u") return null;
|
|
983
|
-
const e = document.cookie.match(new RegExp("(?:^|; )" +
|
|
1308
|
+
const e = document.cookie.match(new RegExp("(?:^|; )" + a + "=([^;]*)"));
|
|
984
1309
|
return e ? decodeURIComponent(e[1]) : null;
|
|
985
1310
|
},
|
|
986
|
-
remove(
|
|
987
|
-
this.write(
|
|
1311
|
+
remove(a) {
|
|
1312
|
+
this.write(a, "", Date.now() - 864e5, "/");
|
|
988
1313
|
}
|
|
989
1314
|
}
|
|
990
1315
|
) : (
|
|
@@ -999,30 +1324,30 @@ const ae = (r, e, t = 3) => {
|
|
|
999
1324
|
}
|
|
1000
1325
|
}
|
|
1001
1326
|
);
|
|
1002
|
-
function
|
|
1003
|
-
return typeof
|
|
1327
|
+
function Hs(a) {
|
|
1328
|
+
return typeof a != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(a);
|
|
1004
1329
|
}
|
|
1005
|
-
function
|
|
1006
|
-
return e ?
|
|
1330
|
+
function Ks(a, e) {
|
|
1331
|
+
return e ? a.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : a;
|
|
1007
1332
|
}
|
|
1008
|
-
function
|
|
1009
|
-
let s = !
|
|
1010
|
-
return
|
|
1333
|
+
function bt(a, e, t) {
|
|
1334
|
+
let s = !Hs(e);
|
|
1335
|
+
return a && (s || t == !1) ? Ks(a, e) : e;
|
|
1011
1336
|
}
|
|
1012
|
-
const
|
|
1013
|
-
function
|
|
1337
|
+
const ze = (a) => a instanceof _ ? { ...a } : a;
|
|
1338
|
+
function M(a, e) {
|
|
1014
1339
|
e = e || {};
|
|
1015
1340
|
const t = {};
|
|
1016
|
-
function s(d, u,
|
|
1017
|
-
return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless:
|
|
1341
|
+
function s(d, u, h, m) {
|
|
1342
|
+
return c.isPlainObject(d) && c.isPlainObject(u) ? c.merge.call({ caseless: m }, d, u) : c.isPlainObject(u) ? c.merge({}, u) : c.isArray(u) ? u.slice() : u;
|
|
1018
1343
|
}
|
|
1019
|
-
function
|
|
1344
|
+
function r(d, u, h, m) {
|
|
1020
1345
|
if (c.isUndefined(u)) {
|
|
1021
1346
|
if (!c.isUndefined(d))
|
|
1022
|
-
return s(void 0, d,
|
|
1023
|
-
} else return s(d, u,
|
|
1347
|
+
return s(void 0, d, h, m);
|
|
1348
|
+
} else return s(d, u, h, m);
|
|
1024
1349
|
}
|
|
1025
|
-
function
|
|
1350
|
+
function n(d, u) {
|
|
1026
1351
|
if (!c.isUndefined(u))
|
|
1027
1352
|
return s(void 0, u);
|
|
1028
1353
|
}
|
|
@@ -1032,16 +1357,16 @@ function A(r, e) {
|
|
|
1032
1357
|
return s(void 0, d);
|
|
1033
1358
|
} else return s(void 0, u);
|
|
1034
1359
|
}
|
|
1035
|
-
function i(d, u,
|
|
1036
|
-
if (
|
|
1360
|
+
function i(d, u, h) {
|
|
1361
|
+
if (h in e)
|
|
1037
1362
|
return s(d, u);
|
|
1038
|
-
if (
|
|
1363
|
+
if (h in a)
|
|
1039
1364
|
return s(void 0, d);
|
|
1040
1365
|
}
|
|
1041
1366
|
const l = {
|
|
1042
|
-
url:
|
|
1043
|
-
method:
|
|
1044
|
-
data:
|
|
1367
|
+
url: n,
|
|
1368
|
+
method: n,
|
|
1369
|
+
data: n,
|
|
1045
1370
|
baseURL: o,
|
|
1046
1371
|
transformRequest: o,
|
|
1047
1372
|
transformResponse: o,
|
|
@@ -1067,138 +1392,138 @@ function A(r, e) {
|
|
|
1067
1392
|
socketPath: o,
|
|
1068
1393
|
responseEncoding: o,
|
|
1069
1394
|
validateStatus: i,
|
|
1070
|
-
headers: (d, u,
|
|
1395
|
+
headers: (d, u, h) => r(ze(d), ze(u), h, !0)
|
|
1071
1396
|
};
|
|
1072
1397
|
return c.forEach(
|
|
1073
|
-
Object.keys({ ...
|
|
1398
|
+
Object.keys({ ...a, ...e }),
|
|
1074
1399
|
function(u) {
|
|
1075
1400
|
if (u === "__proto__" || u === "constructor" || u === "prototype")
|
|
1076
1401
|
return;
|
|
1077
|
-
const
|
|
1078
|
-
c.isUndefined(
|
|
1402
|
+
const h = c.hasOwnProp(l, u) ? l[u] : r, m = h(a[u], e[u], u);
|
|
1403
|
+
c.isUndefined(m) && h !== i || (t[u] = m);
|
|
1079
1404
|
}
|
|
1080
1405
|
), t;
|
|
1081
1406
|
}
|
|
1082
|
-
const
|
|
1083
|
-
const e =
|
|
1084
|
-
let { data: t, withXSRFToken: s, xsrfHeaderName:
|
|
1085
|
-
if (e.headers = o = _.from(o), e.url =
|
|
1407
|
+
const mt = (a) => {
|
|
1408
|
+
const e = M({}, a);
|
|
1409
|
+
let { data: t, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: n, headers: o, auth: i } = e;
|
|
1410
|
+
if (e.headers = o = _.from(o), e.url = ht(bt(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), i && o.set(
|
|
1086
1411
|
"Authorization",
|
|
1087
1412
|
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
1088
1413
|
), c.isFormData(t)) {
|
|
1089
|
-
if (
|
|
1414
|
+
if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
|
|
1090
1415
|
o.setContentType(void 0);
|
|
1091
1416
|
else if (c.isFunction(t.getHeaders)) {
|
|
1092
1417
|
const l = t.getHeaders(), d = ["content-type", "content-length"];
|
|
1093
|
-
Object.entries(l).forEach(([u,
|
|
1094
|
-
d.includes(u.toLowerCase()) && o.set(u,
|
|
1418
|
+
Object.entries(l).forEach(([u, h]) => {
|
|
1419
|
+
d.includes(u.toLowerCase()) && o.set(u, h);
|
|
1095
1420
|
});
|
|
1096
1421
|
}
|
|
1097
1422
|
}
|
|
1098
|
-
if (
|
|
1099
|
-
const l =
|
|
1100
|
-
l && o.set(
|
|
1423
|
+
if (x.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(e)), s || s !== !1 && js(e.url))) {
|
|
1424
|
+
const l = r && n && Ms.read(n);
|
|
1425
|
+
l && o.set(r, l);
|
|
1101
1426
|
}
|
|
1102
1427
|
return e;
|
|
1103
|
-
},
|
|
1428
|
+
}, zs = typeof XMLHttpRequest < "u", Js = zs && function(a) {
|
|
1104
1429
|
return new Promise(function(t, s) {
|
|
1105
|
-
const
|
|
1106
|
-
let
|
|
1107
|
-
const o = _.from(
|
|
1108
|
-
let { responseType: i, onUploadProgress: l, onDownloadProgress: d } =
|
|
1109
|
-
function
|
|
1110
|
-
|
|
1430
|
+
const r = mt(a);
|
|
1431
|
+
let n = r.data;
|
|
1432
|
+
const o = _.from(r.headers).normalize();
|
|
1433
|
+
let { responseType: i, onUploadProgress: l, onDownloadProgress: d } = r, u, h, m, q, f;
|
|
1434
|
+
function y() {
|
|
1435
|
+
q && q(), f && f(), r.cancelToken && r.cancelToken.unsubscribe(u), r.signal && r.signal.removeEventListener("abort", u);
|
|
1111
1436
|
}
|
|
1112
|
-
let
|
|
1113
|
-
|
|
1437
|
+
let b = new XMLHttpRequest();
|
|
1438
|
+
b.open(r.method.toUpperCase(), r.url, !0), b.timeout = r.timeout;
|
|
1114
1439
|
function R() {
|
|
1115
|
-
if (!
|
|
1440
|
+
if (!b)
|
|
1116
1441
|
return;
|
|
1117
|
-
const
|
|
1118
|
-
"getAllResponseHeaders" in
|
|
1119
|
-
),
|
|
1120
|
-
data: !i || i === "text" || i === "json" ?
|
|
1121
|
-
status:
|
|
1122
|
-
statusText:
|
|
1123
|
-
headers:
|
|
1124
|
-
config:
|
|
1125
|
-
request:
|
|
1442
|
+
const I = _.from(
|
|
1443
|
+
"getAllResponseHeaders" in b && b.getAllResponseHeaders()
|
|
1444
|
+
), S = {
|
|
1445
|
+
data: !i || i === "text" || i === "json" ? b.responseText : b.response,
|
|
1446
|
+
status: b.status,
|
|
1447
|
+
statusText: b.statusText,
|
|
1448
|
+
headers: I,
|
|
1449
|
+
config: a,
|
|
1450
|
+
request: b
|
|
1126
1451
|
};
|
|
1127
|
-
|
|
1128
|
-
t(
|
|
1129
|
-
}, function(
|
|
1130
|
-
s(
|
|
1131
|
-
},
|
|
1452
|
+
ft(function(T) {
|
|
1453
|
+
t(T), y();
|
|
1454
|
+
}, function(T) {
|
|
1455
|
+
s(T), y();
|
|
1456
|
+
}, S), b = null;
|
|
1132
1457
|
}
|
|
1133
|
-
"onloadend" in
|
|
1134
|
-
!
|
|
1135
|
-
},
|
|
1136
|
-
|
|
1137
|
-
},
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
let
|
|
1142
|
-
const
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
)),
|
|
1149
|
-
},
|
|
1150
|
-
|
|
1151
|
-
}), c.isUndefined(
|
|
1152
|
-
|
|
1153
|
-
},
|
|
1154
|
-
const F =
|
|
1155
|
-
if (F &&
|
|
1156
|
-
s(new
|
|
1458
|
+
"onloadend" in b ? b.onloadend = R : b.onreadystatechange = function() {
|
|
1459
|
+
!b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf("file:") === 0) || setTimeout(R);
|
|
1460
|
+
}, b.onabort = function() {
|
|
1461
|
+
b && (s(new P("Request aborted", P.ECONNABORTED, a, b)), b = null);
|
|
1462
|
+
}, b.onerror = function(E) {
|
|
1463
|
+
const S = E && E.message ? E.message : "Network Error", U = new P(S, P.ERR_NETWORK, a, b);
|
|
1464
|
+
U.event = E || null, s(U), b = null;
|
|
1465
|
+
}, b.ontimeout = function() {
|
|
1466
|
+
let E = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1467
|
+
const S = r.transitional || Se;
|
|
1468
|
+
r.timeoutErrorMessage && (E = r.timeoutErrorMessage), s(new P(
|
|
1469
|
+
E,
|
|
1470
|
+
S.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
|
|
1471
|
+
a,
|
|
1472
|
+
b
|
|
1473
|
+
)), b = null;
|
|
1474
|
+
}, n === void 0 && o.setContentType(null), "setRequestHeader" in b && c.forEach(o.toJSON(), function(E, S) {
|
|
1475
|
+
b.setRequestHeader(S, E);
|
|
1476
|
+
}), c.isUndefined(r.withCredentials) || (b.withCredentials = !!r.withCredentials), i && i !== "json" && (b.responseType = r.responseType), d && ([m, f] = le(d, !0), b.addEventListener("progress", m)), l && b.upload && ([h, q] = le(l), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", q)), (r.cancelToken || r.signal) && (u = (I) => {
|
|
1477
|
+
b && (s(!I || I.type ? new Y(null, a, b) : I), b.abort(), b = null);
|
|
1478
|
+
}, r.cancelToken && r.cancelToken.subscribe(u), r.signal && (r.signal.aborted ? u() : r.signal.addEventListener("abort", u)));
|
|
1479
|
+
const F = Ls(r.url);
|
|
1480
|
+
if (F && x.protocols.indexOf(F) === -1) {
|
|
1481
|
+
s(new P("Unsupported protocol " + F + ":", P.ERR_BAD_REQUEST, a));
|
|
1157
1482
|
return;
|
|
1158
1483
|
}
|
|
1159
|
-
|
|
1484
|
+
b.send(n || null);
|
|
1160
1485
|
});
|
|
1161
|
-
},
|
|
1162
|
-
const { length: t } =
|
|
1486
|
+
}, Ws = (a, e) => {
|
|
1487
|
+
const { length: t } = a = a ? a.filter(Boolean) : [];
|
|
1163
1488
|
if (e || t) {
|
|
1164
|
-
let s = new AbortController(),
|
|
1165
|
-
const
|
|
1166
|
-
if (!
|
|
1167
|
-
|
|
1489
|
+
let s = new AbortController(), r;
|
|
1490
|
+
const n = function(d) {
|
|
1491
|
+
if (!r) {
|
|
1492
|
+
r = !0, i();
|
|
1168
1493
|
const u = d instanceof Error ? d : this.reason;
|
|
1169
|
-
s.abort(u instanceof
|
|
1494
|
+
s.abort(u instanceof P ? u : new Y(u instanceof Error ? u.message : u));
|
|
1170
1495
|
}
|
|
1171
1496
|
};
|
|
1172
1497
|
let o = e && setTimeout(() => {
|
|
1173
|
-
o = null,
|
|
1498
|
+
o = null, n(new P(`timeout of ${e}ms exceeded`, P.ETIMEDOUT));
|
|
1174
1499
|
}, e);
|
|
1175
1500
|
const i = () => {
|
|
1176
|
-
|
|
1177
|
-
d.unsubscribe ? d.unsubscribe(
|
|
1178
|
-
}),
|
|
1501
|
+
a && (o && clearTimeout(o), o = null, a.forEach((d) => {
|
|
1502
|
+
d.unsubscribe ? d.unsubscribe(n) : d.removeEventListener("abort", n);
|
|
1503
|
+
}), a = null);
|
|
1179
1504
|
};
|
|
1180
|
-
|
|
1505
|
+
a.forEach((d) => d.addEventListener("abort", n));
|
|
1181
1506
|
const { signal: l } = s;
|
|
1182
1507
|
return l.unsubscribe = () => c.asap(i), l;
|
|
1183
1508
|
}
|
|
1184
|
-
},
|
|
1185
|
-
let t =
|
|
1509
|
+
}, Vs = function* (a, e) {
|
|
1510
|
+
let t = a.byteLength;
|
|
1186
1511
|
if (t < e) {
|
|
1187
|
-
yield
|
|
1512
|
+
yield a;
|
|
1188
1513
|
return;
|
|
1189
1514
|
}
|
|
1190
|
-
let s = 0,
|
|
1515
|
+
let s = 0, r;
|
|
1191
1516
|
for (; s < t; )
|
|
1192
|
-
|
|
1193
|
-
},
|
|
1194
|
-
for await (const t of
|
|
1195
|
-
yield*
|
|
1196
|
-
},
|
|
1197
|
-
if (
|
|
1198
|
-
yield*
|
|
1517
|
+
r = s + e, yield a.slice(s, r), s = r;
|
|
1518
|
+
}, Gs = async function* (a, e) {
|
|
1519
|
+
for await (const t of Xs(a))
|
|
1520
|
+
yield* Vs(t, e);
|
|
1521
|
+
}, Xs = async function* (a) {
|
|
1522
|
+
if (a[Symbol.asyncIterator]) {
|
|
1523
|
+
yield* a;
|
|
1199
1524
|
return;
|
|
1200
1525
|
}
|
|
1201
|
-
const e =
|
|
1526
|
+
const e = a.getReader();
|
|
1202
1527
|
try {
|
|
1203
1528
|
for (; ; ) {
|
|
1204
1529
|
const { done: t, value: s } = await e.read();
|
|
@@ -1209,23 +1534,23 @@ const ut = (r) => {
|
|
|
1209
1534
|
} finally {
|
|
1210
1535
|
await e.cancel();
|
|
1211
1536
|
}
|
|
1212
|
-
},
|
|
1213
|
-
const
|
|
1214
|
-
let
|
|
1537
|
+
}, Je = (a, e, t, s) => {
|
|
1538
|
+
const r = Gs(a, e);
|
|
1539
|
+
let n = 0, o, i = (l) => {
|
|
1215
1540
|
o || (o = !0, s && s(l));
|
|
1216
1541
|
};
|
|
1217
1542
|
return new ReadableStream({
|
|
1218
1543
|
async pull(l) {
|
|
1219
1544
|
try {
|
|
1220
|
-
const { done: d, value: u } = await
|
|
1545
|
+
const { done: d, value: u } = await r.next();
|
|
1221
1546
|
if (d) {
|
|
1222
1547
|
i(), l.close();
|
|
1223
1548
|
return;
|
|
1224
1549
|
}
|
|
1225
|
-
let
|
|
1550
|
+
let h = u.byteLength;
|
|
1226
1551
|
if (t) {
|
|
1227
|
-
let
|
|
1228
|
-
t(
|
|
1552
|
+
let m = n += h;
|
|
1553
|
+
t(m);
|
|
1229
1554
|
}
|
|
1230
1555
|
l.enqueue(new Uint8Array(u));
|
|
1231
1556
|
} catch (d) {
|
|
@@ -1233,58 +1558,58 @@ const ut = (r) => {
|
|
|
1233
1558
|
}
|
|
1234
1559
|
},
|
|
1235
1560
|
cancel(l) {
|
|
1236
|
-
return i(l),
|
|
1561
|
+
return i(l), r.return();
|
|
1237
1562
|
}
|
|
1238
1563
|
}, {
|
|
1239
1564
|
highWaterMark: 2
|
|
1240
1565
|
});
|
|
1241
|
-
},
|
|
1242
|
-
Request:
|
|
1566
|
+
}, We = 64 * 1024, { isFunction: ae } = c, Qs = (({ Request: a, Response: e }) => ({
|
|
1567
|
+
Request: a,
|
|
1243
1568
|
Response: e
|
|
1244
1569
|
}))(c.global), {
|
|
1245
|
-
ReadableStream:
|
|
1246
|
-
TextEncoder:
|
|
1247
|
-
} = c.global,
|
|
1570
|
+
ReadableStream: Ve,
|
|
1571
|
+
TextEncoder: Ge
|
|
1572
|
+
} = c.global, Xe = (a, ...e) => {
|
|
1248
1573
|
try {
|
|
1249
|
-
return !!
|
|
1574
|
+
return !!a(...e);
|
|
1250
1575
|
} catch {
|
|
1251
1576
|
return !1;
|
|
1252
1577
|
}
|
|
1253
|
-
},
|
|
1254
|
-
|
|
1578
|
+
}, Zs = (a) => {
|
|
1579
|
+
a = c.merge.call({
|
|
1255
1580
|
skipUndefined: !0
|
|
1256
|
-
},
|
|
1257
|
-
const { fetch: e, Request: t, Response: s } =
|
|
1258
|
-
if (!
|
|
1581
|
+
}, Qs, a);
|
|
1582
|
+
const { fetch: e, Request: t, Response: s } = a, r = e ? ae(e) : typeof fetch == "function", n = ae(t), o = ae(s);
|
|
1583
|
+
if (!r)
|
|
1259
1584
|
return !1;
|
|
1260
|
-
const i =
|
|
1585
|
+
const i = r && ae(Ve), l = r && (typeof Ge == "function" ? /* @__PURE__ */ ((f) => (y) => f.encode(y))(new Ge()) : async (f) => new Uint8Array(await new t(f).arrayBuffer())), d = n && i && Xe(() => {
|
|
1261
1586
|
let f = !1;
|
|
1262
|
-
const
|
|
1263
|
-
body: new
|
|
1587
|
+
const y = new t(x.origin, {
|
|
1588
|
+
body: new Ve(),
|
|
1264
1589
|
method: "POST",
|
|
1265
1590
|
get duplex() {
|
|
1266
1591
|
return f = !0, "half";
|
|
1267
1592
|
}
|
|
1268
1593
|
}).headers.has("Content-Type");
|
|
1269
|
-
return f && !
|
|
1270
|
-
}), u = o && i &&
|
|
1594
|
+
return f && !y;
|
|
1595
|
+
}), u = o && i && Xe(() => c.isReadableStream(new s("").body)), h = {
|
|
1271
1596
|
stream: u && ((f) => f.body)
|
|
1272
1597
|
};
|
|
1273
|
-
|
|
1274
|
-
!
|
|
1275
|
-
let R =
|
|
1598
|
+
r && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1599
|
+
!h[f] && (h[f] = (y, b) => {
|
|
1600
|
+
let R = y && y[f];
|
|
1276
1601
|
if (R)
|
|
1277
|
-
return R.call(
|
|
1278
|
-
throw new
|
|
1602
|
+
return R.call(y);
|
|
1603
|
+
throw new P(`Response type '${f}' is not supported`, P.ERR_NOT_SUPPORT, b);
|
|
1279
1604
|
});
|
|
1280
1605
|
});
|
|
1281
|
-
const
|
|
1606
|
+
const m = async (f) => {
|
|
1282
1607
|
if (f == null)
|
|
1283
1608
|
return 0;
|
|
1284
1609
|
if (c.isBlob(f))
|
|
1285
1610
|
return f.size;
|
|
1286
1611
|
if (c.isSpecCompliantForm(f))
|
|
1287
|
-
return (await new t(
|
|
1612
|
+
return (await new t(x.origin, {
|
|
1288
1613
|
method: "POST",
|
|
1289
1614
|
body: f
|
|
1290
1615
|
}).arrayBuffer()).byteLength;
|
|
@@ -1292,242 +1617,242 @@ const ut = (r) => {
|
|
|
1292
1617
|
return f.byteLength;
|
|
1293
1618
|
if (c.isURLSearchParams(f) && (f = f + ""), c.isString(f))
|
|
1294
1619
|
return (await l(f)).byteLength;
|
|
1295
|
-
},
|
|
1296
|
-
const
|
|
1297
|
-
return
|
|
1620
|
+
}, q = async (f, y) => {
|
|
1621
|
+
const b = c.toFiniteNumber(f.getContentLength());
|
|
1622
|
+
return b ?? m(y);
|
|
1298
1623
|
};
|
|
1299
1624
|
return async (f) => {
|
|
1300
1625
|
let {
|
|
1301
|
-
url:
|
|
1302
|
-
method:
|
|
1626
|
+
url: y,
|
|
1627
|
+
method: b,
|
|
1303
1628
|
data: R,
|
|
1304
1629
|
signal: F,
|
|
1305
|
-
cancelToken:
|
|
1306
|
-
timeout:
|
|
1307
|
-
onDownloadProgress:
|
|
1308
|
-
onUploadProgress:
|
|
1309
|
-
responseType:
|
|
1310
|
-
headers:
|
|
1311
|
-
withCredentials:
|
|
1312
|
-
fetchOptions:
|
|
1313
|
-
} =
|
|
1314
|
-
|
|
1315
|
-
let
|
|
1316
|
-
const B =
|
|
1317
|
-
|
|
1630
|
+
cancelToken: I,
|
|
1631
|
+
timeout: E,
|
|
1632
|
+
onDownloadProgress: S,
|
|
1633
|
+
onUploadProgress: U,
|
|
1634
|
+
responseType: T,
|
|
1635
|
+
headers: J,
|
|
1636
|
+
withCredentials: L = "same-origin",
|
|
1637
|
+
fetchOptions: ee
|
|
1638
|
+
} = mt(f), Oe = e || fetch;
|
|
1639
|
+
T = T ? (T + "").toLowerCase() : "text";
|
|
1640
|
+
let te = Ws([F, I && I.toAbortSignal()], E), W = null;
|
|
1641
|
+
const B = te && te.unsubscribe && (() => {
|
|
1642
|
+
te.unsubscribe();
|
|
1318
1643
|
});
|
|
1319
1644
|
let $e;
|
|
1320
1645
|
try {
|
|
1321
|
-
if (
|
|
1322
|
-
let k = new t(
|
|
1646
|
+
if (U && d && b !== "get" && b !== "head" && ($e = await q(J, R)) !== 0) {
|
|
1647
|
+
let k = new t(y, {
|
|
1323
1648
|
method: "POST",
|
|
1324
1649
|
body: R,
|
|
1325
1650
|
duplex: "half"
|
|
1326
|
-
}),
|
|
1327
|
-
if (c.isFormData(R) && (
|
|
1328
|
-
const [
|
|
1651
|
+
}), H;
|
|
1652
|
+
if (c.isFormData(R) && (H = k.headers.get("content-type")) && J.setContentType(H), k.body) {
|
|
1653
|
+
const [ge, se] = He(
|
|
1329
1654
|
$e,
|
|
1330
|
-
|
|
1655
|
+
le(Ke(U))
|
|
1331
1656
|
);
|
|
1332
|
-
R =
|
|
1657
|
+
R = Je(k.body, We, ge, se);
|
|
1333
1658
|
}
|
|
1334
1659
|
}
|
|
1335
|
-
c.isString(
|
|
1336
|
-
const
|
|
1337
|
-
...
|
|
1338
|
-
signal:
|
|
1339
|
-
method:
|
|
1340
|
-
headers:
|
|
1660
|
+
c.isString(L) || (L = L ? "include" : "omit");
|
|
1661
|
+
const O = n && "credentials" in t.prototype, _e = {
|
|
1662
|
+
...ee,
|
|
1663
|
+
signal: te,
|
|
1664
|
+
method: b.toUpperCase(),
|
|
1665
|
+
headers: J.normalize().toJSON(),
|
|
1341
1666
|
body: R,
|
|
1342
1667
|
duplex: "half",
|
|
1343
|
-
credentials:
|
|
1668
|
+
credentials: O ? L : void 0
|
|
1344
1669
|
};
|
|
1345
|
-
|
|
1346
|
-
let D = await (
|
|
1347
|
-
const
|
|
1348
|
-
if (u && (
|
|
1670
|
+
W = n && new t(y, _e);
|
|
1671
|
+
let D = await (n ? Oe(W, ee) : Oe(y, _e));
|
|
1672
|
+
const Ne = u && (T === "stream" || T === "response");
|
|
1673
|
+
if (u && (S || Ne && B)) {
|
|
1349
1674
|
const k = {};
|
|
1350
|
-
["status", "statusText", "headers"].forEach((
|
|
1351
|
-
k[
|
|
1675
|
+
["status", "statusText", "headers"].forEach((ve) => {
|
|
1676
|
+
k[ve] = D[ve];
|
|
1352
1677
|
});
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1355
|
-
|
|
1678
|
+
const H = c.toFiniteNumber(D.headers.get("content-length")), [ge, se] = S && He(
|
|
1679
|
+
H,
|
|
1680
|
+
le(Ke(S), !0)
|
|
1356
1681
|
) || [];
|
|
1357
1682
|
D = new s(
|
|
1358
|
-
|
|
1359
|
-
|
|
1683
|
+
Je(D.body, We, ge, () => {
|
|
1684
|
+
se && se(), B && B();
|
|
1360
1685
|
}),
|
|
1361
1686
|
k
|
|
1362
1687
|
);
|
|
1363
1688
|
}
|
|
1364
|
-
|
|
1365
|
-
let
|
|
1366
|
-
return !
|
|
1367
|
-
|
|
1368
|
-
data:
|
|
1689
|
+
T = T || "text";
|
|
1690
|
+
let It = await h[c.findKey(h, T) || "text"](D, f);
|
|
1691
|
+
return !Ne && B && B(), await new Promise((k, H) => {
|
|
1692
|
+
ft(k, H, {
|
|
1693
|
+
data: It,
|
|
1369
1694
|
headers: _.from(D.headers),
|
|
1370
1695
|
status: D.status,
|
|
1371
1696
|
statusText: D.statusText,
|
|
1372
1697
|
config: f,
|
|
1373
|
-
request:
|
|
1698
|
+
request: W
|
|
1374
1699
|
});
|
|
1375
1700
|
});
|
|
1376
|
-
} catch (
|
|
1377
|
-
throw B && B(),
|
|
1378
|
-
new
|
|
1701
|
+
} catch (O) {
|
|
1702
|
+
throw B && B(), O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message) ? Object.assign(
|
|
1703
|
+
new P("Network Error", P.ERR_NETWORK, f, W, O && O.response),
|
|
1379
1704
|
{
|
|
1380
|
-
cause:
|
|
1705
|
+
cause: O.cause || O
|
|
1381
1706
|
}
|
|
1382
|
-
) :
|
|
1707
|
+
) : P.from(O, O && O.code, f, W, O && O.response);
|
|
1383
1708
|
}
|
|
1384
1709
|
};
|
|
1385
|
-
},
|
|
1386
|
-
let e =
|
|
1387
|
-
const { fetch: t, Request: s, Response:
|
|
1710
|
+
}, Ys = /* @__PURE__ */ new Map(), yt = (a) => {
|
|
1711
|
+
let e = a && a.env || {};
|
|
1712
|
+
const { fetch: t, Request: s, Response: r } = e, n = [
|
|
1388
1713
|
s,
|
|
1389
|
-
|
|
1714
|
+
r,
|
|
1390
1715
|
t
|
|
1391
1716
|
];
|
|
1392
|
-
let o =
|
|
1717
|
+
let o = n.length, i = o, l, d, u = Ys;
|
|
1393
1718
|
for (; i--; )
|
|
1394
|
-
l =
|
|
1719
|
+
l = n[i], d = u.get(l), d === void 0 && u.set(l, d = i ? /* @__PURE__ */ new Map() : Zs(e)), u = d;
|
|
1395
1720
|
return d;
|
|
1396
1721
|
};
|
|
1397
|
-
|
|
1398
|
-
const
|
|
1399
|
-
http:
|
|
1400
|
-
xhr:
|
|
1722
|
+
yt();
|
|
1723
|
+
const xe = {
|
|
1724
|
+
http: bs,
|
|
1725
|
+
xhr: Js,
|
|
1401
1726
|
fetch: {
|
|
1402
|
-
get:
|
|
1727
|
+
get: yt
|
|
1403
1728
|
}
|
|
1404
1729
|
};
|
|
1405
|
-
c.forEach(
|
|
1406
|
-
if (
|
|
1730
|
+
c.forEach(xe, (a, e) => {
|
|
1731
|
+
if (a) {
|
|
1407
1732
|
try {
|
|
1408
|
-
Object.defineProperty(
|
|
1733
|
+
Object.defineProperty(a, "name", { value: e });
|
|
1409
1734
|
} catch {
|
|
1410
1735
|
}
|
|
1411
|
-
Object.defineProperty(
|
|
1736
|
+
Object.defineProperty(a, "adapterName", { value: e });
|
|
1412
1737
|
}
|
|
1413
1738
|
});
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
|
|
1417
|
-
const { length: t } =
|
|
1418
|
-
let s,
|
|
1419
|
-
const
|
|
1739
|
+
const Qe = (a) => `- ${a}`, er = (a) => c.isFunction(a) || a === null || a === !1;
|
|
1740
|
+
function tr(a, e) {
|
|
1741
|
+
a = c.isArray(a) ? a : [a];
|
|
1742
|
+
const { length: t } = a;
|
|
1743
|
+
let s, r;
|
|
1744
|
+
const n = {};
|
|
1420
1745
|
for (let o = 0; o < t; o++) {
|
|
1421
|
-
s =
|
|
1746
|
+
s = a[o];
|
|
1422
1747
|
let i;
|
|
1423
|
-
if (
|
|
1424
|
-
throw new
|
|
1425
|
-
if (
|
|
1748
|
+
if (r = s, !er(s) && (r = xe[(i = String(s)).toLowerCase()], r === void 0))
|
|
1749
|
+
throw new P(`Unknown adapter '${i}'`);
|
|
1750
|
+
if (r && (c.isFunction(r) || (r = r.get(e))))
|
|
1426
1751
|
break;
|
|
1427
|
-
|
|
1752
|
+
n[i || "#" + o] = r;
|
|
1428
1753
|
}
|
|
1429
|
-
if (!
|
|
1430
|
-
const o = Object.entries(
|
|
1754
|
+
if (!r) {
|
|
1755
|
+
const o = Object.entries(n).map(
|
|
1431
1756
|
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1432
1757
|
);
|
|
1433
1758
|
let i = t ? o.length > 1 ? `since :
|
|
1434
|
-
` + o.map(
|
|
1435
|
-
`) : " " +
|
|
1436
|
-
throw new
|
|
1759
|
+
` + o.map(Qe).join(`
|
|
1760
|
+
`) : " " + Qe(o[0]) : "as no adapter specified";
|
|
1761
|
+
throw new P(
|
|
1437
1762
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1438
1763
|
"ERR_NOT_SUPPORT"
|
|
1439
1764
|
);
|
|
1440
1765
|
}
|
|
1441
|
-
return
|
|
1766
|
+
return r;
|
|
1442
1767
|
}
|
|
1443
|
-
const
|
|
1768
|
+
const wt = {
|
|
1444
1769
|
/**
|
|
1445
1770
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1446
1771
|
* @type {Function}
|
|
1447
1772
|
*/
|
|
1448
|
-
getAdapter:
|
|
1773
|
+
getAdapter: tr,
|
|
1449
1774
|
/**
|
|
1450
1775
|
* Exposes all known adapters
|
|
1451
1776
|
* @type {Object<string, Function|Object>}
|
|
1452
1777
|
*/
|
|
1453
|
-
adapters:
|
|
1778
|
+
adapters: xe
|
|
1454
1779
|
};
|
|
1455
|
-
function
|
|
1456
|
-
if (
|
|
1457
|
-
throw new
|
|
1780
|
+
function we(a) {
|
|
1781
|
+
if (a.cancelToken && a.cancelToken.throwIfRequested(), a.signal && a.signal.aborted)
|
|
1782
|
+
throw new Y(null, a);
|
|
1458
1783
|
}
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
), ["post", "put", "patch"].indexOf(
|
|
1464
|
-
return
|
|
1465
|
-
|
|
1466
|
-
|
|
1784
|
+
function Ze(a) {
|
|
1785
|
+
return we(a), a.headers = _.from(a.headers), a.data = ye.call(
|
|
1786
|
+
a,
|
|
1787
|
+
a.transformRequest
|
|
1788
|
+
), ["post", "put", "patch"].indexOf(a.method) !== -1 && a.headers.setContentType("application/x-www-form-urlencoded", !1), wt.getAdapter(a.adapter || Z.adapter, a)(a).then(function(s) {
|
|
1789
|
+
return we(a), s.data = ye.call(
|
|
1790
|
+
a,
|
|
1791
|
+
a.transformResponse,
|
|
1467
1792
|
s
|
|
1468
1793
|
), s.headers = _.from(s.headers), s;
|
|
1469
1794
|
}, function(s) {
|
|
1470
|
-
return
|
|
1471
|
-
|
|
1472
|
-
|
|
1795
|
+
return gt(s) || (we(a), s && s.response && (s.response.data = ye.call(
|
|
1796
|
+
a,
|
|
1797
|
+
a.transformResponse,
|
|
1473
1798
|
s.response
|
|
1474
1799
|
), s.response.headers = _.from(s.response.headers))), Promise.reject(s);
|
|
1475
1800
|
});
|
|
1476
1801
|
}
|
|
1477
|
-
const
|
|
1478
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((
|
|
1479
|
-
|
|
1480
|
-
return typeof s ===
|
|
1802
|
+
const Pt = "1.13.5", pe = {};
|
|
1803
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((a, e) => {
|
|
1804
|
+
pe[a] = function(s) {
|
|
1805
|
+
return typeof s === a || "a" + (e < 1 ? "n " : " ") + a;
|
|
1481
1806
|
};
|
|
1482
1807
|
});
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1485
|
-
function n
|
|
1486
|
-
return "[Axios v" +
|
|
1808
|
+
const Ye = {};
|
|
1809
|
+
pe.transitional = function(e, t, s) {
|
|
1810
|
+
function r(n, o) {
|
|
1811
|
+
return "[Axios v" + Pt + "] Transitional option '" + n + "'" + o + (s ? ". " + s : "");
|
|
1487
1812
|
}
|
|
1488
|
-
return (
|
|
1813
|
+
return (n, o, i) => {
|
|
1489
1814
|
if (e === !1)
|
|
1490
|
-
throw new
|
|
1491
|
-
|
|
1492
|
-
|
|
1815
|
+
throw new P(
|
|
1816
|
+
r(o, " has been removed" + (t ? " in " + t : "")),
|
|
1817
|
+
P.ERR_DEPRECATED
|
|
1493
1818
|
);
|
|
1494
|
-
return t && !
|
|
1495
|
-
|
|
1819
|
+
return t && !Ye[o] && (Ye[o] = !0, console.warn(
|
|
1820
|
+
r(
|
|
1496
1821
|
o,
|
|
1497
1822
|
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
1498
1823
|
)
|
|
1499
|
-
)), e ? e(
|
|
1824
|
+
)), e ? e(n, o, i) : !0;
|
|
1500
1825
|
};
|
|
1501
1826
|
};
|
|
1502
|
-
|
|
1827
|
+
pe.spelling = function(e) {
|
|
1503
1828
|
return (t, s) => (console.warn(`${s} is likely a misspelling of ${e}`), !0);
|
|
1504
1829
|
};
|
|
1505
|
-
function
|
|
1506
|
-
if (typeof
|
|
1507
|
-
throw new
|
|
1508
|
-
const s = Object.keys(
|
|
1509
|
-
let
|
|
1510
|
-
for (;
|
|
1511
|
-
const
|
|
1830
|
+
function sr(a, e, t) {
|
|
1831
|
+
if (typeof a != "object")
|
|
1832
|
+
throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
|
|
1833
|
+
const s = Object.keys(a);
|
|
1834
|
+
let r = s.length;
|
|
1835
|
+
for (; r-- > 0; ) {
|
|
1836
|
+
const n = s[r], o = e[n];
|
|
1512
1837
|
if (o) {
|
|
1513
|
-
const i =
|
|
1838
|
+
const i = a[n], l = i === void 0 || o(i, n, a);
|
|
1514
1839
|
if (l !== !0)
|
|
1515
|
-
throw new
|
|
1840
|
+
throw new P("option " + n + " must be " + l, P.ERR_BAD_OPTION_VALUE);
|
|
1516
1841
|
continue;
|
|
1517
1842
|
}
|
|
1518
1843
|
if (t !== !0)
|
|
1519
|
-
throw new
|
|
1844
|
+
throw new P("Unknown option " + n, P.ERR_BAD_OPTION);
|
|
1520
1845
|
}
|
|
1521
1846
|
}
|
|
1522
|
-
const
|
|
1523
|
-
assertOptions:
|
|
1524
|
-
validators:
|
|
1525
|
-
},
|
|
1847
|
+
const ie = {
|
|
1848
|
+
assertOptions: sr,
|
|
1849
|
+
validators: pe
|
|
1850
|
+
}, N = ie.validators;
|
|
1526
1851
|
let j = class {
|
|
1527
1852
|
constructor(e) {
|
|
1528
1853
|
this.defaults = e || {}, this.interceptors = {
|
|
1529
|
-
request: new
|
|
1530
|
-
response: new
|
|
1854
|
+
request: new je(),
|
|
1855
|
+
response: new je()
|
|
1531
1856
|
};
|
|
1532
1857
|
}
|
|
1533
1858
|
/**
|
|
@@ -1543,12 +1868,12 @@ let j = class {
|
|
|
1543
1868
|
return await this._request(e, t);
|
|
1544
1869
|
} catch (s) {
|
|
1545
1870
|
if (s instanceof Error) {
|
|
1546
|
-
let
|
|
1547
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1548
|
-
const
|
|
1871
|
+
let r = {};
|
|
1872
|
+
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1873
|
+
const n = r.stack ? r.stack.replace(/^.+\n/, "") : "";
|
|
1549
1874
|
try {
|
|
1550
|
-
s.stack ?
|
|
1551
|
-
` +
|
|
1875
|
+
s.stack ? n && !String(s.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1876
|
+
` + n) : s.stack = n;
|
|
1552
1877
|
} catch {
|
|
1553
1878
|
}
|
|
1554
1879
|
}
|
|
@@ -1556,81 +1881,81 @@ let j = class {
|
|
|
1556
1881
|
}
|
|
1557
1882
|
}
|
|
1558
1883
|
_request(e, t) {
|
|
1559
|
-
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t =
|
|
1560
|
-
const { transitional: s, paramsSerializer:
|
|
1561
|
-
s !== void 0 &&
|
|
1562
|
-
silentJSONParsing:
|
|
1563
|
-
forcedJSONParsing:
|
|
1564
|
-
clarifyTimeoutError:
|
|
1565
|
-
legacyInterceptorReqResOrdering:
|
|
1566
|
-
}, !1),
|
|
1567
|
-
serialize:
|
|
1568
|
-
} :
|
|
1569
|
-
encode:
|
|
1570
|
-
serialize:
|
|
1571
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0),
|
|
1572
|
-
baseUrl:
|
|
1573
|
-
withXsrfToken:
|
|
1884
|
+
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = M(this.defaults, t);
|
|
1885
|
+
const { transitional: s, paramsSerializer: r, headers: n } = t;
|
|
1886
|
+
s !== void 0 && ie.assertOptions(s, {
|
|
1887
|
+
silentJSONParsing: N.transitional(N.boolean),
|
|
1888
|
+
forcedJSONParsing: N.transitional(N.boolean),
|
|
1889
|
+
clarifyTimeoutError: N.transitional(N.boolean),
|
|
1890
|
+
legacyInterceptorReqResOrdering: N.transitional(N.boolean)
|
|
1891
|
+
}, !1), r != null && (c.isFunction(r) ? t.paramsSerializer = {
|
|
1892
|
+
serialize: r
|
|
1893
|
+
} : ie.assertOptions(r, {
|
|
1894
|
+
encode: N.function,
|
|
1895
|
+
serialize: N.function
|
|
1896
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), ie.assertOptions(t, {
|
|
1897
|
+
baseUrl: N.spelling("baseURL"),
|
|
1898
|
+
withXsrfToken: N.spelling("withXSRFToken")
|
|
1574
1899
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1575
|
-
let o =
|
|
1576
|
-
|
|
1577
|
-
|
|
1900
|
+
let o = n && c.merge(
|
|
1901
|
+
n.common,
|
|
1902
|
+
n[t.method]
|
|
1578
1903
|
);
|
|
1579
|
-
|
|
1904
|
+
n && c.forEach(
|
|
1580
1905
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1581
1906
|
(f) => {
|
|
1582
|
-
delete
|
|
1907
|
+
delete n[f];
|
|
1583
1908
|
}
|
|
1584
|
-
), t.headers = _.concat(o,
|
|
1909
|
+
), t.headers = _.concat(o, n);
|
|
1585
1910
|
const i = [];
|
|
1586
1911
|
let l = !0;
|
|
1587
|
-
this.interceptors.request.forEach(function(
|
|
1588
|
-
if (typeof
|
|
1912
|
+
this.interceptors.request.forEach(function(y) {
|
|
1913
|
+
if (typeof y.runWhen == "function" && y.runWhen(t) === !1)
|
|
1589
1914
|
return;
|
|
1590
|
-
l = l &&
|
|
1591
|
-
const
|
|
1592
|
-
|
|
1915
|
+
l = l && y.synchronous;
|
|
1916
|
+
const b = t.transitional || Se;
|
|
1917
|
+
b && b.legacyInterceptorReqResOrdering ? i.unshift(y.fulfilled, y.rejected) : i.push(y.fulfilled, y.rejected);
|
|
1593
1918
|
});
|
|
1594
1919
|
const d = [];
|
|
1595
|
-
this.interceptors.response.forEach(function(
|
|
1596
|
-
d.push(
|
|
1920
|
+
this.interceptors.response.forEach(function(y) {
|
|
1921
|
+
d.push(y.fulfilled, y.rejected);
|
|
1597
1922
|
});
|
|
1598
|
-
let u,
|
|
1923
|
+
let u, h = 0, m;
|
|
1599
1924
|
if (!l) {
|
|
1600
|
-
const f = [
|
|
1601
|
-
for (f.unshift(...i), f.push(...d),
|
|
1602
|
-
u = u.then(f[
|
|
1925
|
+
const f = [Ze.bind(this), void 0];
|
|
1926
|
+
for (f.unshift(...i), f.push(...d), m = f.length, u = Promise.resolve(t); h < m; )
|
|
1927
|
+
u = u.then(f[h++], f[h++]);
|
|
1603
1928
|
return u;
|
|
1604
1929
|
}
|
|
1605
|
-
|
|
1606
|
-
let
|
|
1607
|
-
for (;
|
|
1608
|
-
const f = i[
|
|
1930
|
+
m = i.length;
|
|
1931
|
+
let q = t;
|
|
1932
|
+
for (; h < m; ) {
|
|
1933
|
+
const f = i[h++], y = i[h++];
|
|
1609
1934
|
try {
|
|
1610
|
-
|
|
1611
|
-
} catch (
|
|
1612
|
-
|
|
1935
|
+
q = f(q);
|
|
1936
|
+
} catch (b) {
|
|
1937
|
+
y.call(this, b);
|
|
1613
1938
|
break;
|
|
1614
1939
|
}
|
|
1615
1940
|
}
|
|
1616
1941
|
try {
|
|
1617
|
-
u =
|
|
1942
|
+
u = Ze.call(this, q);
|
|
1618
1943
|
} catch (f) {
|
|
1619
1944
|
return Promise.reject(f);
|
|
1620
1945
|
}
|
|
1621
|
-
for (
|
|
1622
|
-
u = u.then(d[
|
|
1946
|
+
for (h = 0, m = d.length; h < m; )
|
|
1947
|
+
u = u.then(d[h++], d[h++]);
|
|
1623
1948
|
return u;
|
|
1624
1949
|
}
|
|
1625
1950
|
getUri(e) {
|
|
1626
|
-
e =
|
|
1627
|
-
const t =
|
|
1628
|
-
return
|
|
1951
|
+
e = M(this.defaults, e);
|
|
1952
|
+
const t = bt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1953
|
+
return ht(t, e.params, e.paramsSerializer);
|
|
1629
1954
|
}
|
|
1630
1955
|
};
|
|
1631
1956
|
c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1632
1957
|
j.prototype[e] = function(t, s) {
|
|
1633
|
-
return this.request(
|
|
1958
|
+
return this.request(M(s || {}, {
|
|
1634
1959
|
method: e,
|
|
1635
1960
|
url: t,
|
|
1636
1961
|
data: (s || {}).data
|
|
@@ -1639,44 +1964,44 @@ c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1639
1964
|
});
|
|
1640
1965
|
c.forEach(["post", "put", "patch"], function(e) {
|
|
1641
1966
|
function t(s) {
|
|
1642
|
-
return function(
|
|
1643
|
-
return this.request(
|
|
1967
|
+
return function(n, o, i) {
|
|
1968
|
+
return this.request(M(i || {}, {
|
|
1644
1969
|
method: e,
|
|
1645
1970
|
headers: s ? {
|
|
1646
1971
|
"Content-Type": "multipart/form-data"
|
|
1647
1972
|
} : {},
|
|
1648
|
-
url:
|
|
1973
|
+
url: n,
|
|
1649
1974
|
data: o
|
|
1650
1975
|
}));
|
|
1651
1976
|
};
|
|
1652
1977
|
}
|
|
1653
1978
|
j.prototype[e] = t(), j.prototype[e + "Form"] = t(!0);
|
|
1654
1979
|
});
|
|
1655
|
-
let
|
|
1980
|
+
let rr = class qt {
|
|
1656
1981
|
constructor(e) {
|
|
1657
1982
|
if (typeof e != "function")
|
|
1658
1983
|
throw new TypeError("executor must be a function.");
|
|
1659
1984
|
let t;
|
|
1660
|
-
this.promise = new Promise(function(
|
|
1661
|
-
t =
|
|
1985
|
+
this.promise = new Promise(function(n) {
|
|
1986
|
+
t = n;
|
|
1662
1987
|
});
|
|
1663
1988
|
const s = this;
|
|
1664
|
-
this.promise.then((
|
|
1989
|
+
this.promise.then((r) => {
|
|
1665
1990
|
if (!s._listeners) return;
|
|
1666
|
-
let
|
|
1667
|
-
for (;
|
|
1668
|
-
s._listeners[
|
|
1991
|
+
let n = s._listeners.length;
|
|
1992
|
+
for (; n-- > 0; )
|
|
1993
|
+
s._listeners[n](r);
|
|
1669
1994
|
s._listeners = null;
|
|
1670
|
-
}), this.promise.then = (
|
|
1671
|
-
let
|
|
1995
|
+
}), this.promise.then = (r) => {
|
|
1996
|
+
let n;
|
|
1672
1997
|
const o = new Promise((i) => {
|
|
1673
|
-
s.subscribe(i),
|
|
1674
|
-
}).then(
|
|
1998
|
+
s.subscribe(i), n = i;
|
|
1999
|
+
}).then(r);
|
|
1675
2000
|
return o.cancel = function() {
|
|
1676
|
-
s.unsubscribe(
|
|
2001
|
+
s.unsubscribe(n);
|
|
1677
2002
|
}, o;
|
|
1678
|
-
}, e(function(
|
|
1679
|
-
s.reason || (s.reason = new
|
|
2003
|
+
}, e(function(n, o, i) {
|
|
2004
|
+
s.reason || (s.reason = new Y(n, o, i), t(s.reason));
|
|
1680
2005
|
});
|
|
1681
2006
|
}
|
|
1682
2007
|
/**
|
|
@@ -1718,22 +2043,22 @@ let Ks = class gt {
|
|
|
1718
2043
|
static source() {
|
|
1719
2044
|
let e;
|
|
1720
2045
|
return {
|
|
1721
|
-
token: new
|
|
1722
|
-
e =
|
|
2046
|
+
token: new qt(function(r) {
|
|
2047
|
+
e = r;
|
|
1723
2048
|
}),
|
|
1724
2049
|
cancel: e
|
|
1725
2050
|
};
|
|
1726
2051
|
}
|
|
1727
2052
|
};
|
|
1728
|
-
function
|
|
2053
|
+
function ar(a) {
|
|
1729
2054
|
return function(t) {
|
|
1730
|
-
return
|
|
2055
|
+
return a.apply(null, t);
|
|
1731
2056
|
};
|
|
1732
2057
|
}
|
|
1733
|
-
function
|
|
1734
|
-
return c.isObject(
|
|
2058
|
+
function nr(a) {
|
|
2059
|
+
return c.isObject(a) && a.isAxiosError === !0;
|
|
1735
2060
|
}
|
|
1736
|
-
const
|
|
2061
|
+
const Ie = {
|
|
1737
2062
|
Continue: 100,
|
|
1738
2063
|
SwitchingProtocols: 101,
|
|
1739
2064
|
Processing: 102,
|
|
@@ -1804,70 +2129,100 @@ const ye = {
|
|
|
1804
2129
|
SslHandshakeFailed: 525,
|
|
1805
2130
|
InvalidSslCertificate: 526
|
|
1806
2131
|
};
|
|
1807
|
-
Object.entries(
|
|
1808
|
-
|
|
2132
|
+
Object.entries(Ie).forEach(([a, e]) => {
|
|
2133
|
+
Ie[e] = a;
|
|
1809
2134
|
});
|
|
1810
|
-
function
|
|
1811
|
-
const e = new j(
|
|
1812
|
-
return c.extend(t, j.prototype, e, { allOwnKeys: !0 }), c.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(
|
|
1813
|
-
return
|
|
2135
|
+
function Rt(a) {
|
|
2136
|
+
const e = new j(a), t = tt(j.prototype.request, e);
|
|
2137
|
+
return c.extend(t, j.prototype, e, { allOwnKeys: !0 }), c.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(r) {
|
|
2138
|
+
return Rt(M(a, r));
|
|
1814
2139
|
}, t;
|
|
1815
2140
|
}
|
|
1816
|
-
const
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
2141
|
+
const C = Rt(Z);
|
|
2142
|
+
C.Axios = j;
|
|
2143
|
+
C.CanceledError = Y;
|
|
2144
|
+
C.CancelToken = rr;
|
|
2145
|
+
C.isCancel = gt;
|
|
2146
|
+
C.VERSION = Pt;
|
|
2147
|
+
C.toFormData = he;
|
|
2148
|
+
C.AxiosError = P;
|
|
2149
|
+
C.Cancel = C.CanceledError;
|
|
2150
|
+
C.all = function(e) {
|
|
1826
2151
|
return Promise.all(e);
|
|
1827
2152
|
};
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
2153
|
+
C.spread = ar;
|
|
2154
|
+
C.isAxiosError = nr;
|
|
2155
|
+
C.mergeConfig = M;
|
|
2156
|
+
C.AxiosHeaders = _;
|
|
2157
|
+
C.formToJSON = (a) => pt(c.isHTMLForm(a) ? new FormData(a) : a);
|
|
2158
|
+
C.getAdapter = wt.getAdapter;
|
|
2159
|
+
C.HttpStatusCode = Ie;
|
|
2160
|
+
C.default = C;
|
|
1836
2161
|
const {
|
|
1837
|
-
Axios:
|
|
1838
|
-
AxiosError:
|
|
1839
|
-
CanceledError:
|
|
1840
|
-
isCancel:
|
|
1841
|
-
CancelToken:
|
|
1842
|
-
VERSION:
|
|
1843
|
-
all:
|
|
1844
|
-
Cancel:
|
|
1845
|
-
isAxiosError:
|
|
1846
|
-
spread:
|
|
1847
|
-
toFormData:
|
|
1848
|
-
AxiosHeaders:
|
|
1849
|
-
HttpStatusCode:
|
|
1850
|
-
formToJSON:
|
|
1851
|
-
getAdapter:
|
|
1852
|
-
mergeConfig:
|
|
1853
|
-
} =
|
|
1854
|
-
class
|
|
1855
|
-
axiosInstance =
|
|
2162
|
+
Axios: wr,
|
|
2163
|
+
AxiosError: Pr,
|
|
2164
|
+
CanceledError: qr,
|
|
2165
|
+
isCancel: Rr,
|
|
2166
|
+
CancelToken: Ir,
|
|
2167
|
+
VERSION: Cr,
|
|
2168
|
+
all: Fr,
|
|
2169
|
+
Cancel: Er,
|
|
2170
|
+
isAxiosError: Sr,
|
|
2171
|
+
spread: Tr,
|
|
2172
|
+
toFormData: xr,
|
|
2173
|
+
AxiosHeaders: Or,
|
|
2174
|
+
HttpStatusCode: $r,
|
|
2175
|
+
formToJSON: _r,
|
|
2176
|
+
getAdapter: Nr,
|
|
2177
|
+
mergeConfig: vr
|
|
2178
|
+
} = C, or = "/@api/deki";
|
|
2179
|
+
class w {
|
|
2180
|
+
axiosInstance = C.create();
|
|
1856
2181
|
format = "json";
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
2182
|
+
debug;
|
|
2183
|
+
constructor(e, t, s = "json", r) {
|
|
2184
|
+
if (this.debug = Ce("cxone-expert:requests", r), !e)
|
|
2185
|
+
throw this.debug("TLD is required to initialize Requests module"), new Error("TLD is required");
|
|
1860
2186
|
if (!t)
|
|
1861
|
-
throw new Error("Auth object is required");
|
|
2187
|
+
throw this.debug("Auth object is required to initialize Requests module"), new Error("Auth object is required");
|
|
1862
2188
|
let n = e;
|
|
1863
|
-
!n.startsWith("http://") && !n.startsWith("https://") && (n = `https://${n}`), n.endsWith("/") && (n = n.slice(0, n.length - 1)), this.format = s, this.axiosInstance =
|
|
1864
|
-
baseURL: `${n}${
|
|
2189
|
+
!n.startsWith("http://") && !n.startsWith("https://") && (n = `https://${n}`), n.endsWith("/") && (n = n.slice(0, n.length - 1)), this.format = s, this.axiosInstance = C.create({
|
|
2190
|
+
baseURL: `${n}${or}`,
|
|
1865
2191
|
headers: {
|
|
1866
2192
|
"Content-Type": "application/json",
|
|
1867
2193
|
"X-Requested-With": "XMLHttpRequest",
|
|
1868
2194
|
...t
|
|
1869
2195
|
}
|
|
1870
|
-
});
|
|
2196
|
+
}), this.setupInterceptors();
|
|
2197
|
+
}
|
|
2198
|
+
setupInterceptors() {
|
|
2199
|
+
this.axiosInstance.interceptors.request.use(
|
|
2200
|
+
(e) => {
|
|
2201
|
+
if (this.debug(`→ ${e.method?.toUpperCase()} ${e.baseURL}${e.url}`), e.params && Object.keys(e.params).length > 0 && this.debug(" Query params:", JSON.stringify(e.params)), e.data && e.headers?.["Content-Type"] !== "application/octet-stream") {
|
|
2202
|
+
const t = typeof e.data == "string" ? e.data : JSON.stringify(e.data);
|
|
2203
|
+
t.length > 200 ? this.debug(" Body:", t.substring(0, 200) + "... (truncated)") : t.length > 0 && this.debug(" Body:", t);
|
|
2204
|
+
}
|
|
2205
|
+
return e;
|
|
2206
|
+
},
|
|
2207
|
+
(e) => (this.debug("✗ Request error:", e.message), Promise.reject(e))
|
|
2208
|
+
), this.axiosInstance.interceptors.response.use(
|
|
2209
|
+
(e) => {
|
|
2210
|
+
if (this.debug(`← ${e.status} ${e.config.method?.toUpperCase()} ${e.config.url}`), e.data && e.headers["content-type"]?.includes("application/json")) {
|
|
2211
|
+
const t = JSON.stringify(e.data);
|
|
2212
|
+
t.length > 200 ? this.debug(" Response:", t.substring(0, 200) + "... (truncated)") : this.debug(" Response:", t);
|
|
2213
|
+
} else e.headers["content-type"]?.includes("text/") ? this.debug(" Response: [text content]") : e.data && this.debug(" Response: [binary content]");
|
|
2214
|
+
return e;
|
|
2215
|
+
},
|
|
2216
|
+
(e) => {
|
|
2217
|
+
if (e.response) {
|
|
2218
|
+
if (this.debug(`✗ ${e.response.status} ${e.config?.method?.toUpperCase()} ${e.config?.url}`), this.debug(" Error:", e.response.statusText), e.response.data) {
|
|
2219
|
+
const t = typeof e.response.data == "string" ? e.response.data : JSON.stringify(e.response.data);
|
|
2220
|
+
t.length > 200 ? this.debug(" Error details:", t.substring(0, 200) + "... (truncated)") : this.debug(" Error details:", t);
|
|
2221
|
+
}
|
|
2222
|
+
} else e.request ? this.debug("✗ No response received:", e.message) : this.debug("✗ Request setup error:", e.message);
|
|
2223
|
+
return Promise.reject(e);
|
|
2224
|
+
}
|
|
2225
|
+
);
|
|
1871
2226
|
}
|
|
1872
2227
|
getFormatParam() {
|
|
1873
2228
|
return {
|
|
@@ -1899,11 +2254,12 @@ class g {
|
|
|
1899
2254
|
return await this.axiosInstance.head(e, { ...t });
|
|
1900
2255
|
}
|
|
1901
2256
|
}
|
|
1902
|
-
class
|
|
2257
|
+
class ir {
|
|
1903
2258
|
globals;
|
|
1904
2259
|
_auth;
|
|
2260
|
+
debug;
|
|
1905
2261
|
constructor(e, t) {
|
|
1906
|
-
this.globals = e, this._auth = t;
|
|
2262
|
+
this.globals = e, this._auth = t, this.debug = Ce("cxone-expert-node:pages", e.debug), this.debug("Pages module initialized");
|
|
1907
2263
|
}
|
|
1908
2264
|
/**
|
|
1909
2265
|
* Converts a page identifier (number or string) into the format expected by the API.
|
|
@@ -1929,270 +2285,307 @@ class Vs {
|
|
|
1929
2285
|
parseKey(e) {
|
|
1930
2286
|
return `${encodeURIComponent(encodeURIComponent(e))}`;
|
|
1931
2287
|
}
|
|
2288
|
+
/**
|
|
2289
|
+
* Creates a Requests instance with the current global settings including debug state.
|
|
2290
|
+
* @param tld - The top-level domain
|
|
2291
|
+
* @param auth - The authentication object
|
|
2292
|
+
* @returns A configured Requests instance
|
|
2293
|
+
*/
|
|
2294
|
+
createRequests(e, t) {
|
|
2295
|
+
return new w(e, t, "json", this.globals.debug);
|
|
2296
|
+
}
|
|
1932
2297
|
async getPages(e, t) {
|
|
1933
|
-
|
|
1934
|
-
|
|
2298
|
+
this.debug("getPages called");
|
|
2299
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages", {
|
|
1935
2300
|
params: {
|
|
1936
2301
|
...e
|
|
1937
2302
|
}
|
|
1938
|
-
})
|
|
2303
|
+
});
|
|
2304
|
+
return this.debug("getPages completed successfully"), o.data;
|
|
1939
2305
|
}
|
|
1940
2306
|
async getPage(e, t, s) {
|
|
1941
|
-
|
|
1942
|
-
|
|
2307
|
+
this.debug("getPage called for:", e);
|
|
2308
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}`, {
|
|
1943
2309
|
params: {
|
|
1944
2310
|
...t
|
|
1945
2311
|
}
|
|
1946
|
-
})
|
|
2312
|
+
});
|
|
2313
|
+
return this.debug("getPage completed successfully"), l.data;
|
|
1947
2314
|
}
|
|
1948
2315
|
async getPageContents(e, t, s) {
|
|
1949
|
-
|
|
1950
|
-
|
|
2316
|
+
this.debug("getPageContents called for page:", e);
|
|
2317
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/contents`, {
|
|
1951
2318
|
params: {
|
|
1952
|
-
...
|
|
2319
|
+
...t
|
|
1953
2320
|
}
|
|
1954
|
-
})
|
|
2321
|
+
});
|
|
2322
|
+
return this.debug("getPageContents retrieved contents for page:", e), l.data;
|
|
1955
2323
|
}
|
|
1956
2324
|
async getPageContentsExplain(e, t, s) {
|
|
1957
|
-
|
|
1958
|
-
|
|
2325
|
+
this.debug("getPageContentsExplain called for page:", e);
|
|
2326
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/contents/explain`, {
|
|
1959
2327
|
params: {
|
|
1960
2328
|
...t
|
|
1961
2329
|
}
|
|
1962
|
-
})
|
|
2330
|
+
});
|
|
2331
|
+
return this.debug("getPageContentsExplain retrieved contents for page:", e), l.data;
|
|
1963
2332
|
}
|
|
1964
2333
|
async getPageDiff(e, t, s) {
|
|
1965
|
-
|
|
1966
|
-
|
|
2334
|
+
this.debug("getPageDiff called for page:", e);
|
|
2335
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/diff`, {
|
|
1967
2336
|
params: {
|
|
1968
2337
|
...t
|
|
1969
2338
|
}
|
|
1970
|
-
})
|
|
2339
|
+
});
|
|
2340
|
+
return this.debug("getPageDiff retrieved diff for page:", e), l.data;
|
|
1971
2341
|
}
|
|
1972
2342
|
async getPageExplain(e, t, s) {
|
|
1973
|
-
|
|
1974
|
-
|
|
2343
|
+
this.debug("getPageExplain called for page:", e);
|
|
2344
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
|
|
1975
2345
|
params: {
|
|
1976
2346
|
...t
|
|
1977
2347
|
}
|
|
1978
|
-
})
|
|
2348
|
+
});
|
|
2349
|
+
return this.debug("getPageExplain retrieved explanation for page:", e), l.data;
|
|
1979
2350
|
}
|
|
1980
|
-
async getPageExportToken(e, t, s,
|
|
1981
|
-
|
|
1982
|
-
|
|
2351
|
+
async getPageExportToken(e, t, s, r) {
|
|
2352
|
+
this.debug("getPageExportToken called for page:", e);
|
|
2353
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).get(`/pages/${n}/export/${t}`, {
|
|
1983
2354
|
params: {
|
|
1984
2355
|
...s
|
|
1985
2356
|
},
|
|
1986
2357
|
responseType: "stream"
|
|
1987
|
-
})
|
|
2358
|
+
});
|
|
2359
|
+
return this.debug("getPageExportToken successfully retrieved export for page:", e), d.data;
|
|
1988
2360
|
}
|
|
1989
|
-
async getPageExportTokenFilename(e, t, s,
|
|
1990
|
-
|
|
1991
|
-
|
|
2361
|
+
async getPageExportTokenFilename(e, t, s, r, n) {
|
|
2362
|
+
this.debug("getPageExportTokenFilename called for page:", e);
|
|
2363
|
+
const o = this.parsePageId(e), i = this.parseFileName(s), l = p(this.globals, n?.tld), d = g(this.globals, n?.auth), h = await this.createRequests(l, d).get(`/pages/${o}/export/${t}/${i}`, {
|
|
1992
2364
|
params: {
|
|
1993
|
-
...
|
|
2365
|
+
...r
|
|
1994
2366
|
},
|
|
1995
2367
|
responseType: "stream"
|
|
1996
|
-
})
|
|
2368
|
+
});
|
|
2369
|
+
return this.debug("getPageExportTokenFilename successfully retrieved export for page:", e), h.data;
|
|
1997
2370
|
}
|
|
1998
2371
|
async getPageFilesSubpages(e, t, s) {
|
|
1999
|
-
|
|
2000
|
-
|
|
2372
|
+
this.debug("getPageFilesSubpages called for page:", e);
|
|
2373
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
|
|
2001
2374
|
params: {
|
|
2002
2375
|
...t
|
|
2003
2376
|
}
|
|
2004
|
-
})
|
|
2377
|
+
});
|
|
2378
|
+
return this.debug("getPageFilesSubpages retrieved file and subpage info for page:", e), l.data;
|
|
2005
2379
|
}
|
|
2006
2380
|
async getPageFiles(e, t, s) {
|
|
2007
|
-
|
|
2008
|
-
|
|
2381
|
+
this.debug("getPageFiles called");
|
|
2382
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/explain`, {
|
|
2009
2383
|
params: {
|
|
2010
2384
|
...t
|
|
2011
2385
|
}
|
|
2012
|
-
})
|
|
2386
|
+
});
|
|
2387
|
+
return this.debug("getPageFiles retrieved file info for page:", e), l.data;
|
|
2013
2388
|
}
|
|
2014
|
-
async getPageFile(e, t, s,
|
|
2015
|
-
|
|
2016
|
-
|
|
2389
|
+
async getPageFile(e, t, s, r) {
|
|
2390
|
+
this.debug("getPageFile called for page:", e);
|
|
2391
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}`, {
|
|
2017
2392
|
params: {
|
|
2018
2393
|
...s
|
|
2019
2394
|
},
|
|
2020
2395
|
responseType: "stream"
|
|
2021
|
-
})
|
|
2396
|
+
});
|
|
2397
|
+
return this.debug("getPageFile successfully retrieved file for page:", e), u.data;
|
|
2022
2398
|
}
|
|
2023
|
-
async getPageFileDescription(e, t, s,
|
|
2024
|
-
|
|
2025
|
-
|
|
2399
|
+
async getPageFileDescription(e, t, s, r) {
|
|
2400
|
+
this.debug("getPageFileDescription called for page:", e);
|
|
2401
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/description`, {
|
|
2026
2402
|
params: {
|
|
2027
2403
|
...s
|
|
2028
2404
|
},
|
|
2029
2405
|
responseType: "stream"
|
|
2030
|
-
})
|
|
2406
|
+
});
|
|
2407
|
+
return this.debug("getPageFileDescription successfully retrieved description for page:", e), u.data;
|
|
2031
2408
|
}
|
|
2032
|
-
async getPageFileInfo(e, t, s,
|
|
2033
|
-
|
|
2034
|
-
|
|
2409
|
+
async getPageFileInfo(e, t, s, r) {
|
|
2410
|
+
this.debug("getPageFileInfo called for page:", e);
|
|
2411
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/info`, {
|
|
2035
2412
|
params: {
|
|
2036
2413
|
...s
|
|
2037
2414
|
}
|
|
2038
|
-
})
|
|
2415
|
+
});
|
|
2416
|
+
return this.debug("getPageFileInfo successfully retrieved info for file on page:", e), u.data;
|
|
2039
2417
|
}
|
|
2040
|
-
async getPageFileRevisions(e, t, s,
|
|
2041
|
-
|
|
2042
|
-
|
|
2418
|
+
async getPageFileRevisions(e, t, s, r) {
|
|
2419
|
+
this.debug("getPageFileRevisions called for page:", e);
|
|
2420
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/files/${o}/revisions`, {
|
|
2043
2421
|
params: {
|
|
2044
2422
|
...s
|
|
2045
2423
|
}
|
|
2046
|
-
})
|
|
2424
|
+
});
|
|
2425
|
+
return this.debug("getPageFileRevisions successfully retrieved revisions for file on page:", e), u.data;
|
|
2047
2426
|
}
|
|
2048
2427
|
async getPageFind(e, t, s) {
|
|
2049
|
-
|
|
2050
|
-
|
|
2428
|
+
this.debug("getPageFind called for page:", e);
|
|
2429
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/find`, {
|
|
2051
2430
|
params: {
|
|
2052
2431
|
...t
|
|
2053
2432
|
}
|
|
2054
|
-
})
|
|
2433
|
+
});
|
|
2434
|
+
return this.debug("getPageFind successfully retrieved find results for page:", e), l.data;
|
|
2055
2435
|
}
|
|
2056
2436
|
async getPageInfo(e, t, s) {
|
|
2057
|
-
|
|
2058
|
-
|
|
2437
|
+
this.debug("getPageInfo called for page:", e);
|
|
2438
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/info`, {
|
|
2059
2439
|
params: {
|
|
2060
2440
|
...t
|
|
2061
2441
|
}
|
|
2062
|
-
})
|
|
2442
|
+
});
|
|
2443
|
+
return this.debug("getPageInfo successfully retrieved info for page:", e), l.data;
|
|
2063
2444
|
}
|
|
2064
2445
|
async getPageLinks(e, t, s) {
|
|
2065
|
-
|
|
2066
|
-
|
|
2446
|
+
this.debug("getPageLinks called for page:", e);
|
|
2447
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/links`, {
|
|
2067
2448
|
params: {
|
|
2068
2449
|
...t
|
|
2069
2450
|
}
|
|
2070
|
-
})
|
|
2451
|
+
});
|
|
2452
|
+
return this.debug("getPageLinks successfully retrieved links for page:", e), l.data;
|
|
2071
2453
|
}
|
|
2072
2454
|
async getPagePDF(e, t, s) {
|
|
2073
|
-
|
|
2074
|
-
|
|
2455
|
+
this.debug("getPagePDF called for page:", e);
|
|
2456
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/pdf`, {
|
|
2075
2457
|
params: {
|
|
2076
2458
|
...t
|
|
2077
2459
|
},
|
|
2078
2460
|
responseType: "stream"
|
|
2079
|
-
})
|
|
2461
|
+
});
|
|
2462
|
+
return this.debug("getPagePDF successfully retrieved PDF for page:", e), l.data;
|
|
2080
2463
|
}
|
|
2081
|
-
async getPagePDFFilename(e, t, s,
|
|
2082
|
-
|
|
2083
|
-
|
|
2464
|
+
async getPagePDFFilename(e, t, s, r) {
|
|
2465
|
+
this.debug("getPagePDFFilename called for page:", e);
|
|
2466
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/pdf/${o}`, {
|
|
2084
2467
|
params: {
|
|
2085
2468
|
...s
|
|
2086
2469
|
},
|
|
2087
2470
|
responseType: "stream"
|
|
2088
|
-
})
|
|
2471
|
+
});
|
|
2472
|
+
return this.debug("getPagePDFFilename successfully retrieved PDF for page:", e), u.data;
|
|
2089
2473
|
}
|
|
2090
2474
|
async getPageProperties(e, t, s) {
|
|
2091
|
-
|
|
2092
|
-
|
|
2475
|
+
this.debug("getPageProperties called for page:", e);
|
|
2476
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/properties`, {
|
|
2093
2477
|
params: {
|
|
2094
2478
|
...t
|
|
2095
2479
|
}
|
|
2096
|
-
})
|
|
2480
|
+
});
|
|
2481
|
+
return this.debug("getPageProperties successfully retrieved properties for page:", e), l.data;
|
|
2097
2482
|
}
|
|
2098
|
-
async getPagePropertiesKey(e, t, s,
|
|
2099
|
-
|
|
2100
|
-
|
|
2483
|
+
async getPagePropertiesKey(e, t, s, r) {
|
|
2484
|
+
this.debug("getPagePropertiesKey called for page:", e);
|
|
2485
|
+
const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/properties/${o}`, {
|
|
2101
2486
|
params: {
|
|
2102
2487
|
...s
|
|
2103
2488
|
}
|
|
2104
|
-
})
|
|
2489
|
+
});
|
|
2490
|
+
return this.debug("getPagePropertiesKey successfully retrieved property key for page:", e), u.data;
|
|
2105
2491
|
}
|
|
2106
|
-
async getPagePropertiesKeyInfo(e, t, s,
|
|
2107
|
-
|
|
2108
|
-
|
|
2492
|
+
async getPagePropertiesKeyInfo(e, t, s, r) {
|
|
2493
|
+
this.debug("getPagePropertiesKeyInfo called for page:", e);
|
|
2494
|
+
const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).get(`/pages/${n}/properties/${o}/info`, {
|
|
2109
2495
|
params: {
|
|
2110
2496
|
...s
|
|
2111
2497
|
}
|
|
2112
|
-
})
|
|
2498
|
+
});
|
|
2499
|
+
return this.debug("getPagePropertiesKeyInfo successfully retrieved property key info for page:", e), u.data;
|
|
2113
2500
|
}
|
|
2114
2501
|
async getPageRatings(e, t, s) {
|
|
2115
|
-
|
|
2116
|
-
|
|
2502
|
+
this.debug("getPageRatings called for page:", e);
|
|
2503
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/ratings`, {
|
|
2117
2504
|
params: {
|
|
2118
2505
|
...t
|
|
2119
2506
|
}
|
|
2120
|
-
})
|
|
2507
|
+
});
|
|
2508
|
+
return this.debug("getPageRatings successfully retrieved ratings for page:", e), l.data;
|
|
2121
2509
|
}
|
|
2122
2510
|
async getPageRevisions(e, t, s) {
|
|
2123
|
-
|
|
2124
|
-
|
|
2511
|
+
this.debug("getPageRevisions called for page:", e);
|
|
2512
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/revisions`, {
|
|
2125
2513
|
params: {
|
|
2126
2514
|
...t
|
|
2127
2515
|
}
|
|
2128
|
-
})
|
|
2516
|
+
});
|
|
2517
|
+
return this.debug("getPageRevisions successfully retrieved revisions for page:", e), l.data;
|
|
2129
2518
|
}
|
|
2130
2519
|
async getPageSubpages(e, t, s) {
|
|
2131
|
-
|
|
2132
|
-
|
|
2520
|
+
this.debug("getPageSubpages called for page:", e);
|
|
2521
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/subpages`, {
|
|
2133
2522
|
params: {
|
|
2134
2523
|
...t
|
|
2135
2524
|
}
|
|
2136
|
-
})
|
|
2525
|
+
});
|
|
2526
|
+
return this.debug("getPageSubpages successfully retrieved subpages for page:", e), l.data;
|
|
2137
2527
|
}
|
|
2138
2528
|
async getPageTags(e, t, s) {
|
|
2139
|
-
|
|
2140
|
-
|
|
2529
|
+
this.debug("getPageTags called for page:", e);
|
|
2530
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/tags`, {
|
|
2141
2531
|
params: {
|
|
2142
2532
|
...t
|
|
2143
2533
|
}
|
|
2144
|
-
})
|
|
2534
|
+
});
|
|
2535
|
+
return this.debug("getPageTags successfully retrieved tags for page:", e), l.data;
|
|
2145
2536
|
}
|
|
2146
2537
|
async getPageTree(e, t, s) {
|
|
2147
|
-
|
|
2148
|
-
|
|
2538
|
+
this.debug("getPageTree called for page:", e);
|
|
2539
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).get(`/pages/${r}/tree`, {
|
|
2149
2540
|
params: {
|
|
2150
2541
|
...t
|
|
2151
2542
|
}
|
|
2152
|
-
})
|
|
2543
|
+
});
|
|
2544
|
+
return this.debug("getPageTree successfully retrieved tree for page:", e), l.data;
|
|
2153
2545
|
}
|
|
2154
|
-
async getPageBook(e, t
|
|
2155
|
-
this.
|
|
2156
|
-
const
|
|
2157
|
-
return (await new g(n, a).get("/pages/book", {
|
|
2546
|
+
async getPageBook(e, t) {
|
|
2547
|
+
this.debug("getPageBook called");
|
|
2548
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/book", {
|
|
2158
2549
|
params: {
|
|
2159
|
-
...
|
|
2550
|
+
...e
|
|
2160
2551
|
},
|
|
2161
2552
|
responseType: "stream"
|
|
2162
|
-
})
|
|
2553
|
+
});
|
|
2554
|
+
return this.debug("getPageBook successfully retrieved book"), o.data;
|
|
2163
2555
|
}
|
|
2164
|
-
async getPageBookFilename(e, t, s,
|
|
2165
|
-
this.parsePageId(e), this.parseFileName(t);
|
|
2166
|
-
const
|
|
2167
|
-
return (await new g(a, o).get(`/pages/book/${t}`, {
|
|
2556
|
+
async getPageBookFilename(e, t, s, r) {
|
|
2557
|
+
this.debug("getPageBookFilename called for page:", e), this.parsePageId(e), this.parseFileName(t);
|
|
2558
|
+
const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth), l = await this.createRequests(n, o).get(`/pages/book/${t}`, {
|
|
2168
2559
|
params: {
|
|
2169
2560
|
...s
|
|
2170
2561
|
},
|
|
2171
2562
|
responseType: "stream"
|
|
2172
|
-
})
|
|
2563
|
+
});
|
|
2564
|
+
return this.debug("getPageBookFilename successfully retrieved book for page:", e), l.data;
|
|
2173
2565
|
}
|
|
2174
2566
|
async getPagesCsv(e, t) {
|
|
2175
|
-
|
|
2176
|
-
|
|
2567
|
+
this.debug("getPagesCsv called with params");
|
|
2568
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/csv", {
|
|
2177
2569
|
params: {
|
|
2178
2570
|
...e
|
|
2179
2571
|
},
|
|
2180
2572
|
responseType: "stream"
|
|
2181
|
-
})
|
|
2573
|
+
});
|
|
2574
|
+
return this.debug("getPagesCsv successfully retrieved CSV data"), o.data;
|
|
2182
2575
|
}
|
|
2183
|
-
async getPagesPopular(e, t
|
|
2184
|
-
this.
|
|
2185
|
-
const
|
|
2186
|
-
return (await new g(n, a).get("/pages/popular", {
|
|
2576
|
+
async getPagesPopular(e, t) {
|
|
2577
|
+
this.debug("getPagesPopular called for page.");
|
|
2578
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth), o = await this.createRequests(s, r).get("/pages/popular", {
|
|
2187
2579
|
params: {
|
|
2188
|
-
...
|
|
2580
|
+
...e
|
|
2189
2581
|
}
|
|
2190
|
-
})
|
|
2582
|
+
});
|
|
2583
|
+
return this.debug("getPagesPopular successfully retrieved popular pages."), o.data;
|
|
2191
2584
|
}
|
|
2192
|
-
async postPageContents(e, t, s,
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
`/pages/${
|
|
2585
|
+
async postPageContents(e, t, s, r) {
|
|
2586
|
+
this.debug("postPageContents called for page:", e);
|
|
2587
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).post(
|
|
2588
|
+
`/pages/${n}/contents`,
|
|
2196
2589
|
t ?? "",
|
|
2197
2590
|
{
|
|
2198
2591
|
headers: {
|
|
@@ -2202,81 +2595,89 @@ class Vs {
|
|
|
2202
2595
|
...s
|
|
2203
2596
|
}
|
|
2204
2597
|
}
|
|
2205
|
-
)
|
|
2598
|
+
);
|
|
2599
|
+
return this.debug("postPageContents successfully updated page:", e), d.data;
|
|
2206
2600
|
}
|
|
2207
2601
|
async putPageUnorder(e, t) {
|
|
2208
|
-
|
|
2209
|
-
|
|
2602
|
+
this.debug("putPageUnorder called for page:", e);
|
|
2603
|
+
const s = this.parsePageId(e), r = p(this.globals, t?.tld), n = g(this.globals, t?.auth);
|
|
2604
|
+
return (await this.createRequests(r, n).put(
|
|
2210
2605
|
`/pages/${s}/unorder`,
|
|
2211
2606
|
""
|
|
2212
2607
|
)).data;
|
|
2213
2608
|
}
|
|
2214
2609
|
async delPageDelete(e, t, s) {
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
`/pages/${
|
|
2610
|
+
this.debug("delPageDelete called for page:", e);
|
|
2611
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
|
|
2612
|
+
`/pages/${r}`,
|
|
2218
2613
|
{
|
|
2219
2614
|
params: {
|
|
2220
2615
|
...t
|
|
2221
2616
|
}
|
|
2222
2617
|
}
|
|
2223
|
-
)
|
|
2618
|
+
);
|
|
2619
|
+
return this.debug("delPageDelete successfully deleted page:", e), l.data;
|
|
2224
2620
|
}
|
|
2225
2621
|
async delPageAllowed(e, t, s) {
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
`/pages/${
|
|
2622
|
+
this.debug("delPageAllowed called for page:", e);
|
|
2623
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
|
|
2624
|
+
`/pages/${r}/allowed`,
|
|
2229
2625
|
{
|
|
2230
2626
|
params: {
|
|
2231
2627
|
...t
|
|
2232
2628
|
}
|
|
2233
2629
|
}
|
|
2234
|
-
)
|
|
2630
|
+
);
|
|
2631
|
+
return this.debug("delPageAllowed successfully changed permissions for page:", e), l.data;
|
|
2235
2632
|
}
|
|
2236
2633
|
async postPageCopied(e, t, s) {
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
`/pages/${
|
|
2634
|
+
this.debug("postPageCopied called for page:", e);
|
|
2635
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
|
|
2636
|
+
`/pages/${r}/copy`,
|
|
2240
2637
|
"",
|
|
2241
2638
|
{
|
|
2242
2639
|
params: {
|
|
2243
2640
|
...t
|
|
2244
2641
|
}
|
|
2245
2642
|
}
|
|
2246
|
-
)
|
|
2643
|
+
);
|
|
2644
|
+
return this.debug("postPageCopied successfully copied page:", e), l.data;
|
|
2247
2645
|
}
|
|
2248
2646
|
async postPageExport(e, t) {
|
|
2249
|
-
|
|
2250
|
-
|
|
2647
|
+
this.debug("postPageExport called for page:", e);
|
|
2648
|
+
const s = this.parsePageId(e), r = p(this.globals, t?.tld), n = g(this.globals, t?.auth), i = await this.createRequests(r, n).post(
|
|
2251
2649
|
`/pages/${s}/export`,
|
|
2252
2650
|
""
|
|
2253
|
-
)
|
|
2651
|
+
);
|
|
2652
|
+
return this.debug("postPageExport successfully exported page:", e), i.data;
|
|
2254
2653
|
}
|
|
2255
|
-
async delPageFileName(e, t, s,
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
`/pages/${
|
|
2654
|
+
async delPageFileName(e, t, s, r) {
|
|
2655
|
+
this.debug("delPageFileName called for page:", e, "filename:", t);
|
|
2656
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
|
|
2657
|
+
`/pages/${n}/files/${o}`,
|
|
2259
2658
|
{
|
|
2260
2659
|
params: {
|
|
2261
2660
|
...s
|
|
2262
2661
|
}
|
|
2263
2662
|
}
|
|
2264
|
-
)
|
|
2663
|
+
);
|
|
2664
|
+
return this.debug("delPageFileName successfully deleted file:", t, "from page:", e), u.data;
|
|
2265
2665
|
}
|
|
2266
|
-
async headPageFileName(e, t, s,
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
`/pages/${
|
|
2666
|
+
async headPageFileName(e, t, s, r) {
|
|
2667
|
+
this.debug("headPageFileName called for page:", e, "filename:", t);
|
|
2668
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).head(
|
|
2669
|
+
`/pages/${n}/files/${o}`,
|
|
2270
2670
|
{
|
|
2271
2671
|
params: {
|
|
2272
2672
|
...s
|
|
2273
2673
|
}
|
|
2274
2674
|
}
|
|
2275
|
-
)
|
|
2675
|
+
);
|
|
2676
|
+
return this.debug("headPageFileName successfully checked existence of file:", t, "on page:", e), u.data;
|
|
2276
2677
|
}
|
|
2277
|
-
async putPageFileName(e, t, s,
|
|
2278
|
-
|
|
2279
|
-
|
|
2678
|
+
async putPageFileName(e, t, s, r, n) {
|
|
2679
|
+
this.debug("putPageFileName called for page:", e, "filename:", t);
|
|
2680
|
+
const o = this.parsePageId(e), i = this.parseFileName(t), l = p(this.globals, n?.tld), d = g(this.globals, n?.auth), h = await this.createRequests(l, d).put(
|
|
2280
2681
|
`/pages/${o}/files/${i}`,
|
|
2281
2682
|
s,
|
|
2282
2683
|
{
|
|
@@ -2284,84 +2685,91 @@ class Vs {
|
|
|
2284
2685
|
"Content-Type": "application/octet-stream"
|
|
2285
2686
|
},
|
|
2286
2687
|
params: {
|
|
2287
|
-
...
|
|
2688
|
+
...r
|
|
2288
2689
|
}
|
|
2289
2690
|
}
|
|
2290
|
-
)
|
|
2691
|
+
);
|
|
2692
|
+
return this.debug("putPageFileName successfully uploaded file:", t, "to page:", e), h.data;
|
|
2291
2693
|
}
|
|
2292
|
-
async delPageFileNameDescription(e, t, s,
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
`/pages/${
|
|
2694
|
+
async delPageFileNameDescription(e, t, s, r) {
|
|
2695
|
+
this.debug("delPageFileNameDescription called for page:", e, "filename:", t);
|
|
2696
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
|
|
2697
|
+
`/pages/${n}/files/${o}/description`,
|
|
2296
2698
|
{
|
|
2297
2699
|
params: {
|
|
2298
2700
|
...s
|
|
2299
2701
|
}
|
|
2300
2702
|
}
|
|
2301
|
-
)
|
|
2703
|
+
);
|
|
2704
|
+
return this.debug("delPageFileNameDescription successfully deleted description for file:", t, "on page:", e), u.data;
|
|
2302
2705
|
}
|
|
2303
|
-
async putPageFileNameDescription(e, t, s,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
`/pages/${
|
|
2706
|
+
async putPageFileNameDescription(e, t, s, r) {
|
|
2707
|
+
this.debug("putPageFileNameDescription called for page:", e, "filename:", t);
|
|
2708
|
+
const n = this.parsePageId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).put(
|
|
2709
|
+
`/pages/${n}/files/${o}/description`,
|
|
2307
2710
|
{
|
|
2308
2711
|
params: {
|
|
2309
2712
|
...s
|
|
2310
2713
|
}
|
|
2311
2714
|
}
|
|
2312
|
-
)
|
|
2715
|
+
);
|
|
2716
|
+
return this.debug("putPageFileNameDescription successfully updated description for file:", t, "on page:", e), u.data;
|
|
2313
2717
|
}
|
|
2314
|
-
async putPageFileNamePropertiesKey(e, t, s,
|
|
2315
|
-
|
|
2316
|
-
|
|
2718
|
+
async putPageFileNamePropertiesKey(e, t, s, r, n) {
|
|
2719
|
+
this.debug("putPageFileNamePropertiesKey called for page:", e, "filename:", t, "key:", s);
|
|
2720
|
+
const o = this.parsePageId(e), i = this.parseFileName(t), l = this.parseKey(s), d = p(this.globals, n?.tld), u = g(this.globals, n?.auth), m = await this.createRequests(d, u).put(
|
|
2317
2721
|
`/pages/${o}/files/${i}/properties/${l}`,
|
|
2318
2722
|
"",
|
|
2319
2723
|
{
|
|
2320
2724
|
params: {
|
|
2321
|
-
...
|
|
2725
|
+
...r
|
|
2322
2726
|
}
|
|
2323
2727
|
}
|
|
2324
|
-
)
|
|
2728
|
+
);
|
|
2729
|
+
return this.debug("putPageFileNamePropertiesKey successfully updated property key:", s, "for file:", t, "on page:", e), m.data;
|
|
2325
2730
|
}
|
|
2326
2731
|
async putPageImport(e, t, s) {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
`/pages/${
|
|
2732
|
+
this.debug("putPageImport called for page:", e);
|
|
2733
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
|
|
2734
|
+
`/pages/${r}/import`,
|
|
2330
2735
|
"",
|
|
2331
2736
|
{
|
|
2332
2737
|
params: {
|
|
2333
2738
|
...t
|
|
2334
2739
|
}
|
|
2335
2740
|
}
|
|
2336
|
-
)
|
|
2741
|
+
);
|
|
2742
|
+
return this.debug("putPageImport successfully imported content to page:", e), l.data;
|
|
2337
2743
|
}
|
|
2338
2744
|
async putPageMove(e, t, s) {
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
`/pages/${
|
|
2745
|
+
this.debug("putPageMove called for page:", e, "to:", t?.to);
|
|
2746
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
|
|
2747
|
+
`/pages/${r}/move`,
|
|
2342
2748
|
"",
|
|
2343
2749
|
{
|
|
2344
2750
|
params: {
|
|
2345
2751
|
...t
|
|
2346
2752
|
}
|
|
2347
2753
|
}
|
|
2348
|
-
)
|
|
2754
|
+
);
|
|
2755
|
+
return this.debug("putPageMove successfully moved page:", e), l.data;
|
|
2349
2756
|
}
|
|
2350
2757
|
async putPageOrder(e, t, s) {
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
`/pages/${
|
|
2758
|
+
this.debug("putPageOrder called for page:", e);
|
|
2759
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).put(
|
|
2760
|
+
`/pages/${r}/order`,
|
|
2354
2761
|
"",
|
|
2355
2762
|
{
|
|
2356
2763
|
params: {
|
|
2357
2764
|
...t
|
|
2358
2765
|
}
|
|
2359
2766
|
}
|
|
2360
|
-
)
|
|
2767
|
+
);
|
|
2768
|
+
return this.debug("putPageOrder successfully updated order for page:", e), l.data;
|
|
2361
2769
|
}
|
|
2362
|
-
async postPageProperties(e, t, s,
|
|
2363
|
-
|
|
2364
|
-
|
|
2770
|
+
async postPageProperties(e, t, s, r, n) {
|
|
2771
|
+
this.debug("postPageProperties called for page:", e, "property:", t);
|
|
2772
|
+
const o = this.parsePageId(e), i = p(this.globals, n?.tld), l = g(this.globals, n?.auth), u = await this.createRequests(i, l).post(
|
|
2365
2773
|
`/pages/${o}/properties`,
|
|
2366
2774
|
s,
|
|
2367
2775
|
{
|
|
@@ -2369,14 +2777,15 @@ class Vs {
|
|
|
2369
2777
|
Slug: t
|
|
2370
2778
|
},
|
|
2371
2779
|
params: {
|
|
2372
|
-
...
|
|
2780
|
+
...r
|
|
2373
2781
|
}
|
|
2374
2782
|
}
|
|
2375
|
-
)
|
|
2783
|
+
);
|
|
2784
|
+
return this.debug("postPageProperties successfully created property:", t, "for page:", e), u.data;
|
|
2376
2785
|
}
|
|
2377
|
-
async putPageProperties(e, t, s,
|
|
2378
|
-
|
|
2379
|
-
|
|
2786
|
+
async putPageProperties(e, t, s, r, n) {
|
|
2787
|
+
this.debug("putPageProperties called for page:", e, "property:", t);
|
|
2788
|
+
const o = this.parsePageId(e), i = p(this.globals, n?.tld), l = g(this.globals, n?.auth), u = await this.createRequests(i, l).put(
|
|
2380
2789
|
`/pages/${o}/properties`,
|
|
2381
2790
|
s,
|
|
2382
2791
|
{
|
|
@@ -2384,107 +2793,116 @@ class Vs {
|
|
|
2384
2793
|
Slug: t
|
|
2385
2794
|
},
|
|
2386
2795
|
params: {
|
|
2387
|
-
...
|
|
2796
|
+
...r
|
|
2388
2797
|
}
|
|
2389
2798
|
}
|
|
2390
|
-
)
|
|
2799
|
+
);
|
|
2800
|
+
return this.debug("putPageProperties successfully updated property:", t, "for page:", e), u.data;
|
|
2391
2801
|
}
|
|
2392
|
-
async deletePagePropertiesKey(e, t, s,
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
`/pages/${
|
|
2802
|
+
async deletePagePropertiesKey(e, t, s, r) {
|
|
2803
|
+
this.debug("deletePagePropertiesKey called for page:", e, "key:", t);
|
|
2804
|
+
const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).del(
|
|
2805
|
+
`/pages/${n}/properties/${o}`,
|
|
2396
2806
|
{
|
|
2397
2807
|
params: {
|
|
2398
2808
|
...s
|
|
2399
2809
|
}
|
|
2400
2810
|
}
|
|
2401
|
-
)
|
|
2811
|
+
);
|
|
2812
|
+
return this.debug("deletePagePropertiesKey successfully deleted property key:", t, "for page:", e), u.data;
|
|
2402
2813
|
}
|
|
2403
|
-
async putPagePropertiesKey(e, t, s,
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
`/pages/${
|
|
2814
|
+
async putPagePropertiesKey(e, t, s, r) {
|
|
2815
|
+
this.debug("putPagePropertiesKey called for page:", e, "key:", t);
|
|
2816
|
+
const n = this.parsePageId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth), u = await this.createRequests(i, l).put(
|
|
2817
|
+
`/pages/${n}/properties/${o}`,
|
|
2407
2818
|
"",
|
|
2408
2819
|
{
|
|
2409
2820
|
params: {
|
|
2410
2821
|
...s
|
|
2411
2822
|
}
|
|
2412
2823
|
}
|
|
2413
|
-
)
|
|
2824
|
+
);
|
|
2825
|
+
return this.debug("putPagePropertiesKey successfully updated property key:", t, "for page:", e), u.data;
|
|
2414
2826
|
}
|
|
2415
2827
|
async postPageRatings(e, t, s) {
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
`/pages/${
|
|
2828
|
+
this.debug("postPageRatings called for page:", e);
|
|
2829
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
|
|
2830
|
+
`/pages/${r}/ratings`,
|
|
2419
2831
|
"",
|
|
2420
2832
|
{
|
|
2421
2833
|
params: {
|
|
2422
2834
|
...t
|
|
2423
2835
|
}
|
|
2424
2836
|
}
|
|
2425
|
-
)
|
|
2837
|
+
);
|
|
2838
|
+
return this.debug("postPageRatings successfully submitted rating for page:", e), l.data;
|
|
2426
2839
|
}
|
|
2427
2840
|
async postPageRevert(e, t, s) {
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
`/pages/${
|
|
2841
|
+
this.debug("postPageRevert called for page:", e);
|
|
2842
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).post(
|
|
2843
|
+
`/pages/${r}/revert`,
|
|
2431
2844
|
"",
|
|
2432
2845
|
{
|
|
2433
2846
|
params: {
|
|
2434
2847
|
...t
|
|
2435
2848
|
}
|
|
2436
2849
|
}
|
|
2437
|
-
)
|
|
2850
|
+
);
|
|
2851
|
+
return this.debug("postPageRevert successfully reverted page:", e), l.data;
|
|
2438
2852
|
}
|
|
2439
2853
|
async deletePageSecurity(e, t, s) {
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
`/pages/${
|
|
2854
|
+
this.debug("deletePageSecurity called for page:", e);
|
|
2855
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth), l = await this.createRequests(n, o).del(
|
|
2856
|
+
`/pages/${r}/security`,
|
|
2443
2857
|
{
|
|
2444
2858
|
params: {
|
|
2445
2859
|
...t
|
|
2446
2860
|
}
|
|
2447
2861
|
}
|
|
2448
|
-
)
|
|
2862
|
+
);
|
|
2863
|
+
return this.debug("deletePageSecurity successfully deleted security settings for page:", e), l.data;
|
|
2449
2864
|
}
|
|
2450
|
-
async postPageSecurity(e, t, s,
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
`/pages/${
|
|
2865
|
+
async postPageSecurity(e, t, s, r) {
|
|
2866
|
+
this.debug("postPageSecurity called for page:", e);
|
|
2867
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).post(
|
|
2868
|
+
`/pages/${n}/security`,
|
|
2454
2869
|
t,
|
|
2455
2870
|
{
|
|
2456
2871
|
params: {
|
|
2457
2872
|
...s
|
|
2458
2873
|
}
|
|
2459
2874
|
}
|
|
2460
|
-
)
|
|
2875
|
+
);
|
|
2876
|
+
return this.debug("postPageSecurity successfully created security settings for page:", e), d.data;
|
|
2461
2877
|
}
|
|
2462
|
-
async putPageSecurity(e, t, s,
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
`/pages/${
|
|
2878
|
+
async putPageSecurity(e, t, s, r) {
|
|
2879
|
+
this.debug("putPageSecurity called for page:", e);
|
|
2880
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).put(
|
|
2881
|
+
`/pages/${n}/security`,
|
|
2466
2882
|
t,
|
|
2467
2883
|
{
|
|
2468
2884
|
params: {
|
|
2469
2885
|
...s
|
|
2470
2886
|
}
|
|
2471
2887
|
}
|
|
2472
|
-
)
|
|
2888
|
+
);
|
|
2889
|
+
return this.debug("putPageSecurity successfully updated security settings for page:", e), d.data;
|
|
2473
2890
|
}
|
|
2474
|
-
async putPageTags(e, t, s,
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
`/pages/${
|
|
2891
|
+
async putPageTags(e, t, s, r) {
|
|
2892
|
+
this.debug("putPageTags called for page:", e);
|
|
2893
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth), d = await this.createRequests(o, i).put(
|
|
2894
|
+
`/pages/${n}/tags`,
|
|
2478
2895
|
t,
|
|
2479
2896
|
{
|
|
2480
2897
|
params: {
|
|
2481
2898
|
...s
|
|
2482
2899
|
}
|
|
2483
2900
|
}
|
|
2484
|
-
)
|
|
2901
|
+
);
|
|
2902
|
+
return this.debug("putPageTags successfully updated tags for page:", e), d.data;
|
|
2485
2903
|
}
|
|
2486
2904
|
}
|
|
2487
|
-
class
|
|
2905
|
+
class lr {
|
|
2488
2906
|
globals;
|
|
2489
2907
|
_auth;
|
|
2490
2908
|
constructor(e, t) {
|
|
@@ -2494,31 +2912,31 @@ class Gs {
|
|
|
2494
2912
|
return typeof e == "number" ? e.toString() : `=${encodeURIComponent(e)}`;
|
|
2495
2913
|
}
|
|
2496
2914
|
async getGroups(e, t) {
|
|
2497
|
-
const s =
|
|
2498
|
-
return (await new
|
|
2915
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
2916
|
+
return (await new w(s, r).get("/groups", {
|
|
2499
2917
|
params: {
|
|
2500
2918
|
...e
|
|
2501
2919
|
}
|
|
2502
2920
|
})).data;
|
|
2503
2921
|
}
|
|
2504
2922
|
async getGroup(e, t, s) {
|
|
2505
|
-
const
|
|
2506
|
-
return (await new
|
|
2923
|
+
const r = this.parseGroupId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
2924
|
+
return (await new w(n, o).get(`/groups/${r}`, {
|
|
2507
2925
|
params: {
|
|
2508
2926
|
...t
|
|
2509
2927
|
}
|
|
2510
2928
|
})).data;
|
|
2511
2929
|
}
|
|
2512
2930
|
async getGroupUser(e, t, s) {
|
|
2513
|
-
const
|
|
2514
|
-
return (await new
|
|
2931
|
+
const r = this.parseGroupId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
2932
|
+
return (await new w(n, o).get(`/groups/${r}/users`, {
|
|
2515
2933
|
params: {
|
|
2516
2934
|
...t
|
|
2517
2935
|
}
|
|
2518
2936
|
})).data;
|
|
2519
2937
|
}
|
|
2520
2938
|
}
|
|
2521
|
-
class
|
|
2939
|
+
class ur {
|
|
2522
2940
|
globals;
|
|
2523
2941
|
_auth;
|
|
2524
2942
|
constructor(e, t) {
|
|
@@ -2531,55 +2949,55 @@ class Xs {
|
|
|
2531
2949
|
return typeof e == "number" ? e.toString() : `=${encodeURIComponent(encodeURIComponent(e))}`;
|
|
2532
2950
|
}
|
|
2533
2951
|
async getPageHierarchyById(e, t, s) {
|
|
2534
|
-
const
|
|
2535
|
-
return (await new
|
|
2952
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
2953
|
+
return (await new w(n, o).get(`events/page-hierarchy/${r}`, {
|
|
2536
2954
|
params: {
|
|
2537
2955
|
...t
|
|
2538
2956
|
}
|
|
2539
2957
|
})).data;
|
|
2540
2958
|
}
|
|
2541
|
-
async getPageHierarchyDetailById(e, t, s,
|
|
2542
|
-
const
|
|
2543
|
-
return (await new
|
|
2959
|
+
async getPageHierarchyDetailById(e, t, s, r) {
|
|
2960
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth);
|
|
2961
|
+
return (await new w(o, i).get(`events/page-hierarchy/${n}/${t}`, {
|
|
2544
2962
|
params: {
|
|
2545
2963
|
...s
|
|
2546
2964
|
}
|
|
2547
2965
|
})).data;
|
|
2548
2966
|
}
|
|
2549
2967
|
async getEventPage(e, t, s) {
|
|
2550
|
-
const
|
|
2551
|
-
return (await new
|
|
2968
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
2969
|
+
return (await new w(n, o).get(`events/page/${r}`, {
|
|
2552
2970
|
params: {
|
|
2553
2971
|
...t
|
|
2554
2972
|
}
|
|
2555
2973
|
})).data;
|
|
2556
2974
|
}
|
|
2557
|
-
async getEventPageDetail(e, t, s,
|
|
2558
|
-
const
|
|
2559
|
-
return (await new
|
|
2975
|
+
async getEventPageDetail(e, t, s, r) {
|
|
2976
|
+
const n = this.parsePageId(e), o = p(this.globals, r?.tld), i = g(this.globals, r?.auth);
|
|
2977
|
+
return (await new w(o, i).get(`/events/page/${n}/${t}`, {
|
|
2560
2978
|
params: {
|
|
2561
2979
|
...s
|
|
2562
2980
|
}
|
|
2563
2981
|
})).data;
|
|
2564
2982
|
}
|
|
2565
2983
|
async getEventUserPage(e, t, s) {
|
|
2566
|
-
const
|
|
2567
|
-
return (await new
|
|
2984
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
2985
|
+
return (await new w(r, n).get(`/events/user-page/${this.parseUserId(e)}`, {
|
|
2568
2986
|
params: {
|
|
2569
2987
|
...t
|
|
2570
2988
|
}
|
|
2571
2989
|
})).data;
|
|
2572
2990
|
}
|
|
2573
|
-
async getEventUserDetailPage(e, t, s,
|
|
2574
|
-
const
|
|
2575
|
-
return (await new
|
|
2991
|
+
async getEventUserDetailPage(e, t, s, r) {
|
|
2992
|
+
const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth);
|
|
2993
|
+
return (await new w(n, o).get(`/events/user-page/${this.parseUserId(e)}/${t}`, {
|
|
2576
2994
|
params: {
|
|
2577
2995
|
...s
|
|
2578
2996
|
}
|
|
2579
2997
|
})).data;
|
|
2580
2998
|
}
|
|
2581
2999
|
}
|
|
2582
|
-
class
|
|
3000
|
+
class cr {
|
|
2583
3001
|
globals;
|
|
2584
3002
|
_auth;
|
|
2585
3003
|
constructor(e, t) {
|
|
@@ -2589,33 +3007,33 @@ class Qs {
|
|
|
2589
3007
|
return `=${encodeURIComponent(encodeURIComponent(e))}`;
|
|
2590
3008
|
}
|
|
2591
3009
|
async getArchive(e, t) {
|
|
2592
|
-
const s =
|
|
2593
|
-
return (await new
|
|
3010
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3011
|
+
return (await new w(s, r).get("/archive", {
|
|
2594
3012
|
params: {
|
|
2595
3013
|
...e
|
|
2596
3014
|
}
|
|
2597
3015
|
})).data;
|
|
2598
3016
|
}
|
|
2599
3017
|
async getArchiveFiles(e, t) {
|
|
2600
|
-
const s =
|
|
2601
|
-
return (await new
|
|
3018
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3019
|
+
return (await new w(s, r).get("/archive/files", {
|
|
2602
3020
|
params: {
|
|
2603
3021
|
...e
|
|
2604
3022
|
}
|
|
2605
3023
|
})).data;
|
|
2606
3024
|
}
|
|
2607
3025
|
async getArchiveFile(e, t, s) {
|
|
2608
|
-
const
|
|
2609
|
-
return (await new
|
|
3026
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3027
|
+
return (await new w(r, n).get(`/archive/files/${e}`, {
|
|
2610
3028
|
params: {
|
|
2611
3029
|
...t
|
|
2612
3030
|
},
|
|
2613
3031
|
responseType: "stream"
|
|
2614
3032
|
})).data;
|
|
2615
3033
|
}
|
|
2616
|
-
async getArchiveFileByName(e, t, s,
|
|
2617
|
-
const
|
|
2618
|
-
return (await new
|
|
3034
|
+
async getArchiveFileByName(e, t, s, r) {
|
|
3035
|
+
const n = p(this.globals, r?.tld), o = this.parseFileName(t), i = g(this.globals, r?.auth);
|
|
3036
|
+
return (await new w(n, i).get(`/archive/files/${e}/${o}`, {
|
|
2619
3037
|
params: {
|
|
2620
3038
|
...s
|
|
2621
3039
|
},
|
|
@@ -2623,55 +3041,55 @@ class Qs {
|
|
|
2623
3041
|
})).data;
|
|
2624
3042
|
}
|
|
2625
3043
|
async getArchiveFileInfo(e, t, s) {
|
|
2626
|
-
const
|
|
2627
|
-
return (await new
|
|
3044
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3045
|
+
return (await new w(r, n).get(`/archive/files/${e}/info`, {
|
|
2628
3046
|
params: {
|
|
2629
3047
|
...t
|
|
2630
3048
|
}
|
|
2631
3049
|
})).data;
|
|
2632
3050
|
}
|
|
2633
3051
|
async getArchivePages(e, t) {
|
|
2634
|
-
const s =
|
|
2635
|
-
return (await new
|
|
3052
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3053
|
+
return (await new w(s, r).get("/archive/pages", {
|
|
2636
3054
|
params: {
|
|
2637
3055
|
...e
|
|
2638
3056
|
}
|
|
2639
3057
|
})).data;
|
|
2640
3058
|
}
|
|
2641
3059
|
async getArchivePage(e, t, s) {
|
|
2642
|
-
const
|
|
2643
|
-
return (await new
|
|
3060
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3061
|
+
return (await new w(r, n).get(`/archive/page/${e}`, {
|
|
2644
3062
|
params: {
|
|
2645
3063
|
...t
|
|
2646
3064
|
}
|
|
2647
3065
|
})).data;
|
|
2648
3066
|
}
|
|
2649
3067
|
async getArchivePageContents(e, t, s) {
|
|
2650
|
-
const
|
|
2651
|
-
return (await new
|
|
3068
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3069
|
+
return (await new w(r, n).get(`/archive/page/${e}/contents`, {
|
|
2652
3070
|
params: {
|
|
2653
3071
|
...t
|
|
2654
3072
|
}
|
|
2655
3073
|
})).data;
|
|
2656
3074
|
}
|
|
2657
3075
|
async getArchivePageInfo(e, t, s) {
|
|
2658
|
-
const
|
|
2659
|
-
return (await new
|
|
3076
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3077
|
+
return (await new w(r, n).get(`/archive/page/${e}/info`, {
|
|
2660
3078
|
params: {
|
|
2661
3079
|
...t
|
|
2662
3080
|
}
|
|
2663
3081
|
})).data;
|
|
2664
3082
|
}
|
|
2665
3083
|
async getArchivePageSubPages(e, t, s) {
|
|
2666
|
-
const
|
|
2667
|
-
return (await new
|
|
3084
|
+
const r = p(this.globals, s?.tld), n = g(this.globals, s?.auth);
|
|
3085
|
+
return (await new w(r, n).get(`/archive/page/${e}/subpages`, {
|
|
2668
3086
|
params: {
|
|
2669
3087
|
...t
|
|
2670
3088
|
}
|
|
2671
3089
|
})).data;
|
|
2672
3090
|
}
|
|
2673
3091
|
}
|
|
2674
|
-
class
|
|
3092
|
+
class dr {
|
|
2675
3093
|
globals;
|
|
2676
3094
|
_auth;
|
|
2677
3095
|
constructor(e, t) {
|
|
@@ -2684,25 +3102,25 @@ class Zs {
|
|
|
2684
3102
|
return encodeURIComponent(encodeURIComponent(e));
|
|
2685
3103
|
}
|
|
2686
3104
|
async getSiteActivity(e, t) {
|
|
2687
|
-
const s =
|
|
2688
|
-
return (await new
|
|
3105
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3106
|
+
return (await new w(s, r).get("/site/activity", {
|
|
2689
3107
|
params: {
|
|
2690
3108
|
...e
|
|
2691
3109
|
}
|
|
2692
3110
|
})).data;
|
|
2693
3111
|
}
|
|
2694
3112
|
async getSiteExportGroups(e) {
|
|
2695
|
-
const t =
|
|
2696
|
-
return (await new
|
|
3113
|
+
const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
|
|
3114
|
+
return (await new w(t, s).get("/site/export/groups")).data;
|
|
2697
3115
|
}
|
|
2698
3116
|
async getSiteExportUsers(e) {
|
|
2699
|
-
const t =
|
|
2700
|
-
return (await new
|
|
3117
|
+
const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
|
|
3118
|
+
return (await new w(t, s).get("/site/export/users")).data;
|
|
2701
3119
|
}
|
|
2702
3120
|
async getSiteSubPagesTags(e, t, s) {
|
|
2703
|
-
const
|
|
2704
|
-
return (await new
|
|
2705
|
-
`/site/nav/${
|
|
3121
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3122
|
+
return (await new w(n, o).get(
|
|
3123
|
+
`/site/nav/${r}/children`,
|
|
2706
3124
|
{
|
|
2707
3125
|
params: {
|
|
2708
3126
|
...t
|
|
@@ -2711,9 +3129,9 @@ class Zs {
|
|
|
2711
3129
|
)).data;
|
|
2712
3130
|
}
|
|
2713
3131
|
async getSiteFullNavTreeTags(e, t, s) {
|
|
2714
|
-
const
|
|
2715
|
-
return (await new
|
|
2716
|
-
`/site/nav/${
|
|
3132
|
+
const r = this.parsePageId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3133
|
+
return (await new w(n, o).get(
|
|
3134
|
+
`/site/nav/${r}/full`,
|
|
2717
3135
|
{
|
|
2718
3136
|
params: {
|
|
2719
3137
|
...t
|
|
@@ -2722,8 +3140,8 @@ class Zs {
|
|
|
2722
3140
|
)).data;
|
|
2723
3141
|
}
|
|
2724
3142
|
async getSiteOperations(e, t) {
|
|
2725
|
-
const s =
|
|
2726
|
-
return (await new
|
|
3143
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3144
|
+
return (await new w(s, r).get(
|
|
2727
3145
|
"/site/operations",
|
|
2728
3146
|
{
|
|
2729
3147
|
params: {
|
|
@@ -2733,8 +3151,8 @@ class Zs {
|
|
|
2733
3151
|
)).data;
|
|
2734
3152
|
}
|
|
2735
3153
|
async getSiteProperties(e, t) {
|
|
2736
|
-
const s =
|
|
2737
|
-
return (await new
|
|
3154
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3155
|
+
return (await new w(s, r).get(
|
|
2738
3156
|
"/site/properties",
|
|
2739
3157
|
{
|
|
2740
3158
|
params: {
|
|
@@ -2744,9 +3162,9 @@ class Zs {
|
|
|
2744
3162
|
)).data;
|
|
2745
3163
|
}
|
|
2746
3164
|
async GetSiteKeyProperties(e, t, s) {
|
|
2747
|
-
const
|
|
2748
|
-
return (await new
|
|
2749
|
-
`/site/properties/${
|
|
3165
|
+
const r = this.parseKey(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3166
|
+
return (await new w(n, o).get(
|
|
3167
|
+
`/site/properties/${r}`,
|
|
2750
3168
|
{
|
|
2751
3169
|
params: {
|
|
2752
3170
|
...t
|
|
@@ -2755,9 +3173,9 @@ class Zs {
|
|
|
2755
3173
|
)).data;
|
|
2756
3174
|
}
|
|
2757
3175
|
async GetSiteKeyPropertiesInfo(e, t, s) {
|
|
2758
|
-
const
|
|
2759
|
-
return (await new
|
|
2760
|
-
`/site/properties/${
|
|
3176
|
+
const r = this.parseKey(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3177
|
+
return (await new w(n, o).get(
|
|
3178
|
+
`/site/properties/${r}/info`,
|
|
2761
3179
|
{
|
|
2762
3180
|
params: {
|
|
2763
3181
|
...t
|
|
@@ -2766,8 +3184,8 @@ class Zs {
|
|
|
2766
3184
|
)).data;
|
|
2767
3185
|
}
|
|
2768
3186
|
async GetSiteQuery(e, t) {
|
|
2769
|
-
const s =
|
|
2770
|
-
return (await new
|
|
3187
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3188
|
+
return (await new w(s, r).get(
|
|
2771
3189
|
"/site/query",
|
|
2772
3190
|
{
|
|
2773
3191
|
params: {
|
|
@@ -2777,14 +3195,14 @@ class Zs {
|
|
|
2777
3195
|
)).data;
|
|
2778
3196
|
}
|
|
2779
3197
|
async GetSiteStatus(e) {
|
|
2780
|
-
const t =
|
|
2781
|
-
return (await new
|
|
3198
|
+
const t = p(this.globals, e?.tld), s = g(this.globals, e?.auth);
|
|
3199
|
+
return (await new w(t, s).get(
|
|
2782
3200
|
"/site/status"
|
|
2783
3201
|
)).data;
|
|
2784
3202
|
}
|
|
2785
3203
|
async GetSiteTags(e, t) {
|
|
2786
|
-
const s =
|
|
2787
|
-
return (await new
|
|
3204
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3205
|
+
return (await new w(s, r).get(
|
|
2788
3206
|
"/site/tags",
|
|
2789
3207
|
{
|
|
2790
3208
|
params: {
|
|
@@ -2794,8 +3212,8 @@ class Zs {
|
|
|
2794
3212
|
)).data;
|
|
2795
3213
|
}
|
|
2796
3214
|
async GetSiteTag(e, t) {
|
|
2797
|
-
const s =
|
|
2798
|
-
return (await new
|
|
3215
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3216
|
+
return (await new w(s, r).get(
|
|
2799
3217
|
"/site/tag",
|
|
2800
3218
|
{
|
|
2801
3219
|
params: {
|
|
@@ -2805,7 +3223,7 @@ class Zs {
|
|
|
2805
3223
|
)).data;
|
|
2806
3224
|
}
|
|
2807
3225
|
}
|
|
2808
|
-
class
|
|
3226
|
+
class hr {
|
|
2809
3227
|
globals;
|
|
2810
3228
|
_auth;
|
|
2811
3229
|
constructor(e, t) {
|
|
@@ -2815,23 +3233,23 @@ class Ys {
|
|
|
2815
3233
|
return `=${encodeURIComponent(encodeURIComponent(e))}`;
|
|
2816
3234
|
}
|
|
2817
3235
|
async getContextMaps(e, t) {
|
|
2818
|
-
const s =
|
|
2819
|
-
return (await new
|
|
3236
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3237
|
+
return (await new w(s, r).get("/contextmaps", {
|
|
2820
3238
|
params: {
|
|
2821
3239
|
...e
|
|
2822
3240
|
}
|
|
2823
3241
|
})).data;
|
|
2824
3242
|
}
|
|
2825
|
-
async getContextMapsById(e, t, s,
|
|
2826
|
-
const
|
|
2827
|
-
return (await new
|
|
3243
|
+
async getContextMapsById(e, t, s, r) {
|
|
3244
|
+
const n = p(this.globals, r?.tld), o = g(this.globals, r?.auth);
|
|
3245
|
+
return (await new w(n, o).get(`/contextmaps/${e}/${t}`, {
|
|
2828
3246
|
params: {
|
|
2829
3247
|
...s
|
|
2830
3248
|
}
|
|
2831
3249
|
})).data;
|
|
2832
3250
|
}
|
|
2833
3251
|
}
|
|
2834
|
-
class
|
|
3252
|
+
class pr {
|
|
2835
3253
|
globals;
|
|
2836
3254
|
_auth;
|
|
2837
3255
|
constructor(e, t) {
|
|
@@ -2844,63 +3262,63 @@ class en {
|
|
|
2844
3262
|
return encodeURIComponent(encodeURIComponent(e));
|
|
2845
3263
|
}
|
|
2846
3264
|
async getUsers(e, t) {
|
|
2847
|
-
const s =
|
|
2848
|
-
return (await new
|
|
3265
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3266
|
+
return (await new w(s, r).get("/users", {
|
|
2849
3267
|
params: {
|
|
2850
3268
|
...e
|
|
2851
3269
|
}
|
|
2852
3270
|
})).data;
|
|
2853
3271
|
}
|
|
2854
3272
|
async getUser(e, t, s) {
|
|
2855
|
-
const
|
|
2856
|
-
return (await new
|
|
3273
|
+
const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3274
|
+
return (await new w(n, o).get(`/users/${r}`, {
|
|
2857
3275
|
params: {
|
|
2858
3276
|
...t
|
|
2859
3277
|
}
|
|
2860
3278
|
})).data;
|
|
2861
3279
|
}
|
|
2862
3280
|
async getUserMetrics(e, t, s) {
|
|
2863
|
-
const
|
|
2864
|
-
return (await new
|
|
3281
|
+
const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3282
|
+
return (await new w(n, o).get(`/users/${r}/metrics`, {
|
|
2865
3283
|
params: {
|
|
2866
3284
|
...t
|
|
2867
3285
|
}
|
|
2868
3286
|
})).data;
|
|
2869
3287
|
}
|
|
2870
3288
|
async getUserProperties(e, t, s) {
|
|
2871
|
-
const
|
|
2872
|
-
return (await new
|
|
3289
|
+
const r = this.parseUserId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3290
|
+
return (await new w(n, o).get(`/users/${r}/properties`, {
|
|
2873
3291
|
params: {
|
|
2874
3292
|
...t
|
|
2875
3293
|
}
|
|
2876
3294
|
})).data;
|
|
2877
3295
|
}
|
|
2878
|
-
async getUserPropertiesKey(e, t, s,
|
|
2879
|
-
const
|
|
2880
|
-
return (await new
|
|
3296
|
+
async getUserPropertiesKey(e, t, s, r) {
|
|
3297
|
+
const n = this.parseUserId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3298
|
+
return (await new w(i, l).get(`/users/${n}/properties/${o}`, {
|
|
2881
3299
|
params: {
|
|
2882
3300
|
...s
|
|
2883
3301
|
}
|
|
2884
3302
|
})).data;
|
|
2885
3303
|
}
|
|
2886
|
-
async getUserPropertiesKeyInfo(e, t, s,
|
|
2887
|
-
const
|
|
2888
|
-
return (await new
|
|
3304
|
+
async getUserPropertiesKeyInfo(e, t, s, r) {
|
|
3305
|
+
const n = this.parseUserId(e), o = this.parseKey(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3306
|
+
return (await new w(i, l).get(`/users/${n}/properties/${o}/info`, {
|
|
2889
3307
|
params: {
|
|
2890
3308
|
...s
|
|
2891
3309
|
}
|
|
2892
3310
|
})).data;
|
|
2893
3311
|
}
|
|
2894
3312
|
async getUsersSearch(e, t) {
|
|
2895
|
-
const s =
|
|
2896
|
-
return (await new
|
|
3313
|
+
const s = p(this.globals, t?.tld), r = g(this.globals, t?.auth);
|
|
3314
|
+
return (await new w(s, r).get("/users/search", {
|
|
2897
3315
|
params: {
|
|
2898
3316
|
...e
|
|
2899
3317
|
}
|
|
2900
3318
|
})).data;
|
|
2901
3319
|
}
|
|
2902
3320
|
}
|
|
2903
|
-
class
|
|
3321
|
+
class gr {
|
|
2904
3322
|
globals;
|
|
2905
3323
|
_auth;
|
|
2906
3324
|
constructor(e, t) {
|
|
@@ -2916,17 +3334,17 @@ class tn {
|
|
|
2916
3334
|
return encodeURIComponent(encodeURIComponent(e));
|
|
2917
3335
|
}
|
|
2918
3336
|
async getFile(e, t, s) {
|
|
2919
|
-
const
|
|
2920
|
-
return (await new
|
|
3337
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3338
|
+
return (await new w(n, o).get(`files/${r}`, {
|
|
2921
3339
|
params: {
|
|
2922
3340
|
...t
|
|
2923
3341
|
},
|
|
2924
3342
|
responseType: "stream"
|
|
2925
3343
|
})).data;
|
|
2926
3344
|
}
|
|
2927
|
-
async getFileName(e, t, s,
|
|
2928
|
-
const
|
|
2929
|
-
return (await new
|
|
3345
|
+
async getFileName(e, t, s, r) {
|
|
3346
|
+
const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3347
|
+
return (await new w(i, l).get(`files/${n}/${o}`, {
|
|
2930
3348
|
params: {
|
|
2931
3349
|
...s
|
|
2932
3350
|
},
|
|
@@ -2934,8 +3352,8 @@ class tn {
|
|
|
2934
3352
|
})).data;
|
|
2935
3353
|
}
|
|
2936
3354
|
async getFileDescription(e, t, s) {
|
|
2937
|
-
const
|
|
2938
|
-
return (await new
|
|
3355
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3356
|
+
return (await new w(n, o).get(`files/${r}/description`, {
|
|
2939
3357
|
params: {
|
|
2940
3358
|
...t
|
|
2941
3359
|
},
|
|
@@ -2943,41 +3361,41 @@ class tn {
|
|
|
2943
3361
|
})).data;
|
|
2944
3362
|
}
|
|
2945
3363
|
async getFileInfo(e, t, s) {
|
|
2946
|
-
const
|
|
2947
|
-
return (await new
|
|
3364
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3365
|
+
return (await new w(n, o).get(`files/${r}/info`, {
|
|
2948
3366
|
params: {
|
|
2949
3367
|
...t
|
|
2950
3368
|
}
|
|
2951
3369
|
})).data;
|
|
2952
3370
|
}
|
|
2953
3371
|
async getFileRevisions(e, t, s) {
|
|
2954
|
-
const
|
|
2955
|
-
return (await new
|
|
3372
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3373
|
+
return (await new w(n, o).get(`files/${r}/revisions`, {
|
|
2956
3374
|
params: {
|
|
2957
3375
|
...t
|
|
2958
3376
|
}
|
|
2959
3377
|
})).data;
|
|
2960
3378
|
}
|
|
2961
3379
|
async deleteFile(e, t, s) {
|
|
2962
|
-
const
|
|
2963
|
-
return (await new
|
|
3380
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3381
|
+
return (await new w(n, o).del(`files/${r}`, {
|
|
2964
3382
|
params: {
|
|
2965
3383
|
...t
|
|
2966
3384
|
}
|
|
2967
3385
|
})).data;
|
|
2968
3386
|
}
|
|
2969
3387
|
async headFile(e, t, s) {
|
|
2970
|
-
const
|
|
2971
|
-
return (await new
|
|
3388
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3389
|
+
return (await new w(n, o).head(`files/${r}`, {
|
|
2972
3390
|
params: {
|
|
2973
3391
|
...t
|
|
2974
3392
|
}
|
|
2975
3393
|
})).data;
|
|
2976
3394
|
}
|
|
2977
3395
|
async putFile(e, t, s) {
|
|
2978
|
-
const
|
|
2979
|
-
return (await new
|
|
2980
|
-
`files/${
|
|
3396
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3397
|
+
return (await new w(n, o).put(
|
|
3398
|
+
`files/${r}`,
|
|
2981
3399
|
"",
|
|
2982
3400
|
{
|
|
2983
3401
|
params: {
|
|
@@ -2986,26 +3404,26 @@ class tn {
|
|
|
2986
3404
|
}
|
|
2987
3405
|
)).data;
|
|
2988
3406
|
}
|
|
2989
|
-
async deleteFileName(e, t, s,
|
|
2990
|
-
const
|
|
2991
|
-
return (await new
|
|
3407
|
+
async deleteFileName(e, t, s, r) {
|
|
3408
|
+
const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3409
|
+
return (await new w(i, l).del(`files/${n}/${o}`, {
|
|
2992
3410
|
params: {
|
|
2993
3411
|
...s
|
|
2994
3412
|
}
|
|
2995
3413
|
})).data;
|
|
2996
3414
|
}
|
|
2997
|
-
async headFileName(e, t, s,
|
|
2998
|
-
const
|
|
2999
|
-
return (await new
|
|
3415
|
+
async headFileName(e, t, s, r) {
|
|
3416
|
+
const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3417
|
+
return (await new w(i, l).head(`files/${n}/${o}`, {
|
|
3000
3418
|
params: {
|
|
3001
3419
|
...s
|
|
3002
3420
|
}
|
|
3003
3421
|
})).data;
|
|
3004
3422
|
}
|
|
3005
|
-
async putFileName(e, t, s,
|
|
3006
|
-
const
|
|
3007
|
-
return (await new
|
|
3008
|
-
`files/${
|
|
3423
|
+
async putFileName(e, t, s, r) {
|
|
3424
|
+
const n = this.parseFileId(e), o = this.parseFileName(t), i = p(this.globals, r?.tld), l = g(this.globals, r?.auth);
|
|
3425
|
+
return (await new w(i, l).put(
|
|
3426
|
+
`files/${n}/${o}`,
|
|
3009
3427
|
"",
|
|
3010
3428
|
{
|
|
3011
3429
|
params: {
|
|
@@ -3015,9 +3433,9 @@ class tn {
|
|
|
3015
3433
|
)).data;
|
|
3016
3434
|
}
|
|
3017
3435
|
async postFileCopy(e, t, s) {
|
|
3018
|
-
const
|
|
3019
|
-
return (await new
|
|
3020
|
-
`files/${
|
|
3436
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3437
|
+
return (await new w(n, o).post(
|
|
3438
|
+
`files/${r}/copy`,
|
|
3021
3439
|
"",
|
|
3022
3440
|
{
|
|
3023
3441
|
params: {
|
|
@@ -3027,16 +3445,17 @@ class tn {
|
|
|
3027
3445
|
)).data;
|
|
3028
3446
|
}
|
|
3029
3447
|
async delDescriptionFile(e, t, s) {
|
|
3030
|
-
const
|
|
3031
|
-
return (await new
|
|
3448
|
+
const r = this.parseFileId(e), n = p(this.globals, s?.tld), o = g(this.globals, s?.auth);
|
|
3449
|
+
return (await new w(n, o).del(`files/${r}/description`, {
|
|
3032
3450
|
params: {
|
|
3033
3451
|
...t
|
|
3034
3452
|
}
|
|
3035
3453
|
})).data;
|
|
3036
3454
|
}
|
|
3037
3455
|
}
|
|
3038
|
-
class
|
|
3456
|
+
class Ur {
|
|
3039
3457
|
globals = {};
|
|
3458
|
+
debug;
|
|
3040
3459
|
_pages;
|
|
3041
3460
|
_groups;
|
|
3042
3461
|
_site;
|
|
@@ -3047,45 +3466,45 @@ class Pn {
|
|
|
3047
3466
|
_users;
|
|
3048
3467
|
_files;
|
|
3049
3468
|
constructor(e) {
|
|
3050
|
-
e && (e.tld && (this.globals.tld = e.tld), e.auth && (this.globals.auth = e.auth));
|
|
3469
|
+
e && (e.tld && (this.globals.tld = e.tld), e.auth && (this.globals.auth = e.auth), e.debug !== void 0 && (this.globals.debug = e.debug)), this.debug = Ce("cxone-expert-node", this.globals.debug), this.debug("Debug logging enabled for cxone-expert-node. This is not recommended for production use as credentials may be exposed in log files!"), this.debug("Expert instance created with options:", e);
|
|
3051
3470
|
}
|
|
3052
3471
|
setAuth(e) {
|
|
3053
|
-
return this.globals.auth = e, this;
|
|
3472
|
+
return this.globals.auth = e, this.debug("Authentication configured:", e), this;
|
|
3054
3473
|
}
|
|
3055
3474
|
configureServerAuth(e) {
|
|
3056
|
-
return this.globals.auth = { type: "server", params: e }, this;
|
|
3475
|
+
return this.globals.auth = { type: "server", params: e }, this.debug("Server authentication configured:", e), this;
|
|
3057
3476
|
}
|
|
3058
3477
|
configureBrowserAuth(e) {
|
|
3059
|
-
return this.globals.auth = { type: "browser", params: e }, this;
|
|
3478
|
+
return this.globals.auth = { type: "browser", params: e }, this.debug("Browser authentication configured:", e), this;
|
|
3060
3479
|
}
|
|
3061
3480
|
get pages() {
|
|
3062
|
-
return this._pages || (this._pages = new
|
|
3481
|
+
return this._pages || (this.debug("Initializing Pages module"), this._pages = new ir(this.globals)), this._pages;
|
|
3063
3482
|
}
|
|
3064
3483
|
get auth() {
|
|
3065
|
-
return this._auth || (this._auth = new
|
|
3484
|
+
return this._auth || (this.debug("Initializing Auth module"), this._auth = new et()), this._auth;
|
|
3066
3485
|
}
|
|
3067
3486
|
get site() {
|
|
3068
|
-
return this._site || (this._site = new
|
|
3487
|
+
return this._site || (this.debug("Initializing Site module"), this._site = new dr(this.globals)), this._site;
|
|
3069
3488
|
}
|
|
3070
3489
|
get archive() {
|
|
3071
|
-
return this._archive || (this._archive = new
|
|
3490
|
+
return this._archive || (this.debug("Initializing Archive module"), this._archive = new cr(this.globals)), this._archive;
|
|
3072
3491
|
}
|
|
3073
3492
|
get groups() {
|
|
3074
|
-
return this._groups || (this._groups = new
|
|
3493
|
+
return this._groups || (this.debug("Initializing Groups module"), this._groups = new lr(this.globals)), this._groups;
|
|
3075
3494
|
}
|
|
3076
3495
|
get events() {
|
|
3077
|
-
return this._events || (this._events = new
|
|
3496
|
+
return this._events || (this.debug("Initializing Events module"), this._events = new ur(this.globals)), this._events;
|
|
3078
3497
|
}
|
|
3079
3498
|
get contextMaps() {
|
|
3080
|
-
return this._contextMaps || (this._contextMaps = new
|
|
3499
|
+
return this._contextMaps || (this.debug("Initializing Context Maps module"), this._contextMaps = new hr(this.globals)), this._contextMaps;
|
|
3081
3500
|
}
|
|
3082
3501
|
get users() {
|
|
3083
|
-
return this._users || (this._users = new
|
|
3502
|
+
return this._users || (this.debug("Initializing Users module"), this._users = new pr(this.globals)), this._users;
|
|
3084
3503
|
}
|
|
3085
3504
|
get files() {
|
|
3086
|
-
return this._files || (this._files = new
|
|
3505
|
+
return this._files || (this.debug("Initializing Files module"), this._files = new gr(this.globals)), this._files;
|
|
3087
3506
|
}
|
|
3088
3507
|
}
|
|
3089
3508
|
export {
|
|
3090
|
-
|
|
3509
|
+
Ur as default
|
|
3091
3510
|
};
|