vue-wiguet-chatweb 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/style.css +1 -1
- package/dist/vue-wiguet-chatweb.js +480 -472
- package/dist/vue-wiguet-chatweb.umd.cjs +5 -5
- package/package.json +1 -1
- package/src/components/MessageList.vue +11 -3
@@ -1,10 +1,10 @@
|
|
1
|
-
import { openBlock as F, createElementBlock as $, createElementVNode as w, getCurrentScope as Li, onScopeDispose as Fi, unref as Ys, computed as Js, ref as H, watch as En, getCurrentInstance as Vi, onMounted as Gs, defineComponent as On, onBeforeMount as Bi, Fragment as zn, renderList as $i, normalizeClass as
|
2
|
-
let
|
1
|
+
import { openBlock as F, createElementBlock as $, createElementVNode as w, getCurrentScope as Li, onScopeDispose as Fi, unref as Ys, computed as Js, ref as H, watch as En, getCurrentInstance as Vi, onMounted as Gs, defineComponent as On, onBeforeMount as Bi, Fragment as zn, renderList as $i, normalizeClass as Re, createVNode as he, createCommentVNode as Ct, toDisplayString as xt, pushScopeId as Ui, popScopeId as Pi, nextTick as Zn, onUnmounted as Wi, withModifiers as qt, withDirectives as an, withKeys as jn, vModelText as qi, createStaticVNode as Hi, vShow as Yn, createBlock as zi } from "vue";
|
2
|
+
let it;
|
3
3
|
const Zi = new Uint8Array(16);
|
4
4
|
function ji() {
|
5
|
-
if (!
|
5
|
+
if (!it && (it = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !it))
|
6
6
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
7
|
-
return
|
7
|
+
return it(Zi);
|
8
8
|
}
|
9
9
|
const P = [];
|
10
10
|
for (let t = 0; t < 256; ++t)
|
@@ -65,29 +65,29 @@ function Ks(t, e) {
|
|
65
65
|
return t.apply(e, arguments);
|
66
66
|
};
|
67
67
|
}
|
68
|
-
const { toString: lo } = Object.prototype, { getPrototypeOf: Cn } = Object,
|
68
|
+
const { toString: lo } = Object.prototype, { getPrototypeOf: Cn } = Object, Rt = /* @__PURE__ */ ((t) => (e) => {
|
69
69
|
const n = lo.call(e);
|
70
70
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
71
|
-
})(/* @__PURE__ */ Object.create(null)), le = (t) => (t = t.toLowerCase(), (e) =>
|
71
|
+
})(/* @__PURE__ */ Object.create(null)), le = (t) => (t = t.toLowerCase(), (e) => Rt(e) === t), It = (t) => (e) => typeof e === t, { isArray: Ve } = Array, Ke = It("undefined");
|
72
72
|
function fo(t) {
|
73
|
-
return t !== null && !
|
73
|
+
return t !== null && !Ke(t) && t.constructor !== null && !Ke(t.constructor) && Q(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
74
74
|
}
|
75
75
|
const Xs = le("ArrayBuffer");
|
76
76
|
function ho(t) {
|
77
77
|
let e;
|
78
78
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Xs(t.buffer), e;
|
79
79
|
}
|
80
|
-
const mo =
|
81
|
-
if (
|
80
|
+
const mo = It("string"), Q = It("function"), Qs = It("number"), Dt = (t) => t !== null && typeof t == "object", po = (t) => t === !0 || t === !1, yt = (t) => {
|
81
|
+
if (Rt(t) !== "object")
|
82
82
|
return !1;
|
83
83
|
const e = Cn(t);
|
84
84
|
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
|
85
85
|
}, yo = le("Date"), go = le("File"), wo = le("Blob"), So = le("FileList"), vo = (t) => Dt(t) && Q(t.pipe), To = (t) => {
|
86
86
|
let e;
|
87
|
-
return t && (typeof FormData == "function" && t instanceof FormData || Q(t.append) && ((e =
|
87
|
+
return t && (typeof FormData == "function" && t instanceof FormData || Q(t.append) && ((e = Rt(t)) === "formdata" || // detect form-data instance
|
88
88
|
e === "object" && Q(t.toString) && t.toString() === "[object FormData]"));
|
89
89
|
}, bo = le("URLSearchParams"), ko = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
90
|
-
function
|
90
|
+
function Qe(t, e, { allOwnKeys: n = !1 } = {}) {
|
91
91
|
if (t === null || typeof t > "u")
|
92
92
|
return;
|
93
93
|
let s, r;
|
@@ -110,17 +110,17 @@ function er(t, e) {
|
|
110
110
|
return r;
|
111
111
|
return null;
|
112
112
|
}
|
113
|
-
const tr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nr = (t) => !
|
113
|
+
const tr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, nr = (t) => !Ke(t) && t !== tr;
|
114
114
|
function cn() {
|
115
115
|
const { caseless: t } = nr(this) && this || {}, e = {}, n = (s, r) => {
|
116
116
|
const i = t && er(e, r) || r;
|
117
|
-
|
117
|
+
yt(e[i]) && yt(s) ? e[i] = cn(e[i], s) : yt(s) ? e[i] = cn({}, s) : Ve(s) ? e[i] = s.slice() : e[i] = s;
|
118
118
|
};
|
119
119
|
for (let s = 0, r = arguments.length; s < r; s++)
|
120
|
-
arguments[s] &&
|
120
|
+
arguments[s] && Qe(arguments[s], n);
|
121
121
|
return e;
|
122
122
|
}
|
123
|
-
const Eo = (t, e, n, { allOwnKeys: s } = {}) => (
|
123
|
+
const Eo = (t, e, n, { allOwnKeys: s } = {}) => (Qe(e, (r, i) => {
|
124
124
|
n && Q(r) ? t[i] = Ks(r, n) : t[i] = r;
|
125
125
|
}, { allOwnKeys: s }), t), Oo = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Co = (t, e, n, s) => {
|
126
126
|
t.prototype = Object.create(e.prototype, s), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
@@ -156,20 +156,20 @@ const Eo = (t, e, n, { allOwnKeys: s } = {}) => (et(e, (r, i) => {
|
|
156
156
|
const i = r.value;
|
157
157
|
e.call(t, i[0], i[1]);
|
158
158
|
}
|
159
|
-
},
|
159
|
+
}, Ro = (t, e) => {
|
160
160
|
let n;
|
161
161
|
const s = [];
|
162
162
|
for (; (n = t.exec(e)) !== null; )
|
163
163
|
s.push(n);
|
164
164
|
return s;
|
165
|
-
},
|
165
|
+
}, Io = le("HTMLFormElement"), Do = (t) => t.toLowerCase().replace(
|
166
166
|
/[-_\s]([a-z\d])(\w*)/g,
|
167
167
|
function(n, s, r) {
|
168
168
|
return s.toUpperCase() + r;
|
169
169
|
}
|
170
170
|
), Gn = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Lo = le("RegExp"), sr = (t, e) => {
|
171
171
|
const n = Object.getOwnPropertyDescriptors(t), s = {};
|
172
|
-
|
172
|
+
Qe(n, (r, i) => {
|
173
173
|
e(r, i, t) !== !1 && (s[i] = r);
|
174
174
|
}), Object.defineProperties(t, s);
|
175
175
|
}, Fo = (t) => {
|
@@ -217,9 +217,9 @@ const Wo = (t) => {
|
|
217
217
|
if (!("toJSON" in s)) {
|
218
218
|
e[r] = s;
|
219
219
|
const i = Ve(s) ? [] : {};
|
220
|
-
return
|
221
|
-
const
|
222
|
-
!
|
220
|
+
return Qe(s, (o, a) => {
|
221
|
+
const u = n(o, r + 1);
|
222
|
+
!Ke(u) && (i[a] = u);
|
223
223
|
}), e[r] = void 0, i;
|
224
224
|
}
|
225
225
|
}
|
@@ -236,8 +236,8 @@ const Wo = (t) => {
|
|
236
236
|
isNumber: Qs,
|
237
237
|
isBoolean: po,
|
238
238
|
isObject: Dt,
|
239
|
-
isPlainObject:
|
240
|
-
isUndefined:
|
239
|
+
isPlainObject: yt,
|
240
|
+
isUndefined: Ke,
|
241
241
|
isDate: yo,
|
242
242
|
isFile: go,
|
243
243
|
isBlob: wo,
|
@@ -247,20 +247,20 @@ const Wo = (t) => {
|
|
247
247
|
isURLSearchParams: bo,
|
248
248
|
isTypedArray: Ao,
|
249
249
|
isFileList: So,
|
250
|
-
forEach:
|
250
|
+
forEach: Qe,
|
251
251
|
merge: cn,
|
252
252
|
extend: Eo,
|
253
253
|
trim: ko,
|
254
254
|
stripBOM: Oo,
|
255
255
|
inherits: Co,
|
256
256
|
toFlatObject: xo,
|
257
|
-
kindOf:
|
257
|
+
kindOf: Rt,
|
258
258
|
kindOfTest: le,
|
259
259
|
endsWith: No,
|
260
260
|
toArray: _o,
|
261
261
|
forEachEntry: Mo,
|
262
|
-
matchAll:
|
263
|
-
isHTMLForm:
|
262
|
+
matchAll: Ro,
|
263
|
+
isHTMLForm: Io,
|
264
264
|
hasOwnProperty: Gn,
|
265
265
|
hasOwnProp: Gn,
|
266
266
|
// an alias to avoid ESLint no-prototype-builtins detection
|
@@ -326,8 +326,8 @@ Object.defineProperties(E, or);
|
|
326
326
|
Object.defineProperty(ir, "isAxiosError", { value: !0 });
|
327
327
|
E.from = (t, e, n, s, r, i) => {
|
328
328
|
const o = Object.create(ir);
|
329
|
-
return f.toFlatObject(t, o, function(
|
330
|
-
return
|
329
|
+
return f.toFlatObject(t, o, function(u) {
|
330
|
+
return u !== Error.prototype;
|
331
331
|
}, (a) => a !== "isAxiosError"), E.call(o, t.message, e, n, s, r), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
332
332
|
};
|
333
333
|
const zo = null;
|
@@ -358,16 +358,16 @@ function Lt(t, e, n) {
|
|
358
358
|
}, !1, function(y, _) {
|
359
359
|
return !f.isUndefined(_[y]);
|
360
360
|
});
|
361
|
-
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes,
|
361
|
+
const s = n.metaTokens, r = n.visitor || l, i = n.dots, o = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
|
362
362
|
if (!f.isFunction(r))
|
363
363
|
throw new TypeError("visitor must be a function");
|
364
|
-
function
|
364
|
+
function c(m) {
|
365
365
|
if (m === null) return "";
|
366
366
|
if (f.isDate(m))
|
367
367
|
return m.toISOString();
|
368
|
-
if (!
|
368
|
+
if (!u && f.isBlob(m))
|
369
369
|
throw new E("Blob is not supported. Use a Buffer instead.");
|
370
|
-
return f.isArrayBuffer(m) || f.isTypedArray(m) ?
|
370
|
+
return f.isArrayBuffer(m) || f.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
371
371
|
}
|
372
372
|
function l(m, y, _) {
|
373
373
|
let O = m;
|
@@ -379,29 +379,29 @@ function Lt(t, e, n) {
|
|
379
379
|
!(f.isUndefined(fe) || fe === null) && e.append(
|
380
380
|
// eslint-disable-next-line no-nested-ternary
|
381
381
|
o === !0 ? Xn([y], T, i) : o === null ? y : y + "[]",
|
382
|
-
|
382
|
+
c(fe)
|
383
383
|
);
|
384
384
|
}), !1;
|
385
385
|
}
|
386
|
-
return un(m) ? !0 : (e.append(Xn(_, y, i),
|
386
|
+
return un(m) ? !0 : (e.append(Xn(_, y, i), c(m)), !1);
|
387
387
|
}
|
388
388
|
const h = [], g = Object.assign(jo, {
|
389
389
|
defaultVisitor: l,
|
390
|
-
convertValue:
|
390
|
+
convertValue: c,
|
391
391
|
isVisitable: un
|
392
392
|
});
|
393
393
|
function d(m, y) {
|
394
394
|
if (!f.isUndefined(m)) {
|
395
395
|
if (h.indexOf(m) !== -1)
|
396
396
|
throw Error("Circular reference detected in " + y.join("."));
|
397
|
-
h.push(m), f.forEach(m, function(O,
|
397
|
+
h.push(m), f.forEach(m, function(O, R) {
|
398
398
|
(!(f.isUndefined(O) || O === null) && r.call(
|
399
399
|
e,
|
400
400
|
O,
|
401
|
-
f.isString(
|
401
|
+
f.isString(R) ? R.trim() : R,
|
402
402
|
y,
|
403
403
|
g
|
404
|
-
)) === !0 && d(O, y ? y.concat(
|
404
|
+
)) === !0 && d(O, y ? y.concat(R) : [R]);
|
405
405
|
}), h.pop();
|
406
406
|
}
|
407
407
|
}
|
@@ -547,8 +547,8 @@ function na(t) {
|
|
547
547
|
function fr(t) {
|
548
548
|
function e(n, s, r, i) {
|
549
549
|
let o = n[i++];
|
550
|
-
const a = Number.isFinite(+o),
|
551
|
-
return o = !o && f.isArray(r) ? r.length : o,
|
550
|
+
const a = Number.isFinite(+o), u = i >= n.length;
|
551
|
+
return o = !o && f.isArray(r) ? r.length : o, u ? (f.hasOwnProp(r, o) ? r[o] = [r[o], s] : r[o] = s, !a) : ((!r[o] || !f.isObject(r[o])) && (r[o] = []), e(n, s, r[o], i) && f.isArray(r[o]) && (r[o] = na(r[o])), !a);
|
552
552
|
}
|
553
553
|
if (f.isFormData(t) && f.isFunction(t.entries)) {
|
554
554
|
const n = {};
|
@@ -589,10 +589,10 @@ const Be = {
|
|
589
589
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
590
590
|
return ea(e, this.formSerializer).toString();
|
591
591
|
if ((a = f.isFileList(e)) || s.indexOf("multipart/form-data") > -1) {
|
592
|
-
const
|
592
|
+
const u = this.env && this.env.FormData;
|
593
593
|
return Lt(
|
594
594
|
a ? { "files[]": e } : e,
|
595
|
-
|
595
|
+
u && new u(),
|
596
596
|
this.formSerializer
|
597
597
|
);
|
598
598
|
}
|
@@ -669,8 +669,8 @@ const ia = f.toObjectSet([
|
|
669
669
|
function He(t) {
|
670
670
|
return t && String(t).trim().toLowerCase();
|
671
671
|
}
|
672
|
-
function
|
673
|
-
return t === !1 || t == null ? t : f.isArray(t) ? t.map(
|
672
|
+
function gt(t) {
|
673
|
+
return t === !1 || t == null ? t : f.isArray(t) ? t.map(gt) : String(t);
|
674
674
|
}
|
675
675
|
function aa(t) {
|
676
676
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
@@ -710,14 +710,14 @@ class ee {
|
|
710
710
|
}
|
711
711
|
set(e, n, s) {
|
712
712
|
const r = this;
|
713
|
-
function i(a,
|
714
|
-
const l = He(
|
713
|
+
function i(a, u, c) {
|
714
|
+
const l = He(u);
|
715
715
|
if (!l)
|
716
716
|
throw new Error("header name must be a non-empty string");
|
717
717
|
const h = f.findKey(r, l);
|
718
|
-
(!h || r[h] === void 0 ||
|
718
|
+
(!h || r[h] === void 0 || c === !0 || c === void 0 && r[h] !== !1) && (r[h || u] = gt(a));
|
719
719
|
}
|
720
|
-
const o = (a,
|
720
|
+
const o = (a, u) => f.forEach(a, (c, l) => i(c, l, u));
|
721
721
|
return f.isPlainObject(e) || e instanceof this.constructor ? o(e, n) : f.isString(e) && (e = e.trim()) && !ca(e) ? o(oa(e), n) : e != null && i(n, e, s), this;
|
722
722
|
}
|
723
723
|
get(e, n) {
|
@@ -769,11 +769,11 @@ class ee {
|
|
769
769
|
return f.forEach(this, (r, i) => {
|
770
770
|
const o = f.findKey(s, i);
|
771
771
|
if (o) {
|
772
|
-
n[o] =
|
772
|
+
n[o] = gt(r), delete n[i];
|
773
773
|
return;
|
774
774
|
}
|
775
775
|
const a = e ? ua(i) : String(i).trim();
|
776
|
-
a !== i && delete n[i], n[a] =
|
776
|
+
a !== i && delete n[i], n[a] = gt(r), s[a] = !0;
|
777
777
|
}), this;
|
778
778
|
}
|
779
779
|
concat(...e) {
|
@@ -826,10 +826,10 @@ function Zt(t, e) {
|
|
826
826
|
function hr(t) {
|
827
827
|
return !!(t && t.__CANCEL__);
|
828
828
|
}
|
829
|
-
function
|
829
|
+
function et(t, e, n) {
|
830
830
|
E.call(this, t ?? "canceled", E.ERR_CANCELED, e, n), this.name = "CanceledError";
|
831
831
|
}
|
832
|
-
f.inherits(
|
832
|
+
f.inherits(et, E, {
|
833
833
|
__CANCEL__: !0
|
834
834
|
});
|
835
835
|
function fa(t, e, n) {
|
@@ -847,8 +847,8 @@ const ha = ae.isStandardBrowserEnv ? (
|
|
847
847
|
/* @__PURE__ */ function() {
|
848
848
|
return {
|
849
849
|
write: function(n, s, r, i, o, a) {
|
850
|
-
const
|
851
|
-
|
850
|
+
const u = [];
|
851
|
+
u.push(n + "=" + encodeURIComponent(s)), f.isNumber(r) && u.push("expires=" + new Date(r).toGMTString()), f.isString(i) && u.push("path=" + i), f.isString(o) && u.push("domain=" + o), a === !0 && u.push("secure"), document.cookie = u.join("; ");
|
852
852
|
},
|
853
853
|
read: function(n) {
|
854
854
|
const s = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
|
@@ -922,15 +922,15 @@ function ga(t, e) {
|
|
922
922
|
t = t || 10;
|
923
923
|
const n = new Array(t), s = new Array(t);
|
924
924
|
let r = 0, i = 0, o;
|
925
|
-
return e = e !== void 0 ? e : 1e3, function(
|
926
|
-
const
|
927
|
-
o || (o =
|
925
|
+
return e = e !== void 0 ? e : 1e3, function(u) {
|
926
|
+
const c = Date.now(), l = s[i];
|
927
|
+
o || (o = c), n[r] = u, s[r] = c;
|
928
928
|
let h = i, g = 0;
|
929
929
|
for (; h !== r; )
|
930
930
|
g += n[h++], h = h % t;
|
931
|
-
if (r = (r + 1) % t, r === i && (i = (i + 1) % t),
|
931
|
+
if (r = (r + 1) % t, r === i && (i = (i + 1) % t), c - o < e)
|
932
932
|
return;
|
933
|
-
const d = l &&
|
933
|
+
const d = l && c - l;
|
934
934
|
return d ? Math.round(g * 1e3 / d) : void 0;
|
935
935
|
};
|
936
936
|
}
|
@@ -938,15 +938,15 @@ function ns(t, e) {
|
|
938
938
|
let n = 0;
|
939
939
|
const s = ga(50, 250);
|
940
940
|
return (r) => {
|
941
|
-
const i = r.loaded, o = r.lengthComputable ? r.total : void 0, a = i - n,
|
941
|
+
const i = r.loaded, o = r.lengthComputable ? r.total : void 0, a = i - n, u = s(a), c = i <= o;
|
942
942
|
n = i;
|
943
943
|
const l = {
|
944
944
|
loaded: i,
|
945
945
|
total: o,
|
946
946
|
progress: o ? i / o : void 0,
|
947
947
|
bytes: a,
|
948
|
-
rate:
|
949
|
-
estimated:
|
948
|
+
rate: u || void 0,
|
949
|
+
estimated: u && o && c ? (o - i) / u : void 0,
|
950
950
|
event: r
|
951
951
|
};
|
952
952
|
l[e ? "download" : "upload"] = !0, t(l);
|
@@ -957,72 +957,72 @@ const wa = typeof XMLHttpRequest < "u", Sa = wa && function(t) {
|
|
957
957
|
let r = t.data;
|
958
958
|
const i = ee.from(t.headers).normalize(), o = t.responseType;
|
959
959
|
let a;
|
960
|
-
function
|
960
|
+
function u() {
|
961
961
|
t.cancelToken && t.cancelToken.unsubscribe(a), t.signal && t.signal.removeEventListener("abort", a);
|
962
962
|
}
|
963
963
|
f.isFormData(r) && (ae.isStandardBrowserEnv || ae.isStandardBrowserWebWorkerEnv ? i.setContentType(!1) : i.setContentType("multipart/form-data;", !1));
|
964
|
-
let
|
964
|
+
let c = new XMLHttpRequest();
|
965
965
|
if (t.auth) {
|
966
966
|
const d = t.auth.username || "", m = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
|
967
967
|
i.set("Authorization", "Basic " + btoa(d + ":" + m));
|
968
968
|
}
|
969
969
|
const l = dr(t.baseURL, t.url);
|
970
|
-
|
970
|
+
c.open(t.method.toUpperCase(), ur(l, t.params, t.paramsSerializer), !0), c.timeout = t.timeout;
|
971
971
|
function h() {
|
972
|
-
if (!
|
972
|
+
if (!c)
|
973
973
|
return;
|
974
974
|
const d = ee.from(
|
975
|
-
"getAllResponseHeaders" in
|
975
|
+
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
976
976
|
), y = {
|
977
|
-
data: !o || o === "text" || o === "json" ?
|
978
|
-
status:
|
979
|
-
statusText:
|
977
|
+
data: !o || o === "text" || o === "json" ? c.responseText : c.response,
|
978
|
+
status: c.status,
|
979
|
+
statusText: c.statusText,
|
980
980
|
headers: d,
|
981
981
|
config: t,
|
982
|
-
request:
|
982
|
+
request: c
|
983
983
|
};
|
984
984
|
fa(function(O) {
|
985
|
-
n(O),
|
985
|
+
n(O), u();
|
986
986
|
}, function(O) {
|
987
|
-
s(O),
|
988
|
-
}, y),
|
987
|
+
s(O), u();
|
988
|
+
}, y), c = null;
|
989
989
|
}
|
990
|
-
if ("onloadend" in
|
991
|
-
!
|
992
|
-
},
|
993
|
-
|
994
|
-
},
|
995
|
-
s(new E("Network Error", E.ERR_NETWORK, t,
|
996
|
-
},
|
990
|
+
if ("onloadend" in c ? c.onloadend = h : c.onreadystatechange = function() {
|
991
|
+
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(h);
|
992
|
+
}, c.onabort = function() {
|
993
|
+
c && (s(new E("Request aborted", E.ECONNABORTED, t, c)), c = null);
|
994
|
+
}, c.onerror = function() {
|
995
|
+
s(new E("Network Error", E.ERR_NETWORK, t, c)), c = null;
|
996
|
+
}, c.ontimeout = function() {
|
997
997
|
let m = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded";
|
998
998
|
const y = t.transitional || lr;
|
999
999
|
t.timeoutErrorMessage && (m = t.timeoutErrorMessage), s(new E(
|
1000
1000
|
m,
|
1001
1001
|
y.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
1002
1002
|
t,
|
1003
|
-
|
1004
|
-
)),
|
1003
|
+
c
|
1004
|
+
)), c = null;
|
1005
1005
|
}, ae.isStandardBrowserEnv) {
|
1006
1006
|
const d = (t.withCredentials || pa(l)) && t.xsrfCookieName && ha.read(t.xsrfCookieName);
|
1007
1007
|
d && i.set(t.xsrfHeaderName, d);
|
1008
1008
|
}
|
1009
|
-
r === void 0 && i.setContentType(null), "setRequestHeader" in
|
1010
|
-
|
1011
|
-
}), f.isUndefined(t.withCredentials) || (
|
1012
|
-
|
1009
|
+
r === void 0 && i.setContentType(null), "setRequestHeader" in c && f.forEach(i.toJSON(), function(m, y) {
|
1010
|
+
c.setRequestHeader(y, m);
|
1011
|
+
}), f.isUndefined(t.withCredentials) || (c.withCredentials = !!t.withCredentials), o && o !== "json" && (c.responseType = t.responseType), typeof t.onDownloadProgress == "function" && c.addEventListener("progress", ns(t.onDownloadProgress, !0)), typeof t.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", ns(t.onUploadProgress)), (t.cancelToken || t.signal) && (a = (d) => {
|
1012
|
+
c && (s(!d || d.type ? new et(null, t, c) : d), c.abort(), c = null);
|
1013
1013
|
}, t.cancelToken && t.cancelToken.subscribe(a), t.signal && (t.signal.aborted ? a() : t.signal.addEventListener("abort", a)));
|
1014
1014
|
const g = ya(l);
|
1015
1015
|
if (g && ae.protocols.indexOf(g) === -1) {
|
1016
1016
|
s(new E("Unsupported protocol " + g + ":", E.ERR_BAD_REQUEST, t));
|
1017
1017
|
return;
|
1018
1018
|
}
|
1019
|
-
|
1019
|
+
c.send(r || null);
|
1020
1020
|
});
|
1021
|
-
},
|
1021
|
+
}, wt = {
|
1022
1022
|
http: zo,
|
1023
1023
|
xhr: Sa
|
1024
1024
|
};
|
1025
|
-
f.forEach(
|
1025
|
+
f.forEach(wt, (t, e) => {
|
1026
1026
|
if (t) {
|
1027
1027
|
try {
|
1028
1028
|
Object.defineProperty(t, "name", { value: e });
|
@@ -1036,24 +1036,24 @@ const va = {
|
|
1036
1036
|
t = f.isArray(t) ? t : [t];
|
1037
1037
|
const { length: e } = t;
|
1038
1038
|
let n, s;
|
1039
|
-
for (let r = 0; r < e && (n = t[r], !(s = f.isString(n) ?
|
1039
|
+
for (let r = 0; r < e && (n = t[r], !(s = f.isString(n) ? wt[n.toLowerCase()] : n)); r++)
|
1040
1040
|
;
|
1041
1041
|
if (!s)
|
1042
1042
|
throw s === !1 ? new E(
|
1043
1043
|
`Adapter ${n} is not supported by the environment`,
|
1044
1044
|
"ERR_NOT_SUPPORT"
|
1045
1045
|
) : new Error(
|
1046
|
-
f.hasOwnProp(
|
1046
|
+
f.hasOwnProp(wt, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
1047
1047
|
);
|
1048
1048
|
if (!f.isFunction(s))
|
1049
1049
|
throw new TypeError("adapter is not a function");
|
1050
1050
|
return s;
|
1051
1051
|
},
|
1052
|
-
adapters:
|
1052
|
+
adapters: wt
|
1053
1053
|
};
|
1054
1054
|
function jt(t) {
|
1055
1055
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
1056
|
-
throw new
|
1056
|
+
throw new et(null, t);
|
1057
1057
|
}
|
1058
1058
|
function ss(t) {
|
1059
1059
|
return jt(t), t.headers = ee.from(t.headers), t.data = Zt.call(
|
@@ -1077,32 +1077,32 @@ const rs = (t) => t instanceof ee ? t.toJSON() : t;
|
|
1077
1077
|
function Le(t, e) {
|
1078
1078
|
e = e || {};
|
1079
1079
|
const n = {};
|
1080
|
-
function s(
|
1081
|
-
return f.isPlainObject(
|
1080
|
+
function s(c, l, h) {
|
1081
|
+
return f.isPlainObject(c) && f.isPlainObject(l) ? f.merge.call({ caseless: h }, c, l) : f.isPlainObject(l) ? f.merge({}, l) : f.isArray(l) ? l.slice() : l;
|
1082
1082
|
}
|
1083
|
-
function r(
|
1083
|
+
function r(c, l, h) {
|
1084
1084
|
if (f.isUndefined(l)) {
|
1085
|
-
if (!f.isUndefined(
|
1086
|
-
return s(void 0,
|
1087
|
-
} else return s(
|
1085
|
+
if (!f.isUndefined(c))
|
1086
|
+
return s(void 0, c, h);
|
1087
|
+
} else return s(c, l, h);
|
1088
1088
|
}
|
1089
|
-
function i(
|
1089
|
+
function i(c, l) {
|
1090
1090
|
if (!f.isUndefined(l))
|
1091
1091
|
return s(void 0, l);
|
1092
1092
|
}
|
1093
|
-
function o(
|
1093
|
+
function o(c, l) {
|
1094
1094
|
if (f.isUndefined(l)) {
|
1095
|
-
if (!f.isUndefined(
|
1096
|
-
return s(void 0,
|
1095
|
+
if (!f.isUndefined(c))
|
1096
|
+
return s(void 0, c);
|
1097
1097
|
} else return s(void 0, l);
|
1098
1098
|
}
|
1099
|
-
function a(
|
1099
|
+
function a(c, l, h) {
|
1100
1100
|
if (h in e)
|
1101
|
-
return s(
|
1101
|
+
return s(c, l);
|
1102
1102
|
if (h in t)
|
1103
|
-
return s(void 0,
|
1103
|
+
return s(void 0, c);
|
1104
1104
|
}
|
1105
|
-
const
|
1105
|
+
const u = {
|
1106
1106
|
url: i,
|
1107
1107
|
method: i,
|
1108
1108
|
data: i,
|
@@ -1130,10 +1130,10 @@ function Le(t, e) {
|
|
1130
1130
|
socketPath: o,
|
1131
1131
|
responseEncoding: o,
|
1132
1132
|
validateStatus: a,
|
1133
|
-
headers: (
|
1133
|
+
headers: (c, l) => r(rs(c), rs(l), !0)
|
1134
1134
|
};
|
1135
1135
|
return f.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
|
1136
|
-
const h =
|
1136
|
+
const h = u[l] || r, g = h(t[l], e[l], l);
|
1137
1137
|
f.isUndefined(g) && h !== a || (n[l] = g);
|
1138
1138
|
}), n;
|
1139
1139
|
}
|
@@ -1170,9 +1170,9 @@ function Ta(t, e, n) {
|
|
1170
1170
|
for (; r-- > 0; ) {
|
1171
1171
|
const i = s[r], o = e[i];
|
1172
1172
|
if (o) {
|
1173
|
-
const a = t[i],
|
1174
|
-
if (
|
1175
|
-
throw new E("option " + i + " must be " +
|
1173
|
+
const a = t[i], u = a === void 0 || o(a, i, t);
|
1174
|
+
if (u !== !0)
|
1175
|
+
throw new E("option " + i + " must be " + u, E.ERR_BAD_OPTION_VALUE);
|
1176
1176
|
continue;
|
1177
1177
|
}
|
1178
1178
|
if (n !== !0)
|
@@ -1222,18 +1222,18 @@ class ke {
|
|
1222
1222
|
}
|
1223
1223
|
), n.headers = ee.concat(o, i);
|
1224
1224
|
const a = [];
|
1225
|
-
let
|
1225
|
+
let u = !0;
|
1226
1226
|
this.interceptors.request.forEach(function(y) {
|
1227
|
-
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (
|
1227
|
+
typeof y.runWhen == "function" && y.runWhen(n) === !1 || (u = u && y.synchronous, a.unshift(y.fulfilled, y.rejected));
|
1228
1228
|
});
|
1229
|
-
const
|
1229
|
+
const c = [];
|
1230
1230
|
this.interceptors.response.forEach(function(y) {
|
1231
|
-
|
1231
|
+
c.push(y.fulfilled, y.rejected);
|
1232
1232
|
});
|
1233
1233
|
let l, h = 0, g;
|
1234
|
-
if (!
|
1234
|
+
if (!u) {
|
1235
1235
|
const m = [ss.bind(this), void 0];
|
1236
|
-
for (m.unshift.apply(m, a), m.push.apply(m,
|
1236
|
+
for (m.unshift.apply(m, a), m.push.apply(m, c), g = m.length, l = Promise.resolve(n); h < g; )
|
1237
1237
|
l = l.then(m[h++], m[h++]);
|
1238
1238
|
return l;
|
1239
1239
|
}
|
@@ -1253,8 +1253,8 @@ class ke {
|
|
1253
1253
|
} catch (m) {
|
1254
1254
|
return Promise.reject(m);
|
1255
1255
|
}
|
1256
|
-
for (h = 0, g =
|
1257
|
-
l = l.then(
|
1256
|
+
for (h = 0, g = c.length; h < g; )
|
1257
|
+
l = l.then(c[h++], c[h++]);
|
1258
1258
|
return l;
|
1259
1259
|
}
|
1260
1260
|
getUri(e) {
|
@@ -1311,7 +1311,7 @@ class _n {
|
|
1311
1311
|
s.unsubscribe(i);
|
1312
1312
|
}, o;
|
1313
1313
|
}, e(function(i, o, a) {
|
1314
|
-
s.reason || (s.reason = new
|
1314
|
+
s.reason || (s.reason = new et(i, o, a), n(s.reason));
|
1315
1315
|
});
|
1316
1316
|
}
|
1317
1317
|
/**
|
@@ -1438,7 +1438,7 @@ function pr(t) {
|
|
1438
1438
|
}
|
1439
1439
|
const V = pr(Be);
|
1440
1440
|
V.Axios = ke;
|
1441
|
-
V.CanceledError =
|
1441
|
+
V.CanceledError = et;
|
1442
1442
|
V.CancelToken = _n;
|
1443
1443
|
V.isCancel = hr;
|
1444
1444
|
V.VERSION = mr;
|
@@ -1456,7 +1456,7 @@ V.formToJSON = (t) => fr(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
1456
1456
|
V.HttpStatusCode = fn;
|
1457
1457
|
V.default = V;
|
1458
1458
|
const Ft = async function(t) {
|
1459
|
-
const e = t, n = window.VITE_BACKEND_URL ? window.VITE_BACKEND_URL : "
|
1459
|
+
const e = t, n = window.VITE_BACKEND_URL ? window.VITE_BACKEND_URL : "https://chatadmin-gw.dev.mp.gob.bo", s = {
|
1460
1460
|
method: e.method,
|
1461
1461
|
url: `${n}${e.url}`,
|
1462
1462
|
headers: {
|
@@ -1551,20 +1551,20 @@ function Ma(t) {
|
|
1551
1551
|
const e = Aa();
|
1552
1552
|
return Js(() => (e.value, !!t()));
|
1553
1553
|
}
|
1554
|
-
function
|
1554
|
+
function Ra(t, e, n = {}) {
|
1555
1555
|
const {
|
1556
1556
|
root: s,
|
1557
1557
|
rootMargin: r = "0px",
|
1558
1558
|
threshold: i = 0.1,
|
1559
1559
|
window: o = _a,
|
1560
1560
|
immediate: a = !0
|
1561
|
-
} = n,
|
1561
|
+
} = n, u = Ma(() => o && "IntersectionObserver" in o), c = Js(() => {
|
1562
1562
|
const m = yr(t);
|
1563
1563
|
return (Array.isArray(m) ? m : [m]).map(Jt).filter(Na);
|
1564
1564
|
});
|
1565
1565
|
let l = Yt;
|
1566
|
-
const h = H(a), g =
|
1567
|
-
() => [
|
1566
|
+
const h = H(a), g = u.value ? En(
|
1567
|
+
() => [c.value, Jt(s), h.value],
|
1568
1568
|
([m, y]) => {
|
1569
1569
|
if (l(), !h.value || !m.length)
|
1570
1570
|
return;
|
@@ -1585,7 +1585,7 @@ function Ia(t, e, n = {}) {
|
|
1585
1585
|
l(), g(), h.value = !1;
|
1586
1586
|
};
|
1587
1587
|
return Ca(d), {
|
1588
|
-
isSupported:
|
1588
|
+
isSupported: u,
|
1589
1589
|
isActive: h,
|
1590
1590
|
pause() {
|
1591
1591
|
l(), h.value = !1;
|
@@ -1598,7 +1598,7 @@ function Ia(t, e, n = {}) {
|
|
1598
1598
|
}
|
1599
1599
|
class Ee extends Error {
|
1600
1600
|
}
|
1601
|
-
class
|
1601
|
+
class Ia extends Ee {
|
1602
1602
|
constructor(e) {
|
1603
1603
|
super(`Invalid DateTime: ${e.toMessage()}`);
|
1604
1604
|
}
|
@@ -1706,7 +1706,7 @@ const p = "numeric", ie = "short", Y = "long", Nt = {
|
|
1706
1706
|
day: p,
|
1707
1707
|
hour: p,
|
1708
1708
|
minute: p
|
1709
|
-
},
|
1709
|
+
}, Rr = {
|
1710
1710
|
year: p,
|
1711
1711
|
month: ie,
|
1712
1712
|
day: p,
|
@@ -1720,7 +1720,7 @@ const p = "numeric", ie = "short", Y = "long", Nt = {
|
|
1720
1720
|
weekday: ie,
|
1721
1721
|
hour: p,
|
1722
1722
|
minute: p
|
1723
|
-
},
|
1723
|
+
}, Ir = {
|
1724
1724
|
year: p,
|
1725
1725
|
month: Y,
|
1726
1726
|
day: p,
|
@@ -1753,7 +1753,7 @@ const p = "numeric", ie = "short", Y = "long", Nt = {
|
|
1753
1753
|
second: p,
|
1754
1754
|
timeZoneName: Y
|
1755
1755
|
};
|
1756
|
-
class
|
1756
|
+
class tt {
|
1757
1757
|
/**
|
1758
1758
|
* The type of zone
|
1759
1759
|
* @abstract
|
@@ -1838,7 +1838,7 @@ class nt {
|
|
1838
1838
|
}
|
1839
1839
|
}
|
1840
1840
|
let Gt = null;
|
1841
|
-
class Vt extends
|
1841
|
+
class Vt extends tt {
|
1842
1842
|
/**
|
1843
1843
|
* Get a singleton instance of the local zone
|
1844
1844
|
* @return {SystemZone}
|
@@ -1864,7 +1864,7 @@ class Vt extends nt {
|
|
1864
1864
|
}
|
1865
1865
|
/** @override **/
|
1866
1866
|
formatOffset(e, n) {
|
1867
|
-
return
|
1867
|
+
return Ge(this.offset(e), n);
|
1868
1868
|
}
|
1869
1869
|
/** @override **/
|
1870
1870
|
offset(e) {
|
@@ -1879,9 +1879,9 @@ class Vt extends nt {
|
|
1879
1879
|
return !0;
|
1880
1880
|
}
|
1881
1881
|
}
|
1882
|
-
let
|
1882
|
+
let St = {};
|
1883
1883
|
function Ba(t) {
|
1884
|
-
return
|
1884
|
+
return St[t] || (St[t] = new Intl.DateTimeFormat("en-US", {
|
1885
1885
|
hour12: !1,
|
1886
1886
|
timeZone: t,
|
1887
1887
|
year: "numeric",
|
@@ -1891,7 +1891,7 @@ function Ba(t) {
|
|
1891
1891
|
minute: "2-digit",
|
1892
1892
|
second: "2-digit",
|
1893
1893
|
era: "short"
|
1894
|
-
})),
|
1894
|
+
})), St[t];
|
1895
1895
|
}
|
1896
1896
|
const $a = {
|
1897
1897
|
year: 0,
|
@@ -1903,8 +1903,8 @@ const $a = {
|
|
1903
1903
|
second: 6
|
1904
1904
|
};
|
1905
1905
|
function Ua(t, e) {
|
1906
|
-
const n = t.format(e).replace(/\u200E/g, ""), s = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, r, i, o, a,
|
1907
|
-
return [o, r, i, a,
|
1906
|
+
const n = t.format(e).replace(/\u200E/g, ""), s = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n), [, r, i, o, a, u, c, l] = s;
|
1907
|
+
return [o, r, i, a, u, c, l];
|
1908
1908
|
}
|
1909
1909
|
function Pa(t, e) {
|
1910
1910
|
const n = t.formatToParts(e), s = [];
|
@@ -1914,21 +1914,21 @@ function Pa(t, e) {
|
|
1914
1914
|
}
|
1915
1915
|
return s;
|
1916
1916
|
}
|
1917
|
-
let
|
1918
|
-
class de extends
|
1917
|
+
let ot = {};
|
1918
|
+
class de extends tt {
|
1919
1919
|
/**
|
1920
1920
|
* @param {string} name - Zone name
|
1921
1921
|
* @return {IANAZone}
|
1922
1922
|
*/
|
1923
1923
|
static create(e) {
|
1924
|
-
return
|
1924
|
+
return ot[e] || (ot[e] = new de(e)), ot[e];
|
1925
1925
|
}
|
1926
1926
|
/**
|
1927
1927
|
* Reset local caches. Should only be necessary in testing scenarios.
|
1928
1928
|
* @return {void}
|
1929
1929
|
*/
|
1930
1930
|
static resetCache() {
|
1931
|
-
|
1931
|
+
ot = {}, St = {};
|
1932
1932
|
}
|
1933
1933
|
/**
|
1934
1934
|
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
|
@@ -2007,7 +2007,7 @@ class de extends nt {
|
|
2007
2007
|
* @return {string}
|
2008
2008
|
*/
|
2009
2009
|
formatOffset(e, n) {
|
2010
|
-
return
|
2010
|
+
return Ge(this.offset(e), n);
|
2011
2011
|
}
|
2012
2012
|
/**
|
2013
2013
|
* Return the offset in minutes for this zone at the specified timestamp.
|
@@ -2019,14 +2019,14 @@ class de extends nt {
|
|
2019
2019
|
const n = new Date(e);
|
2020
2020
|
if (isNaN(n)) return NaN;
|
2021
2021
|
const s = Ba(this.name);
|
2022
|
-
let [r, i, o, a,
|
2022
|
+
let [r, i, o, a, u, c, l] = s.formatToParts ? Pa(s, n) : Ua(s, n);
|
2023
2023
|
a === "BC" && (r = -Math.abs(r) + 1);
|
2024
2024
|
const g = $t({
|
2025
2025
|
year: r,
|
2026
2026
|
month: i,
|
2027
2027
|
day: o,
|
2028
|
-
hour:
|
2029
|
-
minute:
|
2028
|
+
hour: u === 24 ? 0 : u,
|
2029
|
+
minute: c,
|
2030
2030
|
second: l,
|
2031
2031
|
millisecond: 0
|
2032
2032
|
});
|
@@ -2100,8 +2100,8 @@ function ja(t) {
|
|
2100
2100
|
try {
|
2101
2101
|
s = dn(t).resolvedOptions(), r = t;
|
2102
2102
|
} catch {
|
2103
|
-
const
|
2104
|
-
s = dn(
|
2103
|
+
const u = t.substring(0, n);
|
2104
|
+
s = dn(u).resolvedOptions(), r = u;
|
2105
2105
|
}
|
2106
2106
|
const { numberingSystem: i, calendar: o } = s;
|
2107
2107
|
return [r, i, o];
|
@@ -2126,7 +2126,7 @@ function Ga(t) {
|
|
2126
2126
|
}
|
2127
2127
|
return e;
|
2128
2128
|
}
|
2129
|
-
function
|
2129
|
+
function at(t, e, n, s) {
|
2130
2130
|
const r = t.listingMode();
|
2131
2131
|
return r === "error" ? null : r === "en" ? n(e) : s(e);
|
2132
2132
|
}
|
@@ -2148,7 +2148,7 @@ class Xa {
|
|
2148
2148
|
return this.inf.format(n);
|
2149
2149
|
} else {
|
2150
2150
|
const n = this.floor ? Math.floor(e) : Dn(e, 3);
|
2151
|
-
return
|
2151
|
+
return I(n, this.padTo);
|
2152
2152
|
}
|
2153
2153
|
}
|
2154
2154
|
}
|
@@ -2215,8 +2215,8 @@ class N {
|
|
2215
2215
|
);
|
2216
2216
|
}
|
2217
2217
|
static create(e, n, s, r, i = !1) {
|
2218
|
-
const o = e || M.defaultLocale, a = o || (i ? "en-US" : za()),
|
2219
|
-
return new N(a,
|
2218
|
+
const o = e || M.defaultLocale, a = o || (i ? "en-US" : za()), u = n || M.defaultNumberingSystem, c = s || M.defaultOutputCalendar, l = yn(r) || M.defaultWeekSettings;
|
2219
|
+
return new N(a, u, c, l, o);
|
2220
2220
|
}
|
2221
2221
|
static resetCache() {
|
2222
2222
|
je = null, hn = {}, mn = {}, pn = {};
|
@@ -2225,8 +2225,8 @@ class N {
|
|
2225
2225
|
return N.create(e, n, s, r);
|
2226
2226
|
}
|
2227
2227
|
constructor(e, n, s, r, i) {
|
2228
|
-
const [o, a,
|
2229
|
-
this.locale = o, this.numberingSystem = n || a || null, this.outputCalendar = s ||
|
2228
|
+
const [o, a, u] = ja(e);
|
2229
|
+
this.locale = o, this.numberingSystem = n || a || null, this.outputCalendar = s || u || null, this.weekSettings = r, this.intl = Ya(this.locale, this.numberingSystem, this.outputCalendar), this.weekdaysCache = { format: {}, standalone: {} }, this.monthsCache = { format: {}, standalone: {} }, this.meridiemCache = null, this.eraCache = {}, this.specifiedLocale = i, this.fastNumbersCached = null;
|
2230
2230
|
}
|
2231
2231
|
get fastNumbers() {
|
2232
2232
|
return this.fastNumbersCached == null && (this.fastNumbersCached = Ka(this)), this.fastNumbersCached;
|
@@ -2251,13 +2251,13 @@ class N {
|
|
2251
2251
|
return this.clone({ ...e, defaultToEN: !1 });
|
2252
2252
|
}
|
2253
2253
|
months(e, n = !1) {
|
2254
|
-
return
|
2254
|
+
return at(this, e, Yr, () => {
|
2255
2255
|
const s = n ? { month: e, day: "numeric" } : { month: e }, r = n ? "format" : "standalone";
|
2256
2256
|
return this.monthsCache[r][e] || (this.monthsCache[r][e] = Ja((i) => this.extract(i, s, "month"))), this.monthsCache[r][e];
|
2257
2257
|
});
|
2258
2258
|
}
|
2259
2259
|
weekdays(e, n = !1) {
|
2260
|
-
return
|
2260
|
+
return at(this, e, Kr, () => {
|
2261
2261
|
const s = n ? { weekday: e, year: "numeric", month: "long", day: "numeric" } : { weekday: e }, r = n ? "format" : "standalone";
|
2262
2262
|
return this.weekdaysCache[r][e] || (this.weekdaysCache[r][e] = Ga(
|
2263
2263
|
(i) => this.extract(i, s, "weekday")
|
@@ -2265,7 +2265,7 @@ class N {
|
|
2265
2265
|
});
|
2266
2266
|
}
|
2267
2267
|
meridiems() {
|
2268
|
-
return
|
2268
|
+
return at(
|
2269
2269
|
this,
|
2270
2270
|
void 0,
|
2271
2271
|
() => Xr,
|
@@ -2281,7 +2281,7 @@ class N {
|
|
2281
2281
|
);
|
2282
2282
|
}
|
2283
2283
|
eras(e) {
|
2284
|
-
return
|
2284
|
+
return at(this, e, Qr, () => {
|
2285
2285
|
const n = { era: e };
|
2286
2286
|
return this.eraCache[e] || (this.eraCache[e] = [S.utc(-40, 1, 1), S.utc(2017, 1, 1)].map(
|
2287
2287
|
(s) => this.extract(s, n, "era")
|
@@ -2327,7 +2327,7 @@ class N {
|
|
2327
2327
|
}
|
2328
2328
|
}
|
2329
2329
|
let Kt = null;
|
2330
|
-
class z extends
|
2330
|
+
class z extends tt {
|
2331
2331
|
/**
|
2332
2332
|
* Get a singleton instance of UTC
|
2333
2333
|
* @return {FixedOffsetZone}
|
@@ -2377,7 +2377,7 @@ class z extends nt {
|
|
2377
2377
|
* @type {string}
|
2378
2378
|
*/
|
2379
2379
|
get name() {
|
2380
|
-
return this.fixed === 0 ? "UTC" : `UTC${
|
2380
|
+
return this.fixed === 0 ? "UTC" : `UTC${Ge(this.fixed, "narrow")}`;
|
2381
2381
|
}
|
2382
2382
|
/**
|
2383
2383
|
* The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
|
@@ -2386,7 +2386,7 @@ class z extends nt {
|
|
2386
2386
|
* @type {string}
|
2387
2387
|
*/
|
2388
2388
|
get ianaName() {
|
2389
|
-
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${
|
2389
|
+
return this.fixed === 0 ? "Etc/UTC" : `Etc/GMT${Ge(-this.fixed, "narrow")}`;
|
2390
2390
|
}
|
2391
2391
|
/**
|
2392
2392
|
* Returns the offset's common name at the specified timestamp.
|
@@ -2406,7 +2406,7 @@ class z extends nt {
|
|
2406
2406
|
* @return {string}
|
2407
2407
|
*/
|
2408
2408
|
formatOffset(e, n) {
|
2409
|
-
return
|
2409
|
+
return Ge(this.fixed, n);
|
2410
2410
|
}
|
2411
2411
|
/**
|
2412
2412
|
* Returns whether the offset is known to be fixed for the whole year:
|
@@ -2446,7 +2446,7 @@ class z extends nt {
|
|
2446
2446
|
return !0;
|
2447
2447
|
}
|
2448
2448
|
}
|
2449
|
-
class nc extends
|
2449
|
+
class nc extends tt {
|
2450
2450
|
constructor(e) {
|
2451
2451
|
super(), this.zoneName = e;
|
2452
2452
|
}
|
@@ -2486,7 +2486,7 @@ class nc extends nt {
|
|
2486
2486
|
function we(t, e) {
|
2487
2487
|
if (v(t) || t === null)
|
2488
2488
|
return e;
|
2489
|
-
if (t instanceof
|
2489
|
+
if (t instanceof tt)
|
2490
2490
|
return t;
|
2491
2491
|
if (cc(t)) {
|
2492
2492
|
const n = t.toLowerCase();
|
@@ -2724,26 +2724,26 @@ function Mn(t, e, n) {
|
|
2724
2724
|
return r === 0 ? 7 : r;
|
2725
2725
|
}
|
2726
2726
|
function $r(t, e, n) {
|
2727
|
-
return n + (
|
2727
|
+
return n + (nt(t) ? Br : Vr)[e - 1];
|
2728
2728
|
}
|
2729
2729
|
function Ur(t, e) {
|
2730
|
-
const n =
|
2730
|
+
const n = nt(t) ? Br : Vr, s = n.findIndex((i) => i < e), r = e - n[s];
|
2731
2731
|
return { month: s + 1, day: r };
|
2732
2732
|
}
|
2733
|
-
function
|
2733
|
+
function Rn(t, e) {
|
2734
2734
|
return (t - e + 7) % 7 + 1;
|
2735
2735
|
}
|
2736
2736
|
function _t(t, e = 4, n = 1) {
|
2737
|
-
const { year: s, month: r, day: i } = t, o = $r(s, r, i), a =
|
2738
|
-
let
|
2739
|
-
return
|
2737
|
+
const { year: s, month: r, day: i } = t, o = $r(s, r, i), a = Rn(Mn(s, r, i), n);
|
2738
|
+
let u = Math.floor((o - a + 14 - e) / 7), c;
|
2739
|
+
return u < 1 ? (c = s - 1, u = Xe(c, e, n)) : u > Xe(s, e, n) ? (c = s + 1, u = 1) : c = s, { weekYear: c, weekNumber: u, weekday: a, ...Pt(t) };
|
2740
2740
|
}
|
2741
2741
|
function Ss(t, e = 4, n = 1) {
|
2742
|
-
const { weekYear: s, weekNumber: r, weekday: i } = t, o =
|
2743
|
-
let
|
2744
|
-
|
2745
|
-
const { month: l, day: h } = Ur(
|
2746
|
-
return { year:
|
2742
|
+
const { weekYear: s, weekNumber: r, weekday: i } = t, o = Rn(Mn(s, 1, e), n), a = Ie(s);
|
2743
|
+
let u = r * 7 + i - o - 7 + e, c;
|
2744
|
+
u < 1 ? (c = s - 1, u += Ie(c)) : u > a ? (c = s + 1, u -= Ie(s)) : c = s;
|
2745
|
+
const { month: l, day: h } = Ur(c, u);
|
2746
|
+
return { year: c, month: l, day: h, ...Pt(t) };
|
2747
2747
|
}
|
2748
2748
|
function Xt(t) {
|
2749
2749
|
const { year: e, month: n, day: s } = t, r = $r(e, n, s);
|
@@ -2770,12 +2770,12 @@ function oc(t, e = 4, n = 1) {
|
|
2770
2770
|
const s = Bt(t.weekYear), r = X(
|
2771
2771
|
t.weekNumber,
|
2772
2772
|
1,
|
2773
|
-
|
2773
|
+
Xe(t.weekYear, e, n)
|
2774
2774
|
), i = X(t.weekday, 1, 7);
|
2775
2775
|
return s ? r ? i ? !1 : K("weekday", t.weekday) : K("week", t.weekNumber) : K("weekYear", t.weekYear);
|
2776
2776
|
}
|
2777
2777
|
function ac(t) {
|
2778
|
-
const e = Bt(t.year), n = X(t.ordinal, 1,
|
2778
|
+
const e = Bt(t.year), n = X(t.ordinal, 1, Ie(t.year));
|
2779
2779
|
return e ? n ? !1 : K("ordinal", t.ordinal) : K("year", t.year);
|
2780
2780
|
}
|
2781
2781
|
function Pr(t) {
|
@@ -2783,8 +2783,8 @@ function Pr(t) {
|
|
2783
2783
|
return e ? n ? s ? !1 : K("day", t.day) : K("month", t.month) : K("year", t.year);
|
2784
2784
|
}
|
2785
2785
|
function Wr(t) {
|
2786
|
-
const { hour: e, minute: n, second: s, millisecond: r } = t, i = X(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = X(n, 0, 59), a = X(s, 0, 59),
|
2787
|
-
return i ? o ? a ?
|
2786
|
+
const { hour: e, minute: n, second: s, millisecond: r } = t, i = X(e, 0, 23) || e === 24 && n === 0 && s === 0 && r === 0, o = X(n, 0, 59), a = X(s, 0, 59), u = X(r, 0, 999);
|
2787
|
+
return i ? o ? a ? u ? !1 : K("millisecond", r) : K("second", s) : K("minute", n) : K("hour", e);
|
2788
2788
|
}
|
2789
2789
|
function v(t) {
|
2790
2790
|
return typeof t > "u";
|
@@ -2850,7 +2850,7 @@ function X(t, e, n) {
|
|
2850
2850
|
function hc(t, e) {
|
2851
2851
|
return t - e * Math.floor(t / e);
|
2852
2852
|
}
|
2853
|
-
function
|
2853
|
+
function I(t, e = 2) {
|
2854
2854
|
const n = t < 0;
|
2855
2855
|
let s;
|
2856
2856
|
return n ? s = "-" + ("" + -t).padStart(e, "0") : s = ("" + t).padStart(e, "0"), s;
|
@@ -2863,7 +2863,7 @@ function ve(t) {
|
|
2863
2863
|
if (!(v(t) || t === null || t === ""))
|
2864
2864
|
return parseFloat(t);
|
2865
2865
|
}
|
2866
|
-
function
|
2866
|
+
function In(t) {
|
2867
2867
|
if (!(v(t) || t === null || t === "")) {
|
2868
2868
|
const e = parseFloat("0." + t) * 1e3;
|
2869
2869
|
return Math.floor(e);
|
@@ -2873,15 +2873,15 @@ function Dn(t, e, n = !1) {
|
|
2873
2873
|
const s = 10 ** e;
|
2874
2874
|
return (n ? Math.trunc : Math.round)(t * s) / s;
|
2875
2875
|
}
|
2876
|
-
function
|
2876
|
+
function nt(t) {
|
2877
2877
|
return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
|
2878
2878
|
}
|
2879
|
-
function
|
2880
|
-
return
|
2879
|
+
function Ie(t) {
|
2880
|
+
return nt(t) ? 366 : 365;
|
2881
2881
|
}
|
2882
2882
|
function At(t, e) {
|
2883
2883
|
const n = hc(e - 1, 12) + 1, s = t + (e - n) / 12;
|
2884
|
-
return n === 2 ?
|
2884
|
+
return n === 2 ? nt(s) ? 29 : 28 : [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][n - 1];
|
2885
2885
|
}
|
2886
2886
|
function $t(t) {
|
2887
2887
|
let e = Date.UTC(
|
@@ -2896,11 +2896,11 @@ function $t(t) {
|
|
2896
2896
|
return t.year < 100 && t.year >= 0 && (e = new Date(e), e.setUTCFullYear(t.year, t.month - 1, t.day)), +e;
|
2897
2897
|
}
|
2898
2898
|
function ks(t, e, n) {
|
2899
|
-
return -
|
2899
|
+
return -Rn(Mn(t, 1, e), n) + e - 1;
|
2900
2900
|
}
|
2901
|
-
function
|
2901
|
+
function Xe(t, e = 4, n = 1) {
|
2902
2902
|
const s = ks(t, e, n), r = ks(t + 1, e, n);
|
2903
|
-
return (
|
2903
|
+
return (Ie(t) - s + r) / 7;
|
2904
2904
|
}
|
2905
2905
|
function gn(t) {
|
2906
2906
|
return t > 99 ? t : t > M.twoDigitCutoffYear ? 1900 + t : 2e3 + t;
|
@@ -2915,7 +2915,7 @@ function zr(t, e, n, s = null) {
|
|
2915
2915
|
minute: "2-digit"
|
2916
2916
|
};
|
2917
2917
|
s && (i.timeZone = s);
|
2918
|
-
const o = { timeZoneName: e, ...i }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((
|
2918
|
+
const o = { timeZoneName: e, ...i }, a = new Intl.DateTimeFormat(n, o).formatToParts(r).find((u) => u.type.toLowerCase() === "timezonename");
|
2919
2919
|
return a ? a.value : null;
|
2920
2920
|
}
|
2921
2921
|
function Ut(t, e) {
|
@@ -2940,15 +2940,15 @@ function Mt(t, e) {
|
|
2940
2940
|
}
|
2941
2941
|
return n;
|
2942
2942
|
}
|
2943
|
-
function
|
2943
|
+
function Ge(t, e) {
|
2944
2944
|
const n = Math.trunc(Math.abs(t / 60)), s = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-";
|
2945
2945
|
switch (e) {
|
2946
2946
|
case "short":
|
2947
|
-
return `${r}${
|
2947
|
+
return `${r}${I(n, 2)}:${I(s, 2)}`;
|
2948
2948
|
case "narrow":
|
2949
2949
|
return `${r}${n}${s > 0 ? `:${s}` : ""}`;
|
2950
2950
|
case "techie":
|
2951
|
-
return `${r}${
|
2951
|
+
return `${r}${I(n, 2)}${I(s, 2)}`;
|
2952
2952
|
default:
|
2953
2953
|
throw new RangeError(`Value format ${e} is out of range for property format`);
|
2954
2954
|
}
|
@@ -3069,7 +3069,7 @@ function kc(t, e, n = "always", s = !1) {
|
|
3069
3069
|
return h ? "today" : `this ${r[t][0]}`;
|
3070
3070
|
}
|
3071
3071
|
}
|
3072
|
-
const o = Object.is(e, -0) || e < 0, a = Math.abs(e),
|
3072
|
+
const o = Object.is(e, -0) || e < 0, a = Math.abs(e), u = a === 1, c = r[t], l = s ? u ? c[1] : c[2] || c[1] : u ? r[t][0] : t;
|
3073
3073
|
return o ? `${a} ${l} ago` : `in ${a} ${l}`;
|
3074
3074
|
}
|
3075
3075
|
function Es(t, e) {
|
@@ -3093,10 +3093,10 @@ const Ec = {
|
|
3093
3093
|
TTTT: Nr,
|
3094
3094
|
f: _r,
|
3095
3095
|
ff: Mr,
|
3096
|
-
fff:
|
3096
|
+
fff: Ir,
|
3097
3097
|
ffff: Lr,
|
3098
3098
|
F: Ar,
|
3099
|
-
FF:
|
3099
|
+
FF: Rr,
|
3100
3100
|
FFF: Dr,
|
3101
3101
|
FFFF: Fr
|
3102
3102
|
};
|
@@ -3139,12 +3139,12 @@ class q {
|
|
3139
3139
|
}
|
3140
3140
|
num(e, n = 0) {
|
3141
3141
|
if (this.opts.forceSimple)
|
3142
|
-
return
|
3142
|
+
return I(e, n);
|
3143
3143
|
const s = { ...this.opts };
|
3144
3144
|
return n > 0 && (s.padTo = n), this.loc.numberFormatter(s).format(e);
|
3145
3145
|
}
|
3146
3146
|
formatDateTimeFromString(e, n) {
|
3147
|
-
const s = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (d, m) => this.loc.extract(e, d, m), o = (d) => e.isOffsetFixed && e.offset === 0 && d.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, d.format) : "", a = () => s ? Sc(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"),
|
3147
|
+
const s = this.loc.listingMode() === "en", r = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", i = (d, m) => this.loc.extract(e, d, m), o = (d) => e.isOffsetFixed && e.offset === 0 && d.allowZ ? "Z" : e.isValid ? e.zone.formatOffset(e.ts, d.format) : "", a = () => s ? Sc(e) : i({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), u = (d, m) => s ? Tc(e, d) : i(m ? { month: d } : { month: d, day: "numeric" }, "month"), c = (d, m) => s ? vc(e, d) : i(
|
3148
3148
|
m ? { weekday: d } : { weekday: d, month: "long", day: "numeric" },
|
3149
3149
|
"weekday"
|
3150
3150
|
), l = (d) => {
|
@@ -3198,39 +3198,39 @@ class q {
|
|
3198
3198
|
case "c":
|
3199
3199
|
return this.num(e.weekday);
|
3200
3200
|
case "ccc":
|
3201
|
-
return
|
3201
|
+
return c("short", !0);
|
3202
3202
|
case "cccc":
|
3203
|
-
return
|
3203
|
+
return c("long", !0);
|
3204
3204
|
case "ccccc":
|
3205
|
-
return
|
3205
|
+
return c("narrow", !0);
|
3206
3206
|
case "E":
|
3207
3207
|
return this.num(e.weekday);
|
3208
3208
|
case "EEE":
|
3209
|
-
return
|
3209
|
+
return c("short", !1);
|
3210
3210
|
case "EEEE":
|
3211
|
-
return
|
3211
|
+
return c("long", !1);
|
3212
3212
|
case "EEEEE":
|
3213
|
-
return
|
3213
|
+
return c("narrow", !1);
|
3214
3214
|
case "L":
|
3215
3215
|
return r ? i({ month: "numeric", day: "numeric" }, "month") : this.num(e.month);
|
3216
3216
|
case "LL":
|
3217
3217
|
return r ? i({ month: "2-digit", day: "numeric" }, "month") : this.num(e.month, 2);
|
3218
3218
|
case "LLL":
|
3219
|
-
return
|
3219
|
+
return u("short", !0);
|
3220
3220
|
case "LLLL":
|
3221
|
-
return
|
3221
|
+
return u("long", !0);
|
3222
3222
|
case "LLLLL":
|
3223
|
-
return
|
3223
|
+
return u("narrow", !0);
|
3224
3224
|
case "M":
|
3225
3225
|
return r ? i({ month: "numeric" }, "month") : this.num(e.month);
|
3226
3226
|
case "MM":
|
3227
3227
|
return r ? i({ month: "2-digit" }, "month") : this.num(e.month, 2);
|
3228
3228
|
case "MMM":
|
3229
|
-
return
|
3229
|
+
return u("short", !1);
|
3230
3230
|
case "MMMM":
|
3231
|
-
return
|
3231
|
+
return u("long", !1);
|
3232
3232
|
case "MMMMM":
|
3233
|
-
return
|
3233
|
+
return u("narrow", !1);
|
3234
3234
|
case "y":
|
3235
3235
|
return r ? i({ year: "numeric" }, "year") : this.num(e.year);
|
3236
3236
|
case "yy":
|
@@ -3280,8 +3280,8 @@ class q {
|
|
3280
3280
|
return Es(q.parseFormat(n), g);
|
3281
3281
|
}
|
3282
3282
|
formatDurationFromString(e, n) {
|
3283
|
-
const s = (
|
3284
|
-
switch (
|
3283
|
+
const s = (u) => {
|
3284
|
+
switch (u[0]) {
|
3285
3285
|
case "S":
|
3286
3286
|
return "millisecond";
|
3287
3287
|
case "s":
|
@@ -3301,13 +3301,13 @@ class q {
|
|
3301
3301
|
default:
|
3302
3302
|
return null;
|
3303
3303
|
}
|
3304
|
-
}, r = (
|
3305
|
-
const l = s(
|
3306
|
-
return l ? this.num(
|
3304
|
+
}, r = (u) => (c) => {
|
3305
|
+
const l = s(c);
|
3306
|
+
return l ? this.num(u.get(l), c.length) : c;
|
3307
3307
|
}, i = q.parseFormat(n), o = i.reduce(
|
3308
|
-
(
|
3308
|
+
(u, { literal: c, val: l }) => c ? u : u.concat(l),
|
3309
3309
|
[]
|
3310
|
-
), a = e.shiftTo(...o.map(s).filter((
|
3310
|
+
), a = e.shiftTo(...o.map(s).filter((u) => u));
|
3311
3311
|
return Es(i, r(a));
|
3312
3312
|
}
|
3313
3313
|
}
|
@@ -3319,8 +3319,8 @@ function $e(...t) {
|
|
3319
3319
|
function Ue(...t) {
|
3320
3320
|
return (e) => t.reduce(
|
3321
3321
|
([n, s, r], i) => {
|
3322
|
-
const [o, a,
|
3323
|
-
return [{ ...n, ...o }, a || s,
|
3322
|
+
const [o, a, u] = i(e, r);
|
3323
|
+
return [{ ...n, ...o }, a || s, u];
|
3324
3324
|
},
|
3325
3325
|
[{}, null, 1]
|
3326
3326
|
).slice(0, 2);
|
@@ -3346,12 +3346,12 @@ function ti(...t) {
|
|
3346
3346
|
}
|
3347
3347
|
const ni = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, Oc = `(?:${ni.source}?(?:\\[(${ei.source})\\])?)?`, Ln = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, si = RegExp(`${Ln.source}${Oc}`), Fn = RegExp(`(?:T${si.source})?`), Cc = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, xc = /(\d{4})-?W(\d\d)(?:-?(\d))?/, Nc = /(\d{4})-?(\d{3})/, _c = ti("weekYear", "weekNumber", "weekDay"), Ac = ti("year", "ordinal"), Mc = /(\d{4})-(\d\d)-(\d\d)/, ri = RegExp(
|
3348
3348
|
`${Ln.source} ?(?:${ni.source}|(${ei.source}))?`
|
3349
|
-
),
|
3349
|
+
), Rc = RegExp(`(?: ${ri.source})?`);
|
3350
3350
|
function De(t, e, n) {
|
3351
3351
|
const s = t[e];
|
3352
3352
|
return v(s) ? n : ge(s);
|
3353
3353
|
}
|
3354
|
-
function
|
3354
|
+
function Ic(t, e) {
|
3355
3355
|
return [{
|
3356
3356
|
year: De(t, e),
|
3357
3357
|
month: De(t, e + 1, 1),
|
@@ -3363,20 +3363,20 @@ function We(t, e) {
|
|
3363
3363
|
hours: De(t, e, 0),
|
3364
3364
|
minutes: De(t, e + 1, 0),
|
3365
3365
|
seconds: De(t, e + 2, 0),
|
3366
|
-
milliseconds:
|
3366
|
+
milliseconds: In(t[e + 3])
|
3367
3367
|
}, null, e + 4];
|
3368
3368
|
}
|
3369
|
-
function
|
3369
|
+
function st(t, e) {
|
3370
3370
|
const n = !t[e] && !t[e + 1], s = Ut(t[e + 1], t[e + 2]), r = n ? null : z.instance(s);
|
3371
3371
|
return [{}, r, e + 3];
|
3372
3372
|
}
|
3373
|
-
function
|
3373
|
+
function rt(t, e) {
|
3374
3374
|
const n = t[e] ? de.create(t[e]) : null;
|
3375
3375
|
return [{}, n, e + 1];
|
3376
3376
|
}
|
3377
3377
|
const Dc = RegExp(`^T?${Ln.source}$`), Lc = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;
|
3378
3378
|
function Fc(t) {
|
3379
|
-
const [e, n, s, r, i, o, a,
|
3379
|
+
const [e, n, s, r, i, o, a, u, c] = t, l = e[0] === "-", h = u && u[0] === "-", g = (d, m = !1) => d !== void 0 && (m || d && l) ? -d : d;
|
3380
3380
|
return [
|
3381
3381
|
{
|
3382
3382
|
years: g(ve(n)),
|
@@ -3385,8 +3385,8 @@ function Fc(t) {
|
|
3385
3385
|
days: g(ve(i)),
|
3386
3386
|
hours: g(ve(o)),
|
3387
3387
|
minutes: g(ve(a)),
|
3388
|
-
seconds: g(ve(
|
3389
|
-
milliseconds: g(
|
3388
|
+
seconds: g(ve(u), u === "-0"),
|
3389
|
+
milliseconds: g(In(c), h)
|
3390
3390
|
}
|
3391
3391
|
];
|
3392
3392
|
}
|
@@ -3422,13 +3422,13 @@ function $c(t) {
|
|
3422
3422
|
i,
|
3423
3423
|
o,
|
3424
3424
|
a,
|
3425
|
-
c,
|
3426
3425
|
u,
|
3426
|
+
c,
|
3427
3427
|
l,
|
3428
3428
|
h
|
3429
3429
|
] = t, g = Vn(e, r, s, n, i, o, a);
|
3430
3430
|
let d;
|
3431
|
-
return
|
3431
|
+
return u ? d = Vc[u] : c ? d = 0 : d = Ut(l, h), [g, new z(d)];
|
3432
3432
|
}
|
3433
3433
|
function Uc(t) {
|
3434
3434
|
return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
|
@@ -3443,24 +3443,24 @@ function Hc(t) {
|
|
3443
3443
|
return [Vn(e, a, n, s, r, i, o), z.utcInstance];
|
3444
3444
|
}
|
3445
3445
|
const zc = $e(Cc, Fn), Zc = $e(xc, Fn), jc = $e(Nc, Fn), Yc = $e(si), ii = Ue(
|
3446
|
-
|
3446
|
+
Ic,
|
3447
3447
|
We,
|
3448
|
-
|
3449
|
-
|
3448
|
+
st,
|
3449
|
+
rt
|
3450
3450
|
), Jc = Ue(
|
3451
3451
|
_c,
|
3452
3452
|
We,
|
3453
|
-
|
3454
|
-
|
3453
|
+
st,
|
3454
|
+
rt
|
3455
3455
|
), Gc = Ue(
|
3456
3456
|
Ac,
|
3457
3457
|
We,
|
3458
|
-
|
3459
|
-
|
3458
|
+
st,
|
3459
|
+
rt
|
3460
3460
|
), Kc = Ue(
|
3461
3461
|
We,
|
3462
|
-
|
3463
|
-
|
3462
|
+
st,
|
3463
|
+
rt
|
3464
3464
|
);
|
3465
3465
|
function Xc(t) {
|
3466
3466
|
return Pe(
|
@@ -3489,10 +3489,10 @@ const nu = Ue(We);
|
|
3489
3489
|
function su(t) {
|
3490
3490
|
return Pe(t, [Dc, nu]);
|
3491
3491
|
}
|
3492
|
-
const ru = $e(Mc,
|
3492
|
+
const ru = $e(Mc, Rc), iu = $e(ri), ou = Ue(
|
3493
3493
|
We,
|
3494
|
-
|
3495
|
-
|
3494
|
+
st,
|
3495
|
+
rt
|
3496
3496
|
);
|
3497
3497
|
function au(t) {
|
3498
3498
|
return Pe(
|
@@ -4066,11 +4066,11 @@ class k {
|
|
4066
4066
|
if (e.indexOf(o) >= 0) {
|
4067
4067
|
i = o;
|
4068
4068
|
let a = 0;
|
4069
|
-
for (const
|
4070
|
-
a += this.matrix[
|
4069
|
+
for (const c in s)
|
4070
|
+
a += this.matrix[c][o] * s[c], s[c] = 0;
|
4071
4071
|
Se(r[o]) && (a += r[o]);
|
4072
|
-
const
|
4073
|
-
n[o] =
|
4072
|
+
const u = Math.trunc(a);
|
4073
|
+
n[o] = u, s[o] = (a * 1e3 - u * 1e3) / 1e3;
|
4074
4074
|
} else Se(r[o]) && (s[o] = r[o]);
|
4075
4075
|
for (const o in s)
|
4076
4076
|
s[o] !== 0 && (n[i] += o === i ? s[o] : s[o] / this.matrix[i][o]);
|
@@ -4286,22 +4286,22 @@ class A {
|
|
4286
4286
|
} catch {
|
4287
4287
|
o = !1;
|
4288
4288
|
}
|
4289
|
-
let a,
|
4289
|
+
let a, u;
|
4290
4290
|
try {
|
4291
|
-
a = S.fromISO(r, n),
|
4291
|
+
a = S.fromISO(r, n), u = a.isValid;
|
4292
4292
|
} catch {
|
4293
|
-
|
4293
|
+
u = !1;
|
4294
4294
|
}
|
4295
|
-
if (o &&
|
4295
|
+
if (o && u)
|
4296
4296
|
return A.fromDateTimes(i, a);
|
4297
4297
|
if (o) {
|
4298
|
-
const
|
4299
|
-
if (
|
4300
|
-
return A.after(i,
|
4301
|
-
} else if (
|
4302
|
-
const
|
4303
|
-
if (
|
4304
|
-
return A.before(a,
|
4298
|
+
const c = k.fromISO(r, n);
|
4299
|
+
if (c.isValid)
|
4300
|
+
return A.after(i, c);
|
4301
|
+
} else if (u) {
|
4302
|
+
const c = k.fromISO(s, n);
|
4303
|
+
if (c.isValid)
|
4304
|
+
return A.before(a, c);
|
4305
4305
|
}
|
4306
4306
|
}
|
4307
4307
|
return A.invalid("unparsable", `the input "${e}" can't be parsed as ISO 8601`);
|
@@ -4449,7 +4449,7 @@ class A {
|
|
4449
4449
|
let { s } = this, r = 1, i;
|
4450
4450
|
const o = [];
|
4451
4451
|
for (; s < this.e; ) {
|
4452
|
-
const a = this.start.plus(n.mapUnits((
|
4452
|
+
const a = this.start.plus(n.mapUnits((u) => u * r));
|
4453
4453
|
i = +a > +this.e ? this.e : a, o.push(A.fromDateTimes(s, i)), s = i, r += 1;
|
4454
4454
|
}
|
4455
4455
|
return o;
|
@@ -4545,12 +4545,12 @@ class A {
|
|
4545
4545
|
*/
|
4546
4546
|
static xor(e) {
|
4547
4547
|
let n = null, s = 0;
|
4548
|
-
const r = [], i = e.map((
|
4549
|
-
{ time:
|
4550
|
-
{ time:
|
4551
|
-
]), o = Array.prototype.concat(...i), a = o.sort((
|
4552
|
-
for (const
|
4553
|
-
s +=
|
4548
|
+
const r = [], i = e.map((u) => [
|
4549
|
+
{ time: u.s, type: "s" },
|
4550
|
+
{ time: u.e, type: "e" }
|
4551
|
+
]), o = Array.prototype.concat(...i), a = o.sort((u, c) => u.time - c.time);
|
4552
|
+
for (const u of a)
|
4553
|
+
s += u.type === "s" ? 1 : -1, s === 1 ? n = u.time : (n && +n != +u.time && r.push(A.fromDateTimes(n, u.time)), n = null);
|
4554
4554
|
return A.merge(r);
|
4555
4555
|
}
|
4556
4556
|
/**
|
@@ -4664,7 +4664,7 @@ class A {
|
|
4664
4664
|
return A.fromDateTimes(e(this.s), e(this.e));
|
4665
4665
|
}
|
4666
4666
|
}
|
4667
|
-
class
|
4667
|
+
class ct {
|
4668
4668
|
/**
|
4669
4669
|
* Return whether the specified zone contains a DST.
|
4670
4670
|
* @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
|
@@ -4841,31 +4841,31 @@ function Ns(t, e) {
|
|
4841
4841
|
}
|
4842
4842
|
function du(t, e, n) {
|
4843
4843
|
const s = [
|
4844
|
-
["years", (
|
4845
|
-
["quarters", (
|
4846
|
-
["months", (
|
4844
|
+
["years", (u, c) => c.year - u.year],
|
4845
|
+
["quarters", (u, c) => c.quarter - u.quarter + (c.year - u.year) * 4],
|
4846
|
+
["months", (u, c) => c.month - u.month + (c.year - u.year) * 12],
|
4847
4847
|
[
|
4848
4848
|
"weeks",
|
4849
|
-
(
|
4850
|
-
const l = Ns(
|
4849
|
+
(u, c) => {
|
4850
|
+
const l = Ns(u, c);
|
4851
4851
|
return (l - l % 7) / 7;
|
4852
4852
|
}
|
4853
4853
|
],
|
4854
4854
|
["days", Ns]
|
4855
4855
|
], r = {}, i = t;
|
4856
4856
|
let o, a;
|
4857
|
-
for (const [
|
4858
|
-
n.indexOf(
|
4857
|
+
for (const [u, c] of s)
|
4858
|
+
n.indexOf(u) >= 0 && (o = u, r[u] = c(t, e), a = i.plus(r), a > e ? (r[u]--, t = i.plus(r), t > e && (a = t, r[u]--, t = i.plus(r))) : t = a);
|
4859
4859
|
return [t, r, a, o];
|
4860
4860
|
}
|
4861
4861
|
function mu(t, e, n, s) {
|
4862
4862
|
let [r, i, o, a] = du(t, e, n);
|
4863
|
-
const
|
4863
|
+
const u = e - r, c = n.filter(
|
4864
4864
|
(h) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(h) >= 0
|
4865
4865
|
);
|
4866
|
-
|
4866
|
+
c.length === 0 && (o < e && (o = r.plus({ [a]: 1 })), o !== r && (i[a] = (i[a] || 0) + u / (o - r)));
|
4867
4867
|
const l = k.fromObject(i, s);
|
4868
|
-
return
|
4868
|
+
return c.length > 0 ? k.fromMillis(u, s).shiftTo(...c).plus(l) : l;
|
4869
4869
|
}
|
4870
4870
|
const pu = "missing Intl.DateTimeFormat.formatToParts support";
|
4871
4871
|
function x(t, e = (n) => n) {
|
@@ -4887,14 +4887,14 @@ function ne(t, e) {
|
|
4887
4887
|
function As(t, e) {
|
4888
4888
|
return { regex: t, deser: ([, n, s]) => Ut(n, s), groups: e };
|
4889
4889
|
}
|
4890
|
-
function
|
4890
|
+
function ut(t) {
|
4891
4891
|
return { regex: t, deser: ([e]) => e };
|
4892
4892
|
}
|
4893
4893
|
function wu(t) {
|
4894
4894
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
4895
4895
|
}
|
4896
4896
|
function Su(t, e) {
|
4897
|
-
const n = te(e), s = te(e, "{2}"), r = te(e, "{3}"), i = te(e, "{4}"), o = te(e, "{6}"), a = te(e, "{1,2}"),
|
4897
|
+
const n = te(e), s = te(e, "{2}"), r = te(e, "{3}"), i = te(e, "{4}"), o = te(e, "{6}"), a = te(e, "{1,2}"), u = te(e, "{1,3}"), c = te(e, "{1,6}"), l = te(e, "{1,9}"), h = te(e, "{2,4}"), g = te(e, "{4,6}"), d = (_) => ({ regex: RegExp(wu(_.val)), deser: ([O]) => O, literal: !0 }), y = ((_) => {
|
4898
4898
|
if (t.literal)
|
4899
4899
|
return d(_);
|
4900
4900
|
switch (_.val) {
|
@@ -4903,7 +4903,7 @@ function Su(t, e) {
|
|
4903
4903
|
case "GG":
|
4904
4904
|
return ne(e.eras("long"), 0);
|
4905
4905
|
case "y":
|
4906
|
-
return x(
|
4906
|
+
return x(c);
|
4907
4907
|
case "yy":
|
4908
4908
|
return x(h, gn);
|
4909
4909
|
case "yyyy":
|
@@ -4933,7 +4933,7 @@ function Su(t, e) {
|
|
4933
4933
|
case "dd":
|
4934
4934
|
return x(s);
|
4935
4935
|
case "o":
|
4936
|
-
return x(
|
4936
|
+
return x(u);
|
4937
4937
|
case "ooo":
|
4938
4938
|
return x(r);
|
4939
4939
|
case "HH":
|
@@ -4957,13 +4957,13 @@ function Su(t, e) {
|
|
4957
4957
|
case "ss":
|
4958
4958
|
return x(s);
|
4959
4959
|
case "S":
|
4960
|
-
return x(
|
4960
|
+
return x(u);
|
4961
4961
|
case "SSS":
|
4962
4962
|
return x(r);
|
4963
4963
|
case "u":
|
4964
|
-
return
|
4964
|
+
return ut(l);
|
4965
4965
|
case "uu":
|
4966
|
-
return
|
4966
|
+
return ut(a);
|
4967
4967
|
case "uuu":
|
4968
4968
|
return x(n);
|
4969
4969
|
case "a":
|
@@ -4993,9 +4993,9 @@ function Su(t, e) {
|
|
4993
4993
|
case "ZZZ":
|
4994
4994
|
return As(new RegExp(`([+-]${a.source})(${s.source})?`), 2);
|
4995
4995
|
case "z":
|
4996
|
-
return
|
4996
|
+
return ut(/[a-z_+-/]{1,256}?/i);
|
4997
4997
|
case " ":
|
4998
|
-
return
|
4998
|
+
return ut(/[^\S\n\r]/);
|
4999
4999
|
default:
|
5000
5000
|
return d(_);
|
5001
5001
|
}
|
@@ -5049,10 +5049,10 @@ const vu = {
|
|
5049
5049
|
function Tu(t, e, n) {
|
5050
5050
|
const { type: s, value: r } = t;
|
5051
5051
|
if (s === "literal") {
|
5052
|
-
const
|
5052
|
+
const u = /^\s+$/.test(r);
|
5053
5053
|
return {
|
5054
|
-
literal: !
|
5055
|
-
val:
|
5054
|
+
literal: !u,
|
5055
|
+
val: u ? " " : r
|
5056
5056
|
};
|
5057
5057
|
}
|
5058
5058
|
const i = e[s];
|
@@ -5075,8 +5075,8 @@ function ku(t, e, n) {
|
|
5075
5075
|
let i = 1;
|
5076
5076
|
for (const o in n)
|
5077
5077
|
if (Fe(n, o)) {
|
5078
|
-
const a = n[o],
|
5079
|
-
!a.literal && a.token && (r[a.token.val[0]] = a.deser(s.slice(i, i +
|
5078
|
+
const a = n[o], u = a.groups ? a.groups + 1 : 1;
|
5079
|
+
!a.literal && a.token && (r[a.token.val[0]] = a.deser(s.slice(i, i + u))), i += u;
|
5080
5080
|
}
|
5081
5081
|
return [s, r];
|
5082
5082
|
} else
|
@@ -5117,7 +5117,7 @@ function Eu(t) {
|
|
5117
5117
|
}
|
5118
5118
|
};
|
5119
5119
|
let n = null, s;
|
5120
|
-
return v(t.z) || (n = de.create(t.z)), v(t.Z) || (n || (n = new z(t.Z)), s = t.Z), v(t.q) || (t.M = (t.q - 1) * 3 + 1), v(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), v(t.u) || (t.S =
|
5120
|
+
return v(t.z) || (n = de.create(t.z)), v(t.Z) || (n || (n = new z(t.Z)), s = t.Z), v(t.q) || (t.M = (t.q - 1) * 3 + 1), v(t.h) || (t.h < 12 && t.a === 1 ? t.h += 12 : t.h === 12 && t.a === 0 && (t.h = 0)), t.G === 0 && t.y && (t.y = -t.y), v(t.u) || (t.S = In(t.u)), [Object.keys(t).reduce((i, o) => {
|
5121
5121
|
const a = e(o);
|
5122
5122
|
return a && (i[a] = t[o]), i;
|
5123
5123
|
}, {}), n, s];
|
@@ -5216,7 +5216,7 @@ function mi(t, e, n) {
|
|
5216
5216
|
const i = n.offset(s);
|
5217
5217
|
return r === i ? [s, r] : [t - Math.min(r, i) * 60 * 1e3, Math.max(r, i)];
|
5218
5218
|
}
|
5219
|
-
function
|
5219
|
+
function lt(t, e) {
|
5220
5220
|
t += e * 60 * 1e3;
|
5221
5221
|
const n = new Date(t);
|
5222
5222
|
return {
|
@@ -5229,10 +5229,10 @@ function ft(t, e) {
|
|
5229
5229
|
millisecond: n.getUTCMilliseconds()
|
5230
5230
|
};
|
5231
5231
|
}
|
5232
|
-
function
|
5232
|
+
function vt(t, e, n) {
|
5233
5233
|
return mi($t(t), e, n);
|
5234
5234
|
}
|
5235
|
-
function
|
5235
|
+
function Rs(t, e) {
|
5236
5236
|
const n = t.o, s = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, i = {
|
5237
5237
|
...t.c,
|
5238
5238
|
year: s,
|
@@ -5249,24 +5249,24 @@ function Is(t, e) {
|
|
5249
5249
|
seconds: e.seconds,
|
5250
5250
|
milliseconds: e.milliseconds
|
5251
5251
|
}).as("milliseconds"), a = $t(i);
|
5252
|
-
let [
|
5253
|
-
return o !== 0 && (
|
5252
|
+
let [u, c] = mi(a, n, t.zone);
|
5253
|
+
return o !== 0 && (u += o, c = t.zone.offset(u)), { ts: u, o: c };
|
5254
5254
|
}
|
5255
5255
|
function Ne(t, e, n, s, r, i) {
|
5256
5256
|
const { setZone: o, zone: a } = n;
|
5257
5257
|
if (t && Object.keys(t).length !== 0 || e) {
|
5258
|
-
const
|
5258
|
+
const u = e || a, c = S.fromObject(t, {
|
5259
5259
|
...n,
|
5260
|
-
zone:
|
5260
|
+
zone: u,
|
5261
5261
|
specificOffset: i
|
5262
5262
|
});
|
5263
|
-
return o ?
|
5263
|
+
return o ? c : c.setZone(a);
|
5264
5264
|
} else
|
5265
5265
|
return S.invalid(
|
5266
5266
|
new re("unparsable", `the input "${r}" can't be parsed as ${s}`)
|
5267
5267
|
);
|
5268
5268
|
}
|
5269
|
-
function
|
5269
|
+
function ft(t, e, n = !0) {
|
5270
5270
|
return t.isValid ? q.create(N.create("en-US"), {
|
5271
5271
|
allowZ: n,
|
5272
5272
|
forceSimple: !0
|
@@ -5275,11 +5275,11 @@ function ht(t, e, n = !0) {
|
|
5275
5275
|
function sn(t, e) {
|
5276
5276
|
const n = t.c.year > 9999 || t.c.year < 0;
|
5277
5277
|
let s = "";
|
5278
|
-
return n && t.c.year >= 0 && (s += "+"), s +=
|
5278
|
+
return n && t.c.year >= 0 && (s += "+"), s += I(t.c.year, n ? 6 : 4), e ? (s += "-", s += I(t.c.month), s += "-", s += I(t.c.day)) : (s += I(t.c.month), s += I(t.c.day)), s;
|
5279
5279
|
}
|
5280
|
-
function
|
5281
|
-
let o =
|
5282
|
-
return e ? (o += ":", o +=
|
5280
|
+
function Is(t, e, n, s, r, i) {
|
5281
|
+
let o = I(t.c.hour);
|
5282
|
+
return e ? (o += ":", o += I(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += ":")) : o += I(t.c.minute), (t.c.millisecond !== 0 || t.c.second !== 0 || !n) && (o += I(t.c.second), (t.c.millisecond !== 0 || !s) && (o += ".", o += I(t.c.millisecond, 3))), r && (t.isOffsetFixed && t.offset === 0 && !i ? o += "Z" : t.o < 0 ? (o += "-", o += I(Math.trunc(-t.o / 60)), o += ":", o += I(Math.trunc(-t.o % 60))) : (o += "+", o += I(Math.trunc(t.o / 60)), o += ":", o += I(Math.trunc(t.o % 60)))), i && (o += "[" + t.zone.ianaName + "]"), o;
|
5283
5283
|
}
|
5284
5284
|
const pi = {
|
5285
5285
|
month: 1,
|
@@ -5310,7 +5310,7 @@ const pi = {
|
|
5310
5310
|
"second",
|
5311
5311
|
"millisecond"
|
5312
5312
|
], Mu = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
|
5313
|
-
function
|
5313
|
+
function Ru(t) {
|
5314
5314
|
const e = {
|
5315
5315
|
year: "year",
|
5316
5316
|
years: "year",
|
@@ -5352,11 +5352,11 @@ function Ds(t) {
|
|
5352
5352
|
case "localweekyears":
|
5353
5353
|
return "localWeekYear";
|
5354
5354
|
default:
|
5355
|
-
return
|
5355
|
+
return Ru(t);
|
5356
5356
|
}
|
5357
5357
|
}
|
5358
|
-
function
|
5359
|
-
return
|
5358
|
+
function Iu(t) {
|
5359
|
+
return bt[t] || (Tt === void 0 && (Tt = M.now()), bt[t] = t.offset(Tt)), bt[t];
|
5360
5360
|
}
|
5361
5361
|
function Ls(t, e) {
|
5362
5362
|
const n = we(e.zone, M.defaultZone);
|
@@ -5367,13 +5367,13 @@ function Ls(t, e) {
|
|
5367
5367
|
if (v(t.year))
|
5368
5368
|
r = M.now();
|
5369
5369
|
else {
|
5370
|
-
for (const
|
5371
|
-
v(t[
|
5370
|
+
for (const u of yi)
|
5371
|
+
v(t[u]) && (t[u] = pi[u]);
|
5372
5372
|
const o = Pr(t) || Wr(t);
|
5373
5373
|
if (o)
|
5374
5374
|
return S.invalid(o);
|
5375
|
-
const a =
|
5376
|
-
[r, i] =
|
5375
|
+
const a = Iu(n);
|
5376
|
+
[r, i] = vt(t, a, n);
|
5377
5377
|
}
|
5378
5378
|
return new S({ ts: r, zone: n, loc: s, o: i });
|
5379
5379
|
}
|
@@ -5392,7 +5392,7 @@ function Vs(t) {
|
|
5392
5392
|
let e = {}, n;
|
5393
5393
|
return t.length > 0 && typeof t[t.length - 1] == "object" ? (e = t[t.length - 1], n = Array.from(t).slice(0, t.length - 1)) : n = Array.from(t), [e, n];
|
5394
5394
|
}
|
5395
|
-
let
|
5395
|
+
let Tt, bt = {};
|
5396
5396
|
class S {
|
5397
5397
|
/**
|
5398
5398
|
* @access private
|
@@ -5407,7 +5407,7 @@ class S {
|
|
5407
5407
|
[r, i] = [e.old.c, e.old.o];
|
5408
5408
|
else {
|
5409
5409
|
const a = Se(e.o) && !e.old ? e.o : n.offset(this.ts);
|
5410
|
-
r =
|
5410
|
+
r = lt(this.ts, a), s = Number.isNaN(r.year) ? new re("invalid input") : null, r = s ? null : r, i = s ? null : a;
|
5411
5411
|
}
|
5412
5412
|
this._zone = n, this.loc = e.loc || N.create(), this.invalid = s, this.weekData = null, this.localWeekData = null, this.c = r, this.o = i, this.isLuxonDateTime = !0;
|
5413
5413
|
}
|
@@ -5444,8 +5444,8 @@ class S {
|
|
5444
5444
|
* @return {DateTime}
|
5445
5445
|
*/
|
5446
5446
|
static local() {
|
5447
|
-
const [e, n] = Vs(arguments), [s, r, i, o, a,
|
5448
|
-
return Ls({ year: s, month: r, day: i, hour: o, minute: a, second:
|
5447
|
+
const [e, n] = Vs(arguments), [s, r, i, o, a, u, c] = n;
|
5448
|
+
return Ls({ year: s, month: r, day: i, hour: o, minute: a, second: u, millisecond: c }, e);
|
5449
5449
|
}
|
5450
5450
|
/**
|
5451
5451
|
* Create a DateTime in UTC
|
@@ -5473,8 +5473,8 @@ class S {
|
|
5473
5473
|
* @return {DateTime}
|
5474
5474
|
*/
|
5475
5475
|
static utc() {
|
5476
|
-
const [e, n] = Vs(arguments), [s, r, i, o, a,
|
5477
|
-
return e.zone = z.utcInstance, Ls({ year: s, month: r, day: i, hour: o, minute: a, second:
|
5476
|
+
const [e, n] = Vs(arguments), [s, r, i, o, a, u, c] = n;
|
5477
|
+
return e.zone = z.utcInstance, Ls({ year: s, month: r, day: i, hour: o, minute: a, second: u, millisecond: c }, e);
|
5478
5478
|
}
|
5479
5479
|
/**
|
5480
5480
|
* Create a DateTime from a JavaScript Date object. Uses the default zone.
|
@@ -5574,7 +5574,7 @@ class S {
|
|
5574
5574
|
const s = we(n.zone, M.defaultZone);
|
5575
5575
|
if (!s.isValid)
|
5576
5576
|
return S.invalid(Ye(s));
|
5577
|
-
const r = N.fromObject(n), i = Mt(e, Ds), { minDaysInFirstWeek: o, startOfWeek: a } = Ts(i, r),
|
5577
|
+
const r = N.fromObject(n), i = Mt(e, Ds), { minDaysInFirstWeek: o, startOfWeek: a } = Ts(i, r), u = M.now(), c = v(n.specificOffset) ? s.offset(u) : n.specificOffset, l = !v(i.ordinal), h = !v(i.year), g = !v(i.month) || !v(i.day), d = h || g, m = i.weekYear || i.weekNumber;
|
5578
5578
|
if ((d || l) && m)
|
5579
5579
|
throw new Me(
|
5580
5580
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
@@ -5582,17 +5582,17 @@ class S {
|
|
5582
5582
|
if (g && l)
|
5583
5583
|
throw new Me("Can't mix ordinal dates with month/day");
|
5584
5584
|
const y = m || i.weekday && !d;
|
5585
|
-
let _, O,
|
5586
|
-
y ? (_ = Au, O = Nu,
|
5585
|
+
let _, O, R = lt(u, c);
|
5586
|
+
y ? (_ = Au, O = Nu, R = _t(R, o, a)) : l ? (_ = Mu, O = _u, R = Xt(R)) : (_ = yi, O = pi);
|
5587
5587
|
let fe = !1;
|
5588
5588
|
for (const Z of _) {
|
5589
5589
|
const Oe = i[Z];
|
5590
|
-
v(Oe) ? fe ? i[Z] = O[Z] : i[Z] =
|
5590
|
+
v(Oe) ? fe ? i[Z] = O[Z] : i[Z] = R[Z] : fe = !0;
|
5591
5591
|
}
|
5592
5592
|
const T = y ? oc(i, o, a) : l ? ac(i) : Pr(i), C = T || Wr(i);
|
5593
5593
|
if (C)
|
5594
5594
|
return S.invalid(C);
|
5595
|
-
const U = y ? Ss(i, o, a) : l ? vs(i) : i, [j, B] =
|
5595
|
+
const U = y ? Ss(i, o, a) : l ? vs(i) : i, [j, B] = vt(U, c, s), L = new S({
|
5596
5596
|
ts: j,
|
5597
5597
|
zone: s,
|
5598
5598
|
o: B,
|
@@ -5684,8 +5684,8 @@ class S {
|
|
5684
5684
|
locale: r,
|
5685
5685
|
numberingSystem: i,
|
5686
5686
|
defaultToEN: !0
|
5687
|
-
}), [a,
|
5688
|
-
return l ? S.invalid(l) : Ne(a,
|
5687
|
+
}), [a, u, c, l] = xu(o, e, n);
|
5688
|
+
return l ? S.invalid(l) : Ne(a, u, s, `format ${n}`, e, c);
|
5689
5689
|
}
|
5690
5690
|
/**
|
5691
5691
|
* @deprecated use fromFormat instead
|
@@ -5729,7 +5729,7 @@ class S {
|
|
5729
5729
|
throw new W("need to specify a reason the DateTime is invalid");
|
5730
5730
|
const s = e instanceof re ? e : new re(e, n);
|
5731
5731
|
if (M.throwOnInvalid)
|
5732
|
-
throw new
|
5732
|
+
throw new Ia(s);
|
5733
5733
|
return new S({ invalid: s });
|
5734
5734
|
}
|
5735
5735
|
/**
|
@@ -5761,7 +5761,7 @@ class S {
|
|
5761
5761
|
return li(q.parseFormat(e), N.fromObject(n)).map((r) => r.val).join("");
|
5762
5762
|
}
|
5763
5763
|
static resetCache() {
|
5764
|
-
|
5764
|
+
Tt = void 0, bt = {};
|
5765
5765
|
}
|
5766
5766
|
// INFO
|
5767
5767
|
/**
|
@@ -5975,7 +5975,7 @@ class S {
|
|
5975
5975
|
* @type {string}
|
5976
5976
|
*/
|
5977
5977
|
get monthShort() {
|
5978
|
-
return this.isValid ?
|
5978
|
+
return this.isValid ? ct.months("short", { locObj: this.loc })[this.month - 1] : null;
|
5979
5979
|
}
|
5980
5980
|
/**
|
5981
5981
|
* Get the human readable long month name, such as 'October'.
|
@@ -5984,7 +5984,7 @@ class S {
|
|
5984
5984
|
* @type {string}
|
5985
5985
|
*/
|
5986
5986
|
get monthLong() {
|
5987
|
-
return this.isValid ?
|
5987
|
+
return this.isValid ? ct.months("long", { locObj: this.loc })[this.month - 1] : null;
|
5988
5988
|
}
|
5989
5989
|
/**
|
5990
5990
|
* Get the human readable short weekday, such as 'Mon'.
|
@@ -5993,7 +5993,7 @@ class S {
|
|
5993
5993
|
* @type {string}
|
5994
5994
|
*/
|
5995
5995
|
get weekdayShort() {
|
5996
|
-
return this.isValid ?
|
5996
|
+
return this.isValid ? ct.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
|
5997
5997
|
}
|
5998
5998
|
/**
|
5999
5999
|
* Get the human readable long weekday, such as 'Monday'.
|
@@ -6002,7 +6002,7 @@ class S {
|
|
6002
6002
|
* @type {string}
|
6003
6003
|
*/
|
6004
6004
|
get weekdayLong() {
|
6005
|
-
return this.isValid ?
|
6005
|
+
return this.isValid ? ct.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
|
6006
6006
|
}
|
6007
6007
|
/**
|
6008
6008
|
* Get the UTC offset of this DateTime in minutes
|
@@ -6062,8 +6062,8 @@ class S {
|
|
6062
6062
|
const e = 864e5, n = 6e4, s = $t(this.c), r = this.zone.offset(s - e), i = this.zone.offset(s + e), o = this.zone.offset(s - r * n), a = this.zone.offset(s - i * n);
|
6063
6063
|
if (o === a)
|
6064
6064
|
return [this];
|
6065
|
-
const
|
6066
|
-
return l.hour === h.hour && l.minute === h.minute && l.second === h.second && l.millisecond === h.millisecond ? [Te(this, { ts:
|
6065
|
+
const u = s - o * n, c = s - a * n, l = lt(u, o), h = lt(c, a);
|
6066
|
+
return l.hour === h.hour && l.minute === h.minute && l.second === h.second && l.millisecond === h.millisecond ? [Te(this, { ts: u }), Te(this, { ts: c })] : [this];
|
6067
6067
|
}
|
6068
6068
|
/**
|
6069
6069
|
* Returns true if this DateTime is in a leap year, false otherwise
|
@@ -6072,7 +6072,7 @@ class S {
|
|
6072
6072
|
* @type {boolean}
|
6073
6073
|
*/
|
6074
6074
|
get isInLeapYear() {
|
6075
|
-
return
|
6075
|
+
return nt(this.year);
|
6076
6076
|
}
|
6077
6077
|
/**
|
6078
6078
|
* Returns the number of days in this DateTime's month
|
@@ -6090,7 +6090,7 @@ class S {
|
|
6090
6090
|
* @type {number}
|
6091
6091
|
*/
|
6092
6092
|
get daysInYear() {
|
6093
|
-
return this.isValid ?
|
6093
|
+
return this.isValid ? Ie(this.year) : NaN;
|
6094
6094
|
}
|
6095
6095
|
/**
|
6096
6096
|
* Returns the number of weeks in this DateTime's year
|
@@ -6100,7 +6100,7 @@ class S {
|
|
6100
6100
|
* @type {number}
|
6101
6101
|
*/
|
6102
6102
|
get weeksInWeekYear() {
|
6103
|
-
return this.isValid ?
|
6103
|
+
return this.isValid ? Xe(this.weekYear) : NaN;
|
6104
6104
|
}
|
6105
6105
|
/**
|
6106
6106
|
* Returns the number of weeks in this DateTime's local week year
|
@@ -6109,7 +6109,7 @@ class S {
|
|
6109
6109
|
* @type {number}
|
6110
6110
|
*/
|
6111
6111
|
get weeksInLocalWeekYear() {
|
6112
|
-
return this.isValid ?
|
6112
|
+
return this.isValid ? Xe(
|
6113
6113
|
this.localWeekYear,
|
6114
6114
|
this.loc.getMinDaysInFirstWeek(),
|
6115
6115
|
this.loc.getStartOfWeek()
|
@@ -6165,7 +6165,7 @@ class S {
|
|
6165
6165
|
let r = this.ts;
|
6166
6166
|
if (n || s) {
|
6167
6167
|
const i = e.offset(this.ts), o = this.toObject();
|
6168
|
-
[r] =
|
6168
|
+
[r] = vt(o, i, e);
|
6169
6169
|
}
|
6170
6170
|
return Te(this, { ts: r, zone: e });
|
6171
6171
|
} else
|
@@ -6205,12 +6205,12 @@ class S {
|
|
6205
6205
|
*/
|
6206
6206
|
set(e) {
|
6207
6207
|
if (!this.isValid) return this;
|
6208
|
-
const n = Mt(e, Ds), { minDaysInFirstWeek: s, startOfWeek: r } = Ts(n, this.loc), i = !v(n.weekYear) || !v(n.weekNumber) || !v(n.weekday), o = !v(n.ordinal), a = !v(n.year),
|
6209
|
-
if ((
|
6208
|
+
const n = Mt(e, Ds), { minDaysInFirstWeek: s, startOfWeek: r } = Ts(n, this.loc), i = !v(n.weekYear) || !v(n.weekNumber) || !v(n.weekday), o = !v(n.ordinal), a = !v(n.year), u = !v(n.month) || !v(n.day), c = a || u, l = n.weekYear || n.weekNumber;
|
6209
|
+
if ((c || o) && l)
|
6210
6210
|
throw new Me(
|
6211
6211
|
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
|
6212
6212
|
);
|
6213
|
-
if (
|
6213
|
+
if (u && o)
|
6214
6214
|
throw new Me("Can't mix ordinal dates with month/day");
|
6215
6215
|
let h;
|
6216
6216
|
i ? h = Ss(
|
@@ -6218,7 +6218,7 @@ class S {
|
|
6218
6218
|
s,
|
6219
6219
|
r
|
6220
6220
|
) : v(n.ordinal) ? (h = { ...this.toObject(), ...n }, v(n.day) && (h.day = Math.min(At(h.year, h.month), h.day))) : h = vs({ ...Xt(this.c), ...n });
|
6221
|
-
const [g, d] =
|
6221
|
+
const [g, d] = vt(h, this.o, this.zone);
|
6222
6222
|
return Te(this, { ts: g, o: d });
|
6223
6223
|
}
|
6224
6224
|
/**
|
@@ -6237,7 +6237,7 @@ class S {
|
|
6237
6237
|
plus(e) {
|
6238
6238
|
if (!this.isValid) return this;
|
6239
6239
|
const n = k.fromDurationLike(e);
|
6240
|
-
return Te(this,
|
6240
|
+
return Te(this, Rs(this, n));
|
6241
6241
|
}
|
6242
6242
|
/**
|
6243
6243
|
* Subtract a period of time to this DateTime and return the resulting DateTime
|
@@ -6248,7 +6248,7 @@ class S {
|
|
6248
6248
|
minus(e) {
|
6249
6249
|
if (!this.isValid) return this;
|
6250
6250
|
const n = k.fromDurationLike(e).negate();
|
6251
|
-
return Te(this,
|
6251
|
+
return Te(this, Rs(this, n));
|
6252
6252
|
}
|
6253
6253
|
/**
|
6254
6254
|
* "Set" this DateTime to the beginning of a unit of time.
|
@@ -6388,7 +6388,7 @@ class S {
|
|
6388
6388
|
return null;
|
6389
6389
|
const o = e === "extended";
|
6390
6390
|
let a = sn(this, o);
|
6391
|
-
return a += "T", a +=
|
6391
|
+
return a += "T", a += Is(this, o, n, s, r, i), a;
|
6392
6392
|
}
|
6393
6393
|
/**
|
6394
6394
|
* Returns an ISO 8601-compliant string representation of this DateTime's date component
|
@@ -6407,7 +6407,7 @@ class S {
|
|
6407
6407
|
* @return {string}
|
6408
6408
|
*/
|
6409
6409
|
toISOWeekDate() {
|
6410
|
-
return
|
6410
|
+
return ft(this, "kkkk-'W'WW-c");
|
6411
6411
|
}
|
6412
6412
|
/**
|
6413
6413
|
* Returns an ISO 8601-compliant string representation of this DateTime's time component
|
@@ -6432,7 +6432,7 @@ class S {
|
|
6432
6432
|
extendedZone: i = !1,
|
6433
6433
|
format: o = "extended"
|
6434
6434
|
} = {}) {
|
6435
|
-
return this.isValid ? (r ? "T" : "") +
|
6435
|
+
return this.isValid ? (r ? "T" : "") + Is(
|
6436
6436
|
this,
|
6437
6437
|
o === "extended",
|
6438
6438
|
n,
|
@@ -6448,7 +6448,7 @@ class S {
|
|
6448
6448
|
* @return {string}
|
6449
6449
|
*/
|
6450
6450
|
toRFC2822() {
|
6451
|
-
return
|
6451
|
+
return ft(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", !1);
|
6452
6452
|
}
|
6453
6453
|
/**
|
6454
6454
|
* Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
|
@@ -6459,7 +6459,7 @@ class S {
|
|
6459
6459
|
* @return {string}
|
6460
6460
|
*/
|
6461
6461
|
toHTTP() {
|
6462
|
-
return
|
6462
|
+
return ft(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
|
6463
6463
|
}
|
6464
6464
|
/**
|
6465
6465
|
* Returns a string representation of this DateTime appropriate for use in SQL Date
|
@@ -6483,7 +6483,7 @@ class S {
|
|
6483
6483
|
*/
|
6484
6484
|
toSQLTime({ includeOffset: e = !0, includeZone: n = !1, includeOffsetSpace: s = !0 } = {}) {
|
6485
6485
|
let r = "HH:mm:ss.SSS";
|
6486
|
-
return (n || e) && (s && (r += " "), n ? r += "z" : e && (r += "ZZ")),
|
6486
|
+
return (n || e) && (s && (r += " "), n ? r += "z" : e && (r += "ZZ")), ft(this, r, !0);
|
6487
6487
|
}
|
6488
6488
|
/**
|
6489
6489
|
* Returns a string representation of this DateTime appropriate for use in SQL DateTime
|
@@ -6594,8 +6594,8 @@ class S {
|
|
6594
6594
|
diff(e, n = "milliseconds", s = {}) {
|
6595
6595
|
if (!this.isValid || !e.isValid)
|
6596
6596
|
return k.invalid("created by diffing an invalid DateTime");
|
6597
|
-
const r = { locale: this.locale, numberingSystem: this.numberingSystem, ...s }, i = lc(n).map(k.normalizeUnit), o = e.valueOf() > this.valueOf(), a = o ? this : e,
|
6598
|
-
return o ?
|
6597
|
+
const r = { locale: this.locale, numberingSystem: this.numberingSystem, ...s }, i = lc(n).map(k.normalizeUnit), o = e.valueOf() > this.valueOf(), a = o ? this : e, u = o ? e : this, c = mu(a, u, i, r);
|
6598
|
+
return o ? c.negate() : c;
|
6599
6599
|
}
|
6600
6600
|
/**
|
6601
6601
|
* Return the difference between this DateTime and right now.
|
@@ -6778,14 +6778,14 @@ class S {
|
|
6778
6778
|
throw new W(
|
6779
6779
|
`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`
|
6780
6780
|
);
|
6781
|
-
const { result: a, zone:
|
6781
|
+
const { result: a, zone: u, specificOffset: c, invalidReason: l } = n.explainFromTokens(e);
|
6782
6782
|
return l ? S.invalid(l) : Ne(
|
6783
6783
|
a,
|
6784
|
-
|
6784
|
+
u,
|
6785
6785
|
s,
|
6786
6786
|
`format ${n.format}`,
|
6787
6787
|
e,
|
6788
|
-
|
6788
|
+
c
|
6789
6789
|
);
|
6790
6790
|
}
|
6791
6791
|
// FORMAT PRESETS
|
@@ -6906,7 +6906,7 @@ class S {
|
|
6906
6906
|
* @type {Object}
|
6907
6907
|
*/
|
6908
6908
|
static get DATETIME_MED_WITH_SECONDS() {
|
6909
|
-
return
|
6909
|
+
return Rr;
|
6910
6910
|
}
|
6911
6911
|
/**
|
6912
6912
|
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
|
@@ -6920,7 +6920,7 @@ class S {
|
|
6920
6920
|
* @type {Object}
|
6921
6921
|
*/
|
6922
6922
|
static get DATETIME_FULL() {
|
6923
|
-
return
|
6923
|
+
return Ir;
|
6924
6924
|
}
|
6925
6925
|
/**
|
6926
6926
|
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
|
@@ -6970,7 +6970,7 @@ function Bu(t, e) {
|
|
6970
6970
|
const $u = /* @__PURE__ */ oe(Du, [["render", Bu]]), Uu = { class: "messages-container-list" }, Pu = { class: "message-container" }, Wu = {
|
6971
6971
|
key: 0,
|
6972
6972
|
class: "btn-container-widget"
|
6973
|
-
}, qu = ["onClick"], Hu = { class: "chat-message" }, zu =
|
6973
|
+
}, qu = ["onClick"], Hu = { class: "chat-message" }, zu = ["innerHTML"], Zu = { class: "detail-message flex justify-content-between" }, ju = {
|
6974
6974
|
key: 0,
|
6975
6975
|
class: "mr-5"
|
6976
6976
|
}, Yu = {
|
@@ -6990,24 +6990,29 @@ const $u = /* @__PURE__ */ oe(Du, [["render", Bu]]), Uu = { class: "messages-con
|
|
6990
6990
|
},
|
6991
6991
|
emits: ["loadMore", "retry"],
|
6992
6992
|
setup(t, { emit: e }) {
|
6993
|
-
const n = t, s = H(), { pause: r, resume: i } =
|
6993
|
+
const n = t, s = H(), { pause: r, resume: i } = Ra(
|
6994
6994
|
s,
|
6995
|
-
([{ isIntersecting:
|
6996
|
-
|
6995
|
+
([{ isIntersecting: a }]) => {
|
6996
|
+
a && e("loadMore");
|
6997
6997
|
}
|
6998
6998
|
);
|
6999
|
-
|
6999
|
+
Bi(() => {
|
7000
7000
|
n.canLoadMoreMessages || r();
|
7001
7001
|
}), En(
|
7002
7002
|
() => n.canLoadMoreMessages,
|
7003
|
-
(
|
7004
|
-
if (
|
7003
|
+
(a) => {
|
7004
|
+
if (a) {
|
7005
7005
|
i();
|
7006
7006
|
return;
|
7007
7007
|
}
|
7008
7008
|
r();
|
7009
7009
|
}
|
7010
|
-
)
|
7010
|
+
);
|
7011
|
+
function o(a) {
|
7012
|
+
const u = /(https?:\/\/[^\s]+)/g;
|
7013
|
+
return a.replace(u, (c) => `<a href="${c}" target="_blank">${c}</a>`);
|
7014
|
+
}
|
7015
|
+
return (a, u) => (F(), $(zn, null, [
|
7011
7016
|
w("div", {
|
7012
7017
|
ref_key: "target",
|
7013
7018
|
ref: s,
|
@@ -7015,10 +7020,10 @@ const $u = /* @__PURE__ */ oe(Du, [["render", Bu]]), Uu = { class: "messages-con
|
|
7015
7020
|
}, null, 512),
|
7016
7021
|
w("div", Uu, [
|
7017
7022
|
(F(!0), $(zn, null, $i(n.messages, (c) => {
|
7018
|
-
var
|
7023
|
+
var l, h;
|
7019
7024
|
return F(), $("div", {
|
7020
7025
|
key: c.id,
|
7021
|
-
class:
|
7026
|
+
class: Re(["message", c.esCliente ? "message-right" : "message-left"])
|
7022
7027
|
}, [
|
7023
7028
|
w("div", Pu, [
|
7024
7029
|
c.error && c.esCliente ? (F(), $("div", Wu, [
|
@@ -7028,22 +7033,25 @@ const $u = /* @__PURE__ */ oe(Du, [["render", Bu]]), Uu = { class: "messages-con
|
|
7028
7033
|
class: "btn-danger",
|
7029
7034
|
icon: "fa-solid fa-circle-exclamation",
|
7030
7035
|
"aria-label": "Cancel",
|
7031
|
-
onClick: (
|
7036
|
+
onClick: (g) => e("retry", c)
|
7032
7037
|
}, [
|
7033
7038
|
he($u)
|
7034
7039
|
], 8, qu)
|
7035
|
-
])) :
|
7040
|
+
])) : Ct("", !0),
|
7036
7041
|
w("div", Hu, [
|
7037
7042
|
w("div", {
|
7038
|
-
class:
|
7043
|
+
class: Re(["bubble", c.esCliente ? "right" : "left"])
|
7039
7044
|
}, [
|
7040
7045
|
w("div", {
|
7041
|
-
class:
|
7046
|
+
class: Re(c.esCliente ? "content-right" : "content-left")
|
7042
7047
|
}, [
|
7043
|
-
w("div",
|
7048
|
+
w("div", {
|
7049
|
+
class: "message-text",
|
7050
|
+
innerHTML: o(c.message)
|
7051
|
+
}, null, 8, zu),
|
7044
7052
|
w("div", Zu, [
|
7045
|
-
(
|
7046
|
-
w("span", null,
|
7053
|
+
(l = c.sender) != null && l.nombreCompleto ? (F(), $("span", ju, xt(c.esCliente ? (h = c.sender) == null ? void 0 : h.nombreCompleto : "ECOSISTEMA JL"), 1)) : (F(), $("span", Yu)),
|
7054
|
+
w("span", null, xt(Ys(S).fromISO(c.createdAt).toFormat(
|
7047
7055
|
"dd-MM-yyyy HH:mm"
|
7048
7056
|
)), 1)
|
7049
7057
|
])
|
@@ -7056,7 +7064,7 @@ const $u = /* @__PURE__ */ oe(Du, [["render", Bu]]), Uu = { class: "messages-con
|
|
7056
7064
|
])
|
7057
7065
|
], 64));
|
7058
7066
|
}
|
7059
|
-
}), Gu = /* @__PURE__ */ oe(Ju, [["__scopeId", "data-v-
|
7067
|
+
}), Gu = /* @__PURE__ */ oe(Ju, [["__scopeId", "data-v-c9967d67"]]), Ku = {}, gi = (t) => (Ui("data-v-d9a6b2b7"), t = t(), Pi(), t), Xu = {
|
7060
7068
|
viewBox: "0 0 24 24",
|
7061
7069
|
xmlns: "http://www.w3.org/2000/svg",
|
7062
7070
|
style: { width: "28px", height: "28px" }
|
@@ -7087,9 +7095,9 @@ ue.pong = "3";
|
|
7087
7095
|
ue.message = "4";
|
7088
7096
|
ue.upgrade = "5";
|
7089
7097
|
ue.noop = "6";
|
7090
|
-
const
|
7098
|
+
const kt = /* @__PURE__ */ Object.create(null);
|
7091
7099
|
Object.keys(ue).forEach((t) => {
|
7092
|
-
|
7100
|
+
kt[ue[t]] = t;
|
7093
7101
|
});
|
7094
7102
|
const wn = { type: "error", data: "parser error" }, wi = typeof Blob == "function" || typeof Blob < "u" && Object.prototype.toString.call(Blob) === "[object BlobConstructor]", Si = typeof ArrayBuffer == "function", vi = (t) => typeof ArrayBuffer.isView == "function" ? ArrayBuffer.isView(t) : t && t.buffer instanceof ArrayBuffer, Bn = ({ type: t, data: e }, n, s) => wi && e instanceof Blob ? n ? s(e) : Bs(e, s) : Si && (e instanceof ArrayBuffer || vi(e)) ? n ? s(e) : Bs(new Blob([e]), s) : s(ue[t] + (e || "")), Bs = (t, e) => {
|
7095
7103
|
const n = new FileReader();
|
@@ -7115,12 +7123,12 @@ const Us = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", J
|
|
7115
7123
|
for (let t = 0; t < Us.length; t++)
|
7116
7124
|
Je[Us.charCodeAt(t)] = t;
|
7117
7125
|
const ol = (t) => {
|
7118
|
-
let e = t.length * 0.75, n = t.length, s, r = 0, i, o, a,
|
7126
|
+
let e = t.length * 0.75, n = t.length, s, r = 0, i, o, a, u;
|
7119
7127
|
t[t.length - 1] === "=" && (e--, t[t.length - 2] === "=" && e--);
|
7120
|
-
const
|
7128
|
+
const c = new ArrayBuffer(e), l = new Uint8Array(c);
|
7121
7129
|
for (s = 0; s < n; s += 4)
|
7122
|
-
i = Je[t.charCodeAt(s)], o = Je[t.charCodeAt(s + 1)], a = Je[t.charCodeAt(s + 2)],
|
7123
|
-
return
|
7130
|
+
i = Je[t.charCodeAt(s)], o = Je[t.charCodeAt(s + 1)], a = Je[t.charCodeAt(s + 2)], u = Je[t.charCodeAt(s + 3)], l[r++] = i << 2 | o >> 4, l[r++] = (o & 15) << 4 | a >> 2, l[r++] = (a & 3) << 6 | u & 63;
|
7131
|
+
return c;
|
7124
7132
|
}, al = typeof ArrayBuffer == "function", $n = (t, e) => {
|
7125
7133
|
if (typeof t != "string")
|
7126
7134
|
return {
|
@@ -7131,11 +7139,11 @@ const ol = (t) => {
|
|
7131
7139
|
return n === "b" ? {
|
7132
7140
|
type: "message",
|
7133
7141
|
data: cl(t.substring(1), e)
|
7134
|
-
} :
|
7135
|
-
type:
|
7142
|
+
} : kt[n] ? t.length > 1 ? {
|
7143
|
+
type: kt[n],
|
7136
7144
|
data: t.substring(1)
|
7137
7145
|
} : {
|
7138
|
-
type:
|
7146
|
+
type: kt[n]
|
7139
7147
|
} : wn;
|
7140
7148
|
}, cl = (t, e) => {
|
7141
7149
|
if (al) {
|
@@ -7191,10 +7199,10 @@ function fl() {
|
|
7191
7199
|
});
|
7192
7200
|
}
|
7193
7201
|
let on;
|
7194
|
-
function
|
7202
|
+
function ht(t) {
|
7195
7203
|
return t.reduce((e, n) => e + n.length, 0);
|
7196
7204
|
}
|
7197
|
-
function
|
7205
|
+
function dt(t, e) {
|
7198
7206
|
if (t[0].length === e)
|
7199
7207
|
return t.shift();
|
7200
7208
|
const n = new Uint8Array(e);
|
@@ -7211,29 +7219,29 @@ function hl(t, e) {
|
|
7211
7219
|
transform(o, a) {
|
7212
7220
|
for (n.push(o); ; ) {
|
7213
7221
|
if (s === 0) {
|
7214
|
-
if (
|
7222
|
+
if (ht(n) < 1)
|
7215
7223
|
break;
|
7216
|
-
const
|
7217
|
-
i = (
|
7224
|
+
const u = dt(n, 1);
|
7225
|
+
i = (u[0] & 128) === 128, r = u[0] & 127, r < 126 ? s = 3 : r === 126 ? s = 1 : s = 2;
|
7218
7226
|
} else if (s === 1) {
|
7219
|
-
if (
|
7227
|
+
if (ht(n) < 2)
|
7220
7228
|
break;
|
7221
|
-
const
|
7222
|
-
r = new DataView(
|
7229
|
+
const u = dt(n, 2);
|
7230
|
+
r = new DataView(u.buffer, u.byteOffset, u.length).getUint16(0), s = 3;
|
7223
7231
|
} else if (s === 2) {
|
7224
|
-
if (
|
7232
|
+
if (ht(n) < 8)
|
7225
7233
|
break;
|
7226
|
-
const
|
7234
|
+
const u = dt(n, 8), c = new DataView(u.buffer, u.byteOffset, u.length), l = c.getUint32(0);
|
7227
7235
|
if (l > Math.pow(2, 21) - 1) {
|
7228
7236
|
a.enqueue(wn);
|
7229
7237
|
break;
|
7230
7238
|
}
|
7231
|
-
r = l * Math.pow(2, 32) +
|
7239
|
+
r = l * Math.pow(2, 32) + c.getUint32(4), s = 3;
|
7232
7240
|
} else {
|
7233
|
-
if (
|
7241
|
+
if (ht(n) < r)
|
7234
7242
|
break;
|
7235
|
-
const
|
7236
|
-
a.enqueue($n(i ?
|
7243
|
+
const u = dt(n, r);
|
7244
|
+
a.enqueue($n(i ? u : on.decode(u), e)), s = 0;
|
7237
7245
|
}
|
7238
7246
|
if (r === 0 || r > t) {
|
7239
7247
|
a.enqueue(wn);
|
@@ -7429,7 +7437,7 @@ class Un extends D {
|
|
7429
7437
|
}
|
7430
7438
|
}
|
7431
7439
|
const Oi = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), Sn = 64, bl = {};
|
7432
|
-
let Ps = 0,
|
7440
|
+
let Ps = 0, mt = 0, Ws;
|
7433
7441
|
function qs(t) {
|
7434
7442
|
let e = "";
|
7435
7443
|
do
|
@@ -7441,8 +7449,8 @@ function Ci() {
|
|
7441
7449
|
const t = qs(+/* @__PURE__ */ new Date());
|
7442
7450
|
return t !== Ws ? (Ps = 0, Ws = t) : t + "." + qs(Ps++);
|
7443
7451
|
}
|
7444
|
-
for (;
|
7445
|
-
bl[Oi[
|
7452
|
+
for (; mt < Sn; mt++)
|
7453
|
+
bl[Oi[mt]] = mt;
|
7446
7454
|
let xi = !1;
|
7447
7455
|
try {
|
7448
7456
|
xi = typeof XMLHttpRequest < "u" && "withCredentials" in new XMLHttpRequest();
|
@@ -7717,7 +7725,7 @@ function Hs() {
|
|
7717
7725
|
for (let t in ce.requests)
|
7718
7726
|
ce.requests.hasOwnProperty(t) && ce.requests[t].abort();
|
7719
7727
|
}
|
7720
|
-
const Pn = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, n) => n(e, 0),
|
7728
|
+
const Pn = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, n) => n(e, 0), pt = G.WebSocket || G.MozWebSocket, zs = !0, xl = "arraybuffer", Zs = typeof navigator < "u" && typeof navigator.product == "string" && navigator.product.toLowerCase() === "reactnative";
|
7721
7729
|
class Nl extends Un {
|
7722
7730
|
/**
|
7723
7731
|
* WebSocket transport constructor.
|
@@ -7737,7 +7745,7 @@ class Nl extends Un {
|
|
7737
7745
|
const e = this.uri(), n = this.opts.protocols, s = Zs ? {} : Ei(this.opts, "agent", "perMessageDeflate", "pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress", "protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
|
7738
7746
|
this.opts.extraHeaders && (s.headers = this.opts.extraHeaders);
|
7739
7747
|
try {
|
7740
|
-
this.ws = zs && !Zs ? n ? new
|
7748
|
+
this.ws = zs && !Zs ? n ? new pt(e, n) : new pt(e) : new pt(e, n, s);
|
7741
7749
|
} catch (r) {
|
7742
7750
|
return this.emitReserved("error", r);
|
7743
7751
|
}
|
@@ -7791,7 +7799,7 @@ class Nl extends Un {
|
|
7791
7799
|
* @private
|
7792
7800
|
*/
|
7793
7801
|
check() {
|
7794
|
-
return !!
|
7802
|
+
return !!pt;
|
7795
7803
|
}
|
7796
7804
|
}
|
7797
7805
|
class _l extends Un {
|
@@ -7808,8 +7816,8 @@ class _l extends Un {
|
|
7808
7816
|
const n = hl(Number.MAX_SAFE_INTEGER, this.socket.binaryType), s = e.readable.pipeThrough(n).getReader(), r = fl();
|
7809
7817
|
r.readable.pipeTo(e.writable), this.writer = r.writable.getWriter();
|
7810
7818
|
const i = () => {
|
7811
|
-
s.read().then(({ done: a, value:
|
7812
|
-
a || (this.onPacket(
|
7819
|
+
s.read().then(({ done: a, value: u }) => {
|
7820
|
+
a || (this.onPacket(u), i());
|
7813
7821
|
}).catch((a) => {
|
7814
7822
|
});
|
7815
7823
|
};
|
@@ -7839,7 +7847,7 @@ const Al = {
|
|
7839
7847
|
websocket: Nl,
|
7840
7848
|
webtransport: _l,
|
7841
7849
|
polling: Cl
|
7842
|
-
}, Ml = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
|
7850
|
+
}, Ml = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/, Rl = [
|
7843
7851
|
"source",
|
7844
7852
|
"protocol",
|
7845
7853
|
"authority",
|
@@ -7860,10 +7868,10 @@ function vn(t) {
|
|
7860
7868
|
n != -1 && s != -1 && (t = t.substring(0, n) + t.substring(n, s).replace(/:/g, ";") + t.substring(s, t.length));
|
7861
7869
|
let r = Ml.exec(t || ""), i = {}, o = 14;
|
7862
7870
|
for (; o--; )
|
7863
|
-
i[
|
7864
|
-
return n != -1 && s != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames =
|
7871
|
+
i[Rl[o]] = r[o] || "";
|
7872
|
+
return n != -1 && s != -1 && (i.source = e, i.host = i.host.substring(1, i.host.length - 1).replace(/;/g, ":"), i.authority = i.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), i.ipv6uri = !0), i.pathNames = Il(i, i.path), i.queryKey = Dl(i, i.query), i;
|
7865
7873
|
}
|
7866
|
-
function
|
7874
|
+
function Il(t, e) {
|
7867
7875
|
const n = /\/{2,9}/g, s = e.replace(n, "/").split("/");
|
7868
7876
|
return (e.slice(0, 1) == "/" || e.length === 0) && s.splice(0, 1), e.slice(-1) == "/" && s.splice(s.length - 1, 1), s;
|
7869
7877
|
}
|
@@ -7993,16 +8001,16 @@ let _i = class Ae extends D {
|
|
7993
8001
|
function a() {
|
7994
8002
|
o("transport closed");
|
7995
8003
|
}
|
7996
|
-
function
|
8004
|
+
function u() {
|
7997
8005
|
o("socket closed");
|
7998
8006
|
}
|
7999
|
-
function
|
8007
|
+
function c(h) {
|
8000
8008
|
n && h.name !== n.name && i();
|
8001
8009
|
}
|
8002
8010
|
const l = () => {
|
8003
|
-
n.removeListener("open", r), n.removeListener("error", o), n.removeListener("close", a), this.off("close",
|
8011
|
+
n.removeListener("open", r), n.removeListener("error", o), n.removeListener("close", a), this.off("close", u), this.off("upgrading", c);
|
8004
8012
|
};
|
8005
|
-
n.once("open", r), n.once("error", o), n.once("close", a), this.once("close",
|
8013
|
+
n.once("open", r), n.once("error", o), n.once("close", a), this.once("close", u), this.once("upgrading", c), this.upgrades.indexOf("webtransport") !== -1 && e !== "webtransport" ? this.setTimeoutFn(() => {
|
8006
8014
|
s || n.open();
|
8007
8015
|
}, 200) : n.open();
|
8008
8016
|
}
|
@@ -8189,21 +8197,21 @@ const Fl = typeof ArrayBuffer == "function", Vl = (t) => typeof ArrayBuffer.isVi
|
|
8189
8197
|
function Wn(t) {
|
8190
8198
|
return Fl && (t instanceof ArrayBuffer || Vl(t)) || Bl && t instanceof Blob || $l && t instanceof File;
|
8191
8199
|
}
|
8192
|
-
function
|
8200
|
+
function Et(t, e) {
|
8193
8201
|
if (!t || typeof t != "object")
|
8194
8202
|
return !1;
|
8195
8203
|
if (Array.isArray(t)) {
|
8196
8204
|
for (let n = 0, s = t.length; n < s; n++)
|
8197
|
-
if (
|
8205
|
+
if (Et(t[n]))
|
8198
8206
|
return !0;
|
8199
8207
|
return !1;
|
8200
8208
|
}
|
8201
8209
|
if (Wn(t))
|
8202
8210
|
return !0;
|
8203
8211
|
if (t.toJSON && typeof t.toJSON == "function" && arguments.length === 1)
|
8204
|
-
return
|
8212
|
+
return Et(t.toJSON(), !0);
|
8205
8213
|
for (const n in t)
|
8206
|
-
if (Object.prototype.hasOwnProperty.call(t, n) &&
|
8214
|
+
if (Object.prototype.hasOwnProperty.call(t, n) && Et(t[n]))
|
8207
8215
|
return !0;
|
8208
8216
|
return !1;
|
8209
8217
|
}
|
@@ -8277,7 +8285,7 @@ class Hl {
|
|
8277
8285
|
* @param {Object} obj - packet object
|
8278
8286
|
*/
|
8279
8287
|
encode(e) {
|
8280
|
-
return (e.type === b.EVENT || e.type === b.ACK) &&
|
8288
|
+
return (e.type === b.EVENT || e.type === b.ACK) && Et(e) ? this.encodeAsBinary({
|
8281
8289
|
type: e.type === b.EVENT ? b.BINARY_EVENT : b.BINARY_ACK,
|
8282
8290
|
nsp: e.nsp,
|
8283
8291
|
data: e.data,
|
@@ -9125,11 +9133,11 @@ class kn extends D {
|
|
9125
9133
|
this.cleanup(), this._readyState = "closed", this.emitReserved("error", a), e ? e(a) : this.maybeReconnectOnOpen();
|
9126
9134
|
}, o = se(n, "error", i);
|
9127
9135
|
if (this._timeout !== !1) {
|
9128
|
-
const a = this._timeout,
|
9136
|
+
const a = this._timeout, u = this.setTimeoutFn(() => {
|
9129
9137
|
r(), i(new Error("timeout")), n.close();
|
9130
9138
|
}, a);
|
9131
|
-
this.opts.autoUnref &&
|
9132
|
-
this.clearTimeoutFn(
|
9139
|
+
this.opts.autoUnref && u.unref(), this.subs.push(() => {
|
9140
|
+
this.clearTimeoutFn(u);
|
9133
9141
|
});
|
9134
9142
|
}
|
9135
9143
|
return this.subs.push(r), this.subs.push(o), this;
|
@@ -9292,19 +9300,19 @@ class kn extends D {
|
|
9292
9300
|
}
|
9293
9301
|
}
|
9294
9302
|
const Ze = {};
|
9295
|
-
function
|
9303
|
+
function Ot(t, e) {
|
9296
9304
|
typeof t == "object" && (e = t, t = void 0), e = e || {};
|
9297
9305
|
const n = Ll(t, e.path || "/socket.io"), s = n.source, r = n.id, i = n.path, o = Ze[r] && i in Ze[r].nsps, a = e.forceNew || e["force new connection"] || e.multiplex === !1 || o;
|
9298
|
-
let
|
9299
|
-
return a ?
|
9306
|
+
let u;
|
9307
|
+
return a ? u = new kn(s, e) : (Ze[r] || (Ze[r] = new kn(s, e)), u = Ze[r]), n.query && !e.query && (e.query = n.queryKey), u.socket(n.path, e);
|
9300
9308
|
}
|
9301
|
-
Object.assign(
|
9309
|
+
Object.assign(Ot, {
|
9302
9310
|
Manager: kn,
|
9303
9311
|
Socket: Mi,
|
9304
|
-
io:
|
9305
|
-
connect:
|
9312
|
+
io: Ot,
|
9313
|
+
connect: Ot
|
9306
9314
|
});
|
9307
|
-
var
|
9315
|
+
var Ri = /* @__PURE__ */ ((t) => (t.WEBCHAT = "webchat", t.CENTRAL = "central", t.WHATSAPP = "whatsapp", t.TELEGRAM = "telegram", t.SMS = "sms", t))(Ri || {});
|
9308
9316
|
const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "title-chat" }, Kl = {
|
9309
9317
|
key: 0,
|
9310
9318
|
class: "loader"
|
@@ -9337,7 +9345,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9337
9345
|
const n = t, s = H(""), r = H(0), i = H({
|
9338
9346
|
data: [],
|
9339
9347
|
canLoadMoreMessages: !1
|
9340
|
-
}), o = H(""), a = H(!1),
|
9348
|
+
}), o = H(""), a = H(!1), u = H(null);
|
9341
9349
|
En(
|
9342
9350
|
() => n.visible,
|
9343
9351
|
async (T) => {
|
@@ -9346,7 +9354,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9346
9354
|
C && (o.value = C.appChat.id);
|
9347
9355
|
}
|
9348
9356
|
);
|
9349
|
-
const
|
9357
|
+
const c = async (T) => {
|
9350
9358
|
var j, B, L;
|
9351
9359
|
if (((j = s.value) == null ? void 0 : j.length) > 300) {
|
9352
9360
|
e("show-toast", {
|
@@ -9368,7 +9376,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9368
9376
|
}
|
9369
9377
|
const C = {
|
9370
9378
|
id: Gi(),
|
9371
|
-
chatId: (L = (B =
|
9379
|
+
chatId: (L = (B = R.value) == null ? void 0 : B.chat) == null ? void 0 : L.id,
|
9372
9380
|
message: s.value,
|
9373
9381
|
visto: !0,
|
9374
9382
|
multimedia: !1,
|
@@ -9396,10 +9404,10 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9396
9404
|
});
|
9397
9405
|
else {
|
9398
9406
|
i.value.data[U] = Z;
|
9399
|
-
const
|
9407
|
+
const Ii = { ...Z, chatId: C.chatId };
|
9400
9408
|
(Hn = O.value) == null || Hn.emit(
|
9401
9409
|
"sendMessage",
|
9402
|
-
{ roomId: (Oe =
|
9410
|
+
{ roomId: (Oe = R == null ? void 0 : R.value) == null ? void 0 : Oe.appChat.id, message: Ii },
|
9403
9411
|
(Di) => {
|
9404
9412
|
console.log("🚀 ~ socketService.value.emit ~ response:", Di);
|
9405
9413
|
}
|
@@ -9421,7 +9429,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9421
9429
|
const U = await Ea({ body: C, token: n.tokenAuth });
|
9422
9430
|
a.value = !1, i.value.data.unshift(
|
9423
9431
|
...U.data.sort((Z, Oe) => -Oe.createdAt.localeCompare(Z.createdAt))
|
9424
|
-
), i.value.canLoadMoreMessages = U.pagination.total > U.pagination.size, T && ((B =
|
9432
|
+
), i.value.canLoadMoreMessages = U.pagination.total > U.pagination.size, T && ((B = u.value) != null && B.scrollHeight) && m((L = u.value) == null ? void 0 : L.scrollHeight), T || d();
|
9425
9433
|
}, g = async (T) => {
|
9426
9434
|
e("show-confirm", async () => {
|
9427
9435
|
var U, j, B;
|
@@ -9442,29 +9450,29 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9442
9450
|
);
|
9443
9451
|
i.value.data[L] = { ...C, error: void 0 }, (B = O.value) == null || B.emit(
|
9444
9452
|
"sendMessage",
|
9445
|
-
{ roomId: (j =
|
9453
|
+
{ roomId: (j = R == null ? void 0 : R.value) == null ? void 0 : j.appChat.id, message: T }
|
9446
9454
|
);
|
9447
9455
|
}
|
9448
9456
|
d();
|
9449
9457
|
});
|
9450
9458
|
}, d = () => {
|
9451
9459
|
Zn(() => {
|
9452
|
-
|
9460
|
+
u.value && (u.value.scrollTop = u.value.scrollHeight);
|
9453
9461
|
});
|
9454
9462
|
}, m = (T) => {
|
9455
9463
|
Zn(() => {
|
9456
|
-
const C =
|
9464
|
+
const C = u.value;
|
9457
9465
|
C && (C.scrollTop = C.scrollHeight - T);
|
9458
9466
|
});
|
9459
9467
|
}, y = H();
|
9460
9468
|
function _() {
|
9461
9469
|
y.value && (y.value.style.height = y.value.scrollHeight - rf + "px", y.value.scrollHeight !== y.value.clientHeight && (y.value.style.height = y.value.scrollHeight + "px"));
|
9462
9470
|
}
|
9463
|
-
const O = H(),
|
9464
|
-
function fe(T, C =
|
9471
|
+
const O = H(), R = H();
|
9472
|
+
function fe(T, C = Ri.WEBCHAT) {
|
9465
9473
|
var U, j;
|
9466
9474
|
if (!T) throw new Error("user chat is required");
|
9467
|
-
O.value =
|
9475
|
+
O.value = Ot(window.VITE_SOCKET_URI, {
|
9468
9476
|
query: {
|
9469
9477
|
// TODO: confirmar si se quita o no
|
9470
9478
|
usuarioId: `${(j = (U = T == null ? void 0 : T.chat) == null ? void 0 : U.persona) == null ? void 0 : j.funcionarioId}`,
|
@@ -9487,13 +9495,13 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9487
9495
|
return Gs(async () => {
|
9488
9496
|
if (o.value) return;
|
9489
9497
|
const T = await os(n.tokenAuth);
|
9490
|
-
T && (
|
9498
|
+
T && (R.value = T, o.value = T.appChat.id, r.value = T.appChat.totalNoVistosCliente, fe(T), h(), e("not-viewed-total", T.appChat.totalNoVistosCliente));
|
9491
9499
|
}), Wi(() => {
|
9492
9500
|
var T;
|
9493
9501
|
(T = O.value) == null || T.off();
|
9494
9502
|
}), (T, C) => (F(), $("div", Yl, [
|
9495
9503
|
w("div", Jl, [
|
9496
|
-
w("h4", Gl,
|
9504
|
+
w("h4", Gl, xt(t.titlePrincipal), 1),
|
9497
9505
|
w("button", {
|
9498
9506
|
onClick: C[0] || (C[0] = () => t.toggleChat()),
|
9499
9507
|
class: "btn-close"
|
@@ -9504,11 +9512,11 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9504
9512
|
w("div", {
|
9505
9513
|
class: "messages-container",
|
9506
9514
|
ref_key: "messageContainerRef",
|
9507
|
-
ref:
|
9515
|
+
ref: u
|
9508
9516
|
}, [
|
9509
9517
|
a.value ? (F(), $("div", Kl, [
|
9510
9518
|
he(sl)
|
9511
|
-
])) :
|
9519
|
+
])) : Ct("", !0),
|
9512
9520
|
he(Gu, {
|
9513
9521
|
messages: i.value.data,
|
9514
9522
|
canLoadMoreMessages: i.value.canLoadMoreMessages,
|
@@ -9519,7 +9527,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9519
9527
|
w("div", Xl, [
|
9520
9528
|
w("form", {
|
9521
9529
|
class: "message-send",
|
9522
|
-
onSubmit: qt(
|
9530
|
+
onSubmit: qt(c, ["prevent"])
|
9523
9531
|
}, [
|
9524
9532
|
w("div", ef, [
|
9525
9533
|
w("div", tf, [
|
@@ -9532,7 +9540,7 @@ const Yl = { class: "widget" }, Jl = { class: "header-widget" }, Gl = { class: "
|
|
9532
9540
|
onInput: C[2] || (C[2] = () => _()),
|
9533
9541
|
onKeydown: C[3] || (C[3] = jn(qt(() => {
|
9534
9542
|
}, ["prevent"]), ["enter"])),
|
9535
|
-
onKeyup: jn(qt(
|
9543
|
+
onKeyup: jn(qt(c, ["prevent"]), ["enter"])
|
9536
9544
|
}, null, 40, nf), [
|
9537
9545
|
[qi, s.value]
|
9538
9546
|
]),
|
@@ -9665,10 +9673,10 @@ const Of = /* @__PURE__ */ oe(vf, [["render", Ef]]), Cf = {}, xf = {
|
|
9665
9673
|
function Af(t, e) {
|
9666
9674
|
return F(), $("svg", xf, _f);
|
9667
9675
|
}
|
9668
|
-
const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]),
|
9676
|
+
const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]), Rf = {
|
9669
9677
|
id: "chat-circle",
|
9670
9678
|
class: "widget-container"
|
9671
|
-
},
|
9679
|
+
}, If = {
|
9672
9680
|
key: 0,
|
9673
9681
|
class: "new-message-badge"
|
9674
9682
|
}, Df = { class: "chat-box" }, Lf = /* @__PURE__ */ On({
|
@@ -9688,35 +9696,35 @@ const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]), If = {
|
|
9688
9696
|
emits: ["show-toast", "show-confirm"],
|
9689
9697
|
setup(t, { emit: e }) {
|
9690
9698
|
const n = t;
|
9691
|
-
function s(
|
9699
|
+
function s(u) {
|
9692
9700
|
var h;
|
9693
|
-
const
|
9694
|
-
if (
|
9701
|
+
const c = ((h = window.VITE_CELLPHONE_NUMBERS) == null ? void 0 : h.split(",")) ?? [];
|
9702
|
+
if (c.length === 0) {
|
9695
9703
|
console.warn("not found cellphone numbers");
|
9696
9704
|
return;
|
9697
9705
|
}
|
9698
9706
|
o.value = !1;
|
9699
|
-
const l = Math.floor(Math.random() *
|
9700
|
-
if (
|
9701
|
-
window.open("https://wa.me/" +
|
9707
|
+
const l = Math.floor(Math.random() * c.length);
|
9708
|
+
if (u === 0) {
|
9709
|
+
window.open("https://wa.me/" + c[l], "WhatsApp", "noopener");
|
9702
9710
|
return;
|
9703
9711
|
}
|
9704
|
-
window.open("https://t.me/+" +
|
9712
|
+
window.open("https://t.me/+" + c[l], "Telegram", "noopener");
|
9705
9713
|
}
|
9706
9714
|
const r = H(!1), i = H(0), o = H(!1), a = () => {
|
9707
9715
|
r.value = !r.value;
|
9708
9716
|
};
|
9709
|
-
return (
|
9710
|
-
class:
|
9717
|
+
return (u, c) => (F(), $("div", {
|
9718
|
+
class: Re(["widget-css-reset widget-container", t.isDarkMode ? "chat-dark-mode" : ""])
|
9711
9719
|
}, [
|
9712
|
-
an(w("div",
|
9720
|
+
an(w("div", Rf, [
|
9713
9721
|
w("div", {
|
9714
|
-
class:
|
9722
|
+
class: Re(["container-buttons-chat", { active: o.value }])
|
9715
9723
|
}, [
|
9716
9724
|
w("a", {
|
9717
9725
|
href: "javascript:;",
|
9718
9726
|
class: "button whatsapp",
|
9719
|
-
onClick:
|
9727
|
+
onClick: c[0] || (c[0] = (l) => s(
|
9720
9728
|
0
|
9721
9729
|
/* WHATSAPP */
|
9722
9730
|
))
|
@@ -9726,7 +9734,7 @@ const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]), If = {
|
|
9726
9734
|
w("a", {
|
9727
9735
|
href: "javascript:;",
|
9728
9736
|
class: "button telegram",
|
9729
|
-
onClick:
|
9737
|
+
onClick: c[1] || (c[1] = (l) => s(
|
9730
9738
|
1
|
9731
9739
|
/* TELEGRAM */
|
9732
9740
|
))
|
@@ -9735,17 +9743,17 @@ const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]), If = {
|
|
9735
9743
|
]),
|
9736
9744
|
w("a", {
|
9737
9745
|
href: "javascript:;",
|
9738
|
-
class:
|
9746
|
+
class: Re(["button webchat", { disabled: n.tokenAuth.length < 10 }]),
|
9739
9747
|
title: "Debe estar autenticado",
|
9740
|
-
onClick:
|
9748
|
+
onClick: c[2] || (c[2] = (l) => o.value && n.tokenAuth.length > 10 && a())
|
9741
9749
|
}, [
|
9742
9750
|
he(Mf)
|
9743
9751
|
], 2)
|
9744
9752
|
], 2),
|
9745
|
-
i.value ? (F(), $("div",
|
9753
|
+
i.value ? (F(), $("div", If, xt(i.value > 9 ? "9+" : i.value), 1)) : Ct("", !0),
|
9746
9754
|
w("a", {
|
9747
9755
|
href: "javascript:;",
|
9748
|
-
onClick:
|
9756
|
+
onClick: c[3] || (c[3] = (l) => o.value = !o.value)
|
9749
9757
|
}, [
|
9750
9758
|
he(df)
|
9751
9759
|
])
|
@@ -9760,12 +9768,12 @@ const Mf = /* @__PURE__ */ oe(Cf, [["render", Af]]), If = {
|
|
9760
9768
|
toggleChat: a,
|
9761
9769
|
tokenAuth: t.tokenAuth,
|
9762
9770
|
user: t.user,
|
9763
|
-
onShowToast:
|
9764
|
-
onShowConfirm:
|
9765
|
-
onClearNewMessages:
|
9766
|
-
onNewMessage:
|
9767
|
-
onNotViewedTotal:
|
9768
|
-
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])) :
|
9771
|
+
onShowToast: c[4] || (c[4] = (l) => e("show-toast", l)),
|
9772
|
+
onShowConfirm: c[5] || (c[5] = (l) => e("show-confirm", l)),
|
9773
|
+
onClearNewMessages: c[6] || (c[6] = (l) => i.value = 0),
|
9774
|
+
onNewMessage: c[7] || (c[7] = () => i.value++),
|
9775
|
+
onNotViewedTotal: c[8] || (c[8] = (l) => i.value = l)
|
9776
|
+
}, null, 8, ["visible", "titlePrincipal", "tokenAuth", "user"])) : Ct("", !0)
|
9769
9777
|
], 512), [
|
9770
9778
|
[Yn, r.value]
|
9771
9779
|
])
|