@webitel/chat-web-sdk 0.0.13 → 0.0.14
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.d.ts +10 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +629 -604
- package/dist/index.js.map +1 -1
- package/dist/modules/account/accountService.d.ts +5 -0
- package/dist/modules/account/accountService.d.ts.map +1 -0
- package/dist/modules/account/accountSevice.d.ts +1 -1
- package/dist/modules/account/accountSevice.d.ts.map +1 -1
- package/dist/modules/account/index.d.ts +1 -1
- package/dist/modules/account/index.d.ts.map +1 -1
- package/dist/modules/configs/serviceConfig/ServiceConfig.class.d.ts +3 -3
- package/dist/modules/configs/serviceConfig/ServiceConfig.class.d.ts.map +1 -1
- package/dist/modules/configs/socketConfig/SocketConfig.class.d.ts +4 -4
- package/dist/modules/configs/socketConfig/SocketConfig.class.d.ts.map +1 -1
- package/dist/modules/contacts/api/Contacts.api.d.ts +4 -2
- package/dist/modules/contacts/api/Contacts.api.d.ts.map +1 -1
- package/dist/modules/contacts/classes/Contact.class.d.ts.map +1 -1
- package/dist/modules/contacts/contactsService.d.ts +6 -0
- package/dist/modules/contacts/contactsService.d.ts.map +1 -0
- package/dist/modules/contacts/contactsSevice.d.ts +1 -1
- package/dist/modules/contacts/contactsSevice.d.ts.map +1 -1
- package/dist/modules/contacts/index.d.ts +1 -1
- package/dist/modules/contacts/index.d.ts.map +1 -1
- package/dist/modules/contacts/types/Contact.types.d.ts +9 -2
- package/dist/modules/contacts/types/Contact.types.d.ts.map +1 -1
- package/dist/modules/contacts/utils/fetchContacts.d.ts +2 -3
- package/dist/modules/contacts/utils/fetchContacts.d.ts.map +1 -1
- package/dist/modules/messages/api/Messages.api.d.ts +5 -3
- package/dist/modules/messages/api/Messages.api.d.ts.map +1 -1
- package/dist/modules/messages/classes/Message.class.d.ts.map +1 -1
- package/dist/modules/messages/index.d.ts +2 -2
- package/dist/modules/messages/index.d.ts.map +1 -1
- package/dist/modules/messages/messagesService.d.ts +10 -0
- package/dist/modules/messages/messagesService.d.ts.map +1 -0
- package/dist/modules/messages/messagesSevice.d.ts +2 -3
- package/dist/modules/messages/messagesSevice.d.ts.map +1 -1
- package/dist/modules/messages/types/Message.types.d.ts +4 -1
- package/dist/modules/messages/types/Message.types.d.ts.map +1 -1
- package/dist/modules/messages/utils/fetchMessageHistory.d.ts +2 -3
- package/dist/modules/messages/utils/fetchMessageHistory.d.ts.map +1 -1
- package/dist/modules/messages/utils/routeMessageSend.d.ts +5 -0
- package/dist/modules/messages/utils/routeMessageSend.d.ts.map +1 -0
- package/dist/modules/socket/classes/ChatsSocketClient.d.ts +37 -0
- package/dist/modules/socket/classes/ChatsSocketClient.d.ts.map +1 -0
- package/dist/modules/socket/index.d.ts +1 -1
- package/dist/modules/socket/index.d.ts.map +1 -1
- package/dist/modules/socket/utils/processSocketEventPayload.d.ts.map +1 -1
- package/dist/modules/threads/api/Threads.api.d.ts +6 -4
- package/dist/modules/threads/api/Threads.api.d.ts.map +1 -1
- package/dist/modules/threads/classes/Thread.class.d.ts.map +1 -1
- package/dist/modules/threads/index.d.ts +2 -2
- package/dist/modules/threads/index.d.ts.map +1 -1
- package/dist/modules/threads/modules/members/api/ThreadMembers.api.d.ts +6 -15
- package/dist/modules/threads/modules/members/api/ThreadMembers.api.d.ts.map +1 -1
- package/dist/modules/threads/modules/members/classes/ThreadMember.class.d.ts +3 -3
- package/dist/modules/threads/modules/members/classes/ThreadMember.class.d.ts.map +1 -1
- package/dist/modules/threads/modules/members/index.d.ts +1 -1
- package/dist/modules/threads/modules/members/index.d.ts.map +1 -1
- package/dist/modules/threads/threadsService.d.ts +11 -0
- package/dist/modules/threads/threadsService.d.ts.map +1 -0
- package/dist/modules/threads/threadsSevice.d.ts +1 -1
- package/dist/modules/threads/threadsSevice.d.ts.map +1 -1
- package/dist/modules/threads/types/Thread.types.d.ts +6 -6
- package/dist/modules/threads/types/Thread.types.d.ts.map +1 -1
- package/dist/modules/threads/utils/fetchThreads.d.ts +2 -7
- package/dist/modules/threads/utils/fetchThreads.d.ts.map +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts +1 -1
- package/dist/modules/ui/components/WtChatMessageBubble.vue.d.ts.map +1 -1
- package/package.json +11 -3
package/dist/index.js
CHANGED
|
@@ -333,7 +333,7 @@ function oe() {
|
|
|
333
333
|
//#region src/modules/account/api/Account.api.ts
|
|
334
334
|
var se = ({ axiosInstance: e }) => ({ getAccount: async () => r((await e.get("/v1/auth/token")).data, [A()]) }), ce = async (e) => se(e).getAccount();
|
|
335
335
|
//#endregion
|
|
336
|
-
//#region src/modules/account/
|
|
336
|
+
//#region src/modules/account/accountService.ts
|
|
337
337
|
function le(e) {
|
|
338
338
|
return { getAccount: () => ce(e) };
|
|
339
339
|
}
|
|
@@ -346,71 +346,71 @@ function ue(e, t) {
|
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region node_modules/axios/lib/utils.js
|
|
349
|
-
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator: pe, toStringTag: me } = Symbol,
|
|
349
|
+
var { toString: de } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator: pe, toStringTag: me } = Symbol, j = ((e) => (t) => {
|
|
350
350
|
let n = de.call(t);
|
|
351
351
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
352
|
-
})(Object.create(null)),
|
|
353
|
-
function
|
|
354
|
-
return e !== null && !
|
|
352
|
+
})(Object.create(null)), M = (e) => (e = e.toLowerCase(), (t) => j(t) === e), he = (e) => (t) => typeof t === e, { isArray: N } = Array, P = he("undefined");
|
|
353
|
+
function F(e) {
|
|
354
|
+
return e !== null && !P(e) && e.constructor !== null && !P(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
355
355
|
}
|
|
356
|
-
var
|
|
357
|
-
function
|
|
356
|
+
var ge = M("ArrayBuffer");
|
|
357
|
+
function _e(e) {
|
|
358
358
|
let t;
|
|
359
|
-
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer &&
|
|
359
|
+
return t = typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && ge(e.buffer), t;
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
361
|
+
var ve = he("string"), I = he("function"), ye = he("number"), L = (e) => typeof e == "object" && !!e, be = (e) => e === !0 || e === !1, xe = (e) => {
|
|
362
|
+
if (j(e) !== "object") return !1;
|
|
363
363
|
let t = fe(e);
|
|
364
364
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(me in e) && !(pe in e);
|
|
365
|
-
},
|
|
366
|
-
if (!
|
|
365
|
+
}, Se = (e) => {
|
|
366
|
+
if (!L(e) || F(e)) return !1;
|
|
367
367
|
try {
|
|
368
368
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
369
369
|
} catch {
|
|
370
370
|
return !1;
|
|
371
371
|
}
|
|
372
|
-
},
|
|
373
|
-
function
|
|
372
|
+
}, Ce = M("Date"), we = M("File"), Te = (e) => !!(e && e.uri !== void 0), Ee = (e) => e && e.getParts !== void 0, De = M("Blob"), Oe = M("FileList"), ke = (e) => L(e) && I(e.pipe);
|
|
373
|
+
function Ae() {
|
|
374
374
|
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
375
375
|
}
|
|
376
|
-
var
|
|
376
|
+
var je = Ae(), Me = je.FormData === void 0 ? void 0 : je.FormData, Ne = (e) => {
|
|
377
377
|
let t;
|
|
378
|
-
return e && (
|
|
379
|
-
},
|
|
378
|
+
return e && (Me && e instanceof Me || I(e.append) && ((t = j(e)) === "formdata" || t === "object" && I(e.toString) && e.toString() === "[object FormData]"));
|
|
379
|
+
}, Pe = M("URLSearchParams"), [Fe, Ie, Le, Re] = [
|
|
380
380
|
"ReadableStream",
|
|
381
381
|
"Request",
|
|
382
382
|
"Response",
|
|
383
383
|
"Headers"
|
|
384
|
-
].map(
|
|
385
|
-
function
|
|
384
|
+
].map(M), ze = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
385
|
+
function R(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
386
386
|
if (e == null) return;
|
|
387
387
|
let r, i;
|
|
388
|
-
if (typeof e != "object" && (e = [e]),
|
|
388
|
+
if (typeof e != "object" && (e = [e]), N(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e);
|
|
389
389
|
else {
|
|
390
|
-
if (
|
|
390
|
+
if (F(e)) return;
|
|
391
391
|
let i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = i.length, o;
|
|
392
392
|
for (r = 0; r < a; r++) o = i[r], t.call(null, e[o], o, e);
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (
|
|
395
|
+
function Be(e, t) {
|
|
396
|
+
if (F(e)) return null;
|
|
397
397
|
t = t.toLowerCase();
|
|
398
398
|
let n = Object.keys(e), r = n.length, i;
|
|
399
399
|
for (; r-- > 0;) if (i = n[r], t === i.toLowerCase()) return i;
|
|
400
400
|
return null;
|
|
401
401
|
}
|
|
402
|
-
var
|
|
403
|
-
function
|
|
404
|
-
let { caseless: e, skipUndefined: t } =
|
|
402
|
+
var z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ve = (e) => !P(e) && e !== z;
|
|
403
|
+
function He() {
|
|
404
|
+
let { caseless: e, skipUndefined: t } = Ve(this) && this || {}, n = {}, r = (r, i) => {
|
|
405
405
|
if (i === "__proto__" || i === "constructor" || i === "prototype") return;
|
|
406
|
-
let a = e &&
|
|
407
|
-
|
|
406
|
+
let a = e && Be(n, i) || i;
|
|
407
|
+
xe(n[a]) && xe(r) ? n[a] = He(n[a], r) : xe(r) ? n[a] = He({}, r) : N(r) ? n[a] = r.slice() : (!t || !P(r)) && (n[a] = r);
|
|
408
408
|
};
|
|
409
|
-
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] &&
|
|
409
|
+
for (let e = 0, t = arguments.length; e < t; e++) arguments[e] && R(arguments[e], r);
|
|
410
410
|
return n;
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
n &&
|
|
412
|
+
var Ue = (e, t, n, { allOwnKeys: r } = {}) => (R(t, (t, r) => {
|
|
413
|
+
n && I(t) ? Object.defineProperty(e, r, {
|
|
414
414
|
value: ue(t, n),
|
|
415
415
|
writable: !0,
|
|
416
416
|
enumerable: !0,
|
|
@@ -421,14 +421,14 @@ var We = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (t, r) => {
|
|
|
421
421
|
enumerable: !0,
|
|
422
422
|
configurable: !0
|
|
423
423
|
});
|
|
424
|
-
}, { allOwnKeys: r }), e),
|
|
424
|
+
}, { allOwnKeys: r }), e), We = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ge = (e, t, n, r) => {
|
|
425
425
|
e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
|
|
426
426
|
value: e,
|
|
427
427
|
writable: !0,
|
|
428
428
|
enumerable: !1,
|
|
429
429
|
configurable: !0
|
|
430
430
|
}), Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n);
|
|
431
|
-
},
|
|
431
|
+
}, Ke = (e, t, n, r) => {
|
|
432
432
|
let i, a, o, s = {};
|
|
433
433
|
if (t ||= {}, e == null) return t;
|
|
434
434
|
do {
|
|
@@ -436,45 +436,45 @@ var We = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (t, r) => {
|
|
|
436
436
|
e = n !== !1 && fe(e);
|
|
437
437
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
438
438
|
return t;
|
|
439
|
-
},
|
|
439
|
+
}, qe = (e, t, n) => {
|
|
440
440
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
441
441
|
let r = e.indexOf(t, n);
|
|
442
442
|
return r !== -1 && r === n;
|
|
443
|
-
},
|
|
443
|
+
}, Je = (e) => {
|
|
444
444
|
if (!e) return null;
|
|
445
|
-
if (
|
|
445
|
+
if (N(e)) return e;
|
|
446
446
|
let t = e.length;
|
|
447
|
-
if (!
|
|
447
|
+
if (!ye(t)) return null;
|
|
448
448
|
let n = Array(t);
|
|
449
449
|
for (; t-- > 0;) n[t] = e[t];
|
|
450
450
|
return n;
|
|
451
|
-
},
|
|
451
|
+
}, Ye = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && fe(Uint8Array)), Xe = (e, t) => {
|
|
452
452
|
let n = (e && e[pe]).call(e), r;
|
|
453
453
|
for (; (r = n.next()) && !r.done;) {
|
|
454
454
|
let n = r.value;
|
|
455
455
|
t.call(e, n[0], n[1]);
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Ze = (e, t) => {
|
|
458
458
|
let n, r = [];
|
|
459
459
|
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
460
460
|
return r;
|
|
461
|
-
},
|
|
461
|
+
}, Qe = M("HTMLFormElement"), $e = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(e, t, n) {
|
|
462
462
|
return t.toUpperCase() + n;
|
|
463
|
-
}),
|
|
463
|
+
}), et = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), tt = M("RegExp"), nt = (e, t) => {
|
|
464
464
|
let n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
465
|
-
|
|
465
|
+
R(n, (n, i) => {
|
|
466
466
|
let a;
|
|
467
467
|
(a = t(n, i, e)) !== !1 && (r[i] = a || n);
|
|
468
468
|
}), Object.defineProperties(e, r);
|
|
469
|
-
},
|
|
470
|
-
|
|
471
|
-
if (
|
|
469
|
+
}, rt = (e) => {
|
|
470
|
+
nt(e, (t, n) => {
|
|
471
|
+
if (I(e) && [
|
|
472
472
|
"arguments",
|
|
473
473
|
"caller",
|
|
474
474
|
"callee"
|
|
475
475
|
].indexOf(n) !== -1) return !1;
|
|
476
476
|
let r = e[n];
|
|
477
|
-
if (
|
|
477
|
+
if (I(r)) {
|
|
478
478
|
if (t.enumerable = !1, "writable" in t) {
|
|
479
479
|
t.writable = !1;
|
|
480
480
|
return;
|
|
@@ -484,99 +484,99 @@ var We = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (t, r) => {
|
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
|
-
},
|
|
487
|
+
}, it = (e, t) => {
|
|
488
488
|
let n = {}, r = (e) => {
|
|
489
489
|
e.forEach((e) => {
|
|
490
490
|
n[e] = !0;
|
|
491
491
|
});
|
|
492
492
|
};
|
|
493
|
-
return
|
|
494
|
-
},
|
|
495
|
-
function
|
|
496
|
-
return !!(e &&
|
|
493
|
+
return N(e) ? r(e) : r(String(e).split(t)), n;
|
|
494
|
+
}, at = () => {}, ot = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
495
|
+
function st(e) {
|
|
496
|
+
return !!(e && I(e.append) && e[me] === "FormData" && e[pe]);
|
|
497
497
|
}
|
|
498
|
-
var
|
|
498
|
+
var ct = (e) => {
|
|
499
499
|
let t = Array(10), n = (e, r) => {
|
|
500
|
-
if (
|
|
500
|
+
if (L(e)) {
|
|
501
501
|
if (t.indexOf(e) >= 0) return;
|
|
502
|
-
if (
|
|
502
|
+
if (F(e)) return e;
|
|
503
503
|
if (!("toJSON" in e)) {
|
|
504
504
|
t[r] = e;
|
|
505
|
-
let i =
|
|
506
|
-
return
|
|
505
|
+
let i = N(e) ? [] : {};
|
|
506
|
+
return R(e, (e, t) => {
|
|
507
507
|
let a = n(e, r + 1);
|
|
508
|
-
!
|
|
508
|
+
!P(a) && (i[t] = a);
|
|
509
509
|
}), t[r] = void 0, i;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
return e;
|
|
513
513
|
};
|
|
514
514
|
return n(e, 0);
|
|
515
|
-
},
|
|
516
|
-
n ===
|
|
515
|
+
}, lt = M("AsyncFunction"), ut = (e) => e && (L(e) || I(e)) && I(e.then) && I(e.catch), dt = ((e, t) => e ? setImmediate : t ? ((e, t) => (z.addEventListener("message", ({ source: n, data: r }) => {
|
|
516
|
+
n === z && r === e && t.length && t.shift()();
|
|
517
517
|
}, !1), (n) => {
|
|
518
|
-
t.push(n),
|
|
519
|
-
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function",
|
|
520
|
-
isArray:
|
|
521
|
-
isArrayBuffer:
|
|
522
|
-
isBuffer:
|
|
523
|
-
isFormData:
|
|
524
|
-
isArrayBufferView:
|
|
525
|
-
isString:
|
|
526
|
-
isNumber:
|
|
527
|
-
isBoolean:
|
|
528
|
-
isObject:
|
|
529
|
-
isPlainObject:
|
|
530
|
-
isEmptyObject:
|
|
531
|
-
isReadableStream:
|
|
532
|
-
isRequest:
|
|
533
|
-
isResponse:
|
|
534
|
-
isHeaders:
|
|
535
|
-
isUndefined:
|
|
536
|
-
isDate:
|
|
537
|
-
isFile:
|
|
538
|
-
isReactNativeBlob:
|
|
539
|
-
isReactNative:
|
|
540
|
-
isBlob:
|
|
541
|
-
isRegExp:
|
|
542
|
-
isFunction:
|
|
543
|
-
isStream:
|
|
544
|
-
isURLSearchParams:
|
|
545
|
-
isTypedArray:
|
|
546
|
-
isFileList:
|
|
547
|
-
forEach:
|
|
548
|
-
merge:
|
|
549
|
-
extend:
|
|
550
|
-
trim:
|
|
551
|
-
stripBOM:
|
|
552
|
-
inherits:
|
|
553
|
-
toFlatObject:
|
|
554
|
-
kindOf:
|
|
555
|
-
kindOfTest:
|
|
556
|
-
endsWith:
|
|
557
|
-
toArray:
|
|
558
|
-
forEachEntry:
|
|
559
|
-
matchAll:
|
|
560
|
-
isHTMLForm:
|
|
561
|
-
hasOwnProperty:
|
|
562
|
-
hasOwnProp:
|
|
563
|
-
reduceDescriptors:
|
|
564
|
-
freezeMethods:
|
|
565
|
-
toObjectSet:
|
|
566
|
-
toCamelCase:
|
|
567
|
-
noop:
|
|
568
|
-
toFiniteNumber:
|
|
569
|
-
findKey:
|
|
570
|
-
global:
|
|
571
|
-
isContextDefined:
|
|
572
|
-
isSpecCompliantForm:
|
|
573
|
-
toJSONObject:
|
|
574
|
-
isAsyncFn:
|
|
575
|
-
isThenable:
|
|
576
|
-
setImmediate:
|
|
577
|
-
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
578
|
-
isIterable: (e) => e != null &&
|
|
579
|
-
},
|
|
518
|
+
t.push(n), z.postMessage(e, "*");
|
|
519
|
+
}))(`axios@${Math.random()}`, []) : (e) => setTimeout(e))(typeof setImmediate == "function", I(z.postMessage)), B = {
|
|
520
|
+
isArray: N,
|
|
521
|
+
isArrayBuffer: ge,
|
|
522
|
+
isBuffer: F,
|
|
523
|
+
isFormData: Ne,
|
|
524
|
+
isArrayBufferView: _e,
|
|
525
|
+
isString: ve,
|
|
526
|
+
isNumber: ye,
|
|
527
|
+
isBoolean: be,
|
|
528
|
+
isObject: L,
|
|
529
|
+
isPlainObject: xe,
|
|
530
|
+
isEmptyObject: Se,
|
|
531
|
+
isReadableStream: Fe,
|
|
532
|
+
isRequest: Ie,
|
|
533
|
+
isResponse: Le,
|
|
534
|
+
isHeaders: Re,
|
|
535
|
+
isUndefined: P,
|
|
536
|
+
isDate: Ce,
|
|
537
|
+
isFile: we,
|
|
538
|
+
isReactNativeBlob: Te,
|
|
539
|
+
isReactNative: Ee,
|
|
540
|
+
isBlob: De,
|
|
541
|
+
isRegExp: tt,
|
|
542
|
+
isFunction: I,
|
|
543
|
+
isStream: ke,
|
|
544
|
+
isURLSearchParams: Pe,
|
|
545
|
+
isTypedArray: Ye,
|
|
546
|
+
isFileList: Oe,
|
|
547
|
+
forEach: R,
|
|
548
|
+
merge: He,
|
|
549
|
+
extend: Ue,
|
|
550
|
+
trim: ze,
|
|
551
|
+
stripBOM: We,
|
|
552
|
+
inherits: Ge,
|
|
553
|
+
toFlatObject: Ke,
|
|
554
|
+
kindOf: j,
|
|
555
|
+
kindOfTest: M,
|
|
556
|
+
endsWith: qe,
|
|
557
|
+
toArray: Je,
|
|
558
|
+
forEachEntry: Xe,
|
|
559
|
+
matchAll: Ze,
|
|
560
|
+
isHTMLForm: Qe,
|
|
561
|
+
hasOwnProperty: et,
|
|
562
|
+
hasOwnProp: et,
|
|
563
|
+
reduceDescriptors: nt,
|
|
564
|
+
freezeMethods: rt,
|
|
565
|
+
toObjectSet: it,
|
|
566
|
+
toCamelCase: $e,
|
|
567
|
+
noop: at,
|
|
568
|
+
toFiniteNumber: ot,
|
|
569
|
+
findKey: Be,
|
|
570
|
+
global: z,
|
|
571
|
+
isContextDefined: Ve,
|
|
572
|
+
isSpecCompliantForm: st,
|
|
573
|
+
toJSONObject: ct,
|
|
574
|
+
isAsyncFn: lt,
|
|
575
|
+
isThenable: ut,
|
|
576
|
+
setImmediate: dt,
|
|
577
|
+
asap: typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || dt,
|
|
578
|
+
isIterable: (e) => e != null && I(e[pe])
|
|
579
|
+
}, V = class e extends Error {
|
|
580
580
|
static from(t, n, r, i, a, o) {
|
|
581
581
|
let s = new e(t.message, n || t.code, r, i, a);
|
|
582
582
|
return s.cause = t, s.name = t.name, t.status != null && s.status == null && (s.status = t.status), o && Object.assign(s, o), s;
|
|
@@ -599,80 +599,80 @@ var lt = (e) => {
|
|
|
599
599
|
lineNumber: this.lineNumber,
|
|
600
600
|
columnNumber: this.columnNumber,
|
|
601
601
|
stack: this.stack,
|
|
602
|
-
config:
|
|
602
|
+
config: B.toJSONObject(this.config),
|
|
603
603
|
code: this.code,
|
|
604
604
|
status: this.status
|
|
605
605
|
};
|
|
606
606
|
}
|
|
607
607
|
};
|
|
608
|
-
|
|
608
|
+
V.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE", V.ERR_BAD_OPTION = "ERR_BAD_OPTION", V.ECONNABORTED = "ECONNABORTED", V.ETIMEDOUT = "ETIMEDOUT", V.ERR_NETWORK = "ERR_NETWORK", V.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS", V.ERR_DEPRECATED = "ERR_DEPRECATED", V.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE", V.ERR_BAD_REQUEST = "ERR_BAD_REQUEST", V.ERR_CANCELED = "ERR_CANCELED", V.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT", V.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
609
609
|
//#endregion
|
|
610
610
|
//#region node_modules/axios/lib/helpers/toFormData.js
|
|
611
|
-
function
|
|
612
|
-
return
|
|
611
|
+
function ft(e) {
|
|
612
|
+
return B.isPlainObject(e) || B.isArray(e);
|
|
613
613
|
}
|
|
614
|
-
function
|
|
615
|
-
return
|
|
614
|
+
function pt(e) {
|
|
615
|
+
return B.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function mt(e, t, n) {
|
|
618
618
|
return e ? e.concat(t).map(function(e, t) {
|
|
619
|
-
return e =
|
|
619
|
+
return e = pt(e), !n && t ? "[" + e + "]" : e;
|
|
620
620
|
}).join(n ? "." : "") : t;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function ht(e) {
|
|
623
|
+
return B.isArray(e) && !e.some(ft);
|
|
624
624
|
}
|
|
625
|
-
var
|
|
625
|
+
var gt = B.toFlatObject(B, {}, null, function(e) {
|
|
626
626
|
return /^is[A-Z]/.test(e);
|
|
627
627
|
});
|
|
628
|
-
function
|
|
629
|
-
if (!
|
|
630
|
-
t ||= new FormData(), n =
|
|
628
|
+
function _t(e, t, n) {
|
|
629
|
+
if (!B.isObject(e)) throw TypeError("target must be an object");
|
|
630
|
+
t ||= new FormData(), n = B.toFlatObject(n, {
|
|
631
631
|
metaTokens: !0,
|
|
632
632
|
dots: !1,
|
|
633
633
|
indexes: !1
|
|
634
634
|
}, !1, function(e, t) {
|
|
635
|
-
return !
|
|
635
|
+
return !B.isUndefined(t[e]);
|
|
636
636
|
});
|
|
637
|
-
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) &&
|
|
638
|
-
if (!
|
|
637
|
+
let r = n.metaTokens, i = n.visitor || l, a = n.dots, o = n.indexes, s = (n.Blob || typeof Blob < "u" && Blob) && B.isSpecCompliantForm(t);
|
|
638
|
+
if (!B.isFunction(i)) throw TypeError("visitor must be a function");
|
|
639
639
|
function c(e) {
|
|
640
640
|
if (e === null) return "";
|
|
641
|
-
if (
|
|
642
|
-
if (
|
|
643
|
-
if (!s &&
|
|
644
|
-
return
|
|
641
|
+
if (B.isDate(e)) return e.toISOString();
|
|
642
|
+
if (B.isBoolean(e)) return e.toString();
|
|
643
|
+
if (!s && B.isBlob(e)) throw new V("Blob is not supported. Use a Buffer instead.");
|
|
644
|
+
return B.isArrayBuffer(e) || B.isTypedArray(e) ? s && typeof Blob == "function" ? new Blob([e]) : Buffer.from(e) : e;
|
|
645
645
|
}
|
|
646
646
|
function l(e, n, i) {
|
|
647
647
|
let s = e;
|
|
648
|
-
if (
|
|
648
|
+
if (B.isReactNative(t) && B.isReactNativeBlob(e)) return t.append(mt(i, n, a), c(e)), !1;
|
|
649
649
|
if (e && !i && typeof e == "object") {
|
|
650
|
-
if (
|
|
651
|
-
else if (
|
|
652
|
-
!(
|
|
650
|
+
if (B.endsWith(n, "{}")) n = r ? n : n.slice(0, -2), e = JSON.stringify(e);
|
|
651
|
+
else if (B.isArray(e) && ht(e) || (B.isFileList(e) || B.endsWith(n, "[]")) && (s = B.toArray(e))) return n = pt(n), s.forEach(function(e, r) {
|
|
652
|
+
!(B.isUndefined(e) || e === null) && t.append(o === !0 ? mt([n], r, a) : o === null ? n : n + "[]", c(e));
|
|
653
653
|
}), !1;
|
|
654
654
|
}
|
|
655
|
-
return
|
|
655
|
+
return ft(e) ? !0 : (t.append(mt(i, n, a), c(e)), !1);
|
|
656
656
|
}
|
|
657
|
-
let u = [], d = Object.assign(
|
|
657
|
+
let u = [], d = Object.assign(gt, {
|
|
658
658
|
defaultVisitor: l,
|
|
659
659
|
convertValue: c,
|
|
660
|
-
isVisitable:
|
|
660
|
+
isVisitable: ft
|
|
661
661
|
});
|
|
662
662
|
function f(e, n) {
|
|
663
|
-
if (!
|
|
663
|
+
if (!B.isUndefined(e)) {
|
|
664
664
|
if (u.indexOf(e) !== -1) throw Error("Circular reference detected in " + n.join("."));
|
|
665
|
-
u.push(e),
|
|
666
|
-
(!(
|
|
665
|
+
u.push(e), B.forEach(e, function(e, r) {
|
|
666
|
+
(!(B.isUndefined(e) || e === null) && i.call(t, e, B.isString(r) ? r.trim() : r, n, d)) === !0 && f(e, n ? n.concat(r) : [r]);
|
|
667
667
|
}), u.pop();
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
if (!
|
|
670
|
+
if (!B.isObject(e)) throw TypeError("data must be an object");
|
|
671
671
|
return f(e), t;
|
|
672
672
|
}
|
|
673
673
|
//#endregion
|
|
674
674
|
//#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
675
|
-
function
|
|
675
|
+
function vt(e) {
|
|
676
676
|
let t = {
|
|
677
677
|
"!": "%21",
|
|
678
678
|
"'": "%27",
|
|
@@ -686,29 +686,29 @@ function yt(e) {
|
|
|
686
686
|
return t[e];
|
|
687
687
|
});
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
this._pairs = [], e &&
|
|
689
|
+
function yt(e, t) {
|
|
690
|
+
this._pairs = [], e && _t(e, this, t);
|
|
691
691
|
}
|
|
692
|
-
var
|
|
693
|
-
|
|
692
|
+
var bt = yt.prototype;
|
|
693
|
+
bt.append = function(e, t) {
|
|
694
694
|
this._pairs.push([e, t]);
|
|
695
|
-
},
|
|
695
|
+
}, bt.toString = function(e) {
|
|
696
696
|
let t = e ? function(t) {
|
|
697
|
-
return e.call(this, t,
|
|
698
|
-
} :
|
|
697
|
+
return e.call(this, t, vt);
|
|
698
|
+
} : vt;
|
|
699
699
|
return this._pairs.map(function(e) {
|
|
700
700
|
return t(e[0]) + "=" + t(e[1]);
|
|
701
701
|
}, "").join("&");
|
|
702
702
|
};
|
|
703
703
|
//#endregion
|
|
704
704
|
//#region node_modules/axios/lib/helpers/buildURL.js
|
|
705
|
-
function
|
|
705
|
+
function xt(e) {
|
|
706
706
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function St(e, t, n) {
|
|
709
709
|
if (!t) return e;
|
|
710
|
-
let r = n && n.encode ||
|
|
711
|
-
if (o = a ? a(t, i) :
|
|
710
|
+
let r = n && n.encode || xt, i = B.isFunction(n) ? { serialize: n } : n, a = i && i.serialize, o;
|
|
711
|
+
if (o = a ? a(t, i) : B.isURLSearchParams(t) ? t.toString() : new yt(t, i).toString(r), o) {
|
|
712
712
|
let t = e.indexOf("#");
|
|
713
713
|
t !== -1 && (e = e.slice(0, t)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
714
714
|
}
|
|
@@ -716,7 +716,7 @@ function Ct(e, t, n) {
|
|
|
716
716
|
}
|
|
717
717
|
//#endregion
|
|
718
718
|
//#region node_modules/axios/lib/core/InterceptorManager.js
|
|
719
|
-
var
|
|
719
|
+
var Ct = class {
|
|
720
720
|
constructor() {
|
|
721
721
|
this.handlers = [];
|
|
722
722
|
}
|
|
@@ -735,19 +735,19 @@ var wt = class {
|
|
|
735
735
|
this.handlers &&= [];
|
|
736
736
|
}
|
|
737
737
|
forEach(e) {
|
|
738
|
-
|
|
738
|
+
B.forEach(this.handlers, function(t) {
|
|
739
739
|
t !== null && e(t);
|
|
740
740
|
});
|
|
741
741
|
}
|
|
742
|
-
},
|
|
742
|
+
}, wt = {
|
|
743
743
|
silentJSONParsing: !0,
|
|
744
744
|
forcedJSONParsing: !0,
|
|
745
745
|
clarifyTimeoutError: !1,
|
|
746
746
|
legacyInterceptorReqResOrdering: !0
|
|
747
|
-
},
|
|
747
|
+
}, Tt = {
|
|
748
748
|
isBrowser: !0,
|
|
749
749
|
classes: {
|
|
750
|
-
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams :
|
|
750
|
+
URLSearchParams: typeof URLSearchParams < "u" ? URLSearchParams : yt,
|
|
751
751
|
FormData: typeof FormData < "u" ? FormData : null,
|
|
752
752
|
Blob: typeof Blob < "u" ? Blob : null
|
|
753
753
|
},
|
|
@@ -759,97 +759,97 @@ var wt = class {
|
|
|
759
759
|
"url",
|
|
760
760
|
"data"
|
|
761
761
|
]
|
|
762
|
-
},
|
|
763
|
-
hasBrowserEnv: () =>
|
|
764
|
-
hasStandardBrowserEnv: () =>
|
|
765
|
-
hasStandardBrowserWebWorkerEnv: () =>
|
|
766
|
-
navigator: () =>
|
|
767
|
-
origin: () =>
|
|
768
|
-
}),
|
|
762
|
+
}, Et = /* @__PURE__ */ n({
|
|
763
|
+
hasBrowserEnv: () => Dt,
|
|
764
|
+
hasStandardBrowserEnv: () => kt,
|
|
765
|
+
hasStandardBrowserWebWorkerEnv: () => At,
|
|
766
|
+
navigator: () => Ot,
|
|
767
|
+
origin: () => jt
|
|
768
|
+
}), Dt = typeof window < "u" && typeof document < "u", Ot = typeof navigator == "object" && navigator || void 0, kt = Dt && (!Ot || [
|
|
769
769
|
"ReactNative",
|
|
770
770
|
"NativeScript",
|
|
771
771
|
"NS"
|
|
772
|
-
].indexOf(
|
|
773
|
-
...
|
|
774
|
-
...
|
|
772
|
+
].indexOf(Ot.product) < 0), At = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function", jt = Dt && window.location.href || "http://localhost", H = {
|
|
773
|
+
...Et,
|
|
774
|
+
...Tt
|
|
775
775
|
};
|
|
776
776
|
//#endregion
|
|
777
777
|
//#region node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
778
|
-
function
|
|
779
|
-
return
|
|
778
|
+
function Mt(e, t) {
|
|
779
|
+
return _t(e, new H.classes.URLSearchParams(), {
|
|
780
780
|
visitor: function(e, t, n, r) {
|
|
781
|
-
return
|
|
781
|
+
return H.isNode && B.isBuffer(e) ? (this.append(t, e.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
|
|
782
782
|
},
|
|
783
783
|
...t
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region node_modules/axios/lib/helpers/formDataToJSON.js
|
|
788
|
-
function
|
|
789
|
-
return
|
|
788
|
+
function Nt(e) {
|
|
789
|
+
return B.matchAll(/\w+|\[(\w*)]/g, e).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Pt(e) {
|
|
792
792
|
let t = {}, n = Object.keys(e), r, i = n.length, a;
|
|
793
793
|
for (r = 0; r < i; r++) a = n[r], t[a] = e[a];
|
|
794
794
|
return t;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Ft(e) {
|
|
797
797
|
function t(e, n, r, i) {
|
|
798
798
|
let a = e[i++];
|
|
799
799
|
if (a === "__proto__") return !0;
|
|
800
800
|
let o = Number.isFinite(+a), s = i >= e.length;
|
|
801
|
-
return a = !a &&
|
|
801
|
+
return a = !a && B.isArray(r) ? r.length : a, s ? (B.hasOwnProp(r, a) ? r[a] = [r[a], n] : r[a] = n, !o) : ((!r[a] || !B.isObject(r[a])) && (r[a] = []), t(e, n, r[a], i) && B.isArray(r[a]) && (r[a] = Pt(r[a])), !o);
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
803
|
+
if (B.isFormData(e) && B.isFunction(e.entries)) {
|
|
804
804
|
let n = {};
|
|
805
|
-
return
|
|
806
|
-
t(
|
|
805
|
+
return B.forEachEntry(e, (e, r) => {
|
|
806
|
+
t(Nt(e), r, n, 0);
|
|
807
807
|
}), n;
|
|
808
808
|
}
|
|
809
809
|
return null;
|
|
810
810
|
}
|
|
811
811
|
//#endregion
|
|
812
812
|
//#region node_modules/axios/lib/defaults/index.js
|
|
813
|
-
function
|
|
814
|
-
if (
|
|
815
|
-
return (t || JSON.parse)(e),
|
|
813
|
+
function It(e, t, n) {
|
|
814
|
+
if (B.isString(e)) try {
|
|
815
|
+
return (t || JSON.parse)(e), B.trim(e);
|
|
816
816
|
} catch (e) {
|
|
817
817
|
if (e.name !== "SyntaxError") throw e;
|
|
818
818
|
}
|
|
819
819
|
return (n || JSON.stringify)(e);
|
|
820
820
|
}
|
|
821
|
-
var
|
|
822
|
-
transitional:
|
|
821
|
+
var U = {
|
|
822
|
+
transitional: wt,
|
|
823
823
|
adapter: [
|
|
824
824
|
"xhr",
|
|
825
825
|
"http",
|
|
826
826
|
"fetch"
|
|
827
827
|
],
|
|
828
828
|
transformRequest: [function(e, t) {
|
|
829
|
-
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i =
|
|
830
|
-
if (i &&
|
|
831
|
-
if (
|
|
832
|
-
if (
|
|
833
|
-
if (
|
|
829
|
+
let n = t.getContentType() || "", r = n.indexOf("application/json") > -1, i = B.isObject(e);
|
|
830
|
+
if (i && B.isHTMLForm(e) && (e = new FormData(e)), B.isFormData(e)) return r ? JSON.stringify(Ft(e)) : e;
|
|
831
|
+
if (B.isArrayBuffer(e) || B.isBuffer(e) || B.isStream(e) || B.isFile(e) || B.isBlob(e) || B.isReadableStream(e)) return e;
|
|
832
|
+
if (B.isArrayBufferView(e)) return e.buffer;
|
|
833
|
+
if (B.isURLSearchParams(e)) return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
834
834
|
let a;
|
|
835
835
|
if (i) {
|
|
836
|
-
if (n.indexOf("application/x-www-form-urlencoded") > -1) return
|
|
837
|
-
if ((a =
|
|
836
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1) return Mt(e, this.formSerializer).toString();
|
|
837
|
+
if ((a = B.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
|
|
838
838
|
let t = this.env && this.env.FormData;
|
|
839
|
-
return
|
|
839
|
+
return _t(a ? { "files[]": e } : e, t && new t(), this.formSerializer);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
return i || r ? (t.setContentType("application/json", !1),
|
|
842
|
+
return i || r ? (t.setContentType("application/json", !1), It(e)) : e;
|
|
843
843
|
}],
|
|
844
844
|
transformResponse: [function(e) {
|
|
845
|
-
let t = this.transitional ||
|
|
846
|
-
if (
|
|
847
|
-
if (e &&
|
|
845
|
+
let t = this.transitional || U.transitional, n = t && t.forcedJSONParsing, r = this.responseType === "json";
|
|
846
|
+
if (B.isResponse(e) || B.isReadableStream(e)) return e;
|
|
847
|
+
if (e && B.isString(e) && (n && !this.responseType || r)) {
|
|
848
848
|
let n = !(t && t.silentJSONParsing) && r;
|
|
849
849
|
try {
|
|
850
850
|
return JSON.parse(e, this.parseReviver);
|
|
851
851
|
} catch (e) {
|
|
852
|
-
if (n) throw e.name === "SyntaxError" ?
|
|
852
|
+
if (n) throw e.name === "SyntaxError" ? V.from(e, V.ERR_BAD_RESPONSE, this, null, this.response) : e;
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
855
|
return e;
|
|
@@ -860,8 +860,8 @@ var H = {
|
|
|
860
860
|
maxContentLength: -1,
|
|
861
861
|
maxBodyLength: -1,
|
|
862
862
|
env: {
|
|
863
|
-
FormData:
|
|
864
|
-
Blob:
|
|
863
|
+
FormData: H.classes.FormData,
|
|
864
|
+
Blob: H.classes.Blob
|
|
865
865
|
},
|
|
866
866
|
validateStatus: function(e) {
|
|
867
867
|
return e >= 200 && e < 300;
|
|
@@ -871,7 +871,7 @@ var H = {
|
|
|
871
871
|
"Content-Type": void 0
|
|
872
872
|
} }
|
|
873
873
|
};
|
|
874
|
-
|
|
874
|
+
B.forEach([
|
|
875
875
|
"delete",
|
|
876
876
|
"get",
|
|
877
877
|
"head",
|
|
@@ -879,11 +879,11 @@ z.forEach([
|
|
|
879
879
|
"put",
|
|
880
880
|
"patch"
|
|
881
881
|
], (e) => {
|
|
882
|
-
|
|
882
|
+
U.headers[e] = {};
|
|
883
883
|
});
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region node_modules/axios/lib/helpers/parseHeaders.js
|
|
886
|
-
var
|
|
886
|
+
var Lt = B.toObjectSet([
|
|
887
887
|
"age",
|
|
888
888
|
"authorization",
|
|
889
889
|
"content-length",
|
|
@@ -901,36 +901,36 @@ var Rt = z.toObjectSet([
|
|
|
901
901
|
"referer",
|
|
902
902
|
"retry-after",
|
|
903
903
|
"user-agent"
|
|
904
|
-
]),
|
|
904
|
+
]), Rt = (e) => {
|
|
905
905
|
let t = {}, n, r, i;
|
|
906
906
|
return e && e.split("\n").forEach(function(e) {
|
|
907
|
-
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] &&
|
|
907
|
+
i = e.indexOf(":"), n = e.substring(0, i).trim().toLowerCase(), r = e.substring(i + 1).trim(), !(!n || t[n] && Lt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
908
908
|
}), t;
|
|
909
|
-
},
|
|
910
|
-
function
|
|
909
|
+
}, zt = Symbol("internals");
|
|
910
|
+
function W(e) {
|
|
911
911
|
return e && String(e).trim().toLowerCase();
|
|
912
912
|
}
|
|
913
|
-
function
|
|
914
|
-
return e === !1 || e == null ? e :
|
|
913
|
+
function G(e) {
|
|
914
|
+
return e === !1 || e == null ? e : B.isArray(e) ? e.map(G) : String(e);
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function Bt(e) {
|
|
917
917
|
let t = Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g, r;
|
|
918
918
|
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
919
919
|
return t;
|
|
920
920
|
}
|
|
921
|
-
var
|
|
922
|
-
function
|
|
923
|
-
if (
|
|
924
|
-
if (i && (t = n),
|
|
925
|
-
if (
|
|
926
|
-
if (
|
|
921
|
+
var Vt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
922
|
+
function Ht(e, t, n, r, i) {
|
|
923
|
+
if (B.isFunction(r)) return r.call(this, t, n);
|
|
924
|
+
if (i && (t = n), B.isString(t)) {
|
|
925
|
+
if (B.isString(r)) return t.indexOf(r) !== -1;
|
|
926
|
+
if (B.isRegExp(r)) return r.test(t);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Ut(e) {
|
|
930
930
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, t, n) => t.toUpperCase() + n);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
let n =
|
|
932
|
+
function Wt(e, t) {
|
|
933
|
+
let n = B.toCamelCase(" " + t);
|
|
934
934
|
[
|
|
935
935
|
"get",
|
|
936
936
|
"set",
|
|
@@ -944,79 +944,79 @@ function Kt(e, t) {
|
|
|
944
944
|
});
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
|
-
var
|
|
947
|
+
var K = class {
|
|
948
948
|
constructor(e) {
|
|
949
949
|
e && this.set(e);
|
|
950
950
|
}
|
|
951
951
|
set(e, t, n) {
|
|
952
952
|
let r = this;
|
|
953
953
|
function i(e, t, n) {
|
|
954
|
-
let i =
|
|
954
|
+
let i = W(t);
|
|
955
955
|
if (!i) throw Error("header name must be a non-empty string");
|
|
956
|
-
let a =
|
|
957
|
-
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] =
|
|
956
|
+
let a = B.findKey(r, i);
|
|
957
|
+
(!a || r[a] === void 0 || n === !0 || n === void 0 && r[a] !== !1) && (r[a || t] = G(e));
|
|
958
958
|
}
|
|
959
|
-
let a = (e, t) =>
|
|
960
|
-
if (
|
|
961
|
-
else if (
|
|
962
|
-
else if (
|
|
959
|
+
let a = (e, t) => B.forEach(e, (e, n) => i(e, n, t));
|
|
960
|
+
if (B.isPlainObject(e) || e instanceof this.constructor) a(e, t);
|
|
961
|
+
else if (B.isString(e) && (e = e.trim()) && !Vt(e)) a(Rt(e), t);
|
|
962
|
+
else if (B.isObject(e) && B.isIterable(e)) {
|
|
963
963
|
let n = {}, r, i;
|
|
964
964
|
for (let t of e) {
|
|
965
|
-
if (!
|
|
966
|
-
n[i = t[0]] = (r = n[i]) ?
|
|
965
|
+
if (!B.isArray(t)) throw TypeError("Object iterator must return a key-value pair");
|
|
966
|
+
n[i = t[0]] = (r = n[i]) ? B.isArray(r) ? [...r, t[1]] : [r, t[1]] : t[1];
|
|
967
967
|
}
|
|
968
968
|
a(n, t);
|
|
969
969
|
} else e != null && i(t, e, n);
|
|
970
970
|
return this;
|
|
971
971
|
}
|
|
972
972
|
get(e, t) {
|
|
973
|
-
if (e =
|
|
974
|
-
let n =
|
|
973
|
+
if (e = W(e), e) {
|
|
974
|
+
let n = B.findKey(this, e);
|
|
975
975
|
if (n) {
|
|
976
976
|
let e = this[n];
|
|
977
977
|
if (!t) return e;
|
|
978
|
-
if (t === !0) return
|
|
979
|
-
if (
|
|
980
|
-
if (
|
|
978
|
+
if (t === !0) return Bt(e);
|
|
979
|
+
if (B.isFunction(t)) return t.call(this, e, n);
|
|
980
|
+
if (B.isRegExp(t)) return t.exec(e);
|
|
981
981
|
throw TypeError("parser must be boolean|regexp|function");
|
|
982
982
|
}
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
985
|
has(e, t) {
|
|
986
|
-
if (e =
|
|
987
|
-
let n =
|
|
988
|
-
return !!(n && this[n] !== void 0 && (!t ||
|
|
986
|
+
if (e = W(e), e) {
|
|
987
|
+
let n = B.findKey(this, e);
|
|
988
|
+
return !!(n && this[n] !== void 0 && (!t || Ht(this, this[n], n, t)));
|
|
989
989
|
}
|
|
990
990
|
return !1;
|
|
991
991
|
}
|
|
992
992
|
delete(e, t) {
|
|
993
993
|
let n = this, r = !1;
|
|
994
994
|
function i(e) {
|
|
995
|
-
if (e =
|
|
996
|
-
let i =
|
|
997
|
-
i && (!t ||
|
|
995
|
+
if (e = W(e), e) {
|
|
996
|
+
let i = B.findKey(n, e);
|
|
997
|
+
i && (!t || Ht(n, n[i], i, t)) && (delete n[i], r = !0);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
return
|
|
1000
|
+
return B.isArray(e) ? e.forEach(i) : i(e), r;
|
|
1001
1001
|
}
|
|
1002
1002
|
clear(e) {
|
|
1003
1003
|
let t = Object.keys(this), n = t.length, r = !1;
|
|
1004
1004
|
for (; n--;) {
|
|
1005
1005
|
let i = t[n];
|
|
1006
|
-
(!e ||
|
|
1006
|
+
(!e || Ht(this, this[i], i, e, !0)) && (delete this[i], r = !0);
|
|
1007
1007
|
}
|
|
1008
1008
|
return r;
|
|
1009
1009
|
}
|
|
1010
1010
|
normalize(e) {
|
|
1011
1011
|
let t = this, n = {};
|
|
1012
|
-
return
|
|
1013
|
-
let a =
|
|
1012
|
+
return B.forEach(this, (r, i) => {
|
|
1013
|
+
let a = B.findKey(n, i);
|
|
1014
1014
|
if (a) {
|
|
1015
|
-
t[a] =
|
|
1015
|
+
t[a] = G(r), delete t[i];
|
|
1016
1016
|
return;
|
|
1017
1017
|
}
|
|
1018
|
-
let o = e ?
|
|
1019
|
-
o !== i && delete t[i], t[o] =
|
|
1018
|
+
let o = e ? Ut(i) : String(i).trim();
|
|
1019
|
+
o !== i && delete t[i], t[o] = G(r), n[o] = !0;
|
|
1020
1020
|
}), this;
|
|
1021
1021
|
}
|
|
1022
1022
|
concat(...e) {
|
|
@@ -1024,8 +1024,8 @@ var W = class {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
toJSON(e) {
|
|
1026
1026
|
let t = Object.create(null);
|
|
1027
|
-
return
|
|
1028
|
-
n != null && n !== !1 && (t[r] = e &&
|
|
1027
|
+
return B.forEach(this, (n, r) => {
|
|
1028
|
+
n != null && n !== !1 && (t[r] = e && B.isArray(n) ? n.join(", ") : n);
|
|
1029
1029
|
}), t;
|
|
1030
1030
|
}
|
|
1031
1031
|
[Symbol.iterator]() {
|
|
@@ -1048,22 +1048,22 @@ var W = class {
|
|
|
1048
1048
|
return t.forEach((e) => n.set(e)), n;
|
|
1049
1049
|
}
|
|
1050
1050
|
static accessor(e) {
|
|
1051
|
-
let t = (this[
|
|
1051
|
+
let t = (this[zt] = this[zt] = { accessors: {} }).accessors, n = this.prototype;
|
|
1052
1052
|
function r(e) {
|
|
1053
|
-
let r =
|
|
1054
|
-
t[r] || (
|
|
1053
|
+
let r = W(e);
|
|
1054
|
+
t[r] || (Wt(n, e), t[r] = !0);
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return B.isArray(e) ? e.forEach(r) : r(e), this;
|
|
1057
1057
|
}
|
|
1058
1058
|
};
|
|
1059
|
-
|
|
1059
|
+
K.accessor([
|
|
1060
1060
|
"Content-Type",
|
|
1061
1061
|
"Content-Length",
|
|
1062
1062
|
"Accept",
|
|
1063
1063
|
"Accept-Encoding",
|
|
1064
1064
|
"User-Agent",
|
|
1065
1065
|
"Authorization"
|
|
1066
|
-
]),
|
|
1066
|
+
]), B.reduceDescriptors(K.prototype, ({ value: e }, t) => {
|
|
1067
1067
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
1068
1068
|
return {
|
|
1069
1069
|
get: () => e,
|
|
@@ -1071,42 +1071,42 @@ W.accessor([
|
|
|
1071
1071
|
this[n] = e;
|
|
1072
1072
|
}
|
|
1073
1073
|
};
|
|
1074
|
-
}),
|
|
1074
|
+
}), B.freezeMethods(K);
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region node_modules/axios/lib/core/transformData.js
|
|
1077
|
-
function
|
|
1078
|
-
let n = this ||
|
|
1079
|
-
return
|
|
1077
|
+
function Gt(e, t) {
|
|
1078
|
+
let n = this || U, r = t || n, i = K.from(r.headers), a = r.data;
|
|
1079
|
+
return B.forEach(e, function(e) {
|
|
1080
1080
|
a = e.call(n, a, i.normalize(), t ? t.status : void 0);
|
|
1081
1081
|
}), i.normalize(), a;
|
|
1082
1082
|
}
|
|
1083
1083
|
//#endregion
|
|
1084
1084
|
//#region node_modules/axios/lib/cancel/isCancel.js
|
|
1085
|
-
function
|
|
1085
|
+
function Kt(e) {
|
|
1086
1086
|
return !!(e && e.__CANCEL__);
|
|
1087
1087
|
}
|
|
1088
1088
|
//#endregion
|
|
1089
1089
|
//#region node_modules/axios/lib/cancel/CanceledError.js
|
|
1090
|
-
var
|
|
1090
|
+
var q = class extends V {
|
|
1091
1091
|
constructor(e, t, n) {
|
|
1092
|
-
super(e ?? "canceled",
|
|
1092
|
+
super(e ?? "canceled", V.ERR_CANCELED, t, n), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
};
|
|
1095
1095
|
//#endregion
|
|
1096
1096
|
//#region node_modules/axios/lib/core/settle.js
|
|
1097
|
-
function
|
|
1097
|
+
function qt(e, t, n) {
|
|
1098
1098
|
let r = n.config.validateStatus;
|
|
1099
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
1099
|
+
!n.status || !r || r(n.status) ? e(n) : t(new V("Request failed with status code " + n.status, [V.ERR_BAD_REQUEST, V.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
1100
1100
|
}
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region node_modules/axios/lib/helpers/parseProtocol.js
|
|
1103
|
-
function
|
|
1103
|
+
function Jt(e) {
|
|
1104
1104
|
let t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1105
1105
|
return t && t[1] || "";
|
|
1106
1106
|
}
|
|
1107
1107
|
//#endregion
|
|
1108
1108
|
//#region node_modules/axios/lib/helpers/speedometer.js
|
|
1109
|
-
function
|
|
1109
|
+
function Yt(e, t) {
|
|
1110
1110
|
e ||= 10;
|
|
1111
1111
|
let n = Array(e), r = Array(e), i = 0, a = 0, o;
|
|
1112
1112
|
return t = t === void 0 ? 1e3 : t, function(s) {
|
|
@@ -1121,7 +1121,7 @@ function Zt(e, t) {
|
|
|
1121
1121
|
}
|
|
1122
1122
|
//#endregion
|
|
1123
1123
|
//#region node_modules/axios/lib/helpers/throttle.js
|
|
1124
|
-
function
|
|
1124
|
+
function Xt(e, t) {
|
|
1125
1125
|
let n = 0, r = 1e3 / t, i, a, o = (t, r = Date.now()) => {
|
|
1126
1126
|
n = r, i = null, a &&= (clearTimeout(a), null), e(...t);
|
|
1127
1127
|
};
|
|
@@ -1134,9 +1134,9 @@ function Qt(e, t) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
//#endregion
|
|
1136
1136
|
//#region node_modules/axios/lib/helpers/progressEventReducer.js
|
|
1137
|
-
var
|
|
1138
|
-
let r = 0, i =
|
|
1139
|
-
return
|
|
1137
|
+
var Zt = (e, t, n = 3) => {
|
|
1138
|
+
let r = 0, i = Yt(50, 250);
|
|
1139
|
+
return Xt((n) => {
|
|
1140
1140
|
let a = n.loaded, o = n.lengthComputable ? n.total : void 0, s = a - r, c = i(s), l = a <= o;
|
|
1141
1141
|
r = a, e({
|
|
1142
1142
|
loaded: a,
|
|
@@ -1150,18 +1150,18 @@ var $t = (e, t, n = 3) => {
|
|
|
1150
1150
|
[t ? "download" : "upload"]: !0
|
|
1151
1151
|
});
|
|
1152
1152
|
}, n);
|
|
1153
|
-
},
|
|
1153
|
+
}, Qt = (e, t) => {
|
|
1154
1154
|
let n = e != null;
|
|
1155
1155
|
return [(r) => t[0]({
|
|
1156
1156
|
lengthComputable: n,
|
|
1157
1157
|
total: e,
|
|
1158
1158
|
loaded: r
|
|
1159
1159
|
}), t[1]];
|
|
1160
|
-
},
|
|
1160
|
+
}, $t = (e) => (...t) => B.asap(() => e(...t)), en = H.hasStandardBrowserEnv ? ((e, t) => (n) => (n = new URL(n, H.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(new URL(H.origin), H.navigator && /(msie|trident)/i.test(H.navigator.userAgent)) : () => !0, tn = H.hasStandardBrowserEnv ? {
|
|
1161
1161
|
write(e, t, n, r, i, a, o) {
|
|
1162
1162
|
if (typeof document > "u") return;
|
|
1163
1163
|
let s = [`${e}=${encodeURIComponent(t)}`];
|
|
1164
|
-
|
|
1164
|
+
B.isNumber(n) && s.push(`expires=${new Date(n).toUTCString()}`), B.isString(r) && s.push(`path=${r}`), B.isString(i) && s.push(`domain=${i}`), a === !0 && s.push("secure"), B.isString(o) && s.push(`SameSite=${o}`), document.cookie = s.join("; ");
|
|
1165
1165
|
},
|
|
1166
1166
|
read(e) {
|
|
1167
1167
|
if (typeof document > "u") return null;
|
|
@@ -1180,39 +1180,39 @@ var $t = (e, t, n = 3) => {
|
|
|
1180
1180
|
};
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
1183
|
-
function
|
|
1183
|
+
function nn(e) {
|
|
1184
1184
|
return typeof e == "string" ? /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) : !1;
|
|
1185
1185
|
}
|
|
1186
1186
|
//#endregion
|
|
1187
1187
|
//#region node_modules/axios/lib/helpers/combineURLs.js
|
|
1188
|
-
function
|
|
1188
|
+
function rn(e, t) {
|
|
1189
1189
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1190
1190
|
}
|
|
1191
1191
|
//#endregion
|
|
1192
1192
|
//#region node_modules/axios/lib/core/buildFullPath.js
|
|
1193
|
-
function
|
|
1194
|
-
let r = !
|
|
1195
|
-
return e && (r || n == 0) ?
|
|
1193
|
+
function an(e, t, n) {
|
|
1194
|
+
let r = !nn(t);
|
|
1195
|
+
return e && (r || n == 0) ? rn(e, t) : t;
|
|
1196
1196
|
}
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region node_modules/axios/lib/core/mergeConfig.js
|
|
1199
|
-
var
|
|
1200
|
-
function
|
|
1199
|
+
var on = (e) => e instanceof K ? { ...e } : e;
|
|
1200
|
+
function J(e, t) {
|
|
1201
1201
|
t ||= {};
|
|
1202
1202
|
let n = {};
|
|
1203
1203
|
function r(e, t, n, r) {
|
|
1204
|
-
return
|
|
1204
|
+
return B.isPlainObject(e) && B.isPlainObject(t) ? B.merge.call({ caseless: r }, e, t) : B.isPlainObject(t) ? B.merge({}, t) : B.isArray(t) ? t.slice() : t;
|
|
1205
1205
|
}
|
|
1206
1206
|
function i(e, t, n, i) {
|
|
1207
|
-
if (!
|
|
1208
|
-
if (!
|
|
1207
|
+
if (!B.isUndefined(t)) return r(e, t, n, i);
|
|
1208
|
+
if (!B.isUndefined(e)) return r(void 0, e, n, i);
|
|
1209
1209
|
}
|
|
1210
1210
|
function a(e, t) {
|
|
1211
|
-
if (!
|
|
1211
|
+
if (!B.isUndefined(t)) return r(void 0, t);
|
|
1212
1212
|
}
|
|
1213
1213
|
function o(e, t) {
|
|
1214
|
-
if (!
|
|
1215
|
-
if (!
|
|
1214
|
+
if (!B.isUndefined(t)) return r(void 0, t);
|
|
1215
|
+
if (!B.isUndefined(e)) return r(void 0, e);
|
|
1216
1216
|
}
|
|
1217
1217
|
function s(n, i, a) {
|
|
1218
1218
|
if (a in t) return r(n, i);
|
|
@@ -1247,38 +1247,38 @@ function K(e, t) {
|
|
|
1247
1247
|
socketPath: o,
|
|
1248
1248
|
responseEncoding: o,
|
|
1249
1249
|
validateStatus: s,
|
|
1250
|
-
headers: (e, t, n) => i(
|
|
1250
|
+
headers: (e, t, n) => i(on(e), on(t), n, !0)
|
|
1251
1251
|
};
|
|
1252
|
-
return
|
|
1252
|
+
return B.forEach(Object.keys({
|
|
1253
1253
|
...e,
|
|
1254
1254
|
...t
|
|
1255
1255
|
}), function(r) {
|
|
1256
1256
|
if (r === "__proto__" || r === "constructor" || r === "prototype") return;
|
|
1257
|
-
let a =
|
|
1258
|
-
|
|
1257
|
+
let a = B.hasOwnProp(c, r) ? c[r] : i, o = a(e[r], t[r], r);
|
|
1258
|
+
B.isUndefined(o) && a !== s || (n[r] = o);
|
|
1259
1259
|
}), n;
|
|
1260
1260
|
}
|
|
1261
1261
|
//#endregion
|
|
1262
1262
|
//#region node_modules/axios/lib/helpers/resolveConfig.js
|
|
1263
|
-
var
|
|
1264
|
-
let t =
|
|
1265
|
-
if (t.headers = o =
|
|
1266
|
-
if (
|
|
1267
|
-
else if (
|
|
1263
|
+
var sn = (e) => {
|
|
1264
|
+
let t = J({}, e), { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: a, headers: o, auth: s } = t;
|
|
1265
|
+
if (t.headers = o = K.from(o), t.url = St(an(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), s && o.set("Authorization", "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))), B.isFormData(n)) {
|
|
1266
|
+
if (H.hasStandardBrowserEnv || H.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0);
|
|
1267
|
+
else if (B.isFunction(n.getHeaders)) {
|
|
1268
1268
|
let e = n.getHeaders(), t = ["content-type", "content-length"];
|
|
1269
1269
|
Object.entries(e).forEach(([e, n]) => {
|
|
1270
1270
|
t.includes(e.toLowerCase()) && o.set(e, n);
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
|
-
if (
|
|
1275
|
-
let e = i && a &&
|
|
1274
|
+
if (H.hasStandardBrowserEnv && (r && B.isFunction(r) && (r = r(t)), r || r !== !1 && en(t.url))) {
|
|
1275
|
+
let e = i && a && tn.read(a);
|
|
1276
1276
|
e && o.set(i, e);
|
|
1277
1277
|
}
|
|
1278
1278
|
return t;
|
|
1279
|
-
},
|
|
1279
|
+
}, cn = typeof XMLHttpRequest < "u" && function(e) {
|
|
1280
1280
|
return new Promise(function(t, n) {
|
|
1281
|
-
let r =
|
|
1281
|
+
let r = sn(e), i = r.data, a = K.from(r.headers).normalize(), { responseType: o, onUploadProgress: s, onDownloadProgress: c } = r, l, u, d, f, p;
|
|
1282
1282
|
function m() {
|
|
1283
1283
|
f && f(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1284
1284
|
}
|
|
@@ -1286,8 +1286,8 @@ var ln = (e) => {
|
|
|
1286
1286
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1287
1287
|
function g() {
|
|
1288
1288
|
if (!h) return;
|
|
1289
|
-
let r =
|
|
1290
|
-
|
|
1289
|
+
let r = K.from("getAllResponseHeaders" in h && h.getAllResponseHeaders());
|
|
1290
|
+
qt(function(e) {
|
|
1291
1291
|
t(e), m();
|
|
1292
1292
|
}, function(e) {
|
|
1293
1293
|
n(e), m();
|
|
@@ -1303,36 +1303,36 @@ var ln = (e) => {
|
|
|
1303
1303
|
"onloadend" in h ? h.onloadend = g : h.onreadystatechange = function() {
|
|
1304
1304
|
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(g);
|
|
1305
1305
|
}, h.onabort = function() {
|
|
1306
|
-
h &&= (n(new
|
|
1306
|
+
h &&= (n(new V("Request aborted", V.ECONNABORTED, e, h)), null);
|
|
1307
1307
|
}, h.onerror = function(t) {
|
|
1308
|
-
let r = new
|
|
1308
|
+
let r = new V(t && t.message ? t.message : "Network Error", V.ERR_NETWORK, e, h);
|
|
1309
1309
|
r.event = t || null, n(r), h = null;
|
|
1310
1310
|
}, h.ontimeout = function() {
|
|
1311
|
-
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional ||
|
|
1312
|
-
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new
|
|
1313
|
-
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h &&
|
|
1311
|
+
let t = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded", i = r.transitional || wt;
|
|
1312
|
+
r.timeoutErrorMessage && (t = r.timeoutErrorMessage), n(new V(t, i.clarifyTimeoutError ? V.ETIMEDOUT : V.ECONNABORTED, e, h)), h = null;
|
|
1313
|
+
}, i === void 0 && a.setContentType(null), "setRequestHeader" in h && B.forEach(a.toJSON(), function(e, t) {
|
|
1314
1314
|
h.setRequestHeader(t, e);
|
|
1315
|
-
}),
|
|
1316
|
-
h &&= (n(!t || t.type ? new
|
|
1315
|
+
}), B.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), o && o !== "json" && (h.responseType = r.responseType), c && ([d, p] = Zt(c, !0), h.addEventListener("progress", d)), s && h.upload && ([u, f] = Zt(s), h.upload.addEventListener("progress", u), h.upload.addEventListener("loadend", f)), (r.cancelToken || r.signal) && (l = (t) => {
|
|
1316
|
+
h &&= (n(!t || t.type ? new q(null, e, h) : t), h.abort(), null);
|
|
1317
1317
|
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1318
|
-
let _ =
|
|
1319
|
-
if (_ &&
|
|
1320
|
-
n(new
|
|
1318
|
+
let _ = Jt(r.url);
|
|
1319
|
+
if (_ && H.protocols.indexOf(_) === -1) {
|
|
1320
|
+
n(new V("Unsupported protocol " + _ + ":", V.ERR_BAD_REQUEST, e));
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
h.send(i || null);
|
|
1324
1324
|
});
|
|
1325
|
-
},
|
|
1325
|
+
}, ln = (e, t) => {
|
|
1326
1326
|
let { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1327
1327
|
if (t || n) {
|
|
1328
1328
|
let n = new AbortController(), r, i = function(e) {
|
|
1329
1329
|
if (!r) {
|
|
1330
1330
|
r = !0, o();
|
|
1331
1331
|
let t = e instanceof Error ? e : this.reason;
|
|
1332
|
-
n.abort(t instanceof
|
|
1332
|
+
n.abort(t instanceof V ? t : new q(t instanceof Error ? t.message : t));
|
|
1333
1333
|
}
|
|
1334
1334
|
}, a = t && setTimeout(() => {
|
|
1335
|
-
a = null, i(new
|
|
1335
|
+
a = null, i(new V(`timeout of ${t}ms exceeded`, V.ETIMEDOUT));
|
|
1336
1336
|
}, t), o = () => {
|
|
1337
1337
|
e &&= (a && clearTimeout(a), a = null, e.forEach((e) => {
|
|
1338
1338
|
e.unsubscribe ? e.unsubscribe(i) : e.removeEventListener("abort", i);
|
|
@@ -1340,9 +1340,9 @@ var ln = (e) => {
|
|
|
1340
1340
|
};
|
|
1341
1341
|
e.forEach((e) => e.addEventListener("abort", i));
|
|
1342
1342
|
let { signal: s } = n;
|
|
1343
|
-
return s.unsubscribe = () =>
|
|
1343
|
+
return s.unsubscribe = () => B.asap(o), s;
|
|
1344
1344
|
}
|
|
1345
|
-
},
|
|
1345
|
+
}, un = function* (e, t) {
|
|
1346
1346
|
let n = e.byteLength;
|
|
1347
1347
|
if (!t || n < t) {
|
|
1348
1348
|
yield e;
|
|
@@ -1350,9 +1350,9 @@ var ln = (e) => {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
let r = 0, i;
|
|
1352
1352
|
for (; r < n;) i = r + t, yield e.slice(r, i), r = i;
|
|
1353
|
-
},
|
|
1354
|
-
for await (let n of
|
|
1355
|
-
},
|
|
1353
|
+
}, dn = async function* (e, t) {
|
|
1354
|
+
for await (let n of fn(e)) yield* un(n, t);
|
|
1355
|
+
}, fn = async function* (e) {
|
|
1356
1356
|
if (e[Symbol.asyncIterator]) {
|
|
1357
1357
|
yield* e;
|
|
1358
1358
|
return;
|
|
@@ -1367,8 +1367,8 @@ var ln = (e) => {
|
|
|
1367
1367
|
} finally {
|
|
1368
1368
|
await t.cancel();
|
|
1369
1369
|
}
|
|
1370
|
-
},
|
|
1371
|
-
let i =
|
|
1370
|
+
}, pn = (e, t, n, r) => {
|
|
1371
|
+
let i = dn(e, t), a = 0, o, s = (e) => {
|
|
1372
1372
|
o || (o = !0, r && r(e));
|
|
1373
1373
|
};
|
|
1374
1374
|
return new ReadableStream({
|
|
@@ -1389,29 +1389,29 @@ var ln = (e) => {
|
|
|
1389
1389
|
return s(e), i.return();
|
|
1390
1390
|
}
|
|
1391
1391
|
}, { highWaterMark: 2 });
|
|
1392
|
-
},
|
|
1392
|
+
}, mn = 64 * 1024, { isFunction: hn } = B, gn = (({ Request: e, Response: t }) => ({
|
|
1393
1393
|
Request: e,
|
|
1394
1394
|
Response: t
|
|
1395
|
-
}))(
|
|
1395
|
+
}))(B.global), { ReadableStream: _n, TextEncoder: vn } = B.global, yn = (e, ...t) => {
|
|
1396
1396
|
try {
|
|
1397
1397
|
return !!e(...t);
|
|
1398
1398
|
} catch {
|
|
1399
1399
|
return !1;
|
|
1400
1400
|
}
|
|
1401
|
-
},
|
|
1402
|
-
e =
|
|
1403
|
-
let { fetch: t, Request: n, Response: r } = e, i = t ?
|
|
1401
|
+
}, bn = (e) => {
|
|
1402
|
+
e = B.merge.call({ skipUndefined: !0 }, gn, e);
|
|
1403
|
+
let { fetch: t, Request: n, Response: r } = e, i = t ? hn(t) : typeof fetch == "function", a = hn(n), o = hn(r);
|
|
1404
1404
|
if (!i) return !1;
|
|
1405
|
-
let s = i && _n
|
|
1406
|
-
let e = !1, t = new n(
|
|
1407
|
-
body: new
|
|
1405
|
+
let s = i && hn(_n), c = i && (typeof vn == "function" ? ((e) => (t) => e.encode(t))(new vn()) : async (e) => new Uint8Array(await new n(e).arrayBuffer())), l = a && s && yn(() => {
|
|
1406
|
+
let e = !1, t = new n(H.origin, {
|
|
1407
|
+
body: new _n(),
|
|
1408
1408
|
method: "POST",
|
|
1409
1409
|
get duplex() {
|
|
1410
1410
|
return e = !0, "half";
|
|
1411
1411
|
}
|
|
1412
1412
|
}).headers.has("Content-Type");
|
|
1413
1413
|
return e && !t;
|
|
1414
|
-
}), u = o && s &&
|
|
1414
|
+
}), u = o && s && yn(() => B.isReadableStream(new r("").body)), d = { stream: u && ((e) => e.body) };
|
|
1415
1415
|
i && [
|
|
1416
1416
|
"text",
|
|
1417
1417
|
"arrayBuffer",
|
|
@@ -1422,23 +1422,23 @@ var ln = (e) => {
|
|
|
1422
1422
|
!d[e] && (d[e] = (t, n) => {
|
|
1423
1423
|
let r = t && t[e];
|
|
1424
1424
|
if (r) return r.call(t);
|
|
1425
|
-
throw new
|
|
1425
|
+
throw new V(`Response type '${e}' is not supported`, V.ERR_NOT_SUPPORT, n);
|
|
1426
1426
|
});
|
|
1427
1427
|
});
|
|
1428
1428
|
let f = async (e) => {
|
|
1429
1429
|
if (e == null) return 0;
|
|
1430
|
-
if (
|
|
1431
|
-
if (
|
|
1430
|
+
if (B.isBlob(e)) return e.size;
|
|
1431
|
+
if (B.isSpecCompliantForm(e)) return (await new n(H.origin, {
|
|
1432
1432
|
method: "POST",
|
|
1433
1433
|
body: e
|
|
1434
1434
|
}).arrayBuffer()).byteLength;
|
|
1435
|
-
if (
|
|
1436
|
-
if (
|
|
1437
|
-
}, p = async (e, t) =>
|
|
1435
|
+
if (B.isArrayBufferView(e) || B.isArrayBuffer(e)) return e.byteLength;
|
|
1436
|
+
if (B.isURLSearchParams(e) && (e += ""), B.isString(e)) return (await c(e)).byteLength;
|
|
1437
|
+
}, p = async (e, t) => B.toFiniteNumber(e.getContentLength()) ?? f(t);
|
|
1438
1438
|
return async (e) => {
|
|
1439
|
-
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } =
|
|
1439
|
+
let { url: i, method: o, data: s, signal: c, cancelToken: f, timeout: m, onDownloadProgress: h, onUploadProgress: g, responseType: _, headers: v, withCredentials: y = "same-origin", fetchOptions: b } = sn(e), x = t || fetch;
|
|
1440
1440
|
_ = _ ? (_ + "").toLowerCase() : "text";
|
|
1441
|
-
let S =
|
|
1441
|
+
let S = ln([c, f && f.toAbortSignal()], m), C = null, w = S && S.unsubscribe && (() => {
|
|
1442
1442
|
S.unsubscribe();
|
|
1443
1443
|
}), T;
|
|
1444
1444
|
try {
|
|
@@ -1448,12 +1448,12 @@ var ln = (e) => {
|
|
|
1448
1448
|
body: s,
|
|
1449
1449
|
duplex: "half"
|
|
1450
1450
|
}), t;
|
|
1451
|
-
if (
|
|
1452
|
-
let [t, n] =
|
|
1453
|
-
s =
|
|
1451
|
+
if (B.isFormData(s) && (t = e.headers.get("content-type")) && v.setContentType(t), e.body) {
|
|
1452
|
+
let [t, n] = Qt(T, Zt($t(g)));
|
|
1453
|
+
s = pn(e.body, mn, t, n);
|
|
1454
1454
|
}
|
|
1455
1455
|
}
|
|
1456
|
-
|
|
1456
|
+
B.isString(y) || (y = y ? "include" : "omit");
|
|
1457
1457
|
let t = a && "credentials" in n.prototype, c = {
|
|
1458
1458
|
...b,
|
|
1459
1459
|
signal: S,
|
|
@@ -1474,17 +1474,17 @@ var ln = (e) => {
|
|
|
1474
1474
|
].forEach((t) => {
|
|
1475
1475
|
e[t] = f[t];
|
|
1476
1476
|
});
|
|
1477
|
-
let t =
|
|
1478
|
-
f = new r(
|
|
1477
|
+
let t = B.toFiniteNumber(f.headers.get("content-length")), [n, i] = h && Qt(t, Zt($t(h), !0)) || [];
|
|
1478
|
+
f = new r(pn(f.body, mn, n, () => {
|
|
1479
1479
|
i && i(), w && w();
|
|
1480
1480
|
}), e);
|
|
1481
1481
|
}
|
|
1482
1482
|
_ ||= "text";
|
|
1483
|
-
let ee = await d[
|
|
1483
|
+
let ee = await d[B.findKey(d, _) || "text"](f, e);
|
|
1484
1484
|
return !m && w && w(), await new Promise((t, n) => {
|
|
1485
|
-
|
|
1485
|
+
qt(t, n, {
|
|
1486
1486
|
data: ee,
|
|
1487
|
-
headers:
|
|
1487
|
+
headers: K.from(f.headers),
|
|
1488
1488
|
status: f.status,
|
|
1489
1489
|
statusText: f.statusText,
|
|
1490
1490
|
config: e,
|
|
@@ -1492,27 +1492,27 @@ var ln = (e) => {
|
|
|
1492
1492
|
});
|
|
1493
1493
|
});
|
|
1494
1494
|
} catch (t) {
|
|
1495
|
-
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new
|
|
1495
|
+
throw w && w(), t && t.name === "TypeError" && /Load failed|fetch/i.test(t.message) ? Object.assign(new V("Network Error", V.ERR_NETWORK, e, C, t && t.response), { cause: t.cause || t }) : V.from(t, t && t.code, e, C, t && t.response);
|
|
1496
1496
|
}
|
|
1497
1497
|
};
|
|
1498
|
-
},
|
|
1498
|
+
}, xn = /* @__PURE__ */ new Map(), Sn = (e) => {
|
|
1499
1499
|
let t = e && e.env || {}, { fetch: n, Request: r, Response: i } = t, a = [
|
|
1500
1500
|
r,
|
|
1501
1501
|
i,
|
|
1502
1502
|
n
|
|
1503
|
-
], o = a.length, s, c, l =
|
|
1504
|
-
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() :
|
|
1503
|
+
], o = a.length, s, c, l = xn;
|
|
1504
|
+
for (; o--;) s = a[o], c = l.get(s), c === void 0 && l.set(s, c = o ? /* @__PURE__ */ new Map() : bn(t)), l = c;
|
|
1505
1505
|
return c;
|
|
1506
1506
|
};
|
|
1507
|
-
|
|
1507
|
+
Sn();
|
|
1508
1508
|
//#endregion
|
|
1509
1509
|
//#region node_modules/axios/lib/adapters/adapters.js
|
|
1510
|
-
var
|
|
1510
|
+
var Cn = {
|
|
1511
1511
|
http: null,
|
|
1512
|
-
xhr:
|
|
1513
|
-
fetch: { get:
|
|
1512
|
+
xhr: cn,
|
|
1513
|
+
fetch: { get: Sn }
|
|
1514
1514
|
};
|
|
1515
|
-
|
|
1515
|
+
B.forEach(Cn, (e, t) => {
|
|
1516
1516
|
if (e) {
|
|
1517
1517
|
try {
|
|
1518
1518
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1520,46 +1520,46 @@ z.forEach(Tn, (e, t) => {
|
|
|
1520
1520
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
|
-
var
|
|
1524
|
-
function
|
|
1525
|
-
e =
|
|
1523
|
+
var wn = (e) => `- ${e}`, Tn = (e) => B.isFunction(e) || e === null || e === !1;
|
|
1524
|
+
function En(e, t) {
|
|
1525
|
+
e = B.isArray(e) ? e : [e];
|
|
1526
1526
|
let { length: n } = e, r, i, a = {};
|
|
1527
1527
|
for (let o = 0; o < n; o++) {
|
|
1528
1528
|
r = e[o];
|
|
1529
1529
|
let n;
|
|
1530
|
-
if (i = r, !
|
|
1531
|
-
if (i && (
|
|
1530
|
+
if (i = r, !Tn(r) && (i = Cn[(n = String(r)).toLowerCase()], i === void 0)) throw new V(`Unknown adapter '${n}'`);
|
|
1531
|
+
if (i && (B.isFunction(i) || (i = i.get(t)))) break;
|
|
1532
1532
|
a[n || "#" + o] = i;
|
|
1533
1533
|
}
|
|
1534
1534
|
if (!i) {
|
|
1535
1535
|
let e = Object.entries(a).map(([e, t]) => `adapter ${e} ` + (t === !1 ? "is not supported by the environment" : "is not available in the build"));
|
|
1536
|
-
throw new
|
|
1536
|
+
throw new V("There is no suitable adapter to dispatch the request " + (n ? e.length > 1 ? "since :\n" + e.map(wn).join("\n") : " " + wn(e[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
|
|
1537
1537
|
}
|
|
1538
1538
|
return i;
|
|
1539
1539
|
}
|
|
1540
|
-
var
|
|
1541
|
-
getAdapter:
|
|
1542
|
-
adapters:
|
|
1540
|
+
var Dn = {
|
|
1541
|
+
getAdapter: En,
|
|
1542
|
+
adapters: Cn
|
|
1543
1543
|
};
|
|
1544
1544
|
//#endregion
|
|
1545
1545
|
//#region node_modules/axios/lib/core/dispatchRequest.js
|
|
1546
|
-
function
|
|
1547
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new
|
|
1546
|
+
function On(e) {
|
|
1547
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new q(null, e);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
return
|
|
1549
|
+
function kn(e) {
|
|
1550
|
+
return On(e), e.headers = K.from(e.headers), e.data = Gt.call(e, e.transformRequest), [
|
|
1551
1551
|
"post",
|
|
1552
1552
|
"put",
|
|
1553
1553
|
"patch"
|
|
1554
|
-
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1555
|
-
return
|
|
1554
|
+
].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Dn.getAdapter(e.adapter || U.adapter, e)(e).then(function(t) {
|
|
1555
|
+
return On(e), t.data = Gt.call(e, e.transformResponse, t), t.headers = K.from(t.headers), t;
|
|
1556
1556
|
}, function(t) {
|
|
1557
|
-
return
|
|
1557
|
+
return Kt(t) || (On(e), t && t.response && (t.response.data = Gt.call(e, e.transformResponse, t.response), t.response.headers = K.from(t.response.headers))), Promise.reject(t);
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
1560
|
//#endregion
|
|
1561
1561
|
//#region node_modules/axios/lib/env/data.js
|
|
1562
|
-
var
|
|
1562
|
+
var An = "1.13.6", jn = {};
|
|
1563
1563
|
[
|
|
1564
1564
|
"object",
|
|
1565
1565
|
"boolean",
|
|
@@ -1568,43 +1568,43 @@ var Mn = "1.13.6", Nn = {};
|
|
|
1568
1568
|
"string",
|
|
1569
1569
|
"symbol"
|
|
1570
1570
|
].forEach((e, t) => {
|
|
1571
|
-
|
|
1571
|
+
jn[e] = function(n) {
|
|
1572
1572
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1573
1573
|
};
|
|
1574
1574
|
});
|
|
1575
|
-
var
|
|
1576
|
-
|
|
1575
|
+
var Mn = {};
|
|
1576
|
+
jn.transitional = function(e, t, n) {
|
|
1577
1577
|
function r(e, t) {
|
|
1578
|
-
return "[Axios v" +
|
|
1578
|
+
return "[Axios v" + An + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
|
|
1579
1579
|
}
|
|
1580
1580
|
return (n, i, a) => {
|
|
1581
|
-
if (e === !1) throw new
|
|
1582
|
-
return t && !
|
|
1581
|
+
if (e === !1) throw new V(r(i, " has been removed" + (t ? " in " + t : "")), V.ERR_DEPRECATED);
|
|
1582
|
+
return t && !Mn[i] && (Mn[i] = !0, console.warn(r(i, " has been deprecated since v" + t + " and will be removed in the near future"))), e ? e(n, i, a) : !0;
|
|
1583
1583
|
};
|
|
1584
|
-
},
|
|
1584
|
+
}, jn.spelling = function(e) {
|
|
1585
1585
|
return (t, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
|
|
1586
1586
|
};
|
|
1587
|
-
function
|
|
1588
|
-
if (typeof e != "object") throw new
|
|
1587
|
+
function Nn(e, t, n) {
|
|
1588
|
+
if (typeof e != "object") throw new V("options must be an object", V.ERR_BAD_OPTION_VALUE);
|
|
1589
1589
|
let r = Object.keys(e), i = r.length;
|
|
1590
1590
|
for (; i-- > 0;) {
|
|
1591
1591
|
let a = r[i], o = t[a];
|
|
1592
1592
|
if (o) {
|
|
1593
1593
|
let t = e[a], n = t === void 0 || o(t, a, e);
|
|
1594
|
-
if (n !== !0) throw new
|
|
1594
|
+
if (n !== !0) throw new V("option " + a + " must be " + n, V.ERR_BAD_OPTION_VALUE);
|
|
1595
1595
|
continue;
|
|
1596
1596
|
}
|
|
1597
|
-
if (n !== !0) throw new
|
|
1597
|
+
if (n !== !0) throw new V("Unknown option " + a, V.ERR_BAD_OPTION);
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
var
|
|
1601
|
-
assertOptions:
|
|
1602
|
-
validators:
|
|
1603
|
-
},
|
|
1600
|
+
var Pn = {
|
|
1601
|
+
assertOptions: Nn,
|
|
1602
|
+
validators: jn
|
|
1603
|
+
}, Y = Pn.validators, X = class {
|
|
1604
1604
|
constructor(e) {
|
|
1605
1605
|
this.defaults = e || {}, this.interceptors = {
|
|
1606
|
-
request: new
|
|
1607
|
-
response: new
|
|
1606
|
+
request: new Ct(),
|
|
1607
|
+
response: new Ct()
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
1610
|
async request(e, t) {
|
|
@@ -1623,22 +1623,22 @@ var In = {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
1625
|
_request(e, t) {
|
|
1626
|
-
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t =
|
|
1626
|
+
typeof e == "string" ? (t ||= {}, t.url = e) : t = e || {}, t = J(this.defaults, t);
|
|
1627
1627
|
let { transitional: n, paramsSerializer: r, headers: i } = t;
|
|
1628
|
-
n !== void 0 &&
|
|
1629
|
-
silentJSONParsing:
|
|
1630
|
-
forcedJSONParsing:
|
|
1631
|
-
clarifyTimeoutError:
|
|
1632
|
-
legacyInterceptorReqResOrdering:
|
|
1633
|
-
}, !1), r != null && (
|
|
1634
|
-
encode:
|
|
1635
|
-
serialize:
|
|
1636
|
-
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls),
|
|
1637
|
-
baseUrl:
|
|
1638
|
-
withXsrfToken:
|
|
1628
|
+
n !== void 0 && Pn.assertOptions(n, {
|
|
1629
|
+
silentJSONParsing: Y.transitional(Y.boolean),
|
|
1630
|
+
forcedJSONParsing: Y.transitional(Y.boolean),
|
|
1631
|
+
clarifyTimeoutError: Y.transitional(Y.boolean),
|
|
1632
|
+
legacyInterceptorReqResOrdering: Y.transitional(Y.boolean)
|
|
1633
|
+
}, !1), r != null && (B.isFunction(r) ? t.paramsSerializer = { serialize: r } : Pn.assertOptions(r, {
|
|
1634
|
+
encode: Y.function,
|
|
1635
|
+
serialize: Y.function
|
|
1636
|
+
}, !0)), t.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls === void 0 ? t.allowAbsoluteUrls = !0 : t.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls), Pn.assertOptions(t, {
|
|
1637
|
+
baseUrl: Y.spelling("baseURL"),
|
|
1638
|
+
withXsrfToken: Y.spelling("withXSRFToken")
|
|
1639
1639
|
}, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
|
|
1640
|
-
let a = i &&
|
|
1641
|
-
i &&
|
|
1640
|
+
let a = i && B.merge(i.common, i[t.method]);
|
|
1641
|
+
i && B.forEach([
|
|
1642
1642
|
"delete",
|
|
1643
1643
|
"get",
|
|
1644
1644
|
"head",
|
|
@@ -1648,12 +1648,12 @@ var In = {
|
|
|
1648
1648
|
"common"
|
|
1649
1649
|
], (e) => {
|
|
1650
1650
|
delete i[e];
|
|
1651
|
-
}), t.headers =
|
|
1651
|
+
}), t.headers = K.concat(a, i);
|
|
1652
1652
|
let o = [], s = !0;
|
|
1653
1653
|
this.interceptors.request.forEach(function(e) {
|
|
1654
1654
|
if (typeof e.runWhen == "function" && e.runWhen(t) === !1) return;
|
|
1655
1655
|
s &&= e.synchronous;
|
|
1656
|
-
let n = t.transitional ||
|
|
1656
|
+
let n = t.transitional || wt;
|
|
1657
1657
|
n && n.legacyInterceptorReqResOrdering ? o.unshift(e.fulfilled, e.rejected) : o.push(e.fulfilled, e.rejected);
|
|
1658
1658
|
});
|
|
1659
1659
|
let c = [];
|
|
@@ -1662,7 +1662,7 @@ var In = {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
let l, u = 0, d;
|
|
1664
1664
|
if (!s) {
|
|
1665
|
-
let e = [
|
|
1665
|
+
let e = [kn.bind(this), void 0];
|
|
1666
1666
|
for (e.unshift(...o), e.push(...c), d = e.length, l = Promise.resolve(t); u < d;) l = l.then(e[u++], e[u++]);
|
|
1667
1667
|
return l;
|
|
1668
1668
|
}
|
|
@@ -1678,7 +1678,7 @@ var In = {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
try {
|
|
1681
|
-
l =
|
|
1681
|
+
l = kn.call(this, f);
|
|
1682
1682
|
} catch (e) {
|
|
1683
1683
|
return Promise.reject(e);
|
|
1684
1684
|
}
|
|
@@ -1686,30 +1686,30 @@ var In = {
|
|
|
1686
1686
|
return l;
|
|
1687
1687
|
}
|
|
1688
1688
|
getUri(e) {
|
|
1689
|
-
return e =
|
|
1689
|
+
return e = J(this.defaults, e), St(an(e.baseURL, e.url, e.allowAbsoluteUrls), e.params, e.paramsSerializer);
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
|
-
|
|
1692
|
+
B.forEach([
|
|
1693
1693
|
"delete",
|
|
1694
1694
|
"get",
|
|
1695
1695
|
"head",
|
|
1696
1696
|
"options"
|
|
1697
1697
|
], function(e) {
|
|
1698
|
-
|
|
1699
|
-
return this.request(
|
|
1698
|
+
X.prototype[e] = function(t, n) {
|
|
1699
|
+
return this.request(J(n || {}, {
|
|
1700
1700
|
method: e,
|
|
1701
1701
|
url: t,
|
|
1702
1702
|
data: (n || {}).data
|
|
1703
1703
|
}));
|
|
1704
1704
|
};
|
|
1705
|
-
}),
|
|
1705
|
+
}), B.forEach([
|
|
1706
1706
|
"post",
|
|
1707
1707
|
"put",
|
|
1708
1708
|
"patch"
|
|
1709
1709
|
], function(e) {
|
|
1710
1710
|
function t(t) {
|
|
1711
1711
|
return function(n, r, i) {
|
|
1712
|
-
return this.request(
|
|
1712
|
+
return this.request(J(i || {}, {
|
|
1713
1713
|
method: e,
|
|
1714
1714
|
headers: t ? { "Content-Type": "multipart/form-data" } : {},
|
|
1715
1715
|
url: n,
|
|
@@ -1717,11 +1717,11 @@ z.forEach([
|
|
|
1717
1717
|
}));
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1720
|
+
X.prototype[e] = t(), X.prototype[e + "Form"] = t(!0);
|
|
1721
1721
|
});
|
|
1722
1722
|
//#endregion
|
|
1723
1723
|
//#region node_modules/axios/lib/cancel/CancelToken.js
|
|
1724
|
-
var
|
|
1724
|
+
var Fn = class e {
|
|
1725
1725
|
constructor(e) {
|
|
1726
1726
|
if (typeof e != "function") throw TypeError("executor must be a function.");
|
|
1727
1727
|
let t;
|
|
@@ -1742,7 +1742,7 @@ var Ln = class e {
|
|
|
1742
1742
|
n.unsubscribe(t);
|
|
1743
1743
|
}, r;
|
|
1744
1744
|
}, e(function(e, r, i) {
|
|
1745
|
-
n.reason || (n.reason = new
|
|
1745
|
+
n.reason || (n.reason = new q(e, r, i), t(n.reason));
|
|
1746
1746
|
});
|
|
1747
1747
|
}
|
|
1748
1748
|
throwIfRequested() {
|
|
@@ -1778,19 +1778,19 @@ var Ln = class e {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
//#endregion
|
|
1780
1780
|
//#region node_modules/axios/lib/helpers/spread.js
|
|
1781
|
-
function
|
|
1781
|
+
function In(e) {
|
|
1782
1782
|
return function(t) {
|
|
1783
1783
|
return e.apply(null, t);
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
//#endregion
|
|
1787
1787
|
//#region node_modules/axios/lib/helpers/isAxiosError.js
|
|
1788
|
-
function
|
|
1789
|
-
return
|
|
1788
|
+
function Ln(e) {
|
|
1789
|
+
return B.isObject(e) && e.isAxiosError === !0;
|
|
1790
1790
|
}
|
|
1791
1791
|
//#endregion
|
|
1792
1792
|
//#region node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
1793
|
-
var
|
|
1793
|
+
var Rn = {
|
|
1794
1794
|
Continue: 100,
|
|
1795
1795
|
SwitchingProtocols: 101,
|
|
1796
1796
|
Processing: 102,
|
|
@@ -1861,29 +1861,29 @@ var Bn = {
|
|
|
1861
1861
|
SslHandshakeFailed: 525,
|
|
1862
1862
|
InvalidSslCertificate: 526
|
|
1863
1863
|
};
|
|
1864
|
-
Object.entries(
|
|
1865
|
-
|
|
1864
|
+
Object.entries(Rn).forEach(([e, t]) => {
|
|
1865
|
+
Rn[t] = e;
|
|
1866
1866
|
});
|
|
1867
1867
|
//#endregion
|
|
1868
1868
|
//#region node_modules/axios/lib/axios.js
|
|
1869
|
-
function
|
|
1870
|
-
let t = new
|
|
1871
|
-
return
|
|
1872
|
-
return
|
|
1869
|
+
function zn(e) {
|
|
1870
|
+
let t = new X(e), n = ue(X.prototype.request, t);
|
|
1871
|
+
return B.extend(n, X.prototype, t, { allOwnKeys: !0 }), B.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(t) {
|
|
1872
|
+
return zn(J(e, t));
|
|
1873
1873
|
}, n;
|
|
1874
1874
|
}
|
|
1875
|
-
var
|
|
1876
|
-
|
|
1875
|
+
var Z = zn(U);
|
|
1876
|
+
Z.Axios = X, Z.CanceledError = q, Z.CancelToken = Fn, Z.isCancel = Kt, Z.VERSION = An, Z.toFormData = _t, Z.AxiosError = V, Z.Cancel = Z.CanceledError, Z.all = function(e) {
|
|
1877
1877
|
return Promise.all(e);
|
|
1878
|
-
},
|
|
1878
|
+
}, Z.spread = In, Z.isAxiosError = Ln, Z.mergeConfig = J, Z.AxiosHeaders = K, Z.formToJSON = (e) => Ft(B.isHTMLForm(e) ? new FormData(e) : e), Z.getAdapter = Dn.getAdapter, Z.HttpStatusCode = Rn, Z.default = Z;
|
|
1879
1879
|
//#endregion
|
|
1880
1880
|
//#region src/modules/configs/serviceConfig/ServiceConfig.class.ts
|
|
1881
|
-
var
|
|
1881
|
+
var Bn = class {
|
|
1882
1882
|
baseUrl;
|
|
1883
1883
|
accessToken;
|
|
1884
1884
|
axiosInstance;
|
|
1885
1885
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1886
|
-
this.baseUrl = e, this.accessToken = t, this.axiosInstance =
|
|
1886
|
+
this.baseUrl = e, this.accessToken = t, this.axiosInstance = Z.create({
|
|
1887
1887
|
baseURL: this.baseUrl,
|
|
1888
1888
|
paramsSerializer: (e) => ie(e, { allowDots: !0 })
|
|
1889
1889
|
}), this.setupAxiosTokenHandler();
|
|
@@ -1892,44 +1892,24 @@ var Hn = class {
|
|
|
1892
1892
|
typeof this.accessToken == "function" ? this.axiosInstance.interceptors.request.use(async (e) => (e.headers["X-Webitel-Access"] = await this.accessToken(), e)) : this.axiosInstance.defaults.headers.common["X-Webitel-Access"] = this.accessToken;
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
|
-
function
|
|
1896
|
-
return new
|
|
1895
|
+
function Vn(e) {
|
|
1896
|
+
return new Bn(e);
|
|
1897
1897
|
}
|
|
1898
1898
|
//#endregion
|
|
1899
1899
|
//#region src/modules/configs/socketConfig/SocketConfig.class.ts
|
|
1900
|
-
var
|
|
1901
|
-
baseUrl;
|
|
1900
|
+
var Hn = class {
|
|
1902
1901
|
accessToken;
|
|
1902
|
+
baseUrl;
|
|
1903
1903
|
constructor({ baseUrl: e, accessToken: t }) {
|
|
1904
1904
|
this.baseUrl = e, this.accessToken = t;
|
|
1905
1905
|
}
|
|
1906
1906
|
};
|
|
1907
|
-
function
|
|
1908
|
-
return new
|
|
1909
|
-
}
|
|
1910
|
-
//#endregion
|
|
1911
|
-
//#region src/modules/messages/classes/Message.class.ts
|
|
1912
|
-
var Kn = class {
|
|
1913
|
-
_serviceConfig;
|
|
1914
|
-
constructor(e, { serviceConfig: t }) {
|
|
1915
|
-
Object.assign(this, e), this._serviceConfig = t;
|
|
1916
|
-
}
|
|
1917
|
-
get serviceConfig() {
|
|
1918
|
-
return this._serviceConfig;
|
|
1919
|
-
}
|
|
1920
|
-
async markRead() {
|
|
1921
|
-
throw Error("Method not implemented.");
|
|
1922
|
-
}
|
|
1923
|
-
};
|
|
1924
|
-
function qn(e, { serviceConfig: t }) {
|
|
1925
|
-
return new Kn(e, { serviceConfig: t });
|
|
1907
|
+
function Un(e) {
|
|
1908
|
+
return new Hn(e);
|
|
1926
1909
|
}
|
|
1927
1910
|
//#endregion
|
|
1928
|
-
//#region src/modules/messages/
|
|
1929
|
-
var
|
|
1930
|
-
Documents: "documents",
|
|
1931
|
-
Images: "images"
|
|
1932
|
-
}, Z = ({ axiosInstance: e }) => {
|
|
1911
|
+
//#region src/modules/messages/api/Messages.api.ts
|
|
1912
|
+
var Wn = ({ axiosInstance: e }) => {
|
|
1933
1913
|
async function t(t, n = {}) {
|
|
1934
1914
|
let i = r(n, [l()]);
|
|
1935
1915
|
return r((await e.get(`/v1/${t}/messages`, { params: i })).data, [A()]);
|
|
@@ -1959,21 +1939,21 @@ var X = {
|
|
|
1959
1939
|
sendDocumentMessage: a,
|
|
1960
1940
|
sendImageMessage: o
|
|
1961
1941
|
};
|
|
1962
|
-
},
|
|
1963
|
-
let r = await
|
|
1942
|
+
}, Gn = (e) => async (t, n = {}) => await Wn(e).getMessageHistory(t, n), Kn = (e, { serviceConfig: t }) => e.map((e) => er(e, { serviceConfig: t })), qn = async (e, t, n = {}) => {
|
|
1943
|
+
let r = await Gn(e)(t, n);
|
|
1964
1944
|
return {
|
|
1965
1945
|
...r,
|
|
1966
|
-
items:
|
|
1946
|
+
items: Kn(r.items ?? [], { serviceConfig: e })
|
|
1967
1947
|
};
|
|
1968
|
-
},
|
|
1948
|
+
}, Jn = (e) => {
|
|
1969
1949
|
if (e?.threadId) return e.threadId;
|
|
1970
1950
|
let { sub: t, iss: n } = e?.contact ?? {};
|
|
1971
1951
|
if (t && n) return `${t}:${n}`;
|
|
1972
1952
|
throw Error("to.threadId or to.contact.{sub,iss} is required to resolve a storage upload key");
|
|
1973
|
-
},
|
|
1974
|
-
let { files: n, body: r, ...i } = t, a = oe(n), o =
|
|
1953
|
+
}, Yn = async (e, t) => {
|
|
1954
|
+
let { files: n, body: r, ...i } = t, a = oe(n), o = Jn(i.to);
|
|
1975
1955
|
if (a.length === 0) throw Error("At least one file is required to send a document message");
|
|
1976
|
-
let s =
|
|
1956
|
+
let s = Wn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1977
1957
|
fileName: e.name,
|
|
1978
1958
|
id: `${e.id}`,
|
|
1979
1959
|
mimeType: e.mime,
|
|
@@ -1984,10 +1964,10 @@ var X = {
|
|
|
1984
1964
|
body: r,
|
|
1985
1965
|
documents: c
|
|
1986
1966
|
});
|
|
1987
|
-
},
|
|
1988
|
-
let { files: n, body: r, ...i } = t, a = oe(n), o =
|
|
1967
|
+
}, Xn = async (e, t) => {
|
|
1968
|
+
let { files: n, body: r, ...i } = t, a = oe(n), o = Jn(i.to);
|
|
1989
1969
|
if (a.length === 0) throw Error("At least one file is required to send an image message");
|
|
1990
|
-
let s =
|
|
1970
|
+
let s = Wn(e), c = (await s.uploadFiles(o, a)).map((e) => ({
|
|
1991
1971
|
id: `${e.id}`,
|
|
1992
1972
|
mimeType: e.mime,
|
|
1993
1973
|
name: e.name
|
|
@@ -1997,78 +1977,118 @@ var X = {
|
|
|
1997
1977
|
body: r,
|
|
1998
1978
|
images: c
|
|
1999
1979
|
});
|
|
2000
|
-
},
|
|
1980
|
+
}, Zn = async (e, t) => Wn(e).sendTextMessage(t);
|
|
2001
1981
|
//#endregion
|
|
2002
|
-
//#region src/modules/messages/
|
|
2003
|
-
function
|
|
1982
|
+
//#region src/modules/messages/messagesService.ts
|
|
1983
|
+
function Qn(e) {
|
|
2004
1984
|
return {
|
|
2005
|
-
fetchMessageHistory: (t, n) =>
|
|
2006
|
-
sendTextMessage: (t) =>
|
|
2007
|
-
sendDocumentMessage: (t) =>
|
|
2008
|
-
sendImageMessage: (t) =>
|
|
1985
|
+
fetchMessageHistory: (t, n) => qn(e, t, n),
|
|
1986
|
+
sendTextMessage: (t) => Zn(e, t),
|
|
1987
|
+
sendDocumentMessage: (t) => Yn(e, t),
|
|
1988
|
+
sendImageMessage: (t) => Xn(e, t)
|
|
2009
1989
|
};
|
|
2010
1990
|
}
|
|
2011
1991
|
//#endregion
|
|
1992
|
+
//#region src/modules/messages/classes/Message.class.ts
|
|
1993
|
+
var $n = class {
|
|
1994
|
+
_serviceConfig;
|
|
1995
|
+
_messagesService;
|
|
1996
|
+
id;
|
|
1997
|
+
constructor(e, { serviceConfig: t }) {
|
|
1998
|
+
this._serviceConfig = t, this._messagesService = Qn(t);
|
|
1999
|
+
let { id: n, ...r } = e;
|
|
2000
|
+
Object.assign(this, r), this.id = n;
|
|
2001
|
+
}
|
|
2002
|
+
get serviceConfig() {
|
|
2003
|
+
return this._serviceConfig;
|
|
2004
|
+
}
|
|
2005
|
+
get messagesService() {
|
|
2006
|
+
return this._messagesService;
|
|
2007
|
+
}
|
|
2008
|
+
async markRead() {
|
|
2009
|
+
throw Error("Method not implemented.");
|
|
2010
|
+
}
|
|
2011
|
+
};
|
|
2012
|
+
function er(e, { serviceConfig: t }) {
|
|
2013
|
+
return new $n(e, { serviceConfig: t });
|
|
2014
|
+
}
|
|
2015
|
+
//#endregion
|
|
2016
|
+
//#region src/modules/messages/enums/MessageAttachmentType.enum.ts
|
|
2017
|
+
var tr = {
|
|
2018
|
+
Documents: "documents",
|
|
2019
|
+
Images: "images"
|
|
2020
|
+
};
|
|
2021
|
+
//#endregion
|
|
2022
|
+
//#region src/modules/messages/utils/routeMessageSend.ts
|
|
2023
|
+
async function nr(e, t, { body: n, attachments: r }, { sendId: i } = {}) {
|
|
2024
|
+
switch (r?.type) {
|
|
2025
|
+
case tr.Images: return e.sendImageMessage({
|
|
2026
|
+
files: r.files,
|
|
2027
|
+
body: n,
|
|
2028
|
+
sendId: i,
|
|
2029
|
+
to: t
|
|
2030
|
+
});
|
|
2031
|
+
case tr.Documents: return e.sendDocumentMessage({
|
|
2032
|
+
files: r.files,
|
|
2033
|
+
body: n,
|
|
2034
|
+
sendId: i,
|
|
2035
|
+
to: t
|
|
2036
|
+
});
|
|
2037
|
+
default: return e.sendTextMessage({
|
|
2038
|
+
body: n ?? "",
|
|
2039
|
+
sendId: i,
|
|
2040
|
+
to: t
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
2044
|
+
//#endregion
|
|
2012
2045
|
//#region src/modules/contacts/classes/Contact.class.ts
|
|
2013
|
-
var
|
|
2046
|
+
var rr = class {
|
|
2014
2047
|
_serviceConfig;
|
|
2048
|
+
_messagesService;
|
|
2015
2049
|
sub;
|
|
2016
2050
|
iss;
|
|
2017
2051
|
constructor(e, { serviceConfig: t }) {
|
|
2018
|
-
|
|
2052
|
+
this._serviceConfig = t, this._messagesService = Qn(t);
|
|
2053
|
+
let { sub: n, iss: r, ...i } = e;
|
|
2054
|
+
Object.assign(this, i), this.sub = n, this.iss = r;
|
|
2019
2055
|
}
|
|
2020
|
-
async sendMessage(
|
|
2021
|
-
|
|
2056
|
+
async sendMessage(e, t = {}) {
|
|
2057
|
+
return nr(this.messagesService, { contact: {
|
|
2022
2058
|
sub: this.sub,
|
|
2023
2059
|
iss: this.iss
|
|
2024
|
-
} };
|
|
2025
|
-
switch (t?.type) {
|
|
2026
|
-
case X.Images: return r.sendImageMessage({
|
|
2027
|
-
files: t.files,
|
|
2028
|
-
body: e,
|
|
2029
|
-
sendId: n,
|
|
2030
|
-
to: i
|
|
2031
|
-
});
|
|
2032
|
-
case X.Documents: return r.sendDocumentMessage({
|
|
2033
|
-
files: t.files,
|
|
2034
|
-
body: e,
|
|
2035
|
-
sendId: n,
|
|
2036
|
-
to: i
|
|
2037
|
-
});
|
|
2038
|
-
default: return r.sendTextMessage({
|
|
2039
|
-
body: e ?? "",
|
|
2040
|
-
sendId: n,
|
|
2041
|
-
to: i
|
|
2042
|
-
});
|
|
2043
|
-
}
|
|
2060
|
+
} }, e, t);
|
|
2044
2061
|
}
|
|
2045
2062
|
get serviceConfig() {
|
|
2046
2063
|
return this._serviceConfig;
|
|
2047
2064
|
}
|
|
2065
|
+
get messagesService() {
|
|
2066
|
+
return this._messagesService;
|
|
2067
|
+
}
|
|
2048
2068
|
};
|
|
2049
|
-
function
|
|
2050
|
-
return new
|
|
2069
|
+
function ir(e, { serviceConfig: t }) {
|
|
2070
|
+
return new rr(e, { serviceConfig: t });
|
|
2051
2071
|
}
|
|
2052
2072
|
//#endregion
|
|
2053
2073
|
//#region src/modules/contacts/api/Contacts.api.ts
|
|
2054
|
-
var
|
|
2074
|
+
var ar = ({ axiosInstance: e }) => ({ getContactsList: async (t = {}) => {
|
|
2055
2075
|
let n = r(t, [l()]);
|
|
2056
2076
|
return r((await e.get("/v1/contacts", { params: n })).data, [A()]);
|
|
2057
|
-
} }),
|
|
2058
|
-
let n = await
|
|
2077
|
+
} }), or = (e) => async (t = {}) => await ar(e).getContactsList(t), sr = (e, { serviceConfig: t }) => e.map((e) => ir(e, { serviceConfig: t })), cr = async (e, t = {}) => {
|
|
2078
|
+
let n = await or(e)(t);
|
|
2059
2079
|
return {
|
|
2060
2080
|
...n,
|
|
2061
|
-
items:
|
|
2081
|
+
items: sr(n.items ?? [], { serviceConfig: e })
|
|
2062
2082
|
};
|
|
2063
2083
|
};
|
|
2064
2084
|
//#endregion
|
|
2065
|
-
//#region src/modules/contacts/
|
|
2066
|
-
function
|
|
2067
|
-
return { fetchContacts: (t) =>
|
|
2085
|
+
//#region src/modules/contacts/contactsService.ts
|
|
2086
|
+
function lr(e) {
|
|
2087
|
+
return { fetchContacts: (t) => cr(e, t) };
|
|
2068
2088
|
}
|
|
2069
2089
|
//#endregion
|
|
2070
2090
|
//#region node_modules/mitt/dist/mitt.mjs
|
|
2071
|
-
function
|
|
2091
|
+
function ur(e) {
|
|
2072
2092
|
return {
|
|
2073
2093
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
2074
2094
|
on: function(t, n) {
|
|
@@ -2105,7 +2125,7 @@ var Q = {
|
|
|
2105
2125
|
ThreadCreated: "threadCreatedEvent",
|
|
2106
2126
|
Ack: "ackEvent",
|
|
2107
2127
|
Ping: "pingEvent"
|
|
2108
|
-
},
|
|
2128
|
+
}, dr = ({ axiosInstance: e }) => ({
|
|
2109
2129
|
addMember: async (t, { contact: n, role: i }) => r((await e.post(`/v1/threads/${t}/members`, {
|
|
2110
2130
|
contact: {
|
|
2111
2131
|
sub: n.sub,
|
|
@@ -2114,90 +2134,74 @@ var Q = {
|
|
|
2114
2134
|
role: i
|
|
2115
2135
|
})).data, [A()]),
|
|
2116
2136
|
removeMember: async (t, { id: n }) => r((await e.delete(`/v1/threads/${t}/members/${n}`)).data, [A()])
|
|
2117
|
-
}),
|
|
2137
|
+
}), fr = (e) => async (t, n) => dr(e).removeMember(t, n), pr = class {
|
|
2118
2138
|
_serviceConfig;
|
|
2119
|
-
|
|
2139
|
+
_threadId;
|
|
2120
2140
|
id;
|
|
2121
2141
|
contact;
|
|
2122
2142
|
constructor(e, { serviceConfig: t, threadId: n }) {
|
|
2123
|
-
|
|
2143
|
+
this._serviceConfig = t, this._threadId = n;
|
|
2144
|
+
let { id: r, contact: i, ...a } = e;
|
|
2145
|
+
Object.assign(this, a), this.id = r, this.contact = ir(i, { serviceConfig: t });
|
|
2124
2146
|
}
|
|
2125
2147
|
async removeFromThread() {
|
|
2126
|
-
return
|
|
2148
|
+
return fr(this._serviceConfig)(this.threadId, { id: this.id });
|
|
2149
|
+
}
|
|
2150
|
+
get threadId() {
|
|
2151
|
+
return this._threadId;
|
|
2127
2152
|
}
|
|
2128
2153
|
};
|
|
2129
|
-
function
|
|
2130
|
-
|
|
2131
|
-
return new fr({
|
|
2132
|
-
...e,
|
|
2133
|
-
contact: r
|
|
2134
|
-
}, {
|
|
2154
|
+
function mr(e, { serviceConfig: t, threadId: n }) {
|
|
2155
|
+
return new pr(e, {
|
|
2135
2156
|
serviceConfig: t,
|
|
2136
2157
|
threadId: n
|
|
2137
2158
|
});
|
|
2138
2159
|
}
|
|
2139
2160
|
//#endregion
|
|
2140
2161
|
//#region src/modules/threads/modules/members/utils/addMember.ts
|
|
2141
|
-
var
|
|
2162
|
+
var hr = (e) => async (t, n) => dr(e).addMember(t, n), gr = class {
|
|
2142
2163
|
_serviceConfig;
|
|
2164
|
+
_messagesService;
|
|
2143
2165
|
id;
|
|
2144
|
-
members
|
|
2166
|
+
members;
|
|
2145
2167
|
constructor(e, { serviceConfig: t }) {
|
|
2146
|
-
|
|
2168
|
+
this._serviceConfig = t, this._messagesService = Qn(t);
|
|
2169
|
+
let { id: n, members: r, ...i } = e;
|
|
2170
|
+
Object.assign(this, i), this.id = n, this.members = (r ?? []).map((e) => mr(e, {
|
|
2171
|
+
serviceConfig: t,
|
|
2172
|
+
threadId: n
|
|
2173
|
+
}));
|
|
2147
2174
|
}
|
|
2148
2175
|
async fetchMessageHistory(e) {
|
|
2149
|
-
return
|
|
2150
|
-
}
|
|
2151
|
-
async sendMessage(
|
|
2152
|
-
|
|
2153
|
-
switch (t?.type) {
|
|
2154
|
-
case X.Images: return r.sendImageMessage({
|
|
2155
|
-
files: t.files,
|
|
2156
|
-
body: e,
|
|
2157
|
-
sendId: n,
|
|
2158
|
-
to: i
|
|
2159
|
-
});
|
|
2160
|
-
case X.Documents: return r.sendDocumentMessage({
|
|
2161
|
-
files: t.files,
|
|
2162
|
-
body: e,
|
|
2163
|
-
sendId: n,
|
|
2164
|
-
to: i
|
|
2165
|
-
});
|
|
2166
|
-
default: return r.sendTextMessage({
|
|
2167
|
-
body: e ?? "",
|
|
2168
|
-
sendId: n,
|
|
2169
|
-
to: i
|
|
2170
|
-
});
|
|
2171
|
-
}
|
|
2176
|
+
return this.messagesService.fetchMessageHistory(this.id, e);
|
|
2177
|
+
}
|
|
2178
|
+
async sendMessage(e, t = {}) {
|
|
2179
|
+
return nr(this.messagesService, { threadId: this.id }, e, t);
|
|
2172
2180
|
}
|
|
2173
2181
|
async addMember(e) {
|
|
2174
|
-
return
|
|
2182
|
+
return hr(this.serviceConfig)(this.id, e);
|
|
2175
2183
|
}
|
|
2176
2184
|
async removeMember(e) {
|
|
2177
|
-
return
|
|
2185
|
+
return fr(this.serviceConfig)(this.id, e);
|
|
2178
2186
|
}
|
|
2179
2187
|
get serviceConfig() {
|
|
2180
2188
|
return this._serviceConfig;
|
|
2181
2189
|
}
|
|
2190
|
+
get messagesService() {
|
|
2191
|
+
return this._messagesService;
|
|
2192
|
+
}
|
|
2182
2193
|
};
|
|
2183
|
-
function
|
|
2184
|
-
|
|
2185
|
-
serviceConfig: t,
|
|
2186
|
-
threadId: e.id
|
|
2187
|
-
}));
|
|
2188
|
-
return new hr({
|
|
2189
|
-
...e,
|
|
2190
|
-
members: n
|
|
2191
|
-
}, { serviceConfig: t });
|
|
2194
|
+
function _r(e, { serviceConfig: t }) {
|
|
2195
|
+
return new gr(e, { serviceConfig: t });
|
|
2192
2196
|
}
|
|
2193
2197
|
//#endregion
|
|
2194
2198
|
//#region src/modules/socket/utils/instantiateSocketEventEntities.ts
|
|
2195
|
-
function
|
|
2196
|
-
return e.name === $.ThreadMessage ?
|
|
2199
|
+
function vr(e, { serviceConfig: t }) {
|
|
2200
|
+
return e.name === $.ThreadMessage ? er(e.payload, { serviceConfig: t }) : _r(e.payload, { serviceConfig: t });
|
|
2197
2201
|
}
|
|
2198
2202
|
//#endregion
|
|
2199
2203
|
//#region src/modules/socket/utils/processSocketEventPayload.ts
|
|
2200
|
-
function
|
|
2204
|
+
function yr(e) {
|
|
2201
2205
|
if (e.connectedEvent) return $.Connected;
|
|
2202
2206
|
if (e.disconnectedEvent) return $.Disconnected;
|
|
2203
2207
|
if (e.errorEvent) return $.Error;
|
|
@@ -2207,7 +2211,7 @@ function vr(e) {
|
|
|
2207
2211
|
if (e.pingEvent) return $.Ping;
|
|
2208
2212
|
throw Error(`Unknown event: ${JSON.stringify(e)}`);
|
|
2209
2213
|
}
|
|
2210
|
-
function
|
|
2214
|
+
function br(e, t) {
|
|
2211
2215
|
switch (t) {
|
|
2212
2216
|
case $.Connected: return e.connectedEvent;
|
|
2213
2217
|
case $.Disconnected: return e.disconnectedEvent;
|
|
@@ -2216,29 +2220,42 @@ function yr(e, t) {
|
|
|
2216
2220
|
case $.ThreadCreated: return e.threadCreatedEvent;
|
|
2217
2221
|
case $.Ack: return e.ackEvent;
|
|
2218
2222
|
case $.Ping: return e.pingEvent;
|
|
2223
|
+
default: return t;
|
|
2219
2224
|
}
|
|
2220
2225
|
}
|
|
2221
|
-
function
|
|
2222
|
-
let n =
|
|
2226
|
+
function xr(e, { serviceConfig: t }) {
|
|
2227
|
+
let n = yr(e);
|
|
2223
2228
|
return {
|
|
2224
2229
|
eventName: n,
|
|
2225
|
-
eventPayload:
|
|
2230
|
+
eventPayload: Sr({
|
|
2226
2231
|
name: n,
|
|
2227
|
-
payload:
|
|
2232
|
+
payload: br(e, n)
|
|
2228
2233
|
}, { serviceConfig: t })
|
|
2229
2234
|
};
|
|
2230
2235
|
}
|
|
2231
|
-
function
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
+
function Sr({ name: e, payload: t }, { serviceConfig: n }) {
|
|
2237
|
+
switch (e) {
|
|
2238
|
+
case $.ThreadMessage: return vr({
|
|
2239
|
+
name: e,
|
|
2240
|
+
payload: t
|
|
2241
|
+
}, { serviceConfig: n });
|
|
2242
|
+
case $.ThreadCreated: return vr({
|
|
2243
|
+
name: e,
|
|
2244
|
+
payload: t
|
|
2245
|
+
}, { serviceConfig: n });
|
|
2246
|
+
case $.Connected:
|
|
2247
|
+
case $.Disconnected:
|
|
2248
|
+
case $.Error:
|
|
2249
|
+
case $.Ack:
|
|
2250
|
+
case $.Ping: return t;
|
|
2251
|
+
default: return e;
|
|
2252
|
+
}
|
|
2236
2253
|
}
|
|
2237
2254
|
//#endregion
|
|
2238
|
-
//#region src/modules/socket/classes/
|
|
2239
|
-
var
|
|
2240
|
-
emitter =
|
|
2241
|
-
stateEmitter =
|
|
2255
|
+
//#region src/modules/socket/classes/ChatsSocketClient.ts
|
|
2256
|
+
var Cr = class {
|
|
2257
|
+
emitter = ur();
|
|
2258
|
+
stateEmitter = ur();
|
|
2242
2259
|
socketConfig;
|
|
2243
2260
|
serviceConfig;
|
|
2244
2261
|
ws = null;
|
|
@@ -2262,8 +2279,16 @@ var Sr = class {
|
|
|
2262
2279
|
}, this.ws.onclose = () => {
|
|
2263
2280
|
this.setConnectionState(Q.Disconnected), this.ws = null, t(/* @__PURE__ */ Error("socket disconnected"));
|
|
2264
2281
|
}, this.ws.onmessage = (t) => {
|
|
2265
|
-
|
|
2266
|
-
|
|
2282
|
+
try {
|
|
2283
|
+
let { eventName: n, eventPayload: i } = xr(r(JSON.parse(t.data), [A()]).payload, { serviceConfig: this.serviceConfig });
|
|
2284
|
+
n === $.Connected && e(), this.emitter.emit(n, i);
|
|
2285
|
+
} catch (e) {
|
|
2286
|
+
this.emitter.emit($.Error, {
|
|
2287
|
+
code: -1,
|
|
2288
|
+
message: "SDK failed to parse incoming socket event. Check \"details.cause\" for the original error.",
|
|
2289
|
+
details: { cause: e instanceof Error ? e.message : String(e) }
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2267
2292
|
};
|
|
2268
2293
|
});
|
|
2269
2294
|
}
|
|
@@ -2280,21 +2305,21 @@ var Sr = class {
|
|
|
2280
2305
|
this.stateEmitter.on(e, t);
|
|
2281
2306
|
}
|
|
2282
2307
|
};
|
|
2283
|
-
function
|
|
2284
|
-
return new
|
|
2308
|
+
function wr({ socketConfig: e, serviceConfig: t }) {
|
|
2309
|
+
return new Cr({
|
|
2285
2310
|
socketConfig: e,
|
|
2286
2311
|
serviceConfig: t
|
|
2287
2312
|
});
|
|
2288
2313
|
}
|
|
2289
2314
|
//#endregion
|
|
2290
2315
|
//#region node_modules/@webitel/api-services/src/gen/_models/webitelImApiGatewayV1ThreadRole.ts
|
|
2291
|
-
var
|
|
2316
|
+
var Tr = {
|
|
2292
2317
|
RoleUnspecified: "ROLE_UNSPECIFIED",
|
|
2293
2318
|
RoleMember: "ROLE_MEMBER",
|
|
2294
2319
|
RoleAdmin: "ROLE_ADMIN",
|
|
2295
2320
|
RoleOwner: "ROLE_OWNER",
|
|
2296
2321
|
RoleSupervisor: "ROLE_SUPERVISOR"
|
|
2297
|
-
},
|
|
2322
|
+
}, Er = ({ axiosInstance: e }) => ({
|
|
2298
2323
|
getThreadsList: async (t = {}) => {
|
|
2299
2324
|
let n = r(t, [l()]);
|
|
2300
2325
|
return r((await e.get("/v1/threads", { params: n })).data, [A()]);
|
|
@@ -2304,24 +2329,24 @@ var wr = {
|
|
|
2304
2329
|
if (!i) throw Error(`Thread not found: ${t}`);
|
|
2305
2330
|
return i;
|
|
2306
2331
|
}
|
|
2307
|
-
}),
|
|
2308
|
-
let n = await
|
|
2332
|
+
}), Dr = (e) => async (t = {}) => await Er(e).getThreadsList(t), Or = (e, { serviceConfig: t }) => e.map((e) => _r(e, { serviceConfig: t })), kr = async (e, t = {}) => {
|
|
2333
|
+
let n = await Dr(e)(t);
|
|
2309
2334
|
return {
|
|
2310
2335
|
...n,
|
|
2311
|
-
items:
|
|
2336
|
+
items: Or(n.items ?? [], { serviceConfig: e })
|
|
2312
2337
|
};
|
|
2313
|
-
},
|
|
2338
|
+
}, Ar = (e) => async (t) => Er(e).getThread(t), jr = async (e, t) => _r(await Ar(e)(t), { serviceConfig: e });
|
|
2314
2339
|
//#endregion
|
|
2315
|
-
//#region src/modules/threads/
|
|
2316
|
-
function
|
|
2340
|
+
//#region src/modules/threads/threadsService.ts
|
|
2341
|
+
function Mr(e) {
|
|
2317
2342
|
return {
|
|
2318
|
-
fetchThread: (t) =>
|
|
2319
|
-
fetchThreads: (t) =>
|
|
2320
|
-
addMember: (t, n) =>
|
|
2321
|
-
removeMember: (t, n) =>
|
|
2343
|
+
fetchThread: (t) => jr(e, t),
|
|
2344
|
+
fetchThreads: (t) => kr(e, t),
|
|
2345
|
+
addMember: (t, n) => hr(e)(t, n),
|
|
2346
|
+
removeMember: (t, n) => fr(e)(t, n)
|
|
2322
2347
|
};
|
|
2323
2348
|
}
|
|
2324
2349
|
//#endregion
|
|
2325
|
-
export { Q as ChatsSocketConnectionStatus, $ as ChatsSocketMessage,
|
|
2350
|
+
export { Q as ChatsSocketConnectionStatus, $ as ChatsSocketMessage, tr as MessageAttachmentType, Tr as ThreadMemberRole, le as createAccountService, wr as createChatsSocketClient, lr as createContactsService, Qn as createMessagesService, Vn as createServiceConfig, Un as createSocketConfig, Mr as createThreadsService };
|
|
2326
2351
|
|
|
2327
2352
|
//# sourceMappingURL=index.js.map
|