@webdock/sdk 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account.d.ts +43 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/account.test.d.ts +2 -0
- package/dist/account.test.d.ts.map +1 -0
- package/dist/events.d.ts +38 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.test.d.ts +2 -0
- package/dist/events.test.d.ts.map +1 -0
- package/dist/hooks.d.ts +65 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.test.d.ts +2 -0
- package/dist/hooks.test.d.ts.map +1 -0
- package/dist/images.d.ts +24 -0
- package/dist/images.d.ts.map +1 -0
- package/dist/images.test.d.ts +2 -0
- package/dist/images.test.d.ts.map +1 -0
- package/dist/index.cjs +9 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +4105 -0
- package/dist/index.mjs.map +1 -0
- package/dist/locations.d.ts +26 -0
- package/dist/locations.d.ts.map +1 -0
- package/dist/locations.test.d.ts +2 -0
- package/dist/locations.test.d.ts.map +1 -0
- package/dist/operation.d.ts +31 -0
- package/dist/operation.d.ts.map +1 -0
- package/dist/operation.test.d.ts +2 -0
- package/dist/operation.test.d.ts.map +1 -0
- package/dist/profiles.d.ts +37 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.test.d.ts +2 -0
- package/dist/profiles.test.d.ts.map +1 -0
- package/dist/scripts.d.ts +122 -0
- package/dist/scripts.d.ts.map +1 -0
- package/dist/scripts.test.d.ts +2 -0
- package/dist/scripts.test.d.ts.map +1 -0
- package/dist/servers.d.ts +215 -0
- package/dist/servers.d.ts.map +1 -0
- package/dist/servers.test.d.ts +2 -0
- package/dist/servers.test.d.ts.map +1 -0
- package/dist/shellusers.d.ts +87 -0
- package/dist/shellusers.d.ts.map +1 -0
- package/dist/shellusers.test.d.ts +2 -0
- package/dist/shellusers.test.d.ts.map +1 -0
- package/dist/snapshots.d.ts +51 -0
- package/dist/snapshots.d.ts.map +1 -0
- package/dist/snapshots.test.d.ts +2 -0
- package/dist/snapshots.test.d.ts.map +1 -0
- package/dist/sshkeys.d.ts +35 -0
- package/dist/sshkeys.d.ts.map +1 -0
- package/dist/sshkeys.test.d.ts +2 -0
- package/dist/sshkeys.test.d.ts.map +1 -0
- package/dist/testUtils.d.ts +5 -0
- package/dist/testUtils.d.ts.map +1 -0
- package/dist/utils/req.d.ts +3 -0
- package/dist/utils/req.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4105 @@
|
|
|
1
|
+
import Rt from "fs";
|
|
2
|
+
import kt from "path";
|
|
3
|
+
import It from "os";
|
|
4
|
+
import Dt from "crypto";
|
|
5
|
+
function Ct(r, e) {
|
|
6
|
+
for (var t = 0; t < e.length; t++) {
|
|
7
|
+
const n = e[t];
|
|
8
|
+
if (typeof n != "string" && !Array.isArray(n)) {
|
|
9
|
+
for (const s in n)
|
|
10
|
+
if (s !== "default" && !(s in r)) {
|
|
11
|
+
const o = Object.getOwnPropertyDescriptor(n, s);
|
|
12
|
+
o && Object.defineProperty(r, s, o.get ? o : {
|
|
13
|
+
enumerable: !0,
|
|
14
|
+
get: () => n[s]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
20
|
+
}
|
|
21
|
+
var lr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
22
|
+
function qt(r) {
|
|
23
|
+
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
24
|
+
}
|
|
25
|
+
var Q = { exports: {} };
|
|
26
|
+
const Nt = "17.3.1", jt = {
|
|
27
|
+
version: Nt
|
|
28
|
+
};
|
|
29
|
+
var dr;
|
|
30
|
+
function Ut() {
|
|
31
|
+
if (dr) return Q.exports;
|
|
32
|
+
dr = 1;
|
|
33
|
+
const r = Rt, e = kt, t = It, n = Dt, o = jt.version, i = [
|
|
34
|
+
"🔐 encrypt with Dotenvx: https://dotenvx.com",
|
|
35
|
+
"🔐 prevent committing .env to code: https://dotenvx.com/precommit",
|
|
36
|
+
"🔐 prevent building .env in docker: https://dotenvx.com/prebuild",
|
|
37
|
+
"🤖 agentic secret storage: https://dotenvx.com/as2",
|
|
38
|
+
"⚡️ secrets for agents: https://dotenvx.com/as2",
|
|
39
|
+
"🛡️ auth for agents: https://vestauth.com",
|
|
40
|
+
"🛠️ run anywhere with `dotenvx run -- yourcommand`",
|
|
41
|
+
"⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
|
|
42
|
+
"⚙️ enable debug logging with { debug: true }",
|
|
43
|
+
"⚙️ override existing env vars with { override: true }",
|
|
44
|
+
"⚙️ suppress all logs with { quiet: true }",
|
|
45
|
+
"⚙️ write to custom object with { processEnv: myObject }",
|
|
46
|
+
"⚙️ load multiple .env files with { path: ['.env.local', '.env'] }"
|
|
47
|
+
];
|
|
48
|
+
function a() {
|
|
49
|
+
return i[Math.floor(Math.random() * i.length)];
|
|
50
|
+
}
|
|
51
|
+
function b(y) {
|
|
52
|
+
return typeof y == "string" ? !["false", "0", "no", "off", ""].includes(y.toLowerCase()) : !!y;
|
|
53
|
+
}
|
|
54
|
+
function m() {
|
|
55
|
+
return process.stdout.isTTY;
|
|
56
|
+
}
|
|
57
|
+
function f(y) {
|
|
58
|
+
return m() ? `\x1B[2m${y}\x1B[0m` : y;
|
|
59
|
+
}
|
|
60
|
+
const E = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
|
|
61
|
+
function A(y) {
|
|
62
|
+
const k = {};
|
|
63
|
+
let u = y.toString();
|
|
64
|
+
u = u.replace(/\r\n?/mg, `
|
|
65
|
+
`);
|
|
66
|
+
let l;
|
|
67
|
+
for (; (l = E.exec(u)) != null; ) {
|
|
68
|
+
const v = l[1];
|
|
69
|
+
let S = l[2] || "";
|
|
70
|
+
S = S.trim();
|
|
71
|
+
const d = S[0];
|
|
72
|
+
S = S.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), d === '"' && (S = S.replace(/\\n/g, `
|
|
73
|
+
`), S = S.replace(/\\r/g, "\r")), k[v] = S;
|
|
74
|
+
}
|
|
75
|
+
return k;
|
|
76
|
+
}
|
|
77
|
+
function D(y) {
|
|
78
|
+
y = y || {};
|
|
79
|
+
const k = N(y);
|
|
80
|
+
y.path = k;
|
|
81
|
+
const u = j.configDotenv(y);
|
|
82
|
+
if (!u.parsed) {
|
|
83
|
+
const d = new Error(`MISSING_DATA: Cannot parse ${k} for an unknown reason`);
|
|
84
|
+
throw d.code = "MISSING_DATA", d;
|
|
85
|
+
}
|
|
86
|
+
const l = I(y).split(","), v = l.length;
|
|
87
|
+
let S;
|
|
88
|
+
for (let d = 0; d < v; d++)
|
|
89
|
+
try {
|
|
90
|
+
const p = l[d].trim(), T = M(u, p);
|
|
91
|
+
S = j.decrypt(T.ciphertext, T.key);
|
|
92
|
+
break;
|
|
93
|
+
} catch (p) {
|
|
94
|
+
if (d + 1 >= v)
|
|
95
|
+
throw p;
|
|
96
|
+
}
|
|
97
|
+
return j.parse(S);
|
|
98
|
+
}
|
|
99
|
+
function h(y) {
|
|
100
|
+
console.error(`[dotenv@${o}][WARN] ${y}`);
|
|
101
|
+
}
|
|
102
|
+
function O(y) {
|
|
103
|
+
console.log(`[dotenv@${o}][DEBUG] ${y}`);
|
|
104
|
+
}
|
|
105
|
+
function g(y) {
|
|
106
|
+
console.log(`[dotenv@${o}] ${y}`);
|
|
107
|
+
}
|
|
108
|
+
function I(y) {
|
|
109
|
+
return y && y.DOTENV_KEY && y.DOTENV_KEY.length > 0 ? y.DOTENV_KEY : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 ? process.env.DOTENV_KEY : "";
|
|
110
|
+
}
|
|
111
|
+
function M(y, k) {
|
|
112
|
+
let u;
|
|
113
|
+
try {
|
|
114
|
+
u = new URL(k);
|
|
115
|
+
} catch (p) {
|
|
116
|
+
if (p.code === "ERR_INVALID_URL") {
|
|
117
|
+
const T = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
|
|
118
|
+
throw T.code = "INVALID_DOTENV_KEY", T;
|
|
119
|
+
}
|
|
120
|
+
throw p;
|
|
121
|
+
}
|
|
122
|
+
const l = u.password;
|
|
123
|
+
if (!l) {
|
|
124
|
+
const p = new Error("INVALID_DOTENV_KEY: Missing key part");
|
|
125
|
+
throw p.code = "INVALID_DOTENV_KEY", p;
|
|
126
|
+
}
|
|
127
|
+
const v = u.searchParams.get("environment");
|
|
128
|
+
if (!v) {
|
|
129
|
+
const p = new Error("INVALID_DOTENV_KEY: Missing environment part");
|
|
130
|
+
throw p.code = "INVALID_DOTENV_KEY", p;
|
|
131
|
+
}
|
|
132
|
+
const S = `DOTENV_VAULT_${v.toUpperCase()}`, d = y.parsed[S];
|
|
133
|
+
if (!d) {
|
|
134
|
+
const p = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${S} in your .env.vault file.`);
|
|
135
|
+
throw p.code = "NOT_FOUND_DOTENV_ENVIRONMENT", p;
|
|
136
|
+
}
|
|
137
|
+
return { ciphertext: d, key: l };
|
|
138
|
+
}
|
|
139
|
+
function N(y) {
|
|
140
|
+
let k = null;
|
|
141
|
+
if (y && y.path && y.path.length > 0)
|
|
142
|
+
if (Array.isArray(y.path))
|
|
143
|
+
for (const u of y.path)
|
|
144
|
+
r.existsSync(u) && (k = u.endsWith(".vault") ? u : `${u}.vault`);
|
|
145
|
+
else
|
|
146
|
+
k = y.path.endsWith(".vault") ? y.path : `${y.path}.vault`;
|
|
147
|
+
else
|
|
148
|
+
k = e.resolve(process.cwd(), ".env.vault");
|
|
149
|
+
return r.existsSync(k) ? k : null;
|
|
150
|
+
}
|
|
151
|
+
function F(y) {
|
|
152
|
+
return y[0] === "~" ? e.join(t.homedir(), y.slice(1)) : y;
|
|
153
|
+
}
|
|
154
|
+
function B(y) {
|
|
155
|
+
const k = b(process.env.DOTENV_CONFIG_DEBUG || y && y.debug), u = b(process.env.DOTENV_CONFIG_QUIET || y && y.quiet);
|
|
156
|
+
(k || !u) && g("Loading env from encrypted .env.vault");
|
|
157
|
+
const l = j._parseVault(y);
|
|
158
|
+
let v = process.env;
|
|
159
|
+
return y && y.processEnv != null && (v = y.processEnv), j.populate(v, l, y), { parsed: l };
|
|
160
|
+
}
|
|
161
|
+
function W(y) {
|
|
162
|
+
const k = e.resolve(process.cwd(), ".env");
|
|
163
|
+
let u = "utf8", l = process.env;
|
|
164
|
+
y && y.processEnv != null && (l = y.processEnv);
|
|
165
|
+
let v = b(l.DOTENV_CONFIG_DEBUG || y && y.debug), S = b(l.DOTENV_CONFIG_QUIET || y && y.quiet);
|
|
166
|
+
y && y.encoding ? u = y.encoding : v && O("No encoding is specified. UTF-8 is used by default");
|
|
167
|
+
let d = [k];
|
|
168
|
+
if (y && y.path)
|
|
169
|
+
if (!Array.isArray(y.path))
|
|
170
|
+
d = [F(y.path)];
|
|
171
|
+
else {
|
|
172
|
+
d = [];
|
|
173
|
+
for (const R of y.path)
|
|
174
|
+
d.push(F(R));
|
|
175
|
+
}
|
|
176
|
+
let p;
|
|
177
|
+
const T = {};
|
|
178
|
+
for (const R of d)
|
|
179
|
+
try {
|
|
180
|
+
const _ = j.parse(r.readFileSync(R, { encoding: u }));
|
|
181
|
+
j.populate(T, _, y);
|
|
182
|
+
} catch (_) {
|
|
183
|
+
v && O(`Failed to load ${R} ${_.message}`), p = _;
|
|
184
|
+
}
|
|
185
|
+
const C = j.populate(l, T, y);
|
|
186
|
+
if (v = b(l.DOTENV_CONFIG_DEBUG || v), S = b(l.DOTENV_CONFIG_QUIET || S), v || !S) {
|
|
187
|
+
const R = Object.keys(C).length, _ = [];
|
|
188
|
+
for (const q of d)
|
|
189
|
+
try {
|
|
190
|
+
const U = e.relative(process.cwd(), q);
|
|
191
|
+
_.push(U);
|
|
192
|
+
} catch (U) {
|
|
193
|
+
v && O(`Failed to load ${q} ${U.message}`), p = U;
|
|
194
|
+
}
|
|
195
|
+
g(`injecting env (${R}) from ${_.join(",")} ${f(`-- tip: ${a()}`)}`);
|
|
196
|
+
}
|
|
197
|
+
return p ? { parsed: T, error: p } : { parsed: T };
|
|
198
|
+
}
|
|
199
|
+
function H(y) {
|
|
200
|
+
if (I(y).length === 0)
|
|
201
|
+
return j.configDotenv(y);
|
|
202
|
+
const k = N(y);
|
|
203
|
+
return k ? j._configVault(y) : (h(`You set DOTENV_KEY but you are missing a .env.vault file at ${k}. Did you forget to build it?`), j.configDotenv(y));
|
|
204
|
+
}
|
|
205
|
+
function Z(y, k) {
|
|
206
|
+
const u = Buffer.from(k.slice(-64), "hex");
|
|
207
|
+
let l = Buffer.from(y, "base64");
|
|
208
|
+
const v = l.subarray(0, 12), S = l.subarray(-16);
|
|
209
|
+
l = l.subarray(12, -16);
|
|
210
|
+
try {
|
|
211
|
+
const d = n.createDecipheriv("aes-256-gcm", u, v);
|
|
212
|
+
return d.setAuthTag(S), `${d.update(l)}${d.final()}`;
|
|
213
|
+
} catch (d) {
|
|
214
|
+
const p = d instanceof RangeError, T = d.message === "Invalid key length", C = d.message === "Unsupported state or unable to authenticate data";
|
|
215
|
+
if (p || T) {
|
|
216
|
+
const R = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
|
|
217
|
+
throw R.code = "INVALID_DOTENV_KEY", R;
|
|
218
|
+
} else if (C) {
|
|
219
|
+
const R = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
|
|
220
|
+
throw R.code = "DECRYPTION_FAILED", R;
|
|
221
|
+
} else
|
|
222
|
+
throw d;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function Y(y, k, u = {}) {
|
|
226
|
+
const l = !!(u && u.debug), v = !!(u && u.override), S = {};
|
|
227
|
+
if (typeof k != "object") {
|
|
228
|
+
const d = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
229
|
+
throw d.code = "OBJECT_REQUIRED", d;
|
|
230
|
+
}
|
|
231
|
+
for (const d of Object.keys(k))
|
|
232
|
+
Object.prototype.hasOwnProperty.call(y, d) ? (v === !0 && (y[d] = k[d], S[d] = k[d]), l && O(v === !0 ? `"${d}" is already defined and WAS overwritten` : `"${d}" is already defined and was NOT overwritten`)) : (y[d] = k[d], S[d] = k[d]);
|
|
233
|
+
return S;
|
|
234
|
+
}
|
|
235
|
+
const j = {
|
|
236
|
+
configDotenv: W,
|
|
237
|
+
_configVault: B,
|
|
238
|
+
_parseVault: D,
|
|
239
|
+
config: H,
|
|
240
|
+
decrypt: Z,
|
|
241
|
+
parse: A,
|
|
242
|
+
populate: Y
|
|
243
|
+
};
|
|
244
|
+
return Q.exports.configDotenv = j.configDotenv, Q.exports._configVault = j._configVault, Q.exports._parseVault = j._parseVault, Q.exports.config = j.config, Q.exports.decrypt = j.decrypt, Q.exports.parse = j.parse, Q.exports.populate = j.populate, Q.exports = j, Q.exports;
|
|
245
|
+
}
|
|
246
|
+
var Ft = Ut();
|
|
247
|
+
function nt(r, e) {
|
|
248
|
+
return function() {
|
|
249
|
+
return r.apply(e, arguments);
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const { toString: Lt } = Object.prototype, { getPrototypeOf: or } = Object, { iterator: Fe, toStringTag: st } = Symbol, Le = /* @__PURE__ */ ((r) => (e) => {
|
|
253
|
+
const t = Lt.call(e);
|
|
254
|
+
return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
|
|
255
|
+
})(/* @__PURE__ */ Object.create(null)), X = (r) => (r = r.toLowerCase(), (e) => Le(e) === r), Be = (r) => (e) => typeof e === r, { isArray: ce } = Array, ae = Be("undefined");
|
|
256
|
+
function Pe(r) {
|
|
257
|
+
return r !== null && !ae(r) && r.constructor !== null && !ae(r.constructor) && K(r.constructor.isBuffer) && r.constructor.isBuffer(r);
|
|
258
|
+
}
|
|
259
|
+
const ot = X("ArrayBuffer");
|
|
260
|
+
function Bt(r) {
|
|
261
|
+
let e;
|
|
262
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(r) : e = r && r.buffer && ot(r.buffer), e;
|
|
263
|
+
}
|
|
264
|
+
const Mt = Be("string"), K = Be("function"), it = Be("number"), we = (r) => r !== null && typeof r == "object", Ht = (r) => r === !0 || r === !1, qe = (r) => {
|
|
265
|
+
if (Le(r) !== "object")
|
|
266
|
+
return !1;
|
|
267
|
+
const e = or(r);
|
|
268
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(st in r) && !(Fe in r);
|
|
269
|
+
}, xt = (r) => {
|
|
270
|
+
if (!we(r) || Pe(r))
|
|
271
|
+
return !1;
|
|
272
|
+
try {
|
|
273
|
+
return Object.keys(r).length === 0 && Object.getPrototypeOf(r) === Object.prototype;
|
|
274
|
+
} catch {
|
|
275
|
+
return !1;
|
|
276
|
+
}
|
|
277
|
+
}, Vt = X("Date"), Gt = X("File"), Kt = X("Blob"), $t = X("FileList"), zt = (r) => we(r) && K(r.pipe), Wt = (r) => {
|
|
278
|
+
let e;
|
|
279
|
+
return r && (typeof FormData == "function" && r instanceof FormData || K(r.append) && ((e = Le(r)) === "formdata" || // detect form-data instance
|
|
280
|
+
e === "object" && K(r.toString) && r.toString() === "[object FormData]"));
|
|
281
|
+
}, Jt = X("URLSearchParams"), [Xt, Yt, Qt, Zt] = [
|
|
282
|
+
"ReadableStream",
|
|
283
|
+
"Request",
|
|
284
|
+
"Response",
|
|
285
|
+
"Headers"
|
|
286
|
+
].map(X), en = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
287
|
+
function Ae(r, e, { allOwnKeys: t = !1 } = {}) {
|
|
288
|
+
if (r === null || typeof r > "u")
|
|
289
|
+
return;
|
|
290
|
+
let n, s;
|
|
291
|
+
if (typeof r != "object" && (r = [r]), ce(r))
|
|
292
|
+
for (n = 0, s = r.length; n < s; n++)
|
|
293
|
+
e.call(null, r[n], n, r);
|
|
294
|
+
else {
|
|
295
|
+
if (Pe(r))
|
|
296
|
+
return;
|
|
297
|
+
const o = t ? Object.getOwnPropertyNames(r) : Object.keys(r), i = o.length;
|
|
298
|
+
let a;
|
|
299
|
+
for (n = 0; n < i; n++)
|
|
300
|
+
a = o[n], e.call(null, r[a], a, r);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function at(r, e) {
|
|
304
|
+
if (Pe(r))
|
|
305
|
+
return null;
|
|
306
|
+
e = e.toLowerCase();
|
|
307
|
+
const t = Object.keys(r);
|
|
308
|
+
let n = t.length, s;
|
|
309
|
+
for (; n-- > 0; )
|
|
310
|
+
if (s = t[n], e === s.toLowerCase())
|
|
311
|
+
return s;
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
const se = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ct = (r) => !ae(r) && r !== se;
|
|
315
|
+
function rr() {
|
|
316
|
+
const { caseless: r, skipUndefined: e } = ct(this) && this || {}, t = {}, n = (s, o) => {
|
|
317
|
+
if (o === "__proto__" || o === "constructor" || o === "prototype")
|
|
318
|
+
return;
|
|
319
|
+
const i = r && at(t, o) || o;
|
|
320
|
+
qe(t[i]) && qe(s) ? t[i] = rr(t[i], s) : qe(s) ? t[i] = rr({}, s) : ce(s) ? t[i] = s.slice() : (!e || !ae(s)) && (t[i] = s);
|
|
321
|
+
};
|
|
322
|
+
for (let s = 0, o = arguments.length; s < o; s++)
|
|
323
|
+
arguments[s] && Ae(arguments[s], n);
|
|
324
|
+
return t;
|
|
325
|
+
}
|
|
326
|
+
const rn = (r, e, t, { allOwnKeys: n } = {}) => (Ae(
|
|
327
|
+
e,
|
|
328
|
+
(s, o) => {
|
|
329
|
+
t && K(s) ? Object.defineProperty(r, o, {
|
|
330
|
+
value: nt(s, t),
|
|
331
|
+
writable: !0,
|
|
332
|
+
enumerable: !0,
|
|
333
|
+
configurable: !0
|
|
334
|
+
}) : Object.defineProperty(r, o, {
|
|
335
|
+
value: s,
|
|
336
|
+
writable: !0,
|
|
337
|
+
enumerable: !0,
|
|
338
|
+
configurable: !0
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
{ allOwnKeys: n }
|
|
342
|
+
), r), tn = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), nn = (r, e, t, n) => {
|
|
343
|
+
r.prototype = Object.create(
|
|
344
|
+
e.prototype,
|
|
345
|
+
n
|
|
346
|
+
), Object.defineProperty(r.prototype, "constructor", {
|
|
347
|
+
value: r,
|
|
348
|
+
writable: !0,
|
|
349
|
+
enumerable: !1,
|
|
350
|
+
configurable: !0
|
|
351
|
+
}), Object.defineProperty(r, "super", {
|
|
352
|
+
value: e.prototype
|
|
353
|
+
}), t && Object.assign(r.prototype, t);
|
|
354
|
+
}, sn = (r, e, t, n) => {
|
|
355
|
+
let s, o, i;
|
|
356
|
+
const a = {};
|
|
357
|
+
if (e = e || {}, r == null) return e;
|
|
358
|
+
do {
|
|
359
|
+
for (s = Object.getOwnPropertyNames(r), o = s.length; o-- > 0; )
|
|
360
|
+
i = s[o], (!n || n(i, r, e)) && !a[i] && (e[i] = r[i], a[i] = !0);
|
|
361
|
+
r = t !== !1 && or(r);
|
|
362
|
+
} while (r && (!t || t(r, e)) && r !== Object.prototype);
|
|
363
|
+
return e;
|
|
364
|
+
}, on = (r, e, t) => {
|
|
365
|
+
r = String(r), (t === void 0 || t > r.length) && (t = r.length), t -= e.length;
|
|
366
|
+
const n = r.indexOf(e, t);
|
|
367
|
+
return n !== -1 && n === t;
|
|
368
|
+
}, an = (r) => {
|
|
369
|
+
if (!r) return null;
|
|
370
|
+
if (ce(r)) return r;
|
|
371
|
+
let e = r.length;
|
|
372
|
+
if (!it(e)) return null;
|
|
373
|
+
const t = new Array(e);
|
|
374
|
+
for (; e-- > 0; )
|
|
375
|
+
t[e] = r[e];
|
|
376
|
+
return t;
|
|
377
|
+
}, cn = /* @__PURE__ */ ((r) => (e) => r && e instanceof r)(typeof Uint8Array < "u" && or(Uint8Array)), un = (r, e) => {
|
|
378
|
+
const n = (r && r[Fe]).call(r);
|
|
379
|
+
let s;
|
|
380
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
381
|
+
const o = s.value;
|
|
382
|
+
e.call(r, o[0], o[1]);
|
|
383
|
+
}
|
|
384
|
+
}, ln = (r, e) => {
|
|
385
|
+
let t;
|
|
386
|
+
const n = [];
|
|
387
|
+
for (; (t = r.exec(e)) !== null; )
|
|
388
|
+
n.push(t);
|
|
389
|
+
return n;
|
|
390
|
+
}, dn = X("HTMLFormElement"), fn = (r) => r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(t, n, s) {
|
|
391
|
+
return n.toUpperCase() + s;
|
|
392
|
+
}), fr = (({ hasOwnProperty: r }) => (e, t) => r.call(e, t))(Object.prototype), pn = X("RegExp"), ut = (r, e) => {
|
|
393
|
+
const t = Object.getOwnPropertyDescriptors(r), n = {};
|
|
394
|
+
Ae(t, (s, o) => {
|
|
395
|
+
let i;
|
|
396
|
+
(i = e(s, o, r)) !== !1 && (n[o] = i || s);
|
|
397
|
+
}), Object.defineProperties(r, n);
|
|
398
|
+
}, hn = (r) => {
|
|
399
|
+
ut(r, (e, t) => {
|
|
400
|
+
if (K(r) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
|
|
401
|
+
return !1;
|
|
402
|
+
const n = r[t];
|
|
403
|
+
if (K(n)) {
|
|
404
|
+
if (e.enumerable = !1, "writable" in e) {
|
|
405
|
+
e.writable = !1;
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
e.set || (e.set = () => {
|
|
409
|
+
throw Error("Can not rewrite read-only method '" + t + "'");
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
}, vn = (r, e) => {
|
|
414
|
+
const t = {}, n = (s) => {
|
|
415
|
+
s.forEach((o) => {
|
|
416
|
+
t[o] = !0;
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
return ce(r) ? n(r) : n(String(r).split(e)), t;
|
|
420
|
+
}, Sn = () => {
|
|
421
|
+
}, mn = (r, e) => r != null && Number.isFinite(r = +r) ? r : e;
|
|
422
|
+
function bn(r) {
|
|
423
|
+
return !!(r && K(r.append) && r[st] === "FormData" && r[Fe]);
|
|
424
|
+
}
|
|
425
|
+
const yn = (r) => {
|
|
426
|
+
const e = new Array(10), t = (n, s) => {
|
|
427
|
+
if (we(n)) {
|
|
428
|
+
if (e.indexOf(n) >= 0)
|
|
429
|
+
return;
|
|
430
|
+
if (Pe(n))
|
|
431
|
+
return n;
|
|
432
|
+
if (!("toJSON" in n)) {
|
|
433
|
+
e[s] = n;
|
|
434
|
+
const o = ce(n) ? [] : {};
|
|
435
|
+
return Ae(n, (i, a) => {
|
|
436
|
+
const b = t(i, s + 1);
|
|
437
|
+
!ae(b) && (o[a] = b);
|
|
438
|
+
}), e[s] = void 0, o;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
return n;
|
|
442
|
+
};
|
|
443
|
+
return t(r, 0);
|
|
444
|
+
}, gn = X("AsyncFunction"), En = (r) => r && (we(r) || K(r)) && K(r.then) && K(r.catch), lt = ((r, e) => r ? setImmediate : e ? ((t, n) => (se.addEventListener(
|
|
445
|
+
"message",
|
|
446
|
+
({ source: s, data: o }) => {
|
|
447
|
+
s === se && o === t && n.length && n.shift()();
|
|
448
|
+
},
|
|
449
|
+
!1
|
|
450
|
+
), (s) => {
|
|
451
|
+
n.push(s), se.postMessage(t, "*");
|
|
452
|
+
}))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(typeof setImmediate == "function", K(se.postMessage)), On = typeof queueMicrotask < "u" ? queueMicrotask.bind(se) : typeof process < "u" && process.nextTick || lt, _n = (r) => r != null && K(r[Fe]), c = {
|
|
453
|
+
isArray: ce,
|
|
454
|
+
isArrayBuffer: ot,
|
|
455
|
+
isBuffer: Pe,
|
|
456
|
+
isFormData: Wt,
|
|
457
|
+
isArrayBufferView: Bt,
|
|
458
|
+
isString: Mt,
|
|
459
|
+
isNumber: it,
|
|
460
|
+
isBoolean: Ht,
|
|
461
|
+
isObject: we,
|
|
462
|
+
isPlainObject: qe,
|
|
463
|
+
isEmptyObject: xt,
|
|
464
|
+
isReadableStream: Xt,
|
|
465
|
+
isRequest: Yt,
|
|
466
|
+
isResponse: Qt,
|
|
467
|
+
isHeaders: Zt,
|
|
468
|
+
isUndefined: ae,
|
|
469
|
+
isDate: Vt,
|
|
470
|
+
isFile: Gt,
|
|
471
|
+
isBlob: Kt,
|
|
472
|
+
isRegExp: pn,
|
|
473
|
+
isFunction: K,
|
|
474
|
+
isStream: zt,
|
|
475
|
+
isURLSearchParams: Jt,
|
|
476
|
+
isTypedArray: cn,
|
|
477
|
+
isFileList: $t,
|
|
478
|
+
forEach: Ae,
|
|
479
|
+
merge: rr,
|
|
480
|
+
extend: rn,
|
|
481
|
+
trim: en,
|
|
482
|
+
stripBOM: tn,
|
|
483
|
+
inherits: nn,
|
|
484
|
+
toFlatObject: sn,
|
|
485
|
+
kindOf: Le,
|
|
486
|
+
kindOfTest: X,
|
|
487
|
+
endsWith: on,
|
|
488
|
+
toArray: an,
|
|
489
|
+
forEachEntry: un,
|
|
490
|
+
matchAll: ln,
|
|
491
|
+
isHTMLForm: dn,
|
|
492
|
+
hasOwnProperty: fr,
|
|
493
|
+
hasOwnProp: fr,
|
|
494
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
495
|
+
reduceDescriptors: ut,
|
|
496
|
+
freezeMethods: hn,
|
|
497
|
+
toObjectSet: vn,
|
|
498
|
+
toCamelCase: fn,
|
|
499
|
+
noop: Sn,
|
|
500
|
+
toFiniteNumber: mn,
|
|
501
|
+
findKey: at,
|
|
502
|
+
global: se,
|
|
503
|
+
isContextDefined: ct,
|
|
504
|
+
isSpecCompliantForm: bn,
|
|
505
|
+
toJSONObject: yn,
|
|
506
|
+
isAsyncFn: gn,
|
|
507
|
+
isThenable: En,
|
|
508
|
+
setImmediate: lt,
|
|
509
|
+
asap: On,
|
|
510
|
+
isIterable: _n
|
|
511
|
+
};
|
|
512
|
+
let P = class dt extends Error {
|
|
513
|
+
static from(e, t, n, s, o, i) {
|
|
514
|
+
const a = new dt(e.message, t || e.code, n, s, o);
|
|
515
|
+
return a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
519
|
+
*
|
|
520
|
+
* @param {string} message The error message.
|
|
521
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
522
|
+
* @param {Object} [config] The config.
|
|
523
|
+
* @param {Object} [request] The request.
|
|
524
|
+
* @param {Object} [response] The response.
|
|
525
|
+
*
|
|
526
|
+
* @returns {Error} The created error.
|
|
527
|
+
*/
|
|
528
|
+
constructor(e, t, n, s, o) {
|
|
529
|
+
super(e), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), n && (this.config = n), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
530
|
+
}
|
|
531
|
+
toJSON() {
|
|
532
|
+
return {
|
|
533
|
+
// Standard
|
|
534
|
+
message: this.message,
|
|
535
|
+
name: this.name,
|
|
536
|
+
// Microsoft
|
|
537
|
+
description: this.description,
|
|
538
|
+
number: this.number,
|
|
539
|
+
// Mozilla
|
|
540
|
+
fileName: this.fileName,
|
|
541
|
+
lineNumber: this.lineNumber,
|
|
542
|
+
columnNumber: this.columnNumber,
|
|
543
|
+
stack: this.stack,
|
|
544
|
+
// Axios
|
|
545
|
+
config: c.toJSONObject(this.config),
|
|
546
|
+
code: this.code,
|
|
547
|
+
status: this.status
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
P.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
552
|
+
P.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
553
|
+
P.ECONNABORTED = "ECONNABORTED";
|
|
554
|
+
P.ETIMEDOUT = "ETIMEDOUT";
|
|
555
|
+
P.ERR_NETWORK = "ERR_NETWORK";
|
|
556
|
+
P.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
557
|
+
P.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
558
|
+
P.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
559
|
+
P.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
560
|
+
P.ERR_CANCELED = "ERR_CANCELED";
|
|
561
|
+
P.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
562
|
+
P.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
563
|
+
const Tn = null;
|
|
564
|
+
function tr(r) {
|
|
565
|
+
return c.isPlainObject(r) || c.isArray(r);
|
|
566
|
+
}
|
|
567
|
+
function ft(r) {
|
|
568
|
+
return c.endsWith(r, "[]") ? r.slice(0, -2) : r;
|
|
569
|
+
}
|
|
570
|
+
function pr(r, e, t) {
|
|
571
|
+
return r ? r.concat(e).map(function(s, o) {
|
|
572
|
+
return s = ft(s), !t && o ? "[" + s + "]" : s;
|
|
573
|
+
}).join(t ? "." : "") : e;
|
|
574
|
+
}
|
|
575
|
+
function Pn(r) {
|
|
576
|
+
return c.isArray(r) && !r.some(tr);
|
|
577
|
+
}
|
|
578
|
+
const wn = c.toFlatObject(c, {}, null, function(e) {
|
|
579
|
+
return /^is[A-Z]/.test(e);
|
|
580
|
+
});
|
|
581
|
+
function Me(r, e, t) {
|
|
582
|
+
if (!c.isObject(r))
|
|
583
|
+
throw new TypeError("target must be an object");
|
|
584
|
+
e = e || new FormData(), t = c.toFlatObject(t, {
|
|
585
|
+
metaTokens: !0,
|
|
586
|
+
dots: !1,
|
|
587
|
+
indexes: !1
|
|
588
|
+
}, !1, function(O, g) {
|
|
589
|
+
return !c.isUndefined(g[O]);
|
|
590
|
+
});
|
|
591
|
+
const n = t.metaTokens, s = t.visitor || f, o = t.dots, i = t.indexes, b = (t.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(e);
|
|
592
|
+
if (!c.isFunction(s))
|
|
593
|
+
throw new TypeError("visitor must be a function");
|
|
594
|
+
function m(h) {
|
|
595
|
+
if (h === null) return "";
|
|
596
|
+
if (c.isDate(h))
|
|
597
|
+
return h.toISOString();
|
|
598
|
+
if (c.isBoolean(h))
|
|
599
|
+
return h.toString();
|
|
600
|
+
if (!b && c.isBlob(h))
|
|
601
|
+
throw new P("Blob is not supported. Use a Buffer instead.");
|
|
602
|
+
return c.isArrayBuffer(h) || c.isTypedArray(h) ? b && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
603
|
+
}
|
|
604
|
+
function f(h, O, g) {
|
|
605
|
+
let I = h;
|
|
606
|
+
if (h && !g && typeof h == "object") {
|
|
607
|
+
if (c.endsWith(O, "{}"))
|
|
608
|
+
O = n ? O : O.slice(0, -2), h = JSON.stringify(h);
|
|
609
|
+
else if (c.isArray(h) && Pn(h) || (c.isFileList(h) || c.endsWith(O, "[]")) && (I = c.toArray(h)))
|
|
610
|
+
return O = ft(O), I.forEach(function(N, F) {
|
|
611
|
+
!(c.isUndefined(N) || N === null) && e.append(
|
|
612
|
+
// eslint-disable-next-line no-nested-ternary
|
|
613
|
+
i === !0 ? pr([O], F, o) : i === null ? O : O + "[]",
|
|
614
|
+
m(N)
|
|
615
|
+
);
|
|
616
|
+
}), !1;
|
|
617
|
+
}
|
|
618
|
+
return tr(h) ? !0 : (e.append(pr(g, O, o), m(h)), !1);
|
|
619
|
+
}
|
|
620
|
+
const E = [], A = Object.assign(wn, {
|
|
621
|
+
defaultVisitor: f,
|
|
622
|
+
convertValue: m,
|
|
623
|
+
isVisitable: tr
|
|
624
|
+
});
|
|
625
|
+
function D(h, O) {
|
|
626
|
+
if (!c.isUndefined(h)) {
|
|
627
|
+
if (E.indexOf(h) !== -1)
|
|
628
|
+
throw Error("Circular reference detected in " + O.join("."));
|
|
629
|
+
E.push(h), c.forEach(h, function(I, M) {
|
|
630
|
+
(!(c.isUndefined(I) || I === null) && s.call(
|
|
631
|
+
e,
|
|
632
|
+
I,
|
|
633
|
+
c.isString(M) ? M.trim() : M,
|
|
634
|
+
O,
|
|
635
|
+
A
|
|
636
|
+
)) === !0 && D(I, O ? O.concat(M) : [M]);
|
|
637
|
+
}), E.pop();
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if (!c.isObject(r))
|
|
641
|
+
throw new TypeError("data must be an object");
|
|
642
|
+
return D(r), e;
|
|
643
|
+
}
|
|
644
|
+
function hr(r) {
|
|
645
|
+
const e = {
|
|
646
|
+
"!": "%21",
|
|
647
|
+
"'": "%27",
|
|
648
|
+
"(": "%28",
|
|
649
|
+
")": "%29",
|
|
650
|
+
"~": "%7E",
|
|
651
|
+
"%20": "+",
|
|
652
|
+
"%00": "\0"
|
|
653
|
+
};
|
|
654
|
+
return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
655
|
+
return e[n];
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
function ir(r, e) {
|
|
659
|
+
this._pairs = [], r && Me(r, this, e);
|
|
660
|
+
}
|
|
661
|
+
const pt = ir.prototype;
|
|
662
|
+
pt.append = function(e, t) {
|
|
663
|
+
this._pairs.push([e, t]);
|
|
664
|
+
};
|
|
665
|
+
pt.toString = function(e) {
|
|
666
|
+
const t = e ? function(n) {
|
|
667
|
+
return e.call(this, n, hr);
|
|
668
|
+
} : hr;
|
|
669
|
+
return this._pairs.map(function(s) {
|
|
670
|
+
return t(s[0]) + "=" + t(s[1]);
|
|
671
|
+
}, "").join("&");
|
|
672
|
+
};
|
|
673
|
+
function An(r) {
|
|
674
|
+
return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
675
|
+
}
|
|
676
|
+
function ht(r, e, t) {
|
|
677
|
+
if (!e)
|
|
678
|
+
return r;
|
|
679
|
+
const n = t && t.encode || An, s = c.isFunction(t) ? {
|
|
680
|
+
serialize: t
|
|
681
|
+
} : t, o = s && s.serialize;
|
|
682
|
+
let i;
|
|
683
|
+
if (o ? i = o(e, s) : i = c.isURLSearchParams(e) ? e.toString() : new ir(e, s).toString(n), i) {
|
|
684
|
+
const a = r.indexOf("#");
|
|
685
|
+
a !== -1 && (r = r.slice(0, a)), r += (r.indexOf("?") === -1 ? "?" : "&") + i;
|
|
686
|
+
}
|
|
687
|
+
return r;
|
|
688
|
+
}
|
|
689
|
+
class vr {
|
|
690
|
+
constructor() {
|
|
691
|
+
this.handlers = [];
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Add a new interceptor to the stack
|
|
695
|
+
*
|
|
696
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
697
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
698
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
699
|
+
*
|
|
700
|
+
* @return {Number} An ID used to remove interceptor later
|
|
701
|
+
*/
|
|
702
|
+
use(e, t, n) {
|
|
703
|
+
return this.handlers.push({
|
|
704
|
+
fulfilled: e,
|
|
705
|
+
rejected: t,
|
|
706
|
+
synchronous: n ? n.synchronous : !1,
|
|
707
|
+
runWhen: n ? n.runWhen : null
|
|
708
|
+
}), this.handlers.length - 1;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Remove an interceptor from the stack
|
|
712
|
+
*
|
|
713
|
+
* @param {Number} id The ID that was returned by `use`
|
|
714
|
+
*
|
|
715
|
+
* @returns {void}
|
|
716
|
+
*/
|
|
717
|
+
eject(e) {
|
|
718
|
+
this.handlers[e] && (this.handlers[e] = null);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Clear all interceptors from the stack
|
|
722
|
+
*
|
|
723
|
+
* @returns {void}
|
|
724
|
+
*/
|
|
725
|
+
clear() {
|
|
726
|
+
this.handlers && (this.handlers = []);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Iterate over all the registered interceptors
|
|
730
|
+
*
|
|
731
|
+
* This method is particularly useful for skipping over any
|
|
732
|
+
* interceptors that may have become `null` calling `eject`.
|
|
733
|
+
*
|
|
734
|
+
* @param {Function} fn The function to call for each interceptor
|
|
735
|
+
*
|
|
736
|
+
* @returns {void}
|
|
737
|
+
*/
|
|
738
|
+
forEach(e) {
|
|
739
|
+
c.forEach(this.handlers, function(n) {
|
|
740
|
+
n !== null && e(n);
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
const ar = {
|
|
745
|
+
silentJSONParsing: !0,
|
|
746
|
+
forcedJSONParsing: !0,
|
|
747
|
+
clarifyTimeoutError: !1,
|
|
748
|
+
legacyInterceptorReqResOrdering: !0
|
|
749
|
+
}, Rn = typeof URLSearchParams < "u" ? URLSearchParams : ir, kn = typeof FormData < "u" ? FormData : null, In = typeof Blob < "u" ? Blob : null, Dn = {
|
|
750
|
+
isBrowser: !0,
|
|
751
|
+
classes: {
|
|
752
|
+
URLSearchParams: Rn,
|
|
753
|
+
FormData: kn,
|
|
754
|
+
Blob: In
|
|
755
|
+
},
|
|
756
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
757
|
+
}, cr = typeof window < "u" && typeof document < "u", nr = typeof navigator == "object" && navigator || void 0, Cn = cr && (!nr || ["ReactNative", "NativeScript", "NS"].indexOf(nr.product) < 0), qn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
758
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Nn = cr && window.location.href || "http://localhost", jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
759
|
+
__proto__: null,
|
|
760
|
+
hasBrowserEnv: cr,
|
|
761
|
+
hasStandardBrowserEnv: Cn,
|
|
762
|
+
hasStandardBrowserWebWorkerEnv: qn,
|
|
763
|
+
navigator: nr,
|
|
764
|
+
origin: Nn
|
|
765
|
+
}, Symbol.toStringTag, { value: "Module" })), V = {
|
|
766
|
+
...jn,
|
|
767
|
+
...Dn
|
|
768
|
+
};
|
|
769
|
+
function Un(r, e) {
|
|
770
|
+
return Me(r, new V.classes.URLSearchParams(), {
|
|
771
|
+
visitor: function(t, n, s, o) {
|
|
772
|
+
return V.isNode && c.isBuffer(t) ? (this.append(n, t.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
773
|
+
},
|
|
774
|
+
...e
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
function Fn(r) {
|
|
778
|
+
return c.matchAll(/\w+|\[(\w*)]/g, r).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
779
|
+
}
|
|
780
|
+
function Ln(r) {
|
|
781
|
+
const e = {}, t = Object.keys(r);
|
|
782
|
+
let n;
|
|
783
|
+
const s = t.length;
|
|
784
|
+
let o;
|
|
785
|
+
for (n = 0; n < s; n++)
|
|
786
|
+
o = t[n], e[o] = r[o];
|
|
787
|
+
return e;
|
|
788
|
+
}
|
|
789
|
+
function vt(r) {
|
|
790
|
+
function e(t, n, s, o) {
|
|
791
|
+
let i = t[o++];
|
|
792
|
+
if (i === "__proto__") return !0;
|
|
793
|
+
const a = Number.isFinite(+i), b = o >= t.length;
|
|
794
|
+
return i = !i && c.isArray(s) ? s.length : i, b ? (c.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !a) : ((!s[i] || !c.isObject(s[i])) && (s[i] = []), e(t, n, s[i], o) && c.isArray(s[i]) && (s[i] = Ln(s[i])), !a);
|
|
795
|
+
}
|
|
796
|
+
if (c.isFormData(r) && c.isFunction(r.entries)) {
|
|
797
|
+
const t = {};
|
|
798
|
+
return c.forEachEntry(r, (n, s) => {
|
|
799
|
+
e(Fn(n), s, t, 0);
|
|
800
|
+
}), t;
|
|
801
|
+
}
|
|
802
|
+
return null;
|
|
803
|
+
}
|
|
804
|
+
function Bn(r, e, t) {
|
|
805
|
+
if (c.isString(r))
|
|
806
|
+
try {
|
|
807
|
+
return (e || JSON.parse)(r), c.trim(r);
|
|
808
|
+
} catch (n) {
|
|
809
|
+
if (n.name !== "SyntaxError")
|
|
810
|
+
throw n;
|
|
811
|
+
}
|
|
812
|
+
return (t || JSON.stringify)(r);
|
|
813
|
+
}
|
|
814
|
+
const Re = {
|
|
815
|
+
transitional: ar,
|
|
816
|
+
adapter: ["xhr", "http", "fetch"],
|
|
817
|
+
transformRequest: [function(e, t) {
|
|
818
|
+
const n = t.getContentType() || "", s = n.indexOf("application/json") > -1, o = c.isObject(e);
|
|
819
|
+
if (o && c.isHTMLForm(e) && (e = new FormData(e)), c.isFormData(e))
|
|
820
|
+
return s ? JSON.stringify(vt(e)) : e;
|
|
821
|
+
if (c.isArrayBuffer(e) || c.isBuffer(e) || c.isStream(e) || c.isFile(e) || c.isBlob(e) || c.isReadableStream(e))
|
|
822
|
+
return e;
|
|
823
|
+
if (c.isArrayBufferView(e))
|
|
824
|
+
return e.buffer;
|
|
825
|
+
if (c.isURLSearchParams(e))
|
|
826
|
+
return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
827
|
+
let a;
|
|
828
|
+
if (o) {
|
|
829
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
830
|
+
return Un(e, this.formSerializer).toString();
|
|
831
|
+
if ((a = c.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
832
|
+
const b = this.env && this.env.FormData;
|
|
833
|
+
return Me(
|
|
834
|
+
a ? { "files[]": e } : e,
|
|
835
|
+
b && new b(),
|
|
836
|
+
this.formSerializer
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
return o || s ? (t.setContentType("application/json", !1), Bn(e)) : e;
|
|
841
|
+
}],
|
|
842
|
+
transformResponse: [function(e) {
|
|
843
|
+
const t = this.transitional || Re.transitional, n = t && t.forcedJSONParsing, s = this.responseType === "json";
|
|
844
|
+
if (c.isResponse(e) || c.isReadableStream(e))
|
|
845
|
+
return e;
|
|
846
|
+
if (e && c.isString(e) && (n && !this.responseType || s)) {
|
|
847
|
+
const i = !(t && t.silentJSONParsing) && s;
|
|
848
|
+
try {
|
|
849
|
+
return JSON.parse(e, this.parseReviver);
|
|
850
|
+
} catch (a) {
|
|
851
|
+
if (i)
|
|
852
|
+
throw a.name === "SyntaxError" ? P.from(a, P.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return e;
|
|
856
|
+
}],
|
|
857
|
+
/**
|
|
858
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
859
|
+
* timeout is not created.
|
|
860
|
+
*/
|
|
861
|
+
timeout: 0,
|
|
862
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
863
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
864
|
+
maxContentLength: -1,
|
|
865
|
+
maxBodyLength: -1,
|
|
866
|
+
env: {
|
|
867
|
+
FormData: V.classes.FormData,
|
|
868
|
+
Blob: V.classes.Blob
|
|
869
|
+
},
|
|
870
|
+
validateStatus: function(e) {
|
|
871
|
+
return e >= 200 && e < 300;
|
|
872
|
+
},
|
|
873
|
+
headers: {
|
|
874
|
+
common: {
|
|
875
|
+
Accept: "application/json, text/plain, */*",
|
|
876
|
+
"Content-Type": void 0
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
|
|
881
|
+
Re.headers[r] = {};
|
|
882
|
+
});
|
|
883
|
+
const Mn = c.toObjectSet([
|
|
884
|
+
"age",
|
|
885
|
+
"authorization",
|
|
886
|
+
"content-length",
|
|
887
|
+
"content-type",
|
|
888
|
+
"etag",
|
|
889
|
+
"expires",
|
|
890
|
+
"from",
|
|
891
|
+
"host",
|
|
892
|
+
"if-modified-since",
|
|
893
|
+
"if-unmodified-since",
|
|
894
|
+
"last-modified",
|
|
895
|
+
"location",
|
|
896
|
+
"max-forwards",
|
|
897
|
+
"proxy-authorization",
|
|
898
|
+
"referer",
|
|
899
|
+
"retry-after",
|
|
900
|
+
"user-agent"
|
|
901
|
+
]), Hn = (r) => {
|
|
902
|
+
const e = {};
|
|
903
|
+
let t, n, s;
|
|
904
|
+
return r && r.split(`
|
|
905
|
+
`).forEach(function(i) {
|
|
906
|
+
s = i.indexOf(":"), t = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!t || e[t] && Mn[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
|
|
907
|
+
}), e;
|
|
908
|
+
}, Sr = /* @__PURE__ */ Symbol("internals");
|
|
909
|
+
function ue(r) {
|
|
910
|
+
return r && String(r).trim().toLowerCase();
|
|
911
|
+
}
|
|
912
|
+
function Ne(r) {
|
|
913
|
+
return r === !1 || r == null ? r : c.isArray(r) ? r.map(Ne) : String(r);
|
|
914
|
+
}
|
|
915
|
+
function xn(r) {
|
|
916
|
+
const e = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
917
|
+
let n;
|
|
918
|
+
for (; n = t.exec(r); )
|
|
919
|
+
e[n[1]] = n[2];
|
|
920
|
+
return e;
|
|
921
|
+
}
|
|
922
|
+
const Vn = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
|
|
923
|
+
function xe(r, e, t, n, s) {
|
|
924
|
+
if (c.isFunction(n))
|
|
925
|
+
return n.call(this, e, t);
|
|
926
|
+
if (s && (e = t), !!c.isString(e)) {
|
|
927
|
+
if (c.isString(n))
|
|
928
|
+
return e.indexOf(n) !== -1;
|
|
929
|
+
if (c.isRegExp(n))
|
|
930
|
+
return n.test(e);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
function Gn(r) {
|
|
934
|
+
return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
935
|
+
}
|
|
936
|
+
function Kn(r, e) {
|
|
937
|
+
const t = c.toCamelCase(" " + e);
|
|
938
|
+
["get", "set", "has"].forEach((n) => {
|
|
939
|
+
Object.defineProperty(r, n + t, {
|
|
940
|
+
value: function(s, o, i) {
|
|
941
|
+
return this[n].call(this, e, s, o, i);
|
|
942
|
+
},
|
|
943
|
+
configurable: !0
|
|
944
|
+
});
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
let $ = class {
|
|
948
|
+
constructor(e) {
|
|
949
|
+
e && this.set(e);
|
|
950
|
+
}
|
|
951
|
+
set(e, t, n) {
|
|
952
|
+
const s = this;
|
|
953
|
+
function o(a, b, m) {
|
|
954
|
+
const f = ue(b);
|
|
955
|
+
if (!f)
|
|
956
|
+
throw new Error("header name must be a non-empty string");
|
|
957
|
+
const E = c.findKey(s, f);
|
|
958
|
+
(!E || s[E] === void 0 || m === !0 || m === void 0 && s[E] !== !1) && (s[E || b] = Ne(a));
|
|
959
|
+
}
|
|
960
|
+
const i = (a, b) => c.forEach(a, (m, f) => o(m, f, b));
|
|
961
|
+
if (c.isPlainObject(e) || e instanceof this.constructor)
|
|
962
|
+
i(e, t);
|
|
963
|
+
else if (c.isString(e) && (e = e.trim()) && !Vn(e))
|
|
964
|
+
i(Hn(e), t);
|
|
965
|
+
else if (c.isObject(e) && c.isIterable(e)) {
|
|
966
|
+
let a = {}, b, m;
|
|
967
|
+
for (const f of e) {
|
|
968
|
+
if (!c.isArray(f))
|
|
969
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
970
|
+
a[m = f[0]] = (b = a[m]) ? c.isArray(b) ? [...b, f[1]] : [b, f[1]] : f[1];
|
|
971
|
+
}
|
|
972
|
+
i(a, t);
|
|
973
|
+
} else
|
|
974
|
+
e != null && o(t, e, n);
|
|
975
|
+
return this;
|
|
976
|
+
}
|
|
977
|
+
get(e, t) {
|
|
978
|
+
if (e = ue(e), e) {
|
|
979
|
+
const n = c.findKey(this, e);
|
|
980
|
+
if (n) {
|
|
981
|
+
const s = this[n];
|
|
982
|
+
if (!t)
|
|
983
|
+
return s;
|
|
984
|
+
if (t === !0)
|
|
985
|
+
return xn(s);
|
|
986
|
+
if (c.isFunction(t))
|
|
987
|
+
return t.call(this, s, n);
|
|
988
|
+
if (c.isRegExp(t))
|
|
989
|
+
return t.exec(s);
|
|
990
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
has(e, t) {
|
|
995
|
+
if (e = ue(e), e) {
|
|
996
|
+
const n = c.findKey(this, e);
|
|
997
|
+
return !!(n && this[n] !== void 0 && (!t || xe(this, this[n], n, t)));
|
|
998
|
+
}
|
|
999
|
+
return !1;
|
|
1000
|
+
}
|
|
1001
|
+
delete(e, t) {
|
|
1002
|
+
const n = this;
|
|
1003
|
+
let s = !1;
|
|
1004
|
+
function o(i) {
|
|
1005
|
+
if (i = ue(i), i) {
|
|
1006
|
+
const a = c.findKey(n, i);
|
|
1007
|
+
a && (!t || xe(n, n[a], a, t)) && (delete n[a], s = !0);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return c.isArray(e) ? e.forEach(o) : o(e), s;
|
|
1011
|
+
}
|
|
1012
|
+
clear(e) {
|
|
1013
|
+
const t = Object.keys(this);
|
|
1014
|
+
let n = t.length, s = !1;
|
|
1015
|
+
for (; n--; ) {
|
|
1016
|
+
const o = t[n];
|
|
1017
|
+
(!e || xe(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
1018
|
+
}
|
|
1019
|
+
return s;
|
|
1020
|
+
}
|
|
1021
|
+
normalize(e) {
|
|
1022
|
+
const t = this, n = {};
|
|
1023
|
+
return c.forEach(this, (s, o) => {
|
|
1024
|
+
const i = c.findKey(n, o);
|
|
1025
|
+
if (i) {
|
|
1026
|
+
t[i] = Ne(s), delete t[o];
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
const a = e ? Gn(o) : String(o).trim();
|
|
1030
|
+
a !== o && delete t[o], t[a] = Ne(s), n[a] = !0;
|
|
1031
|
+
}), this;
|
|
1032
|
+
}
|
|
1033
|
+
concat(...e) {
|
|
1034
|
+
return this.constructor.concat(this, ...e);
|
|
1035
|
+
}
|
|
1036
|
+
toJSON(e) {
|
|
1037
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
1038
|
+
return c.forEach(this, (n, s) => {
|
|
1039
|
+
n != null && n !== !1 && (t[s] = e && c.isArray(n) ? n.join(", ") : n);
|
|
1040
|
+
}), t;
|
|
1041
|
+
}
|
|
1042
|
+
[Symbol.iterator]() {
|
|
1043
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1044
|
+
}
|
|
1045
|
+
toString() {
|
|
1046
|
+
return Object.entries(this.toJSON()).map(([e, t]) => e + ": " + t).join(`
|
|
1047
|
+
`);
|
|
1048
|
+
}
|
|
1049
|
+
getSetCookie() {
|
|
1050
|
+
return this.get("set-cookie") || [];
|
|
1051
|
+
}
|
|
1052
|
+
get [Symbol.toStringTag]() {
|
|
1053
|
+
return "AxiosHeaders";
|
|
1054
|
+
}
|
|
1055
|
+
static from(e) {
|
|
1056
|
+
return e instanceof this ? e : new this(e);
|
|
1057
|
+
}
|
|
1058
|
+
static concat(e, ...t) {
|
|
1059
|
+
const n = new this(e);
|
|
1060
|
+
return t.forEach((s) => n.set(s)), n;
|
|
1061
|
+
}
|
|
1062
|
+
static accessor(e) {
|
|
1063
|
+
const n = (this[Sr] = this[Sr] = {
|
|
1064
|
+
accessors: {}
|
|
1065
|
+
}).accessors, s = this.prototype;
|
|
1066
|
+
function o(i) {
|
|
1067
|
+
const a = ue(i);
|
|
1068
|
+
n[a] || (Kn(s, i), n[a] = !0);
|
|
1069
|
+
}
|
|
1070
|
+
return c.isArray(e) ? e.forEach(o) : o(e), this;
|
|
1071
|
+
}
|
|
1072
|
+
};
|
|
1073
|
+
$.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1074
|
+
c.reduceDescriptors($.prototype, ({ value: r }, e) => {
|
|
1075
|
+
let t = e[0].toUpperCase() + e.slice(1);
|
|
1076
|
+
return {
|
|
1077
|
+
get: () => r,
|
|
1078
|
+
set(n) {
|
|
1079
|
+
this[t] = n;
|
|
1080
|
+
}
|
|
1081
|
+
};
|
|
1082
|
+
});
|
|
1083
|
+
c.freezeMethods($);
|
|
1084
|
+
function Ve(r, e) {
|
|
1085
|
+
const t = this || Re, n = e || t, s = $.from(n.headers);
|
|
1086
|
+
let o = n.data;
|
|
1087
|
+
return c.forEach(r, function(a) {
|
|
1088
|
+
o = a.call(t, o, s.normalize(), e ? e.status : void 0);
|
|
1089
|
+
}), s.normalize(), o;
|
|
1090
|
+
}
|
|
1091
|
+
function St(r) {
|
|
1092
|
+
return !!(r && r.__CANCEL__);
|
|
1093
|
+
}
|
|
1094
|
+
let ke = class extends P {
|
|
1095
|
+
/**
|
|
1096
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1097
|
+
*
|
|
1098
|
+
* @param {string=} message The message.
|
|
1099
|
+
* @param {Object=} config The config.
|
|
1100
|
+
* @param {Object=} request The request.
|
|
1101
|
+
*
|
|
1102
|
+
* @returns {CanceledError} The created error.
|
|
1103
|
+
*/
|
|
1104
|
+
constructor(e, t, n) {
|
|
1105
|
+
super(e ?? "canceled", P.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1106
|
+
}
|
|
1107
|
+
};
|
|
1108
|
+
function mt(r, e, t) {
|
|
1109
|
+
const n = t.config.validateStatus;
|
|
1110
|
+
!t.status || !n || n(t.status) ? r(t) : e(new P(
|
|
1111
|
+
"Request failed with status code " + t.status,
|
|
1112
|
+
[P.ERR_BAD_REQUEST, P.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
|
|
1113
|
+
t.config,
|
|
1114
|
+
t.request,
|
|
1115
|
+
t
|
|
1116
|
+
));
|
|
1117
|
+
}
|
|
1118
|
+
function $n(r) {
|
|
1119
|
+
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
|
|
1120
|
+
return e && e[1] || "";
|
|
1121
|
+
}
|
|
1122
|
+
function zn(r, e) {
|
|
1123
|
+
r = r || 10;
|
|
1124
|
+
const t = new Array(r), n = new Array(r);
|
|
1125
|
+
let s = 0, o = 0, i;
|
|
1126
|
+
return e = e !== void 0 ? e : 1e3, function(b) {
|
|
1127
|
+
const m = Date.now(), f = n[o];
|
|
1128
|
+
i || (i = m), t[s] = b, n[s] = m;
|
|
1129
|
+
let E = o, A = 0;
|
|
1130
|
+
for (; E !== s; )
|
|
1131
|
+
A += t[E++], E = E % r;
|
|
1132
|
+
if (s = (s + 1) % r, s === o && (o = (o + 1) % r), m - i < e)
|
|
1133
|
+
return;
|
|
1134
|
+
const D = f && m - f;
|
|
1135
|
+
return D ? Math.round(A * 1e3 / D) : void 0;
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
function Wn(r, e) {
|
|
1139
|
+
let t = 0, n = 1e3 / e, s, o;
|
|
1140
|
+
const i = (m, f = Date.now()) => {
|
|
1141
|
+
t = f, s = null, o && (clearTimeout(o), o = null), r(...m);
|
|
1142
|
+
};
|
|
1143
|
+
return [(...m) => {
|
|
1144
|
+
const f = Date.now(), E = f - t;
|
|
1145
|
+
E >= n ? i(m, f) : (s = m, o || (o = setTimeout(() => {
|
|
1146
|
+
o = null, i(s);
|
|
1147
|
+
}, n - E)));
|
|
1148
|
+
}, () => s && i(s)];
|
|
1149
|
+
}
|
|
1150
|
+
const Ue = (r, e, t = 3) => {
|
|
1151
|
+
let n = 0;
|
|
1152
|
+
const s = zn(50, 250);
|
|
1153
|
+
return Wn((o) => {
|
|
1154
|
+
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, b = i - n, m = s(b), f = i <= a;
|
|
1155
|
+
n = i;
|
|
1156
|
+
const E = {
|
|
1157
|
+
loaded: i,
|
|
1158
|
+
total: a,
|
|
1159
|
+
progress: a ? i / a : void 0,
|
|
1160
|
+
bytes: b,
|
|
1161
|
+
rate: m || void 0,
|
|
1162
|
+
estimated: m && a && f ? (a - i) / m : void 0,
|
|
1163
|
+
event: o,
|
|
1164
|
+
lengthComputable: a != null,
|
|
1165
|
+
[e ? "download" : "upload"]: !0
|
|
1166
|
+
};
|
|
1167
|
+
r(E);
|
|
1168
|
+
}, t);
|
|
1169
|
+
}, mr = (r, e) => {
|
|
1170
|
+
const t = r != null;
|
|
1171
|
+
return [(n) => e[0]({
|
|
1172
|
+
lengthComputable: t,
|
|
1173
|
+
total: r,
|
|
1174
|
+
loaded: n
|
|
1175
|
+
}), e[1]];
|
|
1176
|
+
}, br = (r) => (...e) => c.asap(() => r(...e)), Jn = V.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, V.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
|
|
1177
|
+
new URL(V.origin),
|
|
1178
|
+
V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
|
|
1179
|
+
) : () => !0, Xn = V.hasStandardBrowserEnv ? (
|
|
1180
|
+
// Standard browser envs support document.cookie
|
|
1181
|
+
{
|
|
1182
|
+
write(r, e, t, n, s, o, i) {
|
|
1183
|
+
if (typeof document > "u") return;
|
|
1184
|
+
const a = [`${r}=${encodeURIComponent(e)}`];
|
|
1185
|
+
c.isNumber(t) && a.push(`expires=${new Date(t).toUTCString()}`), c.isString(n) && a.push(`path=${n}`), c.isString(s) && a.push(`domain=${s}`), o === !0 && a.push("secure"), c.isString(i) && a.push(`SameSite=${i}`), document.cookie = a.join("; ");
|
|
1186
|
+
},
|
|
1187
|
+
read(r) {
|
|
1188
|
+
if (typeof document > "u") return null;
|
|
1189
|
+
const e = document.cookie.match(new RegExp("(?:^|; )" + r + "=([^;]*)"));
|
|
1190
|
+
return e ? decodeURIComponent(e[1]) : null;
|
|
1191
|
+
},
|
|
1192
|
+
remove(r) {
|
|
1193
|
+
this.write(r, "", Date.now() - 864e5, "/");
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
) : (
|
|
1197
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1198
|
+
{
|
|
1199
|
+
write() {
|
|
1200
|
+
},
|
|
1201
|
+
read() {
|
|
1202
|
+
return null;
|
|
1203
|
+
},
|
|
1204
|
+
remove() {
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
);
|
|
1208
|
+
function Yn(r) {
|
|
1209
|
+
return typeof r != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
|
|
1210
|
+
}
|
|
1211
|
+
function Qn(r, e) {
|
|
1212
|
+
return e ? r.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : r;
|
|
1213
|
+
}
|
|
1214
|
+
function bt(r, e, t) {
|
|
1215
|
+
let n = !Yn(e);
|
|
1216
|
+
return r && (n || t == !1) ? Qn(r, e) : e;
|
|
1217
|
+
}
|
|
1218
|
+
const yr = (r) => r instanceof $ ? { ...r } : r;
|
|
1219
|
+
function ie(r, e) {
|
|
1220
|
+
e = e || {};
|
|
1221
|
+
const t = {};
|
|
1222
|
+
function n(m, f, E, A) {
|
|
1223
|
+
return c.isPlainObject(m) && c.isPlainObject(f) ? c.merge.call({ caseless: A }, m, f) : c.isPlainObject(f) ? c.merge({}, f) : c.isArray(f) ? f.slice() : f;
|
|
1224
|
+
}
|
|
1225
|
+
function s(m, f, E, A) {
|
|
1226
|
+
if (c.isUndefined(f)) {
|
|
1227
|
+
if (!c.isUndefined(m))
|
|
1228
|
+
return n(void 0, m, E, A);
|
|
1229
|
+
} else return n(m, f, E, A);
|
|
1230
|
+
}
|
|
1231
|
+
function o(m, f) {
|
|
1232
|
+
if (!c.isUndefined(f))
|
|
1233
|
+
return n(void 0, f);
|
|
1234
|
+
}
|
|
1235
|
+
function i(m, f) {
|
|
1236
|
+
if (c.isUndefined(f)) {
|
|
1237
|
+
if (!c.isUndefined(m))
|
|
1238
|
+
return n(void 0, m);
|
|
1239
|
+
} else return n(void 0, f);
|
|
1240
|
+
}
|
|
1241
|
+
function a(m, f, E) {
|
|
1242
|
+
if (E in e)
|
|
1243
|
+
return n(m, f);
|
|
1244
|
+
if (E in r)
|
|
1245
|
+
return n(void 0, m);
|
|
1246
|
+
}
|
|
1247
|
+
const b = {
|
|
1248
|
+
url: o,
|
|
1249
|
+
method: o,
|
|
1250
|
+
data: o,
|
|
1251
|
+
baseURL: i,
|
|
1252
|
+
transformRequest: i,
|
|
1253
|
+
transformResponse: i,
|
|
1254
|
+
paramsSerializer: i,
|
|
1255
|
+
timeout: i,
|
|
1256
|
+
timeoutMessage: i,
|
|
1257
|
+
withCredentials: i,
|
|
1258
|
+
withXSRFToken: i,
|
|
1259
|
+
adapter: i,
|
|
1260
|
+
responseType: i,
|
|
1261
|
+
xsrfCookieName: i,
|
|
1262
|
+
xsrfHeaderName: i,
|
|
1263
|
+
onUploadProgress: i,
|
|
1264
|
+
onDownloadProgress: i,
|
|
1265
|
+
decompress: i,
|
|
1266
|
+
maxContentLength: i,
|
|
1267
|
+
maxBodyLength: i,
|
|
1268
|
+
beforeRedirect: i,
|
|
1269
|
+
transport: i,
|
|
1270
|
+
httpAgent: i,
|
|
1271
|
+
httpsAgent: i,
|
|
1272
|
+
cancelToken: i,
|
|
1273
|
+
socketPath: i,
|
|
1274
|
+
responseEncoding: i,
|
|
1275
|
+
validateStatus: a,
|
|
1276
|
+
headers: (m, f, E) => s(yr(m), yr(f), E, !0)
|
|
1277
|
+
};
|
|
1278
|
+
return c.forEach(
|
|
1279
|
+
Object.keys({ ...r, ...e }),
|
|
1280
|
+
function(f) {
|
|
1281
|
+
if (f === "__proto__" || f === "constructor" || f === "prototype")
|
|
1282
|
+
return;
|
|
1283
|
+
const E = c.hasOwnProp(b, f) ? b[f] : s, A = E(r[f], e[f], f);
|
|
1284
|
+
c.isUndefined(A) && E !== a || (t[f] = A);
|
|
1285
|
+
}
|
|
1286
|
+
), t;
|
|
1287
|
+
}
|
|
1288
|
+
const yt = (r) => {
|
|
1289
|
+
const e = ie({}, r);
|
|
1290
|
+
let { data: t, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = e;
|
|
1291
|
+
if (e.headers = i = $.from(i), e.url = ht(bt(e.baseURL, e.url, e.allowAbsoluteUrls), r.params, r.paramsSerializer), a && i.set(
|
|
1292
|
+
"Authorization",
|
|
1293
|
+
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1294
|
+
), c.isFormData(t)) {
|
|
1295
|
+
if (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv)
|
|
1296
|
+
i.setContentType(void 0);
|
|
1297
|
+
else if (c.isFunction(t.getHeaders)) {
|
|
1298
|
+
const b = t.getHeaders(), m = ["content-type", "content-length"];
|
|
1299
|
+
Object.entries(b).forEach(([f, E]) => {
|
|
1300
|
+
m.includes(f.toLowerCase()) && i.set(f, E);
|
|
1301
|
+
});
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
if (V.hasStandardBrowserEnv && (n && c.isFunction(n) && (n = n(e)), n || n !== !1 && Jn(e.url))) {
|
|
1305
|
+
const b = s && o && Xn.read(o);
|
|
1306
|
+
b && i.set(s, b);
|
|
1307
|
+
}
|
|
1308
|
+
return e;
|
|
1309
|
+
}, Zn = typeof XMLHttpRequest < "u", es = Zn && function(r) {
|
|
1310
|
+
return new Promise(function(t, n) {
|
|
1311
|
+
const s = yt(r);
|
|
1312
|
+
let o = s.data;
|
|
1313
|
+
const i = $.from(s.headers).normalize();
|
|
1314
|
+
let { responseType: a, onUploadProgress: b, onDownloadProgress: m } = s, f, E, A, D, h;
|
|
1315
|
+
function O() {
|
|
1316
|
+
D && D(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
|
|
1317
|
+
}
|
|
1318
|
+
let g = new XMLHttpRequest();
|
|
1319
|
+
g.open(s.method.toUpperCase(), s.url, !0), g.timeout = s.timeout;
|
|
1320
|
+
function I() {
|
|
1321
|
+
if (!g)
|
|
1322
|
+
return;
|
|
1323
|
+
const N = $.from(
|
|
1324
|
+
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1325
|
+
), B = {
|
|
1326
|
+
data: !a || a === "text" || a === "json" ? g.responseText : g.response,
|
|
1327
|
+
status: g.status,
|
|
1328
|
+
statusText: g.statusText,
|
|
1329
|
+
headers: N,
|
|
1330
|
+
config: r,
|
|
1331
|
+
request: g
|
|
1332
|
+
};
|
|
1333
|
+
mt(function(H) {
|
|
1334
|
+
t(H), O();
|
|
1335
|
+
}, function(H) {
|
|
1336
|
+
n(H), O();
|
|
1337
|
+
}, B), g = null;
|
|
1338
|
+
}
|
|
1339
|
+
"onloadend" in g ? g.onloadend = I : g.onreadystatechange = function() {
|
|
1340
|
+
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(I);
|
|
1341
|
+
}, g.onabort = function() {
|
|
1342
|
+
g && (n(new P("Request aborted", P.ECONNABORTED, r, g)), g = null);
|
|
1343
|
+
}, g.onerror = function(F) {
|
|
1344
|
+
const B = F && F.message ? F.message : "Network Error", W = new P(B, P.ERR_NETWORK, r, g);
|
|
1345
|
+
W.event = F || null, n(W), g = null;
|
|
1346
|
+
}, g.ontimeout = function() {
|
|
1347
|
+
let F = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1348
|
+
const B = s.transitional || ar;
|
|
1349
|
+
s.timeoutErrorMessage && (F = s.timeoutErrorMessage), n(new P(
|
|
1350
|
+
F,
|
|
1351
|
+
B.clarifyTimeoutError ? P.ETIMEDOUT : P.ECONNABORTED,
|
|
1352
|
+
r,
|
|
1353
|
+
g
|
|
1354
|
+
)), g = null;
|
|
1355
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in g && c.forEach(i.toJSON(), function(F, B) {
|
|
1356
|
+
g.setRequestHeader(B, F);
|
|
1357
|
+
}), c.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), a && a !== "json" && (g.responseType = s.responseType), m && ([A, h] = Ue(m, !0), g.addEventListener("progress", A)), b && g.upload && ([E, D] = Ue(b), g.upload.addEventListener("progress", E), g.upload.addEventListener("loadend", D)), (s.cancelToken || s.signal) && (f = (N) => {
|
|
1358
|
+
g && (n(!N || N.type ? new ke(null, r, g) : N), g.abort(), g = null);
|
|
1359
|
+
}, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
|
|
1360
|
+
const M = $n(s.url);
|
|
1361
|
+
if (M && V.protocols.indexOf(M) === -1) {
|
|
1362
|
+
n(new P("Unsupported protocol " + M + ":", P.ERR_BAD_REQUEST, r));
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
g.send(o || null);
|
|
1366
|
+
});
|
|
1367
|
+
}, rs = (r, e) => {
|
|
1368
|
+
const { length: t } = r = r ? r.filter(Boolean) : [];
|
|
1369
|
+
if (e || t) {
|
|
1370
|
+
let n = new AbortController(), s;
|
|
1371
|
+
const o = function(m) {
|
|
1372
|
+
if (!s) {
|
|
1373
|
+
s = !0, a();
|
|
1374
|
+
const f = m instanceof Error ? m : this.reason;
|
|
1375
|
+
n.abort(f instanceof P ? f : new ke(f instanceof Error ? f.message : f));
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
let i = e && setTimeout(() => {
|
|
1379
|
+
i = null, o(new P(`timeout of ${e}ms exceeded`, P.ETIMEDOUT));
|
|
1380
|
+
}, e);
|
|
1381
|
+
const a = () => {
|
|
1382
|
+
r && (i && clearTimeout(i), i = null, r.forEach((m) => {
|
|
1383
|
+
m.unsubscribe ? m.unsubscribe(o) : m.removeEventListener("abort", o);
|
|
1384
|
+
}), r = null);
|
|
1385
|
+
};
|
|
1386
|
+
r.forEach((m) => m.addEventListener("abort", o));
|
|
1387
|
+
const { signal: b } = n;
|
|
1388
|
+
return b.unsubscribe = () => c.asap(a), b;
|
|
1389
|
+
}
|
|
1390
|
+
}, ts = function* (r, e) {
|
|
1391
|
+
let t = r.byteLength;
|
|
1392
|
+
if (t < e) {
|
|
1393
|
+
yield r;
|
|
1394
|
+
return;
|
|
1395
|
+
}
|
|
1396
|
+
let n = 0, s;
|
|
1397
|
+
for (; n < t; )
|
|
1398
|
+
s = n + e, yield r.slice(n, s), n = s;
|
|
1399
|
+
}, ns = async function* (r, e) {
|
|
1400
|
+
for await (const t of ss(r))
|
|
1401
|
+
yield* ts(t, e);
|
|
1402
|
+
}, ss = async function* (r) {
|
|
1403
|
+
if (r[Symbol.asyncIterator]) {
|
|
1404
|
+
yield* r;
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
const e = r.getReader();
|
|
1408
|
+
try {
|
|
1409
|
+
for (; ; ) {
|
|
1410
|
+
const { done: t, value: n } = await e.read();
|
|
1411
|
+
if (t)
|
|
1412
|
+
break;
|
|
1413
|
+
yield n;
|
|
1414
|
+
}
|
|
1415
|
+
} finally {
|
|
1416
|
+
await e.cancel();
|
|
1417
|
+
}
|
|
1418
|
+
}, gr = (r, e, t, n) => {
|
|
1419
|
+
const s = ns(r, e);
|
|
1420
|
+
let o = 0, i, a = (b) => {
|
|
1421
|
+
i || (i = !0, n && n(b));
|
|
1422
|
+
};
|
|
1423
|
+
return new ReadableStream({
|
|
1424
|
+
async pull(b) {
|
|
1425
|
+
try {
|
|
1426
|
+
const { done: m, value: f } = await s.next();
|
|
1427
|
+
if (m) {
|
|
1428
|
+
a(), b.close();
|
|
1429
|
+
return;
|
|
1430
|
+
}
|
|
1431
|
+
let E = f.byteLength;
|
|
1432
|
+
if (t) {
|
|
1433
|
+
let A = o += E;
|
|
1434
|
+
t(A);
|
|
1435
|
+
}
|
|
1436
|
+
b.enqueue(new Uint8Array(f));
|
|
1437
|
+
} catch (m) {
|
|
1438
|
+
throw a(m), m;
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1441
|
+
cancel(b) {
|
|
1442
|
+
return a(b), s.return();
|
|
1443
|
+
}
|
|
1444
|
+
}, {
|
|
1445
|
+
highWaterMark: 2
|
|
1446
|
+
});
|
|
1447
|
+
}, Er = 64 * 1024, { isFunction: De } = c, os = (({ Request: r, Response: e }) => ({
|
|
1448
|
+
Request: r,
|
|
1449
|
+
Response: e
|
|
1450
|
+
}))(c.global), {
|
|
1451
|
+
ReadableStream: Or,
|
|
1452
|
+
TextEncoder: _r
|
|
1453
|
+
} = c.global, Tr = (r, ...e) => {
|
|
1454
|
+
try {
|
|
1455
|
+
return !!r(...e);
|
|
1456
|
+
} catch {
|
|
1457
|
+
return !1;
|
|
1458
|
+
}
|
|
1459
|
+
}, is = (r) => {
|
|
1460
|
+
r = c.merge.call({
|
|
1461
|
+
skipUndefined: !0
|
|
1462
|
+
}, os, r);
|
|
1463
|
+
const { fetch: e, Request: t, Response: n } = r, s = e ? De(e) : typeof fetch == "function", o = De(t), i = De(n);
|
|
1464
|
+
if (!s)
|
|
1465
|
+
return !1;
|
|
1466
|
+
const a = s && De(Or), b = s && (typeof _r == "function" ? /* @__PURE__ */ ((h) => (O) => h.encode(O))(new _r()) : async (h) => new Uint8Array(await new t(h).arrayBuffer())), m = o && a && Tr(() => {
|
|
1467
|
+
let h = !1;
|
|
1468
|
+
const O = new t(V.origin, {
|
|
1469
|
+
body: new Or(),
|
|
1470
|
+
method: "POST",
|
|
1471
|
+
get duplex() {
|
|
1472
|
+
return h = !0, "half";
|
|
1473
|
+
}
|
|
1474
|
+
}).headers.has("Content-Type");
|
|
1475
|
+
return h && !O;
|
|
1476
|
+
}), f = i && a && Tr(() => c.isReadableStream(new n("").body)), E = {
|
|
1477
|
+
stream: f && ((h) => h.body)
|
|
1478
|
+
};
|
|
1479
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((h) => {
|
|
1480
|
+
!E[h] && (E[h] = (O, g) => {
|
|
1481
|
+
let I = O && O[h];
|
|
1482
|
+
if (I)
|
|
1483
|
+
return I.call(O);
|
|
1484
|
+
throw new P(`Response type '${h}' is not supported`, P.ERR_NOT_SUPPORT, g);
|
|
1485
|
+
});
|
|
1486
|
+
});
|
|
1487
|
+
const A = async (h) => {
|
|
1488
|
+
if (h == null)
|
|
1489
|
+
return 0;
|
|
1490
|
+
if (c.isBlob(h))
|
|
1491
|
+
return h.size;
|
|
1492
|
+
if (c.isSpecCompliantForm(h))
|
|
1493
|
+
return (await new t(V.origin, {
|
|
1494
|
+
method: "POST",
|
|
1495
|
+
body: h
|
|
1496
|
+
}).arrayBuffer()).byteLength;
|
|
1497
|
+
if (c.isArrayBufferView(h) || c.isArrayBuffer(h))
|
|
1498
|
+
return h.byteLength;
|
|
1499
|
+
if (c.isURLSearchParams(h) && (h = h + ""), c.isString(h))
|
|
1500
|
+
return (await b(h)).byteLength;
|
|
1501
|
+
}, D = async (h, O) => {
|
|
1502
|
+
const g = c.toFiniteNumber(h.getContentLength());
|
|
1503
|
+
return g ?? A(O);
|
|
1504
|
+
};
|
|
1505
|
+
return async (h) => {
|
|
1506
|
+
let {
|
|
1507
|
+
url: O,
|
|
1508
|
+
method: g,
|
|
1509
|
+
data: I,
|
|
1510
|
+
signal: M,
|
|
1511
|
+
cancelToken: N,
|
|
1512
|
+
timeout: F,
|
|
1513
|
+
onDownloadProgress: B,
|
|
1514
|
+
onUploadProgress: W,
|
|
1515
|
+
responseType: H,
|
|
1516
|
+
headers: Z,
|
|
1517
|
+
withCredentials: Y = "same-origin",
|
|
1518
|
+
fetchOptions: j
|
|
1519
|
+
} = yt(h), y = e || fetch;
|
|
1520
|
+
H = H ? (H + "").toLowerCase() : "text";
|
|
1521
|
+
let k = rs([M, N && N.toAbortSignal()], F), u = null;
|
|
1522
|
+
const l = k && k.unsubscribe && (() => {
|
|
1523
|
+
k.unsubscribe();
|
|
1524
|
+
});
|
|
1525
|
+
let v;
|
|
1526
|
+
try {
|
|
1527
|
+
if (W && m && g !== "get" && g !== "head" && (v = await D(Z, I)) !== 0) {
|
|
1528
|
+
let R = new t(O, {
|
|
1529
|
+
method: "POST",
|
|
1530
|
+
body: I,
|
|
1531
|
+
duplex: "half"
|
|
1532
|
+
}), _;
|
|
1533
|
+
if (c.isFormData(I) && (_ = R.headers.get("content-type")) && Z.setContentType(_), R.body) {
|
|
1534
|
+
const [q, U] = mr(
|
|
1535
|
+
v,
|
|
1536
|
+
Ue(br(W))
|
|
1537
|
+
);
|
|
1538
|
+
I = gr(R.body, Er, q, U);
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
c.isString(Y) || (Y = Y ? "include" : "omit");
|
|
1542
|
+
const S = o && "credentials" in t.prototype, d = {
|
|
1543
|
+
...j,
|
|
1544
|
+
signal: k,
|
|
1545
|
+
method: g.toUpperCase(),
|
|
1546
|
+
headers: Z.normalize().toJSON(),
|
|
1547
|
+
body: I,
|
|
1548
|
+
duplex: "half",
|
|
1549
|
+
credentials: S ? Y : void 0
|
|
1550
|
+
};
|
|
1551
|
+
u = o && new t(O, d);
|
|
1552
|
+
let p = await (o ? y(u, j) : y(O, d));
|
|
1553
|
+
const T = f && (H === "stream" || H === "response");
|
|
1554
|
+
if (f && (B || T && l)) {
|
|
1555
|
+
const R = {};
|
|
1556
|
+
["status", "statusText", "headers"].forEach((re) => {
|
|
1557
|
+
R[re] = p[re];
|
|
1558
|
+
});
|
|
1559
|
+
const _ = c.toFiniteNumber(p.headers.get("content-length")), [q, U] = B && mr(
|
|
1560
|
+
_,
|
|
1561
|
+
Ue(br(B), !0)
|
|
1562
|
+
) || [];
|
|
1563
|
+
p = new n(
|
|
1564
|
+
gr(p.body, Er, q, () => {
|
|
1565
|
+
U && U(), l && l();
|
|
1566
|
+
}),
|
|
1567
|
+
R
|
|
1568
|
+
);
|
|
1569
|
+
}
|
|
1570
|
+
H = H || "text";
|
|
1571
|
+
let C = await E[c.findKey(E, H) || "text"](p, h);
|
|
1572
|
+
return !T && l && l(), await new Promise((R, _) => {
|
|
1573
|
+
mt(R, _, {
|
|
1574
|
+
data: C,
|
|
1575
|
+
headers: $.from(p.headers),
|
|
1576
|
+
status: p.status,
|
|
1577
|
+
statusText: p.statusText,
|
|
1578
|
+
config: h,
|
|
1579
|
+
request: u
|
|
1580
|
+
});
|
|
1581
|
+
});
|
|
1582
|
+
} catch (S) {
|
|
1583
|
+
throw l && l(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1584
|
+
new P("Network Error", P.ERR_NETWORK, h, u, S && S.response),
|
|
1585
|
+
{
|
|
1586
|
+
cause: S.cause || S
|
|
1587
|
+
}
|
|
1588
|
+
) : P.from(S, S && S.code, h, u, S && S.response);
|
|
1589
|
+
}
|
|
1590
|
+
};
|
|
1591
|
+
}, as = /* @__PURE__ */ new Map(), gt = (r) => {
|
|
1592
|
+
let e = r && r.env || {};
|
|
1593
|
+
const { fetch: t, Request: n, Response: s } = e, o = [
|
|
1594
|
+
n,
|
|
1595
|
+
s,
|
|
1596
|
+
t
|
|
1597
|
+
];
|
|
1598
|
+
let i = o.length, a = i, b, m, f = as;
|
|
1599
|
+
for (; a--; )
|
|
1600
|
+
b = o[a], m = f.get(b), m === void 0 && f.set(b, m = a ? /* @__PURE__ */ new Map() : is(e)), f = m;
|
|
1601
|
+
return m;
|
|
1602
|
+
};
|
|
1603
|
+
gt();
|
|
1604
|
+
const ur = {
|
|
1605
|
+
http: Tn,
|
|
1606
|
+
xhr: es,
|
|
1607
|
+
fetch: {
|
|
1608
|
+
get: gt
|
|
1609
|
+
}
|
|
1610
|
+
};
|
|
1611
|
+
c.forEach(ur, (r, e) => {
|
|
1612
|
+
if (r) {
|
|
1613
|
+
try {
|
|
1614
|
+
Object.defineProperty(r, "name", { value: e });
|
|
1615
|
+
} catch {
|
|
1616
|
+
}
|
|
1617
|
+
Object.defineProperty(r, "adapterName", { value: e });
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
const Pr = (r) => `- ${r}`, cs = (r) => c.isFunction(r) || r === null || r === !1;
|
|
1621
|
+
function us(r, e) {
|
|
1622
|
+
r = c.isArray(r) ? r : [r];
|
|
1623
|
+
const { length: t } = r;
|
|
1624
|
+
let n, s;
|
|
1625
|
+
const o = {};
|
|
1626
|
+
for (let i = 0; i < t; i++) {
|
|
1627
|
+
n = r[i];
|
|
1628
|
+
let a;
|
|
1629
|
+
if (s = n, !cs(n) && (s = ur[(a = String(n)).toLowerCase()], s === void 0))
|
|
1630
|
+
throw new P(`Unknown adapter '${a}'`);
|
|
1631
|
+
if (s && (c.isFunction(s) || (s = s.get(e))))
|
|
1632
|
+
break;
|
|
1633
|
+
o[a || "#" + i] = s;
|
|
1634
|
+
}
|
|
1635
|
+
if (!s) {
|
|
1636
|
+
const i = Object.entries(o).map(
|
|
1637
|
+
([b, m]) => `adapter ${b} ` + (m === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1638
|
+
);
|
|
1639
|
+
let a = t ? i.length > 1 ? `since :
|
|
1640
|
+
` + i.map(Pr).join(`
|
|
1641
|
+
`) : " " + Pr(i[0]) : "as no adapter specified";
|
|
1642
|
+
throw new P(
|
|
1643
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
1644
|
+
"ERR_NOT_SUPPORT"
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
return s;
|
|
1648
|
+
}
|
|
1649
|
+
const Et = {
|
|
1650
|
+
/**
|
|
1651
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
1652
|
+
* @type {Function}
|
|
1653
|
+
*/
|
|
1654
|
+
getAdapter: us,
|
|
1655
|
+
/**
|
|
1656
|
+
* Exposes all known adapters
|
|
1657
|
+
* @type {Object<string, Function|Object>}
|
|
1658
|
+
*/
|
|
1659
|
+
adapters: ur
|
|
1660
|
+
};
|
|
1661
|
+
function Ge(r) {
|
|
1662
|
+
if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
|
|
1663
|
+
throw new ke(null, r);
|
|
1664
|
+
}
|
|
1665
|
+
function wr(r) {
|
|
1666
|
+
return Ge(r), r.headers = $.from(r.headers), r.data = Ve.call(
|
|
1667
|
+
r,
|
|
1668
|
+
r.transformRequest
|
|
1669
|
+
), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(r.adapter || Re.adapter, r)(r).then(function(n) {
|
|
1670
|
+
return Ge(r), n.data = Ve.call(
|
|
1671
|
+
r,
|
|
1672
|
+
r.transformResponse,
|
|
1673
|
+
n
|
|
1674
|
+
), n.headers = $.from(n.headers), n;
|
|
1675
|
+
}, function(n) {
|
|
1676
|
+
return St(n) || (Ge(r), n && n.response && (n.response.data = Ve.call(
|
|
1677
|
+
r,
|
|
1678
|
+
r.transformResponse,
|
|
1679
|
+
n.response
|
|
1680
|
+
), n.response.headers = $.from(n.response.headers))), Promise.reject(n);
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
const Ot = "1.13.5", He = {};
|
|
1684
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((r, e) => {
|
|
1685
|
+
He[r] = function(n) {
|
|
1686
|
+
return typeof n === r || "a" + (e < 1 ? "n " : " ") + r;
|
|
1687
|
+
};
|
|
1688
|
+
});
|
|
1689
|
+
const Ar = {};
|
|
1690
|
+
He.transitional = function(e, t, n) {
|
|
1691
|
+
function s(o, i) {
|
|
1692
|
+
return "[Axios v" + Ot + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1693
|
+
}
|
|
1694
|
+
return (o, i, a) => {
|
|
1695
|
+
if (e === !1)
|
|
1696
|
+
throw new P(
|
|
1697
|
+
s(i, " has been removed" + (t ? " in " + t : "")),
|
|
1698
|
+
P.ERR_DEPRECATED
|
|
1699
|
+
);
|
|
1700
|
+
return t && !Ar[i] && (Ar[i] = !0, console.warn(
|
|
1701
|
+
s(
|
|
1702
|
+
i,
|
|
1703
|
+
" has been deprecated since v" + t + " and will be removed in the near future"
|
|
1704
|
+
)
|
|
1705
|
+
)), e ? e(o, i, a) : !0;
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1708
|
+
He.spelling = function(e) {
|
|
1709
|
+
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1710
|
+
};
|
|
1711
|
+
function ls(r, e, t) {
|
|
1712
|
+
if (typeof r != "object")
|
|
1713
|
+
throw new P("options must be an object", P.ERR_BAD_OPTION_VALUE);
|
|
1714
|
+
const n = Object.keys(r);
|
|
1715
|
+
let s = n.length;
|
|
1716
|
+
for (; s-- > 0; ) {
|
|
1717
|
+
const o = n[s], i = e[o];
|
|
1718
|
+
if (i) {
|
|
1719
|
+
const a = r[o], b = a === void 0 || i(a, o, r);
|
|
1720
|
+
if (b !== !0)
|
|
1721
|
+
throw new P("option " + o + " must be " + b, P.ERR_BAD_OPTION_VALUE);
|
|
1722
|
+
continue;
|
|
1723
|
+
}
|
|
1724
|
+
if (t !== !0)
|
|
1725
|
+
throw new P("Unknown option " + o, P.ERR_BAD_OPTION);
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
const je = {
|
|
1729
|
+
assertOptions: ls,
|
|
1730
|
+
validators: He
|
|
1731
|
+
}, J = je.validators;
|
|
1732
|
+
let oe = class {
|
|
1733
|
+
constructor(e) {
|
|
1734
|
+
this.defaults = e || {}, this.interceptors = {
|
|
1735
|
+
request: new vr(),
|
|
1736
|
+
response: new vr()
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
/**
|
|
1740
|
+
* Dispatch a request
|
|
1741
|
+
*
|
|
1742
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1743
|
+
* @param {?Object} config
|
|
1744
|
+
*
|
|
1745
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1746
|
+
*/
|
|
1747
|
+
async request(e, t) {
|
|
1748
|
+
try {
|
|
1749
|
+
return await this._request(e, t);
|
|
1750
|
+
} catch (n) {
|
|
1751
|
+
if (n instanceof Error) {
|
|
1752
|
+
let s = {};
|
|
1753
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1754
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1755
|
+
try {
|
|
1756
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1757
|
+
` + o) : n.stack = o;
|
|
1758
|
+
} catch {
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
throw n;
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
_request(e, t) {
|
|
1765
|
+
typeof e == "string" ? (t = t || {}, t.url = e) : t = e || {}, t = ie(this.defaults, t);
|
|
1766
|
+
const { transitional: n, paramsSerializer: s, headers: o } = t;
|
|
1767
|
+
n !== void 0 && je.assertOptions(n, {
|
|
1768
|
+
silentJSONParsing: J.transitional(J.boolean),
|
|
1769
|
+
forcedJSONParsing: J.transitional(J.boolean),
|
|
1770
|
+
clarifyTimeoutError: J.transitional(J.boolean),
|
|
1771
|
+
legacyInterceptorReqResOrdering: J.transitional(J.boolean)
|
|
1772
|
+
}, !1), s != null && (c.isFunction(s) ? t.paramsSerializer = {
|
|
1773
|
+
serialize: s
|
|
1774
|
+
} : je.assertOptions(s, {
|
|
1775
|
+
encode: J.function,
|
|
1776
|
+
serialize: J.function
|
|
1777
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : t.allowAbsoluteUrls = !0), je.assertOptions(t, {
|
|
1778
|
+
baseUrl: J.spelling("baseURL"),
|
|
1779
|
+
withXsrfToken: J.spelling("withXSRFToken")
|
|
1780
|
+
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1781
|
+
let i = o && c.merge(
|
|
1782
|
+
o.common,
|
|
1783
|
+
o[t.method]
|
|
1784
|
+
);
|
|
1785
|
+
o && c.forEach(
|
|
1786
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1787
|
+
(h) => {
|
|
1788
|
+
delete o[h];
|
|
1789
|
+
}
|
|
1790
|
+
), t.headers = $.concat(i, o);
|
|
1791
|
+
const a = [];
|
|
1792
|
+
let b = !0;
|
|
1793
|
+
this.interceptors.request.forEach(function(O) {
|
|
1794
|
+
if (typeof O.runWhen == "function" && O.runWhen(t) === !1)
|
|
1795
|
+
return;
|
|
1796
|
+
b = b && O.synchronous;
|
|
1797
|
+
const g = t.transitional || ar;
|
|
1798
|
+
g && g.legacyInterceptorReqResOrdering ? a.unshift(O.fulfilled, O.rejected) : a.push(O.fulfilled, O.rejected);
|
|
1799
|
+
});
|
|
1800
|
+
const m = [];
|
|
1801
|
+
this.interceptors.response.forEach(function(O) {
|
|
1802
|
+
m.push(O.fulfilled, O.rejected);
|
|
1803
|
+
});
|
|
1804
|
+
let f, E = 0, A;
|
|
1805
|
+
if (!b) {
|
|
1806
|
+
const h = [wr.bind(this), void 0];
|
|
1807
|
+
for (h.unshift(...a), h.push(...m), A = h.length, f = Promise.resolve(t); E < A; )
|
|
1808
|
+
f = f.then(h[E++], h[E++]);
|
|
1809
|
+
return f;
|
|
1810
|
+
}
|
|
1811
|
+
A = a.length;
|
|
1812
|
+
let D = t;
|
|
1813
|
+
for (; E < A; ) {
|
|
1814
|
+
const h = a[E++], O = a[E++];
|
|
1815
|
+
try {
|
|
1816
|
+
D = h(D);
|
|
1817
|
+
} catch (g) {
|
|
1818
|
+
O.call(this, g);
|
|
1819
|
+
break;
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
try {
|
|
1823
|
+
f = wr.call(this, D);
|
|
1824
|
+
} catch (h) {
|
|
1825
|
+
return Promise.reject(h);
|
|
1826
|
+
}
|
|
1827
|
+
for (E = 0, A = m.length; E < A; )
|
|
1828
|
+
f = f.then(m[E++], m[E++]);
|
|
1829
|
+
return f;
|
|
1830
|
+
}
|
|
1831
|
+
getUri(e) {
|
|
1832
|
+
e = ie(this.defaults, e);
|
|
1833
|
+
const t = bt(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
1834
|
+
return ht(t, e.params, e.paramsSerializer);
|
|
1835
|
+
}
|
|
1836
|
+
};
|
|
1837
|
+
c.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1838
|
+
oe.prototype[e] = function(t, n) {
|
|
1839
|
+
return this.request(ie(n || {}, {
|
|
1840
|
+
method: e,
|
|
1841
|
+
url: t,
|
|
1842
|
+
data: (n || {}).data
|
|
1843
|
+
}));
|
|
1844
|
+
};
|
|
1845
|
+
});
|
|
1846
|
+
c.forEach(["post", "put", "patch"], function(e) {
|
|
1847
|
+
function t(n) {
|
|
1848
|
+
return function(o, i, a) {
|
|
1849
|
+
return this.request(ie(a || {}, {
|
|
1850
|
+
method: e,
|
|
1851
|
+
headers: n ? {
|
|
1852
|
+
"Content-Type": "multipart/form-data"
|
|
1853
|
+
} : {},
|
|
1854
|
+
url: o,
|
|
1855
|
+
data: i
|
|
1856
|
+
}));
|
|
1857
|
+
};
|
|
1858
|
+
}
|
|
1859
|
+
oe.prototype[e] = t(), oe.prototype[e + "Form"] = t(!0);
|
|
1860
|
+
});
|
|
1861
|
+
let ds = class _t {
|
|
1862
|
+
constructor(e) {
|
|
1863
|
+
if (typeof e != "function")
|
|
1864
|
+
throw new TypeError("executor must be a function.");
|
|
1865
|
+
let t;
|
|
1866
|
+
this.promise = new Promise(function(o) {
|
|
1867
|
+
t = o;
|
|
1868
|
+
});
|
|
1869
|
+
const n = this;
|
|
1870
|
+
this.promise.then((s) => {
|
|
1871
|
+
if (!n._listeners) return;
|
|
1872
|
+
let o = n._listeners.length;
|
|
1873
|
+
for (; o-- > 0; )
|
|
1874
|
+
n._listeners[o](s);
|
|
1875
|
+
n._listeners = null;
|
|
1876
|
+
}), this.promise.then = (s) => {
|
|
1877
|
+
let o;
|
|
1878
|
+
const i = new Promise((a) => {
|
|
1879
|
+
n.subscribe(a), o = a;
|
|
1880
|
+
}).then(s);
|
|
1881
|
+
return i.cancel = function() {
|
|
1882
|
+
n.unsubscribe(o);
|
|
1883
|
+
}, i;
|
|
1884
|
+
}, e(function(o, i, a) {
|
|
1885
|
+
n.reason || (n.reason = new ke(o, i, a), t(n.reason));
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
/**
|
|
1889
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1890
|
+
*/
|
|
1891
|
+
throwIfRequested() {
|
|
1892
|
+
if (this.reason)
|
|
1893
|
+
throw this.reason;
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Subscribe to the cancel signal
|
|
1897
|
+
*/
|
|
1898
|
+
subscribe(e) {
|
|
1899
|
+
if (this.reason) {
|
|
1900
|
+
e(this.reason);
|
|
1901
|
+
return;
|
|
1902
|
+
}
|
|
1903
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* Unsubscribe from the cancel signal
|
|
1907
|
+
*/
|
|
1908
|
+
unsubscribe(e) {
|
|
1909
|
+
if (!this._listeners)
|
|
1910
|
+
return;
|
|
1911
|
+
const t = this._listeners.indexOf(e);
|
|
1912
|
+
t !== -1 && this._listeners.splice(t, 1);
|
|
1913
|
+
}
|
|
1914
|
+
toAbortSignal() {
|
|
1915
|
+
const e = new AbortController(), t = (n) => {
|
|
1916
|
+
e.abort(n);
|
|
1917
|
+
};
|
|
1918
|
+
return this.subscribe(t), e.signal.unsubscribe = () => this.unsubscribe(t), e.signal;
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1922
|
+
* cancels the `CancelToken`.
|
|
1923
|
+
*/
|
|
1924
|
+
static source() {
|
|
1925
|
+
let e;
|
|
1926
|
+
return {
|
|
1927
|
+
token: new _t(function(s) {
|
|
1928
|
+
e = s;
|
|
1929
|
+
}),
|
|
1930
|
+
cancel: e
|
|
1931
|
+
};
|
|
1932
|
+
}
|
|
1933
|
+
};
|
|
1934
|
+
function fs(r) {
|
|
1935
|
+
return function(t) {
|
|
1936
|
+
return r.apply(null, t);
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
function ps(r) {
|
|
1940
|
+
return c.isObject(r) && r.isAxiosError === !0;
|
|
1941
|
+
}
|
|
1942
|
+
const sr = {
|
|
1943
|
+
Continue: 100,
|
|
1944
|
+
SwitchingProtocols: 101,
|
|
1945
|
+
Processing: 102,
|
|
1946
|
+
EarlyHints: 103,
|
|
1947
|
+
Ok: 200,
|
|
1948
|
+
Created: 201,
|
|
1949
|
+
Accepted: 202,
|
|
1950
|
+
NonAuthoritativeInformation: 203,
|
|
1951
|
+
NoContent: 204,
|
|
1952
|
+
ResetContent: 205,
|
|
1953
|
+
PartialContent: 206,
|
|
1954
|
+
MultiStatus: 207,
|
|
1955
|
+
AlreadyReported: 208,
|
|
1956
|
+
ImUsed: 226,
|
|
1957
|
+
MultipleChoices: 300,
|
|
1958
|
+
MovedPermanently: 301,
|
|
1959
|
+
Found: 302,
|
|
1960
|
+
SeeOther: 303,
|
|
1961
|
+
NotModified: 304,
|
|
1962
|
+
UseProxy: 305,
|
|
1963
|
+
Unused: 306,
|
|
1964
|
+
TemporaryRedirect: 307,
|
|
1965
|
+
PermanentRedirect: 308,
|
|
1966
|
+
BadRequest: 400,
|
|
1967
|
+
Unauthorized: 401,
|
|
1968
|
+
PaymentRequired: 402,
|
|
1969
|
+
Forbidden: 403,
|
|
1970
|
+
NotFound: 404,
|
|
1971
|
+
MethodNotAllowed: 405,
|
|
1972
|
+
NotAcceptable: 406,
|
|
1973
|
+
ProxyAuthenticationRequired: 407,
|
|
1974
|
+
RequestTimeout: 408,
|
|
1975
|
+
Conflict: 409,
|
|
1976
|
+
Gone: 410,
|
|
1977
|
+
LengthRequired: 411,
|
|
1978
|
+
PreconditionFailed: 412,
|
|
1979
|
+
PayloadTooLarge: 413,
|
|
1980
|
+
UriTooLong: 414,
|
|
1981
|
+
UnsupportedMediaType: 415,
|
|
1982
|
+
RangeNotSatisfiable: 416,
|
|
1983
|
+
ExpectationFailed: 417,
|
|
1984
|
+
ImATeapot: 418,
|
|
1985
|
+
MisdirectedRequest: 421,
|
|
1986
|
+
UnprocessableEntity: 422,
|
|
1987
|
+
Locked: 423,
|
|
1988
|
+
FailedDependency: 424,
|
|
1989
|
+
TooEarly: 425,
|
|
1990
|
+
UpgradeRequired: 426,
|
|
1991
|
+
PreconditionRequired: 428,
|
|
1992
|
+
TooManyRequests: 429,
|
|
1993
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1994
|
+
UnavailableForLegalReasons: 451,
|
|
1995
|
+
InternalServerError: 500,
|
|
1996
|
+
NotImplemented: 501,
|
|
1997
|
+
BadGateway: 502,
|
|
1998
|
+
ServiceUnavailable: 503,
|
|
1999
|
+
GatewayTimeout: 504,
|
|
2000
|
+
HttpVersionNotSupported: 505,
|
|
2001
|
+
VariantAlsoNegotiates: 506,
|
|
2002
|
+
InsufficientStorage: 507,
|
|
2003
|
+
LoopDetected: 508,
|
|
2004
|
+
NotExtended: 510,
|
|
2005
|
+
NetworkAuthenticationRequired: 511,
|
|
2006
|
+
WebServerIsDown: 521,
|
|
2007
|
+
ConnectionTimedOut: 522,
|
|
2008
|
+
OriginIsUnreachable: 523,
|
|
2009
|
+
TimeoutOccurred: 524,
|
|
2010
|
+
SslHandshakeFailed: 525,
|
|
2011
|
+
InvalidSslCertificate: 526
|
|
2012
|
+
};
|
|
2013
|
+
Object.entries(sr).forEach(([r, e]) => {
|
|
2014
|
+
sr[e] = r;
|
|
2015
|
+
});
|
|
2016
|
+
function Tt(r) {
|
|
2017
|
+
const e = new oe(r), t = nt(oe.prototype.request, e);
|
|
2018
|
+
return c.extend(t, oe.prototype, e, { allOwnKeys: !0 }), c.extend(t, e, null, { allOwnKeys: !0 }), t.create = function(s) {
|
|
2019
|
+
return Tt(ie(r, s));
|
|
2020
|
+
}, t;
|
|
2021
|
+
}
|
|
2022
|
+
const L = Tt(Re);
|
|
2023
|
+
L.Axios = oe;
|
|
2024
|
+
L.CanceledError = ke;
|
|
2025
|
+
L.CancelToken = ds;
|
|
2026
|
+
L.isCancel = St;
|
|
2027
|
+
L.VERSION = Ot;
|
|
2028
|
+
L.toFormData = Me;
|
|
2029
|
+
L.AxiosError = P;
|
|
2030
|
+
L.Cancel = L.CanceledError;
|
|
2031
|
+
L.all = function(e) {
|
|
2032
|
+
return Promise.all(e);
|
|
2033
|
+
};
|
|
2034
|
+
L.spread = fs;
|
|
2035
|
+
L.isAxiosError = ps;
|
|
2036
|
+
L.mergeConfig = ie;
|
|
2037
|
+
L.AxiosHeaders = $;
|
|
2038
|
+
L.formToJSON = (r) => vt(c.isHTMLForm(r) ? new FormData(r) : r);
|
|
2039
|
+
L.getAdapter = Et.getAdapter;
|
|
2040
|
+
L.HttpStatusCode = sr;
|
|
2041
|
+
L.default = L;
|
|
2042
|
+
const {
|
|
2043
|
+
Axios: io,
|
|
2044
|
+
AxiosError: ao,
|
|
2045
|
+
CanceledError: co,
|
|
2046
|
+
isCancel: uo,
|
|
2047
|
+
CancelToken: lo,
|
|
2048
|
+
VERSION: fo,
|
|
2049
|
+
all: po,
|
|
2050
|
+
Cancel: ho,
|
|
2051
|
+
isAxiosError: vo,
|
|
2052
|
+
spread: So,
|
|
2053
|
+
toFormData: mo,
|
|
2054
|
+
AxiosHeaders: bo,
|
|
2055
|
+
HttpStatusCode: yo,
|
|
2056
|
+
formToJSON: go,
|
|
2057
|
+
getAdapter: Eo,
|
|
2058
|
+
mergeConfig: Oo
|
|
2059
|
+
} = L;
|
|
2060
|
+
async function w(r) {
|
|
2061
|
+
var e, t, n;
|
|
2062
|
+
try {
|
|
2063
|
+
let s = r.endpoint;
|
|
2064
|
+
s.startsWith("/") || (s = "/" + s);
|
|
2065
|
+
const o = await L({
|
|
2066
|
+
url: `https://api.webdock.io/v1${s}`,
|
|
2067
|
+
method: r.method,
|
|
2068
|
+
headers: {
|
|
2069
|
+
Authorization: `Bearer ${r.token}`,
|
|
2070
|
+
"Content-Type": "application/json",
|
|
2071
|
+
"Cache-Control": "no-cache, no-store, must-revalidate"
|
|
2072
|
+
},
|
|
2073
|
+
data: r.body,
|
|
2074
|
+
family: 4
|
|
2075
|
+
}), i = {};
|
|
2076
|
+
return (r.headers ?? []).forEach((a) => {
|
|
2077
|
+
var b;
|
|
2078
|
+
a && (i[a] = (b = o.headers) == null ? void 0 : b[a ?? ""]);
|
|
2079
|
+
}), {
|
|
2080
|
+
success: !0,
|
|
2081
|
+
response: {
|
|
2082
|
+
body: o.data,
|
|
2083
|
+
headers: i
|
|
2084
|
+
}
|
|
2085
|
+
};
|
|
2086
|
+
} catch (s) {
|
|
2087
|
+
const o = s;
|
|
2088
|
+
return {
|
|
2089
|
+
success: !1,
|
|
2090
|
+
error: ((t = (e = o.response) == null ? void 0 : e.data) == null ? void 0 : t.message) ?? "Unknown error",
|
|
2091
|
+
errorType: o.response ? "server" : "network",
|
|
2092
|
+
code: ((n = o.response) == null ? void 0 : n.status) || 0
|
|
2093
|
+
};
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
class hs {
|
|
2097
|
+
constructor(e) {
|
|
2098
|
+
this.parent = e;
|
|
2099
|
+
}
|
|
2100
|
+
async info() {
|
|
2101
|
+
return await w({
|
|
2102
|
+
token: this.parent.string_token,
|
|
2103
|
+
endpoint: "/account/accountInformation",
|
|
2104
|
+
headers: [],
|
|
2105
|
+
method: "GET"
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
class vs {
|
|
2110
|
+
constructor(e) {
|
|
2111
|
+
this.parent = e;
|
|
2112
|
+
}
|
|
2113
|
+
async list({ page: e = 1, limit: t = 10, type: n = "" }) {
|
|
2114
|
+
let s = "/events";
|
|
2115
|
+
const o = [];
|
|
2116
|
+
return e && o.push(`page=${e}`), t && o.push(`per_page=${t}`), n && o.push(`eventType=${n}`), o.length > 0 && (s += `?${o.join("&")}`), await w({
|
|
2117
|
+
token: this.parent.string_token,
|
|
2118
|
+
endpoint: s,
|
|
2119
|
+
headers: ["x-total-count"],
|
|
2120
|
+
method: "GET"
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
class Ss {
|
|
2125
|
+
constructor(e) {
|
|
2126
|
+
this.parent = e;
|
|
2127
|
+
}
|
|
2128
|
+
async getById({
|
|
2129
|
+
id: e
|
|
2130
|
+
}) {
|
|
2131
|
+
return await w(
|
|
2132
|
+
{
|
|
2133
|
+
endpoint: `hooks/${e}`,
|
|
2134
|
+
method: "GET",
|
|
2135
|
+
token: this.parent.string_token
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
async create({
|
|
2140
|
+
callbackUrl: e,
|
|
2141
|
+
eventType: t,
|
|
2142
|
+
callbackId: n
|
|
2143
|
+
}) {
|
|
2144
|
+
return await w(
|
|
2145
|
+
{
|
|
2146
|
+
endpoint: "/hooks",
|
|
2147
|
+
method: "POST",
|
|
2148
|
+
token: this.parent.string_token,
|
|
2149
|
+
body: {
|
|
2150
|
+
callbackUrl: e,
|
|
2151
|
+
callbackId: n,
|
|
2152
|
+
eventType: t
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
);
|
|
2156
|
+
}
|
|
2157
|
+
async deleteById({ id: e }) {
|
|
2158
|
+
return await w(
|
|
2159
|
+
{
|
|
2160
|
+
endpoint: `hooks/${e}`,
|
|
2161
|
+
method: "DELETE",
|
|
2162
|
+
token: this.parent.string_token
|
|
2163
|
+
}
|
|
2164
|
+
);
|
|
2165
|
+
}
|
|
2166
|
+
async list() {
|
|
2167
|
+
return await w(
|
|
2168
|
+
{
|
|
2169
|
+
token: this.parent.string_token,
|
|
2170
|
+
endpoint: "/hooks",
|
|
2171
|
+
method: "GET"
|
|
2172
|
+
}
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
}
|
|
2176
|
+
class ms {
|
|
2177
|
+
constructor(e) {
|
|
2178
|
+
this.parent = e;
|
|
2179
|
+
}
|
|
2180
|
+
async list() {
|
|
2181
|
+
return await w({
|
|
2182
|
+
token: this.parent.string_token,
|
|
2183
|
+
endpoint: "/images",
|
|
2184
|
+
headers: [],
|
|
2185
|
+
method: "GET"
|
|
2186
|
+
});
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
class bs {
|
|
2190
|
+
constructor(e) {
|
|
2191
|
+
this.parent = e;
|
|
2192
|
+
}
|
|
2193
|
+
async list() {
|
|
2194
|
+
return await w({
|
|
2195
|
+
token: this.parent.string_token,
|
|
2196
|
+
endpoint: "/locations",
|
|
2197
|
+
method: "GET"
|
|
2198
|
+
});
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
class ys {
|
|
2202
|
+
constructor(e) {
|
|
2203
|
+
this.parent = e;
|
|
2204
|
+
}
|
|
2205
|
+
async list({
|
|
2206
|
+
locationId: e = "dk",
|
|
2207
|
+
profileSlug: t = ""
|
|
2208
|
+
}) {
|
|
2209
|
+
const n = await w({
|
|
2210
|
+
token: this.parent.string_token,
|
|
2211
|
+
endpoint: `/profiles?locationId=${e}&profileSlug=${t}`,
|
|
2212
|
+
method: "GET"
|
|
2213
|
+
});
|
|
2214
|
+
return n.success == !0 && !(n.response.body instanceof Array) && (n.response.body = [n.response.body]), n;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
class gs {
|
|
2218
|
+
constructor(e) {
|
|
2219
|
+
this.parent = e;
|
|
2220
|
+
}
|
|
2221
|
+
create({ content: e, filename: t, name: n }) {
|
|
2222
|
+
return w(
|
|
2223
|
+
{
|
|
2224
|
+
token: this.parent.string_token,
|
|
2225
|
+
endpoint: "/account/scripts",
|
|
2226
|
+
method: "POST",
|
|
2227
|
+
body: {
|
|
2228
|
+
content: e,
|
|
2229
|
+
filename: t,
|
|
2230
|
+
name: n
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
);
|
|
2234
|
+
}
|
|
2235
|
+
createOnServer({
|
|
2236
|
+
scriptId: e,
|
|
2237
|
+
path: t,
|
|
2238
|
+
makeScriptExecutable: n,
|
|
2239
|
+
executeImmediately: s,
|
|
2240
|
+
serverSlug: o
|
|
2241
|
+
}) {
|
|
2242
|
+
return w(
|
|
2243
|
+
{
|
|
2244
|
+
token: this.parent.string_token,
|
|
2245
|
+
endpoint: `/servers/${o}/scripts`,
|
|
2246
|
+
method: "POST",
|
|
2247
|
+
body: {
|
|
2248
|
+
scriptId: e,
|
|
2249
|
+
path: t,
|
|
2250
|
+
makeScriptExecutable: n,
|
|
2251
|
+
executeImmediately: s
|
|
2252
|
+
},
|
|
2253
|
+
headers: ["x-callback-id"]
|
|
2254
|
+
}
|
|
2255
|
+
);
|
|
2256
|
+
}
|
|
2257
|
+
delete({ id: e }) {
|
|
2258
|
+
return w(
|
|
2259
|
+
{
|
|
2260
|
+
token: this.parent.string_token,
|
|
2261
|
+
endpoint: `/account/scripts/${e}`,
|
|
2262
|
+
method: "DELETE"
|
|
2263
|
+
}
|
|
2264
|
+
);
|
|
2265
|
+
}
|
|
2266
|
+
deleteScriptFromServer({ serverSlug: e, scriptId: t }) {
|
|
2267
|
+
return w(
|
|
2268
|
+
{
|
|
2269
|
+
token: this.parent.string_token,
|
|
2270
|
+
endpoint: `/servers/${e}/scripts/${t}`,
|
|
2271
|
+
method: "DELETE"
|
|
2272
|
+
}
|
|
2273
|
+
);
|
|
2274
|
+
}
|
|
2275
|
+
executeOnServer({ serverSlug: e, scriptID: t }) {
|
|
2276
|
+
return w(
|
|
2277
|
+
{
|
|
2278
|
+
token: this.parent.string_token,
|
|
2279
|
+
endpoint: `/servers/${e}/scripts/${t}/execute`,
|
|
2280
|
+
method: "POST",
|
|
2281
|
+
headers: ["x-callback-id"]
|
|
2282
|
+
}
|
|
2283
|
+
);
|
|
2284
|
+
}
|
|
2285
|
+
getById({ scriptId: e }) {
|
|
2286
|
+
return w(
|
|
2287
|
+
{
|
|
2288
|
+
token: this.parent.string_token,
|
|
2289
|
+
endpoint: `/account/scripts/${e}`,
|
|
2290
|
+
method: "GET"
|
|
2291
|
+
}
|
|
2292
|
+
);
|
|
2293
|
+
}
|
|
2294
|
+
list(e) {
|
|
2295
|
+
return w({
|
|
2296
|
+
token: this.parent.string_token,
|
|
2297
|
+
endpoint: "/account/scripts",
|
|
2298
|
+
method: "GET"
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
listOnServer({ serverSlug: e }) {
|
|
2302
|
+
return w(
|
|
2303
|
+
{
|
|
2304
|
+
token: this.parent.string_token,
|
|
2305
|
+
endpoint: `/servers/${e}/scripts`,
|
|
2306
|
+
method: "GET"
|
|
2307
|
+
}
|
|
2308
|
+
);
|
|
2309
|
+
}
|
|
2310
|
+
update({
|
|
2311
|
+
id: e,
|
|
2312
|
+
name: t,
|
|
2313
|
+
filename: n,
|
|
2314
|
+
content: s
|
|
2315
|
+
}) {
|
|
2316
|
+
return w(
|
|
2317
|
+
{
|
|
2318
|
+
token: this.parent.string_token,
|
|
2319
|
+
endpoint: `/account/scripts/${e}`,
|
|
2320
|
+
method: "PATCH",
|
|
2321
|
+
body: {
|
|
2322
|
+
name: t,
|
|
2323
|
+
filename: n,
|
|
2324
|
+
content: s
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
class Es {
|
|
2331
|
+
constructor(e) {
|
|
2332
|
+
this.parent = e;
|
|
2333
|
+
}
|
|
2334
|
+
create({
|
|
2335
|
+
name: e,
|
|
2336
|
+
locationId: t,
|
|
2337
|
+
profileSlug: n,
|
|
2338
|
+
imageSlug: s,
|
|
2339
|
+
virtualization: o,
|
|
2340
|
+
snapshotId: i,
|
|
2341
|
+
userScriptId: a,
|
|
2342
|
+
slug: b
|
|
2343
|
+
}) {
|
|
2344
|
+
return w(
|
|
2345
|
+
{
|
|
2346
|
+
token: this.parent.string_token,
|
|
2347
|
+
endpoint: "/servers",
|
|
2348
|
+
method: "POST",
|
|
2349
|
+
body: {
|
|
2350
|
+
name: e,
|
|
2351
|
+
locationId: t,
|
|
2352
|
+
profileSlug: n,
|
|
2353
|
+
imageSlug: s,
|
|
2354
|
+
virtualization: o,
|
|
2355
|
+
snapshotId: i,
|
|
2356
|
+
userScriptId: a,
|
|
2357
|
+
slug: b
|
|
2358
|
+
},
|
|
2359
|
+
headers: ["x-callback-id"]
|
|
2360
|
+
}
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
delete({ serverSlug: e }) {
|
|
2364
|
+
return w(
|
|
2365
|
+
{
|
|
2366
|
+
token: this.parent.string_token,
|
|
2367
|
+
endpoint: `/servers/${e}`,
|
|
2368
|
+
method: "DELETE",
|
|
2369
|
+
headers: ["x-callback-id"]
|
|
2370
|
+
}
|
|
2371
|
+
);
|
|
2372
|
+
}
|
|
2373
|
+
async fetchFile({
|
|
2374
|
+
path: e,
|
|
2375
|
+
slug: t
|
|
2376
|
+
}) {
|
|
2377
|
+
const n = await w(
|
|
2378
|
+
{
|
|
2379
|
+
endpoint: `servers/${t}/fetchFile`,
|
|
2380
|
+
method: "POST",
|
|
2381
|
+
token: this.parent.string_token,
|
|
2382
|
+
body: {
|
|
2383
|
+
filePath: e
|
|
2384
|
+
},
|
|
2385
|
+
headers: ["x-callback-id"]
|
|
2386
|
+
}
|
|
2387
|
+
);
|
|
2388
|
+
if (!n.success) return {
|
|
2389
|
+
success: !1,
|
|
2390
|
+
message: `Failed to initiate file fetch for '${e}' on server '${t}'`
|
|
2391
|
+
};
|
|
2392
|
+
const s = n.response.headers["x-callback-id"];
|
|
2393
|
+
let o = await this.parent.operation.fetch(s);
|
|
2394
|
+
if (!o.success) return {
|
|
2395
|
+
success: !1,
|
|
2396
|
+
message: `Failed to retrieve operation status (callback ID: ${s})`
|
|
2397
|
+
};
|
|
2398
|
+
for (; ; ) {
|
|
2399
|
+
let i = o.response.body[0];
|
|
2400
|
+
if (i.status === "finished")
|
|
2401
|
+
return {
|
|
2402
|
+
success: !0,
|
|
2403
|
+
content: i.message
|
|
2404
|
+
};
|
|
2405
|
+
if (i.status === "error")
|
|
2406
|
+
return {
|
|
2407
|
+
success: !1,
|
|
2408
|
+
message: `File fetch failed for '${e}': ${i.message}`
|
|
2409
|
+
};
|
|
2410
|
+
if (await new Promise((a) => setTimeout(a, 3e3)), o = await this.parent.operation.fetch(s), !o.success) return {
|
|
2411
|
+
success: !1,
|
|
2412
|
+
message: `Lost connection to operation (callback ID: ${s}) while fetching '${e}'`
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
}
|
|
2416
|
+
getBySlug({ serverSlang: e }) {
|
|
2417
|
+
return w({
|
|
2418
|
+
token: this.parent.string_token,
|
|
2419
|
+
endpoint: `/servers/${e}`,
|
|
2420
|
+
method: "GET"
|
|
2421
|
+
});
|
|
2422
|
+
}
|
|
2423
|
+
list() {
|
|
2424
|
+
return w({
|
|
2425
|
+
token: this.parent.string_token,
|
|
2426
|
+
endpoint: "/servers",
|
|
2427
|
+
method: "GET"
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
metrics({ now: e, serverSlug: t }) {
|
|
2431
|
+
return w(
|
|
2432
|
+
{
|
|
2433
|
+
endpoint: `servers/${t}/metrics${e ? "/now" : ""}`,
|
|
2434
|
+
method: "GET",
|
|
2435
|
+
token: this.parent.string_token
|
|
2436
|
+
}
|
|
2437
|
+
);
|
|
2438
|
+
}
|
|
2439
|
+
reboot({
|
|
2440
|
+
serverSlug: e
|
|
2441
|
+
}) {
|
|
2442
|
+
return w(
|
|
2443
|
+
{
|
|
2444
|
+
token: this.parent.string_token,
|
|
2445
|
+
endpoint: `/servers/${e}/actions/reboot`,
|
|
2446
|
+
method: "POST",
|
|
2447
|
+
headers: ["x-callback-id"]
|
|
2448
|
+
}
|
|
2449
|
+
);
|
|
2450
|
+
}
|
|
2451
|
+
reinstall({ imageSlug: e, serverSlug: t, userScriptId: n, deleteSnapshots: s }) {
|
|
2452
|
+
return w(
|
|
2453
|
+
{
|
|
2454
|
+
token: this.parent.string_token,
|
|
2455
|
+
endpoint: `/servers/${t}/actions/reinstall`,
|
|
2456
|
+
method: "POST",
|
|
2457
|
+
body: {
|
|
2458
|
+
imageSlug: e,
|
|
2459
|
+
serverSlug: t,
|
|
2460
|
+
userScriptId: n,
|
|
2461
|
+
deleteSnapshots: s
|
|
2462
|
+
},
|
|
2463
|
+
headers: ["x-callback-id"]
|
|
2464
|
+
}
|
|
2465
|
+
);
|
|
2466
|
+
}
|
|
2467
|
+
resize({ serverSlug: e, profileSlug: t }) {
|
|
2468
|
+
return w({
|
|
2469
|
+
token: this.parent.string_token,
|
|
2470
|
+
endpoint: `/servers/${e}/actions/resize`,
|
|
2471
|
+
method: "POST",
|
|
2472
|
+
body: { profileSlug: t },
|
|
2473
|
+
headers: ["x-callback-id"]
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2476
|
+
resizeDryRun({ serverSlug: e, profileSlug: t }) {
|
|
2477
|
+
return w({
|
|
2478
|
+
token: this.parent.string_token,
|
|
2479
|
+
endpoint: `/servers/${e}/actions/resize/dryrun`,
|
|
2480
|
+
method: "POST",
|
|
2481
|
+
body: { profileSlug: t }
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
start({ serverSlug: e }) {
|
|
2485
|
+
return w({
|
|
2486
|
+
token: this.parent.string_token,
|
|
2487
|
+
endpoint: `/servers/${e}/actions/start`,
|
|
2488
|
+
method: "POST",
|
|
2489
|
+
headers: ["x-callback-id"]
|
|
2490
|
+
});
|
|
2491
|
+
}
|
|
2492
|
+
stop({ serverSlug: e }) {
|
|
2493
|
+
return w({
|
|
2494
|
+
token: this.parent.string_token,
|
|
2495
|
+
endpoint: `/servers/${e}/actions/stop`,
|
|
2496
|
+
method: "POST",
|
|
2497
|
+
headers: ["x-callback-id"]
|
|
2498
|
+
});
|
|
2499
|
+
}
|
|
2500
|
+
archive({ serverSlug: e }) {
|
|
2501
|
+
return w({
|
|
2502
|
+
token: this.parent.string_token,
|
|
2503
|
+
endpoint: `/servers/${e}/actions/suspend`,
|
|
2504
|
+
method: "POST",
|
|
2505
|
+
headers: ["x-callback-id"]
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
update({ serverSlug: e, nextActionDate: t, name: n, description: s, notes: o }) {
|
|
2509
|
+
return w({
|
|
2510
|
+
token: this.parent.string_token,
|
|
2511
|
+
endpoint: `/servers/${e}`,
|
|
2512
|
+
method: "PATCH",
|
|
2513
|
+
body: { nextActionDate: t, name: n, description: s, notes: o }
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2517
|
+
class Os {
|
|
2518
|
+
constructor(e) {
|
|
2519
|
+
this.parent = e;
|
|
2520
|
+
}
|
|
2521
|
+
create({ serverSlug: e, username: t, password: n, group: s, shell: o, publicKeys: i }) {
|
|
2522
|
+
return w({
|
|
2523
|
+
token: this.parent.string_token,
|
|
2524
|
+
endpoint: `servers/${e}/shellUsers`,
|
|
2525
|
+
method: "POST",
|
|
2526
|
+
body: {
|
|
2527
|
+
username: t,
|
|
2528
|
+
password: n,
|
|
2529
|
+
group: s,
|
|
2530
|
+
shell: o,
|
|
2531
|
+
publicKeys: i ?? []
|
|
2532
|
+
},
|
|
2533
|
+
headers: ["x-callback-id"]
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
delete({ serverSlug: e, userId: t }) {
|
|
2537
|
+
return w({
|
|
2538
|
+
token: this.parent.string_token,
|
|
2539
|
+
endpoint: `servers/${e}/shellUsers/${t}`,
|
|
2540
|
+
method: "DELETE",
|
|
2541
|
+
headers: ["x-callback-id"]
|
|
2542
|
+
});
|
|
2543
|
+
}
|
|
2544
|
+
list({ serverSlug: e }) {
|
|
2545
|
+
return w({
|
|
2546
|
+
token: this.parent.string_token,
|
|
2547
|
+
endpoint: `/servers/${e}/shellUsers`,
|
|
2548
|
+
method: "GET"
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
edit({ slug: e, id: t, keys: n }) {
|
|
2552
|
+
return w({
|
|
2553
|
+
endpoint: `servers/${e}/shellUsers/${t}`,
|
|
2554
|
+
method: "PATCH",
|
|
2555
|
+
body: {
|
|
2556
|
+
publicKeys: n
|
|
2557
|
+
},
|
|
2558
|
+
headers: ["x-callback-id"],
|
|
2559
|
+
token: this.parent.string_token
|
|
2560
|
+
});
|
|
2561
|
+
}
|
|
2562
|
+
websshToken({ serverSlug: e, username: t }) {
|
|
2563
|
+
return w(
|
|
2564
|
+
{
|
|
2565
|
+
endpoint: `servers/${e}/shellUsers/WebsshToken`,
|
|
2566
|
+
method: "POST",
|
|
2567
|
+
token: this.parent.string_token,
|
|
2568
|
+
body: {
|
|
2569
|
+
username: t
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
);
|
|
2573
|
+
}
|
|
2574
|
+
}
|
|
2575
|
+
class _s {
|
|
2576
|
+
constructor(e) {
|
|
2577
|
+
this.parent = e;
|
|
2578
|
+
}
|
|
2579
|
+
create({ name: e, publicKey: t }) {
|
|
2580
|
+
return w({
|
|
2581
|
+
token: this.parent.string_token,
|
|
2582
|
+
endpoint: "/account/publicKeys",
|
|
2583
|
+
method: "POST",
|
|
2584
|
+
body: {
|
|
2585
|
+
name: e,
|
|
2586
|
+
publicKey: t
|
|
2587
|
+
}
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
delete({ id: e }) {
|
|
2591
|
+
return w({
|
|
2592
|
+
token: this.parent.string_token,
|
|
2593
|
+
endpoint: `/account/publicKeys/${e}`,
|
|
2594
|
+
method: "DELETE"
|
|
2595
|
+
});
|
|
2596
|
+
}
|
|
2597
|
+
list() {
|
|
2598
|
+
return w({
|
|
2599
|
+
token: this.parent.string_token,
|
|
2600
|
+
endpoint: "/account/publicKeys",
|
|
2601
|
+
method: "GET"
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
toggleSSHSettings(e) {
|
|
2605
|
+
return w({
|
|
2606
|
+
token: e.token || this.parent.string_token,
|
|
2607
|
+
endpoint: `/servers/${e.serverSlug}/sshSettings`,
|
|
2608
|
+
headers: ["x-callback-id"],
|
|
2609
|
+
method: "POST",
|
|
2610
|
+
body: {
|
|
2611
|
+
passwordSshAuthEnabled: e.passwordSshAuthEnabled,
|
|
2612
|
+
passwordlessSudoEnabled: e.passwordSshAuthEnabled,
|
|
2613
|
+
sshPort: e.sshPort
|
|
2614
|
+
}
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
class Ts {
|
|
2619
|
+
constructor(e) {
|
|
2620
|
+
this.parent = e;
|
|
2621
|
+
}
|
|
2622
|
+
create({
|
|
2623
|
+
serverSlug: e,
|
|
2624
|
+
name: t
|
|
2625
|
+
}) {
|
|
2626
|
+
return w({
|
|
2627
|
+
token: this.parent.string_token,
|
|
2628
|
+
endpoint: `/servers/${e}/snapshots`,
|
|
2629
|
+
method: "POST",
|
|
2630
|
+
body: {
|
|
2631
|
+
name: t
|
|
2632
|
+
},
|
|
2633
|
+
headers: ["x-callback-id"]
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
list({
|
|
2637
|
+
serverSlug: e
|
|
2638
|
+
}) {
|
|
2639
|
+
return w({
|
|
2640
|
+
token: this.parent.string_token,
|
|
2641
|
+
endpoint: `/servers/${e}/snapshots`,
|
|
2642
|
+
method: "GET"
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
delete({
|
|
2646
|
+
serverSlug: e,
|
|
2647
|
+
snapshotId: t
|
|
2648
|
+
}) {
|
|
2649
|
+
return w({
|
|
2650
|
+
token: this.parent.string_token,
|
|
2651
|
+
endpoint: `/servers/${e}/snapshots/${t}`,
|
|
2652
|
+
method: "DELETE",
|
|
2653
|
+
headers: ["x-callback-id"]
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
restore({
|
|
2657
|
+
serverSlug: e,
|
|
2658
|
+
snapshotId: t
|
|
2659
|
+
}) {
|
|
2660
|
+
return w({
|
|
2661
|
+
token: this.parent.string_token,
|
|
2662
|
+
endpoint: `/servers/${e}/actions/restore`,
|
|
2663
|
+
method: "POST",
|
|
2664
|
+
headers: ["x-callback-id"],
|
|
2665
|
+
body: {
|
|
2666
|
+
snapshotId: t
|
|
2667
|
+
}
|
|
2668
|
+
});
|
|
2669
|
+
}
|
|
2670
|
+
}
|
|
2671
|
+
var Ke = {}, ne = {}, Rr;
|
|
2672
|
+
function Pt() {
|
|
2673
|
+
if (Rr) return ne;
|
|
2674
|
+
Rr = 1;
|
|
2675
|
+
var r = ne && ne.__extends || /* @__PURE__ */ (function() {
|
|
2676
|
+
var t = function(n, s) {
|
|
2677
|
+
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(o, i) {
|
|
2678
|
+
o.__proto__ = i;
|
|
2679
|
+
} || function(o, i) {
|
|
2680
|
+
for (var a in i) Object.prototype.hasOwnProperty.call(i, a) && (o[a] = i[a]);
|
|
2681
|
+
}, t(n, s);
|
|
2682
|
+
};
|
|
2683
|
+
return function(n, s) {
|
|
2684
|
+
if (typeof s != "function" && s !== null)
|
|
2685
|
+
throw new TypeError("Class extends value " + String(s) + " is not a constructor or null");
|
|
2686
|
+
t(n, s);
|
|
2687
|
+
function o() {
|
|
2688
|
+
this.constructor = n;
|
|
2689
|
+
}
|
|
2690
|
+
n.prototype = s === null ? Object.create(s) : (o.prototype = s.prototype, new o());
|
|
2691
|
+
};
|
|
2692
|
+
})();
|
|
2693
|
+
Object.defineProperty(ne, "__esModule", { value: !0 }), ne.ApiError = void 0;
|
|
2694
|
+
var e = (
|
|
2695
|
+
/** @class */
|
|
2696
|
+
(function(t) {
|
|
2697
|
+
r(n, t);
|
|
2698
|
+
function n(s, o, i) {
|
|
2699
|
+
var a = t.call(this, i) || this;
|
|
2700
|
+
return a.name = "ApiError", a.url = o.url, a.status = o.status, a.statusText = o.statusText, a.body = o.body, a.request = s, a;
|
|
2701
|
+
}
|
|
2702
|
+
return n;
|
|
2703
|
+
})(Error)
|
|
2704
|
+
);
|
|
2705
|
+
return ne.ApiError = e, ne;
|
|
2706
|
+
}
|
|
2707
|
+
var ee = {}, kr;
|
|
2708
|
+
function wt() {
|
|
2709
|
+
if (kr) return ee;
|
|
2710
|
+
kr = 1;
|
|
2711
|
+
var r = ee && ee.__extends || /* @__PURE__ */ (function() {
|
|
2712
|
+
var n = function(s, o) {
|
|
2713
|
+
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, a) {
|
|
2714
|
+
i.__proto__ = a;
|
|
2715
|
+
} || function(i, a) {
|
|
2716
|
+
for (var b in a) Object.prototype.hasOwnProperty.call(a, b) && (i[b] = a[b]);
|
|
2717
|
+
}, n(s, o);
|
|
2718
|
+
};
|
|
2719
|
+
return function(s, o) {
|
|
2720
|
+
if (typeof o != "function" && o !== null)
|
|
2721
|
+
throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
|
|
2722
|
+
n(s, o);
|
|
2723
|
+
function i() {
|
|
2724
|
+
this.constructor = s;
|
|
2725
|
+
}
|
|
2726
|
+
s.prototype = o === null ? Object.create(o) : (i.prototype = o.prototype, new i());
|
|
2727
|
+
};
|
|
2728
|
+
})();
|
|
2729
|
+
Object.defineProperty(ee, "__esModule", { value: !0 }), ee.CancelablePromise = ee.CancelError = void 0;
|
|
2730
|
+
var e = (
|
|
2731
|
+
/** @class */
|
|
2732
|
+
(function(n) {
|
|
2733
|
+
r(s, n);
|
|
2734
|
+
function s(o) {
|
|
2735
|
+
var i = n.call(this, o) || this;
|
|
2736
|
+
return i.name = "CancelError", i;
|
|
2737
|
+
}
|
|
2738
|
+
return Object.defineProperty(s.prototype, "isCancelled", {
|
|
2739
|
+
get: function() {
|
|
2740
|
+
return !0;
|
|
2741
|
+
},
|
|
2742
|
+
enumerable: !1,
|
|
2743
|
+
configurable: !0
|
|
2744
|
+
}), s;
|
|
2745
|
+
})(Error)
|
|
2746
|
+
);
|
|
2747
|
+
ee.CancelError = e;
|
|
2748
|
+
var t = (
|
|
2749
|
+
/** @class */
|
|
2750
|
+
(function() {
|
|
2751
|
+
function n(s) {
|
|
2752
|
+
var o = this;
|
|
2753
|
+
this._isResolved = !1, this._isRejected = !1, this._isCancelled = !1, this._cancelHandlers = [], this._promise = new Promise(function(i, a) {
|
|
2754
|
+
o._resolve = i, o._reject = a;
|
|
2755
|
+
var b = function(E) {
|
|
2756
|
+
var A;
|
|
2757
|
+
o._isResolved || o._isRejected || o._isCancelled || (o._isResolved = !0, (A = o._resolve) === null || A === void 0 || A.call(o, E));
|
|
2758
|
+
}, m = function(E) {
|
|
2759
|
+
var A;
|
|
2760
|
+
o._isResolved || o._isRejected || o._isCancelled || (o._isRejected = !0, (A = o._reject) === null || A === void 0 || A.call(o, E));
|
|
2761
|
+
}, f = function(E) {
|
|
2762
|
+
o._isResolved || o._isRejected || o._isCancelled || o._cancelHandlers.push(E);
|
|
2763
|
+
};
|
|
2764
|
+
return Object.defineProperty(f, "isResolved", {
|
|
2765
|
+
get: function() {
|
|
2766
|
+
return o._isResolved;
|
|
2767
|
+
}
|
|
2768
|
+
}), Object.defineProperty(f, "isRejected", {
|
|
2769
|
+
get: function() {
|
|
2770
|
+
return o._isRejected;
|
|
2771
|
+
}
|
|
2772
|
+
}), Object.defineProperty(f, "isCancelled", {
|
|
2773
|
+
get: function() {
|
|
2774
|
+
return o._isCancelled;
|
|
2775
|
+
}
|
|
2776
|
+
}), s(b, m, f);
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
return n.prototype.then = function(s, o) {
|
|
2780
|
+
return this._promise.then(s, o);
|
|
2781
|
+
}, n.prototype.catch = function(s) {
|
|
2782
|
+
return this._promise.catch(s);
|
|
2783
|
+
}, n.prototype.finally = function(s) {
|
|
2784
|
+
return this._promise.finally(s);
|
|
2785
|
+
}, n.prototype.cancel = function() {
|
|
2786
|
+
var s;
|
|
2787
|
+
if (!(this._isResolved || this._isRejected || this._isCancelled)) {
|
|
2788
|
+
if (this._isCancelled = !0, this._cancelHandlers.length)
|
|
2789
|
+
try {
|
|
2790
|
+
for (var o = 0, i = this._cancelHandlers; o < i.length; o++) {
|
|
2791
|
+
var a = i[o];
|
|
2792
|
+
a();
|
|
2793
|
+
}
|
|
2794
|
+
} catch (b) {
|
|
2795
|
+
console.warn("Cancellation threw an error", b);
|
|
2796
|
+
return;
|
|
2797
|
+
}
|
|
2798
|
+
this._cancelHandlers.length = 0, (s = this._reject) === null || s === void 0 || s.call(this, new e("Request aborted"));
|
|
2799
|
+
}
|
|
2800
|
+
}, Object.defineProperty(n.prototype, "isCancelled", {
|
|
2801
|
+
get: function() {
|
|
2802
|
+
return this._isCancelled;
|
|
2803
|
+
},
|
|
2804
|
+
enumerable: !1,
|
|
2805
|
+
configurable: !0
|
|
2806
|
+
}), n;
|
|
2807
|
+
})()
|
|
2808
|
+
);
|
|
2809
|
+
return ee.CancelablePromise = t, ee;
|
|
2810
|
+
}
|
|
2811
|
+
var le = {}, Ir;
|
|
2812
|
+
function G() {
|
|
2813
|
+
return Ir || (Ir = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.OpenAPI = void 0, le.OpenAPI = {
|
|
2814
|
+
BASE: "https://api.webdock.io/v1",
|
|
2815
|
+
VERSION: "1.0.1",
|
|
2816
|
+
WITH_CREDENTIALS: !1,
|
|
2817
|
+
CREDENTIALS: "include",
|
|
2818
|
+
TOKEN: void 0,
|
|
2819
|
+
USERNAME: void 0,
|
|
2820
|
+
PASSWORD: void 0,
|
|
2821
|
+
HEADERS: void 0,
|
|
2822
|
+
ENCODE_PATH: void 0
|
|
2823
|
+
}), le;
|
|
2824
|
+
}
|
|
2825
|
+
var $e = {}, Dr;
|
|
2826
|
+
function Ps() {
|
|
2827
|
+
return Dr || (Dr = 1, (function(r) {
|
|
2828
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.CreateEventHookModelDTO = void 0, (function(e) {
|
|
2829
|
+
(function(t) {
|
|
2830
|
+
t.PROVISION = "provision", t.RESTORE_SERVER = "restore-server", t.CHANGE_PROFILE = "change-profile", t.SET_STATE = "set-state", t.DELETE = "delete", t.BACKUP = "backup", t.SET_HOSTNAMES = "set-hostnames", t.UPDATE_WEBROOT = "update-webroot", t.SETUP_SSL = "setup-ssl", t.INSTALL_WORDPRESS = "install-wordpress", t.MANAGE_WORDPRESS = "manage-wordpress", t.MANAGE_SHELLUSER = "manage-shelluser", t.MANAGE_KEYS = "manage-keys", t.TOGGLE_PASSWORDAUTH = "toggle-passwordauth", t.MANAGE_MYSQL = "manage-mysql", t.MANAGE_DBUSER = "manage-dbuser", t.MANAGE_FTPUSER = "manage-ftpuser", t.SET_PHP_SETTINGS = "set-php-settings", t.CRONJOB = "cronjob", t.PULL_FILE = "pull-file", t.PUSH_FILE = "push-file", t.DELETE_FILE = "delete-file", t.EXECUTE_FILE = "execute-file";
|
|
2831
|
+
})(e.eventType || (e.eventType = {}));
|
|
2832
|
+
})(r.CreateEventHookModelDTO || (r.CreateEventHookModelDTO = {}));
|
|
2833
|
+
})($e)), $e;
|
|
2834
|
+
}
|
|
2835
|
+
var ze = {}, Cr;
|
|
2836
|
+
function ws() {
|
|
2837
|
+
return Cr || (Cr = 1, (function(r) {
|
|
2838
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.EventLogDTO = void 0, (function(e) {
|
|
2839
|
+
(function(t) {
|
|
2840
|
+
t.WAITING = "waiting", t.WORKING = "working", t.FINISHED = "finished", t.ERROR = "error";
|
|
2841
|
+
})(e.status || (e.status = {}));
|
|
2842
|
+
})(r.EventLogDTO || (r.EventLogDTO = {}));
|
|
2843
|
+
})(ze)), ze;
|
|
2844
|
+
}
|
|
2845
|
+
var We = {}, qr;
|
|
2846
|
+
function As() {
|
|
2847
|
+
return qr || (qr = 1, (function(r) {
|
|
2848
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.Ping = void 0, (function(e) {
|
|
2849
|
+
(function(t) {
|
|
2850
|
+
t.ROCKS = "rocks";
|
|
2851
|
+
})(e.webdock || (e.webdock = {}));
|
|
2852
|
+
})(r.Ping || (r.Ping = {}));
|
|
2853
|
+
})(We)), We;
|
|
2854
|
+
}
|
|
2855
|
+
var Je = {}, Nr;
|
|
2856
|
+
function Rs() {
|
|
2857
|
+
return Nr || (Nr = 1, (function(r) {
|
|
2858
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.PostServerModelDTO = void 0, (function(e) {
|
|
2859
|
+
(function(t) {
|
|
2860
|
+
t.CONTAINER = "container", t.KVM = "kvm";
|
|
2861
|
+
})(e.virtualization || (e.virtualization = {}));
|
|
2862
|
+
})(r.PostServerModelDTO || (r.PostServerModelDTO = {}));
|
|
2863
|
+
})(Je)), Je;
|
|
2864
|
+
}
|
|
2865
|
+
var Xe = {}, jr;
|
|
2866
|
+
function ks() {
|
|
2867
|
+
return jr || (jr = 1, (function(r) {
|
|
2868
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.PriceDTO = void 0, (function(e) {
|
|
2869
|
+
(function(t) {
|
|
2870
|
+
t.EUR = "EUR", t.DKK = "DKK", t.USD = "USD";
|
|
2871
|
+
})(e.currency || (e.currency = {}));
|
|
2872
|
+
})(r.PriceDTO || (r.PriceDTO = {}));
|
|
2873
|
+
})(Xe)), Xe;
|
|
2874
|
+
}
|
|
2875
|
+
var Ye = {}, Ur;
|
|
2876
|
+
function Is() {
|
|
2877
|
+
return Ur || (Ur = 1, (function(r) {
|
|
2878
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.ServerDTO = void 0, (function(e) {
|
|
2879
|
+
(function(t) {
|
|
2880
|
+
t.PROVISIONING = "provisioning", t.RUNNING = "running", t.STOPPED = "stopped", t.ERROR = "error", t.REBOOTING = "rebooting", t.STARTING = "starting", t.STOPPING = "stopping", t.REINSTALLING = "reinstalling";
|
|
2881
|
+
})(e.status || (e.status = {})), (function(t) {
|
|
2882
|
+
t.CONTAINER = "container", t.KVM = "kvm";
|
|
2883
|
+
})(e.virtualization || (e.virtualization = {})), (function(t) {
|
|
2884
|
+
t.APACHE = "Apache", t.NGINX = "Nginx", t.NONE = "None";
|
|
2885
|
+
})(e.webServer || (e.webServer = {}));
|
|
2886
|
+
})(r.ServerDTO || (r.ServerDTO = {}));
|
|
2887
|
+
})(Ye)), Ye;
|
|
2888
|
+
}
|
|
2889
|
+
var Qe = {}, Fr;
|
|
2890
|
+
function Ds() {
|
|
2891
|
+
return Fr || (Fr = 1, (function(r) {
|
|
2892
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.ServerImageDTO = void 0, (function(e) {
|
|
2893
|
+
(function(t) {
|
|
2894
|
+
t.APACHE = "Apache", t.NGINX = "Nginx";
|
|
2895
|
+
})(e.webServer || (e.webServer = {}));
|
|
2896
|
+
})(r.ServerImageDTO || (r.ServerImageDTO = {}));
|
|
2897
|
+
})(Qe)), Qe;
|
|
2898
|
+
}
|
|
2899
|
+
var Ze = {}, Lr;
|
|
2900
|
+
function Cs() {
|
|
2901
|
+
return Lr || (Lr = 1, (function(r) {
|
|
2902
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.SnapshotDTO = void 0, (function(e) {
|
|
2903
|
+
(function(t) {
|
|
2904
|
+
t.DAILY = "daily", t.WEEKLY = "weekly", t.MONTHLY = "monthly";
|
|
2905
|
+
})(e.type || (e.type = {})), (function(t) {
|
|
2906
|
+
t.CONTAINER = "container", t.KVM = "kvm";
|
|
2907
|
+
})(e.virtualization || (e.virtualization = {}));
|
|
2908
|
+
})(r.SnapshotDTO || (r.SnapshotDTO = {}));
|
|
2909
|
+
})(Ze)), Ze;
|
|
2910
|
+
}
|
|
2911
|
+
var de = {}, x = {}, er, Br;
|
|
2912
|
+
function qs() {
|
|
2913
|
+
return Br || (Br = 1, er = typeof self == "object" ? self.FormData : window.FormData), er;
|
|
2914
|
+
}
|
|
2915
|
+
var Ce = { exports: {} }, Mr;
|
|
2916
|
+
function Ns() {
|
|
2917
|
+
return Mr || (Mr = 1, (function(r, e) {
|
|
2918
|
+
var t = function() {
|
|
2919
|
+
if (typeof self < "u")
|
|
2920
|
+
return self;
|
|
2921
|
+
if (typeof window < "u")
|
|
2922
|
+
return window;
|
|
2923
|
+
if (typeof lr < "u")
|
|
2924
|
+
return lr;
|
|
2925
|
+
throw new Error("unable to locate global object");
|
|
2926
|
+
}, n = t();
|
|
2927
|
+
r.exports = e = n.fetch, n.fetch && (e.default = n.fetch.bind(n)), e.Headers = n.Headers, e.Request = n.Request, e.Response = n.Response;
|
|
2928
|
+
})(Ce, Ce.exports)), Ce.exports;
|
|
2929
|
+
}
|
|
2930
|
+
var Hr;
|
|
2931
|
+
function z() {
|
|
2932
|
+
return Hr || (Hr = 1, (function(r) {
|
|
2933
|
+
var e = x && x.__assign || function() {
|
|
2934
|
+
return e = Object.assign || function(u) {
|
|
2935
|
+
for (var l, v = 1, S = arguments.length; v < S; v++) {
|
|
2936
|
+
l = arguments[v];
|
|
2937
|
+
for (var d in l) Object.prototype.hasOwnProperty.call(l, d) && (u[d] = l[d]);
|
|
2938
|
+
}
|
|
2939
|
+
return u;
|
|
2940
|
+
}, e.apply(this, arguments);
|
|
2941
|
+
}, t = x && x.__createBinding || (Object.create ? (function(u, l, v, S) {
|
|
2942
|
+
S === void 0 && (S = v);
|
|
2943
|
+
var d = Object.getOwnPropertyDescriptor(l, v);
|
|
2944
|
+
(!d || ("get" in d ? !l.__esModule : d.writable || d.configurable)) && (d = { enumerable: !0, get: function() {
|
|
2945
|
+
return l[v];
|
|
2946
|
+
} }), Object.defineProperty(u, S, d);
|
|
2947
|
+
}) : (function(u, l, v, S) {
|
|
2948
|
+
S === void 0 && (S = v), u[S] = l[v];
|
|
2949
|
+
})), n = x && x.__setModuleDefault || (Object.create ? (function(u, l) {
|
|
2950
|
+
Object.defineProperty(u, "default", { enumerable: !0, value: l });
|
|
2951
|
+
}) : function(u, l) {
|
|
2952
|
+
u.default = l;
|
|
2953
|
+
}), s = x && x.__importStar || function(u) {
|
|
2954
|
+
if (u && u.__esModule) return u;
|
|
2955
|
+
var l = {};
|
|
2956
|
+
if (u != null) for (var v in u) v !== "default" && Object.prototype.hasOwnProperty.call(u, v) && t(l, u, v);
|
|
2957
|
+
return n(l, u), l;
|
|
2958
|
+
}, o = x && x.__awaiter || function(u, l, v, S) {
|
|
2959
|
+
function d(p) {
|
|
2960
|
+
return p instanceof v ? p : new v(function(T) {
|
|
2961
|
+
T(p);
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
return new (v || (v = Promise))(function(p, T) {
|
|
2965
|
+
function C(q) {
|
|
2966
|
+
try {
|
|
2967
|
+
_(S.next(q));
|
|
2968
|
+
} catch (U) {
|
|
2969
|
+
T(U);
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
function R(q) {
|
|
2973
|
+
try {
|
|
2974
|
+
_(S.throw(q));
|
|
2975
|
+
} catch (U) {
|
|
2976
|
+
T(U);
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
function _(q) {
|
|
2980
|
+
q.done ? p(q.value) : d(q.value).then(C, R);
|
|
2981
|
+
}
|
|
2982
|
+
_((S = S.apply(u, l || [])).next());
|
|
2983
|
+
});
|
|
2984
|
+
}, i = x && x.__generator || function(u, l) {
|
|
2985
|
+
var v = { label: 0, sent: function() {
|
|
2986
|
+
if (p[0] & 1) throw p[1];
|
|
2987
|
+
return p[1];
|
|
2988
|
+
}, trys: [], ops: [] }, S, d, p, T;
|
|
2989
|
+
return T = { next: C(0), throw: C(1), return: C(2) }, typeof Symbol == "function" && (T[Symbol.iterator] = function() {
|
|
2990
|
+
return this;
|
|
2991
|
+
}), T;
|
|
2992
|
+
function C(_) {
|
|
2993
|
+
return function(q) {
|
|
2994
|
+
return R([_, q]);
|
|
2995
|
+
};
|
|
2996
|
+
}
|
|
2997
|
+
function R(_) {
|
|
2998
|
+
if (S) throw new TypeError("Generator is already executing.");
|
|
2999
|
+
for (; T && (T = 0, _[0] && (v = 0)), v; ) try {
|
|
3000
|
+
if (S = 1, d && (p = _[0] & 2 ? d.return : _[0] ? d.throw || ((p = d.return) && p.call(d), 0) : d.next) && !(p = p.call(d, _[1])).done) return p;
|
|
3001
|
+
switch (d = 0, p && (_ = [_[0] & 2, p.value]), _[0]) {
|
|
3002
|
+
case 0:
|
|
3003
|
+
case 1:
|
|
3004
|
+
p = _;
|
|
3005
|
+
break;
|
|
3006
|
+
case 4:
|
|
3007
|
+
return v.label++, { value: _[1], done: !1 };
|
|
3008
|
+
case 5:
|
|
3009
|
+
v.label++, d = _[1], _ = [0];
|
|
3010
|
+
continue;
|
|
3011
|
+
case 7:
|
|
3012
|
+
_ = v.ops.pop(), v.trys.pop();
|
|
3013
|
+
continue;
|
|
3014
|
+
default:
|
|
3015
|
+
if (p = v.trys, !(p = p.length > 0 && p[p.length - 1]) && (_[0] === 6 || _[0] === 2)) {
|
|
3016
|
+
v = 0;
|
|
3017
|
+
continue;
|
|
3018
|
+
}
|
|
3019
|
+
if (_[0] === 3 && (!p || _[1] > p[0] && _[1] < p[3])) {
|
|
3020
|
+
v.label = _[1];
|
|
3021
|
+
break;
|
|
3022
|
+
}
|
|
3023
|
+
if (_[0] === 6 && v.label < p[1]) {
|
|
3024
|
+
v.label = p[1], p = _;
|
|
3025
|
+
break;
|
|
3026
|
+
}
|
|
3027
|
+
if (p && v.label < p[2]) {
|
|
3028
|
+
v.label = p[2], v.ops.push(_);
|
|
3029
|
+
break;
|
|
3030
|
+
}
|
|
3031
|
+
p[2] && v.ops.pop(), v.trys.pop();
|
|
3032
|
+
continue;
|
|
3033
|
+
}
|
|
3034
|
+
_ = l.call(u, v);
|
|
3035
|
+
} catch (q) {
|
|
3036
|
+
_ = [6, q], d = 0;
|
|
3037
|
+
} finally {
|
|
3038
|
+
S = p = 0;
|
|
3039
|
+
}
|
|
3040
|
+
if (_[0] & 5) throw _[1];
|
|
3041
|
+
return { value: _[0] ? _[1] : void 0, done: !0 };
|
|
3042
|
+
}
|
|
3043
|
+
}, a = x && x.__importDefault || function(u) {
|
|
3044
|
+
return u && u.__esModule ? u : { default: u };
|
|
3045
|
+
};
|
|
3046
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.request = r.sendRequest = void 0;
|
|
3047
|
+
var b = a(qs()), m = s(Ns()), f = Pt(), E = wt(), A = function(u) {
|
|
3048
|
+
return u != null;
|
|
3049
|
+
}, D = function(u) {
|
|
3050
|
+
return typeof u == "string";
|
|
3051
|
+
}, h = function(u) {
|
|
3052
|
+
return D(u) && u !== "";
|
|
3053
|
+
}, O = function(u) {
|
|
3054
|
+
return typeof u == "object" && typeof u.type == "string" && typeof u.stream == "function" && typeof u.arrayBuffer == "function" && typeof u.constructor == "function" && typeof u.constructor.name == "string" && /^(Blob|File)$/.test(u.constructor.name) && /^(Blob|File)$/.test(u[Symbol.toStringTag]);
|
|
3055
|
+
}, g = function(u) {
|
|
3056
|
+
return u instanceof b.default;
|
|
3057
|
+
}, I = function(u) {
|
|
3058
|
+
try {
|
|
3059
|
+
return btoa(u);
|
|
3060
|
+
} catch {
|
|
3061
|
+
return Buffer.from(u).toString("base64");
|
|
3062
|
+
}
|
|
3063
|
+
}, M = function(u) {
|
|
3064
|
+
var l = [], v = function(d, p) {
|
|
3065
|
+
l.push("".concat(encodeURIComponent(d), "=").concat(encodeURIComponent(String(p))));
|
|
3066
|
+
}, S = function(d, p) {
|
|
3067
|
+
A(p) && (Array.isArray(p) ? p.forEach(function(T) {
|
|
3068
|
+
S(d, T);
|
|
3069
|
+
}) : typeof p == "object" ? Object.entries(p).forEach(function(T) {
|
|
3070
|
+
var C = T[0], R = T[1];
|
|
3071
|
+
S("".concat(d, "[").concat(C, "]"), R);
|
|
3072
|
+
}) : v(d, p));
|
|
3073
|
+
};
|
|
3074
|
+
return Object.entries(u).forEach(function(d) {
|
|
3075
|
+
var p = d[0], T = d[1];
|
|
3076
|
+
S(p, T);
|
|
3077
|
+
}), l.length > 0 ? "?".concat(l.join("&")) : "";
|
|
3078
|
+
}, N = function(u, l) {
|
|
3079
|
+
var v = u.ENCODE_PATH || encodeURI, S = l.url.replace("{api-version}", u.VERSION).replace(/{(.*?)}/g, function(p, T) {
|
|
3080
|
+
var C;
|
|
3081
|
+
return !((C = l.path) === null || C === void 0) && C.hasOwnProperty(T) ? v(String(l.path[T])) : p;
|
|
3082
|
+
}), d = "".concat(u.BASE).concat(S);
|
|
3083
|
+
return l.query ? "".concat(d).concat(M(l.query)) : d;
|
|
3084
|
+
}, F = function(u) {
|
|
3085
|
+
if (u.formData) {
|
|
3086
|
+
var l = new b.default(), v = function(S, d) {
|
|
3087
|
+
D(d) || O(d) ? l.append(S, d) : l.append(S, JSON.stringify(d));
|
|
3088
|
+
};
|
|
3089
|
+
return Object.entries(u.formData).filter(function(S) {
|
|
3090
|
+
S[0];
|
|
3091
|
+
var d = S[1];
|
|
3092
|
+
return A(d);
|
|
3093
|
+
}).forEach(function(S) {
|
|
3094
|
+
var d = S[0], p = S[1];
|
|
3095
|
+
Array.isArray(p) ? p.forEach(function(T) {
|
|
3096
|
+
return v(d, T);
|
|
3097
|
+
}) : v(d, p);
|
|
3098
|
+
}), l;
|
|
3099
|
+
}
|
|
3100
|
+
}, B = function(u, l) {
|
|
3101
|
+
return o(void 0, void 0, void 0, function() {
|
|
3102
|
+
return i(this, function(v) {
|
|
3103
|
+
return typeof l == "function" ? [2, l(u)] : [2, l];
|
|
3104
|
+
});
|
|
3105
|
+
});
|
|
3106
|
+
}, W = function(u, l) {
|
|
3107
|
+
return o(void 0, void 0, void 0, function() {
|
|
3108
|
+
var v, S, d, p, T, C;
|
|
3109
|
+
return i(this, function(R) {
|
|
3110
|
+
switch (R.label) {
|
|
3111
|
+
case 0:
|
|
3112
|
+
return [4, B(l, u.TOKEN)];
|
|
3113
|
+
case 1:
|
|
3114
|
+
return v = R.sent(), [4, B(l, u.USERNAME)];
|
|
3115
|
+
case 2:
|
|
3116
|
+
return S = R.sent(), [4, B(l, u.PASSWORD)];
|
|
3117
|
+
case 3:
|
|
3118
|
+
return d = R.sent(), [4, B(l, u.HEADERS)];
|
|
3119
|
+
case 4:
|
|
3120
|
+
return p = R.sent(), T = Object.entries(e(e({ Accept: "application/json" }, p), l.headers)).filter(function(_) {
|
|
3121
|
+
_[0];
|
|
3122
|
+
var q = _[1];
|
|
3123
|
+
return A(q);
|
|
3124
|
+
}).reduce(function(_, q) {
|
|
3125
|
+
var U, re = q[0], Ie = q[1];
|
|
3126
|
+
return e(e({}, _), (U = {}, U[re] = String(Ie), U));
|
|
3127
|
+
}, {}), h(v) && (T.Authorization = "Bearer ".concat(v)), h(S) && h(d) && (C = I("".concat(S, ":").concat(d)), T.Authorization = "Basic ".concat(C)), l.body && (l.mediaType ? T["Content-Type"] = l.mediaType : O(l.body) ? T["Content-Type"] = "application/octet-stream" : D(l.body) ? T["Content-Type"] = "text/plain" : g(l.body) || (T["Content-Type"] = "application/json")), [2, new m.Headers(T)];
|
|
3128
|
+
}
|
|
3129
|
+
});
|
|
3130
|
+
});
|
|
3131
|
+
}, H = function(u) {
|
|
3132
|
+
var l;
|
|
3133
|
+
if (u.body)
|
|
3134
|
+
return !((l = u.mediaType) === null || l === void 0) && l.includes("/json") ? JSON.stringify(u.body) : D(u.body) || O(u.body) || g(u.body) ? u.body : JSON.stringify(u.body);
|
|
3135
|
+
}, Z = function(u, l, v, S, d, p) {
|
|
3136
|
+
return o(void 0, void 0, void 0, function() {
|
|
3137
|
+
var T, C;
|
|
3138
|
+
return i(this, function(R) {
|
|
3139
|
+
switch (R.label) {
|
|
3140
|
+
case 0:
|
|
3141
|
+
return T = new AbortController(), C = {
|
|
3142
|
+
headers: d,
|
|
3143
|
+
method: u.method,
|
|
3144
|
+
body: v ?? S,
|
|
3145
|
+
signal: T.signal
|
|
3146
|
+
}, p(function() {
|
|
3147
|
+
return T.abort();
|
|
3148
|
+
}), [4, (0, m.default)(l, C)];
|
|
3149
|
+
case 1:
|
|
3150
|
+
return [2, R.sent()];
|
|
3151
|
+
}
|
|
3152
|
+
});
|
|
3153
|
+
});
|
|
3154
|
+
};
|
|
3155
|
+
r.sendRequest = Z;
|
|
3156
|
+
var Y = function(u, l) {
|
|
3157
|
+
if (l) {
|
|
3158
|
+
var v = u.headers.get(l);
|
|
3159
|
+
if (D(v))
|
|
3160
|
+
return v;
|
|
3161
|
+
}
|
|
3162
|
+
}, j = function(u) {
|
|
3163
|
+
return o(void 0, void 0, void 0, function() {
|
|
3164
|
+
var l, v, S;
|
|
3165
|
+
return i(this, function(d) {
|
|
3166
|
+
switch (d.label) {
|
|
3167
|
+
case 0:
|
|
3168
|
+
if (u.status === 204) return [3, 7];
|
|
3169
|
+
d.label = 1;
|
|
3170
|
+
case 1:
|
|
3171
|
+
return d.trys.push([1, 6, , 7]), l = u.headers.get("Content-Type"), l ? (v = l.toLowerCase().startsWith("application/json"), v ? [4, u.json()] : [3, 3]) : [3, 5];
|
|
3172
|
+
case 2:
|
|
3173
|
+
return [2, d.sent()];
|
|
3174
|
+
case 3:
|
|
3175
|
+
return [4, u.text()];
|
|
3176
|
+
case 4:
|
|
3177
|
+
return [2, d.sent()];
|
|
3178
|
+
case 5:
|
|
3179
|
+
return [3, 7];
|
|
3180
|
+
case 6:
|
|
3181
|
+
return S = d.sent(), console.error(S), [3, 7];
|
|
3182
|
+
case 7:
|
|
3183
|
+
return [2, void 0];
|
|
3184
|
+
}
|
|
3185
|
+
});
|
|
3186
|
+
});
|
|
3187
|
+
}, y = function(u, l) {
|
|
3188
|
+
var v = e({ 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable" }, u.errors), S = v[l.status];
|
|
3189
|
+
if (S)
|
|
3190
|
+
throw new f.ApiError(u, l, S);
|
|
3191
|
+
if (!l.ok)
|
|
3192
|
+
throw new f.ApiError(u, l, "Generic Error");
|
|
3193
|
+
}, k = function(u, l) {
|
|
3194
|
+
return new E.CancelablePromise(function(v, S, d) {
|
|
3195
|
+
return o(void 0, void 0, void 0, function() {
|
|
3196
|
+
var p, T, C, R, _, q, U, re, Ie;
|
|
3197
|
+
return i(this, function(te) {
|
|
3198
|
+
switch (te.label) {
|
|
3199
|
+
case 0:
|
|
3200
|
+
return te.trys.push([0, 5, , 6]), p = N(u, l), T = F(l), C = H(l), [4, W(u, l)];
|
|
3201
|
+
case 1:
|
|
3202
|
+
return R = te.sent(), d.isCancelled ? [3, 4] : [4, (0, r.sendRequest)(l, p, C, T, R, d)];
|
|
3203
|
+
case 2:
|
|
3204
|
+
return _ = te.sent(), [4, j(_)];
|
|
3205
|
+
case 3:
|
|
3206
|
+
q = te.sent(), U = Y(_, l.responseHeader), re = {
|
|
3207
|
+
url: p,
|
|
3208
|
+
ok: _.ok,
|
|
3209
|
+
status: _.status,
|
|
3210
|
+
statusText: _.statusText,
|
|
3211
|
+
body: U ?? q
|
|
3212
|
+
}, y(l, re), v(re.body), te.label = 4;
|
|
3213
|
+
case 4:
|
|
3214
|
+
return [3, 6];
|
|
3215
|
+
case 5:
|
|
3216
|
+
return Ie = te.sent(), S(Ie), [3, 6];
|
|
3217
|
+
case 6:
|
|
3218
|
+
return [
|
|
3219
|
+
2
|
|
3220
|
+
/*return*/
|
|
3221
|
+
];
|
|
3222
|
+
}
|
|
3223
|
+
});
|
|
3224
|
+
});
|
|
3225
|
+
});
|
|
3226
|
+
};
|
|
3227
|
+
r.request = k;
|
|
3228
|
+
})(x)), x;
|
|
3229
|
+
}
|
|
3230
|
+
var xr;
|
|
3231
|
+
function js() {
|
|
3232
|
+
if (xr) return de;
|
|
3233
|
+
xr = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.AccountInformationService = void 0;
|
|
3234
|
+
var r = G(), e = z(), t = (
|
|
3235
|
+
/** @class */
|
|
3236
|
+
(function() {
|
|
3237
|
+
function n() {
|
|
3238
|
+
}
|
|
3239
|
+
return n.getAccountInformation = function() {
|
|
3240
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3241
|
+
method: "GET",
|
|
3242
|
+
url: "/account/accountInformation"
|
|
3243
|
+
});
|
|
3244
|
+
}, n;
|
|
3245
|
+
})()
|
|
3246
|
+
);
|
|
3247
|
+
return de.AccountInformationService = t, de;
|
|
3248
|
+
}
|
|
3249
|
+
var fe = {}, Vr;
|
|
3250
|
+
function Us() {
|
|
3251
|
+
if (Vr) return fe;
|
|
3252
|
+
Vr = 1, Object.defineProperty(fe, "__esModule", { value: !0 }), fe.AccountScriptsFilesService = void 0;
|
|
3253
|
+
var r = G(), e = z(), t = (
|
|
3254
|
+
/** @class */
|
|
3255
|
+
(function() {
|
|
3256
|
+
function n() {
|
|
3257
|
+
}
|
|
3258
|
+
return n.getUserScripts = function() {
|
|
3259
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3260
|
+
method: "GET",
|
|
3261
|
+
url: "/account/scripts"
|
|
3262
|
+
});
|
|
3263
|
+
}, n.createUserScript = function(s) {
|
|
3264
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3265
|
+
method: "POST",
|
|
3266
|
+
url: "/account/scripts",
|
|
3267
|
+
body: s,
|
|
3268
|
+
mediaType: "application/json",
|
|
3269
|
+
errors: {
|
|
3270
|
+
400: "Bad request"
|
|
3271
|
+
}
|
|
3272
|
+
});
|
|
3273
|
+
}, n.getUserScriptById = function(s) {
|
|
3274
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3275
|
+
method: "GET",
|
|
3276
|
+
url: "/account/scripts/{scriptId}",
|
|
3277
|
+
path: {
|
|
3278
|
+
scriptId: s
|
|
3279
|
+
},
|
|
3280
|
+
errors: {
|
|
3281
|
+
404: "Script not found"
|
|
3282
|
+
}
|
|
3283
|
+
});
|
|
3284
|
+
}, n.deleteUserScript = function(s) {
|
|
3285
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3286
|
+
method: "DELETE",
|
|
3287
|
+
url: "/account/scripts/{scriptId}",
|
|
3288
|
+
path: {
|
|
3289
|
+
scriptId: s
|
|
3290
|
+
},
|
|
3291
|
+
errors: {
|
|
3292
|
+
404: "Script not found"
|
|
3293
|
+
}
|
|
3294
|
+
});
|
|
3295
|
+
}, n.patchUserScript = function(s, o) {
|
|
3296
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3297
|
+
method: "PATCH",
|
|
3298
|
+
url: "/account/scripts/{scriptId}",
|
|
3299
|
+
path: {
|
|
3300
|
+
scriptId: s
|
|
3301
|
+
},
|
|
3302
|
+
body: o,
|
|
3303
|
+
mediaType: "application/json",
|
|
3304
|
+
errors: {
|
|
3305
|
+
400: "Bad request",
|
|
3306
|
+
404: "Script not found"
|
|
3307
|
+
}
|
|
3308
|
+
});
|
|
3309
|
+
}, n;
|
|
3310
|
+
})()
|
|
3311
|
+
);
|
|
3312
|
+
return fe.AccountScriptsFilesService = t, fe;
|
|
3313
|
+
}
|
|
3314
|
+
var pe = {}, Gr;
|
|
3315
|
+
function Fs() {
|
|
3316
|
+
if (Gr) return pe;
|
|
3317
|
+
Gr = 1, Object.defineProperty(pe, "__esModule", { value: !0 }), pe.EventCallbacksHooksService = void 0;
|
|
3318
|
+
var r = G(), e = z(), t = (
|
|
3319
|
+
/** @class */
|
|
3320
|
+
(function() {
|
|
3321
|
+
function n() {
|
|
3322
|
+
}
|
|
3323
|
+
return n.eventCallbacksHooks = function() {
|
|
3324
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3325
|
+
method: "GET",
|
|
3326
|
+
url: "/hooks"
|
|
3327
|
+
});
|
|
3328
|
+
}, n.creteHook = function(s) {
|
|
3329
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3330
|
+
method: "POST",
|
|
3331
|
+
url: "/hooks",
|
|
3332
|
+
body: s,
|
|
3333
|
+
mediaType: "application/json",
|
|
3334
|
+
errors: {
|
|
3335
|
+
400: "Bad request"
|
|
3336
|
+
}
|
|
3337
|
+
});
|
|
3338
|
+
}, n.getHookById = function(s) {
|
|
3339
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3340
|
+
method: "GET",
|
|
3341
|
+
url: "/hooks/{hookId}",
|
|
3342
|
+
path: {
|
|
3343
|
+
hookId: s
|
|
3344
|
+
},
|
|
3345
|
+
errors: {
|
|
3346
|
+
400: "Bad request",
|
|
3347
|
+
404: "Hook not found"
|
|
3348
|
+
}
|
|
3349
|
+
});
|
|
3350
|
+
}, n.deleteHookById = function(s) {
|
|
3351
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3352
|
+
method: "DELETE",
|
|
3353
|
+
url: "/hooks/{hookId}",
|
|
3354
|
+
path: {
|
|
3355
|
+
hookId: s
|
|
3356
|
+
},
|
|
3357
|
+
errors: {
|
|
3358
|
+
404: "Hook not found"
|
|
3359
|
+
}
|
|
3360
|
+
});
|
|
3361
|
+
}, n;
|
|
3362
|
+
})()
|
|
3363
|
+
);
|
|
3364
|
+
return pe.EventCallbacksHooksService = t, pe;
|
|
3365
|
+
}
|
|
3366
|
+
var he = {}, Kr;
|
|
3367
|
+
function Ls() {
|
|
3368
|
+
if (Kr) return he;
|
|
3369
|
+
Kr = 1, Object.defineProperty(he, "__esModule", { value: !0 }), he.PingService = void 0;
|
|
3370
|
+
var r = G(), e = z(), t = (
|
|
3371
|
+
/** @class */
|
|
3372
|
+
(function() {
|
|
3373
|
+
function n() {
|
|
3374
|
+
}
|
|
3375
|
+
return n.getPing = function() {
|
|
3376
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3377
|
+
method: "GET",
|
|
3378
|
+
url: "/ping"
|
|
3379
|
+
});
|
|
3380
|
+
}, n;
|
|
3381
|
+
})()
|
|
3382
|
+
);
|
|
3383
|
+
return he.PingService = t, he;
|
|
3384
|
+
}
|
|
3385
|
+
var ve = {}, $r;
|
|
3386
|
+
function Bs() {
|
|
3387
|
+
if ($r) return ve;
|
|
3388
|
+
$r = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.PollForEventsService = void 0;
|
|
3389
|
+
var r = G(), e = z(), t = (
|
|
3390
|
+
/** @class */
|
|
3391
|
+
(function() {
|
|
3392
|
+
function n() {
|
|
3393
|
+
}
|
|
3394
|
+
return n.getEvents = function(s, o, i, a) {
|
|
3395
|
+
return i === void 0 && (i = 1), a === void 0 && (a = 10), (0, e.request)(r.OpenAPI, {
|
|
3396
|
+
method: "GET",
|
|
3397
|
+
url: "/events",
|
|
3398
|
+
query: {
|
|
3399
|
+
callbackId: s,
|
|
3400
|
+
eventType: o,
|
|
3401
|
+
page: i,
|
|
3402
|
+
per_page: a
|
|
3403
|
+
},
|
|
3404
|
+
errors: {
|
|
3405
|
+
400: "Bad request"
|
|
3406
|
+
}
|
|
3407
|
+
});
|
|
3408
|
+
}, n;
|
|
3409
|
+
})()
|
|
3410
|
+
);
|
|
3411
|
+
return ve.PollForEventsService = t, ve;
|
|
3412
|
+
}
|
|
3413
|
+
var Se = {}, zr;
|
|
3414
|
+
function Ms() {
|
|
3415
|
+
if (zr) return Se;
|
|
3416
|
+
zr = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.PublicKeysService = void 0;
|
|
3417
|
+
var r = G(), e = z(), t = (
|
|
3418
|
+
/** @class */
|
|
3419
|
+
(function() {
|
|
3420
|
+
function n() {
|
|
3421
|
+
}
|
|
3422
|
+
return n.getPublicKeys = function() {
|
|
3423
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3424
|
+
method: "GET",
|
|
3425
|
+
url: "/account/publicKeys"
|
|
3426
|
+
});
|
|
3427
|
+
}, n.postPublicKeys = function(s) {
|
|
3428
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3429
|
+
method: "POST",
|
|
3430
|
+
url: "/account/publicKeys",
|
|
3431
|
+
body: s,
|
|
3432
|
+
mediaType: "application/json",
|
|
3433
|
+
errors: {
|
|
3434
|
+
400: "Bad request"
|
|
3435
|
+
}
|
|
3436
|
+
});
|
|
3437
|
+
}, n.deletePublicKey = function(s) {
|
|
3438
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3439
|
+
method: "DELETE",
|
|
3440
|
+
url: "/account/publicKeys/{id}",
|
|
3441
|
+
path: {
|
|
3442
|
+
id: s
|
|
3443
|
+
},
|
|
3444
|
+
errors: {
|
|
3445
|
+
404: "PublicKey not found"
|
|
3446
|
+
}
|
|
3447
|
+
});
|
|
3448
|
+
}, n;
|
|
3449
|
+
})()
|
|
3450
|
+
);
|
|
3451
|
+
return Se.PublicKeysService = t, Se;
|
|
3452
|
+
}
|
|
3453
|
+
var me = {}, Wr;
|
|
3454
|
+
function Hs() {
|
|
3455
|
+
if (Wr) return me;
|
|
3456
|
+
Wr = 1, Object.defineProperty(me, "__esModule", { value: !0 }), me.ScriptLibraryService = void 0;
|
|
3457
|
+
var r = G(), e = z(), t = (
|
|
3458
|
+
/** @class */
|
|
3459
|
+
(function() {
|
|
3460
|
+
function n() {
|
|
3461
|
+
}
|
|
3462
|
+
return n.getScripts = function() {
|
|
3463
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3464
|
+
method: "GET",
|
|
3465
|
+
url: "/scripts"
|
|
3466
|
+
});
|
|
3467
|
+
}, n;
|
|
3468
|
+
})()
|
|
3469
|
+
);
|
|
3470
|
+
return me.ScriptLibraryService = t, me;
|
|
3471
|
+
}
|
|
3472
|
+
var be = {}, Jr;
|
|
3473
|
+
function xs() {
|
|
3474
|
+
if (Jr) return be;
|
|
3475
|
+
Jr = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.ServerActionsService = void 0;
|
|
3476
|
+
var r = G(), e = z(), t = (
|
|
3477
|
+
/** @class */
|
|
3478
|
+
(function() {
|
|
3479
|
+
function n() {
|
|
3480
|
+
}
|
|
3481
|
+
return n.startServer = function(s) {
|
|
3482
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3483
|
+
method: "POST",
|
|
3484
|
+
url: "/servers/{serverSlug}/actions/start",
|
|
3485
|
+
path: {
|
|
3486
|
+
serverSlug: s
|
|
3487
|
+
},
|
|
3488
|
+
responseHeader: "X-Callback-ID",
|
|
3489
|
+
errors: {
|
|
3490
|
+
400: "Bad request",
|
|
3491
|
+
404: "Server not found"
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
}, n.stopServer = function(s) {
|
|
3495
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3496
|
+
method: "POST",
|
|
3497
|
+
url: "/servers/{serverSlug}/actions/stop",
|
|
3498
|
+
path: {
|
|
3499
|
+
serverSlug: s
|
|
3500
|
+
},
|
|
3501
|
+
responseHeader: "X-Callback-ID",
|
|
3502
|
+
errors: {
|
|
3503
|
+
400: "Bad request",
|
|
3504
|
+
404: "Server not found"
|
|
3505
|
+
}
|
|
3506
|
+
});
|
|
3507
|
+
}, n.rebootServer = function(s) {
|
|
3508
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3509
|
+
method: "POST",
|
|
3510
|
+
url: "/servers/{serverSlug}/actions/reboot",
|
|
3511
|
+
path: {
|
|
3512
|
+
serverSlug: s
|
|
3513
|
+
},
|
|
3514
|
+
responseHeader: "X-Callback-ID",
|
|
3515
|
+
errors: {
|
|
3516
|
+
400: "Bad request",
|
|
3517
|
+
404: "Server not found"
|
|
3518
|
+
}
|
|
3519
|
+
});
|
|
3520
|
+
}, n.suspendServer = function(s) {
|
|
3521
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3522
|
+
method: "POST",
|
|
3523
|
+
url: "/servers/{serverSlug}/actions/suspend",
|
|
3524
|
+
path: {
|
|
3525
|
+
serverSlug: s
|
|
3526
|
+
},
|
|
3527
|
+
responseHeader: "X-Callback-ID",
|
|
3528
|
+
errors: {
|
|
3529
|
+
400: "Bad request",
|
|
3530
|
+
404: "Server not found"
|
|
3531
|
+
}
|
|
3532
|
+
});
|
|
3533
|
+
}, n.reinstallServer = function(s, o) {
|
|
3534
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3535
|
+
method: "POST",
|
|
3536
|
+
url: "/servers/{serverSlug}/actions/reinstall",
|
|
3537
|
+
path: {
|
|
3538
|
+
serverSlug: s
|
|
3539
|
+
},
|
|
3540
|
+
body: o,
|
|
3541
|
+
mediaType: "application/json",
|
|
3542
|
+
responseHeader: "X-Callback-ID",
|
|
3543
|
+
errors: {
|
|
3544
|
+
400: "Bad request",
|
|
3545
|
+
404: "Server not found"
|
|
3546
|
+
}
|
|
3547
|
+
});
|
|
3548
|
+
}, n.createServerSnapshot = function(s, o) {
|
|
3549
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3550
|
+
method: "POST",
|
|
3551
|
+
url: "/servers/{serverSlug}/actions/snapshot",
|
|
3552
|
+
path: {
|
|
3553
|
+
serverSlug: s
|
|
3554
|
+
},
|
|
3555
|
+
body: o,
|
|
3556
|
+
mediaType: "application/json",
|
|
3557
|
+
errors: {
|
|
3558
|
+
400: "Bad request",
|
|
3559
|
+
404: "Server not found"
|
|
3560
|
+
}
|
|
3561
|
+
});
|
|
3562
|
+
}, n.restoreServerToSnapshot = function(s, o) {
|
|
3563
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3564
|
+
method: "POST",
|
|
3565
|
+
url: "/servers/{serverSlug}/actions/restore",
|
|
3566
|
+
path: {
|
|
3567
|
+
serverSlug: s
|
|
3568
|
+
},
|
|
3569
|
+
body: o,
|
|
3570
|
+
mediaType: "application/json",
|
|
3571
|
+
responseHeader: "X-Callback-ID",
|
|
3572
|
+
errors: {
|
|
3573
|
+
400: "Bad request",
|
|
3574
|
+
404: "Server or snapshot not found"
|
|
3575
|
+
}
|
|
3576
|
+
});
|
|
3577
|
+
}, n.resizeDryRun = function(s, o) {
|
|
3578
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3579
|
+
method: "POST",
|
|
3580
|
+
url: "/servers/{serverSlug}/actions/resize/dryrun",
|
|
3581
|
+
path: {
|
|
3582
|
+
serverSlug: s
|
|
3583
|
+
},
|
|
3584
|
+
body: o,
|
|
3585
|
+
mediaType: "application/json",
|
|
3586
|
+
errors: {
|
|
3587
|
+
400: "Bad request",
|
|
3588
|
+
404: "Server not found"
|
|
3589
|
+
}
|
|
3590
|
+
});
|
|
3591
|
+
}, n.resizeServer = function(s, o) {
|
|
3592
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3593
|
+
method: "POST",
|
|
3594
|
+
url: "/servers/{serverSlug}/actions/resize",
|
|
3595
|
+
path: {
|
|
3596
|
+
serverSlug: s
|
|
3597
|
+
},
|
|
3598
|
+
body: o,
|
|
3599
|
+
mediaType: "application/json",
|
|
3600
|
+
responseHeader: "X-Callback-ID",
|
|
3601
|
+
errors: {
|
|
3602
|
+
400: "Bad request",
|
|
3603
|
+
404: "Server not found"
|
|
3604
|
+
}
|
|
3605
|
+
});
|
|
3606
|
+
}, n;
|
|
3607
|
+
})()
|
|
3608
|
+
);
|
|
3609
|
+
return be.ServerActionsService = t, be;
|
|
3610
|
+
}
|
|
3611
|
+
var ye = {}, Xr;
|
|
3612
|
+
function Vs() {
|
|
3613
|
+
if (Xr) return ye;
|
|
3614
|
+
Xr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.ServerConfigurationsService = void 0;
|
|
3615
|
+
var r = G(), e = z(), t = (
|
|
3616
|
+
/** @class */
|
|
3617
|
+
(function() {
|
|
3618
|
+
function n() {
|
|
3619
|
+
}
|
|
3620
|
+
return n.getServersLocations = function() {
|
|
3621
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3622
|
+
method: "GET",
|
|
3623
|
+
url: "/locations"
|
|
3624
|
+
});
|
|
3625
|
+
}, n.getServersProfiles = function(s) {
|
|
3626
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3627
|
+
method: "GET",
|
|
3628
|
+
url: "/profiles",
|
|
3629
|
+
query: {
|
|
3630
|
+
locationId: s
|
|
3631
|
+
}
|
|
3632
|
+
});
|
|
3633
|
+
}, n.getServersImages = function() {
|
|
3634
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3635
|
+
method: "GET",
|
|
3636
|
+
url: "/images"
|
|
3637
|
+
});
|
|
3638
|
+
}, n;
|
|
3639
|
+
})()
|
|
3640
|
+
);
|
|
3641
|
+
return ye.ServerConfigurationsService = t, ye;
|
|
3642
|
+
}
|
|
3643
|
+
var ge = {}, Yr;
|
|
3644
|
+
function Gs() {
|
|
3645
|
+
if (Yr) return ge;
|
|
3646
|
+
Yr = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.ServerMetricsService = void 0;
|
|
3647
|
+
var r = G(), e = z(), t = (
|
|
3648
|
+
/** @class */
|
|
3649
|
+
(function() {
|
|
3650
|
+
function n() {
|
|
3651
|
+
}
|
|
3652
|
+
return n.getServerMetrics = function(s) {
|
|
3653
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3654
|
+
method: "GET",
|
|
3655
|
+
url: "/servers/{serverSlug}/metrics",
|
|
3656
|
+
path: {
|
|
3657
|
+
serverSlug: s
|
|
3658
|
+
},
|
|
3659
|
+
errors: {
|
|
3660
|
+
404: "Server not found"
|
|
3661
|
+
}
|
|
3662
|
+
});
|
|
3663
|
+
}, n.getInstantMetrics = function(s) {
|
|
3664
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3665
|
+
method: "GET",
|
|
3666
|
+
url: "/servers/{serverSlug}/metrics/now",
|
|
3667
|
+
path: {
|
|
3668
|
+
serverSlug: s
|
|
3669
|
+
},
|
|
3670
|
+
errors: {
|
|
3671
|
+
404: "Server not found"
|
|
3672
|
+
}
|
|
3673
|
+
});
|
|
3674
|
+
}, n;
|
|
3675
|
+
})()
|
|
3676
|
+
);
|
|
3677
|
+
return ge.ServerMetricsService = t, ge;
|
|
3678
|
+
}
|
|
3679
|
+
var Ee = {}, Qr;
|
|
3680
|
+
function Ks() {
|
|
3681
|
+
if (Qr) return Ee;
|
|
3682
|
+
Qr = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.ServersService = void 0;
|
|
3683
|
+
var r = G(), e = z(), t = (
|
|
3684
|
+
/** @class */
|
|
3685
|
+
(function() {
|
|
3686
|
+
function n() {
|
|
3687
|
+
}
|
|
3688
|
+
return n.getServers = function(s) {
|
|
3689
|
+
return s === void 0 && (s = "all"), (0, e.request)(r.OpenAPI, {
|
|
3690
|
+
method: "GET",
|
|
3691
|
+
url: "/servers",
|
|
3692
|
+
query: {
|
|
3693
|
+
status: s
|
|
3694
|
+
}
|
|
3695
|
+
});
|
|
3696
|
+
}, n.createServer = function(s) {
|
|
3697
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3698
|
+
method: "POST",
|
|
3699
|
+
url: "/servers",
|
|
3700
|
+
body: s,
|
|
3701
|
+
mediaType: "application/json",
|
|
3702
|
+
errors: {
|
|
3703
|
+
400: "Bad Request"
|
|
3704
|
+
}
|
|
3705
|
+
});
|
|
3706
|
+
}, n.getServerBySlug = function(s) {
|
|
3707
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3708
|
+
method: "GET",
|
|
3709
|
+
url: "/servers/{serverSlug}",
|
|
3710
|
+
path: {
|
|
3711
|
+
serverSlug: s
|
|
3712
|
+
},
|
|
3713
|
+
errors: {
|
|
3714
|
+
404: "Server not found"
|
|
3715
|
+
}
|
|
3716
|
+
});
|
|
3717
|
+
}, n.deleteServer = function(s) {
|
|
3718
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3719
|
+
method: "DELETE",
|
|
3720
|
+
url: "/servers/{serverSlug}",
|
|
3721
|
+
path: {
|
|
3722
|
+
serverSlug: s
|
|
3723
|
+
},
|
|
3724
|
+
responseHeader: "X-Callback-ID",
|
|
3725
|
+
errors: {
|
|
3726
|
+
404: "Server not found"
|
|
3727
|
+
}
|
|
3728
|
+
});
|
|
3729
|
+
}, n.patchServer = function(s, o) {
|
|
3730
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3731
|
+
method: "PATCH",
|
|
3732
|
+
url: "/servers/{serverSlug}",
|
|
3733
|
+
path: {
|
|
3734
|
+
serverSlug: s
|
|
3735
|
+
},
|
|
3736
|
+
body: o,
|
|
3737
|
+
mediaType: "application/json",
|
|
3738
|
+
errors: {
|
|
3739
|
+
404: "Server not found"
|
|
3740
|
+
}
|
|
3741
|
+
});
|
|
3742
|
+
}, n;
|
|
3743
|
+
})()
|
|
3744
|
+
);
|
|
3745
|
+
return Ee.ServersService = t, Ee;
|
|
3746
|
+
}
|
|
3747
|
+
var Oe = {}, Zr;
|
|
3748
|
+
function $s() {
|
|
3749
|
+
if (Zr) return Oe;
|
|
3750
|
+
Zr = 1, Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.ServerScriptsFilesService = void 0;
|
|
3751
|
+
var r = G(), e = z(), t = (
|
|
3752
|
+
/** @class */
|
|
3753
|
+
(function() {
|
|
3754
|
+
function n() {
|
|
3755
|
+
}
|
|
3756
|
+
return n.getServerScripts = function(s) {
|
|
3757
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3758
|
+
method: "GET",
|
|
3759
|
+
url: "/servers/{serverSlug}/scripts",
|
|
3760
|
+
path: {
|
|
3761
|
+
serverSlug: s
|
|
3762
|
+
},
|
|
3763
|
+
errors: {
|
|
3764
|
+
404: "Server not found"
|
|
3765
|
+
}
|
|
3766
|
+
});
|
|
3767
|
+
}, n.createServerScript = function(s, o) {
|
|
3768
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3769
|
+
method: "POST",
|
|
3770
|
+
url: "/servers/{serverSlug}/scripts",
|
|
3771
|
+
path: {
|
|
3772
|
+
serverSlug: s
|
|
3773
|
+
},
|
|
3774
|
+
body: o,
|
|
3775
|
+
mediaType: "application/json",
|
|
3776
|
+
errors: {
|
|
3777
|
+
400: "Bad request",
|
|
3778
|
+
404: "Server or script not found"
|
|
3779
|
+
}
|
|
3780
|
+
});
|
|
3781
|
+
}, n.getServerScriptById = function(s, o) {
|
|
3782
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3783
|
+
method: "GET",
|
|
3784
|
+
url: "/servers/{serverSlug}/scripts/{scriptId}",
|
|
3785
|
+
path: {
|
|
3786
|
+
serverSlug: s,
|
|
3787
|
+
scriptId: o
|
|
3788
|
+
},
|
|
3789
|
+
errors: {
|
|
3790
|
+
404: "Server not found"
|
|
3791
|
+
}
|
|
3792
|
+
});
|
|
3793
|
+
}, n.deleteServerScriptById = function(s, o) {
|
|
3794
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3795
|
+
method: "DELETE",
|
|
3796
|
+
url: "/servers/{serverSlug}/scripts/{scriptId}",
|
|
3797
|
+
path: {
|
|
3798
|
+
serverSlug: s,
|
|
3799
|
+
scriptId: o
|
|
3800
|
+
},
|
|
3801
|
+
responseHeader: "X-Callback-ID",
|
|
3802
|
+
errors: {
|
|
3803
|
+
404: "Server or script not found"
|
|
3804
|
+
}
|
|
3805
|
+
});
|
|
3806
|
+
}, n.executeServerScript = function(s, o) {
|
|
3807
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3808
|
+
method: "POST",
|
|
3809
|
+
url: "/servers/{serverSlug}/scripts/{scriptId}/execute",
|
|
3810
|
+
path: {
|
|
3811
|
+
serverSlug: s,
|
|
3812
|
+
scriptId: o
|
|
3813
|
+
},
|
|
3814
|
+
responseHeader: "X-Callback-ID",
|
|
3815
|
+
errors: {
|
|
3816
|
+
404: "Server or script not found"
|
|
3817
|
+
}
|
|
3818
|
+
});
|
|
3819
|
+
}, n.fetchServerFile = function(s, o) {
|
|
3820
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3821
|
+
method: "POST",
|
|
3822
|
+
url: "/servers/{serverSlug}/fetchFile",
|
|
3823
|
+
path: {
|
|
3824
|
+
serverSlug: s
|
|
3825
|
+
},
|
|
3826
|
+
body: o,
|
|
3827
|
+
mediaType: "application/json",
|
|
3828
|
+
responseHeader: "X-Callback-ID",
|
|
3829
|
+
errors: {
|
|
3830
|
+
404: "Server not found"
|
|
3831
|
+
}
|
|
3832
|
+
});
|
|
3833
|
+
}, n;
|
|
3834
|
+
})()
|
|
3835
|
+
);
|
|
3836
|
+
return Oe.ServerScriptsFilesService = t, Oe;
|
|
3837
|
+
}
|
|
3838
|
+
var _e = {}, et;
|
|
3839
|
+
function zs() {
|
|
3840
|
+
if (et) return _e;
|
|
3841
|
+
et = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.ServerSnapshotsService = void 0;
|
|
3842
|
+
var r = G(), e = z(), t = (
|
|
3843
|
+
/** @class */
|
|
3844
|
+
(function() {
|
|
3845
|
+
function n() {
|
|
3846
|
+
}
|
|
3847
|
+
return n.getServerSnapshots = function(s) {
|
|
3848
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3849
|
+
method: "GET",
|
|
3850
|
+
url: "/servers/{serverSlug}/snapshots",
|
|
3851
|
+
path: {
|
|
3852
|
+
serverSlug: s
|
|
3853
|
+
},
|
|
3854
|
+
errors: {
|
|
3855
|
+
404: "Server not found"
|
|
3856
|
+
}
|
|
3857
|
+
});
|
|
3858
|
+
}, n.createSnapshot = function(s, o) {
|
|
3859
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3860
|
+
method: "POST",
|
|
3861
|
+
url: "/servers/{serverSlug}/snapshots",
|
|
3862
|
+
path: {
|
|
3863
|
+
serverSlug: s
|
|
3864
|
+
},
|
|
3865
|
+
body: o,
|
|
3866
|
+
mediaType: "application/json",
|
|
3867
|
+
errors: {
|
|
3868
|
+
400: "Bad Request"
|
|
3869
|
+
}
|
|
3870
|
+
});
|
|
3871
|
+
}, n.getServerSnapshotById = function(s, o) {
|
|
3872
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3873
|
+
method: "GET",
|
|
3874
|
+
url: "/servers/{serverSlug}/snapshots/{snapshotId}",
|
|
3875
|
+
path: {
|
|
3876
|
+
serverSlug: s,
|
|
3877
|
+
snapshotId: o
|
|
3878
|
+
},
|
|
3879
|
+
errors: {
|
|
3880
|
+
404: "Server or snapshot not found"
|
|
3881
|
+
}
|
|
3882
|
+
});
|
|
3883
|
+
}, n.deleteServerSnapshotById = function(s, o) {
|
|
3884
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3885
|
+
method: "DELETE",
|
|
3886
|
+
url: "/servers/{serverSlug}/snapshots/{snapshotId}",
|
|
3887
|
+
path: {
|
|
3888
|
+
serverSlug: s,
|
|
3889
|
+
snapshotId: o
|
|
3890
|
+
},
|
|
3891
|
+
responseHeader: "X-Callback-ID",
|
|
3892
|
+
errors: {
|
|
3893
|
+
404: "Server or snapshot not found"
|
|
3894
|
+
}
|
|
3895
|
+
});
|
|
3896
|
+
}, n;
|
|
3897
|
+
})()
|
|
3898
|
+
);
|
|
3899
|
+
return _e.ServerSnapshotsService = t, _e;
|
|
3900
|
+
}
|
|
3901
|
+
var Te = {}, rt;
|
|
3902
|
+
function Ws() {
|
|
3903
|
+
if (rt) return Te;
|
|
3904
|
+
rt = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.ShellUsersService = void 0;
|
|
3905
|
+
var r = G(), e = z(), t = (
|
|
3906
|
+
/** @class */
|
|
3907
|
+
(function() {
|
|
3908
|
+
function n() {
|
|
3909
|
+
}
|
|
3910
|
+
return n.getServerShellUsers = function(s) {
|
|
3911
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3912
|
+
method: "GET",
|
|
3913
|
+
url: "/servers/{serverSlug}/shellUsers",
|
|
3914
|
+
path: {
|
|
3915
|
+
serverSlug: s
|
|
3916
|
+
},
|
|
3917
|
+
errors: {
|
|
3918
|
+
404: "Server not found"
|
|
3919
|
+
}
|
|
3920
|
+
});
|
|
3921
|
+
}, n.postServerShellUsers = function(s, o) {
|
|
3922
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3923
|
+
method: "POST",
|
|
3924
|
+
url: "/servers/{serverSlug}/shellUsers",
|
|
3925
|
+
path: {
|
|
3926
|
+
serverSlug: s
|
|
3927
|
+
},
|
|
3928
|
+
body: o,
|
|
3929
|
+
mediaType: "application/json",
|
|
3930
|
+
errors: {
|
|
3931
|
+
400: "Bad request",
|
|
3932
|
+
404: "Server not found"
|
|
3933
|
+
}
|
|
3934
|
+
});
|
|
3935
|
+
}, n.deleteShellUser = function(s, o) {
|
|
3936
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3937
|
+
method: "DELETE",
|
|
3938
|
+
url: "/servers/{serverSlug}/shellUsers/{shellUserId}",
|
|
3939
|
+
path: {
|
|
3940
|
+
serverSlug: s,
|
|
3941
|
+
shellUserId: o
|
|
3942
|
+
},
|
|
3943
|
+
responseHeader: "X-Callback-ID",
|
|
3944
|
+
errors: {
|
|
3945
|
+
404: "Server or shell user not found"
|
|
3946
|
+
}
|
|
3947
|
+
});
|
|
3948
|
+
}, n.patchServerShellUsers = function(s, o, i) {
|
|
3949
|
+
return (0, e.request)(r.OpenAPI, {
|
|
3950
|
+
method: "PATCH",
|
|
3951
|
+
url: "/servers/{serverSlug}/shellUsers/{shellUserId}",
|
|
3952
|
+
path: {
|
|
3953
|
+
serverSlug: s,
|
|
3954
|
+
shellUserId: o
|
|
3955
|
+
},
|
|
3956
|
+
body: i,
|
|
3957
|
+
mediaType: "application/json",
|
|
3958
|
+
errors: {
|
|
3959
|
+
400: "Bad request",
|
|
3960
|
+
404: "Server or shell user not found"
|
|
3961
|
+
}
|
|
3962
|
+
});
|
|
3963
|
+
}, n;
|
|
3964
|
+
})()
|
|
3965
|
+
);
|
|
3966
|
+
return Te.ShellUsersService = t, Te;
|
|
3967
|
+
}
|
|
3968
|
+
var tt;
|
|
3969
|
+
function Js() {
|
|
3970
|
+
return tt || (tt = 1, (function(r) {
|
|
3971
|
+
Object.defineProperty(r, "__esModule", { value: !0 }), r.ShellUsersService = r.ServerSnapshotsService = r.ServerScriptsFilesService = r.ServersService = r.ServerMetricsService = r.ServerConfigurationsService = r.ServerActionsService = r.ScriptLibraryService = r.PublicKeysService = r.PollForEventsService = r.PingService = r.EventCallbacksHooksService = r.AccountScriptsFilesService = r.AccountInformationService = r.SnapshotDTO = r.ServerImageDTO = r.ServerDTO = r.PriceDTO = r.PostServerModelDTO = r.Ping = r.EventLogDTO = r.CreateEventHookModelDTO = r.OpenAPI = r.CancelError = r.CancelablePromise = r.ApiError = void 0;
|
|
3972
|
+
var e = Pt();
|
|
3973
|
+
Object.defineProperty(r, "ApiError", { enumerable: !0, get: function() {
|
|
3974
|
+
return e.ApiError;
|
|
3975
|
+
} });
|
|
3976
|
+
var t = wt();
|
|
3977
|
+
Object.defineProperty(r, "CancelablePromise", { enumerable: !0, get: function() {
|
|
3978
|
+
return t.CancelablePromise;
|
|
3979
|
+
} }), Object.defineProperty(r, "CancelError", { enumerable: !0, get: function() {
|
|
3980
|
+
return t.CancelError;
|
|
3981
|
+
} });
|
|
3982
|
+
var n = G();
|
|
3983
|
+
Object.defineProperty(r, "OpenAPI", { enumerable: !0, get: function() {
|
|
3984
|
+
return n.OpenAPI;
|
|
3985
|
+
} });
|
|
3986
|
+
var s = Ps();
|
|
3987
|
+
Object.defineProperty(r, "CreateEventHookModelDTO", { enumerable: !0, get: function() {
|
|
3988
|
+
return s.CreateEventHookModelDTO;
|
|
3989
|
+
} });
|
|
3990
|
+
var o = ws();
|
|
3991
|
+
Object.defineProperty(r, "EventLogDTO", { enumerable: !0, get: function() {
|
|
3992
|
+
return o.EventLogDTO;
|
|
3993
|
+
} });
|
|
3994
|
+
var i = As();
|
|
3995
|
+
Object.defineProperty(r, "Ping", { enumerable: !0, get: function() {
|
|
3996
|
+
return i.Ping;
|
|
3997
|
+
} });
|
|
3998
|
+
var a = Rs();
|
|
3999
|
+
Object.defineProperty(r, "PostServerModelDTO", { enumerable: !0, get: function() {
|
|
4000
|
+
return a.PostServerModelDTO;
|
|
4001
|
+
} });
|
|
4002
|
+
var b = ks();
|
|
4003
|
+
Object.defineProperty(r, "PriceDTO", { enumerable: !0, get: function() {
|
|
4004
|
+
return b.PriceDTO;
|
|
4005
|
+
} });
|
|
4006
|
+
var m = Is();
|
|
4007
|
+
Object.defineProperty(r, "ServerDTO", { enumerable: !0, get: function() {
|
|
4008
|
+
return m.ServerDTO;
|
|
4009
|
+
} });
|
|
4010
|
+
var f = Ds();
|
|
4011
|
+
Object.defineProperty(r, "ServerImageDTO", { enumerable: !0, get: function() {
|
|
4012
|
+
return f.ServerImageDTO;
|
|
4013
|
+
} });
|
|
4014
|
+
var E = Cs();
|
|
4015
|
+
Object.defineProperty(r, "SnapshotDTO", { enumerable: !0, get: function() {
|
|
4016
|
+
return E.SnapshotDTO;
|
|
4017
|
+
} });
|
|
4018
|
+
var A = js();
|
|
4019
|
+
Object.defineProperty(r, "AccountInformationService", { enumerable: !0, get: function() {
|
|
4020
|
+
return A.AccountInformationService;
|
|
4021
|
+
} });
|
|
4022
|
+
var D = Us();
|
|
4023
|
+
Object.defineProperty(r, "AccountScriptsFilesService", { enumerable: !0, get: function() {
|
|
4024
|
+
return D.AccountScriptsFilesService;
|
|
4025
|
+
} });
|
|
4026
|
+
var h = Fs();
|
|
4027
|
+
Object.defineProperty(r, "EventCallbacksHooksService", { enumerable: !0, get: function() {
|
|
4028
|
+
return h.EventCallbacksHooksService;
|
|
4029
|
+
} });
|
|
4030
|
+
var O = Ls();
|
|
4031
|
+
Object.defineProperty(r, "PingService", { enumerable: !0, get: function() {
|
|
4032
|
+
return O.PingService;
|
|
4033
|
+
} });
|
|
4034
|
+
var g = Bs();
|
|
4035
|
+
Object.defineProperty(r, "PollForEventsService", { enumerable: !0, get: function() {
|
|
4036
|
+
return g.PollForEventsService;
|
|
4037
|
+
} });
|
|
4038
|
+
var I = Ms();
|
|
4039
|
+
Object.defineProperty(r, "PublicKeysService", { enumerable: !0, get: function() {
|
|
4040
|
+
return I.PublicKeysService;
|
|
4041
|
+
} });
|
|
4042
|
+
var M = Hs();
|
|
4043
|
+
Object.defineProperty(r, "ScriptLibraryService", { enumerable: !0, get: function() {
|
|
4044
|
+
return M.ScriptLibraryService;
|
|
4045
|
+
} });
|
|
4046
|
+
var N = xs();
|
|
4047
|
+
Object.defineProperty(r, "ServerActionsService", { enumerable: !0, get: function() {
|
|
4048
|
+
return N.ServerActionsService;
|
|
4049
|
+
} });
|
|
4050
|
+
var F = Vs();
|
|
4051
|
+
Object.defineProperty(r, "ServerConfigurationsService", { enumerable: !0, get: function() {
|
|
4052
|
+
return F.ServerConfigurationsService;
|
|
4053
|
+
} });
|
|
4054
|
+
var B = Gs();
|
|
4055
|
+
Object.defineProperty(r, "ServerMetricsService", { enumerable: !0, get: function() {
|
|
4056
|
+
return B.ServerMetricsService;
|
|
4057
|
+
} });
|
|
4058
|
+
var W = Ks();
|
|
4059
|
+
Object.defineProperty(r, "ServersService", { enumerable: !0, get: function() {
|
|
4060
|
+
return W.ServersService;
|
|
4061
|
+
} });
|
|
4062
|
+
var H = $s();
|
|
4063
|
+
Object.defineProperty(r, "ServerScriptsFilesService", { enumerable: !0, get: function() {
|
|
4064
|
+
return H.ServerScriptsFilesService;
|
|
4065
|
+
} });
|
|
4066
|
+
var Z = zs();
|
|
4067
|
+
Object.defineProperty(r, "ServerSnapshotsService", { enumerable: !0, get: function() {
|
|
4068
|
+
return Z.ServerSnapshotsService;
|
|
4069
|
+
} });
|
|
4070
|
+
var Y = Ws();
|
|
4071
|
+
Object.defineProperty(r, "ShellUsersService", { enumerable: !0, get: function() {
|
|
4072
|
+
return Y.ShellUsersService;
|
|
4073
|
+
} });
|
|
4074
|
+
})(Ke)), Ke;
|
|
4075
|
+
}
|
|
4076
|
+
var At = Js();
|
|
4077
|
+
const Xs = /* @__PURE__ */ qt(At), Ys = /* @__PURE__ */ Ct({
|
|
4078
|
+
__proto__: null,
|
|
4079
|
+
default: Xs
|
|
4080
|
+
}, [At]);
|
|
4081
|
+
class Qs {
|
|
4082
|
+
constructor(e) {
|
|
4083
|
+
this.parent = e;
|
|
4084
|
+
}
|
|
4085
|
+
async fetch(e) {
|
|
4086
|
+
return await w({
|
|
4087
|
+
token: this.parent.string_token,
|
|
4088
|
+
endpoint: `/events?callbackId=${e}`,
|
|
4089
|
+
log: !1,
|
|
4090
|
+
method: "GET"
|
|
4091
|
+
});
|
|
4092
|
+
}
|
|
4093
|
+
}
|
|
4094
|
+
process.env.MODE != "PROD" && Ft.config();
|
|
4095
|
+
const _o = Ys;
|
|
4096
|
+
class To {
|
|
4097
|
+
constructor(e) {
|
|
4098
|
+
this.string_token = e, this.account = new hs(this), this.images = new ms(this), this.profiles = new ys(this), this.events = new vs(this), this.hooks = new Ss(this), this.location = new bs(this), this.scripts = new gs(this), this.servers = new Es(this), this.shellUsers = new Os(this), this.sshkeys = new _s(this), this.snapshots = new Ts(this), this.operation = new Qs(this);
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
export {
|
|
4102
|
+
To as Webdock,
|
|
4103
|
+
_o as oldWebdock
|
|
4104
|
+
};
|
|
4105
|
+
//# sourceMappingURL=index.mjs.map
|