@regulaforensics/facesdk-webclient 8.3.689-nightly → 8.3.690-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js DELETED
@@ -1,3449 +0,0 @@
1
- function _t(e, t) {
2
- return function() {
3
- return e.apply(t, arguments);
4
- };
5
- }
6
- const { toString: Ft } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: we, toStringTag: Rt } = Symbol, Ce = /* @__PURE__ */ ((e) => (t) => {
7
- const r = Ft.call(t);
8
- return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
9
- })(/* @__PURE__ */ Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => Ce(t) === e), Le = (e) => (t) => typeof t === e, { isArray: oe } = Array, se = Le("undefined");
10
- function ue(e) {
11
- return e !== null && !se(e) && e.constructor !== null && !se(e.constructor) && D(e.constructor.isBuffer) && e.constructor.isBuffer(e);
12
- }
13
- const mt = M("ArrayBuffer");
14
- function kt(e) {
15
- let t;
16
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && mt(e.buffer), t;
17
- }
18
- const qt = Le("string"), D = Le("function"), Tt = Le("number"), pe = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, Te = (e) => {
19
- if (Ce(e) !== "object")
20
- return !1;
21
- const t = ye(e);
22
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Rt in e) && !(we in e);
23
- }, $t = (e) => {
24
- if (!pe(e) || ue(e))
25
- return !1;
26
- try {
27
- return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
28
- } catch {
29
- return !1;
30
- }
31
- }, Wt = M("Date"), Xt = M("File"), Yt = (e) => !!(e && typeof e.uri < "u"), Jt = (e) => e && typeof e.getParts < "u", Zt = M("Blob"), Kt = M("FileList"), Qt = (e) => pe(e) && D(e.pipe);
32
- function er() {
33
- return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
34
- }
35
- const rt = er(), nt = typeof rt.FormData < "u" ? rt.FormData : void 0, tr = (e) => {
36
- if (!e) return !1;
37
- if (nt && e instanceof nt) return !0;
38
- const t = ye(e);
39
- if (!t || t === Object.prototype || !D(e.append)) return !1;
40
- const r = Ce(e);
41
- return r === "formdata" || // detect form-data instance
42
- r === "object" && D(e.toString) && e.toString() === "[object FormData]";
43
- }, rr = M("URLSearchParams"), [nr, sr, or, ar] = [
44
- "ReadableStream",
45
- "Request",
46
- "Response",
47
- "Headers"
48
- ].map(M), ir = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
49
- function he(e, t, { allOwnKeys: r = !1 } = {}) {
50
- if (e === null || typeof e > "u")
51
- return;
52
- let n, s;
53
- if (typeof e != "object" && (e = [e]), oe(e))
54
- for (n = 0, s = e.length; n < s; n++)
55
- t.call(null, e[n], n, e);
56
- else {
57
- if (ue(e))
58
- return;
59
- const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), a = o.length;
60
- let i;
61
- for (n = 0; n < a; n++)
62
- i = o[n], t.call(null, e[i], i, e);
63
- }
64
- }
65
- function Pt(e, t) {
66
- if (ue(e))
67
- return null;
68
- t = t.toLowerCase();
69
- const r = Object.keys(e);
70
- let n = r.length, s;
71
- for (; n-- > 0; )
72
- if (s = r[n], t === s.toLowerCase())
73
- return s;
74
- return null;
75
- }
76
- const K = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, It = (e) => !se(e) && e !== K;
77
- function ve(...e) {
78
- const { caseless: t, skipUndefined: r } = It(this) && this || {}, n = {}, s = (o, a) => {
79
- if (a === "__proto__" || a === "constructor" || a === "prototype")
80
- return;
81
- const i = t && Pt(n, a) || a, l = je(n, i) ? n[i] : void 0;
82
- Te(l) && Te(o) ? n[i] = ve(l, o) : Te(o) ? n[i] = ve({}, o) : oe(o) ? n[i] = o.slice() : (!r || !se(o)) && (n[i] = o);
83
- };
84
- for (let o = 0, a = e.length; o < a; o++)
85
- e[o] && he(e[o], s);
86
- return n;
87
- }
88
- const lr = (e, t, r, { allOwnKeys: n } = {}) => (he(
89
- t,
90
- (s, o) => {
91
- r && D(s) ? Object.defineProperty(e, o, {
92
- // Null-proto descriptor so a polluted Object.prototype.get cannot
93
- // hijack defineProperty's accessor-vs-data resolution.
94
- __proto__: null,
95
- value: _t(s, r),
96
- writable: !0,
97
- enumerable: !0,
98
- configurable: !0
99
- }) : Object.defineProperty(e, o, {
100
- __proto__: null,
101
- value: s,
102
- writable: !0,
103
- enumerable: !0,
104
- configurable: !0
105
- });
106
- },
107
- { allOwnKeys: n }
108
- ), e), cr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), dr = (e, t, r, n) => {
109
- e.prototype = Object.create(t.prototype, n), Object.defineProperty(e.prototype, "constructor", {
110
- __proto__: null,
111
- value: e,
112
- writable: !0,
113
- enumerable: !1,
114
- configurable: !0
115
- }), Object.defineProperty(e, "super", {
116
- __proto__: null,
117
- value: t.prototype
118
- }), r && Object.assign(e.prototype, r);
119
- }, ur = (e, t, r, n) => {
120
- let s, o, a;
121
- const i = {};
122
- if (t = t || {}, e == null) return t;
123
- do {
124
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
125
- a = s[o], (!n || n(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
126
- e = r !== !1 && ye(e);
127
- } while (e && (!r || r(e, t)) && e !== Object.prototype);
128
- return t;
129
- }, pr = (e, t, r) => {
130
- e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
131
- const n = e.indexOf(t, r);
132
- return n !== -1 && n === r;
133
- }, hr = (e) => {
134
- if (!e) return null;
135
- if (oe(e)) return e;
136
- let t = e.length;
137
- if (!Tt(t)) return null;
138
- const r = new Array(t);
139
- for (; t-- > 0; )
140
- r[t] = e[t];
141
- return r;
142
- }, fr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Er = (e, t) => {
143
- const n = (e && e[we]).call(e);
144
- let s;
145
- for (; (s = n.next()) && !s.done; ) {
146
- const o = s.value;
147
- t.call(e, o[0], o[1]);
148
- }
149
- }, Ar = (e, t) => {
150
- let r;
151
- const n = [];
152
- for (; (r = e.exec(t)) !== null; )
153
- n.push(r);
154
- return n;
155
- }, Or = M("HTMLFormElement"), _r = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, s) {
156
- return n.toUpperCase() + s;
157
- }), je = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Rr = M("RegExp"), St = (e, t) => {
158
- const r = Object.getOwnPropertyDescriptors(e), n = {};
159
- he(r, (s, o) => {
160
- let a;
161
- (a = t(s, o, e)) !== !1 && (n[o] = a || s);
162
- }), Object.defineProperties(e, n);
163
- }, mr = (e) => {
164
- St(e, (t, r) => {
165
- if (D(e) && ["arguments", "caller", "callee"].includes(r))
166
- return !1;
167
- const n = e[r];
168
- if (D(n)) {
169
- if (t.enumerable = !1, "writable" in t) {
170
- t.writable = !1;
171
- return;
172
- }
173
- t.set || (t.set = () => {
174
- throw Error("Can not rewrite read-only method '" + r + "'");
175
- });
176
- }
177
- });
178
- }, Tr = (e, t) => {
179
- const r = {}, n = (s) => {
180
- s.forEach((o) => {
181
- r[o] = !0;
182
- });
183
- };
184
- return oe(e) ? n(e) : n(String(e).split(t)), r;
185
- }, Pr = () => {
186
- }, Ir = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
187
- function Sr(e) {
188
- return !!(e && D(e.append) && e[Rt] === "FormData" && e[we]);
189
- }
190
- const br = (e) => {
191
- const t = new Array(10), r = (n, s) => {
192
- if (pe(n)) {
193
- if (t.indexOf(n) >= 0)
194
- return;
195
- if (ue(n))
196
- return n;
197
- if (!("toJSON" in n)) {
198
- t[s] = n;
199
- const o = oe(n) ? [] : {};
200
- return he(n, (a, i) => {
201
- const l = r(a, s + 1);
202
- !se(l) && (o[i] = l);
203
- }), t[s] = void 0, o;
204
- }
205
- }
206
- return n;
207
- };
208
- return r(e, 0);
209
- }, yr = M("AsyncFunction"), wr = (e) => e && (pe(e) || D(e)) && D(e.then) && D(e.catch), bt = ((e, t) => e ? setImmediate : t ? ((r, n) => (K.addEventListener(
210
- "message",
211
- ({ source: s, data: o }) => {
212
- s === K && o === r && n.length && n.shift()();
213
- },
214
- !1
215
- ), (s) => {
216
- n.push(s), K.postMessage(r, "*");
217
- }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(typeof setImmediate == "function", D(K.postMessage)), Cr = typeof queueMicrotask < "u" ? queueMicrotask.bind(K) : typeof process < "u" && process.nextTick || bt, Lr = (e) => e != null && D(e[we]), u = {
218
- isArray: oe,
219
- isArrayBuffer: mt,
220
- isBuffer: ue,
221
- isFormData: tr,
222
- isArrayBufferView: kt,
223
- isString: qt,
224
- isNumber: Tt,
225
- isBoolean: zt,
226
- isObject: pe,
227
- isPlainObject: Te,
228
- isEmptyObject: $t,
229
- isReadableStream: nr,
230
- isRequest: sr,
231
- isResponse: or,
232
- isHeaders: ar,
233
- isUndefined: se,
234
- isDate: Wt,
235
- isFile: Xt,
236
- isReactNativeBlob: Yt,
237
- isReactNative: Jt,
238
- isBlob: Zt,
239
- isRegExp: Rr,
240
- isFunction: D,
241
- isStream: Qt,
242
- isURLSearchParams: rr,
243
- isTypedArray: fr,
244
- isFileList: Kt,
245
- forEach: he,
246
- merge: ve,
247
- extend: lr,
248
- trim: ir,
249
- stripBOM: cr,
250
- inherits: dr,
251
- toFlatObject: ur,
252
- kindOf: Ce,
253
- kindOfTest: M,
254
- endsWith: pr,
255
- toArray: hr,
256
- forEachEntry: Er,
257
- matchAll: Ar,
258
- isHTMLForm: Or,
259
- hasOwnProperty: je,
260
- hasOwnProp: je,
261
- // an alias to avoid ESLint no-prototype-builtins detection
262
- reduceDescriptors: St,
263
- freezeMethods: mr,
264
- toObjectSet: Tr,
265
- toCamelCase: _r,
266
- noop: Pr,
267
- toFiniteNumber: Ir,
268
- findKey: Pt,
269
- global: K,
270
- isContextDefined: It,
271
- isSpecCompliantForm: Sr,
272
- toJSONObject: br,
273
- isAsyncFn: yr,
274
- isThenable: wr,
275
- setImmediate: bt,
276
- asap: Cr,
277
- isIterable: Lr
278
- }, gr = u.toObjectSet([
279
- "age",
280
- "authorization",
281
- "content-length",
282
- "content-type",
283
- "etag",
284
- "expires",
285
- "from",
286
- "host",
287
- "if-modified-since",
288
- "if-unmodified-since",
289
- "last-modified",
290
- "location",
291
- "max-forwards",
292
- "proxy-authorization",
293
- "referer",
294
- "retry-after",
295
- "user-agent"
296
- ]), Nr = (e) => {
297
- const t = {};
298
- let r, n, s;
299
- return e && e.split(`
300
- `).forEach(function(a) {
301
- s = a.indexOf(":"), r = a.substring(0, s).trim().toLowerCase(), n = a.substring(s + 1).trim(), !(!r || t[r] && gr[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
302
- }), t;
303
- }, st = /* @__PURE__ */ Symbol("internals"), xr = /[^\x09\x20-\x7E\x80-\xFF]/g;
304
- function Vr(e) {
305
- let t = 0, r = e.length;
306
- for (; t < r; ) {
307
- const n = e.charCodeAt(t);
308
- if (n !== 9 && n !== 32)
309
- break;
310
- t += 1;
311
- }
312
- for (; r > t; ) {
313
- const n = e.charCodeAt(r - 1);
314
- if (n !== 9 && n !== 32)
315
- break;
316
- r -= 1;
317
- }
318
- return t === 0 && r === e.length ? e : e.slice(t, r);
319
- }
320
- function de(e) {
321
- return e && String(e).trim().toLowerCase();
322
- }
323
- function Ur(e) {
324
- return Vr(e.replace(xr, ""));
325
- }
326
- function Pe(e) {
327
- return e === !1 || e == null ? e : u.isArray(e) ? e.map(Pe) : Ur(String(e));
328
- }
329
- function Dr(e) {
330
- const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
331
- let n;
332
- for (; n = r.exec(e); )
333
- t[n[1]] = n[2];
334
- return t;
335
- }
336
- const Br = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
337
- function De(e, t, r, n, s) {
338
- if (u.isFunction(n))
339
- return n.call(this, t, r);
340
- if (s && (t = r), !!u.isString(t)) {
341
- if (u.isString(n))
342
- return t.indexOf(n) !== -1;
343
- if (u.isRegExp(n))
344
- return n.test(t);
345
- }
346
- }
347
- function Hr(e) {
348
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
349
- }
350
- function Gr(e, t) {
351
- const r = u.toCamelCase(" " + t);
352
- ["get", "set", "has"].forEach((n) => {
353
- Object.defineProperty(e, n + r, {
354
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
355
- // this data descriptor into an accessor descriptor on the way in.
356
- __proto__: null,
357
- value: function(s, o, a) {
358
- return this[n].call(this, t, s, o, a);
359
- },
360
- configurable: !0
361
- });
362
- });
363
- }
364
- let U = class {
365
- constructor(t) {
366
- t && this.set(t);
367
- }
368
- set(t, r, n) {
369
- const s = this;
370
- function o(i, l, c) {
371
- const d = de(l);
372
- if (!d)
373
- throw new Error("header name must be a non-empty string");
374
- const p = u.findKey(s, d);
375
- (!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || l] = Pe(i));
376
- }
377
- const a = (i, l) => u.forEach(i, (c, d) => o(c, d, l));
378
- if (u.isPlainObject(t) || t instanceof this.constructor)
379
- a(t, r);
380
- else if (u.isString(t) && (t = t.trim()) && !Br(t))
381
- a(Nr(t), r);
382
- else if (u.isObject(t) && u.isIterable(t)) {
383
- let i = {}, l, c;
384
- for (const d of t) {
385
- if (!u.isArray(d))
386
- throw TypeError("Object iterator must return a key-value pair");
387
- i[c = d[0]] = (l = i[c]) ? u.isArray(l) ? [...l, d[1]] : [l, d[1]] : d[1];
388
- }
389
- a(i, r);
390
- } else
391
- t != null && o(r, t, n);
392
- return this;
393
- }
394
- get(t, r) {
395
- if (t = de(t), t) {
396
- const n = u.findKey(this, t);
397
- if (n) {
398
- const s = this[n];
399
- if (!r)
400
- return s;
401
- if (r === !0)
402
- return Dr(s);
403
- if (u.isFunction(r))
404
- return r.call(this, s, n);
405
- if (u.isRegExp(r))
406
- return r.exec(s);
407
- throw new TypeError("parser must be boolean|regexp|function");
408
- }
409
- }
410
- }
411
- has(t, r) {
412
- if (t = de(t), t) {
413
- const n = u.findKey(this, t);
414
- return !!(n && this[n] !== void 0 && (!r || De(this, this[n], n, r)));
415
- }
416
- return !1;
417
- }
418
- delete(t, r) {
419
- const n = this;
420
- let s = !1;
421
- function o(a) {
422
- if (a = de(a), a) {
423
- const i = u.findKey(n, a);
424
- i && (!r || De(n, n[i], i, r)) && (delete n[i], s = !0);
425
- }
426
- }
427
- return u.isArray(t) ? t.forEach(o) : o(t), s;
428
- }
429
- clear(t) {
430
- const r = Object.keys(this);
431
- let n = r.length, s = !1;
432
- for (; n--; ) {
433
- const o = r[n];
434
- (!t || De(this, this[o], o, t, !0)) && (delete this[o], s = !0);
435
- }
436
- return s;
437
- }
438
- normalize(t) {
439
- const r = this, n = {};
440
- return u.forEach(this, (s, o) => {
441
- const a = u.findKey(n, o);
442
- if (a) {
443
- r[a] = Pe(s), delete r[o];
444
- return;
445
- }
446
- const i = t ? Hr(o) : String(o).trim();
447
- i !== o && delete r[o], r[i] = Pe(s), n[i] = !0;
448
- }), this;
449
- }
450
- concat(...t) {
451
- return this.constructor.concat(this, ...t);
452
- }
453
- toJSON(t) {
454
- const r = /* @__PURE__ */ Object.create(null);
455
- return u.forEach(this, (n, s) => {
456
- n != null && n !== !1 && (r[s] = t && u.isArray(n) ? n.join(", ") : n);
457
- }), r;
458
- }
459
- [Symbol.iterator]() {
460
- return Object.entries(this.toJSON())[Symbol.iterator]();
461
- }
462
- toString() {
463
- return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
464
- `);
465
- }
466
- getSetCookie() {
467
- return this.get("set-cookie") || [];
468
- }
469
- get [Symbol.toStringTag]() {
470
- return "AxiosHeaders";
471
- }
472
- static from(t) {
473
- return t instanceof this ? t : new this(t);
474
- }
475
- static concat(t, ...r) {
476
- const n = new this(t);
477
- return r.forEach((s) => n.set(s)), n;
478
- }
479
- static accessor(t) {
480
- const n = (this[st] = this[st] = {
481
- accessors: {}
482
- }).accessors, s = this.prototype;
483
- function o(a) {
484
- const i = de(a);
485
- n[i] || (Gr(s, a), n[i] = !0);
486
- }
487
- return u.isArray(t) ? t.forEach(o) : o(t), this;
488
- }
489
- };
490
- U.accessor([
491
- "Content-Type",
492
- "Content-Length",
493
- "Accept",
494
- "Accept-Encoding",
495
- "User-Agent",
496
- "Authorization"
497
- ]);
498
- u.reduceDescriptors(U.prototype, ({ value: e }, t) => {
499
- let r = t[0].toUpperCase() + t.slice(1);
500
- return {
501
- get: () => e,
502
- set(n) {
503
- this[r] = n;
504
- }
505
- };
506
- });
507
- u.freezeMethods(U);
508
- const Mr = "[REDACTED ****]";
509
- function vr(e) {
510
- if (u.hasOwnProp(e, "toJSON"))
511
- return !0;
512
- let t = Object.getPrototypeOf(e);
513
- for (; t && t !== Object.prototype; ) {
514
- if (u.hasOwnProp(t, "toJSON"))
515
- return !0;
516
- t = Object.getPrototypeOf(t);
517
- }
518
- return !1;
519
- }
520
- function jr(e, t) {
521
- const r = new Set(t.map((o) => String(o).toLowerCase())), n = [], s = (o) => {
522
- if (o === null || typeof o != "object" || u.isBuffer(o)) return o;
523
- if (n.indexOf(o) !== -1) return;
524
- o instanceof U && (o = o.toJSON()), n.push(o);
525
- let a;
526
- if (u.isArray(o))
527
- a = [], o.forEach((i, l) => {
528
- const c = s(i);
529
- u.isUndefined(c) || (a[l] = c);
530
- });
531
- else {
532
- if (!u.isPlainObject(o) && vr(o))
533
- return n.pop(), o;
534
- a = /* @__PURE__ */ Object.create(null);
535
- for (const [i, l] of Object.entries(o)) {
536
- const c = r.has(i.toLowerCase()) ? Mr : s(l);
537
- u.isUndefined(c) || (a[i] = c);
538
- }
539
- }
540
- return n.pop(), a;
541
- };
542
- return s(e);
543
- }
544
- let f = class yt extends Error {
545
- static from(t, r, n, s, o, a) {
546
- const i = new yt(t.message, r || t.code, n, s, o);
547
- return i.cause = t, i.name = t.name, t.status != null && i.status == null && (i.status = t.status), a && Object.assign(i, a), i;
548
- }
549
- /**
550
- * Create an Error with the specified message, config, error code, request and response.
551
- *
552
- * @param {string} message The error message.
553
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
554
- * @param {Object} [config] The config.
555
- * @param {Object} [request] The request.
556
- * @param {Object} [response] The response.
557
- *
558
- * @returns {Error} The created error.
559
- */
560
- constructor(t, r, n, s, o) {
561
- super(t), Object.defineProperty(this, "message", {
562
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
563
- // this data descriptor into an accessor descriptor on the way in.
564
- __proto__: null,
565
- value: t,
566
- enumerable: !0,
567
- writable: !0,
568
- configurable: !0
569
- }), this.name = "AxiosError", this.isAxiosError = !0, r && (this.code = r), n && (this.config = n), s && (this.request = s), o && (this.response = o, this.status = o.status);
570
- }
571
- toJSON() {
572
- const t = this.config, r = t && u.hasOwnProp(t, "redact") ? t.redact : void 0, n = u.isArray(r) && r.length > 0 ? jr(t, r) : u.toJSONObject(t);
573
- return {
574
- // Standard
575
- message: this.message,
576
- name: this.name,
577
- // Microsoft
578
- description: this.description,
579
- number: this.number,
580
- // Mozilla
581
- fileName: this.fileName,
582
- lineNumber: this.lineNumber,
583
- columnNumber: this.columnNumber,
584
- stack: this.stack,
585
- // Axios
586
- config: n,
587
- code: this.code,
588
- status: this.status
589
- };
590
- }
591
- };
592
- f.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
593
- f.ERR_BAD_OPTION = "ERR_BAD_OPTION";
594
- f.ECONNABORTED = "ECONNABORTED";
595
- f.ETIMEDOUT = "ETIMEDOUT";
596
- f.ECONNREFUSED = "ECONNREFUSED";
597
- f.ERR_NETWORK = "ERR_NETWORK";
598
- f.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
599
- f.ERR_DEPRECATED = "ERR_DEPRECATED";
600
- f.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
601
- f.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
602
- f.ERR_CANCELED = "ERR_CANCELED";
603
- f.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
604
- f.ERR_INVALID_URL = "ERR_INVALID_URL";
605
- f.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
606
- const Fr = null;
607
- function Fe(e) {
608
- return u.isPlainObject(e) || u.isArray(e);
609
- }
610
- function wt(e) {
611
- return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
612
- }
613
- function Be(e, t, r) {
614
- return e ? e.concat(t).map(function(s, o) {
615
- return s = wt(s), !r && o ? "[" + s + "]" : s;
616
- }).join(r ? "." : "") : t;
617
- }
618
- function kr(e) {
619
- return u.isArray(e) && !e.some(Fe);
620
- }
621
- const qr = u.toFlatObject(u, {}, null, function(t) {
622
- return /^is[A-Z]/.test(t);
623
- });
624
- function ge(e, t, r) {
625
- if (!u.isObject(e))
626
- throw new TypeError("target must be an object");
627
- t = t || new FormData(), r = u.toFlatObject(
628
- r,
629
- {
630
- metaTokens: !0,
631
- dots: !1,
632
- indexes: !1
633
- },
634
- !1,
635
- function(h, A) {
636
- return !u.isUndefined(A[h]);
637
- }
638
- );
639
- const n = r.metaTokens, s = r.visitor || p, o = r.dots, a = r.indexes, i = r.Blob || typeof Blob < "u" && Blob, l = r.maxDepth === void 0 ? 100 : r.maxDepth, c = i && u.isSpecCompliantForm(t);
640
- if (!u.isFunction(s))
641
- throw new TypeError("visitor must be a function");
642
- function d(E) {
643
- if (E === null) return "";
644
- if (u.isDate(E))
645
- return E.toISOString();
646
- if (u.isBoolean(E))
647
- return E.toString();
648
- if (!c && u.isBlob(E))
649
- throw new f("Blob is not supported. Use a Buffer instead.");
650
- return u.isArrayBuffer(E) || u.isTypedArray(E) ? c && typeof Blob == "function" ? new Blob([E]) : Buffer.from(E) : E;
651
- }
652
- function p(E, h, A) {
653
- let S = E;
654
- if (u.isReactNative(t) && u.isReactNativeBlob(E))
655
- return t.append(Be(A, h, o), d(E)), !1;
656
- if (E && !A && typeof E == "object") {
657
- if (u.endsWith(h, "{}"))
658
- h = n ? h : h.slice(0, -2), E = JSON.stringify(E);
659
- else if (u.isArray(E) && kr(E) || (u.isFileList(E) || u.endsWith(h, "[]")) && (S = u.toArray(E)))
660
- return h = wt(h), S.forEach(function(T, B) {
661
- !(u.isUndefined(T) || T === null) && t.append(
662
- // eslint-disable-next-line no-nested-ternary
663
- a === !0 ? Be([h], B, o) : a === null ? h : h + "[]",
664
- d(T)
665
- );
666
- }), !1;
667
- }
668
- return Fe(E) ? !0 : (t.append(Be(A, h, o), d(E)), !1);
669
- }
670
- const _ = [], R = Object.assign(qr, {
671
- defaultVisitor: p,
672
- convertValue: d,
673
- isVisitable: Fe
674
- });
675
- function m(E, h, A = 0) {
676
- if (!u.isUndefined(E)) {
677
- if (A > l)
678
- throw new f(
679
- "Object is too deeply nested (" + A + " levels). Max depth: " + l,
680
- f.ERR_FORM_DATA_DEPTH_EXCEEDED
681
- );
682
- if (_.indexOf(E) !== -1)
683
- throw Error("Circular reference detected in " + h.join("."));
684
- _.push(E), u.forEach(E, function(P, T) {
685
- (!(u.isUndefined(P) || P === null) && s.call(t, P, u.isString(T) ? T.trim() : T, h, R)) === !0 && m(P, h ? h.concat(T) : [T], A + 1);
686
- }), _.pop();
687
- }
688
- }
689
- if (!u.isObject(e))
690
- throw new TypeError("data must be an object");
691
- return m(e), t;
692
- }
693
- function ot(e) {
694
- const t = {
695
- "!": "%21",
696
- "'": "%27",
697
- "(": "%28",
698
- ")": "%29",
699
- "~": "%7E",
700
- "%20": "+"
701
- };
702
- return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(n) {
703
- return t[n];
704
- });
705
- }
706
- function $e(e, t) {
707
- this._pairs = [], e && ge(e, this, t);
708
- }
709
- const Ct = $e.prototype;
710
- Ct.append = function(t, r) {
711
- this._pairs.push([t, r]);
712
- };
713
- Ct.toString = function(t) {
714
- const r = t ? function(n) {
715
- return t.call(this, n, ot);
716
- } : ot;
717
- return this._pairs.map(function(s) {
718
- return r(s[0]) + "=" + r(s[1]);
719
- }, "").join("&");
720
- };
721
- function zr(e) {
722
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
723
- }
724
- function Lt(e, t, r) {
725
- if (!t)
726
- return e;
727
- const n = r && r.encode || zr, s = u.isFunction(r) ? {
728
- serialize: r
729
- } : r, o = s && s.serialize;
730
- let a;
731
- if (o ? a = o(t, s) : a = u.isURLSearchParams(t) ? t.toString() : new $e(t, s).toString(n), a) {
732
- const i = e.indexOf("#");
733
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
734
- }
735
- return e;
736
- }
737
- class at {
738
- constructor() {
739
- this.handlers = [];
740
- }
741
- /**
742
- * Add a new interceptor to the stack
743
- *
744
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
745
- * @param {Function} rejected The function to handle `reject` for a `Promise`
746
- * @param {Object} options The options for the interceptor, synchronous and runWhen
747
- *
748
- * @return {Number} An ID used to remove interceptor later
749
- */
750
- use(t, r, n) {
751
- return this.handlers.push({
752
- fulfilled: t,
753
- rejected: r,
754
- synchronous: n ? n.synchronous : !1,
755
- runWhen: n ? n.runWhen : null
756
- }), this.handlers.length - 1;
757
- }
758
- /**
759
- * Remove an interceptor from the stack
760
- *
761
- * @param {Number} id The ID that was returned by `use`
762
- *
763
- * @returns {void}
764
- */
765
- eject(t) {
766
- this.handlers[t] && (this.handlers[t] = null);
767
- }
768
- /**
769
- * Clear all interceptors from the stack
770
- *
771
- * @returns {void}
772
- */
773
- clear() {
774
- this.handlers && (this.handlers = []);
775
- }
776
- /**
777
- * Iterate over all the registered interceptors
778
- *
779
- * This method is particularly useful for skipping over any
780
- * interceptors that may have become `null` calling `eject`.
781
- *
782
- * @param {Function} fn The function to call for each interceptor
783
- *
784
- * @returns {void}
785
- */
786
- forEach(t) {
787
- u.forEach(this.handlers, function(n) {
788
- n !== null && t(n);
789
- });
790
- }
791
- }
792
- const We = {
793
- silentJSONParsing: !0,
794
- forcedJSONParsing: !0,
795
- clarifyTimeoutError: !1,
796
- legacyInterceptorReqResOrdering: !0
797
- }, $r = typeof URLSearchParams < "u" ? URLSearchParams : $e, Wr = typeof FormData < "u" ? FormData : null, Xr = typeof Blob < "u" ? Blob : null, Yr = {
798
- isBrowser: !0,
799
- classes: {
800
- URLSearchParams: $r,
801
- FormData: Wr,
802
- Blob: Xr
803
- },
804
- protocols: ["http", "https", "file", "blob", "url", "data"]
805
- }, Xe = typeof window < "u" && typeof document < "u", ke = typeof navigator == "object" && navigator || void 0, Jr = Xe && (!ke || ["ReactNative", "NativeScript", "NS"].indexOf(ke.product) < 0), Zr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
806
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Kr = Xe && window.location.href || "http://localhost", Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
807
- __proto__: null,
808
- hasBrowserEnv: Xe,
809
- hasStandardBrowserEnv: Jr,
810
- hasStandardBrowserWebWorkerEnv: Zr,
811
- navigator: ke,
812
- origin: Kr
813
- }, Symbol.toStringTag, { value: "Module" })), V = {
814
- ...Qr,
815
- ...Yr
816
- };
817
- function en(e, t) {
818
- return ge(e, new V.classes.URLSearchParams(), {
819
- visitor: function(r, n, s, o) {
820
- return V.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
821
- },
822
- ...t
823
- });
824
- }
825
- function tn(e) {
826
- return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
827
- }
828
- function rn(e) {
829
- const t = {}, r = Object.keys(e);
830
- let n;
831
- const s = r.length;
832
- let o;
833
- for (n = 0; n < s; n++)
834
- o = r[n], t[o] = e[o];
835
- return t;
836
- }
837
- function gt(e) {
838
- function t(r, n, s, o) {
839
- let a = r[o++];
840
- if (a === "__proto__") return !0;
841
- const i = Number.isFinite(+a), l = o >= r.length;
842
- return a = !a && u.isArray(s) ? s.length : a, l ? (u.hasOwnProp(s, a) ? s[a] = u.isArray(s[a]) ? s[a].concat(n) : [s[a], n] : s[a] = n, !i) : ((!s[a] || !u.isObject(s[a])) && (s[a] = []), t(r, n, s[a], o) && u.isArray(s[a]) && (s[a] = rn(s[a])), !i);
843
- }
844
- if (u.isFormData(e) && u.isFunction(e.entries)) {
845
- const r = {};
846
- return u.forEachEntry(e, (n, s) => {
847
- t(tn(n), s, r, 0);
848
- }), r;
849
- }
850
- return null;
851
- }
852
- const re = (e, t) => e != null && u.hasOwnProp(e, t) ? e[t] : void 0;
853
- function nn(e, t, r) {
854
- if (u.isString(e))
855
- try {
856
- return (t || JSON.parse)(e), u.trim(e);
857
- } catch (n) {
858
- if (n.name !== "SyntaxError")
859
- throw n;
860
- }
861
- return (r || JSON.stringify)(e);
862
- }
863
- const fe = {
864
- transitional: We,
865
- adapter: ["xhr", "http", "fetch"],
866
- transformRequest: [
867
- function(t, r) {
868
- const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = u.isObject(t);
869
- if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
870
- return s ? JSON.stringify(gt(t)) : t;
871
- if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
872
- return t;
873
- if (u.isArrayBufferView(t))
874
- return t.buffer;
875
- if (u.isURLSearchParams(t))
876
- return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
877
- let i;
878
- if (o) {
879
- const l = re(this, "formSerializer");
880
- if (n.indexOf("application/x-www-form-urlencoded") > -1)
881
- return en(t, l).toString();
882
- if ((i = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
883
- const c = re(this, "env"), d = c && c.FormData;
884
- return ge(
885
- i ? { "files[]": t } : t,
886
- d && new d(),
887
- l
888
- );
889
- }
890
- }
891
- return o || s ? (r.setContentType("application/json", !1), nn(t)) : t;
892
- }
893
- ],
894
- transformResponse: [
895
- function(t) {
896
- const r = re(this, "transitional") || fe.transitional, n = r && r.forcedJSONParsing, s = re(this, "responseType"), o = s === "json";
897
- if (u.isResponse(t) || u.isReadableStream(t))
898
- return t;
899
- if (t && u.isString(t) && (n && !s || o)) {
900
- const i = !(r && r.silentJSONParsing) && o;
901
- try {
902
- return JSON.parse(t, re(this, "parseReviver"));
903
- } catch (l) {
904
- if (i)
905
- throw l.name === "SyntaxError" ? f.from(l, f.ERR_BAD_RESPONSE, this, null, re(this, "response")) : l;
906
- }
907
- }
908
- return t;
909
- }
910
- ],
911
- /**
912
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
913
- * timeout is not created.
914
- */
915
- timeout: 0,
916
- xsrfCookieName: "XSRF-TOKEN",
917
- xsrfHeaderName: "X-XSRF-TOKEN",
918
- maxContentLength: -1,
919
- maxBodyLength: -1,
920
- env: {
921
- FormData: V.classes.FormData,
922
- Blob: V.classes.Blob
923
- },
924
- validateStatus: function(t) {
925
- return t >= 200 && t < 300;
926
- },
927
- headers: {
928
- common: {
929
- Accept: "application/json, text/plain, */*",
930
- "Content-Type": void 0
931
- }
932
- }
933
- };
934
- u.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (e) => {
935
- fe.headers[e] = {};
936
- });
937
- function He(e, t) {
938
- const r = this || fe, n = t || r, s = U.from(n.headers);
939
- let o = n.data;
940
- return u.forEach(e, function(i) {
941
- o = i.call(r, o, s.normalize(), t ? t.status : void 0);
942
- }), s.normalize(), o;
943
- }
944
- function Nt(e) {
945
- return !!(e && e.__CANCEL__);
946
- }
947
- let Ee = class extends f {
948
- /**
949
- * A `CanceledError` is an object that is thrown when an operation is canceled.
950
- *
951
- * @param {string=} message The message.
952
- * @param {Object=} config The config.
953
- * @param {Object=} request The request.
954
- *
955
- * @returns {CanceledError} The created error.
956
- */
957
- constructor(t, r, n) {
958
- super(t ?? "canceled", f.ERR_CANCELED, r, n), this.name = "CanceledError", this.__CANCEL__ = !0;
959
- }
960
- };
961
- function xt(e, t, r) {
962
- const n = r.config.validateStatus;
963
- !r.status || !n || n(r.status) ? e(r) : t(new f(
964
- "Request failed with status code " + r.status,
965
- r.status >= 400 && r.status < 500 ? f.ERR_BAD_REQUEST : f.ERR_BAD_RESPONSE,
966
- r.config,
967
- r.request,
968
- r
969
- ));
970
- }
971
- function sn(e) {
972
- const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
973
- return t && t[1] || "";
974
- }
975
- function on(e, t) {
976
- e = e || 10;
977
- const r = new Array(e), n = new Array(e);
978
- let s = 0, o = 0, a;
979
- return t = t !== void 0 ? t : 1e3, function(l) {
980
- const c = Date.now(), d = n[o];
981
- a || (a = c), r[s] = l, n[s] = c;
982
- let p = o, _ = 0;
983
- for (; p !== s; )
984
- _ += r[p++], p = p % e;
985
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), c - a < t)
986
- return;
987
- const R = d && c - d;
988
- return R ? Math.round(_ * 1e3 / R) : void 0;
989
- };
990
- }
991
- function an(e, t) {
992
- let r = 0, n = 1e3 / t, s, o;
993
- const a = (c, d = Date.now()) => {
994
- r = d, s = null, o && (clearTimeout(o), o = null), e(...c);
995
- };
996
- return [(...c) => {
997
- const d = Date.now(), p = d - r;
998
- p >= n ? a(c, d) : (s = c, o || (o = setTimeout(() => {
999
- o = null, a(s);
1000
- }, n - p)));
1001
- }, () => s && a(s)];
1002
- }
1003
- const Se = (e, t, r = 3) => {
1004
- let n = 0;
1005
- const s = on(50, 250);
1006
- return an((o) => {
1007
- const a = o.loaded, i = o.lengthComputable ? o.total : void 0, l = i != null ? Math.min(a, i) : a, c = Math.max(0, l - n), d = s(c);
1008
- n = Math.max(n, l);
1009
- const p = {
1010
- loaded: l,
1011
- total: i,
1012
- progress: i ? l / i : void 0,
1013
- bytes: c,
1014
- rate: d || void 0,
1015
- estimated: d && i ? (i - l) / d : void 0,
1016
- event: o,
1017
- lengthComputable: i != null,
1018
- [t ? "download" : "upload"]: !0
1019
- };
1020
- e(p);
1021
- }, r);
1022
- }, it = (e, t) => {
1023
- const r = e != null;
1024
- return [
1025
- (n) => t[0]({
1026
- lengthComputable: r,
1027
- total: e,
1028
- loaded: n
1029
- }),
1030
- t[1]
1031
- ];
1032
- }, lt = (e) => (...t) => u.asap(() => e(...t)), ln = V.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (r) => (r = new URL(r, V.origin), e.protocol === r.protocol && e.host === r.host && (t || e.port === r.port)))(
1033
- new URL(V.origin),
1034
- V.navigator && /(msie|trident)/i.test(V.navigator.userAgent)
1035
- ) : () => !0, cn = V.hasStandardBrowserEnv ? (
1036
- // Standard browser envs support document.cookie
1037
- {
1038
- write(e, t, r, n, s, o, a) {
1039
- if (typeof document > "u") return;
1040
- const i = [`${e}=${encodeURIComponent(t)}`];
1041
- u.isNumber(r) && i.push(`expires=${new Date(r).toUTCString()}`), u.isString(n) && i.push(`path=${n}`), u.isString(s) && i.push(`domain=${s}`), o === !0 && i.push("secure"), u.isString(a) && i.push(`SameSite=${a}`), document.cookie = i.join("; ");
1042
- },
1043
- read(e) {
1044
- if (typeof document > "u") return null;
1045
- const t = document.cookie.split(";");
1046
- for (let r = 0; r < t.length; r++) {
1047
- const n = t[r].replace(/^\s+/, ""), s = n.indexOf("=");
1048
- if (s !== -1 && n.slice(0, s) === e)
1049
- return decodeURIComponent(n.slice(s + 1));
1050
- }
1051
- return null;
1052
- },
1053
- remove(e) {
1054
- this.write(e, "", Date.now() - 864e5, "/");
1055
- }
1056
- }
1057
- ) : (
1058
- // Non-standard browser env (web workers, react-native) lack needed support.
1059
- {
1060
- write() {
1061
- },
1062
- read() {
1063
- return null;
1064
- },
1065
- remove() {
1066
- }
1067
- }
1068
- );
1069
- function dn(e) {
1070
- return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1071
- }
1072
- function un(e, t) {
1073
- return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1074
- }
1075
- function Vt(e, t, r) {
1076
- let n = !dn(t);
1077
- return e && (n || r === !1) ? un(e, t) : t;
1078
- }
1079
- const ct = (e) => e instanceof U ? { ...e } : e;
1080
- function ee(e, t) {
1081
- t = t || {};
1082
- const r = /* @__PURE__ */ Object.create(null);
1083
- Object.defineProperty(r, "hasOwnProperty", {
1084
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
1085
- // this data descriptor into an accessor descriptor on the way in.
1086
- __proto__: null,
1087
- value: Object.prototype.hasOwnProperty,
1088
- enumerable: !1,
1089
- writable: !0,
1090
- configurable: !0
1091
- });
1092
- function n(c, d, p, _) {
1093
- return u.isPlainObject(c) && u.isPlainObject(d) ? u.merge.call({ caseless: _ }, c, d) : u.isPlainObject(d) ? u.merge({}, d) : u.isArray(d) ? d.slice() : d;
1094
- }
1095
- function s(c, d, p, _) {
1096
- if (u.isUndefined(d)) {
1097
- if (!u.isUndefined(c))
1098
- return n(void 0, c, p, _);
1099
- } else return n(c, d, p, _);
1100
- }
1101
- function o(c, d) {
1102
- if (!u.isUndefined(d))
1103
- return n(void 0, d);
1104
- }
1105
- function a(c, d) {
1106
- if (u.isUndefined(d)) {
1107
- if (!u.isUndefined(c))
1108
- return n(void 0, c);
1109
- } else return n(void 0, d);
1110
- }
1111
- function i(c, d, p) {
1112
- if (u.hasOwnProp(t, p))
1113
- return n(c, d);
1114
- if (u.hasOwnProp(e, p))
1115
- return n(void 0, c);
1116
- }
1117
- const l = {
1118
- url: o,
1119
- method: o,
1120
- data: o,
1121
- baseURL: a,
1122
- transformRequest: a,
1123
- transformResponse: a,
1124
- paramsSerializer: a,
1125
- timeout: a,
1126
- timeoutMessage: a,
1127
- withCredentials: a,
1128
- withXSRFToken: a,
1129
- adapter: a,
1130
- responseType: a,
1131
- xsrfCookieName: a,
1132
- xsrfHeaderName: a,
1133
- onUploadProgress: a,
1134
- onDownloadProgress: a,
1135
- decompress: a,
1136
- maxContentLength: a,
1137
- maxBodyLength: a,
1138
- beforeRedirect: a,
1139
- transport: a,
1140
- httpAgent: a,
1141
- httpsAgent: a,
1142
- cancelToken: a,
1143
- socketPath: a,
1144
- allowedSocketPaths: a,
1145
- responseEncoding: a,
1146
- validateStatus: i,
1147
- headers: (c, d, p) => s(ct(c), ct(d), p, !0)
1148
- };
1149
- return u.forEach(Object.keys({ ...e, ...t }), function(d) {
1150
- if (d === "__proto__" || d === "constructor" || d === "prototype") return;
1151
- const p = u.hasOwnProp(l, d) ? l[d] : s, _ = u.hasOwnProp(e, d) ? e[d] : void 0, R = u.hasOwnProp(t, d) ? t[d] : void 0, m = p(_, R, d);
1152
- u.isUndefined(m) && p !== i || (r[d] = m);
1153
- }), r;
1154
- }
1155
- const pn = ["content-type", "content-length"];
1156
- function hn(e, t, r) {
1157
- if (r !== "content-only") {
1158
- e.set(t);
1159
- return;
1160
- }
1161
- Object.entries(t).forEach(([n, s]) => {
1162
- pn.includes(n.toLowerCase()) && e.set(n, s);
1163
- });
1164
- }
1165
- const fn = (e) => encodeURIComponent(e).replace(
1166
- /%([0-9A-F]{2})/gi,
1167
- (t, r) => String.fromCharCode(parseInt(r, 16))
1168
- ), Ut = (e) => {
1169
- const t = ee({}, e), r = (_) => u.hasOwnProp(t, _) ? t[_] : void 0, n = r("data");
1170
- let s = r("withXSRFToken");
1171
- const o = r("xsrfHeaderName"), a = r("xsrfCookieName");
1172
- let i = r("headers");
1173
- const l = r("auth"), c = r("baseURL"), d = r("allowAbsoluteUrls"), p = r("url");
1174
- if (t.headers = i = U.from(i), t.url = Lt(
1175
- Vt(c, p, d),
1176
- e.params,
1177
- e.paramsSerializer
1178
- ), l && i.set(
1179
- "Authorization",
1180
- "Basic " + btoa((l.username || "") + ":" + (l.password ? fn(l.password) : ""))
1181
- ), u.isFormData(n) && (V.hasStandardBrowserEnv || V.hasStandardBrowserWebWorkerEnv ? i.setContentType(void 0) : u.isFunction(n.getHeaders) && hn(i, n.getHeaders(), r("formDataHeaderPolicy"))), V.hasStandardBrowserEnv && (u.isFunction(s) && (s = s(t)), s === !0 || s == null && ln(t.url))) {
1182
- const R = o && a && cn.read(a);
1183
- R && i.set(o, R);
1184
- }
1185
- return t;
1186
- }, En = typeof XMLHttpRequest < "u", An = En && function(e) {
1187
- return new Promise(function(r, n) {
1188
- const s = Ut(e);
1189
- let o = s.data;
1190
- const a = U.from(s.headers).normalize();
1191
- let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = s, d, p, _, R, m;
1192
- function E() {
1193
- R && R(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(d), s.signal && s.signal.removeEventListener("abort", d);
1194
- }
1195
- let h = new XMLHttpRequest();
1196
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1197
- function A() {
1198
- if (!h)
1199
- return;
1200
- const P = U.from(
1201
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1202
- ), B = {
1203
- data: !i || i === "text" || i === "json" ? h.responseText : h.response,
1204
- status: h.status,
1205
- statusText: h.statusText,
1206
- headers: P,
1207
- config: e,
1208
- request: h
1209
- };
1210
- xt(
1211
- function(ie) {
1212
- r(ie), E();
1213
- },
1214
- function(ie) {
1215
- n(ie), E();
1216
- },
1217
- B
1218
- ), h = null;
1219
- }
1220
- "onloadend" in h ? h.onloadend = A : h.onreadystatechange = function() {
1221
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.startsWith("file:")) || setTimeout(A);
1222
- }, h.onabort = function() {
1223
- h && (n(new f("Request aborted", f.ECONNABORTED, e, h)), E(), h = null);
1224
- }, h.onerror = function(T) {
1225
- const B = T && T.message ? T.message : "Network Error", X = new f(B, f.ERR_NETWORK, e, h);
1226
- X.event = T || null, n(X), E(), h = null;
1227
- }, h.ontimeout = function() {
1228
- let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1229
- const B = s.transitional || We;
1230
- s.timeoutErrorMessage && (T = s.timeoutErrorMessage), n(
1231
- new f(
1232
- T,
1233
- B.clarifyTimeoutError ? f.ETIMEDOUT : f.ECONNABORTED,
1234
- e,
1235
- h
1236
- )
1237
- ), E(), h = null;
1238
- }, o === void 0 && a.setContentType(null), "setRequestHeader" in h && u.forEach(a.toJSON(), function(T, B) {
1239
- h.setRequestHeader(B, T);
1240
- }), u.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), i && i !== "json" && (h.responseType = s.responseType), c && ([_, m] = Se(c, !0), h.addEventListener("progress", _)), l && h.upload && ([p, R] = Se(l), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (d = (P) => {
1241
- h && (n(!P || P.type ? new Ee(null, e, h) : P), h.abort(), E(), h = null);
1242
- }, s.cancelToken && s.cancelToken.subscribe(d), s.signal && (s.signal.aborted ? d() : s.signal.addEventListener("abort", d)));
1243
- const S = sn(s.url);
1244
- if (S && !V.protocols.includes(S)) {
1245
- n(
1246
- new f(
1247
- "Unsupported protocol " + S + ":",
1248
- f.ERR_BAD_REQUEST,
1249
- e
1250
- )
1251
- );
1252
- return;
1253
- }
1254
- h.send(o || null);
1255
- });
1256
- }, On = (e, t) => {
1257
- const { length: r } = e = e ? e.filter(Boolean) : [];
1258
- if (t || r) {
1259
- let n = new AbortController(), s;
1260
- const o = function(c) {
1261
- if (!s) {
1262
- s = !0, i();
1263
- const d = c instanceof Error ? c : this.reason;
1264
- n.abort(
1265
- d instanceof f ? d : new Ee(d instanceof Error ? d.message : d)
1266
- );
1267
- }
1268
- };
1269
- let a = t && setTimeout(() => {
1270
- a = null, o(new f(`timeout of ${t}ms exceeded`, f.ETIMEDOUT));
1271
- }, t);
1272
- const i = () => {
1273
- e && (a && clearTimeout(a), a = null, e.forEach((c) => {
1274
- c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o);
1275
- }), e = null);
1276
- };
1277
- e.forEach((c) => c.addEventListener("abort", o));
1278
- const { signal: l } = n;
1279
- return l.unsubscribe = () => u.asap(i), l;
1280
- }
1281
- }, _n = function* (e, t) {
1282
- let r = e.byteLength;
1283
- if (r < t) {
1284
- yield e;
1285
- return;
1286
- }
1287
- let n = 0, s;
1288
- for (; n < r; )
1289
- s = n + t, yield e.slice(n, s), n = s;
1290
- }, Rn = async function* (e, t) {
1291
- for await (const r of mn(e))
1292
- yield* _n(r, t);
1293
- }, mn = async function* (e) {
1294
- if (e[Symbol.asyncIterator]) {
1295
- yield* e;
1296
- return;
1297
- }
1298
- const t = e.getReader();
1299
- try {
1300
- for (; ; ) {
1301
- const { done: r, value: n } = await t.read();
1302
- if (r)
1303
- break;
1304
- yield n;
1305
- }
1306
- } finally {
1307
- await t.cancel();
1308
- }
1309
- }, dt = (e, t, r, n) => {
1310
- const s = Rn(e, t);
1311
- let o = 0, a, i = (l) => {
1312
- a || (a = !0, n && n(l));
1313
- };
1314
- return new ReadableStream(
1315
- {
1316
- async pull(l) {
1317
- try {
1318
- const { done: c, value: d } = await s.next();
1319
- if (c) {
1320
- i(), l.close();
1321
- return;
1322
- }
1323
- let p = d.byteLength;
1324
- if (r) {
1325
- let _ = o += p;
1326
- r(_);
1327
- }
1328
- l.enqueue(new Uint8Array(d));
1329
- } catch (c) {
1330
- throw i(c), c;
1331
- }
1332
- },
1333
- cancel(l) {
1334
- return i(l), s.return();
1335
- }
1336
- },
1337
- {
1338
- highWaterMark: 2
1339
- }
1340
- );
1341
- };
1342
- function Tn(e) {
1343
- if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
1344
- const t = e.indexOf(",");
1345
- if (t < 0) return 0;
1346
- const r = e.slice(5, t), n = e.slice(t + 1);
1347
- if (/;base64/i.test(r)) {
1348
- let a = n.length;
1349
- const i = n.length;
1350
- for (let R = 0; R < i; R++)
1351
- if (n.charCodeAt(R) === 37 && R + 2 < i) {
1352
- const m = n.charCodeAt(R + 1), E = n.charCodeAt(R + 2);
1353
- (m >= 48 && m <= 57 || m >= 65 && m <= 70 || m >= 97 && m <= 102) && (E >= 48 && E <= 57 || E >= 65 && E <= 70 || E >= 97 && E <= 102) && (a -= 2, R += 2);
1354
- }
1355
- let l = 0, c = i - 1;
1356
- const d = (R) => R >= 2 && n.charCodeAt(R - 2) === 37 && // '%'
1357
- n.charCodeAt(R - 1) === 51 && // '3'
1358
- (n.charCodeAt(R) === 68 || n.charCodeAt(R) === 100);
1359
- c >= 0 && (n.charCodeAt(c) === 61 ? (l++, c--) : d(c) && (l++, c -= 3)), l === 1 && c >= 0 && (n.charCodeAt(c) === 61 || d(c)) && l++;
1360
- const _ = Math.floor(a / 4) * 3 - (l || 0);
1361
- return _ > 0 ? _ : 0;
1362
- }
1363
- if (typeof Buffer < "u" && typeof Buffer.byteLength == "function")
1364
- return Buffer.byteLength(n, "utf8");
1365
- let o = 0;
1366
- for (let a = 0, i = n.length; a < i; a++) {
1367
- const l = n.charCodeAt(a);
1368
- if (l < 128)
1369
- o += 1;
1370
- else if (l < 2048)
1371
- o += 2;
1372
- else if (l >= 55296 && l <= 56319 && a + 1 < i) {
1373
- const c = n.charCodeAt(a + 1);
1374
- c >= 56320 && c <= 57343 ? (o += 4, a++) : o += 3;
1375
- } else
1376
- o += 3;
1377
- }
1378
- return o;
1379
- }
1380
- const Ye = "1.16.0", ut = 64 * 1024, { isFunction: Re } = u, pt = (e, ...t) => {
1381
- try {
1382
- return !!e(...t);
1383
- } catch {
1384
- return !1;
1385
- }
1386
- }, Pn = (e) => {
1387
- const t = u.global ?? globalThis, { ReadableStream: r, TextEncoder: n } = t;
1388
- e = u.merge.call(
1389
- {
1390
- skipUndefined: !0
1391
- },
1392
- {
1393
- Request: t.Request,
1394
- Response: t.Response
1395
- },
1396
- e
1397
- );
1398
- const { fetch: s, Request: o, Response: a } = e, i = s ? Re(s) : typeof fetch == "function", l = Re(o), c = Re(a);
1399
- if (!i)
1400
- return !1;
1401
- const d = i && Re(r), p = i && (typeof n == "function" ? /* @__PURE__ */ ((A) => (S) => A.encode(S))(new n()) : async (A) => new Uint8Array(await new o(A).arrayBuffer())), _ = l && d && pt(() => {
1402
- let A = !1;
1403
- const S = new o(V.origin, {
1404
- body: new r(),
1405
- method: "POST",
1406
- get duplex() {
1407
- return A = !0, "half";
1408
- }
1409
- }), P = S.headers.has("Content-Type");
1410
- return S.body != null && S.body.cancel(), A && !P;
1411
- }), R = c && d && pt(() => u.isReadableStream(new a("").body)), m = {
1412
- stream: R && ((A) => A.body)
1413
- };
1414
- i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((A) => {
1415
- !m[A] && (m[A] = (S, P) => {
1416
- let T = S && S[A];
1417
- if (T)
1418
- return T.call(S);
1419
- throw new f(
1420
- `Response type '${A}' is not supported`,
1421
- f.ERR_NOT_SUPPORT,
1422
- P
1423
- );
1424
- });
1425
- });
1426
- const E = async (A) => {
1427
- if (A == null)
1428
- return 0;
1429
- if (u.isBlob(A))
1430
- return A.size;
1431
- if (u.isSpecCompliantForm(A))
1432
- return (await new o(V.origin, {
1433
- method: "POST",
1434
- body: A
1435
- }).arrayBuffer()).byteLength;
1436
- if (u.isArrayBufferView(A) || u.isArrayBuffer(A))
1437
- return A.byteLength;
1438
- if (u.isURLSearchParams(A) && (A = A + ""), u.isString(A))
1439
- return (await p(A)).byteLength;
1440
- }, h = async (A, S) => {
1441
- const P = u.toFiniteNumber(A.getContentLength());
1442
- return P ?? E(S);
1443
- };
1444
- return async (A) => {
1445
- let {
1446
- url: S,
1447
- method: P,
1448
- data: T,
1449
- signal: B,
1450
- cancelToken: X,
1451
- timeout: ie,
1452
- onDownloadProgress: xe,
1453
- onUploadProgress: Ze,
1454
- responseType: z,
1455
- headers: Y,
1456
- withCredentials: Ae = "same-origin",
1457
- fetchOptions: Ke,
1458
- maxContentLength: v,
1459
- maxBodyLength: Ve
1460
- } = Ut(A);
1461
- const le = u.isNumber(v) && v > -1, vt = u.isNumber(Ve) && Ve > -1;
1462
- let Qe = s || fetch;
1463
- z = z ? (z + "").toLowerCase() : "text";
1464
- let $ = On(
1465
- [B, X && X.toAbortSignal()],
1466
- ie
1467
- ), H = null;
1468
- const J = $ && $.unsubscribe && (() => {
1469
- $.unsubscribe();
1470
- });
1471
- let et;
1472
- try {
1473
- if (le && typeof S == "string" && S.startsWith("data:") && Tn(S) > v)
1474
- throw new f(
1475
- "maxContentLength size of " + v + " exceeded",
1476
- f.ERR_BAD_RESPONSE,
1477
- A,
1478
- H
1479
- );
1480
- if (vt && P !== "get" && P !== "head") {
1481
- const b = await h(Y, T);
1482
- if (typeof b == "number" && isFinite(b) && b > Ve)
1483
- throw new f(
1484
- "Request body larger than maxBodyLength limit",
1485
- f.ERR_BAD_REQUEST,
1486
- A,
1487
- H
1488
- );
1489
- }
1490
- if (Ze && _ && P !== "get" && P !== "head" && (et = await h(Y, T)) !== 0) {
1491
- let b = new o(S, {
1492
- method: "POST",
1493
- body: T,
1494
- duplex: "half"
1495
- }), te;
1496
- if (u.isFormData(T) && (te = b.headers.get("content-type")) && Y.setContentType(te), b.body) {
1497
- const [Oe, _e] = it(
1498
- et,
1499
- Se(lt(Ze))
1500
- );
1501
- T = dt(b.body, ut, Oe, _e);
1502
- }
1503
- }
1504
- u.isString(Ae) || (Ae = Ae ? "include" : "omit");
1505
- const x = l && "credentials" in o.prototype;
1506
- if (u.isFormData(T)) {
1507
- const b = Y.getContentType();
1508
- b && /^multipart\/form-data/i.test(b) && !/boundary=/i.test(b) && Y.delete("content-type");
1509
- }
1510
- Y.set("User-Agent", "axios/" + Ye, !1);
1511
- const W = {
1512
- ...Ke,
1513
- signal: $,
1514
- method: P.toUpperCase(),
1515
- headers: Y.normalize().toJSON(),
1516
- body: T,
1517
- duplex: "half",
1518
- credentials: x ? Ae : void 0
1519
- };
1520
- H = l && new o(S, W);
1521
- let j = await (l ? Qe(H, Ke) : Qe(S, W));
1522
- if (le) {
1523
- const b = u.toFiniteNumber(j.headers.get("content-length"));
1524
- if (b != null && b > v)
1525
- throw new f(
1526
- "maxContentLength size of " + v + " exceeded",
1527
- f.ERR_BAD_RESPONSE,
1528
- A,
1529
- H
1530
- );
1531
- }
1532
- const Ue = R && (z === "stream" || z === "response");
1533
- if (R && j.body && (xe || le || Ue && J)) {
1534
- const b = {};
1535
- ["status", "statusText", "headers"].forEach((ce) => {
1536
- b[ce] = j[ce];
1537
- });
1538
- const te = u.toFiniteNumber(j.headers.get("content-length")), [Oe, _e] = xe && it(
1539
- te,
1540
- Se(lt(xe), !0)
1541
- ) || [];
1542
- let tt = 0;
1543
- const jt = (ce) => {
1544
- if (le && (tt = ce, tt > v))
1545
- throw new f(
1546
- "maxContentLength size of " + v + " exceeded",
1547
- f.ERR_BAD_RESPONSE,
1548
- A,
1549
- H
1550
- );
1551
- Oe && Oe(ce);
1552
- };
1553
- j = new a(
1554
- dt(j.body, ut, jt, () => {
1555
- _e && _e(), J && J();
1556
- }),
1557
- b
1558
- );
1559
- }
1560
- z = z || "text";
1561
- let k = await m[u.findKey(m, z) || "text"](
1562
- j,
1563
- A
1564
- );
1565
- if (le && !R && !Ue) {
1566
- let b;
1567
- if (k != null && (typeof k.byteLength == "number" ? b = k.byteLength : typeof k.size == "number" ? b = k.size : typeof k == "string" && (b = typeof n == "function" ? new n().encode(k).byteLength : k.length)), typeof b == "number" && b > v)
1568
- throw new f(
1569
- "maxContentLength size of " + v + " exceeded",
1570
- f.ERR_BAD_RESPONSE,
1571
- A,
1572
- H
1573
- );
1574
- }
1575
- return !Ue && J && J(), await new Promise((b, te) => {
1576
- xt(b, te, {
1577
- data: k,
1578
- headers: U.from(j.headers),
1579
- status: j.status,
1580
- statusText: j.statusText,
1581
- config: A,
1582
- request: H
1583
- });
1584
- });
1585
- } catch (x) {
1586
- if (J && J(), $ && $.aborted && $.reason instanceof f) {
1587
- const W = $.reason;
1588
- throw W.config = A, H && (W.request = H), x !== W && (W.cause = x), W;
1589
- }
1590
- throw x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
1591
- new f(
1592
- "Network Error",
1593
- f.ERR_NETWORK,
1594
- A,
1595
- H,
1596
- x && x.response
1597
- ),
1598
- {
1599
- cause: x.cause || x
1600
- }
1601
- ) : f.from(x, x && x.code, A, H, x && x.response);
1602
- }
1603
- };
1604
- }, In = /* @__PURE__ */ new Map(), Dt = (e) => {
1605
- let t = e && e.env || {};
1606
- const { fetch: r, Request: n, Response: s } = t, o = [n, s, r];
1607
- let a = o.length, i = a, l, c, d = In;
1608
- for (; i--; )
1609
- l = o[i], c = d.get(l), c === void 0 && d.set(l, c = i ? /* @__PURE__ */ new Map() : Pn(t)), d = c;
1610
- return c;
1611
- };
1612
- Dt();
1613
- const Je = {
1614
- http: Fr,
1615
- xhr: An,
1616
- fetch: {
1617
- get: Dt
1618
- }
1619
- };
1620
- u.forEach(Je, (e, t) => {
1621
- if (e) {
1622
- try {
1623
- Object.defineProperty(e, "name", { __proto__: null, value: t });
1624
- } catch {
1625
- }
1626
- Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
1627
- }
1628
- });
1629
- const ht = (e) => `- ${e}`, Sn = (e) => u.isFunction(e) || e === null || e === !1;
1630
- function bn(e, t) {
1631
- e = u.isArray(e) ? e : [e];
1632
- const { length: r } = e;
1633
- let n, s;
1634
- const o = {};
1635
- for (let a = 0; a < r; a++) {
1636
- n = e[a];
1637
- let i;
1638
- if (s = n, !Sn(n) && (s = Je[(i = String(n)).toLowerCase()], s === void 0))
1639
- throw new f(`Unknown adapter '${i}'`);
1640
- if (s && (u.isFunction(s) || (s = s.get(t))))
1641
- break;
1642
- o[i || "#" + a] = s;
1643
- }
1644
- if (!s) {
1645
- const a = Object.entries(o).map(
1646
- ([l, c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build")
1647
- );
1648
- let i = r ? a.length > 1 ? `since :
1649
- ` + a.map(ht).join(`
1650
- `) : " " + ht(a[0]) : "as no adapter specified";
1651
- throw new f(
1652
- "There is no suitable adapter to dispatch the request " + i,
1653
- "ERR_NOT_SUPPORT"
1654
- );
1655
- }
1656
- return s;
1657
- }
1658
- const Bt = {
1659
- /**
1660
- * Resolve an adapter from a list of adapter names or functions.
1661
- * @type {Function}
1662
- */
1663
- getAdapter: bn,
1664
- /**
1665
- * Exposes all known adapters
1666
- * @type {Object<string, Function|Object>}
1667
- */
1668
- adapters: Je
1669
- };
1670
- function Ge(e) {
1671
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1672
- throw new Ee(null, e);
1673
- }
1674
- function ft(e) {
1675
- return Ge(e), e.headers = U.from(e.headers), e.data = He.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Bt.getAdapter(e.adapter || fe.adapter, e)(e).then(
1676
- function(n) {
1677
- Ge(e), e.response = n;
1678
- try {
1679
- n.data = He.call(e, e.transformResponse, n);
1680
- } finally {
1681
- delete e.response;
1682
- }
1683
- return n.headers = U.from(n.headers), n;
1684
- },
1685
- function(n) {
1686
- if (!Nt(n) && (Ge(e), n && n.response)) {
1687
- e.response = n.response;
1688
- try {
1689
- n.response.data = He.call(
1690
- e,
1691
- e.transformResponse,
1692
- n.response
1693
- );
1694
- } finally {
1695
- delete e.response;
1696
- }
1697
- n.response.headers = U.from(n.response.headers);
1698
- }
1699
- return Promise.reject(n);
1700
- }
1701
- );
1702
- }
1703
- const Ne = {};
1704
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1705
- Ne[e] = function(n) {
1706
- return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1707
- };
1708
- });
1709
- const Et = {};
1710
- Ne.transitional = function(t, r, n) {
1711
- function s(o, a) {
1712
- return "[Axios v" + Ye + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
1713
- }
1714
- return (o, a, i) => {
1715
- if (t === !1)
1716
- throw new f(
1717
- s(a, " has been removed" + (r ? " in " + r : "")),
1718
- f.ERR_DEPRECATED
1719
- );
1720
- return r && !Et[a] && (Et[a] = !0, console.warn(
1721
- s(
1722
- a,
1723
- " has been deprecated since v" + r + " and will be removed in the near future"
1724
- )
1725
- )), t ? t(o, a, i) : !0;
1726
- };
1727
- };
1728
- Ne.spelling = function(t) {
1729
- return (r, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
1730
- };
1731
- function yn(e, t, r) {
1732
- if (typeof e != "object")
1733
- throw new f("options must be an object", f.ERR_BAD_OPTION_VALUE);
1734
- const n = Object.keys(e);
1735
- let s = n.length;
1736
- for (; s-- > 0; ) {
1737
- const o = n[s], a = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
1738
- if (a) {
1739
- const i = e[o], l = i === void 0 || a(i, o, e);
1740
- if (l !== !0)
1741
- throw new f(
1742
- "option " + o + " must be " + l,
1743
- f.ERR_BAD_OPTION_VALUE
1744
- );
1745
- continue;
1746
- }
1747
- if (r !== !0)
1748
- throw new f("Unknown option " + o, f.ERR_BAD_OPTION);
1749
- }
1750
- }
1751
- const Ie = {
1752
- assertOptions: yn,
1753
- validators: Ne
1754
- }, G = Ie.validators;
1755
- let Q = class {
1756
- constructor(t) {
1757
- this.defaults = t || {}, this.interceptors = {
1758
- request: new at(),
1759
- response: new at()
1760
- };
1761
- }
1762
- /**
1763
- * Dispatch a request
1764
- *
1765
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1766
- * @param {?Object} config
1767
- *
1768
- * @returns {Promise} The Promise to be fulfilled
1769
- */
1770
- async request(t, r) {
1771
- try {
1772
- return await this._request(t, r);
1773
- } catch (n) {
1774
- if (n instanceof Error) {
1775
- let s = {};
1776
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1777
- const o = (() => {
1778
- if (!s.stack)
1779
- return "";
1780
- const a = s.stack.indexOf(`
1781
- `);
1782
- return a === -1 ? "" : s.stack.slice(a + 1);
1783
- })();
1784
- try {
1785
- if (!n.stack)
1786
- n.stack = o;
1787
- else if (o) {
1788
- const a = o.indexOf(`
1789
- `), i = a === -1 ? -1 : o.indexOf(`
1790
- `, a + 1), l = i === -1 ? "" : o.slice(i + 1);
1791
- String(n.stack).endsWith(l) || (n.stack += `
1792
- ` + o);
1793
- }
1794
- } catch {
1795
- }
1796
- }
1797
- throw n;
1798
- }
1799
- }
1800
- _request(t, r) {
1801
- typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = ee(this.defaults, r);
1802
- const { transitional: n, paramsSerializer: s, headers: o } = r;
1803
- n !== void 0 && Ie.assertOptions(
1804
- n,
1805
- {
1806
- silentJSONParsing: G.transitional(G.boolean),
1807
- forcedJSONParsing: G.transitional(G.boolean),
1808
- clarifyTimeoutError: G.transitional(G.boolean),
1809
- legacyInterceptorReqResOrdering: G.transitional(G.boolean)
1810
- },
1811
- !1
1812
- ), s != null && (u.isFunction(s) ? r.paramsSerializer = {
1813
- serialize: s
1814
- } : Ie.assertOptions(
1815
- s,
1816
- {
1817
- encode: G.function,
1818
- serialize: G.function
1819
- },
1820
- !0
1821
- )), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), Ie.assertOptions(
1822
- r,
1823
- {
1824
- baseUrl: G.spelling("baseURL"),
1825
- withXsrfToken: G.spelling("withXSRFToken")
1826
- },
1827
- !0
1828
- ), r.method = (r.method || this.defaults.method || "get").toLowerCase();
1829
- let a = o && u.merge(o.common, o[r.method]);
1830
- o && u.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (m) => {
1831
- delete o[m];
1832
- }), r.headers = U.concat(a, o);
1833
- const i = [];
1834
- let l = !0;
1835
- this.interceptors.request.forEach(function(E) {
1836
- if (typeof E.runWhen == "function" && E.runWhen(r) === !1)
1837
- return;
1838
- l = l && E.synchronous;
1839
- const h = r.transitional || We;
1840
- h && h.legacyInterceptorReqResOrdering ? i.unshift(E.fulfilled, E.rejected) : i.push(E.fulfilled, E.rejected);
1841
- });
1842
- const c = [];
1843
- this.interceptors.response.forEach(function(E) {
1844
- c.push(E.fulfilled, E.rejected);
1845
- });
1846
- let d, p = 0, _;
1847
- if (!l) {
1848
- const m = [ft.bind(this), void 0];
1849
- for (m.unshift(...i), m.push(...c), _ = m.length, d = Promise.resolve(r); p < _; )
1850
- d = d.then(m[p++], m[p++]);
1851
- return d;
1852
- }
1853
- _ = i.length;
1854
- let R = r;
1855
- for (; p < _; ) {
1856
- const m = i[p++], E = i[p++];
1857
- try {
1858
- R = m(R);
1859
- } catch (h) {
1860
- E.call(this, h);
1861
- break;
1862
- }
1863
- }
1864
- try {
1865
- d = ft.call(this, R);
1866
- } catch (m) {
1867
- return Promise.reject(m);
1868
- }
1869
- for (p = 0, _ = c.length; p < _; )
1870
- d = d.then(c[p++], c[p++]);
1871
- return d;
1872
- }
1873
- getUri(t) {
1874
- t = ee(this.defaults, t);
1875
- const r = Vt(t.baseURL, t.url, t.allowAbsoluteUrls);
1876
- return Lt(r, t.params, t.paramsSerializer);
1877
- }
1878
- };
1879
- u.forEach(["delete", "get", "head", "options"], function(t) {
1880
- Q.prototype[t] = function(r, n) {
1881
- return this.request(
1882
- ee(n || {}, {
1883
- method: t,
1884
- url: r,
1885
- data: (n || {}).data
1886
- })
1887
- );
1888
- };
1889
- });
1890
- u.forEach(["post", "put", "patch", "query"], function(t) {
1891
- function r(n) {
1892
- return function(o, a, i) {
1893
- return this.request(
1894
- ee(i || {}, {
1895
- method: t,
1896
- headers: n ? {
1897
- "Content-Type": "multipart/form-data"
1898
- } : {},
1899
- url: o,
1900
- data: a
1901
- })
1902
- );
1903
- };
1904
- }
1905
- Q.prototype[t] = r(), t !== "query" && (Q.prototype[t + "Form"] = r(!0));
1906
- });
1907
- let wn = class Ht {
1908
- constructor(t) {
1909
- if (typeof t != "function")
1910
- throw new TypeError("executor must be a function.");
1911
- let r;
1912
- this.promise = new Promise(function(o) {
1913
- r = o;
1914
- });
1915
- const n = this;
1916
- this.promise.then((s) => {
1917
- if (!n._listeners) return;
1918
- let o = n._listeners.length;
1919
- for (; o-- > 0; )
1920
- n._listeners[o](s);
1921
- n._listeners = null;
1922
- }), this.promise.then = (s) => {
1923
- let o;
1924
- const a = new Promise((i) => {
1925
- n.subscribe(i), o = i;
1926
- }).then(s);
1927
- return a.cancel = function() {
1928
- n.unsubscribe(o);
1929
- }, a;
1930
- }, t(function(o, a, i) {
1931
- n.reason || (n.reason = new Ee(o, a, i), r(n.reason));
1932
- });
1933
- }
1934
- /**
1935
- * Throws a `CanceledError` if cancellation has been requested.
1936
- */
1937
- throwIfRequested() {
1938
- if (this.reason)
1939
- throw this.reason;
1940
- }
1941
- /**
1942
- * Subscribe to the cancel signal
1943
- */
1944
- subscribe(t) {
1945
- if (this.reason) {
1946
- t(this.reason);
1947
- return;
1948
- }
1949
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1950
- }
1951
- /**
1952
- * Unsubscribe from the cancel signal
1953
- */
1954
- unsubscribe(t) {
1955
- if (!this._listeners)
1956
- return;
1957
- const r = this._listeners.indexOf(t);
1958
- r !== -1 && this._listeners.splice(r, 1);
1959
- }
1960
- toAbortSignal() {
1961
- const t = new AbortController(), r = (n) => {
1962
- t.abort(n);
1963
- };
1964
- return this.subscribe(r), t.signal.unsubscribe = () => this.unsubscribe(r), t.signal;
1965
- }
1966
- /**
1967
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1968
- * cancels the `CancelToken`.
1969
- */
1970
- static source() {
1971
- let t;
1972
- return {
1973
- token: new Ht(function(s) {
1974
- t = s;
1975
- }),
1976
- cancel: t
1977
- };
1978
- }
1979
- };
1980
- function Cn(e) {
1981
- return function(r) {
1982
- return e.apply(null, r);
1983
- };
1984
- }
1985
- function Ln(e) {
1986
- return u.isObject(e) && e.isAxiosError === !0;
1987
- }
1988
- const qe = {
1989
- Continue: 100,
1990
- SwitchingProtocols: 101,
1991
- Processing: 102,
1992
- EarlyHints: 103,
1993
- Ok: 200,
1994
- Created: 201,
1995
- Accepted: 202,
1996
- NonAuthoritativeInformation: 203,
1997
- NoContent: 204,
1998
- ResetContent: 205,
1999
- PartialContent: 206,
2000
- MultiStatus: 207,
2001
- AlreadyReported: 208,
2002
- ImUsed: 226,
2003
- MultipleChoices: 300,
2004
- MovedPermanently: 301,
2005
- Found: 302,
2006
- SeeOther: 303,
2007
- NotModified: 304,
2008
- UseProxy: 305,
2009
- Unused: 306,
2010
- TemporaryRedirect: 307,
2011
- PermanentRedirect: 308,
2012
- BadRequest: 400,
2013
- Unauthorized: 401,
2014
- PaymentRequired: 402,
2015
- Forbidden: 403,
2016
- NotFound: 404,
2017
- MethodNotAllowed: 405,
2018
- NotAcceptable: 406,
2019
- ProxyAuthenticationRequired: 407,
2020
- RequestTimeout: 408,
2021
- Conflict: 409,
2022
- Gone: 410,
2023
- LengthRequired: 411,
2024
- PreconditionFailed: 412,
2025
- PayloadTooLarge: 413,
2026
- UriTooLong: 414,
2027
- UnsupportedMediaType: 415,
2028
- RangeNotSatisfiable: 416,
2029
- ExpectationFailed: 417,
2030
- ImATeapot: 418,
2031
- MisdirectedRequest: 421,
2032
- UnprocessableEntity: 422,
2033
- Locked: 423,
2034
- FailedDependency: 424,
2035
- TooEarly: 425,
2036
- UpgradeRequired: 426,
2037
- PreconditionRequired: 428,
2038
- TooManyRequests: 429,
2039
- RequestHeaderFieldsTooLarge: 431,
2040
- UnavailableForLegalReasons: 451,
2041
- InternalServerError: 500,
2042
- NotImplemented: 501,
2043
- BadGateway: 502,
2044
- ServiceUnavailable: 503,
2045
- GatewayTimeout: 504,
2046
- HttpVersionNotSupported: 505,
2047
- VariantAlsoNegotiates: 506,
2048
- InsufficientStorage: 507,
2049
- LoopDetected: 508,
2050
- NotExtended: 510,
2051
- NetworkAuthenticationRequired: 511,
2052
- WebServerIsDown: 521,
2053
- ConnectionTimedOut: 522,
2054
- OriginIsUnreachable: 523,
2055
- TimeoutOccurred: 524,
2056
- SslHandshakeFailed: 525,
2057
- InvalidSslCertificate: 526
2058
- };
2059
- Object.entries(qe).forEach(([e, t]) => {
2060
- qe[t] = e;
2061
- });
2062
- function Gt(e) {
2063
- const t = new Q(e), r = _t(Q.prototype.request, t);
2064
- return u.extend(r, Q.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
2065
- return Gt(ee(e, s));
2066
- }, r;
2067
- }
2068
- const O = Gt(fe);
2069
- O.Axios = Q;
2070
- O.CanceledError = Ee;
2071
- O.CancelToken = wn;
2072
- O.isCancel = Nt;
2073
- O.VERSION = Ye;
2074
- O.toFormData = ge;
2075
- O.AxiosError = f;
2076
- O.Cancel = O.CanceledError;
2077
- O.all = function(t) {
2078
- return Promise.all(t);
2079
- };
2080
- O.spread = Cn;
2081
- O.isAxiosError = Ln;
2082
- O.mergeConfig = ee;
2083
- O.AxiosHeaders = U;
2084
- O.formToJSON = (e) => gt(u.isHTMLForm(e) ? new FormData(e) : e);
2085
- O.getAdapter = Bt.getAdapter;
2086
- O.HttpStatusCode = qe;
2087
- O.default = O;
2088
- const {
2089
- Axios: ds,
2090
- AxiosError: us,
2091
- CanceledError: ps,
2092
- isCancel: hs,
2093
- CancelToken: fs,
2094
- VERSION: Es,
2095
- all: As,
2096
- Cancel: Os,
2097
- isAxiosError: _s,
2098
- spread: Rs,
2099
- toFormData: ms,
2100
- AxiosHeaders: Ts,
2101
- HttpStatusCode: Ps,
2102
- formToJSON: Is,
2103
- getAdapter: Ss,
2104
- mergeConfig: bs,
2105
- create: ys
2106
- } = O, y = "https://faceapi.regulaforensics.com".replace(/\/+$/, "");
2107
- class ae {
2108
- constructor(t, r = y, n = O) {
2109
- this.basePath = r, this.axios = n, t && (this.configuration = t, this.basePath = t.basePath ?? r);
2110
- }
2111
- }
2112
- class gn extends Error {
2113
- constructor(t, r) {
2114
- super(r), this.field = t, this.name = "RequiredError";
2115
- }
2116
- }
2117
- const w = {}, C = "https://example.com", I = function(e, t, r) {
2118
- if (r == null)
2119
- throw new gn(t, `Required parameter ${t} was null or undefined when calling ${e}.`);
2120
- };
2121
- function ze(e, t, r = "") {
2122
- t != null && (typeof t == "object" ? Array.isArray(t) ? t.forEach((n) => ze(e, n, r)) : Object.keys(t).forEach(
2123
- (n) => ze(e, t[n], `${r}${r !== "" ? "." : ""}${n}`)
2124
- ) : e.has(r) ? e.append(r, t) : e.set(r, t));
2125
- }
2126
- const L = function(e, ...t) {
2127
- const r = new URLSearchParams(e.search);
2128
- ze(r, t), e.search = r.toString();
2129
- }, F = function(e, t, r) {
2130
- const n = typeof e != "string";
2131
- return (n && r && r.isJsonMime ? r.isJsonMime(t.headers["Content-Type"]) : n) ? JSON.stringify(e !== void 0 ? e : {}) : e || "";
2132
- }, g = function(e) {
2133
- return e.pathname + e.search + e.hash;
2134
- }, N = function(e, t, r, n) {
2135
- return (s = t, o = r) => {
2136
- const a = { ...e.options, url: (s.defaults.baseURL ? "" : n?.basePath ?? o) + e.url };
2137
- return s.request(a);
2138
- };
2139
- }, Nn = function(e) {
2140
- return {
2141
- /**
2142
- * Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
2143
- * @summary detect and check quality
2144
- * @param {DetectRequest} detectRequest
2145
- * @param {string} [xRequestID] Request header label.
2146
- * @param {*} [options] Override http request option.
2147
- * @throws {RequiredError}
2148
- */
2149
- detect: async (t, r, n = {}) => {
2150
- I("detect", "detectRequest", t);
2151
- const s = "/api/detect", o = new URL(s, C);
2152
- let a;
2153
- e && (a = e.baseOptions);
2154
- const i = { method: "POST", ...a, ...n }, l = {}, c = {};
2155
- l["Content-Type"] = "application/json", r != null && (l["X-RequestID"] = String(r)), L(o, c);
2156
- let d = a && a.headers ? a.headers : {};
2157
- return i.headers = { ...l, ...d, ...n.headers }, i.data = F(t, i, e), {
2158
- url: g(o),
2159
- options: i
2160
- };
2161
- },
2162
- /**
2163
- * To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> Note that no more than two images of the same `type` are allowed for comparison.<br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
2164
- * @summary compare faces (1:1)
2165
- * @param {MatchRequest} matchRequest
2166
- * @param {string} [xRequestID] Request header label.
2167
- * @param {*} [options] Override http request option.
2168
- * @throws {RequiredError}
2169
- */
2170
- match: async (t, r, n = {}) => {
2171
- I("match", "matchRequest", t);
2172
- const s = "/api/match", o = new URL(s, C);
2173
- let a;
2174
- e && (a = e.baseOptions);
2175
- const i = { method: "POST", ...a, ...n }, l = {}, c = {};
2176
- l["Content-Type"] = "application/json", r != null && (l["X-RequestID"] = String(r)), L(o, c);
2177
- let d = a && a.headers ? a.headers : {};
2178
- return i.headers = { ...l, ...d, ...n.headers }, i.data = F(t, i, e), {
2179
- url: g(o),
2180
- options: i
2181
- };
2182
- },
2183
- /**
2184
- * To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
2185
- * @summary match and search (1:1 + 1:N)
2186
- * @param {MatchAndSearchRequest} matchAndSearchRequest
2187
- * @param {string} [xRequestID] Request header label.
2188
- * @param {*} [options] Override http request option.
2189
- * @throws {RequiredError}
2190
- */
2191
- matchAndSearch: async (t, r, n = {}) => {
2192
- I("matchAndSearch", "matchAndSearchRequest", t);
2193
- const s = "/api/match_and_search", o = new URL(s, C);
2194
- let a;
2195
- e && (a = e.baseOptions);
2196
- const i = { method: "POST", ...a, ...n }, l = {}, c = {};
2197
- l["Content-Type"] = "application/json", r != null && (l["X-RequestID"] = String(r)), L(o, c);
2198
- let d = a && a.headers ? a.headers : {};
2199
- return i.headers = { ...l, ...d, ...n.headers }, i.data = F(t, i, e), {
2200
- url: g(o),
2201
- options: i
2202
- };
2203
- }
2204
- };
2205
- }, Me = function(e) {
2206
- const t = Nn(e);
2207
- return {
2208
- /**
2209
- * Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
2210
- * @summary detect and check quality
2211
- * @param {DetectRequest} detectRequest
2212
- * @param {string} [xRequestID] Request header label.
2213
- * @param {*} [options] Override http request option.
2214
- * @throws {RequiredError}
2215
- */
2216
- async detect(r, n, s) {
2217
- const o = await t.detect(r, n, s), a = e?.serverIndex ?? 0, i = w["MatchApi.detect"]?.[a]?.url;
2218
- return (l, c) => N(o, O, y, e)(l, i || c);
2219
- },
2220
- /**
2221
- * To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> Note that no more than two images of the same `type` are allowed for comparison.<br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
2222
- * @summary compare faces (1:1)
2223
- * @param {MatchRequest} matchRequest
2224
- * @param {string} [xRequestID] Request header label.
2225
- * @param {*} [options] Override http request option.
2226
- * @throws {RequiredError}
2227
- */
2228
- async match(r, n, s) {
2229
- const o = await t.match(r, n, s), a = e?.serverIndex ?? 0, i = w["MatchApi.match"]?.[a]?.url;
2230
- return (l, c) => N(o, O, y, e)(l, i || c);
2231
- },
2232
- /**
2233
- * To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
2234
- * @summary match and search (1:1 + 1:N)
2235
- * @param {MatchAndSearchRequest} matchAndSearchRequest
2236
- * @param {string} [xRequestID] Request header label.
2237
- * @param {*} [options] Override http request option.
2238
- * @throws {RequiredError}
2239
- */
2240
- async matchAndSearch(r, n, s) {
2241
- const o = await t.matchAndSearch(r, n, s), a = e?.serverIndex ?? 0, i = w["MatchApi.matchAndSearch"]?.[a]?.url;
2242
- return (l, c) => N(o, O, y, e)(l, i || c);
2243
- }
2244
- };
2245
- };
2246
- let xn = class extends ae {
2247
- /**
2248
- * Use the POST `api/detect` endpoint to analyze images, recognize faces in them, and return cropped and aligned portraits of the detected people. The Face Detection feature lets you additionally: - **Check face image quality**: Assess whether a portrait meets certain standards, for example, ICAO, Schengen visa, USA visa. To perform image quality check, use the `processParam.quality` field. For the list of assessed characteristics, see the [Face Image Quality Characteristics page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/face-image-quality-check/). - **Evaluate face attributes**: Estimate the age range of a person; check whether the eyes are occluded, closed, or open; detect a facial expression or smile; see if there are glasses, sunglasses, head coverage, medical mask, etc. To evaluate attributes, add the `processParam.attributes` field. For the list of assessed attributes, see the [Attributes List page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/attributes-detection/). You can perform Face Detection in two ways: - By adding parameters manually. In this case, the configuration is not saved and you will need to add all the necessary parameters to each request. - By a processing `scenario` that includes certain parameters. You can use predefined scenarios or add custom ones. For detailed information about scenarios, refer to the [Scenarios page](https://docs.regulaforensics.com/develop/face-sdk/web-service/development/usage/face-detection/scenarios/).
2249
- * @summary detect and check quality
2250
- * @param {DetectRequest} detectRequest
2251
- * @param {string} [xRequestID] Request header label.
2252
- * @param {*} [options] Override http request option.
2253
- * @throws {RequiredError}
2254
- */
2255
- detect(t, r, n) {
2256
- return Me(this.configuration).detect(t, r, n).then((s) => s(this.axios, this.basePath));
2257
- }
2258
- /**
2259
- * To perform a comparison of faces in the same image or in two different images, use POST `/api/match`. It\'s possible to compare faces in the same image or in two different images, this is defined by the `images.type` parameter. <br><br> Note that no more than two images of the same `type` are allowed for comparison.<br><br> The face detection result is displayed in the `detections` field. Each face is identified by two parameters: `faceIndex` (the index number of the face) and `imageIndex` (the index number of the image on which the face is detected). So, if there are two images each of which has two faces in them, the parameters will be the following: - First face in the first image: `faceIndex: 0`, `imageIndex: 0` - Second face in the first image: `faceIndex: 1`, `imageIndex: 0` - First face of the second image: `faceIndex: 0`, `imageIndex: 1` - Second face in the second image: `faceIndex: 1`, `imageIndex: 1`
2260
- * @summary compare faces (1:1)
2261
- * @param {MatchRequest} matchRequest
2262
- * @param {string} [xRequestID] Request header label.
2263
- * @param {*} [options] Override http request option.
2264
- * @throws {RequiredError}
2265
- */
2266
- match(t, r, n) {
2267
- return Me(this.configuration).match(t, r, n).then((s) => s(this.axios, this.basePath));
2268
- }
2269
- /**
2270
- * To compare several images from a document and look up a person in the database in one request, use POST `/api/match_and_search`. In this case, the calculation of the descriptor will be performed only once, as opposed to using two requests for the same operation. At least two photos are required. If, after processing two or more photos, only one face is detected across them, the match step is skipped, and only the search is carried out.
2271
- * @summary match and search (1:1 + 1:N)
2272
- * @param {MatchAndSearchRequest} matchAndSearchRequest
2273
- * @param {string} [xRequestID] Request header label.
2274
- * @param {*} [options] Override http request option.
2275
- * @throws {RequiredError}
2276
- */
2277
- matchAndSearch(t, r, n) {
2278
- return Me(this.configuration).matchAndSearch(t, r, n).then((s) => s(this.axios, this.basePath));
2279
- }
2280
- };
2281
- var Vn = /* @__PURE__ */ ((e) => (e.AGE = "Age", e.EMOTION = "Emotion", e.EYE_LEFT = "EyeLeft", e.EYE_RIGHT = "EyeRight", e.SMILE = "Smile", e.GLASSES = "Glasses", e.HEAD_COVERING = "HeadCovering", e.FOREHEAD_COVERING = "ForeheadCovering", e.MOUTH = "Mouth", e.MEDICAL_MASK = "MedicalMask", e.OCCLUSION = "Occlusion", e.STRONG_MAKEUP = "StrongMakeup", e.HEADPHONES = "Headphones", e))(Vn || {}), Un = /* @__PURE__ */ ((e) => (e[e.ALIGN_3x4 = 0] = "ALIGN_3x4", e[e.ALIGN_4x5 = 1] = "ALIGN_4x5", e[e.ALIGN_2x3 = 2] = "ALIGN_2x3", e[e.ALIGN_1x1 = 3] = "ALIGN_1x1", e[e.ALIGN_7x9 = 4] = "ALIGN_7x9", e))(Un || {}), Dn = /* @__PURE__ */ ((e) => (e[e.IMAGE_CHARACTERISTICS = 1] = "IMAGE_CHARACTERISTICS", e[e.HEAD_SIZE_AND_POSITIONS = 2] = "HEAD_SIZE_AND_POSITIONS", e[e.FACE_QUALITY = 3] = "FACE_QUALITY", e[e.EYES_CHARACTERISTICS = 4] = "EYES_CHARACTERISTICS", e[e.SHADOWS_AND_LIGHTNING = 5] = "SHADOWS_AND_LIGHTNING", e[e.POSE_AND_EXPRESSION = 6] = "POSE_AND_EXPRESSION", e[e.HEAD_OCCLUSION = 7] = "HEAD_OCCLUSION", e[e.BACKGROUND = 8] = "BACKGROUND", e))(Dn || {}), Bn = /* @__PURE__ */ ((e) => (e.IMAGE_CHARACTERISTICS = "ImageCharacteristics", e.HEAD_SIZE_AND_POSITIONS = "HeadSizeAndPosition", e.FACE_QUALITY = "FaceQuality", e.EYES_CHARACTERISTICS = "EyesCharacteristics", e.SHADOWS_AND_LIGHTNING = "ShadowsAndLightning", e.POSE_AND_EXPRESSION = "PoseAndExpression", e.HEAD_OCCLUSION = "HeadOcclusion", e.BACKGROUND = "Background", e))(Bn || {}), Hn = /* @__PURE__ */ ((e) => (e[e.QUALITY_STATUS_FALSE = 0] = "QUALITY_STATUS_FALSE", e[e.QUALITY_STATUS_TRUE = 1] = "QUALITY_STATUS_TRUE", e[e.QUALITY_STATUS_UNDETERMINED = 2] = "QUALITY_STATUS_UNDETERMINED", e))(Hn || {}), Gn = /* @__PURE__ */ ((e) => (e.IMAGE_WIDTH = "ImageWidth", e.IMAGE_HEIGHT = "ImageHeight", e.IMAGE_WIDTH_TO_HEIGHT = "ImageWidthToHeight", e.IMAGE_CHANNELS_NUMBER = "ImageChannelsNumber", e.PADDING_RATIO = "PaddingRatio", e.FACE_MID_POINT_HORIZONTAL_POSITION = "FaceMidPointHorizontalPosition", e.FACE_MID_POINT_VERTICAL_POSITION = "FaceMidPointVerticalPosition", e.HEAD_WIDTH_RATIO = "HeadWidthRatio", e.HEAD_HEIGHT_RATIO = "HeadHeightRatio", e.EYES_DISTANCE = "EyesDistance", e.YAW = "Yaw", e.PITCH = "Pitch", e.ROLL = "Roll", e.BLUR_LEVEL = "BlurLevel", e.NOISE_LEVEL = "NoiseLevel", e.EYE_RIGHT_CLOSED = "EyeRightClosed", e.EYE_LEFT_CLOSED = "EyeLeftClosed", e.EYE_RIGHT_OCCLUDED = "EyeRightOccluded", e.EYE_LEFT_OCCLUDED = "EyeLeftOccluded", e.EYES_RED = "EyesRed", e.EYE_RIGHT_COVERED_WITH_HAIR = "EyeRightCoveredWithHair", e.EYE_LEFT_COVERED_WITH_HAIR = "EyeLeftCoveredWithHair", e.OFF_GAZE = "OffGaze", e.FACE_DYNAMIC_RANGE = "FaceDynamicRange", e.UNNATURAL_SKIN_TONE = "UnnaturalSkinTone", e.TOO_DARK = "TooDark", e.TOO_LIGHT = "TooLight", e.FACE_GLARE = "FaceGlare", e.SHADOWS_ON_FACE = "ShadowsOnFace", e.DARK_GLASSES = "DarkGlasses", e.REFLECTION_ON_GLASSES = "ReflectionOnGlasses", e.FRAMES_TOO_HEAVY = "FramesTooHeavy", e.FACE_OCCLUDED = "FaceOccluded", e.HEAD_COVERING = "HeadCovering", e.BACKGROUND_UNIFORMITY = "BackgroundUniformity", e.SHADOWS_ON_BACKGROUND = "ShadowsOnBackground", e.OTHER_FACES = "OtherFaces", e.SHOULDERS_POSE = "ShouldersPose", e.EXPRESSION_LEVEL = "ExpressionLevel", e.MOUTH_OPEN = "MouthOpen", e.FOREHEAD_COVERING = "ForeheadCovering", e.SMILE = "Smile", e.STRONG_MAKEUP = "StrongMakeup", e.HEADPHONES = "Headphones", e.MEDICAL_MASK = "MedicalMask", e.BACKGROUND_COLOR_MATCH = "BackgroundColorMatch", e.ART_FACE = "ArtFace", e.CONTACT_LENSES = "ContactLenses", e))(Gn || {}), Mn = /* @__PURE__ */ ((e) => (e.OLD_MODE = "OldMode", e.QUALITY_FULL = "QualityFull", e.QUALITY_ICAO = "QualityICAO", e.QUALITY_VISA_SCHENGEN = "QualityVisaSchengen", e.QUALITY_VISA_USA = "QualityVisaUSA", e.CROP_CENTRAL_FACE = "CropCentralFace", e.CROP_ALL_FACES = "CropAllFaces", e.THUMBNAIL = "Thumbnail", e.ATTRIBUTES_ALL = "AttributesAll", e.EMPTY = "", e))(Mn || {}), vn = /* @__PURE__ */ ((e) => (e[e.FACER_OK = 0] = "FACER_OK", e[e.FR_IMAGE_EMPTY = 1] = "FR_IMAGE_EMPTY", e[e.FR_FACE_NOT_DETECTED = 2] = "FR_FACE_NOT_DETECTED", e[e.FR_LANDMARKS_NOT_DETECTED = 3] = "FR_LANDMARKS_NOT_DETECTED", e[e.FR_FACE_ALIGHNER_FAILED = 4] = "FR_FACE_ALIGHNER_FAILED", e[e.FR_DESCRIPTOR_EXTRACTOR_ERROR = 5] = "FR_DESCRIPTOR_EXTRACTOR_ERROR", e[e.FR_IMAGE_DECODE_ERROR = 6] = "FR_IMAGE_DECODE_ERROR", e[e.FR_INTERNAL_ERROR = 7] = "FR_INTERNAL_ERROR", e[e.FACER_CONFIG_ERROR = 199] = "FACER_CONFIG_ERROR", e[e.FACER_NO_LICENSE = 200] = "FACER_NO_LICENSE", e[e.FACER_IS_NOT_INITIALIZED = 201] = "FACER_IS_NOT_INITIALIZED", e[e.FACER_COMMAND_IS_NOT_SUPPORTED = 202] = "FACER_COMMAND_IS_NOT_SUPPORTED", e[e.FACER_COMMAND_PARAMS_READ_ERROR = 203] = "FACER_COMMAND_PARAMS_READ_ERROR", e[e.FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST = 224] = "FACER_LESS_THAN_TWO_IMAGES_IN_REQUEST", e[e.FACER_VIDEO_DECODE_ERROR = 227] = "FACER_VIDEO_DECODE_ERROR", e[e.FACER_NOT_ENOUGH_FRAMES = 228] = "FACER_NOT_ENOUGH_FRAMES", e[e.FACER_OUTPUT_IS_NOT_DEFINED = 229] = "FACER_OUTPUT_IS_NOT_DEFINED", e[e.FACER_CLOSED_EYES_DETECTED = 230] = "FACER_CLOSED_EYES_DETECTED", e[e.FACER_LOW_QUALITY = 231] = "FACER_LOW_QUALITY", e[e.FACER_HIGH_ASYMMETRY = 232] = "FACER_HIGH_ASYMMETRY", e[e.FACER_FACE_OVER_EMOTIONAL = 233] = "FACER_FACE_OVER_EMOTIONAL", e[e.FACER_SUNGLASSES_DETECTED = 234] = "FACER_SUNGLASSES_DETECTED", e[e.FACER_SMALL_AGE = 235] = "FACER_SMALL_AGE", e[e.FACER_HEADDRESS_DETECTED = 236] = "FACER_HEADDRESS_DETECTED", e[e.FACER_FACES_NOT_MATCHED = 237] = "FACER_FACES_NOT_MATCHED", e[e.FACER_IMAGES_COUNT_LIMIT_EXCEEDED = 238] = "FACER_IMAGES_COUNT_LIMIT_EXCEEDED", e[e.FACER_MEDICINE_MASK_DETECTED = 239] = "FACER_MEDICINE_MASK_DETECTED", e[e.FACER_OCCLUSION_DETECTED = 240] = "FACER_OCCLUSION_DETECTED", e[e.FACER_FOREHEAD_GLASSES_DETECTED = 242] = "FACER_FOREHEAD_GLASSES_DETECTED", e[e.FACER_MOUTH_OPENED = 243] = "FACER_MOUTH_OPENED", e[e.FACER_ART_MASK_DETECTED = 244] = "FACER_ART_MASK_DETECTED", e[e.FACER_ELECTRONIC_DEVICE_DETECTED = 245] = "FACER_ELECTRONIC_DEVICE_DETECTED", e[e.FACER_TRACK_BREAK = 246] = "FACER_TRACK_BREAK", e[e.FACER_WRONG_GEO = 247] = "FACER_WRONG_GEO", e[e.FACER_WRONG_OF = 248] = "FACER_WRONG_OF", e[e.FACER_WRONG_VIEW = 249] = "FACER_WRONG_VIEW", e[e.FACER_TIMEOUT_LIVENESS_TRANSACTION = 250] = "FACER_TIMEOUT_LIVENESS_TRANSACTION", e[e.FACER_FAILED_LIVENESS_TRANSACTION = 251] = "FACER_FAILED_LIVENESS_TRANSACTION", e[e.FACER_ABORTED_LIVENESS_TRANSACTION = 252] = "FACER_ABORTED_LIVENESS_TRANSACTION", e[e.FACER_GENERAL_ERROR = 253] = "FACER_GENERAL_ERROR", e[e.FACER_PASSIVE_LIVENESS_FAIL = 254] = "FACER_PASSIVE_LIVENESS_FAIL", e))(vn || {}), jn = /* @__PURE__ */ ((e) => (e.IN = "in", e.NOT_IN = "nin", e))(jn || {}), Mt = /* @__PURE__ */ ((e) => (e[e.DOCUMENT_PRINTED = 1] = "DOCUMENT_PRINTED", e[e.DOCUMENT_RFID = 2] = "DOCUMENT_RFID", e[e.LIVE = 3] = "LIVE", e[e.DOCUMENT_WITH_LIVE = 4] = "DOCUMENT_WITH_LIVE", e[e.EXTERNAL = 5] = "EXTERNAL", e[e.GHOST = 6] = "GHOST", e[e.BARCODE = 7] = "BARCODE", e))(Mt || {}), Fn = /* @__PURE__ */ ((e) => (e[e.ACTIVE = 0] = "ACTIVE", e[e.PASSIVE = 1] = "PASSIVE", e))(Fn || {}), ne = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", kn = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
2282
- for (var me = 0; me < ne.length; me++)
2283
- kn[ne.charCodeAt(me)] = me;
2284
- var be = function(e) {
2285
- var t = new Uint8Array(e), r, n = t.length, s = "";
2286
- for (r = 0; r < n; r += 3)
2287
- s += ne[t[r] >> 2], s += ne[(t[r] & 3) << 4 | t[r + 1] >> 4], s += ne[(t[r + 1] & 15) << 2 | t[r + 2] >> 6], s += ne[t[r + 2] & 63];
2288
- return n % 3 === 2 ? s = s.substring(0, s.length - 1) + "=" : n % 3 === 1 && (s = s.substring(0, s.length - 2) + "=="), s;
2289
- };
2290
- class qn {
2291
- constructor(t, r, n) {
2292
- this.superClass = new xn(t, r, n);
2293
- }
2294
- async match(t, r, n) {
2295
- for (const o of t.images)
2296
- o.type || (o.type = Mt.LIVE), typeof o.data != "string" && (o.data = be(o.data));
2297
- return (await this.superClass.match(t, r, n)).data;
2298
- }
2299
- async detect(t, r, n) {
2300
- return t.image && typeof t.image != "string" && (t.image = be(t.image)), (await this.superClass.detect(t, r, n)).data;
2301
- }
2302
- }
2303
- const zn = function(e) {
2304
- return {
2305
- /**
2306
- *
2307
- * @summary Create group
2308
- * @param {GroupToCreate} groupToCreate Request body for the group to create.
2309
- * @param {string} [xRequestID] Request header label.
2310
- * @param {*} [options] Override http request option.
2311
- * @throws {RequiredError}
2312
- */
2313
- createGroup: async (t, r, n = {}) => {
2314
- I("createGroup", "groupToCreate", t);
2315
- const s = "/api/groups", o = new URL(s, C);
2316
- let a;
2317
- e && (a = e.baseOptions);
2318
- const i = { method: "POST", ...a, ...n }, l = {}, c = {};
2319
- l["Content-Type"] = "application/json", r != null && (l["X-RequestID"] = String(r)), L(o, c);
2320
- let d = a && a.headers ? a.headers : {};
2321
- return i.headers = { ...l, ...d, ...n.headers }, i.data = F(t, i, e), {
2322
- url: g(o),
2323
- options: i
2324
- };
2325
- },
2326
- /**
2327
- *
2328
- * @summary Delete group
2329
- * @param {string} groupId Group ID.
2330
- * @param {string} [xRequestID] Request header label.
2331
- * @param {*} [options] Override http request option.
2332
- * @throws {RequiredError}
2333
- */
2334
- deleteGroup: async (t, r, n = {}) => {
2335
- I("deleteGroup", "groupId", t);
2336
- const s = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(t))), o = new URL(s, C);
2337
- let a;
2338
- e && (a = e.baseOptions);
2339
- const i = { method: "DELETE", ...a, ...n }, l = {}, c = {};
2340
- r != null && (l["X-RequestID"] = String(r)), L(o, c);
2341
- let d = a && a.headers ? a.headers : {};
2342
- return i.headers = { ...l, ...d, ...n.headers }, {
2343
- url: g(o),
2344
- options: i
2345
- };
2346
- },
2347
- /**
2348
- *
2349
- * @summary Get groups
2350
- * @param {string} [xRequestID] Request header label.
2351
- * @param {number} [page] The page number to get a list of persons or groups.
2352
- * @param {number} [size] The page size with a list of persons or groups, items.
2353
- * @param {*} [options] Override http request option.
2354
- * @throws {RequiredError}
2355
- */
2356
- getAllGroups: async (t, r, n, s = {}) => {
2357
- const o = "/api/groups", a = new URL(o, C);
2358
- let i;
2359
- e && (i = e.baseOptions);
2360
- const l = { method: "GET", ...i, ...s }, c = {}, d = {};
2361
- r !== void 0 && (d.page = r), n !== void 0 && (d.size = n), t != null && (c["X-RequestID"] = String(t)), L(a, d);
2362
- let p = i && i.headers ? i.headers : {};
2363
- return l.headers = { ...c, ...p, ...s.headers }, {
2364
- url: g(a),
2365
- options: l
2366
- };
2367
- },
2368
- /**
2369
- *
2370
- * @summary Get group persons
2371
- * @param {string} groupId Group ID.
2372
- * @param {string} [xRequestID] Request header label.
2373
- * @param {number} [page] The page number to get a list of persons or groups.
2374
- * @param {number} [size] The page size with a list of persons or groups, items.
2375
- * @param {*} [options] Override http request option.
2376
- * @throws {RequiredError}
2377
- */
2378
- getAllPersonsByGroupId: async (t, r, n, s, o = {}) => {
2379
- I("getAllPersonsByGroupId", "groupId", t);
2380
- const a = "/api/groups/{groupId}/persons".replace("{groupId}", encodeURIComponent(String(t))), i = new URL(a, C);
2381
- let l;
2382
- e && (l = e.baseOptions);
2383
- const c = { method: "GET", ...l, ...o }, d = {}, p = {};
2384
- n !== void 0 && (p.page = n), s !== void 0 && (p.size = s), r != null && (d["X-RequestID"] = String(r)), L(i, p);
2385
- let _ = l && l.headers ? l.headers : {};
2386
- return c.headers = { ...d, ..._, ...o.headers }, {
2387
- url: g(i),
2388
- options: c
2389
- };
2390
- },
2391
- /**
2392
- *
2393
- * @summary Get group
2394
- * @param {string} groupId Group ID.
2395
- * @param {string} [xRequestID] Request header label.
2396
- * @param {*} [options] Override http request option.
2397
- * @throws {RequiredError}
2398
- */
2399
- getGroup: async (t, r, n = {}) => {
2400
- I("getGroup", "groupId", t);
2401
- const s = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(t))), o = new URL(s, C);
2402
- let a;
2403
- e && (a = e.baseOptions);
2404
- const i = { method: "GET", ...a, ...n }, l = {}, c = {};
2405
- r != null && (l["X-RequestID"] = String(r)), L(o, c);
2406
- let d = a && a.headers ? a.headers : {};
2407
- return i.headers = { ...l, ...d, ...n.headers }, {
2408
- url: g(o),
2409
- options: i
2410
- };
2411
- },
2412
- /**
2413
- *
2414
- * @summary Update group
2415
- * @param {string} groupId Group ID.
2416
- * @param {GroupToCreate} groupToCreate Request body for the group to update.
2417
- * @param {string} [xRequestID] Request header label.
2418
- * @param {*} [options] Override http request option.
2419
- * @throws {RequiredError}
2420
- */
2421
- updateGroup: async (t, r, n, s = {}) => {
2422
- I("updateGroup", "groupId", t), I("updateGroup", "groupToCreate", r);
2423
- const o = "/api/groups/{groupId}".replace("{groupId}", encodeURIComponent(String(t))), a = new URL(o, C);
2424
- let i;
2425
- e && (i = e.baseOptions);
2426
- const l = { method: "PUT", ...i, ...s }, c = {}, d = {};
2427
- c["Content-Type"] = "application/json", n != null && (c["X-RequestID"] = String(n)), L(a, d);
2428
- let p = i && i.headers ? i.headers : {};
2429
- return l.headers = { ...c, ...p, ...s.headers }, l.data = F(r, l, e), {
2430
- url: g(a),
2431
- options: l
2432
- };
2433
- },
2434
- /**
2435
- *
2436
- * @summary Add/remove persons to group
2437
- * @param {string} groupId Group ID.
2438
- * @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
2439
- * @param {string} [xRequestID] Request header label.
2440
- * @param {*} [options] Override http request option.
2441
- * @throws {RequiredError}
2442
- */
2443
- updatePersonsInGroup: async (t, r, n, s = {}) => {
2444
- I("updatePersonsInGroup", "groupId", t), I("updatePersonsInGroup", "updateGroup", r);
2445
- const o = "/api/groups/{groupId}/persons".replace("{groupId}", encodeURIComponent(String(t))), a = new URL(o, C);
2446
- let i;
2447
- e && (i = e.baseOptions);
2448
- const l = { method: "PUT", ...i, ...s }, c = {}, d = {};
2449
- c["Content-Type"] = "application/json", n != null && (c["X-RequestID"] = String(n)), L(a, d);
2450
- let p = i && i.headers ? i.headers : {};
2451
- return l.headers = { ...c, ...p, ...s.headers }, l.data = F(r, l, e), {
2452
- url: g(a),
2453
- options: l
2454
- };
2455
- }
2456
- };
2457
- }, Z = function(e) {
2458
- const t = zn(e);
2459
- return {
2460
- /**
2461
- *
2462
- * @summary Create group
2463
- * @param {GroupToCreate} groupToCreate Request body for the group to create.
2464
- * @param {string} [xRequestID] Request header label.
2465
- * @param {*} [options] Override http request option.
2466
- * @throws {RequiredError}
2467
- */
2468
- async createGroup(r, n, s) {
2469
- const o = await t.createGroup(r, n, s), a = e?.serverIndex ?? 0, i = w["GroupApi.createGroup"]?.[a]?.url;
2470
- return (l, c) => N(o, O, y, e)(l, i || c);
2471
- },
2472
- /**
2473
- *
2474
- * @summary Delete group
2475
- * @param {string} groupId Group ID.
2476
- * @param {string} [xRequestID] Request header label.
2477
- * @param {*} [options] Override http request option.
2478
- * @throws {RequiredError}
2479
- */
2480
- async deleteGroup(r, n, s) {
2481
- const o = await t.deleteGroup(r, n, s), a = e?.serverIndex ?? 0, i = w["GroupApi.deleteGroup"]?.[a]?.url;
2482
- return (l, c) => N(o, O, y, e)(l, i || c);
2483
- },
2484
- /**
2485
- *
2486
- * @summary Get groups
2487
- * @param {string} [xRequestID] Request header label.
2488
- * @param {number} [page] The page number to get a list of persons or groups.
2489
- * @param {number} [size] The page size with a list of persons or groups, items.
2490
- * @param {*} [options] Override http request option.
2491
- * @throws {RequiredError}
2492
- */
2493
- async getAllGroups(r, n, s, o) {
2494
- const a = await t.getAllGroups(r, n, s, o), i = e?.serverIndex ?? 0, l = w["GroupApi.getAllGroups"]?.[i]?.url;
2495
- return (c, d) => N(a, O, y, e)(c, l || d);
2496
- },
2497
- /**
2498
- *
2499
- * @summary Get group persons
2500
- * @param {string} groupId Group ID.
2501
- * @param {string} [xRequestID] Request header label.
2502
- * @param {number} [page] The page number to get a list of persons or groups.
2503
- * @param {number} [size] The page size with a list of persons or groups, items.
2504
- * @param {*} [options] Override http request option.
2505
- * @throws {RequiredError}
2506
- */
2507
- async getAllPersonsByGroupId(r, n, s, o, a) {
2508
- const i = await t.getAllPersonsByGroupId(r, n, s, o, a), l = e?.serverIndex ?? 0, c = w["GroupApi.getAllPersonsByGroupId"]?.[l]?.url;
2509
- return (d, p) => N(i, O, y, e)(d, c || p);
2510
- },
2511
- /**
2512
- *
2513
- * @summary Get group
2514
- * @param {string} groupId Group ID.
2515
- * @param {string} [xRequestID] Request header label.
2516
- * @param {*} [options] Override http request option.
2517
- * @throws {RequiredError}
2518
- */
2519
- async getGroup(r, n, s) {
2520
- const o = await t.getGroup(r, n, s), a = e?.serverIndex ?? 0, i = w["GroupApi.getGroup"]?.[a]?.url;
2521
- return (l, c) => N(o, O, y, e)(l, i || c);
2522
- },
2523
- /**
2524
- *
2525
- * @summary Update group
2526
- * @param {string} groupId Group ID.
2527
- * @param {GroupToCreate} groupToCreate Request body for the group to update.
2528
- * @param {string} [xRequestID] Request header label.
2529
- * @param {*} [options] Override http request option.
2530
- * @throws {RequiredError}
2531
- */
2532
- async updateGroup(r, n, s, o) {
2533
- const a = await t.updateGroup(r, n, s, o), i = e?.serverIndex ?? 0, l = w["GroupApi.updateGroup"]?.[i]?.url;
2534
- return (c, d) => N(a, O, y, e)(c, l || d);
2535
- },
2536
- /**
2537
- *
2538
- * @summary Add/remove persons to group
2539
- * @param {string} groupId Group ID.
2540
- * @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
2541
- * @param {string} [xRequestID] Request header label.
2542
- * @param {*} [options] Override http request option.
2543
- * @throws {RequiredError}
2544
- */
2545
- async updatePersonsInGroup(r, n, s, o) {
2546
- const a = await t.updatePersonsInGroup(r, n, s, o), i = e?.serverIndex ?? 0, l = w["GroupApi.updatePersonsInGroup"]?.[i]?.url;
2547
- return (c, d) => N(a, O, y, e)(c, l || d);
2548
- }
2549
- };
2550
- };
2551
- let $n = class extends ae {
2552
- /**
2553
- *
2554
- * @summary Create group
2555
- * @param {GroupToCreate} groupToCreate Request body for the group to create.
2556
- * @param {string} [xRequestID] Request header label.
2557
- * @param {*} [options] Override http request option.
2558
- * @throws {RequiredError}
2559
- */
2560
- createGroup(t, r, n) {
2561
- return Z(this.configuration).createGroup(t, r, n).then((s) => s(this.axios, this.basePath));
2562
- }
2563
- /**
2564
- *
2565
- * @summary Delete group
2566
- * @param {string} groupId Group ID.
2567
- * @param {string} [xRequestID] Request header label.
2568
- * @param {*} [options] Override http request option.
2569
- * @throws {RequiredError}
2570
- */
2571
- deleteGroup(t, r, n) {
2572
- return Z(this.configuration).deleteGroup(t, r, n).then((s) => s(this.axios, this.basePath));
2573
- }
2574
- /**
2575
- *
2576
- * @summary Get groups
2577
- * @param {string} [xRequestID] Request header label.
2578
- * @param {number} [page] The page number to get a list of persons or groups.
2579
- * @param {number} [size] The page size with a list of persons or groups, items.
2580
- * @param {*} [options] Override http request option.
2581
- * @throws {RequiredError}
2582
- */
2583
- getAllGroups(t, r, n, s) {
2584
- return Z(this.configuration).getAllGroups(t, r, n, s).then((o) => o(this.axios, this.basePath));
2585
- }
2586
- /**
2587
- *
2588
- * @summary Get group persons
2589
- * @param {string} groupId Group ID.
2590
- * @param {string} [xRequestID] Request header label.
2591
- * @param {number} [page] The page number to get a list of persons or groups.
2592
- * @param {number} [size] The page size with a list of persons or groups, items.
2593
- * @param {*} [options] Override http request option.
2594
- * @throws {RequiredError}
2595
- */
2596
- getAllPersonsByGroupId(t, r, n, s, o) {
2597
- return Z(this.configuration).getAllPersonsByGroupId(t, r, n, s, o).then((a) => a(this.axios, this.basePath));
2598
- }
2599
- /**
2600
- *
2601
- * @summary Get group
2602
- * @param {string} groupId Group ID.
2603
- * @param {string} [xRequestID] Request header label.
2604
- * @param {*} [options] Override http request option.
2605
- * @throws {RequiredError}
2606
- */
2607
- getGroup(t, r, n) {
2608
- return Z(this.configuration).getGroup(t, r, n).then((s) => s(this.axios, this.basePath));
2609
- }
2610
- /**
2611
- *
2612
- * @summary Update group
2613
- * @param {string} groupId Group ID.
2614
- * @param {GroupToCreate} groupToCreate Request body for the group to update.
2615
- * @param {string} [xRequestID] Request header label.
2616
- * @param {*} [options] Override http request option.
2617
- * @throws {RequiredError}
2618
- */
2619
- updateGroup(t, r, n, s) {
2620
- return Z(this.configuration).updateGroup(t, r, n, s).then((o) => o(this.axios, this.basePath));
2621
- }
2622
- /**
2623
- *
2624
- * @summary Add/remove persons to group
2625
- * @param {string} groupId Group ID.
2626
- * @param {UpdateGroup} updateGroup Request body for person IDs to add or remove.
2627
- * @param {string} [xRequestID] Request header label.
2628
- * @param {*} [options] Override http request option.
2629
- * @throws {RequiredError}
2630
- */
2631
- updatePersonsInGroup(t, r, n, s) {
2632
- return Z(this.configuration).updatePersonsInGroup(t, r, n, s).then((o) => o(this.axios, this.basePath));
2633
- }
2634
- };
2635
- class Wn {
2636
- constructor(t, r, n) {
2637
- this.superClass = new $n(t, r, n);
2638
- }
2639
- async createGroup(t, r, n) {
2640
- const s = {
2641
- ...t,
2642
- metadata: t?.metadata ? t.metadata : {}
2643
- };
2644
- return (await this.superClass.createGroup(s, r, n)).data;
2645
- }
2646
- async deleteGroup(t, r, n) {
2647
- await this.superClass.deleteGroup(t, r, n);
2648
- }
2649
- async getAllGroups(t, r, n, s) {
2650
- return (await this.superClass.getAllGroups(n, t, r, s)).data;
2651
- }
2652
- async getAllPersonsByGroupId(t, r, n, s, o) {
2653
- return (await this.superClass.getAllPersonsByGroupId(n, s, t, r, o)).data;
2654
- }
2655
- async getGroup(t, r, n) {
2656
- return (await this.superClass.getGroup(t, r, n)).data;
2657
- }
2658
- async updateGroup(t, r, n, s) {
2659
- await this.superClass.updateGroup(t, r, n, s);
2660
- }
2661
- async updatePersonsInGroup(t, r, n, s) {
2662
- await this.superClass.updatePersonsInGroup(t, r, n, s);
2663
- }
2664
- }
2665
- const Xn = function(e) {
2666
- return {
2667
- /**
2668
- *
2669
- * @summary Add person image
2670
- * @param {string} personId Person ID.
2671
- * @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
2672
- * @param {string} [xRequestID] Request header label.
2673
- * @param {*} [options] Override http request option.
2674
- * @throws {RequiredError}
2675
- */
2676
- addImageToPerson: async (t, r, n, s = {}) => {
2677
- I("addImageToPerson", "personId", t), I("addImageToPerson", "addImageToPersonRequest", r);
2678
- const o = "/api/persons/{personId}/images".replace("{personId}", encodeURIComponent(String(t))), a = new URL(o, C);
2679
- let i;
2680
- e && (i = e.baseOptions);
2681
- const l = { method: "POST", ...i, ...s }, c = {}, d = {};
2682
- c["Content-Type"] = "application/json", n != null && (c["X-RequestID"] = String(n)), L(a, d);
2683
- let p = i && i.headers ? i.headers : {};
2684
- return l.headers = { ...c, ...p, ...s.headers }, l.data = F(r, l, e), {
2685
- url: g(a),
2686
- options: l
2687
- };
2688
- },
2689
- /**
2690
- *
2691
- * @summary Create person
2692
- * @param {PersonFields} personFields
2693
- * @param {string} [xRequestID] Request header label.
2694
- * @param {*} [options] Override http request option.
2695
- * @throws {RequiredError}
2696
- */
2697
- createPerson: async (t, r, n = {}) => {
2698
- I("createPerson", "personFields", t);
2699
- const s = "/api/persons", o = new URL(s, C);
2700
- let a;
2701
- e && (a = e.baseOptions);
2702
- const i = { method: "POST", ...a, ...n }, l = {}, c = {};
2703
- l["Content-Type"] = "application/json", r != null && (l["X-RequestID"] = String(r)), L(o, c);
2704
- let d = a && a.headers ? a.headers : {};
2705
- return i.headers = { ...l, ...d, ...n.headers }, i.data = F(t, i, e), {
2706
- url: g(o),
2707
- options: i
2708
- };
2709
- },
2710
- /**
2711
- *
2712
- * @summary Delete image of person
2713
- * @param {string} personId Person ID.
2714
- * @param {string} imageId Image ID.
2715
- * @param {string} [xRequestID] Request header label.
2716
- * @param {*} [options] Override http request option.
2717
- * @throws {RequiredError}
2718
- */
2719
- deleteImageOfPerson: async (t, r, n, s = {}) => {
2720
- I("deleteImageOfPerson", "personId", t), I("deleteImageOfPerson", "imageId", r);
2721
- const o = "/api/persons/{personId}/images/{imageId}".replace("{personId}", encodeURIComponent(String(t))).replace("{imageId}", encodeURIComponent(String(r))), a = new URL(o, C);
2722
- let i;
2723
- e && (i = e.baseOptions);
2724
- const l = { method: "DELETE", ...i, ...s }, c = {}, d = {};
2725
- n != null && (c["X-RequestID"] = String(n)), L(a, d);
2726
- let p = i && i.headers ? i.headers : {};
2727
- return l.headers = { ...c, ...p, ...s.headers }, {
2728
- url: g(a),
2729
- options: l
2730
- };
2731
- },
2732
- /**
2733
- *
2734
- * @summary Delete person
2735
- * @param {string} personId Person ID.
2736
- * @param {string} [xRequestID] Request header label.
2737
- * @param {*} [options] Override http request option.
2738
- * @throws {RequiredError}
2739
- */
2740
- deletePerson: async (t, r, n = {}) => {
2741
- I("deletePerson", "personId", t);
2742
- const s = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(t))), o = new URL(s, C);
2743
- let a;
2744
- e && (a = e.baseOptions);
2745
- const i = { method: "DELETE", ...a, ...n }, l = {}, c = {};
2746
- r != null && (l["X-RequestID"] = String(r)), L(o, c);
2747
- let d = a && a.headers ? a.headers : {};
2748
- return i.headers = { ...l, ...d, ...n.headers }, {
2749
- url: g(o),
2750
- options: i
2751
- };
2752
- },
2753
- /**
2754
- *
2755
- * @summary Get person groups
2756
- * @param {string} personId Person ID.
2757
- * @param {string} [xRequestID] Request header label.
2758
- * @param {number} [page] The page number to get a list of persons or groups.
2759
- * @param {number} [size] The page size with a list of persons or groups, items.
2760
- * @param {*} [options] Override http request option.
2761
- * @throws {RequiredError}
2762
- */
2763
- getAllGroupsByPersonId: async (t, r, n, s, o = {}) => {
2764
- I("getAllGroupsByPersonId", "personId", t);
2765
- const a = "/api/persons/{personId}/groups".replace("{personId}", encodeURIComponent(String(t))), i = new URL(a, C);
2766
- let l;
2767
- e && (l = e.baseOptions);
2768
- const c = { method: "GET", ...l, ...o }, d = {}, p = {};
2769
- n !== void 0 && (p.page = n), s !== void 0 && (p.size = s), r != null && (d["X-RequestID"] = String(r)), L(i, p);
2770
- let _ = l && l.headers ? l.headers : {};
2771
- return c.headers = { ...d, ..._, ...o.headers }, {
2772
- url: g(i),
2773
- options: c
2774
- };
2775
- },
2776
- /**
2777
- *
2778
- * @summary Get person images
2779
- * @param {string} personId Person ID.
2780
- * @param {string} [xRequestID] Request header label.
2781
- * @param {number} [page] The page number to get a list of persons or groups.
2782
- * @param {number} [size] The page size with a list of persons or groups, items.
2783
- * @param {*} [options] Override http request option.
2784
- * @throws {RequiredError}
2785
- */
2786
- getAllImagesByPersonId: async (t, r, n, s, o = {}) => {
2787
- I("getAllImagesByPersonId", "personId", t);
2788
- const a = "/api/persons/{personId}/images".replace("{personId}", encodeURIComponent(String(t))), i = new URL(a, C);
2789
- let l;
2790
- e && (l = e.baseOptions);
2791
- const c = { method: "GET", ...l, ...o }, d = {}, p = {};
2792
- n !== void 0 && (p.page = n), s !== void 0 && (p.size = s), r != null && (d["X-RequestID"] = String(r)), L(i, p);
2793
- let _ = l && l.headers ? l.headers : {};
2794
- return c.headers = { ...d, ..._, ...o.headers }, {
2795
- url: g(i),
2796
- options: c
2797
- };
2798
- },
2799
- /**
2800
- *
2801
- * @summary Get person image by id
2802
- * @param {string} personId Person ID.
2803
- * @param {string} imageId Image ID.
2804
- * @param {string} [xRequestID] Request header label.
2805
- * @param {*} [options] Override http request option.
2806
- * @throws {RequiredError}
2807
- */
2808
- getImageOfPerson: async (t, r, n, s = {}) => {
2809
- I("getImageOfPerson", "personId", t), I("getImageOfPerson", "imageId", r);
2810
- const o = "/api/persons/{personId}/images/{imageId}".replace("{personId}", encodeURIComponent(String(t))).replace("{imageId}", encodeURIComponent(String(r))), a = new URL(o, C);
2811
- let i;
2812
- e && (i = e.baseOptions);
2813
- const l = { method: "GET", ...i, ...s }, c = {}, d = {};
2814
- n != null && (c["X-RequestID"] = String(n)), L(a, d);
2815
- let p = i && i.headers ? i.headers : {};
2816
- return l.headers = { ...c, ...p, ...s.headers }, {
2817
- url: g(a),
2818
- options: l
2819
- };
2820
- },
2821
- /**
2822
- *
2823
- * @summary Get person
2824
- * @param {string} personId Person ID.
2825
- * @param {string} [xRequestID] Request header label.
2826
- * @param {*} [options] Override http request option.
2827
- * @throws {RequiredError}
2828
- */
2829
- getPerson: async (t, r, n = {}) => {
2830
- I("getPerson", "personId", t);
2831
- const s = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(t))), o = new URL(s, C);
2832
- let a;
2833
- e && (a = e.baseOptions);
2834
- const i = { method: "GET", ...a, ...n }, l = {}, c = {};
2835
- r != null && (l["X-RequestID"] = String(r)), L(o, c);
2836
- let d = a && a.headers ? a.headers : {};
2837
- return i.headers = { ...l, ...d, ...n.headers }, {
2838
- url: g(o),
2839
- options: i
2840
- };
2841
- },
2842
- /**
2843
- *
2844
- * @summary Update person
2845
- * @param {string} personId Person ID.
2846
- * @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
2847
- * @param {string} [xRequestID] Request header label.
2848
- * @param {*} [options] Override http request option.
2849
- * @throws {RequiredError}
2850
- */
2851
- updatePerson: async (t, r, n, s = {}) => {
2852
- I("updatePerson", "personId", t), I("updatePerson", "personToUpdateFields", r);
2853
- const o = "/api/persons/{personId}".replace("{personId}", encodeURIComponent(String(t))), a = new URL(o, C);
2854
- let i;
2855
- e && (i = e.baseOptions);
2856
- const l = { method: "PUT", ...i, ...s }, c = {}, d = {};
2857
- c["Content-Type"] = "application/json", n != null && (c["X-RequestID"] = String(n)), L(a, d);
2858
- let p = i && i.headers ? i.headers : {};
2859
- return l.headers = { ...c, ...p, ...s.headers }, l.data = F(r, l, e), {
2860
- url: g(a),
2861
- options: l
2862
- };
2863
- }
2864
- };
2865
- }, q = function(e) {
2866
- const t = Xn(e);
2867
- return {
2868
- /**
2869
- *
2870
- * @summary Add person image
2871
- * @param {string} personId Person ID.
2872
- * @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
2873
- * @param {string} [xRequestID] Request header label.
2874
- * @param {*} [options] Override http request option.
2875
- * @throws {RequiredError}
2876
- */
2877
- async addImageToPerson(r, n, s, o) {
2878
- const a = await t.addImageToPerson(r, n, s, o), i = e?.serverIndex ?? 0, l = w["PersonApi.addImageToPerson"]?.[i]?.url;
2879
- return (c, d) => N(a, O, y, e)(c, l || d);
2880
- },
2881
- /**
2882
- *
2883
- * @summary Create person
2884
- * @param {PersonFields} personFields
2885
- * @param {string} [xRequestID] Request header label.
2886
- * @param {*} [options] Override http request option.
2887
- * @throws {RequiredError}
2888
- */
2889
- async createPerson(r, n, s) {
2890
- const o = await t.createPerson(r, n, s), a = e?.serverIndex ?? 0, i = w["PersonApi.createPerson"]?.[a]?.url;
2891
- return (l, c) => N(o, O, y, e)(l, i || c);
2892
- },
2893
- /**
2894
- *
2895
- * @summary Delete image of person
2896
- * @param {string} personId Person ID.
2897
- * @param {string} imageId Image ID.
2898
- * @param {string} [xRequestID] Request header label.
2899
- * @param {*} [options] Override http request option.
2900
- * @throws {RequiredError}
2901
- */
2902
- async deleteImageOfPerson(r, n, s, o) {
2903
- const a = await t.deleteImageOfPerson(r, n, s, o), i = e?.serverIndex ?? 0, l = w["PersonApi.deleteImageOfPerson"]?.[i]?.url;
2904
- return (c, d) => N(a, O, y, e)(c, l || d);
2905
- },
2906
- /**
2907
- *
2908
- * @summary Delete person
2909
- * @param {string} personId Person ID.
2910
- * @param {string} [xRequestID] Request header label.
2911
- * @param {*} [options] Override http request option.
2912
- * @throws {RequiredError}
2913
- */
2914
- async deletePerson(r, n, s) {
2915
- const o = await t.deletePerson(r, n, s), a = e?.serverIndex ?? 0, i = w["PersonApi.deletePerson"]?.[a]?.url;
2916
- return (l, c) => N(o, O, y, e)(l, i || c);
2917
- },
2918
- /**
2919
- *
2920
- * @summary Get person groups
2921
- * @param {string} personId Person ID.
2922
- * @param {string} [xRequestID] Request header label.
2923
- * @param {number} [page] The page number to get a list of persons or groups.
2924
- * @param {number} [size] The page size with a list of persons or groups, items.
2925
- * @param {*} [options] Override http request option.
2926
- * @throws {RequiredError}
2927
- */
2928
- async getAllGroupsByPersonId(r, n, s, o, a) {
2929
- const i = await t.getAllGroupsByPersonId(r, n, s, o, a), l = e?.serverIndex ?? 0, c = w["PersonApi.getAllGroupsByPersonId"]?.[l]?.url;
2930
- return (d, p) => N(i, O, y, e)(d, c || p);
2931
- },
2932
- /**
2933
- *
2934
- * @summary Get person images
2935
- * @param {string} personId Person ID.
2936
- * @param {string} [xRequestID] Request header label.
2937
- * @param {number} [page] The page number to get a list of persons or groups.
2938
- * @param {number} [size] The page size with a list of persons or groups, items.
2939
- * @param {*} [options] Override http request option.
2940
- * @throws {RequiredError}
2941
- */
2942
- async getAllImagesByPersonId(r, n, s, o, a) {
2943
- const i = await t.getAllImagesByPersonId(r, n, s, o, a), l = e?.serverIndex ?? 0, c = w["PersonApi.getAllImagesByPersonId"]?.[l]?.url;
2944
- return (d, p) => N(i, O, y, e)(d, c || p);
2945
- },
2946
- /**
2947
- *
2948
- * @summary Get person image by id
2949
- * @param {string} personId Person ID.
2950
- * @param {string} imageId Image ID.
2951
- * @param {string} [xRequestID] Request header label.
2952
- * @param {*} [options] Override http request option.
2953
- * @throws {RequiredError}
2954
- */
2955
- async getImageOfPerson(r, n, s, o) {
2956
- const a = await t.getImageOfPerson(r, n, s, o), i = e?.serverIndex ?? 0, l = w["PersonApi.getImageOfPerson"]?.[i]?.url;
2957
- return (c, d) => N(a, O, y, e)(c, l || d);
2958
- },
2959
- /**
2960
- *
2961
- * @summary Get person
2962
- * @param {string} personId Person ID.
2963
- * @param {string} [xRequestID] Request header label.
2964
- * @param {*} [options] Override http request option.
2965
- * @throws {RequiredError}
2966
- */
2967
- async getPerson(r, n, s) {
2968
- const o = await t.getPerson(r, n, s), a = e?.serverIndex ?? 0, i = w["PersonApi.getPerson"]?.[a]?.url;
2969
- return (l, c) => N(o, O, y, e)(l, i || c);
2970
- },
2971
- /**
2972
- *
2973
- * @summary Update person
2974
- * @param {string} personId Person ID.
2975
- * @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
2976
- * @param {string} [xRequestID] Request header label.
2977
- * @param {*} [options] Override http request option.
2978
- * @throws {RequiredError}
2979
- */
2980
- async updatePerson(r, n, s, o) {
2981
- const a = await t.updatePerson(r, n, s, o), i = e?.serverIndex ?? 0, l = w["PersonApi.updatePerson"]?.[i]?.url;
2982
- return (c, d) => N(a, O, y, e)(c, l || d);
2983
- }
2984
- };
2985
- };
2986
- let Yn = class extends ae {
2987
- /**
2988
- *
2989
- * @summary Add person image
2990
- * @param {string} personId Person ID.
2991
- * @param {AddImageToPersonRequest} addImageToPersonRequest Image to add.
2992
- * @param {string} [xRequestID] Request header label.
2993
- * @param {*} [options] Override http request option.
2994
- * @throws {RequiredError}
2995
- */
2996
- addImageToPerson(t, r, n, s) {
2997
- return q(this.configuration).addImageToPerson(t, r, n, s).then((o) => o(this.axios, this.basePath));
2998
- }
2999
- /**
3000
- *
3001
- * @summary Create person
3002
- * @param {PersonFields} personFields
3003
- * @param {string} [xRequestID] Request header label.
3004
- * @param {*} [options] Override http request option.
3005
- * @throws {RequiredError}
3006
- */
3007
- createPerson(t, r, n) {
3008
- return q(this.configuration).createPerson(t, r, n).then((s) => s(this.axios, this.basePath));
3009
- }
3010
- /**
3011
- *
3012
- * @summary Delete image of person
3013
- * @param {string} personId Person ID.
3014
- * @param {string} imageId Image ID.
3015
- * @param {string} [xRequestID] Request header label.
3016
- * @param {*} [options] Override http request option.
3017
- * @throws {RequiredError}
3018
- */
3019
- deleteImageOfPerson(t, r, n, s) {
3020
- return q(this.configuration).deleteImageOfPerson(t, r, n, s).then((o) => o(this.axios, this.basePath));
3021
- }
3022
- /**
3023
- *
3024
- * @summary Delete person
3025
- * @param {string} personId Person ID.
3026
- * @param {string} [xRequestID] Request header label.
3027
- * @param {*} [options] Override http request option.
3028
- * @throws {RequiredError}
3029
- */
3030
- deletePerson(t, r, n) {
3031
- return q(this.configuration).deletePerson(t, r, n).then((s) => s(this.axios, this.basePath));
3032
- }
3033
- /**
3034
- *
3035
- * @summary Get person groups
3036
- * @param {string} personId Person ID.
3037
- * @param {string} [xRequestID] Request header label.
3038
- * @param {number} [page] The page number to get a list of persons or groups.
3039
- * @param {number} [size] The page size with a list of persons or groups, items.
3040
- * @param {*} [options] Override http request option.
3041
- * @throws {RequiredError}
3042
- */
3043
- getAllGroupsByPersonId(t, r, n, s, o) {
3044
- return q(this.configuration).getAllGroupsByPersonId(t, r, n, s, o).then((a) => a(this.axios, this.basePath));
3045
- }
3046
- /**
3047
- *
3048
- * @summary Get person images
3049
- * @param {string} personId Person ID.
3050
- * @param {string} [xRequestID] Request header label.
3051
- * @param {number} [page] The page number to get a list of persons or groups.
3052
- * @param {number} [size] The page size with a list of persons or groups, items.
3053
- * @param {*} [options] Override http request option.
3054
- * @throws {RequiredError}
3055
- */
3056
- getAllImagesByPersonId(t, r, n, s, o) {
3057
- return q(this.configuration).getAllImagesByPersonId(t, r, n, s, o).then((a) => a(this.axios, this.basePath));
3058
- }
3059
- /**
3060
- *
3061
- * @summary Get person image by id
3062
- * @param {string} personId Person ID.
3063
- * @param {string} imageId Image ID.
3064
- * @param {string} [xRequestID] Request header label.
3065
- * @param {*} [options] Override http request option.
3066
- * @throws {RequiredError}
3067
- */
3068
- getImageOfPerson(t, r, n, s) {
3069
- return q(this.configuration).getImageOfPerson(t, r, n, s).then((o) => o(this.axios, this.basePath));
3070
- }
3071
- /**
3072
- *
3073
- * @summary Get person
3074
- * @param {string} personId Person ID.
3075
- * @param {string} [xRequestID] Request header label.
3076
- * @param {*} [options] Override http request option.
3077
- * @throws {RequiredError}
3078
- */
3079
- getPerson(t, r, n) {
3080
- return q(this.configuration).getPerson(t, r, n).then((s) => s(this.axios, this.basePath));
3081
- }
3082
- /**
3083
- *
3084
- * @summary Update person
3085
- * @param {string} personId Person ID.
3086
- * @param {PersonToUpdateFields} personToUpdateFields Request body for the Person to update.
3087
- * @param {string} [xRequestID] Request header label.
3088
- * @param {*} [options] Override http request option.
3089
- * @throws {RequiredError}
3090
- */
3091
- updatePerson(t, r, n, s) {
3092
- return q(this.configuration).updatePerson(t, r, n, s).then((o) => o(this.axios, this.basePath));
3093
- }
3094
- };
3095
- class Jn {
3096
- constructor(t, r, n) {
3097
- this.superClass = new Yn(t, r, n);
3098
- }
3099
- async createPerson(t, r, n) {
3100
- const s = {
3101
- ...t,
3102
- metadata: t?.metadata ? t.metadata : {}
3103
- };
3104
- return (await this.superClass.createPerson(s, r, n)).data;
3105
- }
3106
- async addImageToPerson(t, r, n, s) {
3107
- return r?.image?.content && typeof r.image.content != "string" && (r.image.content = be(r.image.content)), (await this.superClass.addImageToPerson(t, r, n, s)).data;
3108
- }
3109
- async deleteImageOfPerson(t, r, n, s) {
3110
- await this.superClass.deleteImageOfPerson(r, t, n, s);
3111
- }
3112
- async deletePerson(t, r, n) {
3113
- await this.superClass.deletePerson(t, r, n);
3114
- }
3115
- async getAllGroupsByPersonId(t, r, n, s, o) {
3116
- return (await this.superClass.getAllGroupsByPersonId(n, s, t, r, o)).data;
3117
- }
3118
- async getAllImagesByPersonId(t, r, n, s, o) {
3119
- return (await this.superClass.getAllImagesByPersonId(n, s, t, r, o)).data;
3120
- }
3121
- async getImageOfPerson(t, r, n, s) {
3122
- return (await this.superClass.getImageOfPerson(r, t, n, s)).data;
3123
- }
3124
- async getPerson(t, r, n) {
3125
- return (await this.superClass.getPerson(t, r, n)).data;
3126
- }
3127
- async updatePerson(t, r, n, s) {
3128
- await this.superClass.updatePerson(t, r, n, s);
3129
- }
3130
- }
3131
- const Zn = function(e) {
3132
- return {
3133
- /**
3134
- *
3135
- * @summary Find person by image in groups
3136
- * @param {SearchRequest} searchRequest
3137
- * @param {string} [xRequestID] Request header label.
3138
- * @param {boolean} [withImages] When enabled, the response includes Base64-encoded images of matched persons. Each entry in the &#x60;persons&#x60; array contains an &#x60;images&#x60; field with image IDs and content. If omitted or set to false, images are excluded.
3139
- * @param {*} [options] Override http request option.
3140
- * @throws {RequiredError}
3141
- */
3142
- search: async (t, r, n, s = {}) => {
3143
- I("search", "searchRequest", t);
3144
- const o = "/api/search", a = new URL(o, C);
3145
- let i;
3146
- e && (i = e.baseOptions);
3147
- const l = { method: "POST", ...i, ...s }, c = {}, d = {};
3148
- n !== void 0 && (d.withImages = n), c["Content-Type"] = "application/json", r != null && (c["X-RequestID"] = String(r)), L(a, d);
3149
- let p = i && i.headers ? i.headers : {};
3150
- return l.headers = { ...c, ...p, ...s.headers }, l.data = F(t, l, e), {
3151
- url: g(a),
3152
- options: l
3153
- };
3154
- }
3155
- };
3156
- }, Kn = function(e) {
3157
- const t = Zn(e);
3158
- return {
3159
- /**
3160
- *
3161
- * @summary Find person by image in groups
3162
- * @param {SearchRequest} searchRequest
3163
- * @param {string} [xRequestID] Request header label.
3164
- * @param {boolean} [withImages] When enabled, the response includes Base64-encoded images of matched persons. Each entry in the &#x60;persons&#x60; array contains an &#x60;images&#x60; field with image IDs and content. If omitted or set to false, images are excluded.
3165
- * @param {*} [options] Override http request option.
3166
- * @throws {RequiredError}
3167
- */
3168
- async search(r, n, s, o) {
3169
- const a = await t.search(r, n, s, o), i = e?.serverIndex ?? 0, l = w["SearchApi.search"]?.[i]?.url;
3170
- return (c, d) => N(a, O, y, e)(c, l || d);
3171
- }
3172
- };
3173
- };
3174
- let Qn = class extends ae {
3175
- /**
3176
- *
3177
- * @summary Find person by image in groups
3178
- * @param {SearchRequest} searchRequest
3179
- * @param {string} [xRequestID] Request header label.
3180
- * @param {boolean} [withImages] When enabled, the response includes Base64-encoded images of matched persons. Each entry in the &#x60;persons&#x60; array contains an &#x60;images&#x60; field with image IDs and content. If omitted or set to false, images are excluded.
3181
- * @param {*} [options] Override http request option.
3182
- * @throws {RequiredError}
3183
- */
3184
- search(t, r, n, s) {
3185
- return Kn(this.configuration).search(t, r, n, s).then((o) => o(this.axios, this.basePath));
3186
- }
3187
- };
3188
- class es {
3189
- constructor(t, r, n) {
3190
- this.superClass = new Qn(t, r, n);
3191
- }
3192
- async search(t, r, n, s) {
3193
- return t?.image?.content && typeof t.image.content != "string" && (t.image.content = be(t.image.content)), (await this.superClass.search(t, r, n, s)).data;
3194
- }
3195
- }
3196
- const ts = function(e) {
3197
- return {
3198
- /**
3199
- * This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.
3200
- * @summary delete liveness transaction
3201
- * @param {string} transactionId ID of the current liveness transaction.
3202
- * @param {string} tag A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
3203
- * @param {*} [options] Override http request option.
3204
- * @throws {RequiredError}
3205
- */
3206
- deleteLivenessTransaction: async (t, r, n = {}) => {
3207
- I("deleteLivenessTransaction", "transactionId", t), I("deleteLivenessTransaction", "tag", r);
3208
- const s = "/api/v2/liveness", o = new URL(s, C);
3209
- let a;
3210
- e && (a = e.baseOptions);
3211
- const i = { method: "DELETE", ...a, ...n }, l = {}, c = {};
3212
- t !== void 0 && (c.transactionId = t), r !== void 0 && (c.tag = r), L(o, c);
3213
- let d = a && a.headers ? a.headers : {};
3214
- return i.headers = { ...l, ...d, ...n.headers }, {
3215
- url: g(o),
3216
- options: i
3217
- };
3218
- },
3219
- /**
3220
- * To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
3221
- * @summary liveness check
3222
- * @param {string} transactionId ID of the current liveness transaction.
3223
- * @param {*} [options] Override http request option.
3224
- * @throws {RequiredError}
3225
- */
3226
- getLivenessTransactionInfo: async (t, r = {}) => {
3227
- I("getLivenessTransactionInfo", "transactionId", t);
3228
- const n = "/api/v2/liveness", s = new URL(n, C);
3229
- let o;
3230
- e && (o = e.baseOptions);
3231
- const a = { method: "GET", ...o, ...r }, i = {}, l = {};
3232
- t !== void 0 && (l.transactionId = t), L(s, l);
3233
- let c = o && o.headers ? o.headers : {};
3234
- return a.headers = { ...i, ...c, ...r.headers }, {
3235
- url: g(s),
3236
- options: a
3237
- };
3238
- }
3239
- };
3240
- }, At = function(e) {
3241
- const t = ts(e);
3242
- return {
3243
- /**
3244
- * This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.
3245
- * @summary delete liveness transaction
3246
- * @param {string} transactionId ID of the current liveness transaction.
3247
- * @param {string} tag A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
3248
- * @param {*} [options] Override http request option.
3249
- * @throws {RequiredError}
3250
- */
3251
- async deleteLivenessTransaction(r, n, s) {
3252
- const o = await t.deleteLivenessTransaction(r, n, s), a = e?.serverIndex ?? 0, i = w["Liveness20Api.deleteLivenessTransaction"]?.[a]?.url;
3253
- return (l, c) => N(o, O, y, e)(l, i || c);
3254
- },
3255
- /**
3256
- * To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
3257
- * @summary liveness check
3258
- * @param {string} transactionId ID of the current liveness transaction.
3259
- * @param {*} [options] Override http request option.
3260
- * @throws {RequiredError}
3261
- */
3262
- async getLivenessTransactionInfo(r, n) {
3263
- const s = await t.getLivenessTransactionInfo(r, n), o = e?.serverIndex ?? 0, a = w["Liveness20Api.getLivenessTransactionInfo"]?.[o]?.url;
3264
- return (i, l) => N(s, O, y, e)(i, a || l);
3265
- }
3266
- };
3267
- };
3268
- let rs = class extends ae {
3269
- /**
3270
- * This endpoint deletes a liveness transaction based on either the specified `tag` or `transactionId`. At least one of the parameters must be provided for the operation to be valid.
3271
- * @summary delete liveness transaction
3272
- * @param {string} transactionId ID of the current liveness transaction.
3273
- * @param {string} tag A unique tag associated with a liveness transaction session. Used to identify and delete the corresponding transaction.
3274
- * @param {*} [options] Override http request option.
3275
- * @throws {RequiredError}
3276
- */
3277
- deleteLivenessTransaction(t, r, n) {
3278
- return At(this.configuration).deleteLivenessTransaction(t, r, n).then((s) => s(this.axios, this.basePath));
3279
- }
3280
- /**
3281
- * To verify the presence of a real person in front of a camera, use the GET `/api/v2/liveness` endpoint. When starting, you can specify `tag` which all attempts to read liveness will be bound to. If left unspecified, the application automatically generates one. The calling application returns `tag` and `transactionId`. One session may include many transactions, and from a transaction ID it is clear which session it belongs to. When specifying `tag`, note that only Latin uppercase and lowercase letters, digits, and symbols `-` and `_` are allowed. The maximum supported number of characters is 127. The metadata (device model, screen data, frame size, app ID and version, OS version, platform, SDK version, etc.), a person\'s selfie and video of the liveness detection session are stored on the backend at: `faceapi-session/year={year}/month={month}/day={day}/hour={hour}/minute={minute}/{tag}/transactionId` By default, liveness checks operate with eventual consistency. This means that when you submit a request and receive a response, the associated data (like the selfie and session video) may be saved after the response is sent. If this doesn\'t meet your requirements, you can switch to strong consistency; refer to the [Architecture page](https://docs.regulaforensics.com/develop/face-sdk/overview/architecture/#consistency-models) for details. To access the liveness transaction data, use GET `/api/v2/liveness?transactionId={transactionId}`.
3282
- * @summary liveness check
3283
- * @param {string} transactionId ID of the current liveness transaction.
3284
- * @param {*} [options] Override http request option.
3285
- * @throws {RequiredError}
3286
- */
3287
- getLivenessTransactionInfo(t, r) {
3288
- return At(this.configuration).getLivenessTransactionInfo(t, r).then((n) => n(this.axios, this.basePath));
3289
- }
3290
- };
3291
- class ns {
3292
- constructor(t, r, n) {
3293
- this.superClass = new rs(t, r, n);
3294
- }
3295
- async getLivenessTransactionInfo(t, r) {
3296
- return (await this.superClass.getLivenessTransactionInfo(t, r)).data;
3297
- }
3298
- }
3299
- const ss = function(e) {
3300
- return {
3301
- /**
3302
- * The `/api/healthz` endpoint performs a server health check, providing details such as the application name, license ID, serial number, validity, and product version. <br><br>Comprehensive information about service diagnostics is available on the [Monitoring page](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/monitoring/).
3303
- * @summary Server healthcheck
3304
- * @param {string} [xRequestID] Request header label.
3305
- * @param {*} [options] Override http request option.
3306
- * @throws {RequiredError}
3307
- */
3308
- healthz: async (t, r = {}) => {
3309
- const n = "/api/healthz", s = new URL(n, C);
3310
- let o;
3311
- e && (o = e.baseOptions);
3312
- const a = { method: "GET", ...o, ...r }, i = {}, l = {};
3313
- t != null && (i["X-RequestID"] = String(t)), L(s, l);
3314
- let c = o && o.headers ? o.headers : {};
3315
- return a.headers = { ...i, ...c, ...r.headers }, {
3316
- url: g(s),
3317
- options: a
3318
- };
3319
- },
3320
- /**
3321
- * The `/api/readyz` endpoint checks the license\'s health to determine if the application is ready for operation. It validates the license and returns a response indicating whether the license is valid (`200`) or invalid (`400`).
3322
- * @summary License healthcheck
3323
- * @param {string} [xRequestID] Request header label.
3324
- * @param {*} [options] Override http request option.
3325
- * @throws {RequiredError}
3326
- */
3327
- readyz: async (t, r = {}) => {
3328
- const n = "/api/readyz", s = new URL(n, C);
3329
- let o;
3330
- e && (o = e.baseOptions);
3331
- const a = { method: "GET", ...o, ...r }, i = {}, l = {};
3332
- t != null && (i["X-RequestID"] = String(t)), L(s, l);
3333
- let c = o && o.headers ? o.headers : {};
3334
- return a.headers = { ...i, ...c, ...r.headers }, {
3335
- url: g(s),
3336
- options: a
3337
- };
3338
- }
3339
- };
3340
- }, Ot = function(e) {
3341
- const t = ss(e);
3342
- return {
3343
- /**
3344
- * The `/api/healthz` endpoint performs a server health check, providing details such as the application name, license ID, serial number, validity, and product version. <br><br>Comprehensive information about service diagnostics is available on the [Monitoring page](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/monitoring/).
3345
- * @summary Server healthcheck
3346
- * @param {string} [xRequestID] Request header label.
3347
- * @param {*} [options] Override http request option.
3348
- * @throws {RequiredError}
3349
- */
3350
- async healthz(r, n) {
3351
- const s = await t.healthz(r, n), o = e?.serverIndex ?? 0, a = w["HealthcheckApi.healthz"]?.[o]?.url;
3352
- return (i, l) => N(s, O, y, e)(i, a || l);
3353
- },
3354
- /**
3355
- * The `/api/readyz` endpoint checks the license\'s health to determine if the application is ready for operation. It validates the license and returns a response indicating whether the license is valid (`200`) or invalid (`400`).
3356
- * @summary License healthcheck
3357
- * @param {string} [xRequestID] Request header label.
3358
- * @param {*} [options] Override http request option.
3359
- * @throws {RequiredError}
3360
- */
3361
- async readyz(r, n) {
3362
- const s = await t.readyz(r, n), o = e?.serverIndex ?? 0, a = w["HealthcheckApi.readyz"]?.[o]?.url;
3363
- return (i, l) => N(s, O, y, e)(i, a || l);
3364
- }
3365
- };
3366
- };
3367
- let os = class extends ae {
3368
- /**
3369
- * The `/api/healthz` endpoint performs a server health check, providing details such as the application name, license ID, serial number, validity, and product version. <br><br>Comprehensive information about service diagnostics is available on the [Monitoring page](https://docs.regulaforensics.com/develop/face-sdk/web-service/administration/monitoring/).
3370
- * @summary Server healthcheck
3371
- * @param {string} [xRequestID] Request header label.
3372
- * @param {*} [options] Override http request option.
3373
- * @throws {RequiredError}
3374
- */
3375
- healthz(t, r) {
3376
- return Ot(this.configuration).healthz(t, r).then((n) => n(this.axios, this.basePath));
3377
- }
3378
- /**
3379
- * The `/api/readyz` endpoint checks the license\'s health to determine if the application is ready for operation. It validates the license and returns a response indicating whether the license is valid (`200`) or invalid (`400`).
3380
- * @summary License healthcheck
3381
- * @param {string} [xRequestID] Request header label.
3382
- * @param {*} [options] Override http request option.
3383
- * @throws {RequiredError}
3384
- */
3385
- readyz(t, r) {
3386
- return Ot(this.configuration).readyz(t, r).then((n) => n(this.axios, this.basePath));
3387
- }
3388
- };
3389
- class as {
3390
- constructor(t, r, n) {
3391
- this.superClass = new os(t, r, n);
3392
- }
3393
- async healthz(t, r) {
3394
- return (await this.superClass.healthz(t, r)).data;
3395
- }
3396
- async readyz(t, r) {
3397
- return (await this.superClass.readyz(t, r)).data;
3398
- }
3399
- }
3400
- class Vs {
3401
- constructor(t, r = y, n = O) {
3402
- this.basePath = r, this.axios = n, this.matchApi = new qn(t, r, n), this.groupApi = new Wn(t, r, n), this.personApi = new Jn(t, r, n), this.searchApi = new es(t, r, n), this.livenessApi = new ns(t, r, n), this.healthcheckApi = new as(t, r, n);
3403
- }
3404
- }
3405
- class Us {
3406
- constructor(t = {}) {
3407
- this.apiKey = t.apiKey, this.username = t.username, this.password = t.password, this.accessToken = t.accessToken, this.basePath = t.basePath, this.serverIndex = t.serverIndex, this.baseOptions = {
3408
- ...t.baseOptions,
3409
- headers: {
3410
- ...t.baseOptions?.headers
3411
- }
3412
- }, this.formDataCtor = t.formDataCtor;
3413
- }
3414
- /**
3415
- * Check if the given MIME is a JSON MIME.
3416
- * JSON MIME examples:
3417
- * application/json
3418
- * application/json; charset=UTF8
3419
- * APPLICATION/JSON
3420
- * application/vnd.company+json
3421
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
3422
- * @return True if the given MIME is JSON, false otherwise.
3423
- */
3424
- isJsonMime(t) {
3425
- const r = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
3426
- return t !== null && (r.test(t) || t.toLowerCase() === "application/json-patch+json");
3427
- }
3428
- }
3429
- export {
3430
- Us as Configuration,
3431
- Vn as FaceAttribute,
3432
- Un as FaceImageQualityAlignType,
3433
- Dn as FaceImageQualityGroups,
3434
- Bn as FaceImageQualityGroupsStrings,
3435
- Hn as FaceImageQualityStatus,
3436
- Gn as FaceQualityConfigName,
3437
- Mn as FaceQualityScenarios,
3438
- vn as FaceSDKResultCode,
3439
- Vs as FaceSdk,
3440
- jn as FilterOp,
3441
- Wn as GroupApi,
3442
- as as HealthcheckApi,
3443
- Mt as ImageSource,
3444
- ns as Liveness20Api,
3445
- Fn as LivenessType,
3446
- qn as MatchApi,
3447
- Jn as PersonApi,
3448
- es as SearchApi
3449
- };