@tarxemo/customer_support 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -63,20 +63,20 @@ function BA() {
63
63
  return w.now() - M;
64
64
  };
65
65
  }
66
- var tt = [], I = [], F = 1, W = null, ft = 3, Zt = !1, P = !1, rt = !1, lt = !1, Et = typeof setTimeout == "function" ? setTimeout : null, te = typeof clearTimeout == "function" ? clearTimeout : null, St = typeof setImmediate < "u" ? setImmediate : null;
66
+ var P = [], I = [], F = 1, W = null, ft = 3, Zt = !1, tt = !1, rt = !1, lt = !1, Et = typeof setTimeout == "function" ? setTimeout : null, te = typeof clearTimeout == "function" ? clearTimeout : null, St = typeof setImmediate < "u" ? setImmediate : null;
67
67
  function yt(H) {
68
68
  for (var $ = b(I); $ !== null; ) {
69
69
  if ($.callback === null) y(I);
70
70
  else if ($.startTime <= H)
71
- y(I), $.sortIndex = $.expirationTime, g(tt, $);
71
+ y(I), $.sortIndex = $.expirationTime, g(P, $);
72
72
  else break;
73
73
  $ = b(I);
74
74
  }
75
75
  }
76
76
  function ie(H) {
77
- if (rt = !1, yt(H), !P)
78
- if (b(tt) !== null)
79
- P = !0, Se || (Se = !0, Mt());
77
+ if (rt = !1, yt(H), !tt)
78
+ if (b(P) !== null)
79
+ tt = !0, Se || (Se = !0, Mt());
80
80
  else {
81
81
  var $ = b(I);
82
82
  $ !== null && rl(ie, $.startTime - H);
@@ -93,11 +93,11 @@ function BA() {
93
93
  var $ = !0;
94
94
  try {
95
95
  t: {
96
- P = !1, rt && (rt = !1, te(ee), ee = -1), Zt = !0;
96
+ tt = !1, rt && (rt = !1, te(ee), ee = -1), Zt = !0;
97
97
  var et = ft;
98
98
  try {
99
99
  e: {
100
- for (yt(H), W = b(tt); W !== null && !(W.expirationTime > H && it()); ) {
100
+ for (yt(H), W = b(P); W !== null && !(W.expirationTime > H && it()); ) {
101
101
  var bt = W.callback;
102
102
  if (typeof bt == "function") {
103
103
  W.callback = null, ft = W.priorityLevel;
@@ -108,9 +108,9 @@ function BA() {
108
108
  W.callback = Rt, yt(H), $ = !0;
109
109
  break e;
110
110
  }
111
- W === b(tt) && y(tt), yt(H);
112
- } else y(tt);
113
- W = b(tt);
111
+ W === b(P) && y(P), yt(H);
112
+ } else y(P);
113
+ W = b(P);
114
114
  }
115
115
  if (W !== null) $ = !0;
116
116
  else {
@@ -221,7 +221,7 @@ function BA() {
221
221
  startTime: et,
222
222
  expirationTime: Rt,
223
223
  sortIndex: -1
224
- }, et > bt ? (H.sortIndex = et, g(I, H), b(tt) === null && H === b(I) && (rt ? (te(ee), ee = -1) : rt = !0, rl(ie, et - bt))) : (H.sortIndex = Rt, g(tt, H), P || Zt || (P = !0, Se || (Se = !0, Mt()))), H;
224
+ }, et > bt ? (H.sortIndex = et, g(I, H), b(P) === null && H === b(I) && (rt ? (te(ee), ee = -1) : rt = !0, rl(ie, et - bt))) : (H.sortIndex = Rt, g(P, H), tt || Zt || (tt = !0, Se || (Se = !0, Mt()))), H;
225
225
  }, m.unstable_shouldYield = it, m.unstable_wrapCallback = function(H) {
226
226
  var $ = ft;
227
227
  return function() {
@@ -261,7 +261,7 @@ function qA() {
261
261
  var et = Et;
262
262
  try {
263
263
  e: {
264
- for (w(H), lt = y(Zt); lt !== null && !(lt.expirationTime > H && tt()); ) {
264
+ for (w(H), lt = y(Zt); lt !== null && !(lt.expirationTime > H && P()); ) {
265
265
  var bt = lt.callback;
266
266
  if (typeof bt == "function") {
267
267
  lt.callback = null, Et = lt.priorityLevel;
@@ -278,7 +278,7 @@ function qA() {
278
278
  }
279
279
  if (lt !== null) $ = !0;
280
280
  else {
281
- var be = y(P);
281
+ var be = y(tt);
282
282
  be !== null && I(
283
283
  M,
284
284
  be.startTime - H
@@ -330,12 +330,12 @@ function qA() {
330
330
  return et !== 0 ? et : H.id - $.id;
331
331
  }
332
332
  function w(H) {
333
- for (var $ = y(P); $ !== null; ) {
334
- if ($.callback === null) T(P);
333
+ for (var $ = y(tt); $ !== null; ) {
334
+ if ($.callback === null) T(tt);
335
335
  else if ($.startTime <= H)
336
- T(P), $.sortIndex = $.expirationTime, b(Zt, $);
336
+ T(tt), $.sortIndex = $.expirationTime, b(Zt, $);
337
337
  else break;
338
- $ = y(P);
338
+ $ = y(tt);
339
339
  }
340
340
  }
341
341
  function M(H) {
@@ -343,14 +343,14 @@ function qA() {
343
343
  if (y(Zt) !== null)
344
344
  St = !0, Jt || (Jt = !0, ct());
345
345
  else {
346
- var $ = y(P);
346
+ var $ = y(tt);
347
347
  $ !== null && I(
348
348
  M,
349
349
  $.startTime - H
350
350
  );
351
351
  }
352
352
  }
353
- function tt() {
353
+ function P() {
354
354
  return ie ? !0 : !(m.unstable_now() - Mt < Ft);
355
355
  }
356
356
  function I(H, $) {
@@ -369,7 +369,7 @@ function qA() {
369
369
  return W.now() - ft;
370
370
  };
371
371
  }
372
- var Zt = [], P = [], rt = 1, lt = null, Et = 3, te = !1, St = !1, yt = !1, ie = !1, Se = typeof setTimeout == "function" ? setTimeout : null, ee = typeof clearTimeout == "function" ? clearTimeout : null, nt = typeof setImmediate < "u" ? setImmediate : null, Jt = !1, it = -1, Ft = 5, Mt = -1;
372
+ var Zt = [], tt = [], rt = 1, lt = null, Et = 3, te = !1, St = !1, yt = !1, ie = !1, Se = typeof setTimeout == "function" ? setTimeout : null, ee = typeof clearTimeout == "function" ? clearTimeout : null, nt = typeof setImmediate < "u" ? setImmediate : null, Jt = !1, it = -1, Ft = 5, Mt = -1;
373
373
  if (typeof nt == "function")
374
374
  var ct = function() {
375
375
  nt(g);
@@ -453,8 +453,8 @@ function qA() {
453
453
  startTime: et,
454
454
  expirationTime: Rt,
455
455
  sortIndex: -1
456
- }, et > bt ? (H.sortIndex = et, b(P, H), y(Zt) === null && H === y(P) && (yt ? (ee(it), it = -1) : yt = !0, I(M, et - bt))) : (H.sortIndex = Rt, b(Zt, H), St || te || (St = !0, Jt || (Jt = !0, ct()))), H;
457
- }, m.unstable_shouldYield = tt, m.unstable_wrapCallback = function(H) {
456
+ }, et > bt ? (H.sortIndex = et, b(tt, H), y(Zt) === null && H === y(tt) && (yt ? (ee(it), it = -1) : yt = !0, I(M, et - bt))) : (H.sortIndex = Rt, b(Zt, H), St || te || (St = !0, Jt || (Jt = !0, ct()))), H;
457
+ }, m.unstable_shouldYield = P, m.unstable_wrapCallback = function(H) {
458
458
  var $ = Et;
459
459
  return function() {
460
460
  var et = Et;
@@ -524,7 +524,7 @@ function jA() {
524
524
  }
525
525
  return null;
526
526
  }
527
- function tt(l) {
527
+ function P(l) {
528
528
  if (R(l) !== l)
529
529
  throw Error(y(188));
530
530
  }
@@ -547,8 +547,8 @@ function jA() {
547
547
  }
548
548
  if (s.child === r.child) {
549
549
  for (r = s.child; r; ) {
550
- if (r === u) return tt(s), l;
551
- if (r === c) return tt(s), n;
550
+ if (r === u) return P(s), l;
551
+ if (r === c) return P(s), n;
552
552
  r = r.sibling;
553
553
  }
554
554
  throw Error(y(188));
@@ -595,7 +595,7 @@ function jA() {
595
595
  }
596
596
  return null;
597
597
  }
598
- var W = Object.assign, ft = Symbol.for("react.element"), Zt = Symbol.for("react.transitional.element"), P = Symbol.for("react.portal"), rt = Symbol.for("react.fragment"), lt = Symbol.for("react.strict_mode"), Et = Symbol.for("react.profiler"), te = Symbol.for("react.consumer"), St = Symbol.for("react.context"), yt = Symbol.for("react.forward_ref"), ie = Symbol.for("react.suspense"), Se = Symbol.for("react.suspense_list"), ee = Symbol.for("react.memo"), nt = Symbol.for("react.lazy"), Jt = Symbol.for("react.activity"), it = Symbol.for("react.memo_cache_sentinel"), Ft = Symbol.iterator;
598
+ var W = Object.assign, ft = Symbol.for("react.element"), Zt = Symbol.for("react.transitional.element"), tt = Symbol.for("react.portal"), rt = Symbol.for("react.fragment"), lt = Symbol.for("react.strict_mode"), Et = Symbol.for("react.profiler"), te = Symbol.for("react.consumer"), St = Symbol.for("react.context"), yt = Symbol.for("react.forward_ref"), ie = Symbol.for("react.suspense"), Se = Symbol.for("react.suspense_list"), ee = Symbol.for("react.memo"), nt = Symbol.for("react.lazy"), Jt = Symbol.for("react.activity"), it = Symbol.for("react.memo_cache_sentinel"), Ft = Symbol.iterator;
599
599
  function Mt(l) {
600
600
  return l === null || typeof l != "object" ? null : (l = Ft && l[Ft] || l["@@iterator"], typeof l == "function" ? l : null);
601
601
  }
@@ -621,7 +621,7 @@ function jA() {
621
621
  }
622
622
  if (typeof l == "object")
623
623
  switch (l.$$typeof) {
624
- case P:
624
+ case tt:
625
625
  return "Portal";
626
626
  case St:
627
627
  return l.displayName || "Context";
@@ -2630,7 +2630,7 @@ Error generating stack: ` + c.message + `
2630
2630
  N.mode,
2631
2631
  B
2632
2632
  ), Xo(B, C), B.return = N, B;
2633
- case P:
2633
+ case tt:
2634
2634
  return C = Td(
2635
2635
  C,
2636
2636
  N.mode,
@@ -2666,7 +2666,7 @@ Error generating stack: ` + c.message + `
2666
2666
  switch (B.$$typeof) {
2667
2667
  case Zt:
2668
2668
  return B.key === pt ? O(N, C, B, J) : null;
2669
- case P:
2669
+ case tt:
2670
2670
  return B.key === pt ? q(N, C, B, J) : null;
2671
2671
  case nt:
2672
2672
  return B = xi(B), j(N, C, B, J);
@@ -2700,7 +2700,7 @@ Error generating stack: ` + c.message + `
2700
2700
  return N = N.get(
2701
2701
  J.key === null ? B : J.key
2702
2702
  ) || null, O(C, N, J, pt);
2703
- case P:
2703
+ case tt:
2704
2704
  return N = N.get(
2705
2705
  J.key === null ? B : J.key
2706
2706
  ) || null, q(C, N, J, pt);
@@ -2848,7 +2848,7 @@ Error generating stack: ` + c.message + `
2848
2848
  ), Xo(J, B), J.return = N, N = J);
2849
2849
  }
2850
2850
  return p(N);
2851
- case P:
2851
+ case tt:
2852
2852
  t: {
2853
2853
  for (pt = B.key; C !== null; ) {
2854
2854
  if (C.key === pt)
@@ -10316,7 +10316,7 @@ function YA() {
10316
10316
  "Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"
10317
10317
  );
10318
10318
  }
10319
- function tt() {
10319
+ function P() {
10320
10320
  console.error(
10321
10321
  "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
10322
10322
  );
@@ -10337,7 +10337,7 @@ function YA() {
10337
10337
  function Zt(t, e) {
10338
10338
  t.context === xf && (Eh(t.current, 2, e, t, null, null), Ya());
10339
10339
  }
10340
- function P(t, e) {
10340
+ function tt(t, e) {
10341
10341
  if (Ru !== null) {
10342
10342
  var a = e.staleFamilies;
10343
10343
  e = e.updatedFamilies, ks(), K0(
@@ -26642,7 +26642,7 @@ Check the top-level render call using <` + i + ">.");
26642
26642
  }
26643
26643
  }, ac = {
26644
26644
  readContext: function(t) {
26645
- return tt(), re(t);
26645
+ return P(), re(t);
26646
26646
  },
26647
26647
  use: function(t) {
26648
26648
  return M(), ku(t);
@@ -26738,7 +26738,7 @@ Check the top-level render call using <` + i + ">.");
26738
26738
  }
26739
26739
  }, ri = {
26740
26740
  readContext: function(t) {
26741
- return tt(), re(t);
26741
+ return P(), re(t);
26742
26742
  },
26743
26743
  use: function(t) {
26744
26744
  return M(), ku(t);
@@ -26834,7 +26834,7 @@ Check the top-level render call using <` + i + ">.");
26834
26834
  }
26835
26835
  }, Ov = {
26836
26836
  readContext: function(t) {
26837
- return tt(), re(t);
26837
+ return P(), re(t);
26838
26838
  },
26839
26839
  use: function(t) {
26840
26840
  return M(), ku(t);
@@ -27251,7 +27251,7 @@ Learn more: https://react.dev/warnings/version-mismatch`)
27251
27251
  currentDispatcherRef: X,
27252
27252
  reconcilerVersion: "19.2.4"
27253
27253
  };
27254
- return t.overrideHookState = tE, t.overrideHookStateDeletePath = eE, t.overrideHookStateRenamePath = lE, t.overrideProps = aE, t.overridePropsDeletePath = nE, t.overridePropsRenamePath = uE, t.scheduleUpdate = iE, t.scheduleRetry = cE, t.setErrorHandler = oE, t.setSuspenseHandler = fE, t.scheduleRefresh = P, t.scheduleRoot = Zt, t.setRefreshHandler = rt, t.getCurrentFiber = De, Sm(t);
27254
+ return t.overrideHookState = tE, t.overrideHookStateDeletePath = eE, t.overrideHookStateRenamePath = lE, t.overrideProps = aE, t.overridePropsDeletePath = nE, t.overridePropsRenamePath = uE, t.scheduleUpdate = iE, t.scheduleRetry = cE, t.setErrorHandler = oE, t.setSuspenseHandler = fE, t.scheduleRefresh = tt, t.scheduleRoot = Zt, t.setRefreshHandler = rt, t.getCurrentFiber = De, Sm(t);
27255
27255
  })() && tc && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && navigator.userAgent.indexOf("Edge") === -1 || -1 < navigator.userAgent.indexOf("Firefox"))) {
27256
27256
  var sE = window.location.protocol;
27257
27257
  /^(https?|file):$/.test(sE) && console.info(
@@ -27369,10 +27369,10 @@ const ZA = BE(
27369
27369
  children: R,
27370
27370
  iconNode: w,
27371
27371
  ...M
27372
- }, tt) => Zb(
27372
+ }, P) => Zb(
27373
27373
  "svg",
27374
27374
  {
27375
- ref: tt,
27375
+ ref: P,
27376
27376
  ...QA,
27377
27377
  width: g,
27378
27378
  height: g,
@@ -27650,8 +27650,8 @@ const U3 = (m) => {
27650
27650
  g[T] = y;
27651
27651
  const R = gm(y) ? [] : {};
27652
27652
  return O0(y, (w, M) => {
27653
- const tt = b(w, T + 1);
27654
- !pm(tt) && (R[M] = tt);
27653
+ const P = b(w, T + 1);
27654
+ !pm(P) && (R[M] = P);
27655
27655
  }), g[T] = void 0, R;
27656
27656
  }
27657
27657
  }
@@ -27804,25 +27804,25 @@ function r1(m, g, b) {
27804
27804
  }, !1, function(rt, lt) {
27805
27805
  return !V.isUndefined(lt[rt]);
27806
27806
  });
27807
- const y = b.metaTokens, T = b.visitor || F, R = b.dots, w = b.indexes, tt = (b.Blob || typeof Blob < "u" && Blob) && V.isSpecCompliantForm(g);
27807
+ const y = b.metaTokens, T = b.visitor || F, R = b.dots, w = b.indexes, P = (b.Blob || typeof Blob < "u" && Blob) && V.isSpecCompliantForm(g);
27808
27808
  if (!V.isFunction(T))
27809
27809
  throw new TypeError("visitor must be a function");
27810
- function I(P) {
27811
- if (P === null) return "";
27812
- if (V.isDate(P))
27813
- return P.toISOString();
27814
- if (V.isBoolean(P))
27815
- return P.toString();
27816
- if (!tt && V.isBlob(P))
27810
+ function I(tt) {
27811
+ if (tt === null) return "";
27812
+ if (V.isDate(tt))
27813
+ return tt.toISOString();
27814
+ if (V.isBoolean(tt))
27815
+ return tt.toString();
27816
+ if (!P && V.isBlob(tt))
27817
27817
  throw new Ht("Blob is not supported. Use a Buffer instead.");
27818
- return V.isArrayBuffer(P) || V.isTypedArray(P) ? tt && typeof Blob == "function" ? new Blob([P]) : Buffer.from(P) : P;
27818
+ return V.isArrayBuffer(tt) || V.isTypedArray(tt) ? P && typeof Blob == "function" ? new Blob([tt]) : Buffer.from(tt) : tt;
27819
27819
  }
27820
- function F(P, rt, lt) {
27821
- let Et = P;
27822
- if (P && !lt && typeof P == "object") {
27820
+ function F(tt, rt, lt) {
27821
+ let Et = tt;
27822
+ if (tt && !lt && typeof tt == "object") {
27823
27823
  if (V.endsWith(rt, "{}"))
27824
- rt = y ? rt : rt.slice(0, -2), P = JSON.stringify(P);
27825
- else if (V.isArray(P) && B3(P) || (V.isFileList(P) || V.endsWith(rt, "[]")) && (Et = V.toArray(P)))
27824
+ rt = y ? rt : rt.slice(0, -2), tt = JSON.stringify(tt);
27825
+ else if (V.isArray(tt) && B3(tt) || (V.isFileList(tt) || V.endsWith(rt, "[]")) && (Et = V.toArray(tt)))
27826
27826
  return rt = WE(rt), Et.forEach(function(St, yt) {
27827
27827
  !(V.isUndefined(St) || St === null) && g.append(
27828
27828
  // eslint-disable-next-line no-nested-ternary
@@ -27831,18 +27831,18 @@ function r1(m, g, b) {
27831
27831
  );
27832
27832
  }), !1;
27833
27833
  }
27834
- return Kb(P) ? !0 : (g.append(bE(lt, rt, R), I(P)), !1);
27834
+ return Kb(tt) ? !0 : (g.append(bE(lt, rt, R), I(tt)), !1);
27835
27835
  }
27836
27836
  const W = [], ft = Object.assign(q3, {
27837
27837
  defaultVisitor: F,
27838
27838
  convertValue: I,
27839
27839
  isVisitable: Kb
27840
27840
  });
27841
- function Zt(P, rt) {
27842
- if (!V.isUndefined(P)) {
27843
- if (W.indexOf(P) !== -1)
27841
+ function Zt(tt, rt) {
27842
+ if (!V.isUndefined(tt)) {
27843
+ if (W.indexOf(tt) !== -1)
27844
27844
  throw Error("Circular reference detected in " + rt.join("."));
27845
- W.push(P), V.forEach(P, function(Et, te) {
27845
+ W.push(tt), V.forEach(tt, function(Et, te) {
27846
27846
  (!(V.isUndefined(Et) || Et === null) && T.call(
27847
27847
  g,
27848
27848
  Et,
@@ -28005,8 +28005,8 @@ function eT(m) {
28005
28005
  function g(b, y, T, R) {
28006
28006
  let w = b[R++];
28007
28007
  if (w === "__proto__") return !0;
28008
- const M = Number.isFinite(+w), tt = R >= b.length;
28009
- return w = !w && V.isArray(T) ? T.length : w, tt ? (V.hasOwnProp(T, w) ? T[w] = [T[w], y] : T[w] = y, !M) : ((!T[w] || !V.isObject(T[w])) && (T[w] = []), g(b, y, T[w], R) && V.isArray(T[w]) && (T[w] = k3(T[w])), !M);
28008
+ const M = Number.isFinite(+w), P = R >= b.length;
28009
+ return w = !w && V.isArray(T) ? T.length : w, P ? (V.hasOwnProp(T, w) ? T[w] = [T[w], y] : T[w] = y, !M) : ((!T[w] || !V.isObject(T[w])) && (T[w] = []), g(b, y, T[w], R) && V.isArray(T[w]) && (T[w] = k3(T[w])), !M);
28010
28010
  }
28011
28011
  if (V.isFormData(m) && V.isFunction(m.entries)) {
28012
28012
  const b = {};
@@ -28044,10 +28044,10 @@ const R0 = {
28044
28044
  if (y.indexOf("application/x-www-form-urlencoded") > -1)
28045
28045
  return K3(g, this.formSerializer).toString();
28046
28046
  if ((M = V.isFileList(g)) || y.indexOf("multipart/form-data") > -1) {
28047
- const tt = this.env && this.env.FormData;
28047
+ const P = this.env && this.env.FormData;
28048
28048
  return r1(
28049
28049
  M ? { "files[]": g } : g,
28050
- tt && new tt(),
28050
+ P && new P(),
28051
28051
  this.formSerializer
28052
28052
  );
28053
28053
  }
@@ -28165,24 +28165,24 @@ let mn = class {
28165
28165
  }
28166
28166
  set(g, b, y) {
28167
28167
  const T = this;
28168
- function R(M, tt, I) {
28169
- const F = T0(tt);
28168
+ function R(M, P, I) {
28169
+ const F = T0(P);
28170
28170
  if (!F)
28171
28171
  throw new Error("header name must be a non-empty string");
28172
28172
  const W = V.findKey(T, F);
28173
- (!W || T[W] === void 0 || I === !0 || I === void 0 && T[W] !== !1) && (T[W || tt] = n1(M));
28173
+ (!W || T[W] === void 0 || I === !0 || I === void 0 && T[W] !== !1) && (T[W || P] = n1(M));
28174
28174
  }
28175
- const w = (M, tt) => V.forEach(M, (I, F) => R(I, F, tt));
28175
+ const w = (M, P) => V.forEach(M, (I, F) => R(I, F, P));
28176
28176
  if (V.isPlainObject(g) || g instanceof this.constructor)
28177
28177
  w(g, b);
28178
28178
  else if (V.isString(g) && (g = g.trim()) && !tz(g))
28179
28179
  w(I3(g), b);
28180
28180
  else if (V.isObject(g) && V.isIterable(g)) {
28181
- let M = {}, tt, I;
28181
+ let M = {}, P, I;
28182
28182
  for (const F of g) {
28183
28183
  if (!V.isArray(F))
28184
28184
  throw TypeError("Object iterator must return a key-value pair");
28185
- M[I = F[0]] = (tt = M[I]) ? V.isArray(tt) ? [...tt, F[1]] : [tt, F[1]] : F[1];
28185
+ M[I = F[0]] = (P = M[I]) ? V.isArray(P) ? [...P, F[1]] : [P, F[1]] : F[1];
28186
28186
  }
28187
28187
  w(M, b);
28188
28188
  } else
@@ -28338,9 +28338,9 @@ function nz(m, g) {
28338
28338
  m = m || 10;
28339
28339
  const b = new Array(m), y = new Array(m);
28340
28340
  let T = 0, R = 0, w;
28341
- return g = g !== void 0 ? g : 1e3, function(tt) {
28341
+ return g = g !== void 0 ? g : 1e3, function(P) {
28342
28342
  const I = Date.now(), F = y[R];
28343
- w || (w = I), b[T] = tt, y[T] = I;
28343
+ w || (w = I), b[T] = P, y[T] = I;
28344
28344
  let W = R, ft = 0;
28345
28345
  for (; W !== T; )
28346
28346
  ft += b[W++], W = W % m;
@@ -28366,13 +28366,13 @@ const i1 = (m, g, b = 3) => {
28366
28366
  let y = 0;
28367
28367
  const T = nz(50, 250);
28368
28368
  return uz((R) => {
28369
- const w = R.loaded, M = R.lengthComputable ? R.total : void 0, tt = w - y, I = T(tt), F = w <= M;
28369
+ const w = R.loaded, M = R.lengthComputable ? R.total : void 0, P = w - y, I = T(P), F = w <= M;
28370
28370
  y = w;
28371
28371
  const W = {
28372
28372
  loaded: w,
28373
28373
  total: M,
28374
28374
  progress: M ? w / M : void 0,
28375
- bytes: tt,
28375
+ bytes: P,
28376
28376
  rate: I || void 0,
28377
28377
  estimated: I && M && F ? (M - w) / I : void 0,
28378
28378
  event: R,
@@ -28459,7 +28459,7 @@ function Qr(m, g) {
28459
28459
  if (W in m)
28460
28460
  return y(void 0, I);
28461
28461
  }
28462
- const tt = {
28462
+ const P = {
28463
28463
  url: R,
28464
28464
  method: R,
28465
28465
  data: R,
@@ -28491,7 +28491,7 @@ function Qr(m, g) {
28491
28491
  headers: (I, F, W) => T(DE(I), DE(F), W, !0)
28492
28492
  };
28493
28493
  return V.forEach(Object.keys({ ...m, ...g }), function(F) {
28494
- const W = tt[F] || T, ft = W(m[F], g[F], F);
28494
+ const W = P[F] || T, ft = W(m[F], g[F], F);
28495
28495
  V.isUndefined(ft) && W !== M || (b[F] = ft);
28496
28496
  }), b;
28497
28497
  }
@@ -28505,15 +28505,15 @@ const uT = (m) => {
28505
28505
  if (za.hasStandardBrowserEnv || za.hasStandardBrowserWebWorkerEnv)
28506
28506
  w.setContentType(void 0);
28507
28507
  else if (V.isFunction(b.getHeaders)) {
28508
- const tt = b.getHeaders(), I = ["content-type", "content-length"];
28509
- Object.entries(tt).forEach(([F, W]) => {
28508
+ const P = b.getHeaders(), I = ["content-type", "content-length"];
28509
+ Object.entries(P).forEach(([F, W]) => {
28510
28510
  I.includes(F.toLowerCase()) && w.set(F, W);
28511
28511
  });
28512
28512
  }
28513
28513
  }
28514
28514
  if (za.hasStandardBrowserEnv && (y && V.isFunction(y) && (y = y(g)), y || y !== !1 && iz(g.url))) {
28515
- const tt = T && R && cz.read(R);
28516
- tt && w.set(T, tt);
28515
+ const P = T && R && cz.read(R);
28516
+ P && w.set(T, P);
28517
28517
  }
28518
28518
  return g;
28519
28519
  }, sz = typeof XMLHttpRequest < "u", rz = sz && function(m) {
@@ -28521,9 +28521,9 @@ const uT = (m) => {
28521
28521
  const T = uT(m);
28522
28522
  let R = T.data;
28523
28523
  const w = mn.from(T.headers).normalize();
28524
- let { responseType: M, onUploadProgress: tt, onDownloadProgress: I } = T, F, W, ft, Zt, P;
28524
+ let { responseType: M, onUploadProgress: P, onDownloadProgress: I } = T, F, W, ft, Zt, tt;
28525
28525
  function rt() {
28526
- Zt && Zt(), P && P(), T.cancelToken && T.cancelToken.unsubscribe(F), T.signal && T.signal.removeEventListener("abort", F);
28526
+ Zt && Zt(), tt && tt(), T.cancelToken && T.cancelToken.unsubscribe(F), T.signal && T.signal.removeEventListener("abort", F);
28527
28527
  }
28528
28528
  let lt = new XMLHttpRequest();
28529
28529
  lt.open(T.method.toUpperCase(), T.url, !0), lt.timeout = T.timeout;
@@ -28564,7 +28564,7 @@ const uT = (m) => {
28564
28564
  )), lt = null;
28565
28565
  }, R === void 0 && w.setContentType(null), "setRequestHeader" in lt && V.forEach(w.toJSON(), function(yt, ie) {
28566
28566
  lt.setRequestHeader(ie, yt);
28567
- }), V.isUndefined(T.withCredentials) || (lt.withCredentials = !!T.withCredentials), M && M !== "json" && (lt.responseType = T.responseType), I && ([ft, P] = i1(I, !0), lt.addEventListener("progress", ft)), tt && lt.upload && ([W, Zt] = i1(tt), lt.upload.addEventListener("progress", W), lt.upload.addEventListener("loadend", Zt)), (T.cancelToken || T.signal) && (F = (St) => {
28567
+ }), V.isUndefined(T.withCredentials) || (lt.withCredentials = !!T.withCredentials), M && M !== "json" && (lt.responseType = T.responseType), I && ([ft, tt] = i1(I, !0), lt.addEventListener("progress", ft)), P && lt.upload && ([W, Zt] = i1(P), lt.upload.addEventListener("progress", W), lt.upload.addEventListener("loadend", Zt)), (T.cancelToken || T.signal) && (F = (St) => {
28568
28568
  lt && (y(!St || St.type ? new _0(null, m, lt) : St), lt.abort(), lt = null);
28569
28569
  }, T.cancelToken && T.cancelToken.subscribe(F), T.signal && (T.signal.aborted ? F() : T.signal.addEventListener("abort", F)));
28570
28570
  const te = az(T.url);
@@ -28594,8 +28594,8 @@ const uT = (m) => {
28594
28594
  }), m = null);
28595
28595
  };
28596
28596
  m.forEach((I) => I.addEventListener("abort", R));
28597
- const { signal: tt } = y;
28598
- return tt.unsubscribe = () => V.asap(M), tt;
28597
+ const { signal: P } = y;
28598
+ return P.unsubscribe = () => V.asap(M), P;
28599
28599
  }
28600
28600
  }, hz = function* (m, g) {
28601
28601
  let b = m.byteLength;
@@ -28627,15 +28627,15 @@ const uT = (m) => {
28627
28627
  }
28628
28628
  }, OE = (m, g, b, y) => {
28629
28629
  const T = mz(m, g);
28630
- let R = 0, w, M = (tt) => {
28631
- w || (w = !0, y && y(tt));
28630
+ let R = 0, w, M = (P) => {
28631
+ w || (w = !0, y && y(P));
28632
28632
  };
28633
28633
  return new ReadableStream({
28634
- async pull(tt) {
28634
+ async pull(P) {
28635
28635
  try {
28636
28636
  const { done: I, value: F } = await T.next();
28637
28637
  if (I) {
28638
- M(), tt.close();
28638
+ M(), P.close();
28639
28639
  return;
28640
28640
  }
28641
28641
  let W = F.byteLength;
@@ -28643,13 +28643,13 @@ const uT = (m) => {
28643
28643
  let ft = R += W;
28644
28644
  b(ft);
28645
28645
  }
28646
- tt.enqueue(new Uint8Array(F));
28646
+ P.enqueue(new Uint8Array(F));
28647
28647
  } catch (I) {
28648
28648
  throw M(I), I;
28649
28649
  }
28650
28650
  },
28651
- cancel(tt) {
28652
- return M(tt), T.return();
28651
+ cancel(P) {
28652
+ return M(P), T.return();
28653
28653
  }
28654
28654
  }, {
28655
28655
  highWaterMark: 2
@@ -28673,46 +28673,46 @@ const uT = (m) => {
28673
28673
  const { fetch: g, Request: b, Response: y } = m, T = g ? l1(g) : typeof fetch == "function", R = l1(b), w = l1(y);
28674
28674
  if (!T)
28675
28675
  return !1;
28676
- const M = T && l1(_E), tt = T && (typeof ME == "function" ? /* @__PURE__ */ ((P) => (rt) => P.encode(rt))(new ME()) : async (P) => new Uint8Array(await new b(P).arrayBuffer())), I = R && M && UE(() => {
28677
- let P = !1;
28676
+ const M = T && l1(_E), P = T && (typeof ME == "function" ? /* @__PURE__ */ ((tt) => (rt) => tt.encode(rt))(new ME()) : async (tt) => new Uint8Array(await new b(tt).arrayBuffer())), I = R && M && UE(() => {
28677
+ let tt = !1;
28678
28678
  const rt = new b(za.origin, {
28679
28679
  body: new _E(),
28680
28680
  method: "POST",
28681
28681
  get duplex() {
28682
- return P = !0, "half";
28682
+ return tt = !0, "half";
28683
28683
  }
28684
28684
  }).headers.has("Content-Type");
28685
- return P && !rt;
28685
+ return tt && !rt;
28686
28686
  }), F = w && M && UE(() => V.isReadableStream(new y("").body)), W = {
28687
- stream: F && ((P) => P.body)
28687
+ stream: F && ((tt) => tt.body)
28688
28688
  };
28689
- T && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((P) => {
28690
- !W[P] && (W[P] = (rt, lt) => {
28691
- let Et = rt && rt[P];
28689
+ T && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((tt) => {
28690
+ !W[tt] && (W[tt] = (rt, lt) => {
28691
+ let Et = rt && rt[tt];
28692
28692
  if (Et)
28693
28693
  return Et.call(rt);
28694
- throw new Ht(`Response type '${P}' is not supported`, Ht.ERR_NOT_SUPPORT, lt);
28694
+ throw new Ht(`Response type '${tt}' is not supported`, Ht.ERR_NOT_SUPPORT, lt);
28695
28695
  });
28696
28696
  });
28697
- const ft = async (P) => {
28698
- if (P == null)
28697
+ const ft = async (tt) => {
28698
+ if (tt == null)
28699
28699
  return 0;
28700
- if (V.isBlob(P))
28701
- return P.size;
28702
- if (V.isSpecCompliantForm(P))
28700
+ if (V.isBlob(tt))
28701
+ return tt.size;
28702
+ if (V.isSpecCompliantForm(tt))
28703
28703
  return (await new b(za.origin, {
28704
28704
  method: "POST",
28705
- body: P
28705
+ body: tt
28706
28706
  }).arrayBuffer()).byteLength;
28707
- if (V.isArrayBufferView(P) || V.isArrayBuffer(P))
28708
- return P.byteLength;
28709
- if (V.isURLSearchParams(P) && (P = P + ""), V.isString(P))
28710
- return (await tt(P)).byteLength;
28711
- }, Zt = async (P, rt) => {
28712
- const lt = V.toFiniteNumber(P.getContentLength());
28707
+ if (V.isArrayBufferView(tt) || V.isArrayBuffer(tt))
28708
+ return tt.byteLength;
28709
+ if (V.isURLSearchParams(tt) && (tt = tt + ""), V.isString(tt))
28710
+ return (await P(tt)).byteLength;
28711
+ }, Zt = async (tt, rt) => {
28712
+ const lt = V.toFiniteNumber(tt.getContentLength());
28713
28713
  return lt ?? ft(rt);
28714
28714
  };
28715
- return async (P) => {
28715
+ return async (tt) => {
28716
28716
  let {
28717
28717
  url: rt,
28718
28718
  method: lt,
@@ -28726,7 +28726,7 @@ const uT = (m) => {
28726
28726
  headers: nt,
28727
28727
  withCredentials: Jt = "same-origin",
28728
28728
  fetchOptions: it
28729
- } = uT(P), Ft = g || fetch;
28729
+ } = uT(tt), Ft = g || fetch;
28730
28730
  ee = ee ? (ee + "").toLowerCase() : "text";
28731
28731
  let Mt = dz([te, St && St.toAbortSignal()], yt), ct = null;
28732
28732
  const Be = Mt && Mt.unsubscribe && (() => {
@@ -28778,24 +28778,24 @@ const uT = (m) => {
28778
28778
  );
28779
28779
  }
28780
28780
  ee = ee || "text";
28781
- let Rt = await W[V.findKey(W, ee) || "text"](et, P);
28781
+ let Rt = await W[V.findKey(W, ee) || "text"](et, tt);
28782
28782
  return !bt && Be && Be(), await new Promise((be, le) => {
28783
28783
  aT(be, le, {
28784
28784
  data: Rt,
28785
28785
  headers: mn.from(et.headers),
28786
28786
  status: et.status,
28787
28787
  statusText: et.statusText,
28788
- config: P,
28788
+ config: tt,
28789
28789
  request: ct
28790
28790
  });
28791
28791
  });
28792
28792
  } catch (H) {
28793
28793
  throw Be && Be(), H && H.name === "TypeError" && /Load failed|fetch/i.test(H.message) ? Object.assign(
28794
- new Ht("Network Error", Ht.ERR_NETWORK, P, ct),
28794
+ new Ht("Network Error", Ht.ERR_NETWORK, tt, ct),
28795
28795
  {
28796
28796
  cause: H.cause || H
28797
28797
  }
28798
- ) : Ht.from(H, H && H.code, P, ct);
28798
+ ) : Ht.from(H, H && H.code, tt, ct);
28799
28799
  }
28800
28800
  };
28801
28801
  }, vz = /* @__PURE__ */ new Map(), iT = (m) => {
@@ -28805,9 +28805,9 @@ const uT = (m) => {
28805
28805
  T,
28806
28806
  b
28807
28807
  ];
28808
- let w = R.length, M = w, tt, I, F = vz;
28808
+ let w = R.length, M = w, P, I, F = vz;
28809
28809
  for (; M--; )
28810
- tt = R[M], I = F.get(tt), I === void 0 && F.set(tt, I = M ? /* @__PURE__ */ new Map() : gz(g)), F = I;
28810
+ P = R[M], I = F.get(P), I === void 0 && F.set(P, I = M ? /* @__PURE__ */ new Map() : gz(g)), F = I;
28811
28811
  return I;
28812
28812
  };
28813
28813
  iT();
@@ -28844,7 +28844,7 @@ function Sz(m, g) {
28844
28844
  }
28845
28845
  if (!T) {
28846
28846
  const w = Object.entries(R).map(
28847
- ([tt, I]) => `adapter ${tt} ` + (I === !1 ? "is not supported by the environment" : "is not available in the build")
28847
+ ([P, I]) => `adapter ${P} ` + (I === !1 ? "is not supported by the environment" : "is not available in the build")
28848
28848
  );
28849
28849
  let M = b ? w.length > 1 ? `since :
28850
28850
  ` + w.map(CE).join(`
@@ -28926,9 +28926,9 @@ function Ez(m, g, b) {
28926
28926
  for (; T-- > 0; ) {
28927
28927
  const R = y[T], w = g[R];
28928
28928
  if (w) {
28929
- const M = m[R], tt = M === void 0 || w(M, R, m);
28930
- if (tt !== !0)
28931
- throw new Ht("option " + R + " must be " + tt, Ht.ERR_BAD_OPTION_VALUE);
28929
+ const M = m[R], P = M === void 0 || w(M, R, m);
28930
+ if (P !== !0)
28931
+ throw new Ht("option " + R + " must be " + P, Ht.ERR_BAD_OPTION_VALUE);
28932
28932
  continue;
28933
28933
  }
28934
28934
  if (b !== !0)
@@ -28993,32 +28993,32 @@ let Vr = class {
28993
28993
  );
28994
28994
  R && V.forEach(
28995
28995
  ["delete", "get", "head", "post", "put", "patch", "common"],
28996
- (P) => {
28997
- delete R[P];
28996
+ (tt) => {
28997
+ delete R[tt];
28998
28998
  }
28999
28999
  ), b.headers = mn.concat(w, R);
29000
29000
  const M = [];
29001
- let tt = !0;
29001
+ let P = !0;
29002
29002
  this.interceptors.request.forEach(function(rt) {
29003
- typeof rt.runWhen == "function" && rt.runWhen(b) === !1 || (tt = tt && rt.synchronous, M.unshift(rt.fulfilled, rt.rejected));
29003
+ typeof rt.runWhen == "function" && rt.runWhen(b) === !1 || (P = P && rt.synchronous, M.unshift(rt.fulfilled, rt.rejected));
29004
29004
  });
29005
29005
  const I = [];
29006
29006
  this.interceptors.response.forEach(function(rt) {
29007
29007
  I.push(rt.fulfilled, rt.rejected);
29008
29008
  });
29009
29009
  let F, W = 0, ft;
29010
- if (!tt) {
29011
- const P = [xE.bind(this), void 0];
29012
- for (P.unshift(...M), P.push(...I), ft = P.length, F = Promise.resolve(b); W < ft; )
29013
- F = F.then(P[W++], P[W++]);
29010
+ if (!P) {
29011
+ const tt = [xE.bind(this), void 0];
29012
+ for (tt.unshift(...M), tt.push(...I), ft = tt.length, F = Promise.resolve(b); W < ft; )
29013
+ F = F.then(tt[W++], tt[W++]);
29014
29014
  return F;
29015
29015
  }
29016
29016
  ft = M.length;
29017
29017
  let Zt = b;
29018
29018
  for (; W < ft; ) {
29019
- const P = M[W++], rt = M[W++];
29019
+ const tt = M[W++], rt = M[W++];
29020
29020
  try {
29021
- Zt = P(Zt);
29021
+ Zt = tt(Zt);
29022
29022
  } catch (lt) {
29023
29023
  rt.call(this, lt);
29024
29024
  break;
@@ -29026,8 +29026,8 @@ let Vr = class {
29026
29026
  }
29027
29027
  try {
29028
29028
  F = xE.call(this, Zt);
29029
- } catch (P) {
29030
- return Promise.reject(P);
29029
+ } catch (tt) {
29030
+ return Promise.reject(tt);
29031
29031
  }
29032
29032
  for (W = 0, ft = I.length; W < ft; )
29033
29033
  F = F.then(I[W++], I[W++]);
@@ -29353,13 +29353,13 @@ function Mz(m) {
29353
29353
  const { apiKey: g, baseUrl: b, onError: y } = m, [T, R] = wE(_z, []), [w, M] = wE(
29354
29354
  Rz,
29355
29355
  NE()
29356
- ), [tt, I] = A0(!1), [F, W] = A0(null), ft = Fb(null);
29356
+ ), [P, I] = A0(!1), [F, W] = A0(null), ft = Fb(null);
29357
29357
  c1(() => {
29358
29358
  ft.current = new Oz(g, b);
29359
29359
  }, [g, b]);
29360
29360
  const Zt = b0(() => {
29361
29361
  W(null);
29362
- }, []), P = b0(
29362
+ }, []), tt = b0(
29363
29363
  async (te) => {
29364
29364
  if (!ft.current) {
29365
29365
  const yt = new Error("API client not initialized");
@@ -29424,8 +29424,8 @@ function Mz(m) {
29424
29424
  }, [R]);
29425
29425
  return {
29426
29426
  messages: T,
29427
- sendMessage: P,
29428
- isLoading: tt,
29427
+ sendMessage: tt,
29428
+ isLoading: P,
29429
29429
  error: F,
29430
29430
  clearError: Zt,
29431
29431
  sessionId: w,
@@ -29464,13 +29464,17 @@ const Uz = ({ message: m, onDelete: g }) => {
29464
29464
  }) => {
29465
29465
  const [y, T] = A0(""), R = Fb(null);
29466
29466
  c1(() => {
29467
- const tt = R.current;
29468
- tt && (tt.style.height = "auto", tt.style.height = `${Math.min(tt.scrollHeight, 120)}px`);
29467
+ const P = R.current;
29468
+ if (P) {
29469
+ P.style.height = "auto";
29470
+ const I = Math.min(P.scrollHeight, 120);
29471
+ P.style.height = `${I}px`, P.style.overflowY = P.scrollHeight > 120 ? "auto" : "hidden";
29472
+ }
29469
29473
  }, [y]);
29470
- const w = (tt) => {
29471
- tt == null || tt.preventDefault(), y.trim() && !g && (m(y), T(""), R.current && (R.current.style.height = "auto"));
29472
- }, M = (tt) => {
29473
- tt.key === "Enter" && !tt.shiftKey && (tt.preventDefault(), w(tt));
29474
+ const w = (P) => {
29475
+ P == null || P.preventDefault(), y.trim() && !g && (m(y), T(""), R.current && (R.current.style.height = "auto"));
29476
+ }, M = (P) => {
29477
+ P.key === "Enter" && !P.shiftKey && (P.preventDefault(), w(P));
29474
29478
  };
29475
29479
  return /* @__PURE__ */ At.createElement("form", { className: "cs-input", onSubmit: w }, /* @__PURE__ */ At.createElement(
29476
29480
  "textarea",
@@ -29478,7 +29482,7 @@ const Uz = ({ message: m, onDelete: g }) => {
29478
29482
  ref: R,
29479
29483
  className: "cs-input__textarea",
29480
29484
  value: y,
29481
- onChange: (tt) => T(tt.target.value),
29485
+ onChange: (P) => T(P.target.value),
29482
29486
  onKeyDown: M,
29483
29487
  placeholder: b,
29484
29488
  disabled: g,
@@ -29504,18 +29508,18 @@ const Uz = ({ message: m, onDelete: g }) => {
29504
29508
  placeholder: R,
29505
29509
  welcomeMessage: w = "Hi! How can I help you today?",
29506
29510
  onDeleteMessage: M,
29507
- onClearHistory: tt
29511
+ onClearHistory: P
29508
29512
  }) => {
29509
29513
  const I = Fb(null);
29510
29514
  return c1(() => {
29511
29515
  var F;
29512
29516
  (F = I.current) == null || F.scrollIntoView({ behavior: "smooth" });
29513
- }, [m]), /* @__PURE__ */ At.createElement("div", { className: "cs-window" }, /* @__PURE__ */ At.createElement("div", { className: "cs-window__header" }, /* @__PURE__ */ At.createElement("div", { className: "cs-window__header-info" }, /* @__PURE__ */ At.createElement("h3", { className: "cs-window__title text-gray-900" }, "Customer Support"), /* @__PURE__ */ At.createElement("div", { className: "cs-window__status" }, /* @__PURE__ */ At.createElement("span", { className: "cs-window__status-dot" }), /* @__PURE__ */ At.createElement("span", { className: "text-gray-900" }, "Online"))), /* @__PURE__ */ At.createElement("div", { style: { display: "flex", gap: "8px" } }, m.length > 0 && tt && /* @__PURE__ */ At.createElement(
29517
+ }, [m]), /* @__PURE__ */ At.createElement("div", { className: "cs-window" }, /* @__PURE__ */ At.createElement("div", { className: "cs-window__header" }, /* @__PURE__ */ At.createElement("div", { className: "cs-window__header-info" }, /* @__PURE__ */ At.createElement("h3", { className: "cs-window__title text-gray-900" }, "Customer Support"), /* @__PURE__ */ At.createElement("div", { className: "cs-window__status" }, /* @__PURE__ */ At.createElement("span", { className: "cs-window__status-dot" }), /* @__PURE__ */ At.createElement("span", { className: "text-gray-900" }, "Online"))), /* @__PURE__ */ At.createElement("div", { style: { display: "flex", gap: "8px" } }, m.length > 0 && P && /* @__PURE__ */ At.createElement(
29514
29518
  "button",
29515
29519
  {
29516
29520
  className: "cs-window__close text-red-500",
29517
29521
  onClick: () => {
29518
- window.confirm("Are you sure you want to clear the entire chat history?") && tt();
29522
+ window.confirm("Are you sure you want to clear the entire chat history?") && P();
29519
29523
  },
29520
29524
  "aria-label": "Clear chat history",
29521
29525
  title: "Clear chat history"
@@ -29544,7 +29548,7 @@ const Uz = ({ message: m, onDelete: g }) => {
29544
29548
  placeholder: R
29545
29549
  }
29546
29550
  )));
29547
- }, Hz = ':root{--cs-primary-color: inherit;--cs-secondary-color: inherit;--cs-bg-color: inherit;--cs-text-color: inherit;--cs-font-family: inherit;--cs-border-radius: 12px;--cs-button-color: var(--cs-primary-color);--cs-user-message-color: var(--cs-primary-color);--cs-assistant-message-color: rgba(0, 0, 0, .05);--cs-header-gradient: linear-gradient(135deg, var(--cs-primary-color), var(--cs-secondary-color));--cs-header-text-color: #ffffff;--cs-bg-text-color: #1a1a1a;--cs-user-text-color: #ffffff;--cs-assistant-text-color: #1a1a1a;--cs-success-color: #4ade80;--cs-error-color: #ef4444;--cs-error-bg-color: rgba(239, 68, 68, .1);--cs-border-color: rgba(0, 0, 0, .1);--cs-shadow-color: rgba(0, 0, 0, .1);--cs-scrollbar-thumb: rgba(0, 0, 0, .2);--cs-scrollbar-track: transparent;--cs-shadow-sm: 0 1px 2px 0 var(--cs-shadow-color);--cs-shadow: 0 4px 6px -1px var(--cs-shadow-color), 0 2px 4px -1px var(--cs-shadow-color);--cs-shadow-lg: 0 10px 15px -3px var(--cs-shadow-color), 0 4px 6px -2px var(--cs-shadow-color);--cs-shadow-xl: 0 20px 25px -5px var(--cs-shadow-color), 0 10px 10px -5px var(--cs-shadow-color)}.cs-widget{position:fixed;z-index:9999;font-family:var(--cs-font-family)}.cs-widget,.cs-widget *{box-sizing:border-box}.cs-widget--bottom-right{bottom:20px;right:20px}.cs-widget--bottom-left{bottom:20px;left:20px}.cs-widget--top-right{top:20px;right:20px}.cs-widget--top-left{top:20px;left:20px}.cs-widget__toggle{position:relative;width:60px;height:60px;border-radius:50%;background:var(--cs-primary-color);border:none;color:#fff;cursor:pointer;box-shadow:var(--cs-shadow-xl);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center}.cs-widget__toggle:hover{transform:scale(1.1);box-shadow:0 15px 25px -5px var(--cs-focus-ring)}.cs-widget__toggle:active{transform:scale(.95)}.cs-widget__toggle--open{background:var(--cs-error-color)}.cs-widget__badge{position:absolute;top:-5px;right:-5px;background:var(--cs-error-color);color:#fff;border-radius:50%;width:24px;height:24px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;box-shadow:var(--cs-shadow)}.cs-window{position:absolute;bottom:85px;right:0;width:380px;max-width:calc(100vw - 40px);height:600px;max-height:calc(100vh - 130px);background:var(--cs-bg-color);border-radius:var(--cs-border-radius);border:1px solid rgba(0,0,0,.1);box-shadow:var(--cs-shadow-xl);display:flex;flex-direction:column;overflow:visible;animation:slideUp .3s cubic-bezier(.4,0,.2,1);transform-origin:bottom right}.cs-window:after{content:"";position:absolute;bottom:-10px;right:25px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--cs-bg-color);filter:drop-shadow(0 5px 5px var(--cs-shadow-color))}.cs-widget--bottom-left .cs-window{transform-origin:bottom left;right:auto;left:0}.cs-widget--bottom-left .cs-window:after{right:auto;left:25px}.cs-widget--top-right .cs-window{transform-origin:top right;bottom:auto;top:85px}.cs-widget--top-right .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color)}.cs-widget--top-left .cs-window{transform-origin:top left;bottom:auto;top:85px;right:auto;left:0}.cs-widget--top-left .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color);right:auto;left:25px}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cs-window__header{background:var(--cs-header-gradient);color:var(--cs-header-text-color);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.cs-window__header-info{display:flex;flex-direction:column;gap:2px}.cs-window__title{margin:0;font-size:16px;font-weight:600}.cs-window__status{display:flex;align-items:center;gap:6px;font-size:12px;opacity:.9}.cs-window__status-dot{width:8px;height:8px;background:var(--cs-success-color);border-radius:50%;box-shadow:0 0 0 2px var(--cs-bg-color)}.cs-window__close{background:transparent;border:none;color:var(--cs-header-text-color);width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}.cs-window__close:hover{background:var(--cs-shadow-color)}.cs-window__messages{flex:1;overflow-y:auto;overflow-x:hidden;padding:20px;display:flex;flex-direction:column;gap:16px;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-window__messages::-webkit-scrollbar{width:6px}.cs-window__messages::-webkit-scrollbar-track{background:transparent}.cs-window__messages::-webkit-scrollbar-thumb{background:var(--cs-scrollbar-thumb);border-radius:3px}.cs-window__messages::-webkit-scrollbar-thumb:hover{background:var(--cs-border-color)}.cs-window__welcome{text-align:center;padding:40px 20px;color:var(--cs-bg-text-color);opacity:.7}.cs-window__welcome p{margin:0;font-size:16px}.cs-window__typing{display:flex;align-items:center;gap:8px;padding:12px 16px;background:var(--cs-assistant-message-color);border-radius:var(--cs-border-radius);width:fit-content;color:var(--cs-text-color)}.cs-window__typing-icon{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-window__error{background:var(--cs-error-bg-color);border:1px solid var(--cs-error-color);color:var(--cs-error-color);padding:12px 16px;border-radius:var(--cs-border-radius)}.cs-window__error p{margin:0}.cs-message{display:flex;flex-direction:column;gap:6px;max-width:85%;min-width:0;animation:fadeIn .3s ease-in-out;position:relative;transition:transform .2s cubic-bezier(.4,0,.2,1)}.cs-message:hover .cs-message__delete{opacity:1}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.cs-message--user{align-self:flex-end;align-items:flex-end}.cs-message--assistant{align-self:flex-start;align-items:flex-start}.cs-message__content{background:var(--cs-assistant-message-color);padding:12px 16px;border-radius:var(--cs-border-radius);border-bottom-left-radius:4px;color:var(--cs-assistant-text-color);word-wrap:break-word;box-shadow:var(--cs-shadow-sm);min-width:0;max-width:100%}.cs-message--user .cs-message__content{background:var(--cs-user-message-color);color:var(--cs-user-text-color);border-radius:var(--cs-border-radius);border-bottom-right-radius:4px}.cs-message__text{margin:0;line-height:1.5;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}.cs-message__time{font-size:11px;color:var(--cs-bg-text-color);opacity:.5;padding:0 4px}.cs-message__sources{margin-top:12px;padding-top:12px;border-top:1px solid var(--cs-border-color)}.cs-message__sources-title{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--cs-bg-text-color);opacity:.7}.cs-message__sources-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.cs-message__source-item{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.cs-message__source-link{display:flex;align-items:center;gap:4px;color:var(--cs-primary-color);text-decoration:none;flex:1;min-width:0}.cs-message__source-link:hover{text-decoration:underline}.cs-message__source-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.cs-message__source-similarity{color:#6b7280;font-size:11px;white-space:nowrap}.cs-message__delete{position:absolute;top:50%;transform:translateY(-50%);background:var(--cs-bg-color);border:1px solid var(--cs-border-color);color:var(--cs-error-color);width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:all .2s;box-shadow:var(--cs-shadow-sm);z-index:10}.cs-message__delete:hover{background:var(--cs-error-color);color:#fff;transform:translateY(-50%) scale(1.1)}.cs-message--user .cs-message__delete{left:-32px}.cs-message--assistant .cs-message__delete{right:-32px}.cs-window__input-wrapper{padding:16px;background:var(--cs-bg-color);border-top:1px solid var(--cs-border-color);flex-shrink:0}.cs-input{display:flex;gap:8px;align-items:flex-end}.cs-input__textarea{flex:1;padding:12px 16px;border:1px solid var(--cs-border-color);border-radius:var(--cs-border-radius);font-family:var(--cs-font-family);font-size:14px;resize:none;max-height:120px;min-height:44px;transition:border-color .2s,box-shadow .2s,height .1s ease-out;background:var(--cs-bg-color);color:var(--cs-bg-text-color);line-height:1.5}.cs-input__textarea:focus{outline:none;border-color:var(--cs-primary-color);box-shadow:0 0 0 3px var(--cs-focus-ring);background-color:var(--cs-bg-color)}.cs-input__textarea:disabled{background:#0000000d;cursor:not-allowed;opacity:.7}.cs-input__button{background:var(--cs-button-color);color:var(--cs-header-text-color);border:none;width:44px;height:44px;border-radius:var(--cs-border-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);flex-shrink:0;position:relative;overflow:hidden}.cs-input__button:hover:not(:disabled){background:var(--cs-secondary-color);transform:scale(1.05);box-shadow:var(--cs-shadow-sm)}.cs-input__button:active:not(:disabled){transform:scale(.95)}.cs-input__button:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}.cs-input__spinner{animation:cs-spin 1s linear infinite}@keyframes cs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-input__button--loading{cursor:wait;opacity:.8}@media(max-width:480px){.cs-widget--open{position:fixed!important;inset:auto!important;bottom:20px!important;right:20px!important;width:auto!important;height:auto!important;z-index:10000!important}.cs-window{position:fixed!important;width:88vw!important;height:60vh!important;max-width:400px!important;max-height:500px!important;bottom:90px!important;right:5%!important;left:5%!important;top:auto!important;border-radius:var(--cs-border-radius)!important;box-shadow:var(--cs-shadow-xl)!important;display:flex!important;flex-direction:column!important;animation:slideUp .3s ease-out!important;overflow:visible!important}.cs-widget--open .cs-widget__toggle{display:flex!important;opacity:.8}.cs-window__messages{padding:16px}.cs-window__header{padding:12px 16px}.cs-window__input-wrapper{padding:12px}.cs-widget__toggle{width:50px;height:50px}}', wz = ({
29551
+ }, Hz = ':root{--cs-primary-color: inherit;--cs-secondary-color: inherit;--cs-bg-color: inherit;--cs-text-color: inherit;--cs-font-family: inherit;--cs-border-radius: 12px;--cs-button-color: var(--cs-primary-color);--cs-user-message-color: var(--cs-primary-color);--cs-assistant-message-color: rgba(0, 0, 0, .05);--cs-header-gradient: linear-gradient(135deg, var(--cs-primary-color), var(--cs-secondary-color));--cs-header-text-color: #ffffff;--cs-bg-text-color: #1a1a1a;--cs-user-text-color: #ffffff;--cs-assistant-text-color: #1a1a1a;--cs-success-color: #4ade80;--cs-error-color: #ef4444;--cs-error-bg-color: rgba(239, 68, 68, .1);--cs-border-color: rgba(0, 0, 0, .1);--cs-shadow-color: rgba(0, 0, 0, .1);--cs-scrollbar-thumb: rgba(0, 0, 0, .2);--cs-scrollbar-track: transparent;--cs-shadow-sm: 0 1px 2px 0 var(--cs-shadow-color);--cs-shadow: 0 4px 6px -1px var(--cs-shadow-color), 0 2px 4px -1px var(--cs-shadow-color);--cs-shadow-lg: 0 10px 15px -3px var(--cs-shadow-color), 0 4px 6px -2px var(--cs-shadow-color);--cs-shadow-xl: 0 20px 25px -5px var(--cs-shadow-color), 0 10px 10px -5px var(--cs-shadow-color)}.cs-widget{position:fixed;z-index:9999;font-family:var(--cs-font-family)}.cs-widget,.cs-widget *{box-sizing:border-box}.cs-widget--bottom-right{bottom:20px;right:20px}.cs-widget--bottom-left{bottom:20px;left:20px}.cs-widget--top-right{top:20px;right:20px}.cs-widget--top-left{top:20px;left:20px}.cs-widget__toggle{position:relative;width:60px;height:60px;border-radius:50%;background:var(--cs-primary-color);border:none;color:#fff;cursor:pointer;box-shadow:var(--cs-shadow-xl);transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center}.cs-widget__toggle:hover{transform:scale(1.1);box-shadow:0 15px 25px -5px var(--cs-focus-ring)}.cs-widget__toggle:active{transform:scale(.95)}.cs-widget__toggle--open{background:var(--cs-error-color)}.cs-widget__badge{position:absolute;top:-5px;right:-5px;background:var(--cs-error-color);color:#fff;border-radius:50%;width:24px;height:24px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600;box-shadow:var(--cs-shadow)}.cs-window{position:absolute;bottom:85px;right:0;width:380px;max-width:calc(100vw - 40px);height:600px;max-height:calc(100vh - 130px);background:var(--cs-bg-color);border-radius:var(--cs-border-radius);border:1px solid rgba(0,0,0,.1);box-shadow:var(--cs-shadow-xl);display:flex;flex-direction:column;overflow:visible;animation:slideUp .3s cubic-bezier(.4,0,.2,1);transform-origin:bottom right}.cs-window:after{content:"";position:absolute;bottom:-10px;right:25px;width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--cs-bg-color);filter:drop-shadow(0 5px 5px var(--cs-shadow-color))}.cs-widget--bottom-left .cs-window{transform-origin:bottom left;right:auto;left:0}.cs-widget--bottom-left .cs-window:after{right:auto;left:25px}.cs-widget--top-right .cs-window{transform-origin:top right;bottom:auto;top:85px}.cs-widget--top-right .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color)}.cs-widget--top-left .cs-window{transform-origin:top left;bottom:auto;top:85px;right:auto;left:0}.cs-widget--top-left .cs-window:after{bottom:auto;top:-10px;border-top:none;border-bottom:10px solid var(--cs-bg-color);right:auto;left:25px}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.cs-window__header{background:var(--cs-header-gradient);color:var(--cs-header-text-color);padding:16px 20px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.cs-window__header-info{display:flex;flex-direction:column;gap:2px}.cs-window__title{margin:0;font-size:16px;font-weight:600}.cs-window__status{display:flex;align-items:center;gap:6px;font-size:12px;opacity:.9}.cs-window__status-dot{width:8px;height:8px;background:var(--cs-success-color);border-radius:50%;box-shadow:0 0 0 2px var(--cs-bg-color)}.cs-window__close{background:transparent;border:none;color:var(--cs-header-text-color);width:32px;height:32px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}.cs-window__close:hover{background:var(--cs-shadow-color)}.cs-window__messages{flex:1;overflow-y:auto;overflow-x:hidden;padding:20px;display:flex;flex-direction:column;gap:16px;background:var(--cs-bg-color);color:var(--cs-bg-text-color)}.cs-window__messages::-webkit-scrollbar{width:6px}.cs-window__messages::-webkit-scrollbar-track{background:transparent}.cs-window__messages::-webkit-scrollbar-thumb{background:var(--cs-scrollbar-thumb);border-radius:3px}.cs-window__messages::-webkit-scrollbar-thumb:hover{background:var(--cs-border-color)}.cs-window__welcome{text-align:center;padding:40px 20px;color:var(--cs-bg-text-color);opacity:.7}.cs-window__welcome p{margin:0;font-size:16px}.cs-window__typing{display:flex;align-items:center;gap:8px;padding:12px 16px;background:var(--cs-assistant-message-color);border-radius:var(--cs-border-radius);width:fit-content;color:var(--cs-text-color)}.cs-window__typing-icon{animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-window__error{background:var(--cs-error-bg-color);border:1px solid var(--cs-error-color);color:var(--cs-error-color);padding:12px 16px;border-radius:var(--cs-border-radius)}.cs-window__error p{margin:0}.cs-message{display:flex;flex-direction:column;gap:6px;max-width:85%;min-width:0;animation:fadeIn .3s ease-in-out;position:relative;transition:transform .2s cubic-bezier(.4,0,.2,1)}.cs-message:hover .cs-message__delete{opacity:1}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.cs-message--user{align-self:flex-end;align-items:flex-end}.cs-message--assistant{align-self:flex-start;align-items:flex-start}.cs-message__content{background:var(--cs-assistant-message-color);padding:12px 16px;border-radius:var(--cs-border-radius);border-bottom-left-radius:4px;color:var(--cs-assistant-text-color);word-wrap:break-word;box-shadow:var(--cs-shadow-sm);min-width:0;max-width:100%}.cs-message--user .cs-message__content{background:var(--cs-user-message-color);color:var(--cs-user-text-color);border-radius:var(--cs-border-radius);border-bottom-right-radius:4px}.cs-message__text{margin:0;line-height:1.5;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}.cs-message__time{font-size:11px;color:var(--cs-bg-text-color);opacity:.5;padding:0 4px}.cs-message__sources{margin-top:12px;padding-top:12px;border-top:1px solid var(--cs-border-color)}.cs-message__sources-title{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--cs-bg-text-color);opacity:.7}.cs-message__sources-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px}.cs-message__source-item{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px}.cs-message__source-link{display:flex;align-items:center;gap:4px;color:var(--cs-primary-color);text-decoration:none;flex:1;min-width:0}.cs-message__source-link:hover{text-decoration:underline}.cs-message__source-link span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.cs-message__source-similarity{color:#6b7280;font-size:11px;white-space:nowrap}.cs-message__delete{position:absolute;top:50%;transform:translateY(-50%);background:var(--cs-bg-color);border:1px solid var(--cs-border-color);color:var(--cs-error-color);width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:all .2s;box-shadow:var(--cs-shadow-sm);z-index:10}.cs-message__delete:hover{background:var(--cs-error-color);color:#fff;transform:translateY(-50%) scale(1.1)}.cs-message--user .cs-message__delete{left:-32px}.cs-message--assistant .cs-message__delete{right:-32px}.cs-window__input-wrapper{padding:16px;background:var(--cs-bg-color);border-top:1px solid var(--cs-border-color);flex-shrink:0}.cs-input{display:flex;gap:8px;align-items:flex-end}.cs-input__textarea{flex:1;padding:12px 16px;border:1px solid var(--cs-border-color);border-radius:var(--cs-border-radius);font-family:var(--cs-font-family);font-size:14px;resize:none;max-height:120px;min-height:44px;transition:border-color .2s,box-shadow .2s,height .1s ease-out;background:var(--cs-bg-color);color:var(--cs-bg-text-color);line-height:1.5;overflow-y:hidden}.cs-input__textarea:focus{outline:none;border-color:var(--cs-primary-color);box-shadow:0 0 0 3px var(--cs-focus-ring);background-color:var(--cs-bg-color)}.cs-input__textarea:disabled{background:#0000000d;cursor:not-allowed;opacity:.7}.cs-input__button{background:var(--cs-button-color);color:var(--cs-header-text-color);border:none;width:44px;height:44px;border-radius:var(--cs-border-radius);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s cubic-bezier(.4,0,.2,1);flex-shrink:0;position:relative;overflow:hidden}.cs-input__button:hover:not(:disabled){background:var(--cs-secondary-color);transform:scale(1.05);box-shadow:var(--cs-shadow-sm)}.cs-input__button:active:not(:disabled){transform:scale(.95)}.cs-input__button:disabled{background:var(--cs-border-color);cursor:not-allowed;opacity:.5}.cs-input__spinner{animation:cs-spin 1s linear infinite}@keyframes cs-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cs-input__button--loading{cursor:wait;opacity:.8}@media(max-width:480px){.cs-widget--open{position:fixed!important;inset:auto!important;bottom:20px!important;right:20px!important;width:auto!important;height:auto!important;z-index:10000!important}.cs-window{position:fixed!important;width:88vw!important;height:60vh!important;max-width:400px!important;max-height:500px!important;bottom:90px!important;right:5%!important;left:5%!important;top:auto!important;border-radius:var(--cs-border-radius)!important;box-shadow:var(--cs-shadow-xl)!important;display:flex!important;flex-direction:column!important;animation:slideUp .3s ease-out!important;overflow:visible!important}.cs-widget--open .cs-widget__toggle{display:flex!important;opacity:.8}.cs-window__messages{padding:16px}.cs-window__header{padding:12px 16px}.cs-window__input-wrapper{padding:12px}.cs-widget__toggle{width:50px;height:50px}}', wz = ({
29548
29552
  apiKey: m,
29549
29553
  baseUrl: g,
29550
29554
  theme: b,
@@ -29553,13 +29557,13 @@ const Uz = ({ message: m, onDelete: g }) => {
29553
29557
  placeholder: R,
29554
29558
  className: w = "",
29555
29559
  onError: M,
29556
- onMessageSent: tt,
29560
+ onMessageSent: P,
29557
29561
  onMessageReceived: I
29558
29562
  }) => {
29559
29563
  const [F, W] = A0(!1), {
29560
29564
  messages: ft,
29561
29565
  sendMessage: Zt,
29562
- isLoading: P,
29566
+ isLoading: tt,
29563
29567
  error: rt,
29564
29568
  clearError: lt,
29565
29569
  deleteMessage: Et,
@@ -29600,7 +29604,7 @@ const Uz = ({ message: m, onDelete: g }) => {
29600
29604
  const H = St(it) === "#ffffff";
29601
29605
  return nt["--cs-assistant-message-color"] = (b == null ? void 0 : b.assistantMessageColor) || (H ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)"), nt["--cs-assistant-text-color"] = Ft, nt["--cs-focus-ring"] = yt(Jt, 0.2), nt;
29602
29606
  }, [b]), Se = async (nt) => {
29603
- if (tt == null || tt(nt), await Zt(nt), !rt) {
29607
+ if (P == null || P(nt), await Zt(nt), !rt) {
29604
29608
  const Jt = ft[ft.length - 1];
29605
29609
  (Jt == null ? void 0 : Jt.role) === "ASSISTANT" && (I == null || I(Jt.content));
29606
29610
  }
@@ -29620,7 +29624,7 @@ const Uz = ({ message: m, onDelete: g }) => {
29620
29624
  messages: ft,
29621
29625
  onSendMessage: Se,
29622
29626
  onClose: () => W(!1),
29623
- isLoading: P,
29627
+ isLoading: tt,
29624
29628
  error: rt,
29625
29629
  placeholder: R,
29626
29630
  welcomeMessage: T,