parcepatacore-compliance-review-react 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.
@@ -0,0 +1,2706 @@
1
+ import { jsx as A, jsxs as D } from "react/jsx-runtime";
2
+ import { createContext as pn, useEffect as Je, useContext as hn, useState as Te } from "react";
3
+ function Ct(e, t) {
4
+ return function() {
5
+ return e.apply(t, arguments);
6
+ };
7
+ }
8
+ const { toString: mn } = Object.prototype, { getPrototypeOf: X } = Object, { iterator: ye, toStringTag: Tt } = Symbol, he = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ft = (e) => typeof e == "string" && (e === "__proto__" || e === "constructor" || e === "prototype"), Pt = (e, t, n) => e === Object.prototype || !n && t === null, yn = (e) => {
9
+ if (!Object.isExtensible(e))
10
+ return !1;
11
+ const t = Object.getOwnPropertyNames(e);
12
+ return Object.getOwnPropertySymbols && t.push(...Object.getOwnPropertySymbols(e)), t.every((n) => {
13
+ if (Ft(n))
14
+ return !1;
15
+ const r = Object.getOwnPropertyDescriptor(e, n);
16
+ return !!r && r.configurable && r.writable === !0;
17
+ });
18
+ }, me = (e, t) => {
19
+ let n = e;
20
+ const r = [];
21
+ for (; n != null; ) {
22
+ if (r.indexOf(n) !== -1)
23
+ return !1;
24
+ r.push(n);
25
+ const s = X(n);
26
+ if (Pt(n, s, n === e))
27
+ return !1;
28
+ if (he(n, t))
29
+ return !0;
30
+ n = s;
31
+ }
32
+ return !1;
33
+ }, bn = (e, t) => e != null && me(e, t) ? e[t] : void 0, gn = (e) => {
34
+ if (e == null || typeof e != "object" && typeof e != "function")
35
+ return e;
36
+ const t = X(e);
37
+ if (t === null && yn(e))
38
+ return e;
39
+ const n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), s = [];
40
+ let o = e;
41
+ for (; o != null && s.indexOf(o) === -1; ) {
42
+ s.push(o);
43
+ const i = o === e ? t : X(o);
44
+ if (Pt(o, i, o === e))
45
+ break;
46
+ const l = Object.getOwnPropertyNames(o);
47
+ Object.getOwnPropertySymbols && l.push(...Object.getOwnPropertySymbols(o));
48
+ for (const c of l)
49
+ Ft(c) || he(r, c) || (n[c] = e[c], r[c] = !0);
50
+ o = i;
51
+ }
52
+ return n;
53
+ }, Ke = /* @__PURE__ */ ((e) => (t) => {
54
+ const n = mn.call(t);
55
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
56
+ })(/* @__PURE__ */ Object.create(null)), k = (e) => (e = e.toLowerCase(), (t) => Ke(t) === e), De = (e) => (t) => typeof t === e, { isArray: te } = Array, ne = De("undefined");
57
+ function ie(e) {
58
+ return e !== null && !ne(e) && e.constructor !== null && !ne(e.constructor) && j(e.constructor.isBuffer) && e.constructor.isBuffer(e);
59
+ }
60
+ const Dt = k("ArrayBuffer");
61
+ function En(e) {
62
+ let t;
63
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Dt(e.buffer), t;
64
+ }
65
+ const wn = De("string"), j = De("function"), Nt = De("number"), ae = (e) => e !== null && typeof e == "object", Rn = (e) => e === !0 || e === !1, xe = (e) => {
66
+ if (!ae(e))
67
+ return !1;
68
+ const t = X(e);
69
+ return (t === null || t === Object.prototype || X(t) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
70
+ // evidence the value is tagged/iterable, while ignoring members reachable
71
+ // only through shared or terminal prototype boundaries.
72
+ !me(e, Tt) && !me(e, ye);
73
+ }, On = (e) => {
74
+ if (!ae(e) || ie(e))
75
+ return !1;
76
+ try {
77
+ return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
78
+ } catch {
79
+ return !1;
80
+ }
81
+ }, Sn = k("Date"), xn = k("File"), _n = (e) => !!(e && typeof e.uri < "u"), An = (e) => e && typeof e.getParts < "u", Cn = k("Blob"), Tn = k("FileList"), Fn = k("Set"), Pn = (e) => ae(e) && j(e.pipe);
82
+ function Dn() {
83
+ return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
84
+ }
85
+ const at = Dn(), lt = typeof at.FormData < "u" ? at.FormData : void 0, Nn = (e) => {
86
+ if (!e) return !1;
87
+ if (lt && e instanceof lt) return !0;
88
+ const t = X(e);
89
+ if (!t || t === Object.prototype || !j(e.append)) return !1;
90
+ const n = Ke(e);
91
+ return n === "formdata" || // detect form-data instance
92
+ n === "object" && j(e.toString) && e.toString() === "[object FormData]";
93
+ }, Ln = k("URLSearchParams"), [Un, Bn, jn, In] = [
94
+ "ReadableStream",
95
+ "Request",
96
+ "Response",
97
+ "Headers"
98
+ ].map(k), kn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
99
+ function be(e, t, { allOwnKeys: n = !1 } = {}) {
100
+ if (e === null || typeof e > "u")
101
+ return;
102
+ let r, s;
103
+ if (typeof e != "object" && (e = [e]), te(e))
104
+ for (r = 0, s = e.length; r < s; r++)
105
+ t.call(null, e[r], r, e);
106
+ else {
107
+ if (ie(e))
108
+ return;
109
+ const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
110
+ let l;
111
+ for (r = 0; r < i; r++)
112
+ l = o[r], t.call(null, e[l], l, e);
113
+ }
114
+ }
115
+ function Lt(e, t) {
116
+ if (ie(e))
117
+ return null;
118
+ t = t.toLowerCase();
119
+ const n = Object.keys(e);
120
+ let r = n.length, s;
121
+ for (; r-- > 0; )
122
+ if (s = n[r], t === s.toLowerCase())
123
+ return s;
124
+ return null;
125
+ }
126
+ const Y = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ut = (e) => !ne(e) && e !== Y;
127
+ function $e(...e) {
128
+ const { caseless: t, skipUndefined: n } = Ut(this) && this || {}, r = {}, s = (o, i) => {
129
+ if (i === "__proto__" || i === "constructor" || i === "prototype")
130
+ return;
131
+ const l = t && typeof i == "string" && Lt(r, i) || i, c = he(r, l) ? r[l] : void 0;
132
+ xe(c) && xe(o) ? r[l] = $e(c, o) : xe(o) ? r[l] = $e({}, o) : te(o) ? r[l] = o.slice() : (!n || !ne(o)) && (r[l] = o);
133
+ };
134
+ for (let o = 0, i = e.length; o < i; o++) {
135
+ const l = e[o];
136
+ if (!l || ie(l) || (be(l, s), typeof l != "object" || te(l)))
137
+ continue;
138
+ const c = Object.getOwnPropertySymbols(l);
139
+ for (let d = 0; d < c.length; d++) {
140
+ const f = c[d];
141
+ Gn.call(l, f) && s(l[f], f);
142
+ }
143
+ }
144
+ return r;
145
+ }
146
+ const qn = (e, t, n, { allOwnKeys: r } = {}) => (be(
147
+ t,
148
+ (s, o) => {
149
+ n && j(s) ? Object.defineProperty(e, o, {
150
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
151
+ // hijack defineProperty's accessor-vs-data resolution.
152
+ __proto__: null,
153
+ value: Ct(s, n),
154
+ writable: !0,
155
+ enumerable: !0,
156
+ configurable: !0
157
+ }) : Object.defineProperty(e, o, {
158
+ __proto__: null,
159
+ value: s,
160
+ writable: !0,
161
+ enumerable: !0,
162
+ configurable: !0
163
+ });
164
+ },
165
+ { allOwnKeys: r }
166
+ ), e), Hn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Mn = (e, t, n, r) => {
167
+ e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
168
+ __proto__: null,
169
+ value: e,
170
+ writable: !0,
171
+ enumerable: !1,
172
+ configurable: !0
173
+ }), Object.defineProperty(e, "super", {
174
+ __proto__: null,
175
+ value: t.prototype
176
+ }), n && Object.assign(e.prototype, n);
177
+ }, vn = (e, t, n, r) => {
178
+ let s, o, i;
179
+ const l = {};
180
+ if (t = t || {}, e == null) return t;
181
+ do {
182
+ for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
183
+ i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
184
+ e = n !== !1 && X(e);
185
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
186
+ return t;
187
+ }, zn = (e, t, n) => {
188
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
189
+ const r = e.indexOf(t, n);
190
+ return r !== -1 && r === n;
191
+ }, $n = (e) => {
192
+ if (!e) return null;
193
+ if (te(e)) return e;
194
+ let t = e.length;
195
+ if (!Nt(t)) return null;
196
+ const n = new Array(t);
197
+ for (; t-- > 0; )
198
+ n[t] = e[t];
199
+ return n;
200
+ }, Wn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && X(Uint8Array)), Vn = (e, t) => {
201
+ const r = (e && e[ye]).call(e);
202
+ let s;
203
+ for (; (s = r.next()) && !s.done; ) {
204
+ const o = s.value;
205
+ t.call(e, o[0], o[1]);
206
+ }
207
+ }, Jn = (e, t) => {
208
+ let n;
209
+ const r = [];
210
+ for (; (n = e.exec(t)) !== null; )
211
+ r.push(n);
212
+ return r;
213
+ }, Kn = k("HTMLFormElement"), Xn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
214
+ return r.toUpperCase() + s;
215
+ }), { propertyIsEnumerable: Gn } = Object.prototype, Qn = k("RegExp"), Bt = (e, t) => {
216
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
217
+ be(n, (s, o) => {
218
+ let i;
219
+ (i = t(s, o, e)) !== !1 && (r[o] = i || s);
220
+ }), Object.defineProperties(e, r);
221
+ }, Zn = (e) => {
222
+ Bt(e, (t, n) => {
223
+ if (j(e) && ["arguments", "caller", "callee"].includes(n))
224
+ return !1;
225
+ const r = e[n];
226
+ if (j(r)) {
227
+ if (t.enumerable = !1, "writable" in t) {
228
+ t.writable = !1;
229
+ return;
230
+ }
231
+ t.set || (t.set = () => {
232
+ throw Error("Can not rewrite read-only method '" + n + "'");
233
+ });
234
+ }
235
+ });
236
+ }, Yn = (e, t) => {
237
+ const n = {}, r = (s) => {
238
+ s.forEach((o) => {
239
+ n[o] = !0;
240
+ });
241
+ };
242
+ return te(e) ? r(e) : r(String(e).split(t)), n;
243
+ }, er = () => {
244
+ }, tr = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
245
+ function nr(e) {
246
+ return !!(e && j(e.append) && e[Tt] === "FormData" && e[ye]);
247
+ }
248
+ const rr = (e) => {
249
+ const t = /* @__PURE__ */ new WeakSet(), n = (r) => {
250
+ if (ae(r)) {
251
+ if (t.has(r))
252
+ return;
253
+ if (ie(r))
254
+ return r;
255
+ if (!("toJSON" in r)) {
256
+ t.add(r);
257
+ let s;
258
+ if (Fn(r)) {
259
+ s = [];
260
+ for (const o of r) {
261
+ const i = n(o);
262
+ !ne(i) && s.push(i);
263
+ }
264
+ } else
265
+ s = te(r) ? [] : {}, be(r, (o, i) => {
266
+ const l = n(o);
267
+ !ne(l) && (s[i] = l);
268
+ });
269
+ return t.delete(r), s;
270
+ }
271
+ }
272
+ return r;
273
+ };
274
+ return n(e);
275
+ }, sr = k("AsyncFunction"), or = (e) => e && (ae(e) || j(e)) && j(e.then) && j(e.catch), jt = ((e, t) => e ? setImmediate : t ? ((n, r) => (Y.addEventListener(
276
+ "message",
277
+ ({ source: s, data: o }) => {
278
+ s === Y && o === n && r.length && r.shift()();
279
+ },
280
+ !1
281
+ ), (s) => {
282
+ r.push(s), Y.postMessage(n, "*");
283
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", j(Y.postMessage)), ir = typeof queueMicrotask < "u" ? queueMicrotask.bind(Y) : typeof process < "u" && process.nextTick || jt, It = (e) => e != null && j(e[ye]), ar = (e) => e != null && me(e, ye) && It(e), a = {
284
+ isArray: te,
285
+ isArrayBuffer: Dt,
286
+ isBuffer: ie,
287
+ isFormData: Nn,
288
+ isArrayBufferView: En,
289
+ isString: wn,
290
+ isNumber: Nt,
291
+ isBoolean: Rn,
292
+ isObject: ae,
293
+ isPlainObject: xe,
294
+ isEmptyObject: On,
295
+ isReadableStream: Un,
296
+ isRequest: Bn,
297
+ isResponse: jn,
298
+ isHeaders: In,
299
+ isUndefined: ne,
300
+ isDate: Sn,
301
+ isFile: xn,
302
+ isReactNativeBlob: _n,
303
+ isReactNative: An,
304
+ isBlob: Cn,
305
+ isRegExp: Qn,
306
+ isFunction: j,
307
+ isStream: Pn,
308
+ isURLSearchParams: Ln,
309
+ isTypedArray: Wn,
310
+ isFileList: Tn,
311
+ forEach: be,
312
+ merge: $e,
313
+ extend: qn,
314
+ trim: kn,
315
+ stripBOM: Hn,
316
+ inherits: Mn,
317
+ toFlatObject: vn,
318
+ kindOf: Ke,
319
+ kindOfTest: k,
320
+ endsWith: zn,
321
+ toArray: $n,
322
+ forEachEntry: Vn,
323
+ matchAll: Jn,
324
+ isHTMLForm: Kn,
325
+ hasOwnProperty: he,
326
+ hasOwnProp: he,
327
+ // an alias to avoid ESLint no-prototype-builtins detection
328
+ hasOwnInPrototypeChain: me,
329
+ getSafeProp: bn,
330
+ toSafeFlatObject: gn,
331
+ reduceDescriptors: Bt,
332
+ freezeMethods: Zn,
333
+ toObjectSet: Yn,
334
+ toCamelCase: Xn,
335
+ noop: er,
336
+ toFiniteNumber: tr,
337
+ findKey: Lt,
338
+ global: Y,
339
+ isContextDefined: Ut,
340
+ isSpecCompliantForm: nr,
341
+ toJSONObject: rr,
342
+ isAsyncFn: sr,
343
+ isThenable: or,
344
+ setImmediate: jt,
345
+ asap: ir,
346
+ isIterable: It,
347
+ isSafeIterable: ar
348
+ }, lr = a.toObjectSet([
349
+ "age",
350
+ "authorization",
351
+ "content-length",
352
+ "content-type",
353
+ "etag",
354
+ "expires",
355
+ "from",
356
+ "host",
357
+ "if-modified-since",
358
+ "if-unmodified-since",
359
+ "last-modified",
360
+ "location",
361
+ "max-forwards",
362
+ "proxy-authorization",
363
+ "referer",
364
+ "retry-after",
365
+ "user-agent"
366
+ ]), cr = (e) => {
367
+ const t = {};
368
+ let n, r, s;
369
+ return e && e.split(`
370
+ `).forEach(function(i) {
371
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim();
372
+ const l = a.hasOwnProp(t, n);
373
+ !n || l && a.hasOwnProp(lr, n) || (n === "set-cookie" ? l ? t[n].push(r) : t[n] = [r] : t[n] = l ? t[n] + ", " + r : r);
374
+ }), t;
375
+ };
376
+ function ur(e) {
377
+ let t = 0, n = e.length;
378
+ for (; t < n; ) {
379
+ const r = e.charCodeAt(t);
380
+ if (r !== 9 && r !== 32)
381
+ break;
382
+ t += 1;
383
+ }
384
+ for (; n > t; ) {
385
+ const r = e.charCodeAt(n - 1);
386
+ if (r !== 9 && r !== 32)
387
+ break;
388
+ n -= 1;
389
+ }
390
+ return t === 0 && n === e.length ? e : e.slice(t, n);
391
+ }
392
+ const fr = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), dr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
393
+ function Xe(e, t) {
394
+ return a.isArray(e) ? e.map((n) => Xe(n, t)) : ur(String(e).replace(t, ""));
395
+ }
396
+ const pr = (e) => Xe(e, fr), hr = (e) => Xe(e, dr);
397
+ function kt(e) {
398
+ const t = /* @__PURE__ */ Object.create(null);
399
+ return a.forEach(e.toJSON(), (n, r) => {
400
+ t[r] = hr(n);
401
+ }), t;
402
+ }
403
+ const ct = Symbol("internals");
404
+ function fe(e) {
405
+ return e && String(e).trim().toLowerCase();
406
+ }
407
+ function _e(e) {
408
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(_e) : pr(String(e));
409
+ }
410
+ function mr(e) {
411
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
412
+ let r;
413
+ for (; r = n.exec(e); )
414
+ t[r[1]] = r[2];
415
+ return t;
416
+ }
417
+ const yr = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
418
+ function Ie(e) {
419
+ let t = 0, n = e.length;
420
+ for (; t < n; ) {
421
+ const r = e.charCodeAt(t);
422
+ if (r !== 9 && r !== 32)
423
+ break;
424
+ t += 1;
425
+ }
426
+ for (; n > t; ) {
427
+ const r = e.charCodeAt(n - 1);
428
+ if (r !== 9 && r !== 32)
429
+ break;
430
+ n -= 1;
431
+ }
432
+ return t === 0 && n === e.length ? e : e.slice(t, n);
433
+ }
434
+ function br(e) {
435
+ const t = e.length - 1;
436
+ if (t < 1 || e.charCodeAt(0) !== 34 || e.charCodeAt(t) !== 34)
437
+ return e;
438
+ let n = "";
439
+ for (let r = 1; r < t; r++) {
440
+ const s = e.charCodeAt(r);
441
+ if (s === 34 || s === 92 && (r += 1, r >= t))
442
+ return e;
443
+ n += e[r];
444
+ }
445
+ return n;
446
+ }
447
+ function gr(e) {
448
+ const t = /* @__PURE__ */ Object.create(null), n = String(e);
449
+ let r = 0, s = !1, o = !1;
450
+ function i(l) {
451
+ const c = Ie(n.slice(r, l)), d = c.indexOf("=");
452
+ if (d < 1)
453
+ return;
454
+ const f = Ie(c.slice(0, d));
455
+ if (!yr.test(f))
456
+ return;
457
+ const p = f.toLowerCase();
458
+ if (p === "__proto__" || p === "constructor" || p === "prototype")
459
+ return;
460
+ const y = Ie(c.slice(d + 1));
461
+ t[p] = br(y);
462
+ }
463
+ for (let l = 0; l < n.length; l++) {
464
+ const c = n.charCodeAt(l);
465
+ s ? o ? o = !1 : c === 92 ? o = !0 : c === 34 && (s = !1) : c === 34 ? s = !0 : (c === 44 || c === 59) && (i(l), r = l + 1);
466
+ }
467
+ return i(n.length), t;
468
+ }
469
+ const Er = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
470
+ function ke(e, t, n, r, s) {
471
+ if (a.isFunction(r))
472
+ return r.call(this, t, n);
473
+ if (s && (t = n), !!a.isString(t)) {
474
+ if (a.isString(r))
475
+ return t.indexOf(r) !== -1;
476
+ if (a.isRegExp(r))
477
+ return r.test(t);
478
+ }
479
+ }
480
+ function wr(e) {
481
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
482
+ }
483
+ function Rr(e, t) {
484
+ const n = a.toCamelCase(" " + t);
485
+ ["get", "set", "has"].forEach((r) => {
486
+ Object.defineProperty(e, r + n, {
487
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
488
+ // this data descriptor into an accessor descriptor on the way in.
489
+ __proto__: null,
490
+ value: function(s, o, i) {
491
+ return this[r].call(this, t, s, o, i);
492
+ },
493
+ configurable: !0
494
+ });
495
+ });
496
+ }
497
+ let B = class {
498
+ constructor(t) {
499
+ t && this.set(t);
500
+ }
501
+ set(t, n, r) {
502
+ const s = this;
503
+ function o(l, c, d) {
504
+ const f = fe(c);
505
+ if (!f)
506
+ return;
507
+ const p = a.findKey(s, f);
508
+ (!p || s[p] === void 0 || d === !0 || d === void 0 && s[p] !== !1) && (s[p || c] = _e(l));
509
+ }
510
+ const i = (l, c) => a.forEach(l, (d, f) => o(d, f, c));
511
+ if (a.isPlainObject(t) || t instanceof this.constructor)
512
+ i(t, n);
513
+ else if (a.isString(t) && (t = t.trim()) && !Er(t))
514
+ i(cr(t), n);
515
+ else if (a.isObject(t) && a.isSafeIterable(t)) {
516
+ let l = /* @__PURE__ */ Object.create(null), c, d;
517
+ for (const f of t) {
518
+ if (!a.isArray(f))
519
+ throw new TypeError("Object iterator must return a key-value pair");
520
+ d = f[0], a.hasOwnProp(l, d) ? (c = l[d], l[d] = a.isArray(c) ? [...c, f[1]] : [c, f[1]]) : l[d] = f[1];
521
+ }
522
+ i(l, n);
523
+ } else
524
+ t != null && o(n, t, r);
525
+ return this;
526
+ }
527
+ get(t, n) {
528
+ if (t = fe(t), t) {
529
+ const r = a.findKey(this, t);
530
+ if (r) {
531
+ const s = this[r];
532
+ if (!n)
533
+ return s;
534
+ if (n === !0)
535
+ return mr(s);
536
+ if (a.isFunction(n))
537
+ return n.call(this, s, r);
538
+ if (a.isRegExp(n))
539
+ return n.exec(s);
540
+ throw new TypeError("parser must be boolean|regexp|function");
541
+ }
542
+ }
543
+ }
544
+ has(t, n) {
545
+ if (t = fe(t), t) {
546
+ const r = a.findKey(this, t);
547
+ return !!(r && this[r] !== void 0 && (!n || ke(this, this[r], r, n)));
548
+ }
549
+ return !1;
550
+ }
551
+ delete(t, n) {
552
+ const r = this;
553
+ let s = !1;
554
+ function o(i) {
555
+ if (i = fe(i), i) {
556
+ const l = a.findKey(r, i);
557
+ l && (!n || ke(r, r[l], l, n)) && (delete r[l], s = !0);
558
+ }
559
+ }
560
+ return a.isArray(t) ? t.forEach(o) : o(t), s;
561
+ }
562
+ clear(t) {
563
+ const n = Object.keys(this);
564
+ let r = n.length, s = !1;
565
+ for (; r--; ) {
566
+ const o = n[r];
567
+ (!t || ke(this, this[o], o, t, !0)) && (delete this[o], s = !0);
568
+ }
569
+ return s;
570
+ }
571
+ normalize(t) {
572
+ const n = this, r = {};
573
+ return a.forEach(this, (s, o) => {
574
+ const i = a.findKey(r, o);
575
+ if (i) {
576
+ n[i] = _e(s), delete n[o];
577
+ return;
578
+ }
579
+ const l = t ? wr(o) : String(o).trim();
580
+ l !== o && delete n[o], n[l] = _e(s), r[l] = !0;
581
+ }), this;
582
+ }
583
+ concat(...t) {
584
+ return this.constructor.concat(this, ...t);
585
+ }
586
+ toJSON(t) {
587
+ const n = /* @__PURE__ */ Object.create(null);
588
+ return a.forEach(this, (r, s) => {
589
+ r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
590
+ }), n;
591
+ }
592
+ [Symbol.iterator]() {
593
+ return Object.entries(this.toJSON())[Symbol.iterator]();
594
+ }
595
+ toString() {
596
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
597
+ `);
598
+ }
599
+ getSetCookie() {
600
+ const t = this.get("set-cookie");
601
+ return a.isArray(t) ? t : t == null || t === !1 ? [] : [t];
602
+ }
603
+ get [Symbol.toStringTag]() {
604
+ return "AxiosHeaders";
605
+ }
606
+ static from(t) {
607
+ return t instanceof this ? t : new this(t);
608
+ }
609
+ static parseParameters(t) {
610
+ return gr(t);
611
+ }
612
+ static concat(t, ...n) {
613
+ const r = new this(t);
614
+ return n.forEach((s) => r.set(s)), r;
615
+ }
616
+ static accessor(t) {
617
+ const r = (this[ct] = this[ct] = {
618
+ accessors: {}
619
+ }).accessors, s = this.prototype;
620
+ function o(i) {
621
+ const l = fe(i);
622
+ r[l] || (Rr(s, i), r[l] = !0);
623
+ }
624
+ return a.isArray(t) ? t.forEach(o) : o(t), this;
625
+ }
626
+ };
627
+ B.accessor([
628
+ "Content-Type",
629
+ "Content-Length",
630
+ "Accept",
631
+ "Accept-Encoding",
632
+ "User-Agent",
633
+ "Authorization"
634
+ ]);
635
+ a.reduceDescriptors(B.prototype, ({ value: e }, t) => {
636
+ let n = t[0].toUpperCase() + t.slice(1);
637
+ return {
638
+ get: () => e,
639
+ set(r) {
640
+ this[n] = r;
641
+ }
642
+ };
643
+ });
644
+ a.freezeMethods(B);
645
+ const Fe = "[REDACTED ****]";
646
+ function Or(e) {
647
+ if (a.hasOwnProp(e, "toJSON"))
648
+ return !0;
649
+ let t = Object.getPrototypeOf(e);
650
+ for (; t && t !== Object.prototype; ) {
651
+ if (a.hasOwnProp(t, "toJSON"))
652
+ return !0;
653
+ t = Object.getPrototypeOf(t);
654
+ }
655
+ return !1;
656
+ }
657
+ function Sr(e, t) {
658
+ const n = new Set(t.map((o) => String(o).toLowerCase())), r = [], s = (o) => {
659
+ if (o === null || typeof o != "object" || a.isBuffer(o)) return o;
660
+ if (r.indexOf(o) !== -1) return;
661
+ o instanceof B && (o = o.toJSON()), r.push(o);
662
+ let i;
663
+ if (a.isArray(o))
664
+ i = [], o.forEach((l, c) => {
665
+ const d = s(l);
666
+ a.isUndefined(d) || (i[c] = d);
667
+ });
668
+ else {
669
+ if (!a.isPlainObject(o) && Or(o))
670
+ return r.pop(), o;
671
+ i = /* @__PURE__ */ Object.create(null);
672
+ for (const [l, c] of Object.entries(o)) {
673
+ const d = n.has(l.toLowerCase()) ? Fe : s(c);
674
+ a.isUndefined(d) || (i[l] = d);
675
+ }
676
+ }
677
+ return r.pop(), i;
678
+ };
679
+ return s(e);
680
+ }
681
+ function ut(e) {
682
+ try {
683
+ return String(e);
684
+ } catch {
685
+ return "";
686
+ }
687
+ }
688
+ function xr(e) {
689
+ return e.errors.map((n) => {
690
+ try {
691
+ return n && n.message ? ut(n.message) : ut(n);
692
+ } catch {
693
+ return "";
694
+ }
695
+ }).filter(Boolean).join("; ") || e.name || "AggregateError";
696
+ }
697
+ let h = class qt extends Error {
698
+ static from(t, n, r, s, o, i) {
699
+ let l = t.message;
700
+ !l && a.isArray(t.errors) && t.errors.length && (l = xr(t));
701
+ const c = new qt(l, n || t.code, r, s, o);
702
+ return Object.defineProperty(c, "cause", {
703
+ __proto__: null,
704
+ value: t,
705
+ writable: !0,
706
+ enumerable: !1,
707
+ configurable: !0
708
+ }), c.name = t.name, t.status != null && c.status == null && (c.status = t.status), i && Object.assign(c, i), c;
709
+ }
710
+ /**
711
+ * Create an Error with the specified message, config, error code, request and response.
712
+ *
713
+ * @param {string} message The error message.
714
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
715
+ * @param {Object} [config] The config.
716
+ * @param {Object} [request] The request.
717
+ * @param {Object} [response] The response.
718
+ *
719
+ * @returns {Error} The created error.
720
+ */
721
+ constructor(t, n, r, s, o) {
722
+ super(t), Object.defineProperty(this, "message", {
723
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
724
+ // this data descriptor into an accessor descriptor on the way in.
725
+ __proto__: null,
726
+ value: t,
727
+ enumerable: !0,
728
+ writable: !0,
729
+ configurable: !0
730
+ }), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
731
+ }
732
+ toJSON() {
733
+ const t = this.config, n = t && a.hasOwnProp(t, "redact") ? t.redact : void 0, r = a.isArray(n) && n.length > 0 ? Sr(t, n) : a.toJSONObject(t);
734
+ return {
735
+ // Standard
736
+ message: this.message,
737
+ name: this.name,
738
+ // Microsoft
739
+ description: this.description,
740
+ number: this.number,
741
+ // Mozilla
742
+ fileName: this.fileName,
743
+ lineNumber: this.lineNumber,
744
+ columnNumber: this.columnNumber,
745
+ stack: this.stack,
746
+ // Axios
747
+ config: r,
748
+ code: this.code,
749
+ status: this.status
750
+ };
751
+ }
752
+ };
753
+ h.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
754
+ h.ERR_BAD_OPTION = "ERR_BAD_OPTION";
755
+ h.ECONNABORTED = "ECONNABORTED";
756
+ h.ETIMEDOUT = "ETIMEDOUT";
757
+ h.ECONNREFUSED = "ECONNREFUSED";
758
+ h.ERR_NETWORK = "ERR_NETWORK";
759
+ h.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
760
+ h.ERR_DEPRECATED = "ERR_DEPRECATED";
761
+ h.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
762
+ h.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
763
+ h.ERR_CANCELED = "ERR_CANCELED";
764
+ h.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
765
+ h.ERR_INVALID_URL = "ERR_INVALID_URL";
766
+ h.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
767
+ const _r = null, Ht = 100;
768
+ function We(e) {
769
+ return a.isPlainObject(e) || a.isArray(e);
770
+ }
771
+ function Mt(e) {
772
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
773
+ }
774
+ function qe(e, t, n) {
775
+ return e ? e.concat(t).map(function(s, o) {
776
+ return s = Mt(s), !n && o ? "[" + s + "]" : s;
777
+ }).join(n ? "." : "") : t;
778
+ }
779
+ function Ar(e) {
780
+ return a.isArray(e) && !e.some(We);
781
+ }
782
+ const Cr = a.toFlatObject(a, {}, null, function(t) {
783
+ return /^is[A-Z]/.test(t);
784
+ });
785
+ function Ne(e, t, n) {
786
+ if (!a.isObject(e))
787
+ throw new TypeError("target must be an object");
788
+ t = t || new FormData();
789
+ const r = (m, E) => {
790
+ const b = a.getSafeProp(n, m);
791
+ return a.isUndefined(b) ? E : b;
792
+ }, s = r("metaTokens", !0), o = r("visitor") || S, i = r("dots", !1), l = r("indexes", !1), c = r("Blob") || typeof Blob < "u" && Blob, d = r("maxDepth", Ht), f = c && a.isSpecCompliantForm(t), p = [];
793
+ if (!a.isFunction(o))
794
+ throw new TypeError("visitor must be a function");
795
+ function y(m) {
796
+ if (m === null) return "";
797
+ if (a.isDate(m))
798
+ return m.toISOString();
799
+ if (a.isBoolean(m))
800
+ return m.toString();
801
+ if (!f && a.isBlob(m))
802
+ throw new h("Blob is not supported. Use a Buffer instead.");
803
+ if (a.isArrayBuffer(m) || a.isTypedArray(m)) {
804
+ if (f && typeof c == "function")
805
+ return new c([m]);
806
+ throw new h(
807
+ "Blob is not supported. Use a Buffer instead.",
808
+ h.ERR_NOT_SUPPORT
809
+ );
810
+ }
811
+ return m;
812
+ }
813
+ function w(m) {
814
+ if (m > d)
815
+ throw new h(
816
+ "Object is too deeply nested (" + m + " levels). Max depth: " + d,
817
+ h.ERR_FORM_DATA_DEPTH_EXCEEDED
818
+ );
819
+ }
820
+ function R(m, E) {
821
+ if (d === 1 / 0)
822
+ return JSON.stringify(m);
823
+ const b = [];
824
+ return JSON.stringify(m, function(N, _) {
825
+ if (!a.isObject(_))
826
+ return _;
827
+ for (; b.length && b[b.length - 1] !== this; )
828
+ b.pop();
829
+ return b.push(_), w(E + b.length - 1), _;
830
+ });
831
+ }
832
+ function S(m, E, b) {
833
+ let T = m;
834
+ if (a.isReactNative(t) && a.isReactNativeBlob(m))
835
+ return t.append(qe(b, E, i), y(m)), !1;
836
+ if (m && !b && typeof m == "object") {
837
+ if (a.endsWith(E, "{}"))
838
+ E = s ? E : E.slice(0, -2), m = R(m, 1);
839
+ else if (a.isArray(m) && Ar(m) || (a.isFileList(m) || a.endsWith(E, "[]")) && (T = a.toArray(m)))
840
+ return E = Mt(E), T.forEach(function(_, H) {
841
+ !(a.isUndefined(_) || _ === null) && t.append(
842
+ // eslint-disable-next-line no-nested-ternary
843
+ l === !0 ? qe([E], H, i) : l === null ? E : E + "[]",
844
+ y(_)
845
+ );
846
+ }), !1;
847
+ }
848
+ return We(m) ? !0 : (t.append(qe(b, E, i), y(m)), !1);
849
+ }
850
+ const C = Object.assign(Cr, {
851
+ defaultVisitor: S,
852
+ convertValue: y,
853
+ isVisitable: We
854
+ });
855
+ function u(m, E, b = 0) {
856
+ if (!a.isUndefined(m)) {
857
+ if (w(b), p.indexOf(m) !== -1)
858
+ throw new Error("Circular reference detected in " + E.join("."));
859
+ p.push(m), a.forEach(m, function(N, _) {
860
+ (!(a.isUndefined(N) || N === null) && o.call(t, N, a.isString(_) ? _.trim() : _, E, C)) === !0 && u(N, E ? E.concat(_) : [_], b + 1);
861
+ }), p.pop();
862
+ }
863
+ }
864
+ if (!a.isObject(e))
865
+ throw new TypeError("data must be an object");
866
+ return u(e), t;
867
+ }
868
+ function ft(e) {
869
+ const t = {
870
+ "!": "%21",
871
+ "'": "%27",
872
+ "(": "%28",
873
+ ")": "%29",
874
+ "~": "%7E",
875
+ "%20": "+"
876
+ };
877
+ return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(r) {
878
+ return t[r];
879
+ });
880
+ }
881
+ function Ge(e, t) {
882
+ this._pairs = [], e && Ne(e, this, t);
883
+ }
884
+ const vt = Ge.prototype;
885
+ vt.append = function(t, n) {
886
+ this._pairs.push([t, n]);
887
+ };
888
+ vt.toString = function(t) {
889
+ const n = t ? (r) => t.call(this, r, ft) : ft;
890
+ return this._pairs.map(function(s) {
891
+ return n(s[0]) + "=" + n(s[1]);
892
+ }, "").join("&");
893
+ };
894
+ function Tr(e) {
895
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
896
+ }
897
+ function zt(e, t, n) {
898
+ if (!t)
899
+ return e;
900
+ e = e || "";
901
+ const r = a.isFunction(n) ? {
902
+ serialize: n
903
+ } : n, s = a.getSafeProp(r, "encode") || Tr, o = a.getSafeProp(r, "serialize");
904
+ let i;
905
+ if (o ? i = o(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new Ge(t, r).toString(s), i) {
906
+ const l = e.indexOf("#");
907
+ l !== -1 && (e = e.slice(0, l)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
908
+ }
909
+ return e;
910
+ }
911
+ const de = Symbol("internals");
912
+ function $t(e) {
913
+ return e ? e.length : 0;
914
+ }
915
+ function dt(e) {
916
+ if (e)
917
+ for (; e.length && e[e.length - 1] === null; )
918
+ e.pop();
919
+ }
920
+ function pe(e, t) {
921
+ const n = e.handlers, r = $t(n);
922
+ n !== t.handlersRef ? (t.handlersRef = n, t.handlerEntries.clear()) : r !== t.handlersLength && (r ? t.handlerEntries.forEach(function(o, i) {
923
+ n[o.index] !== o.handler && t.handlerEntries.delete(i);
924
+ }) : t.handlerEntries.clear()), t.handlersLength = r;
925
+ }
926
+ class pt {
927
+ constructor() {
928
+ this.handlers = [], this[de] = {
929
+ handlersRef: this.handlers,
930
+ handlersLength: this.handlers.length,
931
+ handlerEntries: /* @__PURE__ */ new Map(),
932
+ iterationDepth: 0,
933
+ nextId: 0
934
+ };
935
+ }
936
+ /**
937
+ * Add a new interceptor to the stack
938
+ *
939
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
940
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
941
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
942
+ *
943
+ * @return {Number} An ID used to remove interceptor later
944
+ */
945
+ use(t, n, r) {
946
+ const s = {
947
+ fulfilled: t,
948
+ rejected: n,
949
+ synchronous: r ? r.synchronous : !1,
950
+ runWhen: r ? r.runWhen : null
951
+ }, o = this[de];
952
+ this.handlers == null && (this.handlers = []), pe(this, o);
953
+ const i = o.nextId++;
954
+ return this.handlers.push(s), o.handlerEntries.set(i, {
955
+ handler: s,
956
+ index: this.handlers.length - 1
957
+ }), o.handlersLength = this.handlers.length, i;
958
+ }
959
+ /**
960
+ * Remove an interceptor from the stack
961
+ *
962
+ * @param {Number} id The ID that was returned by `use`
963
+ *
964
+ * @returns {void}
965
+ */
966
+ eject(t) {
967
+ const n = this[de];
968
+ pe(this, n);
969
+ const r = n.handlerEntries.get(t);
970
+ if (r) {
971
+ if (n.handlerEntries.delete(t), this.handlers[r.index] !== r.handler)
972
+ return;
973
+ this.handlers[r.index] = null, n.iterationDepth || (dt(this.handlers), n.handlersLength = this.handlers.length);
974
+ }
975
+ }
976
+ /**
977
+ * Clear all interceptors from the stack
978
+ *
979
+ * @returns {void}
980
+ */
981
+ clear() {
982
+ this.handlers && (this.handlers = [], pe(this, this[de]));
983
+ }
984
+ /**
985
+ * Iterate over all the registered interceptors
986
+ *
987
+ * This method is particularly useful for skipping over any
988
+ * interceptors that may have become `null` calling `eject`.
989
+ *
990
+ * @param {Function} fn The function to call for each interceptor
991
+ *
992
+ * @returns {void}
993
+ */
994
+ forEach(t) {
995
+ const n = this[de];
996
+ pe(this, n), n.iterationDepth++;
997
+ try {
998
+ a.forEach(this.handlers, function(s) {
999
+ s !== null && t(s);
1000
+ });
1001
+ } finally {
1002
+ --n.iterationDepth || (pe(this, n), dt(this.handlers), n.handlersLength = $t(this.handlers));
1003
+ }
1004
+ }
1005
+ }
1006
+ const Qe = {
1007
+ silentJSONParsing: !0,
1008
+ forcedJSONParsing: !0,
1009
+ clarifyTimeoutError: !1,
1010
+ legacyInterceptorReqResOrdering: !0,
1011
+ advertiseZstdAcceptEncoding: !1,
1012
+ validateStatusUndefinedResolves: !0
1013
+ }, Fr = typeof URLSearchParams < "u" ? URLSearchParams : Ge, Pr = typeof FormData < "u" ? FormData : null, Dr = typeof Blob < "u" ? Blob : null, Nr = {
1014
+ isBrowser: !0,
1015
+ classes: {
1016
+ URLSearchParams: Fr,
1017
+ FormData: Pr,
1018
+ Blob: Dr
1019
+ },
1020
+ protocols: ["http", "https", "file", "blob", "url", "data"]
1021
+ }, Ze = typeof window < "u" && typeof document < "u", Ve = typeof navigator == "object" && navigator || void 0, Lr = Ze && (!Ve || ["ReactNative", "NativeScript", "NS"].indexOf(Ve.product) < 0), Ur = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1022
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Br = Ze && window.location.href || "http://localhost", jr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1023
+ __proto__: null,
1024
+ hasBrowserEnv: Ze,
1025
+ hasStandardBrowserEnv: Lr,
1026
+ hasStandardBrowserWebWorkerEnv: Ur,
1027
+ navigator: Ve,
1028
+ origin: Br
1029
+ }, Symbol.toStringTag, { value: "Module" })), F = {
1030
+ ...jr,
1031
+ ...Nr
1032
+ };
1033
+ function Ir(e, t) {
1034
+ return Ne(e, new F.classes.URLSearchParams(), {
1035
+ visitor: function(n, r, s, o) {
1036
+ return F.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
1037
+ },
1038
+ ...t
1039
+ });
1040
+ }
1041
+ const ht = Ht;
1042
+ function Wt(e) {
1043
+ if (e > ht)
1044
+ throw new h(
1045
+ "FormData field is too deeply nested (" + e + " levels). Max depth: " + ht,
1046
+ h.ERR_FORM_DATA_DEPTH_EXCEEDED
1047
+ );
1048
+ }
1049
+ function kr(e) {
1050
+ const t = [], n = /[^.[\]]+|\[([^.[\]]*)]/g;
1051
+ let r;
1052
+ for (; (r = n.exec(e)) !== null; )
1053
+ Wt(t.length), t.push(r[0] === "[]" ? "" : r[1] || r[0]);
1054
+ return t;
1055
+ }
1056
+ function qr(e) {
1057
+ const t = {}, n = Object.keys(e);
1058
+ let r;
1059
+ const s = n.length;
1060
+ let o;
1061
+ for (r = 0; r < s; r++)
1062
+ o = n[r], t[o] = e[o];
1063
+ return t;
1064
+ }
1065
+ function Vt(e) {
1066
+ function t(n, r, s, o) {
1067
+ Wt(o);
1068
+ let i = n[o++];
1069
+ if (i === "__proto__") return !0;
1070
+ const l = Number.isFinite(+i), c = o >= n.length;
1071
+ return i = !i && a.isArray(s) ? s.length : i, c ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !l) : ((!a.hasOwnProp(s, i) || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = qr(s[i])), !l);
1072
+ }
1073
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
1074
+ const n = {};
1075
+ return a.forEachEntry(e, (r, s) => {
1076
+ t(kr(r), s, n, 0);
1077
+ }), n;
1078
+ }
1079
+ return null;
1080
+ }
1081
+ const Jt = Object.freeze([
1082
+ "get",
1083
+ "delete",
1084
+ "head",
1085
+ "options",
1086
+ "post",
1087
+ "put",
1088
+ "patch",
1089
+ "purge",
1090
+ "link",
1091
+ "unlink",
1092
+ "query"
1093
+ ]), oe = (e, t) => e != null && a.hasOwnProp(e, t) ? e[t] : void 0;
1094
+ function Hr(e, t, n) {
1095
+ if (a.isString(e))
1096
+ try {
1097
+ return (t || JSON.parse)(e), a.trim(e);
1098
+ } catch (r) {
1099
+ if (r.name !== "SyntaxError")
1100
+ throw r;
1101
+ }
1102
+ return (n || JSON.stringify)(e);
1103
+ }
1104
+ const ge = {
1105
+ transitional: Qe,
1106
+ adapter: ["xhr", "http", "fetch"],
1107
+ transformRequest: [
1108
+ function(t, n) {
1109
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
1110
+ if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
1111
+ return s ? JSON.stringify(Vt(t)) : t;
1112
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
1113
+ return t;
1114
+ if (a.isArrayBufferView(t))
1115
+ return t.buffer;
1116
+ if (a.isURLSearchParams(t))
1117
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1118
+ let l;
1119
+ if (o) {
1120
+ const c = oe(this, "formSerializer");
1121
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
1122
+ return Ir(t, c).toString();
1123
+ if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1124
+ const d = oe(this, "env"), f = d && d.FormData;
1125
+ return Ne(
1126
+ l ? { "files[]": t } : t,
1127
+ f && new f(),
1128
+ c
1129
+ );
1130
+ }
1131
+ }
1132
+ return o || s ? (n.setContentType("application/json", !1), Hr(t)) : t;
1133
+ }
1134
+ ],
1135
+ transformResponse: [
1136
+ function(t) {
1137
+ const n = oe(this, "transitional") || ge.transitional, r = n && n.forcedJSONParsing, s = oe(this, "responseType"), o = s === "json";
1138
+ if (a.isResponse(t) || a.isReadableStream(t))
1139
+ return t;
1140
+ if (t && a.isString(t) && (r && !s || o)) {
1141
+ const l = !(n && n.silentJSONParsing) && o;
1142
+ try {
1143
+ return JSON.parse(t, oe(this, "parseReviver"));
1144
+ } catch (c) {
1145
+ if (l)
1146
+ throw c.name === "SyntaxError" ? h.from(c, h.ERR_BAD_RESPONSE, this, null, oe(this, "response")) : c;
1147
+ }
1148
+ }
1149
+ return t;
1150
+ }
1151
+ ],
1152
+ /**
1153
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1154
+ * timeout is not created.
1155
+ */
1156
+ timeout: 0,
1157
+ xsrfCookieName: "XSRF-TOKEN",
1158
+ xsrfHeaderName: "X-XSRF-TOKEN",
1159
+ maxContentLength: -1,
1160
+ maxBodyLength: -1,
1161
+ env: {
1162
+ FormData: F.classes.FormData,
1163
+ Blob: F.classes.Blob
1164
+ },
1165
+ validateStatus: function(t) {
1166
+ return t >= 200 && t < 300;
1167
+ },
1168
+ headers: {
1169
+ common: {
1170
+ Accept: "application/json, text/plain, */*",
1171
+ "Content-Type": void 0
1172
+ }
1173
+ }
1174
+ };
1175
+ a.forEach(Jt, (e) => {
1176
+ ge.headers[e] = {};
1177
+ });
1178
+ function He(e, t) {
1179
+ const n = this || ge, r = t || n, s = B.from(r.headers);
1180
+ let o = r.data;
1181
+ return a.forEach(e, function(l) {
1182
+ o = l.call(n, o, s.normalize(), t ? t.status : void 0);
1183
+ }), s.normalize(), o;
1184
+ }
1185
+ function Kt(e) {
1186
+ return !!(e && e.__CANCEL__);
1187
+ }
1188
+ let Ee = class extends h {
1189
+ /**
1190
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1191
+ *
1192
+ * @param {string=} message The message.
1193
+ * @param {Object=} config The config.
1194
+ * @param {Object=} request The request.
1195
+ *
1196
+ * @returns {CanceledError} The created error.
1197
+ */
1198
+ constructor(t, n, r) {
1199
+ super(t ?? "canceled", h.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
1200
+ }
1201
+ };
1202
+ function Xt(e, t, n) {
1203
+ const r = n.config.validateStatus;
1204
+ !n.status || !r || r(n.status) ? e(n) : t(new h(
1205
+ "Request failed with status code " + n.status,
1206
+ n.status >= 400 && n.status < 500 ? h.ERR_BAD_REQUEST : h.ERR_BAD_RESPONSE,
1207
+ n.config,
1208
+ n.request,
1209
+ n
1210
+ ));
1211
+ }
1212
+ const Mr = /[\t\n\r]/g;
1213
+ function Gt(e) {
1214
+ if (typeof e != "string")
1215
+ return e;
1216
+ let t = 0;
1217
+ for (; t < e.length && e.charCodeAt(t) <= 32; )
1218
+ t++;
1219
+ return e.slice(t).replace(Mr, "");
1220
+ }
1221
+ function Me(e) {
1222
+ const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
1223
+ return t && t[1] || "";
1224
+ }
1225
+ function vr(e, t) {
1226
+ e = e || 10;
1227
+ const n = new Array(e), r = new Array(e);
1228
+ let s = 0, o = 0, i;
1229
+ return t = t !== void 0 ? t : 1e3, function(c) {
1230
+ const d = Date.now(), f = r[o];
1231
+ i || (i = d), n[s] = c, r[s] = d;
1232
+ let p = o, y = 0;
1233
+ for (; p !== s; )
1234
+ y += n[p++], p = p % e;
1235
+ if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
1236
+ return;
1237
+ const w = f && d - f;
1238
+ return w ? Math.round(y * 1e3 / w) : void 0;
1239
+ };
1240
+ }
1241
+ function zr(e, t) {
1242
+ let n = 0, r = 1e3 / t, s, o;
1243
+ const i = (f, p = Date.now()) => {
1244
+ n = p, s = null, o && (clearTimeout(o), o = null), e(...f);
1245
+ };
1246
+ return [(...f) => {
1247
+ const p = Date.now(), y = p - n;
1248
+ y >= r ? i(f, p) : (s = f, o || (o = setTimeout(() => {
1249
+ o = null, i(s);
1250
+ }, r - y)));
1251
+ }, () => s && i(s), (...f) => i(f)];
1252
+ }
1253
+ const Pe = (e, t, n = 3) => {
1254
+ let r = 0;
1255
+ const s = vr(50, 250);
1256
+ return zr((o) => {
1257
+ if (!o || !a.isNumber(o.loaded))
1258
+ return;
1259
+ const i = o.loaded, l = o.lengthComputable ? o.total : void 0, c = Math.max(0, l != null ? Math.min(i, l) : i), d = Math.max(0, c - r), f = s(d);
1260
+ r = Math.max(r, c);
1261
+ const p = {
1262
+ loaded: c,
1263
+ total: l,
1264
+ progress: l ? c / l : void 0,
1265
+ bytes: d,
1266
+ rate: f || void 0,
1267
+ estimated: f && l ? (l - c) / f : void 0,
1268
+ event: o,
1269
+ lengthComputable: l != null,
1270
+ [t ? "download" : "upload"]: !0
1271
+ };
1272
+ e(p);
1273
+ }, n);
1274
+ }, mt = (e, t) => {
1275
+ const n = e != null;
1276
+ return [
1277
+ (r) => t[0]({
1278
+ lengthComputable: n,
1279
+ total: e,
1280
+ loaded: r
1281
+ }),
1282
+ t[1]
1283
+ ];
1284
+ }, yt = (e, t = a.asap) => (...n) => t(() => e(...n)), $r = F.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, F.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1285
+ new URL(F.origin),
1286
+ F.navigator && /(msie|trident)/i.test(F.navigator.userAgent)
1287
+ ) : () => !0, Wr = F.hasStandardBrowserEnv ? (
1288
+ // Standard browser envs support document.cookie
1289
+ {
1290
+ write(e, t, n, r, s, o, i) {
1291
+ if (typeof document > "u") return;
1292
+ const l = [`${e}=${encodeURIComponent(t)}`];
1293
+ a.isNumber(n) && l.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && l.push(`path=${r}`), a.isString(s) && l.push(`domain=${s}`), o === !0 && l.push("secure"), a.isString(i) && l.push(`SameSite=${i}`), document.cookie = l.join("; ");
1294
+ },
1295
+ read(e) {
1296
+ if (typeof document > "u") return null;
1297
+ const t = document.cookie.split(";");
1298
+ for (let n = 0; n < t.length; n++) {
1299
+ const r = t[n].replace(/^\s+/, ""), s = r.indexOf("=");
1300
+ if (s !== -1 && r.slice(0, s) === e)
1301
+ try {
1302
+ return decodeURIComponent(r.slice(s + 1));
1303
+ } catch {
1304
+ return r.slice(s + 1);
1305
+ }
1306
+ }
1307
+ return null;
1308
+ },
1309
+ remove(e) {
1310
+ this.write(e, "", Date.now() - 864e5, "/");
1311
+ }
1312
+ }
1313
+ ) : (
1314
+ // Non-standard browser env (web workers, react-native) lack needed support.
1315
+ {
1316
+ write() {
1317
+ },
1318
+ read() {
1319
+ return null;
1320
+ },
1321
+ remove() {
1322
+ }
1323
+ }
1324
+ );
1325
+ function Vr(e) {
1326
+ return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1327
+ }
1328
+ function Jr(e, t) {
1329
+ if (!t)
1330
+ return e;
1331
+ let n = e.length;
1332
+ for (; n > 0 && e.charCodeAt(n - 1) === 47; )
1333
+ n--;
1334
+ return e.slice(0, n) + "/" + t.replace(/^\/+/, "");
1335
+ }
1336
+ const Kr = /^https?:(?!\/\/)/i;
1337
+ function Xr(e) {
1338
+ return e && e.replace(/(^|&)([^=&]*=)?[^&]+/g, (t, n, r = "") => `${n}${r}${Fe}`);
1339
+ }
1340
+ function Gr(e) {
1341
+ const t = e.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${Fe}@`), n = t.indexOf("#"), s = (n === -1 ? t : t.slice(0, n)).replace(
1342
+ /([?&][^=&#]*=)[^&#]*/g,
1343
+ `$1${Fe}`
1344
+ );
1345
+ return n === -1 ? s : `${s}#${Xr(t.slice(n + 1))}`;
1346
+ }
1347
+ function bt(e, t) {
1348
+ if (typeof e == "string") {
1349
+ const n = Gt(e);
1350
+ if (Kr.test(n))
1351
+ throw new h(
1352
+ `Invalid URL ${JSON.stringify(Gr(n))}: missing "//" after protocol`,
1353
+ h.ERR_INVALID_URL,
1354
+ t
1355
+ );
1356
+ }
1357
+ }
1358
+ function Qt(e, t, n, r) {
1359
+ bt(t, r);
1360
+ let s = !Vr(t);
1361
+ return e && (s || n === !1) ? (bt(e, r), Jr(e, t)) : t;
1362
+ }
1363
+ const gt = (e) => e instanceof B ? { ...e } : e, Qr = (e) => Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor ? Object.keys(e).concat(
1364
+ Object.getOwnPropertySymbols(e).filter(
1365
+ (t) => Object.getOwnPropertyDescriptor(e, t).enumerable
1366
+ )
1367
+ ) : Object.keys(e);
1368
+ function re(e, t) {
1369
+ e = e || {}, t = t || {};
1370
+ const n = /* @__PURE__ */ Object.create(null);
1371
+ Object.defineProperty(n, "hasOwnProperty", {
1372
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
1373
+ // this data descriptor into an accessor descriptor on the way in.
1374
+ __proto__: null,
1375
+ value: Object.prototype.hasOwnProperty,
1376
+ enumerable: !1,
1377
+ writable: !0,
1378
+ configurable: !0
1379
+ });
1380
+ function r(f, p, y, w) {
1381
+ return a.isPlainObject(f) && a.isPlainObject(p) ? a.merge.call({ caseless: w }, f, p) : a.isPlainObject(p) ? a.merge({}, p) : a.isArray(p) ? p.slice() : p;
1382
+ }
1383
+ function s(f, p, y, w) {
1384
+ if (a.isUndefined(p)) {
1385
+ if (!a.isUndefined(f))
1386
+ return r(void 0, f, y, w);
1387
+ } else return r(f, p, y, w);
1388
+ }
1389
+ function o(f, p) {
1390
+ if (!a.isUndefined(p))
1391
+ return r(void 0, p);
1392
+ }
1393
+ function i(f, p) {
1394
+ if (a.isUndefined(p)) {
1395
+ if (!a.isUndefined(f))
1396
+ return r(void 0, f);
1397
+ } else return r(void 0, p);
1398
+ }
1399
+ function l(f) {
1400
+ const p = a.hasOwnProp(t, "transitional") ? t.transitional : void 0;
1401
+ if (!a.isUndefined(p))
1402
+ if (a.isPlainObject(p)) {
1403
+ if (a.hasOwnProp(p, f))
1404
+ return p[f];
1405
+ } else
1406
+ return;
1407
+ const y = a.hasOwnProp(e, "transitional") ? e.transitional : void 0;
1408
+ if (a.isPlainObject(y) && a.hasOwnProp(y, f))
1409
+ return y[f];
1410
+ }
1411
+ function c(f, p, y) {
1412
+ if (a.hasOwnProp(t, y))
1413
+ return r(f, p);
1414
+ if (a.hasOwnProp(e, y))
1415
+ return r(void 0, f);
1416
+ }
1417
+ const d = {
1418
+ url: o,
1419
+ method: o,
1420
+ data: o,
1421
+ baseURL: i,
1422
+ transformRequest: i,
1423
+ transformResponse: i,
1424
+ paramsSerializer: i,
1425
+ timeout: i,
1426
+ timeoutErrorMessage: i,
1427
+ withCredentials: i,
1428
+ withXSRFToken: i,
1429
+ adapter: i,
1430
+ responseType: i,
1431
+ xsrfCookieName: i,
1432
+ xsrfHeaderName: i,
1433
+ onUploadProgress: i,
1434
+ onDownloadProgress: i,
1435
+ decompress: i,
1436
+ maxContentLength: i,
1437
+ maxBodyLength: i,
1438
+ beforeRedirect: i,
1439
+ transport: i,
1440
+ httpAgent: i,
1441
+ httpsAgent: i,
1442
+ cancelToken: i,
1443
+ socketPath: i,
1444
+ allowedSocketPaths: i,
1445
+ responseEncoding: i,
1446
+ validateStatus: c,
1447
+ headers: (f, p, y) => s(gt(f), gt(p), y, !0)
1448
+ };
1449
+ return a.forEach(Qr({ ...e, ...t }), function(p) {
1450
+ if (p === "__proto__" || p === "constructor" || p === "prototype") return;
1451
+ const y = a.hasOwnProp(d, p) ? d[p] : s, w = a.hasOwnProp(e, p) ? e[p] : void 0, R = a.hasOwnProp(t, p) ? t[p] : void 0, S = y(w, R, p);
1452
+ a.isUndefined(S) && y !== c || (n[p] = S);
1453
+ }), a.hasOwnProp(t, "validateStatus") && a.isUndefined(t.validateStatus) && l("validateStatusUndefinedResolves") === !1 && (a.hasOwnProp(e, "validateStatus") ? n.validateStatus = r(void 0, e.validateStatus) : delete n.validateStatus), n;
1454
+ }
1455
+ const Zr = ["content-type", "content-length"];
1456
+ function Yr(e, t, n) {
1457
+ if (n !== "content-only") {
1458
+ e.set(t);
1459
+ return;
1460
+ }
1461
+ Object.entries(t || {}).forEach(([r, s]) => {
1462
+ Zr.includes(r.toLowerCase()) && e.set(r, s);
1463
+ });
1464
+ }
1465
+ const es = (e) => encodeURIComponent(e).replace(
1466
+ /%([0-9A-F]{2})/gi,
1467
+ (t, n) => String.fromCharCode(parseInt(n, 16))
1468
+ );
1469
+ function Zt(e) {
1470
+ const t = re({}, e), n = (y) => a.hasOwnProp(t, y) ? t[y] : void 0, r = n("data");
1471
+ let s = n("withXSRFToken");
1472
+ const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
1473
+ let l = n("headers");
1474
+ const c = n("auth"), d = n("baseURL"), f = n("allowAbsoluteUrls"), p = n("url");
1475
+ if (t.headers = l = B.from(l), t.url = zt(
1476
+ Qt(d, p, f, t),
1477
+ n("params"),
1478
+ n("paramsSerializer")
1479
+ ), c) {
1480
+ const y = a.getSafeProp(c, "username") || "", w = a.getSafeProp(c, "password") || "";
1481
+ try {
1482
+ l.set(
1483
+ "Authorization",
1484
+ "Basic " + btoa(y + ":" + (w ? es(w) : ""))
1485
+ );
1486
+ } catch (R) {
1487
+ throw h.from(R, h.ERR_BAD_OPTION_VALUE, e);
1488
+ }
1489
+ }
1490
+ if (a.isFormData(r)) {
1491
+ const y = a.getSafeProp(r, "getHeaders");
1492
+ F.hasStandardBrowserEnv || F.hasStandardBrowserWebWorkerEnv || a.isReactNative(r) ? l.setContentType(void 0) : a.isFunction(y) && Yr(l, y.call(r), n("formDataHeaderPolicy"));
1493
+ }
1494
+ if (F.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(t)), s === !0 || s == null && $r(t.url))) {
1495
+ const w = o && i && Wr.read(i);
1496
+ w && l.set(o, w);
1497
+ }
1498
+ return t;
1499
+ }
1500
+ const ts = typeof XMLHttpRequest < "u", ns = ts && function(e) {
1501
+ return new Promise(function(n, r) {
1502
+ const s = Zt(e);
1503
+ let o = s.data;
1504
+ const i = B.from(s.headers).normalize();
1505
+ let { responseType: l, onUploadProgress: c, onDownloadProgress: d } = s, f, p, y, w, R, S;
1506
+ function C() {
1507
+ w && w(), R && R(), s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
1508
+ }
1509
+ let u = new XMLHttpRequest();
1510
+ u.open(s.method.toUpperCase(), s.url, !0), u.timeout = s.timeout;
1511
+ function m(b) {
1512
+ if (!u)
1513
+ return;
1514
+ if (u.status === 0 && (Me(Gt(s.url)) || Me(F.origin)) !== "file" && !(u.responseURL && u.responseURL.startsWith("file:"))) {
1515
+ r(new h("Request aborted", h.ECONNABORTED, e, u)), C(), u = null;
1516
+ return;
1517
+ }
1518
+ try {
1519
+ b ? S && S(b) : R && R();
1520
+ } catch (H) {
1521
+ setTimeout(() => {
1522
+ throw H;
1523
+ });
1524
+ }
1525
+ if (!u)
1526
+ return;
1527
+ const T = B.from(
1528
+ "getAllResponseHeaders" in u && u.getAllResponseHeaders()
1529
+ ), _ = {
1530
+ data: !l || l === "text" || l === "json" ? u.responseText : u.response,
1531
+ status: u.status,
1532
+ statusText: u.statusText,
1533
+ headers: T,
1534
+ config: e,
1535
+ request: u
1536
+ };
1537
+ Xt(
1538
+ function(G) {
1539
+ n(G), C();
1540
+ },
1541
+ function(G) {
1542
+ r(G), C();
1543
+ },
1544
+ _
1545
+ ), u = null;
1546
+ }
1547
+ "onloadend" in u ? u.onloadend = m : u.onreadystatechange = function() {
1548
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.startsWith("file:")) || setTimeout(m);
1549
+ }, u.onabort = function() {
1550
+ u && (r(new h("Request aborted", h.ECONNABORTED, e, u)), C(), u = null);
1551
+ }, u.onerror = function(T) {
1552
+ const N = T && T.message ? T.message : "Network Error", _ = new h(N, h.ERR_NETWORK, e, u);
1553
+ _.event = T || null, r(_), C(), u = null;
1554
+ }, u.ontimeout = function() {
1555
+ let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1556
+ const N = s.transitional || Qe;
1557
+ s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
1558
+ new h(
1559
+ T,
1560
+ N.clarifyTimeoutError ? h.ETIMEDOUT : h.ECONNABORTED,
1561
+ e,
1562
+ u
1563
+ )
1564
+ ), C(), u = null;
1565
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in u && a.forEach(kt(i), function(T, N) {
1566
+ u.setRequestHeader(N, T);
1567
+ }), a.isUndefined(s.withCredentials) || (u.withCredentials = !!s.withCredentials), l && l !== "json" && (u.responseType = s.responseType), d && ([y, R, S] = Pe(
1568
+ d,
1569
+ !0
1570
+ ), u.addEventListener("progress", y)), c && u.upload && ([p, w] = Pe(c), u.upload.addEventListener("progress", p), u.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (f = (b) => {
1571
+ u && (r(!b || b.type ? new Ee(null, e, u) : b), u.abort(), C(), u = null);
1572
+ }, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
1573
+ const E = Me(s.url);
1574
+ if (E && !F.protocols.includes(E)) {
1575
+ r(
1576
+ new h(
1577
+ "Unsupported protocol " + E + ":",
1578
+ h.ERR_BAD_REQUEST,
1579
+ e
1580
+ )
1581
+ ), C();
1582
+ return;
1583
+ }
1584
+ u.send(o || null);
1585
+ });
1586
+ }, rs = (e, t) => {
1587
+ if (e = e ? e.filter(Boolean) : [], !t && !e.length)
1588
+ return;
1589
+ const n = new AbortController();
1590
+ let r = !1;
1591
+ const s = function(c) {
1592
+ if (!r) {
1593
+ r = !0, i();
1594
+ const d = c instanceof Error ? c : this.reason;
1595
+ n.abort(
1596
+ d instanceof h ? d : new Ee(d instanceof Error ? d.message : d)
1597
+ );
1598
+ }
1599
+ };
1600
+ let o = t && setTimeout(() => {
1601
+ o = null, s(new h(`timeout of ${t}ms exceeded`, h.ETIMEDOUT));
1602
+ }, t);
1603
+ const i = () => {
1604
+ e && (o && clearTimeout(o), o = null, e.forEach((c) => {
1605
+ c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s);
1606
+ }), e = null);
1607
+ };
1608
+ e.forEach((c) => {
1609
+ if (!r) {
1610
+ if (c.aborted) {
1611
+ s.call(c);
1612
+ return;
1613
+ }
1614
+ c.addEventListener("abort", s, { once: !0 });
1615
+ }
1616
+ });
1617
+ const { signal: l } = n;
1618
+ return l.unsubscribe = () => a.asap(i), l;
1619
+ }, ss = function* (e, t) {
1620
+ let n = e.byteLength;
1621
+ if (n < t) {
1622
+ yield e;
1623
+ return;
1624
+ }
1625
+ let r = 0, s;
1626
+ for (; r < n; )
1627
+ s = r + t, yield e.slice(r, s), r = s;
1628
+ }, os = async function* (e, t) {
1629
+ for await (const n of is(e))
1630
+ yield* ss(n, t);
1631
+ }, is = async function* (e) {
1632
+ if (e[Symbol.asyncIterator]) {
1633
+ yield* e;
1634
+ return;
1635
+ }
1636
+ const t = e.getReader();
1637
+ try {
1638
+ for (; ; ) {
1639
+ const { done: n, value: r } = await t.read();
1640
+ if (n)
1641
+ break;
1642
+ yield r;
1643
+ }
1644
+ } finally {
1645
+ await t.cancel();
1646
+ }
1647
+ }, Et = (e, t, n, r) => {
1648
+ const s = os(e, t);
1649
+ let o = 0, i, l = (c) => {
1650
+ i || (i = !0, r && r(c));
1651
+ };
1652
+ return new ReadableStream(
1653
+ {
1654
+ async pull(c) {
1655
+ try {
1656
+ const { done: d, value: f } = await s.next();
1657
+ if (d) {
1658
+ l(), c.close();
1659
+ return;
1660
+ }
1661
+ let p = f.byteLength;
1662
+ if (n) {
1663
+ let y = o += p;
1664
+ n(y);
1665
+ }
1666
+ c.enqueue(new Uint8Array(f));
1667
+ } catch (d) {
1668
+ throw l(d), d;
1669
+ }
1670
+ },
1671
+ cancel(c) {
1672
+ return l(c), s.return();
1673
+ }
1674
+ },
1675
+ {
1676
+ highWaterMark: 2
1677
+ }
1678
+ );
1679
+ }, wt = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, Yt = (e, t, n) => t + 2 < n && wt(e.charCodeAt(t + 1)) && wt(e.charCodeAt(t + 2)), Rt = (e) => e <= 57 ? e - 48 : (e & 223) - 55, as = (e) => e >= 65 && e <= 90 || // A-Z
1680
+ e >= 97 && e <= 122 || // a-z
1681
+ e >= 48 && e <= 57 || // 0-9
1682
+ e === 43 || // +
1683
+ e === 47 || // /
1684
+ e === 45 || // - (base64url)
1685
+ e === 95, ls = (e) => e === 9 || e === 10 || e === 12 || e === 13 || e === 32, cs = (e) => {
1686
+ const t = Math.floor(e / 4), n = e % 4;
1687
+ return t * 3 + (n === 2 ? 1 : n === 3 ? 2 : 0);
1688
+ }, us = (e) => {
1689
+ const t = e.length;
1690
+ let n = 0;
1691
+ return t > 0 && e.charCodeAt(t - 1) === 61 && (n++, t > 1 && e.charCodeAt(t - 2) === 61 && n++), Math.floor((t - n) * 3 / 4);
1692
+ }, fs = (e) => {
1693
+ const t = e.length;
1694
+ let n = 0, r = 0, s = !1;
1695
+ for (let o = 0; o < t; o++) {
1696
+ let i = e.charCodeAt(o);
1697
+ if (i === 37 && Yt(e, o, t) && (i = Rt(e.charCodeAt(o + 1)) * 16 + Rt(e.charCodeAt(o + 2)), o += 2), !ls(i)) {
1698
+ if (i === 61) {
1699
+ r++;
1700
+ continue;
1701
+ }
1702
+ if (!as(i) || r > 0) {
1703
+ s = !0;
1704
+ continue;
1705
+ }
1706
+ n++;
1707
+ }
1708
+ }
1709
+ return s || r > 2 || r > 0 && (n + r) % 4 !== 0 || n % 4 === 1 ? us(e) : cs(n);
1710
+ }, ds = (e, t) => {
1711
+ if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
1712
+ const n = e.indexOf(",");
1713
+ if (n < 0) return 0;
1714
+ const r = e.slice(5, n), s = e.slice(n + 1);
1715
+ if (/;base64/i.test(r))
1716
+ return t(s);
1717
+ let i = 0;
1718
+ for (let l = 0, c = s.length; l < c; l++) {
1719
+ const d = s.charCodeAt(l);
1720
+ if (d === 37 && Yt(s, l, c))
1721
+ i += 1, l += 2;
1722
+ else if (d < 128)
1723
+ i += 1;
1724
+ else if (d < 2048)
1725
+ i += 2;
1726
+ else if (d >= 55296 && d <= 56319 && l + 1 < c) {
1727
+ const f = s.charCodeAt(l + 1);
1728
+ f >= 56320 && f <= 57343 ? (i += 4, l++) : i += 3;
1729
+ } else
1730
+ i += 3;
1731
+ }
1732
+ return i;
1733
+ };
1734
+ function ps(e) {
1735
+ const t = typeof e == "string" ? e.indexOf("#") : -1;
1736
+ return ds(
1737
+ t === -1 ? e : e.slice(0, t),
1738
+ fs
1739
+ );
1740
+ }
1741
+ const Ye = "1.20.0", Ot = 64 * 1024, hs = {
1742
+ cache: "default",
1743
+ redirect: "follow",
1744
+ referrer: "about:client",
1745
+ referrerPolicy: "",
1746
+ mode: "cors",
1747
+ integrity: "",
1748
+ keepalive: !1,
1749
+ priority: "auto",
1750
+ window: null
1751
+ }, { isFunction: Se } = a, ms = (e) => encodeURIComponent(e).replace(
1752
+ /%([0-9A-F]{2})/gi,
1753
+ (t, n) => String.fromCharCode(parseInt(n, 16))
1754
+ ), St = (e) => {
1755
+ if (!a.isString(e))
1756
+ return e;
1757
+ try {
1758
+ return decodeURIComponent(e);
1759
+ } catch {
1760
+ return e;
1761
+ }
1762
+ }, xt = (e, ...t) => {
1763
+ try {
1764
+ return !!e(...t);
1765
+ } catch {
1766
+ return !1;
1767
+ }
1768
+ }, ys = (e) => {
1769
+ const t = e.indexOf("://");
1770
+ let n = e;
1771
+ return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
1772
+ }, bs = (e) => {
1773
+ const t = a.global !== void 0 && a.global !== null ? a.global : globalThis, { ReadableStream: n, TextEncoder: r } = t;
1774
+ e = a.merge.call(
1775
+ {
1776
+ skipUndefined: !0
1777
+ },
1778
+ {
1779
+ Request: t.Request,
1780
+ Response: t.Response
1781
+ },
1782
+ e
1783
+ );
1784
+ const { fetch: s, Request: o, Response: i } = e, l = s ? Se(s) : typeof fetch == "function", c = Se(o), d = Se(i);
1785
+ if (!l)
1786
+ return !1;
1787
+ const f = l && Se(n), p = l && (typeof r == "function" ? /* @__PURE__ */ ((u) => (m) => u.encode(m))(new r()) : async (u) => new Uint8Array(await new o(u).arrayBuffer())), y = c && f && xt(() => {
1788
+ let u = !1;
1789
+ const m = new o(F.origin, {
1790
+ body: new n(),
1791
+ method: "POST",
1792
+ get duplex() {
1793
+ return u = !0, "half";
1794
+ }
1795
+ }), E = m.headers.has("Content-Type");
1796
+ return m.body != null && m.body.cancel(), u && !E;
1797
+ }), w = d && f && xt(() => a.isReadableStream(new i("").body)), R = {
1798
+ stream: w && ((u) => u.body)
1799
+ };
1800
+ l && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((u) => {
1801
+ !R[u] && (R[u] = (m, E) => {
1802
+ let b = m && m[u];
1803
+ if (b)
1804
+ return b.call(m);
1805
+ throw new h(
1806
+ `Response type '${u}' is not supported`,
1807
+ h.ERR_NOT_SUPPORT,
1808
+ E
1809
+ );
1810
+ });
1811
+ });
1812
+ const S = async (u) => {
1813
+ if (u == null)
1814
+ return 0;
1815
+ if (a.isBlob(u))
1816
+ return u.size;
1817
+ if (a.isSpecCompliantForm(u))
1818
+ return (await new o(F.origin, {
1819
+ method: "POST",
1820
+ body: u
1821
+ }).arrayBuffer()).byteLength;
1822
+ if (a.isArrayBufferView(u) || a.isArrayBuffer(u))
1823
+ return u.byteLength;
1824
+ if (a.isURLSearchParams(u) && (u = u + ""), a.isString(u))
1825
+ return (await p(u)).byteLength;
1826
+ }, C = async (u, m) => {
1827
+ const E = a.toFiniteNumber(u.getContentLength());
1828
+ return E ?? S(m);
1829
+ };
1830
+ return async (u) => {
1831
+ let {
1832
+ url: m,
1833
+ method: E,
1834
+ data: b,
1835
+ signal: T,
1836
+ cancelToken: N,
1837
+ timeout: _,
1838
+ onDownloadProgress: H,
1839
+ onUploadProgress: G,
1840
+ responseType: W,
1841
+ headers: V,
1842
+ withCredentials: we = "same-origin",
1843
+ fetchOptions: Ue,
1844
+ maxContentLength: M,
1845
+ maxBodyLength: Re,
1846
+ maxRedirects: cn
1847
+ } = Zt(u);
1848
+ const le = a.isNumber(M) && M > -1, Be = a.isNumber(Re) && Re > -1, un = (O) => a.hasOwnProp(u, O) ? u[O] : void 0;
1849
+ let nt = s || fetch;
1850
+ W = W ? (W + "").toLowerCase() : "text";
1851
+ let J = rs(
1852
+ [T, N && N.toAbortSignal()],
1853
+ _
1854
+ ), P = null;
1855
+ const Q = J && J.unsubscribe && (() => {
1856
+ J.unsubscribe();
1857
+ });
1858
+ let se, ce = null;
1859
+ const rt = () => new h(
1860
+ "Request body larger than maxBodyLength limit",
1861
+ h.ERR_BAD_REQUEST,
1862
+ u,
1863
+ P
1864
+ );
1865
+ try {
1866
+ let O;
1867
+ const I = un("auth");
1868
+ if (I) {
1869
+ const g = a.getSafeProp(I, "username") || "", L = a.getSafeProp(I, "password") || "";
1870
+ O = {
1871
+ username: g,
1872
+ password: L
1873
+ };
1874
+ }
1875
+ if (ys(m)) {
1876
+ const g = new URL(m, F.origin);
1877
+ if (!O && (g.username || g.password)) {
1878
+ const L = St(g.username), K = St(g.password);
1879
+ O = {
1880
+ username: L,
1881
+ password: K
1882
+ };
1883
+ }
1884
+ (g.username || g.password) && (g.username = "", g.password = "", m = g.href);
1885
+ }
1886
+ if (O && (V.delete("authorization"), V.set(
1887
+ "Authorization",
1888
+ "Basic " + btoa(ms((O.username || "") + ":" + (O.password || "")))
1889
+ )), le && typeof m == "string" && m.startsWith("data:") && ps(m) > M)
1890
+ throw new h(
1891
+ "maxContentLength size of " + M + " exceeded",
1892
+ h.ERR_BAD_RESPONSE,
1893
+ u,
1894
+ P
1895
+ );
1896
+ if (Be && E !== "get" && E !== "head") {
1897
+ const g = await S(b);
1898
+ if (typeof g == "number" && isFinite(g) && (se = g, g > Re))
1899
+ throw rt();
1900
+ }
1901
+ const Oe = Be && (a.isReadableStream(b) || a.isStream(b)), st = (g, L, K) => Et(
1902
+ g,
1903
+ Ot,
1904
+ (Z) => {
1905
+ if (Be && Z > Re)
1906
+ throw ce = rt();
1907
+ L && L(Z);
1908
+ },
1909
+ K
1910
+ );
1911
+ if (y && E !== "get" && E !== "head" && (G || Oe)) {
1912
+ if (se = se ?? await C(V, b), se !== 0 || Oe) {
1913
+ let g = new o(m, {
1914
+ method: "POST",
1915
+ body: b,
1916
+ duplex: "half"
1917
+ }), L;
1918
+ if (a.isFormData(b) && (L = g.headers.get("content-type")) && V.setContentType(L), g.body) {
1919
+ const [K, Z] = G && mt(
1920
+ se,
1921
+ Pe(yt(G))
1922
+ ) || [];
1923
+ b = st(g.body, K, Z);
1924
+ }
1925
+ }
1926
+ } else if (Oe && !c && f && E !== "get" && E !== "head")
1927
+ b = st(b);
1928
+ else if (Oe && c && !y && E !== "get" && E !== "head")
1929
+ throw new h(
1930
+ "Stream request bodies are not supported by the current fetch implementation",
1931
+ h.ERR_NOT_SUPPORT,
1932
+ u,
1933
+ P
1934
+ );
1935
+ a.isString(we) || (we = we ? "include" : "omit");
1936
+ const fn = c && "credentials" in o.prototype;
1937
+ if (a.isFormData(b)) {
1938
+ const g = V.getContentType();
1939
+ g && /^multipart\/form-data/i.test(g) && !/boundary=/i.test(g) && V.delete("content-type");
1940
+ }
1941
+ V.set("User-Agent", "axios/" + Ye, !1);
1942
+ const q = Ue == null ? Ue : Object.assign(/* @__PURE__ */ Object.create(null), Ue);
1943
+ q && (delete q.body, delete q.headers, delete q.method, delete q.signal, delete q.duplex, delete q.credentials);
1944
+ const v = Object.assign(/* @__PURE__ */ Object.create(null), q, {
1945
+ signal: J,
1946
+ method: E.toUpperCase(),
1947
+ headers: kt(V.normalize()),
1948
+ body: b,
1949
+ duplex: "half",
1950
+ credentials: fn ? we : void 0
1951
+ });
1952
+ c && (a.forEach(hs, (g, L) => {
1953
+ v[L] === void 0 && (v[L] = g);
1954
+ }), v.signal === void 0 && (v.signal = null), v.body === void 0 && (v.body = null)), cn === 0 && (v.redirect = "manual", q && (q.redirect = "manual")), P = c && new o(m, v);
1955
+ let z = await (c ? nt(P, q) : nt(m, v));
1956
+ const ot = B.from(z.headers);
1957
+ if (le) {
1958
+ const g = a.toFiniteNumber(ot.getContentLength());
1959
+ if (g != null && g > M)
1960
+ throw new h(
1961
+ "maxContentLength size of " + M + " exceeded",
1962
+ h.ERR_BAD_RESPONSE,
1963
+ u,
1964
+ P
1965
+ );
1966
+ }
1967
+ const je = w && (W === "stream" || W === "response");
1968
+ if (w && z.body && (H || le || je && Q)) {
1969
+ const g = {};
1970
+ ["status", "statusText", "headers"].forEach((ue) => {
1971
+ g[ue] = z[ue];
1972
+ });
1973
+ const L = a.toFiniteNumber(ot.getContentLength()), [K, Z] = H && mt(
1974
+ L,
1975
+ Pe(yt(H), !0)
1976
+ ) || [];
1977
+ let it = 0;
1978
+ const dn = (ue) => {
1979
+ if (le && (it = ue, it > M))
1980
+ throw new h(
1981
+ "maxContentLength size of " + M + " exceeded",
1982
+ h.ERR_BAD_RESPONSE,
1983
+ u,
1984
+ P
1985
+ );
1986
+ K && K(ue);
1987
+ };
1988
+ z = new i(
1989
+ Et(z.body, Ot, dn, () => {
1990
+ Z && Z(), Q && Q();
1991
+ }),
1992
+ g
1993
+ );
1994
+ }
1995
+ W = W || "text";
1996
+ let $ = await R[a.findKey(R, W) || "text"](
1997
+ z,
1998
+ u
1999
+ );
2000
+ if (le && !w && !je) {
2001
+ let g;
2002
+ if ($ != null && (typeof $.byteLength == "number" ? g = $.byteLength : typeof $.size == "number" ? g = $.size : typeof $ == "string" && (g = typeof r == "function" ? new r().encode($).byteLength : $.length)), typeof g == "number" && g > M)
2003
+ throw new h(
2004
+ "maxContentLength size of " + M + " exceeded",
2005
+ h.ERR_BAD_RESPONSE,
2006
+ u,
2007
+ P
2008
+ );
2009
+ }
2010
+ return !je && Q && Q(), await new Promise((g, L) => {
2011
+ Xt(g, L, {
2012
+ data: $,
2013
+ headers: B.from(z.headers),
2014
+ status: z.status,
2015
+ statusText: z.statusText,
2016
+ config: u,
2017
+ request: P
2018
+ });
2019
+ });
2020
+ } catch (O) {
2021
+ if (Q && Q(), J && J.aborted && J.reason instanceof h) {
2022
+ const I = J.reason;
2023
+ throw I.config = u, P && (I.request = P), O !== I && Object.defineProperty(I, "cause", {
2024
+ __proto__: null,
2025
+ value: O,
2026
+ writable: !0,
2027
+ enumerable: !1,
2028
+ configurable: !0
2029
+ }), I;
2030
+ }
2031
+ if (ce)
2032
+ throw P && !ce.request && (ce.request = P), ce;
2033
+ if (O instanceof h)
2034
+ throw P && !O.request && (O.request = P), O;
2035
+ if (O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message)) {
2036
+ const I = new h(
2037
+ "Network Error",
2038
+ h.ERR_NETWORK,
2039
+ u,
2040
+ P,
2041
+ O && O.response
2042
+ );
2043
+ throw Object.defineProperty(I, "cause", {
2044
+ __proto__: null,
2045
+ value: O.cause || O,
2046
+ writable: !0,
2047
+ enumerable: !1,
2048
+ configurable: !0
2049
+ }), I;
2050
+ }
2051
+ throw h.from(O, O && O.code, u, P, O && O.response);
2052
+ }
2053
+ };
2054
+ }, gs = /* @__PURE__ */ new Map(), en = (e) => {
2055
+ let t = e && e.env || {};
2056
+ const { fetch: n, Request: r, Response: s } = t, o = [r, s, n];
2057
+ let i = o.length, l = i, c, d, f = gs;
2058
+ for (; l--; )
2059
+ c = o[l], d = f.get(c), d === void 0 && f.set(c, d = l ? /* @__PURE__ */ new Map() : bs(t)), f = d;
2060
+ return d;
2061
+ };
2062
+ en();
2063
+ const et = {
2064
+ http: _r,
2065
+ xhr: ns,
2066
+ fetch: {
2067
+ get: en
2068
+ }
2069
+ };
2070
+ a.forEach(et, (e, t) => {
2071
+ if (e) {
2072
+ try {
2073
+ Object.defineProperty(e, "name", { __proto__: null, value: t });
2074
+ } catch {
2075
+ }
2076
+ Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
2077
+ }
2078
+ });
2079
+ const _t = (e) => `- ${e}`, Es = (e) => a.isFunction(e) || e === null || e === !1;
2080
+ function ws(e, t) {
2081
+ e = a.isArray(e) ? e : [e];
2082
+ const { length: n } = e;
2083
+ let r, s;
2084
+ const o = {};
2085
+ for (let i = 0; i < n; i++) {
2086
+ r = e[i];
2087
+ let l;
2088
+ if (s = r, !Es(r) && (s = et[(l = String(r)).toLowerCase()], s === void 0))
2089
+ throw new h(`Unknown adapter '${l}'`);
2090
+ if (s && (a.isFunction(s) || (s = s.get(t))))
2091
+ break;
2092
+ o[l || "#" + i] = s;
2093
+ }
2094
+ if (!s) {
2095
+ const i = Object.entries(o).map(
2096
+ ([c, d]) => `adapter ${c} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
2097
+ );
2098
+ let l = n ? i.length > 1 ? `since :
2099
+ ` + i.map(_t).join(`
2100
+ `) : " " + _t(i[0]) : "as no adapter specified";
2101
+ throw new h(
2102
+ "There is no suitable adapter to dispatch the request " + l,
2103
+ h.ERR_NOT_SUPPORT
2104
+ );
2105
+ }
2106
+ return s;
2107
+ }
2108
+ const tn = {
2109
+ /**
2110
+ * Resolve an adapter from a list of adapter names or functions.
2111
+ * @type {Function}
2112
+ */
2113
+ getAdapter: ws,
2114
+ /**
2115
+ * Exposes all known adapters
2116
+ * @type {Object<string, Function|Object>}
2117
+ */
2118
+ adapters: et
2119
+ };
2120
+ function ve(e) {
2121
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2122
+ throw new Ee(null, e);
2123
+ }
2124
+ function ze(e) {
2125
+ const t = a.toSafeFlatObject(e);
2126
+ return ve(t), t.headers = B.from(a.getSafeProp(t, "headers")), t.data = He.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), tn.getAdapter(t.adapter || ge.adapter, t)(t).then(
2127
+ function(s) {
2128
+ ve(t), t.response = s;
2129
+ try {
2130
+ s.data = He.call(t, t.transformResponse, s);
2131
+ } finally {
2132
+ delete t.response;
2133
+ }
2134
+ return s.headers = B.from(s.headers), s;
2135
+ },
2136
+ function(s) {
2137
+ if (!Kt(s) && (ve(t), s && s.response)) {
2138
+ t.response = s.response;
2139
+ try {
2140
+ s.response.data = He.call(
2141
+ t,
2142
+ t.transformResponse,
2143
+ s.response
2144
+ );
2145
+ } finally {
2146
+ delete t.response;
2147
+ }
2148
+ s.response.headers = B.from(s.response.headers);
2149
+ }
2150
+ return Promise.reject(s);
2151
+ }
2152
+ );
2153
+ }
2154
+ const Le = {};
2155
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2156
+ Le[e] = function(r) {
2157
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
2158
+ };
2159
+ });
2160
+ const At = {};
2161
+ Le.transitional = function(t, n, r) {
2162
+ function s(o, i) {
2163
+ return "[Axios v" + Ye + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
2164
+ }
2165
+ return (o, i, l) => {
2166
+ if (t === !1)
2167
+ throw new h(
2168
+ s(i, " has been removed" + (n ? " in " + n : "")),
2169
+ h.ERR_DEPRECATED
2170
+ );
2171
+ return n && !At[i] && (At[i] = !0, console.warn(
2172
+ s(
2173
+ i,
2174
+ " has been deprecated since v" + n + " and will be removed in the near future"
2175
+ )
2176
+ )), t ? t(o, i, l) : !0;
2177
+ };
2178
+ };
2179
+ Le.spelling = function(t) {
2180
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
2181
+ };
2182
+ function Rs(e, t, n) {
2183
+ if (typeof e != "object" || e === null)
2184
+ throw new h("options must be an object", h.ERR_BAD_OPTION_VALUE);
2185
+ const r = Object.keys(e);
2186
+ let s = r.length;
2187
+ for (; s-- > 0; ) {
2188
+ const o = r[s], i = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
2189
+ if (i) {
2190
+ const l = e[o], c = l === void 0 || i(l, o, e);
2191
+ if (c !== !0)
2192
+ throw new h(
2193
+ "option " + o + " must be " + c,
2194
+ h.ERR_BAD_OPTION_VALUE
2195
+ );
2196
+ continue;
2197
+ }
2198
+ if (n !== !0)
2199
+ throw new h("Unknown option " + o, h.ERR_BAD_OPTION);
2200
+ }
2201
+ }
2202
+ const Ae = {
2203
+ assertOptions: Rs,
2204
+ validators: Le
2205
+ }, U = Ae.validators;
2206
+ let ee = class {
2207
+ constructor(t) {
2208
+ this.defaults = t || {}, this.interceptors = {
2209
+ request: new pt(),
2210
+ response: new pt()
2211
+ };
2212
+ }
2213
+ /**
2214
+ * Dispatch a request
2215
+ *
2216
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2217
+ * @param {?Object} config
2218
+ *
2219
+ * @returns {Promise} The Promise to be fulfilled
2220
+ */
2221
+ async request(t, n) {
2222
+ try {
2223
+ return await this._request(t, n);
2224
+ } catch (r) {
2225
+ if (r instanceof Error)
2226
+ try {
2227
+ let s = {};
2228
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
2229
+ const o = s.stack;
2230
+ let i = "";
2231
+ if (typeof o == "string") {
2232
+ const l = o.indexOf(`
2233
+ `);
2234
+ i = l === -1 ? "" : o.slice(l + 1);
2235
+ }
2236
+ if (!r.stack)
2237
+ r.stack = i;
2238
+ else if (i) {
2239
+ const l = i.indexOf(`
2240
+ `), c = l === -1 ? -1 : i.indexOf(`
2241
+ `, l + 1), d = c === -1 ? "" : i.slice(c + 1);
2242
+ String(r.stack).endsWith(d) || (r.stack += `
2243
+ ` + i);
2244
+ }
2245
+ } catch {
2246
+ }
2247
+ throw r;
2248
+ }
2249
+ }
2250
+ _request(t, n) {
2251
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = re(this.defaults, n);
2252
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
2253
+ r !== void 0 && Ae.assertOptions(
2254
+ r,
2255
+ {
2256
+ silentJSONParsing: U.transitional(U.boolean),
2257
+ forcedJSONParsing: U.transitional(U.boolean),
2258
+ clarifyTimeoutError: U.transitional(U.boolean),
2259
+ legacyInterceptorReqResOrdering: U.transitional(U.boolean),
2260
+ advertiseZstdAcceptEncoding: U.transitional(U.boolean),
2261
+ validateStatusUndefinedResolves: U.transitional(U.boolean)
2262
+ },
2263
+ !1
2264
+ ), s != null && (a.isFunction(s) ? n.paramsSerializer = {
2265
+ serialize: s
2266
+ } : Ae.assertOptions(
2267
+ s,
2268
+ {
2269
+ encode: U.function,
2270
+ serialize: U.function
2271
+ },
2272
+ !0
2273
+ )), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ae.assertOptions(
2274
+ n,
2275
+ {
2276
+ baseUrl: U.spelling("baseURL"),
2277
+ withXsrfToken: U.spelling("withXSRFToken")
2278
+ },
2279
+ !0
2280
+ ), n.method = (a.getSafeProp(n, "method") || a.getSafeProp(this.defaults, "method") || "get").toLowerCase();
2281
+ let i = o && a.merge(o.common, o[n.method]);
2282
+ o && a.forEach(Jt.concat("common"), (R) => {
2283
+ delete o[R];
2284
+ }), n.headers = B.concat(i, o);
2285
+ const l = [];
2286
+ let c = !0;
2287
+ this.interceptors.request.forEach(function(S) {
2288
+ if (typeof S.runWhen == "function" && S.runWhen(n) === !1)
2289
+ return;
2290
+ c = c && S.synchronous;
2291
+ const C = n.transitional || Qe;
2292
+ C && C.legacyInterceptorReqResOrdering ? l.unshift(S.fulfilled, S.rejected) : l.push(S.fulfilled, S.rejected);
2293
+ });
2294
+ const d = [];
2295
+ this.interceptors.response.forEach(function(S) {
2296
+ d.push(S.fulfilled, S.rejected);
2297
+ });
2298
+ let f, p = 0, y;
2299
+ if (!c) {
2300
+ const R = [ze.bind(this), void 0];
2301
+ for (R.unshift(...l), R.push(...d), y = R.length, f = Promise.resolve(n); p < y; )
2302
+ f = f.then(R[p++], R[p++]);
2303
+ return f;
2304
+ }
2305
+ y = l.length;
2306
+ let w = n;
2307
+ for (; p < y; ) {
2308
+ const R = l[p++], S = l[p++];
2309
+ try {
2310
+ w = R ? R(w) : w;
2311
+ } catch (C) {
2312
+ if (!S) {
2313
+ f = Promise.reject(C);
2314
+ break;
2315
+ }
2316
+ try {
2317
+ const u = S.call(this, C);
2318
+ a.isThenable(u) && (f = Promise.resolve(u).then(
2319
+ () => ze.call(this, w)
2320
+ ));
2321
+ } catch (u) {
2322
+ f = Promise.reject(u);
2323
+ }
2324
+ break;
2325
+ }
2326
+ }
2327
+ if (!f)
2328
+ try {
2329
+ f = ze.call(this, w);
2330
+ } catch (R) {
2331
+ f = Promise.reject(R);
2332
+ }
2333
+ for (p = 0, y = d.length; p < y; )
2334
+ f = f.then(d[p++], d[p++]);
2335
+ return f;
2336
+ }
2337
+ getUri(t) {
2338
+ t = re(this.defaults, t);
2339
+ const n = Qt(t.baseURL, t.url, t.allowAbsoluteUrls, t);
2340
+ return zt(n, t.params, t.paramsSerializer);
2341
+ }
2342
+ };
2343
+ a.forEach(["delete", "get", "head", "options"], function(t) {
2344
+ ee.prototype[t] = function(n, r) {
2345
+ return this.request(
2346
+ re(r || {}, {
2347
+ method: t,
2348
+ url: n,
2349
+ data: r && a.hasOwnProp(r, "data") ? r.data : void 0
2350
+ })
2351
+ );
2352
+ };
2353
+ });
2354
+ a.forEach(["post", "put", "patch", "query"], function(t) {
2355
+ function n(r) {
2356
+ return function(o, i, l) {
2357
+ return this.request(
2358
+ re(l || {}, {
2359
+ method: t,
2360
+ headers: r ? {
2361
+ "Content-Type": "multipart/form-data"
2362
+ } : {},
2363
+ url: o,
2364
+ data: i
2365
+ })
2366
+ );
2367
+ };
2368
+ }
2369
+ ee.prototype[t] = n(), t !== "query" && (ee.prototype[t + "Form"] = n(!0));
2370
+ });
2371
+ let Os = class nn {
2372
+ constructor(t) {
2373
+ if (typeof t != "function")
2374
+ throw new TypeError("executor must be a function.");
2375
+ let n;
2376
+ this.promise = new Promise(function(o) {
2377
+ n = o;
2378
+ });
2379
+ const r = this;
2380
+ this.promise.then((s) => {
2381
+ if (!r._listeners) return;
2382
+ let o = r._listeners.length;
2383
+ for (; o-- > 0; )
2384
+ r._listeners[o](s);
2385
+ r._listeners = null;
2386
+ }), this.promise.then = (s) => {
2387
+ let o;
2388
+ const i = new Promise((l) => {
2389
+ r.subscribe(l), o = l;
2390
+ }).then(s);
2391
+ return i.cancel = function() {
2392
+ r.unsubscribe(o);
2393
+ }, i;
2394
+ }, t(function(o, i, l) {
2395
+ r.reason || (r.reason = new Ee(o, i, l), n(r.reason));
2396
+ });
2397
+ }
2398
+ /**
2399
+ * Throws a `CanceledError` if cancellation has been requested.
2400
+ */
2401
+ throwIfRequested() {
2402
+ if (this.reason)
2403
+ throw this.reason;
2404
+ }
2405
+ /**
2406
+ * Subscribe to the cancel signal
2407
+ */
2408
+ subscribe(t) {
2409
+ if (this.reason) {
2410
+ t(this.reason);
2411
+ return;
2412
+ }
2413
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
2414
+ }
2415
+ /**
2416
+ * Unsubscribe from the cancel signal
2417
+ */
2418
+ unsubscribe(t) {
2419
+ if (!this._listeners)
2420
+ return;
2421
+ const n = this._listeners.indexOf(t);
2422
+ n !== -1 && this._listeners.splice(n, 1);
2423
+ }
2424
+ toAbortSignal() {
2425
+ const t = new AbortController(), n = (r) => {
2426
+ t.abort(r);
2427
+ };
2428
+ return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2429
+ }
2430
+ /**
2431
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2432
+ * cancels the `CancelToken`.
2433
+ */
2434
+ static source() {
2435
+ let t;
2436
+ return {
2437
+ token: new nn(function(s) {
2438
+ t = s;
2439
+ }),
2440
+ cancel: t
2441
+ };
2442
+ }
2443
+ };
2444
+ function Ss(e) {
2445
+ return function(n) {
2446
+ return e.apply(null, n);
2447
+ };
2448
+ }
2449
+ function xs(e) {
2450
+ return a.isObject(e) && e.isAxiosError === !0;
2451
+ }
2452
+ const Ce = {
2453
+ Continue: 100,
2454
+ SwitchingProtocols: 101,
2455
+ Processing: 102,
2456
+ EarlyHints: 103,
2457
+ Ok: 200,
2458
+ Created: 201,
2459
+ Accepted: 202,
2460
+ NonAuthoritativeInformation: 203,
2461
+ NoContent: 204,
2462
+ ResetContent: 205,
2463
+ PartialContent: 206,
2464
+ MultiStatus: 207,
2465
+ AlreadyReported: 208,
2466
+ ImUsed: 226,
2467
+ MultipleChoices: 300,
2468
+ MovedPermanently: 301,
2469
+ Found: 302,
2470
+ SeeOther: 303,
2471
+ NotModified: 304,
2472
+ UseProxy: 305,
2473
+ Unused: 306,
2474
+ TemporaryRedirect: 307,
2475
+ PermanentRedirect: 308,
2476
+ BadRequest: 400,
2477
+ Unauthorized: 401,
2478
+ PaymentRequired: 402,
2479
+ Forbidden: 403,
2480
+ NotFound: 404,
2481
+ MethodNotAllowed: 405,
2482
+ NotAcceptable: 406,
2483
+ ProxyAuthenticationRequired: 407,
2484
+ RequestTimeout: 408,
2485
+ Conflict: 409,
2486
+ Gone: 410,
2487
+ LengthRequired: 411,
2488
+ PreconditionFailed: 412,
2489
+ /**
2490
+ * @deprecated Use `ContentTooLarge` instead.
2491
+ */
2492
+ PayloadTooLarge: 413,
2493
+ ContentTooLarge: 413,
2494
+ UriTooLong: 414,
2495
+ UnsupportedMediaType: 415,
2496
+ RangeNotSatisfiable: 416,
2497
+ ExpectationFailed: 417,
2498
+ ImATeapot: 418,
2499
+ MisdirectedRequest: 421,
2500
+ /**
2501
+ * @deprecated Use `UnprocessableContent` instead.
2502
+ */
2503
+ UnprocessableEntity: 422,
2504
+ UnprocessableContent: 422,
2505
+ Locked: 423,
2506
+ FailedDependency: 424,
2507
+ TooEarly: 425,
2508
+ UpgradeRequired: 426,
2509
+ PreconditionRequired: 428,
2510
+ TooManyRequests: 429,
2511
+ RequestHeaderFieldsTooLarge: 431,
2512
+ UnavailableForLegalReasons: 451,
2513
+ InternalServerError: 500,
2514
+ NotImplemented: 501,
2515
+ BadGateway: 502,
2516
+ ServiceUnavailable: 503,
2517
+ GatewayTimeout: 504,
2518
+ HttpVersionNotSupported: 505,
2519
+ VariantAlsoNegotiates: 506,
2520
+ InsufficientStorage: 507,
2521
+ LoopDetected: 508,
2522
+ NotExtended: 510,
2523
+ NetworkAuthenticationRequired: 511,
2524
+ WebServerReturnsAnUnknownError: 520,
2525
+ WebServerIsDown: 521,
2526
+ ConnectionTimedOut: 522,
2527
+ OriginIsUnreachable: 523,
2528
+ TimeoutOccurred: 524,
2529
+ SslHandshakeFailed: 525,
2530
+ InvalidSslCertificate: 526
2531
+ };
2532
+ Object.entries(Ce).forEach(([e, t]) => {
2533
+ Ce[t] === void 0 && (Ce[t] = e);
2534
+ });
2535
+ function rn(e) {
2536
+ const t = new ee(e), n = Ct(ee.prototype.request, t);
2537
+ return a.extend(n, ee.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
2538
+ return rn(re(e, s));
2539
+ }, n;
2540
+ }
2541
+ const x = rn(ge);
2542
+ x.Axios = ee;
2543
+ x.CanceledError = Ee;
2544
+ x.CancelToken = Os;
2545
+ x.isCancel = Kt;
2546
+ x.VERSION = Ye;
2547
+ x.toFormData = Ne;
2548
+ x.AxiosError = h;
2549
+ x.Cancel = x.CanceledError;
2550
+ x.all = function(t) {
2551
+ return Promise.all(t);
2552
+ };
2553
+ x.spread = Ss;
2554
+ x.isAxiosError = xs;
2555
+ x.mergeConfig = re;
2556
+ x.AxiosHeaders = B;
2557
+ x.formToJSON = (e) => Vt(a.isHTMLForm(e) ? new FormData(e) : e);
2558
+ x.getAdapter = tn.getAdapter;
2559
+ x.HttpStatusCode = Ce;
2560
+ x.default = x;
2561
+ const {
2562
+ Axios: Ds,
2563
+ AxiosError: Ns,
2564
+ CanceledError: Ls,
2565
+ isCancel: Us,
2566
+ CancelToken: Bs,
2567
+ VERSION: js,
2568
+ all: Is,
2569
+ Cancel: ks,
2570
+ isAxiosError: qs,
2571
+ spread: Hs,
2572
+ toFormData: Ms,
2573
+ AxiosHeaders: vs,
2574
+ HttpStatusCode: zs,
2575
+ formToJSON: $s,
2576
+ getAdapter: Ws,
2577
+ mergeConfig: Vs,
2578
+ create: Js
2579
+ } = x;
2580
+ let sn = x.create({
2581
+ baseURL: "http://localhost:8007/api/v1",
2582
+ headers: {
2583
+ "Content-Type": "application/json",
2584
+ "X-Tenant-ID": "tenant-default"
2585
+ }
2586
+ });
2587
+ const _s = (e, t = "tenant-default") => {
2588
+ sn = x.create({
2589
+ baseURL: e,
2590
+ headers: {
2591
+ "Content-Type": "application/json",
2592
+ "X-Tenant-ID": t
2593
+ }
2594
+ });
2595
+ }, tt = () => sn, on = pn({
2596
+ baseUrl: "http://localhost:8007/api/v1",
2597
+ tenantId: "tenant-default"
2598
+ }), Ks = () => hn(on), Xs = ({ baseUrl: e = "http://localhost:8007/api/v1", tenantId: t = "tenant-default", children: n }) => (Je(() => {
2599
+ _s(e, t);
2600
+ }, [e, t]), A(on.Provider, { value: { baseUrl: e, tenantId: t }, children: n })), an = ({ status: e }) => {
2601
+ const t = (e || "").toUpperCase();
2602
+ let n = "#F1F5F9", r = "#475569", s = "#94A3B8";
2603
+ return ["APPROVED", "COMPLIANT", "VERIFIED"].includes(t) ? (n = "#ECFDF5", r = "#047857", s = "#10B981") : ["PENDING_DECISION", "IN_REVIEW", "PENDING"].includes(t) ? (n = "#FFFBEB", r = "#B45309", s = "#F59E0B") : ["REJECTED", "ESCALATED", "REMEDIATION_REQUIRED"].includes(t) ? (n = "#FEF2F2", r = "#B91C1C", s = "#EF4444") : ["NEW"].includes(t) && (n = "#EFF6FF", r = "#1D4ED8", s = "#3B82F6"), D("span", { style: {
2604
+ display: "inline-flex",
2605
+ alignItems: "center",
2606
+ gap: "6px",
2607
+ padding: "2px 8px",
2608
+ borderRadius: "9999px",
2609
+ fontSize: "11px",
2610
+ fontWeight: 600,
2611
+ backgroundColor: n,
2612
+ color: r,
2613
+ border: `1px solid ${n}`
2614
+ }, children: [A("span", { style: { width: "6px", height: "6px", borderRadius: "50%", backgroundColor: s } }), e] });
2615
+ }, ln = ({ priority: e }) => {
2616
+ const t = (e || "").toUpperCase();
2617
+ let n = "#F1F5F9", r = "#475569";
2618
+ return t === "CRITICAL" ? (n = "#FEF2F2", r = "#B91C1C") : t === "HIGH" ? (n = "#FFF7ED", r = "#C2410C") : t === "MEDIUM" ? (n = "#FFFBEB", r = "#B45309") : t === "LOW" && (n = "#EFF6FF", r = "#1D4ED8"), A("span", { style: {
2619
+ display: "inline-flex",
2620
+ alignItems: "center",
2621
+ padding: "2px 8px",
2622
+ borderRadius: "9999px",
2623
+ fontSize: "11px",
2624
+ fontWeight: 700,
2625
+ backgroundColor: n,
2626
+ color: r
2627
+ }, children: e });
2628
+ }, Gs = ({ caseData: e, onOpen: t }) => D("div", { style: {
2629
+ backgroundColor: "#FFFFFF",
2630
+ border: "1px solid #E2E8F0",
2631
+ borderRadius: "12px",
2632
+ padding: "16px",
2633
+ boxShadow: "0 1px 3px rgba(0,0,0,0.05)",
2634
+ fontFamily: "Inter, system-ui, sans-serif"
2635
+ }, children: [D("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: "8px" }, children: [A("span", { style: { fontFamily: "monospace", fontWeight: 700, color: "#2563EB", fontSize: "12px" }, children: e.case_number }), A(an, { status: e.status })] }), A("div", { style: { fontWeight: 700, color: "#0F172A", fontSize: "14px", marginBottom: "4px" }, children: e.customer_name }), D("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "12px", paddingTop: "8px", borderTop: "1px solid #F1F5F9", fontSize: "12px" }, children: [A(ln, { priority: e.priority }), D("span", { style: { fontWeight: 600, color: "#64748B" }, children: ["Risk: ", D("strong", { style: { color: e.risk_score >= 80 ? "#EF4444" : "#10B981" }, children: [e.risk_score, "/100"] })] })] })] }), Qs = ({ submission: e, onDecisionSubmitted: t }) => {
2636
+ const [n, r] = Te(!1), s = async (o) => {
2637
+ try {
2638
+ r(!0), await tt().post(`/maker-checker/${e.id}/checker-decision`, {
2639
+ checker_status: o,
2640
+ checker_notes: "Direct decision confirmed via SDK widget.",
2641
+ checker_name: "Supervisor"
2642
+ }), t && t();
2643
+ } catch (i) {
2644
+ console.error("Failed to submit checker decision:", i);
2645
+ } finally {
2646
+ r(!1);
2647
+ }
2648
+ };
2649
+ return D("div", { style: {
2650
+ backgroundColor: "#FFFFFF",
2651
+ border: "1px solid #E2E8F0",
2652
+ borderRadius: "12px",
2653
+ padding: "16px",
2654
+ fontFamily: "Inter, system-ui, sans-serif",
2655
+ fontSize: "12px"
2656
+ }, children: [D("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: "8px" }, children: [A("strong", { style: { color: "#0F172A" }, children: e.customer_name }), A("span", { style: { color: "#2563EB", fontWeight: 700 }, children: e.proposed_decision })] }), A("p", { style: { color: "#475569", margin: "8px 0", backgroundColor: "#F8FAFC", padding: "8px", borderRadius: "6px" }, children: e.maker_rationale }), e.checker_status === "PENDING" && D("div", { style: { display: "flex", gap: "8px", marginTop: "12px" }, children: [A("button", { onClick: () => s("APPROVED"), disabled: n, style: { flex: 1, padding: "6px 12px", backgroundColor: "#10B981", color: "#fff", border: "none", borderRadius: "6px", fontWeight: 700, cursor: "pointer" }, children: "Approve" }), A("button", { onClick: () => s("REJECTED"), disabled: n, style: { flex: 1, padding: "6px 12px", backgroundColor: "#EF4444", color: "#fff", border: "none", borderRadius: "6px", fontWeight: 700, cursor: "pointer" }, children: "Reject" })] })] });
2657
+ }, Zs = ({ limit: e = 5, onCaseClick: t }) => {
2658
+ const [n, r] = Te([]), [s, o] = Te(!0);
2659
+ return Je(() => {
2660
+ tt().get(`/cases?page=1&page_size=${e}`).then((i) => {
2661
+ r(i.data.items), o(!1);
2662
+ }).catch((i) => {
2663
+ console.error(i), o(!1);
2664
+ });
2665
+ }, [e]), s ? A("div", { style: { padding: "16px", fontSize: "12px", color: "#64748B" }, children: "Loading queue..." }) : D("div", { style: {
2666
+ backgroundColor: "#FFFFFF",
2667
+ border: "1px solid #E2E8F0",
2668
+ borderRadius: "12px",
2669
+ overflow: "hidden",
2670
+ fontFamily: "Inter, system-ui, sans-serif"
2671
+ }, children: [A("div", { style: { padding: "12px 16px", borderBottom: "1px solid #F1F5F9", fontWeight: 700, fontSize: "13px", color: "#0F172A" }, children: "Compliance Review Queue" }), A("div", { style: { display: "flex", flexDirection: "column" }, children: n.map((i) => D("div", { onClick: () => t && t(i.id), style: {
2672
+ display: "flex",
2673
+ alignItems: "center",
2674
+ justifyContent: "space-between",
2675
+ padding: "10px 16px",
2676
+ borderBottom: "1px solid #F8FAFC",
2677
+ cursor: "pointer",
2678
+ fontSize: "12px"
2679
+ }, children: [D("div", { children: [A("div", { style: { fontWeight: 600, color: "#0F172A" }, children: i.customer_name }), A("div", { style: { fontFamily: "monospace", fontSize: "11px", color: "#64748B" }, children: i.case_number })] }), D("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [A(ln, { priority: i.priority }), A(an, { status: i.status })] })] }, i.id)) })] });
2680
+ }, Ys = () => {
2681
+ const [e, t] = Te(null);
2682
+ return Je(() => {
2683
+ tt().get("/sla/breach-monitor").then((n) => t(n.data));
2684
+ }, []), D("div", { style: {
2685
+ backgroundColor: "#FFFFFF",
2686
+ border: "1px solid #E2E8F0",
2687
+ borderRadius: "12px",
2688
+ padding: "16px",
2689
+ fontFamily: "Inter, system-ui, sans-serif",
2690
+ display: "flex",
2691
+ justifyContent: "space-between",
2692
+ alignItems: "center"
2693
+ }, children: [D("div", { children: [A("div", { style: { fontSize: "11px", fontWeight: 700, color: "#64748B", textTransform: "uppercase" }, children: "SLA Compliance Rate" }), D("div", { style: { fontSize: "20px", fontWeight: 800, color: "#0F172A", marginTop: "2px" }, children: [(e == null ? void 0 : e.overall_compliance_rate) || 100, "%"] })] }), A("div", { style: { textAlign: "right" }, children: D("span", { style: { fontSize: "11px", color: "#EF4444", fontWeight: 700 }, children: [(e == null ? void 0 : e.breached_count) || 0, " Breaches"] }) })] });
2694
+ };
2695
+ export {
2696
+ an as CaseStatusBadge,
2697
+ Gs as CaseSummaryCard,
2698
+ Xs as ComplianceProvider,
2699
+ Qs as MakerCheckerApprovalCard,
2700
+ ln as PriorityChip,
2701
+ Zs as ReviewQueueWidget,
2702
+ Ys as SlaMonitorWidget,
2703
+ _s as configureComplianceApi,
2704
+ tt as getComplianceApiClient,
2705
+ Ks as useCompliance
2706
+ };