vue-wiguet-chatweb 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.bubble[data-v-a9fc4a05]{--r: 25px;--t: 30px;padding:calc(2 * var(--r) / 3);-webkit-mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;color:#fff;height:100%}.left[data-v-a9fc4a05]{--_d: 0%;border-left:var(--t) solid #0000;margin-right:0;background-color:#fcd7ae;color:#4d4d4d}.bubble>.content-left[data-v-a9fc4a05]{margin-right:10px;margin-bottom:1px}.right[data-v-a9fc4a05]{--_d: 100%;border-right:var(--t) solid #0000;margin-right:0;background-color:#fdeedb;color:#4d4d4d}.bubble>.content-right[data-v-a9fc4a05]{margin-bottom:1px;margin-right:10px}.message-text[data-v-a9fc4a05]{margin-bottom:10px;overflow-wrap:break-word}.detail-message[data-v-a9fc4a05]{font-size:10px;color:gray;display:flex;justify-content:space-between}.chat-message[data-v-a9fc4a05]{display:flex;flex-direction:column;justify-content:center}.message[data-v-a9fc4a05]{width:100%;display:flex}.message-left[data-v-a9fc4a05]{justify-content:start}.message-right[data-v-a9fc4a05]{justify-content:end}.target[data-v-a9fc4a05]{padding:.5rem 0;width:100%}.btn-danger[data-v-a9fc4a05]{background-color:transparent;border:0;border-radius:50%;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.btn-danger[data-v-a9fc4a05] svg[data-v-a9fc4a05]{width:24px;height:24px}.btn-danger[data-v-a9fc4a05][data-v-a9fc4a05]:hover{background-color:#ff00003a}.btn-container-widget[data-v-a9fc4a05]{display:flex;align-items:center;position:absolute;left:-40px;top:50%;transform:translateY(-50%)}.message-container[data-v-a9fc4a05]{min-width:80%;max-width:80%;position:relative;margin-bottom:.5rem}.messages-container-list[data-v-a9fc4a05]{width:100%}.spinner_ajPY[data-v-d9a6b2b7]{fill:#fe6d00;transform-origin:center;animation:spinner_AtaB-d9a6b2b7 .75s infinite linear}@keyframes spinner_AtaB-d9a6b2b7{to{transform:rotate(360deg)}}.btn-primary[data-v-
|
1
|
+
.bubble[data-v-a9fc4a05]{--r: 25px;--t: 30px;padding:calc(2 * var(--r) / 3);-webkit-mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;mask:radial-gradient(var(--t) at var(--_d) 0,#0000 98%,#000 102%) var(--_d) 100% / calc(100% - var(--r)) var(--t) no-repeat,conic-gradient(at var(--r) var(--r),#000 75%,#0000 0) calc(var(--r) / -2) calc(var(--r) / -2) padding-box,radial-gradient(50% 50%,#000 98%,#0000 101%) 0 0 / var(--r) var(--r) space padding-box;color:#fff;height:100%}.left[data-v-a9fc4a05]{--_d: 0%;border-left:var(--t) solid #0000;margin-right:0;background-color:#fcd7ae;color:#4d4d4d}.bubble>.content-left[data-v-a9fc4a05]{margin-right:10px;margin-bottom:1px}.right[data-v-a9fc4a05]{--_d: 100%;border-right:var(--t) solid #0000;margin-right:0;background-color:#fdeedb;color:#4d4d4d}.bubble>.content-right[data-v-a9fc4a05]{margin-bottom:1px;margin-right:10px}.message-text[data-v-a9fc4a05]{margin-bottom:10px;overflow-wrap:break-word}.detail-message[data-v-a9fc4a05]{font-size:10px;color:gray;display:flex;justify-content:space-between}.chat-message[data-v-a9fc4a05]{display:flex;flex-direction:column;justify-content:center}.message[data-v-a9fc4a05]{width:100%;display:flex}.message-left[data-v-a9fc4a05]{justify-content:start}.message-right[data-v-a9fc4a05]{justify-content:end}.target[data-v-a9fc4a05]{padding:.5rem 0;width:100%}.btn-danger[data-v-a9fc4a05]{background-color:transparent;border:0;border-radius:50%;cursor:pointer;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.btn-danger[data-v-a9fc4a05] svg[data-v-a9fc4a05]{width:24px;height:24px}.btn-danger[data-v-a9fc4a05][data-v-a9fc4a05]:hover{background-color:#ff00003a}.btn-container-widget[data-v-a9fc4a05]{display:flex;align-items:center;position:absolute;left:-40px;top:50%;transform:translateY(-50%)}.message-container[data-v-a9fc4a05]{min-width:80%;max-width:80%;position:relative;margin-bottom:.5rem}.messages-container-list[data-v-a9fc4a05]{width:100%}.spinner_ajPY[data-v-d9a6b2b7]{fill:#fe6d00;transform-origin:center;animation:spinner_AtaB-d9a6b2b7 .75s infinite linear}@keyframes spinner_AtaB-d9a6b2b7{to{transform:rotate(360deg)}}.btn-primary[data-v-23e5b4c1]{padding:10px 12px}.btn-primary[data-v-23e5b4c1][data-v-23e5b4c1]:hover{background-color:#f28b0c1a}.btn-close[data-v-23e5b4c1]{padding:0;background-color:transparent;border:none;display:flex;align-items:center;border-radius:50%}.btn-close[data-v-23e5b4c1][data-v-23e5b4c1]:hover{background-color:#cacaca88}.messages-container[data-v-23e5b4c1]{position:relative}.loader[data-v-23e5b4c1]{position:absolute;top:18px;z-index:5;left:50%;transform:translate(-50%,-50%)}.header-widget{height:5%;display:flex;justify-content:space-between;align-items:center}.jl2-input-chat{height:20px;width:95%;border:none;resize:none;border-top-left-radius:16px;border-bottom-left-radius:16px;margin-left:8px;margin-top:8px;margin-bottom:8px;overflow:hidden}.jl2-input-chat:focus-visible{outline:none}.jl-inputgroup-chat{width:100%;border:1px solid;border-color:#f28b0c;background:var(--surface-a);color:var(--surface-500);-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:13px;display:flex;justify-content:space-around;align-items:center}.jl-inputgroup-chat>input{border:none;background:none}.jl-inputgroup-chat>input:hover{outline:none}.form-message{display:flex;justify-content:space-between}.form-message button,.jl-inputgroup-chat>button{border:none!important;background:none}.form-message button,.jl-inputgroup-chat>button:focus{box-shadow:none}.form-message button,.jl-inputgroup-chat>button:active{box-shadow:none}.widget{margin:auto;height:100%;display:flex;width:100%;flex-direction:column;justify-content:space-evenly}.messages-container{height:80%;overflow-y:scroll;border:1px solid lightgray;border-radius:.5rem;scrollbar-color:red transparent;scrollbar-width:thin;scrollbar-color:#F28B0C transparent;scrollbar-track-color:transparent;scrollbar-face-color:#F28B0C;scrollbar-thumb-color:#F28B0C}.messages-container::-webkit-scrollbar{width:8px}.messages-container::-webkit-scrollbar-track{background-color:transparent}.messages-container::-webkit-scrollbar-thumb{background-color:#f28b0c;border-radius:8px}.input-message{border-left:1px solid var(--fge-gray-lines-color);border-right:1px solid var(--fge-gray-lines-color)}.message-send{padding-top:20px;width:90%;margin:auto}#chat-circle{margin:auto;position:fixed;bottom:50px;right:50px;color:#fff;cursor:pointer}.title-chat{font-size:1rem;font-weight:700;color:var(--chat-text-color);margin:0}.chat-box{display:flex;justify-content:center;align-items:center;border:2px solid #d9d9d9;border-radius:25px;padding:5px 15px 30px;background:#fff;position:fixed;right:30px;bottom:50px;width:450px;height:70vh;max-width:85vw;max-height:80vh;box-shadow:0 5px 35px 9px #ccc}.pointer{cursor:pointer}.disabled[data-v-e2e1f135]{color:currentColor;cursor:not-allowed!important;opacity:.4!important;text-decoration:none}.container-buttons-chat[data-v-e2e1f135]{position:relative;right:-1.8rem}.button[data-v-e2e1f135]{position:absolute;width:2.5rem;height:2.5rem;opacity:0;box-shadow:0 1px 3px 1px silver;border-radius:100%;border:1px solid white;background-color:#fff;overflow:hidden;cursor:pointer;transition:transform .5s ease,opacity .3s ease;z-index:-1}.container-buttons-chat.active>a[data-v-e2e1f135]{z-index:1;opacity:1}.container-buttons-chat.active .whatsapp[data-v-e2e1f135]{transform:translateY(-150px)}.container-buttons-chat.active .telegram[data-v-e2e1f135]{transform:translateY(-100px)}.container-buttons-chat.active .webchat[data-v-e2e1f135]{transform:translateY(-50px)}.widget-container[data-v-e2e1f135]{position:relative}.new-message-badge[data-v-e2e1f135]{position:absolute;background-color:red;width:30px;height:30px;display:flex;font-family:Roboto,sans-serif;align-items:center;font-weight:500;justify-content:center;border-radius:50%;right:-2px;top:-4px;z-index:2}
|
@@ -370,12 +370,12 @@ function Lt(t, e, n) {
|
|
370
370
|
return f.isArrayBuffer(m) || f.isTypedArray(m) ? c && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
|
371
371
|
}
|
372
372
|
function l(m, y, _) {
|
373
|
-
let
|
373
|
+
let x = m;
|
374
374
|
if (m && !_ && typeof m == "object") {
|
375
375
|
if (f.endsWith(y, "{}"))
|
376
376
|
y = s ? y : y.slice(0, -2), m = JSON.stringify(m);
|
377
|
-
else if (f.isArray(m) && Ho(m) || (f.isFileList(m) || f.endsWith(y, "[]")) && (
|
378
|
-
return y = or(y),
|
377
|
+
else if (f.isArray(m) && Ho(m) || (f.isFileList(m) || f.endsWith(y, "[]")) && (x = f.toArray(m)))
|
378
|
+
return y = or(y), x.forEach(function(fe, b) {
|
379
379
|
!(f.isUndefined(fe) || fe === null) && e.append(
|
380
380
|
// eslint-disable-next-line no-nested-ternary
|
381
381
|
o === !0 ? Kn([y], b, i) : o === null ? y : y + "[]",
|
@@ -394,14 +394,14 @@ function Lt(t, e, n) {
|
|
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(
|
398
|
-
(!(f.isUndefined(
|
397
|
+
h.push(m), f.forEach(m, function(x, R) {
|
398
|
+
(!(f.isUndefined(x) || x === null) && r.call(
|
399
399
|
e,
|
400
|
-
|
400
|
+
x,
|
401
401
|
f.isString(R) ? R.trim() : R,
|
402
402
|
y,
|
403
403
|
g
|
404
|
-
)) === !0 && d(
|
404
|
+
)) === !0 && d(x, y ? y.concat(R) : [R]);
|
405
405
|
}), h.pop();
|
406
406
|
}
|
407
407
|
}
|
@@ -981,10 +981,10 @@ const ya = typeof XMLHttpRequest < "u", ga = ya && function(t) {
|
|
981
981
|
config: t,
|
982
982
|
request: u
|
983
983
|
};
|
984
|
-
ua(function(
|
985
|
-
n(
|
986
|
-
}, function(
|
987
|
-
s(
|
984
|
+
ua(function(x) {
|
985
|
+
n(x), c();
|
986
|
+
}, function(x) {
|
987
|
+
s(x), c();
|
988
988
|
}, y), u = null;
|
989
989
|
}
|
990
990
|
if ("onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
|
@@ -1576,7 +1576,7 @@ function Aa(t, e, n = {}) {
|
|
1576
1576
|
threshold: i
|
1577
1577
|
}
|
1578
1578
|
);
|
1579
|
-
m.forEach((
|
1579
|
+
m.forEach((x) => x && _.observe(x)), l = () => {
|
1580
1580
|
_.disconnect(), l = Yt;
|
1581
1581
|
};
|
1582
1582
|
},
|
@@ -4868,7 +4868,7 @@ function hu(t, e, n, s) {
|
|
4868
4868
|
return u.length > 0 ? k.fromMillis(c, s).shiftTo(...u).plus(l) : l;
|
4869
4869
|
}
|
4870
4870
|
const du = "missing Intl.DateTimeFormat.formatToParts support";
|
4871
|
-
function
|
4871
|
+
function C(t, e = (n) => n) {
|
4872
4872
|
return { regex: t, deser: ([n]) => e(nc(n)) };
|
4873
4873
|
}
|
4874
4874
|
const mu = " ", ai = `[ ${mu}]`, ci = new RegExp(ai, "g");
|
@@ -4894,7 +4894,7 @@ function yu(t) {
|
|
4894
4894
|
return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
|
4895
4895
|
}
|
4896
4896
|
function gu(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}"), c = te(e, "{1,3}"), u = te(e, "{1,6}"), l = te(e, "{1,9}"), h = te(e, "{2,4}"), g = te(e, "{4,6}"), d = (_) => ({ regex: RegExp(yu(_.val)), deser: ([
|
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}"), c = te(e, "{1,3}"), u = te(e, "{1,6}"), l = te(e, "{1,9}"), h = te(e, "{2,4}"), g = te(e, "{4,6}"), d = (_) => ({ regex: RegExp(yu(_.val)), deser: ([x]) => x, literal: !0 }), y = ((_) => {
|
4898
4898
|
if (t.literal)
|
4899
4899
|
return d(_);
|
4900
4900
|
switch (_.val) {
|
@@ -4903,82 +4903,82 @@ function gu(t, e) {
|
|
4903
4903
|
case "GG":
|
4904
4904
|
return ne(e.eras("long"), 0);
|
4905
4905
|
case "y":
|
4906
|
-
return
|
4906
|
+
return C(u);
|
4907
4907
|
case "yy":
|
4908
|
-
return
|
4908
|
+
return C(h, gn);
|
4909
4909
|
case "yyyy":
|
4910
|
-
return
|
4910
|
+
return C(i);
|
4911
4911
|
case "yyyyy":
|
4912
|
-
return
|
4912
|
+
return C(g);
|
4913
4913
|
case "yyyyyy":
|
4914
|
-
return
|
4914
|
+
return C(o);
|
4915
4915
|
case "M":
|
4916
|
-
return
|
4916
|
+
return C(a);
|
4917
4917
|
case "MM":
|
4918
|
-
return
|
4918
|
+
return C(s);
|
4919
4919
|
case "MMM":
|
4920
4920
|
return ne(e.months("short", !0), 1);
|
4921
4921
|
case "MMMM":
|
4922
4922
|
return ne(e.months("long", !0), 1);
|
4923
4923
|
case "L":
|
4924
|
-
return
|
4924
|
+
return C(a);
|
4925
4925
|
case "LL":
|
4926
|
-
return
|
4926
|
+
return C(s);
|
4927
4927
|
case "LLL":
|
4928
4928
|
return ne(e.months("short", !1), 1);
|
4929
4929
|
case "LLLL":
|
4930
4930
|
return ne(e.months("long", !1), 1);
|
4931
4931
|
case "d":
|
4932
|
-
return
|
4932
|
+
return C(a);
|
4933
4933
|
case "dd":
|
4934
|
-
return
|
4934
|
+
return C(s);
|
4935
4935
|
case "o":
|
4936
|
-
return
|
4936
|
+
return C(c);
|
4937
4937
|
case "ooo":
|
4938
|
-
return
|
4938
|
+
return C(r);
|
4939
4939
|
case "HH":
|
4940
|
-
return
|
4940
|
+
return C(s);
|
4941
4941
|
case "H":
|
4942
|
-
return
|
4942
|
+
return C(a);
|
4943
4943
|
case "hh":
|
4944
|
-
return
|
4944
|
+
return C(s);
|
4945
4945
|
case "h":
|
4946
|
-
return
|
4946
|
+
return C(a);
|
4947
4947
|
case "mm":
|
4948
|
-
return
|
4948
|
+
return C(s);
|
4949
4949
|
case "m":
|
4950
|
-
return
|
4950
|
+
return C(a);
|
4951
4951
|
case "q":
|
4952
|
-
return
|
4952
|
+
return C(a);
|
4953
4953
|
case "qq":
|
4954
|
-
return
|
4954
|
+
return C(s);
|
4955
4955
|
case "s":
|
4956
|
-
return
|
4956
|
+
return C(a);
|
4957
4957
|
case "ss":
|
4958
|
-
return
|
4958
|
+
return C(s);
|
4959
4959
|
case "S":
|
4960
|
-
return
|
4960
|
+
return C(c);
|
4961
4961
|
case "SSS":
|
4962
|
-
return
|
4962
|
+
return C(r);
|
4963
4963
|
case "u":
|
4964
4964
|
return lt(l);
|
4965
4965
|
case "uu":
|
4966
4966
|
return lt(a);
|
4967
4967
|
case "uuu":
|
4968
|
-
return
|
4968
|
+
return C(n);
|
4969
4969
|
case "a":
|
4970
4970
|
return ne(e.meridiems(), 0);
|
4971
4971
|
case "kkkk":
|
4972
|
-
return
|
4972
|
+
return C(i);
|
4973
4973
|
case "kk":
|
4974
|
-
return
|
4974
|
+
return C(h, gn);
|
4975
4975
|
case "W":
|
4976
|
-
return
|
4976
|
+
return C(a);
|
4977
4977
|
case "WW":
|
4978
|
-
return
|
4978
|
+
return C(s);
|
4979
4979
|
case "E":
|
4980
4980
|
case "c":
|
4981
|
-
return
|
4981
|
+
return C(n);
|
4982
4982
|
case "EEE":
|
4983
4983
|
return ne(e.weekdays("short", !1), 1);
|
4984
4984
|
case "EEEE":
|
@@ -5582,16 +5582,16 @@ 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 _,
|
5586
|
-
y ? (_ = Nu,
|
5585
|
+
let _, x, R = ft(c, u);
|
5586
|
+
y ? (_ = Nu, x = Cu, R = _t(R, o, a)) : l ? (_ = _u, x = xu, R = Xt(R)) : (_ = pi, x = mi);
|
5587
5587
|
let fe = !1;
|
5588
5588
|
for (const Z of _) {
|
5589
5589
|
const Oe = i[Z];
|
5590
|
-
v(Oe) ? fe ? i[Z] =
|
5590
|
+
v(Oe) ? fe ? i[Z] = x[Z] : i[Z] = R[Z] : fe = !0;
|
5591
5591
|
}
|
5592
|
-
const b = y ? rc(i, o, a) : l ? ic(i) : Ur(i),
|
5593
|
-
if (
|
5594
|
-
return S.invalid(
|
5592
|
+
const b = y ? rc(i, o, a) : l ? ic(i) : Ur(i), O = b || Pr(i);
|
5593
|
+
if (O)
|
5594
|
+
return S.invalid(O);
|
5595
5595
|
const B = y ? ws(i, o, a) : l ? Ss(i) : i, [j, $] = bt(B, u, s), z = new S({
|
5596
5596
|
ts: j,
|
5597
5597
|
zone: s,
|
@@ -9342,8 +9342,8 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9342
9342
|
() => n.visible,
|
9343
9343
|
async (b) => {
|
9344
9344
|
if (!b || (e("clear-new-messages"), d(), r.value > 0 && os(o.value, n.tokenAuth), o.value)) return;
|
9345
|
-
const
|
9346
|
-
|
9345
|
+
const O = await is(n.tokenAuth);
|
9346
|
+
O && (o.value = O.appChat.id);
|
9347
9347
|
}
|
9348
9348
|
);
|
9349
9349
|
const u = async (b) => {
|
@@ -9366,7 +9366,7 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9366
9366
|
});
|
9367
9367
|
return;
|
9368
9368
|
}
|
9369
|
-
const
|
9369
|
+
const O = {
|
9370
9370
|
id: Yi(),
|
9371
9371
|
chatId: (z = ($ = R.value) == null ? void 0 : $.chat) == null ? void 0 : z.id,
|
9372
9372
|
message: s.value,
|
@@ -9381,18 +9381,18 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9381
9381
|
ci: n.user.ci,
|
9382
9382
|
msPersonaId: n.user.msPersonaId
|
9383
9383
|
}
|
9384
|
-
}, B = i.value.data.push(
|
9384
|
+
}, B = i.value.data.push(O) - 1;
|
9385
9385
|
l(s.value, o.value).then((Z) => {
|
9386
9386
|
var Oe;
|
9387
|
-
Z ? (i.value.data[B] = Z,
|
9387
|
+
Z ? (i.value.data[B] = Z, x.value.emit(
|
9388
9388
|
"sendMessage",
|
9389
|
-
{ roomId: (Oe = R == null ? void 0 : R.value) == null ? void 0 : Oe.appChat.id, message: Z },
|
9389
|
+
{ roomId: (Oe = R == null ? void 0 : R.value) == null ? void 0 : Oe.appChat.id, message: { ...Z, ...O } },
|
9390
9390
|
(Ri) => {
|
9391
9391
|
console.log("🚀 ~ socketService.value.emit ~ response:", Ri);
|
9392
9392
|
}
|
9393
9393
|
)) : (i.value.data[B].error = {
|
9394
9394
|
error: !0,
|
9395
|
-
id:
|
9395
|
+
id: O.id
|
9396
9396
|
}, e("show-toast", {
|
9397
9397
|
severity: "error",
|
9398
9398
|
summary: "Error",
|
@@ -9400,19 +9400,19 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9400
9400
|
life: 5e3
|
9401
9401
|
}));
|
9402
9402
|
}), s.value = "", d(), y.value && (y.value.style.height = "20px");
|
9403
|
-
}, l = async (b,
|
9403
|
+
}, l = async (b, O) => ka({
|
9404
9404
|
esCliente: !0,
|
9405
9405
|
message: b,
|
9406
|
-
appChatId:
|
9406
|
+
appChatId: O
|
9407
9407
|
}, n.tokenAuth), h = async () => {
|
9408
9408
|
var j, $, z;
|
9409
|
-
const b = (j = i.value.data[0]) == null ? void 0 : j.id,
|
9409
|
+
const b = (j = i.value.data[0]) == null ? void 0 : j.id, O = {
|
9410
9410
|
lastMessagesId: b,
|
9411
9411
|
appChatId: o.value,
|
9412
9412
|
limit: 10
|
9413
9413
|
};
|
9414
9414
|
a.value = !0;
|
9415
|
-
const B = await Ta({ body:
|
9415
|
+
const B = await Ta({ body: O, token: n.tokenAuth });
|
9416
9416
|
a.value = !1, i.value.data.unshift(
|
9417
9417
|
...B.data.sort((Z, Oe) => -Oe.createdAt.localeCompare(Z.createdAt))
|
9418
9418
|
), i.value.canLoadMoreMessages = B.pagination.total > B.pagination.size, b && (($ = c.value) != null && $.scrollHeight) && m((z = c.value) == null ? void 0 : z.scrollHeight), b || d();
|
@@ -9420,8 +9420,8 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9420
9420
|
e("show-confirm", async () => {
|
9421
9421
|
var B, j;
|
9422
9422
|
if (!((B = b.error) != null && B.id)) return;
|
9423
|
-
const
|
9424
|
-
if (!
|
9423
|
+
const O = await l(b.message, o.value);
|
9424
|
+
if (!O)
|
9425
9425
|
e("show-toast", {
|
9426
9426
|
severity: "error",
|
9427
9427
|
summary: "Error",
|
@@ -9434,7 +9434,7 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9434
9434
|
"id",
|
9435
9435
|
b.error.id
|
9436
9436
|
);
|
9437
|
-
i.value.data[$] = { ...
|
9437
|
+
i.value.data[$] = { ...O, error: void 0 }, x.value.emit(
|
9438
9438
|
"sendMessage",
|
9439
9439
|
{ roomId: (j = R == null ? void 0 : R.value) == null ? void 0 : j.appChat.id, message: b }
|
9440
9440
|
);
|
@@ -9447,33 +9447,33 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9447
9447
|
});
|
9448
9448
|
}, m = (b) => {
|
9449
9449
|
zn(() => {
|
9450
|
-
const
|
9451
|
-
|
9450
|
+
const O = c.value;
|
9451
|
+
O && (O.scrollTop = O.scrollHeight - b);
|
9452
9452
|
});
|
9453
9453
|
}, y = q();
|
9454
9454
|
function _() {
|
9455
9455
|
y.value && (y.value.style.height = y.value.scrollHeight - nf + "px", y.value.scrollHeight !== y.value.clientHeight && (y.value.style.height = y.value.scrollHeight + "px"));
|
9456
9456
|
}
|
9457
|
-
const
|
9458
|
-
function fe(b,
|
9457
|
+
const x = q(), R = q();
|
9458
|
+
function fe(b, O = Mi.WEBCHAT) {
|
9459
9459
|
var B, j;
|
9460
9460
|
if (!b) throw new Error("user chat is required");
|
9461
|
-
|
9461
|
+
x.value = Ct(window.VITE_SOCKET_URI, {
|
9462
9462
|
query: {
|
9463
9463
|
// TODO: confirmar si se quita o no
|
9464
9464
|
usuarioId: `${(j = (B = b == null ? void 0 : b.chat) == null ? void 0 : B.persona) == null ? void 0 : j.funcionarioId}`,
|
9465
|
-
aplicacion:
|
9465
|
+
aplicacion: O
|
9466
9466
|
},
|
9467
9467
|
extraHeaders: { Authorization: n.tokenAuth }
|
9468
|
-
}),
|
9468
|
+
}), x.value.on("connect", () => {
|
9469
9469
|
var $;
|
9470
|
-
console.log("Conectado al servidor de sockets"),
|
9470
|
+
console.log("Conectado al servidor de sockets"), x.value.emit(
|
9471
9471
|
"joinRoom",
|
9472
9472
|
`${($ = b == null ? void 0 : b.appChat) == null ? void 0 : $.id}`
|
9473
9473
|
);
|
9474
|
-
}),
|
9474
|
+
}), x.value.on("disconnect", () => {
|
9475
9475
|
console.log("Desconectado del servidor de sockets");
|
9476
|
-
}),
|
9476
|
+
}), x.value.on("receiveMessage", ($) => {
|
9477
9477
|
var z, Z;
|
9478
9478
|
console.log("Mensaje recibido:", $.message, b), $.message.sender.msPersonaId !== ((Z = (z = b == null ? void 0 : b.chat) == null ? void 0 : z.persona) == null ? void 0 : Z.msPersonaId) && (i.value.data.push($.message), os($.message.appChatId, n.tokenAuth), d());
|
9479
9479
|
});
|
@@ -9483,12 +9483,12 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9483
9483
|
const b = await is(n.tokenAuth);
|
9484
9484
|
b && (R.value = b, o.value = b.appChat.id, r.value = b.appChat.totalNoVistosCliente, fe(b), h(), e("not-viewed-total", b.appChat.totalNoVistosCliente));
|
9485
9485
|
}), Ui(() => {
|
9486
|
-
|
9487
|
-
}), (b,
|
9486
|
+
x.value.off();
|
9487
|
+
}), (b, O) => (L(), V("div", Zl, [
|
9488
9488
|
w("div", jl, [
|
9489
9489
|
w("h4", Yl, Ge(t.titlePrincipal), 1),
|
9490
9490
|
w("button", {
|
9491
|
-
onClick:
|
9491
|
+
onClick: O[0] || (O[0] = () => t.toggleChat()),
|
9492
9492
|
class: "btn-close"
|
9493
9493
|
}, [
|
9494
9494
|
he(to, { class: "pointer" })
|
@@ -9517,13 +9517,13 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9517
9517
|
w("div", Xl, [
|
9518
9518
|
w("div", Ql, [
|
9519
9519
|
an(w("textarea", {
|
9520
|
-
"onUpdate:modelValue":
|
9520
|
+
"onUpdate:modelValue": O[1] || (O[1] = (B) => s.value = B),
|
9521
9521
|
class: "jl2-input-chat",
|
9522
9522
|
required: "",
|
9523
9523
|
ref_key: "textAreaRef",
|
9524
9524
|
ref: y,
|
9525
|
-
onInput:
|
9526
|
-
onKeydown:
|
9525
|
+
onInput: O[2] || (O[2] = () => _()),
|
9526
|
+
onKeydown: O[3] || (O[3] = Zn(qt(() => {
|
9527
9527
|
}, ["prevent"]), ["enter"])),
|
9528
9528
|
onKeyup: Zn(qt(u, ["prevent"]), ["enter"])
|
9529
9529
|
}, null, 40, ef), [
|
@@ -9538,7 +9538,7 @@ const Zl = { class: "widget" }, jl = { class: "header-widget" }, Yl = { class: "
|
|
9538
9538
|
])
|
9539
9539
|
]));
|
9540
9540
|
}
|
9541
|
-
}), rf = /* @__PURE__ */ oe(sf, [["__scopeId", "data-v-
|
9541
|
+
}), rf = /* @__PURE__ */ oe(sf, [["__scopeId", "data-v-23e5b4c1"]]), of = {}, af = {
|
9542
9542
|
width: "87",
|
9543
9543
|
height: "87",
|
9544
9544
|
viewBox: "0 0 87 87",
|