widget-chatbot 2.0.2 → 2.0.4-alpha.1
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.es.js +724 -725
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import ot, { version as Lr, createContext as He, useContext as Ue, useState as H, useRef as se, useMemo as z, useEffect as ge, memo as B, Fragment as pt, Children as Mr, isValidElement as Nr, cloneElement as Fr, createElement as Ht, useCallback as Ir } from "react";
|
|
2
2
|
import Je from "axios";
|
|
3
3
|
import Se from "dayjs";
|
|
4
|
-
import { version as $r, Modal as un, Collapse as dn, Typography as ce, Button as le, Form as
|
|
4
|
+
import { version as $r, Modal as un, Collapse as dn, Typography as ce, Button as le, Form as Ce, notification as Te, Radio as Hr, Divider as Ur, Input as st, Image as Wr, Skeleton as _e, Avatar as Un, Upload as Wn, Spin as Br, Tooltip as Ke, Tag as Yr, Badge as Vr, Grid as Re, Empty as Bn, Popover as Ut, Mentions as fn, Select as gn, DatePicker as zr, Result as Gr, Tabs as wt } from "antd";
|
|
5
5
|
import { io as qr } from "socket.io-client";
|
|
6
6
|
import Kr from "react-markdown";
|
|
7
7
|
import Pr from "remark-gfm";
|
|
@@ -39,28 +39,28 @@ function Wt() {
|
|
|
39
39
|
return !1;
|
|
40
40
|
for (var i = {}, c = 0; c < 10; c++)
|
|
41
41
|
i["_" + String.fromCharCode(c)] = c;
|
|
42
|
-
var l = Object.getOwnPropertyNames(i).map(function(
|
|
43
|
-
return i[
|
|
42
|
+
var l = Object.getOwnPropertyNames(i).map(function(x) {
|
|
43
|
+
return i[x];
|
|
44
44
|
});
|
|
45
45
|
if (l.join("") !== "0123456789")
|
|
46
46
|
return !1;
|
|
47
47
|
var f = {};
|
|
48
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
49
|
-
f[
|
|
48
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(x) {
|
|
49
|
+
f[x] = x;
|
|
50
50
|
}), Object.keys(Object.assign({}, f)).join("") === "abcdefghijklmnopqrst";
|
|
51
51
|
} catch {
|
|
52
52
|
return !1;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return _t = a() ? Object.assign : function(s, i) {
|
|
56
|
-
for (var c, l = r(s), f,
|
|
57
|
-
c = Object(arguments[
|
|
56
|
+
for (var c, l = r(s), f, x = 1; x < arguments.length; x++) {
|
|
57
|
+
c = Object(arguments[x]);
|
|
58
58
|
for (var p in c)
|
|
59
59
|
n.call(c, p) && (l[p] = c[p]);
|
|
60
60
|
if (e) {
|
|
61
61
|
f = e(c);
|
|
62
|
-
for (var
|
|
63
|
-
o.call(c, f[
|
|
62
|
+
for (var h = 0; h < f.length; h++)
|
|
63
|
+
o.call(c, f[h]) && (l[f[h]] = c[f[h]]);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
return l;
|
|
@@ -74,10 +74,10 @@ function Wt() {
|
|
|
74
74
|
* This source code is licensed under the MIT license found in the
|
|
75
75
|
* LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
var
|
|
77
|
+
var hn;
|
|
78
78
|
function to() {
|
|
79
|
-
if (
|
|
80
|
-
|
|
79
|
+
if (hn) return ze;
|
|
80
|
+
hn = 1, Wt();
|
|
81
81
|
var e = ot, n = 60103;
|
|
82
82
|
if (ze.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
83
83
|
var o = Symbol.for;
|
|
@@ -85,11 +85,11 @@ function to() {
|
|
|
85
85
|
}
|
|
86
86
|
var r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = Object.prototype.hasOwnProperty, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
87
87
|
function i(c, l, f) {
|
|
88
|
-
var
|
|
89
|
-
f !== void 0 && (
|
|
90
|
-
for (
|
|
91
|
-
if (c && c.defaultProps) for (
|
|
92
|
-
return { $$typeof: n, type: c, key:
|
|
88
|
+
var x, p = {}, h = null, v = null;
|
|
89
|
+
f !== void 0 && (h = "" + f), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (v = l.ref);
|
|
90
|
+
for (x in l) a.call(l, x) && !s.hasOwnProperty(x) && (p[x] = l[x]);
|
|
91
|
+
if (c && c.defaultProps) for (x in l = c.defaultProps, l) p[x] === void 0 && (p[x] = l[x]);
|
|
92
|
+
return { $$typeof: n, type: c, key: h, ref: v, props: p, _owner: r.current };
|
|
93
93
|
}
|
|
94
94
|
return ze.jsx = i, ze.jsxs = i, ze;
|
|
95
95
|
}
|
|
@@ -102,16 +102,16 @@ var jt = {};
|
|
|
102
102
|
* This source code is licensed under the MIT license found in the
|
|
103
103
|
* LICENSE file in the root directory of this source tree.
|
|
104
104
|
*/
|
|
105
|
-
var
|
|
105
|
+
var xn;
|
|
106
106
|
function no() {
|
|
107
|
-
return
|
|
107
|
+
return xn || (xn = 1, function(e) {
|
|
108
108
|
process.env.NODE_ENV !== "production" && function() {
|
|
109
109
|
var n = ot, o = Wt(), r = 60103, a = 60106;
|
|
110
110
|
e.Fragment = 60107;
|
|
111
|
-
var s = 60108, i = 60114, c = 60109, l = 60110, f = 60112,
|
|
111
|
+
var s = 60108, i = 60114, c = 60109, l = 60110, f = 60112, x = 60113, p = 60120, h = 60115, v = 60116, j = 60121, T = 60122, w = 60117, C = 60129, E = 60131;
|
|
112
112
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
113
113
|
var m = Symbol.for;
|
|
114
|
-
r = m("react.element"), a = m("react.portal"), e.Fragment = m("react.fragment"), s = m("react.strict_mode"), i = m("react.profiler"), c = m("react.provider"), l = m("react.context"), f = m("react.forward_ref"),
|
|
114
|
+
r = m("react.element"), a = m("react.portal"), e.Fragment = m("react.fragment"), s = m("react.strict_mode"), i = m("react.profiler"), c = m("react.provider"), l = m("react.context"), f = m("react.forward_ref"), x = m("react.suspense"), p = m("react.suspense_list"), h = m("react.memo"), v = m("react.lazy"), j = m("react.block"), T = m("react.server.block"), w = m("react.fundamental"), m("react.scope"), m("react.opaque.id"), C = m("react.debug_trace_mode"), m("react.offscreen"), E = m("react.legacy_hidden");
|
|
115
115
|
}
|
|
116
116
|
var S = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
117
117
|
function y(g) {
|
|
@@ -123,16 +123,16 @@ function no() {
|
|
|
123
123
|
var u = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
124
124
|
function b(g) {
|
|
125
125
|
{
|
|
126
|
-
for (var A = arguments.length,
|
|
127
|
-
|
|
128
|
-
k("error", g,
|
|
126
|
+
for (var A = arguments.length, N = new Array(A > 1 ? A - 1 : 0), q = 1; q < A; q++)
|
|
127
|
+
N[q - 1] = arguments[q];
|
|
128
|
+
k("error", g, N);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function k(g, A,
|
|
131
|
+
function k(g, A, N) {
|
|
132
132
|
{
|
|
133
|
-
var
|
|
134
|
-
fe !== "" && (A += "%s",
|
|
135
|
-
var de =
|
|
133
|
+
var q = u.ReactDebugCurrentFrame, fe = q.getStackAddendum();
|
|
134
|
+
fe !== "" && (A += "%s", N = N.concat([fe]));
|
|
135
|
+
var de = N.map(function(oe) {
|
|
136
136
|
return "" + oe;
|
|
137
137
|
});
|
|
138
138
|
de.unshift("Warning: " + A), Function.prototype.apply.call(console[g], console, de);
|
|
@@ -140,11 +140,11 @@ function no() {
|
|
|
140
140
|
}
|
|
141
141
|
var D = !1;
|
|
142
142
|
function R(g) {
|
|
143
|
-
return !!(typeof g == "string" || typeof g == "function" || g === e.Fragment || g === i || g ===
|
|
143
|
+
return !!(typeof g == "string" || typeof g == "function" || g === e.Fragment || g === i || g === C || g === s || g === x || g === p || g === E || D || typeof g == "object" && g !== null && (g.$$typeof === v || g.$$typeof === h || g.$$typeof === c || g.$$typeof === l || g.$$typeof === f || g.$$typeof === w || g.$$typeof === j || g[0] === T));
|
|
144
144
|
}
|
|
145
|
-
function U(g, A,
|
|
146
|
-
var
|
|
147
|
-
return g.displayName || (
|
|
145
|
+
function U(g, A, N) {
|
|
146
|
+
var q = A.displayName || A.name || "";
|
|
147
|
+
return g.displayName || (q !== "" ? N + "(" + q + ")" : N);
|
|
148
148
|
}
|
|
149
149
|
function $(g) {
|
|
150
150
|
return g.displayName || "Context";
|
|
@@ -165,7 +165,7 @@ function no() {
|
|
|
165
165
|
return "Profiler";
|
|
166
166
|
case s:
|
|
167
167
|
return "StrictMode";
|
|
168
|
-
case
|
|
168
|
+
case x:
|
|
169
169
|
return "Suspense";
|
|
170
170
|
case p:
|
|
171
171
|
return "SuspenseList";
|
|
@@ -176,16 +176,16 @@ function no() {
|
|
|
176
176
|
var A = g;
|
|
177
177
|
return $(A) + ".Consumer";
|
|
178
178
|
case c:
|
|
179
|
-
var
|
|
180
|
-
return $(
|
|
179
|
+
var N = g;
|
|
180
|
+
return $(N._context) + ".Provider";
|
|
181
181
|
case f:
|
|
182
182
|
return U(g, g.render, "ForwardRef");
|
|
183
|
-
case
|
|
183
|
+
case h:
|
|
184
184
|
return Y(g.type);
|
|
185
185
|
case j:
|
|
186
186
|
return Y(g._render);
|
|
187
187
|
case v: {
|
|
188
|
-
var
|
|
188
|
+
var q = g, fe = q._payload, de = q._init;
|
|
189
189
|
try {
|
|
190
190
|
return Y(de(fe));
|
|
191
191
|
} catch {
|
|
@@ -195,18 +195,18 @@ function no() {
|
|
|
195
195
|
}
|
|
196
196
|
return null;
|
|
197
197
|
}
|
|
198
|
-
var G = 0,
|
|
199
|
-
function
|
|
198
|
+
var G = 0, P, I, Z, K, _, O, W;
|
|
199
|
+
function F() {
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
F.__reactDisabledLog = !0;
|
|
202
202
|
function V() {
|
|
203
203
|
{
|
|
204
204
|
if (G === 0) {
|
|
205
|
-
|
|
205
|
+
P = console.log, I = console.info, Z = console.warn, K = console.error, _ = console.group, O = console.groupCollapsed, W = console.groupEnd;
|
|
206
206
|
var g = {
|
|
207
207
|
configurable: !0,
|
|
208
208
|
enumerable: !0,
|
|
209
|
-
value:
|
|
209
|
+
value: F,
|
|
210
210
|
writable: !0
|
|
211
211
|
};
|
|
212
212
|
Object.defineProperties(console, {
|
|
@@ -232,16 +232,16 @@ function no() {
|
|
|
232
232
|
};
|
|
233
233
|
Object.defineProperties(console, {
|
|
234
234
|
log: o({}, g, {
|
|
235
|
-
value:
|
|
235
|
+
value: P
|
|
236
236
|
}),
|
|
237
237
|
info: o({}, g, {
|
|
238
|
-
value:
|
|
238
|
+
value: I
|
|
239
239
|
}),
|
|
240
240
|
warn: o({}, g, {
|
|
241
241
|
value: Z
|
|
242
242
|
}),
|
|
243
243
|
error: o({}, g, {
|
|
244
|
-
value:
|
|
244
|
+
value: K
|
|
245
245
|
}),
|
|
246
246
|
group: o({}, g, {
|
|
247
247
|
value: _
|
|
@@ -257,15 +257,15 @@ function no() {
|
|
|
257
257
|
G < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
var
|
|
261
|
-
function ee(g, A,
|
|
260
|
+
var X = u.ReactCurrentDispatcher, J;
|
|
261
|
+
function ee(g, A, N) {
|
|
262
262
|
{
|
|
263
263
|
if (J === void 0)
|
|
264
264
|
try {
|
|
265
265
|
throw Error();
|
|
266
266
|
} catch (fe) {
|
|
267
|
-
var
|
|
268
|
-
J =
|
|
267
|
+
var q = fe.stack.trim().match(/\n( *(at )?)/);
|
|
268
|
+
J = q && q[1] || "";
|
|
269
269
|
}
|
|
270
270
|
return `
|
|
271
271
|
` + J + g;
|
|
@@ -280,16 +280,16 @@ function no() {
|
|
|
280
280
|
if (!g || re)
|
|
281
281
|
return "";
|
|
282
282
|
{
|
|
283
|
-
var
|
|
284
|
-
if (
|
|
285
|
-
return
|
|
283
|
+
var N = te.get(g);
|
|
284
|
+
if (N !== void 0)
|
|
285
|
+
return N;
|
|
286
286
|
}
|
|
287
|
-
var
|
|
287
|
+
var q;
|
|
288
288
|
re = !0;
|
|
289
289
|
var fe = Error.prepareStackTrace;
|
|
290
290
|
Error.prepareStackTrace = void 0;
|
|
291
291
|
var de;
|
|
292
|
-
de =
|
|
292
|
+
de = X.current, X.current = null, V();
|
|
293
293
|
try {
|
|
294
294
|
if (A) {
|
|
295
295
|
var oe = function() {
|
|
@@ -303,14 +303,14 @@ function no() {
|
|
|
303
303
|
try {
|
|
304
304
|
Reflect.construct(oe, []);
|
|
305
305
|
} catch (Ae) {
|
|
306
|
-
|
|
306
|
+
q = Ae;
|
|
307
307
|
}
|
|
308
308
|
Reflect.construct(g, [], oe);
|
|
309
309
|
} else {
|
|
310
310
|
try {
|
|
311
311
|
oe.call();
|
|
312
312
|
} catch (Ae) {
|
|
313
|
-
|
|
313
|
+
q = Ae;
|
|
314
314
|
}
|
|
315
315
|
g.call(oe.prototype);
|
|
316
316
|
}
|
|
@@ -318,43 +318,43 @@ function no() {
|
|
|
318
318
|
try {
|
|
319
319
|
throw Error();
|
|
320
320
|
} catch (Ae) {
|
|
321
|
-
|
|
321
|
+
q = Ae;
|
|
322
322
|
}
|
|
323
323
|
g();
|
|
324
324
|
}
|
|
325
325
|
} catch (Ae) {
|
|
326
|
-
if (Ae &&
|
|
326
|
+
if (Ae && q && typeof Ae.stack == "string") {
|
|
327
327
|
for (var ne = Ae.stack.split(`
|
|
328
|
-
`), ve =
|
|
329
|
-
`),
|
|
328
|
+
`), ve = q.stack.split(`
|
|
329
|
+
`), he = ne.length - 1, me = ve.length - 1; he >= 1 && me >= 0 && ne[he] !== ve[me]; )
|
|
330
330
|
me--;
|
|
331
|
-
for (;
|
|
332
|
-
if (ne[
|
|
333
|
-
if (
|
|
331
|
+
for (; he >= 1 && me >= 0; he--, me--)
|
|
332
|
+
if (ne[he] !== ve[me]) {
|
|
333
|
+
if (he !== 1 || me !== 1)
|
|
334
334
|
do
|
|
335
|
-
if (
|
|
335
|
+
if (he--, me--, me < 0 || ne[he] !== ve[me]) {
|
|
336
336
|
var ke = `
|
|
337
|
-
` + ne[
|
|
337
|
+
` + ne[he].replace(" at new ", " at ");
|
|
338
338
|
return typeof g == "function" && te.set(g, ke), ke;
|
|
339
339
|
}
|
|
340
|
-
while (
|
|
340
|
+
while (he >= 1 && me >= 0);
|
|
341
341
|
break;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
344
|
} finally {
|
|
345
|
-
re = !1,
|
|
345
|
+
re = !1, X.current = de, Q(), Error.prepareStackTrace = fe;
|
|
346
346
|
}
|
|
347
347
|
var Ye = g ? g.displayName || g.name : "", ln = Ye ? ee(Ye) : "";
|
|
348
348
|
return typeof g == "function" && te.set(g, ln), ln;
|
|
349
349
|
}
|
|
350
|
-
function be(g, A,
|
|
350
|
+
function be(g, A, N) {
|
|
351
351
|
return L(g, !1);
|
|
352
352
|
}
|
|
353
353
|
function We(g) {
|
|
354
354
|
var A = g.prototype;
|
|
355
355
|
return !!(A && A.isReactComponent);
|
|
356
356
|
}
|
|
357
|
-
function Ie(g, A,
|
|
357
|
+
function Ie(g, A, N) {
|
|
358
358
|
if (g == null)
|
|
359
359
|
return "";
|
|
360
360
|
if (typeof g == "function")
|
|
@@ -362,7 +362,7 @@ function no() {
|
|
|
362
362
|
if (typeof g == "string")
|
|
363
363
|
return ee(g);
|
|
364
364
|
switch (g) {
|
|
365
|
-
case
|
|
365
|
+
case x:
|
|
366
366
|
return ee("Suspense");
|
|
367
367
|
case p:
|
|
368
368
|
return ee("SuspenseList");
|
|
@@ -371,14 +371,14 @@ function no() {
|
|
|
371
371
|
switch (g.$$typeof) {
|
|
372
372
|
case f:
|
|
373
373
|
return be(g.render);
|
|
374
|
-
case
|
|
375
|
-
return Ie(g.type, A,
|
|
374
|
+
case h:
|
|
375
|
+
return Ie(g.type, A, N);
|
|
376
376
|
case j:
|
|
377
377
|
return be(g._render);
|
|
378
378
|
case v: {
|
|
379
|
-
var
|
|
379
|
+
var q = g, fe = q._payload, de = q._init;
|
|
380
380
|
try {
|
|
381
|
-
return Ie(de(fe), A,
|
|
381
|
+
return Ie(de(fe), A, N);
|
|
382
382
|
} catch {
|
|
383
383
|
}
|
|
384
384
|
}
|
|
@@ -388,12 +388,12 @@ function no() {
|
|
|
388
388
|
var Jt = {}, Zt = u.ReactDebugCurrentFrame;
|
|
389
389
|
function ct(g) {
|
|
390
390
|
if (g) {
|
|
391
|
-
var A = g._owner,
|
|
392
|
-
Zt.setExtraStackFrame(
|
|
391
|
+
var A = g._owner, N = Ie(g.type, g._source, A ? A.type : null);
|
|
392
|
+
Zt.setExtraStackFrame(N);
|
|
393
393
|
} else
|
|
394
394
|
Zt.setExtraStackFrame(null);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function xr(g, A, N, q, fe) {
|
|
397
397
|
{
|
|
398
398
|
var de = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
399
399
|
for (var oe in g)
|
|
@@ -401,25 +401,25 @@ function no() {
|
|
|
401
401
|
var ne = void 0;
|
|
402
402
|
try {
|
|
403
403
|
if (typeof g[oe] != "function") {
|
|
404
|
-
var ve = Error((
|
|
404
|
+
var ve = Error((q || "React class") + ": " + N + " type `" + oe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof g[oe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
405
405
|
throw ve.name = "Invariant Violation", ve;
|
|
406
406
|
}
|
|
407
|
-
ne = g[oe](A, oe,
|
|
408
|
-
} catch (
|
|
409
|
-
ne =
|
|
407
|
+
ne = g[oe](A, oe, q, N, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
408
|
+
} catch (he) {
|
|
409
|
+
ne = he;
|
|
410
410
|
}
|
|
411
|
-
ne && !(ne instanceof Error) && (ct(fe), b("%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).",
|
|
411
|
+
ne && !(ne instanceof Error) && (ct(fe), b("%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).", q || "React class", N, oe, typeof ne), ct(null)), ne instanceof Error && !(ne.message in Jt) && (Jt[ne.message] = !0, ct(fe), b("Failed %s type: %s", N, ne.message), ct(null));
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
var Qt = u.ReactCurrentOwner,
|
|
415
|
+
var Qt = u.ReactCurrentOwner, Ct = Object.prototype.hasOwnProperty, mr = {
|
|
416
416
|
key: !0,
|
|
417
417
|
ref: !0,
|
|
418
418
|
__self: !0,
|
|
419
419
|
__source: !0
|
|
420
420
|
}, en, tn;
|
|
421
421
|
function yr(g) {
|
|
422
|
-
if (
|
|
422
|
+
if (Ct.call(g, "ref")) {
|
|
423
423
|
var A = Object.getOwnPropertyDescriptor(g, "ref").get;
|
|
424
424
|
if (A && A.isReactWarning)
|
|
425
425
|
return !1;
|
|
@@ -427,7 +427,7 @@ function no() {
|
|
|
427
427
|
return g.ref !== void 0;
|
|
428
428
|
}
|
|
429
429
|
function vr(g) {
|
|
430
|
-
if (
|
|
430
|
+
if (Ct.call(g, "key")) {
|
|
431
431
|
var A = Object.getOwnPropertyDescriptor(g, "key").get;
|
|
432
432
|
if (A && A.isReactWarning)
|
|
433
433
|
return !1;
|
|
@@ -437,36 +437,36 @@ function no() {
|
|
|
437
437
|
function br(g, A) {
|
|
438
438
|
typeof g.ref == "string" && Qt.current;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Cr(g, A) {
|
|
441
441
|
{
|
|
442
|
-
var
|
|
442
|
+
var N = function() {
|
|
443
443
|
en || (en = !0, b("%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)", A));
|
|
444
444
|
};
|
|
445
|
-
|
|
446
|
-
get:
|
|
445
|
+
N.isReactWarning = !0, Object.defineProperty(g, "key", {
|
|
446
|
+
get: N,
|
|
447
447
|
configurable: !0
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Tr(g, A) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
453
|
+
var N = function() {
|
|
454
454
|
tn || (tn = !0, b("%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)", A));
|
|
455
455
|
};
|
|
456
|
-
|
|
457
|
-
get:
|
|
456
|
+
N.isReactWarning = !0, Object.defineProperty(g, "ref", {
|
|
457
|
+
get: N,
|
|
458
458
|
configurable: !0
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
var Er = function(g, A,
|
|
462
|
+
var Er = function(g, A, N, q, fe, de, oe) {
|
|
463
463
|
var ne = {
|
|
464
464
|
// This tag allows us to uniquely identify this as a React Element
|
|
465
465
|
$$typeof: r,
|
|
466
466
|
// Built-in properties that belong on the element
|
|
467
467
|
type: g,
|
|
468
468
|
key: A,
|
|
469
|
-
ref:
|
|
469
|
+
ref: N,
|
|
470
470
|
props: oe,
|
|
471
471
|
// Record the component responsible for creating this element.
|
|
472
472
|
_owner: de
|
|
@@ -480,7 +480,7 @@ function no() {
|
|
|
480
480
|
configurable: !1,
|
|
481
481
|
enumerable: !1,
|
|
482
482
|
writable: !1,
|
|
483
|
-
value:
|
|
483
|
+
value: q
|
|
484
484
|
}), Object.defineProperty(ne, "_source", {
|
|
485
485
|
configurable: !1,
|
|
486
486
|
enumerable: !1,
|
|
@@ -488,29 +488,29 @@ function no() {
|
|
|
488
488
|
value: fe
|
|
489
489
|
}), Object.freeze && (Object.freeze(ne.props), Object.freeze(ne)), ne;
|
|
490
490
|
};
|
|
491
|
-
function Sr(g, A,
|
|
491
|
+
function Sr(g, A, N, q, fe) {
|
|
492
492
|
{
|
|
493
493
|
var de, oe = {}, ne = null, ve = null;
|
|
494
|
-
|
|
494
|
+
N !== void 0 && (ne = "" + N), vr(A) && (ne = "" + A.key), yr(A) && (ve = A.ref, br(A, fe));
|
|
495
495
|
for (de in A)
|
|
496
|
-
|
|
496
|
+
Ct.call(A, de) && !mr.hasOwnProperty(de) && (oe[de] = A[de]);
|
|
497
497
|
if (g && g.defaultProps) {
|
|
498
|
-
var
|
|
499
|
-
for (de in
|
|
500
|
-
oe[de] === void 0 && (oe[de] =
|
|
498
|
+
var he = g.defaultProps;
|
|
499
|
+
for (de in he)
|
|
500
|
+
oe[de] === void 0 && (oe[de] = he[de]);
|
|
501
501
|
}
|
|
502
502
|
if (ne || ve) {
|
|
503
503
|
var me = typeof g == "function" ? g.displayName || g.name || "Unknown" : g;
|
|
504
|
-
ne &&
|
|
504
|
+
ne && Cr(oe, me), ve && Tr(oe, me);
|
|
505
505
|
}
|
|
506
|
-
return Er(g, ne, ve, fe,
|
|
506
|
+
return Er(g, ne, ve, fe, q, Qt.current, oe);
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
-
var
|
|
509
|
+
var Tt = u.ReactCurrentOwner, nn = u.ReactDebugCurrentFrame;
|
|
510
510
|
function Be(g) {
|
|
511
511
|
if (g) {
|
|
512
|
-
var A = g._owner,
|
|
513
|
-
nn.setExtraStackFrame(
|
|
512
|
+
var A = g._owner, N = Ie(g.type, g._source, A ? A.type : null);
|
|
513
|
+
nn.setExtraStackFrame(N);
|
|
514
514
|
} else
|
|
515
515
|
nn.setExtraStackFrame(null);
|
|
516
516
|
}
|
|
@@ -521,8 +521,8 @@ function no() {
|
|
|
521
521
|
}
|
|
522
522
|
function rn() {
|
|
523
523
|
{
|
|
524
|
-
if (
|
|
525
|
-
var g = Y(
|
|
524
|
+
if (Tt.current) {
|
|
525
|
+
var g = Y(Tt.current.type);
|
|
526
526
|
if (g)
|
|
527
527
|
return `
|
|
528
528
|
|
|
@@ -539,10 +539,10 @@ Check the render method of \`` + g + "`.";
|
|
|
539
539
|
{
|
|
540
540
|
var A = rn();
|
|
541
541
|
if (!A) {
|
|
542
|
-
var
|
|
543
|
-
|
|
542
|
+
var N = typeof g == "string" ? g : g.displayName || g.name;
|
|
543
|
+
N && (A = `
|
|
544
544
|
|
|
545
|
-
Check the top-level render call using <` +
|
|
545
|
+
Check the top-level render call using <` + N + ">.");
|
|
546
546
|
}
|
|
547
547
|
return A;
|
|
548
548
|
}
|
|
@@ -552,12 +552,12 @@ Check the top-level render call using <` + F + ">.");
|
|
|
552
552
|
if (!g._store || g._store.validated || g.key != null)
|
|
553
553
|
return;
|
|
554
554
|
g._store.validated = !0;
|
|
555
|
-
var
|
|
556
|
-
if (on[
|
|
555
|
+
var N = _r(A);
|
|
556
|
+
if (on[N])
|
|
557
557
|
return;
|
|
558
|
-
on[
|
|
559
|
-
var
|
|
560
|
-
g && g._owner && g._owner !==
|
|
558
|
+
on[N] = !0;
|
|
559
|
+
var q = "";
|
|
560
|
+
g && g._owner && g._owner !== Tt.current && (q = " It was passed a child from " + Y(g._owner.type) + "."), Be(g), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', N, q), Be(null);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
function an(g, A) {
|
|
@@ -565,9 +565,9 @@ Check the top-level render call using <` + F + ">.");
|
|
|
565
565
|
if (typeof g != "object")
|
|
566
566
|
return;
|
|
567
567
|
if (Array.isArray(g))
|
|
568
|
-
for (var
|
|
569
|
-
var
|
|
570
|
-
St(
|
|
568
|
+
for (var N = 0; N < g.length; N++) {
|
|
569
|
+
var q = g[N];
|
|
570
|
+
St(q) && sn(q, A);
|
|
571
571
|
}
|
|
572
572
|
else if (St(g))
|
|
573
573
|
g._store && (g._store.validated = !0);
|
|
@@ -584,18 +584,18 @@ Check the top-level render call using <` + F + ">.");
|
|
|
584
584
|
var A = g.type;
|
|
585
585
|
if (A == null || typeof A == "string")
|
|
586
586
|
return;
|
|
587
|
-
var
|
|
587
|
+
var N;
|
|
588
588
|
if (typeof A == "function")
|
|
589
|
-
|
|
589
|
+
N = A.propTypes;
|
|
590
590
|
else if (typeof A == "object" && (A.$$typeof === f || // Note: Memo only checks outer props here.
|
|
591
591
|
// Inner props are checked in the reconciler.
|
|
592
|
-
A.$$typeof ===
|
|
593
|
-
|
|
592
|
+
A.$$typeof === h))
|
|
593
|
+
N = A.propTypes;
|
|
594
594
|
else
|
|
595
595
|
return;
|
|
596
|
-
if (
|
|
597
|
-
var
|
|
598
|
-
|
|
596
|
+
if (N) {
|
|
597
|
+
var q = Y(A);
|
|
598
|
+
xr(N, g.props, "prop", q, g);
|
|
599
599
|
} else if (A.PropTypes !== void 0 && !Et) {
|
|
600
600
|
Et = !0;
|
|
601
601
|
var fe = Y(A);
|
|
@@ -606,17 +606,17 @@ Check the top-level render call using <` + F + ">.");
|
|
|
606
606
|
}
|
|
607
607
|
function kr(g) {
|
|
608
608
|
{
|
|
609
|
-
for (var A = Object.keys(g.props),
|
|
610
|
-
var
|
|
611
|
-
if (
|
|
612
|
-
Be(g), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
609
|
+
for (var A = Object.keys(g.props), N = 0; N < A.length; N++) {
|
|
610
|
+
var q = A[N];
|
|
611
|
+
if (q !== "children" && q !== "key") {
|
|
612
|
+
Be(g), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", q), Be(null);
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
g.ref !== null && (Be(g), b("Invalid attribute `ref` supplied to `React.Fragment`."), Be(null));
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
function cn(g, A,
|
|
619
|
+
function cn(g, A, N, q, fe, de) {
|
|
620
620
|
{
|
|
621
621
|
var oe = R(g);
|
|
622
622
|
if (!oe) {
|
|
@@ -624,16 +624,16 @@ Check the top-level render call using <` + F + ">.");
|
|
|
624
624
|
(g === void 0 || typeof g == "object" && g !== null && Object.keys(g).length === 0) && (ne += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
625
625
|
var ve = wr();
|
|
626
626
|
ve ? ne += ve : ne += rn();
|
|
627
|
-
var
|
|
628
|
-
g === null ?
|
|
627
|
+
var he;
|
|
628
|
+
g === null ? he = "null" : Array.isArray(g) ? he = "array" : g !== void 0 && g.$$typeof === r ? (he = "<" + (Y(g.type) || "Unknown") + " />", ne = " Did you accidentally export a JSX literal instead of a component?") : he = typeof g, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, ne);
|
|
629
629
|
}
|
|
630
|
-
var me = Sr(g, A,
|
|
630
|
+
var me = Sr(g, A, N, fe, de);
|
|
631
631
|
if (me == null)
|
|
632
632
|
return me;
|
|
633
633
|
if (oe) {
|
|
634
634
|
var ke = A.children;
|
|
635
635
|
if (ke !== void 0)
|
|
636
|
-
if (
|
|
636
|
+
if (q)
|
|
637
637
|
if (Array.isArray(ke)) {
|
|
638
638
|
for (var Ye = 0; Ye < ke.length; Ye++)
|
|
639
639
|
an(ke[Ye], g);
|
|
@@ -646,11 +646,11 @@ Check the top-level render call using <` + F + ">.");
|
|
|
646
646
|
return g === e.Fragment ? kr(me) : jr(me), me;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
function Ar(g, A,
|
|
650
|
-
return cn(g, A,
|
|
649
|
+
function Ar(g, A, N) {
|
|
650
|
+
return cn(g, A, N, !0);
|
|
651
651
|
}
|
|
652
|
-
function Rr(g, A,
|
|
653
|
-
return cn(g, A,
|
|
652
|
+
function Rr(g, A, N) {
|
|
653
|
+
return cn(g, A, N, !1);
|
|
654
654
|
}
|
|
655
655
|
var Or = Rr, Dr = Ar;
|
|
656
656
|
e.jsx = Or, e.jsxs = Dr;
|
|
@@ -662,7 +662,7 @@ function ro() {
|
|
|
662
662
|
return mn || (mn = 1, process.env.NODE_ENV === "production" ? lt.exports = to() : lt.exports = no()), lt.exports;
|
|
663
663
|
}
|
|
664
664
|
var t = ro();
|
|
665
|
-
const oo = "2.0.
|
|
665
|
+
const oo = "2.0.3", Vn = "chat_session", so = "user_uttered", io = "bot_uttered", ao = "ehelp_bot_uttered";
|
|
666
666
|
JSON.stringify({
|
|
667
667
|
enabled_agents: ["Alice", "Maria", "Jani"],
|
|
668
668
|
default_active_agent: "Alice"
|
|
@@ -692,7 +692,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
692
692
|
label: "I’d like to explain further",
|
|
693
693
|
value: "another"
|
|
694
694
|
}
|
|
695
|
-
], Pe = $r, Xe = Lr, uo = oo, fo = "https://sfchatbot.dataon.com/openai-service-dev/",
|
|
695
|
+
], Pe = $r, Xe = Lr, uo = oo, fo = "https://sfchatbot.dataon.com/openai-service-dev/", xt = "https://res.cloudinary.com/dcvolkyfb/image/upload/v1740135794/svg/bot_profile_hlnyop.png", Bt = "YYYY-MM-DD", mt = "HH:mm", yn = "N/A", kt = [
|
|
696
696
|
// Raster (bitmap)
|
|
697
697
|
".jpg",
|
|
698
698
|
".jpeg",
|
|
@@ -716,7 +716,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
716
716
|
".xcf"
|
|
717
717
|
], At = "w-widget-content-container", Rt = "w-ticket-detail-content-container", go = "w-wrapper-body", po = "w-wrapper-body-helpdesk", Qe = "w-header", Ot = {
|
|
718
718
|
FADE_IN: "w-fade-in-animate"
|
|
719
|
-
},
|
|
719
|
+
}, ho = "https://placehold.co/600x400?text=No+Image", nt = 3, xo = "GoHRDev2025WorkPlazeDataOnDotCom", Ge = "(Helpdesk Widget Chatbot)", mo = (e) => JSON.parse((e == null ? void 0 : e.replaceAll("/get_started", "")) || "{}"), zn = (e) => {
|
|
720
720
|
var n;
|
|
721
721
|
try {
|
|
722
722
|
return (n = new URL(e)) == null ? void 0 : n.host;
|
|
@@ -778,7 +778,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
778
778
|
r == null || r.push(c);
|
|
779
779
|
}) : r == null || r.push(s);
|
|
780
780
|
}), r == null || r.forEach((s, i) => {
|
|
781
|
-
var l, f,
|
|
781
|
+
var l, f, x;
|
|
782
782
|
const c = s == null ? void 0 : s.generated_id;
|
|
783
783
|
c ? (n[c] || (n[c] = []), (f = n[c]) == null || f.push({
|
|
784
784
|
...s,
|
|
@@ -799,7 +799,7 @@ const co = "https://sfchatbot.dataon.com", lo = [
|
|
|
799
799
|
...s,
|
|
800
800
|
keyItem: i,
|
|
801
801
|
...!(s != null && s.timestamp) && {
|
|
802
|
-
timestamp: (
|
|
802
|
+
timestamp: (x = Se()) == null ? void 0 : x.format("hh:mm A")
|
|
803
803
|
}
|
|
804
804
|
});
|
|
805
805
|
});
|
|
@@ -834,13 +834,13 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
834
834
|
behavior: "smooth"
|
|
835
835
|
});
|
|
836
836
|
}, 0);
|
|
837
|
-
},
|
|
837
|
+
}, Co = (e) => {
|
|
838
838
|
const n = new Uint8Array(e);
|
|
839
839
|
let o = "";
|
|
840
840
|
for (let r = 0; r < n.byteLength; r++)
|
|
841
841
|
o += String.fromCharCode(n[r]);
|
|
842
842
|
return btoa(o);
|
|
843
|
-
},
|
|
843
|
+
}, To = async (e, n) => {
|
|
844
844
|
var l;
|
|
845
845
|
const o = typeof e == "object" ? JSON == null ? void 0 : JSON.stringify(e || {}) : e, r = new TextEncoder(), a = r == null ? void 0 : r.encode(o), s = r == null ? void 0 : r.encode(n);
|
|
846
846
|
if (s.length !== 32)
|
|
@@ -856,8 +856,8 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
856
856
|
i,
|
|
857
857
|
a
|
|
858
858
|
);
|
|
859
|
-
return
|
|
860
|
-
},
|
|
859
|
+
return Co(c);
|
|
860
|
+
}, ht = (e) => {
|
|
861
861
|
const n = {}, o = Kn(e), r = o == null ? void 0 : o.map((a) => {
|
|
862
862
|
var i;
|
|
863
863
|
const s = a == null ? void 0 : a.CREATED_DATE;
|
|
@@ -896,9 +896,9 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
896
896
|
keyEncrypt: c,
|
|
897
897
|
history: l,
|
|
898
898
|
modelName: f,
|
|
899
|
-
isSF:
|
|
899
|
+
isSF: x
|
|
900
900
|
}) => {
|
|
901
|
-
const [p,
|
|
901
|
+
const [p, h] = H(!1), [v, j] = H("va"), [T, w] = H(!1), [C, E] = H({}), [m, S] = H(!1), [d, y] = H(!1), [u, b] = H(!1), k = se(!1), D = z(() => ({
|
|
902
902
|
getStartedPayload: n,
|
|
903
903
|
socketURL: o,
|
|
904
904
|
socketPath: r,
|
|
@@ -908,7 +908,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
908
908
|
keyEncrypt: c,
|
|
909
909
|
history: l,
|
|
910
910
|
modelName: f,
|
|
911
|
-
isSF:
|
|
911
|
+
isSF: x
|
|
912
912
|
}), [
|
|
913
913
|
n,
|
|
914
914
|
o,
|
|
@@ -919,8 +919,8 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
919
919
|
c,
|
|
920
920
|
l,
|
|
921
921
|
f,
|
|
922
|
-
|
|
923
|
-
]), R = z(() => Gn(
|
|
922
|
+
x
|
|
923
|
+
]), R = z(() => Gn(C == null ? void 0 : C.access_token), [C == null ? void 0 : C.access_token]);
|
|
924
924
|
return ge(() => {
|
|
925
925
|
E(mo(n));
|
|
926
926
|
}, [n]), ge(() => {
|
|
@@ -931,12 +931,12 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
931
931
|
Xn.Provider,
|
|
932
932
|
{
|
|
933
933
|
value: {
|
|
934
|
-
objInitPayload:
|
|
935
|
-
setOpenWidget:
|
|
934
|
+
objInitPayload: C,
|
|
935
|
+
setOpenWidget: h,
|
|
936
936
|
isOpenWidget: p,
|
|
937
937
|
activeTab: v,
|
|
938
938
|
setActiveTab: j,
|
|
939
|
-
isExpand:
|
|
939
|
+
isExpand: T,
|
|
940
940
|
setExpand: w,
|
|
941
941
|
setObjInitPayload: E,
|
|
942
942
|
parsedJWT: R,
|
|
@@ -960,14 +960,14 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
960
960
|
)) == null || i.then(({ data: c }) => {
|
|
961
961
|
var l;
|
|
962
962
|
if (c) {
|
|
963
|
-
const f = Object.keys((l = Object.values(c)) == null ? void 0 : l[0]),
|
|
963
|
+
const f = Object.keys((l = Object.values(c)) == null ? void 0 : l[0]), x = {};
|
|
964
964
|
f == null || f.forEach((p) => {
|
|
965
|
-
var
|
|
966
|
-
(
|
|
965
|
+
var h;
|
|
966
|
+
(h = Object.keys(c)) == null || h.forEach((v) => {
|
|
967
967
|
var j;
|
|
968
|
-
|
|
968
|
+
x[p == null ? void 0 : p.toLowerCase()] = (j = c == null ? void 0 : c[v]) == null ? void 0 : j[p];
|
|
969
969
|
});
|
|
970
|
-
}), r(
|
|
970
|
+
}), r(x);
|
|
971
971
|
}
|
|
972
972
|
});
|
|
973
973
|
}, s = () => {
|
|
@@ -976,10 +976,10 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
976
976
|
var f;
|
|
977
977
|
const l = c.target.result;
|
|
978
978
|
try {
|
|
979
|
-
const p = l.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"),
|
|
980
|
-
|
|
981
|
-
r(
|
|
982
|
-
},
|
|
979
|
+
const p = l.transaction("keyvaluepairs", "readonly").objectStore("keyvaluepairs"), h = p == null ? void 0 : p.get((f = n == null ? void 0 : n.lang) == null ? void 0 : f.toLowerCase());
|
|
980
|
+
h.onsuccess = () => {
|
|
981
|
+
r(h == null ? void 0 : h.result);
|
|
982
|
+
}, h.onerror = () => {
|
|
983
983
|
a();
|
|
984
984
|
};
|
|
985
985
|
} catch {
|
|
@@ -993,61 +993,60 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
993
993
|
s();
|
|
994
994
|
}, [n == null ? void 0 : n.uriService, n == null ? void 0 : n.lang]), /* @__PURE__ */ t.jsx(Jn.Provider, { value: { langDatas: o }, children: e });
|
|
995
995
|
}, Zn = He({}), je = () => Ue(Zn), jo = ({ children: e }) => {
|
|
996
|
-
var
|
|
997
|
-
const [n, o] = H([]), [r, a] = H(!1), [s, i] = H(!1), [c, l] = H({}), [f,
|
|
998
|
-
objInitPayload:
|
|
996
|
+
var P;
|
|
997
|
+
const [n, o] = H([]), [r, a] = H(!1), [s, i] = H(!1), [c, l] = H({}), [f, x] = H(!1), [p, h] = H(!1), [v, j] = H(""), [T, w] = H(!1), {
|
|
998
|
+
objInitPayload: C,
|
|
999
999
|
widgetProps: E,
|
|
1000
1000
|
setOpenWidget: m,
|
|
1001
1001
|
setFirstOpenWidget: S,
|
|
1002
1002
|
isFirstRenderHelpdesk: d,
|
|
1003
1003
|
setUserInputHide: y
|
|
1004
|
-
} = ue(), u = se(null), b = se(""), k = se(""), D = (
|
|
1005
|
-
var
|
|
1006
|
-
const Z = (
|
|
1007
|
-
if (y(((_ =
|
|
1008
|
-
const O = Ee(
|
|
1004
|
+
} = ue(), u = se(null), b = se(""), k = se(""), D = (I) => {
|
|
1005
|
+
var K, _;
|
|
1006
|
+
const Z = (K = I == null ? void 0 : I.metadata) == null ? void 0 : K.stopped;
|
|
1007
|
+
if (y(((_ = I == null ? void 0 : I.metadata) == null ? void 0 : _.userInput) === "hide"), !Z) {
|
|
1008
|
+
const O = Ee(I, "text_feedback_link") && Ee(I, "text");
|
|
1009
1009
|
o((W) => {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
...M,
|
|
1010
|
+
const F = [...W], V = F == null ? void 0 : F[(F == null ? void 0 : F.length) - 1];
|
|
1011
|
+
return (V == null ? void 0 : V.id) === (I == null ? void 0 : I.id) ? V.text += I == null ? void 0 : I.text : F == null || F.push({
|
|
1012
|
+
...I,
|
|
1014
1013
|
...O && {
|
|
1015
1014
|
type: "text"
|
|
1016
1015
|
},
|
|
1017
1016
|
sender: "response"
|
|
1018
|
-
}), vo(
|
|
1017
|
+
}), vo(F);
|
|
1019
1018
|
});
|
|
1020
1019
|
}
|
|
1021
1020
|
a(!1), i(!1), Le();
|
|
1022
|
-
}, R = (
|
|
1023
|
-
var Z,
|
|
1024
|
-
|
|
1021
|
+
}, R = (I) => {
|
|
1022
|
+
var Z, K, _, O;
|
|
1023
|
+
I && U({
|
|
1025
1024
|
msg: E == null ? void 0 : E.getStartedPayload
|
|
1026
|
-
}), (Z = u == null ? void 0 : u.current) == null || Z.emit("session_request", { session_id: null }), (
|
|
1025
|
+
}), (Z = u == null ? void 0 : u.current) == null || Z.emit("session_request", { session_id: null }), (K = u == null ? void 0 : u.current) == null || K.on("session_confirm", (W) => {
|
|
1027
1026
|
b.current = W, yt({
|
|
1028
1027
|
session_id: W == null ? void 0 : W.session_id
|
|
1029
1028
|
});
|
|
1030
1029
|
}), (_ = u == null ? void 0 : u.current) == null || _.on(io, D), (O = u == null ? void 0 : u.current) == null || O.on(ao, (W) => {
|
|
1031
|
-
const
|
|
1032
|
-
Ee(
|
|
1033
|
-
}), f ||
|
|
1030
|
+
const F = JSON.parse(W || "{}");
|
|
1031
|
+
Ee(F, "iswidget") && h(F == null ? void 0 : F.iswidget);
|
|
1032
|
+
}), f || x(!0), S(!1);
|
|
1034
1033
|
}, U = ({
|
|
1035
|
-
msg:
|
|
1034
|
+
msg: I,
|
|
1036
1035
|
additionalConfig: Z = {},
|
|
1037
|
-
isShowLoadingResponse:
|
|
1036
|
+
isShowLoadingResponse: K = !0
|
|
1038
1037
|
}) => {
|
|
1039
1038
|
var _;
|
|
1040
1039
|
(_ = u == null ? void 0 : u.current) == null || _.emit(so, {
|
|
1041
1040
|
customData: {
|
|
1042
|
-
language:
|
|
1041
|
+
language: C == null ? void 0 : C.lang
|
|
1043
1042
|
},
|
|
1044
|
-
message:
|
|
1043
|
+
message: I,
|
|
1045
1044
|
session_id: b == null ? void 0 : b.current,
|
|
1046
1045
|
...Z
|
|
1047
|
-
}),
|
|
1048
|
-
}, $ = (
|
|
1049
|
-
var
|
|
1050
|
-
u.current && ((
|
|
1046
|
+
}), K ? a(!0) : i(!0);
|
|
1047
|
+
}, $ = (I = !1) => {
|
|
1048
|
+
var K, _;
|
|
1049
|
+
u.current && ((K = u == null ? void 0 : u.current) == null || K.off(), (_ = u == null ? void 0 : u.current) == null || _.disconnect(), u.current = null), d.current = !1;
|
|
1051
1050
|
const Z = qr(
|
|
1052
1051
|
`${bo(E == null ? void 0 : E.socketURL)}://${zn(
|
|
1053
1052
|
E == null ? void 0 : E.socketURL
|
|
@@ -1060,30 +1059,30 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1060
1059
|
}
|
|
1061
1060
|
);
|
|
1062
1061
|
Z.on("connect", () => {
|
|
1063
|
-
R(
|
|
1062
|
+
R(I);
|
|
1064
1063
|
}), Z.on("connect_error", (O) => {
|
|
1065
1064
|
console.error("connect_error widget-chatbot : ", {
|
|
1066
1065
|
err: O,
|
|
1067
1066
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1068
1067
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1069
|
-
}),
|
|
1068
|
+
}), x(!1);
|
|
1070
1069
|
}), Z.io.on("reconnect", () => {
|
|
1071
1070
|
console.error("reconnect widget-chatbot : ", {
|
|
1072
1071
|
socketURL: E == null ? void 0 : E.socketURL,
|
|
1073
1072
|
socketPath: E == null ? void 0 : E.widgetProps
|
|
1074
|
-
}),
|
|
1073
|
+
}), x(!1);
|
|
1075
1074
|
}), u.current = Z;
|
|
1076
1075
|
}, Y = () => {
|
|
1077
|
-
var
|
|
1078
|
-
(!((
|
|
1076
|
+
var I;
|
|
1077
|
+
(!((I = u == null ? void 0 : u.current) != null && I.connected) || !f) && ($(), m(!1));
|
|
1079
1078
|
}, G = () => {
|
|
1080
|
-
|
|
1079
|
+
x(!1);
|
|
1081
1080
|
};
|
|
1082
1081
|
return ge(() => (m(!1), $(), window.addEventListener("online", Y), window.addEventListener("offline", G), () => {
|
|
1083
|
-
var
|
|
1084
|
-
u.current && ((
|
|
1082
|
+
var I, Z;
|
|
1083
|
+
u.current && ((I = u.current) == null || I.off("connect", R), (Z = u.current) == null || Z.disconnect(), u.current = null), window.removeEventListener("online", Y), window.removeEventListener("offline", G);
|
|
1085
1084
|
}), [
|
|
1086
|
-
JSON.stringify(
|
|
1085
|
+
JSON.stringify(C || {}),
|
|
1087
1086
|
E == null ? void 0 : E.socketURL,
|
|
1088
1087
|
E == null ? void 0 : E.socketPath
|
|
1089
1088
|
]), /* @__PURE__ */ t.jsx(
|
|
@@ -1095,7 +1094,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1095
1094
|
onSendMsg: U,
|
|
1096
1095
|
isWaitResponse: r,
|
|
1097
1096
|
socket: u == null ? void 0 : u.current,
|
|
1098
|
-
sessionId: (
|
|
1097
|
+
sessionId: (P = b == null ? void 0 : b.current) == null ? void 0 : P.session_id,
|
|
1099
1098
|
loadingRegenerate: s,
|
|
1100
1099
|
file: c,
|
|
1101
1100
|
setFile: l,
|
|
@@ -1105,7 +1104,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1105
1104
|
currRegenerateId: k,
|
|
1106
1105
|
thinkingText: v,
|
|
1107
1106
|
setThinkingText: j,
|
|
1108
|
-
isThinkingCompleted:
|
|
1107
|
+
isThinkingCompleted: T,
|
|
1109
1108
|
setIsThinkingCompleted: w
|
|
1110
1109
|
},
|
|
1111
1110
|
children: e
|
|
@@ -1392,7 +1391,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1392
1391
|
boxShadow: "inset 5px 0 0 #f7d87c",
|
|
1393
1392
|
zIndex: "0"
|
|
1394
1393
|
}
|
|
1395
|
-
}, Ao = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(),
|
|
1394
|
+
}, Ao = (e) => e.replace(/[^a-zA-Z0-9_]/g, "").trim(), M = (e = "", n) => {
|
|
1396
1395
|
var i;
|
|
1397
1396
|
const { langDatas: o } = wo(), r = localStorage == null ? void 0 : localStorage.getItem("show_text_id"), a = Ao(String(e)), s = (o == null ? void 0 : o[a == null ? void 0 : a.toUpperCase()]) || n;
|
|
1398
1397
|
return ((i = Object.keys(o || {})) == null ? void 0 : i.length) > 0 ? r ? `WPUI_${a}` : s : n;
|
|
@@ -1446,22 +1445,22 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1446
1445
|
)
|
|
1447
1446
|
);
|
|
1448
1447
|
}, Qn = B(Ro), Oo = ({ childrenData: e, children: n }) => {
|
|
1449
|
-
const o =
|
|
1448
|
+
const o = M("ThinkProcess", "Think Process"), a = (() => {
|
|
1450
1449
|
const s = [];
|
|
1451
1450
|
let i = 0;
|
|
1452
1451
|
const c = "<think>", l = "</think>";
|
|
1453
1452
|
for (; i < (e == null ? void 0 : e.length); ) {
|
|
1454
|
-
const f = e == null ? void 0 : e.indexOf(c, i),
|
|
1455
|
-
if (f !== -1 &&
|
|
1453
|
+
const f = e == null ? void 0 : e.indexOf(c, i), x = e == null ? void 0 : e.indexOf(l, i);
|
|
1454
|
+
if (f !== -1 && x !== -1 && f < x)
|
|
1456
1455
|
f > i && s.push({
|
|
1457
1456
|
type: "text",
|
|
1458
1457
|
value: e == null ? void 0 : e.slice(i, f)
|
|
1459
1458
|
}), s.push({
|
|
1460
1459
|
type: "think",
|
|
1461
|
-
value: e == null ? void 0 : e.slice(f + c.length,
|
|
1460
|
+
value: e == null ? void 0 : e.slice(f + c.length, x)
|
|
1462
1461
|
// ini buat ambil text dri stlah <think> sampai sblm </think>
|
|
1463
|
-
}), i =
|
|
1464
|
-
else if (f !== -1 &&
|
|
1462
|
+
}), i = x + l.length;
|
|
1463
|
+
else if (f !== -1 && x === -1) {
|
|
1465
1464
|
f > i && s.push({
|
|
1466
1465
|
type: "text",
|
|
1467
1466
|
value: e == null ? void 0 : e.slice(i, f)
|
|
@@ -1492,7 +1491,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1492
1491
|
},
|
|
1493
1492
|
i
|
|
1494
1493
|
) : /* @__PURE__ */ t.jsx(pt, { children: n(s == null ? void 0 : s.value, "text") }, i)) });
|
|
1495
|
-
}, Do = B(Oo),
|
|
1494
|
+
}, Do = B(Oo), Cn = ({ props: e, isModal: n = !1 }) => {
|
|
1496
1495
|
const o = (r, a) => {
|
|
1497
1496
|
var s;
|
|
1498
1497
|
return (s = Mr) == null ? void 0 : s.map(r, (i) => {
|
|
@@ -1535,17 +1534,17 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1535
1534
|
}
|
|
1536
1535
|
) }) }) });
|
|
1537
1536
|
}, Lo = ({ children: e }) => {
|
|
1538
|
-
const n =
|
|
1537
|
+
const n = M(
|
|
1539
1538
|
"OpenDetailTable",
|
|
1540
1539
|
"Open Detail Table"
|
|
1541
|
-
), o =
|
|
1540
|
+
), o = M("TableDetail", "Tabel Detail"), { widgetProps: r, objInitPayload: a } = ue(), [s, i] = H(!1);
|
|
1542
1541
|
return /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(Do, { childrenData: e, children: (c, l) => /* @__PURE__ */ t.jsx(
|
|
1543
1542
|
Kr,
|
|
1544
1543
|
{
|
|
1545
1544
|
remarkPlugins: [Pr],
|
|
1546
1545
|
components: {
|
|
1547
1546
|
table: ({ ...f }) => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1548
|
-
/* @__PURE__ */ t.jsx(
|
|
1547
|
+
/* @__PURE__ */ t.jsx(Cn, { props: f }),
|
|
1549
1548
|
/* @__PURE__ */ t.jsx(
|
|
1550
1549
|
"div",
|
|
1551
1550
|
{
|
|
@@ -1576,7 +1575,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1576
1575
|
onCancel: () => {
|
|
1577
1576
|
i(!1);
|
|
1578
1577
|
},
|
|
1579
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1578
|
+
children: /* @__PURE__ */ t.jsx(Cn, { props: f, isModal: !0 })
|
|
1580
1579
|
}
|
|
1581
1580
|
)
|
|
1582
1581
|
] }),
|
|
@@ -1593,7 +1592,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1593
1592
|
}
|
|
1594
1593
|
}
|
|
1595
1594
|
),
|
|
1596
|
-
code: ({ className: f, children:
|
|
1595
|
+
code: ({ className: f, children: x }) => {
|
|
1597
1596
|
const p = /language-(\w+)/.exec(f || "");
|
|
1598
1597
|
return p ? /* @__PURE__ */ t.jsx(
|
|
1599
1598
|
Xr,
|
|
@@ -1601,25 +1600,25 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1601
1600
|
language: p[1],
|
|
1602
1601
|
style: ko,
|
|
1603
1602
|
PreTag: "div",
|
|
1604
|
-
children: String(
|
|
1603
|
+
children: String(x).replace(/\n$/, "")
|
|
1605
1604
|
}
|
|
1606
|
-
) : /* @__PURE__ */ t.jsx(ce.Text, { code: !0, children:
|
|
1605
|
+
) : /* @__PURE__ */ t.jsx(ce.Text, { code: !0, children: x });
|
|
1607
1606
|
},
|
|
1608
1607
|
a: (f) => {
|
|
1609
|
-
var j,
|
|
1610
|
-
const
|
|
1608
|
+
var j, T;
|
|
1609
|
+
const x = f.href, p = (j = f.children) == null ? void 0 : j[0], h = bn(x), v = bn(
|
|
1611
1610
|
a == null ? void 0 : a.uriBackend
|
|
1612
1611
|
);
|
|
1613
|
-
return !
|
|
1612
|
+
return !h && v ? ((T = Eo(
|
|
1614
1613
|
a == null ? void 0 : a.uriBackend
|
|
1615
|
-
)) == null ||
|
|
1614
|
+
)) == null || T.origin, /* @__PURE__ */ t.jsx(
|
|
1616
1615
|
"span",
|
|
1617
1616
|
{
|
|
1618
1617
|
className: "w-link-path",
|
|
1619
1618
|
onClick: (w) => {
|
|
1620
1619
|
w.stopPropagation();
|
|
1621
|
-
const
|
|
1622
|
-
r != null && r.history && r.history.push(
|
|
1620
|
+
const C = `${x}`;
|
|
1621
|
+
r != null && r.history && r.history.push(C);
|
|
1623
1622
|
},
|
|
1624
1623
|
children: p
|
|
1625
1624
|
}
|
|
@@ -1995,19 +1994,19 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
1995
1994
|
}
|
|
1996
1995
|
);
|
|
1997
1996
|
}, ns = ({ ...e }) => {
|
|
1998
|
-
const n =
|
|
1997
|
+
const n = M(
|
|
1999
1998
|
"WeLoveToHearAboutYourExperienceWithTheSunfishChatbot",
|
|
2000
1999
|
"We'd love to hear about your experience with the Sunfish chatbot"
|
|
2001
|
-
), o =
|
|
2000
|
+
), o = M(
|
|
2002
2001
|
"ShareAnyCommentsOrSuggestionsToHelpUsImprove",
|
|
2003
2002
|
"Share any comments or suggestions to help us improve"
|
|
2004
|
-
), r =
|
|
2003
|
+
), r = M("Submit", "Submit"), a = M(
|
|
2005
2004
|
"ThankFeedback",
|
|
2006
2005
|
"Thank You for your feedback"
|
|
2007
|
-
), s =
|
|
2006
|
+
), s = M(
|
|
2008
2007
|
"AdditionalFeedback",
|
|
2009
2008
|
"Additional Feedback"
|
|
2010
|
-
), [i] =
|
|
2009
|
+
), [i] = Ce.useForm(), [c, l] = H(!1), [f, x] = H(""), { setChats: p } = je(), { objInitPayload: h, isUserInputHide: v } = ue(), { activeTab: j } = Me(), T = z(() => {
|
|
2011
2010
|
var S;
|
|
2012
2011
|
const m = Ee(e, "feedback") ? (e == null ? void 0 : e.feedback) === "like" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
2013
2012
|
return typeof (e == null ? void 0 : e.text_thumbsup_link) == "string" && ((S = e == null ? void 0 : e.text_thumbsup_link) == null ? void 0 : S.trim()) !== "" && m;
|
|
@@ -2015,15 +2014,15 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2015
2014
|
var S;
|
|
2016
2015
|
const m = Ee(e, "feedback") ? (e == null ? void 0 : e.feedback) === "dislike" || (e == null ? void 0 : e.feedback) === "" : !0;
|
|
2017
2016
|
return typeof (e == null ? void 0 : e.text_thumbsdown_link) == "string" && ((S = e == null ? void 0 : e.text_thumbsdown_link) == null ? void 0 : S.trim()) !== "" && m;
|
|
2018
|
-
}, [e]),
|
|
2019
|
-
if (
|
|
2017
|
+
}, [e]), C = z(() => {
|
|
2018
|
+
if (h != null && h.uriBackend)
|
|
2020
2019
|
try {
|
|
2021
|
-
return new URL(
|
|
2020
|
+
return new URL(h.uriBackend).origin;
|
|
2022
2021
|
} catch {
|
|
2023
2022
|
return "";
|
|
2024
2023
|
}
|
|
2025
2024
|
return "";
|
|
2026
|
-
}, [
|
|
2025
|
+
}, [h == null ? void 0 : h.uriBackend]), E = (m) => {
|
|
2027
2026
|
var U;
|
|
2028
2027
|
const S = m === "like" ? e == null ? void 0 : e.text_thumbsup_link : e == null ? void 0 : e.text_thumbsdown_link, {
|
|
2029
2028
|
access_token: d = "",
|
|
@@ -2032,7 +2031,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2032
2031
|
uriBackend: b = "",
|
|
2033
2032
|
uriBackendEnt: k = "",
|
|
2034
2033
|
lang: D = ""
|
|
2035
|
-
} =
|
|
2034
|
+
} = h || {}, R = f === "another" ? i == null ? void 0 : i.getFieldValue("ADDITIONAL_FEEDBACK") : f;
|
|
2036
2035
|
(U = Je({
|
|
2037
2036
|
method: "POST",
|
|
2038
2037
|
url: S,
|
|
@@ -2050,47 +2049,47 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2050
2049
|
"company-id": `${u}`,
|
|
2051
2050
|
uriBackend: `${b}`,
|
|
2052
2051
|
uriBackendEnt: `${k}`,
|
|
2053
|
-
"custom-origin": `${
|
|
2052
|
+
"custom-origin": `${C}`,
|
|
2054
2053
|
"Acc-Name": `${y.toUpperCase()}`,
|
|
2055
2054
|
Language: `${D}`
|
|
2056
2055
|
}
|
|
2057
2056
|
})) == null || U.then(($) => {
|
|
2058
|
-
var Y, G,
|
|
2059
|
-
($ == null ? void 0 : $.status) === 200 && (c && l(!1), (Y =
|
|
2057
|
+
var Y, G, P;
|
|
2058
|
+
($ == null ? void 0 : $.status) === 200 && (c && l(!1), (Y = Te) == null || Y.destroy(), (G = Te) == null || G.config({
|
|
2060
2059
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
2061
2060
|
top: 28,
|
|
2062
2061
|
placement: "top",
|
|
2063
2062
|
duration: 3
|
|
2064
|
-
}), (
|
|
2063
|
+
}), (P = Te) == null || P.success({
|
|
2065
2064
|
message: a,
|
|
2066
2065
|
className: "w-notification-content"
|
|
2067
|
-
}), p((
|
|
2066
|
+
}), p((I) => {
|
|
2068
2067
|
var Z;
|
|
2069
|
-
return (Z =
|
|
2068
|
+
return (Z = I == null ? void 0 : I.map((K) => {
|
|
2070
2069
|
var O;
|
|
2071
|
-
if (Ee(
|
|
2072
|
-
const W = (O =
|
|
2073
|
-
...
|
|
2070
|
+
if (Ee(K, "chats")) {
|
|
2071
|
+
const W = (O = K == null ? void 0 : K.chats) == null ? void 0 : O.map((F) => (F == null ? void 0 : F.indexChat) === (e == null ? void 0 : e.indexChat) ? {
|
|
2072
|
+
...F,
|
|
2074
2073
|
feedback: m
|
|
2075
|
-
} :
|
|
2074
|
+
} : F);
|
|
2076
2075
|
return {
|
|
2077
|
-
...
|
|
2076
|
+
...K,
|
|
2078
2077
|
chats: W
|
|
2079
2078
|
};
|
|
2080
2079
|
}
|
|
2081
|
-
return (e == null ? void 0 : e.message_id) === (
|
|
2082
|
-
...
|
|
2080
|
+
return (e == null ? void 0 : e.message_id) === (K == null ? void 0 : K.message_id) ? {
|
|
2081
|
+
...K,
|
|
2083
2082
|
feedback: m
|
|
2084
|
-
} :
|
|
2083
|
+
} : K;
|
|
2085
2084
|
})) == null ? void 0 : Z.flat();
|
|
2086
2085
|
}));
|
|
2087
2086
|
});
|
|
2088
2087
|
};
|
|
2089
2088
|
return ge(() => {
|
|
2090
2089
|
var m;
|
|
2091
|
-
(m =
|
|
2090
|
+
(m = Te) == null || m.destroy();
|
|
2092
2091
|
}, [j]), v ? null : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2093
|
-
|
|
2092
|
+
T && /* @__PURE__ */ t.jsx(
|
|
2094
2093
|
le,
|
|
2095
2094
|
{
|
|
2096
2095
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "like", chatProps: e }),
|
|
@@ -2135,13 +2134,13 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2135
2134
|
buttonStyle: "solid",
|
|
2136
2135
|
onChange: (m) => {
|
|
2137
2136
|
var S;
|
|
2138
|
-
|
|
2137
|
+
x((S = m == null ? void 0 : m.target) == null ? void 0 : S.value);
|
|
2139
2138
|
}
|
|
2140
2139
|
}
|
|
2141
2140
|
),
|
|
2142
2141
|
f === "another" && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2143
2142
|
/* @__PURE__ */ t.jsx(Ur, { children: s }),
|
|
2144
|
-
/* @__PURE__ */ t.jsx(
|
|
2143
|
+
/* @__PURE__ */ t.jsx(Ce, { form: i, layout: "vertical", children: /* @__PURE__ */ t.jsx(Ce.Item, { name: "ADDITIONAL_FEEDBACK", children: /* @__PURE__ */ t.jsx(st.TextArea, { rows: 3 }) }) })
|
|
2145
2144
|
] })
|
|
2146
2145
|
]
|
|
2147
2146
|
}
|
|
@@ -2153,7 +2152,7 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2153
2152
|
position: o = "left",
|
|
2154
2153
|
...r
|
|
2155
2154
|
}) => {
|
|
2156
|
-
const a = yo(), { chats: s, onSendMsg: i, setChats: c, loadingRegenerate: l, currRegenerateId: f } = je(),
|
|
2155
|
+
const a = yo(), { chats: s, onSendMsg: i, setChats: c, loadingRegenerate: l, currRegenerateId: f } = je(), x = z(() => r == null ? void 0 : r.sender, [r]), p = z(() => s == null ? void 0 : s.filter((w) => (w == null ? void 0 : w.sender) === "client"), [s]), h = z(() => n && x === "response" && (p == null ? void 0 : p.length) > 0 && (r == null ? void 0 : r.indexChat) === (s == null ? void 0 : s.length) - 1 && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [x, p, s, r, n]), v = z(() => {
|
|
2157
2156
|
switch (o) {
|
|
2158
2157
|
case "left":
|
|
2159
2158
|
return "flex-start";
|
|
@@ -2162,18 +2161,18 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2162
2161
|
case "right":
|
|
2163
2162
|
return "flex-end";
|
|
2164
2163
|
}
|
|
2165
|
-
}, [o]), j = z(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]),
|
|
2166
|
-
const w = p == null ? void 0 : p[(p == null ? void 0 : p.length) - 1],
|
|
2164
|
+
}, [o]), j = z(() => e && (r == null ? void 0 : r.text_FeedbackIcons) === "hidup", [r, e]), T = () => {
|
|
2165
|
+
const w = p == null ? void 0 : p[(p == null ? void 0 : p.length) - 1], C = s == null ? void 0 : s[(s == null ? void 0 : s.length) - 1];
|
|
2167
2166
|
c(
|
|
2168
2167
|
(E = []) => E == null ? void 0 : E.map((m, S) => S === (E == null ? void 0 : E.length) - 1 && (m == null ? void 0 : m.sender) === "response" ? {
|
|
2169
2168
|
...m,
|
|
2170
|
-
generated_id: (
|
|
2169
|
+
generated_id: (C == null ? void 0 : C.generated_id) ?? a
|
|
2171
2170
|
// adjust with response
|
|
2172
2171
|
} : m)
|
|
2173
|
-
), f.current = (
|
|
2172
|
+
), f.current = (C == null ? void 0 : C.generated_id) ?? a, i({
|
|
2174
2173
|
msg: w == null ? void 0 : w.text,
|
|
2175
2174
|
additionalConfig: {
|
|
2176
|
-
generate_id: (
|
|
2175
|
+
generate_id: (C == null ? void 0 : C.generated_id) ?? a
|
|
2177
2176
|
},
|
|
2178
2177
|
isShowLoadingResponse: l
|
|
2179
2178
|
}), Le();
|
|
@@ -2187,13 +2186,13 @@ const Le = (e = ".w-wrapper-body") => {
|
|
|
2187
2186
|
justifyContent: v
|
|
2188
2187
|
},
|
|
2189
2188
|
children: [
|
|
2190
|
-
|
|
2189
|
+
h && /* @__PURE__ */ t.jsx(
|
|
2191
2190
|
le,
|
|
2192
2191
|
{
|
|
2193
2192
|
loading: l,
|
|
2194
2193
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "sync" }),
|
|
2195
2194
|
onClick: () => {
|
|
2196
|
-
|
|
2195
|
+
T();
|
|
2197
2196
|
}
|
|
2198
2197
|
}
|
|
2199
2198
|
),
|
|
@@ -2241,30 +2240,30 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2241
2240
|
] }), nr = B(as), cs = () => {
|
|
2242
2241
|
const { widgetProps: e } = ue();
|
|
2243
2242
|
return /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2244
|
-
/* @__PURE__ */ t.jsx($e, { src:
|
|
2243
|
+
/* @__PURE__ */ t.jsx($e, { src: xt, nameFallback: e == null ? void 0 : e.title }),
|
|
2245
2244
|
/* @__PURE__ */ t.jsx(nr, {})
|
|
2246
2245
|
] });
|
|
2247
2246
|
}, Kt = B(cs), ls = ({ src: e, name: n }) => /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2248
2247
|
/* @__PURE__ */ t.jsx($e, { src: e, preview: !1, nameFallback: n }),
|
|
2249
2248
|
/* @__PURE__ */ t.jsx(ce.Text, { children: n })
|
|
2250
2249
|
] }), it = B(ls), us = ({ ...e }) => {
|
|
2251
|
-
var
|
|
2250
|
+
var x, p;
|
|
2252
2251
|
const [n, o] = H(1), { loadingRegenerate: r, currRegenerateId: a } = je(), { isExpand: s, widgetProps: i } = ue(), c = z(() => e == null ? void 0 : e.sender, [e]), l = z(() => e == null ? void 0 : e.chats, [e == null ? void 0 : e.chats]), f = z(() => {
|
|
2253
|
-
const
|
|
2254
|
-
return (
|
|
2252
|
+
const h = l == null ? void 0 : l[(l == null ? void 0 : l.length) - 1];
|
|
2253
|
+
return (h == null ? void 0 : h.generated_id) === a.current;
|
|
2255
2254
|
}, [l, e, a.current]);
|
|
2256
2255
|
return ge(() => {
|
|
2257
2256
|
!r && (l == null ? void 0 : l.length) > 0 && (o(l == null ? void 0 : l.length), Le());
|
|
2258
2257
|
}, [r]), r && f ? /* @__PURE__ */ t.jsx(Kt, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2259
|
-
c === "response" && /* @__PURE__ */ t.jsx(it, { name: i == null ? void 0 : i.title, src:
|
|
2260
|
-
/* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 8 }, children: l == null ? void 0 : l.map((
|
|
2258
|
+
c === "response" && /* @__PURE__ */ t.jsx(it, { name: i == null ? void 0 : i.title, src: xt }),
|
|
2259
|
+
/* @__PURE__ */ t.jsx("div", { style: { display: "flex", gap: 8 }, children: l == null ? void 0 : l.map((h, v) => {
|
|
2261
2260
|
var w;
|
|
2262
|
-
const j = v === ((w = e == null ? void 0 : e.chats) == null ? void 0 : w.length) - 1,
|
|
2261
|
+
const j = v === ((w = e == null ? void 0 : e.chats) == null ? void 0 : w.length) - 1, T = n === v + 1;
|
|
2263
2262
|
return /* @__PURE__ */ t.jsxs(
|
|
2264
2263
|
"div",
|
|
2265
2264
|
{
|
|
2266
2265
|
style: {
|
|
2267
|
-
display:
|
|
2266
|
+
display: T ? "flex" : "none",
|
|
2268
2267
|
flexDirection: "column",
|
|
2269
2268
|
gap: 8
|
|
2270
2269
|
},
|
|
@@ -2281,8 +2280,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2281
2280
|
{
|
|
2282
2281
|
className: `w-bubble-chat w-bubble-chat-regenerate ${`w-${c}`} ${s ? "w-bubble-chat-regenerate-expand" : ""}`,
|
|
2283
2282
|
children: [
|
|
2284
|
-
/* @__PURE__ */ t.jsx(er, { children:
|
|
2285
|
-
c === "response" && /* @__PURE__ */ t.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children:
|
|
2283
|
+
/* @__PURE__ */ t.jsx(er, { children: h == null ? void 0 : h.text }),
|
|
2284
|
+
c === "response" && /* @__PURE__ */ t.jsx("span", { style: { fontSize: 12, color: "rgba(0,0,0,0.4)" }, children: h == null ? void 0 : h.timestamp })
|
|
2286
2285
|
]
|
|
2287
2286
|
}
|
|
2288
2287
|
)
|
|
@@ -2293,7 +2292,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2293
2292
|
{
|
|
2294
2293
|
showFeedback: !0,
|
|
2295
2294
|
showRegenerate: !1,
|
|
2296
|
-
...
|
|
2295
|
+
...h
|
|
2297
2296
|
}
|
|
2298
2297
|
)
|
|
2299
2298
|
]
|
|
@@ -2319,14 +2318,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2319
2318
|
disabled: n === 1,
|
|
2320
2319
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "left" }),
|
|
2321
2320
|
onClick: () => {
|
|
2322
|
-
n > 1 && o((
|
|
2321
|
+
n > 1 && o((h) => h - 1);
|
|
2323
2322
|
}
|
|
2324
2323
|
}
|
|
2325
2324
|
),
|
|
2326
2325
|
/* @__PURE__ */ t.jsxs(ce.Text, { children: [
|
|
2327
2326
|
n,
|
|
2328
2327
|
" / ",
|
|
2329
|
-
(
|
|
2328
|
+
(x = e == null ? void 0 : e.chats) == null ? void 0 : x.length
|
|
2330
2329
|
] }),
|
|
2331
2330
|
/* @__PURE__ */ t.jsx(
|
|
2332
2331
|
le,
|
|
@@ -2336,8 +2335,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2336
2335
|
disabled: n === ((p = e == null ? void 0 : e.chats) == null ? void 0 : p.length),
|
|
2337
2336
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "right" }),
|
|
2338
2337
|
onClick: () => {
|
|
2339
|
-
var
|
|
2340
|
-
n < ((
|
|
2338
|
+
var h;
|
|
2339
|
+
n < ((h = e == null ? void 0 : e.chats) == null ? void 0 : h.length) && o((v) => v + 1);
|
|
2341
2340
|
}
|
|
2342
2341
|
}
|
|
2343
2342
|
)
|
|
@@ -2368,7 +2367,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2368
2367
|
var c;
|
|
2369
2368
|
const { loadingRegenerate: o, chats: r } = je(), { widgetProps: a } = ue(), s = z(() => (r == null ? void 0 : r.length) - 1 === (n == null ? void 0 : n.indexChat), [r]), i = z(() => n == null ? void 0 : n.sender, [n]);
|
|
2370
2369
|
return ((c = n == null ? void 0 : n.chats) == null ? void 0 : c.length) > 0 ? /* @__PURE__ */ t.jsx(ds, { ...n }) : o && s ? /* @__PURE__ */ t.jsx(Kt, {}) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2371
|
-
i === "response" && e && /* @__PURE__ */ t.jsx(it, { name: a == null ? void 0 : a.title, src:
|
|
2370
|
+
i === "response" && e && /* @__PURE__ */ t.jsx(it, { name: a == null ? void 0 : a.title, src: xt }),
|
|
2372
2371
|
/* @__PURE__ */ t.jsxs("div", { className: `w-bubble-chat ${`w-${i}`}`, children: [
|
|
2373
2372
|
/* @__PURE__ */ t.jsx(er, { children: n == null ? void 0 : n.text }, n == null ? void 0 : n.text),
|
|
2374
2373
|
/* @__PURE__ */ t.jsx(at, { date: n == null ? void 0 : n.timestamp, sender: i })
|
|
@@ -2376,10 +2375,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2376
2375
|
/* @__PURE__ */ t.jsx($t, { ...n })
|
|
2377
2376
|
] });
|
|
2378
2377
|
}, rt = B(gs), ps = () => {
|
|
2379
|
-
const e =
|
|
2378
|
+
const e = M(
|
|
2380
2379
|
"PleaseUploadFile",
|
|
2381
2380
|
"Please upload specify file that needed to complete your request"
|
|
2382
|
-
), n =
|
|
2381
|
+
), n = M("ClickToUpload", "Click to upload"), o = M(
|
|
2383
2382
|
"ContinueWithoutUpload",
|
|
2384
2383
|
"Continue without upload"
|
|
2385
2384
|
), { onSendMsg: r, setFile: a } = je(), s = () => {
|
|
@@ -2424,68 +2423,68 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2424
2423
|
]
|
|
2425
2424
|
}
|
|
2426
2425
|
);
|
|
2427
|
-
},
|
|
2428
|
-
const [e, n] = H(!1), [o, r] = H(!1), [a, s] = H(!1), [i, c] = H(3), [l, f] = H(!1), [
|
|
2426
|
+
}, hs = B(ps), xs = () => {
|
|
2427
|
+
const [e, n] = H(!1), [o, r] = H(!1), [a, s] = H(!1), [i, c] = H(3), [l, f] = H(!1), [x, p] = H(""), { widgetProps: h } = ue(), { onSendMsg: v, chats: j } = je(), { onSubmitPYPwd: T = () => {
|
|
2429
2428
|
}, onCheckPYAccess: w = () => {
|
|
2430
|
-
} } = (
|
|
2429
|
+
} } = (h == null ? void 0 : h.onPayslipFn) || {}, C = M(
|
|
2431
2430
|
"ProvidePasswordPayslip",
|
|
2432
2431
|
"Please provide your password account to access the download"
|
|
2433
|
-
), E =
|
|
2432
|
+
), E = M("Cancel", "Cancel"), m = M("Submit", "Submit"), S = M("Password", "Password"), d = M("IsRequired", "Is Required"), y = M(
|
|
2434
2433
|
"PrepareTheFiles",
|
|
2435
2434
|
"Prepare the files"
|
|
2436
|
-
), u =
|
|
2435
|
+
), u = M(
|
|
2437
2436
|
"AttemptPasswordExceeded",
|
|
2438
2437
|
"Your attempt to enter the password exceeded the limit"
|
|
2439
|
-
), b =
|
|
2438
|
+
), b = M(
|
|
2440
2439
|
"VerifyAccessPayslip",
|
|
2441
2440
|
"Please wait, verifying access to your payslip"
|
|
2442
|
-
), k =
|
|
2441
|
+
), k = M(
|
|
2443
2442
|
"WrongPwdPayslip",
|
|
2444
2443
|
"The password you entered is incorrect. Please try again or contact support if you need assistance"
|
|
2445
|
-
), D =
|
|
2444
|
+
), D = M(
|
|
2446
2445
|
"SessionExpired",
|
|
2447
2446
|
"Session expired. Please log in again to continue"
|
|
2448
|
-
), [R] =
|
|
2449
|
-
var G,
|
|
2450
|
-
s(!0), f(!0), (
|
|
2447
|
+
), [R] = Ce.useForm(), U = () => {
|
|
2448
|
+
var G, P, I;
|
|
2449
|
+
s(!0), f(!0), (I = (P = (G = w()) == null ? void 0 : G.then((Z) => {
|
|
2451
2450
|
var _, O;
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
})) == null ? void 0 :
|
|
2451
|
+
const K = (O = (_ = Z == null ? void 0 : Z.data) == null ? void 0 : _.DATA) == null ? void 0 : O.RESULT;
|
|
2452
|
+
K && v({ msg: "Valid" }), n(K), p("");
|
|
2453
|
+
})) == null ? void 0 : P.catch((Z) => {
|
|
2455
2454
|
p(Z == null ? void 0 : Z.toString());
|
|
2456
|
-
})) == null ||
|
|
2455
|
+
})) == null || I.finally(() => {
|
|
2457
2456
|
r(!1), f(!1);
|
|
2458
2457
|
});
|
|
2459
2458
|
}, $ = () => {
|
|
2460
2459
|
v({ msg: "cancel" }), s(!1);
|
|
2461
2460
|
}, Y = () => {
|
|
2462
|
-
var
|
|
2461
|
+
var P;
|
|
2463
2462
|
const G = R == null ? void 0 : R.getFieldValue("pwd");
|
|
2464
|
-
(
|
|
2465
|
-
var
|
|
2466
|
-
r(!0), (Z = (
|
|
2463
|
+
(P = R == null ? void 0 : R.validateFields()) == null || P.then(() => {
|
|
2464
|
+
var I, Z;
|
|
2465
|
+
r(!0), (Z = (I = T(G)) == null ? void 0 : I.then(({ data: K }) => {
|
|
2467
2466
|
var _;
|
|
2468
|
-
(_ =
|
|
2469
|
-
})) == null || Z.catch((
|
|
2470
|
-
var O, W,
|
|
2471
|
-
const _ =
|
|
2467
|
+
(_ = K == null ? void 0 : K.DATA) != null && _.ISVALID ? U() : (p(k), c(i - 1), r(!1));
|
|
2468
|
+
})) == null || Z.catch((K) => {
|
|
2469
|
+
var O, W, F, V, Q;
|
|
2470
|
+
const _ = K == null ? void 0 : K.response;
|
|
2472
2471
|
if ((_ == null ? void 0 : _.status) === 401) {
|
|
2473
|
-
const
|
|
2472
|
+
const X = (W = (O = _ == null ? void 0 : _.data) == null ? void 0 : O.ERRORS) == null ? void 0 : W.includes(
|
|
2474
2473
|
"ACCESS_TOKEN_EXPIRED"
|
|
2475
|
-
), J = (Q = (V = (
|
|
2474
|
+
), J = (Q = (V = (F = _ == null ? void 0 : _.data) == null ? void 0 : F.MESSAGE) == null ? void 0 : V.toLowerCase()) == null ? void 0 : Q.includes(
|
|
2476
2475
|
"invalid password"
|
|
2477
2476
|
);
|
|
2478
|
-
|
|
2477
|
+
X && p(D), J && (p(k), c(i - 1), r(!1));
|
|
2479
2478
|
} else
|
|
2480
|
-
p(
|
|
2479
|
+
p(K == null ? void 0 : K.toString());
|
|
2481
2480
|
r(!1);
|
|
2482
2481
|
});
|
|
2483
2482
|
});
|
|
2484
2483
|
};
|
|
2485
2484
|
return ge(() => {
|
|
2486
|
-
var
|
|
2485
|
+
var P;
|
|
2487
2486
|
const G = j == null ? void 0 : j[(j == null ? void 0 : j.length) - 1];
|
|
2488
|
-
((
|
|
2487
|
+
((P = G == null ? void 0 : G.attachment) == null ? void 0 : P.type) === "show_password_wp" && U();
|
|
2489
2488
|
}, []), a ? l ? /* @__PURE__ */ t.jsx(
|
|
2490
2489
|
rt,
|
|
2491
2490
|
{
|
|
@@ -2500,22 +2499,22 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2500
2499
|
text: u,
|
|
2501
2500
|
showResponseInfo: !1
|
|
2502
2501
|
}
|
|
2503
|
-
) :
|
|
2502
|
+
) : x ? /* @__PURE__ */ t.jsx(rt, { sender: "response", text: x, showResponseInfo: !1 }) : /* @__PURE__ */ t.jsx(
|
|
2504
2503
|
"div",
|
|
2505
2504
|
{
|
|
2506
2505
|
style: { display: "flex", flexDirection: "column" },
|
|
2507
2506
|
className: "w-bubble-chat",
|
|
2508
2507
|
children: /* @__PURE__ */ t.jsxs(
|
|
2509
|
-
|
|
2508
|
+
Ce,
|
|
2510
2509
|
{
|
|
2511
2510
|
form: R,
|
|
2512
2511
|
layout: "vertical",
|
|
2513
2512
|
style: { display: "flex", flexDirection: "column", gap: 8 },
|
|
2514
2513
|
children: [
|
|
2515
|
-
/* @__PURE__ */ t.jsx(ce.Text, { children: e ? `${y}...` :
|
|
2514
|
+
/* @__PURE__ */ t.jsx(ce.Text, { children: e ? `${y}...` : C }),
|
|
2516
2515
|
!e && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2517
2516
|
/* @__PURE__ */ t.jsx(
|
|
2518
|
-
|
|
2517
|
+
Ce.Item,
|
|
2519
2518
|
{
|
|
2520
2519
|
name: "pwd",
|
|
2521
2520
|
rules: [
|
|
@@ -2546,13 +2545,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2546
2545
|
)
|
|
2547
2546
|
}
|
|
2548
2547
|
) : null;
|
|
2549
|
-
}, ms = B(
|
|
2548
|
+
}, ms = B(xs), ys = ({ ...e }) => {
|
|
2550
2549
|
var c;
|
|
2551
|
-
const { objInitPayload: n } = ue(), [o, r] = H(!1), a =
|
|
2552
|
-
var f,
|
|
2550
|
+
const { objInitPayload: n } = ue(), [o, r] = H(!1), a = M("Error", "Error"), s = z(() => Gn(n == null ? void 0 : n.access_token), [n]), i = () => {
|
|
2551
|
+
var f, x, p, h;
|
|
2553
2552
|
r(!0);
|
|
2554
2553
|
const l = e == null ? void 0 : e.attachment;
|
|
2555
|
-
(
|
|
2554
|
+
(h = (p = (x = Je({
|
|
2556
2555
|
method: "POST",
|
|
2557
2556
|
url: l == null ? void 0 : l.endpoint,
|
|
2558
2557
|
data: l == null ? void 0 : l.body,
|
|
@@ -2564,24 +2563,24 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2564
2563
|
"Acc-Name": (f = s == null ? void 0 : s.INSTANCE) == null ? void 0 : f.toLowerCase()
|
|
2565
2564
|
},
|
|
2566
2565
|
responseType: "blob"
|
|
2567
|
-
})) == null ? void 0 :
|
|
2566
|
+
})) == null ? void 0 : x.then((v) => {
|
|
2568
2567
|
var E;
|
|
2569
|
-
const j = (E = l == null ? void 0 : l.body) == null ? void 0 : E.media,
|
|
2570
|
-
Yt({ downloadURL:
|
|
2568
|
+
const j = (E = l == null ? void 0 : l.body) == null ? void 0 : E.media, T = `${l == null ? void 0 : l.filename}.${j}`, w = new Blob([v == null ? void 0 : v.data]), C = URL == null ? void 0 : URL.createObjectURL(w);
|
|
2569
|
+
Yt({ downloadURL: C, fileName: T }), URL.revokeObjectURL(C);
|
|
2571
2570
|
})) == null ? void 0 : p.catch((v) => {
|
|
2572
|
-
var
|
|
2571
|
+
var T, w, C;
|
|
2573
2572
|
const j = v == null ? void 0 : v.message;
|
|
2574
|
-
(
|
|
2573
|
+
(T = Te) == null || T.destroy(), (w = Te) == null || w.config({
|
|
2575
2574
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
2576
2575
|
top: 28,
|
|
2577
2576
|
placement: "top"
|
|
2578
|
-
}), (
|
|
2577
|
+
}), (C = Te) == null || C.error({
|
|
2579
2578
|
message: a,
|
|
2580
2579
|
description: j,
|
|
2581
2580
|
className: "w-notification-content",
|
|
2582
2581
|
duration: 3
|
|
2583
2582
|
});
|
|
2584
|
-
})) == null ||
|
|
2583
|
+
})) == null || h.finally(() => {
|
|
2585
2584
|
r(!1);
|
|
2586
2585
|
});
|
|
2587
2586
|
};
|
|
@@ -2610,14 +2609,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2610
2609
|
}
|
|
2611
2610
|
);
|
|
2612
2611
|
}, vs = B(ys), bs = ({ ...e }) => {
|
|
2613
|
-
const n = se(), o =
|
|
2612
|
+
const n = se(), o = M("DownloadChart", "Download Chart"), r = z(() => e == null ? void 0 : e.attachment, [e == null ? void 0 : e.attachment]), a = z(() => {
|
|
2614
2613
|
var i;
|
|
2615
2614
|
return (i = r == null ? void 0 : r.data) == null ? void 0 : i.map((c, l) => {
|
|
2616
|
-
var f,
|
|
2615
|
+
var f, x;
|
|
2617
2616
|
return {
|
|
2618
2617
|
label: (f = r == null ? void 0 : r.labels) == null ? void 0 : f[l],
|
|
2619
2618
|
value: c,
|
|
2620
|
-
color: (
|
|
2619
|
+
color: (x = r == null ? void 0 : r.colors) == null ? void 0 : x[l]
|
|
2621
2620
|
};
|
|
2622
2621
|
});
|
|
2623
2622
|
}, [r]), s = () => {
|
|
@@ -2659,23 +2658,23 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2659
2658
|
}
|
|
2660
2659
|
) })
|
|
2661
2660
|
] });
|
|
2662
|
-
},
|
|
2661
|
+
}, Cs = B(bs), Ts = ({ ...e }) => {
|
|
2663
2662
|
var n, o, r, a, s;
|
|
2664
2663
|
switch (!0) {
|
|
2665
2664
|
case ((n = qe(e)) == null ? void 0 : n.text):
|
|
2666
2665
|
return /* @__PURE__ */ t.jsx(rt, { ...e });
|
|
2667
2666
|
case ((o = qe(e)) == null ? void 0 : o.upload):
|
|
2668
|
-
return /* @__PURE__ */ t.jsx(
|
|
2667
|
+
return /* @__PURE__ */ t.jsx(hs, { ...e });
|
|
2669
2668
|
case ((r = qe(e)) == null ? void 0 : r.password):
|
|
2670
2669
|
return /* @__PURE__ */ t.jsx(ms, { ...e });
|
|
2671
2670
|
case ((a = qe(e)) == null ? void 0 : a.filedownload):
|
|
2672
2671
|
return /* @__PURE__ */ t.jsx(vs, { ...e });
|
|
2673
2672
|
case ((s = qe(e)) == null ? void 0 : s.chart):
|
|
2674
|
-
return /* @__PURE__ */ t.jsx(
|
|
2673
|
+
return /* @__PURE__ */ t.jsx(Cs, { ...e });
|
|
2675
2674
|
default:
|
|
2676
2675
|
return null;
|
|
2677
2676
|
}
|
|
2678
|
-
}, Es = B(
|
|
2677
|
+
}, Es = B(Ts), Ss = () => {
|
|
2679
2678
|
const { isOpenWidget: e, widgetProps: n } = ue(), { chats: o, isWaitResponse: r } = je(), { activeTab: a } = Me();
|
|
2680
2679
|
return ge(() => {
|
|
2681
2680
|
Le();
|
|
@@ -2688,7 +2687,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2688
2687
|
it,
|
|
2689
2688
|
{
|
|
2690
2689
|
name: n == null ? void 0 : n.title,
|
|
2691
|
-
src:
|
|
2690
|
+
src: xt
|
|
2692
2691
|
}
|
|
2693
2692
|
),
|
|
2694
2693
|
/* @__PURE__ */ t.jsx(Es, { indexChat: i, ...s })
|
|
@@ -2698,7 +2697,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2698
2697
|
] }) : null;
|
|
2699
2698
|
}, ws = B(Ss), _s = () => {
|
|
2700
2699
|
var S;
|
|
2701
|
-
const e =
|
|
2700
|
+
const e = M(
|
|
2702
2701
|
"ContinueWithoutUpload",
|
|
2703
2702
|
"Continue without Upload"
|
|
2704
2703
|
), {
|
|
@@ -2710,13 +2709,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2710
2709
|
setFile: i,
|
|
2711
2710
|
chats: c,
|
|
2712
2711
|
connected: l
|
|
2713
|
-
} = je(), { isUserInputHide: f } = ue(), { isActiveTabVA:
|
|
2712
|
+
} = je(), { isUserInputHide: f } = ue(), { isActiveTabVA: x } = Me(), p = z(() => {
|
|
2714
2713
|
var y;
|
|
2715
2714
|
const d = c == null ? void 0 : c[(c == null ? void 0 : c.length) - 1];
|
|
2716
2715
|
return (d == null ? void 0 : d.sender) === "response" && ((y = d == null ? void 0 : d.attachment) == null ? void 0 : y.type) === "fileuploader";
|
|
2717
|
-
}, [c]),
|
|
2716
|
+
}, [c]), h = se(), [v, j] = H(!1), [T, w] = H(!1), C = z(() => r || !T, [T, r]), E = () => {
|
|
2718
2717
|
var u, b, k, D;
|
|
2719
|
-
const d = (k = (b = (u =
|
|
2718
|
+
const d = (k = (b = (u = h == null ? void 0 : h.current) == null ? void 0 : u.resizableTextArea) == null ? void 0 : b.textArea) == null ? void 0 : k.value;
|
|
2720
2719
|
if (!(d != null && d.trim()) || r) return;
|
|
2721
2720
|
w(!1), n({ msg: d }), j(!v);
|
|
2722
2721
|
const y = {
|
|
@@ -2731,8 +2730,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2731
2730
|
};
|
|
2732
2731
|
return ge(() => {
|
|
2733
2732
|
var d;
|
|
2734
|
-
|
|
2735
|
-
}, [
|
|
2733
|
+
h != null && h.current && x && ((d = h == null ? void 0 : h.current) == null || d.focus());
|
|
2734
|
+
}, [x]), f ? null : p ? /* @__PURE__ */ t.jsxs("div", { className: "w-input-container", style: { alignItems: "center" }, children: [
|
|
2736
2735
|
/* @__PURE__ */ t.jsx(ce.Text, { children: s == null ? void 0 : s.name }),
|
|
2737
2736
|
((S = Object == null ? void 0 : Object.keys(s || {})) == null ? void 0 : S.length) > 0 ? /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
2738
2737
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2772,7 +2771,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2772
2771
|
{
|
|
2773
2772
|
className: "w-input-widget",
|
|
2774
2773
|
disabled: !l,
|
|
2775
|
-
ref:
|
|
2774
|
+
ref: h,
|
|
2776
2775
|
placeholder: "Type a message...",
|
|
2777
2776
|
onKeyDown: (d) => {
|
|
2778
2777
|
((d == null ? void 0 : d.code) === "Enter" || (d == null ? void 0 : d.key) === "Enter") && !(d != null && d.shiftKey) && E();
|
|
@@ -2798,8 +2797,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2798
2797
|
) : /* @__PURE__ */ t.jsx(
|
|
2799
2798
|
le,
|
|
2800
2799
|
{
|
|
2801
|
-
className: `w-send-btn ${
|
|
2802
|
-
disabled:
|
|
2800
|
+
className: `w-send-btn ${C ? "w-send-btn-disabled" : ""}`,
|
|
2801
|
+
disabled: C,
|
|
2803
2802
|
style: { backgroundColor: "var(--primary-color, #395ebc)" },
|
|
2804
2803
|
icon: /* @__PURE__ */ t.jsx(pe, { type: "send" }),
|
|
2805
2804
|
shape: "circle",
|
|
@@ -2808,7 +2807,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2808
2807
|
)
|
|
2809
2808
|
] });
|
|
2810
2809
|
}, js = B(_s), ks = ({ taskStatus: e }) => {
|
|
2811
|
-
const n =
|
|
2810
|
+
const n = M("InProgress", "In Progress"), o = M("New", "New"), r = M("Closed", "Closed"), a = M("Done", "Done"), s = M("HDCancelled", "Cancelled"), i = {
|
|
2812
2811
|
"In Progress": n,
|
|
2813
2812
|
Open: o,
|
|
2814
2813
|
New: o,
|
|
@@ -2888,9 +2887,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2888
2887
|
};
|
|
2889
2888
|
}, [e]);
|
|
2890
2889
|
return async (s) => {
|
|
2891
|
-
var f,
|
|
2890
|
+
var f, x, p;
|
|
2892
2891
|
const { onSuccess: i, onError: c, onFinally: l } = s ?? {};
|
|
2893
|
-
(p = (
|
|
2892
|
+
(p = (x = (f = Je({
|
|
2894
2893
|
url: e == null ? void 0 : e.uriBackend,
|
|
2895
2894
|
params: {
|
|
2896
2895
|
ofid: "sfsystem.RefreshToken",
|
|
@@ -2901,9 +2900,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2901
2900
|
},
|
|
2902
2901
|
headers: r,
|
|
2903
2902
|
method: "POST"
|
|
2904
|
-
})) == null ? void 0 : f.then((
|
|
2905
|
-
var
|
|
2906
|
-
const v = (
|
|
2903
|
+
})) == null ? void 0 : f.then((h) => {
|
|
2904
|
+
var T;
|
|
2905
|
+
const v = (T = h == null ? void 0 : h.data) == null ? void 0 : T.DATA, j = {
|
|
2907
2906
|
access_token: v == null ? void 0 : v.JWT_TOKEN,
|
|
2908
2907
|
refresh_token: e == null ? void 0 : e.refresh_token,
|
|
2909
2908
|
uagent: e == null ? void 0 : e.uagent,
|
|
@@ -2916,9 +2915,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2916
2915
|
uriBackendHRMGO: e == null ? void 0 : e.uriBackendHRMGO,
|
|
2917
2916
|
config: e == null ? void 0 : e.config
|
|
2918
2917
|
};
|
|
2919
|
-
n(j), typeof i == "function" && i(
|
|
2920
|
-
})) == null ? void 0 :
|
|
2921
|
-
typeof c == "function" && c(
|
|
2918
|
+
n(j), typeof i == "function" && i(h);
|
|
2919
|
+
})) == null ? void 0 : x.catch((h) => {
|
|
2920
|
+
typeof c == "function" && c(h);
|
|
2922
2921
|
})) == null || p.finally(() => {
|
|
2923
2922
|
typeof l == "function" && l();
|
|
2924
2923
|
});
|
|
@@ -2935,24 +2934,24 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2935
2934
|
url: c,
|
|
2936
2935
|
endpoint: l,
|
|
2937
2936
|
method: f = "POST",
|
|
2938
|
-
headers:
|
|
2937
|
+
headers: x,
|
|
2939
2938
|
...p
|
|
2940
2939
|
}) => {
|
|
2941
|
-
var
|
|
2942
|
-
const
|
|
2940
|
+
var T, w, C, E, m, S;
|
|
2941
|
+
const h = {
|
|
2943
2942
|
url: c || `${n == null ? void 0 : n.uriBackendHRMGO}${l}`,
|
|
2944
2943
|
...e.current && {
|
|
2945
|
-
signal: (
|
|
2944
|
+
signal: (T = e == null ? void 0 : e.current) == null ? void 0 : T.signal
|
|
2946
2945
|
},
|
|
2947
2946
|
headers: {
|
|
2948
2947
|
...a,
|
|
2949
|
-
...
|
|
2948
|
+
...x,
|
|
2950
2949
|
"Company-Code": n == null ? void 0 : n.companycode
|
|
2951
2950
|
},
|
|
2952
2951
|
method: f,
|
|
2953
2952
|
...p
|
|
2954
|
-
}, v = (w = Je) == null ? void 0 : w.create(
|
|
2955
|
-
return (E = (
|
|
2953
|
+
}, v = (w = Je) == null ? void 0 : w.create(h);
|
|
2954
|
+
return (E = (C = v == null ? void 0 : v.interceptors) == null ? void 0 : C.request) == null || E.use(
|
|
2956
2955
|
(d) => (n != null && n.access_token && (d.headers.Authorization = `Bearer ${n == null ? void 0 : n.access_token}`), d),
|
|
2957
2956
|
(d) => {
|
|
2958
2957
|
Promise.reject(d);
|
|
@@ -2968,16 +2967,16 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2968
2967
|
}
|
|
2969
2968
|
return Promise == null ? void 0 : Promise.reject(d);
|
|
2970
2969
|
}
|
|
2971
|
-
), await (v == null ? void 0 : v.request(
|
|
2970
|
+
), await (v == null ? void 0 : v.request(h));
|
|
2972
2971
|
};
|
|
2973
2972
|
return s.abort = () => {
|
|
2974
2973
|
var c;
|
|
2975
2974
|
e != null && e.current && ((c = e == null ? void 0 : e.current) == null || c.abort(), e.current = new AbortController());
|
|
2976
2975
|
}, ge(() => () => s.abort(), []), s;
|
|
2977
2976
|
}, sr = He({}), Ne = () => Ue(sr), Os = ({ children: e }) => {
|
|
2978
|
-
const n = vt(), [o, r] = H([]), [a, s] = H(""), [i, c] = H(!1), [l, f] = H(!0), [
|
|
2979
|
-
var j,
|
|
2980
|
-
f(!0), (
|
|
2977
|
+
const n = vt(), [o, r] = H([]), [a, s] = H(""), [i, c] = H(!1), [l, f] = H(!0), [x, p] = H(0), h = (v) => {
|
|
2978
|
+
var j, T, w, C;
|
|
2979
|
+
f(!0), (C = (w = n({
|
|
2981
2980
|
endpoint: "/helpdesk/myticket/ticket-list",
|
|
2982
2981
|
method: "POST",
|
|
2983
2982
|
data: {
|
|
@@ -2989,7 +2988,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
2989
2988
|
...((j = Object.keys(v || {})) == null ? void 0 : j.length) > 0 && {
|
|
2990
2989
|
...v,
|
|
2991
2990
|
...(v == null ? void 0 : v.CREATED_DATE) && {
|
|
2992
|
-
CREATED_DATE: (
|
|
2991
|
+
CREATED_DATE: (T = Se(v == null ? void 0 : v.CREATED_DATE)) == null ? void 0 : T.format(Bt)
|
|
2993
2992
|
}
|
|
2994
2993
|
}
|
|
2995
2994
|
},
|
|
@@ -3001,12 +3000,12 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3001
3000
|
})) == null ? void 0 : w.then((E) => {
|
|
3002
3001
|
var m, S, d;
|
|
3003
3002
|
(m = E == null ? void 0 : E.data) != null && m.DATA && r((d = (S = E == null ? void 0 : E.data) == null ? void 0 : S.DATA) == null ? void 0 : d.LIST);
|
|
3004
|
-
})) == null ||
|
|
3003
|
+
})) == null || C.finally(() => {
|
|
3005
3004
|
f(!1);
|
|
3006
3005
|
});
|
|
3007
3006
|
};
|
|
3008
3007
|
return ge(() => {
|
|
3009
|
-
|
|
3008
|
+
h();
|
|
3010
3009
|
}, []), /* @__PURE__ */ t.jsx(
|
|
3011
3010
|
sr.Provider,
|
|
3012
3011
|
{
|
|
@@ -3014,18 +3013,18 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3014
3013
|
listTicket: o,
|
|
3015
3014
|
ticketId: a,
|
|
3016
3015
|
setTicketId: s,
|
|
3017
|
-
getListTicket:
|
|
3016
|
+
getListTicket: h,
|
|
3018
3017
|
openFilter: i,
|
|
3019
3018
|
setOpenFilter: c,
|
|
3020
3019
|
loadingListTicket: l,
|
|
3021
|
-
countFilters:
|
|
3020
|
+
countFilters: x,
|
|
3022
3021
|
setCountFilters: p
|
|
3023
3022
|
},
|
|
3024
3023
|
children: e
|
|
3025
3024
|
}
|
|
3026
3025
|
);
|
|
3027
3026
|
}, Ds = () => {
|
|
3028
|
-
const e =
|
|
3027
|
+
const e = M("SubjectSearch", "Subject Search"), n = M("AdvanceFilter", "Advance Filter"), o = se(null), { getListTicket: r, setOpenFilter: a, loadingListTicket: s, countFilters: i } = Ne();
|
|
3029
3028
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, marginBottom: 12 }, children: [
|
|
3030
3029
|
/* @__PURE__ */ t.jsx(
|
|
3031
3030
|
st,
|
|
@@ -3053,7 +3052,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3053
3052
|
) }) })
|
|
3054
3053
|
] }) });
|
|
3055
3054
|
}, Ls = B(Ds), ir = He({}), Fe = () => Ue(ir), Ms = ({ children: e }) => {
|
|
3056
|
-
const n = se(null), o = se(0), r = se(!1), a = se(null), [s, i] = H([]), [c, l] = H(0), [f,
|
|
3055
|
+
const n = se(null), o = se(0), r = se(!1), a = se(null), [s, i] = H([]), [c, l] = H(0), [f, x] = H(!1), { objInitPayload: p, parsedJWT: h, isFirstRenderHelpdesk: v, setShowReadyWSHD: j } = ue(), T = or(), w = (S) => {
|
|
3057
3056
|
const d = new WebSocket(S);
|
|
3058
3057
|
d.onopen = () => {
|
|
3059
3058
|
r.current = !0, o.current = 0, l(0), j(!0);
|
|
@@ -3063,9 +3062,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3063
3062
|
console.warn(
|
|
3064
3063
|
`${Ge} - WebSocket disconnected:`,
|
|
3065
3064
|
y
|
|
3066
|
-
), r.current = !1, j(!1), !(y != null && y.wasClean) && (o == null ? void 0 : o.current) < nt && (o.current += 1, l((u) => u + 1), clearTimeout(a.current), a.current = setTimeout(
|
|
3065
|
+
), r.current = !1, j(!1), !(y != null && y.wasClean) && (o == null ? void 0 : o.current) < nt && (o.current += 1, l((u) => u + 1), clearTimeout(a.current), a.current = setTimeout(C, 2e3));
|
|
3067
3066
|
}, d.onmessage = E(d), n.current = d;
|
|
3068
|
-
},
|
|
3067
|
+
}, C = async () => {
|
|
3069
3068
|
var U, $, Y;
|
|
3070
3069
|
if (((U = n.current) == null ? void 0 : U.readyState) === (WebSocket == null ? void 0 : WebSocket.CONNECTING)) return;
|
|
3071
3070
|
const {
|
|
@@ -3085,13 +3084,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3085
3084
|
COMPANY_ID: d.toString(),
|
|
3086
3085
|
COMPANY_CODE: y.toLowerCase(),
|
|
3087
3086
|
LANGUAGE: u,
|
|
3088
|
-
ACC_NAME: (Y =
|
|
3087
|
+
ACC_NAME: (Y = h == null ? void 0 : h.INSTANCE) == null ? void 0 : Y.toLowerCase(),
|
|
3089
3088
|
TOKEN: k
|
|
3090
3089
|
};
|
|
3091
3090
|
try {
|
|
3092
|
-
const G = await
|
|
3091
|
+
const G = await To(
|
|
3093
3092
|
R,
|
|
3094
|
-
|
|
3093
|
+
xo
|
|
3095
3094
|
);
|
|
3096
3095
|
if (!G || r.current || (o == null ? void 0 : o.current) >= nt) {
|
|
3097
3096
|
console.warn(
|
|
@@ -3113,9 +3112,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3113
3112
|
S.send("PONG");
|
|
3114
3113
|
else {
|
|
3115
3114
|
const { DATA: u, EVENT: b } = JSON.parse(d.data || "{}");
|
|
3116
|
-
!v.current && b === "USER_ONLINE_NOTIF" && Array.isArray(u == null ? void 0 : u.EMPLOYEES) && (i((y = u == null ? void 0 : u.EMPLOYEES) == null ? void 0 : y.filter(Boolean)), v.current = !0), b === "TOKEN_EXPIRED" &&
|
|
3115
|
+
!v.current && b === "USER_ONLINE_NOTIF" && Array.isArray(u == null ? void 0 : u.EMPLOYEES) && (i((y = u == null ? void 0 : u.EMPLOYEES) == null ? void 0 : y.filter(Boolean)), v.current = !0), b === "TOKEN_EXPIRED" && T({
|
|
3117
3116
|
onSuccess: () => {
|
|
3118
|
-
|
|
3117
|
+
C();
|
|
3119
3118
|
}
|
|
3120
3119
|
});
|
|
3121
3120
|
}
|
|
@@ -3136,7 +3135,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3136
3135
|
);
|
|
3137
3136
|
};
|
|
3138
3137
|
return ge(() => {
|
|
3139
|
-
v.current ||
|
|
3138
|
+
v.current || C();
|
|
3140
3139
|
}, []), /* @__PURE__ */ t.jsx(
|
|
3141
3140
|
ir.Provider,
|
|
3142
3141
|
{
|
|
@@ -3144,12 +3143,12 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3144
3143
|
ws: n == null ? void 0 : n.current,
|
|
3145
3144
|
onSendMsg: m,
|
|
3146
3145
|
userOnline: s,
|
|
3147
|
-
connectWebSocket:
|
|
3146
|
+
connectWebSocket: C,
|
|
3148
3147
|
retryCountState: c,
|
|
3149
3148
|
setRetryCountState: l,
|
|
3150
3149
|
retryCountRef: o,
|
|
3151
3150
|
isGetResponse: f,
|
|
3152
|
-
setGetResponse:
|
|
3151
|
+
setGetResponse: x
|
|
3153
3152
|
},
|
|
3154
3153
|
children: e
|
|
3155
3154
|
}
|
|
@@ -3202,8 +3201,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3202
3201
|
)
|
|
3203
3202
|
] });
|
|
3204
3203
|
}, Fs = B(Ns), Is = ({ children: e, open: n, onClose: o, footer: r, styleContainer: a }) => {
|
|
3205
|
-
var
|
|
3206
|
-
const [s, i] = H(!1), c = se(), l = se(null), f = se(),
|
|
3204
|
+
var h;
|
|
3205
|
+
const [s, i] = H(!1), c = se(), l = se(null), f = se(), x = z(() => n ? "w-fade-in-animate" : "w-fade-out-animate", [n]), p = (v) => {
|
|
3207
3206
|
v.code === "Escape" && !v.shiftKey && !v.altKey && !v.ctrlKey && v.key === "Escape" && (v.stopPropagation(), typeof o == "function" && o());
|
|
3208
3207
|
};
|
|
3209
3208
|
return ge(() => {
|
|
@@ -3218,13 +3217,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3218
3217
|
}, [n]), /* @__PURE__ */ t.jsxs(
|
|
3219
3218
|
"div",
|
|
3220
3219
|
{
|
|
3221
|
-
className: `${
|
|
3220
|
+
className: `${x}`,
|
|
3222
3221
|
tabIndex: 1,
|
|
3223
3222
|
ref: f,
|
|
3224
3223
|
style: {
|
|
3225
3224
|
display: s ? "none" : "block",
|
|
3226
3225
|
height: "100%",
|
|
3227
|
-
...((
|
|
3226
|
+
...((h = Object == null ? void 0 : Object.keys(a || {})) == null ? void 0 : h.length) > 0 && {
|
|
3228
3227
|
...a
|
|
3229
3228
|
}
|
|
3230
3229
|
},
|
|
@@ -3235,7 +3234,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3235
3234
|
}
|
|
3236
3235
|
);
|
|
3237
3236
|
}, ar = B(Is), cr = He({}), Ze = () => Ue(cr), $s = ({ children: e }) => {
|
|
3238
|
-
const [n, o] = H([]), [r, a] = H({}), [s, i] = H(!0), [c, l] = H({}), f = se(!1),
|
|
3237
|
+
const [n, o] = H([]), [r, a] = H({}), [s, i] = H(!0), [c, l] = H({}), f = se(!1), x = vt(), { ticketId: p } = Ne(), { ws: h, setGetResponse: v } = Fe(), { parsedJWT: j } = ue(), T = z(() => {
|
|
3239
3238
|
var b;
|
|
3240
3239
|
const S = (r == null ? void 0 : r.CREATED_BY) ?? {}, d = (r == null ? void 0 : r.ASSIGNEE) ?? {}, y = (r == null ? void 0 : r.OTHER_ASSIGNEE) ?? [], u = (b = [S, d, ...y].map((k) => ({
|
|
3241
3240
|
...k
|
|
@@ -3246,7 +3245,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3246
3245
|
return Vt({ ArrObj: u, key: "EMP_ID" });
|
|
3247
3246
|
}, [r]), w = () => {
|
|
3248
3247
|
var S, d;
|
|
3249
|
-
i(!0), (d = (S =
|
|
3248
|
+
i(!0), (d = (S = x({
|
|
3250
3249
|
endpoint: "/helpdesk/chat/list",
|
|
3251
3250
|
method: "POST",
|
|
3252
3251
|
data: {
|
|
@@ -3263,15 +3262,15 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3263
3262
|
...Y == null ? void 0 : Y.ACTOR
|
|
3264
3263
|
}
|
|
3265
3264
|
}));
|
|
3266
|
-
o(
|
|
3265
|
+
o(ht($));
|
|
3267
3266
|
} else
|
|
3268
3267
|
o({});
|
|
3269
3268
|
})) == null || d.finally(() => {
|
|
3270
3269
|
i(!1);
|
|
3271
3270
|
});
|
|
3272
|
-
},
|
|
3271
|
+
}, C = () => {
|
|
3273
3272
|
var S;
|
|
3274
|
-
(S =
|
|
3273
|
+
(S = x({
|
|
3275
3274
|
endpoint: "/helpdesk/myticket/get",
|
|
3276
3275
|
method: "POST",
|
|
3277
3276
|
data: {
|
|
@@ -3293,7 +3292,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3293
3292
|
[d]: !1
|
|
3294
3293
|
})), f.current || o((b) => {
|
|
3295
3294
|
const k = zt(b), D = d == y ? "to" : "from", R = [...k, { ...S, CHAT_ALIGN: D }];
|
|
3296
|
-
return
|
|
3295
|
+
return ht(R);
|
|
3297
3296
|
}), f.current = !1;
|
|
3298
3297
|
}, m = (S) => {
|
|
3299
3298
|
if ((S == null ? void 0 : S.data) !== "PING") {
|
|
@@ -3301,8 +3300,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3301
3300
|
(u === "RECEIVE_MESSAGE" || u === "RECEIVE_ANOTHER_MESSAGE") && E(y);
|
|
3302
3301
|
}
|
|
3303
3302
|
};
|
|
3304
|
-
return ge(() => (p && (w(),
|
|
3305
|
-
|
|
3303
|
+
return ge(() => (p && (w(), C()), h && p && (h == null || h.addEventListener("message", m)), () => {
|
|
3304
|
+
h && p && (h == null || h.removeEventListener("message", m));
|
|
3306
3305
|
}), [p]), /* @__PURE__ */ t.jsx(
|
|
3307
3306
|
cr.Provider,
|
|
3308
3307
|
{
|
|
@@ -3310,7 +3309,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3310
3309
|
chats: n,
|
|
3311
3310
|
setChats: o,
|
|
3312
3311
|
detailTicket: r,
|
|
3313
|
-
employees:
|
|
3312
|
+
employees: T,
|
|
3314
3313
|
isFromSelf: f,
|
|
3315
3314
|
loadingChats: s,
|
|
3316
3315
|
objTypingOtherEmp: c,
|
|
@@ -3354,11 +3353,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3354
3353
|
cursor: "pointer"
|
|
3355
3354
|
},
|
|
3356
3355
|
children: o == null ? void 0 : o.map((l, f) => {
|
|
3357
|
-
const
|
|
3356
|
+
const x = s == null ? void 0 : s.includes(l == null ? void 0 : l.EMP_ID);
|
|
3358
3357
|
return /* @__PURE__ */ t.jsx(Ke, { title: l == null ? void 0 : l.FULL_NAME, trigger: c, children: /* @__PURE__ */ Ht(
|
|
3359
3358
|
$e,
|
|
3360
3359
|
{
|
|
3361
|
-
...
|
|
3360
|
+
...x && {
|
|
3362
3361
|
style: {
|
|
3363
3362
|
border: "2px solid green",
|
|
3364
3363
|
borderRadius: "50%"
|
|
@@ -3421,13 +3420,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3421
3420
|
)
|
|
3422
3421
|
] });
|
|
3423
3422
|
}, Bs = B(Ws), Ys = ({ ...e }) => {
|
|
3424
|
-
const n =
|
|
3423
|
+
const n = M("Download", "Download"), o = z(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), r = z(() => {
|
|
3425
3424
|
var l;
|
|
3426
3425
|
const c = e == null ? void 0 : e.ATTACHMENT;
|
|
3427
3426
|
if (c)
|
|
3428
3427
|
try {
|
|
3429
|
-
const f = new URL(c),
|
|
3430
|
-
return
|
|
3428
|
+
const f = new URL(c), x = (l = f == null ? void 0 : f.pathname) == null ? void 0 : l.split("/");
|
|
3429
|
+
return x == null ? void 0 : x[(x == null ? void 0 : x.length) - 1];
|
|
3431
3430
|
} catch {
|
|
3432
3431
|
return c;
|
|
3433
3432
|
}
|
|
@@ -3451,7 +3450,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3451
3450
|
className: `w-bubble-chat ${`w-${o}`}`,
|
|
3452
3451
|
style: { display: "flex", flexDirection: "column" },
|
|
3453
3452
|
children: [
|
|
3454
|
-
s ? /* @__PURE__ */ t.jsx(qt, { src: e == null ? void 0 : e.ATTACHMENT, fallback:
|
|
3453
|
+
s ? /* @__PURE__ */ t.jsx(qt, { src: e == null ? void 0 : e.ATTACHMENT, fallback: ho }) : /* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
|
|
3455
3454
|
/* @__PURE__ */ t.jsx(pe, { type: "file" }),
|
|
3456
3455
|
/* @__PURE__ */ t.jsx(
|
|
3457
3456
|
ce.Link,
|
|
@@ -3521,19 +3520,19 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3521
3520
|
};
|
|
3522
3521
|
return {
|
|
3523
3522
|
paramsEncrypt: (i) => {
|
|
3524
|
-
const [c, l = null] = i.split("?"), f = c.split("/").map((
|
|
3525
|
-
const [, p = null] =
|
|
3526
|
-
return p && (e != null && e.keyEncrypt) ? a(p) :
|
|
3523
|
+
const [c, l = null] = i.split("?"), f = c.split("/").map((x) => {
|
|
3524
|
+
const [, p = null] = x.split(":");
|
|
3525
|
+
return p && (e != null && e.keyEncrypt) ? a(p) : x;
|
|
3527
3526
|
}).join("/");
|
|
3528
3527
|
return l ? `${f}?${l}` : f;
|
|
3529
3528
|
},
|
|
3530
3529
|
encrypt: a
|
|
3531
3530
|
};
|
|
3532
3531
|
}, qs = ({ ...e }) => {
|
|
3533
|
-
const n =
|
|
3532
|
+
const n = M("ViewFAQ", "View FAQ"), o = M(
|
|
3534
3533
|
"FAQUnavailable",
|
|
3535
3534
|
"FAQ unavailable"
|
|
3536
|
-
), r =
|
|
3535
|
+
), r = M(
|
|
3537
3536
|
"ThisFAQIsUnavailable",
|
|
3538
3537
|
"This FAQ is unavailable"
|
|
3539
3538
|
), { paramsEncrypt: a } = lr(), { widgetProps: s } = ue(), i = z(() => (e == null ? void 0 : e.CHAT_ALIGN) === "to" ? "client" : "response", [e]), c = z(() => e == null ? void 0 : e.FAQ_ID, [e]);
|
|
@@ -3587,25 +3586,25 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3587
3586
|
}
|
|
3588
3587
|
}, Xs = B(Ps), Js = () => {
|
|
3589
3588
|
var j;
|
|
3590
|
-
const [e, n] = H([]), o =
|
|
3591
|
-
const
|
|
3589
|
+
const [e, n] = H([]), o = M("And", "and"), r = M("IsTyping", "Is Typing"), a = M("People", "People"), { employees: s, setTypingOtherEmp: i, objTypingOtherEmp: c } = Ze(), { ws: l, setGetResponse: f } = Fe(), { parsedJWT: x } = ue(), p = z(() => e == null ? void 0 : e.filter((T) => c == null ? void 0 : c[T == null ? void 0 : T.EMP_ID]), [c, e]), h = z(() => {
|
|
3590
|
+
const T = p == null ? void 0 : p.map((w) => w == null ? void 0 : w.FULL_NAME);
|
|
3592
3591
|
if ((p == null ? void 0 : p.length) > 2) {
|
|
3593
|
-
const w =
|
|
3594
|
-
return `${w == null ? void 0 : w.join(", ")}, ${o} ${
|
|
3592
|
+
const w = T == null ? void 0 : T.filter((E, m) => m <= 1), C = T == null ? void 0 : T.filter((E, m) => m > 1);
|
|
3593
|
+
return `${w == null ? void 0 : w.join(", ")}, ${o} ${C == null ? void 0 : C.length} ${a} ${r}`;
|
|
3595
3594
|
}
|
|
3596
|
-
return `${
|
|
3597
|
-
}, [e, p]), v = (
|
|
3598
|
-
if ((
|
|
3599
|
-
const w = JSON.parse((
|
|
3595
|
+
return `${T == null ? void 0 : T.join(", ")} ${r}`;
|
|
3596
|
+
}, [e, p]), v = (T) => {
|
|
3597
|
+
if ((T == null ? void 0 : T.data) !== "PING") {
|
|
3598
|
+
const w = JSON.parse((T == null ? void 0 : T.data) || "{}"), { DATA: C = {}, EVENT: E = "" } = w ?? {}, m = C == null ? void 0 : C.EMPLOYEE_ID, S = x == null ? void 0 : x.EMP_ID;
|
|
3600
3599
|
if (E === "TYPING") {
|
|
3601
3600
|
m === S ? f(!1) : i((u) => ({
|
|
3602
3601
|
...u,
|
|
3603
|
-
[m]:
|
|
3602
|
+
[m]: C == null ? void 0 : C.IS_TYPING
|
|
3604
3603
|
}));
|
|
3605
3604
|
const d = s == null ? void 0 : s.find(
|
|
3606
|
-
(u) => (u == null ? void 0 : u.EMP_ID) === (
|
|
3605
|
+
(u) => (u == null ? void 0 : u.EMP_ID) === (C == null ? void 0 : C.EMPLOYEE_ID)
|
|
3607
3606
|
), y = {
|
|
3608
|
-
...
|
|
3607
|
+
...C,
|
|
3609
3608
|
...d
|
|
3610
3609
|
};
|
|
3611
3610
|
n((u) => {
|
|
@@ -3620,7 +3619,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3620
3619
|
};
|
|
3621
3620
|
return ge(() => (l && (l == null || l.addEventListener("message", v)), () => {
|
|
3622
3621
|
l && (l == null || l.removeEventListener("message", v));
|
|
3623
|
-
}), [s]), (j = Object.values(c || {})) != null && j.every((
|
|
3622
|
+
}), [s]), (j = Object.values(c || {})) != null && j.every((T) => T === !1) ? null : /* @__PURE__ */ t.jsxs(
|
|
3624
3623
|
"div",
|
|
3625
3624
|
{
|
|
3626
3625
|
style: {
|
|
@@ -3639,10 +3638,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3639
3638
|
backgroundColor: "#fde3cf",
|
|
3640
3639
|
cursor: "pointer"
|
|
3641
3640
|
},
|
|
3642
|
-
children: p == null ? void 0 : p.map((
|
|
3641
|
+
children: p == null ? void 0 : p.map((T, w) => /* @__PURE__ */ t.jsx(Ke, { title: T == null ? void 0 : T.FULL_NAME, children: /* @__PURE__ */ t.jsx($e, { src: T == null ? void 0 : T.PHOTO, nameFallback: T == null ? void 0 : T.FULL_NAME }) }, w))
|
|
3643
3642
|
}
|
|
3644
3643
|
),
|
|
3645
|
-
/* @__PURE__ */ t.jsx(ce.Text, { children:
|
|
3644
|
+
/* @__PURE__ */ t.jsx(ce.Text, { children: h }),
|
|
3646
3645
|
(p == null ? void 0 : p.length) > 0 ? /* @__PURE__ */ t.jsx(nr, {}) : null
|
|
3647
3646
|
]
|
|
3648
3647
|
}
|
|
@@ -3664,18 +3663,18 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3664
3663
|
const c = e == null ? void 0 : e[i];
|
|
3665
3664
|
return /* @__PURE__ */ t.jsxs(pt, { children: [
|
|
3666
3665
|
/* @__PURE__ */ t.jsx("div", { className: "w-datekey-chats", children: (l = Se(i)) == null ? void 0 : l.format("ddd, DD MMMM YYYY") }),
|
|
3667
|
-
/* @__PURE__ */ t.jsx("div", { className: "w-bubble-chat-container", children: (f = Kn(c)) == null ? void 0 : f.map((
|
|
3668
|
-
var j,
|
|
3669
|
-
const
|
|
3666
|
+
/* @__PURE__ */ t.jsx("div", { className: "w-bubble-chat-container", children: (f = Kn(c)) == null ? void 0 : f.map((x, p) => {
|
|
3667
|
+
var j, T;
|
|
3668
|
+
const h = (x == null ? void 0 : x.CHAT_ALIGN) === "to" ? "client" : "response", v = x == null ? void 0 : x.CHAT_TYPE;
|
|
3670
3669
|
return /* @__PURE__ */ t.jsxs(pt, { children: [
|
|
3671
|
-
|
|
3670
|
+
h === "response" && v !== "info" && /* @__PURE__ */ t.jsx(
|
|
3672
3671
|
it,
|
|
3673
3672
|
{
|
|
3674
|
-
src: (j =
|
|
3675
|
-
name: (
|
|
3673
|
+
src: (j = x == null ? void 0 : x.ACTOR) == null ? void 0 : j.PHOTO,
|
|
3674
|
+
name: (T = x == null ? void 0 : x.ACTOR) == null ? void 0 : T.FULL_NAME
|
|
3676
3675
|
}
|
|
3677
3676
|
),
|
|
3678
|
-
/* @__PURE__ */ t.jsx(Xs, { ...
|
|
3677
|
+
/* @__PURE__ */ t.jsx(Xs, { ...x })
|
|
3679
3678
|
] }, p);
|
|
3680
3679
|
}) })
|
|
3681
3680
|
] }, i);
|
|
@@ -3784,14 +3783,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3784
3783
|
}
|
|
3785
3784
|
);
|
|
3786
3785
|
}, oi = B(ri), si = ({ setLoadingUpload: e, isLoadingUpload: n }) => {
|
|
3787
|
-
var
|
|
3788
|
-
const o = vt(), [r, a] = H({}), s = se(null), i =
|
|
3786
|
+
var C, E;
|
|
3787
|
+
const o = vt(), [r, a] = H({}), s = se(null), i = M(
|
|
3789
3788
|
"ImageMustSmallerThan",
|
|
3790
3789
|
"Image must smaller than"
|
|
3791
|
-
), c =
|
|
3790
|
+
), c = M(
|
|
3792
3791
|
"MaximumFileSizeExceeded",
|
|
3793
3792
|
"Maximum file size exceeded"
|
|
3794
|
-
), { onSendMsg: l } = Fe(), { employees: f, setChats:
|
|
3793
|
+
), { onSendMsg: l } = Fe(), { employees: f, setChats: x, isFromSelf: p } = Ze(), { ticketId: h } = Ne(), { activeTab: v } = Me(), j = () => {
|
|
3795
3794
|
var m;
|
|
3796
3795
|
(m = o({
|
|
3797
3796
|
endpoint: "/upload/get-upload-config",
|
|
@@ -3807,14 +3806,14 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3807
3806
|
const d = (u = (y = S == null ? void 0 : S.data) == null ? void 0 : y.DATA) == null ? void 0 : u.LIST;
|
|
3808
3807
|
(d == null ? void 0 : d.length) > 0 && a(d == null ? void 0 : d[0]);
|
|
3809
3808
|
});
|
|
3810
|
-
},
|
|
3809
|
+
}, T = (m) => {
|
|
3811
3810
|
var y, u, b;
|
|
3812
3811
|
const S = m.size / 1024 / 1024, d = (r == null ? void 0 : r.MAXFILESIZE) / 1024;
|
|
3813
|
-
return S > d && ((y =
|
|
3812
|
+
return S > d && ((y = Te) == null || y.destroy(), (u = Te) == null || u.config({
|
|
3814
3813
|
getContainer: () => document.querySelector(".w-widget-content-container"),
|
|
3815
3814
|
top: 28,
|
|
3816
3815
|
placement: "top"
|
|
3817
|
-
}), (b =
|
|
3816
|
+
}), (b = Te) == null || b.error({
|
|
3818
3817
|
message: c,
|
|
3819
3818
|
description: `${i} ${d == null ? void 0 : d.toFixed(
|
|
3820
3819
|
1
|
|
@@ -3843,9 +3842,9 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3843
3842
|
CHAT_ALIGN: "to",
|
|
3844
3843
|
CHAT_TYPE: "chat"
|
|
3845
3844
|
};
|
|
3846
|
-
|
|
3847
|
-
const
|
|
3848
|
-
return
|
|
3845
|
+
x((G) => {
|
|
3846
|
+
const I = [...zt(G), Y];
|
|
3847
|
+
return ht(I);
|
|
3849
3848
|
}), p.current = !0, l({
|
|
3850
3849
|
event: "SEND_MESSAGE",
|
|
3851
3850
|
data: {
|
|
@@ -3853,7 +3852,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3853
3852
|
FAQ_ID: null,
|
|
3854
3853
|
MESSAGE: "",
|
|
3855
3854
|
EMPLOYEES: f == null ? void 0 : f.map((G) => G == null ? void 0 : G.EMP_ID),
|
|
3856
|
-
TASK_ID:
|
|
3855
|
+
TASK_ID: h
|
|
3857
3856
|
}
|
|
3858
3857
|
}), clearTimeout(s.current), s.current = setTimeout(() => {
|
|
3859
3858
|
Le(".w-ticket-detail-content-container");
|
|
@@ -3867,13 +3866,13 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3867
3866
|
j();
|
|
3868
3867
|
}, []), ge(() => {
|
|
3869
3868
|
var m;
|
|
3870
|
-
(m =
|
|
3869
|
+
(m = Te) == null || m.destroy();
|
|
3871
3870
|
}, [v]), /* @__PURE__ */ t.jsx(
|
|
3872
3871
|
Wn,
|
|
3873
3872
|
{
|
|
3874
|
-
beforeUpload:
|
|
3873
|
+
beforeUpload: T,
|
|
3875
3874
|
fileList: [],
|
|
3876
|
-
accept: (E = (
|
|
3875
|
+
accept: (E = (C = r == null ? void 0 : r.EXT_LIST) == null ? void 0 : C.split(",")) == null ? void 0 : E.map((m) => `.${m}`),
|
|
3877
3876
|
onChange: (m) => {
|
|
3878
3877
|
w(m == null ? void 0 : m.file);
|
|
3879
3878
|
},
|
|
@@ -3900,26 +3899,26 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3900
3899
|
}, []), ot.createElement("div", { ref: n });
|
|
3901
3900
|
}, ci = ({ refInput: e }) => {
|
|
3902
3901
|
const { xs: n } = Re.useBreakpoint(), o = z(() => n ? "click" : "hover", [n]), r = () => {
|
|
3903
|
-
var
|
|
3904
|
-
const s = (
|
|
3902
|
+
var h;
|
|
3903
|
+
const s = (h = e == null ? void 0 : e.current) == null ? void 0 : h.textarea;
|
|
3905
3904
|
if (!s)
|
|
3906
3905
|
return !1;
|
|
3907
|
-
const { selectionStart: i, selectionEnd: c, value: l } = s, f = l == null ? void 0 : l.substring(0, i),
|
|
3906
|
+
const { selectionStart: i, selectionEnd: c, value: l } = s, f = l == null ? void 0 : l.substring(0, i), x = l == null ? void 0 : l.substring(i, c), p = l == null ? void 0 : l.substring(c);
|
|
3908
3907
|
return {
|
|
3909
3908
|
before: f,
|
|
3910
|
-
selectedText:
|
|
3909
|
+
selectedText: x,
|
|
3911
3910
|
after: p,
|
|
3912
3911
|
selectionStart: i,
|
|
3913
3912
|
selectionEnd: c,
|
|
3914
3913
|
text: l
|
|
3915
3914
|
};
|
|
3916
3915
|
}, a = (s) => {
|
|
3917
|
-
var p,
|
|
3916
|
+
var p, h;
|
|
3918
3917
|
(p = e == null ? void 0 : e.current) == null || p.focus();
|
|
3919
|
-
const i = (
|
|
3918
|
+
const i = (h = e == null ? void 0 : e.current) == null ? void 0 : h.textarea, c = s == null ? void 0 : s.native;
|
|
3920
3919
|
if (!i) return;
|
|
3921
|
-
const { before: l, after: f } = r(),
|
|
3922
|
-
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, c) : i.value =
|
|
3920
|
+
const { before: l, after: f } = r(), x = `${l}${c}${f}`;
|
|
3921
|
+
typeof document.execCommand == "function" ? document.execCommand("insertText", !1, c) : i.value = x;
|
|
3923
3922
|
};
|
|
3924
3923
|
return /* @__PURE__ */ t.jsx(
|
|
3925
3924
|
Ut,
|
|
@@ -3938,7 +3937,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3938
3937
|
}
|
|
3939
3938
|
);
|
|
3940
3939
|
}, li = B(ci), ui = () => {
|
|
3941
|
-
const [e, n] = H(0), [o, r] = H(!1), a = se(null), s = se(null), i = se(!1), c = se(null), { onSendMsg: l, setGetResponse: f, isGetResponse:
|
|
3940
|
+
const [e, n] = H(0), [o, r] = H(!1), a = se(null), s = se(null), i = se(!1), c = se(null), { onSendMsg: l, setGetResponse: f, isGetResponse: x } = Fe(), { ticketId: p } = Ne(), { isActiveTabVA: h } = Me(), { employees: v, setChats: j, isFromSelf: T, detailTicket: w } = Ze(), C = z(() => o || !x, [o, x]), E = z(() => {
|
|
3942
3941
|
var y;
|
|
3943
3942
|
return ((y = w == null ? void 0 : w.STATUS) == null ? void 0 : y.toString().toLowerCase()) === "closed";
|
|
3944
3943
|
}, [w == null ? void 0 : w.STATUS]), m = z(() => v == null ? void 0 : v.map((y) => ({
|
|
@@ -3976,8 +3975,8 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3976
3975
|
};
|
|
3977
3976
|
j((R) => {
|
|
3978
3977
|
const $ = [...zt(R), u];
|
|
3979
|
-
return
|
|
3980
|
-
}),
|
|
3978
|
+
return ht($);
|
|
3979
|
+
}), T.current = !0, Le(".w-ticket-detail-content-container"), n((R) => R + 1);
|
|
3981
3980
|
}, d = () => {
|
|
3982
3981
|
window.clearTimeout(s.current), i.current || (i.current = !0, l({
|
|
3983
3982
|
event: "TYPING",
|
|
@@ -3996,11 +3995,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
3996
3995
|
}, 250);
|
|
3997
3996
|
};
|
|
3998
3997
|
return ge(() => {
|
|
3999
|
-
a != null && a.current && !
|
|
3998
|
+
a != null && a.current && !h && p && (clearTimeout(c.current), c.current = setTimeout(() => {
|
|
4000
3999
|
var y;
|
|
4001
4000
|
(y = a == null ? void 0 : a.current) == null || y.focus();
|
|
4002
4001
|
}, 500));
|
|
4003
|
-
}, [
|
|
4002
|
+
}, [h, p]), E ? null : /* @__PURE__ */ t.jsxs(
|
|
4004
4003
|
"div",
|
|
4005
4004
|
{
|
|
4006
4005
|
className: "w-input-container",
|
|
@@ -4043,16 +4042,16 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4043
4042
|
/* @__PURE__ */ t.jsx(
|
|
4044
4043
|
le,
|
|
4045
4044
|
{
|
|
4046
|
-
loading:
|
|
4047
|
-
disabled:
|
|
4045
|
+
loading: C,
|
|
4046
|
+
disabled: C,
|
|
4048
4047
|
className: "w-send-btn",
|
|
4049
4048
|
style: {
|
|
4050
4049
|
backgroundColor: "var(--primary-color, #395ebc)",
|
|
4051
|
-
...
|
|
4050
|
+
...C && {
|
|
4052
4051
|
color: "white"
|
|
4053
4052
|
}
|
|
4054
4053
|
},
|
|
4055
|
-
icon: /* @__PURE__ */ t.jsx(pe, { type:
|
|
4054
|
+
icon: /* @__PURE__ */ t.jsx(pe, { type: C ? "loading" : "send" }),
|
|
4056
4055
|
shape: "circle",
|
|
4057
4056
|
onClick: S
|
|
4058
4057
|
}
|
|
@@ -4084,10 +4083,10 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4084
4083
|
}
|
|
4085
4084
|
) : null;
|
|
4086
4085
|
}, ur = B(fi), gi = () => {
|
|
4087
|
-
const e =
|
|
4086
|
+
const e = M(
|
|
4088
4087
|
"ForMoreInformationOfThisTicket",
|
|
4089
4088
|
"For more information of this ticket"
|
|
4090
|
-
), n =
|
|
4089
|
+
), n = M("ClickHere", "Click here"), { ticketId: o } = Ne(), { widgetProps: r } = ue(), { encrypt: a } = lr();
|
|
4091
4090
|
return /* @__PURE__ */ t.jsx(
|
|
4092
4091
|
ur,
|
|
4093
4092
|
{
|
|
@@ -4114,22 +4113,22 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4114
4113
|
}
|
|
4115
4114
|
}
|
|
4116
4115
|
);
|
|
4117
|
-
}, pi = B(gi),
|
|
4116
|
+
}, pi = B(gi), hi = ({ onClose: e, visible: n }) => /* @__PURE__ */ t.jsx(ar, { open: n, onClose: e, children: /* @__PURE__ */ t.jsxs($s, { children: [
|
|
4118
4117
|
/* @__PURE__ */ t.jsx(Us, { onClose: e }),
|
|
4119
4118
|
/* @__PURE__ */ t.jsx(pi, {}),
|
|
4120
4119
|
/* @__PURE__ */ t.jsx(ni, {}),
|
|
4121
4120
|
/* @__PURE__ */ t.jsx(di, {})
|
|
4122
|
-
] }) }),
|
|
4123
|
-
const e =
|
|
4121
|
+
] }) }), xi = B(hi), mi = () => {
|
|
4122
|
+
const e = M("AdvanceFilter", "Advance Filter"), n = M("Subject", "Subject"), o = M(
|
|
4124
4123
|
"TicketCategory",
|
|
4125
4124
|
"Ticket Category"
|
|
4126
|
-
), r =
|
|
4127
|
-
const R = `${s}/${i}/${c}`, U = `${l}/${f}`, $ = `${
|
|
4125
|
+
), r = M("TicketStatus", "Ticket Status"), a = M("CreatedDate", "Created Date"), s = M("New", "New"), i = M("Open", "Open"), c = M("Reopen", "Reopen"), l = M("InProgress", "In Progress"), f = M("Responded", "Responded"), x = M("Fixed", "Fixed"), p = M("Done", "Done"), h = M("Closed", "Closed"), v = M("HDCancelled", "Cancelled"), j = M("Clear", "Clear"), T = M("Filter", "Filter"), w = vt(), [C] = Ce.useForm(), { openFilter: E, setOpenFilter: m, getListTicket: S, setCountFilters: d } = Ne(), [y, u] = H([]), b = z(() => {
|
|
4126
|
+
const R = `${s}/${i}/${c}`, U = `${l}/${f}`, $ = `${x}/${p}`;
|
|
4128
4127
|
return [
|
|
4129
4128
|
{ value: 3, label: R },
|
|
4130
4129
|
{ value: 1, label: U },
|
|
4131
4130
|
{ value: 4, label: $ },
|
|
4132
|
-
{ value: 6, label:
|
|
4131
|
+
{ value: 6, label: h },
|
|
4133
4132
|
{ value: 8, label: v }
|
|
4134
4133
|
];
|
|
4135
4134
|
}, []), k = () => {
|
|
@@ -4145,18 +4144,18 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4145
4144
|
})) == null || R.then((U) => {
|
|
4146
4145
|
var $, Y, G;
|
|
4147
4146
|
if (($ = U == null ? void 0 : U.data) != null && $.DATA) {
|
|
4148
|
-
const
|
|
4147
|
+
const P = (G = (Y = U == null ? void 0 : U.data) == null ? void 0 : Y.DATA) == null ? void 0 : G.LIST;
|
|
4149
4148
|
u(
|
|
4150
|
-
|
|
4151
|
-
label:
|
|
4152
|
-
value:
|
|
4149
|
+
P == null ? void 0 : P.map((I) => ({
|
|
4150
|
+
label: I == null ? void 0 : I.CATEGORY_NAME,
|
|
4151
|
+
value: I == null ? void 0 : I.CATEGORY_CODE
|
|
4153
4152
|
}))
|
|
4154
4153
|
);
|
|
4155
4154
|
}
|
|
4156
4155
|
});
|
|
4157
4156
|
}, D = () => {
|
|
4158
4157
|
var $, Y;
|
|
4159
|
-
const R =
|
|
4158
|
+
const R = C == null ? void 0 : C.getFieldsValue(!0);
|
|
4160
4159
|
S(R);
|
|
4161
4160
|
const U = (Y = ($ = Object.values(R || {})) == null ? void 0 : $.flat()) == null ? void 0 : Y.filter(Boolean);
|
|
4162
4161
|
d(U == null ? void 0 : U.length);
|
|
@@ -4176,7 +4175,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4176
4175
|
le,
|
|
4177
4176
|
{
|
|
4178
4177
|
onClick: () => {
|
|
4179
|
-
|
|
4178
|
+
C == null || C.resetFields(), D();
|
|
4180
4179
|
},
|
|
4181
4180
|
children: j
|
|
4182
4181
|
},
|
|
@@ -4189,7 +4188,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4189
4188
|
onClick: () => {
|
|
4190
4189
|
D(), m(!1);
|
|
4191
4190
|
},
|
|
4192
|
-
children:
|
|
4191
|
+
children: T
|
|
4193
4192
|
},
|
|
4194
4193
|
"filter"
|
|
4195
4194
|
)
|
|
@@ -4207,23 +4206,23 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4207
4206
|
}
|
|
4208
4207
|
)
|
|
4209
4208
|
] }),
|
|
4210
|
-
/* @__PURE__ */ t.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ t.jsxs(
|
|
4211
|
-
/* @__PURE__ */ t.jsx(
|
|
4212
|
-
/* @__PURE__ */ t.jsx(
|
|
4213
|
-
/* @__PURE__ */ t.jsx(
|
|
4214
|
-
/* @__PURE__ */ t.jsx(
|
|
4209
|
+
/* @__PURE__ */ t.jsx("div", { className: "w-ticket-list-advance-filter-form-container", children: /* @__PURE__ */ t.jsxs(Ce, { form: C, layout: "vertical", children: [
|
|
4210
|
+
/* @__PURE__ */ t.jsx(Ce.Item, { label: n, name: "TASK_NAME", children: /* @__PURE__ */ t.jsx(st, { allowClear: !0 }) }),
|
|
4211
|
+
/* @__PURE__ */ t.jsx(Ce.Item, { label: o, name: "CATEGORY_CODE", children: /* @__PURE__ */ t.jsx(gn, { options: y, mode: "multiple", allowClear: !0 }) }),
|
|
4212
|
+
/* @__PURE__ */ t.jsx(Ce.Item, { label: r, name: "TASK_STATUS", children: /* @__PURE__ */ t.jsx(gn, { options: b, mode: "multiple", allowClear: !0 }) }),
|
|
4213
|
+
/* @__PURE__ */ t.jsx(Ce.Item, { label: a, name: "CREATED_DATE", children: /* @__PURE__ */ t.jsx(zr, { style: { width: "100%" }, allowClear: !0 }) })
|
|
4215
4214
|
] }) })
|
|
4216
4215
|
]
|
|
4217
4216
|
}
|
|
4218
4217
|
);
|
|
4219
4218
|
}, yi = B(mi), vi = () => {
|
|
4220
|
-
const e =
|
|
4219
|
+
const e = M(
|
|
4221
4220
|
"ReconnectManually",
|
|
4222
4221
|
"Reconnect Manually"
|
|
4223
|
-
), n =
|
|
4222
|
+
), n = M(
|
|
4224
4223
|
"HelpdeskWebsocket",
|
|
4225
4224
|
"Helpdesk Websocket"
|
|
4226
|
-
), o =
|
|
4225
|
+
), o = M("NotConnected", "Not Connected"), r = M("Connecting", "Connecting"), {
|
|
4227
4226
|
connectWebSocket: a,
|
|
4228
4227
|
retryCountState: s,
|
|
4229
4228
|
setRetryCountState: i,
|
|
@@ -4270,11 +4269,11 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4270
4269
|
)
|
|
4271
4270
|
}
|
|
4272
4271
|
);
|
|
4273
|
-
}, bi = B(vi),
|
|
4272
|
+
}, bi = B(vi), Ci = () => {
|
|
4274
4273
|
const { setTicketId: e, ticketId: n, openFilter: o } = Ne(), { onSendMsg: r, setGetResponse: a } = Fe(), { showReadyWSHD: s } = ue();
|
|
4275
4274
|
return s ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
4276
4275
|
/* @__PURE__ */ t.jsx(
|
|
4277
|
-
|
|
4276
|
+
xi,
|
|
4278
4277
|
{
|
|
4279
4278
|
visible: n,
|
|
4280
4279
|
onClose: () => {
|
|
@@ -4290,7 +4289,7 @@ const as = () => /* @__PURE__ */ t.jsxs("div", { className: "lds-ellipsis", chil
|
|
|
4290
4289
|
/* @__PURE__ */ t.jsx("div", { style: { display: !n && !o ? "block" : "none" }, children: /* @__PURE__ */ t.jsx(Fs, {}) }),
|
|
4291
4290
|
/* @__PURE__ */ t.jsx(yi, {})
|
|
4292
4291
|
] }) : /* @__PURE__ */ t.jsx(bi, {});
|
|
4293
|
-
},
|
|
4292
|
+
}, Ti = B(Ci);
|
|
4294
4293
|
var et = { exports: {} }, Dt = {}, ut = { exports: {} }, dt = { exports: {} }, ie = {};
|
|
4295
4294
|
/** @license React v16.13.1
|
|
4296
4295
|
* react-is.production.min.js
|
|
@@ -4300,11 +4299,11 @@ var et = { exports: {} }, Dt = {}, ut = { exports: {} }, dt = { exports: {} }, i
|
|
|
4300
4299
|
* This source code is licensed under the MIT license found in the
|
|
4301
4300
|
* LICENSE file in the root directory of this source tree.
|
|
4302
4301
|
*/
|
|
4303
|
-
var
|
|
4302
|
+
var Tn;
|
|
4304
4303
|
function Ei() {
|
|
4305
|
-
if (
|
|
4306
|
-
|
|
4307
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111,
|
|
4304
|
+
if (Tn) return ie;
|
|
4305
|
+
Tn = 1;
|
|
4306
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, T = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
4308
4307
|
function m(d) {
|
|
4309
4308
|
if (typeof d == "object" && d !== null) {
|
|
4310
4309
|
var y = d.$$typeof;
|
|
@@ -4321,7 +4320,7 @@ function Ei() {
|
|
|
4321
4320
|
default:
|
|
4322
4321
|
switch (d = d && d.$$typeof, d) {
|
|
4323
4322
|
case c:
|
|
4324
|
-
case
|
|
4323
|
+
case x:
|
|
4325
4324
|
case j:
|
|
4326
4325
|
case v:
|
|
4327
4326
|
case i:
|
|
@@ -4338,7 +4337,7 @@ function Ei() {
|
|
|
4338
4337
|
function S(d) {
|
|
4339
4338
|
return m(d) === f;
|
|
4340
4339
|
}
|
|
4341
|
-
return ie.AsyncMode = l, ie.ConcurrentMode = f, ie.ContextConsumer = c, ie.ContextProvider = i, ie.Element = n, ie.ForwardRef =
|
|
4340
|
+
return ie.AsyncMode = l, ie.ConcurrentMode = f, ie.ContextConsumer = c, ie.ContextProvider = i, ie.Element = n, ie.ForwardRef = x, ie.Fragment = r, ie.Lazy = j, ie.Memo = v, ie.Portal = o, ie.Profiler = s, ie.StrictMode = a, ie.Suspense = p, ie.isAsyncMode = function(d) {
|
|
4342
4341
|
return S(d) || m(d) === l;
|
|
4343
4342
|
}, ie.isConcurrentMode = S, ie.isContextConsumer = function(d) {
|
|
4344
4343
|
return m(d) === c;
|
|
@@ -4347,7 +4346,7 @@ function Ei() {
|
|
|
4347
4346
|
}, ie.isElement = function(d) {
|
|
4348
4347
|
return typeof d == "object" && d !== null && d.$$typeof === n;
|
|
4349
4348
|
}, ie.isForwardRef = function(d) {
|
|
4350
|
-
return m(d) ===
|
|
4349
|
+
return m(d) === x;
|
|
4351
4350
|
}, ie.isFragment = function(d) {
|
|
4352
4351
|
return m(d) === r;
|
|
4353
4352
|
}, ie.isLazy = function(d) {
|
|
@@ -4363,7 +4362,7 @@ function Ei() {
|
|
|
4363
4362
|
}, ie.isSuspense = function(d) {
|
|
4364
4363
|
return m(d) === p;
|
|
4365
4364
|
}, ie.isValidElementType = function(d) {
|
|
4366
|
-
return typeof d == "string" || typeof d == "function" || d === r || d === f || d === s || d === a || d === p || d ===
|
|
4365
|
+
return typeof d == "string" || typeof d == "function" || d === r || d === f || d === s || d === a || d === p || d === h || typeof d == "object" && d !== null && (d.$$typeof === j || d.$$typeof === v || d.$$typeof === i || d.$$typeof === c || d.$$typeof === x || d.$$typeof === w || d.$$typeof === C || d.$$typeof === E || d.$$typeof === T);
|
|
4367
4366
|
}, ie.typeOf = m, ie;
|
|
4368
4367
|
}
|
|
4369
4368
|
var ae = {};
|
|
@@ -4378,10 +4377,10 @@ var ae = {};
|
|
|
4378
4377
|
var En;
|
|
4379
4378
|
function Si() {
|
|
4380
4379
|
return En || (En = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4381
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111,
|
|
4380
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, o = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, p = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, j = e ? Symbol.for("react.lazy") : 60116, T = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
4382
4381
|
function m(L) {
|
|
4383
4382
|
return typeof L == "string" || typeof L == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4384
|
-
L === r || L === f || L === s || L === a || L === p || L ===
|
|
4383
|
+
L === r || L === f || L === s || L === a || L === p || L === h || typeof L == "object" && L !== null && (L.$$typeof === j || L.$$typeof === v || L.$$typeof === i || L.$$typeof === c || L.$$typeof === x || L.$$typeof === w || L.$$typeof === C || L.$$typeof === E || L.$$typeof === T);
|
|
4385
4384
|
}
|
|
4386
4385
|
function S(L) {
|
|
4387
4386
|
if (typeof L == "object" && L !== null) {
|
|
@@ -4401,7 +4400,7 @@ function Si() {
|
|
|
4401
4400
|
var Ie = We && We.$$typeof;
|
|
4402
4401
|
switch (Ie) {
|
|
4403
4402
|
case c:
|
|
4404
|
-
case
|
|
4403
|
+
case x:
|
|
4405
4404
|
case j:
|
|
4406
4405
|
case v:
|
|
4407
4406
|
case i:
|
|
@@ -4415,8 +4414,8 @@ function Si() {
|
|
|
4415
4414
|
}
|
|
4416
4415
|
}
|
|
4417
4416
|
}
|
|
4418
|
-
var d = l, y = f, u = c, b = i, k = n, D =
|
|
4419
|
-
function
|
|
4417
|
+
var d = l, y = f, u = c, b = i, k = n, D = x, R = r, U = j, $ = v, Y = o, G = s, P = a, I = p, Z = !1;
|
|
4418
|
+
function K(L) {
|
|
4420
4419
|
return Z || (Z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), _(L) || S(L) === l;
|
|
4421
4420
|
}
|
|
4422
4421
|
function _(L) {
|
|
@@ -4428,16 +4427,16 @@ function Si() {
|
|
|
4428
4427
|
function W(L) {
|
|
4429
4428
|
return S(L) === i;
|
|
4430
4429
|
}
|
|
4431
|
-
function
|
|
4430
|
+
function F(L) {
|
|
4432
4431
|
return typeof L == "object" && L !== null && L.$$typeof === n;
|
|
4433
4432
|
}
|
|
4434
4433
|
function V(L) {
|
|
4435
|
-
return S(L) ===
|
|
4434
|
+
return S(L) === x;
|
|
4436
4435
|
}
|
|
4437
4436
|
function Q(L) {
|
|
4438
4437
|
return S(L) === r;
|
|
4439
4438
|
}
|
|
4440
|
-
function
|
|
4439
|
+
function X(L) {
|
|
4441
4440
|
return S(L) === j;
|
|
4442
4441
|
}
|
|
4443
4442
|
function J(L) {
|
|
@@ -4455,7 +4454,7 @@ function Si() {
|
|
|
4455
4454
|
function ye(L) {
|
|
4456
4455
|
return S(L) === p;
|
|
4457
4456
|
}
|
|
4458
|
-
ae.AsyncMode = d, ae.ConcurrentMode = y, ae.ContextConsumer = u, ae.ContextProvider = b, ae.Element = k, ae.ForwardRef = D, ae.Fragment = R, ae.Lazy = U, ae.Memo = $, ae.Portal = Y, ae.Profiler = G, ae.StrictMode =
|
|
4457
|
+
ae.AsyncMode = d, ae.ConcurrentMode = y, ae.ContextConsumer = u, ae.ContextProvider = b, ae.Element = k, ae.ForwardRef = D, ae.Fragment = R, ae.Lazy = U, ae.Memo = $, ae.Portal = Y, ae.Profiler = G, ae.StrictMode = P, ae.Suspense = I, ae.isAsyncMode = K, ae.isConcurrentMode = _, ae.isContextConsumer = O, ae.isContextProvider = W, ae.isElement = F, ae.isForwardRef = V, ae.isFragment = Q, ae.isLazy = X, ae.isMemo = J, ae.isPortal = ee, ae.isProfiler = re, ae.isStrictMode = te, ae.isSuspense = ye, ae.isValidElementType = m, ae.typeOf = S;
|
|
4459
4458
|
}()), ae;
|
|
4460
4459
|
}
|
|
4461
4460
|
var Sn;
|
|
@@ -4492,22 +4491,22 @@ function wi() {
|
|
|
4492
4491
|
}
|
|
4493
4492
|
function a(s, i, c, l, f) {
|
|
4494
4493
|
if (process.env.NODE_ENV !== "production") {
|
|
4495
|
-
for (var
|
|
4496
|
-
if (r(s,
|
|
4494
|
+
for (var x in s)
|
|
4495
|
+
if (r(s, x)) {
|
|
4497
4496
|
var p;
|
|
4498
4497
|
try {
|
|
4499
|
-
if (typeof s[
|
|
4500
|
-
var
|
|
4501
|
-
(l || "React class") + ": " + c + " type `" +
|
|
4498
|
+
if (typeof s[x] != "function") {
|
|
4499
|
+
var h = Error(
|
|
4500
|
+
(l || "React class") + ": " + c + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
4502
4501
|
);
|
|
4503
|
-
throw
|
|
4502
|
+
throw h.name = "Invariant Violation", h;
|
|
4504
4503
|
}
|
|
4505
|
-
p = s[
|
|
4504
|
+
p = s[x](i, x, l, c, null, n);
|
|
4506
4505
|
} catch (j) {
|
|
4507
4506
|
p = j;
|
|
4508
4507
|
}
|
|
4509
4508
|
if (p && !(p instanceof Error) && e(
|
|
4510
|
-
(l || "React class") + ": type specification of " + c + " `" +
|
|
4509
|
+
(l || "React class") + ": type specification of " + c + " `" + x + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
4511
4510
|
), p instanceof Error && !(p.message in o)) {
|
|
4512
4511
|
o[p.message] = !0;
|
|
4513
4512
|
var v = f ? f() : "";
|
|
@@ -4540,21 +4539,21 @@ function _i() {
|
|
|
4540
4539
|
return null;
|
|
4541
4540
|
}
|
|
4542
4541
|
return Ft = function(c, l) {
|
|
4543
|
-
var f = typeof Symbol == "function" && Symbol.iterator,
|
|
4542
|
+
var f = typeof Symbol == "function" && Symbol.iterator, x = "@@iterator";
|
|
4544
4543
|
function p(_) {
|
|
4545
|
-
var O = _ && (f && _[f] || _[
|
|
4544
|
+
var O = _ && (f && _[f] || _[x]);
|
|
4546
4545
|
if (typeof O == "function")
|
|
4547
4546
|
return O;
|
|
4548
4547
|
}
|
|
4549
|
-
var
|
|
4550
|
-
array:
|
|
4551
|
-
bigint:
|
|
4552
|
-
bool:
|
|
4553
|
-
func:
|
|
4554
|
-
number:
|
|
4555
|
-
object:
|
|
4556
|
-
string:
|
|
4557
|
-
symbol:
|
|
4548
|
+
var h = "<<anonymous>>", v = {
|
|
4549
|
+
array: C("array"),
|
|
4550
|
+
bigint: C("bigint"),
|
|
4551
|
+
bool: C("boolean"),
|
|
4552
|
+
func: C("function"),
|
|
4553
|
+
number: C("number"),
|
|
4554
|
+
object: C("object"),
|
|
4555
|
+
string: C("string"),
|
|
4556
|
+
symbol: C("symbol"),
|
|
4558
4557
|
any: E(),
|
|
4559
4558
|
arrayOf: m,
|
|
4560
4559
|
element: S(),
|
|
@@ -4570,15 +4569,15 @@ function _i() {
|
|
|
4570
4569
|
function j(_, O) {
|
|
4571
4570
|
return _ === O ? _ !== 0 || 1 / _ === 1 / O : _ !== _ && O !== O;
|
|
4572
4571
|
}
|
|
4573
|
-
function
|
|
4572
|
+
function T(_, O) {
|
|
4574
4573
|
this.message = _, this.data = O && typeof O == "object" ? O : {}, this.stack = "";
|
|
4575
4574
|
}
|
|
4576
|
-
|
|
4575
|
+
T.prototype = Error.prototype;
|
|
4577
4576
|
function w(_) {
|
|
4578
4577
|
if (process.env.NODE_ENV !== "production")
|
|
4579
4578
|
var O = {}, W = 0;
|
|
4580
|
-
function
|
|
4581
|
-
if (ee = ee ||
|
|
4579
|
+
function F(Q, X, J, ee, re, te, ye) {
|
|
4580
|
+
if (ee = ee || h, te = te || J, ye !== o) {
|
|
4582
4581
|
if (l) {
|
|
4583
4582
|
var L = new Error(
|
|
4584
4583
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -4592,18 +4591,18 @@ function _i() {
|
|
|
4592
4591
|
), O[be] = !0, W++);
|
|
4593
4592
|
}
|
|
4594
4593
|
}
|
|
4595
|
-
return
|
|
4594
|
+
return X[J] == null ? Q ? X[J] === null ? new T("The " + re + " `" + te + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new T("The " + re + " `" + te + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : _(X, J, ee, re, te);
|
|
4596
4595
|
}
|
|
4597
|
-
var V =
|
|
4598
|
-
return V.isRequired =
|
|
4596
|
+
var V = F.bind(null, !1);
|
|
4597
|
+
return V.isRequired = F.bind(null, !0), V;
|
|
4599
4598
|
}
|
|
4600
|
-
function
|
|
4601
|
-
function O(W,
|
|
4602
|
-
var ee = W[
|
|
4599
|
+
function C(_) {
|
|
4600
|
+
function O(W, F, V, Q, X, J) {
|
|
4601
|
+
var ee = W[F], re = P(ee);
|
|
4603
4602
|
if (re !== _) {
|
|
4604
|
-
var te =
|
|
4605
|
-
return new
|
|
4606
|
-
"Invalid " + Q + " `" +
|
|
4603
|
+
var te = I(ee);
|
|
4604
|
+
return new T(
|
|
4605
|
+
"Invalid " + Q + " `" + X + "` of type " + ("`" + te + "` supplied to `" + V + "`, expected ") + ("`" + _ + "`."),
|
|
4607
4606
|
{ expectedType: _ }
|
|
4608
4607
|
);
|
|
4609
4608
|
}
|
|
@@ -4615,16 +4614,16 @@ function _i() {
|
|
|
4615
4614
|
return w(i);
|
|
4616
4615
|
}
|
|
4617
4616
|
function m(_) {
|
|
4618
|
-
function O(W,
|
|
4617
|
+
function O(W, F, V, Q, X) {
|
|
4619
4618
|
if (typeof _ != "function")
|
|
4620
|
-
return new
|
|
4621
|
-
var J = W[
|
|
4619
|
+
return new T("Property `" + X + "` of component `" + V + "` has invalid PropType notation inside arrayOf.");
|
|
4620
|
+
var J = W[F];
|
|
4622
4621
|
if (!Array.isArray(J)) {
|
|
4623
|
-
var ee =
|
|
4624
|
-
return new
|
|
4622
|
+
var ee = P(J);
|
|
4623
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + V + "`, expected an array."));
|
|
4625
4624
|
}
|
|
4626
4625
|
for (var re = 0; re < J.length; re++) {
|
|
4627
|
-
var te = _(J, re, V, Q,
|
|
4626
|
+
var te = _(J, re, V, Q, X + "[" + re + "]", o);
|
|
4628
4627
|
if (te instanceof Error)
|
|
4629
4628
|
return te;
|
|
4630
4629
|
}
|
|
@@ -4633,32 +4632,32 @@ function _i() {
|
|
|
4633
4632
|
return w(O);
|
|
4634
4633
|
}
|
|
4635
4634
|
function S() {
|
|
4636
|
-
function _(O, W,
|
|
4637
|
-
var
|
|
4638
|
-
if (!c(
|
|
4639
|
-
var J = X
|
|
4640
|
-
return new
|
|
4635
|
+
function _(O, W, F, V, Q) {
|
|
4636
|
+
var X = O[W];
|
|
4637
|
+
if (!c(X)) {
|
|
4638
|
+
var J = P(X);
|
|
4639
|
+
return new T("Invalid " + V + " `" + Q + "` of type " + ("`" + J + "` supplied to `" + F + "`, expected a single ReactElement."));
|
|
4641
4640
|
}
|
|
4642
4641
|
return null;
|
|
4643
4642
|
}
|
|
4644
4643
|
return w(_);
|
|
4645
4644
|
}
|
|
4646
4645
|
function d() {
|
|
4647
|
-
function _(O, W,
|
|
4648
|
-
var
|
|
4649
|
-
if (!e.isValidElementType(
|
|
4650
|
-
var J = X
|
|
4651
|
-
return new
|
|
4646
|
+
function _(O, W, F, V, Q) {
|
|
4647
|
+
var X = O[W];
|
|
4648
|
+
if (!e.isValidElementType(X)) {
|
|
4649
|
+
var J = P(X);
|
|
4650
|
+
return new T("Invalid " + V + " `" + Q + "` of type " + ("`" + J + "` supplied to `" + F + "`, expected a single ReactElement type."));
|
|
4652
4651
|
}
|
|
4653
4652
|
return null;
|
|
4654
4653
|
}
|
|
4655
4654
|
return w(_);
|
|
4656
4655
|
}
|
|
4657
4656
|
function y(_) {
|
|
4658
|
-
function O(W,
|
|
4659
|
-
if (!(W[
|
|
4660
|
-
var J = _.name ||
|
|
4661
|
-
return new
|
|
4657
|
+
function O(W, F, V, Q, X) {
|
|
4658
|
+
if (!(W[F] instanceof _)) {
|
|
4659
|
+
var J = _.name || h, ee = K(W[F]);
|
|
4660
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + V + "`, expected ") + ("instance of `" + J + "`."));
|
|
4662
4661
|
}
|
|
4663
4662
|
return null;
|
|
4664
4663
|
}
|
|
@@ -4669,28 +4668,28 @@ function _i() {
|
|
|
4669
4668
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
|
|
4670
4669
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
4671
4670
|
) : s("Invalid argument supplied to oneOf, expected an array.")), i;
|
|
4672
|
-
function O(W,
|
|
4673
|
-
for (var J = W[
|
|
4671
|
+
function O(W, F, V, Q, X) {
|
|
4672
|
+
for (var J = W[F], ee = 0; ee < _.length; ee++)
|
|
4674
4673
|
if (j(J, _[ee]))
|
|
4675
4674
|
return null;
|
|
4676
4675
|
var re = JSON.stringify(_, function(ye, L) {
|
|
4677
|
-
var be =
|
|
4676
|
+
var be = I(L);
|
|
4678
4677
|
return be === "symbol" ? String(L) : L;
|
|
4679
4678
|
});
|
|
4680
|
-
return new
|
|
4679
|
+
return new T("Invalid " + Q + " `" + X + "` of value `" + String(J) + "` " + ("supplied to `" + V + "`, expected one of " + re + "."));
|
|
4681
4680
|
}
|
|
4682
4681
|
return w(O);
|
|
4683
4682
|
}
|
|
4684
4683
|
function b(_) {
|
|
4685
|
-
function O(W,
|
|
4684
|
+
function O(W, F, V, Q, X) {
|
|
4686
4685
|
if (typeof _ != "function")
|
|
4687
|
-
return new
|
|
4688
|
-
var J = W[
|
|
4686
|
+
return new T("Property `" + X + "` of component `" + V + "` has invalid PropType notation inside objectOf.");
|
|
4687
|
+
var J = W[F], ee = P(J);
|
|
4689
4688
|
if (ee !== "object")
|
|
4690
|
-
return new
|
|
4689
|
+
return new T("Invalid " + Q + " `" + X + "` of type " + ("`" + ee + "` supplied to `" + V + "`, expected an object."));
|
|
4691
4690
|
for (var re in J)
|
|
4692
4691
|
if (r(J, re)) {
|
|
4693
|
-
var te = _(J, re, V, Q,
|
|
4692
|
+
var te = _(J, re, V, Q, X + "." + re, o);
|
|
4694
4693
|
if (te instanceof Error)
|
|
4695
4694
|
return te;
|
|
4696
4695
|
}
|
|
@@ -4708,39 +4707,39 @@ function _i() {
|
|
|
4708
4707
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(W) + " at index " + O + "."
|
|
4709
4708
|
), i;
|
|
4710
4709
|
}
|
|
4711
|
-
function
|
|
4710
|
+
function F(V, Q, X, J, ee) {
|
|
4712
4711
|
for (var re = [], te = 0; te < _.length; te++) {
|
|
4713
|
-
var ye = _[te], L = ye(V, Q,
|
|
4712
|
+
var ye = _[te], L = ye(V, Q, X, J, ee, o);
|
|
4714
4713
|
if (L == null)
|
|
4715
4714
|
return null;
|
|
4716
4715
|
L.data && r(L.data, "expectedType") && re.push(L.data.expectedType);
|
|
4717
4716
|
}
|
|
4718
4717
|
var be = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
4719
|
-
return new
|
|
4718
|
+
return new T("Invalid " + J + " `" + ee + "` supplied to " + ("`" + X + "`" + be + "."));
|
|
4720
4719
|
}
|
|
4721
|
-
return w(
|
|
4720
|
+
return w(F);
|
|
4722
4721
|
}
|
|
4723
4722
|
function D() {
|
|
4724
|
-
function _(O, W,
|
|
4725
|
-
return Y(O[W]) ? null : new
|
|
4723
|
+
function _(O, W, F, V, Q) {
|
|
4724
|
+
return Y(O[W]) ? null : new T("Invalid " + V + " `" + Q + "` supplied to " + ("`" + F + "`, expected a ReactNode."));
|
|
4726
4725
|
}
|
|
4727
4726
|
return w(_);
|
|
4728
4727
|
}
|
|
4729
|
-
function R(_, O, W,
|
|
4730
|
-
return new
|
|
4731
|
-
(_ || "React class") + ": " + O + " type `" + W + "." +
|
|
4728
|
+
function R(_, O, W, F, V) {
|
|
4729
|
+
return new T(
|
|
4730
|
+
(_ || "React class") + ": " + O + " type `" + W + "." + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + V + "`."
|
|
4732
4731
|
);
|
|
4733
4732
|
}
|
|
4734
4733
|
function U(_) {
|
|
4735
|
-
function O(W,
|
|
4736
|
-
var J = W[
|
|
4734
|
+
function O(W, F, V, Q, X) {
|
|
4735
|
+
var J = W[F], ee = P(J);
|
|
4737
4736
|
if (ee !== "object")
|
|
4738
|
-
return new
|
|
4737
|
+
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" + V + "`, expected `object`."));
|
|
4739
4738
|
for (var re in _) {
|
|
4740
4739
|
var te = _[re];
|
|
4741
4740
|
if (typeof te != "function")
|
|
4742
|
-
return R(V, Q,
|
|
4743
|
-
var ye = te(J, re, V, Q,
|
|
4741
|
+
return R(V, Q, X, re, I(te));
|
|
4742
|
+
var ye = te(J, re, V, Q, X + "." + re, o);
|
|
4744
4743
|
if (ye)
|
|
4745
4744
|
return ye;
|
|
4746
4745
|
}
|
|
@@ -4749,21 +4748,21 @@ function _i() {
|
|
|
4749
4748
|
return w(O);
|
|
4750
4749
|
}
|
|
4751
4750
|
function $(_) {
|
|
4752
|
-
function O(W,
|
|
4753
|
-
var J = W[
|
|
4751
|
+
function O(W, F, V, Q, X) {
|
|
4752
|
+
var J = W[F], ee = P(J);
|
|
4754
4753
|
if (ee !== "object")
|
|
4755
|
-
return new
|
|
4756
|
-
var re = n({}, W[
|
|
4754
|
+
return new T("Invalid " + Q + " `" + X + "` of type `" + ee + "` " + ("supplied to `" + V + "`, expected `object`."));
|
|
4755
|
+
var re = n({}, W[F], _);
|
|
4757
4756
|
for (var te in re) {
|
|
4758
4757
|
var ye = _[te];
|
|
4759
4758
|
if (r(_, te) && typeof ye != "function")
|
|
4760
|
-
return R(V, Q,
|
|
4759
|
+
return R(V, Q, X, te, I(ye));
|
|
4761
4760
|
if (!ye)
|
|
4762
|
-
return new
|
|
4763
|
-
"Invalid " + Q + " `" +
|
|
4761
|
+
return new T(
|
|
4762
|
+
"Invalid " + Q + " `" + X + "` key `" + te + "` supplied to `" + V + "`.\nBad object: " + JSON.stringify(W[F], null, " ") + `
|
|
4764
4763
|
Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
4765
4764
|
);
|
|
4766
|
-
var L = ye(J, te, V, Q,
|
|
4765
|
+
var L = ye(J, te, V, Q, X + "." + te, o);
|
|
4767
4766
|
if (L)
|
|
4768
4767
|
return L;
|
|
4769
4768
|
}
|
|
@@ -4786,14 +4785,14 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4786
4785
|
return !0;
|
|
4787
4786
|
var O = p(_);
|
|
4788
4787
|
if (O) {
|
|
4789
|
-
var W = O.call(_),
|
|
4788
|
+
var W = O.call(_), F;
|
|
4790
4789
|
if (O !== _.entries) {
|
|
4791
|
-
for (; !(
|
|
4792
|
-
if (!Y(
|
|
4790
|
+
for (; !(F = W.next()).done; )
|
|
4791
|
+
if (!Y(F.value))
|
|
4793
4792
|
return !1;
|
|
4794
4793
|
} else
|
|
4795
|
-
for (; !(
|
|
4796
|
-
var V =
|
|
4794
|
+
for (; !(F = W.next()).done; ) {
|
|
4795
|
+
var V = F.value;
|
|
4797
4796
|
if (V && !Y(V[1]))
|
|
4798
4797
|
return !1;
|
|
4799
4798
|
}
|
|
@@ -4807,14 +4806,14 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4807
4806
|
function G(_, O) {
|
|
4808
4807
|
return _ === "symbol" ? !0 : O ? O["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && O instanceof Symbol : !1;
|
|
4809
4808
|
}
|
|
4810
|
-
function
|
|
4809
|
+
function P(_) {
|
|
4811
4810
|
var O = typeof _;
|
|
4812
4811
|
return Array.isArray(_) ? "array" : _ instanceof RegExp ? "object" : G(O, _) ? "symbol" : O;
|
|
4813
4812
|
}
|
|
4814
|
-
function
|
|
4813
|
+
function I(_) {
|
|
4815
4814
|
if (typeof _ > "u" || _ === null)
|
|
4816
4815
|
return "" + _;
|
|
4817
|
-
var O =
|
|
4816
|
+
var O = P(_);
|
|
4818
4817
|
if (O === "object") {
|
|
4819
4818
|
if (_ instanceof Date)
|
|
4820
4819
|
return "date";
|
|
@@ -4824,7 +4823,7 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4824
4823
|
return O;
|
|
4825
4824
|
}
|
|
4826
4825
|
function Z(_) {
|
|
4827
|
-
var O =
|
|
4826
|
+
var O = I(_);
|
|
4828
4827
|
switch (O) {
|
|
4829
4828
|
case "array":
|
|
4830
4829
|
case "object":
|
|
@@ -4837,8 +4836,8 @@ Valid keys: ` + JSON.stringify(Object.keys(_), null, " ")
|
|
|
4837
4836
|
return O;
|
|
4838
4837
|
}
|
|
4839
4838
|
}
|
|
4840
|
-
function
|
|
4841
|
-
return !_.constructor || !_.constructor.name ?
|
|
4839
|
+
function K(_) {
|
|
4840
|
+
return !_.constructor || !_.constructor.name ? h : _.constructor.name;
|
|
4842
4841
|
}
|
|
4843
4842
|
return v.checkPropTypes = a, v.resetWarningCache = a.resetWarningCache, v.PropTypes = v, v;
|
|
4844
4843
|
}, Ft;
|
|
@@ -4853,12 +4852,12 @@ function ji() {
|
|
|
4853
4852
|
function o() {
|
|
4854
4853
|
}
|
|
4855
4854
|
return o.resetWarningCache = n, It = function() {
|
|
4856
|
-
function r(i, c, l, f,
|
|
4855
|
+
function r(i, c, l, f, x, p) {
|
|
4857
4856
|
if (p !== e) {
|
|
4858
|
-
var
|
|
4857
|
+
var h = new Error(
|
|
4859
4858
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
4860
4859
|
);
|
|
4861
|
-
throw
|
|
4860
|
+
throw h.name = "Invariant Violation", h;
|
|
4862
4861
|
}
|
|
4863
4862
|
}
|
|
4864
4863
|
r.isRequired = r;
|
|
@@ -4920,7 +4919,7 @@ function ki() {
|
|
|
4920
4919
|
}
|
|
4921
4920
|
return ft.exports = n, ft.exports.clsx = n, ft.exports;
|
|
4922
4921
|
}
|
|
4923
|
-
var
|
|
4922
|
+
var xe = {}, Oe = {}, Dn;
|
|
4924
4923
|
function bt() {
|
|
4925
4924
|
if (Dn) return Oe;
|
|
4926
4925
|
Dn = 1, Object.defineProperty(Oe, "__esModule", {
|
|
@@ -4978,10 +4977,10 @@ function Ai() {
|
|
|
4978
4977
|
}
|
|
4979
4978
|
var Mn;
|
|
4980
4979
|
function Xt() {
|
|
4981
|
-
if (Mn) return
|
|
4982
|
-
Mn = 1, Object.defineProperty(
|
|
4980
|
+
if (Mn) return xe;
|
|
4981
|
+
Mn = 1, Object.defineProperty(xe, "__esModule", {
|
|
4983
4982
|
value: !0
|
|
4984
|
-
}),
|
|
4983
|
+
}), xe.addClassName = d, xe.addEvent = i, xe.addUserSelectStyles = E, xe.createCSSTransform = v, xe.createSVGTransform = j, xe.getTouch = w, xe.getTouchIdentifier = C, xe.getTranslation = T, xe.innerHeight = x, xe.innerWidth = p, xe.matchesSelector = a, xe.matchesSelectorAndParentsTo = s, xe.offsetXYFromParent = h, xe.outerHeight = l, xe.outerWidth = f, xe.removeClassName = y, xe.removeEvent = c, xe.scheduleRemoveUserSelectStyles = m;
|
|
4985
4984
|
var e = bt(), n = o(Ai());
|
|
4986
4985
|
function o(u, b) {
|
|
4987
4986
|
if (typeof WeakMap == "function") var k = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
|
|
@@ -4993,7 +4992,7 @@ function Xt() {
|
|
|
4993
4992
|
if ($.has(R)) return $.get(R);
|
|
4994
4993
|
$.set(R, G);
|
|
4995
4994
|
}
|
|
4996
|
-
for (const
|
|
4995
|
+
for (const P in R) P !== "default" && {}.hasOwnProperty.call(R, P) && ((Y = ($ = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, P)) && (Y.get || Y.set) ? $(G, P, Y) : G[P] = R[P]);
|
|
4997
4996
|
return G;
|
|
4998
4997
|
})(u, b);
|
|
4999
4998
|
}
|
|
@@ -5038,7 +5037,7 @@ function Xt() {
|
|
|
5038
5037
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5039
5038
|
return b += (0, e.int)(k.borderLeftWidth), b += (0, e.int)(k.borderRightWidth), b;
|
|
5040
5039
|
}
|
|
5041
|
-
function
|
|
5040
|
+
function x(u) {
|
|
5042
5041
|
let b = u.clientHeight;
|
|
5043
5042
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5044
5043
|
return b -= (0, e.int)(k.paddingTop), b -= (0, e.int)(k.paddingBottom), b;
|
|
@@ -5048,7 +5047,7 @@ function Xt() {
|
|
|
5048
5047
|
const k = u.ownerDocument.defaultView.getComputedStyle(u);
|
|
5049
5048
|
return b -= (0, e.int)(k.paddingLeft), b -= (0, e.int)(k.paddingRight), b;
|
|
5050
5049
|
}
|
|
5051
|
-
function
|
|
5050
|
+
function h(u, b, k) {
|
|
5052
5051
|
const R = b === b.ownerDocument.body ? {
|
|
5053
5052
|
left: 0,
|
|
5054
5053
|
top: 0
|
|
@@ -5059,15 +5058,15 @@ function Xt() {
|
|
|
5059
5058
|
};
|
|
5060
5059
|
}
|
|
5061
5060
|
function v(u, b) {
|
|
5062
|
-
const k =
|
|
5061
|
+
const k = T(u, b, "px");
|
|
5063
5062
|
return {
|
|
5064
5063
|
[(0, n.browserPrefixToKey)("transform", n.default)]: k
|
|
5065
5064
|
};
|
|
5066
5065
|
}
|
|
5067
5066
|
function j(u, b) {
|
|
5068
|
-
return
|
|
5067
|
+
return T(u, b, "");
|
|
5069
5068
|
}
|
|
5070
|
-
function
|
|
5069
|
+
function T(u, b, k) {
|
|
5071
5070
|
let {
|
|
5072
5071
|
x: D,
|
|
5073
5072
|
y: R
|
|
@@ -5081,7 +5080,7 @@ function Xt() {
|
|
|
5081
5080
|
function w(u, b) {
|
|
5082
5081
|
return u.targetTouches && (0, e.findInArray)(u.targetTouches, (k) => b === k.identifier) || u.changedTouches && (0, e.findInArray)(u.changedTouches, (k) => b === k.identifier);
|
|
5083
5082
|
}
|
|
5084
|
-
function
|
|
5083
|
+
function C(u) {
|
|
5085
5084
|
if (u.targetTouches && u.targetTouches[0]) return u.targetTouches[0].identifier;
|
|
5086
5085
|
if (u.changedTouches && u.changedTouches[0]) return u.changedTouches[0].identifier;
|
|
5087
5086
|
}
|
|
@@ -5115,7 +5114,7 @@ function Xt() {
|
|
|
5115
5114
|
function y(u, b) {
|
|
5116
5115
|
u.classList ? u.classList.remove(b) : u.className = u.className.replace(new RegExp(`(?:^|\\s)${b}(?!\\S)`, "g"), "");
|
|
5117
5116
|
}
|
|
5118
|
-
return
|
|
5117
|
+
return xe;
|
|
5119
5118
|
}
|
|
5120
5119
|
var we = {}, Nn;
|
|
5121
5120
|
function pr() {
|
|
@@ -5124,33 +5123,33 @@ function pr() {
|
|
|
5124
5123
|
value: !0
|
|
5125
5124
|
}), we.canDragX = a, we.canDragY = s, we.createCoreData = c, we.createDraggableData = l, we.getBoundPosition = o, we.getControlPosition = i, we.snapToGrid = r;
|
|
5126
5125
|
var e = bt(), n = Xt();
|
|
5127
|
-
function o(p,
|
|
5128
|
-
if (!p.props.bounds) return [
|
|
5126
|
+
function o(p, h, v) {
|
|
5127
|
+
if (!p.props.bounds) return [h, v];
|
|
5129
5128
|
let {
|
|
5130
5129
|
bounds: j
|
|
5131
5130
|
} = p.props;
|
|
5132
5131
|
j = typeof j == "string" ? j : f(j);
|
|
5133
|
-
const
|
|
5132
|
+
const T = x(p);
|
|
5134
5133
|
if (typeof j == "string") {
|
|
5135
5134
|
const {
|
|
5136
5135
|
ownerDocument: w
|
|
5137
|
-
} =
|
|
5136
|
+
} = T, C = w.defaultView;
|
|
5138
5137
|
let E;
|
|
5139
|
-
if (j === "parent" ? E =
|
|
5138
|
+
if (j === "parent" ? E = T.parentNode : E = T.getRootNode().querySelector(j), !(E instanceof C.HTMLElement))
|
|
5140
5139
|
throw new Error('Bounds selector "' + j + '" could not find an element.');
|
|
5141
|
-
const m = E, S =
|
|
5140
|
+
const m = E, S = C.getComputedStyle(T), d = C.getComputedStyle(m);
|
|
5142
5141
|
j = {
|
|
5143
|
-
left: -
|
|
5144
|
-
top: -
|
|
5145
|
-
right: (0, n.innerWidth)(m) - (0, n.outerWidth)(
|
|
5146
|
-
bottom: (0, n.innerHeight)(m) - (0, n.outerHeight)(
|
|
5142
|
+
left: -T.offsetLeft + (0, e.int)(d.paddingLeft) + (0, e.int)(S.marginLeft),
|
|
5143
|
+
top: -T.offsetTop + (0, e.int)(d.paddingTop) + (0, e.int)(S.marginTop),
|
|
5144
|
+
right: (0, n.innerWidth)(m) - (0, n.outerWidth)(T) - T.offsetLeft + (0, e.int)(d.paddingRight) - (0, e.int)(S.marginRight),
|
|
5145
|
+
bottom: (0, n.innerHeight)(m) - (0, n.outerHeight)(T) - T.offsetTop + (0, e.int)(d.paddingBottom) - (0, e.int)(S.marginBottom)
|
|
5147
5146
|
};
|
|
5148
5147
|
}
|
|
5149
|
-
return (0, e.isNum)(j.right) && (
|
|
5148
|
+
return (0, e.isNum)(j.right) && (h = Math.min(h, j.right)), (0, e.isNum)(j.bottom) && (v = Math.min(v, j.bottom)), (0, e.isNum)(j.left) && (h = Math.max(h, j.left)), (0, e.isNum)(j.top) && (v = Math.max(v, j.top)), [h, v];
|
|
5150
5149
|
}
|
|
5151
|
-
function r(p,
|
|
5152
|
-
const j = Math.round(
|
|
5153
|
-
return [j,
|
|
5150
|
+
function r(p, h, v) {
|
|
5151
|
+
const j = Math.round(h / p[0]) * p[0], T = Math.round(v / p[1]) * p[1];
|
|
5152
|
+
return [j, T];
|
|
5154
5153
|
}
|
|
5155
5154
|
function a(p) {
|
|
5156
5155
|
return p.props.axis === "both" || p.props.axis === "x";
|
|
@@ -5158,40 +5157,40 @@ function pr() {
|
|
|
5158
5157
|
function s(p) {
|
|
5159
5158
|
return p.props.axis === "both" || p.props.axis === "y";
|
|
5160
5159
|
}
|
|
5161
|
-
function i(p,
|
|
5162
|
-
const j = typeof
|
|
5163
|
-
if (typeof
|
|
5164
|
-
const
|
|
5160
|
+
function i(p, h, v) {
|
|
5161
|
+
const j = typeof h == "number" ? (0, n.getTouch)(p, h) : null;
|
|
5162
|
+
if (typeof h == "number" && !j) return null;
|
|
5163
|
+
const T = x(v), w = v.props.offsetParent || T.offsetParent || T.ownerDocument.body;
|
|
5165
5164
|
return (0, n.offsetXYFromParent)(j || p, w, v.props.scale);
|
|
5166
5165
|
}
|
|
5167
|
-
function c(p,
|
|
5168
|
-
const j = !(0, e.isNum)(p.lastX),
|
|
5166
|
+
function c(p, h, v) {
|
|
5167
|
+
const j = !(0, e.isNum)(p.lastX), T = x(p);
|
|
5169
5168
|
return j ? {
|
|
5170
|
-
node:
|
|
5169
|
+
node: T,
|
|
5171
5170
|
deltaX: 0,
|
|
5172
5171
|
deltaY: 0,
|
|
5173
|
-
lastX:
|
|
5172
|
+
lastX: h,
|
|
5174
5173
|
lastY: v,
|
|
5175
|
-
x,
|
|
5174
|
+
x: h,
|
|
5176
5175
|
y: v
|
|
5177
5176
|
} : {
|
|
5178
|
-
node:
|
|
5179
|
-
deltaX:
|
|
5177
|
+
node: T,
|
|
5178
|
+
deltaX: h - p.lastX,
|
|
5180
5179
|
deltaY: v - p.lastY,
|
|
5181
5180
|
lastX: p.lastX,
|
|
5182
5181
|
lastY: p.lastY,
|
|
5183
|
-
x,
|
|
5182
|
+
x: h,
|
|
5184
5183
|
y: v
|
|
5185
5184
|
};
|
|
5186
5185
|
}
|
|
5187
|
-
function l(p,
|
|
5186
|
+
function l(p, h) {
|
|
5188
5187
|
const v = p.props.scale;
|
|
5189
5188
|
return {
|
|
5190
|
-
node:
|
|
5191
|
-
x: p.state.x +
|
|
5192
|
-
y: p.state.y +
|
|
5193
|
-
deltaX:
|
|
5194
|
-
deltaY:
|
|
5189
|
+
node: h.node,
|
|
5190
|
+
x: p.state.x + h.deltaX / v,
|
|
5191
|
+
y: p.state.y + h.deltaY / v,
|
|
5192
|
+
deltaX: h.deltaX / v,
|
|
5193
|
+
deltaY: h.deltaY / v,
|
|
5195
5194
|
lastX: p.state.x,
|
|
5196
5195
|
lastY: p.state.y
|
|
5197
5196
|
};
|
|
@@ -5204,16 +5203,16 @@ function pr() {
|
|
|
5204
5203
|
bottom: p.bottom
|
|
5205
5204
|
};
|
|
5206
5205
|
}
|
|
5207
|
-
function
|
|
5208
|
-
const
|
|
5209
|
-
if (!
|
|
5206
|
+
function x(p) {
|
|
5207
|
+
const h = p.findDOMNode();
|
|
5208
|
+
if (!h)
|
|
5210
5209
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
5211
|
-
return
|
|
5210
|
+
return h;
|
|
5212
5211
|
}
|
|
5213
5212
|
return we;
|
|
5214
5213
|
}
|
|
5215
5214
|
var tt = {}, gt = {}, Fn;
|
|
5216
|
-
function
|
|
5215
|
+
function hr() {
|
|
5217
5216
|
if (Fn) return gt;
|
|
5218
5217
|
Fn = 1, Object.defineProperty(gt, "__esModule", {
|
|
5219
5218
|
value: !0
|
|
@@ -5228,42 +5227,42 @@ function Ri() {
|
|
|
5228
5227
|
In = 1, Object.defineProperty(tt, "__esModule", {
|
|
5229
5228
|
value: !0
|
|
5230
5229
|
}), tt.default = void 0;
|
|
5231
|
-
var e = l(ot), n = c(/* @__PURE__ */ gr()), o = c(Yn), r = Xt(), a = pr(), s = bt(), i = c(
|
|
5232
|
-
function c(
|
|
5233
|
-
return
|
|
5230
|
+
var e = l(ot), n = c(/* @__PURE__ */ gr()), o = c(Yn), r = Xt(), a = pr(), s = bt(), i = c(hr());
|
|
5231
|
+
function c(T) {
|
|
5232
|
+
return T && T.__esModule ? T : { default: T };
|
|
5234
5233
|
}
|
|
5235
|
-
function l(
|
|
5236
|
-
if (typeof WeakMap == "function") var
|
|
5234
|
+
function l(T, w) {
|
|
5235
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
5237
5236
|
return (l = function(m, S) {
|
|
5238
5237
|
if (!S && m && m.__esModule) return m;
|
|
5239
5238
|
var d, y, u = { __proto__: null, default: m };
|
|
5240
5239
|
if (m === null || typeof m != "object" && typeof m != "function") return u;
|
|
5241
|
-
if (d = S ? E :
|
|
5240
|
+
if (d = S ? E : C) {
|
|
5242
5241
|
if (d.has(m)) return d.get(m);
|
|
5243
5242
|
d.set(m, u);
|
|
5244
5243
|
}
|
|
5245
5244
|
for (const b in m) b !== "default" && {}.hasOwnProperty.call(m, b) && ((y = (d = Object.defineProperty) && Object.getOwnPropertyDescriptor(m, b)) && (y.get || y.set) ? d(u, b, y) : u[b] = m[b]);
|
|
5246
5245
|
return u;
|
|
5247
|
-
})(
|
|
5246
|
+
})(T, w);
|
|
5248
5247
|
}
|
|
5249
|
-
function f(
|
|
5250
|
-
return (w =
|
|
5248
|
+
function f(T, w, C) {
|
|
5249
|
+
return (w = x(w)) in T ? Object.defineProperty(T, w, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : T[w] = C, T;
|
|
5251
5250
|
}
|
|
5252
|
-
function
|
|
5253
|
-
var w = p(
|
|
5251
|
+
function x(T) {
|
|
5252
|
+
var w = p(T, "string");
|
|
5254
5253
|
return typeof w == "symbol" ? w : w + "";
|
|
5255
5254
|
}
|
|
5256
|
-
function p(
|
|
5257
|
-
if (typeof
|
|
5258
|
-
var
|
|
5259
|
-
if (
|
|
5260
|
-
var E =
|
|
5255
|
+
function p(T, w) {
|
|
5256
|
+
if (typeof T != "object" || !T) return T;
|
|
5257
|
+
var C = T[Symbol.toPrimitive];
|
|
5258
|
+
if (C !== void 0) {
|
|
5259
|
+
var E = C.call(T, w);
|
|
5261
5260
|
if (typeof E != "object") return E;
|
|
5262
5261
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5263
5262
|
}
|
|
5264
|
-
return (w === "string" ? String : Number)(
|
|
5263
|
+
return (w === "string" ? String : Number)(T);
|
|
5265
5264
|
}
|
|
5266
|
-
const
|
|
5265
|
+
const h = {
|
|
5267
5266
|
touch: {
|
|
5268
5267
|
start: "touchstart",
|
|
5269
5268
|
move: "touchmove",
|
|
@@ -5275,17 +5274,17 @@ function Ri() {
|
|
|
5275
5274
|
stop: "mouseup"
|
|
5276
5275
|
}
|
|
5277
5276
|
};
|
|
5278
|
-
let v =
|
|
5277
|
+
let v = h.mouse, j = class extends e.Component {
|
|
5279
5278
|
constructor() {
|
|
5280
5279
|
super(...arguments), f(this, "dragging", !1), f(this, "lastX", NaN), f(this, "lastY", NaN), f(this, "touchIdentifier", null), f(this, "mounted", !1), f(this, "handleDragStart", (w) => {
|
|
5281
5280
|
if (this.props.onMouseDown(w), !this.props.allowAnyClick && typeof w.button == "number" && w.button !== 0) return !1;
|
|
5282
|
-
const
|
|
5283
|
-
if (!
|
|
5281
|
+
const C = this.findDOMNode();
|
|
5282
|
+
if (!C || !C.ownerDocument || !C.ownerDocument.body)
|
|
5284
5283
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
5285
5284
|
const {
|
|
5286
5285
|
ownerDocument: E
|
|
5287
|
-
} =
|
|
5288
|
-
if (this.props.disabled || !(w.target instanceof E.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(w.target, this.props.handle,
|
|
5286
|
+
} = C;
|
|
5287
|
+
if (this.props.disabled || !(w.target instanceof E.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(w.target, this.props.handle, C) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(w.target, this.props.cancel, C))
|
|
5289
5288
|
return;
|
|
5290
5289
|
w.type === "touchstart" && !this.props.allowMobileScroll && w.preventDefault();
|
|
5291
5290
|
const m = (0, r.getTouchIdentifier)(w);
|
|
@@ -5298,12 +5297,12 @@ function Ri() {
|
|
|
5298
5297
|
} = S, u = (0, a.createCoreData)(this, d, y);
|
|
5299
5298
|
(0, i.default)("DraggableCore: handleDragStart: %j", u), (0, i.default)("calling", this.props.onStart), !(this.props.onStart(w, u) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(E), this.dragging = !0, this.lastX = d, this.lastY = y, (0, r.addEvent)(E, v.move, this.handleDrag), (0, r.addEvent)(E, v.stop, this.handleDragStop));
|
|
5300
5299
|
}), f(this, "handleDrag", (w) => {
|
|
5301
|
-
const
|
|
5302
|
-
if (
|
|
5300
|
+
const C = (0, a.getControlPosition)(w, this.touchIdentifier, this);
|
|
5301
|
+
if (C == null) return;
|
|
5303
5302
|
let {
|
|
5304
5303
|
x: E,
|
|
5305
5304
|
y: m
|
|
5306
|
-
} =
|
|
5305
|
+
} = C;
|
|
5307
5306
|
if (Array.isArray(this.props.grid)) {
|
|
5308
5307
|
let y = E - this.lastX, u = m - this.lastY;
|
|
5309
5308
|
if ([y, u] = (0, a.snapToGrid)(this.props.grid, y, u), !y && !u) return;
|
|
@@ -5322,12 +5321,12 @@ function Ri() {
|
|
|
5322
5321
|
this.lastX = E, this.lastY = m;
|
|
5323
5322
|
}), f(this, "handleDragStop", (w) => {
|
|
5324
5323
|
if (!this.dragging) return;
|
|
5325
|
-
const
|
|
5326
|
-
if (
|
|
5324
|
+
const C = (0, a.getControlPosition)(w, this.touchIdentifier, this);
|
|
5325
|
+
if (C == null) return;
|
|
5327
5326
|
let {
|
|
5328
5327
|
x: E,
|
|
5329
5328
|
y: m
|
|
5330
|
-
} =
|
|
5329
|
+
} = C;
|
|
5331
5330
|
if (Array.isArray(this.props.grid)) {
|
|
5332
5331
|
let u = E - this.lastX || 0, b = m - this.lastY || 0;
|
|
5333
5332
|
[u, b] = (0, a.snapToGrid)(this.props.grid, u, b), E = this.lastX + u, m = this.lastY + b;
|
|
@@ -5336,12 +5335,12 @@ function Ri() {
|
|
|
5336
5335
|
if (this.props.onStop(w, S) === !1 || this.mounted === !1) return !1;
|
|
5337
5336
|
const y = this.findDOMNode();
|
|
5338
5337
|
y && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(y.ownerDocument), (0, i.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, y && ((0, i.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(y.ownerDocument, v.move, this.handleDrag), (0, r.removeEvent)(y.ownerDocument, v.stop, this.handleDragStop));
|
|
5339
|
-
}), f(this, "onMouseDown", (w) => (v =
|
|
5338
|
+
}), f(this, "onMouseDown", (w) => (v = h.mouse, this.handleDragStart(w))), f(this, "onMouseUp", (w) => (v = h.mouse, this.handleDragStop(w))), f(this, "onTouchStart", (w) => (v = h.touch, this.handleDragStart(w))), f(this, "onTouchEnd", (w) => (v = h.touch, this.handleDragStop(w)));
|
|
5340
5339
|
}
|
|
5341
5340
|
componentDidMount() {
|
|
5342
5341
|
this.mounted = !0;
|
|
5343
5342
|
const w = this.findDOMNode();
|
|
5344
|
-
w && (0, r.addEvent)(w,
|
|
5343
|
+
w && (0, r.addEvent)(w, h.touch.start, this.onTouchStart, {
|
|
5345
5344
|
passive: !1
|
|
5346
5345
|
});
|
|
5347
5346
|
}
|
|
@@ -5350,18 +5349,18 @@ function Ri() {
|
|
|
5350
5349
|
const w = this.findDOMNode();
|
|
5351
5350
|
if (w) {
|
|
5352
5351
|
const {
|
|
5353
|
-
ownerDocument:
|
|
5352
|
+
ownerDocument: C
|
|
5354
5353
|
} = w;
|
|
5355
|
-
(0, r.removeEvent)(
|
|
5354
|
+
(0, r.removeEvent)(C, h.mouse.move, this.handleDrag), (0, r.removeEvent)(C, h.touch.move, this.handleDrag), (0, r.removeEvent)(C, h.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, h.touch.stop, this.handleDragStop), (0, r.removeEvent)(w, h.touch.start, this.onTouchStart, {
|
|
5356
5355
|
passive: !1
|
|
5357
|
-
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(
|
|
5356
|
+
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(C);
|
|
5358
5357
|
}
|
|
5359
5358
|
}
|
|
5360
5359
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
5361
5360
|
// the underlying DOM node ourselves. See the README for more information.
|
|
5362
5361
|
findDOMNode() {
|
|
5363
|
-
var w,
|
|
5364
|
-
return (w = this.props) != null && w.nodeRef ? (E = (
|
|
5362
|
+
var w, C, E;
|
|
5363
|
+
return (w = this.props) != null && w.nodeRef ? (E = (C = this.props) == null ? void 0 : C.nodeRef) == null ? void 0 : E.current : o.default.findDOMNode(this);
|
|
5365
5364
|
}
|
|
5366
5365
|
render() {
|
|
5367
5366
|
return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
|
|
@@ -5408,8 +5407,8 @@ function Ri() {
|
|
|
5408
5407
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
5409
5408
|
* instead of using the parent node.
|
|
5410
5409
|
*/
|
|
5411
|
-
offsetParent: function(
|
|
5412
|
-
if (
|
|
5410
|
+
offsetParent: function(T, w) {
|
|
5411
|
+
if (T[w] && T[w].nodeType !== 1)
|
|
5413
5412
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
5414
5413
|
},
|
|
5415
5414
|
/**
|
|
@@ -5534,11 +5533,11 @@ function Oi() {
|
|
|
5534
5533
|
return l.default;
|
|
5535
5534
|
}
|
|
5536
5535
|
}), e.default = void 0;
|
|
5537
|
-
var n = p(ot), o =
|
|
5538
|
-
function
|
|
5539
|
-
return
|
|
5536
|
+
var n = p(ot), o = x(/* @__PURE__ */ gr()), r = x(Yn), a = ki(), s = Xt(), i = pr(), c = bt(), l = x(Ri()), f = x(hr());
|
|
5537
|
+
function x(C) {
|
|
5538
|
+
return C && C.__esModule ? C : { default: C };
|
|
5540
5539
|
}
|
|
5541
|
-
function p(
|
|
5540
|
+
function p(C, E) {
|
|
5542
5541
|
if (typeof WeakMap == "function") var m = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
|
|
5543
5542
|
return (p = function(d, y) {
|
|
5544
5543
|
if (!y && d && d.__esModule) return d;
|
|
@@ -5550,33 +5549,33 @@ function Oi() {
|
|
|
5550
5549
|
}
|
|
5551
5550
|
for (const D in d) D !== "default" && {}.hasOwnProperty.call(d, D) && ((b = (u = Object.defineProperty) && Object.getOwnPropertyDescriptor(d, D)) && (b.get || b.set) ? u(k, D, b) : k[D] = d[D]);
|
|
5552
5551
|
return k;
|
|
5553
|
-
})(
|
|
5552
|
+
})(C, E);
|
|
5554
5553
|
}
|
|
5555
|
-
function
|
|
5556
|
-
return
|
|
5554
|
+
function h() {
|
|
5555
|
+
return h = Object.assign ? Object.assign.bind() : function(C) {
|
|
5557
5556
|
for (var E = 1; E < arguments.length; E++) {
|
|
5558
5557
|
var m = arguments[E];
|
|
5559
|
-
for (var S in m) ({}).hasOwnProperty.call(m, S) && (
|
|
5558
|
+
for (var S in m) ({}).hasOwnProperty.call(m, S) && (C[S] = m[S]);
|
|
5560
5559
|
}
|
|
5561
|
-
return
|
|
5562
|
-
},
|
|
5560
|
+
return C;
|
|
5561
|
+
}, h.apply(null, arguments);
|
|
5563
5562
|
}
|
|
5564
|
-
function v(
|
|
5565
|
-
return (E = j(E)) in
|
|
5563
|
+
function v(C, E, m) {
|
|
5564
|
+
return (E = j(E)) in C ? Object.defineProperty(C, E, { value: m, enumerable: !0, configurable: !0, writable: !0 }) : C[E] = m, C;
|
|
5566
5565
|
}
|
|
5567
|
-
function j(
|
|
5568
|
-
var E = C
|
|
5566
|
+
function j(C) {
|
|
5567
|
+
var E = T(C, "string");
|
|
5569
5568
|
return typeof E == "symbol" ? E : E + "";
|
|
5570
5569
|
}
|
|
5571
|
-
function C
|
|
5572
|
-
if (typeof
|
|
5573
|
-
var m =
|
|
5570
|
+
function T(C, E) {
|
|
5571
|
+
if (typeof C != "object" || !C) return C;
|
|
5572
|
+
var m = C[Symbol.toPrimitive];
|
|
5574
5573
|
if (m !== void 0) {
|
|
5575
|
-
var S = m.call(
|
|
5574
|
+
var S = m.call(C, E);
|
|
5576
5575
|
if (typeof S != "object") return S;
|
|
5577
5576
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
5578
5577
|
}
|
|
5579
|
-
return (E === "string" ? String : Number)(
|
|
5578
|
+
return (E === "string" ? String : Number)(C);
|
|
5580
5579
|
}
|
|
5581
5580
|
class w extends n.Component {
|
|
5582
5581
|
// React 16.3+
|
|
@@ -5690,23 +5689,23 @@ function Oi() {
|
|
|
5690
5689
|
...U
|
|
5691
5690
|
} = this.props;
|
|
5692
5691
|
let $ = {}, Y = null;
|
|
5693
|
-
const
|
|
5692
|
+
const P = !!!k || this.state.dragging, I = k || d, Z = {
|
|
5694
5693
|
// Set left if horizontal drag is enabled
|
|
5695
|
-
x: (0, i.canDragX)(this) &&
|
|
5694
|
+
x: (0, i.canDragX)(this) && P ? this.state.x : I.x,
|
|
5696
5695
|
// Set top if vertical drag is enabled
|
|
5697
|
-
y: (0, i.canDragY)(this) &&
|
|
5696
|
+
y: (0, i.canDragY)(this) && P ? this.state.y : I.y
|
|
5698
5697
|
};
|
|
5699
5698
|
this.state.isElementSVG ? Y = (0, s.createSVGTransform)(Z, D) : $ = (0, s.createCSSTransform)(Z, D);
|
|
5700
|
-
const
|
|
5699
|
+
const K = (0, a.clsx)(S.props.className || "", y, {
|
|
5701
5700
|
[u]: this.state.dragging,
|
|
5702
5701
|
[b]: this.state.dragged
|
|
5703
5702
|
});
|
|
5704
|
-
return /* @__PURE__ */ n.createElement(l.default,
|
|
5703
|
+
return /* @__PURE__ */ n.createElement(l.default, h({}, U, {
|
|
5705
5704
|
onStart: this.onDragStart,
|
|
5706
5705
|
onDrag: this.onDrag,
|
|
5707
5706
|
onStop: this.onDragStop
|
|
5708
5707
|
}), /* @__PURE__ */ n.cloneElement(n.Children.only(S), {
|
|
5709
|
-
className:
|
|
5708
|
+
className: K,
|
|
5710
5709
|
style: {
|
|
5711
5710
|
...S.props.style,
|
|
5712
5711
|
...$
|
|
@@ -5849,18 +5848,18 @@ function Di() {
|
|
|
5849
5848
|
}
|
|
5850
5849
|
var Li = Di();
|
|
5851
5850
|
const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) => n ? /* @__PURE__ */ t.jsx(Ut, { ...o, visible: o == null ? void 0 : o.open, children: e }) : e, Fi = () => {
|
|
5852
|
-
const e =
|
|
5851
|
+
const e = M(
|
|
5853
5852
|
"WidgetDisconnected",
|
|
5854
5853
|
"Widget Disconnected"
|
|
5855
5854
|
), [n, o] = H(!0), [r, a] = H({
|
|
5856
5855
|
x: 0,
|
|
5857
5856
|
y: 250,
|
|
5858
5857
|
maxY: window.innerHeight - 200
|
|
5859
|
-
}), [s, i] = H(!1), [c, l] = H(!1), f = se(),
|
|
5858
|
+
}), [s, i] = H(!1), [c, l] = H(!1), f = se(), x = se(null), p = se(null), h = se(null), v = se({
|
|
5860
5859
|
x: 0,
|
|
5861
5860
|
y: 0
|
|
5862
|
-
}), { widgetProps: j, setOpenWidget:
|
|
5863
|
-
|
|
5861
|
+
}), { widgetProps: j, setOpenWidget: T, isFirstOpenWidget: w, setFirstOpenWidget: C } = ue(), { onSendMsg: E, connected: m, isHandshakeWidget: S } = je(), d = () => {
|
|
5862
|
+
T(!0), E({ msg: j == null ? void 0 : j.getStartedPayload });
|
|
5864
5863
|
}, y = () => {
|
|
5865
5864
|
const k = window.innerHeight;
|
|
5866
5865
|
a({
|
|
@@ -5870,12 +5869,12 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5870
5869
|
maxY: k - 200
|
|
5871
5870
|
});
|
|
5872
5871
|
}, u = () => {
|
|
5873
|
-
clearTimeout(
|
|
5874
|
-
i(!0),
|
|
5872
|
+
clearTimeout(x.current), clearTimeout(p.current), s && (h.current.style.right = "0px"), s || (h.current.style.right = "-25px", x.current = setTimeout(() => {
|
|
5873
|
+
i(!0), h.current.style.right = "0px";
|
|
5875
5874
|
}, 300));
|
|
5876
5875
|
}, b = () => {
|
|
5877
|
-
clearTimeout(p.current), s && (
|
|
5878
|
-
i(!1),
|
|
5876
|
+
clearTimeout(p.current), s && (h.current.style.right = "-15px", p.current = setTimeout(() => {
|
|
5877
|
+
i(!1), h.current.style.right = "-28px";
|
|
5879
5878
|
}, 2500));
|
|
5880
5879
|
};
|
|
5881
5880
|
return ge(() => {
|
|
@@ -5917,10 +5916,10 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5917
5916
|
children: /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
5918
5917
|
"div",
|
|
5919
5918
|
{
|
|
5920
|
-
ref:
|
|
5919
|
+
ref: h,
|
|
5921
5920
|
className: `w-launcher-container w-handler-launcher-widget ${s ? "w-show-launcher" : "w-hide-launcher"}`,
|
|
5922
5921
|
onClick: () => {
|
|
5923
|
-
c || (w || (
|
|
5922
|
+
c || (w || (C(!0), d()), T(!0));
|
|
5924
5923
|
},
|
|
5925
5924
|
onMouseOver: () => {
|
|
5926
5925
|
u();
|
|
@@ -5944,10 +5943,10 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5944
5943
|
}
|
|
5945
5944
|
);
|
|
5946
5945
|
}, Ii = B(Fi), $i = () => {
|
|
5947
|
-
const e =
|
|
5946
|
+
const e = M("NotConnected", "Not Connected"), n = M(
|
|
5948
5947
|
"CannotAutoReconnect",
|
|
5949
5948
|
"Cannot auto reconnect"
|
|
5950
|
-
), o =
|
|
5949
|
+
), o = M(
|
|
5951
5950
|
"ReconnectManually",
|
|
5952
5951
|
"Reconnect Manually"
|
|
5953
5952
|
), [r, a] = H(!1), { connected: s, createSocket: i } = je(), { widgetProps: c } = ue();
|
|
@@ -5982,14 +5981,14 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
5982
5981
|
$i
|
|
5983
5982
|
), Ui = () => {
|
|
5984
5983
|
const { xs: e } = Re.useBreakpoint(), [n, o] = H(!1), { isOpenWidget: r, widgetProps: a } = ue(), { isActiveTabVA: s } = Me(), i = se(null), c = z(() => {
|
|
5985
|
-
var
|
|
5984
|
+
var x;
|
|
5986
5985
|
const f = [At];
|
|
5987
|
-
return e && (a != null && a.isSF ? f == null || f.push(`${At}-sf-mobile`) : f == null || f.push(`${At}-mobile`)), (
|
|
5986
|
+
return e && (a != null && a.isSF ? f == null || f.push(`${At}-sf-mobile`) : f == null || f.push(`${At}-mobile`)), (x = f == null ? void 0 : f.filter(Boolean)) == null ? void 0 : x.join(" ");
|
|
5988
5987
|
}, [e, a == null ? void 0 : a.isSF]), l = Ir(
|
|
5989
5988
|
(f) => {
|
|
5990
5989
|
var p;
|
|
5991
|
-
const
|
|
5992
|
-
return a != null && a.isSF && (
|
|
5990
|
+
const x = [f, Ot == null ? void 0 : Ot.FADE_IN];
|
|
5991
|
+
return a != null && a.isSF && (x == null || x.push(`${f}-sf`)), e && (a != null && a.isSF ? x == null || x.push(`${f}-sf-mobile`) : x == null || x.push(`${f}-mobile`)), (p = x == null ? void 0 : x.filter(Boolean)) == null ? void 0 : p.join(" ");
|
|
5993
5992
|
},
|
|
5994
5993
|
[a == null ? void 0 : a.isSF, e]
|
|
5995
5994
|
);
|
|
@@ -6002,7 +6001,7 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6002
6001
|
/* @__PURE__ */ t.jsx("div", { className: l(go), children: /* @__PURE__ */ t.jsx(ws, {}) }),
|
|
6003
6002
|
/* @__PURE__ */ t.jsx(js, {})
|
|
6004
6003
|
] }),
|
|
6005
|
-
/* @__PURE__ */ t.jsx("div", { style: { display: s ? "none" : "block" }, children: /* @__PURE__ */ t.jsx("div", { className: l(po), children: /* @__PURE__ */ t.jsx(Ms, { children: /* @__PURE__ */ t.jsx(Os, { children: /* @__PURE__ */ t.jsx(
|
|
6004
|
+
/* @__PURE__ */ t.jsx("div", { style: { display: s ? "none" : "block" }, children: /* @__PURE__ */ t.jsx("div", { className: l(po), children: /* @__PURE__ */ t.jsx(Ms, { children: /* @__PURE__ */ t.jsx(Os, { children: /* @__PURE__ */ t.jsx(Ti, {}) }) }) }) }),
|
|
6006
6005
|
/* @__PURE__ */ t.jsx(Hi, {})
|
|
6007
6006
|
] }) : /* @__PURE__ */ t.jsx(Ii, {});
|
|
6008
6007
|
}, Wi = B(Ui), Bi = ({ items: e, ...n }) => Pe != null && Pe.startsWith("5") || Xe != null && Xe.startsWith("18") ? /* @__PURE__ */ t.jsx(wt, { ...n, items: e }) : /* @__PURE__ */ t.jsx(wt, { ...n, children: e == null ? void 0 : e.map(({ ...o }) => /* @__PURE__ */ Ht(
|
|
@@ -6013,10 +6012,10 @@ const Mi = /* @__PURE__ */ eo(Li), Ni = ({ children: e, usePopover: n, ...o }) =
|
|
|
6013
6012
|
tab: o == null ? void 0 : o.label
|
|
6014
6013
|
}
|
|
6015
6014
|
)) }), Yi = B(Bi), Vi = () => {
|
|
6016
|
-
const { isOpenWidget: e, isUserInputHide: n } = ue(), { setActiveTab: o, activeTab: r } = Me(), a =
|
|
6015
|
+
const { isOpenWidget: e, isUserInputHide: n } = ue(), { setActiveTab: o, activeTab: r } = Me(), a = M(
|
|
6017
6016
|
"VirtualAssistant",
|
|
6018
6017
|
"Virtual Assistant"
|
|
6019
|
-
), s =
|
|
6018
|
+
), s = M("Helpdesk", "Helpdesk"), { xs: i } = Re.useBreakpoint();
|
|
6020
6019
|
return ge(() => {
|
|
6021
6020
|
const c = qn();
|
|
6022
6021
|
o((c == null ? void 0 : c.activeTab) ?? r);
|