widget-chatbot 2.0.0-alpha.8 → 2.0.0-alpha.9

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