@libretexts/cxone-expert-node 1.1.1 → 1.2.0

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