dev-classes 1.3.21 → 1.3.23
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ut = Object.defineProperty;
|
|
2
2
|
var lt = (e, t, n) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var x = (e, t, n) => (lt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { ErrorsHandler as ft } from "./ErrorsHandler/ErrorsHandler.js";
|
|
5
5
|
import { SaveRequest as Re } from "./SaveRequest/SaveRequest.js";
|
|
6
6
|
import { Utils as Oe } from "../../../Utils/Utils.js";
|
|
@@ -14,22 +14,22 @@ const { toString: dt } = Object.prototype, { getPrototypeOf: he } = Object, G =
|
|
|
14
14
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
15
|
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => G(t) === e), X = (e) => (t) => typeof t === e, { isArray: _ } = Array, H = X("undefined");
|
|
16
16
|
function pt(e) {
|
|
17
|
-
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) &&
|
|
17
|
+
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && N(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
18
|
}
|
|
19
19
|
const He = U("ArrayBuffer");
|
|
20
20
|
function ht(e) {
|
|
21
21
|
let t;
|
|
22
22
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && He(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const mt = X("string"),
|
|
24
|
+
const mt = X("string"), N = X("function"), ve = X("number"), Q = (e) => e !== null && typeof e == "object", yt = (e) => e === !0 || e === !1, z = (e) => {
|
|
25
25
|
if (G(e) !== "object")
|
|
26
26
|
return !1;
|
|
27
27
|
const t = he(e);
|
|
28
28
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
29
|
-
}, wt = U("Date"), gt = U("File"), bt = U("Blob"), Et = U("FileList"), St = (e) => Q(e) &&
|
|
29
|
+
}, wt = U("Date"), gt = U("File"), bt = U("Blob"), Et = U("FileList"), St = (e) => Q(e) && N(e.pipe), Rt = (e) => {
|
|
30
30
|
let t;
|
|
31
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
32
|
-
t === "object" &&
|
|
31
|
+
return e && (typeof FormData == "function" && e instanceof FormData || N(e.append) && ((t = G(e)) === "formdata" || // detect form-data instance
|
|
32
|
+
t === "object" && N(e.toString) && e.toString() === "[object FormData]"));
|
|
33
33
|
}, Ot = U("URLSearchParams"), [Tt, At, Ct, xt] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Nt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
34
34
|
function v(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
35
|
if (e === null || typeof e > "u")
|
|
@@ -65,7 +65,7 @@ function ie() {
|
|
|
65
65
|
return t;
|
|
66
66
|
}
|
|
67
67
|
const Pt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
68
|
-
n &&
|
|
68
|
+
n && N(s) ? e[o] = Ie(s, n) : e[o] = s;
|
|
69
69
|
}, { allOwnKeys: r }), e), kt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ft = (e, t, n, r) => {
|
|
70
70
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
71
71
|
value: t.prototype
|
|
@@ -123,10 +123,10 @@ const Pt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
|
123
123
|
}), Object.defineProperties(e, r);
|
|
124
124
|
}, vt = (e) => {
|
|
125
125
|
Je(e, (t, n) => {
|
|
126
|
-
if (
|
|
126
|
+
if (N(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
127
127
|
return !1;
|
|
128
128
|
const r = e[n];
|
|
129
|
-
if (
|
|
129
|
+
if (N(r)) {
|
|
130
130
|
if (t.enumerable = !1, "writable" in t) {
|
|
131
131
|
t.writable = !1;
|
|
132
132
|
return;
|
|
@@ -156,7 +156,7 @@ const Pt = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
|
156
156
|
return n;
|
|
157
157
|
};
|
|
158
158
|
function Vt(e) {
|
|
159
|
-
return !!(e &&
|
|
159
|
+
return !!(e && N(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
160
160
|
}
|
|
161
161
|
const Wt = (e) => {
|
|
162
162
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -175,13 +175,13 @@ const Wt = (e) => {
|
|
|
175
175
|
return r;
|
|
176
176
|
};
|
|
177
177
|
return n(e, 0);
|
|
178
|
-
}, Kt = U("AsyncFunction"), Gt = (e) => e && (Q(e) ||
|
|
178
|
+
}, Kt = U("AsyncFunction"), Gt = (e) => e && (Q(e) || N(e)) && N(e.then) && N(e.catch), Ve = ((e, t) => e ? setImmediate : t ? ((n, r) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
179
179
|
s === B && o === n && r.length && r.shift()();
|
|
180
180
|
}, !1), (s) => {
|
|
181
181
|
r.push(s), B.postMessage(n, "*");
|
|
182
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
183
183
|
typeof setImmediate == "function",
|
|
184
|
-
|
|
184
|
+
N(B.postMessage)
|
|
185
185
|
), Xt = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || Ve, a = {
|
|
186
186
|
isArray: _,
|
|
187
187
|
isArrayBuffer: He,
|
|
@@ -202,7 +202,7 @@ const Wt = (e) => {
|
|
|
202
202
|
isFile: gt,
|
|
203
203
|
isBlob: bt,
|
|
204
204
|
isRegExp: Ht,
|
|
205
|
-
isFunction:
|
|
205
|
+
isFunction: N,
|
|
206
206
|
isStream: St,
|
|
207
207
|
isURLSearchParams: Ot,
|
|
208
208
|
isTypedArray: Bt,
|
|
@@ -338,17 +338,17 @@ function Z(e, t, n) {
|
|
|
338
338
|
if (a.endsWith(h, "{}"))
|
|
339
339
|
h = r ? h : h.slice(0, -2), d = JSON.stringify(d);
|
|
340
340
|
else if (a.isArray(d) && Zt(d) || (a.isFileList(d) || a.endsWith(h, "[]")) && (g = a.toArray(d)))
|
|
341
|
-
return h = Ge(h), g.forEach(function(O,
|
|
341
|
+
return h = Ge(h), g.forEach(function(O, E) {
|
|
342
342
|
!(a.isUndefined(O) || O === null) && t.append(
|
|
343
343
|
// eslint-disable-next-line no-nested-ternary
|
|
344
|
-
i === !0 ? Ce([h],
|
|
344
|
+
i === !0 ? Ce([h], E, o) : i === null ? h : h + "[]",
|
|
345
345
|
u(O)
|
|
346
346
|
);
|
|
347
347
|
}), !1;
|
|
348
348
|
}
|
|
349
349
|
return ae(d) ? !0 : (t.append(Ce(p, h, o), u(d)), !1);
|
|
350
350
|
}
|
|
351
|
-
const m = [],
|
|
351
|
+
const m = [], S = Object.assign(Yt, {
|
|
352
352
|
defaultVisitor: l,
|
|
353
353
|
convertValue: u,
|
|
354
354
|
isVisitable: ae
|
|
@@ -363,7 +363,7 @@ function Z(e, t, n) {
|
|
|
363
363
|
g,
|
|
364
364
|
a.isString(b) ? b.trim() : b,
|
|
365
365
|
h,
|
|
366
|
-
|
|
366
|
+
S
|
|
367
367
|
)) === !0 && R(g, h ? h.concat(b) : [b]);
|
|
368
368
|
}), m.pop();
|
|
369
369
|
}
|
|
@@ -838,13 +838,13 @@ function Sn(e, t) {
|
|
|
838
838
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
839
839
|
const u = Date.now(), l = r[o];
|
|
840
840
|
i || (i = u), n[s] = f, r[s] = u;
|
|
841
|
-
let m = o,
|
|
841
|
+
let m = o, S = 0;
|
|
842
842
|
for (; m !== s; )
|
|
843
|
-
|
|
843
|
+
S += n[m++], m = m % e;
|
|
844
844
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
845
845
|
return;
|
|
846
846
|
const R = l && u - l;
|
|
847
|
-
return R ? Math.round(
|
|
847
|
+
return R ? Math.round(S * 1e3 / R) : void 0;
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
function Rn(e, t) {
|
|
@@ -1015,8 +1015,8 @@ function j(e, t) {
|
|
|
1015
1015
|
headers: (u, l) => s(Ue(u), Ue(l), !0)
|
|
1016
1016
|
};
|
|
1017
1017
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1018
|
-
const m = f[l] || s,
|
|
1019
|
-
a.isUndefined(
|
|
1018
|
+
const m = f[l] || s, S = m(e[l], t[l], l);
|
|
1019
|
+
a.isUndefined(S) && m !== c || (n[l] = S);
|
|
1020
1020
|
}), n;
|
|
1021
1021
|
}
|
|
1022
1022
|
const rt = (e) => {
|
|
@@ -1045,7 +1045,7 @@ const rt = (e) => {
|
|
|
1045
1045
|
const s = rt(e);
|
|
1046
1046
|
let o = s.data;
|
|
1047
1047
|
const i = F.from(s.headers).normalize();
|
|
1048
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, m,
|
|
1048
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, m, S, R, d;
|
|
1049
1049
|
function h() {
|
|
1050
1050
|
R && R(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1051
1051
|
}
|
|
@@ -1077,17 +1077,17 @@ const rt = (e) => {
|
|
|
1077
1077
|
}, p.onerror = function() {
|
|
1078
1078
|
r(new y("Network Error", y.ERR_NETWORK, e, p)), p = null;
|
|
1079
1079
|
}, p.ontimeout = function() {
|
|
1080
|
-
let
|
|
1080
|
+
let E = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1081
1081
|
const A = s.transitional || Ze;
|
|
1082
|
-
s.timeoutErrorMessage && (
|
|
1083
|
-
|
|
1082
|
+
s.timeoutErrorMessage && (E = s.timeoutErrorMessage), r(new y(
|
|
1083
|
+
E,
|
|
1084
1084
|
A.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1085
1085
|
e,
|
|
1086
1086
|
p
|
|
1087
1087
|
)), p = null;
|
|
1088
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(
|
|
1089
|
-
p.setRequestHeader(A,
|
|
1090
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([
|
|
1088
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(E, A) {
|
|
1089
|
+
p.setRequestHeader(A, E);
|
|
1090
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([S, d] = V(u, !0), p.addEventListener("progress", S)), f && p.upload && ([m, R] = V(f), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (l = (O) => {
|
|
1091
1091
|
p && (r(!O || O.type ? new q(null, e, p) : O), p.abort(), p = null);
|
|
1092
1092
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1093
1093
|
const b = En(s.url);
|
|
@@ -1163,8 +1163,8 @@ const rt = (e) => {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
let m = l.byteLength;
|
|
1165
1165
|
if (n) {
|
|
1166
|
-
let
|
|
1167
|
-
n(
|
|
1166
|
+
let S = o += m;
|
|
1167
|
+
n(S);
|
|
1168
1168
|
}
|
|
1169
1169
|
f.enqueue(new Uint8Array(l));
|
|
1170
1170
|
} catch (u) {
|
|
@@ -1233,7 +1233,7 @@ const jn = async (e) => {
|
|
|
1233
1233
|
responseType: u,
|
|
1234
1234
|
headers: l,
|
|
1235
1235
|
withCredentials: m = "same-origin",
|
|
1236
|
-
fetchOptions:
|
|
1236
|
+
fetchOptions: S
|
|
1237
1237
|
} = rt(e);
|
|
1238
1238
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1239
1239
|
let R = kn([s, o && o.toAbortSignal()], i), d;
|
|
@@ -1247,8 +1247,8 @@ const jn = async (e) => {
|
|
|
1247
1247
|
method: "POST",
|
|
1248
1248
|
body: r,
|
|
1249
1249
|
duplex: "half"
|
|
1250
|
-
}),
|
|
1251
|
-
if (a.isFormData(r) && (
|
|
1250
|
+
}), P;
|
|
1251
|
+
if (a.isFormData(r) && (P = A.headers.get("content-type")) && l.setContentType(P), A.body) {
|
|
1252
1252
|
const [k, L] = ke(
|
|
1253
1253
|
p,
|
|
1254
1254
|
V(Fe(f))
|
|
@@ -1259,7 +1259,7 @@ const jn = async (e) => {
|
|
|
1259
1259
|
a.isString(m) || (m = m ? "include" : "omit");
|
|
1260
1260
|
const g = "credentials" in Request.prototype;
|
|
1261
1261
|
d = new Request(t, {
|
|
1262
|
-
...
|
|
1262
|
+
...S,
|
|
1263
1263
|
signal: R,
|
|
1264
1264
|
method: n.toUpperCase(),
|
|
1265
1265
|
headers: l.normalize().toJSON(),
|
|
@@ -1274,8 +1274,8 @@ const jn = async (e) => {
|
|
|
1274
1274
|
["status", "statusText", "headers"].forEach((Se) => {
|
|
1275
1275
|
A[Se] = b[Se];
|
|
1276
1276
|
});
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1277
|
+
const P = a.toFiniteNumber(b.headers.get("content-length")), [k, L] = c && ke(
|
|
1278
|
+
P,
|
|
1279
1279
|
V(Fe(c), !0)
|
|
1280
1280
|
) || [];
|
|
1281
1281
|
b = new Response(
|
|
@@ -1286,10 +1286,10 @@ const jn = async (e) => {
|
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
1288
|
u = u || "text";
|
|
1289
|
-
let
|
|
1290
|
-
return !O && h && h(), await new Promise((A,
|
|
1291
|
-
tt(A,
|
|
1292
|
-
data:
|
|
1289
|
+
let E = await W[a.findKey(W, u) || "text"](b, e);
|
|
1290
|
+
return !O && h && h(), await new Promise((A, P) => {
|
|
1291
|
+
tt(A, P, {
|
|
1292
|
+
data: E,
|
|
1293
1293
|
headers: F.from(b.headers),
|
|
1294
1294
|
status: b.status,
|
|
1295
1295
|
statusText: b.statusText,
|
|
@@ -1482,16 +1482,16 @@ class K {
|
|
|
1482
1482
|
this.interceptors.response.forEach(function(h) {
|
|
1483
1483
|
u.push(h.fulfilled, h.rejected);
|
|
1484
1484
|
});
|
|
1485
|
-
let l, m = 0,
|
|
1485
|
+
let l, m = 0, S;
|
|
1486
1486
|
if (!f) {
|
|
1487
1487
|
const d = [je.bind(this), void 0];
|
|
1488
|
-
for (d.unshift.apply(d, c), d.push.apply(d, u),
|
|
1488
|
+
for (d.unshift.apply(d, c), d.push.apply(d, u), S = d.length, l = Promise.resolve(n); m < S; )
|
|
1489
1489
|
l = l.then(d[m++], d[m++]);
|
|
1490
1490
|
return l;
|
|
1491
1491
|
}
|
|
1492
|
-
|
|
1492
|
+
S = c.length;
|
|
1493
1493
|
let R = n;
|
|
1494
|
-
for (m = 0; m <
|
|
1494
|
+
for (m = 0; m < S; ) {
|
|
1495
1495
|
const d = c[m++], h = c[m++];
|
|
1496
1496
|
try {
|
|
1497
1497
|
R = d(R);
|
|
@@ -1505,7 +1505,7 @@ class K {
|
|
|
1505
1505
|
} catch (d) {
|
|
1506
1506
|
return Promise.reject(d);
|
|
1507
1507
|
}
|
|
1508
|
-
for (m = 0,
|
|
1508
|
+
for (m = 0, S = u.length; m < S; )
|
|
1509
1509
|
l = l.then(u[m++], u[m++]);
|
|
1510
1510
|
return l;
|
|
1511
1511
|
}
|
|
@@ -1794,10 +1794,10 @@ const w = class w {
|
|
|
1794
1794
|
w.errorsHandler = t;
|
|
1795
1795
|
}
|
|
1796
1796
|
};
|
|
1797
|
-
|
|
1797
|
+
x(w, "keyCookie", "AuthCookie"), x(w, "cookieOptions", {}), x(w, "registerRequest", new Re()), x(w, "registerFailedRequests", new Re()), x(w, "requestUploadToken", null), x(w, "errorsHandler", new ft()), x(w, "setMethodUploadToken", (t) => {
|
|
1798
1798
|
w.requestUploadToken = t;
|
|
1799
|
-
}),
|
|
1800
|
-
var m,
|
|
1799
|
+
}), x(w, "requestInServer", (t, n = {}) => new Promise((r, s) => {
|
|
1800
|
+
var m, S, R;
|
|
1801
1801
|
let o = { url: t, statusCode: 0, data: {}, res: {} };
|
|
1802
1802
|
const i = {
|
|
1803
1803
|
method: "get",
|
|
@@ -1813,28 +1813,28 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
|
|
|
1813
1813
|
request: c,
|
|
1814
1814
|
errExt: { message: u, status: f }
|
|
1815
1815
|
};
|
|
1816
|
-
if (window != null && window.cordova && ((
|
|
1816
|
+
if (window != null && window.cordova && ((S = (m = window == null ? void 0 : window.cordova) == null ? void 0 : m.plugin) != null && S.http)) {
|
|
1817
1817
|
const { http: d } = (R = window == null ? void 0 : window.cordova) == null ? void 0 : R.plugin;
|
|
1818
1818
|
d.setDataSerializer("json"), d.setRequestTimeout(Number(c.timeout) / 1e3), w.registerRequest.setList({ url: t, options: c }), d.sendRequest(
|
|
1819
1819
|
t,
|
|
1820
1820
|
c,
|
|
1821
1821
|
(h) => {
|
|
1822
|
-
|
|
1822
|
+
w.registerFailedRequests.removeItem(t), w.registerRequest.removeItem(t);
|
|
1823
1823
|
const p = (h == null ? void 0 : h.headers) && h.headers["set-cookie"], g = h.status, b = h == null ? void 0 : h.data;
|
|
1824
1824
|
o = { ...o, statusCode: g, data: b, res: h }, g === 200 && p && (w.saveToken(p), o.data = { ...o.data, token: p }), r(o);
|
|
1825
1825
|
},
|
|
1826
1826
|
(h) => {
|
|
1827
1827
|
console.log("http.sendRequest error: ", h);
|
|
1828
|
-
const p = w.errorsHandler.handleError(h), { url: g, status: b, headers: O, error:
|
|
1828
|
+
const p = w.errorsHandler.handleError(h), { url: g, status: b, headers: O, error: E, ...A } = h, P = typeof E == "string" ? Oe.isJSON(E.trim()) : !1, k = {
|
|
1829
1829
|
headers: O,
|
|
1830
1830
|
status: b,
|
|
1831
1831
|
message: ""
|
|
1832
1832
|
};
|
|
1833
|
-
if (
|
|
1834
|
-
const L = JSON.parse(
|
|
1833
|
+
if (P) {
|
|
1834
|
+
const L = JSON.parse(E);
|
|
1835
1835
|
k.message = w.errorsHandler.getErrorMessageFromData(L), k.data = L;
|
|
1836
1836
|
} else
|
|
1837
|
-
typeof
|
|
1837
|
+
typeof E == "string" && (k.message = E);
|
|
1838
1838
|
s({ ...l, ...p, errExt: k });
|
|
1839
1839
|
}
|
|
1840
1840
|
);
|
|
@@ -1844,19 +1844,19 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
|
|
|
1844
1844
|
const h = d.status, p = d == null ? void 0 : d.data;
|
|
1845
1845
|
o = { ...o, statusCode: h, data: p, res: d }, r(o);
|
|
1846
1846
|
}).catch((d) => {
|
|
1847
|
-
const h = w.errorsHandler.handleError(d), { code: p, config: g, status: b, message: O, response:
|
|
1847
|
+
const h = w.errorsHandler.handleError(d), { code: p, config: g, status: b, message: O, response: E, stack: A } = d, P = {
|
|
1848
1848
|
code: p,
|
|
1849
1849
|
config: g,
|
|
1850
1850
|
status: b || f,
|
|
1851
1851
|
message: O,
|
|
1852
|
-
headers:
|
|
1853
|
-
statusText:
|
|
1854
|
-
data:
|
|
1852
|
+
headers: E == null ? void 0 : E.headers,
|
|
1853
|
+
statusText: E == null ? void 0 : E.statusText,
|
|
1854
|
+
data: E == null ? void 0 : E.data,
|
|
1855
1855
|
stack: A
|
|
1856
1856
|
};
|
|
1857
|
-
s({ ...l, ...h, errExt:
|
|
1857
|
+
s({ ...l, ...h, errExt: P });
|
|
1858
1858
|
});
|
|
1859
|
-
})),
|
|
1859
|
+
})), x(w, "getAuthCookies", () => {
|
|
1860
1860
|
var n, r, s;
|
|
1861
1861
|
const { keyCookie: t } = w;
|
|
1862
1862
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
@@ -1864,7 +1864,7 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
|
|
|
1864
1864
|
return o.getCookieString(t);
|
|
1865
1865
|
}
|
|
1866
1866
|
return oe.get(t);
|
|
1867
|
-
}),
|
|
1867
|
+
}), x(w, "saveToken", (t) => {
|
|
1868
1868
|
var n, r, s;
|
|
1869
1869
|
if (t) {
|
|
1870
1870
|
const { keyCookie: o, cookieOptions: i } = w;
|
|
@@ -1875,7 +1875,7 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
|
|
|
1875
1875
|
}
|
|
1876
1876
|
oe.set(o, t, i);
|
|
1877
1877
|
}
|
|
1878
|
-
}),
|
|
1878
|
+
}), x(w, "removeAuthCookie", () => {
|
|
1879
1879
|
var n, r, s;
|
|
1880
1880
|
const { keyCookie: t } = w;
|
|
1881
1881
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
@@ -1884,7 +1884,7 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
|
|
|
1884
1884
|
return;
|
|
1885
1885
|
}
|
|
1886
1886
|
oe.remove(t);
|
|
1887
|
-
}),
|
|
1887
|
+
}), x(w, "setCookieOptions", (t) => {
|
|
1888
1888
|
w.cookieOptions = t;
|
|
1889
1889
|
});
|
|
1890
1890
|
let qe = w;
|
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { NetworkInformationAbstract as
|
|
5
|
-
class
|
|
1
|
+
var i = Object.defineProperty;
|
|
2
|
+
var l = (e, o, n) => o in e ? i(e, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[o] = n;
|
|
3
|
+
var a = (e, o, n) => (l(e, typeof o != "symbol" ? o + "" : o, n), n);
|
|
4
|
+
import { NetworkInformationAbstract as d } from "./types/types.abscruct.js";
|
|
5
|
+
class w extends d {
|
|
6
6
|
constructor() {
|
|
7
7
|
super(...arguments);
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
console.
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
a(this, "watchers", (n) => {
|
|
9
|
+
const s = (t) => {
|
|
10
|
+
console.log("watchers cb", n), console.log("watcher status", t);
|
|
11
|
+
const r = !["none", "unknown"].includes(t);
|
|
12
|
+
n(r, t);
|
|
13
13
|
};
|
|
14
|
-
navigator != null && navigator.connection && "getInfo" in (navigator == null ? void 0 : navigator.connection)
|
|
14
|
+
if (navigator != null && navigator.connection && "getInfo" in (navigator == null ? void 0 : navigator.connection)) {
|
|
15
|
+
const t = () => {
|
|
16
|
+
var c;
|
|
17
|
+
return (c = navigator == null ? void 0 : navigator.connection) == null ? void 0 : c.type;
|
|
18
|
+
}, r = () => {
|
|
19
|
+
const c = t();
|
|
20
|
+
s(c);
|
|
21
|
+
};
|
|
22
|
+
r(), document.addEventListener("offline", r, !1), document.addEventListener("online", r, !1);
|
|
23
|
+
} else
|
|
24
|
+
console.error("Нету navigator.connection.getInfo");
|
|
15
25
|
});
|
|
16
|
-
|
|
26
|
+
a(this, "getControls", () => ({
|
|
17
27
|
system: "cordova",
|
|
18
28
|
addWatchers: this.watchers,
|
|
19
29
|
removeWatchers: () => {
|
|
@@ -22,5 +32,5 @@ class h extends g {
|
|
|
22
32
|
}
|
|
23
33
|
}
|
|
24
34
|
export {
|
|
25
|
-
|
|
35
|
+
w as NetworkInformationCordova
|
|
26
36
|
};
|