@ezpaarse-project/ezreeport-sdk-js 1.0.0-beta.9 → 1.0.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 (100) hide show
  1. package/dist/browser/ezreeport-sdk-js.mjs +597 -1968
  2. package/dist/browser/ezreeport-sdk-js.mjs.map +1 -1
  3. package/dist/browser/ezreeport-sdk-js.umd.js +1 -3
  4. package/dist/browser/ezreeport-sdk-js.umd.js.map +1 -1
  5. package/dist/node/ezreeport-sdk-js.js +2 -0
  6. package/dist/node/ezreeport-sdk-js.js.map +1 -0
  7. package/dist/node/ezreeport-sdk-js.mjs +978 -0
  8. package/dist/node/ezreeport-sdk-js.mjs.map +1 -0
  9. package/dist/types/{src/index.d.ts → index.d.ts} +4 -2
  10. package/dist/types/{src/lib → lib}/axios.d.ts +2 -2
  11. package/dist/types/{src/lib → lib}/utils.d.ts +5 -0
  12. package/dist/types/{src/modules → modules}/queues.d.ts +2 -4
  13. package/dist/types/{src/modules → modules}/tasks.d.ts +26 -4
  14. package/dist/types/modules/tasks.public.d.ts +2 -0
  15. package/dist/types/{src/modules → modules}/tasksActivity.d.ts +2 -4
  16. package/dist/types/modules/tasksPresets.d.ts +83 -0
  17. package/dist/types/modules/tasksPresets.public.d.ts +1 -0
  18. package/package.json +17 -14
  19. package/dist/node/package.json +0 -58
  20. package/dist/node/src/index.js +0 -42
  21. package/dist/node/src/index.js.map +0 -1
  22. package/dist/node/src/lib/axios.js +0 -95
  23. package/dist/node/src/lib/axios.js.map +0 -1
  24. package/dist/node/src/lib/promises.js +0 -41
  25. package/dist/node/src/lib/promises.js.map +0 -1
  26. package/dist/node/src/lib/utils.js +0 -24
  27. package/dist/node/src/lib/utils.js.map +0 -1
  28. package/dist/node/src/modules/auth.js +0 -111
  29. package/dist/node/src/modules/auth.js.map +0 -1
  30. package/dist/node/src/modules/auth.public.js +0 -11
  31. package/dist/node/src/modules/auth.public.js.map +0 -1
  32. package/dist/node/src/modules/crons.js +0 -128
  33. package/dist/node/src/modules/crons.js.map +0 -1
  34. package/dist/node/src/modules/crons.public.js +0 -11
  35. package/dist/node/src/modules/crons.public.js.map +0 -1
  36. package/dist/node/src/modules/elastic.js +0 -31
  37. package/dist/node/src/modules/elastic.js.map +0 -1
  38. package/dist/node/src/modules/elastic.public.js +0 -7
  39. package/dist/node/src/modules/elastic.public.js.map +0 -1
  40. package/dist/node/src/modules/health.js +0 -60
  41. package/dist/node/src/modules/health.js.map +0 -1
  42. package/dist/node/src/modules/health.public.js +0 -9
  43. package/dist/node/src/modules/health.public.js.map +0 -1
  44. package/dist/node/src/modules/history.js +0 -62
  45. package/dist/node/src/modules/history.js.map +0 -1
  46. package/dist/node/src/modules/history.public.js +0 -6
  47. package/dist/node/src/modules/history.public.js.map +0 -1
  48. package/dist/node/src/modules/namespaces.js +0 -15
  49. package/dist/node/src/modules/namespaces.js.map +0 -1
  50. package/dist/node/src/modules/namespaces.public.js +0 -3
  51. package/dist/node/src/modules/namespaces.public.js.map +0 -1
  52. package/dist/node/src/modules/queues.js +0 -179
  53. package/dist/node/src/modules/queues.js.map +0 -1
  54. package/dist/node/src/modules/queues.public.js +0 -13
  55. package/dist/node/src/modules/queues.public.js.map +0 -1
  56. package/dist/node/src/modules/reports.js +0 -267
  57. package/dist/node/src/modules/reports.js.map +0 -1
  58. package/dist/node/src/modules/reports.public.js +0 -13
  59. package/dist/node/src/modules/reports.public.js.map +0 -1
  60. package/dist/node/src/modules/setup.js +0 -35
  61. package/dist/node/src/modules/setup.js.map +0 -1
  62. package/dist/node/src/modules/setup.public.js +0 -12
  63. package/dist/node/src/modules/setup.public.js.map +0 -1
  64. package/dist/node/src/modules/tasks.base.js +0 -51
  65. package/dist/node/src/modules/tasks.base.js.map +0 -1
  66. package/dist/node/src/modules/tasks.js +0 -264
  67. package/dist/node/src/modules/tasks.js.map +0 -1
  68. package/dist/node/src/modules/tasks.public.js +0 -20
  69. package/dist/node/src/modules/tasks.public.js.map +0 -1
  70. package/dist/node/src/modules/tasksActivity.js +0 -62
  71. package/dist/node/src/modules/tasksActivity.js.map +0 -1
  72. package/dist/node/src/modules/tasksActivity.public.js +0 -6
  73. package/dist/node/src/modules/tasksActivity.public.js.map +0 -1
  74. package/dist/node/src/modules/templates.js +0 -136
  75. package/dist/node/src/modules/templates.js.map +0 -1
  76. package/dist/node/src/modules/templates.public.js +0 -11
  77. package/dist/node/src/modules/templates.public.js.map +0 -1
  78. package/dist/types/src/modules/history.d.ts +0 -38
  79. package/dist/types/src/modules/history.public.d.ts +0 -1
  80. package/dist/types/src/modules/tasks.public.d.ts +0 -2
  81. /package/dist/types/{src/lib → lib}/promises.d.ts +0 -0
  82. /package/dist/types/{src/modules → modules}/auth.d.ts +0 -0
  83. /package/dist/types/{src/modules → modules}/auth.public.d.ts +0 -0
  84. /package/dist/types/{src/modules → modules}/crons.d.ts +0 -0
  85. /package/dist/types/{src/modules → modules}/crons.public.d.ts +0 -0
  86. /package/dist/types/{src/modules → modules}/elastic.d.ts +0 -0
  87. /package/dist/types/{src/modules → modules}/elastic.public.d.ts +0 -0
  88. /package/dist/types/{src/modules → modules}/health.d.ts +0 -0
  89. /package/dist/types/{src/modules → modules}/health.public.d.ts +0 -0
  90. /package/dist/types/{src/modules → modules}/namespaces.d.ts +0 -0
  91. /package/dist/types/{src/modules → modules}/namespaces.public.d.ts +0 -0
  92. /package/dist/types/{src/modules → modules}/queues.public.d.ts +0 -0
  93. /package/dist/types/{src/modules → modules}/reports.d.ts +0 -0
  94. /package/dist/types/{src/modules → modules}/reports.public.d.ts +0 -0
  95. /package/dist/types/{src/modules → modules}/setup.d.ts +0 -0
  96. /package/dist/types/{src/modules → modules}/setup.public.d.ts +0 -0
  97. /package/dist/types/{src/modules → modules}/tasks.base.d.ts +0 -0
  98. /package/dist/types/{src/modules → modules}/tasksActivity.public.d.ts +0 -0
  99. /package/dist/types/{src/modules → modules}/templates.d.ts +0 -0
  100. /package/dist/types/{src/modules → modules}/templates.public.d.ts +0 -0
@@ -1,1721 +1,292 @@
1
- function Ot(e) {
2
- if (e === null || e === !0 || e === !1)
3
- return NaN;
4
- var t = Number(e);
5
- return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
6
- }
7
- function Lt(e, t) {
8
- if (t.length < e)
9
- throw new TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
10
- }
11
- var ke = 6e4, Fe = 36e5;
12
- function b(e, t) {
13
- var n;
14
- Lt(1, arguments);
15
- var r = Ot((n = t == null ? void 0 : t.additionalDigits) !== null && n !== void 0 ? n : 2);
16
- if (r !== 2 && r !== 1 && r !== 0)
17
- throw new RangeError("additionalDigits must be 0, 1 or 2");
18
- if (!(typeof e == "string" || Object.prototype.toString.call(e) === "[object String]"))
19
- return /* @__PURE__ */ new Date(NaN);
20
- var s = $t(e), o;
1
+ import se, { AxiosError as re } from "axios";
2
+ const oe = "1.0.0", S = 6e4, N = 36e5;
3
+ function u(e, t) {
4
+ const n = (t == null ? void 0 : t.additionalDigits) ?? 2, s = ue(e);
5
+ let r;
21
6
  if (s.date) {
22
- var i = Pt(s.date, r);
23
- o = Dt(i.restDateString, i.year);
7
+ const p = le(s.date, n);
8
+ r = pe(p.restDateString, p.year);
24
9
  }
25
- if (!o || isNaN(o.getTime()))
10
+ if (!r || isNaN(r.getTime()))
26
11
  return /* @__PURE__ */ new Date(NaN);
27
- var c = o.getTime(), f = 0, u;
28
- if (s.time && (f = kt(s.time), isNaN(f)))
12
+ const o = r.getTime();
13
+ let a = 0, l;
14
+ if (s.time && (a = de(s.time), isNaN(a)))
29
15
  return /* @__PURE__ */ new Date(NaN);
30
16
  if (s.timezone) {
31
- if (u = Ft(s.timezone), isNaN(u))
17
+ if (l = fe(s.timezone), isNaN(l))
32
18
  return /* @__PURE__ */ new Date(NaN);
33
19
  } else {
34
- var l = new Date(c + f), h = /* @__PURE__ */ new Date(0);
35
- return h.setFullYear(l.getUTCFullYear(), l.getUTCMonth(), l.getUTCDate()), h.setHours(l.getUTCHours(), l.getUTCMinutes(), l.getUTCSeconds(), l.getUTCMilliseconds()), h;
36
- }
37
- return new Date(c + f + u);
38
- }
39
- var q = {
20
+ const p = new Date(o + a), d = /* @__PURE__ */ new Date(0);
21
+ return d.setFullYear(
22
+ p.getUTCFullYear(),
23
+ p.getUTCMonth(),
24
+ p.getUTCDate()
25
+ ), d.setHours(
26
+ p.getUTCHours(),
27
+ p.getUTCMinutes(),
28
+ p.getUTCSeconds(),
29
+ p.getUTCMilliseconds()
30
+ ), d;
31
+ }
32
+ return new Date(o + a + l);
33
+ }
34
+ const _ = {
40
35
  dateTimeDelimiter: /[T ]/,
41
36
  timeZoneDelimiter: /[Z ]/i,
42
37
  timezone: /([Z+-].*)$/
43
- }, Nt = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, xt = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, Ct = /^([+-])(\d{2})(?::?(\d{2}))?$/;
44
- function $t(e) {
45
- var t = {}, n = e.split(q.dateTimeDelimiter), r;
38
+ }, ae = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, ie = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, ce = /^([+-])(\d{2})(?::?(\d{2}))?$/;
39
+ function ue(e) {
40
+ const t = {}, n = e.split(_.dateTimeDelimiter);
41
+ let s;
46
42
  if (n.length > 2)
47
43
  return t;
48
- if (/:/.test(n[0]) ? r = n[0] : (t.date = n[0], r = n[1], q.timeZoneDelimiter.test(t.date) && (t.date = e.split(q.timeZoneDelimiter)[0], r = e.substr(t.date.length, e.length))), r) {
49
- var s = q.timezone.exec(r);
50
- s ? (t.time = r.replace(s[1], ""), t.timezone = s[1]) : t.time = r;
44
+ if (/:/.test(n[0]) ? s = n[0] : (t.date = n[0], s = n[1], _.timeZoneDelimiter.test(t.date) && (t.date = e.split(_.timeZoneDelimiter)[0], s = e.substr(
45
+ t.date.length,
46
+ e.length
47
+ ))), s) {
48
+ const r = _.timezone.exec(s);
49
+ r ? (t.time = s.replace(r[1], ""), t.timezone = r[1]) : t.time = s;
51
50
  }
52
51
  return t;
53
52
  }
54
- function Pt(e, t) {
55
- var n = new RegExp("^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"), r = e.match(n);
56
- if (!r)
57
- return {
58
- year: NaN,
59
- restDateString: ""
60
- };
61
- var s = r[1] ? parseInt(r[1]) : null, o = r[2] ? parseInt(r[2]) : null;
53
+ function le(e, t) {
54
+ const n = new RegExp(
55
+ "^(?:(\\d{4}|[+-]\\d{" + (4 + t) + "})|(\\d{2}|[+-]\\d{" + (2 + t) + "})$)"
56
+ ), s = e.match(n);
57
+ if (!s)
58
+ return { year: NaN, restDateString: "" };
59
+ const r = s[1] ? parseInt(s[1]) : null, o = s[2] ? parseInt(s[2]) : null;
62
60
  return {
63
- year: o === null ? s : o * 100,
64
- restDateString: e.slice((r[1] || r[2]).length)
61
+ year: o === null ? r : o * 100,
62
+ restDateString: e.slice((s[1] || s[2]).length)
65
63
  };
66
64
  }
67
- function Dt(e, t) {
65
+ function pe(e, t) {
68
66
  if (t === null)
69
67
  return /* @__PURE__ */ new Date(NaN);
70
- var n = e.match(Nt);
68
+ const n = e.match(ae);
71
69
  if (!n)
72
70
  return /* @__PURE__ */ new Date(NaN);
73
- var r = !!n[4], s = j(n[1]), o = j(n[2]) - 1, i = j(n[3]), c = j(n[4]), f = j(n[5]) - 1;
74
- if (r)
75
- return zt(t, c, f) ? jt(t, c, f) : /* @__PURE__ */ new Date(NaN);
76
- var u = /* @__PURE__ */ new Date(0);
77
- return !Bt(t, o, i) || !Mt(t, s) ? /* @__PURE__ */ new Date(NaN) : (u.setUTCFullYear(t, o, Math.max(s, i)), u);
71
+ const s = !!n[4], r = h(n[1]), o = h(n[2]) - 1, a = h(n[3]), l = h(n[4]), p = h(n[5]) - 1;
72
+ if (s)
73
+ return he(t, l, p) ? ge(t, l, p) : /* @__PURE__ */ new Date(NaN);
74
+ {
75
+ const d = /* @__PURE__ */ new Date(0);
76
+ return !me(t, o, a) || !ve(t, r) ? /* @__PURE__ */ new Date(NaN) : (d.setUTCFullYear(t, o, Math.max(r, a)), d);
77
+ }
78
78
  }
79
- function j(e) {
79
+ function h(e) {
80
80
  return e ? parseInt(e) : 1;
81
81
  }
82
- function kt(e) {
83
- var t = e.match(xt);
82
+ function de(e) {
83
+ const t = e.match(ie);
84
84
  if (!t)
85
85
  return NaN;
86
- var n = se(t[1]), r = se(t[2]), s = se(t[3]);
87
- return Ht(n, r, s) ? n * Fe + r * ke + s * 1e3 : NaN;
86
+ const n = L(t[1]), s = L(t[2]), r = L(t[3]);
87
+ return we(n, s, r) ? n * N + s * S + r * 1e3 : NaN;
88
88
  }
89
- function se(e) {
89
+ function L(e) {
90
90
  return e && parseFloat(e.replace(",", ".")) || 0;
91
91
  }
92
- function Ft(e) {
92
+ function fe(e) {
93
93
  if (e === "Z")
94
94
  return 0;
95
- var t = e.match(Ct);
95
+ const t = e.match(ce);
96
96
  if (!t)
97
97
  return 0;
98
- var n = t[1] === "+" ? -1 : 1, r = parseInt(t[2]), s = t[3] && parseInt(t[3]) || 0;
99
- return It(r, s) ? n * (r * Fe + s * ke) : NaN;
98
+ const n = t[1] === "+" ? -1 : 1, s = parseInt(t[2]), r = t[3] && parseInt(t[3]) || 0;
99
+ return _e(s, r) ? n * (s * N + r * S) : NaN;
100
100
  }
101
- function jt(e, t, n) {
102
- var r = /* @__PURE__ */ new Date(0);
103
- r.setUTCFullYear(e, 0, 4);
104
- var s = r.getUTCDay() || 7, o = (t - 1) * 7 + n + 1 - s;
105
- return r.setUTCDate(r.getUTCDate() + o), r;
101
+ function ge(e, t, n) {
102
+ const s = /* @__PURE__ */ new Date(0);
103
+ s.setUTCFullYear(e, 0, 4);
104
+ const r = s.getUTCDay() || 7, o = (t - 1) * 7 + n + 1 - r;
105
+ return s.setUTCDate(s.getUTCDate() + o), s;
106
106
  }
107
- var Ut = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
108
- function je(e) {
107
+ const ye = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
108
+ function P(e) {
109
109
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
110
110
  }
111
- function Bt(e, t, n) {
112
- return t >= 0 && t <= 11 && n >= 1 && n <= (Ut[t] || (je(e) ? 29 : 28));
111
+ function me(e, t, n) {
112
+ return t >= 0 && t <= 11 && n >= 1 && n <= (ye[t] || (P(e) ? 29 : 28));
113
113
  }
114
- function Mt(e, t) {
115
- return t >= 1 && t <= (je(e) ? 366 : 365);
114
+ function ve(e, t) {
115
+ return t >= 1 && t <= (P(e) ? 366 : 365);
116
116
  }
117
- function zt(e, t, n) {
117
+ function he(e, t, n) {
118
118
  return t >= 1 && t <= 53 && n >= 0 && n <= 6;
119
119
  }
120
- function Ht(e, t, n) {
120
+ function we(e, t, n) {
121
121
  return e === 24 ? t === 0 && n === 0 : n >= 0 && n < 60 && t >= 0 && t < 60 && e >= 0 && e < 25;
122
122
  }
123
- function It(e, t) {
123
+ function _e(e, t) {
124
124
  return t >= 0 && t <= 59;
125
125
  }
126
- function Ue(e, t) {
127
- return function() {
128
- return e.apply(t, arguments);
129
- };
130
- }
131
- const { toString: qt } = Object.prototype, { getPrototypeOf: pe } = Object, Q = ((e) => (t) => {
132
- const n = qt.call(t);
133
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
134
- })(/* @__PURE__ */ Object.create(null)), R = (e) => (e = e.toLowerCase(), (t) => Q(t) === e), Z = (e) => (t) => typeof t === e, { isArray: P } = Array, B = Z("undefined");
135
- function Jt(e) {
136
- return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
137
- }
138
- const Be = R("ArrayBuffer");
139
- function Wt(e) {
140
- let t;
141
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Be(e.buffer), t;
142
- }
143
- const Kt = Z("string"), A = Z("function"), Me = Z("number"), X = (e) => e !== null && typeof e == "object", Vt = (e) => e === !0 || e === !1, J = (e) => {
144
- if (Q(e) !== "object")
145
- return !1;
146
- const t = pe(e);
147
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
148
- }, Yt = R("Date"), Gt = R("File"), Qt = R("Blob"), Zt = R("FileList"), Xt = (e) => X(e) && A(e.pipe), en = (e) => {
149
- let t;
150
- return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = Q(e)) === "formdata" || // detect form-data instance
151
- t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
152
- }, tn = R("URLSearchParams"), nn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
153
- function M(e, t, { allOwnKeys: n = !1 } = {}) {
154
- if (e === null || typeof e > "u")
155
- return;
156
- let r, s;
157
- if (typeof e != "object" && (e = [e]), P(e))
158
- for (r = 0, s = e.length; r < s; r++)
159
- t.call(null, e[r], r, e);
160
- else {
161
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
162
- let c;
163
- for (r = 0; r < i; r++)
164
- c = o[r], t.call(null, e[c], c, e);
165
- }
166
- }
167
- function ze(e, t) {
168
- t = t.toLowerCase();
169
- const n = Object.keys(e);
170
- let r = n.length, s;
171
- for (; r-- > 0; )
172
- if (s = n[r], t === s.toLowerCase())
173
- return s;
174
- return null;
175
- }
176
- const He = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ie = (e) => !B(e) && e !== He;
177
- function ue() {
178
- const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
179
- const o = e && ze(t, s) || s;
180
- J(t[o]) && J(r) ? t[o] = ue(t[o], r) : J(r) ? t[o] = ue({}, r) : P(r) ? t[o] = r.slice() : t[o] = r;
181
- };
182
- for (let r = 0, s = arguments.length; r < s; r++)
183
- arguments[r] && M(arguments[r], n);
184
- return t;
185
- }
186
- const rn = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
187
- n && A(s) ? e[o] = Ue(s, n) : e[o] = s;
188
- }, { allOwnKeys: r }), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), on = (e, t, n, r) => {
189
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
190
- value: t.prototype
191
- }), n && Object.assign(e.prototype, n);
192
- }, an = (e, t, n, r) => {
193
- let s, o, i;
194
- const c = {};
195
- if (t = t || {}, e == null)
196
- return t;
197
- do {
198
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
199
- i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
200
- e = n !== !1 && pe(e);
201
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
202
- return t;
203
- }, cn = (e, t, n) => {
204
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
205
- const r = e.indexOf(t, n);
206
- return r !== -1 && r === n;
207
- }, un = (e) => {
208
- if (!e)
209
- return null;
210
- if (P(e))
211
- return e;
212
- let t = e.length;
213
- if (!Me(t))
214
- return null;
215
- const n = new Array(t);
216
- for (; t-- > 0; )
217
- n[t] = e[t];
218
- return n;
219
- }, ln = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && pe(Uint8Array)), fn = (e, t) => {
220
- const r = (e && e[Symbol.iterator]).call(e);
221
- let s;
222
- for (; (s = r.next()) && !s.done; ) {
223
- const o = s.value;
224
- t.call(e, o[0], o[1]);
225
- }
226
- }, dn = (e, t) => {
227
- let n;
228
- const r = [];
229
- for (; (n = e.exec(t)) !== null; )
230
- r.push(n);
231
- return r;
232
- }, pn = R("HTMLFormElement"), hn = (e) => e.toLowerCase().replace(
233
- /[-_\s]([a-z\d])(\w*)/g,
234
- function(n, r, s) {
235
- return r.toUpperCase() + s;
236
- }
237
- ), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mn = R("RegExp"), qe = (e, t) => {
238
- const n = Object.getOwnPropertyDescriptors(e), r = {};
239
- M(n, (s, o) => {
240
- let i;
241
- (i = t(s, o, e)) !== !1 && (r[o] = i || s);
242
- }), Object.defineProperties(e, r);
243
- }, yn = (e) => {
244
- qe(e, (t, n) => {
245
- if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
246
- return !1;
247
- const r = e[n];
248
- if (A(r)) {
249
- if (t.enumerable = !1, "writable" in t) {
250
- t.writable = !1;
251
- return;
252
- }
253
- t.set || (t.set = () => {
254
- throw Error("Can not rewrite read-only method '" + n + "'");
255
- });
256
- }
257
- });
258
- }, gn = (e, t) => {
259
- const n = {}, r = (s) => {
260
- s.forEach((o) => {
261
- n[o] = !0;
262
- });
263
- };
264
- return P(e) ? r(e) : r(String(e).split(t)), n;
265
- }, wn = () => {
266
- }, bn = (e, t) => (e = +e, Number.isFinite(e) ? e : t), oe = "abcdefghijklmnopqrstuvwxyz", Se = "0123456789", Je = {
267
- DIGIT: Se,
268
- ALPHA: oe,
269
- ALPHA_DIGIT: oe + oe.toUpperCase() + Se
270
- }, En = (e = 16, t = Je.ALPHA_DIGIT) => {
271
- let n = "";
272
- const { length: r } = t;
273
- for (; e--; )
274
- n += t[Math.random() * r | 0];
275
- return n;
276
- };
277
- function vn(e) {
278
- return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
279
- }
280
- const An = (e) => {
281
- const t = new Array(10), n = (r, s) => {
282
- if (X(r)) {
283
- if (t.indexOf(r) >= 0)
284
- return;
285
- if (!("toJSON" in r)) {
286
- t[s] = r;
287
- const o = P(r) ? [] : {};
288
- return M(r, (i, c) => {
289
- const f = n(i, s + 1);
290
- !B(f) && (o[c] = f);
291
- }), t[s] = void 0, o;
292
- }
293
- }
294
- return r;
295
- };
296
- return n(e, 0);
297
- }, Tn = R("AsyncFunction"), Sn = (e) => e && (X(e) || A(e)) && A(e.then) && A(e.catch), a = {
298
- isArray: P,
299
- isArrayBuffer: Be,
300
- isBuffer: Jt,
301
- isFormData: en,
302
- isArrayBufferView: Wt,
303
- isString: Kt,
304
- isNumber: Me,
305
- isBoolean: Vt,
306
- isObject: X,
307
- isPlainObject: J,
308
- isUndefined: B,
309
- isDate: Yt,
310
- isFile: Gt,
311
- isBlob: Qt,
312
- isRegExp: mn,
313
- isFunction: A,
314
- isStream: Xt,
315
- isURLSearchParams: tn,
316
- isTypedArray: ln,
317
- isFileList: Zt,
318
- forEach: M,
319
- merge: ue,
320
- extend: rn,
321
- trim: nn,
322
- stripBOM: sn,
323
- inherits: on,
324
- toFlatObject: an,
325
- kindOf: Q,
326
- kindOfTest: R,
327
- endsWith: cn,
328
- toArray: un,
329
- forEachEntry: fn,
330
- matchAll: dn,
331
- isHTMLForm: pn,
332
- hasOwnProperty: Te,
333
- hasOwnProp: Te,
334
- // an alias to avoid ESLint no-prototype-builtins detection
335
- reduceDescriptors: qe,
336
- freezeMethods: yn,
337
- toObjectSet: gn,
338
- toCamelCase: hn,
339
- noop: wn,
340
- toFiniteNumber: bn,
341
- findKey: ze,
342
- global: He,
343
- isContextDefined: Ie,
344
- ALPHABET: Je,
345
- generateString: En,
346
- isSpecCompliantForm: vn,
347
- toJSONObject: An,
348
- isAsyncFn: Tn,
349
- isThenable: Sn
350
- };
351
- function y(e, t, n, r, s) {
352
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
353
- }
354
- a.inherits(y, Error, {
355
- toJSON: function() {
356
- return {
357
- // Standard
358
- message: this.message,
359
- name: this.name,
360
- // Microsoft
361
- description: this.description,
362
- number: this.number,
363
- // Mozilla
364
- fileName: this.fileName,
365
- lineNumber: this.lineNumber,
366
- columnNumber: this.columnNumber,
367
- stack: this.stack,
368
- // Axios
369
- config: a.toJSONObject(this.config),
370
- code: this.code,
371
- status: this.response && this.response.status ? this.response.status : null
372
- };
373
- }
374
- });
375
- const We = y.prototype, Ke = {};
376
- [
377
- "ERR_BAD_OPTION_VALUE",
378
- "ERR_BAD_OPTION",
379
- "ECONNABORTED",
380
- "ETIMEDOUT",
381
- "ERR_NETWORK",
382
- "ERR_FR_TOO_MANY_REDIRECTS",
383
- "ERR_DEPRECATED",
384
- "ERR_BAD_RESPONSE",
385
- "ERR_BAD_REQUEST",
386
- "ERR_CANCELED",
387
- "ERR_NOT_SUPPORT",
388
- "ERR_INVALID_URL"
389
- // eslint-disable-next-line func-names
390
- ].forEach((e) => {
391
- Ke[e] = { value: e };
392
- });
393
- Object.defineProperties(y, Ke);
394
- Object.defineProperty(We, "isAxiosError", { value: !0 });
395
- y.from = (e, t, n, r, s, o) => {
396
- const i = Object.create(We);
397
- return a.toFlatObject(e, i, function(f) {
398
- return f !== Error.prototype;
399
- }, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
400
- };
401
- const Rn = null;
402
- function le(e) {
403
- return a.isPlainObject(e) || a.isArray(e);
404
- }
405
- function Ve(e) {
406
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
407
- }
408
- function Re(e, t, n) {
409
- return e ? e.concat(t).map(function(s, o) {
410
- return s = Ve(s), !n && o ? "[" + s + "]" : s;
411
- }).join(n ? "." : "") : t;
412
- }
413
- function _n(e) {
414
- return a.isArray(e) && !e.some(le);
415
- }
416
- const On = a.toFlatObject(a, {}, null, function(t) {
417
- return /^is[A-Z]/.test(t);
418
- });
419
- function ee(e, t, n) {
420
- if (!a.isObject(e))
421
- throw new TypeError("target must be an object");
422
- t = t || new FormData(), n = a.toFlatObject(n, {
423
- metaTokens: !0,
424
- dots: !1,
425
- indexes: !1
426
- }, !1, function(m, _) {
427
- return !a.isUndefined(_[m]);
428
- });
429
- const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
430
- if (!a.isFunction(s))
431
- throw new TypeError("visitor must be a function");
432
- function u(d) {
433
- if (d === null)
434
- return "";
435
- if (a.isDate(d))
436
- return d.toISOString();
437
- if (!f && a.isBlob(d))
438
- throw new y("Blob is not supported. Use a Buffer instead.");
439
- return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
440
- }
441
- function l(d, m, _) {
442
- let T = d;
443
- if (d && !_ && typeof d == "object") {
444
- if (a.endsWith(m, "{}"))
445
- m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
446
- else if (a.isArray(d) && _n(d) || (a.isFileList(d) || a.endsWith(m, "[]")) && (T = a.toArray(d)))
447
- return m = Ve(m), T.forEach(function(I, _t) {
448
- !(a.isUndefined(I) || I === null) && t.append(
449
- // eslint-disable-next-line no-nested-ternary
450
- i === !0 ? Re([m], _t, o) : i === null ? m : m + "[]",
451
- u(I)
452
- );
453
- }), !1;
454
- }
455
- return le(d) ? !0 : (t.append(Re(_, m, o), u(d)), !1);
456
- }
457
- const h = [], v = Object.assign(On, {
458
- defaultVisitor: l,
459
- convertValue: u,
460
- isVisitable: le
461
- });
462
- function w(d, m) {
463
- if (!a.isUndefined(d)) {
464
- if (h.indexOf(d) !== -1)
465
- throw Error("Circular reference detected in " + m.join("."));
466
- h.push(d), a.forEach(d, function(T, x) {
467
- (!(a.isUndefined(T) || T === null) && s.call(
468
- t,
469
- T,
470
- a.isString(x) ? x.trim() : x,
471
- m,
472
- v
473
- )) === !0 && w(T, m ? m.concat(x) : [x]);
474
- }), h.pop();
475
- }
476
- }
477
- if (!a.isObject(e))
478
- throw new TypeError("data must be an object");
479
- return w(e), t;
480
- }
481
- function _e(e) {
482
- const t = {
483
- "!": "%21",
484
- "'": "%27",
485
- "(": "%28",
486
- ")": "%29",
487
- "~": "%7E",
488
- "%20": "+",
489
- "%00": "\0"
490
- };
491
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
492
- return t[r];
493
- });
494
- }
495
- function he(e, t) {
496
- this._pairs = [], e && ee(e, this, t);
497
- }
498
- const Ye = he.prototype;
499
- Ye.append = function(t, n) {
500
- this._pairs.push([t, n]);
501
- };
502
- Ye.toString = function(t) {
503
- const n = t ? function(r) {
504
- return t.call(this, r, _e);
505
- } : _e;
506
- return this._pairs.map(function(s) {
507
- return n(s[0]) + "=" + n(s[1]);
508
- }, "").join("&");
509
- };
510
- function Ln(e) {
511
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
512
- }
513
- function Ge(e, t, n) {
514
- if (!t)
515
- return e;
516
- const r = n && n.encode || Ln, s = n && n.serialize;
517
- let o;
518
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new he(t, n).toString(r), o) {
519
- const i = e.indexOf("#");
520
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
521
- }
522
- return e;
523
- }
524
- class Nn {
525
- constructor() {
526
- this.handlers = [];
527
- }
528
- /**
529
- * Add a new interceptor to the stack
530
- *
531
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
532
- * @param {Function} rejected The function to handle `reject` for a `Promise`
533
- *
534
- * @return {Number} An ID used to remove interceptor later
535
- */
536
- use(t, n, r) {
537
- return this.handlers.push({
538
- fulfilled: t,
539
- rejected: n,
540
- synchronous: r ? r.synchronous : !1,
541
- runWhen: r ? r.runWhen : null
542
- }), this.handlers.length - 1;
543
- }
544
- /**
545
- * Remove an interceptor from the stack
546
- *
547
- * @param {Number} id The ID that was returned by `use`
548
- *
549
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
550
- */
551
- eject(t) {
552
- this.handlers[t] && (this.handlers[t] = null);
553
- }
554
- /**
555
- * Clear all interceptors from the stack
556
- *
557
- * @returns {void}
558
- */
559
- clear() {
560
- this.handlers && (this.handlers = []);
561
- }
562
- /**
563
- * Iterate over all the registered interceptors
564
- *
565
- * This method is particularly useful for skipping over any
566
- * interceptors that may have become `null` calling `eject`.
567
- *
568
- * @param {Function} fn The function to call for each interceptor
569
- *
570
- * @returns {void}
571
- */
572
- forEach(t) {
573
- a.forEach(this.handlers, function(r) {
574
- r !== null && t(r);
575
- });
576
- }
577
- }
578
- const Oe = Nn, Qe = {
579
- silentJSONParsing: !0,
580
- forcedJSONParsing: !0,
581
- clarifyTimeoutError: !1
582
- }, xn = typeof URLSearchParams < "u" ? URLSearchParams : he, Cn = typeof FormData < "u" ? FormData : null, $n = typeof Blob < "u" ? Blob : null, Pn = (() => {
583
- let e;
584
- return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
585
- })(), Dn = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
586
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), S = {
587
- isBrowser: !0,
588
- classes: {
589
- URLSearchParams: xn,
590
- FormData: Cn,
591
- Blob: $n
592
- },
593
- isStandardBrowserEnv: Pn,
594
- isStandardBrowserWebWorkerEnv: Dn,
595
- protocols: ["http", "https", "file", "blob", "url", "data"]
596
- };
597
- function kn(e, t) {
598
- return ee(e, new S.classes.URLSearchParams(), Object.assign({
599
- visitor: function(n, r, s, o) {
600
- return S.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
601
- }
602
- }, t));
603
- }
604
- function Fn(e) {
605
- return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
606
- }
607
- function jn(e) {
608
- const t = {}, n = Object.keys(e);
609
- let r;
610
- const s = n.length;
611
- let o;
612
- for (r = 0; r < s; r++)
613
- o = n[r], t[o] = e[o];
614
- return t;
615
- }
616
- function Ze(e) {
617
- function t(n, r, s, o) {
618
- let i = n[o++];
619
- const c = Number.isFinite(+i), f = o >= n.length;
620
- return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = jn(s[i])), !c);
621
- }
622
- if (a.isFormData(e) && a.isFunction(e.entries)) {
623
- const n = {};
624
- return a.forEachEntry(e, (r, s) => {
625
- t(Fn(r), s, n, 0);
626
- }), n;
627
- }
628
- return null;
629
- }
630
- function Un(e, t, n) {
631
- if (a.isString(e))
632
- try {
633
- return (t || JSON.parse)(e), a.trim(e);
634
- } catch (r) {
635
- if (r.name !== "SyntaxError")
636
- throw r;
637
- }
638
- return (n || JSON.stringify)(e);
639
- }
640
- const me = {
641
- transitional: Qe,
642
- adapter: S.isNode ? "http" : "xhr",
643
- transformRequest: [function(t, n) {
644
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
645
- if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
646
- return s && s ? JSON.stringify(Ze(t)) : t;
647
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
648
- return t;
649
- if (a.isArrayBufferView(t))
650
- return t.buffer;
651
- if (a.isURLSearchParams(t))
652
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
653
- let c;
654
- if (o) {
655
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
656
- return kn(t, this.formSerializer).toString();
657
- if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
658
- const f = this.env && this.env.FormData;
659
- return ee(
660
- c ? { "files[]": t } : t,
661
- f && new f(),
662
- this.formSerializer
663
- );
664
- }
665
- }
666
- return o || s ? (n.setContentType("application/json", !1), Un(t)) : t;
667
- }],
668
- transformResponse: [function(t) {
669
- const n = this.transitional || me.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
670
- if (t && a.isString(t) && (r && !this.responseType || s)) {
671
- const i = !(n && n.silentJSONParsing) && s;
672
- try {
673
- return JSON.parse(t);
674
- } catch (c) {
675
- if (i)
676
- throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
677
- }
678
- }
679
- return t;
680
- }],
681
- /**
682
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
683
- * timeout is not created.
684
- */
685
- timeout: 0,
686
- xsrfCookieName: "XSRF-TOKEN",
687
- xsrfHeaderName: "X-XSRF-TOKEN",
688
- maxContentLength: -1,
689
- maxBodyLength: -1,
690
- env: {
691
- FormData: S.classes.FormData,
692
- Blob: S.classes.Blob
693
- },
694
- validateStatus: function(t) {
695
- return t >= 200 && t < 300;
696
- },
697
- headers: {
698
- common: {
699
- Accept: "application/json, text/plain, */*",
700
- "Content-Type": void 0
701
- }
702
- }
703
- };
704
- a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
705
- me.headers[e] = {};
706
- });
707
- const ye = me, Bn = a.toObjectSet([
708
- "age",
709
- "authorization",
710
- "content-length",
711
- "content-type",
712
- "etag",
713
- "expires",
714
- "from",
715
- "host",
716
- "if-modified-since",
717
- "if-unmodified-since",
718
- "last-modified",
719
- "location",
720
- "max-forwards",
721
- "proxy-authorization",
722
- "referer",
723
- "retry-after",
724
- "user-agent"
725
- ]), Mn = (e) => {
726
- const t = {};
727
- let n, r, s;
728
- return e && e.split(`
729
- `).forEach(function(i) {
730
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Bn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
731
- }), t;
732
- }, Le = Symbol("internals");
733
- function U(e) {
734
- return e && String(e).trim().toLowerCase();
735
- }
736
- function W(e) {
737
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(W) : String(e);
738
- }
739
- function zn(e) {
740
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
741
- let r;
742
- for (; r = n.exec(e); )
743
- t[r[1]] = r[2];
744
- return t;
745
- }
746
- const Hn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
747
- function ie(e, t, n, r, s) {
748
- if (a.isFunction(r))
749
- return r.call(this, t, n);
750
- if (s && (t = n), !!a.isString(t)) {
751
- if (a.isString(r))
752
- return t.indexOf(r) !== -1;
753
- if (a.isRegExp(r))
754
- return r.test(t);
755
- }
756
- }
757
- function In(e) {
758
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
759
- }
760
- function qn(e, t) {
761
- const n = a.toCamelCase(" " + t);
762
- ["get", "set", "has"].forEach((r) => {
763
- Object.defineProperty(e, r + n, {
764
- value: function(s, o, i) {
765
- return this[r].call(this, t, s, o, i);
766
- },
767
- configurable: !0
768
- });
769
- });
770
- }
771
- let te = class {
772
- constructor(t) {
773
- t && this.set(t);
774
- }
775
- set(t, n, r) {
776
- const s = this;
777
- function o(c, f, u) {
778
- const l = U(f);
779
- if (!l)
780
- throw new Error("header name must be a non-empty string");
781
- const h = a.findKey(s, l);
782
- (!h || s[h] === void 0 || u === !0 || u === void 0 && s[h] !== !1) && (s[h || f] = W(c));
783
- }
784
- const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
785
- return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Hn(t) ? i(Mn(t), n) : t != null && o(n, t, r), this;
786
- }
787
- get(t, n) {
788
- if (t = U(t), t) {
789
- const r = a.findKey(this, t);
790
- if (r) {
791
- const s = this[r];
792
- if (!n)
793
- return s;
794
- if (n === !0)
795
- return zn(s);
796
- if (a.isFunction(n))
797
- return n.call(this, s, r);
798
- if (a.isRegExp(n))
799
- return n.exec(s);
800
- throw new TypeError("parser must be boolean|regexp|function");
801
- }
802
- }
803
- }
804
- has(t, n) {
805
- if (t = U(t), t) {
806
- const r = a.findKey(this, t);
807
- return !!(r && this[r] !== void 0 && (!n || ie(this, this[r], r, n)));
808
- }
809
- return !1;
810
- }
811
- delete(t, n) {
812
- const r = this;
813
- let s = !1;
814
- function o(i) {
815
- if (i = U(i), i) {
816
- const c = a.findKey(r, i);
817
- c && (!n || ie(r, r[c], c, n)) && (delete r[c], s = !0);
818
- }
819
- }
820
- return a.isArray(t) ? t.forEach(o) : o(t), s;
821
- }
822
- clear(t) {
823
- const n = Object.keys(this);
824
- let r = n.length, s = !1;
825
- for (; r--; ) {
826
- const o = n[r];
827
- (!t || ie(this, this[o], o, t, !0)) && (delete this[o], s = !0);
828
- }
829
- return s;
830
- }
831
- normalize(t) {
832
- const n = this, r = {};
833
- return a.forEach(this, (s, o) => {
834
- const i = a.findKey(r, o);
835
- if (i) {
836
- n[i] = W(s), delete n[o];
837
- return;
838
- }
839
- const c = t ? In(o) : String(o).trim();
840
- c !== o && delete n[o], n[c] = W(s), r[c] = !0;
841
- }), this;
842
- }
843
- concat(...t) {
844
- return this.constructor.concat(this, ...t);
845
- }
846
- toJSON(t) {
847
- const n = /* @__PURE__ */ Object.create(null);
848
- return a.forEach(this, (r, s) => {
849
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
850
- }), n;
851
- }
852
- [Symbol.iterator]() {
853
- return Object.entries(this.toJSON())[Symbol.iterator]();
854
- }
855
- toString() {
856
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
857
- `);
858
- }
859
- get [Symbol.toStringTag]() {
860
- return "AxiosHeaders";
861
- }
862
- static from(t) {
863
- return t instanceof this ? t : new this(t);
864
- }
865
- static concat(t, ...n) {
866
- const r = new this(t);
867
- return n.forEach((s) => r.set(s)), r;
868
- }
869
- static accessor(t) {
870
- const r = (this[Le] = this[Le] = {
871
- accessors: {}
872
- }).accessors, s = this.prototype;
873
- function o(i) {
874
- const c = U(i);
875
- r[c] || (qn(s, i), r[c] = !0);
876
- }
877
- return a.isArray(t) ? t.forEach(o) : o(t), this;
878
- }
879
- };
880
- te.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
881
- a.reduceDescriptors(te.prototype, ({ value: e }, t) => {
882
- let n = t[0].toUpperCase() + t.slice(1);
883
- return {
884
- get: () => e,
885
- set(r) {
886
- this[n] = r;
887
- }
888
- };
889
- });
890
- a.freezeMethods(te);
891
- const L = te;
892
- function ae(e, t) {
893
- const n = this || ye, r = t || n, s = L.from(r.headers);
894
- let o = r.data;
895
- return a.forEach(e, function(c) {
896
- o = c.call(n, o, s.normalize(), t ? t.status : void 0);
897
- }), s.normalize(), o;
898
- }
899
- function Xe(e) {
900
- return !!(e && e.__CANCEL__);
901
- }
902
- function z(e, t, n) {
903
- y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
904
- }
905
- a.inherits(z, y, {
906
- __CANCEL__: !0
907
- });
908
- function Jn(e, t, n) {
909
- const r = n.config.validateStatus;
910
- !n.status || !r || r(n.status) ? e(n) : t(new y(
911
- "Request failed with status code " + n.status,
912
- [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
913
- n.config,
914
- n.request,
915
- n
916
- ));
917
- }
918
- const Wn = S.isStandardBrowserEnv ? (
919
- // Standard browser envs support document.cookie
920
- function() {
921
- return {
922
- write: function(n, r, s, o, i, c) {
923
- const f = [];
924
- f.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && f.push("expires=" + new Date(s).toGMTString()), a.isString(o) && f.push("path=" + o), a.isString(i) && f.push("domain=" + i), c === !0 && f.push("secure"), document.cookie = f.join("; ");
925
- },
926
- read: function(n) {
927
- const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
928
- return r ? decodeURIComponent(r[3]) : null;
929
- },
930
- remove: function(n) {
931
- this.write(n, "", Date.now() - 864e5);
932
- }
933
- };
934
- }()
935
- ) : (
936
- // Non standard browser env (web workers, react-native) lack needed support.
937
- function() {
938
- return {
939
- write: function() {
940
- },
941
- read: function() {
942
- return null;
943
- },
944
- remove: function() {
945
- }
946
- };
947
- }()
948
- );
949
- function Kn(e) {
950
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
951
- }
952
- function Vn(e, t) {
953
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
954
- }
955
- function et(e, t) {
956
- return e && !Kn(t) ? Vn(e, t) : t;
957
- }
958
- const Yn = S.isStandardBrowserEnv ? (
959
- // Standard browser envs have full support of the APIs needed to test
960
- // whether the request URL is of the same origin as current location.
961
- function() {
962
- const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
963
- let r;
964
- function s(o) {
965
- let i = o;
966
- return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
967
- href: n.href,
968
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
969
- host: n.host,
970
- search: n.search ? n.search.replace(/^\?/, "") : "",
971
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
972
- hostname: n.hostname,
973
- port: n.port,
974
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
975
- };
976
- }
977
- return r = s(window.location.href), function(i) {
978
- const c = a.isString(i) ? s(i) : i;
979
- return c.protocol === r.protocol && c.host === r.host;
980
- };
981
- }()
982
- ) : (
983
- // Non standard browser envs (web workers, react-native) lack needed support.
984
- function() {
985
- return function() {
986
- return !0;
987
- };
988
- }()
989
- );
990
- function Gn(e) {
991
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
992
- return t && t[1] || "";
993
- }
994
- function Qn(e, t) {
995
- e = e || 10;
996
- const n = new Array(e), r = new Array(e);
997
- let s = 0, o = 0, i;
998
- return t = t !== void 0 ? t : 1e3, function(f) {
999
- const u = Date.now(), l = r[o];
1000
- i || (i = u), n[s] = f, r[s] = u;
1001
- let h = o, v = 0;
1002
- for (; h !== s; )
1003
- v += n[h++], h = h % e;
1004
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
1005
- return;
1006
- const w = l && u - l;
1007
- return w ? Math.round(v * 1e3 / w) : void 0;
1008
- };
1009
- }
1010
- function Ne(e, t) {
1011
- let n = 0;
1012
- const r = Qn(50, 250);
1013
- return (s) => {
1014
- const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, f = r(c), u = o <= i;
1015
- n = o;
1016
- const l = {
1017
- loaded: o,
1018
- total: i,
1019
- progress: i ? o / i : void 0,
1020
- bytes: c,
1021
- rate: f || void 0,
1022
- estimated: f && i && u ? (i - o) / f : void 0,
1023
- event: s
1024
- };
1025
- l[t ? "download" : "upload"] = !0, e(l);
1026
- };
1027
- }
1028
- const Zn = typeof XMLHttpRequest < "u", Xn = Zn && function(e) {
1029
- return new Promise(function(n, r) {
1030
- let s = e.data;
1031
- const o = L.from(e.headers).normalize(), i = e.responseType;
1032
- let c;
1033
- function f() {
1034
- e.cancelToken && e.cancelToken.unsubscribe(c), e.signal && e.signal.removeEventListener("abort", c);
1035
- }
1036
- a.isFormData(s) && (S.isStandardBrowserEnv || S.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1));
1037
- let u = new XMLHttpRequest();
1038
- if (e.auth) {
1039
- const w = e.auth.username || "", d = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
1040
- o.set("Authorization", "Basic " + btoa(w + ":" + d));
1041
- }
1042
- const l = et(e.baseURL, e.url);
1043
- u.open(e.method.toUpperCase(), Ge(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
1044
- function h() {
1045
- if (!u)
1046
- return;
1047
- const w = L.from(
1048
- "getAllResponseHeaders" in u && u.getAllResponseHeaders()
1049
- ), m = {
1050
- data: !i || i === "text" || i === "json" ? u.responseText : u.response,
1051
- status: u.status,
1052
- statusText: u.statusText,
1053
- headers: w,
1054
- config: e,
1055
- request: u
1056
- };
1057
- Jn(function(T) {
1058
- n(T), f();
1059
- }, function(T) {
1060
- r(T), f();
1061
- }, m), u = null;
1062
- }
1063
- if ("onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
1064
- !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(h);
1065
- }, u.onabort = function() {
1066
- u && (r(new y("Request aborted", y.ECONNABORTED, e, u)), u = null);
1067
- }, u.onerror = function() {
1068
- r(new y("Network Error", y.ERR_NETWORK, e, u)), u = null;
1069
- }, u.ontimeout = function() {
1070
- let d = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
1071
- const m = e.transitional || Qe;
1072
- e.timeoutErrorMessage && (d = e.timeoutErrorMessage), r(new y(
1073
- d,
1074
- m.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
1075
- e,
1076
- u
1077
- )), u = null;
1078
- }, S.isStandardBrowserEnv) {
1079
- const w = (e.withCredentials || Yn(l)) && e.xsrfCookieName && Wn.read(e.xsrfCookieName);
1080
- w && o.set(e.xsrfHeaderName, w);
1081
- }
1082
- s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(d, m) {
1083
- u.setRequestHeader(m, d);
1084
- }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ne(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ne(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (w) => {
1085
- u && (r(!w || w.type ? new z(null, e, u) : w), u.abort(), u = null);
1086
- }, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
1087
- const v = Gn(l);
1088
- if (v && S.protocols.indexOf(v) === -1) {
1089
- r(new y("Unsupported protocol " + v + ":", y.ERR_BAD_REQUEST, e));
1090
- return;
1091
- }
1092
- u.send(s || null);
1093
- });
1094
- }, K = {
1095
- http: Rn,
1096
- xhr: Xn
1097
- };
1098
- a.forEach(K, (e, t) => {
1099
- if (e) {
1100
- try {
1101
- Object.defineProperty(e, "name", { value: t });
1102
- } catch {
1103
- }
1104
- Object.defineProperty(e, "adapterName", { value: t });
1105
- }
1106
- });
1107
- const tt = {
1108
- getAdapter: (e) => {
1109
- e = a.isArray(e) ? e : [e];
1110
- const { length: t } = e;
1111
- let n, r;
1112
- for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? K[n.toLowerCase()] : n)); s++)
1113
- ;
1114
- if (!r)
1115
- throw r === !1 ? new y(
1116
- `Adapter ${n} is not supported by the environment`,
1117
- "ERR_NOT_SUPPORT"
1118
- ) : new Error(
1119
- a.hasOwnProp(K, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
1120
- );
1121
- if (!a.isFunction(r))
1122
- throw new TypeError("adapter is not a function");
1123
- return r;
1124
- },
1125
- adapters: K
1126
- };
1127
- function ce(e) {
1128
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1129
- throw new z(null, e);
1130
- }
1131
- function xe(e) {
1132
- return ce(e), e.headers = L.from(e.headers), e.data = ae.call(
1133
- e,
1134
- e.transformRequest
1135
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), tt.getAdapter(e.adapter || ye.adapter)(e).then(function(r) {
1136
- return ce(e), r.data = ae.call(
1137
- e,
1138
- e.transformResponse,
1139
- r
1140
- ), r.headers = L.from(r.headers), r;
1141
- }, function(r) {
1142
- return Xe(r) || (ce(e), r && r.response && (r.response.data = ae.call(
1143
- e,
1144
- e.transformResponse,
1145
- r.response
1146
- ), r.response.headers = L.from(r.response.headers))), Promise.reject(r);
1147
- });
1148
- }
1149
- const Ce = (e) => e instanceof L ? e.toJSON() : e;
1150
- function $(e, t) {
1151
- t = t || {};
1152
- const n = {};
1153
- function r(u, l, h) {
1154
- return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: h }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1155
- }
1156
- function s(u, l, h) {
1157
- if (a.isUndefined(l)) {
1158
- if (!a.isUndefined(u))
1159
- return r(void 0, u, h);
1160
- } else
1161
- return r(u, l, h);
1162
- }
1163
- function o(u, l) {
1164
- if (!a.isUndefined(l))
1165
- return r(void 0, l);
1166
- }
1167
- function i(u, l) {
1168
- if (a.isUndefined(l)) {
1169
- if (!a.isUndefined(u))
1170
- return r(void 0, u);
1171
- } else
1172
- return r(void 0, l);
1173
- }
1174
- function c(u, l, h) {
1175
- if (h in t)
1176
- return r(u, l);
1177
- if (h in e)
1178
- return r(void 0, u);
1179
- }
1180
- const f = {
1181
- url: o,
1182
- method: o,
1183
- data: o,
1184
- baseURL: i,
1185
- transformRequest: i,
1186
- transformResponse: i,
1187
- paramsSerializer: i,
1188
- timeout: i,
1189
- timeoutMessage: i,
1190
- withCredentials: i,
1191
- adapter: i,
1192
- responseType: i,
1193
- xsrfCookieName: i,
1194
- xsrfHeaderName: i,
1195
- onUploadProgress: i,
1196
- onDownloadProgress: i,
1197
- decompress: i,
1198
- maxContentLength: i,
1199
- maxBodyLength: i,
1200
- beforeRedirect: i,
1201
- transport: i,
1202
- httpAgent: i,
1203
- httpsAgent: i,
1204
- cancelToken: i,
1205
- socketPath: i,
1206
- responseEncoding: i,
1207
- validateStatus: c,
1208
- headers: (u, l) => s(Ce(u), Ce(l), !0)
1209
- };
1210
- return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1211
- const h = f[l] || s, v = h(e[l], t[l], l);
1212
- a.isUndefined(v) && h !== c || (n[l] = v);
1213
- }), n;
1214
- }
1215
- const nt = "1.5.0", ge = {};
1216
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1217
- ge[e] = function(r) {
1218
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1219
- };
1220
- });
1221
- const $e = {};
1222
- ge.transitional = function(t, n, r) {
1223
- function s(o, i) {
1224
- return "[Axios v" + nt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1225
- }
1226
- return (o, i, c) => {
1227
- if (t === !1)
1228
- throw new y(
1229
- s(i, " has been removed" + (n ? " in " + n : "")),
1230
- y.ERR_DEPRECATED
1231
- );
1232
- return n && !$e[i] && ($e[i] = !0, console.warn(
1233
- s(
1234
- i,
1235
- " has been deprecated since v" + n + " and will be removed in the near future"
1236
- )
1237
- )), t ? t(o, i, c) : !0;
1238
- };
1239
- };
1240
- function er(e, t, n) {
1241
- if (typeof e != "object")
1242
- throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
1243
- const r = Object.keys(e);
1244
- let s = r.length;
1245
- for (; s-- > 0; ) {
1246
- const o = r[s], i = t[o];
1247
- if (i) {
1248
- const c = e[o], f = c === void 0 || i(c, o, e);
1249
- if (f !== !0)
1250
- throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
1251
- continue;
1252
- }
1253
- if (n !== !0)
1254
- throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
1255
- }
1256
- }
1257
- const fe = {
1258
- assertOptions: er,
1259
- validators: ge
1260
- }, N = fe.validators;
1261
- let G = class {
1262
- constructor(t) {
1263
- this.defaults = t, this.interceptors = {
1264
- request: new Oe(),
1265
- response: new Oe()
1266
- };
1267
- }
1268
- /**
1269
- * Dispatch a request
1270
- *
1271
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1272
- * @param {?Object} config
1273
- *
1274
- * @returns {Promise} The Promise to be fulfilled
1275
- */
1276
- request(t, n) {
1277
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = $(this.defaults, n);
1278
- const { transitional: r, paramsSerializer: s, headers: o } = n;
1279
- r !== void 0 && fe.assertOptions(r, {
1280
- silentJSONParsing: N.transitional(N.boolean),
1281
- forcedJSONParsing: N.transitional(N.boolean),
1282
- clarifyTimeoutError: N.transitional(N.boolean)
1283
- }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1284
- serialize: s
1285
- } : fe.assertOptions(s, {
1286
- encode: N.function,
1287
- serialize: N.function
1288
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1289
- let i = o && a.merge(
1290
- o.common,
1291
- o[n.method]
1292
- );
1293
- o && a.forEach(
1294
- ["delete", "get", "head", "post", "put", "patch", "common"],
1295
- (d) => {
1296
- delete o[d];
1297
- }
1298
- ), n.headers = L.concat(i, o);
1299
- const c = [];
1300
- let f = !0;
1301
- this.interceptors.request.forEach(function(m) {
1302
- typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
1303
- });
1304
- const u = [];
1305
- this.interceptors.response.forEach(function(m) {
1306
- u.push(m.fulfilled, m.rejected);
1307
- });
1308
- let l, h = 0, v;
1309
- if (!f) {
1310
- const d = [xe.bind(this), void 0];
1311
- for (d.unshift.apply(d, c), d.push.apply(d, u), v = d.length, l = Promise.resolve(n); h < v; )
1312
- l = l.then(d[h++], d[h++]);
1313
- return l;
1314
- }
1315
- v = c.length;
1316
- let w = n;
1317
- for (h = 0; h < v; ) {
1318
- const d = c[h++], m = c[h++];
1319
- try {
1320
- w = d(w);
1321
- } catch (_) {
1322
- m.call(this, _);
1323
- break;
1324
- }
1325
- }
1326
- try {
1327
- l = xe.call(this, w);
1328
- } catch (d) {
1329
- return Promise.reject(d);
1330
- }
1331
- for (h = 0, v = u.length; h < v; )
1332
- l = l.then(u[h++], u[h++]);
1333
- return l;
1334
- }
1335
- getUri(t) {
1336
- t = $(this.defaults, t);
1337
- const n = et(t.baseURL, t.url);
1338
- return Ge(n, t.params, t.paramsSerializer);
1339
- }
1340
- };
1341
- a.forEach(["delete", "get", "head", "options"], function(t) {
1342
- G.prototype[t] = function(n, r) {
1343
- return this.request($(r || {}, {
1344
- method: t,
1345
- url: n,
1346
- data: (r || {}).data
1347
- }));
1348
- };
1349
- });
1350
- a.forEach(["post", "put", "patch"], function(t) {
1351
- function n(r) {
1352
- return function(o, i, c) {
1353
- return this.request($(c || {}, {
1354
- method: t,
1355
- headers: r ? {
1356
- "Content-Type": "multipart/form-data"
1357
- } : {},
1358
- url: o,
1359
- data: i
1360
- }));
1361
- };
1362
- }
1363
- G.prototype[t] = n(), G.prototype[t + "Form"] = n(!0);
1364
- });
1365
- const V = G;
1366
- let tr = class rt {
1367
- constructor(t) {
1368
- if (typeof t != "function")
1369
- throw new TypeError("executor must be a function.");
1370
- let n;
1371
- this.promise = new Promise(function(o) {
1372
- n = o;
1373
- });
1374
- const r = this;
1375
- this.promise.then((s) => {
1376
- if (!r._listeners)
1377
- return;
1378
- let o = r._listeners.length;
1379
- for (; o-- > 0; )
1380
- r._listeners[o](s);
1381
- r._listeners = null;
1382
- }), this.promise.then = (s) => {
1383
- let o;
1384
- const i = new Promise((c) => {
1385
- r.subscribe(c), o = c;
1386
- }).then(s);
1387
- return i.cancel = function() {
1388
- r.unsubscribe(o);
1389
- }, i;
1390
- }, t(function(o, i, c) {
1391
- r.reason || (r.reason = new z(o, i, c), n(r.reason));
1392
- });
1393
- }
1394
- /**
1395
- * Throws a `CanceledError` if cancellation has been requested.
1396
- */
1397
- throwIfRequested() {
1398
- if (this.reason)
1399
- throw this.reason;
1400
- }
1401
- /**
1402
- * Subscribe to the cancel signal
1403
- */
1404
- subscribe(t) {
1405
- if (this.reason) {
1406
- t(this.reason);
1407
- return;
1408
- }
1409
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1410
- }
1411
- /**
1412
- * Unsubscribe from the cancel signal
1413
- */
1414
- unsubscribe(t) {
1415
- if (!this._listeners)
1416
- return;
1417
- const n = this._listeners.indexOf(t);
1418
- n !== -1 && this._listeners.splice(n, 1);
1419
- }
1420
- /**
1421
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1422
- * cancels the `CancelToken`.
1423
- */
1424
- static source() {
1425
- let t;
1426
- return {
1427
- token: new rt(function(s) {
1428
- t = s;
1429
- }),
1430
- cancel: t
1431
- };
1432
- }
1433
- };
1434
- const nr = tr;
1435
- function rr(e) {
1436
- return function(n) {
1437
- return e.apply(null, n);
1438
- };
1439
- }
1440
- function sr(e) {
1441
- return a.isObject(e) && e.isAxiosError === !0;
1442
- }
1443
- const de = {
1444
- Continue: 100,
1445
- SwitchingProtocols: 101,
1446
- Processing: 102,
1447
- EarlyHints: 103,
1448
- Ok: 200,
1449
- Created: 201,
1450
- Accepted: 202,
1451
- NonAuthoritativeInformation: 203,
1452
- NoContent: 204,
1453
- ResetContent: 205,
1454
- PartialContent: 206,
1455
- MultiStatus: 207,
1456
- AlreadyReported: 208,
1457
- ImUsed: 226,
1458
- MultipleChoices: 300,
1459
- MovedPermanently: 301,
1460
- Found: 302,
1461
- SeeOther: 303,
1462
- NotModified: 304,
1463
- UseProxy: 305,
1464
- Unused: 306,
1465
- TemporaryRedirect: 307,
1466
- PermanentRedirect: 308,
1467
- BadRequest: 400,
1468
- Unauthorized: 401,
1469
- PaymentRequired: 402,
1470
- Forbidden: 403,
1471
- NotFound: 404,
1472
- MethodNotAllowed: 405,
1473
- NotAcceptable: 406,
1474
- ProxyAuthenticationRequired: 407,
1475
- RequestTimeout: 408,
1476
- Conflict: 409,
1477
- Gone: 410,
1478
- LengthRequired: 411,
1479
- PreconditionFailed: 412,
1480
- PayloadTooLarge: 413,
1481
- UriTooLong: 414,
1482
- UnsupportedMediaType: 415,
1483
- RangeNotSatisfiable: 416,
1484
- ExpectationFailed: 417,
1485
- ImATeapot: 418,
1486
- MisdirectedRequest: 421,
1487
- UnprocessableEntity: 422,
1488
- Locked: 423,
1489
- FailedDependency: 424,
1490
- TooEarly: 425,
1491
- UpgradeRequired: 426,
1492
- PreconditionRequired: 428,
1493
- TooManyRequests: 429,
1494
- RequestHeaderFieldsTooLarge: 431,
1495
- UnavailableForLegalReasons: 451,
1496
- InternalServerError: 500,
1497
- NotImplemented: 501,
1498
- BadGateway: 502,
1499
- ServiceUnavailable: 503,
1500
- GatewayTimeout: 504,
1501
- HttpVersionNotSupported: 505,
1502
- VariantAlsoNegotiates: 506,
1503
- InsufficientStorage: 507,
1504
- LoopDetected: 508,
1505
- NotExtended: 510,
1506
- NetworkAuthenticationRequired: 511
1507
- };
1508
- Object.entries(de).forEach(([e, t]) => {
1509
- de[t] = e;
1510
- });
1511
- const or = de;
1512
- function st(e) {
1513
- const t = new V(e), n = Ue(V.prototype.request, t);
1514
- return a.extend(n, V.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1515
- return st($(e, s));
1516
- }, n;
1517
- }
1518
- const E = st(ye);
1519
- E.Axios = V;
1520
- E.CanceledError = z;
1521
- E.CancelToken = nr;
1522
- E.isCancel = Xe;
1523
- E.VERSION = nt;
1524
- E.toFormData = ee;
1525
- E.AxiosError = y;
1526
- E.Cancel = E.CanceledError;
1527
- E.all = function(t) {
1528
- return Promise.all(t);
1529
- };
1530
- E.spread = rr;
1531
- E.isAxiosError = sr;
1532
- E.mergeConfig = $;
1533
- E.AxiosHeaders = L;
1534
- E.formToJSON = (e) => Ze(a.isHTMLForm(e) ? new FormData(e) : e);
1535
- E.getAdapter = tt.getAdapter;
1536
- E.HttpStatusCode = or;
1537
- E.default = E;
1538
- const ot = E, {
1539
- Axios: Es,
1540
- AxiosError: ir,
1541
- CanceledError: vs,
1542
- isCancel: As,
1543
- CancelToken: Ts,
1544
- VERSION: Ss,
1545
- all: Rs,
1546
- Cancel: _s,
1547
- isAxiosError: Os,
1548
- spread: Ls,
1549
- toFormData: Ns,
1550
- AxiosHeaders: xs,
1551
- HttpStatusCode: Cs,
1552
- formToJSON: $s,
1553
- getAdapter: Ps,
1554
- mergeConfig: Ds
1555
- } = ot, it = ot.create({
126
+ const M = se.create({
1556
127
  headers: {
1557
128
  "Content-Type": "application/json"
1558
129
  }
1559
- }), O = async (e, ...t) => {
130
+ }), f = async (e, ...t) => {
1560
131
  try {
1561
- return await it[e](...t);
132
+ return await M[e](...t);
1562
133
  } catch (n) {
1563
- if (!(n instanceof ir) || !n.response)
134
+ if (!(n instanceof re) || !n.response)
1564
135
  throw n;
1565
- const r = n.response;
1566
- let s = "";
1567
- switch (r.status) {
136
+ const s = n.response;
137
+ let r = "";
138
+ switch (s.status) {
1568
139
  case 400:
1569
- s = "Check parameters or API token";
140
+ r = "Check parameters or API token";
1570
141
  break;
1571
142
  case 401:
1572
- s = "You must be logged before using this function, use `auth.login(token)`";
143
+ r = "You must be logged before using this function, use `auth.login(token)`";
1573
144
  break;
1574
145
  case 403:
1575
- s = "You dont have enough permissions";
146
+ r = "You dont have enough permissions";
1576
147
  break;
1577
148
  case 404:
1578
- s = "Check parameters";
149
+ r = "Check parameters";
1579
150
  break;
1580
151
  case 409:
1581
- s = "Request conflit with current state";
152
+ r = "Request conflit with current state";
1582
153
  break;
1583
154
  case 500:
1584
- s = "Something went wrong with server";
155
+ r = "Something went wrong with server";
1585
156
  break;
1586
157
  }
1587
- throw s = `${n.code} (${r.status}) - ${s}: ${r.data.content.message}`, new Error(s);
158
+ throw r = `${n.code} (${s.status}) - ${r}: ${s.data.content.message}`, new Error(r);
1588
159
  }
1589
- }, p = Object.assign(
1590
- it,
160
+ }, i = Object.assign(
161
+ M,
1591
162
  {
1592
- $get: async (...e) => (await O("get", ...e)).data,
1593
- $post: async (...e) => (await O("post", ...e)).data,
1594
- $put: async (...e) => (await O("put", ...e)).data,
1595
- $patch: async (...e) => (await O("patch", ...e)).data,
1596
- $delete: async (...e) => (await O("delete", ...e)).data
163
+ $get: async (...e) => (await f("get", ...e)).data,
164
+ $post: async (...e) => (await f("post", ...e)).data,
165
+ $put: async (...e) => (await f("put", ...e)).data,
166
+ $patch: async (...e) => (await f("patch", ...e)).data,
167
+ $delete: async (...e) => (await f("delete", ...e)).data
1597
168
  }
1598
- ), at = (e) => ({
169
+ ), U = (e) => ({
1599
170
  ...e,
1600
- createdAt: b(e.createdAt),
1601
- updatedAt: e.updatedAt ? b(e.updatedAt) : void 0
1602
- }), ar = (e) => ({
171
+ createdAt: u(e.createdAt),
172
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
173
+ }), be = (e) => ({
1603
174
  ...e,
1604
- namespace: at(e.namespace),
1605
- createdAt: b(e.createdAt),
1606
- updatedAt: e.updatedAt ? b(e.updatedAt) : void 0
1607
- }), cr = (e) => ({
175
+ namespace: U(e.namespace),
176
+ createdAt: u(e.createdAt),
177
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
178
+ }), $e = (e) => ({
1608
179
  ...e,
1609
- memberships: e.memberships.map(ar),
1610
- createdAt: b(e.createdAt),
1611
- updatedAt: e.updatedAt ? b(e.updatedAt) : void 0
1612
- }), ct = (e) => {
1613
- p.defaults.headers.common.authorization = `Bearer ${e}`;
1614
- }, ut = () => {
1615
- p.defaults.headers.common.authorization = void 0;
1616
- }, lt = () => {
1617
- const e = p.defaults.headers.common.authorization;
180
+ memberships: (e == null ? void 0 : e.memberships.map(be)) ?? [],
181
+ createdAt: u(e.createdAt),
182
+ updatedAt: e != null && e.updatedAt ? u(e.updatedAt) : void 0
183
+ }), Y = (e) => {
184
+ i.defaults.headers.common.authorization = `Bearer ${e}`;
185
+ }, z = () => {
186
+ i.defaults.headers.common.authorization = void 0;
187
+ }, F = () => {
188
+ const e = i.defaults.headers.common.authorization;
1618
189
  if (!e || typeof e != "string")
1619
190
  return !1;
1620
191
  const [, t] = e.split("Bearer ");
1621
192
  return !!t;
1622
- }, ur = async () => {
1623
- const { content: e, ...t } = await p.$get("/me");
193
+ }, Te = async () => {
194
+ const { content: e, ...t } = await i.$get("/me");
1624
195
  return {
1625
196
  ...t,
1626
- content: cr(e)
197
+ content: $e(e)
1627
198
  };
1628
- }, lr = () => p.$get("/me/permissions"), fr = () => p.$get("/me/namespaces"), ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
199
+ }, Le = () => i.$get("/me/permissions"), Ae = () => i.$get("/me/namespaces"), Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1629
200
  __proto__: null,
1630
- getCurrentNamespaces: fr,
1631
- getCurrentPermissions: lr,
1632
- getCurrentUser: ur,
1633
- isLogged: lt,
1634
- login: ct,
1635
- logout: ut
1636
- }, Symbol.toStringTag, { value: "Module" })), D = (e) => ({
201
+ getCurrentNamespaces: Ae,
202
+ getCurrentPermissions: Le,
203
+ getCurrentUser: Te,
204
+ isLogged: F,
205
+ login: Y,
206
+ logout: z
207
+ }, Symbol.toStringTag, { value: "Module" })), m = (e) => ({
1637
208
  ...e,
1638
- nextRun: e.nextRun ? b(e.nextRun) : void 0,
1639
- lastRun: e.lastRun ? b(e.lastRun) : void 0
1640
- }), dr = async () => {
1641
- const { content: e, ...t } = await p.$get("/crons");
209
+ nextRun: e.nextRun ? u(e.nextRun) : void 0,
210
+ lastRun: e.lastRun ? u(e.lastRun) : void 0
211
+ }), ke = async () => {
212
+ const { content: e, ...t } = await i.$get("/crons");
1642
213
  return {
1643
214
  ...t,
1644
- content: e.map(D)
1645
- };
1646
- }, pr = async (e) => {
1647
- const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$get(`/crons/${t}`);
1648
- return {
1649
- ...r,
1650
- content: D(n)
215
+ content: e.map(m)
1651
216
  };
1652
- }, hr = async (e) => {
1653
- const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$put(`/crons/${t}/start`, {});
217
+ }, Ee = async (e) => {
218
+ const t = typeof e == "string" ? e : e.name, { content: n, ...s } = await i.$get(`/crons/${t}`);
1654
219
  return {
1655
- ...r,
1656
- content: D(n)
220
+ ...s,
221
+ content: m(n)
1657
222
  };
1658
- }, mr = async (e) => {
1659
- const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$put(`/crons/${t}/stop`, {});
223
+ }, Re = async (e) => {
224
+ const t = typeof e == "string" ? e : e.name, { content: n, ...s } = await i.$put(`/crons/${t}/start`, {});
1660
225
  return {
1661
- ...r,
1662
- content: D(n)
226
+ ...s,
227
+ content: m(n)
1663
228
  };
1664
- }, yr = async (e) => {
1665
- const { name: t, ...n } = e, { content: r, ...s } = await p.$patch(`/crons/${t}`, n);
229
+ }, Ce = async (e) => {
230
+ const t = typeof e == "string" ? e : e.name, { content: n, ...s } = await i.$put(`/crons/${t}/stop`, {});
1666
231
  return {
1667
232
  ...s,
1668
- content: D(r)
233
+ content: m(n)
1669
234
  };
1670
- }, gr = async (e) => {
1671
- const t = typeof e == "string" ? e : e.name, { content: n, ...r } = await p.$post(`/crons/${t}/force`, {});
235
+ }, De = async (e) => {
236
+ const { name: t, ...n } = e, { content: s, ...r } = await i.$patch(`/crons/${t}`, n);
1672
237
  return {
1673
238
  ...r,
1674
- content: D(n)
239
+ content: m(s)
1675
240
  };
1676
- }, Fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
241
+ }, je = async (e) => {
242
+ const t = typeof e == "string" ? e : e.name, { content: n, ...s } = await i.$post(`/crons/${t}/_force`, {});
243
+ return {
244
+ ...s,
245
+ content: m(n)
246
+ };
247
+ }, Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1677
248
  __proto__: null,
1678
- forceCron: gr,
1679
- getAllCrons: dr,
1680
- getCron: pr,
1681
- startCron: hr,
1682
- stopCron: mr,
1683
- updateCron: yr
1684
- }, Symbol.toStringTag, { value: "Module" })), ft = () => p.$get("/health"), wr = () => p.$get("/health/all"), dt = (e) => p.$get(`/health/${e}`), br = async () => {
1685
- const { content: { current: e } } = await ft();
1686
- return dt(e);
1687
- }, js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
249
+ forceCron: je,
250
+ getAllCrons: ke,
251
+ getCron: Ee,
252
+ startCron: Re,
253
+ stopCron: Ce,
254
+ updateCron: De
255
+ }, Symbol.toStringTag, { value: "Module" })), W = () => i.$get("/health"), xe = () => i.$get("/health/_all"), J = (e) => i.$get(`/health/${e}`), Se = async () => {
256
+ const { content: { current: e } } = await W();
257
+ return J(e);
258
+ }, Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1688
259
  __proto__: null,
1689
- checkAllConnectedService: wr,
1690
- checkConnectedService: dt,
1691
- checkCurrentService: br,
1692
- getAllConnectedServices: ft
260
+ checkAllConnectedService: xe,
261
+ checkConnectedService: J,
262
+ checkCurrentService: Se,
263
+ getAllConnectedServices: W
1693
264
  }, Symbol.toStringTag, { value: "Module" }));
1694
- var pt = /* @__PURE__ */ ((e) => (e.DAILY = "DAILY", e.WEEKLY = "WEEKLY", e.MONTHLY = "MONTHLY", e.QUARTERLY = "QUARTERLY", e.BIENNIAL = "BIENNIAL", e.YEARLY = "YEARLY", e))(pt || {});
1695
- const ne = (e) => ({
265
+ var B = /* @__PURE__ */ ((e) => (e.DAILY = "DAILY", e.WEEKLY = "WEEKLY", e.MONTHLY = "MONTHLY", e.QUARTERLY = "QUARTERLY", e.BIENNIAL = "BIENNIAL", e.YEARLY = "YEARLY", e))(B || {});
266
+ const $ = (e) => ({
1696
267
  ...e,
1697
- nextRun: b(e.nextRun),
1698
- lastRun: e.lastRun ? b(e.lastRun) : void 0,
1699
- createdAt: b(e.createdAt),
1700
- updatedAt: e.updatedAt ? b(e.updatedAt) : void 0
1701
- }), ht = (e) => {
1702
- const { namespace: t, ...n } = e, { namespaceId: r, ...s } = ne({
268
+ nextRun: u(e.nextRun),
269
+ lastRun: e.lastRun ? u(e.lastRun) : void 0,
270
+ createdAt: u(e.createdAt),
271
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
272
+ }), O = (e) => {
273
+ const { namespace: t, ...n } = e, { namespaceId: s, ...r } = $({
1703
274
  namespaceId: t.id,
1704
275
  ...n
1705
276
  });
1706
277
  return {
1707
- ...s,
1708
- namespace: at(t)
278
+ ...r,
279
+ namespace: U(t)
1709
280
  };
1710
- }, Er = (e) => ({
281
+ }, Ne = (e) => ({
1711
282
  ...e,
1712
- createdAt: b(e.createdAt)
1713
- }), vr = (e) => ({
283
+ createdAt: u(e.createdAt)
284
+ }), Pe = (e) => ({
1714
285
  ...e,
1715
- task: ht(e.task),
1716
- createdAt: b(e.createdAt)
1717
- }), Ar = async (e, t) => {
1718
- const { data: { content: n, ...r } } = await O(
286
+ task: O(e.task),
287
+ createdAt: u(e.createdAt)
288
+ }), Me = async (e, t) => {
289
+ const { data: { content: n, ...s } } = await f(
1719
290
  "get",
1720
291
  "/tasks-activity",
1721
292
  {
@@ -1725,34 +296,79 @@ const ne = (e) => ({
1725
296
  }
1726
297
  }
1727
298
  );
299
+ return {
300
+ ...s,
301
+ content: n.map(Pe)
302
+ };
303
+ }, Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
304
+ __proto__: null,
305
+ getAllEntries: Me
306
+ }, Symbol.toStringTag, { value: "Module" })), Ue = (e) => ({
307
+ ...e,
308
+ createdAt: u(e.createdAt),
309
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
310
+ }), A = (e) => ({
311
+ ...e,
312
+ createdAt: u(e.createdAt),
313
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
314
+ }), Ye = async () => {
315
+ const { content: e, ...t } = await i.$get("/tasks-presets");
316
+ return {
317
+ ...t,
318
+ content: e.map(Ue)
319
+ };
320
+ }, ze = async (e) => {
321
+ const t = typeof e == "string" ? e : e.id, { content: n, ...s } = await i.$get(`/tasks-presets/${t}`);
322
+ return {
323
+ ...s,
324
+ content: A(n)
325
+ };
326
+ }, Fe = async (e) => {
327
+ const { content: t, ...n } = await i.$post("/tasks-presets/", e);
328
+ return {
329
+ ...n,
330
+ content: A(t)
331
+ };
332
+ }, We = async (e) => {
333
+ const { id: t, ...n } = e, { content: s, ...r } = await i.$put(
334
+ `/tasks-presets/${t}`,
335
+ n
336
+ );
1728
337
  return {
1729
338
  ...r,
1730
- content: n.map(vr)
339
+ content: A(s)
1731
340
  };
1732
- }, Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
341
+ }, Je = async (e) => {
342
+ const t = typeof e == "string" ? e : e.id;
343
+ await i.$delete(`/tasks-presets/${t}`);
344
+ }, Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1733
345
  __proto__: null,
1734
- getAllEntries: Ar
1735
- }, Symbol.toStringTag, { value: "Module" })), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
346
+ createTasksPreset: Fe,
347
+ deleteTasksPreset: Je,
348
+ getAllTasksPresets: Ye,
349
+ getTasksPreset: ze,
350
+ upsertTasksPreset: We
351
+ }, Symbol.toStringTag, { value: "Module" })), Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1736
352
  __proto__: null
1737
- }, Symbol.toStringTag, { value: "Module" })), we = (e) => ({
353
+ }, Symbol.toStringTag, { value: "Module" })), k = (e) => ({
1738
354
  ...e,
1739
- added: b(e.added),
1740
- started: e.started ? b(e.started) : void 0,
1741
- ended: e.ended ? b(e.ended) : void 0
1742
- }), Tr = () => p.$get("/queues"), Sr = async (e) => {
355
+ added: u(e.added),
356
+ started: e.started ? u(e.started) : void 0,
357
+ ended: e.ended ? u(e.ended) : void 0
358
+ }), Be = () => i.$get("/queues"), Oe = async (e) => {
1743
359
  const t = typeof e == "string" ? e : e.name;
1744
- return p.$get(`/queues/${t}`);
1745
- }, Rr = async (e) => {
360
+ return i.$get(`/queues/${t}`);
361
+ }, Qe = async (e) => {
1746
362
  const { name: t, ...n } = e;
1747
- return p.$patch(`/queues/${t}`, n);
1748
- }, _r = async (e) => {
363
+ return i.$patch(`/queues/${t}`, n);
364
+ }, Ke = async (e) => {
1749
365
  const t = typeof e == "string" ? e : e.name;
1750
- return p.$put(`/queues/${t}/pause`);
1751
- }, Or = async (e) => {
366
+ return i.$put(`/queues/${t}/pause`);
367
+ }, qe = async (e) => {
1752
368
  const t = typeof e == "string" ? e : e.name;
1753
- return p.$put(`/queues/${t}/resume`);
1754
- }, Lr = async (e, t) => {
1755
- const n = typeof e == "string" ? e : e.name, { data: { content: r, ...s } } = await O(
369
+ return i.$put(`/queues/${t}/resume`);
370
+ }, He = async (e, t) => {
371
+ const n = typeof e == "string" ? e : e.name, { data: { content: s, ...r } } = await f(
1756
372
  "get",
1757
373
  `/queues/${n}/jobs`,
1758
374
  {
@@ -1760,207 +376,207 @@ const ne = (e) => ({
1760
376
  }
1761
377
  );
1762
378
  return {
1763
- ...s,
1764
- content: r.map(we)
379
+ ...r,
380
+ content: s.map(k)
1765
381
  };
1766
- }, H = async (e, t, n) => {
1767
- const r = typeof e == "string" ? e : e.name, s = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...i } = await p.$get(`/queues/${r}/jobs/${s}`, { params: { namespaces: n } });
382
+ }, w = async (e, t, n) => {
383
+ const s = typeof e == "string" ? e : e.name, r = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...a } = await i.$get(`/queues/${s}/jobs/${r}`, { params: { namespaces: n } });
1768
384
  return {
1769
- ...i,
1770
- content: we(o)
385
+ ...a,
386
+ content: k(o)
1771
387
  };
1772
- }, Nr = async (e, t, n) => {
1773
- const r = typeof e == "string" ? e : e.name, s = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...i } = await p.$post(`/queues/${r}/jobs/${s}/retry`, { params: { namespaces: n } });
388
+ }, Ze = async (e, t, n) => {
389
+ const s = typeof e == "string" ? e : e.name, r = typeof t == "string" || typeof t == "number" ? t : t.id, { content: o, ...a } = await i.$post(`/queues/${s}/jobs/${r}/_retry`, { params: { namespaces: n } });
1774
390
  return {
1775
- ...i,
1776
- content: we(o)
391
+ ...a,
392
+ content: k(o)
1777
393
  };
1778
- }, Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
394
+ }, Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1779
395
  __proto__: null,
1780
- getAllQueues: Tr,
1781
- getJob: H,
1782
- getQueue: Sr,
1783
- getQueueJobs: Lr,
1784
- pauseQueue: _r,
1785
- resumeQueue: Or,
1786
- retryJob: Nr,
1787
- updateQueue: Rr
396
+ getAllQueues: Be,
397
+ getJob: w,
398
+ getQueue: Oe,
399
+ getQueueJobs: He,
400
+ pauseQueue: Ke,
401
+ resumeQueue: qe,
402
+ retryJob: Ze,
403
+ updateQueue: Qe
1788
404
  }, Symbol.toStringTag, { value: "Module" }));
1789
- function xr(e) {
405
+ function Ge(e) {
1790
406
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1791
407
  }
1792
- var be = { exports: {} }, C = typeof Reflect == "object" ? Reflect : null, Pe = C && typeof C.apply == "function" ? C.apply : function(t, n, r) {
1793
- return Function.prototype.apply.call(t, n, r);
1794
- }, Y;
1795
- C && typeof C.ownKeys == "function" ? Y = C.ownKeys : Object.getOwnPropertySymbols ? Y = function(t) {
408
+ var E = { exports: {} }, y = typeof Reflect == "object" ? Reflect : null, j = y && typeof y.apply == "function" ? y.apply : function(t, n, s) {
409
+ return Function.prototype.apply.call(t, n, s);
410
+ }, b;
411
+ y && typeof y.ownKeys == "function" ? b = y.ownKeys : Object.getOwnPropertySymbols ? b = function(t) {
1796
412
  return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
1797
- } : Y = function(t) {
413
+ } : b = function(t) {
1798
414
  return Object.getOwnPropertyNames(t);
1799
415
  };
1800
- function Cr(e) {
416
+ function Ve(e) {
1801
417
  console && console.warn && console.warn(e);
1802
418
  }
1803
- var mt = Number.isNaN || function(t) {
419
+ var Q = Number.isNaN || function(t) {
1804
420
  return t !== t;
1805
421
  };
1806
- function g() {
1807
- g.init.call(this);
1808
- }
1809
- be.exports = g;
1810
- be.exports.once = kr;
1811
- g.EventEmitter = g;
1812
- g.prototype._events = void 0;
1813
- g.prototype._eventsCount = 0;
1814
- g.prototype._maxListeners = void 0;
1815
- var De = 10;
1816
- function re(e) {
422
+ function c() {
423
+ c.init.call(this);
424
+ }
425
+ E.exports = c;
426
+ E.exports.once = tt;
427
+ c.EventEmitter = c;
428
+ c.prototype._events = void 0;
429
+ c.prototype._eventsCount = 0;
430
+ c.prototype._maxListeners = void 0;
431
+ var x = 10;
432
+ function T(e) {
1817
433
  if (typeof e != "function")
1818
434
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
1819
435
  }
1820
- Object.defineProperty(g, "defaultMaxListeners", {
436
+ Object.defineProperty(c, "defaultMaxListeners", {
1821
437
  enumerable: !0,
1822
438
  get: function() {
1823
- return De;
439
+ return x;
1824
440
  },
1825
441
  set: function(e) {
1826
- if (typeof e != "number" || e < 0 || mt(e))
442
+ if (typeof e != "number" || e < 0 || Q(e))
1827
443
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
1828
- De = e;
444
+ x = e;
1829
445
  }
1830
446
  });
1831
- g.init = function() {
447
+ c.init = function() {
1832
448
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
1833
449
  };
1834
- g.prototype.setMaxListeners = function(t) {
1835
- if (typeof t != "number" || t < 0 || mt(t))
450
+ c.prototype.setMaxListeners = function(t) {
451
+ if (typeof t != "number" || t < 0 || Q(t))
1836
452
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
1837
453
  return this._maxListeners = t, this;
1838
454
  };
1839
- function yt(e) {
1840
- return e._maxListeners === void 0 ? g.defaultMaxListeners : e._maxListeners;
455
+ function K(e) {
456
+ return e._maxListeners === void 0 ? c.defaultMaxListeners : e._maxListeners;
1841
457
  }
1842
- g.prototype.getMaxListeners = function() {
1843
- return yt(this);
458
+ c.prototype.getMaxListeners = function() {
459
+ return K(this);
1844
460
  };
1845
- g.prototype.emit = function(t) {
1846
- for (var n = [], r = 1; r < arguments.length; r++)
1847
- n.push(arguments[r]);
1848
- var s = t === "error", o = this._events;
461
+ c.prototype.emit = function(t) {
462
+ for (var n = [], s = 1; s < arguments.length; s++)
463
+ n.push(arguments[s]);
464
+ var r = t === "error", o = this._events;
1849
465
  if (o !== void 0)
1850
- s = s && o.error === void 0;
1851
- else if (!s)
466
+ r = r && o.error === void 0;
467
+ else if (!r)
1852
468
  return !1;
1853
- if (s) {
1854
- var i;
1855
- if (n.length > 0 && (i = n[0]), i instanceof Error)
1856
- throw i;
1857
- var c = new Error("Unhandled error." + (i ? " (" + i.message + ")" : ""));
1858
- throw c.context = i, c;
1859
- }
1860
- var f = o[t];
1861
- if (f === void 0)
469
+ if (r) {
470
+ var a;
471
+ if (n.length > 0 && (a = n[0]), a instanceof Error)
472
+ throw a;
473
+ var l = new Error("Unhandled error." + (a ? " (" + a.message + ")" : ""));
474
+ throw l.context = a, l;
475
+ }
476
+ var p = o[t];
477
+ if (p === void 0)
1862
478
  return !1;
1863
- if (typeof f == "function")
1864
- Pe(f, this, n);
479
+ if (typeof p == "function")
480
+ j(p, this, n);
1865
481
  else
1866
- for (var u = f.length, l = vt(f, u), r = 0; r < u; ++r)
1867
- Pe(l[r], this, n);
482
+ for (var d = p.length, ne = V(p, d), s = 0; s < d; ++s)
483
+ j(ne[s], this, n);
1868
484
  return !0;
1869
485
  };
1870
- function gt(e, t, n, r) {
1871
- var s, o, i;
1872
- if (re(n), o = e._events, o === void 0 ? (o = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (o.newListener !== void 0 && (e.emit(
486
+ function q(e, t, n, s) {
487
+ var r, o, a;
488
+ if (T(n), o = e._events, o === void 0 ? (o = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (o.newListener !== void 0 && (e.emit(
1873
489
  "newListener",
1874
490
  t,
1875
491
  n.listener ? n.listener : n
1876
- ), o = e._events), i = o[t]), i === void 0)
1877
- i = o[t] = n, ++e._eventsCount;
1878
- else if (typeof i == "function" ? i = o[t] = r ? [n, i] : [i, n] : r ? i.unshift(n) : i.push(n), s = yt(e), s > 0 && i.length > s && !i.warned) {
1879
- i.warned = !0;
1880
- var c = new Error("Possible EventEmitter memory leak detected. " + i.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
1881
- c.name = "MaxListenersExceededWarning", c.emitter = e, c.type = t, c.count = i.length, Cr(c);
492
+ ), o = e._events), a = o[t]), a === void 0)
493
+ a = o[t] = n, ++e._eventsCount;
494
+ else if (typeof a == "function" ? a = o[t] = s ? [n, a] : [a, n] : s ? a.unshift(n) : a.push(n), r = K(e), r > 0 && a.length > r && !a.warned) {
495
+ a.warned = !0;
496
+ var l = new Error("Possible EventEmitter memory leak detected. " + a.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
497
+ l.name = "MaxListenersExceededWarning", l.emitter = e, l.type = t, l.count = a.length, Ve(l);
1882
498
  }
1883
499
  return e;
1884
500
  }
1885
- g.prototype.addListener = function(t, n) {
1886
- return gt(this, t, n, !1);
501
+ c.prototype.addListener = function(t, n) {
502
+ return q(this, t, n, !1);
1887
503
  };
1888
- g.prototype.on = g.prototype.addListener;
1889
- g.prototype.prependListener = function(t, n) {
1890
- return gt(this, t, n, !0);
504
+ c.prototype.on = c.prototype.addListener;
505
+ c.prototype.prependListener = function(t, n) {
506
+ return q(this, t, n, !0);
1891
507
  };
1892
- function $r() {
508
+ function Xe() {
1893
509
  if (!this.fired)
1894
510
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
1895
511
  }
1896
- function wt(e, t, n) {
1897
- var r = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, s = $r.bind(r);
1898
- return s.listener = n, r.wrapFn = s, s;
512
+ function H(e, t, n) {
513
+ var s = { fired: !1, wrapFn: void 0, target: e, type: t, listener: n }, r = Xe.bind(s);
514
+ return r.listener = n, s.wrapFn = r, r;
1899
515
  }
1900
- g.prototype.once = function(t, n) {
1901
- return re(n), this.on(t, wt(this, t, n)), this;
516
+ c.prototype.once = function(t, n) {
517
+ return T(n), this.on(t, H(this, t, n)), this;
1902
518
  };
1903
- g.prototype.prependOnceListener = function(t, n) {
1904
- return re(n), this.prependListener(t, wt(this, t, n)), this;
519
+ c.prototype.prependOnceListener = function(t, n) {
520
+ return T(n), this.prependListener(t, H(this, t, n)), this;
1905
521
  };
1906
- g.prototype.removeListener = function(t, n) {
1907
- var r, s, o, i, c;
1908
- if (re(n), s = this._events, s === void 0)
522
+ c.prototype.removeListener = function(t, n) {
523
+ var s, r, o, a, l;
524
+ if (T(n), r = this._events, r === void 0)
1909
525
  return this;
1910
- if (r = s[t], r === void 0)
526
+ if (s = r[t], s === void 0)
1911
527
  return this;
1912
- if (r === n || r.listener === n)
1913
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete s[t], s.removeListener && this.emit("removeListener", t, r.listener || n));
1914
- else if (typeof r != "function") {
1915
- for (o = -1, i = r.length - 1; i >= 0; i--)
1916
- if (r[i] === n || r[i].listener === n) {
1917
- c = r[i].listener, o = i;
528
+ if (s === n || s.listener === n)
529
+ --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete r[t], r.removeListener && this.emit("removeListener", t, s.listener || n));
530
+ else if (typeof s != "function") {
531
+ for (o = -1, a = s.length - 1; a >= 0; a--)
532
+ if (s[a] === n || s[a].listener === n) {
533
+ l = s[a].listener, o = a;
1918
534
  break;
1919
535
  }
1920
536
  if (o < 0)
1921
537
  return this;
1922
- o === 0 ? r.shift() : Pr(r, o), r.length === 1 && (s[t] = r[0]), s.removeListener !== void 0 && this.emit("removeListener", t, c || n);
538
+ o === 0 ? s.shift() : Ie(s, o), s.length === 1 && (r[t] = s[0]), r.removeListener !== void 0 && this.emit("removeListener", t, l || n);
1923
539
  }
1924
540
  return this;
1925
541
  };
1926
- g.prototype.off = g.prototype.removeListener;
1927
- g.prototype.removeAllListeners = function(t) {
1928
- var n, r, s;
1929
- if (r = this._events, r === void 0)
542
+ c.prototype.off = c.prototype.removeListener;
543
+ c.prototype.removeAllListeners = function(t) {
544
+ var n, s, r;
545
+ if (s = this._events, s === void 0)
1930
546
  return this;
1931
- if (r.removeListener === void 0)
1932
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : r[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete r[t]), this;
547
+ if (s.removeListener === void 0)
548
+ return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : s[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete s[t]), this;
1933
549
  if (arguments.length === 0) {
1934
- var o = Object.keys(r), i;
1935
- for (s = 0; s < o.length; ++s)
1936
- i = o[s], i !== "removeListener" && this.removeAllListeners(i);
550
+ var o = Object.keys(s), a;
551
+ for (r = 0; r < o.length; ++r)
552
+ a = o[r], a !== "removeListener" && this.removeAllListeners(a);
1937
553
  return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
1938
554
  }
1939
- if (n = r[t], typeof n == "function")
555
+ if (n = s[t], typeof n == "function")
1940
556
  this.removeListener(t, n);
1941
557
  else if (n !== void 0)
1942
- for (s = n.length - 1; s >= 0; s--)
1943
- this.removeListener(t, n[s]);
558
+ for (r = n.length - 1; r >= 0; r--)
559
+ this.removeListener(t, n[r]);
1944
560
  return this;
1945
561
  };
1946
- function bt(e, t, n) {
1947
- var r = e._events;
1948
- if (r === void 0)
562
+ function Z(e, t, n) {
563
+ var s = e._events;
564
+ if (s === void 0)
1949
565
  return [];
1950
- var s = r[t];
1951
- return s === void 0 ? [] : typeof s == "function" ? n ? [s.listener || s] : [s] : n ? Dr(s) : vt(s, s.length);
566
+ var r = s[t];
567
+ return r === void 0 ? [] : typeof r == "function" ? n ? [r.listener || r] : [r] : n ? et(r) : V(r, r.length);
1952
568
  }
1953
- g.prototype.listeners = function(t) {
1954
- return bt(this, t, !0);
569
+ c.prototype.listeners = function(t) {
570
+ return Z(this, t, !0);
1955
571
  };
1956
- g.prototype.rawListeners = function(t) {
1957
- return bt(this, t, !1);
572
+ c.prototype.rawListeners = function(t) {
573
+ return Z(this, t, !1);
1958
574
  };
1959
- g.listenerCount = function(e, t) {
1960
- return typeof e.listenerCount == "function" ? e.listenerCount(t) : Et.call(e, t);
575
+ c.listenerCount = function(e, t) {
576
+ return typeof e.listenerCount == "function" ? e.listenerCount(t) : G.call(e, t);
1961
577
  };
1962
- g.prototype.listenerCount = Et;
1963
- function Et(e) {
578
+ c.prototype.listenerCount = G;
579
+ function G(e) {
1964
580
  var t = this._events;
1965
581
  if (t !== void 0) {
1966
582
  var n = t[e];
@@ -1971,238 +587,238 @@ function Et(e) {
1971
587
  }
1972
588
  return 0;
1973
589
  }
1974
- g.prototype.eventNames = function() {
1975
- return this._eventsCount > 0 ? Y(this._events) : [];
590
+ c.prototype.eventNames = function() {
591
+ return this._eventsCount > 0 ? b(this._events) : [];
1976
592
  };
1977
- function vt(e, t) {
1978
- for (var n = new Array(t), r = 0; r < t; ++r)
1979
- n[r] = e[r];
593
+ function V(e, t) {
594
+ for (var n = new Array(t), s = 0; s < t; ++s)
595
+ n[s] = e[s];
1980
596
  return n;
1981
597
  }
1982
- function Pr(e, t) {
598
+ function Ie(e, t) {
1983
599
  for (; t + 1 < e.length; t++)
1984
600
  e[t] = e[t + 1];
1985
601
  e.pop();
1986
602
  }
1987
- function Dr(e) {
603
+ function et(e) {
1988
604
  for (var t = new Array(e.length), n = 0; n < t.length; ++n)
1989
605
  t[n] = e[n].listener || e[n];
1990
606
  return t;
1991
607
  }
1992
- function kr(e, t) {
1993
- return new Promise(function(n, r) {
1994
- function s(i) {
1995
- e.removeListener(t, o), r(i);
608
+ function tt(e, t) {
609
+ return new Promise(function(n, s) {
610
+ function r(a) {
611
+ e.removeListener(t, o), s(a);
1996
612
  }
1997
613
  function o() {
1998
- typeof e.removeListener == "function" && e.removeListener("error", s), n([].slice.call(arguments));
614
+ typeof e.removeListener == "function" && e.removeListener("error", r), n([].slice.call(arguments));
1999
615
  }
2000
- At(e, t, o, { once: !0 }), t !== "error" && Fr(e, s, { once: !0 });
616
+ X(e, t, o, { once: !0 }), t !== "error" && nt(e, r, { once: !0 });
2001
617
  });
2002
618
  }
2003
- function Fr(e, t, n) {
2004
- typeof e.on == "function" && At(e, "error", t, n);
619
+ function nt(e, t, n) {
620
+ typeof e.on == "function" && X(e, "error", t, n);
2005
621
  }
2006
- function At(e, t, n, r) {
622
+ function X(e, t, n, s) {
2007
623
  if (typeof e.on == "function")
2008
- r.once ? e.once(t, n) : e.on(t, n);
624
+ s.once ? e.once(t, n) : e.on(t, n);
2009
625
  else if (typeof e.addEventListener == "function")
2010
- e.addEventListener(t, function s(o) {
2011
- r.once && e.removeEventListener(t, s), n(o);
626
+ e.addEventListener(t, function r(o) {
627
+ s.once && e.removeEventListener(t, r), n(o);
2012
628
  });
2013
629
  else
2014
630
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
2015
631
  }
2016
- var jr = be.exports;
2017
- const Ur = /* @__PURE__ */ xr(jr), Br = (e, t = new Ur()) => {
632
+ var st = E.exports;
633
+ const rt = /* @__PURE__ */ Ge(st), ot = (e, t = new rt()) => {
2018
634
  const n = {
2019
- emit: (o, ...i) => (t.emit(o.toString(), ...i), n)
2020
- }, r = e(n), s = Object.assign(
2021
- r,
635
+ emit: (o, ...a) => (t.emit(o.toString(), ...a), n)
636
+ }, s = e(n), r = Object.assign(
637
+ s,
2022
638
  {
2023
- on: (o, i) => (t.on(o.toString(), (...c) => i(...c)), s),
2024
- once: (o, i) => (t.once(o.toString(), (...c) => i(...c)), s),
2025
- off: (o, i) => (t.off(o.toString(), (...c) => i(...c)), s)
639
+ on: (o, a) => (t.on(o.toString(), (...l) => a(...l)), r),
640
+ once: (o, a) => (t.once(o.toString(), (...l) => a(...l)), r),
641
+ off: (o, a) => (t.off(o.toString(), (...l) => a(...l)), r)
2026
642
  }
2027
643
  );
2028
- return s;
2029
- }, Mr = (e) => new Promise(
644
+ return r;
645
+ }, at = (e) => new Promise(
2030
646
  (t) => {
2031
647
  setTimeout(t, e);
2032
648
  }
2033
- ), zr = (e) => ({
2034
- start: b(e.start),
2035
- end: b(e.end)
2036
- }), Hr = (e) => ({
649
+ ), it = (e) => ({
650
+ start: u(e.start),
651
+ end: u(e.end)
652
+ }), ct = (e) => ({
2037
653
  ...e,
2038
- createdAt: b(e.createdAt),
2039
- destroyAt: b(e.destroyAt),
2040
- period: e.period ? zr(e.period) : void 0
2041
- }), Ee = (e) => ({
654
+ createdAt: u(e.createdAt),
655
+ destroyAt: u(e.destroyAt),
656
+ period: e.period ? it(e.period) : void 0
657
+ }), R = (e) => ({
2042
658
  ...e,
2043
- detail: Hr(e.detail)
2044
- }), Tt = (e, t, n) => {
2045
- var s, o;
2046
- const r = typeof e == "string" ? e : e.id;
2047
- return p.$post(
2048
- `/tasks/${r}/_run`,
659
+ detail: ct(e.detail)
660
+ }), I = (e, t, n) => {
661
+ var r, o;
662
+ const s = typeof e == "string" ? e : e.id;
663
+ return i.$post(
664
+ `/tasks/${s}/_run`,
2049
665
  null,
2050
666
  {
2051
667
  params: {
2052
668
  test_emails: t == null ? void 0 : t.testEmails,
2053
- period_start: (s = t == null ? void 0 : t.period) == null ? void 0 : s.start,
669
+ period_start: (r = t == null ? void 0 : t.period) == null ? void 0 : r.start,
2054
670
  period_end: (o = t == null ? void 0 : t.period) == null ? void 0 : o.end,
2055
671
  namespaces: n
2056
672
  }
2057
673
  }
2058
674
  );
2059
- }, Ir = (...e) => Br(
675
+ }, ut = (...e) => ot(
2060
676
  async (t) => {
2061
- const { content: { id: n, queue: r } } = await Tt(...e);
2062
- t.emit("started", { id: n, queue: r });
2063
- let s;
677
+ const { content: { id: n, queue: s } } = await I(...e);
678
+ t.emit("started", { id: n, queue: s });
679
+ let r;
2064
680
  do {
2065
681
  const {
2066
682
  content: {
2067
683
  progress: o,
2068
- status: i,
2069
- result: c
684
+ status: a,
685
+ result: l
2070
686
  }
2071
687
  // FIXME: What if param order changes ?
2072
688
  // eslint-disable-next-line no-await-in-loop
2073
- } = await H(r, n, e[2]);
2074
- s = { progress: o, status: i, result: c }, t.emit("progress", { progress: o, status: i });
2075
- let f = 1e3;
2076
- s.status === "active" && (f = 250), await Mr(f);
2077
- } while (["completed", "failed", "stuck"].includes(s.status) === !1);
2078
- if (!s.result)
689
+ } = await w(s, n, e[2]);
690
+ r = { progress: o, status: a, result: l }, t.emit("progress", { progress: o, status: a });
691
+ let p = 1e3;
692
+ r.status === "active" && (p = 250), await at(p);
693
+ } while (["completed", "failed", "stuck"].includes(r.status) === !1);
694
+ if (!r.result)
2079
695
  throw new Error("Generation failed with weird error");
2080
- return Ee(s.result);
696
+ return R(r.result);
2081
697
  }
2082
- ), k = async (e, t, n) => (await O(
698
+ ), v = async (e, t, n) => (await f(
2083
699
  "get",
2084
700
  `/reports/${e}`,
2085
701
  {
2086
702
  responseType: n,
2087
703
  params: { namespaces: t }
2088
704
  }
2089
- )).data, qr = (e, t, n, r = "pdf") => k(`${e}.rep.${r}`, t, n), Jr = async (e, t, n, r) => {
705
+ )).data, lt = (e, t, n, s = "pdf") => v(`${e}.rep.${s}`, t, n), pt = async (e, t, n, s) => {
2090
706
  var o;
2091
- const { content: { result: s } } = await H(
707
+ const { content: { result: r } } = await w(
2092
708
  e,
2093
709
  t,
2094
710
  n
2095
711
  );
2096
- if (!s)
712
+ if (!r)
2097
713
  throw new Error("Job have no result");
2098
- return k(((o = s.detail) == null ? void 0 : o.files.report) ?? "", n, r);
2099
- }, Wr = async (e, t, n) => {
2100
- const r = await k(`${e}.det.json`, t, n);
2101
- return !n || n === "json" ? Ee(r) : r;
2102
- }, Kr = async (e, t, n, r) => {
2103
- var i;
2104
- const { content: { result: s } } = await H(
714
+ return v(((o = r.detail) == null ? void 0 : o.files.report) ?? "", n, s);
715
+ }, dt = async (e, t, n) => {
716
+ const s = await v(`${e}.det.json`, t, n);
717
+ return !n || n === "json" ? R(s) : s;
718
+ }, ft = async (e, t, n, s) => {
719
+ var a;
720
+ const { content: { result: r } } = await w(
2105
721
  e,
2106
722
  t,
2107
723
  n
2108
724
  );
2109
- if (!s)
725
+ if (!r)
2110
726
  throw new Error("Job have no result");
2111
- const o = await k(((i = s.detail) == null ? void 0 : i.files.detail) ?? "", n, r);
2112
- return !r || r === "json" ? Ee(o) : o;
2113
- }, Vr = (e, t, n) => k(`${e}.deb.json`, t, n), Yr = async (e, t, n, r) => {
727
+ const o = await v(((a = r.detail) == null ? void 0 : a.files.detail) ?? "", n, s);
728
+ return !s || s === "json" ? R(o) : o;
729
+ }, gt = (e, t, n) => v(`${e}.deb.json`, t, n), yt = async (e, t, n, s) => {
2114
730
  var o;
2115
- const { content: { result: s } } = await H(
731
+ const { content: { result: r } } = await w(
2116
732
  e,
2117
733
  t,
2118
734
  n
2119
735
  );
2120
- if (!s)
736
+ if (!r)
2121
737
  throw new Error("Job have no result");
2122
- return k(((o = s.detail) == null ? void 0 : o.files.debug) ?? "", n, r);
2123
- }, zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
738
+ return v(((o = r.detail) == null ? void 0 : o.files.debug) ?? "", n, s);
739
+ }, qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2124
740
  __proto__: null,
2125
- getReportDebugByJob: Yr,
2126
- getReportDebugByName: Vr,
2127
- getReportDetailByJob: Kr,
2128
- getReportDetailByName: Wr,
2129
- getReportFileByJob: Jr,
2130
- getReportFileByName: qr,
2131
- startAndListenGeneration: Ir,
2132
- startGeneration: Tt
2133
- }, Symbol.toStringTag, { value: "Module" })), Gr = (e) => {
2134
- p.defaults.baseURL = e;
2135
- }, Qr = () => {
2136
- p.defaults.baseURL = void 0;
2137
- }, Zr = () => !!p.defaults.baseURL, Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
741
+ getReportDebugByJob: yt,
742
+ getReportDebugByName: gt,
743
+ getReportDetailByJob: ft,
744
+ getReportDetailByName: dt,
745
+ getReportFileByJob: pt,
746
+ getReportFileByName: lt,
747
+ startAndListenGeneration: ut,
748
+ startGeneration: I
749
+ }, Symbol.toStringTag, { value: "Module" })), mt = (e) => {
750
+ i.defaults.baseURL = e;
751
+ }, vt = () => {
752
+ i.defaults.baseURL = void 0;
753
+ }, ht = () => !!i.defaults.baseURL, Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2138
754
  __proto__: null,
2139
- isLogged: lt,
2140
- isURLset: Zr,
2141
- login: ct,
2142
- logout: ut,
2143
- setURL: Gr,
2144
- unsetURL: Qr
2145
- }, Symbol.toStringTag, { value: "Module" })), ve = (e) => ({
755
+ isLogged: F,
756
+ isURLset: ht,
757
+ login: Y,
758
+ logout: z,
759
+ setURL: mt,
760
+ unsetURL: vt
761
+ }, Symbol.toStringTag, { value: "Module" })), C = (e) => ({
2146
762
  ...e,
2147
- createdAt: b(e.createdAt),
2148
- updatedAt: e.updatedAt ? b(e.updatedAt) : void 0
2149
- }), Ae = (e) => {
2150
- const { body: t, tasks: n, ...r } = e;
763
+ createdAt: u(e.createdAt),
764
+ updatedAt: e.updatedAt ? u(e.updatedAt) : void 0
765
+ }), D = (e) => {
766
+ const { body: t, tasks: n, ...s } = e;
2151
767
  return {
2152
- ...ve(r),
2153
- tasks: n.map(ne),
768
+ ...C(s),
769
+ tasks: n.map($),
2154
770
  body: t
2155
771
  };
2156
- }, Xr = async () => {
2157
- const { content: e, ...t } = await p.$get("/templates");
772
+ }, wt = async () => {
773
+ const { content: e, ...t } = await i.$get("/templates");
2158
774
  return {
2159
775
  ...t,
2160
- content: e.map(ve)
776
+ content: e.map(C)
2161
777
  };
2162
- }, es = async (e) => {
2163
- const t = typeof e == "string" ? e : e.id, { content: n, ...r } = await p.$get(`/templates/${t}`);
778
+ }, _t = async (e) => {
779
+ const t = typeof e == "string" ? e : e.id, { content: n, ...s } = await i.$get(`/templates/${t}`);
2164
780
  return {
2165
- ...r,
2166
- content: Ae(n)
781
+ ...s,
782
+ content: D(n)
2167
783
  };
2168
- }, ts = async (e) => {
2169
- const { content: t, ...n } = await p.$post(
784
+ }, bt = async (e) => {
785
+ const { content: t, ...n } = await i.$post(
2170
786
  "/templates",
2171
787
  e
2172
788
  );
2173
789
  return {
2174
790
  ...n,
2175
- content: Ae(t)
791
+ content: D(t)
2176
792
  };
2177
- }, St = async (e) => {
2178
- const { id: t, ...n } = e, { content: r, ...s } = await p.$put(
793
+ }, ee = async (e) => {
794
+ const { id: t, ...n } = e, { content: s, ...r } = await i.$put(
2179
795
  `/templates/${t}`,
2180
796
  n
2181
797
  );
2182
798
  return {
2183
- ...s,
2184
- content: Ae(r)
799
+ ...r,
800
+ content: D(s)
2185
801
  };
2186
- }, ns = St, rs = async (e) => {
802
+ }, $t = ee, Tt = async (e) => {
2187
803
  const t = typeof e == "string" ? e : e.id;
2188
- await p.$delete(`/templates/${t}`);
2189
- }, F = (e) => {
804
+ await i.$delete(`/templates/${t}`);
805
+ }, g = (e) => {
2190
806
  const {
2191
807
  activity: t,
2192
808
  template: n,
2193
- targets: r,
2194
- extends: s,
809
+ targets: s,
810
+ extends: r,
2195
811
  ...o
2196
812
  } = e;
2197
813
  return {
2198
- ...ht(o),
2199
- extends: ve(s),
2200
- activity: t.map(Er),
814
+ ...O(o),
815
+ extends: C(r),
816
+ activity: t.map(Ne),
2201
817
  template: n,
2202
- targets: r
818
+ targets: s
2203
819
  };
2204
- }, ss = async (e, t) => {
2205
- const { data: { content: n, ...r } } = await O(
820
+ }, Lt = async (e, t) => {
821
+ const { data: { content: n, ...s } } = await f(
2206
822
  "get",
2207
823
  "/tasks",
2208
824
  {
@@ -2213,137 +829,150 @@ const Ur = /* @__PURE__ */ xr(jr), Br = (e, t = new Ur()) => {
2213
829
  }
2214
830
  );
2215
831
  return {
2216
- ...r,
2217
- content: n.map(({ tags: s, ...o }) => ({
2218
- tags: s,
2219
- ...ne(o)
832
+ ...s,
833
+ content: n.map(({ tags: r, _count: o, ...a }) => ({
834
+ tags: r,
835
+ _count: o,
836
+ ...$(a)
2220
837
  }))
2221
838
  };
2222
- }, os = (e) => p.$get(
839
+ }, At = (e) => i.$get(
2223
840
  "/tasks/_targets",
2224
841
  { params: { namespaces: e } }
2225
- ), is = async (e, t) => {
2226
- const { content: n, ...r } = await p.$get(
842
+ ), kt = async (e, t) => {
843
+ const { content: n, ...s } = await i.$get(
2227
844
  `/tasks/_targets/${e}/tasks`,
2228
845
  { params: { namespaces: t } }
2229
846
  );
2230
847
  return {
2231
- ...r,
2232
- content: n.map(({ tags: s, ...o }) => ({
2233
- tags: s,
2234
- ...ne(o)
848
+ ...s,
849
+ content: n.map(({ tags: r, ...o }) => ({
850
+ tags: r,
851
+ ...$(o)
2235
852
  }))
2236
853
  };
2237
- }, as = async (e, t, n) => {
2238
- const r = typeof t == "string" ? t : t.id;
2239
- await p.$delete(`/tasks/_targets/${e}/tasks/${r}`, { params: { namespaces: n } });
2240
- }, cs = async (e, t) => {
2241
- const { content: n, ...r } = await p.$post(
854
+ }, Et = async (e, t, n) => {
855
+ const s = typeof t == "string" ? t : t.id;
856
+ await i.$delete(`/tasks/_targets/${e}/tasks/${s}`, { params: { namespaces: n } });
857
+ }, Rt = async (e, t) => {
858
+ const { content: n, ...s } = await i.$post(
2242
859
  "/tasks",
2243
860
  e,
2244
861
  { params: { namespaces: t } }
2245
862
  );
863
+ return {
864
+ ...s,
865
+ content: g(n)
866
+ };
867
+ }, Ct = async (e, t, n) => {
868
+ const { content: s, ...r } = await i.$post(
869
+ `/tasks/_from-preset/${e}`,
870
+ t,
871
+ { params: { namespaces: n } }
872
+ );
2246
873
  return {
2247
874
  ...r,
2248
- content: F(n)
875
+ content: g(s)
2249
876
  };
2250
- }, us = async (e, t) => {
2251
- const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$get(`/tasks/${n}`, { params: { namespaces: t } });
877
+ }, Dt = async (e, t) => {
878
+ const n = typeof e == "string" ? e : e.id, { content: s, ...r } = await i.$get(`/tasks/${n}`, { params: { namespaces: t } });
2252
879
  return {
2253
- ...s,
2254
- content: F(r)
880
+ ...r,
881
+ content: g(s)
2255
882
  };
2256
- }, Rt = async (e, t) => {
2257
- const { id: n, ...r } = e, { content: s, ...o } = await p.$put(
883
+ }, te = async (e, t) => {
884
+ const { id: n, ...s } = e, { content: r, ...o } = await i.$put(
2258
885
  `/tasks/${n}`,
2259
- r,
886
+ s,
2260
887
  { params: { namespaces: t } }
2261
888
  );
2262
889
  return {
2263
890
  ...o,
2264
- content: F(s)
891
+ content: g(r)
2265
892
  };
2266
- }, ls = Rt, fs = async (e, t) => {
893
+ }, jt = te, xt = async (e, t) => {
2267
894
  const n = typeof e == "string" ? e : e.id;
2268
- await p.$delete(`/tasks/${n}`, { params: { namespaces: t } });
2269
- }, ds = async (e, t) => {
2270
- const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$put(
895
+ await i.$delete(`/tasks/${n}`, { params: { namespaces: t } });
896
+ }, St = async (e, t) => {
897
+ const n = typeof e == "string" ? e : e.id, { content: s, ...r } = await i.$put(
2271
898
  `/tasks/${n}/_enable`,
2272
899
  void 0,
2273
900
  { params: { namespaces: t } }
2274
901
  );
2275
902
  return {
2276
- ...s,
2277
- content: F(r)
903
+ ...r,
904
+ content: g(s)
2278
905
  };
2279
- }, ps = async (e, t) => {
2280
- const n = typeof e == "string" ? e : e.id, { content: r, ...s } = await p.$put(
906
+ }, Nt = async (e, t) => {
907
+ const n = typeof e == "string" ? e : e.id, { content: s, ...r } = await i.$put(
2281
908
  `/tasks/${n}/_disable`,
2282
909
  void 0,
2283
910
  { params: { namespaces: t } }
2284
911
  );
2285
912
  return {
2286
- ...s,
2287
- content: F(r)
913
+ ...r,
914
+ content: g(s)
2288
915
  };
2289
- }, hs = async (e, t, n) => {
2290
- const r = typeof e == "string" ? e : e.id, s = typeof t == "string" ? t : t.id, { content: o, ...i } = await p.$put(
2291
- `/tasks/${r}/_link/${s}`,
916
+ }, Pt = async (e, t, n) => {
917
+ const s = typeof e == "string" ? e : e.id, r = typeof t == "string" ? t : t.id, { content: o, ...a } = await i.$put(
918
+ `/tasks/${s}/_link/${r}`,
2292
919
  void 0,
2293
920
  { params: { namespaces: n } }
2294
921
  );
2295
922
  return {
2296
- ...i,
2297
- content: F(o)
923
+ ...a,
924
+ content: g(o)
2298
925
  };
2299
- }, ms = async (e, t, n) => {
2300
- const r = typeof e == "string" ? e : e.id, s = typeof t == "string" ? t : t.id;
2301
- await p.$delete(
2302
- `/tasks/${r}/_link/${s}`,
926
+ }, Mt = async (e, t, n) => {
927
+ const s = typeof e == "string" ? e : e.id, r = typeof t == "string" ? t : t.id;
928
+ await i.$delete(
929
+ `/tasks/${s}/_link/${r}`,
2303
930
  { params: { namespaces: n } }
2304
931
  );
2305
- }, Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
932
+ }, Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2306
933
  __proto__: null,
2307
- Recurrence: pt,
2308
- createTask: cs,
2309
- deleteTask: fs,
2310
- disableTask: ps,
2311
- enableTask: ds,
2312
- getAllTargets: os,
2313
- getAllTasks: ss,
2314
- getTask: us,
2315
- getTasksOfTarget: is,
2316
- linkTaskToTemplate: hs,
2317
- unlinkTaskToTemplate: ms,
2318
- unsubTargetOfTask: as,
2319
- updateTask: ls,
2320
- upsertTask: Rt
2321
- }, Symbol.toStringTag, { value: "Module" })), qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
934
+ Recurrence: B,
935
+ createTask: Rt,
936
+ createTaskFromPreset: Ct,
937
+ deleteTask: xt,
938
+ disableTask: Nt,
939
+ enableTask: St,
940
+ getAllTargets: At,
941
+ getAllTasks: Lt,
942
+ getTask: Dt,
943
+ getTasksOfTarget: kt,
944
+ linkTaskToTemplate: Pt,
945
+ unlinkTaskToTemplate: Mt,
946
+ unsubTargetOfTask: Et,
947
+ updateTask: jt,
948
+ upsertTask: te
949
+ }, Symbol.toStringTag, { value: "Module" })), Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2322
950
  __proto__: null,
2323
- createTemplate: ts,
2324
- deleteTemplate: rs,
2325
- getAllTemplates: Xr,
2326
- getTemplate: es,
2327
- updateTemplate: ns,
2328
- upsertTemplate: St
2329
- }, Symbol.toStringTag, { value: "Module" })), ys = (e) => p.$get("/elastic/indices", { params: { namespace: e } }), gs = (e, t) => p.$get(`/elastic/indices/${e}`, { params: { namespace: t } }), Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
951
+ createTemplate: bt,
952
+ deleteTemplate: Tt,
953
+ getAllTemplates: wt,
954
+ getTemplate: _t,
955
+ updateTemplate: $t,
956
+ upsertTemplate: ee
957
+ }, Symbol.toStringTag, { value: "Module" })), Ut = (e) => i.$get("/elastic/indices", { params: { namespace: e } }), Yt = (e, t) => i.$get(`/elastic/indices/${e}`, { params: { namespace: t } }), Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2330
958
  __proto__: null,
2331
- getAllIndices: ys,
2332
- getIndexMapping: gs
2333
- }, Symbol.toStringTag, { value: "Module" })), Ws = "1.0.0-beta.9";
959
+ getAllIndices: Ut,
960
+ getIndexMapping: Yt
961
+ }, Symbol.toStringTag, { value: "Module" })), Xt = oe;
2334
962
  export {
2335
- ks as auth,
2336
- Fs as crons,
2337
- Js as elastic,
2338
- js as health,
2339
- Us as history,
2340
- Bs as namespaces,
2341
- Ms as queues,
2342
- zs as reports,
2343
- Hs as setup,
2344
- Is as tasks,
2345
- Us as tasksActivity,
2346
- qs as templates,
2347
- Ws as version
963
+ Ft as auth,
964
+ Wt as crons,
965
+ Vt as elastic,
966
+ Jt as health,
967
+ Bt as history,
968
+ Qt as namespaces,
969
+ Kt as queues,
970
+ qt as reports,
971
+ Ht as setup,
972
+ Zt as tasks,
973
+ Bt as tasksActivity,
974
+ Ot as tasksPresets,
975
+ Gt as templates,
976
+ Xt as version
2348
977
  };
2349
978
  //# sourceMappingURL=ezreeport-sdk-js.mjs.map