widget-chatbot 2.0.0-alpha.16 → 2.0.0-alpha.18
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/widget-chatbot.css +1 -1
- package/dist/widget-chatbot.es.js +1206 -1178
- package/package.json +1 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import bn, { version as Wt, createContext as Te, useContext as ye, useState as D, useRef as K, useMemo as O, useEffect as X, memo as R, Children as Vt, isValidElement as Gt, cloneElement as zt, Fragment as Cn, createElement as vn, useCallback as Yt } from "react";
|
|
2
2
|
import Oe from "axios";
|
|
3
3
|
import ae from "dayjs";
|
|
4
|
-
import { version as
|
|
5
|
-
import { io as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Prism as
|
|
9
|
-
import
|
|
10
|
-
import { Pie as
|
|
11
|
-
import
|
|
12
|
-
import { Picker as
|
|
13
|
-
var Je = { exports: {} },
|
|
4
|
+
import { version as Kt, Modal as Un, Typography as V, Button as z, Form as oe, notification as ie, Radio as qt, Divider as Jt, Input as Be, Image as Qt, Skeleton as ue, Avatar as Xn, Upload as Pn, Spin as Zt, Tooltip as Se, Tag as Xt, Badge as Pt, Grid as Ce, Empty as et, Popover as hn, Mentions as Wn, Select as Vn, DatePicker as es, Result as ns, Tabs as cn } from "antd";
|
|
5
|
+
import { io as ts } from "socket.io-client";
|
|
6
|
+
import ss from "react-markdown";
|
|
7
|
+
import rs from "remark-gfm";
|
|
8
|
+
import { Prism as os } from "react-syntax-highlighter";
|
|
9
|
+
import cs from "@ant-design/icons";
|
|
10
|
+
import { Pie as is } from "@ant-design/charts";
|
|
11
|
+
import ke from "crypto-js";
|
|
12
|
+
import { Picker as ls } from "emoji-mart";
|
|
13
|
+
var Je = { exports: {} }, pe = {};
|
|
14
14
|
/*
|
|
15
15
|
object-assign
|
|
16
16
|
(c) Sindre Sorhus
|
|
17
17
|
@license MIT
|
|
18
18
|
*/
|
|
19
|
-
var ln,
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
22
|
-
|
|
19
|
+
var ln, Gn;
|
|
20
|
+
function nt() {
|
|
21
|
+
if (Gn) return ln;
|
|
22
|
+
Gn = 1;
|
|
23
23
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
24
24
|
function s(c) {
|
|
25
25
|
if (c == null)
|
|
26
26
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
27
27
|
return Object(c);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function a() {
|
|
30
30
|
try {
|
|
31
31
|
if (!Object.assign)
|
|
32
32
|
return !1;
|
|
33
33
|
var c = new String("abc");
|
|
34
34
|
if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5")
|
|
35
35
|
return !1;
|
|
36
|
-
for (var o = {},
|
|
37
|
-
o["_" + String.fromCharCode(
|
|
38
|
-
var
|
|
36
|
+
for (var o = {}, d = 0; d < 10; d++)
|
|
37
|
+
o["_" + String.fromCharCode(d)] = d;
|
|
38
|
+
var i = Object.getOwnPropertyNames(o).map(function(f) {
|
|
39
39
|
return o[f];
|
|
40
40
|
});
|
|
41
|
-
if (
|
|
41
|
+
if (i.join("") !== "0123456789")
|
|
42
42
|
return !1;
|
|
43
43
|
var u = {};
|
|
44
44
|
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
|
|
@@ -48,18 +48,18 @@ function Pn() {
|
|
|
48
48
|
return !1;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
return ln =
|
|
52
|
-
for (var
|
|
53
|
-
|
|
54
|
-
for (var x in
|
|
55
|
-
t.call(
|
|
51
|
+
return ln = a() ? Object.assign : function(c, o) {
|
|
52
|
+
for (var d, i = s(c), u, f = 1; f < arguments.length; f++) {
|
|
53
|
+
d = Object(arguments[f]);
|
|
54
|
+
for (var x in d)
|
|
55
|
+
t.call(d, x) && (i[x] = d[x]);
|
|
56
56
|
if (e) {
|
|
57
|
-
u = e(
|
|
57
|
+
u = e(d);
|
|
58
58
|
for (var g = 0; g < u.length; g++)
|
|
59
|
-
r.call(
|
|
59
|
+
r.call(d, u[g]) && (i[u[g]] = d[u[g]]);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return i;
|
|
63
63
|
}, ln;
|
|
64
64
|
}
|
|
65
65
|
/** @license React v17.0.2
|
|
@@ -70,24 +70,24 @@ function Pn() {
|
|
|
70
70
|
* This source code is licensed under the MIT license found in the
|
|
71
71
|
* LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
var
|
|
74
|
-
function
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
var e =
|
|
78
|
-
if (
|
|
73
|
+
var zn;
|
|
74
|
+
function as() {
|
|
75
|
+
if (zn) return pe;
|
|
76
|
+
zn = 1, nt();
|
|
77
|
+
var e = bn, t = 60103;
|
|
78
|
+
if (pe.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
79
79
|
var r = Symbol.for;
|
|
80
|
-
t = r("react.element"),
|
|
80
|
+
t = r("react.element"), pe.Fragment = r("react.fragment");
|
|
81
81
|
}
|
|
82
|
-
var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
83
|
-
function o(
|
|
82
|
+
var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
83
|
+
function o(d, i, u) {
|
|
84
84
|
var f, x = {}, g = null, C = null;
|
|
85
|
-
u !== void 0 && (g = "" + u),
|
|
86
|
-
for (f in
|
|
87
|
-
if (
|
|
88
|
-
return { $$typeof: t, type:
|
|
85
|
+
u !== void 0 && (g = "" + u), i.key !== void 0 && (g = "" + i.key), i.ref !== void 0 && (C = i.ref);
|
|
86
|
+
for (f in i) a.call(i, f) && !c.hasOwnProperty(f) && (x[f] = i[f]);
|
|
87
|
+
if (d && d.defaultProps) for (f in i = d.defaultProps, i) x[f] === void 0 && (x[f] = i[f]);
|
|
88
|
+
return { $$typeof: t, type: d, key: g, ref: C, props: x, _owner: s.current };
|
|
89
89
|
}
|
|
90
|
-
return
|
|
90
|
+
return pe.jsx = o, pe.jsxs = o, pe;
|
|
91
91
|
}
|
|
92
92
|
var an = {};
|
|
93
93
|
/** @license React v17.0.2
|
|
@@ -98,64 +98,64 @@ var an = {};
|
|
|
98
98
|
* This source code is licensed under the MIT license found in the
|
|
99
99
|
* LICENSE file in the root directory of this source tree.
|
|
100
100
|
*/
|
|
101
|
-
var
|
|
102
|
-
function
|
|
103
|
-
return
|
|
101
|
+
var Yn;
|
|
102
|
+
function ds() {
|
|
103
|
+
return Yn || (Yn = 1, function(e) {
|
|
104
104
|
process.env.NODE_ENV !== "production" && function() {
|
|
105
|
-
var t =
|
|
105
|
+
var t = bn, r = nt(), s = 60103, a = 60106;
|
|
106
106
|
e.Fragment = 60107;
|
|
107
|
-
var c = 60108, o = 60114,
|
|
107
|
+
var c = 60108, o = 60114, d = 60109, i = 60110, u = 60112, f = 60113, x = 60120, g = 60115, C = 60116, y = 60121, j = 60122, p = 60117, w = 60129, v = 60131;
|
|
108
108
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
109
|
-
var
|
|
110
|
-
s =
|
|
109
|
+
var h = Symbol.for;
|
|
110
|
+
s = h("react.element"), a = h("react.portal"), e.Fragment = h("react.fragment"), c = h("react.strict_mode"), o = h("react.profiler"), d = h("react.provider"), i = h("react.context"), u = h("react.forward_ref"), f = h("react.suspense"), x = h("react.suspense_list"), g = h("react.memo"), C = h("react.lazy"), y = h("react.block"), j = h("react.server.block"), p = h("react.fundamental"), h("react.scope"), h("react.opaque.id"), w = h("react.debug_trace_mode"), h("react.offscreen"), v = h("react.legacy_hidden");
|
|
111
111
|
}
|
|
112
|
-
var b = typeof Symbol == "function" && Symbol.iterator,
|
|
113
|
-
function m(
|
|
114
|
-
if (
|
|
112
|
+
var b = typeof Symbol == "function" && Symbol.iterator, E = "@@iterator";
|
|
113
|
+
function m(l) {
|
|
114
|
+
if (l === null || typeof l != "object")
|
|
115
115
|
return null;
|
|
116
|
-
var T = b &&
|
|
116
|
+
var T = b && l[b] || l[E];
|
|
117
117
|
return typeof T == "function" ? T : null;
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function S(
|
|
119
|
+
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
120
|
+
function S(l) {
|
|
121
121
|
{
|
|
122
122
|
for (var T = arguments.length, A = new Array(T > 1 ? T - 1 : 0), N = 1; N < T; N++)
|
|
123
123
|
A[N - 1] = arguments[N];
|
|
124
|
-
|
|
124
|
+
H("error", l, A);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function H(l, T, A) {
|
|
128
128
|
{
|
|
129
|
-
var N =
|
|
130
|
-
|
|
131
|
-
var
|
|
129
|
+
var N = k.ReactDebugCurrentFrame, Z = N.getStackAddendum();
|
|
130
|
+
Z !== "" && (T += "%s", A = A.concat([Z]));
|
|
131
|
+
var Q = A.map(function(W) {
|
|
132
132
|
return "" + W;
|
|
133
133
|
});
|
|
134
|
-
|
|
134
|
+
Q.unshift("Warning: " + T), Function.prototype.apply.call(console[l], console, Q);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
var B = !1;
|
|
138
|
-
function M(
|
|
139
|
-
return !!(typeof
|
|
138
|
+
function M(l) {
|
|
139
|
+
return !!(typeof l == "string" || typeof l == "function" || l === e.Fragment || l === o || l === w || l === c || l === f || l === x || l === v || B || typeof l == "object" && l !== null && (l.$$typeof === C || l.$$typeof === g || l.$$typeof === d || l.$$typeof === i || l.$$typeof === u || l.$$typeof === p || l.$$typeof === y || l[0] === j));
|
|
140
140
|
}
|
|
141
|
-
function L(
|
|
141
|
+
function L(l, T, A) {
|
|
142
142
|
var N = T.displayName || T.name || "";
|
|
143
|
-
return
|
|
143
|
+
return l.displayName || (N !== "" ? A + "(" + N + ")" : A);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function I(l) {
|
|
146
|
+
return l.displayName || "Context";
|
|
147
147
|
}
|
|
148
|
-
function $(
|
|
149
|
-
if (
|
|
148
|
+
function $(l) {
|
|
149
|
+
if (l == null)
|
|
150
150
|
return null;
|
|
151
|
-
if (typeof
|
|
152
|
-
return
|
|
153
|
-
if (typeof
|
|
154
|
-
return
|
|
155
|
-
switch (
|
|
151
|
+
if (typeof l.tag == "number" && S("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof l == "function")
|
|
152
|
+
return l.displayName || l.name || null;
|
|
153
|
+
if (typeof l == "string")
|
|
154
|
+
return l;
|
|
155
|
+
switch (l) {
|
|
156
156
|
case e.Fragment:
|
|
157
157
|
return "Fragment";
|
|
158
|
-
case
|
|
158
|
+
case a:
|
|
159
159
|
return "Portal";
|
|
160
160
|
case o:
|
|
161
161
|
return "Profiler";
|
|
@@ -166,24 +166,24 @@ function ls() {
|
|
|
166
166
|
case x:
|
|
167
167
|
return "SuspenseList";
|
|
168
168
|
}
|
|
169
|
-
if (typeof
|
|
170
|
-
switch (
|
|
171
|
-
case
|
|
172
|
-
var T =
|
|
173
|
-
return
|
|
174
|
-
case
|
|
175
|
-
var A =
|
|
176
|
-
return
|
|
169
|
+
if (typeof l == "object")
|
|
170
|
+
switch (l.$$typeof) {
|
|
171
|
+
case i:
|
|
172
|
+
var T = l;
|
|
173
|
+
return I(T) + ".Consumer";
|
|
174
|
+
case d:
|
|
175
|
+
var A = l;
|
|
176
|
+
return I(A._context) + ".Provider";
|
|
177
177
|
case u:
|
|
178
|
-
return L(
|
|
178
|
+
return L(l, l.render, "ForwardRef");
|
|
179
179
|
case g:
|
|
180
|
-
return $(
|
|
180
|
+
return $(l.type);
|
|
181
181
|
case y:
|
|
182
|
-
return $(
|
|
182
|
+
return $(l._render);
|
|
183
183
|
case C: {
|
|
184
|
-
var N =
|
|
184
|
+
var N = l, Z = N._payload, Q = N._init;
|
|
185
185
|
try {
|
|
186
|
-
return $(
|
|
186
|
+
return $(Q(Z));
|
|
187
187
|
} catch {
|
|
188
188
|
return null;
|
|
189
189
|
}
|
|
@@ -191,101 +191,101 @@ function ls() {
|
|
|
191
191
|
}
|
|
192
192
|
return null;
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var F = 0, G, J, Y, te, ee, de, ce;
|
|
195
195
|
function Ne() {
|
|
196
196
|
}
|
|
197
197
|
Ne.__reactDisabledLog = !0;
|
|
198
198
|
function Ve() {
|
|
199
199
|
{
|
|
200
|
-
if (
|
|
201
|
-
G = console.log,
|
|
202
|
-
var
|
|
200
|
+
if (F === 0) {
|
|
201
|
+
G = console.log, J = console.info, Y = console.warn, te = console.error, ee = console.group, de = console.groupCollapsed, ce = console.groupEnd;
|
|
202
|
+
var l = {
|
|
203
203
|
configurable: !0,
|
|
204
204
|
enumerable: !0,
|
|
205
205
|
value: Ne,
|
|
206
206
|
writable: !0
|
|
207
207
|
};
|
|
208
208
|
Object.defineProperties(console, {
|
|
209
|
-
info:
|
|
210
|
-
log:
|
|
211
|
-
warn:
|
|
212
|
-
error:
|
|
213
|
-
group:
|
|
214
|
-
groupCollapsed:
|
|
215
|
-
groupEnd:
|
|
209
|
+
info: l,
|
|
210
|
+
log: l,
|
|
211
|
+
warn: l,
|
|
212
|
+
error: l,
|
|
213
|
+
group: l,
|
|
214
|
+
groupCollapsed: l,
|
|
215
|
+
groupEnd: l
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
F++;
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
function Ge() {
|
|
222
222
|
{
|
|
223
|
-
if (
|
|
224
|
-
var
|
|
223
|
+
if (F--, F === 0) {
|
|
224
|
+
var l = {
|
|
225
225
|
configurable: !0,
|
|
226
226
|
enumerable: !0,
|
|
227
227
|
writable: !0
|
|
228
228
|
};
|
|
229
229
|
Object.defineProperties(console, {
|
|
230
|
-
log: r({},
|
|
230
|
+
log: r({}, l, {
|
|
231
231
|
value: G
|
|
232
232
|
}),
|
|
233
|
-
info: r({},
|
|
234
|
-
value:
|
|
233
|
+
info: r({}, l, {
|
|
234
|
+
value: J
|
|
235
235
|
}),
|
|
236
|
-
warn: r({},
|
|
237
|
-
value:
|
|
236
|
+
warn: r({}, l, {
|
|
237
|
+
value: Y
|
|
238
238
|
}),
|
|
239
|
-
error: r({},
|
|
239
|
+
error: r({}, l, {
|
|
240
240
|
value: te
|
|
241
241
|
}),
|
|
242
|
-
group: r({},
|
|
242
|
+
group: r({}, l, {
|
|
243
243
|
value: ee
|
|
244
244
|
}),
|
|
245
|
-
groupCollapsed: r({},
|
|
245
|
+
groupCollapsed: r({}, l, {
|
|
246
246
|
value: de
|
|
247
247
|
}),
|
|
248
|
-
groupEnd: r({},
|
|
248
|
+
groupEnd: r({}, l, {
|
|
249
249
|
value: ce
|
|
250
250
|
})
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
|
|
253
|
+
F < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
var Me =
|
|
257
|
-
function ze(
|
|
256
|
+
var Me = k.ReactCurrentDispatcher, Fe;
|
|
257
|
+
function ze(l, T, A) {
|
|
258
258
|
{
|
|
259
259
|
if (Fe === void 0)
|
|
260
260
|
try {
|
|
261
261
|
throw Error();
|
|
262
|
-
} catch (
|
|
263
|
-
var N =
|
|
262
|
+
} catch (Z) {
|
|
263
|
+
var N = Z.stack.trim().match(/\n( *(at )?)/);
|
|
264
264
|
Fe = N && N[1] || "";
|
|
265
265
|
}
|
|
266
266
|
return `
|
|
267
|
-
` + Fe +
|
|
267
|
+
` + Fe + l;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
var nn = !1, Ye;
|
|
271
271
|
{
|
|
272
|
-
var
|
|
273
|
-
Ye = new
|
|
272
|
+
var jt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
273
|
+
Ye = new jt();
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
if (!
|
|
275
|
+
function _n(l, T) {
|
|
276
|
+
if (!l || nn)
|
|
277
277
|
return "";
|
|
278
278
|
{
|
|
279
|
-
var A = Ye.get(
|
|
279
|
+
var A = Ye.get(l);
|
|
280
280
|
if (A !== void 0)
|
|
281
281
|
return A;
|
|
282
282
|
}
|
|
283
283
|
var N;
|
|
284
284
|
nn = !0;
|
|
285
|
-
var
|
|
285
|
+
var Z = Error.prepareStackTrace;
|
|
286
286
|
Error.prepareStackTrace = void 0;
|
|
287
|
-
var
|
|
288
|
-
|
|
287
|
+
var Q;
|
|
288
|
+
Q = Me.current, Me.current = null, Ve();
|
|
289
289
|
try {
|
|
290
290
|
if (T) {
|
|
291
291
|
var W = function() {
|
|
@@ -301,14 +301,14 @@ function ls() {
|
|
|
301
301
|
} catch (ge) {
|
|
302
302
|
N = ge;
|
|
303
303
|
}
|
|
304
|
-
Reflect.construct(
|
|
304
|
+
Reflect.construct(l, [], W);
|
|
305
305
|
} else {
|
|
306
306
|
try {
|
|
307
307
|
W.call();
|
|
308
308
|
} catch (ge) {
|
|
309
309
|
N = ge;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
l.call(W.prototype);
|
|
312
312
|
}
|
|
313
313
|
} else {
|
|
314
314
|
try {
|
|
@@ -316,7 +316,7 @@ function ls() {
|
|
|
316
316
|
} catch (ge) {
|
|
317
317
|
N = ge;
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
l();
|
|
320
320
|
}
|
|
321
321
|
} catch (ge) {
|
|
322
322
|
if (ge && N && typeof ge.stack == "string") {
|
|
@@ -331,141 +331,141 @@ function ls() {
|
|
|
331
331
|
if (ne--, se--, se < 0 || U[ne] !== re[se]) {
|
|
332
332
|
var xe = `
|
|
333
333
|
` + U[ne].replace(" at new ", " at ");
|
|
334
|
-
return typeof
|
|
334
|
+
return typeof l == "function" && Ye.set(l, xe), xe;
|
|
335
335
|
}
|
|
336
336
|
while (ne >= 1 && se >= 0);
|
|
337
337
|
break;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
} finally {
|
|
341
|
-
nn = !1, Me.current =
|
|
341
|
+
nn = !1, Me.current = Q, Ge(), Error.prepareStackTrace = Z;
|
|
342
342
|
}
|
|
343
|
-
var we =
|
|
344
|
-
return typeof
|
|
343
|
+
var we = l ? l.displayName || l.name : "", Bn = we ? ze(we) : "";
|
|
344
|
+
return typeof l == "function" && Ye.set(l, Bn), Bn;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
return
|
|
346
|
+
function An(l, T, A) {
|
|
347
|
+
return _n(l, !1);
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
var T =
|
|
349
|
+
function wt(l) {
|
|
350
|
+
var T = l.prototype;
|
|
351
351
|
return !!(T && T.isReactComponent);
|
|
352
352
|
}
|
|
353
|
-
function Ke(
|
|
354
|
-
if (
|
|
353
|
+
function Ke(l, T, A) {
|
|
354
|
+
if (l == null)
|
|
355
355
|
return "";
|
|
356
|
-
if (typeof
|
|
357
|
-
return
|
|
358
|
-
if (typeof
|
|
359
|
-
return ze(
|
|
360
|
-
switch (
|
|
356
|
+
if (typeof l == "function")
|
|
357
|
+
return _n(l, wt(l));
|
|
358
|
+
if (typeof l == "string")
|
|
359
|
+
return ze(l);
|
|
360
|
+
switch (l) {
|
|
361
361
|
case f:
|
|
362
362
|
return ze("Suspense");
|
|
363
363
|
case x:
|
|
364
364
|
return ze("SuspenseList");
|
|
365
365
|
}
|
|
366
|
-
if (typeof
|
|
367
|
-
switch (
|
|
366
|
+
if (typeof l == "object")
|
|
367
|
+
switch (l.$$typeof) {
|
|
368
368
|
case u:
|
|
369
|
-
return
|
|
369
|
+
return An(l.render);
|
|
370
370
|
case g:
|
|
371
|
-
return Ke(
|
|
371
|
+
return Ke(l.type, T, A);
|
|
372
372
|
case y:
|
|
373
|
-
return
|
|
373
|
+
return An(l._render);
|
|
374
374
|
case C: {
|
|
375
|
-
var N =
|
|
375
|
+
var N = l, Z = N._payload, Q = N._init;
|
|
376
376
|
try {
|
|
377
|
-
return Ke(
|
|
377
|
+
return Ke(Q(Z), T, A);
|
|
378
378
|
} catch {
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
return "";
|
|
383
383
|
}
|
|
384
|
-
var
|
|
385
|
-
function qe(
|
|
386
|
-
if (
|
|
387
|
-
var T =
|
|
388
|
-
|
|
384
|
+
var Sn = {}, Ln = k.ReactDebugCurrentFrame;
|
|
385
|
+
function qe(l) {
|
|
386
|
+
if (l) {
|
|
387
|
+
var T = l._owner, A = Ke(l.type, l._source, T ? T.type : null);
|
|
388
|
+
Ln.setExtraStackFrame(A);
|
|
389
389
|
} else
|
|
390
|
-
|
|
390
|
+
Ln.setExtraStackFrame(null);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function kt(l, T, A, N, Z) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
for (var W in
|
|
396
|
-
if (
|
|
394
|
+
var Q = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
395
|
+
for (var W in l)
|
|
396
|
+
if (Q(l, W)) {
|
|
397
397
|
var U = void 0;
|
|
398
398
|
try {
|
|
399
|
-
if (typeof
|
|
400
|
-
var re = Error((N || "React class") + ": " + A + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
399
|
+
if (typeof l[W] != "function") {
|
|
400
|
+
var re = Error((N || "React class") + ": " + A + " type `" + W + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[W] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
401
401
|
throw re.name = "Invariant Violation", re;
|
|
402
402
|
}
|
|
403
|
-
U =
|
|
403
|
+
U = l[W](T, W, N, A, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
404
404
|
} catch (ne) {
|
|
405
405
|
U = ne;
|
|
406
406
|
}
|
|
407
|
-
U && !(U instanceof Error) && (qe(
|
|
407
|
+
U && !(U instanceof Error) && (qe(Z), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", A, W, typeof U), qe(null)), U instanceof Error && !(U.message in Sn) && (Sn[U.message] = !0, qe(Z), S("Failed %s type: %s", A, U.message), qe(null));
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var Rn = k.ReactCurrentOwner, tn = Object.prototype.hasOwnProperty, pt = {
|
|
412
412
|
key: !0,
|
|
413
413
|
ref: !0,
|
|
414
414
|
__self: !0,
|
|
415
415
|
__source: !0
|
|
416
|
-
},
|
|
417
|
-
function _t(
|
|
418
|
-
if (tn.call(
|
|
419
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
416
|
+
}, On, Dn;
|
|
417
|
+
function _t(l) {
|
|
418
|
+
if (tn.call(l, "ref")) {
|
|
419
|
+
var T = Object.getOwnPropertyDescriptor(l, "ref").get;
|
|
420
420
|
if (T && T.isReactWarning)
|
|
421
421
|
return !1;
|
|
422
422
|
}
|
|
423
|
-
return
|
|
423
|
+
return l.ref !== void 0;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
if (tn.call(
|
|
427
|
-
var T = Object.getOwnPropertyDescriptor(
|
|
425
|
+
function At(l) {
|
|
426
|
+
if (tn.call(l, "key")) {
|
|
427
|
+
var T = Object.getOwnPropertyDescriptor(l, "key").get;
|
|
428
428
|
if (T && T.isReactWarning)
|
|
429
429
|
return !1;
|
|
430
430
|
}
|
|
431
|
-
return
|
|
431
|
+
return l.key !== void 0;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
typeof
|
|
433
|
+
function St(l, T) {
|
|
434
|
+
typeof l.ref == "string" && Rn.current;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function Lt(l, T) {
|
|
437
437
|
{
|
|
438
438
|
var A = function() {
|
|
439
|
-
|
|
439
|
+
On || (On = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
|
|
440
440
|
};
|
|
441
|
-
A.isReactWarning = !0, Object.defineProperty(
|
|
441
|
+
A.isReactWarning = !0, Object.defineProperty(l, "key", {
|
|
442
442
|
get: A,
|
|
443
443
|
configurable: !0
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function Rt(l, T) {
|
|
448
448
|
{
|
|
449
449
|
var A = function() {
|
|
450
|
-
|
|
450
|
+
Dn || (Dn = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
|
|
451
451
|
};
|
|
452
|
-
A.isReactWarning = !0, Object.defineProperty(
|
|
452
|
+
A.isReactWarning = !0, Object.defineProperty(l, "ref", {
|
|
453
453
|
get: A,
|
|
454
454
|
configurable: !0
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
var
|
|
458
|
+
var Ot = function(l, T, A, N, Z, Q, W) {
|
|
459
459
|
var U = {
|
|
460
460
|
// This tag allows us to uniquely identify this as a React Element
|
|
461
461
|
$$typeof: s,
|
|
462
462
|
// Built-in properties that belong on the element
|
|
463
|
-
type:
|
|
463
|
+
type: l,
|
|
464
464
|
key: T,
|
|
465
465
|
ref: A,
|
|
466
466
|
props: W,
|
|
467
467
|
// Record the component responsible for creating this element.
|
|
468
|
-
_owner:
|
|
468
|
+
_owner: Q
|
|
469
469
|
};
|
|
470
470
|
return U._store = {}, Object.defineProperty(U._store, "validated", {
|
|
471
471
|
configurable: !1,
|
|
@@ -481,61 +481,61 @@ function ls() {
|
|
|
481
481
|
configurable: !1,
|
|
482
482
|
enumerable: !1,
|
|
483
483
|
writable: !1,
|
|
484
|
-
value:
|
|
484
|
+
value: Z
|
|
485
485
|
}), Object.freeze && (Object.freeze(U.props), Object.freeze(U)), U;
|
|
486
486
|
};
|
|
487
|
-
function
|
|
487
|
+
function Dt(l, T, A, N, Z) {
|
|
488
488
|
{
|
|
489
|
-
var
|
|
490
|
-
A !== void 0 && (U = "" + A),
|
|
491
|
-
for (
|
|
492
|
-
tn.call(T,
|
|
493
|
-
if (
|
|
494
|
-
var ne =
|
|
495
|
-
for (
|
|
496
|
-
W[
|
|
489
|
+
var Q, W = {}, U = null, re = null;
|
|
490
|
+
A !== void 0 && (U = "" + A), At(T) && (U = "" + T.key), _t(T) && (re = T.ref, St(T, Z));
|
|
491
|
+
for (Q in T)
|
|
492
|
+
tn.call(T, Q) && !pt.hasOwnProperty(Q) && (W[Q] = T[Q]);
|
|
493
|
+
if (l && l.defaultProps) {
|
|
494
|
+
var ne = l.defaultProps;
|
|
495
|
+
for (Q in ne)
|
|
496
|
+
W[Q] === void 0 && (W[Q] = ne[Q]);
|
|
497
497
|
}
|
|
498
498
|
if (U || re) {
|
|
499
|
-
var se = typeof
|
|
500
|
-
U &&
|
|
499
|
+
var se = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
|
|
500
|
+
U && Lt(W, se), re && Rt(W, se);
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return Ot(l, U, re, Z, N, Rn.current, W);
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var sn =
|
|
506
|
-
function je(
|
|
507
|
-
if (
|
|
508
|
-
var T =
|
|
509
|
-
|
|
505
|
+
var sn = k.ReactCurrentOwner, Nn = k.ReactDebugCurrentFrame;
|
|
506
|
+
function je(l) {
|
|
507
|
+
if (l) {
|
|
508
|
+
var T = l._owner, A = Ke(l.type, l._source, T ? T.type : null);
|
|
509
|
+
Nn.setExtraStackFrame(A);
|
|
510
510
|
} else
|
|
511
|
-
|
|
511
|
+
Nn.setExtraStackFrame(null);
|
|
512
512
|
}
|
|
513
513
|
var rn;
|
|
514
514
|
rn = !1;
|
|
515
|
-
function on(
|
|
516
|
-
return typeof
|
|
515
|
+
function on(l) {
|
|
516
|
+
return typeof l == "object" && l !== null && l.$$typeof === s;
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Mn() {
|
|
519
519
|
{
|
|
520
520
|
if (sn.current) {
|
|
521
|
-
var
|
|
522
|
-
if (
|
|
521
|
+
var l = $(sn.current.type);
|
|
522
|
+
if (l)
|
|
523
523
|
return `
|
|
524
524
|
|
|
525
|
-
Check the render method of \`` +
|
|
525
|
+
Check the render method of \`` + l + "`.";
|
|
526
526
|
}
|
|
527
527
|
return "";
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Nt(l) {
|
|
531
531
|
return "";
|
|
532
532
|
}
|
|
533
|
-
var
|
|
534
|
-
function
|
|
533
|
+
var Fn = {};
|
|
534
|
+
function Mt(l) {
|
|
535
535
|
{
|
|
536
|
-
var T =
|
|
536
|
+
var T = Mn();
|
|
537
537
|
if (!T) {
|
|
538
|
-
var A = typeof
|
|
538
|
+
var A = typeof l == "string" ? l : l.displayName || l.name;
|
|
539
539
|
A && (T = `
|
|
540
540
|
|
|
541
541
|
Check the top-level render call using <` + A + ">.");
|
|
@@ -543,41 +543,41 @@ Check the top-level render call using <` + A + ">.");
|
|
|
543
543
|
return T;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function Hn(l, T) {
|
|
547
547
|
{
|
|
548
|
-
if (!
|
|
548
|
+
if (!l._store || l._store.validated || l.key != null)
|
|
549
549
|
return;
|
|
550
|
-
|
|
551
|
-
var A =
|
|
552
|
-
if (
|
|
550
|
+
l._store.validated = !0;
|
|
551
|
+
var A = Mt(T);
|
|
552
|
+
if (Fn[A])
|
|
553
553
|
return;
|
|
554
|
-
|
|
554
|
+
Fn[A] = !0;
|
|
555
555
|
var N = "";
|
|
556
|
-
|
|
556
|
+
l && l._owner && l._owner !== sn.current && (N = " It was passed a child from " + $(l._owner.type) + "."), je(l), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', A, N), je(null);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function In(l, T) {
|
|
560
560
|
{
|
|
561
|
-
if (typeof
|
|
561
|
+
if (typeof l != "object")
|
|
562
562
|
return;
|
|
563
|
-
if (Array.isArray(
|
|
564
|
-
for (var A = 0; A <
|
|
565
|
-
var N =
|
|
566
|
-
on(N) &&
|
|
563
|
+
if (Array.isArray(l))
|
|
564
|
+
for (var A = 0; A < l.length; A++) {
|
|
565
|
+
var N = l[A];
|
|
566
|
+
on(N) && Hn(N, T);
|
|
567
567
|
}
|
|
568
|
-
else if (on(
|
|
569
|
-
|
|
570
|
-
else if (
|
|
571
|
-
var
|
|
572
|
-
if (typeof
|
|
573
|
-
for (var
|
|
574
|
-
on(W.value) &&
|
|
568
|
+
else if (on(l))
|
|
569
|
+
l._store && (l._store.validated = !0);
|
|
570
|
+
else if (l) {
|
|
571
|
+
var Z = m(l);
|
|
572
|
+
if (typeof Z == "function" && Z !== l.entries)
|
|
573
|
+
for (var Q = Z.call(l), W; !(W = Q.next()).done; )
|
|
574
|
+
on(W.value) && Hn(W.value, T);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Ft(l) {
|
|
579
579
|
{
|
|
580
|
-
var T =
|
|
580
|
+
var T = l.type;
|
|
581
581
|
if (T == null || typeof T == "string")
|
|
582
582
|
return;
|
|
583
583
|
var A;
|
|
@@ -591,39 +591,39 @@ Check the top-level render call using <` + A + ">.");
|
|
|
591
591
|
return;
|
|
592
592
|
if (A) {
|
|
593
593
|
var N = $(T);
|
|
594
|
-
|
|
594
|
+
kt(A, l.props, "prop", N, l);
|
|
595
595
|
} else if (T.PropTypes !== void 0 && !rn) {
|
|
596
596
|
rn = !0;
|
|
597
|
-
var
|
|
598
|
-
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
597
|
+
var Z = $(T);
|
|
598
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Z || "Unknown");
|
|
599
599
|
}
|
|
600
600
|
typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Ht(l) {
|
|
604
604
|
{
|
|
605
|
-
for (var T = Object.keys(
|
|
605
|
+
for (var T = Object.keys(l.props), A = 0; A < T.length; A++) {
|
|
606
606
|
var N = T[A];
|
|
607
607
|
if (N !== "children" && N !== "key") {
|
|
608
|
-
je(
|
|
608
|
+
je(l), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), je(null);
|
|
609
609
|
break;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
|
|
612
|
+
l.ref !== null && (je(l), S("Invalid attribute `ref` supplied to `React.Fragment`."), je(null));
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function $n(l, T, A, N, Z, Q) {
|
|
616
616
|
{
|
|
617
|
-
var W = M(
|
|
617
|
+
var W = M(l);
|
|
618
618
|
if (!W) {
|
|
619
619
|
var U = "";
|
|
620
|
-
(
|
|
621
|
-
var re =
|
|
622
|
-
re ? U += re : U +=
|
|
620
|
+
(l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (U += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
621
|
+
var re = Nt();
|
|
622
|
+
re ? U += re : U += Mn();
|
|
623
623
|
var ne;
|
|
624
|
-
|
|
624
|
+
l === null ? ne = "null" : Array.isArray(l) ? ne = "array" : l !== void 0 && l.$$typeof === s ? (ne = "<" + ($(l.type) || "Unknown") + " />", U = " Did you accidentally export a JSX literal instead of a component?") : ne = typeof l, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ne, U);
|
|
625
625
|
}
|
|
626
|
-
var se =
|
|
626
|
+
var se = Dt(l, T, A, Z, Q);
|
|
627
627
|
if (se == null)
|
|
628
628
|
return se;
|
|
629
629
|
if (W) {
|
|
@@ -632,33 +632,33 @@ Check the top-level render call using <` + A + ">.");
|
|
|
632
632
|
if (N)
|
|
633
633
|
if (Array.isArray(xe)) {
|
|
634
634
|
for (var we = 0; we < xe.length; we++)
|
|
635
|
-
|
|
635
|
+
In(xe[we], l);
|
|
636
636
|
Object.freeze && Object.freeze(xe);
|
|
637
637
|
} else
|
|
638
638
|
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
639
639
|
else
|
|
640
|
-
|
|
640
|
+
In(xe, l);
|
|
641
641
|
}
|
|
642
|
-
return
|
|
642
|
+
return l === e.Fragment ? Ht(se) : Ft(se), se;
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
function
|
|
646
|
-
return
|
|
645
|
+
function It(l, T, A) {
|
|
646
|
+
return $n(l, T, A, !0);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return
|
|
648
|
+
function $t(l, T, A) {
|
|
649
|
+
return $n(l, T, A, !1);
|
|
650
650
|
}
|
|
651
|
-
var
|
|
652
|
-
e.jsx =
|
|
651
|
+
var Bt = $t, Ut = It;
|
|
652
|
+
e.jsx = Bt, e.jsxs = Ut;
|
|
653
653
|
}();
|
|
654
654
|
}(an)), an;
|
|
655
655
|
}
|
|
656
|
-
var
|
|
657
|
-
function
|
|
658
|
-
return
|
|
656
|
+
var Kn;
|
|
657
|
+
function us() {
|
|
658
|
+
return Kn || (Kn = 1, process.env.NODE_ENV === "production" ? Je.exports = as() : Je.exports = ds()), Je.exports;
|
|
659
659
|
}
|
|
660
|
-
var n =
|
|
661
|
-
const
|
|
660
|
+
var n = us();
|
|
661
|
+
const fs = "2.0.0-alpha.16", tt = "chat_session", xs = "user_uttered", gs = "bot_uttered", Cs = "ehelp_bot_uttered", ms = "https://sfchatbot.dataon.com", bs = [
|
|
662
662
|
{
|
|
663
663
|
label: "Didn’t address my question",
|
|
664
664
|
value: "Didn’t address my question"
|
|
@@ -679,7 +679,7 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
|
|
|
679
679
|
label: "I’d like to explain further",
|
|
680
680
|
value: "another"
|
|
681
681
|
}
|
|
682
|
-
], Le =
|
|
682
|
+
], Le = Kt, Re = Wt, vs = fs, hs = "https://sfchatbot.dataon.com/openai-service-dev/", Ze = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", En = "YYYY-MM-DD", Xe = "HH:mm", qn = "N/A", dn = [
|
|
683
683
|
// Raster (bitmap)
|
|
684
684
|
".jpg",
|
|
685
685
|
".jpeg",
|
|
@@ -701,18 +701,18 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
|
|
|
701
701
|
".orf",
|
|
702
702
|
".psd",
|
|
703
703
|
".xcf"
|
|
704
|
-
], un = "w-widget-content-container", fn = "w-ticket-detail-content-container",
|
|
704
|
+
], un = "w-widget-content-container", fn = "w-ticket-detail-content-container", Es = "w-wrapper-body", Ts = "w-wrapper-body-helpdesk", He = "w-header", xn = {
|
|
705
705
|
FADE_IN: "w-fade-in-animate"
|
|
706
|
-
},
|
|
706
|
+
}, ys = "https://placehold.co/600x400?text=No+Image", Ie = 3, js = "GoHRDev2025WorkPlazeDataOnDotCom", _e = "(Helpdesk Widget Chatbot)", ws = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), st = (e) => {
|
|
707
707
|
var t;
|
|
708
708
|
try {
|
|
709
709
|
return (t = new URL(e)) == null ? void 0 : t.host;
|
|
710
710
|
} catch {
|
|
711
|
-
return
|
|
711
|
+
return st(ms);
|
|
712
712
|
}
|
|
713
713
|
}, le = (e, t) => {
|
|
714
|
-
var r, s,
|
|
715
|
-
return ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 ? (
|
|
714
|
+
var r, s, a;
|
|
715
|
+
return ((r = Object.keys(e || {})) == null ? void 0 : r.length) > 0 ? (a = (s = Object == null ? void 0 : Object.prototype) == null ? void 0 : s.hasOwnProperty) == null ? void 0 : a.call(e, t) : !1;
|
|
716
716
|
}, Ae = (e) => {
|
|
717
717
|
var r;
|
|
718
718
|
const t = e == null ? void 0 : e.attachment;
|
|
@@ -723,64 +723,64 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
|
|
|
723
723
|
filedownload: le(t, "type") && (t == null ? void 0 : t.type) === "filedownloader",
|
|
724
724
|
chart: (t == null ? void 0 : t.type) === "charts" && le(t, "chartType")
|
|
725
725
|
};
|
|
726
|
-
},
|
|
727
|
-
var t, r, s,
|
|
726
|
+
}, rt = (e) => {
|
|
727
|
+
var t, r, s, a;
|
|
728
728
|
if (e) {
|
|
729
|
-
const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"),
|
|
730
|
-
(
|
|
729
|
+
const c = e == null ? void 0 : e.split(".")[1], o = (t = c == null ? void 0 : c.replace(/-/g, "+")) == null ? void 0 : t.replace(/_/g, "/"), d = decodeURIComponent(
|
|
730
|
+
(a = (s = (r = window == null ? void 0 : window.atob(o)) == null ? void 0 : r.split("")) == null ? void 0 : s.map((i) => "%" + ("00" + i.charCodeAt(0).toString(16)).slice(-2))) == null ? void 0 : a.join("")
|
|
731
731
|
);
|
|
732
|
-
return JSON == null ? void 0 : JSON.parse(
|
|
732
|
+
return JSON == null ? void 0 : JSON.parse(d || "{}");
|
|
733
733
|
}
|
|
734
734
|
return {};
|
|
735
|
-
},
|
|
735
|
+
}, Tn = ({
|
|
736
736
|
downloadURL: e = "",
|
|
737
737
|
fileName: t = "",
|
|
738
738
|
isOpenNewTab: r = !1
|
|
739
739
|
}) => {
|
|
740
|
-
var
|
|
740
|
+
var a;
|
|
741
741
|
const s = document == null ? void 0 : document.createElement("a");
|
|
742
|
-
s.href = e, s.download = t || e, r && (s.target = "_blank"), (
|
|
743
|
-
},
|
|
742
|
+
s.href = e, s.download = t || e, r && (s.target = "_blank"), (a = document == null ? void 0 : document.body) == null || a.appendChild(s), s.click(), document.body.removeChild(s);
|
|
743
|
+
}, ks = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
744
744
|
const t = crypto.getRandomValues(new Uint8Array(1))[0] % 16;
|
|
745
745
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
746
|
-
}),
|
|
746
|
+
}), yn = ({
|
|
747
747
|
ArrObj: e,
|
|
748
748
|
key: t,
|
|
749
749
|
ignoreCaseSensitive: r = !1
|
|
750
750
|
}) => (e == null ? void 0 : e.length) > 0 ? [
|
|
751
751
|
...new Map(
|
|
752
752
|
e.map((s) => {
|
|
753
|
-
var
|
|
753
|
+
var a;
|
|
754
754
|
return [
|
|
755
|
-
r ? (
|
|
755
|
+
r ? (a = String(s[t])) == null ? void 0 : a.toLowerCase() : s[t],
|
|
756
756
|
s
|
|
757
757
|
];
|
|
758
758
|
})
|
|
759
759
|
).values()
|
|
760
|
-
] : [],
|
|
760
|
+
] : [], ps = (e = []) => {
|
|
761
761
|
const t = {}, r = [], s = [];
|
|
762
762
|
e == null || e.forEach((c) => {
|
|
763
763
|
var o;
|
|
764
|
-
le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((
|
|
765
|
-
s == null || s.push(
|
|
764
|
+
le(c, "chats") ? (o = c == null ? void 0 : c.chats) == null || o.forEach((d) => {
|
|
765
|
+
s == null || s.push(d);
|
|
766
766
|
}) : s == null || s.push(c);
|
|
767
767
|
}), s == null || s.forEach((c, o) => {
|
|
768
|
-
var
|
|
769
|
-
const
|
|
770
|
-
|
|
768
|
+
var i, u, f;
|
|
769
|
+
const d = c == null ? void 0 : c.generated_id;
|
|
770
|
+
d ? (t[d] || (t[d] = []), (u = t[d]) == null || u.push({
|
|
771
771
|
...c,
|
|
772
772
|
indexChat: o,
|
|
773
773
|
...!(c != null && c.timestamp) && {
|
|
774
|
-
timestamp: (
|
|
774
|
+
timestamp: (i = ae()) == null ? void 0 : i.format("hh:mm A")
|
|
775
775
|
}
|
|
776
776
|
}), r == null || r.push({
|
|
777
|
-
keyItem:
|
|
777
|
+
keyItem: d ?? o,
|
|
778
778
|
type: "text",
|
|
779
779
|
sender: "response",
|
|
780
|
-
...
|
|
781
|
-
generated_id:
|
|
780
|
+
...d && {
|
|
781
|
+
generated_id: d
|
|
782
782
|
},
|
|
783
|
-
chats: t == null ? void 0 : t[
|
|
783
|
+
chats: t == null ? void 0 : t[d]
|
|
784
784
|
})) : r == null || r.push({
|
|
785
785
|
...c,
|
|
786
786
|
keyItem: o,
|
|
@@ -789,18 +789,18 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
|
|
|
789
789
|
}
|
|
790
790
|
});
|
|
791
791
|
});
|
|
792
|
-
const
|
|
793
|
-
return
|
|
792
|
+
const a = yn({ ArrObj: r, key: "keyItem" });
|
|
793
|
+
return a == null || a.forEach((c) => {
|
|
794
794
|
c == null || delete c.keyItem;
|
|
795
|
-
}),
|
|
795
|
+
}), a;
|
|
796
796
|
}, Pe = (e = {}) => {
|
|
797
797
|
const r = {
|
|
798
|
-
...
|
|
798
|
+
...ot(),
|
|
799
799
|
...e
|
|
800
800
|
};
|
|
801
|
-
localStorage == null || localStorage.setItem(
|
|
802
|
-
},
|
|
803
|
-
const e = localStorage == null ? void 0 : localStorage.getItem(
|
|
801
|
+
localStorage == null || localStorage.setItem(tt, JSON.stringify(r || {}));
|
|
802
|
+
}, ot = () => {
|
|
803
|
+
const e = localStorage == null ? void 0 : localStorage.getItem(tt);
|
|
804
804
|
return JSON.parse(e || "{}");
|
|
805
805
|
}, _s = (e = "") => {
|
|
806
806
|
var t;
|
|
@@ -811,214 +811,224 @@ const ds = "2.0.0-alpha.13", et = "chat_session", us = "user_uttered", fs = "bot
|
|
|
811
811
|
return "wss";
|
|
812
812
|
}
|
|
813
813
|
};
|
|
814
|
-
let
|
|
814
|
+
let Jn = null;
|
|
815
815
|
const me = (e = ".w-wrapper-body") => {
|
|
816
816
|
const t = document.querySelector(e);
|
|
817
|
-
clearTimeout(
|
|
817
|
+
clearTimeout(Jn), Jn = setTimeout(() => {
|
|
818
818
|
t && t.scrollTo({
|
|
819
819
|
top: t.scrollHeight,
|
|
820
820
|
behavior: "smooth"
|
|
821
821
|
});
|
|
822
822
|
}, 0);
|
|
823
|
-
},
|
|
823
|
+
}, As = (e) => {
|
|
824
824
|
const t = new Uint8Array(e);
|
|
825
825
|
let r = "";
|
|
826
826
|
for (let s = 0; s < t.byteLength; s++)
|
|
827
827
|
r += String.fromCharCode(t[s]);
|
|
828
828
|
return btoa(r);
|
|
829
|
-
},
|
|
830
|
-
var
|
|
831
|
-
const r = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, s = new TextEncoder(),
|
|
829
|
+
}, Ss = async (e, t) => {
|
|
830
|
+
var i;
|
|
831
|
+
const r = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, s = new TextEncoder(), a = s == null ? void 0 : s.encode(r), c = s == null ? void 0 : s.encode(t);
|
|
832
832
|
if (c.length !== 32)
|
|
833
833
|
throw new Error("Key length must be 32 bytes for AES-256");
|
|
834
|
-
const o = await ((
|
|
834
|
+
const o = await ((i = crypto == null ? void 0 : crypto.subtle) == null ? void 0 : i.importKey(
|
|
835
835
|
"raw",
|
|
836
836
|
c,
|
|
837
837
|
{ name: "AES-CBC" },
|
|
838
838
|
!1,
|
|
839
839
|
["encrypt"]
|
|
840
|
-
)),
|
|
840
|
+
)), d = await crypto.subtle.encrypt(
|
|
841
841
|
{ name: "AES-CBC", iv: new Uint8Array(16) },
|
|
842
842
|
o,
|
|
843
|
-
|
|
843
|
+
a
|
|
844
844
|
);
|
|
845
|
-
return
|
|
845
|
+
return As(d);
|
|
846
846
|
}, Qe = (e) => {
|
|
847
|
-
const t = {}, r =
|
|
847
|
+
const t = {}, r = ct(e), s = r == null ? void 0 : r.map((a) => {
|
|
848
848
|
var o;
|
|
849
|
-
const c =
|
|
849
|
+
const c = a == null ? void 0 : a.CREATED_DATE;
|
|
850
850
|
return {
|
|
851
|
-
...
|
|
851
|
+
...a,
|
|
852
852
|
DATE_KEY: (o = ae(c)) == null ? void 0 : o.format("YYYY-MM-DD")
|
|
853
853
|
};
|
|
854
854
|
});
|
|
855
|
-
return s == null || s.forEach((
|
|
855
|
+
return s == null || s.forEach((a) => {
|
|
856
856
|
var c;
|
|
857
|
-
t[
|
|
857
|
+
t[a == null ? void 0 : a.DATE_KEY] || (t[a == null ? void 0 : a.DATE_KEY] = []), (c = t[a == null ? void 0 : a.DATE_KEY]) == null || c.push(a);
|
|
858
858
|
}), t;
|
|
859
|
-
},
|
|
859
|
+
}, jn = (e) => {
|
|
860
860
|
var t;
|
|
861
861
|
return (t = Object.values(e || {})) == null ? void 0 : t.flat();
|
|
862
|
-
},
|
|
862
|
+
}, ct = (e) => e == null ? void 0 : e.sort((t, r) => ae(t == null ? void 0 : t.CREATED_DATE) - ae(r == null ? void 0 : r.CREATED_DATE)), it = (e) => {
|
|
863
863
|
if (e && typeof e == "string") {
|
|
864
864
|
const t = e == null ? void 0 : e.split("."), r = t[(t == null ? void 0 : t.length) - 1];
|
|
865
865
|
return e == null ? void 0 : e.replaceAll(`.${r}`, `_avatar.${r}`);
|
|
866
866
|
}
|
|
867
867
|
return e;
|
|
868
|
-
},
|
|
868
|
+
}, wn = (e) => `https://ui-avatars.com/api/?background=e5e5e5&color=000${e && typeof e == "string" ? `&name=${e.replaceAll(" ", "+")}` : ""}`, Qn = (e) => URL.parse(e) && new URL(e), gn = (e) => {
|
|
869
|
+
try {
|
|
870
|
+
return new URL(e);
|
|
871
|
+
} catch {
|
|
872
|
+
return {};
|
|
873
|
+
}
|
|
874
|
+
}, lt = Te({}), q = () => ye(lt), Ls = ({
|
|
869
875
|
children: e,
|
|
870
876
|
getStartedPayload: t,
|
|
871
877
|
socketURL: r,
|
|
872
878
|
socketPath: s,
|
|
873
|
-
onPayslipFn:
|
|
879
|
+
onPayslipFn: a,
|
|
874
880
|
title: c,
|
|
875
881
|
subTitle: o,
|
|
876
|
-
keyEncrypt:
|
|
877
|
-
history:
|
|
882
|
+
keyEncrypt: d,
|
|
883
|
+
history: i,
|
|
878
884
|
isSF: u
|
|
879
885
|
}) => {
|
|
880
|
-
const [f, x] = D(!1), [g, C] = D("va"), [y,
|
|
886
|
+
const [f, x] = D(!1), [g, C] = D("va"), [y, j] = D(!1), [p, w] = D({}), [v, h] = D(!1), [b, E] = D(!1), m = K(!1), k = O(() => ({
|
|
881
887
|
getStartedPayload: t,
|
|
882
888
|
socketURL: r,
|
|
883
889
|
socketPath: s,
|
|
884
|
-
onPayslipFn:
|
|
890
|
+
onPayslipFn: a,
|
|
885
891
|
title: c,
|
|
886
892
|
subTitle: o,
|
|
887
|
-
keyEncrypt:
|
|
888
|
-
history:
|
|
893
|
+
keyEncrypt: d,
|
|
894
|
+
history: i,
|
|
889
895
|
isSF: u
|
|
890
896
|
}), [
|
|
891
897
|
t,
|
|
892
898
|
r,
|
|
893
899
|
s,
|
|
894
|
-
|
|
900
|
+
a,
|
|
895
901
|
c,
|
|
896
902
|
o,
|
|
897
|
-
|
|
898
|
-
|
|
903
|
+
d,
|
|
904
|
+
i,
|
|
899
905
|
u
|
|
900
|
-
]), S = O(() =>
|
|
906
|
+
]), S = O(() => rt(p == null ? void 0 : p.access_token), [p == null ? void 0 : p.access_token]);
|
|
901
907
|
return X(() => {
|
|
902
|
-
|
|
908
|
+
w(ws(t));
|
|
903
909
|
}, [t]), X(() => {
|
|
904
910
|
Pe({
|
|
905
|
-
chatbot_version:
|
|
911
|
+
chatbot_version: vs
|
|
906
912
|
});
|
|
907
913
|
}, []), /* @__PURE__ */ n.jsx(
|
|
908
|
-
|
|
914
|
+
lt.Provider,
|
|
909
915
|
{
|
|
910
916
|
value: {
|
|
911
|
-
objInitPayload:
|
|
917
|
+
objInitPayload: p,
|
|
912
918
|
setOpenWidget: x,
|
|
913
919
|
isOpenWidget: f,
|
|
914
920
|
activeTab: g,
|
|
915
921
|
setActiveTab: C,
|
|
916
922
|
isExpand: y,
|
|
917
|
-
setExpand:
|
|
918
|
-
setObjInitPayload:
|
|
923
|
+
setExpand: j,
|
|
924
|
+
setObjInitPayload: w,
|
|
919
925
|
parsedJWT: S,
|
|
920
|
-
widgetProps:
|
|
926
|
+
widgetProps: k,
|
|
921
927
|
isFirstOpenWidget: v,
|
|
922
|
-
setFirstOpenWidget:
|
|
928
|
+
setFirstOpenWidget: h,
|
|
923
929
|
isFirstRenderHelpdesk: m,
|
|
924
930
|
showReadyWSHD: b,
|
|
925
|
-
setShowReadyWSHD:
|
|
931
|
+
setShowReadyWSHD: E
|
|
926
932
|
},
|
|
927
933
|
children: e
|
|
928
934
|
}
|
|
929
935
|
);
|
|
930
|
-
},
|
|
931
|
-
const { objInitPayload: t } =
|
|
936
|
+
}, at = Te({}), Rs = () => ye(at), Os = ({ children: e }) => {
|
|
937
|
+
const { objInitPayload: t } = q(), [r, s] = D({}), a = () => {
|
|
932
938
|
var o;
|
|
933
939
|
(o = Oe(
|
|
934
|
-
`${(t == null ? void 0 : t.uriService) ||
|
|
935
|
-
)) == null || o.then(({ data:
|
|
936
|
-
var
|
|
937
|
-
if (
|
|
938
|
-
const u = Object.keys((
|
|
940
|
+
`${(t == null ? void 0 : t.uriService) || hs}optional/translations`
|
|
941
|
+
)) == null || o.then(({ data: d }) => {
|
|
942
|
+
var i;
|
|
943
|
+
if (d) {
|
|
944
|
+
const u = Object.keys((i = Object.values(d)) == null ? void 0 : i[0]), f = {};
|
|
939
945
|
u == null || u.forEach((x) => {
|
|
940
946
|
var g;
|
|
941
|
-
(g = Object.keys(
|
|
947
|
+
(g = Object.keys(d)) == null || g.forEach((C) => {
|
|
942
948
|
var y;
|
|
943
|
-
f[x == null ? void 0 : x.toLowerCase()] = (y =
|
|
949
|
+
f[x == null ? void 0 : x.toLowerCase()] = (y = d == null ? void 0 : d[C]) == null ? void 0 : y[x];
|
|
944
950
|
});
|
|
945
951
|
}), s(f);
|
|
946
952
|
}
|
|
947
953
|
});
|
|
948
954
|
}, c = () => {
|
|
949
955
|
const o = window.indexedDB.open("language");
|
|
950
|
-
o.onsuccess = (
|
|
956
|
+
o.onsuccess = (d) => {
|
|
951
957
|
var u;
|
|
952
|
-
const
|
|
958
|
+
const i = d.target.result;
|
|
953
959
|
try {
|
|
954
|
-
const x =
|
|
960
|
+
const x = i.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), g = x == null ? void 0 : x.get((u = t == null ? void 0 : t.lang) == null ? void 0 : u.toLowerCase());
|
|
955
961
|
g.onsuccess = () => {
|
|
956
962
|
s(g == null ? void 0 : g.result);
|
|
957
963
|
}, g.onerror = () => {
|
|
958
|
-
|
|
964
|
+
a();
|
|
959
965
|
};
|
|
960
966
|
} catch {
|
|
961
|
-
|
|
967
|
+
a();
|
|
962
968
|
}
|
|
963
969
|
}, o.onerror = () => {
|
|
964
|
-
|
|
970
|
+
a();
|
|
965
971
|
};
|
|
966
972
|
};
|
|
967
973
|
return X(() => {
|
|
968
974
|
c();
|
|
969
|
-
}, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(
|
|
970
|
-
},
|
|
975
|
+
}, [t == null ? void 0 : t.uriService, t == null ? void 0 : t.lang]), /* @__PURE__ */ n.jsx(at.Provider, { value: { langDatas: r }, children: e });
|
|
976
|
+
}, dt = Te({}), fe = () => ye(dt), Ds = ({ children: e }) => {
|
|
971
977
|
var M;
|
|
972
|
-
const [t, r] = D([]), [s,
|
|
978
|
+
const [t, r] = D([]), [s, a] = D(!1), [c, o] = D(!1), [d, i] = D({}), [u, f] = D(!1), [x, g] = D(!1), {
|
|
973
979
|
objInitPayload: C,
|
|
974
980
|
widgetProps: y,
|
|
975
|
-
setOpenWidget:
|
|
976
|
-
setFirstOpenWidget:
|
|
977
|
-
isFirstRenderHelpdesk:
|
|
978
|
-
} =
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
...
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
981
|
+
setOpenWidget: j,
|
|
982
|
+
setFirstOpenWidget: p,
|
|
983
|
+
isFirstRenderHelpdesk: w
|
|
984
|
+
} = q(), v = K(null), h = K(""), b = K(""), E = (L) => {
|
|
985
|
+
var $;
|
|
986
|
+
if (!(($ = L == null ? void 0 : L.metadata) == null ? void 0 : $.stopped)) {
|
|
987
|
+
const F = le(L, "text_feedback_link") && le(L, "text");
|
|
988
|
+
r((G) => {
|
|
989
|
+
const J = [
|
|
990
|
+
...G,
|
|
991
|
+
{
|
|
992
|
+
...L,
|
|
993
|
+
...F && {
|
|
994
|
+
type: "text"
|
|
995
|
+
},
|
|
996
|
+
sender: "response"
|
|
997
|
+
}
|
|
998
|
+
];
|
|
999
|
+
return ps(J);
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
a(!1), o(!1), me();
|
|
993
1003
|
}, m = () => {
|
|
994
|
-
var L,
|
|
995
|
-
(L = v == null ? void 0 : v.current) == null || L.emit("session_request", { session_id: null }), (
|
|
996
|
-
|
|
1004
|
+
var L, I, $, F;
|
|
1005
|
+
(L = v == null ? void 0 : v.current) == null || L.emit("session_request", { session_id: null }), (I = v == null ? void 0 : v.current) == null || I.on("session_confirm", (G) => {
|
|
1006
|
+
h.current = G, Pe({
|
|
997
1007
|
session_id: G == null ? void 0 : G.session_id
|
|
998
1008
|
});
|
|
999
|
-
}), ($ = v == null ? void 0 : v.current) == null || $.on(
|
|
1000
|
-
const
|
|
1001
|
-
le(
|
|
1002
|
-
}), u || f(!0),
|
|
1003
|
-
},
|
|
1009
|
+
}), ($ = v == null ? void 0 : v.current) == null || $.on(gs, E), (F = v == null ? void 0 : v.current) == null || F.on(Cs, (G) => {
|
|
1010
|
+
const J = JSON.parse(G || "{}");
|
|
1011
|
+
le(J, "iswidget") && g(J == null ? void 0 : J.iswidget);
|
|
1012
|
+
}), u || f(!0), p(!1);
|
|
1013
|
+
}, k = ({
|
|
1004
1014
|
msg: L,
|
|
1005
|
-
additionalConfig:
|
|
1015
|
+
additionalConfig: I = {},
|
|
1006
1016
|
isShowLoadingResponse: $ = !0
|
|
1007
1017
|
}) => {
|
|
1008
|
-
var
|
|
1009
|
-
(
|
|
1018
|
+
var F;
|
|
1019
|
+
(F = v == null ? void 0 : v.current) == null || F.emit(xs, {
|
|
1010
1020
|
customData: {
|
|
1011
1021
|
language: C == null ? void 0 : C.lang
|
|
1012
1022
|
},
|
|
1013
1023
|
message: L,
|
|
1014
|
-
session_id:
|
|
1015
|
-
...
|
|
1016
|
-
}), $ ?
|
|
1024
|
+
session_id: h == null ? void 0 : h.current,
|
|
1025
|
+
...I
|
|
1026
|
+
}), $ ? a(!0) : o(!0);
|
|
1017
1027
|
}, S = () => {
|
|
1018
|
-
var
|
|
1019
|
-
v.current && ((
|
|
1020
|
-
const L =
|
|
1021
|
-
`${_s(y == null ? void 0 : y.socketURL)}://${
|
|
1028
|
+
var I, $;
|
|
1029
|
+
v.current && ((I = v == null ? void 0 : v.current) == null || I.off(), ($ = v == null ? void 0 : v.current) == null || $.disconnect(), v.current = null), w.current = !1;
|
|
1030
|
+
const L = ts(
|
|
1031
|
+
`${_s(y == null ? void 0 : y.socketURL)}://${st(
|
|
1022
1032
|
y == null ? void 0 : y.socketURL
|
|
1023
1033
|
)}`,
|
|
1024
1034
|
{
|
|
@@ -1028,9 +1038,9 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1028
1038
|
reconnectionAttempts: 1
|
|
1029
1039
|
}
|
|
1030
1040
|
);
|
|
1031
|
-
L.on("connect", m), L.on("connect_error", (
|
|
1041
|
+
L.on("connect", m), L.on("connect_error", (F) => {
|
|
1032
1042
|
console.error("connect_error widget-chatbot : ", {
|
|
1033
|
-
err:
|
|
1043
|
+
err: F,
|
|
1034
1044
|
socketURL: y == null ? void 0 : y.socketURL,
|
|
1035
1045
|
socketPath: y == null ? void 0 : y.widgetProps
|
|
1036
1046
|
}), f(!1);
|
|
@@ -1040,32 +1050,32 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1040
1050
|
socketPath: y == null ? void 0 : y.widgetProps
|
|
1041
1051
|
}), f(!1);
|
|
1042
1052
|
}), v.current = L;
|
|
1043
|
-
},
|
|
1053
|
+
}, H = () => {
|
|
1044
1054
|
var L;
|
|
1045
|
-
(!((L = v == null ? void 0 : v.current) != null && L.connected) || !u) && (S(),
|
|
1055
|
+
(!((L = v == null ? void 0 : v.current) != null && L.connected) || !u) && (S(), j(!1));
|
|
1046
1056
|
}, B = () => {
|
|
1047
1057
|
f(!1);
|
|
1048
1058
|
};
|
|
1049
|
-
return X(() => (
|
|
1050
|
-
var L,
|
|
1051
|
-
v.current && ((L = v.current) == null || L.off("connect", m), (
|
|
1059
|
+
return X(() => (j(!1), S(), window.addEventListener("online", H), window.addEventListener("offline", B), () => {
|
|
1060
|
+
var L, I;
|
|
1061
|
+
v.current && ((L = v.current) == null || L.off("connect", m), (I = v.current) == null || I.disconnect(), v.current = null), window.removeEventListener("online", H), window.removeEventListener("offline", B);
|
|
1052
1062
|
}), [
|
|
1053
1063
|
JSON.stringify(C || {}),
|
|
1054
1064
|
y == null ? void 0 : y.socketURL,
|
|
1055
1065
|
y == null ? void 0 : y.socketPath
|
|
1056
1066
|
]), /* @__PURE__ */ n.jsx(
|
|
1057
|
-
|
|
1067
|
+
dt.Provider,
|
|
1058
1068
|
{
|
|
1059
1069
|
value: {
|
|
1060
1070
|
setChats: r,
|
|
1061
1071
|
chats: t,
|
|
1062
|
-
onSendMsg:
|
|
1072
|
+
onSendMsg: k,
|
|
1063
1073
|
isWaitResponse: s,
|
|
1064
1074
|
socket: v == null ? void 0 : v.current,
|
|
1065
|
-
sessionId: (M =
|
|
1075
|
+
sessionId: (M = h == null ? void 0 : h.current) == null ? void 0 : M.session_id,
|
|
1066
1076
|
loadingRegenerate: c,
|
|
1067
|
-
file:
|
|
1068
|
-
setFile:
|
|
1077
|
+
file: d,
|
|
1078
|
+
setFile: i,
|
|
1069
1079
|
connected: u,
|
|
1070
1080
|
isHandshakeWidget: x,
|
|
1071
1081
|
createSocket: S,
|
|
@@ -1074,7 +1084,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1074
1084
|
children: e
|
|
1075
1085
|
}
|
|
1076
1086
|
);
|
|
1077
|
-
},
|
|
1087
|
+
}, Ns = {
|
|
1078
1088
|
'pre[class*="language-"]': {
|
|
1079
1089
|
color: "#d4d4d4",
|
|
1080
1090
|
fontSize: "13px",
|
|
@@ -1355,15 +1365,15 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1355
1365
|
boxShadow: "inset 5px 0 0 #f7d87c",
|
|
1356
1366
|
zIndex: "0"
|
|
1357
1367
|
}
|
|
1358
|
-
},
|
|
1368
|
+
}, Ms = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), _ = (e = "", t) => {
|
|
1359
1369
|
var o;
|
|
1360
|
-
const { langDatas: r } =
|
|
1361
|
-
return ((o = Object.keys(r || {})) == null ? void 0 : o.length) > 0 ? s ? `WPUI_${
|
|
1362
|
-
},
|
|
1363
|
-
var
|
|
1370
|
+
const { langDatas: r } = Rs(), s = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), a = Ms(String(e)), c = (r == null ? void 0 : r[a == null ? void 0 : a.toUpperCase()]) || t;
|
|
1371
|
+
return ((o = Object.keys(r || {})) == null ? void 0 : o.length) > 0 ? s ? `WPUI_${a}` : c : t;
|
|
1372
|
+
}, Fs = ({ isFeedback: e = !1, open: t, ...r }) => {
|
|
1373
|
+
var a;
|
|
1364
1374
|
const s = O(() => e ? "w-modal-container-feedback" : "", [e]);
|
|
1365
1375
|
return Le != null && Le.startsWith("5") ? /* @__PURE__ */ n.jsx(
|
|
1366
|
-
|
|
1376
|
+
Un,
|
|
1367
1377
|
{
|
|
1368
1378
|
rootClassName: s,
|
|
1369
1379
|
...r,
|
|
@@ -1385,7 +1395,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1385
1395
|
) : (
|
|
1386
1396
|
// <div className={rootClassName}>
|
|
1387
1397
|
/* @__PURE__ */ n.jsx(
|
|
1388
|
-
|
|
1398
|
+
Un,
|
|
1389
1399
|
{
|
|
1390
1400
|
getContainer: "#w-widget-content",
|
|
1391
1401
|
width: 300,
|
|
@@ -1395,7 +1405,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1395
1405
|
} : { visible: t },
|
|
1396
1406
|
maskStyle: {
|
|
1397
1407
|
backdropFilter: "blur(4x)",
|
|
1398
|
-
...((
|
|
1408
|
+
...((a = Object.keys((r == null ? void 0 : r.maskStyle) || {})) == null ? void 0 : a.length) > 0 && {
|
|
1399
1409
|
...r == null ? void 0 : r.maskStyle
|
|
1400
1410
|
}
|
|
1401
1411
|
},
|
|
@@ -1408,12 +1418,12 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1408
1418
|
}
|
|
1409
1419
|
)
|
|
1410
1420
|
);
|
|
1411
|
-
},
|
|
1412
|
-
const r = (s,
|
|
1421
|
+
}, ut = R(Fs), Zn = ({ props: e, isModal: t = !1 }) => {
|
|
1422
|
+
const r = (s, a) => {
|
|
1413
1423
|
var c;
|
|
1414
|
-
return (c =
|
|
1415
|
-
var
|
|
1416
|
-
return !
|
|
1424
|
+
return (c = Vt) == null ? void 0 : c.map(s, (o) => {
|
|
1425
|
+
var d, i, u;
|
|
1426
|
+
return !Gt(o) || ((d = Object.keys((o == null ? void 0 : o.props) || {})) == null ? void 0 : d.length) === 0 ? o : zt(o, {
|
|
1417
1427
|
...o == null ? void 0 : o.props,
|
|
1418
1428
|
...(o == null ? void 0 : o.type) === "thead" && {
|
|
1419
1429
|
className: "ant-table-thead"
|
|
@@ -1428,13 +1438,13 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1428
1438
|
}
|
|
1429
1439
|
}
|
|
1430
1440
|
},
|
|
1431
|
-
...o.type === "tr" &&
|
|
1441
|
+
...o.type === "tr" && a === "tbody" && {
|
|
1432
1442
|
className: "ant-table-row"
|
|
1433
1443
|
},
|
|
1434
1444
|
...(o == null ? void 0 : o.type) === "tbody" && {
|
|
1435
1445
|
className: "ant-table-tbody"
|
|
1436
1446
|
},
|
|
1437
|
-
children: (
|
|
1447
|
+
children: (i = o == null ? void 0 : o.props) != null && i.children ? r((u = o == null ? void 0 : o.props) == null ? void 0 : u.children, o == null ? void 0 : o.type) : o == null ? void 0 : o.props
|
|
1438
1448
|
});
|
|
1439
1449
|
});
|
|
1440
1450
|
};
|
|
@@ -1450,13 +1460,13 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1450
1460
|
children: /* @__PURE__ */ n.jsx("table", { className: "wp-md-table", ...e, children: r(e == null ? void 0 : e.children, "") })
|
|
1451
1461
|
}
|
|
1452
1462
|
) }) }) });
|
|
1453
|
-
},
|
|
1454
|
-
const t =
|
|
1463
|
+
}, Hs = ({ children: e }) => {
|
|
1464
|
+
const t = _(
|
|
1455
1465
|
"OpenDetailTable",
|
|
1456
1466
|
"Open Detail Table"
|
|
1457
|
-
), r =
|
|
1458
|
-
table: ({ ...
|
|
1459
|
-
/* @__PURE__ */ n.jsx(
|
|
1467
|
+
), r = _("TableDetail", "Tabel Detail"), { widgetProps: s, objInitPayload: a } = q(), [c, o] = D(!1), d = {
|
|
1468
|
+
table: ({ ...i }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1469
|
+
/* @__PURE__ */ n.jsx(Zn, { props: i }),
|
|
1460
1470
|
/* @__PURE__ */ n.jsx(
|
|
1461
1471
|
"div",
|
|
1462
1472
|
{
|
|
@@ -1469,7 +1479,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1469
1479
|
z,
|
|
1470
1480
|
{
|
|
1471
1481
|
onClick: () => {
|
|
1472
|
-
|
|
1482
|
+
o(!0);
|
|
1473
1483
|
},
|
|
1474
1484
|
children: t
|
|
1475
1485
|
}
|
|
@@ -1477,52 +1487,59 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1477
1487
|
}
|
|
1478
1488
|
),
|
|
1479
1489
|
/* @__PURE__ */ n.jsx(
|
|
1480
|
-
|
|
1490
|
+
ut,
|
|
1481
1491
|
{
|
|
1482
1492
|
getContainer: () => document.body,
|
|
1483
1493
|
footer: null,
|
|
1484
1494
|
title: r,
|
|
1485
1495
|
width: 800,
|
|
1486
|
-
open:
|
|
1496
|
+
open: c,
|
|
1487
1497
|
onCancel: () => {
|
|
1488
|
-
|
|
1498
|
+
o(!1);
|
|
1489
1499
|
},
|
|
1490
|
-
children: /* @__PURE__ */ n.jsx(
|
|
1500
|
+
children: /* @__PURE__ */ n.jsx(Zn, { props: i, isModal: !0 })
|
|
1491
1501
|
}
|
|
1492
1502
|
)
|
|
1493
1503
|
] }),
|
|
1494
|
-
code: ({ ...
|
|
1495
|
-
const { children:
|
|
1496
|
-
return
|
|
1497
|
-
|
|
1504
|
+
code: ({ ...i }) => {
|
|
1505
|
+
const { children: u, className: f, ...x } = i, g = /language-(\w+)/.exec(f || "");
|
|
1506
|
+
return g ? /* @__PURE__ */ n.jsx(
|
|
1507
|
+
os,
|
|
1498
1508
|
{
|
|
1499
|
-
...
|
|
1509
|
+
...x,
|
|
1500
1510
|
PreTag: "div",
|
|
1501
|
-
language:
|
|
1502
|
-
style:
|
|
1503
|
-
children: String(
|
|
1511
|
+
language: g[1],
|
|
1512
|
+
style: Ns,
|
|
1513
|
+
children: String(u).replace(/\n$/, "")
|
|
1504
1514
|
}
|
|
1505
|
-
) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children:
|
|
1515
|
+
) : /* @__PURE__ */ n.jsx(V.Text, { code: !0, children: i == null ? void 0 : i.children });
|
|
1506
1516
|
},
|
|
1507
|
-
a: ({ ...
|
|
1508
|
-
var
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
{
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1517
|
+
a: ({ ...i }) => {
|
|
1518
|
+
var C, y, j, p;
|
|
1519
|
+
const u = i == null ? void 0 : i.href, f = (C = i == null ? void 0 : i.children) == null ? void 0 : C[0], x = Qn(u), g = Qn(a == null ? void 0 : a.uriBackend);
|
|
1520
|
+
if (x && g) {
|
|
1521
|
+
const w = (y = gn(u)) == null ? void 0 : y.origin, v = (j = gn(a == null ? void 0 : a.uriBackend)) == null ? void 0 : j.origin;
|
|
1522
|
+
if ((w == null ? void 0 : w.toLowerCase()) === (v == null ? void 0 : v.toLowerCase())) {
|
|
1523
|
+
const h = (p = gn(u)) == null ? void 0 : p.pathname;
|
|
1524
|
+
return /* @__PURE__ */ n.jsx(
|
|
1525
|
+
"span",
|
|
1526
|
+
{
|
|
1527
|
+
...i,
|
|
1528
|
+
className: "w-link-path",
|
|
1529
|
+
onClick: (b) => {
|
|
1530
|
+
var E, m;
|
|
1531
|
+
b == null || b.stopPropagation(), h && ((E = Object.keys((s == null ? void 0 : s.history) || {})) == null ? void 0 : E.length) > 0 && ((m = s == null ? void 0 : s.history) == null || m.push(h));
|
|
1532
|
+
},
|
|
1533
|
+
children: f
|
|
1534
|
+
}
|
|
1535
|
+
);
|
|
1520
1536
|
}
|
|
1521
|
-
|
|
1537
|
+
}
|
|
1538
|
+
return /* @__PURE__ */ n.jsx("a", { ...i, target: "_blank" });
|
|
1522
1539
|
}
|
|
1523
1540
|
};
|
|
1524
|
-
return /* @__PURE__ */ n.jsx(
|
|
1525
|
-
},
|
|
1541
|
+
return /* @__PURE__ */ n.jsx(ss, { remarkPlugins: [rs], components: d, children: e });
|
|
1542
|
+
}, ft = R(Hs), Is = () => /* @__PURE__ */ n.jsx(
|
|
1526
1543
|
"svg",
|
|
1527
1544
|
{
|
|
1528
1545
|
width: "24",
|
|
@@ -1540,7 +1557,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1540
1557
|
}
|
|
1541
1558
|
)
|
|
1542
1559
|
}
|
|
1543
|
-
),
|
|
1560
|
+
), $s = () => /* @__PURE__ */ n.jsx(
|
|
1544
1561
|
"svg",
|
|
1545
1562
|
{
|
|
1546
1563
|
width: "24",
|
|
@@ -1557,7 +1574,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1557
1574
|
}
|
|
1558
1575
|
)
|
|
1559
1576
|
}
|
|
1560
|
-
),
|
|
1577
|
+
), Bs = () => /* @__PURE__ */ n.jsxs(
|
|
1561
1578
|
"svg",
|
|
1562
1579
|
{
|
|
1563
1580
|
viewBox: "64 64 896 896",
|
|
@@ -1571,7 +1588,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1571
1588
|
/* @__PURE__ */ n.jsx("path", { d: "M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z" })
|
|
1572
1589
|
]
|
|
1573
1590
|
}
|
|
1574
|
-
),
|
|
1591
|
+
), Us = () => /* @__PURE__ */ n.jsxs(
|
|
1575
1592
|
"svg",
|
|
1576
1593
|
{
|
|
1577
1594
|
viewBox: "-2.4 -2.4 28.80 28.80",
|
|
@@ -1593,12 +1610,12 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1593
1610
|
fillRule: "evenodd",
|
|
1594
1611
|
clipRule: "evenodd",
|
|
1595
1612
|
d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM8.58579 8.58579C8 9.17157 8 10.1144 8 12C8 13.8856 8 14.8284 8.58579 15.4142C9.17157 16 10.1144 16 12 16C13.8856 16 14.8284 16 15.4142 15.4142C16 14.8284 16 13.8856 16 12C16 10.1144 16 9.17157 15.4142 8.58579C14.8284 8 13.8856 8 12 8C10.1144 8 9.17157 8 8.58579 8.58579Z",
|
|
1596
|
-
fill: "
|
|
1613
|
+
fill: "var(--primary-color, #395ebc)"
|
|
1597
1614
|
}
|
|
1598
1615
|
) })
|
|
1599
1616
|
]
|
|
1600
1617
|
}
|
|
1601
|
-
),
|
|
1618
|
+
), Ws = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "sync", className: "anticon anticon-sync", children: /* @__PURE__ */ n.jsx(
|
|
1602
1619
|
"svg",
|
|
1603
1620
|
{
|
|
1604
1621
|
viewBox: "64 64 896 896",
|
|
@@ -1609,7 +1626,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1609
1626
|
"aria-hidden": "true",
|
|
1610
1627
|
children: /* @__PURE__ */ n.jsx("path", { d: "M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z" })
|
|
1611
1628
|
}
|
|
1612
|
-
) }),
|
|
1629
|
+
) }), Vs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "left", className: "anticon anticon-left", children: /* @__PURE__ */ n.jsx(
|
|
1613
1630
|
"svg",
|
|
1614
1631
|
{
|
|
1615
1632
|
viewBox: "64 64 896 896",
|
|
@@ -1620,7 +1637,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1620
1637
|
"aria-hidden": "true",
|
|
1621
1638
|
children: /* @__PURE__ */ n.jsx("path", { d: "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" })
|
|
1622
1639
|
}
|
|
1623
|
-
) }),
|
|
1640
|
+
) }), Gs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "right", className: "anticon anticon-right", children: /* @__PURE__ */ n.jsx(
|
|
1624
1641
|
"svg",
|
|
1625
1642
|
{
|
|
1626
1643
|
viewBox: "64 64 896 896",
|
|
@@ -1631,7 +1648,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1631
1648
|
"aria-hidden": "true",
|
|
1632
1649
|
children: /* @__PURE__ */ n.jsx("path", { d: "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" })
|
|
1633
1650
|
}
|
|
1634
|
-
) }),
|
|
1651
|
+
) }), zs = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "like", className: "anticon anticon-like", children: /* @__PURE__ */ n.jsxs(
|
|
1635
1652
|
"svg",
|
|
1636
1653
|
{
|
|
1637
1654
|
viewBox: "64 64 896 896",
|
|
@@ -1658,7 +1675,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1658
1675
|
)
|
|
1659
1676
|
]
|
|
1660
1677
|
}
|
|
1661
|
-
) }),
|
|
1678
|
+
) }), Ys = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "dislike", className: "anticon anticon-dislike", children: /* @__PURE__ */ n.jsxs(
|
|
1662
1679
|
"svg",
|
|
1663
1680
|
{
|
|
1664
1681
|
viewBox: "64 64 896 896",
|
|
@@ -1685,7 +1702,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1685
1702
|
)
|
|
1686
1703
|
]
|
|
1687
1704
|
}
|
|
1688
|
-
) }),
|
|
1705
|
+
) }), Ks = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "delete", className: "anticon anticon-delete", children: /* @__PURE__ */ n.jsx(
|
|
1689
1706
|
"svg",
|
|
1690
1707
|
{
|
|
1691
1708
|
viewBox: "64 64 896 896",
|
|
@@ -1696,7 +1713,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1696
1713
|
"aria-hidden": "true",
|
|
1697
1714
|
children: /* @__PURE__ */ n.jsx("path", { d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z" })
|
|
1698
1715
|
}
|
|
1699
|
-
) }),
|
|
1716
|
+
) }), qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "close", className: "anticon anticon-close", children: /* @__PURE__ */ n.jsx(
|
|
1700
1717
|
"svg",
|
|
1701
1718
|
{
|
|
1702
1719
|
fillRule: "evenodd",
|
|
@@ -1709,7 +1726,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1709
1726
|
"aria-hidden": "true",
|
|
1710
1727
|
children: /* @__PURE__ */ n.jsx("path", { d: "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" })
|
|
1711
1728
|
}
|
|
1712
|
-
) }),
|
|
1729
|
+
) }), Js = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "upload", className: "anticon anticon-upload", children: /* @__PURE__ */ n.jsx(
|
|
1713
1730
|
"svg",
|
|
1714
1731
|
{
|
|
1715
1732
|
viewBox: "64 64 896 896",
|
|
@@ -1720,7 +1737,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1720
1737
|
"aria-hidden": "true",
|
|
1721
1738
|
children: /* @__PURE__ */ n.jsx("path", { d: "M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" })
|
|
1722
1739
|
}
|
|
1723
|
-
) }),
|
|
1740
|
+
) }), Qs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "filter", className: "anticon anticon-filter", children: /* @__PURE__ */ n.jsx(
|
|
1724
1741
|
"svg",
|
|
1725
1742
|
{
|
|
1726
1743
|
viewBox: "64 64 896 896",
|
|
@@ -1731,7 +1748,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1731
1748
|
"aria-hidden": "true",
|
|
1732
1749
|
children: /* @__PURE__ */ n.jsx("path", { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" })
|
|
1733
1750
|
}
|
|
1734
|
-
) }),
|
|
1751
|
+
) }), Zs = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "down", className: "anticon anticon-down", children: /* @__PURE__ */ n.jsx(
|
|
1735
1752
|
"svg",
|
|
1736
1753
|
{
|
|
1737
1754
|
viewBox: "64 64 896 896",
|
|
@@ -1742,7 +1759,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1742
1759
|
"aria-hidden": "true",
|
|
1743
1760
|
children: /* @__PURE__ */ n.jsx("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" })
|
|
1744
1761
|
}
|
|
1745
|
-
) }),
|
|
1762
|
+
) }), Xs = ({ ...e }) => /* @__PURE__ */ n.jsx(
|
|
1746
1763
|
"span",
|
|
1747
1764
|
{
|
|
1748
1765
|
role: "img",
|
|
@@ -1762,7 +1779,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1762
1779
|
}
|
|
1763
1780
|
)
|
|
1764
1781
|
}
|
|
1765
|
-
),
|
|
1782
|
+
), Ps = () => /* @__PURE__ */ n.jsx(
|
|
1766
1783
|
"svg",
|
|
1767
1784
|
{
|
|
1768
1785
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1778,7 +1795,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1778
1795
|
}
|
|
1779
1796
|
)
|
|
1780
1797
|
}
|
|
1781
|
-
),
|
|
1798
|
+
), er = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "smile", className: "anticon anticon-smile", children: /* @__PURE__ */ n.jsx(
|
|
1782
1799
|
"svg",
|
|
1783
1800
|
{
|
|
1784
1801
|
viewBox: "64 64 896 896",
|
|
@@ -1789,7 +1806,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1789
1806
|
"aria-hidden": "true",
|
|
1790
1807
|
children: /* @__PURE__ */ n.jsx("path", { d: "M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z" })
|
|
1791
1808
|
}
|
|
1792
|
-
) }),
|
|
1809
|
+
) }), nr = () => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "file", className: "anticon anticon-file", children: /* @__PURE__ */ n.jsx(
|
|
1793
1810
|
"svg",
|
|
1794
1811
|
{
|
|
1795
1812
|
viewBox: "64 64 896 896",
|
|
@@ -1800,7 +1817,7 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1800
1817
|
"aria-hidden": "true",
|
|
1801
1818
|
children: /* @__PURE__ */ n.jsx("path", { d: "M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z" })
|
|
1802
1819
|
}
|
|
1803
|
-
) }),
|
|
1820
|
+
) }), tr = ({ ...e }) => /* @__PURE__ */ n.jsx("span", { role: "img", "aria-label": "loading", ...e, className: "w-spin-animate", children: /* @__PURE__ */ n.jsx(
|
|
1804
1821
|
"svg",
|
|
1805
1822
|
{
|
|
1806
1823
|
viewBox: "0 0 1024 1024",
|
|
@@ -1814,31 +1831,31 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1814
1831
|
}
|
|
1815
1832
|
) }), P = ({ type: e = "", chatProps: t, ...r }) => {
|
|
1816
1833
|
const s = O(() => ({
|
|
1817
|
-
minimize:
|
|
1818
|
-
expand:
|
|
1819
|
-
send:
|
|
1820
|
-
stop:
|
|
1821
|
-
sync:
|
|
1822
|
-
left:
|
|
1823
|
-
right:
|
|
1824
|
-
like: () => /* @__PURE__ */ n.jsx(
|
|
1825
|
-
dislike: () => /* @__PURE__ */ n.jsx(
|
|
1826
|
-
delete:
|
|
1827
|
-
close:
|
|
1828
|
-
upload:
|
|
1829
|
-
filter:
|
|
1830
|
-
down:
|
|
1831
|
-
"paper-clip": () => /* @__PURE__ */ n.jsx(
|
|
1832
|
-
"chat-bubble":
|
|
1833
|
-
smile:
|
|
1834
|
-
file:
|
|
1835
|
-
loading: () => /* @__PURE__ */ n.jsx(
|
|
1834
|
+
minimize: Is,
|
|
1835
|
+
expand: $s,
|
|
1836
|
+
send: Bs,
|
|
1837
|
+
stop: Us,
|
|
1838
|
+
sync: Ws,
|
|
1839
|
+
left: Vs,
|
|
1840
|
+
right: Gs,
|
|
1841
|
+
like: () => /* @__PURE__ */ n.jsx(zs, { ...t }),
|
|
1842
|
+
dislike: () => /* @__PURE__ */ n.jsx(Ys, { ...t }),
|
|
1843
|
+
delete: Ks,
|
|
1844
|
+
close: qs,
|
|
1845
|
+
upload: Js,
|
|
1846
|
+
filter: Qs,
|
|
1847
|
+
down: Zs,
|
|
1848
|
+
"paper-clip": () => /* @__PURE__ */ n.jsx(Xs, { ...r }),
|
|
1849
|
+
"chat-bubble": Ps,
|
|
1850
|
+
smile: er,
|
|
1851
|
+
file: nr,
|
|
1852
|
+
loading: () => /* @__PURE__ */ n.jsx(tr, { ...r })
|
|
1836
1853
|
}), [e, t, r]);
|
|
1837
|
-
return /* @__PURE__ */ n.jsx(
|
|
1838
|
-
},
|
|
1854
|
+
return /* @__PURE__ */ n.jsx(cs, { component: s == null ? void 0 : s[e], ...r });
|
|
1855
|
+
}, xt = Te({}), be = () => ye(xt), sr = ({ children: e }) => {
|
|
1839
1856
|
const [t, r] = D("va"), s = O(() => t === "va", [t]);
|
|
1840
1857
|
return /* @__PURE__ */ n.jsx(
|
|
1841
|
-
|
|
1858
|
+
xt.Provider,
|
|
1842
1859
|
{
|
|
1843
1860
|
value: {
|
|
1844
1861
|
activeTab: t,
|
|
@@ -1848,28 +1865,28 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1848
1865
|
children: e
|
|
1849
1866
|
}
|
|
1850
1867
|
);
|
|
1851
|
-
},
|
|
1852
|
-
const t =
|
|
1868
|
+
}, rr = ({ ...e }) => {
|
|
1869
|
+
const t = _(
|
|
1853
1870
|
"WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
|
|
1854
1871
|
"We'd love to hear about your experience with the Sunfish chatbot"
|
|
1855
|
-
), r =
|
|
1872
|
+
), r = _(
|
|
1856
1873
|
"ShareAnyCommentsOrSuggestionsToHelpUsImprove",
|
|
1857
1874
|
"Share any comments or suggestions to help us improve"
|
|
1858
|
-
), s =
|
|
1875
|
+
), s = _("Submit", "Submit"), a = _(
|
|
1859
1876
|
"ThankFeedback",
|
|
1860
1877
|
"Thank You for your feedback"
|
|
1861
|
-
), c =
|
|
1878
|
+
), c = _(
|
|
1862
1879
|
"AdditionalFeedback",
|
|
1863
1880
|
"Additional Feedback"
|
|
1864
|
-
), [o] = oe.useForm(), [
|
|
1865
|
-
var
|
|
1881
|
+
), [o] = oe.useForm(), [d, i] = D(!1), [u, f] = D(""), { setChats: x } = fe(), { objInitPayload: g } = q(), { activeTab: C } = be(), y = O(() => {
|
|
1882
|
+
var h;
|
|
1866
1883
|
const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1867
|
-
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((
|
|
1868
|
-
}, [e]),
|
|
1869
|
-
var
|
|
1884
|
+
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : h.trim()) !== "" && v;
|
|
1885
|
+
}, [e]), j = O(() => {
|
|
1886
|
+
var h;
|
|
1870
1887
|
const v = le(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
1871
|
-
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((
|
|
1872
|
-
}, [e]),
|
|
1888
|
+
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((h = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : h.trim()) !== "" && v;
|
|
1889
|
+
}, [e]), p = O(() => {
|
|
1873
1890
|
if (g != null && g.uriBackend)
|
|
1874
1891
|
try {
|
|
1875
1892
|
return new URL(g.uriBackend).origin;
|
|
@@ -1877,19 +1894,19 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1877
1894
|
return "";
|
|
1878
1895
|
}
|
|
1879
1896
|
return "";
|
|
1880
|
-
}, [g == null ? void 0 : g.uriBackend]),
|
|
1897
|
+
}, [g == null ? void 0 : g.uriBackend]), w = (v) => {
|
|
1881
1898
|
var M;
|
|
1882
|
-
const
|
|
1899
|
+
const h = v === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
|
|
1883
1900
|
access_token: b = "",
|
|
1884
|
-
companycode:
|
|
1901
|
+
companycode: E = "",
|
|
1885
1902
|
companyid: m = "",
|
|
1886
|
-
uriBackend:
|
|
1903
|
+
uriBackend: k = "",
|
|
1887
1904
|
uriBackendEnt: S = "",
|
|
1888
|
-
lang:
|
|
1905
|
+
lang: H = ""
|
|
1889
1906
|
} = g || {}, B = u === "another" ? o == null ? void 0 : o.getFieldValue("ADDITIONAL_FEEDBACK") : u;
|
|
1890
1907
|
(M = Oe({
|
|
1891
1908
|
method: "POST",
|
|
1892
|
-
url:
|
|
1909
|
+
url: h,
|
|
1893
1910
|
data: {
|
|
1894
1911
|
message_id: e == null ? void 0 : e.id,
|
|
1895
1912
|
response_type: v === "like" ? "up" : "down",
|
|
@@ -1900,43 +1917,43 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1900
1917
|
headers: {
|
|
1901
1918
|
"Content-Type": "application/json",
|
|
1902
1919
|
Authorization: `Bearer ${b}`,
|
|
1903
|
-
"company-code": `${
|
|
1920
|
+
"company-code": `${E}`,
|
|
1904
1921
|
"company-id": `${m}`,
|
|
1905
|
-
uriBackend: `${
|
|
1922
|
+
uriBackend: `${k}`,
|
|
1906
1923
|
uriBackendEnt: `${S}`,
|
|
1907
|
-
"custom-origin": `${
|
|
1908
|
-
"Acc-Name": `${
|
|
1909
|
-
Language: `${
|
|
1924
|
+
"custom-origin": `${p}`,
|
|
1925
|
+
"Acc-Name": `${E.toUpperCase()}`,
|
|
1926
|
+
Language: `${H}`
|
|
1910
1927
|
}
|
|
1911
1928
|
})) == null || M.then((L) => {
|
|
1912
|
-
var
|
|
1913
|
-
(L == null ? void 0 : L.status) === 200 && (
|
|
1929
|
+
var I, $, F;
|
|
1930
|
+
(L == null ? void 0 : L.status) === 200 && (d && i(!1), (I = ie) == null || I.destroy(), ($ = ie) == null || $.config({
|
|
1914
1931
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
1915
1932
|
top: 28,
|
|
1916
1933
|
placement: "top",
|
|
1917
1934
|
duration: 3
|
|
1918
|
-
}), (
|
|
1919
|
-
message:
|
|
1935
|
+
}), (F = ie) == null || F.success({
|
|
1936
|
+
message: a,
|
|
1920
1937
|
className: "w-notification-content"
|
|
1921
1938
|
}), x((G) => {
|
|
1922
|
-
var
|
|
1923
|
-
return (
|
|
1939
|
+
var J;
|
|
1940
|
+
return (J = G == null ? void 0 : G.map((Y) => {
|
|
1924
1941
|
var ee;
|
|
1925
|
-
if (le(
|
|
1926
|
-
const de = (ee =
|
|
1942
|
+
if (le(Y, "chats")) {
|
|
1943
|
+
const de = (ee = Y == null ? void 0 : Y.chats) == null ? void 0 : ee.map((ce) => (ce == null ? void 0 : ce.indexChat) === (e == null ? void 0 : e.indexChat) ? {
|
|
1927
1944
|
...ce,
|
|
1928
1945
|
feedback: v
|
|
1929
1946
|
} : ce);
|
|
1930
1947
|
return {
|
|
1931
|
-
...
|
|
1948
|
+
...Y,
|
|
1932
1949
|
chats: de
|
|
1933
1950
|
};
|
|
1934
1951
|
}
|
|
1935
|
-
return (e == null ? void 0 : e.message_id) === (
|
|
1936
|
-
...
|
|
1952
|
+
return (e == null ? void 0 : e.message_id) === (Y == null ? void 0 : Y.message_id) ? {
|
|
1953
|
+
...Y,
|
|
1937
1954
|
feedback: v
|
|
1938
|
-
} :
|
|
1939
|
-
})) == null ? void 0 :
|
|
1955
|
+
} : Y;
|
|
1956
|
+
})) == null ? void 0 : J.flat();
|
|
1940
1957
|
}));
|
|
1941
1958
|
});
|
|
1942
1959
|
};
|
|
@@ -1949,30 +1966,30 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1949
1966
|
{
|
|
1950
1967
|
icon: /* @__PURE__ */ n.jsx(P, { type: "like", chatProps: e }),
|
|
1951
1968
|
onClick: () => {
|
|
1952
|
-
(e == null ? void 0 : e.feedback) !== "like" &&
|
|
1969
|
+
(e == null ? void 0 : e.feedback) !== "like" && w("like");
|
|
1953
1970
|
}
|
|
1954
1971
|
}
|
|
1955
1972
|
),
|
|
1956
|
-
|
|
1973
|
+
j && /* @__PURE__ */ n.jsx(
|
|
1957
1974
|
z,
|
|
1958
1975
|
{
|
|
1959
1976
|
icon: /* @__PURE__ */ n.jsx(P, { type: "dislike", chatProps: e }),
|
|
1960
1977
|
onClick: () => {
|
|
1961
|
-
(e == null ? void 0 : e.feedback) !== "dislike" &&
|
|
1978
|
+
(e == null ? void 0 : e.feedback) !== "dislike" && i(!0);
|
|
1962
1979
|
}
|
|
1963
1980
|
}
|
|
1964
1981
|
),
|
|
1965
1982
|
/* @__PURE__ */ n.jsxs(
|
|
1966
|
-
|
|
1983
|
+
ut,
|
|
1967
1984
|
{
|
|
1968
|
-
open:
|
|
1985
|
+
open: d,
|
|
1969
1986
|
isFeedback: !0,
|
|
1970
1987
|
okText: s,
|
|
1971
1988
|
onCancel: () => {
|
|
1972
|
-
|
|
1989
|
+
i(!1);
|
|
1973
1990
|
},
|
|
1974
1991
|
onOk: () => {
|
|
1975
|
-
|
|
1992
|
+
w("dislike");
|
|
1976
1993
|
},
|
|
1977
1994
|
children: [
|
|
1978
1995
|
/* @__PURE__ */ n.jsx("p", { style: { textAlign: "center", fontWeight: 600, fontSize: 14 }, children: t }),
|
|
@@ -1981,33 +1998,33 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
1981
1998
|
"!"
|
|
1982
1999
|
] }),
|
|
1983
2000
|
/* @__PURE__ */ n.jsx(
|
|
1984
|
-
|
|
2001
|
+
qt.Group,
|
|
1985
2002
|
{
|
|
1986
2003
|
className: "w-list-feedback-suggestion",
|
|
1987
|
-
options:
|
|
2004
|
+
options: bs,
|
|
1988
2005
|
optionType: "button",
|
|
1989
2006
|
buttonStyle: "solid",
|
|
1990
2007
|
onChange: (v) => {
|
|
1991
|
-
var
|
|
1992
|
-
f((
|
|
2008
|
+
var h;
|
|
2009
|
+
f((h = v == null ? void 0 : v.target) == null ? void 0 : h.value);
|
|
1993
2010
|
}
|
|
1994
2011
|
}
|
|
1995
2012
|
),
|
|
1996
2013
|
u === "another" && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
1997
|
-
/* @__PURE__ */ n.jsx(
|
|
2014
|
+
/* @__PURE__ */ n.jsx(Jt, { children: c }),
|
|
1998
2015
|
/* @__PURE__ */ n.jsx(oe, { form: o, layout: "vertical", children: /* @__PURE__ */ n.jsx(oe.Item, { name: "ADDITIONAL_FEEDBACK", children: /* @__PURE__ */ n.jsx(Be.TextArea, { rows: 3 }) }) })
|
|
1999
2016
|
] })
|
|
2000
2017
|
]
|
|
2001
2018
|
}
|
|
2002
2019
|
)
|
|
2003
2020
|
] });
|
|
2004
|
-
},
|
|
2021
|
+
}, or = R(rr), cr = ({
|
|
2005
2022
|
showFeedback: e = !0,
|
|
2006
2023
|
showRegenerate: t = !0,
|
|
2007
2024
|
position: r = "left",
|
|
2008
2025
|
...s
|
|
2009
2026
|
}) => {
|
|
2010
|
-
const
|
|
2027
|
+
const a = ks(), { chats: c, onSendMsg: o, setChats: d, loadingRegenerate: i, currRegenerateId: u } = fe(), f = O(() => s == null ? void 0 : s.sender, [s]), x = O(() => c == null ? void 0 : c.filter((p) => (p == null ? void 0 : p.sender) === "client"), [c]), g = O(() => t && f === "response" && (x == null ? void 0 : x.length) > 0 && (s == null ? void 0 : s.indexChat) === (c == null ? void 0 : c.length) - 1, [f, x, c, s == null ? void 0 : s.indexChat, t]), C = O(() => {
|
|
2011
2028
|
switch (r) {
|
|
2012
2029
|
case "left":
|
|
2013
2030
|
return "flex-start";
|
|
@@ -2016,20 +2033,20 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
2016
2033
|
case "right":
|
|
2017
2034
|
return "flex-end";
|
|
2018
2035
|
}
|
|
2019
|
-
}, [r]), y = O(() => e && (s == null ? void 0 : s.text_FeedbackIcons) === "hidup", [s, e]),
|
|
2020
|
-
const
|
|
2021
|
-
|
|
2022
|
-
(v = []) => v == null ? void 0 : v.map((
|
|
2023
|
-
...
|
|
2024
|
-
generated_id: (
|
|
2036
|
+
}, [r]), y = O(() => e && (s == null ? void 0 : s.text_FeedbackIcons) === "hidup", [s, e]), j = () => {
|
|
2037
|
+
const p = x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1], w = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
|
|
2038
|
+
d(
|
|
2039
|
+
(v = []) => v == null ? void 0 : v.map((h, b) => b === (v == null ? void 0 : v.length) - 1 && (h == null ? void 0 : h.sender) === "response" ? {
|
|
2040
|
+
...h,
|
|
2041
|
+
generated_id: (w == null ? void 0 : w.generated_id) ?? a
|
|
2025
2042
|
// adjust with response
|
|
2026
|
-
} :
|
|
2027
|
-
), u.current = (
|
|
2028
|
-
msg:
|
|
2043
|
+
} : h)
|
|
2044
|
+
), u.current = (w == null ? void 0 : w.generated_id) ?? a, o({
|
|
2045
|
+
msg: p == null ? void 0 : p.text,
|
|
2029
2046
|
additionalConfig: {
|
|
2030
|
-
generate_id: (
|
|
2047
|
+
generate_id: (w == null ? void 0 : w.generated_id) ?? a
|
|
2031
2048
|
},
|
|
2032
|
-
isShowLoadingResponse:
|
|
2049
|
+
isShowLoadingResponse: i
|
|
2033
2050
|
}), me();
|
|
2034
2051
|
};
|
|
2035
2052
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs(
|
|
@@ -2044,80 +2061,80 @@ const me = (e = ".w-wrapper-body") => {
|
|
|
2044
2061
|
g && /* @__PURE__ */ n.jsx(
|
|
2045
2062
|
z,
|
|
2046
2063
|
{
|
|
2047
|
-
loading:
|
|
2064
|
+
loading: i,
|
|
2048
2065
|
icon: /* @__PURE__ */ n.jsx(P, { type: "sync" }),
|
|
2049
2066
|
onClick: () => {
|
|
2050
|
-
|
|
2067
|
+
j();
|
|
2051
2068
|
}
|
|
2052
2069
|
}
|
|
2053
2070
|
),
|
|
2054
|
-
y && /* @__PURE__ */ n.jsx(
|
|
2071
|
+
y && /* @__PURE__ */ n.jsx(or, { ...s })
|
|
2055
2072
|
]
|
|
2056
2073
|
}
|
|
2057
2074
|
) });
|
|
2058
|
-
},
|
|
2059
|
-
|
|
2075
|
+
}, mn = R(cr), ir = ({ nameFallback: e = "", ...t }) => /* @__PURE__ */ n.jsx(
|
|
2076
|
+
Qt,
|
|
2060
2077
|
{
|
|
2061
2078
|
...typeof (t == null ? void 0 : t.onError) != "function" && {
|
|
2062
|
-
fallback:
|
|
2079
|
+
fallback: wn(e)
|
|
2063
2080
|
},
|
|
2064
2081
|
placeholder: /* @__PURE__ */ n.jsx(ue.Image, { style: { width: "100%", height: "100%" } }),
|
|
2065
2082
|
loading: "lazy",
|
|
2066
2083
|
...t
|
|
2067
2084
|
}
|
|
2068
|
-
),
|
|
2069
|
-
const r =
|
|
2085
|
+
), kn = R(ir), lr = ({ nameFallback: e = "", ...t }) => {
|
|
2086
|
+
const r = K(0);
|
|
2070
2087
|
return /* @__PURE__ */ n.jsx(
|
|
2071
|
-
|
|
2088
|
+
Xn,
|
|
2072
2089
|
{
|
|
2073
2090
|
...t,
|
|
2074
2091
|
src: /* @__PURE__ */ n.jsx(
|
|
2075
|
-
|
|
2092
|
+
kn,
|
|
2076
2093
|
{
|
|
2077
2094
|
src: t == null ? void 0 : t.src,
|
|
2078
2095
|
nameFallback: e,
|
|
2079
2096
|
...t,
|
|
2080
2097
|
onError: (s) => {
|
|
2081
|
-
r.current += 1, (r == null ? void 0 : r.current) < 3 ? s.target.src =
|
|
2098
|
+
r.current += 1, (r == null ? void 0 : r.current) < 3 ? s.target.src = it(t == null ? void 0 : t.src) : s.target.src = wn(e);
|
|
2082
2099
|
}
|
|
2083
2100
|
}
|
|
2084
2101
|
)
|
|
2085
2102
|
}
|
|
2086
2103
|
);
|
|
2087
|
-
}, Ee = R(
|
|
2088
|
-
Ee.Group =
|
|
2089
|
-
const
|
|
2104
|
+
}, Ee = R(lr);
|
|
2105
|
+
Ee.Group = Xn.Group;
|
|
2106
|
+
const ar = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", children: [
|
|
2090
2107
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2091
2108
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2092
2109
|
/* @__PURE__ */ n.jsx("div", {}),
|
|
2093
2110
|
/* @__PURE__ */ n.jsx("div", {})
|
|
2094
|
-
] }),
|
|
2095
|
-
const { widgetProps: e } =
|
|
2111
|
+
] }), gt = R(ar), dr = () => {
|
|
2112
|
+
const { widgetProps: e } = q();
|
|
2096
2113
|
return /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2097
2114
|
/* @__PURE__ */ n.jsx(Ee, { src: Ze, nameFallback: e == null ? void 0 : e.title }),
|
|
2098
|
-
/* @__PURE__ */ n.jsx(
|
|
2115
|
+
/* @__PURE__ */ n.jsx(gt, {})
|
|
2099
2116
|
] });
|
|
2100
|
-
},
|
|
2117
|
+
}, pn = R(dr), ur = ({ src: e, name: t }) => /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2101
2118
|
/* @__PURE__ */ n.jsx(Ee, { src: e, preview: !1, nameFallback: t }),
|
|
2102
2119
|
/* @__PURE__ */ n.jsx(V.Text, { children: t })
|
|
2103
|
-
] }), Ue = R(
|
|
2120
|
+
] }), Ue = R(ur), fr = ({ ...e }) => {
|
|
2104
2121
|
var f, x;
|
|
2105
|
-
const [t, r] = D(1), { loadingRegenerate: s, currRegenerateId:
|
|
2106
|
-
const g =
|
|
2107
|
-
return (g == null ? void 0 : g.generated_id) ===
|
|
2108
|
-
}, [
|
|
2122
|
+
const [t, r] = D(1), { loadingRegenerate: s, currRegenerateId: a } = fe(), { isExpand: c, widgetProps: o } = q(), d = O(() => e == null ? void 0 : e.sender, [e]), i = O(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), u = O(() => {
|
|
2123
|
+
const g = i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1];
|
|
2124
|
+
return (g == null ? void 0 : g.generated_id) === a.current;
|
|
2125
|
+
}, [i, e, a.current]);
|
|
2109
2126
|
return X(() => {
|
|
2110
|
-
!s && (
|
|
2111
|
-
}, [s]), s && u ? /* @__PURE__ */ n.jsx(
|
|
2112
|
-
|
|
2113
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children:
|
|
2114
|
-
var
|
|
2115
|
-
const y = C === ((
|
|
2127
|
+
!s && (i == null ? void 0 : i.length) > 0 && (r(i == null ? void 0 : i.length), me());
|
|
2128
|
+
}, [s]), s && u ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2129
|
+
d === "response" && /* @__PURE__ */ n.jsx(Ue, { name: o == null ? void 0 : o.title, src: Ze }),
|
|
2130
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: "flex", gap: 8 }, children: i == null ? void 0 : i.map((g, C) => {
|
|
2131
|
+
var p;
|
|
2132
|
+
const y = C === ((p = e == null ? void 0 : e.chats) == null ? void 0 : p.length) - 1, j = t === C + 1;
|
|
2116
2133
|
return /* @__PURE__ */ n.jsxs(
|
|
2117
2134
|
"div",
|
|
2118
2135
|
{
|
|
2119
2136
|
style: {
|
|
2120
|
-
display:
|
|
2137
|
+
display: j ? "flex" : "none",
|
|
2121
2138
|
flexDirection: "column",
|
|
2122
2139
|
gap: 8
|
|
2123
2140
|
},
|
|
@@ -2132,17 +2149,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2132
2149
|
children: /* @__PURE__ */ n.jsxs(
|
|
2133
2150
|
"div",
|
|
2134
2151
|
{
|
|
2135
|
-
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${
|
|
2152
|
+
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${d}`} ${c ? "w-bubble-chat-regenerate-expand" : ""}`,
|
|
2136
2153
|
children: [
|
|
2137
|
-
/* @__PURE__ */ n.jsx(
|
|
2138
|
-
|
|
2154
|
+
/* @__PURE__ */ n.jsx(ft, { children: g == null ? void 0 : g.text }),
|
|
2155
|
+
d === "response" && /* @__PURE__ */ n.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: g == null ? void 0 : g.timestamp })
|
|
2139
2156
|
]
|
|
2140
2157
|
}
|
|
2141
2158
|
)
|
|
2142
2159
|
}
|
|
2143
2160
|
),
|
|
2144
2161
|
/* @__PURE__ */ n.jsx(
|
|
2145
|
-
|
|
2162
|
+
mn,
|
|
2146
2163
|
{
|
|
2147
2164
|
showFeedback: !0,
|
|
2148
2165
|
showRegenerate: !1,
|
|
@@ -2156,7 +2173,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2156
2173
|
}) }),
|
|
2157
2174
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "center" }, children: [
|
|
2158
2175
|
/* @__PURE__ */ n.jsx(
|
|
2159
|
-
|
|
2176
|
+
mn,
|
|
2160
2177
|
{
|
|
2161
2178
|
showRegenerate: !0,
|
|
2162
2179
|
showFeedback: !1,
|
|
@@ -2197,8 +2214,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2197
2214
|
] })
|
|
2198
2215
|
] })
|
|
2199
2216
|
] });
|
|
2200
|
-
},
|
|
2201
|
-
var
|
|
2217
|
+
}, xr = R(fr), gr = ({ date: e, format: t, sender: r, ...s }) => {
|
|
2218
|
+
var a, c;
|
|
2202
2219
|
return /* @__PURE__ */ n.jsx(
|
|
2203
2220
|
V.Text,
|
|
2204
2221
|
{
|
|
@@ -2210,32 +2227,32 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2210
2227
|
...r === "client" && {
|
|
2211
2228
|
textAlign: "right"
|
|
2212
2229
|
},
|
|
2213
|
-
...((
|
|
2230
|
+
...((a = Object.keys((s == null ? void 0 : s.style) || {})) == null ? void 0 : a.length) > 0 && {
|
|
2214
2231
|
...s == null ? void 0 : s.style
|
|
2215
2232
|
}
|
|
2216
2233
|
},
|
|
2217
2234
|
children: t ? (c = ae(e)) == null ? void 0 : c.format(t) : e
|
|
2218
2235
|
}
|
|
2219
2236
|
);
|
|
2220
|
-
}, We = R(
|
|
2221
|
-
var
|
|
2222
|
-
const { loadingRegenerate: r, chats: s } = fe(), { widgetProps:
|
|
2223
|
-
return ((
|
|
2224
|
-
o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name:
|
|
2237
|
+
}, We = R(gr), Cr = ({ showResponseInfo: e = !0, ...t }) => {
|
|
2238
|
+
var d;
|
|
2239
|
+
const { loadingRegenerate: r, chats: s } = fe(), { widgetProps: a } = q(), c = O(() => (s == null ? void 0 : s.length) - 1 === (t == null ? void 0 : t.indexChat), [s]), o = O(() => t == null ? void 0 : t.sender, [t]);
|
|
2240
|
+
return ((d = t == null ? void 0 : t.chats) == null ? void 0 : d.length) > 0 ? /* @__PURE__ */ n.jsx(xr, { ...t }) : r && c ? /* @__PURE__ */ n.jsx(pn, {}) : /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2241
|
+
o === "response" && e && /* @__PURE__ */ n.jsx(Ue, { name: a == null ? void 0 : a.title, src: Ze }),
|
|
2225
2242
|
/* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
|
|
2226
|
-
/* @__PURE__ */ n.jsx(
|
|
2243
|
+
/* @__PURE__ */ n.jsx(ft, { children: t == null ? void 0 : t.text }),
|
|
2227
2244
|
/* @__PURE__ */ n.jsx(We, { date: t == null ? void 0 : t.timestamp, sender: o })
|
|
2228
2245
|
] }),
|
|
2229
|
-
/* @__PURE__ */ n.jsx(
|
|
2246
|
+
/* @__PURE__ */ n.jsx(mn, { ...t })
|
|
2230
2247
|
] });
|
|
2231
|
-
}, $e = R(
|
|
2232
|
-
const e =
|
|
2248
|
+
}, $e = R(Cr), mr = () => {
|
|
2249
|
+
const e = _(
|
|
2233
2250
|
"PleaseUploadFile",
|
|
2234
2251
|
"Please upload specify file that needed to complete your request"
|
|
2235
|
-
), t =
|
|
2252
|
+
), t = _("ClickToUpload", "Click to upload"), r = _(
|
|
2236
2253
|
"ContinueWithoutUpload",
|
|
2237
2254
|
"Continue without upload"
|
|
2238
|
-
), { onSendMsg: s, setFile:
|
|
2255
|
+
), { onSendMsg: s, setFile: a } = fe(), c = () => {
|
|
2239
2256
|
s({
|
|
2240
2257
|
msg: "CANCEL UPLOAD"
|
|
2241
2258
|
});
|
|
@@ -2260,14 +2277,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2260
2277
|
),
|
|
2261
2278
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2262
2279
|
/* @__PURE__ */ n.jsx(
|
|
2263
|
-
|
|
2280
|
+
Pn,
|
|
2264
2281
|
{
|
|
2265
2282
|
className: "btn_upload",
|
|
2266
2283
|
beforeUpload: () => !1,
|
|
2267
2284
|
fileList: [],
|
|
2268
2285
|
accept: ".doc, .jpg, .ods, .png, .txt, .docx, .pdf",
|
|
2269
2286
|
onChange: (o) => {
|
|
2270
|
-
|
|
2287
|
+
a(o == null ? void 0 : o.file);
|
|
2271
2288
|
},
|
|
2272
2289
|
children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "upload" }), children: t })
|
|
2273
2290
|
}
|
|
@@ -2277,49 +2294,49 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2277
2294
|
]
|
|
2278
2295
|
}
|
|
2279
2296
|
);
|
|
2280
|
-
},
|
|
2281
|
-
const [e, t] = D(!1), [r, s] = D(!1), [
|
|
2282
|
-
}, onCheckPYAccess:
|
|
2283
|
-
} } = (g == null ? void 0 : g.onPayslipFn) || {},
|
|
2297
|
+
}, br = R(mr), vr = () => {
|
|
2298
|
+
const [e, t] = D(!1), [r, s] = D(!1), [a, c] = D(!1), [o, d] = D(3), [i, u] = D(!1), [f, x] = D(""), { widgetProps: g } = q(), { onSendMsg: C, chats: y } = fe(), { onSubmitPYPwd: j = () => {
|
|
2299
|
+
}, onCheckPYAccess: p = () => {
|
|
2300
|
+
} } = (g == null ? void 0 : g.onPayslipFn) || {}, w = _(
|
|
2284
2301
|
"ProvidePasswordPayslip",
|
|
2285
2302
|
"Please provide your password account to access the download"
|
|
2286
|
-
), v =
|
|
2303
|
+
), v = _("Cancel", "Cancel"), h = _("Submit", "Submit"), b = _("Password", "Password"), E = _("IsRequired", "Is Required"), m = _(
|
|
2287
2304
|
"PrepareTheFiles",
|
|
2288
2305
|
"Prepare the files"
|
|
2289
|
-
),
|
|
2306
|
+
), k = _(
|
|
2290
2307
|
"AttemptPasswordExceeded",
|
|
2291
2308
|
"Your attempt to enter the password exceeded the limit"
|
|
2292
|
-
), S =
|
|
2309
|
+
), S = _(
|
|
2293
2310
|
"VerifyAccessPayslip",
|
|
2294
2311
|
"Please wait, verifying access to your payslip"
|
|
2295
|
-
),
|
|
2312
|
+
), H = _(
|
|
2296
2313
|
"WrongPwdPayslip",
|
|
2297
2314
|
"The password you entered is incorrect. Please try again or contact support if you need assistance"
|
|
2298
|
-
), B =
|
|
2315
|
+
), B = _(
|
|
2299
2316
|
"SessionExpired",
|
|
2300
2317
|
"Session expired. Please log in again to continue"
|
|
2301
2318
|
), [M] = oe.useForm(), L = () => {
|
|
2302
|
-
var
|
|
2303
|
-
c(!0), u(!0), (
|
|
2319
|
+
var F, G, J;
|
|
2320
|
+
c(!0), u(!0), (J = (G = (F = p()) == null ? void 0 : F.then((Y) => {
|
|
2304
2321
|
var ee, de;
|
|
2305
|
-
const te = (de = (ee =
|
|
2322
|
+
const te = (de = (ee = Y == null ? void 0 : Y.data) == null ? void 0 : ee.DATA) == null ? void 0 : de.RESULT;
|
|
2306
2323
|
te && C({ msg: "Valid" }), t(te), x("");
|
|
2307
|
-
})) == null ? void 0 : G.catch((
|
|
2308
|
-
console.log("err: ",
|
|
2309
|
-
})) == null ||
|
|
2324
|
+
})) == null ? void 0 : G.catch((Y) => {
|
|
2325
|
+
console.log("err: ", Y == null ? void 0 : Y.toString()), x(Y == null ? void 0 : Y.toString());
|
|
2326
|
+
})) == null || J.finally(() => {
|
|
2310
2327
|
s(!1), u(!1);
|
|
2311
2328
|
});
|
|
2312
|
-
},
|
|
2329
|
+
}, I = () => {
|
|
2313
2330
|
C({ msg: "cancel" }), c(!1);
|
|
2314
2331
|
}, $ = () => {
|
|
2315
2332
|
var G;
|
|
2316
|
-
const
|
|
2333
|
+
const F = M == null ? void 0 : M.getFieldValue("pwd");
|
|
2317
2334
|
(G = M == null ? void 0 : M.validateFields()) == null || G.then(() => {
|
|
2318
|
-
var
|
|
2319
|
-
s(!0), (
|
|
2335
|
+
var J, Y;
|
|
2336
|
+
s(!0), (Y = (J = j(F)) == null ? void 0 : J.then(({ data: te }) => {
|
|
2320
2337
|
var ee;
|
|
2321
|
-
(ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(
|
|
2322
|
-
})) == null ||
|
|
2338
|
+
(ee = te == null ? void 0 : te.DATA) != null && ee.ISVALID ? L() : (x(H), d(o - 1), s(!1));
|
|
2339
|
+
})) == null || Y.catch((te) => {
|
|
2323
2340
|
var de, ce, Ne, Ve, Ge;
|
|
2324
2341
|
const ee = te == null ? void 0 : te.response;
|
|
2325
2342
|
if ((ee == null ? void 0 : ee.status) === 401) {
|
|
@@ -2328,7 +2345,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2328
2345
|
), Fe = (Ge = (Ve = (Ne = ee == null ? void 0 : ee.data) == null ? void 0 : Ne.MESSAGE) == null ? void 0 : Ve.toLowerCase()) == null ? void 0 : Ge.includes(
|
|
2329
2346
|
"invalid password"
|
|
2330
2347
|
);
|
|
2331
|
-
Me && x(B), Fe && (x(
|
|
2348
|
+
Me && x(B), Fe && (x(H), d(o - 1), s(!1));
|
|
2332
2349
|
} else
|
|
2333
2350
|
console.log("err onSubmit: ", te == null ? void 0 : te.toString()), x(te == null ? void 0 : te.toString());
|
|
2334
2351
|
s(!1);
|
|
@@ -2337,9 +2354,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2337
2354
|
};
|
|
2338
2355
|
return X(() => {
|
|
2339
2356
|
var G;
|
|
2340
|
-
const
|
|
2341
|
-
((G =
|
|
2342
|
-
}, []),
|
|
2357
|
+
const F = y == null ? void 0 : y[(y == null ? void 0 : y.length) - 1];
|
|
2358
|
+
((G = F == null ? void 0 : F.attachment) == null ? void 0 : G.type) === "show_password_wp" && L();
|
|
2359
|
+
}, []), a ? i ? /* @__PURE__ */ n.jsx(
|
|
2343
2360
|
$e,
|
|
2344
2361
|
{
|
|
2345
2362
|
sender: "response",
|
|
@@ -2350,7 +2367,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2350
2367
|
$e,
|
|
2351
2368
|
{
|
|
2352
2369
|
sender: "response",
|
|
2353
|
-
text:
|
|
2370
|
+
text: k,
|
|
2354
2371
|
showResponseInfo: !1
|
|
2355
2372
|
}
|
|
2356
2373
|
) : f ? /* @__PURE__ */ n.jsx($e, { sender: "response", text: f, showResponseInfo: !1 }) : /* @__PURE__ */ n.jsx(
|
|
@@ -2365,7 +2382,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2365
2382
|
layout: "vertical",
|
|
2366
2383
|
style: { display: "flex", flexDirection: "column", gap: 8 },
|
|
2367
2384
|
children: [
|
|
2368
|
-
/* @__PURE__ */ n.jsx(V.Text, { children: e ? `${m}...` :
|
|
2385
|
+
/* @__PURE__ */ n.jsx(V.Text, { children: e ? `${m}...` : w }),
|
|
2369
2386
|
!e && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2370
2387
|
/* @__PURE__ */ n.jsx(
|
|
2371
2388
|
oe.Item,
|
|
@@ -2374,14 +2391,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2374
2391
|
rules: [
|
|
2375
2392
|
{
|
|
2376
2393
|
required: !0,
|
|
2377
|
-
message: `${b} ${
|
|
2394
|
+
message: `${b} ${E}`
|
|
2378
2395
|
}
|
|
2379
2396
|
],
|
|
2380
2397
|
children: /* @__PURE__ */ n.jsx(Be.Password, {})
|
|
2381
2398
|
}
|
|
2382
2399
|
),
|
|
2383
2400
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
|
|
2384
|
-
/* @__PURE__ */ n.jsx(z, { disabled: r, onClick:
|
|
2401
|
+
/* @__PURE__ */ n.jsx(z, { disabled: r, onClick: I, children: v }),
|
|
2385
2402
|
/* @__PURE__ */ n.jsx(
|
|
2386
2403
|
z,
|
|
2387
2404
|
{
|
|
@@ -2389,7 +2406,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2389
2406
|
onClick: $,
|
|
2390
2407
|
loading: r,
|
|
2391
2408
|
htmlType: "submit",
|
|
2392
|
-
children:
|
|
2409
|
+
children: h
|
|
2393
2410
|
}
|
|
2394
2411
|
)
|
|
2395
2412
|
] })
|
|
@@ -2399,19 +2416,19 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2399
2416
|
)
|
|
2400
2417
|
}
|
|
2401
2418
|
) : null;
|
|
2402
|
-
},
|
|
2403
|
-
var
|
|
2404
|
-
const { objInitPayload: t } =
|
|
2419
|
+
}, hr = R(vr), Er = ({ ...e }) => {
|
|
2420
|
+
var d;
|
|
2421
|
+
const { objInitPayload: t } = q(), [r, s] = D(!1), a = _("Error", "Error"), c = O(() => rt(t == null ? void 0 : t.access_token), [t]), o = () => {
|
|
2405
2422
|
var u, f, x, g;
|
|
2406
2423
|
s(!0);
|
|
2407
|
-
const
|
|
2424
|
+
const i = e == null ? void 0 : e.attachment;
|
|
2408
2425
|
(g = (x = (f = Oe({
|
|
2409
2426
|
method: "POST",
|
|
2410
|
-
url:
|
|
2411
|
-
data:
|
|
2427
|
+
url: i == null ? void 0 : i.endpoint,
|
|
2428
|
+
data: i == null ? void 0 : i.body,
|
|
2412
2429
|
headers: {
|
|
2413
2430
|
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2414
|
-
"Content-Type":
|
|
2431
|
+
"Content-Type": i == null ? void 0 : i.headers["Content-Type"],
|
|
2415
2432
|
coid: t == null ? void 0 : t.companyid,
|
|
2416
2433
|
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2417
2434
|
"Acc-Name": (u = c == null ? void 0 : c.INSTANCE) == null ? void 0 : u.toLowerCase()
|
|
@@ -2419,17 +2436,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2419
2436
|
responseType: "blob"
|
|
2420
2437
|
})) == null ? void 0 : f.then((C) => {
|
|
2421
2438
|
var v;
|
|
2422
|
-
const y = (v =
|
|
2423
|
-
|
|
2439
|
+
const y = (v = i == null ? void 0 : i.body) == null ? void 0 : v.media, j = `${i == null ? void 0 : i.filename}.${y}`, p = new Blob([C == null ? void 0 : C.data]), w = URL == null ? void 0 : URL.createObjectURL(p);
|
|
2440
|
+
Tn({ downloadURL: w, fileName: j }), URL.revokeObjectURL(w);
|
|
2424
2441
|
})) == null ? void 0 : x.catch((C) => {
|
|
2425
|
-
var
|
|
2442
|
+
var j, p, w;
|
|
2426
2443
|
const y = C == null ? void 0 : C.message;
|
|
2427
|
-
(
|
|
2444
|
+
(j = ie) == null || j.destroy(), (p = ie) == null || p.config({
|
|
2428
2445
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
2429
2446
|
top: 28,
|
|
2430
2447
|
placement: "top"
|
|
2431
|
-
}), (
|
|
2432
|
-
message:
|
|
2448
|
+
}), (w = ie) == null || w.error({
|
|
2449
|
+
message: a,
|
|
2433
2450
|
description: y,
|
|
2434
2451
|
className: "w-notification-content",
|
|
2435
2452
|
duration: 3
|
|
@@ -2444,8 +2461,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2444
2461
|
className: "w-bubble-chat w-response",
|
|
2445
2462
|
onClick: o,
|
|
2446
2463
|
style: { cursor: "pointer" },
|
|
2447
|
-
children: /* @__PURE__ */ n.jsxs(
|
|
2448
|
-
/* @__PURE__ */ n.jsx(V.Link, { children: (
|
|
2464
|
+
children: /* @__PURE__ */ n.jsxs(Zt, { spinning: r, children: [
|
|
2465
|
+
/* @__PURE__ */ n.jsx(V.Link, { children: (d = e == null ? void 0 : e.attachment) == null ? void 0 : d.filename }),
|
|
2449
2466
|
/* @__PURE__ */ n.jsx(
|
|
2450
2467
|
z,
|
|
2451
2468
|
{
|
|
@@ -2462,29 +2479,29 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2462
2479
|
] })
|
|
2463
2480
|
}
|
|
2464
2481
|
);
|
|
2465
|
-
},
|
|
2466
|
-
const t =
|
|
2482
|
+
}, Tr = R(Er), yr = ({ ...e }) => {
|
|
2483
|
+
const t = K(), r = _("DownloadChart", "Download Chart"), s = O(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), a = O(() => {
|
|
2467
2484
|
var o;
|
|
2468
|
-
return (o = s == null ? void 0 : s.data) == null ? void 0 : o.map((
|
|
2485
|
+
return (o = s == null ? void 0 : s.data) == null ? void 0 : o.map((d, i) => {
|
|
2469
2486
|
var u, f;
|
|
2470
2487
|
return {
|
|
2471
|
-
label: (u = s == null ? void 0 : s.labels) == null ? void 0 : u[
|
|
2472
|
-
value:
|
|
2473
|
-
color: (f = s == null ? void 0 : s.colors) == null ? void 0 : f[
|
|
2488
|
+
label: (u = s == null ? void 0 : s.labels) == null ? void 0 : u[i],
|
|
2489
|
+
value: d,
|
|
2490
|
+
color: (f = s == null ? void 0 : s.colors) == null ? void 0 : f[i]
|
|
2474
2491
|
};
|
|
2475
2492
|
});
|
|
2476
2493
|
}, [s]), c = () => {
|
|
2477
|
-
var
|
|
2478
|
-
const o = (
|
|
2479
|
-
|
|
2494
|
+
var d;
|
|
2495
|
+
const o = (d = document == null ? void 0 : document.querySelector(".chart_widget canvas")) == null ? void 0 : d.toDataURL();
|
|
2496
|
+
Tn({ fileName: s == null ? void 0 : s.title, downloadURL: o });
|
|
2480
2497
|
};
|
|
2481
2498
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2482
2499
|
/* @__PURE__ */ n.jsx(
|
|
2483
|
-
|
|
2500
|
+
is,
|
|
2484
2501
|
{
|
|
2485
2502
|
className: "chart_widget",
|
|
2486
2503
|
ref: t,
|
|
2487
|
-
data:
|
|
2504
|
+
data: a,
|
|
2488
2505
|
angleField: "value",
|
|
2489
2506
|
colorField: "label",
|
|
2490
2507
|
label: {
|
|
@@ -2512,73 +2529,73 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2512
2529
|
}
|
|
2513
2530
|
) })
|
|
2514
2531
|
] });
|
|
2515
|
-
},
|
|
2516
|
-
var t, r, s,
|
|
2532
|
+
}, jr = R(yr), wr = ({ ...e }) => {
|
|
2533
|
+
var t, r, s, a, c;
|
|
2517
2534
|
switch (!0) {
|
|
2518
2535
|
case ((t = Ae(e)) == null ? void 0 : t.text):
|
|
2519
2536
|
return /* @__PURE__ */ n.jsx($e, { ...e });
|
|
2520
2537
|
case ((r = Ae(e)) == null ? void 0 : r.upload):
|
|
2521
|
-
return /* @__PURE__ */ n.jsx(Cr, { ...e });
|
|
2522
|
-
case ((s = Ae(e)) == null ? void 0 : s.password):
|
|
2523
2538
|
return /* @__PURE__ */ n.jsx(br, { ...e });
|
|
2524
|
-
case ((
|
|
2539
|
+
case ((s = Ae(e)) == null ? void 0 : s.password):
|
|
2525
2540
|
return /* @__PURE__ */ n.jsx(hr, { ...e });
|
|
2526
|
-
case ((
|
|
2541
|
+
case ((a = Ae(e)) == null ? void 0 : a.filedownload):
|
|
2527
2542
|
return /* @__PURE__ */ n.jsx(Tr, { ...e });
|
|
2543
|
+
case ((c = Ae(e)) == null ? void 0 : c.chart):
|
|
2544
|
+
return /* @__PURE__ */ n.jsx(jr, { ...e });
|
|
2528
2545
|
default:
|
|
2529
2546
|
return null;
|
|
2530
2547
|
}
|
|
2531
|
-
},
|
|
2532
|
-
const { isOpenWidget: e, widgetProps: t } =
|
|
2548
|
+
}, kr = R(wr), pr = () => {
|
|
2549
|
+
const { isOpenWidget: e, widgetProps: t } = q(), { chats: r, isWaitResponse: s } = fe(), { activeTab: a } = be();
|
|
2533
2550
|
return X(() => {
|
|
2534
2551
|
me();
|
|
2535
|
-
}, [
|
|
2552
|
+
}, [a]), e ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
2536
2553
|
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: r == null ? void 0 : r.map((c, o) => {
|
|
2537
|
-
var
|
|
2538
|
-
const
|
|
2539
|
-
return /* @__PURE__ */ n.jsxs(
|
|
2540
|
-
(c == null ? void 0 : c.sender) === "response" && !
|
|
2554
|
+
var i;
|
|
2555
|
+
const d = (i = Ae(c)) == null ? void 0 : i.text;
|
|
2556
|
+
return /* @__PURE__ */ n.jsxs(Cn, { children: [
|
|
2557
|
+
(c == null ? void 0 : c.sender) === "response" && !d && /* @__PURE__ */ n.jsx(
|
|
2541
2558
|
Ue,
|
|
2542
2559
|
{
|
|
2543
2560
|
name: t == null ? void 0 : t.title,
|
|
2544
2561
|
src: Ze
|
|
2545
2562
|
}
|
|
2546
2563
|
),
|
|
2547
|
-
/* @__PURE__ */ n.jsx(
|
|
2564
|
+
/* @__PURE__ */ n.jsx(kr, { indexChat: o, ...c })
|
|
2548
2565
|
] }, o);
|
|
2549
2566
|
}) }),
|
|
2550
|
-
s && /* @__PURE__ */ n.jsx(
|
|
2567
|
+
s && /* @__PURE__ */ n.jsx(pn, {})
|
|
2551
2568
|
] }) : null;
|
|
2552
|
-
}, _r = R(
|
|
2553
|
-
var
|
|
2554
|
-
const e =
|
|
2569
|
+
}, _r = R(pr), Ar = () => {
|
|
2570
|
+
var h;
|
|
2571
|
+
const e = _(
|
|
2555
2572
|
"ContinueWithoutUpload",
|
|
2556
2573
|
"Continue without Upload"
|
|
2557
2574
|
), {
|
|
2558
2575
|
onSendMsg: t,
|
|
2559
2576
|
setChats: r,
|
|
2560
2577
|
isWaitResponse: s,
|
|
2561
|
-
loadingRegenerate:
|
|
2578
|
+
loadingRegenerate: a,
|
|
2562
2579
|
file: c,
|
|
2563
2580
|
setFile: o,
|
|
2564
|
-
chats:
|
|
2565
|
-
connected:
|
|
2581
|
+
chats: d,
|
|
2582
|
+
connected: i
|
|
2566
2583
|
} = fe(), { isActiveTabVA: u } = be(), f = O(() => {
|
|
2567
|
-
var
|
|
2568
|
-
const b =
|
|
2569
|
-
return (b == null ? void 0 : b.sender) === "response" && ((
|
|
2570
|
-
}, [
|
|
2571
|
-
var m,
|
|
2572
|
-
const b = (S = (
|
|
2584
|
+
var E;
|
|
2585
|
+
const b = d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1];
|
|
2586
|
+
return (b == null ? void 0 : b.sender) === "response" && ((E = b == null ? void 0 : b.attachment) == null ? void 0 : E.type) === "fileuploader";
|
|
2587
|
+
}, [d]), x = K(), [g, C] = D(!1), [y, j] = D(!1), p = O(() => s || !y, [y, s]), w = () => {
|
|
2588
|
+
var m, k, S, H;
|
|
2589
|
+
const b = (S = (k = (m = x == null ? void 0 : x.current) == null ? void 0 : m.resizableTextArea) == null ? void 0 : k.textArea) == null ? void 0 : S.value;
|
|
2573
2590
|
if (!(b != null && b.trim()) || s) return;
|
|
2574
|
-
|
|
2575
|
-
const
|
|
2591
|
+
j(!1), t({ msg: b }), C(!g);
|
|
2592
|
+
const E = {
|
|
2576
2593
|
text: b,
|
|
2577
2594
|
sender: "client",
|
|
2578
2595
|
type: "text",
|
|
2579
|
-
timestamp: (
|
|
2596
|
+
timestamp: (H = ae()) == null ? void 0 : H.format("hh:mm A")
|
|
2580
2597
|
};
|
|
2581
|
-
r((B) => [...B,
|
|
2598
|
+
r((B) => [...B, E]), me();
|
|
2582
2599
|
}, v = () => {
|
|
2583
2600
|
t({ msg: "SKIP_WAITING_RESPONSE" });
|
|
2584
2601
|
};
|
|
@@ -2587,7 +2604,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2587
2604
|
x != null && x.current && u && ((b = x == null ? void 0 : x.current) == null || b.focus());
|
|
2588
2605
|
}, [u]), f ? /* @__PURE__ */ n.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
|
|
2589
2606
|
/* @__PURE__ */ n.jsx(V.Text, { children: c == null ? void 0 : c.name }),
|
|
2590
|
-
((
|
|
2607
|
+
((h = Object == null ? void 0 : Object.keys(c || {})) == null ? void 0 : h.length) > 0 ? /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2591
2608
|
/* @__PURE__ */ n.jsx(
|
|
2592
2609
|
z,
|
|
2593
2610
|
{
|
|
@@ -2604,7 +2621,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2604
2621
|
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2605
2622
|
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2606
2623
|
shape: "circle",
|
|
2607
|
-
onClick:
|
|
2624
|
+
onClick: w
|
|
2608
2625
|
}
|
|
2609
2626
|
)
|
|
2610
2627
|
] }) : /* @__PURE__ */ n.jsx(Se, { title: e, children: /* @__PURE__ */ n.jsx(
|
|
@@ -2624,22 +2641,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2624
2641
|
Be.TextArea,
|
|
2625
2642
|
{
|
|
2626
2643
|
className: "w-input-widget",
|
|
2627
|
-
disabled: !
|
|
2644
|
+
disabled: !i,
|
|
2628
2645
|
ref: x,
|
|
2629
2646
|
placeholder: "Type a message...",
|
|
2630
2647
|
onKeyDown: (b) => {
|
|
2631
|
-
((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) &&
|
|
2648
|
+
((b == null ? void 0 : b.code) === "Enter" || (b == null ? void 0 : b.key) === "Enter") && !(b != null && b.shiftKey) && w();
|
|
2632
2649
|
},
|
|
2633
2650
|
onChange: ({ target: { value: b } }) => {
|
|
2634
|
-
const
|
|
2651
|
+
const E = /\S/;
|
|
2635
2652
|
Pe({
|
|
2636
2653
|
input_va_value: b
|
|
2637
|
-
}), b && (
|
|
2654
|
+
}), b && (E != null && E.test(b)) ? j(!0) : b != null && b.trim() || j(!1);
|
|
2638
2655
|
}
|
|
2639
2656
|
},
|
|
2640
2657
|
g
|
|
2641
2658
|
),
|
|
2642
|
-
s ||
|
|
2659
|
+
s || a ? /* @__PURE__ */ n.jsx(
|
|
2643
2660
|
z,
|
|
2644
2661
|
{
|
|
2645
2662
|
style: { border: "none" },
|
|
@@ -2651,24 +2668,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2651
2668
|
) : /* @__PURE__ */ n.jsx(
|
|
2652
2669
|
z,
|
|
2653
2670
|
{
|
|
2654
|
-
className: `w-send-btn ${
|
|
2655
|
-
disabled:
|
|
2671
|
+
className: `w-send-btn ${p ? "w-send-btn-disabled" : ""}`,
|
|
2672
|
+
disabled: p,
|
|
2656
2673
|
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2657
2674
|
icon: /* @__PURE__ */ n.jsx(P, { type: "send" }),
|
|
2658
2675
|
shape: "circle",
|
|
2659
|
-
onClick:
|
|
2676
|
+
onClick: w
|
|
2660
2677
|
}
|
|
2661
2678
|
)
|
|
2662
2679
|
] });
|
|
2663
|
-
},
|
|
2664
|
-
const t =
|
|
2680
|
+
}, Sr = R(Ar), Lr = ({ taskStatus: e }) => {
|
|
2681
|
+
const t = _("InProgress", "In Progress"), r = _("New", "New"), s = _("Closed", "Closed"), a = _("Done", "Done"), c = _("HDCancelled", "Cancelled"), o = {
|
|
2665
2682
|
"In Progress": t,
|
|
2666
2683
|
Open: r,
|
|
2667
2684
|
New: r,
|
|
2668
2685
|
Closed: s,
|
|
2669
|
-
Fixed:
|
|
2686
|
+
Fixed: a,
|
|
2670
2687
|
Cancelled: c
|
|
2671
|
-
},
|
|
2688
|
+
}, d = {
|
|
2672
2689
|
"In Progress": "#FFF2D6",
|
|
2673
2690
|
Responded: "#FFF2D6",
|
|
2674
2691
|
Open: "#e9e2f8",
|
|
@@ -2677,8 +2694,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2677
2694
|
Fixed: "#bbfab7",
|
|
2678
2695
|
Done: "#bbfab7",
|
|
2679
2696
|
Cancelled: "#FFF2D6"
|
|
2680
|
-
},
|
|
2681
|
-
return /* @__PURE__ */ n.jsx(
|
|
2697
|
+
}, i = O(() => d[e] || d.Closed, [e]), u = O(() => o[e] || e, [e]);
|
|
2698
|
+
return /* @__PURE__ */ n.jsx(Xt, { color: i, children: /* @__PURE__ */ n.jsx(
|
|
2682
2699
|
V.Text,
|
|
2683
2700
|
{
|
|
2684
2701
|
className: "primary-color-active",
|
|
@@ -2687,7 +2704,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2687
2704
|
children: u
|
|
2688
2705
|
}
|
|
2689
2706
|
) }, e);
|
|
2690
|
-
},
|
|
2707
|
+
}, Ct = R(Lr), Rr = ({ onClick: e, ...t }) => /* @__PURE__ */ n.jsxs(
|
|
2691
2708
|
"div",
|
|
2692
2709
|
{
|
|
2693
2710
|
className: "w-ticket-card-container",
|
|
@@ -2710,8 +2727,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2710
2727
|
),
|
|
2711
2728
|
/* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-content-container", children: [
|
|
2712
2729
|
/* @__PURE__ */ n.jsxs("div", { className: "w-ticket-card-cat-code", children: [
|
|
2713
|
-
/* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) ||
|
|
2714
|
-
/* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CODE) ||
|
|
2730
|
+
/* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CATEGORY) || qn }),
|
|
2731
|
+
/* @__PURE__ */ n.jsx(V.Text, { children: (t == null ? void 0 : t.TASK_CODE) || qn })
|
|
2715
2732
|
] }),
|
|
2716
2733
|
/* @__PURE__ */ n.jsxs(
|
|
2717
2734
|
"div",
|
|
@@ -2721,7 +2738,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2721
2738
|
alignItems: "flex-end"
|
|
2722
2739
|
},
|
|
2723
2740
|
children: [
|
|
2724
|
-
/* @__PURE__ */ n.jsx(
|
|
2741
|
+
/* @__PURE__ */ n.jsx(Ct, { taskStatus: t == null ? void 0 : t.TASK_STATUS }),
|
|
2725
2742
|
/* @__PURE__ */ n.jsx(V.Text, { children: t == null ? void 0 : t.CREATED_DATE })
|
|
2726
2743
|
]
|
|
2727
2744
|
}
|
|
@@ -2729,8 +2746,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2729
2746
|
] })
|
|
2730
2747
|
]
|
|
2731
2748
|
}
|
|
2732
|
-
),
|
|
2733
|
-
const { objInitPayload: e, setObjInitPayload: t, parsedJWT: r } =
|
|
2749
|
+
), Or = R(Rr), mt = () => {
|
|
2750
|
+
const { objInitPayload: e, setObjInitPayload: t, parsedJWT: r } = q(), s = O(() => {
|
|
2734
2751
|
var c;
|
|
2735
2752
|
return {
|
|
2736
2753
|
Authorization: `Bearer ${e == null ? void 0 : e.access_token}`,
|
|
@@ -2742,7 +2759,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2742
2759
|
}, [e]);
|
|
2743
2760
|
return async (c) => {
|
|
2744
2761
|
var u, f, x;
|
|
2745
|
-
const { onSuccess: o, onError:
|
|
2762
|
+
const { onSuccess: o, onError: d, onFinally: i } = c ?? {};
|
|
2746
2763
|
(x = (f = (u = Oe({
|
|
2747
2764
|
url: e == null ? void 0 : e.uriBackend,
|
|
2748
2765
|
params: {
|
|
@@ -2755,8 +2772,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2755
2772
|
headers: s,
|
|
2756
2773
|
method: "POST"
|
|
2757
2774
|
})) == null ? void 0 : u.then((g) => {
|
|
2758
|
-
var
|
|
2759
|
-
const C = (
|
|
2775
|
+
var j;
|
|
2776
|
+
const C = (j = g == null ? void 0 : g.data) == null ? void 0 : j.DATA, y = {
|
|
2760
2777
|
access_token: C == null ? void 0 : C.JWT_TOKEN,
|
|
2761
2778
|
refresh_token: e == null ? void 0 : e.refresh_token,
|
|
2762
2779
|
uagent: e == null ? void 0 : e.uagent,
|
|
@@ -2771,66 +2788,66 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2771
2788
|
};
|
|
2772
2789
|
t(y), typeof o == "function" && o(g);
|
|
2773
2790
|
})) == null ? void 0 : f.catch((g) => {
|
|
2774
|
-
typeof
|
|
2791
|
+
typeof d == "function" && d(g);
|
|
2775
2792
|
})) == null || x.finally(() => {
|
|
2776
|
-
typeof
|
|
2793
|
+
typeof i == "function" && i();
|
|
2777
2794
|
});
|
|
2778
2795
|
};
|
|
2779
2796
|
}, en = () => {
|
|
2780
2797
|
var o;
|
|
2781
|
-
const e =
|
|
2798
|
+
const e = K(new AbortController()), { objInitPayload: t, parsedJWT: r } = q(), s = mt(), a = {
|
|
2782
2799
|
Authorization: `Bearer ${t == null ? void 0 : t.access_token}`,
|
|
2783
2800
|
coid: r == null ? void 0 : r.COID,
|
|
2784
2801
|
"Acc-Name": (o = r == null ? void 0 : r.INSTANCE) == null ? void 0 : o.toLowerCase(),
|
|
2785
2802
|
"Company-Id": t == null ? void 0 : t.companyid,
|
|
2786
2803
|
Language: t == null ? void 0 : t.lang
|
|
2787
2804
|
}, c = async ({
|
|
2788
|
-
url:
|
|
2789
|
-
endpoint:
|
|
2805
|
+
url: d,
|
|
2806
|
+
endpoint: i,
|
|
2790
2807
|
method: u = "POST",
|
|
2791
2808
|
headers: f,
|
|
2792
2809
|
...x
|
|
2793
2810
|
}) => {
|
|
2794
|
-
var
|
|
2811
|
+
var j, p, w, v, h, b;
|
|
2795
2812
|
const g = {
|
|
2796
|
-
url:
|
|
2813
|
+
url: d || `${t == null ? void 0 : t.uriBackendHRMGO}${i}`,
|
|
2797
2814
|
...e.current && {
|
|
2798
|
-
signal: (
|
|
2815
|
+
signal: (j = e == null ? void 0 : e.current) == null ? void 0 : j.signal
|
|
2799
2816
|
},
|
|
2800
2817
|
headers: {
|
|
2801
|
-
...
|
|
2818
|
+
...a,
|
|
2802
2819
|
...f,
|
|
2803
2820
|
"Company-Code": t == null ? void 0 : t.companycode
|
|
2804
2821
|
},
|
|
2805
2822
|
method: u,
|
|
2806
2823
|
...x
|
|
2807
|
-
}, C = (
|
|
2808
|
-
return (v = (
|
|
2809
|
-
(
|
|
2810
|
-
(
|
|
2811
|
-
Promise.reject(
|
|
2824
|
+
}, C = (p = Oe) == null ? void 0 : p.create(g);
|
|
2825
|
+
return (v = (w = C == null ? void 0 : C.interceptors) == null ? void 0 : w.request) == null || v.use(
|
|
2826
|
+
(E) => (t != null && t.access_token && (E.headers.Authorization = `Bearer ${t == null ? void 0 : t.access_token}`), E),
|
|
2827
|
+
(E) => {
|
|
2828
|
+
Promise.reject(E);
|
|
2812
2829
|
}
|
|
2813
|
-
), (b = (
|
|
2814
|
-
(
|
|
2815
|
-
async (
|
|
2816
|
-
var
|
|
2817
|
-
const m =
|
|
2818
|
-
if (((
|
|
2830
|
+
), (b = (h = C == null ? void 0 : C.interceptors) == null ? void 0 : h.response) == null || b.use(
|
|
2831
|
+
(E) => E,
|
|
2832
|
+
async (E) => {
|
|
2833
|
+
var k;
|
|
2834
|
+
const m = E == null ? void 0 : E.config;
|
|
2835
|
+
if (((k = E == null ? void 0 : E.response) == null ? void 0 : k.status) === 401) {
|
|
2819
2836
|
const S = await s();
|
|
2820
2837
|
return m.headers.Authorization = `Bearer ${S}`, Oe(m);
|
|
2821
2838
|
}
|
|
2822
|
-
return Promise == null ? void 0 : Promise.reject(
|
|
2839
|
+
return Promise == null ? void 0 : Promise.reject(E);
|
|
2823
2840
|
}
|
|
2824
2841
|
), await (C == null ? void 0 : C.request(g));
|
|
2825
2842
|
};
|
|
2826
2843
|
return c.abort = () => {
|
|
2827
|
-
var
|
|
2828
|
-
e != null && e.current && ((
|
|
2844
|
+
var d;
|
|
2845
|
+
e != null && e.current && ((d = e == null ? void 0 : e.current) == null || d.abort(), e.current = new AbortController());
|
|
2829
2846
|
}, X(() => () => c.abort(), []), c;
|
|
2830
|
-
},
|
|
2831
|
-
const t = en(), [r, s] = D([]), [
|
|
2832
|
-
var y,
|
|
2833
|
-
u(!0), (
|
|
2847
|
+
}, bt = Te({}), ve = () => ye(bt), Dr = ({ children: e }) => {
|
|
2848
|
+
const t = en(), [r, s] = D([]), [a, c] = D(""), [o, d] = D(!1), [i, u] = D(!0), [f, x] = D(0), g = (C) => {
|
|
2849
|
+
var y, j, p, w;
|
|
2850
|
+
u(!0), (w = (p = t({
|
|
2834
2851
|
endpoint: "/helpdesk/myticket/ticket-list",
|
|
2835
2852
|
method: "POST",
|
|
2836
2853
|
data: {
|
|
@@ -2842,7 +2859,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2842
2859
|
...((y = Object.keys(C || {})) == null ? void 0 : y.length) > 0 && {
|
|
2843
2860
|
...C,
|
|
2844
2861
|
...(C == null ? void 0 : C.CREATED_DATE) && {
|
|
2845
|
-
CREATED_DATE: (
|
|
2862
|
+
CREATED_DATE: (j = ae(C == null ? void 0 : C.CREATED_DATE)) == null ? void 0 : j.format(En)
|
|
2846
2863
|
}
|
|
2847
2864
|
}
|
|
2848
2865
|
},
|
|
@@ -2851,155 +2868,155 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2851
2868
|
ORDER: "DESC"
|
|
2852
2869
|
}
|
|
2853
2870
|
}
|
|
2854
|
-
})) == null ? void 0 :
|
|
2855
|
-
var
|
|
2856
|
-
(
|
|
2857
|
-
})) == null ||
|
|
2871
|
+
})) == null ? void 0 : p.then((v) => {
|
|
2872
|
+
var h, b, E;
|
|
2873
|
+
(h = v == null ? void 0 : v.data) != null && h.DATA && s((E = (b = v == null ? void 0 : v.data) == null ? void 0 : b.DATA) == null ? void 0 : E.LIST);
|
|
2874
|
+
})) == null || w.finally(() => {
|
|
2858
2875
|
u(!1);
|
|
2859
2876
|
});
|
|
2860
2877
|
};
|
|
2861
2878
|
return X(() => {
|
|
2862
2879
|
g();
|
|
2863
2880
|
}, []), /* @__PURE__ */ n.jsx(
|
|
2864
|
-
|
|
2881
|
+
bt.Provider,
|
|
2865
2882
|
{
|
|
2866
2883
|
value: {
|
|
2867
2884
|
listTicket: r,
|
|
2868
|
-
ticketId:
|
|
2885
|
+
ticketId: a,
|
|
2869
2886
|
setTicketId: c,
|
|
2870
2887
|
getListTicket: g,
|
|
2871
2888
|
openFilter: o,
|
|
2872
|
-
setOpenFilter:
|
|
2873
|
-
loadingListTicket:
|
|
2889
|
+
setOpenFilter: d,
|
|
2890
|
+
loadingListTicket: i,
|
|
2874
2891
|
countFilters: f,
|
|
2875
2892
|
setCountFilters: x
|
|
2876
2893
|
},
|
|
2877
2894
|
children: e
|
|
2878
2895
|
}
|
|
2879
2896
|
);
|
|
2880
|
-
},
|
|
2881
|
-
const e =
|
|
2897
|
+
}, Nr = () => {
|
|
2898
|
+
const e = _("SubjectSearch", "Subject Search"), t = _("AdvanceFilter", "Advance Filter"), r = K(null), { getListTicket: s, setOpenFilter: a, loadingListTicket: c, countFilters: o } = ve();
|
|
2882
2899
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
|
|
2883
2900
|
/* @__PURE__ */ n.jsx(
|
|
2884
2901
|
Be,
|
|
2885
2902
|
{
|
|
2886
2903
|
placeholder: e,
|
|
2887
|
-
onChange: ({ target: { value:
|
|
2904
|
+
onChange: ({ target: { value: d } }) => {
|
|
2888
2905
|
clearTimeout(r == null ? void 0 : r.current), r.current = setTimeout(() => {
|
|
2889
2906
|
s({
|
|
2890
|
-
TASK_NAME:
|
|
2907
|
+
TASK_NAME: d
|
|
2891
2908
|
});
|
|
2892
2909
|
}, 250);
|
|
2893
2910
|
},
|
|
2894
2911
|
allowClear: !0
|
|
2895
2912
|
}
|
|
2896
2913
|
),
|
|
2897
|
-
/* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(
|
|
2914
|
+
/* @__PURE__ */ n.jsx(Se, { title: `${t} (${o})`, children: /* @__PURE__ */ n.jsx(Pt, { count: o, children: /* @__PURE__ */ n.jsx(
|
|
2898
2915
|
z,
|
|
2899
2916
|
{
|
|
2900
2917
|
loading: c,
|
|
2901
2918
|
icon: /* @__PURE__ */ n.jsx(P, { type: "filter" }),
|
|
2902
2919
|
onClick: () => {
|
|
2903
|
-
|
|
2920
|
+
a(!0);
|
|
2904
2921
|
}
|
|
2905
2922
|
}
|
|
2906
2923
|
) }) })
|
|
2907
2924
|
] }) });
|
|
2908
|
-
},
|
|
2909
|
-
const t =
|
|
2910
|
-
const
|
|
2911
|
-
|
|
2912
|
-
s.current = !0, r.current = 0,
|
|
2913
|
-
},
|
|
2914
|
-
y(!1), console.error(`${
|
|
2915
|
-
},
|
|
2925
|
+
}, Mr = R(Nr), vt = Te({}), he = () => ye(vt), Fr = ({ children: e }) => {
|
|
2926
|
+
const t = K(null), r = K(0), s = K(!1), a = K(null), [c, o] = D([]), [d, i] = D(0), [u, f] = D(!1), { objInitPayload: x, parsedJWT: g, isFirstRenderHelpdesk: C, setShowReadyWSHD: y } = q(), j = mt(), p = (b) => {
|
|
2927
|
+
const E = new WebSocket(b);
|
|
2928
|
+
E.onopen = () => {
|
|
2929
|
+
s.current = !0, r.current = 0, i(0), y(!0);
|
|
2930
|
+
}, E.onerror = (m) => {
|
|
2931
|
+
y(!1), console.error(`${_e} - WebSocket error:`, m);
|
|
2932
|
+
}, E.onclose = (m) => {
|
|
2916
2933
|
console.warn(
|
|
2917
|
-
`${
|
|
2934
|
+
`${_e} - WebSocket disconnected:`,
|
|
2918
2935
|
m
|
|
2919
|
-
), s.current = !1, y(!1), !(m != null && m.wasClean) && (r == null ? void 0 : r.current) < Ie && (r.current += 1,
|
|
2920
|
-
},
|
|
2921
|
-
},
|
|
2922
|
-
var L,
|
|
2936
|
+
), s.current = !1, y(!1), !(m != null && m.wasClean) && (r == null ? void 0 : r.current) < Ie && (r.current += 1, i((k) => k + 1), clearTimeout(a.current), a.current = setTimeout(w, 2e3));
|
|
2937
|
+
}, E.onmessage = v(E), t.current = E;
|
|
2938
|
+
}, w = async () => {
|
|
2939
|
+
var L, I, $;
|
|
2923
2940
|
if (((L = t.current) == null ? void 0 : L.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
2924
2941
|
const {
|
|
2925
2942
|
access_token: b,
|
|
2926
|
-
companyid:
|
|
2943
|
+
companyid: E = "",
|
|
2927
2944
|
companycode: m = "",
|
|
2928
|
-
lang:
|
|
2945
|
+
lang: k = "",
|
|
2929
2946
|
uriBackendHRMGO: S = ""
|
|
2930
2947
|
} = x ?? {};
|
|
2931
|
-
if (!b || !
|
|
2948
|
+
if (!b || !E || !m) {
|
|
2932
2949
|
console.warn(
|
|
2933
|
-
`${
|
|
2950
|
+
`${_e} - Missing required WebSocket credentials.`
|
|
2934
2951
|
);
|
|
2935
2952
|
return;
|
|
2936
2953
|
}
|
|
2937
|
-
const
|
|
2938
|
-
COMPANY_ID:
|
|
2954
|
+
const H = `Bearer ${b}`, B = (I = `${S}/ws`) == null ? void 0 : I.replace("https://", "wss://"), M = {
|
|
2955
|
+
COMPANY_ID: E.toString(),
|
|
2939
2956
|
COMPANY_CODE: m.toLowerCase(),
|
|
2940
|
-
LANGUAGE:
|
|
2957
|
+
LANGUAGE: k,
|
|
2941
2958
|
ACC_NAME: ($ = g == null ? void 0 : g.INSTANCE) == null ? void 0 : $.toLowerCase(),
|
|
2942
|
-
TOKEN:
|
|
2959
|
+
TOKEN: H
|
|
2943
2960
|
};
|
|
2944
2961
|
try {
|
|
2945
|
-
const
|
|
2962
|
+
const F = await Ss(
|
|
2946
2963
|
M,
|
|
2947
|
-
|
|
2964
|
+
js
|
|
2948
2965
|
);
|
|
2949
|
-
if (!
|
|
2966
|
+
if (!F || s.current || (r == null ? void 0 : r.current) >= Ie) {
|
|
2950
2967
|
console.warn(
|
|
2951
|
-
`${
|
|
2968
|
+
`${_e} - Skipping WebSocket connection attempt.`
|
|
2952
2969
|
);
|
|
2953
2970
|
return;
|
|
2954
2971
|
}
|
|
2955
|
-
t.current && t.current.close(),
|
|
2956
|
-
} catch (
|
|
2972
|
+
t.current && t.current.close(), p(`${B}?t=${F}`);
|
|
2973
|
+
} catch (F) {
|
|
2957
2974
|
console.error(
|
|
2958
|
-
`${
|
|
2959
|
-
|
|
2975
|
+
`${_e} - Failed to encrypt token:`,
|
|
2976
|
+
F
|
|
2960
2977
|
);
|
|
2961
2978
|
}
|
|
2962
|
-
}, v = (b) => (
|
|
2979
|
+
}, v = (b) => (E) => {
|
|
2963
2980
|
var m;
|
|
2964
2981
|
try {
|
|
2965
|
-
if ((
|
|
2982
|
+
if ((E == null ? void 0 : E.data) === "PING")
|
|
2966
2983
|
b.send("PONG");
|
|
2967
2984
|
else {
|
|
2968
|
-
const { DATA:
|
|
2969
|
-
!C.current && S === "USER_ONLINE_NOTIF" && Array.isArray(
|
|
2985
|
+
const { DATA: k, EVENT: S } = JSON.parse(E.data || "{}");
|
|
2986
|
+
!C.current && S === "USER_ONLINE_NOTIF" && Array.isArray(k == null ? void 0 : k.EMPLOYEES) && (o((m = k == null ? void 0 : k.EMPLOYEES) == null ? void 0 : m.filter(Boolean)), C.current = !0), S === "TOKEN_EXPIRED" && j({
|
|
2970
2987
|
onSuccess: () => {
|
|
2971
|
-
|
|
2988
|
+
w();
|
|
2972
2989
|
}
|
|
2973
2990
|
});
|
|
2974
2991
|
}
|
|
2975
2992
|
} catch {
|
|
2976
2993
|
console.error(
|
|
2977
|
-
`${
|
|
2978
|
-
|
|
2994
|
+
`${_e} - Invalid WebSocket message:`,
|
|
2995
|
+
E.data
|
|
2979
2996
|
);
|
|
2980
2997
|
}
|
|
2981
|
-
},
|
|
2982
|
-
var
|
|
2983
|
-
(
|
|
2998
|
+
}, h = ({ event: b, data: E, module: m = "HELPDESK_CHAT" }) => {
|
|
2999
|
+
var k;
|
|
3000
|
+
(k = t == null ? void 0 : t.current) == null || k.send(
|
|
2984
3001
|
JSON.stringify({
|
|
2985
3002
|
EVENT: b,
|
|
2986
|
-
DATA:
|
|
3003
|
+
DATA: E,
|
|
2987
3004
|
MODULE: m
|
|
2988
3005
|
})
|
|
2989
3006
|
);
|
|
2990
3007
|
};
|
|
2991
3008
|
return X(() => {
|
|
2992
|
-
C.current ||
|
|
3009
|
+
C.current || w();
|
|
2993
3010
|
}, []), /* @__PURE__ */ n.jsx(
|
|
2994
|
-
|
|
3011
|
+
vt.Provider,
|
|
2995
3012
|
{
|
|
2996
3013
|
value: {
|
|
2997
3014
|
ws: t == null ? void 0 : t.current,
|
|
2998
|
-
onSendMsg:
|
|
3015
|
+
onSendMsg: h,
|
|
2999
3016
|
userOnline: c,
|
|
3000
|
-
connectWebSocket:
|
|
3001
|
-
retryCountState:
|
|
3002
|
-
setRetryCountState:
|
|
3017
|
+
connectWebSocket: w,
|
|
3018
|
+
retryCountState: d,
|
|
3019
|
+
setRetryCountState: i,
|
|
3003
3020
|
retryCountRef: r,
|
|
3004
3021
|
isGetResponse: u,
|
|
3005
3022
|
setGetResponse: f
|
|
@@ -3007,12 +3024,12 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3007
3024
|
children: e
|
|
3008
3025
|
}
|
|
3009
3026
|
);
|
|
3010
|
-
},
|
|
3011
|
-
var
|
|
3012
|
-
const { widgetProps: e } =
|
|
3027
|
+
}, Hr = () => {
|
|
3028
|
+
var d;
|
|
3029
|
+
const { widgetProps: e } = q(), { listTicket: t, setTicketId: r, loadingListTicket: s } = ve(), { onSendMsg: a, setGetResponse: c } = he(), { xs: o } = Ce.useBreakpoint();
|
|
3013
3030
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3014
|
-
/* @__PURE__ */ n.jsx(
|
|
3015
|
-
s ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (
|
|
3031
|
+
/* @__PURE__ */ n.jsx(Mr, {}),
|
|
3032
|
+
s ? /* @__PURE__ */ n.jsx("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: (d = Array.from({ length: 5 })) == null ? void 0 : d.map((i, u) => /* @__PURE__ */ n.jsx(
|
|
3016
3033
|
ue.Input,
|
|
3017
3034
|
{
|
|
3018
3035
|
style: { height: 80, width: "100%", borderRadius: 8 }
|
|
@@ -3025,18 +3042,18 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3025
3042
|
...(t == null ? void 0 : t.length) === 0 && {
|
|
3026
3043
|
style: { justifyContent: "center" }
|
|
3027
3044
|
},
|
|
3028
|
-
children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((
|
|
3029
|
-
|
|
3045
|
+
children: (t == null ? void 0 : t.length) > 0 ? t == null ? void 0 : t.map((i, u) => /* @__PURE__ */ vn(
|
|
3046
|
+
Or,
|
|
3030
3047
|
{
|
|
3031
|
-
...
|
|
3048
|
+
...i,
|
|
3032
3049
|
key: u,
|
|
3033
3050
|
onClick: () => {
|
|
3034
|
-
c(!0),
|
|
3051
|
+
c(!0), a({
|
|
3035
3052
|
event: "JOIN_ROOM",
|
|
3036
3053
|
data: {
|
|
3037
|
-
TASK_ID:
|
|
3054
|
+
TASK_ID: i == null ? void 0 : i.TASK_ID
|
|
3038
3055
|
}
|
|
3039
|
-
}), r(
|
|
3056
|
+
}), r(i == null ? void 0 : i.TASK_ID);
|
|
3040
3057
|
}
|
|
3041
3058
|
}
|
|
3042
3059
|
)) : /* @__PURE__ */ n.jsx(
|
|
@@ -3048,22 +3065,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3048
3065
|
alignItems: "center",
|
|
3049
3066
|
flex: 1
|
|
3050
3067
|
},
|
|
3051
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3068
|
+
children: /* @__PURE__ */ n.jsx(et, {})
|
|
3052
3069
|
}
|
|
3053
3070
|
)
|
|
3054
3071
|
}
|
|
3055
3072
|
)
|
|
3056
3073
|
] });
|
|
3057
|
-
},
|
|
3074
|
+
}, Ir = R(Hr), $r = ({ children: e, open: t, onClose: r, footer: s, styleContainer: a }) => {
|
|
3058
3075
|
var g;
|
|
3059
|
-
const [c, o] = D(!1),
|
|
3076
|
+
const [c, o] = D(!1), d = K(), i = K(null), u = K(), f = O(() => t ? "w-fade-in-animate" : "w-fade-out-animate", [t]), x = (C) => {
|
|
3060
3077
|
C.code === "Escape" && !C.shiftKey && !C.altKey && !C.ctrlKey && C.key === "Escape" && (C.stopPropagation(), typeof r == "function" && r());
|
|
3061
3078
|
};
|
|
3062
3079
|
return X(() => {
|
|
3063
3080
|
const C = u.current;
|
|
3064
|
-
return C && (clearTimeout(
|
|
3081
|
+
return C && (clearTimeout(i.current), i.current = setTimeout(() => {
|
|
3065
3082
|
C == null || C.focus();
|
|
3066
|
-
}, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(
|
|
3083
|
+
}, 250), C == null || C.addEventListener("keydown", x)), t && o(!1), clearTimeout(d == null ? void 0 : d.current), d.current = setTimeout(() => {
|
|
3067
3084
|
t || o(!0);
|
|
3068
3085
|
}, 300), () => {
|
|
3069
3086
|
C && (C == null || C.removeEventListener("keydown", x));
|
|
@@ -3077,8 +3094,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3077
3094
|
style: {
|
|
3078
3095
|
display: c ? "none" : "block",
|
|
3079
3096
|
height: "100%",
|
|
3080
|
-
...((g = Object == null ? void 0 : Object.keys(
|
|
3081
|
-
...
|
|
3097
|
+
...((g = Object == null ? void 0 : Object.keys(a || {})) == null ? void 0 : g.length) > 0 && {
|
|
3098
|
+
...a
|
|
3082
3099
|
}
|
|
3083
3100
|
},
|
|
3084
3101
|
children: [
|
|
@@ -3087,19 +3104,19 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3087
3104
|
]
|
|
3088
3105
|
}
|
|
3089
3106
|
);
|
|
3090
|
-
},
|
|
3091
|
-
const [t, r] = D([]), [s,
|
|
3107
|
+
}, ht = R($r), Et = Te({}), De = () => ye(Et), Br = ({ children: e }) => {
|
|
3108
|
+
const [t, r] = D([]), [s, a] = D({}), [c, o] = D(!0), [d, i] = D({}), u = K(!1), f = en(), { ticketId: x } = ve(), { ws: g, setGetResponse: C } = he(), { parsedJWT: y } = q(), j = O(() => {
|
|
3092
3109
|
var S;
|
|
3093
|
-
const b = (s == null ? void 0 : s.CREATED_BY) ?? {},
|
|
3094
|
-
...
|
|
3095
|
-
}))) == null ? void 0 : S.filter((
|
|
3110
|
+
const b = (s == null ? void 0 : s.CREATED_BY) ?? {}, E = (s == null ? void 0 : s.ASSIGNEE) ?? {}, m = (s == null ? void 0 : s.OTHER_ASSIGNEE) ?? [], k = (S = [b, E, ...m].map((H) => ({
|
|
3111
|
+
...H
|
|
3112
|
+
}))) == null ? void 0 : S.filter((H) => {
|
|
3096
3113
|
var B;
|
|
3097
|
-
return ((B = Object.keys(
|
|
3114
|
+
return ((B = Object.keys(H || {})) == null ? void 0 : B.length) > 0;
|
|
3098
3115
|
});
|
|
3099
|
-
return
|
|
3100
|
-
}, [s]),
|
|
3101
|
-
var b,
|
|
3102
|
-
o(!0), (
|
|
3116
|
+
return yn({ ArrObj: k, key: "EMP_ID" });
|
|
3117
|
+
}, [s]), p = () => {
|
|
3118
|
+
var b, E;
|
|
3119
|
+
o(!0), (E = (b = f({
|
|
3103
3120
|
endpoint: "/helpdesk/chat/list",
|
|
3104
3121
|
method: "POST",
|
|
3105
3122
|
data: {
|
|
@@ -3108,21 +3125,21 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3108
3125
|
TASK_ID: x
|
|
3109
3126
|
}
|
|
3110
3127
|
})) == null ? void 0 : b.then((m) => {
|
|
3111
|
-
var
|
|
3112
|
-
if (((
|
|
3113
|
-
const
|
|
3128
|
+
var k, S, H, B, M, L;
|
|
3129
|
+
if (((H = (S = (k = m == null ? void 0 : m.data) == null ? void 0 : k.DATA) == null ? void 0 : S.LIST) == null ? void 0 : H.length) > 0) {
|
|
3130
|
+
const I = (L = (M = (B = m == null ? void 0 : m.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST) == null ? void 0 : L.map(($) => ({
|
|
3114
3131
|
...$,
|
|
3115
3132
|
ACTOR: {
|
|
3116
3133
|
...$ == null ? void 0 : $.ACTOR
|
|
3117
3134
|
}
|
|
3118
3135
|
}));
|
|
3119
|
-
r(Qe(
|
|
3136
|
+
r(Qe(I));
|
|
3120
3137
|
} else
|
|
3121
3138
|
r({});
|
|
3122
|
-
})) == null ||
|
|
3139
|
+
})) == null || E.finally(() => {
|
|
3123
3140
|
o(!1);
|
|
3124
3141
|
});
|
|
3125
|
-
},
|
|
3142
|
+
}, w = () => {
|
|
3126
3143
|
var b;
|
|
3127
3144
|
(b = f({
|
|
3128
3145
|
endpoint: "/helpdesk/myticket/get",
|
|
@@ -3130,54 +3147,54 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3130
3147
|
data: {
|
|
3131
3148
|
TASK_ID: x
|
|
3132
3149
|
}
|
|
3133
|
-
})) == null || b.then((
|
|
3134
|
-
var m,
|
|
3135
|
-
if ((m =
|
|
3136
|
-
const
|
|
3137
|
-
|
|
3150
|
+
})) == null || b.then((E) => {
|
|
3151
|
+
var m, k, S;
|
|
3152
|
+
if ((m = E == null ? void 0 : E.data) != null && m.DATA) {
|
|
3153
|
+
const H = (S = (k = E == null ? void 0 : E.data) == null ? void 0 : k.DATA) == null ? void 0 : S.LIST;
|
|
3154
|
+
a(H);
|
|
3138
3155
|
} else
|
|
3139
|
-
|
|
3156
|
+
a({});
|
|
3140
3157
|
});
|
|
3141
3158
|
}, v = (b) => {
|
|
3142
|
-
var
|
|
3143
|
-
const
|
|
3144
|
-
C(!0),
|
|
3159
|
+
var k;
|
|
3160
|
+
const E = (k = b == null ? void 0 : b.ACTOR) == null ? void 0 : k.EMP_ID, m = y == null ? void 0 : y.EMP_ID;
|
|
3161
|
+
C(!0), i((S) => ({
|
|
3145
3162
|
...S,
|
|
3146
|
-
[
|
|
3163
|
+
[E]: !1
|
|
3147
3164
|
})), u.current || r((S) => {
|
|
3148
|
-
const
|
|
3165
|
+
const H = jn(S), B = E == m ? "to" : "from", M = [...H, { ...b, CHAT_ALIGN: B }];
|
|
3149
3166
|
return Qe(M);
|
|
3150
3167
|
}), u.current = !1;
|
|
3151
|
-
},
|
|
3168
|
+
}, h = (b) => {
|
|
3152
3169
|
if ((b == null ? void 0 : b.data) !== "PING") {
|
|
3153
|
-
const
|
|
3154
|
-
(
|
|
3170
|
+
const E = JSON.parse((b == null ? void 0 : b.data) || "{}"), { DATA: m = {}, EVENT: k = "" } = E ?? {};
|
|
3171
|
+
(k === "RECEIVE_MESSAGE" || k === "RECEIVE_ANOTHER_MESSAGE") && v(m);
|
|
3155
3172
|
}
|
|
3156
3173
|
};
|
|
3157
|
-
return X(() => (x && (
|
|
3158
|
-
g && x && (g == null || g.removeEventListener("message",
|
|
3174
|
+
return X(() => (x && (p(), w()), g && x && (g == null || g.addEventListener("message", h)), () => {
|
|
3175
|
+
g && x && (g == null || g.removeEventListener("message", h));
|
|
3159
3176
|
}), [x]), /* @__PURE__ */ n.jsx(
|
|
3160
|
-
|
|
3177
|
+
Et.Provider,
|
|
3161
3178
|
{
|
|
3162
3179
|
value: {
|
|
3163
3180
|
chats: t,
|
|
3164
3181
|
setChats: r,
|
|
3165
3182
|
detailTicket: s,
|
|
3166
|
-
employees:
|
|
3183
|
+
employees: j,
|
|
3167
3184
|
isFromSelf: u,
|
|
3168
3185
|
loadingChats: c,
|
|
3169
|
-
objTypingOtherEmp:
|
|
3170
|
-
setTypingOtherEmp:
|
|
3186
|
+
objTypingOtherEmp: d,
|
|
3187
|
+
setTypingOtherEmp: i
|
|
3171
3188
|
},
|
|
3172
3189
|
children: e
|
|
3173
3190
|
}
|
|
3174
3191
|
);
|
|
3175
|
-
},
|
|
3176
|
-
const { xs: t } = Ce.useBreakpoint(), { employees: r, detailTicket: s, loadingChats:
|
|
3177
|
-
var
|
|
3178
|
-
return (
|
|
3179
|
-
}, [r]),
|
|
3180
|
-
return
|
|
3192
|
+
}, Ur = ({ onClose: e }) => {
|
|
3193
|
+
const { xs: t } = Ce.useBreakpoint(), { employees: r, detailTicket: s, loadingChats: a } = De(), { userOnline: c } = he(), o = O(() => {
|
|
3194
|
+
var i;
|
|
3195
|
+
return (i = r == null ? void 0 : r.map((u) => u == null ? void 0 : u.FULL_NAME)) == null ? void 0 : i.join(", ");
|
|
3196
|
+
}, [r]), d = O(() => t ? "click" : "hover", [t]);
|
|
3197
|
+
return a ? /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-detail-header-container", children: [
|
|
3181
3198
|
/* @__PURE__ */ n.jsx(ue.Avatar, {}),
|
|
3182
3199
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3183
3200
|
/* @__PURE__ */ n.jsx(ue.Input, {}),
|
|
@@ -3200,15 +3217,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3200
3217
|
Ee.Group,
|
|
3201
3218
|
{
|
|
3202
3219
|
maxCount: 2,
|
|
3203
|
-
maxPopoverTrigger:
|
|
3220
|
+
maxPopoverTrigger: d,
|
|
3204
3221
|
maxStyle: {
|
|
3205
3222
|
color: "#f56a00",
|
|
3206
3223
|
backgroundColor: "#fde3cf",
|
|
3207
3224
|
cursor: "pointer"
|
|
3208
3225
|
},
|
|
3209
|
-
children: r == null ? void 0 : r.map((
|
|
3210
|
-
const f = c == null ? void 0 : c.includes(
|
|
3211
|
-
return /* @__PURE__ */ n.jsx(Se, { title:
|
|
3226
|
+
children: r == null ? void 0 : r.map((i, u) => {
|
|
3227
|
+
const f = c == null ? void 0 : c.includes(i == null ? void 0 : i.EMP_ID);
|
|
3228
|
+
return /* @__PURE__ */ n.jsx(Se, { title: i == null ? void 0 : i.FULL_NAME, trigger: d, children: /* @__PURE__ */ vn(
|
|
3212
3229
|
Ee,
|
|
3213
3230
|
{
|
|
3214
3231
|
...f && {
|
|
@@ -3217,9 +3234,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3217
3234
|
borderRadius: "50%"
|
|
3218
3235
|
}
|
|
3219
3236
|
},
|
|
3220
|
-
src:
|
|
3237
|
+
src: i == null ? void 0 : i.PHOTO,
|
|
3221
3238
|
key: u,
|
|
3222
|
-
nameFallback:
|
|
3239
|
+
nameFallback: i == null ? void 0 : i.FULL_NAME
|
|
3223
3240
|
}
|
|
3224
3241
|
) }, u);
|
|
3225
3242
|
})
|
|
@@ -3230,7 +3247,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3230
3247
|
Se,
|
|
3231
3248
|
{
|
|
3232
3249
|
title: `${s == null ? void 0 : s.TASK_CODE} - ${s == null ? void 0 : s.SUBJECT}`,
|
|
3233
|
-
trigger:
|
|
3250
|
+
trigger: d,
|
|
3234
3251
|
children: /* @__PURE__ */ n.jsxs(V.Text, { className: "w-ticket-detail-header-text", children: [
|
|
3235
3252
|
s == null ? void 0 : s.TASK_CODE,
|
|
3236
3253
|
" - ",
|
|
@@ -3238,7 +3255,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3238
3255
|
] })
|
|
3239
3256
|
}
|
|
3240
3257
|
),
|
|
3241
|
-
/* @__PURE__ */ n.jsx(Se, { title: o, trigger:
|
|
3258
|
+
/* @__PURE__ */ n.jsx(Se, { title: o, trigger: d, children: /* @__PURE__ */ n.jsx(
|
|
3242
3259
|
V.Text,
|
|
3243
3260
|
{
|
|
3244
3261
|
type: "secondary",
|
|
@@ -3251,9 +3268,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3251
3268
|
) })
|
|
3252
3269
|
] })
|
|
3253
3270
|
] }),
|
|
3254
|
-
/* @__PURE__ */ n.jsx(
|
|
3271
|
+
/* @__PURE__ */ n.jsx(Ct, { taskStatus: s == null ? void 0 : s.STATUS })
|
|
3255
3272
|
] });
|
|
3256
|
-
},
|
|
3273
|
+
}, Wr = R(Ur), Vr = ({ ...e }) => {
|
|
3257
3274
|
const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3258
3275
|
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${t}`}`, children: [
|
|
3259
3276
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3273,26 +3290,26 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3273
3290
|
}
|
|
3274
3291
|
)
|
|
3275
3292
|
] });
|
|
3276
|
-
},
|
|
3277
|
-
const t =
|
|
3278
|
-
var
|
|
3279
|
-
const
|
|
3280
|
-
if (
|
|
3293
|
+
}, Gr = R(Vr), zr = ({ ...e }) => {
|
|
3294
|
+
const t = _("Download", "Download"), r = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), s = O(() => {
|
|
3295
|
+
var i;
|
|
3296
|
+
const d = e == null ? void 0 : e.ATTACHMENT;
|
|
3297
|
+
if (d)
|
|
3281
3298
|
try {
|
|
3282
|
-
const u = new URL(
|
|
3299
|
+
const u = new URL(d), f = (i = u == null ? void 0 : u.pathname) == null ? void 0 : i.split("/");
|
|
3283
3300
|
return f == null ? void 0 : f[(f == null ? void 0 : f.length) - 1];
|
|
3284
3301
|
} catch {
|
|
3285
|
-
return
|
|
3302
|
+
return d;
|
|
3286
3303
|
}
|
|
3287
3304
|
return "";
|
|
3288
|
-
}, [e]),
|
|
3305
|
+
}, [e]), a = O(() => {
|
|
3289
3306
|
if (s != null && s.includes(".")) {
|
|
3290
|
-
const
|
|
3291
|
-
return `.${
|
|
3307
|
+
const d = s == null ? void 0 : s.split(".");
|
|
3308
|
+
return `.${d == null ? void 0 : d[(d == null ? void 0 : d.length) - 1]}`;
|
|
3292
3309
|
}
|
|
3293
3310
|
return "";
|
|
3294
|
-
}, [e, s]), c = O(() => dn == null ? void 0 : dn.includes(
|
|
3295
|
-
|
|
3311
|
+
}, [e, s]), c = O(() => dn == null ? void 0 : dn.includes(a), [e, a]), o = () => {
|
|
3312
|
+
Tn({
|
|
3296
3313
|
downloadURL: e == null ? void 0 : e.ATTACHMENT,
|
|
3297
3314
|
fileName: s,
|
|
3298
3315
|
isOpenNewTab: !0
|
|
@@ -3304,7 +3321,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3304
3321
|
className: `w-bubble-chat ${`w-${r}`}`,
|
|
3305
3322
|
style: { display: "flex", flexDirection: "column" },
|
|
3306
3323
|
children: [
|
|
3307
|
-
c ? /* @__PURE__ */ n.jsx(
|
|
3324
|
+
c ? /* @__PURE__ */ n.jsx(kn, { src: e == null ? void 0 : e.ATTACHMENT, fallback: ys }) : /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
3308
3325
|
/* @__PURE__ */ n.jsx(P, { type: "file" }),
|
|
3309
3326
|
/* @__PURE__ */ n.jsx(
|
|
3310
3327
|
V.Link,
|
|
@@ -3341,7 +3358,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3341
3358
|
]
|
|
3342
3359
|
}
|
|
3343
3360
|
) });
|
|
3344
|
-
},
|
|
3361
|
+
}, Yr = R(zr), Kr = ({ ...e }) => {
|
|
3345
3362
|
const t = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]);
|
|
3346
3363
|
return /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-info-chat-container", children: [
|
|
3347
3364
|
/* @__PURE__ */ n.jsx(
|
|
@@ -3354,42 +3371,42 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3354
3371
|
),
|
|
3355
3372
|
/* @__PURE__ */ n.jsx(V.Text, { children: e == null ? void 0 : e.MESSAGE })
|
|
3356
3373
|
] });
|
|
3357
|
-
},
|
|
3358
|
-
const { widgetProps: e } =
|
|
3359
|
-
|
|
3374
|
+
}, qr = R(Kr), Tt = () => {
|
|
3375
|
+
const { widgetProps: e } = q(), t = ke.enc.Hex.parse(
|
|
3376
|
+
ke.enc.Utf8.parse(e == null ? void 0 : e.keyEncrypt).toString()
|
|
3360
3377
|
), r = {
|
|
3361
|
-
mode:
|
|
3362
|
-
padding:
|
|
3378
|
+
mode: ke.mode.ECB,
|
|
3379
|
+
padding: ke.pad.Pkcs7
|
|
3363
3380
|
}, s = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|GreatDayHR/i.test(
|
|
3364
3381
|
navigator.userAgent
|
|
3365
|
-
),
|
|
3382
|
+
), a = (o) => {
|
|
3366
3383
|
if (typeof o == "number" && (o = o.toString()), !o) return "";
|
|
3367
3384
|
if (s) return window.encodeURIComponent(o);
|
|
3368
|
-
const
|
|
3369
|
-
|
|
3385
|
+
const d = ke.enc.Utf8.parse(o), i = ke.AES.encrypt(
|
|
3386
|
+
d,
|
|
3370
3387
|
t,
|
|
3371
3388
|
r
|
|
3372
3389
|
).toString();
|
|
3373
|
-
return window.encodeURIComponent(`$${
|
|
3390
|
+
return window.encodeURIComponent(`$${i}`);
|
|
3374
3391
|
};
|
|
3375
3392
|
return {
|
|
3376
3393
|
paramsEncrypt: (o) => {
|
|
3377
|
-
const [
|
|
3394
|
+
const [d, i = null] = o.split("?"), u = d.split("/").map((f) => {
|
|
3378
3395
|
const [, x = null] = f.split(":");
|
|
3379
|
-
return x && (e != null && e.keyEncrypt) ?
|
|
3396
|
+
return x && (e != null && e.keyEncrypt) ? a(x) : f;
|
|
3380
3397
|
}).join("/");
|
|
3381
|
-
return
|
|
3398
|
+
return i ? `${u}?${i}` : u;
|
|
3382
3399
|
},
|
|
3383
|
-
encrypt:
|
|
3400
|
+
encrypt: a
|
|
3384
3401
|
};
|
|
3385
|
-
},
|
|
3386
|
-
const t =
|
|
3402
|
+
}, Jr = ({ ...e }) => {
|
|
3403
|
+
const t = _("ViewFAQ", "View FAQ"), r = _(
|
|
3387
3404
|
"FAQUnavailable",
|
|
3388
3405
|
"FAQ unavailable"
|
|
3389
|
-
), s =
|
|
3406
|
+
), s = _(
|
|
3390
3407
|
"ThisFAQIsUnavailable",
|
|
3391
3408
|
"This FAQ is unavailable"
|
|
3392
|
-
), { paramsEncrypt:
|
|
3409
|
+
), { paramsEncrypt: a } = Tt(), { widgetProps: c } = q(), o = O(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), d = O(() => e == null ? void 0 : e.FAQ_ID, [e]);
|
|
3393
3410
|
return /* @__PURE__ */ n.jsxs("div", { className: `w-bubble-chat ${`w-${o}`}`, children: [
|
|
3394
3411
|
/* @__PURE__ */ n.jsx(
|
|
3395
3412
|
V.Text,
|
|
@@ -3402,17 +3419,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3402
3419
|
marginBottom: 8,
|
|
3403
3420
|
display: "block"
|
|
3404
3421
|
},
|
|
3405
|
-
children:
|
|
3422
|
+
children: d ? e == null ? void 0 : e.MESSAGE : r
|
|
3406
3423
|
}
|
|
3407
3424
|
),
|
|
3408
|
-
|
|
3425
|
+
d ? /* @__PURE__ */ n.jsx(
|
|
3409
3426
|
z,
|
|
3410
3427
|
{
|
|
3411
3428
|
block: !0,
|
|
3412
3429
|
onClick: () => {
|
|
3413
|
-
var
|
|
3414
|
-
typeof (c == null ? void 0 : c.history) < "u" && ((
|
|
3415
|
-
|
|
3430
|
+
var i;
|
|
3431
|
+
typeof (c == null ? void 0 : c.history) < "u" && ((i = c == null ? void 0 : c.history) == null || i.push(
|
|
3432
|
+
a(`/standard/hrm.helpdesk.FAQ-detail/:${d}`)
|
|
3416
3433
|
));
|
|
3417
3434
|
},
|
|
3418
3435
|
children: t
|
|
@@ -3427,53 +3444,53 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3427
3444
|
}
|
|
3428
3445
|
)
|
|
3429
3446
|
] });
|
|
3430
|
-
},
|
|
3447
|
+
}, Qr = R(Jr), Zr = ({ ...e }) => {
|
|
3431
3448
|
switch (e == null ? void 0 : e.CHAT_TYPE) {
|
|
3432
3449
|
case "info":
|
|
3433
|
-
return /* @__PURE__ */ n.jsx(Yr, { ...e });
|
|
3434
|
-
case "faq":
|
|
3435
3450
|
return /* @__PURE__ */ n.jsx(qr, { ...e });
|
|
3451
|
+
case "faq":
|
|
3452
|
+
return /* @__PURE__ */ n.jsx(Qr, { ...e });
|
|
3436
3453
|
case "chat":
|
|
3437
|
-
return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(
|
|
3454
|
+
return e != null && e.ATTACHMENT ? /* @__PURE__ */ n.jsx(Yr, { ...e }) : /* @__PURE__ */ n.jsx(Gr, { ...e });
|
|
3438
3455
|
default:
|
|
3439
3456
|
return null;
|
|
3440
3457
|
}
|
|
3441
|
-
},
|
|
3458
|
+
}, Xr = R(Zr), Pr = () => {
|
|
3442
3459
|
var y;
|
|
3443
|
-
const [e, t] = D([]), r =
|
|
3444
|
-
const
|
|
3460
|
+
const [e, t] = D([]), r = _("And", "and"), s = _("IsTyping", "Is Typing"), a = _("People", "People"), { employees: c, setTypingOtherEmp: o, objTypingOtherEmp: d } = De(), { ws: i, setGetResponse: u } = he(), { parsedJWT: f } = q(), x = O(() => e == null ? void 0 : e.filter((j) => d == null ? void 0 : d[j == null ? void 0 : j.EMP_ID]), [d, e]), g = O(() => {
|
|
3461
|
+
const j = x == null ? void 0 : x.map((p) => p == null ? void 0 : p.FULL_NAME);
|
|
3445
3462
|
if ((x == null ? void 0 : x.length) > 2) {
|
|
3446
|
-
const
|
|
3447
|
-
return `${
|
|
3463
|
+
const p = j == null ? void 0 : j.filter((v, h) => h <= 1), w = j == null ? void 0 : j.filter((v, h) => h > 1);
|
|
3464
|
+
return `${p == null ? void 0 : p.join(", ")}, ${r} ${w == null ? void 0 : w.length} ${a} ${s}`;
|
|
3448
3465
|
}
|
|
3449
|
-
return `${
|
|
3450
|
-
}, [e, x]), C = (
|
|
3451
|
-
if ((
|
|
3452
|
-
const
|
|
3466
|
+
return `${j == null ? void 0 : j.join(", ")} ${s}`;
|
|
3467
|
+
}, [e, x]), C = (j) => {
|
|
3468
|
+
if ((j == null ? void 0 : j.data) !== "PING") {
|
|
3469
|
+
const p = JSON.parse((j == null ? void 0 : j.data) || "{}"), { DATA: w = {}, EVENT: v = "" } = p ?? {}, h = w == null ? void 0 : w.EMPLOYEE_ID, b = f == null ? void 0 : f.EMP_ID;
|
|
3453
3470
|
if (v === "TYPING") {
|
|
3454
|
-
|
|
3455
|
-
...
|
|
3456
|
-
[
|
|
3471
|
+
h === b ? u(!1) : o((k) => ({
|
|
3472
|
+
...k,
|
|
3473
|
+
[h]: w == null ? void 0 : w.IS_TYPING
|
|
3457
3474
|
}));
|
|
3458
|
-
const
|
|
3459
|
-
(
|
|
3475
|
+
const E = c == null ? void 0 : c.find(
|
|
3476
|
+
(k) => (k == null ? void 0 : k.EMP_ID) === (w == null ? void 0 : w.EMPLOYEE_ID)
|
|
3460
3477
|
), m = {
|
|
3461
|
-
...
|
|
3462
|
-
...
|
|
3478
|
+
...w,
|
|
3479
|
+
...E
|
|
3463
3480
|
};
|
|
3464
|
-
t((
|
|
3465
|
-
const S = [...
|
|
3481
|
+
t((k) => {
|
|
3482
|
+
const S = [...k, m], H = yn({
|
|
3466
3483
|
ArrObj: S,
|
|
3467
3484
|
key: "EMPLOYEE_ID"
|
|
3468
3485
|
});
|
|
3469
|
-
return
|
|
3486
|
+
return H == null ? void 0 : H.filter((B) => B == null ? void 0 : B.IS_TYPING);
|
|
3470
3487
|
});
|
|
3471
3488
|
}
|
|
3472
3489
|
}
|
|
3473
3490
|
};
|
|
3474
|
-
return X(() => (
|
|
3475
|
-
|
|
3476
|
-
}), [c]), (y = Object.values(
|
|
3491
|
+
return X(() => (i && (i == null || i.addEventListener("message", C)), () => {
|
|
3492
|
+
i && (i == null || i.removeEventListener("message", C));
|
|
3493
|
+
}), [c]), (y = Object.values(d || {})) != null && y.every((j) => j === !1) ? null : /* @__PURE__ */ n.jsxs(
|
|
3477
3494
|
"div",
|
|
3478
3495
|
{
|
|
3479
3496
|
style: {
|
|
@@ -3492,17 +3509,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3492
3509
|
backgroundColor: "#fde3cf",
|
|
3493
3510
|
cursor: "pointer"
|
|
3494
3511
|
},
|
|
3495
|
-
children: x == null ? void 0 : x.map((
|
|
3512
|
+
children: x == null ? void 0 : x.map((j, p) => /* @__PURE__ */ n.jsx(Se, { title: j == null ? void 0 : j.FULL_NAME, children: /* @__PURE__ */ n.jsx(Ee, { src: j == null ? void 0 : j.PHOTO, nameFallback: j == null ? void 0 : j.FULL_NAME }) }, p))
|
|
3496
3513
|
}
|
|
3497
3514
|
),
|
|
3498
3515
|
/* @__PURE__ */ n.jsx(V.Text, { children: g }),
|
|
3499
|
-
(x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(
|
|
3516
|
+
(x == null ? void 0 : x.length) > 0 ? /* @__PURE__ */ n.jsx(gt, {}) : null
|
|
3500
3517
|
]
|
|
3501
3518
|
}
|
|
3502
3519
|
);
|
|
3503
|
-
},
|
|
3520
|
+
}, eo = R(Pr), no = () => {
|
|
3504
3521
|
var c;
|
|
3505
|
-
const { chats: e } = De(), { widgetProps: t } =
|
|
3522
|
+
const { chats: e } = De(), { widgetProps: t } = q(), { activeTab: r } = be(), s = K(), { xs: a } = Ce.useBreakpoint();
|
|
3506
3523
|
return X(() => {
|
|
3507
3524
|
clearTimeout(s.current), s.current = setTimeout(() => {
|
|
3508
3525
|
me(".w-ticket-detail-content-container");
|
|
@@ -3510,48 +3527,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3510
3527
|
}, [r]), /* @__PURE__ */ n.jsxs(
|
|
3511
3528
|
"div",
|
|
3512
3529
|
{
|
|
3513
|
-
className: `w-ticket-detail-content-container ${
|
|
3530
|
+
className: `w-ticket-detail-content-container ${a ? t != null && t.isSF ? "w-ticket-detail-content-container-sf-mobile" : "w-ticket-detail-content-container-mobile" : ""} `,
|
|
3514
3531
|
children: [
|
|
3515
3532
|
(c = Object.keys(e || {})) == null ? void 0 : c.map((o) => {
|
|
3516
|
-
var
|
|
3517
|
-
const
|
|
3518
|
-
return /* @__PURE__ */ n.jsxs(
|
|
3519
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (
|
|
3520
|
-
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u =
|
|
3521
|
-
var y,
|
|
3533
|
+
var i, u;
|
|
3534
|
+
const d = e == null ? void 0 : e[o];
|
|
3535
|
+
return /* @__PURE__ */ n.jsxs(Cn, { children: [
|
|
3536
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-datekey-chats", children: (i = ae(o)) == null ? void 0 : i.format("ddd, DD MMMM YYYY") }),
|
|
3537
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-bubble-chat-container", children: (u = ct(d)) == null ? void 0 : u.map((f, x) => {
|
|
3538
|
+
var y, j;
|
|
3522
3539
|
const g = (f == null ? void 0 : f.CHAT_ALIGN) === "to" ? "client" : "response", C = f == null ? void 0 : f.CHAT_TYPE;
|
|
3523
|
-
return /* @__PURE__ */ n.jsxs(
|
|
3540
|
+
return /* @__PURE__ */ n.jsxs(Cn, { children: [
|
|
3524
3541
|
g === "response" && C !== "info" && /* @__PURE__ */ n.jsx(
|
|
3525
3542
|
Ue,
|
|
3526
3543
|
{
|
|
3527
3544
|
src: (y = f == null ? void 0 : f.ACTOR) == null ? void 0 : y.PHOTO,
|
|
3528
|
-
name: (
|
|
3545
|
+
name: (j = f == null ? void 0 : f.ACTOR) == null ? void 0 : j.FULL_NAME
|
|
3529
3546
|
}
|
|
3530
3547
|
),
|
|
3531
|
-
/* @__PURE__ */ n.jsx(
|
|
3548
|
+
/* @__PURE__ */ n.jsx(Xr, { ...f })
|
|
3532
3549
|
] }, x);
|
|
3533
3550
|
}) })
|
|
3534
3551
|
] }, o);
|
|
3535
3552
|
}),
|
|
3536
|
-
/* @__PURE__ */ n.jsx(
|
|
3553
|
+
/* @__PURE__ */ n.jsx(eo, {})
|
|
3537
3554
|
]
|
|
3538
3555
|
}
|
|
3539
3556
|
);
|
|
3540
|
-
},
|
|
3557
|
+
}, to = R(no), so = () => {
|
|
3541
3558
|
var c, o;
|
|
3542
|
-
const { chats: e, loadingChats: t } = De(), { widgetProps: r } =
|
|
3543
|
-
var
|
|
3544
|
-
const
|
|
3545
|
-
return s && (r != null && r.isSF ?
|
|
3559
|
+
const { chats: e, loadingChats: t } = De(), { widgetProps: r } = q(), { xs: s } = Ce.useBreakpoint(), a = O(() => {
|
|
3560
|
+
var i;
|
|
3561
|
+
const d = [fn];
|
|
3562
|
+
return s && (r != null && r.isSF ? d == null || d.push(
|
|
3546
3563
|
`${fn}-sf-mobile`
|
|
3547
|
-
) :
|
|
3564
|
+
) : d == null || d.push(`${fn}-mobile`)), (i = d == null ? void 0 : d.filter(Boolean)) == null ? void 0 : i.join(" ");
|
|
3548
3565
|
}, [s, r == null ? void 0 : r.isSF]);
|
|
3549
3566
|
return t ? /* @__PURE__ */ n.jsx(
|
|
3550
3567
|
"div",
|
|
3551
3568
|
{
|
|
3552
|
-
className: `${
|
|
3553
|
-
children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((
|
|
3554
|
-
const u =
|
|
3569
|
+
className: `${a} w-ticket-detail-loading-chats`,
|
|
3570
|
+
children: (c = Array.from({ length: 3 })) == null ? void 0 : c.map((d, i) => {
|
|
3571
|
+
const u = i % 2 === 0;
|
|
3555
3572
|
return /* @__PURE__ */ n.jsxs(
|
|
3556
3573
|
"div",
|
|
3557
3574
|
{
|
|
@@ -3586,24 +3603,24 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3586
3603
|
)
|
|
3587
3604
|
]
|
|
3588
3605
|
},
|
|
3589
|
-
|
|
3606
|
+
i
|
|
3590
3607
|
);
|
|
3591
3608
|
})
|
|
3592
3609
|
}
|
|
3593
3610
|
) : ((o = Object.keys(e || {})) == null ? void 0 : o.length) === 0 ? /* @__PURE__ */ n.jsx(
|
|
3594
3611
|
"div",
|
|
3595
3612
|
{
|
|
3596
|
-
className:
|
|
3613
|
+
className: a,
|
|
3597
3614
|
style: {
|
|
3598
3615
|
display: "flex",
|
|
3599
3616
|
justifyContent: "center",
|
|
3600
3617
|
alignItems: "center"
|
|
3601
3618
|
},
|
|
3602
|
-
children: /* @__PURE__ */ n.jsx(
|
|
3619
|
+
children: /* @__PURE__ */ n.jsx(et, {})
|
|
3603
3620
|
}
|
|
3604
|
-
) : /* @__PURE__ */ n.jsx(
|
|
3605
|
-
},
|
|
3606
|
-
const t =
|
|
3621
|
+
) : /* @__PURE__ */ n.jsx(to, {});
|
|
3622
|
+
}, ro = R(so), oo = ({ ...e }) => {
|
|
3623
|
+
const t = K(0);
|
|
3607
3624
|
return /* @__PURE__ */ n.jsxs(
|
|
3608
3625
|
"div",
|
|
3609
3626
|
{
|
|
@@ -3613,7 +3630,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3613
3630
|
},
|
|
3614
3631
|
children: [
|
|
3615
3632
|
/* @__PURE__ */ n.jsx(
|
|
3616
|
-
|
|
3633
|
+
kn,
|
|
3617
3634
|
{
|
|
3618
3635
|
nameFallback: e == null ? void 0 : e.FULL_NAME,
|
|
3619
3636
|
src: e == null ? void 0 : e.PHOTO,
|
|
@@ -3623,7 +3640,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3623
3640
|
preview: !1,
|
|
3624
3641
|
loading: "lazy",
|
|
3625
3642
|
onError: (r) => {
|
|
3626
|
-
t.current += 1, (t == null ? void 0 : t.current) < 3 ? r.target.src =
|
|
3643
|
+
t.current += 1, (t == null ? void 0 : t.current) < 3 ? r.target.src = it(e == null ? void 0 : e.PHOTO) : r.target.src = wn(e == null ? void 0 : e.FULL_NAME);
|
|
3627
3644
|
}
|
|
3628
3645
|
}
|
|
3629
3646
|
),
|
|
@@ -3636,17 +3653,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3636
3653
|
]
|
|
3637
3654
|
}
|
|
3638
3655
|
);
|
|
3639
|
-
},
|
|
3640
|
-
var
|
|
3641
|
-
const r = en(), [s,
|
|
3656
|
+
}, co = R(oo), io = ({ setLoadingUpload: e, isLoadingUpload: t }) => {
|
|
3657
|
+
var w, v;
|
|
3658
|
+
const r = en(), [s, a] = D({}), c = K(null), o = _(
|
|
3642
3659
|
"ImageMustSmallerThan",
|
|
3643
3660
|
"Image must smaller than"
|
|
3644
|
-
),
|
|
3661
|
+
), d = _(
|
|
3645
3662
|
"MaximumFileSizeExceeded",
|
|
3646
3663
|
"Maximum file size exceeded"
|
|
3647
|
-
), { onSendMsg:
|
|
3648
|
-
var
|
|
3649
|
-
(
|
|
3664
|
+
), { onSendMsg: i } = he(), { employees: u, setChats: f, isFromSelf: x } = De(), { ticketId: g } = ve(), { activeTab: C } = be(), y = () => {
|
|
3665
|
+
var h;
|
|
3666
|
+
(h = r({
|
|
3650
3667
|
endpoint: "/upload/get-upload-config",
|
|
3651
3668
|
data: {
|
|
3652
3669
|
LIMIT: 1,
|
|
@@ -3655,57 +3672,57 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3655
3672
|
UPLOAD_CODE: "helpdesk"
|
|
3656
3673
|
}
|
|
3657
3674
|
}
|
|
3658
|
-
})) == null ||
|
|
3659
|
-
var m,
|
|
3660
|
-
const
|
|
3661
|
-
(
|
|
3675
|
+
})) == null || h.then((b) => {
|
|
3676
|
+
var m, k;
|
|
3677
|
+
const E = (k = (m = b == null ? void 0 : b.data) == null ? void 0 : m.DATA) == null ? void 0 : k.LIST;
|
|
3678
|
+
(E == null ? void 0 : E.length) > 0 && a(E == null ? void 0 : E[0]);
|
|
3662
3679
|
});
|
|
3663
|
-
},
|
|
3664
|
-
var m,
|
|
3665
|
-
const b =
|
|
3666
|
-
return b >
|
|
3680
|
+
}, j = (h) => {
|
|
3681
|
+
var m, k, S;
|
|
3682
|
+
const b = h.size / 1024 / 1024, E = (s == null ? void 0 : s.MAXFILESIZE) / 1024;
|
|
3683
|
+
return b > E && ((m = ie) == null || m.destroy(), (k = ie) == null || k.config({
|
|
3667
3684
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3668
3685
|
top: 28,
|
|
3669
3686
|
placement: "top"
|
|
3670
3687
|
}), (S = ie) == null || S.error({
|
|
3671
|
-
message:
|
|
3672
|
-
description: `${o} ${
|
|
3688
|
+
message: d,
|
|
3689
|
+
description: `${o} ${E == null ? void 0 : E.toFixed(
|
|
3673
3690
|
1
|
|
3674
3691
|
)} MB!`,
|
|
3675
3692
|
className: "w-notification-content",
|
|
3676
3693
|
duration: 3
|
|
3677
3694
|
})), !1;
|
|
3678
|
-
},
|
|
3679
|
-
var
|
|
3695
|
+
}, p = (h) => {
|
|
3696
|
+
var E, m;
|
|
3680
3697
|
e(!0);
|
|
3681
3698
|
const b = new FormData();
|
|
3682
|
-
b.append("UPLOAD_CODE", s == null ? void 0 : s.UPLOAD_CODE), b.append("UPLOAD_TYPE", s == null ? void 0 : s.UPLOAD_TYPE), b.append("FILE",
|
|
3699
|
+
b.append("UPLOAD_CODE", s == null ? void 0 : s.UPLOAD_CODE), b.append("UPLOAD_TYPE", s == null ? void 0 : s.UPLOAD_TYPE), b.append("FILE", h), (m = (E = r({
|
|
3683
3700
|
endpoint: "/upload/temp",
|
|
3684
3701
|
data: b,
|
|
3685
3702
|
headers: {
|
|
3686
3703
|
"Content-Type": "multipart/form-data"
|
|
3687
3704
|
}
|
|
3688
|
-
})) == null ? void 0 :
|
|
3689
|
-
var S,
|
|
3690
|
-
if ((
|
|
3691
|
-
const
|
|
3692
|
-
ATTACHMENT:
|
|
3705
|
+
})) == null ? void 0 : E.then((k) => {
|
|
3706
|
+
var S, H, B, M, L;
|
|
3707
|
+
if ((H = (S = k == null ? void 0 : k.data) == null ? void 0 : S.DATA) != null && H.LIST) {
|
|
3708
|
+
const I = (M = (B = k == null ? void 0 : k.data) == null ? void 0 : B.DATA) == null ? void 0 : M.LIST, $ = {
|
|
3709
|
+
ATTACHMENT: I == null ? void 0 : I.VIEW_PATH,
|
|
3693
3710
|
FAQ_ID: null,
|
|
3694
3711
|
MESSAGE: "",
|
|
3695
|
-
CREATED_DATE: (L = ae()) == null ? void 0 : L.format(`${
|
|
3712
|
+
CREATED_DATE: (L = ae()) == null ? void 0 : L.format(`${En} HH:mm:ss`),
|
|
3696
3713
|
CHAT_ALIGN: "to",
|
|
3697
3714
|
CHAT_TYPE: "chat"
|
|
3698
3715
|
};
|
|
3699
|
-
f((
|
|
3700
|
-
const
|
|
3701
|
-
return Qe(
|
|
3702
|
-
}), x.current = !0,
|
|
3716
|
+
f((F) => {
|
|
3717
|
+
const J = [...jn(F), $];
|
|
3718
|
+
return Qe(J);
|
|
3719
|
+
}), x.current = !0, i({
|
|
3703
3720
|
event: "SEND_MESSAGE",
|
|
3704
3721
|
data: {
|
|
3705
|
-
ATTACHMENT:
|
|
3722
|
+
ATTACHMENT: I == null ? void 0 : I.TEMP_PATH,
|
|
3706
3723
|
FAQ_ID: null,
|
|
3707
3724
|
MESSAGE: "",
|
|
3708
|
-
EMPLOYEES: u == null ? void 0 : u.map((
|
|
3725
|
+
EMPLOYEES: u == null ? void 0 : u.map((F) => F == null ? void 0 : F.EMP_ID),
|
|
3709
3726
|
TASK_ID: g
|
|
3710
3727
|
}
|
|
3711
3728
|
}), clearTimeout(c.current), c.current = setTimeout(() => {
|
|
@@ -3719,16 +3736,16 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3719
3736
|
return X(() => {
|
|
3720
3737
|
y();
|
|
3721
3738
|
}, []), X(() => {
|
|
3722
|
-
var
|
|
3723
|
-
(
|
|
3739
|
+
var h;
|
|
3740
|
+
(h = ie) == null || h.destroy();
|
|
3724
3741
|
}, [C]), /* @__PURE__ */ n.jsx(
|
|
3725
|
-
|
|
3742
|
+
Pn,
|
|
3726
3743
|
{
|
|
3727
|
-
beforeUpload:
|
|
3744
|
+
beforeUpload: j,
|
|
3728
3745
|
fileList: [],
|
|
3729
|
-
accept: (v = (
|
|
3730
|
-
onChange: (
|
|
3731
|
-
|
|
3746
|
+
accept: (v = (w = s == null ? void 0 : s.EXT_LIST) == null ? void 0 : w.split(",")) == null ? void 0 : v.map((h) => `.${h}`),
|
|
3747
|
+
onChange: (h) => {
|
|
3748
|
+
p(h == null ? void 0 : h.file);
|
|
3732
3749
|
},
|
|
3733
3750
|
children: /* @__PURE__ */ n.jsx(
|
|
3734
3751
|
z,
|
|
@@ -3741,48 +3758,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3741
3758
|
)
|
|
3742
3759
|
}
|
|
3743
3760
|
);
|
|
3744
|
-
},
|
|
3761
|
+
}, lo = R(io), ao = (e) => {
|
|
3745
3762
|
var s;
|
|
3746
|
-
const t =
|
|
3763
|
+
const t = K(null), r = K(null);
|
|
3747
3764
|
return r != null && r.current && ((s = r.current) == null || s.update(e)), X(() => {
|
|
3748
3765
|
var c;
|
|
3749
|
-
const
|
|
3750
|
-
return r.current = new (
|
|
3766
|
+
const a = (c = window == null ? void 0 : window.customElements) == null ? void 0 : c.get("em-emoji-picker");
|
|
3767
|
+
return r.current = new (a || ls)({ ...e, ref: t }), () => {
|
|
3751
3768
|
r.current = null;
|
|
3752
3769
|
};
|
|
3753
|
-
}, []),
|
|
3754
|
-
},
|
|
3770
|
+
}, []), bn.createElement("div", { ref: t });
|
|
3771
|
+
}, uo = ({ refInput: e }) => {
|
|
3755
3772
|
const { xs: t } = Ce.useBreakpoint(), r = O(() => t ? "click" : "hover", [t]), s = () => {
|
|
3756
3773
|
var g;
|
|
3757
3774
|
const c = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea;
|
|
3758
3775
|
if (!c)
|
|
3759
3776
|
return !1;
|
|
3760
|
-
const { selectionStart: o, selectionEnd:
|
|
3777
|
+
const { selectionStart: o, selectionEnd: d, value: i } = c, u = i == null ? void 0 : i.substring(0, o), f = i == null ? void 0 : i.substring(o, d), x = i == null ? void 0 : i.substring(d);
|
|
3761
3778
|
return {
|
|
3762
3779
|
before: u,
|
|
3763
3780
|
selectedText: f,
|
|
3764
3781
|
after: x,
|
|
3765
3782
|
selectionStart: o,
|
|
3766
|
-
selectionEnd:
|
|
3767
|
-
text:
|
|
3783
|
+
selectionEnd: d,
|
|
3784
|
+
text: i
|
|
3768
3785
|
};
|
|
3769
|
-
},
|
|
3786
|
+
}, a = (c) => {
|
|
3770
3787
|
var x, g;
|
|
3771
3788
|
(x = e == null ? void 0 : e.current) == null || x.focus();
|
|
3772
|
-
const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea,
|
|
3789
|
+
const o = (g = e == null ? void 0 : e.current) == null ? void 0 : g.textarea, d = c == null ? void 0 : c.native;
|
|
3773
3790
|
if (!o) return;
|
|
3774
|
-
const { before:
|
|
3775
|
-
typeof document.execCommand == "function" ? document.execCommand("insertText", !1,
|
|
3791
|
+
const { before: i, after: u } = s(), f = `${i}${d}${u}`;
|
|
3792
|
+
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, d) : o.value = f;
|
|
3776
3793
|
};
|
|
3777
3794
|
return /* @__PURE__ */ n.jsx(
|
|
3778
|
-
|
|
3795
|
+
hn,
|
|
3779
3796
|
{
|
|
3780
3797
|
trigger: r,
|
|
3781
3798
|
content: /* @__PURE__ */ n.jsx(
|
|
3782
|
-
|
|
3799
|
+
ao,
|
|
3783
3800
|
{
|
|
3784
3801
|
onEmojiSelect: (c) => {
|
|
3785
|
-
|
|
3802
|
+
a(c);
|
|
3786
3803
|
},
|
|
3787
3804
|
theme: "auto"
|
|
3788
3805
|
}
|
|
@@ -3790,26 +3807,26 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3790
3807
|
children: /* @__PURE__ */ n.jsx(z, { icon: /* @__PURE__ */ n.jsx(P, { type: "smile" }), style: { border: "none" } })
|
|
3791
3808
|
}
|
|
3792
3809
|
);
|
|
3793
|
-
},
|
|
3794
|
-
const [e, t] = D(0), [r, s] = D(!1),
|
|
3810
|
+
}, fo = R(uo), xo = () => {
|
|
3811
|
+
const [e, t] = D(0), [r, s] = D(!1), a = K(null), c = K(null), o = K(!1), d = K(null), { onSendMsg: i, setGetResponse: u, isGetResponse: f } = he(), { ticketId: x } = ve(), { isActiveTabVA: g } = be(), { employees: C, setChats: y, isFromSelf: j, detailTicket: p } = De(), w = O(() => r || !f, [r, f]), v = O(() => {
|
|
3795
3812
|
var m;
|
|
3796
|
-
return ((m =
|
|
3797
|
-
}, [
|
|
3813
|
+
return ((m = p == null ? void 0 : p.STATUS) == null ? void 0 : m.toString().toLowerCase()) === "closed";
|
|
3814
|
+
}, [p == null ? void 0 : p.STATUS]), h = O(() => C == null ? void 0 : C.map((m) => ({
|
|
3798
3815
|
...m,
|
|
3799
3816
|
label: /* @__PURE__ */ n.jsx(
|
|
3800
|
-
|
|
3817
|
+
hn,
|
|
3801
3818
|
{
|
|
3802
3819
|
placement: "left",
|
|
3803
|
-
content: /* @__PURE__ */ n.jsx(
|
|
3820
|
+
content: /* @__PURE__ */ n.jsx(co, { ...m }),
|
|
3804
3821
|
children: /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(Ue, { src: m == null ? void 0 : m.PHOTO, name: m == null ? void 0 : m.FULL_NAME }) })
|
|
3805
3822
|
}
|
|
3806
3823
|
),
|
|
3807
3824
|
value: m == null ? void 0 : m.FULL_NAME
|
|
3808
3825
|
})), [C]), b = () => {
|
|
3809
|
-
var S,
|
|
3826
|
+
var S, H, B;
|
|
3810
3827
|
u(!1);
|
|
3811
|
-
const m = (
|
|
3812
|
-
|
|
3828
|
+
const m = (H = (S = a == null ? void 0 : a.current) == null ? void 0 : S.textarea) == null ? void 0 : H.value;
|
|
3829
|
+
i({
|
|
3813
3830
|
event: "SEND_MESSAGE",
|
|
3814
3831
|
data: {
|
|
3815
3832
|
ATTACHMENT: "",
|
|
@@ -3819,27 +3836,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3819
3836
|
TASK_ID: x
|
|
3820
3837
|
}
|
|
3821
3838
|
});
|
|
3822
|
-
const
|
|
3839
|
+
const k = {
|
|
3823
3840
|
ATTACHMENT: "",
|
|
3824
3841
|
FAQ_ID: null,
|
|
3825
3842
|
MESSAGE: m,
|
|
3826
|
-
CREATED_DATE: (B = ae()) == null ? void 0 : B.format(`${
|
|
3843
|
+
CREATED_DATE: (B = ae()) == null ? void 0 : B.format(`${En} HH:mm:ss`),
|
|
3827
3844
|
CHAT_ALIGN: "to",
|
|
3828
3845
|
CHAT_TYPE: "chat"
|
|
3829
3846
|
};
|
|
3830
3847
|
y((M) => {
|
|
3831
|
-
const
|
|
3832
|
-
return Qe(
|
|
3833
|
-
}),
|
|
3834
|
-
},
|
|
3835
|
-
window.clearTimeout(c.current), o.current || (o.current = !0,
|
|
3848
|
+
const I = [...jn(M), k];
|
|
3849
|
+
return Qe(I);
|
|
3850
|
+
}), j.current = !0, me(".w-ticket-detail-content-container"), t((M) => M + 1);
|
|
3851
|
+
}, E = () => {
|
|
3852
|
+
window.clearTimeout(c.current), o.current || (o.current = !0, i({
|
|
3836
3853
|
event: "TYPING",
|
|
3837
3854
|
data: {
|
|
3838
3855
|
TASK_ID: x,
|
|
3839
3856
|
IS_TYPING: !0
|
|
3840
3857
|
}
|
|
3841
3858
|
})), c.current = setTimeout(() => {
|
|
3842
|
-
|
|
3859
|
+
i({
|
|
3843
3860
|
event: "TYPING",
|
|
3844
3861
|
data: {
|
|
3845
3862
|
TASK_ID: x,
|
|
@@ -3849,9 +3866,9 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3849
3866
|
}, 250);
|
|
3850
3867
|
};
|
|
3851
3868
|
return X(() => {
|
|
3852
|
-
|
|
3869
|
+
a != null && a.current && !g && x && (clearTimeout(d.current), d.current = setTimeout(() => {
|
|
3853
3870
|
var m;
|
|
3854
|
-
(m =
|
|
3871
|
+
(m = a == null ? void 0 : a.current) == null || m.focus();
|
|
3855
3872
|
}, 500));
|
|
3856
3873
|
}, [g, x]), v ? null : /* @__PURE__ */ n.jsxs(
|
|
3857
3874
|
"div",
|
|
@@ -3861,51 +3878,51 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3861
3878
|
margin: 0
|
|
3862
3879
|
},
|
|
3863
3880
|
children: [
|
|
3864
|
-
/* @__PURE__ */ n.jsx(
|
|
3881
|
+
/* @__PURE__ */ n.jsx(fo, { refInput: a }),
|
|
3865
3882
|
/* @__PURE__ */ n.jsx(
|
|
3866
|
-
|
|
3883
|
+
lo,
|
|
3867
3884
|
{
|
|
3868
3885
|
setLoadingUpload: s,
|
|
3869
3886
|
isLoadingUpload: r
|
|
3870
3887
|
}
|
|
3871
3888
|
),
|
|
3872
3889
|
/* @__PURE__ */ n.jsx(
|
|
3873
|
-
|
|
3890
|
+
Wn,
|
|
3874
3891
|
{
|
|
3875
3892
|
autoSize: {
|
|
3876
3893
|
maxRows: 3
|
|
3877
3894
|
},
|
|
3878
|
-
ref:
|
|
3895
|
+
ref: a,
|
|
3879
3896
|
className: "w-input-helpdesk",
|
|
3880
3897
|
placeholder: "Type a message...",
|
|
3881
3898
|
onChange: () => {
|
|
3882
|
-
|
|
3899
|
+
E();
|
|
3883
3900
|
},
|
|
3884
3901
|
onKeyDown: (m) => {
|
|
3885
3902
|
((m == null ? void 0 : m.code) === "Enter" || (m == null ? void 0 : m.key) === "Enter") && !(m != null && m.shiftKey) && b();
|
|
3886
3903
|
},
|
|
3887
|
-
filterOption: (m,
|
|
3904
|
+
filterOption: (m, k) => {
|
|
3888
3905
|
var B, M, L;
|
|
3889
|
-
const S = (B = m == null ? void 0 : m.toString()) == null ? void 0 : B.toLowerCase(),
|
|
3890
|
-
return
|
|
3906
|
+
const S = (B = m == null ? void 0 : m.toString()) == null ? void 0 : B.toLowerCase(), H = (L = (M = k == null ? void 0 : k.FULL_NAME) == null ? void 0 : M.toString()) == null ? void 0 : L.toLowerCase();
|
|
3907
|
+
return H == null ? void 0 : H.includes(S);
|
|
3891
3908
|
},
|
|
3892
|
-
children:
|
|
3909
|
+
children: h == null ? void 0 : h.map((m, k) => /* @__PURE__ */ n.jsx(Wn.Option, { ...m, children: m == null ? void 0 : m.label }, k))
|
|
3893
3910
|
},
|
|
3894
3911
|
e
|
|
3895
3912
|
),
|
|
3896
3913
|
/* @__PURE__ */ n.jsx(
|
|
3897
3914
|
z,
|
|
3898
3915
|
{
|
|
3899
|
-
loading:
|
|
3900
|
-
disabled:
|
|
3916
|
+
loading: w,
|
|
3917
|
+
disabled: w,
|
|
3901
3918
|
className: "w-send-btn",
|
|
3902
3919
|
style: {
|
|
3903
3920
|
backgroundColor: "var(--primary-color, #395ebc)",
|
|
3904
|
-
...
|
|
3921
|
+
...w && {
|
|
3905
3922
|
color: "white"
|
|
3906
3923
|
}
|
|
3907
3924
|
},
|
|
3908
|
-
icon: /* @__PURE__ */ n.jsx(P, { type:
|
|
3925
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: w ? "loading" : "send" }),
|
|
3909
3926
|
shape: "circle",
|
|
3910
3927
|
onClick: b
|
|
3911
3928
|
}
|
|
@@ -3913,14 +3930,14 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3913
3930
|
]
|
|
3914
3931
|
}
|
|
3915
3932
|
);
|
|
3916
|
-
},
|
|
3933
|
+
}, go = R(xo), Co = ({ title: e, subTitle: t, onClose: r, open: s, styleWrapper: a }) => {
|
|
3917
3934
|
var c;
|
|
3918
3935
|
return s ? /* @__PURE__ */ n.jsx(
|
|
3919
3936
|
"div",
|
|
3920
3937
|
{
|
|
3921
3938
|
className: "w-banner-container",
|
|
3922
|
-
...((c = Object.keys(
|
|
3923
|
-
style:
|
|
3939
|
+
...((c = Object.keys(a || {})) == null ? void 0 : c.length) > 0 && {
|
|
3940
|
+
style: a
|
|
3924
3941
|
},
|
|
3925
3942
|
children: /* @__PURE__ */ n.jsxs("div", { className: "w-banner-content", children: [
|
|
3926
3943
|
e && /* @__PURE__ */ n.jsx(V.Text, { style: { fontSize: 16, fontWeight: 600 }, children: e }),
|
|
@@ -3936,13 +3953,13 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3936
3953
|
] })
|
|
3937
3954
|
}
|
|
3938
3955
|
) : null;
|
|
3939
|
-
},
|
|
3940
|
-
const e =
|
|
3956
|
+
}, yt = R(Co), mo = () => {
|
|
3957
|
+
const e = _(
|
|
3941
3958
|
"ForMoreInformationOfThisTicket",
|
|
3942
3959
|
"For more information of this ticket"
|
|
3943
|
-
), t =
|
|
3960
|
+
), t = _("ClickHere", "Click here"), { ticketId: r } = ve(), { widgetProps: s } = q(), { encrypt: a } = Tt();
|
|
3944
3961
|
return /* @__PURE__ */ n.jsx(
|
|
3945
|
-
|
|
3962
|
+
yt,
|
|
3946
3963
|
{
|
|
3947
3964
|
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
3948
3965
|
/* @__PURE__ */ n.jsx(V.Text, { children: e }),
|
|
@@ -3952,7 +3969,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3952
3969
|
strong: !0,
|
|
3953
3970
|
className: "w-reconnect-manual",
|
|
3954
3971
|
onClick: () => {
|
|
3955
|
-
const c =
|
|
3972
|
+
const c = a(r);
|
|
3956
3973
|
s != null && s.history && (s == null || s.history.push(
|
|
3957
3974
|
`/standard/hrm.helpdesk.my-ticket.ticket-details?id=${c}`
|
|
3958
3975
|
));
|
|
@@ -3967,27 +3984,27 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3967
3984
|
}
|
|
3968
3985
|
}
|
|
3969
3986
|
);
|
|
3970
|
-
},
|
|
3971
|
-
/* @__PURE__ */ n.jsx(
|
|
3972
|
-
/* @__PURE__ */ n.jsx(
|
|
3973
|
-
/* @__PURE__ */ n.jsx(
|
|
3974
|
-
/* @__PURE__ */ n.jsx(
|
|
3975
|
-
] }) }),
|
|
3976
|
-
const e =
|
|
3987
|
+
}, bo = R(mo), vo = ({ onClose: e, visible: t }) => /* @__PURE__ */ n.jsx(ht, { open: t, onClose: e, children: /* @__PURE__ */ n.jsxs(Br, { children: [
|
|
3988
|
+
/* @__PURE__ */ n.jsx(Wr, { onClose: e }),
|
|
3989
|
+
/* @__PURE__ */ n.jsx(bo, {}),
|
|
3990
|
+
/* @__PURE__ */ n.jsx(ro, {}),
|
|
3991
|
+
/* @__PURE__ */ n.jsx(go, {})
|
|
3992
|
+
] }) }), ho = R(vo), Eo = () => {
|
|
3993
|
+
const e = _("AdvanceFilter", "Advance Filter"), t = _("Subject", "Subject"), r = _(
|
|
3977
3994
|
"TicketCategory",
|
|
3978
3995
|
"Ticket Category"
|
|
3979
|
-
), s =
|
|
3980
|
-
const M = `${c}/${o}/${
|
|
3996
|
+
), s = _("TicketStatus", "Ticket Status"), a = _("CreatedDate", "Created Date"), c = _("New", "New"), o = _("Open", "Open"), d = _("Reopen", "Reopen"), i = _("InProgress", "In Progress"), u = _("Responded", "Responded"), f = _("Fixed", "Fixed"), x = _("Done", "Done"), g = _("Closed", "Closed"), C = _("HDCancelled", "Cancelled"), y = _("Clear", "Clear"), j = _("Filter", "Filter"), p = en(), [w] = oe.useForm(), { openFilter: v, setOpenFilter: h, getListTicket: b, setCountFilters: E } = ve(), [m, k] = D([]), S = O(() => {
|
|
3997
|
+
const M = `${c}/${o}/${d}`, L = `${i}/${u}`, I = `${f}/${x}`;
|
|
3981
3998
|
return [
|
|
3982
3999
|
{ value: 3, label: M },
|
|
3983
4000
|
{ value: 1, label: L },
|
|
3984
|
-
{ value: 4, label:
|
|
4001
|
+
{ value: 4, label: I },
|
|
3985
4002
|
{ value: 6, label: g },
|
|
3986
4003
|
{ value: 8, label: C }
|
|
3987
4004
|
];
|
|
3988
|
-
}, []),
|
|
4005
|
+
}, []), H = () => {
|
|
3989
4006
|
var M;
|
|
3990
|
-
(M =
|
|
4007
|
+
(M = p({
|
|
3991
4008
|
endpoint: "/helpdesk/category/list",
|
|
3992
4009
|
data: {
|
|
3993
4010
|
LIMIT: 999999,
|
|
@@ -3996,40 +4013,40 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3996
4013
|
SORT: { FIELD: "ORDER_NO", ORDER: "ASC" }
|
|
3997
4014
|
}
|
|
3998
4015
|
})) == null || M.then((L) => {
|
|
3999
|
-
var
|
|
4000
|
-
if ((
|
|
4001
|
-
const G = (
|
|
4002
|
-
|
|
4003
|
-
G == null ? void 0 : G.map((
|
|
4004
|
-
label:
|
|
4005
|
-
value:
|
|
4016
|
+
var I, $, F;
|
|
4017
|
+
if ((I = L == null ? void 0 : L.data) != null && I.DATA) {
|
|
4018
|
+
const G = (F = ($ = L == null ? void 0 : L.data) == null ? void 0 : $.DATA) == null ? void 0 : F.LIST;
|
|
4019
|
+
k(
|
|
4020
|
+
G == null ? void 0 : G.map((J) => ({
|
|
4021
|
+
label: J == null ? void 0 : J.CATEGORY_NAME,
|
|
4022
|
+
value: J == null ? void 0 : J.CATEGORY_CODE
|
|
4006
4023
|
}))
|
|
4007
4024
|
);
|
|
4008
4025
|
}
|
|
4009
4026
|
});
|
|
4010
4027
|
}, B = () => {
|
|
4011
|
-
var
|
|
4012
|
-
const M =
|
|
4028
|
+
var I, $;
|
|
4029
|
+
const M = w == null ? void 0 : w.getFieldsValue(!0);
|
|
4013
4030
|
b(M);
|
|
4014
|
-
const L = ($ = (
|
|
4015
|
-
|
|
4031
|
+
const L = ($ = (I = Object.values(M || {})) == null ? void 0 : I.flat()) == null ? void 0 : $.filter(Boolean);
|
|
4032
|
+
E(L == null ? void 0 : L.length);
|
|
4016
4033
|
};
|
|
4017
4034
|
return X(() => {
|
|
4018
|
-
|
|
4035
|
+
H();
|
|
4019
4036
|
}, []), /* @__PURE__ */ n.jsxs(
|
|
4020
|
-
|
|
4037
|
+
ht,
|
|
4021
4038
|
{
|
|
4022
4039
|
styleContainer: { height: "calc(100% - 50px)" },
|
|
4023
4040
|
open: v,
|
|
4024
4041
|
onClose: () => {
|
|
4025
|
-
|
|
4042
|
+
h(!1);
|
|
4026
4043
|
},
|
|
4027
4044
|
footer: /* @__PURE__ */ n.jsxs("div", { className: "w-ticket-list-advance-filter-footer", children: [
|
|
4028
4045
|
/* @__PURE__ */ n.jsx(
|
|
4029
4046
|
z,
|
|
4030
4047
|
{
|
|
4031
4048
|
onClick: () => {
|
|
4032
|
-
|
|
4049
|
+
w == null || w.resetFields(), B();
|
|
4033
4050
|
},
|
|
4034
4051
|
children: y
|
|
4035
4052
|
},
|
|
@@ -4040,37 +4057,48 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4040
4057
|
{
|
|
4041
4058
|
type: "primary",
|
|
4042
4059
|
onClick: () => {
|
|
4043
|
-
B(),
|
|
4060
|
+
B(), h(!1);
|
|
4044
4061
|
},
|
|
4045
|
-
children:
|
|
4062
|
+
children: j
|
|
4046
4063
|
},
|
|
4047
4064
|
"filter"
|
|
4048
4065
|
)
|
|
4049
4066
|
] }),
|
|
4050
4067
|
children: [
|
|
4051
|
-
/* @__PURE__ */ n.
|
|
4052
|
-
|
|
4068
|
+
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", gap: 8, justifyContent: "space-between" }, children: [
|
|
4069
|
+
/* @__PURE__ */ n.jsx(V.Text, { strong: !0, style: { fontSize: 16 }, children: e }),
|
|
4070
|
+
/* @__PURE__ */ n.jsx(
|
|
4071
|
+
z,
|
|
4072
|
+
{
|
|
4073
|
+
icon: /* @__PURE__ */ n.jsx(P, { type: "close" }),
|
|
4074
|
+
onClick: () => {
|
|
4075
|
+
h(!1);
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
)
|
|
4079
|
+
] }),
|
|
4080
|
+
/* @__PURE__ */ n.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ n.jsxs(oe, { form: w, layout: "vertical", children: [
|
|
4053
4081
|
/* @__PURE__ */ n.jsx(oe.Item, { label: t, name: "TASK_NAME", children: /* @__PURE__ */ n.jsx(Be, { allowClear: !0 }) }),
|
|
4054
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(
|
|
4055
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(
|
|
4056
|
-
/* @__PURE__ */ n.jsx(oe.Item, { label:
|
|
4082
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: r, name: "CATEGORY_CODE", children: /* @__PURE__ */ n.jsx(Vn, { options: m, mode: "multiple", allowClear: !0 }) }),
|
|
4083
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: s, name: "TASK_STATUS", children: /* @__PURE__ */ n.jsx(Vn, { options: S, mode: "multiple", allowClear: !0 }) }),
|
|
4084
|
+
/* @__PURE__ */ n.jsx(oe.Item, { label: a, name: "CREATED_DATE", children: /* @__PURE__ */ n.jsx(es, { style: { width: "100%" }, allowClear: !0 }) })
|
|
4057
4085
|
] }) })
|
|
4058
4086
|
]
|
|
4059
4087
|
}
|
|
4060
4088
|
);
|
|
4061
|
-
},
|
|
4062
|
-
const e =
|
|
4089
|
+
}, To = R(Eo), yo = () => {
|
|
4090
|
+
const e = _(
|
|
4063
4091
|
"ReconnectManually",
|
|
4064
4092
|
"Reconnect Manually"
|
|
4065
|
-
), t =
|
|
4093
|
+
), t = _(
|
|
4066
4094
|
"HelpdeskWebsocket",
|
|
4067
4095
|
"Helpdesk Websocket"
|
|
4068
|
-
), r =
|
|
4069
|
-
connectWebSocket:
|
|
4096
|
+
), r = _("NotConnected", "Not Connected"), s = _("Connecting", "Connecting"), {
|
|
4097
|
+
connectWebSocket: a,
|
|
4070
4098
|
retryCountState: c,
|
|
4071
4099
|
setRetryCountState: o,
|
|
4072
|
-
retryCountRef:
|
|
4073
|
-
} = he(),
|
|
4100
|
+
retryCountRef: d
|
|
4101
|
+
} = he(), i = O(() => c === Ie ? `${t} ${r}` : `${t} ${s}`, [c]);
|
|
4074
4102
|
return /* @__PURE__ */ n.jsx(
|
|
4075
4103
|
"div",
|
|
4076
4104
|
{
|
|
@@ -4081,20 +4109,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4081
4109
|
height: "100%"
|
|
4082
4110
|
},
|
|
4083
4111
|
children: /* @__PURE__ */ n.jsx(
|
|
4084
|
-
|
|
4112
|
+
ns,
|
|
4085
4113
|
{
|
|
4086
4114
|
...c === Ie ? {
|
|
4087
4115
|
status: "warning"
|
|
4088
4116
|
} : {
|
|
4089
4117
|
icon: null
|
|
4090
4118
|
},
|
|
4091
|
-
title:
|
|
4119
|
+
title: i,
|
|
4092
4120
|
extra: c === Ie ? /* @__PURE__ */ n.jsx(
|
|
4093
4121
|
z,
|
|
4094
4122
|
{
|
|
4095
4123
|
type: "primary",
|
|
4096
4124
|
onClick: () => {
|
|
4097
|
-
|
|
4125
|
+
d.current = 0, o(0), a();
|
|
4098
4126
|
},
|
|
4099
4127
|
children: e
|
|
4100
4128
|
},
|
|
@@ -4112,15 +4140,15 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4112
4140
|
)
|
|
4113
4141
|
}
|
|
4114
4142
|
);
|
|
4115
|
-
},
|
|
4116
|
-
const { setTicketId: e, ticketId: t, openFilter: r } = ve(), { onSendMsg: s, setGetResponse:
|
|
4143
|
+
}, jo = R(yo), wo = () => {
|
|
4144
|
+
const { setTicketId: e, ticketId: t, openFilter: r } = ve(), { onSendMsg: s, setGetResponse: a } = he(), { showReadyWSHD: c } = q();
|
|
4117
4145
|
return c ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4118
4146
|
/* @__PURE__ */ n.jsx(
|
|
4119
|
-
|
|
4147
|
+
ho,
|
|
4120
4148
|
{
|
|
4121
4149
|
visible: t,
|
|
4122
4150
|
onClose: () => {
|
|
4123
|
-
e(""),
|
|
4151
|
+
e(""), a(!1), s({
|
|
4124
4152
|
event: "LEAVE_ROOM",
|
|
4125
4153
|
data: {
|
|
4126
4154
|
TASK_ID: t
|
|
@@ -4129,22 +4157,22 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4129
4157
|
}
|
|
4130
4158
|
}
|
|
4131
4159
|
),
|
|
4132
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: !t && !r ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(
|
|
4133
|
-
/* @__PURE__ */ n.jsx(
|
|
4134
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
4135
|
-
},
|
|
4136
|
-
const e =
|
|
4160
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: !t && !r ? "block" : "none" }, children: /* @__PURE__ */ n.jsx(Ir, {}) }),
|
|
4161
|
+
/* @__PURE__ */ n.jsx(To, {})
|
|
4162
|
+
] }) : /* @__PURE__ */ n.jsx(jo, {});
|
|
4163
|
+
}, ko = R(wo), po = ({ children: e, usePopover: t, ...r }) => t ? /* @__PURE__ */ n.jsx(hn, { ...r, visible: r == null ? void 0 : r.open, children: e }) : e, _o = () => {
|
|
4164
|
+
const e = _("NeedHelp", "Need Help"), t = _(
|
|
4137
4165
|
"WidgetDisconnected",
|
|
4138
4166
|
"Widget Disconnected"
|
|
4139
|
-
), [r, s] = D(!0),
|
|
4167
|
+
), [r, s] = D(!0), a = K(), { widgetProps: c, setOpenWidget: o, isFirstOpenWidget: d, setFirstOpenWidget: i } = q(), { onSendMsg: u, connected: f, isHandshakeWidget: x } = fe(), g = () => {
|
|
4140
4168
|
o(!0), u({ msg: c == null ? void 0 : c.getStartedPayload });
|
|
4141
4169
|
};
|
|
4142
4170
|
return X(() => {
|
|
4143
|
-
s(!f), window.clearTimeout(
|
|
4171
|
+
s(!f), window.clearTimeout(a.current), a.current = setTimeout(() => {
|
|
4144
4172
|
s(!1);
|
|
4145
4173
|
}, 3e3);
|
|
4146
4174
|
}, [f]), /* @__PURE__ */ n.jsx(
|
|
4147
|
-
|
|
4175
|
+
po,
|
|
4148
4176
|
{
|
|
4149
4177
|
usePopover: r && x === "show",
|
|
4150
4178
|
open: r && x === "show",
|
|
@@ -4155,7 +4183,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4155
4183
|
{
|
|
4156
4184
|
className: "w-launcher-container",
|
|
4157
4185
|
onClick: () => {
|
|
4158
|
-
|
|
4186
|
+
d || (i(!0), g()), o(!0);
|
|
4159
4187
|
},
|
|
4160
4188
|
children: [
|
|
4161
4189
|
/* @__PURE__ */ n.jsx(P, { type: "chat-bubble" }),
|
|
@@ -4177,20 +4205,20 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4177
4205
|
)
|
|
4178
4206
|
}
|
|
4179
4207
|
);
|
|
4180
|
-
},
|
|
4181
|
-
const e =
|
|
4208
|
+
}, Ao = R(_o), So = () => {
|
|
4209
|
+
const e = _("NotConnected", "Not Connected"), t = _(
|
|
4182
4210
|
"CannotAutoReconnect",
|
|
4183
4211
|
"Cannot auto reconnect"
|
|
4184
|
-
), r =
|
|
4212
|
+
), r = _(
|
|
4185
4213
|
"ReconnectManually",
|
|
4186
4214
|
"Reconnect Manually"
|
|
4187
|
-
), [s,
|
|
4215
|
+
), [s, a] = D(!1), { connected: c, createSocket: o } = fe(), { widgetProps: d } = q();
|
|
4188
4216
|
return X(() => {
|
|
4189
|
-
|
|
4217
|
+
a(!c);
|
|
4190
4218
|
}, [c]), /* @__PURE__ */ n.jsx(
|
|
4191
|
-
|
|
4219
|
+
yt,
|
|
4192
4220
|
{
|
|
4193
|
-
title: `${
|
|
4221
|
+
title: `${d == null ? void 0 : d.title} ${e}`,
|
|
4194
4222
|
subTitle: /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4195
4223
|
/* @__PURE__ */ n.jsxs(V.Text, { children: [
|
|
4196
4224
|
t,
|
|
@@ -4208,51 +4236,51 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4208
4236
|
}
|
|
4209
4237
|
)
|
|
4210
4238
|
] }),
|
|
4211
|
-
onClose: () =>
|
|
4239
|
+
onClose: () => a(!1),
|
|
4212
4240
|
open: !c && s
|
|
4213
4241
|
}
|
|
4214
4242
|
);
|
|
4215
|
-
},
|
|
4216
|
-
|
|
4217
|
-
),
|
|
4218
|
-
const { xs: e } = Ce.useBreakpoint(), [t, r] = D(!1), { isOpenWidget: s, widgetProps:
|
|
4243
|
+
}, Lo = R(
|
|
4244
|
+
So
|
|
4245
|
+
), Ro = () => {
|
|
4246
|
+
const { xs: e } = Ce.useBreakpoint(), [t, r] = D(!1), { isOpenWidget: s, widgetProps: a } = q(), { isActiveTabVA: c } = be(), o = K(null), d = O(() => {
|
|
4219
4247
|
var f;
|
|
4220
4248
|
const u = [un];
|
|
4221
|
-
return e && (
|
|
4222
|
-
}, [e,
|
|
4249
|
+
return e && (a != null && a.isSF ? u == null || u.push(`${un}-sf-mobile`) : u == null || u.push(`${un}-mobile`)), (f = u == null ? void 0 : u.filter(Boolean)) == null ? void 0 : f.join(" ");
|
|
4250
|
+
}, [e, a == null ? void 0 : a.isSF]), i = Yt(
|
|
4223
4251
|
(u) => {
|
|
4224
4252
|
var x;
|
|
4225
4253
|
const f = [u, xn == null ? void 0 : xn.FADE_IN];
|
|
4226
|
-
return
|
|
4254
|
+
return a != null && a.isSF && (f == null || f.push(`${u}-sf`)), e && (a != null && a.isSF ? f == null || f.push(`${u}-sf-mobile`) : f == null || f.push(`${u}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
|
|
4227
4255
|
},
|
|
4228
|
-
[
|
|
4256
|
+
[a == null ? void 0 : a.isSF, e]
|
|
4229
4257
|
);
|
|
4230
4258
|
return X(() => {
|
|
4231
4259
|
s && r(s), clearTimeout(o.current), o.current = setTimeout(() => {
|
|
4232
4260
|
s || r(s);
|
|
4233
4261
|
}, 250);
|
|
4234
|
-
}, [s]), t ? /* @__PURE__ */ n.jsxs("div", { className:
|
|
4262
|
+
}, [s]), t ? /* @__PURE__ */ n.jsxs("div", { className: d, children: [
|
|
4235
4263
|
/* @__PURE__ */ n.jsxs("div", { style: { display: c ? "block" : "none" }, children: [
|
|
4236
|
-
/* @__PURE__ */ n.jsx("div", { className:
|
|
4237
|
-
/* @__PURE__ */ n.jsx(
|
|
4264
|
+
/* @__PURE__ */ n.jsx("div", { className: i(Es), children: /* @__PURE__ */ n.jsx(_r, {}) }),
|
|
4265
|
+
/* @__PURE__ */ n.jsx(Sr, {})
|
|
4238
4266
|
] }),
|
|
4239
|
-
/* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className:
|
|
4240
|
-
/* @__PURE__ */ n.jsx(
|
|
4241
|
-
] }) : /* @__PURE__ */ n.jsx(
|
|
4242
|
-
},
|
|
4267
|
+
/* @__PURE__ */ n.jsx("div", { style: { display: c ? "none" : "block" }, children: /* @__PURE__ */ n.jsx("div", { className: i(Ts), children: /* @__PURE__ */ n.jsx(Fr, { children: /* @__PURE__ */ n.jsx(Dr, { children: /* @__PURE__ */ n.jsx(ko, {}) }) }) }) }),
|
|
4268
|
+
/* @__PURE__ */ n.jsx(Lo, {})
|
|
4269
|
+
] }) : /* @__PURE__ */ n.jsx(Ao, {});
|
|
4270
|
+
}, Oo = R(Ro), Do = ({ items: e, ...t }) => Le != null && Le.startsWith("5") || Re != null && Re.startsWith("18") ? /* @__PURE__ */ n.jsx(cn, { ...t, items: e }) : /* @__PURE__ */ n.jsx(cn, { ...t, children: e == null ? void 0 : e.map(({ ...r }) => /* @__PURE__ */ vn(
|
|
4243
4271
|
cn.TabPane,
|
|
4244
4272
|
{
|
|
4245
4273
|
...r,
|
|
4246
4274
|
key: r == null ? void 0 : r.key,
|
|
4247
4275
|
tab: r == null ? void 0 : r.label
|
|
4248
4276
|
}
|
|
4249
|
-
)) }),
|
|
4250
|
-
const { isOpenWidget: e } =
|
|
4277
|
+
)) }), No = R(Do), Mo = () => {
|
|
4278
|
+
const { isOpenWidget: e } = q(), { setActiveTab: t, activeTab: r } = be(), s = _(
|
|
4251
4279
|
"VirtualAssistant",
|
|
4252
4280
|
"Virtual Assistant"
|
|
4253
|
-
),
|
|
4281
|
+
), a = _("Helpdesk", "Helpdesk"), { xs: c } = Ce.useBreakpoint();
|
|
4254
4282
|
return X(() => {
|
|
4255
|
-
const o =
|
|
4283
|
+
const o = ot();
|
|
4256
4284
|
t((o == null ? void 0 : o.activeTab) ?? r);
|
|
4257
4285
|
}, []), e ? /* @__PURE__ */ n.jsx(
|
|
4258
4286
|
"div",
|
|
@@ -4264,7 +4292,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4264
4292
|
}
|
|
4265
4293
|
},
|
|
4266
4294
|
children: /* @__PURE__ */ n.jsx(
|
|
4267
|
-
|
|
4295
|
+
No,
|
|
4268
4296
|
{
|
|
4269
4297
|
activeKey: r,
|
|
4270
4298
|
onChange: (o) => {
|
|
@@ -4278,7 +4306,7 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4278
4306
|
key: "va"
|
|
4279
4307
|
},
|
|
4280
4308
|
{
|
|
4281
|
-
label:
|
|
4309
|
+
label: a,
|
|
4282
4310
|
key: "helpdesk"
|
|
4283
4311
|
}
|
|
4284
4312
|
]
|
|
@@ -4286,8 +4314,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4286
4314
|
)
|
|
4287
4315
|
}
|
|
4288
4316
|
) : null;
|
|
4289
|
-
},
|
|
4290
|
-
const { isOpenWidget: e, setOpenWidget: t, setExpand: r, isExpand: s, widgetProps:
|
|
4317
|
+
}, Fo = R(Mo), Ho = () => {
|
|
4318
|
+
const { isOpenWidget: e, setOpenWidget: t, setExpand: r, isExpand: s, widgetProps: a } = q(), { xs: c } = Ce.useBreakpoint();
|
|
4291
4319
|
return e ? /* @__PURE__ */ n.jsxs(
|
|
4292
4320
|
"div",
|
|
4293
4321
|
{
|
|
@@ -4299,8 +4327,8 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4299
4327
|
},
|
|
4300
4328
|
children: [
|
|
4301
4329
|
/* @__PURE__ */ n.jsxs("div", { className: `${He}-text`, children: [
|
|
4302
|
-
/* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children:
|
|
4303
|
-
/* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children:
|
|
4330
|
+
/* @__PURE__ */ n.jsx("h4", { className: `${He}-title`, children: a == null ? void 0 : a.title }),
|
|
4331
|
+
/* @__PURE__ */ n.jsx("span", { className: `${He}-subtitle`, children: a == null ? void 0 : a.subTitle })
|
|
4304
4332
|
] }),
|
|
4305
4333
|
/* @__PURE__ */ n.jsxs("div", { className: `${He}-action`, children: [
|
|
4306
4334
|
!c && /* @__PURE__ */ n.jsx(
|
|
@@ -4329,17 +4357,17 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4329
4357
|
]
|
|
4330
4358
|
}
|
|
4331
4359
|
) : null;
|
|
4332
|
-
},
|
|
4333
|
-
const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: r, setOpenWidget: s } =
|
|
4334
|
-
var
|
|
4360
|
+
}, Io = R(Ho), $o = () => {
|
|
4361
|
+
const { isExpand: e, isOpenWidget: t, isFirstOpenWidget: r, setOpenWidget: s } = q(), { xs: a } = Ce.useBreakpoint(), c = O(() => {
|
|
4362
|
+
var d;
|
|
4335
4363
|
const o = [
|
|
4336
|
-
|
|
4364
|
+
a && t && "w-container-widget-mobile",
|
|
4337
4365
|
r && (t ? "w-show-animate" : "w-close-animate"),
|
|
4338
4366
|
"w-container-widget",
|
|
4339
4367
|
e && "w-container-widget-expand"
|
|
4340
4368
|
];
|
|
4341
|
-
return (
|
|
4342
|
-
}, [e,
|
|
4369
|
+
return (d = o == null ? void 0 : o.filter(Boolean)) == null ? void 0 : d.join(" ");
|
|
4370
|
+
}, [e, a, r, t]);
|
|
4343
4371
|
return /* @__PURE__ */ n.jsxs(
|
|
4344
4372
|
"div",
|
|
4345
4373
|
{
|
|
@@ -4349,39 +4377,39 @@ const ir = () => /* @__PURE__ */ n.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4349
4377
|
},
|
|
4350
4378
|
tabIndex: 0,
|
|
4351
4379
|
children: [
|
|
4352
|
-
/* @__PURE__ */ n.jsx(
|
|
4353
|
-
/* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(
|
|
4354
|
-
/* @__PURE__ */ n.jsx(
|
|
4355
|
-
/* @__PURE__ */ n.jsx(
|
|
4380
|
+
/* @__PURE__ */ n.jsx(Io, {}),
|
|
4381
|
+
/* @__PURE__ */ n.jsx("div", { id: "w-widget-content", children: /* @__PURE__ */ n.jsxs(sr, { children: [
|
|
4382
|
+
/* @__PURE__ */ n.jsx(Ds, { children: /* @__PURE__ */ n.jsx(Oo, {}) }),
|
|
4383
|
+
/* @__PURE__ */ n.jsx(Fo, {})
|
|
4356
4384
|
] }) })
|
|
4357
4385
|
]
|
|
4358
4386
|
}
|
|
4359
4387
|
);
|
|
4360
|
-
},
|
|
4388
|
+
}, Bo = R($o), Po = ({
|
|
4361
4389
|
getStartedPayload: e,
|
|
4362
4390
|
socketURL: t,
|
|
4363
4391
|
socketPath: r,
|
|
4364
4392
|
onPayslipFn: s,
|
|
4365
|
-
title:
|
|
4393
|
+
title: a,
|
|
4366
4394
|
subTitle: c,
|
|
4367
4395
|
keyEncrypt: o,
|
|
4368
|
-
history:
|
|
4369
|
-
isSF:
|
|
4396
|
+
history: d,
|
|
4397
|
+
isSF: i = !1
|
|
4370
4398
|
}) => /* @__PURE__ */ n.jsx(
|
|
4371
|
-
|
|
4399
|
+
Ls,
|
|
4372
4400
|
{
|
|
4373
4401
|
getStartedPayload: e,
|
|
4374
4402
|
socketURL: t,
|
|
4375
4403
|
socketPath: r,
|
|
4376
4404
|
onPayslipFn: s,
|
|
4377
|
-
title:
|
|
4405
|
+
title: a,
|
|
4378
4406
|
subTitle: c,
|
|
4379
4407
|
keyEncrypt: o,
|
|
4380
|
-
history:
|
|
4381
|
-
isSF:
|
|
4382
|
-
children: /* @__PURE__ */ n.jsx(
|
|
4408
|
+
history: d,
|
|
4409
|
+
isSF: i,
|
|
4410
|
+
children: /* @__PURE__ */ n.jsx(Os, { children: /* @__PURE__ */ n.jsx(Bo, {}) })
|
|
4383
4411
|
}
|
|
4384
4412
|
);
|
|
4385
4413
|
export {
|
|
4386
|
-
|
|
4414
|
+
Po as default
|
|
4387
4415
|
};
|