@mypatientspace/chatbot-widget 1.0.22 → 1.0.23

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.
@@ -92,7 +92,7 @@ function Rh() {
92
92
  return _.now() - M;
93
93
  };
94
94
  }
95
- var A = [], g = [], R = 1, U = null, B = 3, P = !1, w = !1, H = !1, V = !1, X = typeof setTimeout == "function" ? setTimeout : null, F = typeof clearTimeout == "function" ? clearTimeout : null, K = typeof setImmediate < "u" ? setImmediate : null;
95
+ var A = [], g = [], R = 1, U = null, B = 3, P = !1, w = !1, H = !1, V = !1, Y = typeof setTimeout == "function" ? setTimeout : null, W = typeof clearTimeout == "function" ? clearTimeout : null, K = typeof setImmediate < "u" ? setImmediate : null;
96
96
  function nt(z) {
97
97
  for (var j = o(g); j !== null; ) {
98
98
  if (j.callback === null) r(g);
@@ -111,7 +111,7 @@ function Rh() {
111
111
  j !== null && Dt(N, j.startTime - z);
112
112
  }
113
113
  }
114
- var I = !1, Y = -1, Gt = 5, ue = -1;
114
+ var I = !1, G = -1, Gt = 5, ue = -1;
115
115
  function Vt() {
116
116
  return V ? !0 : !(i.unstable_now() - ue < Gt);
117
117
  }
@@ -122,7 +122,7 @@ function Rh() {
122
122
  var j = !0;
123
123
  try {
124
124
  t: {
125
- w = !1, H && (H = !1, F(Y), Y = -1), P = !0;
125
+ w = !1, H && (H = !1, W(G), G = -1), P = !0;
126
126
  var $ = B;
127
127
  try {
128
128
  e: {
@@ -167,16 +167,16 @@ function Rh() {
167
167
  K(zt);
168
168
  };
169
169
  else if (typeof MessageChannel < "u") {
170
- var je = new MessageChannel(), gt = je.port2;
170
+ var je = new MessageChannel(), mt = je.port2;
171
171
  je.port1.onmessage = zt, Et = function() {
172
- gt.postMessage(null);
172
+ mt.postMessage(null);
173
173
  };
174
174
  } else
175
175
  Et = function() {
176
- X(zt, 0);
176
+ Y(zt, 0);
177
177
  };
178
178
  function Dt(z, j) {
179
- Y = X(function() {
179
+ G = Y(function() {
180
180
  z(i.unstable_now());
181
181
  }, j);
182
182
  }
@@ -250,7 +250,7 @@ function Rh() {
250
250
  startTime: $,
251
251
  expirationTime: Ot,
252
252
  sortIndex: -1
253
- }, $ > At ? (z.sortIndex = $, f(g, z), o(A) === null && z === o(g) && (H ? (F(Y), Y = -1) : H = !0, Dt(N, $ - At))) : (z.sortIndex = Ot, f(A, z), w || P || (w = !0, I || (I = !0, Et()))), z;
253
+ }, $ > At ? (z.sortIndex = $, f(g, z), o(A) === null && z === o(g) && (H ? (W(G), G = -1) : H = !0, Dt(N, $ - At))) : (z.sortIndex = Ot, f(A, z), w || P || (w = !0, I || (I = !0, Et()))), z;
254
254
  }, i.unstable_shouldYield = Vt, i.unstable_wrapCallback = function(z) {
255
255
  var j = B;
256
256
  return function() {
@@ -289,30 +289,30 @@ function Hh() {
289
289
  enqueueSetState: function() {
290
290
  }
291
291
  }, H = Object.assign, V = {};
292
- function X(h, D, q) {
292
+ function Y(h, D, q) {
293
293
  this.props = h, this.context = D, this.refs = V, this.updater = q || w;
294
294
  }
295
- X.prototype.isReactComponent = {}, X.prototype.setState = function(h, D) {
295
+ Y.prototype.isReactComponent = {}, Y.prototype.setState = function(h, D) {
296
296
  if (typeof h != "object" && typeof h != "function" && h != null)
297
297
  throw Error(
298
298
  "takes an object of state variables to update or a function which returns an object of state variables."
299
299
  );
300
300
  this.updater.enqueueSetState(this, h, D, "setState");
301
- }, X.prototype.forceUpdate = function(h) {
301
+ }, Y.prototype.forceUpdate = function(h) {
302
302
  this.updater.enqueueForceUpdate(this, h, "forceUpdate");
303
303
  };
304
- function F() {
304
+ function W() {
305
305
  }
306
- F.prototype = X.prototype;
306
+ W.prototype = Y.prototype;
307
307
  function K(h, D, q) {
308
308
  this.props = h, this.context = D, this.refs = V, this.updater = q || w;
309
309
  }
310
- var nt = K.prototype = new F();
311
- nt.constructor = K, H(nt, X.prototype), nt.isPureReactComponent = !0;
310
+ var nt = K.prototype = new W();
311
+ nt.constructor = K, H(nt, Y.prototype), nt.isPureReactComponent = !0;
312
312
  var N = Array.isArray;
313
313
  function I() {
314
314
  }
315
- var Y = { H: null, A: null, T: null, S: null }, Gt = Object.prototype.hasOwnProperty;
315
+ var G = { H: null, A: null, T: null, S: null }, Gt = Object.prototype.hasOwnProperty;
316
316
  function ue(h, D, q) {
317
317
  var L = q.ref;
318
318
  return {
@@ -336,7 +336,7 @@ function Hh() {
336
336
  });
337
337
  }
338
338
  var je = /\/+/g;
339
- function gt(h, D) {
339
+ function mt(h, D) {
340
340
  return typeof h == "object" && h !== null && h.key != null ? Et("" + h.key) : D.toString(36);
341
341
  }
342
342
  function Dt(h) {
@@ -391,7 +391,7 @@ function Hh() {
391
391
  }
392
392
  }
393
393
  if (pt)
394
- return et = et(h), pt = L === "" ? "." + gt(h, 0) : L, N(et) ? (q = "", pt != null && (q = pt.replace(je, "$&/") + "/"), z(et, D, q, "", function(Ka) {
394
+ return et = et(h), pt = L === "" ? "." + mt(h, 0) : L, N(et) ? (q = "", pt != null && (q = pt.replace(je, "$&/") + "/"), z(et, D, q, "", function(Ka) {
395
395
  return Ka;
396
396
  })) : et != null && (zt(et) && (et = Vt(
397
397
  et,
@@ -404,7 +404,7 @@ function Hh() {
404
404
  var ae = L === "" ? "." : L + ":";
405
405
  if (N(h))
406
406
  for (var qt = 0; qt < h.length; qt++)
407
- L = h[qt], ut = ae + gt(L, qt), pt += z(
407
+ L = h[qt], ut = ae + mt(L, qt), pt += z(
408
408
  L,
409
409
  D,
410
410
  q,
@@ -413,7 +413,7 @@ function Hh() {
413
413
  );
414
414
  else if (qt = P(h), typeof qt == "function")
415
415
  for (h = qt.call(h), qt = 0; !(L = h.next()).done; )
416
- L = L.value, ut = ae + gt(L, qt++), pt += z(
416
+ L = L.value, ut = ae + mt(L, qt++), pt += z(
417
417
  L,
418
418
  D,
419
419
  q,
@@ -501,10 +501,10 @@ function Hh() {
501
501
  return h;
502
502
  }
503
503
  };
504
- return tt.Activity = U, tt.Children = Ot, tt.Component = X, tt.Fragment = o, tt.Profiler = y, tt.PureComponent = K, tt.StrictMode = r, tt.Suspense = A, tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Y, tt.__COMPILER_RUNTIME = {
504
+ return tt.Activity = U, tt.Children = Ot, tt.Component = Y, tt.Fragment = o, tt.Profiler = y, tt.PureComponent = K, tt.StrictMode = r, tt.Suspense = A, tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = G, tt.__COMPILER_RUNTIME = {
505
505
  __proto__: null,
506
506
  c: function(h) {
507
- return Y.H.useMemoCache(h);
507
+ return G.H.useMemoCache(h);
508
508
  }
509
509
  }, tt.cache = function(h) {
510
510
  return function() {
@@ -574,59 +574,59 @@ function Hh() {
574
574
  compare: D === void 0 ? null : D
575
575
  };
576
576
  }, tt.startTransition = function(h) {
577
- var D = Y.T, q = {};
578
- Y.T = q;
577
+ var D = G.T, q = {};
578
+ G.T = q;
579
579
  try {
580
- var L = h(), et = Y.S;
580
+ var L = h(), et = G.S;
581
581
  et !== null && et(q, L), typeof L == "object" && L !== null && typeof L.then == "function" && L.then(I, At);
582
582
  } catch (ut) {
583
583
  At(ut);
584
584
  } finally {
585
- D !== null && q.types !== null && (D.types = q.types), Y.T = D;
585
+ D !== null && q.types !== null && (D.types = q.types), G.T = D;
586
586
  }
587
587
  }, tt.unstable_useCacheRefresh = function() {
588
- return Y.H.useCacheRefresh();
588
+ return G.H.useCacheRefresh();
589
589
  }, tt.use = function(h) {
590
- return Y.H.use(h);
590
+ return G.H.use(h);
591
591
  }, tt.useActionState = function(h, D, q) {
592
- return Y.H.useActionState(h, D, q);
592
+ return G.H.useActionState(h, D, q);
593
593
  }, tt.useCallback = function(h, D) {
594
- return Y.H.useCallback(h, D);
594
+ return G.H.useCallback(h, D);
595
595
  }, tt.useContext = function(h) {
596
- return Y.H.useContext(h);
596
+ return G.H.useContext(h);
597
597
  }, tt.useDebugValue = function() {
598
598
  }, tt.useDeferredValue = function(h, D) {
599
- return Y.H.useDeferredValue(h, D);
599
+ return G.H.useDeferredValue(h, D);
600
600
  }, tt.useEffect = function(h, D) {
601
- return Y.H.useEffect(h, D);
601
+ return G.H.useEffect(h, D);
602
602
  }, tt.useEffectEvent = function(h) {
603
- return Y.H.useEffectEvent(h);
603
+ return G.H.useEffectEvent(h);
604
604
  }, tt.useId = function() {
605
- return Y.H.useId();
605
+ return G.H.useId();
606
606
  }, tt.useImperativeHandle = function(h, D, q) {
607
- return Y.H.useImperativeHandle(h, D, q);
607
+ return G.H.useImperativeHandle(h, D, q);
608
608
  }, tt.useInsertionEffect = function(h, D) {
609
- return Y.H.useInsertionEffect(h, D);
609
+ return G.H.useInsertionEffect(h, D);
610
610
  }, tt.useLayoutEffect = function(h, D) {
611
- return Y.H.useLayoutEffect(h, D);
611
+ return G.H.useLayoutEffect(h, D);
612
612
  }, tt.useMemo = function(h, D) {
613
- return Y.H.useMemo(h, D);
613
+ return G.H.useMemo(h, D);
614
614
  }, tt.useOptimistic = function(h, D) {
615
- return Y.H.useOptimistic(h, D);
615
+ return G.H.useOptimistic(h, D);
616
616
  }, tt.useReducer = function(h, D, q) {
617
- return Y.H.useReducer(h, D, q);
617
+ return G.H.useReducer(h, D, q);
618
618
  }, tt.useRef = function(h) {
619
- return Y.H.useRef(h);
619
+ return G.H.useRef(h);
620
620
  }, tt.useState = function(h) {
621
- return Y.H.useState(h);
621
+ return G.H.useState(h);
622
622
  }, tt.useSyncExternalStore = function(h, D, q) {
623
- return Y.H.useSyncExternalStore(
623
+ return G.H.useSyncExternalStore(
624
624
  h,
625
625
  D,
626
626
  q
627
627
  );
628
628
  }, tt.useTransition = function() {
629
- return Y.H.useTransition();
629
+ return G.H.useTransition();
630
630
  }, tt.version = "19.2.3", tt;
631
631
  }
632
632
  var T0;
@@ -894,12 +894,12 @@ function Bh() {
894
894
  }
895
895
  return null;
896
896
  }
897
- var U = Object.assign, B = /* @__PURE__ */ Symbol.for("react.element"), P = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), H = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), X = /* @__PURE__ */ Symbol.for("react.profiler"), F = /* @__PURE__ */ Symbol.for("react.consumer"), K = /* @__PURE__ */ Symbol.for("react.context"), nt = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), Y = /* @__PURE__ */ Symbol.for("react.memo"), Gt = /* @__PURE__ */ Symbol.for("react.lazy"), ue = /* @__PURE__ */ Symbol.for("react.activity"), Vt = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), zt = Symbol.iterator;
897
+ var U = Object.assign, B = /* @__PURE__ */ Symbol.for("react.element"), P = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), H = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), K = /* @__PURE__ */ Symbol.for("react.context"), nt = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), Gt = /* @__PURE__ */ Symbol.for("react.lazy"), ue = /* @__PURE__ */ Symbol.for("react.activity"), Vt = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), zt = Symbol.iterator;
898
898
  function Et(t) {
899
899
  return t === null || typeof t != "object" ? null : (t = zt && t[zt] || t["@@iterator"], typeof t == "function" ? t : null);
900
900
  }
901
901
  var je = /* @__PURE__ */ Symbol.for("react.client.reference");
902
- function gt(t) {
902
+ function mt(t) {
903
903
  if (t == null) return null;
904
904
  if (typeof t == "function")
905
905
  return t.$$typeof === je ? null : t.displayName || t.name || null;
@@ -907,7 +907,7 @@ function Bh() {
907
907
  switch (t) {
908
908
  case H:
909
909
  return "Fragment";
910
- case X:
910
+ case Y:
911
911
  return "Profiler";
912
912
  case V:
913
913
  return "StrictMode";
@@ -924,17 +924,17 @@ function Bh() {
924
924
  return "Portal";
925
925
  case K:
926
926
  return t.displayName || "Context";
927
- case F:
927
+ case W:
928
928
  return (t._context.displayName || "Context") + ".Consumer";
929
929
  case nt:
930
930
  var e = t.render;
931
931
  return t = t.displayName, t || (t = e.displayName || e.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
932
- case Y:
933
- return e = t.displayName || null, e !== null ? e : gt(t.type) || "Memo";
932
+ case G:
933
+ return e = t.displayName || null, e !== null ? e : mt(t.type) || "Memo";
934
934
  case Gt:
935
935
  e = t._payload, t = t._init;
936
936
  try {
937
- return gt(t(e));
937
+ return mt(t(e));
938
938
  } catch {
939
939
  }
940
940
  }
@@ -2380,8 +2380,8 @@ Error generating stack: ` + a.message + `
2380
2380
  case V:
2381
2381
  c = 8, n |= 24;
2382
2382
  break;
2383
- case X:
2384
- return t = pe(12, l, e, n | 2), t.elementType = X, t.lanes = u, t;
2383
+ case Y:
2384
+ return t = pe(12, l, e, n | 2), t.elementType = Y, t.lanes = u, t;
2385
2385
  case N:
2386
2386
  return t = pe(13, l, e, n), t.elementType = N, t.lanes = u, t;
2387
2387
  case I:
@@ -2392,13 +2392,13 @@ Error generating stack: ` + a.message + `
2392
2392
  case K:
2393
2393
  c = 10;
2394
2394
  break t;
2395
- case F:
2395
+ case W:
2396
2396
  c = 9;
2397
2397
  break t;
2398
2398
  case nt:
2399
2399
  c = 11;
2400
2400
  break t;
2401
- case Y:
2401
+ case G:
2402
2402
  c = 14;
2403
2403
  break t;
2404
2404
  case Gt:
@@ -3078,7 +3078,7 @@ Error generating stack: ` + a.message + `
3078
3078
  return e(v, Bl);
3079
3079
  }), st && Ie(v, at), J;
3080
3080
  }
3081
- function W(v, m, b, O) {
3081
+ function F(v, m, b, O) {
3082
3082
  if (b == null) throw Error(r(151));
3083
3083
  for (var J = null, ot = null, Z = m, at = m = 0, rt = null, dt = b.next(); Z !== null && !dt.done; at++, dt = b.next()) {
3084
3084
  Z.index > at ? (rt = Z, Z = null) : rt = Z.sibling;
@@ -3184,7 +3184,7 @@ Error generating stack: ` + a.message + `
3184
3184
  );
3185
3185
  if (Et(b)) {
3186
3186
  if (J = Et(b), typeof J != "function") throw Error(r(150));
3187
- return b = J.call(b), W(
3187
+ return b = J.call(b), F(
3188
3188
  v,
3189
3189
  m,
3190
3190
  b,
@@ -3251,7 +3251,7 @@ Error generating stack: ` + a.message + `
3251
3251
  function zl(t, e, l) {
3252
3252
  var a = t.updateQueue;
3253
3253
  if (a === null) return null;
3254
- if (a = a.shared, (mt & 2) !== 0) {
3254
+ if (a = a.shared, (ht & 2) !== 0) {
3255
3255
  var n = a.pending;
3256
3256
  return n === null ? e.next = e : (e.next = n.next, n.next = e), a.pending = e, e = yu(t), ys(t, null, l), e;
3257
3257
  }
@@ -3324,12 +3324,12 @@ Error generating stack: ` + a.message + `
3324
3324
  next: null
3325
3325
  });
3326
3326
  t: {
3327
- var Q = t, W = s;
3327
+ var Q = t, F = s;
3328
3328
  T = e;
3329
3329
  var Mt = l;
3330
- switch (W.tag) {
3330
+ switch (F.tag) {
3331
3331
  case 1:
3332
- if (Q = W.payload, typeof Q == "function") {
3332
+ if (Q = F.payload, typeof Q == "function") {
3333
3333
  C = Q.call(Mt, C, T);
3334
3334
  break t;
3335
3335
  }
@@ -3338,7 +3338,7 @@ Error generating stack: ` + a.message + `
3338
3338
  case 3:
3339
3339
  Q.flags = Q.flags & -65537 | 128;
3340
3340
  case 0:
3341
- if (Q = W.payload, T = typeof Q == "function" ? Q.call(Mt, C, T) : Q, T == null) break t;
3341
+ if (Q = F.payload, T = typeof Q == "function" ? Q.call(Mt, C, T) : Q, T == null) break t;
3342
3342
  C = U({}, C, T);
3343
3343
  break t;
3344
3344
  case 2:
@@ -3923,7 +3923,7 @@ Error generating stack: ` + a.message + `
3923
3923
  function eo(t) {
3924
3924
  var e = Yt().memoizedState;
3925
3925
  return Tm({ ref: e, nextImpl: t }), function() {
3926
- if ((mt & 2) !== 0) throw Error(r(440));
3926
+ if ((ht & 2) !== 0) throw Error(r(440));
3927
3927
  return e.impl.apply(void 0, arguments);
3928
3928
  };
3929
3929
  }
@@ -4350,7 +4350,7 @@ Error generating stack: ` + a.message + `
4350
4350
  useEffectEvent: function(t) {
4351
4351
  var e = ne(), l = { impl: t };
4352
4352
  return e.memoizedState = l, function() {
4353
- if ((mt & 2) !== 0)
4353
+ if ((ht & 2) !== 0)
4354
4354
  throw Error(r(440));
4355
4355
  return l.impl.apply(void 0, arguments);
4356
4356
  };
@@ -5233,7 +5233,7 @@ Error generating stack: ` + a.message + `
5233
5233
  l
5234
5234
  );
5235
5235
  break t;
5236
- } else if (n === Y) {
5236
+ } else if (n === G) {
5237
5237
  e.tag = 14, e = Co(
5238
5238
  null,
5239
5239
  e,
@@ -5244,7 +5244,7 @@ Error generating stack: ` + a.message + `
5244
5244
  break t;
5245
5245
  }
5246
5246
  }
5247
- throw e = gt(t) || t, Error(r(306, e, ""));
5247
+ throw e = mt(t) || t, Error(r(306, e, ""));
5248
5248
  }
5249
5249
  }
5250
5250
  return e;
@@ -6070,11 +6070,11 @@ Error generating stack: ` + a.message + `
6070
6070
  Q,
6071
6071
  u
6072
6072
  ), a.__reactInternalSnapshotBeforeUpdate = t;
6073
- } catch (W) {
6073
+ } catch (F) {
6074
6074
  Tt(
6075
6075
  l,
6076
6076
  l.return,
6077
- W
6077
+ F
6078
6078
  );
6079
6079
  }
6080
6080
  }
@@ -7167,9 +7167,9 @@ Error generating stack: ` + a.message + `
7167
7167
  cacheSignal: function() {
7168
7168
  return Ft(Xt).controller.signal;
7169
7169
  }
7170
- }, Nm = typeof WeakMap == "function" ? WeakMap : Map, mt = 0, Ct = null, it = null, ft = 0, St = 0, Te = null, _l = !1, Ua = !1, ff = !1, rl = 0, jt = 0, Ml = 0, la = 0, rf = 0, ze = 0, Ra = 0, On = null, oe = null, sf = !1, Qu = 0, cd = 0, Lu = 1 / 0, Zu = null, Ol = null, Kt = 0, Cl = null, Na = null, sl = 0, of = 0, df = null, fd = null, Cn = 0, yf = null;
7170
+ }, Nm = typeof WeakMap == "function" ? WeakMap : Map, ht = 0, Ct = null, it = null, ft = 0, St = 0, Te = null, _l = !1, Ua = !1, ff = !1, rl = 0, jt = 0, Ml = 0, la = 0, rf = 0, ze = 0, Ra = 0, On = null, oe = null, sf = !1, Qu = 0, cd = 0, Lu = 1 / 0, Zu = null, Ol = null, Kt = 0, Cl = null, Na = null, sl = 0, of = 0, df = null, fd = null, Cn = 0, yf = null;
7171
7171
  function Ee() {
7172
- return (mt & 2) !== 0 && ft !== 0 ? ft & -ft : z.T !== null ? bf() : Er();
7172
+ return (ht & 2) !== 0 && ft !== 0 ? ft & -ft : z.T !== null ? bf() : Er();
7173
7173
  }
7174
7174
  function rd() {
7175
7175
  if (ze === 0)
@@ -7185,7 +7185,7 @@ Error generating stack: ` + a.message + `
7185
7185
  ft,
7186
7186
  ze,
7187
7187
  !1
7188
- )), ka(t, l), ((mt & 2) === 0 || t !== Ct) && (t === Ct && ((mt & 2) === 0 && (la |= l), jt === 4 && Dl(
7188
+ )), ka(t, l), ((ht & 2) === 0 || t !== Ct) && (t === Ct && ((ht & 2) === 0 && (la |= l), jt === 4 && Dl(
7189
7189
  t,
7190
7190
  ft,
7191
7191
  ze,
@@ -7193,7 +7193,7 @@ Error generating stack: ` + a.message + `
7193
7193
  )), Le(t));
7194
7194
  }
7195
7195
  function sd(t, e, l) {
7196
- if ((mt & 6) !== 0) throw Error(r(327));
7196
+ if ((ht & 6) !== 0) throw Error(r(327));
7197
7197
  var a = !l && (e & 127) === 0 && (e & t.expiredLanes) === 0 || $a(t, e), n = a ? qm(t, e) : hf(t, e, !0), u = a;
7198
7198
  do {
7199
7199
  if (n === 0) {
@@ -7403,7 +7403,7 @@ Error generating stack: ` + a.message + `
7403
7403
  l !== 0 && Sr(t, l, e);
7404
7404
  }
7405
7405
  function wu() {
7406
- return (mt & 6) === 0 ? (Dn(0), !1) : !0;
7406
+ return (ht & 6) === 0 ? (Dn(0), !1) : !0;
7407
7407
  }
7408
7408
  function mf() {
7409
7409
  if (it !== null) {
@@ -7454,8 +7454,8 @@ Error generating stack: ` + a.message + `
7454
7454
  );
7455
7455
  }
7456
7456
  function hf(t, e, l) {
7457
- var a = mt;
7458
- mt |= 2;
7457
+ var a = ht;
7458
+ ht |= 2;
7459
7459
  var n = md(), u = hd();
7460
7460
  (Ct !== t || ft !== e) && (Zu = null, Ha(t, e)), e = !1;
7461
7461
  var c = jt;
@@ -7488,14 +7488,14 @@ Error generating stack: ` + a.message + `
7488
7488
  dd(t, x);
7489
7489
  }
7490
7490
  while (!0);
7491
- return e && t.shellSuspendCounter++, Pe = Jl = null, mt = a, z.H = n, z.A = u, it === null && (Ct = null, ft = 0, ou()), c;
7491
+ return e && t.shellSuspendCounter++, Pe = Jl = null, ht = a, z.H = n, z.A = u, it === null && (Ct = null, ft = 0, ou()), c;
7492
7492
  }
7493
7493
  function jm() {
7494
7494
  for (; it !== null; ) vd(it);
7495
7495
  }
7496
7496
  function qm(t, e) {
7497
- var l = mt;
7498
- mt |= 2;
7497
+ var l = ht;
7498
+ ht |= 2;
7499
7499
  var a = md(), n = hd();
7500
7500
  Ct !== t || ft !== e ? (Zu = null, Lu = me() + 500, Ha(t, e)) : Ua = $a(
7501
7501
  t,
@@ -7566,7 +7566,7 @@ Error generating stack: ` + a.message + `
7566
7566
  dd(t, x);
7567
7567
  }
7568
7568
  while (!0);
7569
- return Pe = Jl = null, z.H = a, z.A = n, mt = l, it !== null ? 0 : (Ct = null, ft = 0, ou(), jt);
7569
+ return Pe = Jl = null, z.H = a, z.A = n, ht = l, it !== null ? 0 : (Ct = null, ft = 0, ou(), jt);
7570
7570
  }
7571
7571
  function Bm() {
7572
7572
  for (; it !== null && !iy(); )
@@ -7682,7 +7682,7 @@ Error generating stack: ` + a.message + `
7682
7682
  do
7683
7683
  Ju();
7684
7684
  while (Kt !== 0);
7685
- if ((mt & 6) !== 0) throw Error(r(327));
7685
+ if ((ht & 6) !== 0) throw Error(r(327));
7686
7686
  if (e !== null) {
7687
7687
  if (e === t.current) throw Error(r(177));
7688
7688
  if (u = e.lanes | e.childLanes, u |= lc, vy(
@@ -7695,11 +7695,11 @@ Error generating stack: ` + a.message + `
7695
7695
  ), t === Ct && (it = Ct = null, ft = 0), Na = e, Cl = t, sl = l, of = u, df = n, fd = a, (e.subtreeFlags & 10256) !== 0 || (e.flags & 10256) !== 0 ? (t.callbackNode = null, t.callbackPriority = 0, Qm(kn, function() {
7696
7696
  return Ad(), null;
7697
7697
  })) : (t.callbackNode = null, t.callbackPriority = 0), a = (e.flags & 13878) !== 0, (e.subtreeFlags & 13878) !== 0 || a) {
7698
- a = z.T, z.T = null, n = j.p, j.p = 2, c = mt, mt |= 4;
7698
+ a = z.T, z.T = null, n = j.p, j.p = 2, c = ht, ht |= 4;
7699
7699
  try {
7700
7700
  Dm(t, e, l);
7701
7701
  } finally {
7702
- mt = c, j.p = n, z.T = a;
7702
+ ht = c, j.p = n, z.T = a;
7703
7703
  }
7704
7704
  }
7705
7705
  Kt = 1, Sd(), Td(), zd();
@@ -7713,8 +7713,8 @@ Error generating stack: ` + a.message + `
7713
7713
  l = z.T, z.T = null;
7714
7714
  var a = j.p;
7715
7715
  j.p = 2;
7716
- var n = mt;
7717
- mt |= 4;
7716
+ var n = ht;
7717
+ ht |= 4;
7718
7718
  try {
7719
7719
  td(e, t);
7720
7720
  var u = Mf, c = us(t.containerInfo), s = u.focusedElem, d = u.selectionRange;
@@ -7732,18 +7732,18 @@ Error generating stack: ` + a.message + `
7732
7732
  else {
7733
7733
  var C = s.ownerDocument || document, T = C && C.defaultView || window;
7734
7734
  if (T.getSelection) {
7735
- var E = T.getSelection(), Q = s.textContent.length, W = Math.min(d.start, Q), Mt = d.end === void 0 ? W : Math.min(d.end, Q);
7736
- !E.extend && W > Mt && (c = Mt, Mt = W, W = c);
7735
+ var E = T.getSelection(), Q = s.textContent.length, F = Math.min(d.start, Q), Mt = d.end === void 0 ? F : Math.min(d.end, Q);
7736
+ !E.extend && F > Mt && (c = Mt, Mt = F, F = c);
7737
7737
  var v = as(
7738
7738
  s,
7739
- W
7739
+ F
7740
7740
  ), m = as(
7741
7741
  s,
7742
7742
  Mt
7743
7743
  );
7744
7744
  if (v && m && (E.rangeCount !== 1 || E.anchorNode !== v.node || E.anchorOffset !== v.offset || E.focusNode !== m.node || E.focusOffset !== m.offset)) {
7745
7745
  var b = C.createRange();
7746
- b.setStart(v.node, v.offset), E.removeAllRanges(), W > Mt ? (E.addRange(b), E.extend(m.node, m.offset)) : (b.setEnd(m.node, m.offset), E.addRange(b));
7746
+ b.setStart(v.node, v.offset), E.removeAllRanges(), F > Mt ? (E.addRange(b), E.extend(m.node, m.offset)) : (b.setEnd(m.node, m.offset), E.addRange(b));
7747
7747
  }
7748
7748
  }
7749
7749
  }
@@ -7761,7 +7761,7 @@ Error generating stack: ` + a.message + `
7761
7761
  }
7762
7762
  ui = !!_f, Mf = _f = null;
7763
7763
  } finally {
7764
- mt = n, j.p = a, z.T = l;
7764
+ ht = n, j.p = a, z.T = l;
7765
7765
  }
7766
7766
  }
7767
7767
  t.current = e, Kt = 2;
@@ -7775,12 +7775,12 @@ Error generating stack: ` + a.message + `
7775
7775
  l = z.T, z.T = null;
7776
7776
  var a = j.p;
7777
7777
  j.p = 2;
7778
- var n = mt;
7779
- mt |= 4;
7778
+ var n = ht;
7779
+ ht |= 4;
7780
7780
  try {
7781
7781
  ko(t, e.alternate, e);
7782
7782
  } finally {
7783
- mt = n, j.p = a, z.T = l;
7783
+ ht = n, j.p = a, z.T = l;
7784
7784
  }
7785
7785
  }
7786
7786
  Kt = 3;
@@ -7832,14 +7832,14 @@ Error generating stack: ` + a.message + `
7832
7832
  try {
7833
7833
  j.p = 32 > l ? 32 : l, z.T = null, l = df, df = null;
7834
7834
  var u = Cl, c = sl;
7835
- if (Kt = 0, Na = Cl = null, sl = 0, (mt & 6) !== 0) throw Error(r(331));
7836
- var s = mt;
7837
- if (mt |= 4, ud(u.current), ld(
7835
+ if (Kt = 0, Na = Cl = null, sl = 0, (ht & 6) !== 0) throw Error(r(331));
7836
+ var s = ht;
7837
+ if (ht |= 4, ud(u.current), ld(
7838
7838
  u,
7839
7839
  u.current,
7840
7840
  c,
7841
7841
  l
7842
- ), mt = s, Dn(0, !1), he && typeof he.onPostCommitFiberRoot == "function")
7842
+ ), ht = s, Dn(0, !1), he && typeof he.onPostCommitFiberRoot == "function")
7843
7843
  try {
7844
7844
  he.onPostCommitFiberRoot(Ja, u);
7845
7845
  } catch {
@@ -7891,7 +7891,7 @@ Error generating stack: ` + a.message + `
7891
7891
  }
7892
7892
  function Ym(t, e, l) {
7893
7893
  var a = t.pingCache;
7894
- a !== null && a.delete(e), t.pingedLanes |= t.suspendedLanes & l, t.warmLanes &= ~l, Ct === t && (ft & l) === l && (jt === 4 || jt === 3 && (ft & 62914560) === ft && 300 > me() - Qu ? (mt & 2) === 0 && Ha(t, 0) : rf |= l, Ra === ft && (Ra = 0)), Le(t);
7894
+ a !== null && a.delete(e), t.pingedLanes |= t.suspendedLanes & l, t.warmLanes &= ~l, Ct === t && (ft & l) === l && (jt === 4 || jt === 3 && (ft & 62914560) === ft && 300 > me() - Qu ? (ht & 2) === 0 && Ha(t, 0) : rf |= l, Ra === ft && (Ra = 0)), Le(t);
7895
7895
  }
7896
7896
  function _d(t, e) {
7897
7897
  e === 0 && (e = br()), t = wl(t, e), t !== null && (ka(t, e), Le(t));
@@ -8014,7 +8014,7 @@ Error generating stack: ` + a.message + `
8014
8014
  }
8015
8015
  function Zm() {
8016
8016
  eh(function() {
8017
- (mt & 6) !== 0 ? Oi(
8017
+ (ht & 6) !== 0 ? Oi(
8018
8018
  vr,
8019
8019
  Lm
8020
8020
  ) : Md();
@@ -8317,73 +8317,73 @@ Error generating stack: ` + a.message + `
8317
8317
  case "beforetoggle":
8318
8318
  E = ky;
8319
8319
  }
8320
- var W = (e & 4) !== 0, Mt = !W && (t === "scroll" || t === "scrollend"), v = W ? T !== null ? T + "Capture" : null : T;
8321
- W = [];
8320
+ var F = (e & 4) !== 0, Mt = !F && (t === "scroll" || t === "scrollend"), v = F ? T !== null ? T + "Capture" : null : T;
8321
+ F = [];
8322
8322
  for (var m = S, b; m !== null; ) {
8323
8323
  var O = m;
8324
- if (b = O.stateNode, O = O.tag, O !== 5 && O !== 26 && O !== 27 || b === null || v === null || (O = Ia(m, v), O != null && W.push(
8324
+ if (b = O.stateNode, O = O.tag, O !== 5 && O !== 26 && O !== 27 || b === null || v === null || (O = Ia(m, v), O != null && F.push(
8325
8325
  Rn(m, O, b)
8326
8326
  )), Mt) break;
8327
8327
  m = m.return;
8328
8328
  }
8329
- 0 < W.length && (T = new E(
8329
+ 0 < F.length && (T = new E(
8330
8330
  T,
8331
8331
  Q,
8332
8332
  null,
8333
8333
  l,
8334
8334
  x
8335
- ), C.push({ event: T, listeners: W }));
8335
+ ), C.push({ event: T, listeners: F }));
8336
8336
  }
8337
8337
  }
8338
8338
  if ((e & 7) === 0) {
8339
8339
  t: {
8340
8340
  if (T = t === "mouseover" || t === "pointerover", E = t === "mouseout" || t === "pointerout", T && l !== Gi && (Q = l.relatedTarget || l.fromElement) && (na(Q) || Q[aa]))
8341
8341
  break t;
8342
- if ((E || T) && (T = x.window === x ? x : (T = x.ownerDocument) ? T.defaultView || T.parentWindow : window, E ? (Q = l.relatedTarget || l.toElement, E = S, Q = Q ? na(Q) : null, Q !== null && (Mt = p(Q), W = Q.tag, Q !== Mt || W !== 5 && W !== 27 && W !== 6) && (Q = null)) : (E = null, Q = S), E !== Q)) {
8343
- if (W = Qr, O = "onMouseLeave", v = "onMouseEnter", m = "mouse", (t === "pointerout" || t === "pointerover") && (W = Zr, O = "onPointerLeave", v = "onPointerEnter", m = "pointer"), Mt = E == null ? T : Fa(E), b = Q == null ? T : Fa(Q), T = new W(
8342
+ if ((E || T) && (T = x.window === x ? x : (T = x.ownerDocument) ? T.defaultView || T.parentWindow : window, E ? (Q = l.relatedTarget || l.toElement, E = S, Q = Q ? na(Q) : null, Q !== null && (Mt = p(Q), F = Q.tag, Q !== Mt || F !== 5 && F !== 27 && F !== 6) && (Q = null)) : (E = null, Q = S), E !== Q)) {
8343
+ if (F = Qr, O = "onMouseLeave", v = "onMouseEnter", m = "mouse", (t === "pointerout" || t === "pointerover") && (F = Zr, O = "onPointerLeave", v = "onPointerEnter", m = "pointer"), Mt = E == null ? T : Fa(E), b = Q == null ? T : Fa(Q), T = new F(
8344
8344
  O,
8345
8345
  m + "leave",
8346
8346
  E,
8347
8347
  l,
8348
8348
  x
8349
- ), T.target = Mt, T.relatedTarget = b, O = null, na(x) === S && (W = new W(
8349
+ ), T.target = Mt, T.relatedTarget = b, O = null, na(x) === S && (F = new F(
8350
8350
  v,
8351
8351
  m + "enter",
8352
8352
  Q,
8353
8353
  l,
8354
8354
  x
8355
- ), W.target = b, W.relatedTarget = Mt, O = W), Mt = O, E && Q)
8355
+ ), F.target = b, F.relatedTarget = Mt, O = F), Mt = O, E && Q)
8356
8356
  e: {
8357
- for (W = $m, v = E, m = Q, b = 0, O = v; O; O = W(O))
8357
+ for (F = $m, v = E, m = Q, b = 0, O = v; O; O = F(O))
8358
8358
  b++;
8359
8359
  O = 0;
8360
- for (var J = m; J; J = W(J))
8360
+ for (var J = m; J; J = F(J))
8361
8361
  O++;
8362
8362
  for (; 0 < b - O; )
8363
- v = W(v), b--;
8363
+ v = F(v), b--;
8364
8364
  for (; 0 < O - b; )
8365
- m = W(m), O--;
8365
+ m = F(m), O--;
8366
8366
  for (; b--; ) {
8367
8367
  if (v === m || m !== null && v === m.alternate) {
8368
- W = v;
8368
+ F = v;
8369
8369
  break e;
8370
8370
  }
8371
- v = W(v), m = W(m);
8371
+ v = F(v), m = F(m);
8372
8372
  }
8373
- W = null;
8373
+ F = null;
8374
8374
  }
8375
- else W = null;
8375
+ else F = null;
8376
8376
  E !== null && jd(
8377
8377
  C,
8378
8378
  T,
8379
8379
  E,
8380
- W,
8380
+ F,
8381
8381
  !1
8382
8382
  ), Q !== null && Mt !== null && jd(
8383
8383
  C,
8384
8384
  Mt,
8385
8385
  Q,
8386
- W,
8386
+ F,
8387
8387
  !0
8388
8388
  );
8389
8389
  }
@@ -9190,8 +9190,8 @@ Error generating stack: ` + a.message + `
9190
9190
  case "track":
9191
9191
  case "wbr":
9192
9192
  case "menuitem":
9193
- for (var W in l)
9194
- T = l[W], l.hasOwnProperty(W) && T != null && !a.hasOwnProperty(W) && _t(t, e, W, null, a, T);
9193
+ for (var F in l)
9194
+ T = l[F], l.hasOwnProperty(F) && T != null && !a.hasOwnProperty(F) && _t(t, e, F, null, a, T);
9195
9195
  for (S in a)
9196
9196
  if (T = a[S], E = l[S], a.hasOwnProperty(S) && T !== E && (T != null || E != null))
9197
9197
  switch (S) {
@@ -10041,7 +10041,7 @@ Error generating stack: ` + a.message + `
10041
10041
  var d = 1 << 31 - ve(c);
10042
10042
  s.entanglements[1] |= d, c &= ~d;
10043
10043
  }
10044
- Le(u), (mt & 6) === 0 && (Lu = me() + 500, Dn(0));
10044
+ Le(u), (ht & 6) === 0 && (Lu = me() + 500, Dn(0));
10045
10045
  }
10046
10046
  }
10047
10047
  break;
@@ -10532,11 +10532,11 @@ function Yh() {
10532
10532
  }
10533
10533
  return i(), wf.exports = Bh(), wf.exports;
10534
10534
  }
10535
- var Gh = Yh(), G = nr();
10536
- const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10535
+ var Gh = Yh(), X = nr();
10536
+ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10537
10537
  __proto__: null,
10538
10538
  default: Xh
10539
- }, [G]), kf = {
10539
+ }, [X]), kf = {
10540
10540
  colors: {
10541
10541
  primary: "#00c2d1",
10542
10542
  primaryDark: "#017992",
@@ -10605,9 +10605,9 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10605
10605
  if (B.trim()) {
10606
10606
  const V = B.split(`
10607
10607
  `);
10608
- for (const X of V) {
10609
- const F = M0(X);
10610
- F && (F.type === "content" ? (U += F.value, o.onChunk(F.value)) : F.type === "status" ? o.onStatus?.(F.value) : F.type === "session_id" && o.onSessionId?.(F.value));
10608
+ for (const Y of V) {
10609
+ const W = M0(Y);
10610
+ W && (W.type === "content" ? (U += W.value, o.onChunk(W.value)) : W.type === "status" ? o.onStatus?.(W.value) : W.type === "session_id" ? o.onSessionId?.(W.value) : W.type === "final" && (W.value && o.onSessionId?.(W.value), o.onStatus?.("complete")));
10611
10611
  }
10612
10612
  }
10613
10613
  o.onComplete(U);
@@ -10618,8 +10618,8 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10618
10618
  `);
10619
10619
  B = H.pop() || "";
10620
10620
  for (const V of H) {
10621
- const X = M0(V);
10622
- X && (X.type === "content" ? (U += X.value, o.onChunk(X.value)) : X.type === "status" ? o.onStatus?.(X.value) : X.type === "session_id" && o.onSessionId?.(X.value));
10621
+ const Y = M0(V);
10622
+ Y && (Y.type === "content" ? (U += Y.value, o.onChunk(Y.value)) : Y.type === "status" ? o.onStatus?.(Y.value) : Y.type === "session_id" ? o.onSessionId?.(Y.value) : Y.type === "final" && (Y.value && o.onSessionId?.(Y.value), o.onStatus?.("complete")));
10623
10623
  }
10624
10624
  }
10625
10625
  } catch (A) {
@@ -10669,7 +10669,7 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10669
10669
  case "canvas":
10670
10670
  return null;
10671
10671
  case "final":
10672
- return r.session_id ? { type: "session_id", value: r.session_id } : null;
10672
+ return { type: "final", value: r.session_id || "" };
10673
10673
  case "close":
10674
10674
  return null;
10675
10675
  default:
@@ -10736,9 +10736,9 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10736
10736
  const M = _ instanceof Error ? _.message : "Unknown error";
10737
10737
  return { assistants: [], error: M };
10738
10738
  }
10739
- }, w0 = G.createContext(null), di = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, Kh = ({ config: i, children: f }) => {
10740
- const [o, r] = G.useState([]), [y, p] = G.useState(i.embedMode ?? !1), [_, M] = G.useState(!1), [A, g] = G.useState(void 0), [R, U] = G.useState(!1), [B, P] = G.useState(!1), [w, H] = G.useState(null), [V, X] = G.useState(null), F = Qh(i.theme), K = G.useRef(null), nt = G.useRef(!1);
10741
- G.useEffect(() => {
10739
+ }, w0 = X.createContext(null), di = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, Kh = ({ config: i, children: f }) => {
10740
+ const [o, r] = X.useState([]), [y, p] = X.useState(i.embedMode ?? !1), [_, M] = X.useState(!1), [A, g] = X.useState(void 0), [R, U] = X.useState(!1), [B, P] = X.useState(!1), [w, H] = X.useState(null), [V, Y] = X.useState(null), W = Qh(i.theme), K = X.useRef(null), nt = X.useRef(!1);
10741
+ X.useEffect(() => {
10742
10742
  (async () => {
10743
10743
  if (!(!y || B || i.loadHistory === !1)) {
10744
10744
  try {
@@ -10756,9 +10756,9 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10756
10756
  const je = {
10757
10757
  ...i,
10758
10758
  assistantId: Et.id
10759
- }, gt = await wh(je);
10760
- if (gt.sessionId && X(gt.sessionId), gt.messages.length > 0) {
10761
- const Dt = gt.messages.map((z) => ({
10759
+ }, mt = await wh(je);
10760
+ if (mt.sessionId && Y(mt.sessionId), mt.messages.length > 0) {
10761
+ const Dt = mt.messages.map((z) => ({
10762
10762
  id: z.id || di(),
10763
10763
  content: z.content,
10764
10764
  sender: z.sender,
@@ -10773,7 +10773,7 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10773
10773
  P(!0);
10774
10774
  }
10775
10775
  })();
10776
- }, [y, B, i]), G.useEffect(() => {
10776
+ }, [y, B, i]), X.useEffect(() => {
10777
10777
  if (y && !R && B) {
10778
10778
  const Vt = w?.chatUiConfig?.welcomeMessage || i.greeting;
10779
10779
  if (Vt) {
@@ -10789,13 +10789,13 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10789
10789
  U(!0);
10790
10790
  }
10791
10791
  }, [y, R, i.greeting, B, w]);
10792
- const N = G.useCallback(() => {
10792
+ const N = X.useCallback(() => {
10793
10793
  p(!0), i.onOpen?.();
10794
- }, [i]), I = G.useCallback(() => {
10794
+ }, [i]), I = X.useCallback(() => {
10795
10795
  p(!1), i.onClose?.();
10796
- }, [i]), Y = G.useCallback(() => {
10796
+ }, [i]), G = X.useCallback(() => {
10797
10797
  y ? I() : N();
10798
- }, [y, N, I]), Gt = G.useCallback(
10798
+ }, [y, N, I]), Gt = X.useCallback(
10799
10799
  async (Vt) => {
10800
10800
  if (!Vt.trim()) return;
10801
10801
  const zt = {
@@ -10805,8 +10805,8 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10805
10805
  timestamp: /* @__PURE__ */ new Date(),
10806
10806
  status: "sending"
10807
10807
  };
10808
- r((gt) => [...gt, zt]), r(
10809
- (gt) => gt.map(
10808
+ r((mt) => [...mt, zt]), r(
10809
+ (mt) => mt.map(
10810
10810
  (Dt) => Dt.id === zt.id ? { ...Dt, status: "sent" } : Dt
10811
10811
  )
10812
10812
  ), i.onMessageSent?.(zt), M(!0), g("thinking");
@@ -10818,44 +10818,44 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10818
10818
  ...V && { sessionId: V }
10819
10819
  };
10820
10820
  await Zh(Vt, je, {
10821
- onChunk: (gt) => {
10821
+ onChunk: (mt) => {
10822
10822
  if (nt.current)
10823
10823
  r(
10824
10824
  (Dt) => Dt.map(
10825
- (z) => z.id === Et ? { ...z, content: z.content + gt } : z
10825
+ (z) => z.id === Et ? { ...z, content: z.content + mt } : z
10826
10826
  )
10827
10827
  );
10828
10828
  else {
10829
10829
  nt.current = !0, g(void 0);
10830
10830
  const Dt = {
10831
10831
  id: Et,
10832
- content: gt,
10832
+ content: mt,
10833
10833
  sender: "bot",
10834
10834
  timestamp: /* @__PURE__ */ new Date(),
10835
10835
  status: "sending"
10836
10836
  };
10837
10837
  r((z) => [...z, Dt]);
10838
10838
  }
10839
- i.onStreamChunk?.(gt);
10839
+ i.onStreamChunk?.(mt);
10840
10840
  },
10841
- onStatus: (gt) => {
10842
- g(gt);
10841
+ onStatus: (mt) => {
10842
+ g(mt === "complete" ? void 0 : mt);
10843
10843
  },
10844
- onSessionId: (gt) => {
10845
- X(gt);
10844
+ onSessionId: (mt) => {
10845
+ Y(mt);
10846
10846
  },
10847
- onComplete: (gt) => {
10847
+ onComplete: (mt) => {
10848
10848
  M(!1), g(void 0), K.current = null, nt.current && r((Dt) => {
10849
10849
  const z = Dt.map(
10850
- ($) => $.id === Et ? { ...$, content: gt, status: "sent" } : $
10850
+ ($) => $.id === Et ? { ...$, content: mt, status: "sent" } : $
10851
10851
  ), j = z.find(
10852
10852
  ($) => $.id === Et
10853
10853
  );
10854
10854
  return j && i.onMessageReceived?.(j), z;
10855
10855
  });
10856
10856
  },
10857
- onError: (gt) => {
10858
- M(!1), g(void 0), K.current = null, console.error("Stream error:", gt), r(
10857
+ onError: (mt) => {
10858
+ M(!1), g(void 0), K.current = null, console.error("Stream error:", mt), r(
10859
10859
  (Dt) => Dt.map(
10860
10860
  (z) => z.id === zt.id ? { ...z, status: "error" } : z
10861
10861
  ).filter((z) => z.id !== Et)
@@ -10870,12 +10870,12 @@ const Xh = /* @__PURE__ */ Ch(G), _0 = /* @__PURE__ */ Oh({
10870
10870
  isTyping: _,
10871
10871
  streamingStatus: A,
10872
10872
  config: i,
10873
- theme: F,
10873
+ theme: W,
10874
10874
  assistant: w,
10875
10875
  sendMessage: Gt,
10876
10876
  open: N,
10877
10877
  close: I,
10878
- toggle: Y
10878
+ toggle: G
10879
10879
  };
10880
10880
  return /* @__PURE__ */ k.jsx(w0.Provider, { value: ue, children: f });
10881
10881
  };
@@ -10928,7 +10928,7 @@ var kh = /* @__PURE__ */ (function() {
10928
10928
  return (y = r.parentNode) == null ? void 0 : y.removeChild(r);
10929
10929
  }), this.tags = [], this.ctr = 0;
10930
10930
  }, i;
10931
- })(), le = "-ms-", pi = "-moz-", ht = "-webkit-", V0 = "comm", ir = "rule", cr = "decl", Wh = "@import", K0 = "@keyframes", Fh = "@layer", Ih = Math.abs, Si = String.fromCharCode, Ph = Object.assign;
10931
+ })(), le = "-ms-", pi = "-moz-", vt = "-webkit-", V0 = "comm", ir = "rule", cr = "decl", Wh = "@import", K0 = "@keyframes", Fh = "@layer", Ih = Math.abs, Si = String.fromCharCode, Ph = Object.assign;
10932
10932
  function t1(i, f) {
10933
10933
  return te(i, 0) ^ 45 ? (((f << 2 ^ te(i, 0)) << 2 ^ te(i, 1)) << 2 ^ te(i, 2)) << 2 ^ te(i, 3) : 0;
10934
10934
  }
@@ -10938,7 +10938,7 @@ function J0(i) {
10938
10938
  function e1(i, f) {
10939
10939
  return (i = f.exec(i)) ? i[0] : i;
10940
10940
  }
10941
- function vt(i, f, o) {
10941
+ function gt(i, f, o) {
10942
10942
  return i.replace(f, o);
10943
10943
  }
10944
10944
  function er(i, f) {
@@ -11081,30 +11081,30 @@ function r1(i) {
11081
11081
  return W0(gi("", null, null, null, [""], i = k0(i), 0, [0], i));
11082
11082
  }
11083
11083
  function gi(i, f, o, r, y, p, _, M, A) {
11084
- for (var g = 0, R = 0, U = _, B = 0, P = 0, w = 0, H = 1, V = 1, X = 1, F = 0, K = "", nt = y, N = p, I = r, Y = K; V; )
11085
- switch (w = F, F = Ae()) {
11084
+ for (var g = 0, R = 0, U = _, B = 0, P = 0, w = 0, H = 1, V = 1, Y = 1, W = 0, K = "", nt = y, N = p, I = r, G = K; V; )
11085
+ switch (w = W, W = Ae()) {
11086
11086
  // (
11087
11087
  case 40:
11088
- if (w != 108 && te(Y, U - 1) == 58) {
11089
- er(Y += vt(vi(F), "&", "&\f"), "&\f") != -1 && (X = -1);
11088
+ if (w != 108 && te(G, U - 1) == 58) {
11089
+ er(G += gt(vi(W), "&", "&\f"), "&\f") != -1 && (Y = -1);
11090
11090
  break;
11091
11091
  }
11092
11092
  // " ' [
11093
11093
  case 34:
11094
11094
  case 39:
11095
11095
  case 91:
11096
- Y += vi(F);
11096
+ G += vi(W);
11097
11097
  break;
11098
11098
  // \t \n \r \s
11099
11099
  case 9:
11100
11100
  case 10:
11101
11101
  case 13:
11102
11102
  case 32:
11103
- Y += u1(w);
11103
+ G += u1(w);
11104
11104
  break;
11105
11105
  // \
11106
11106
  case 92:
11107
- Y += i1(hi() - 1, 7);
11107
+ G += i1(hi() - 1, 7);
11108
11108
  continue;
11109
11109
  // /
11110
11110
  case 47:
@@ -11114,35 +11114,35 @@ function gi(i, f, o, r, y, p, _, M, A) {
11114
11114
  yi(s1(c1(Ae(), hi()), f, o), A);
11115
11115
  break;
11116
11116
  default:
11117
- Y += "/";
11117
+ G += "/";
11118
11118
  }
11119
11119
  break;
11120
11120
  // {
11121
11121
  case 123 * H:
11122
- M[g++] = we(Y) * X;
11122
+ M[g++] = we(G) * Y;
11123
11123
  // } ; \0
11124
11124
  case 125 * H:
11125
11125
  case 59:
11126
11126
  case 0:
11127
- switch (F) {
11127
+ switch (W) {
11128
11128
  // \0 }
11129
11129
  case 0:
11130
11130
  case 125:
11131
11131
  V = 0;
11132
11132
  // ;
11133
11133
  case 59 + R:
11134
- X == -1 && (Y = vt(Y, /\f/g, "")), P > 0 && we(Y) - U && yi(P > 32 ? C0(Y + ";", r, o, U - 1) : C0(vt(Y, " ", "") + ";", r, o, U - 2), A);
11134
+ Y == -1 && (G = gt(G, /\f/g, "")), P > 0 && we(G) - U && yi(P > 32 ? C0(G + ";", r, o, U - 1) : C0(gt(G, " ", "") + ";", r, o, U - 2), A);
11135
11135
  break;
11136
11136
  // @ ;
11137
11137
  case 59:
11138
- Y += ";";
11138
+ G += ";";
11139
11139
  // { rule/at-rule
11140
11140
  default:
11141
- if (yi(I = O0(Y, f, o, g, R, y, M, K, nt = [], N = [], U), p), F === 123)
11141
+ if (yi(I = O0(G, f, o, g, R, y, M, K, nt = [], N = [], U), p), W === 123)
11142
11142
  if (R === 0)
11143
- gi(Y, f, I, I, nt, p, U, M, N);
11143
+ gi(G, f, I, I, nt, p, U, M, N);
11144
11144
  else
11145
- switch (B === 99 && te(Y, 3) === 110 ? 100 : B) {
11145
+ switch (B === 99 && te(G, 3) === 110 ? 100 : B) {
11146
11146
  // d l m s
11147
11147
  case 100:
11148
11148
  case 108:
@@ -11151,45 +11151,45 @@ function gi(i, f, o, r, y, p, _, M, A) {
11151
11151
  gi(i, I, I, r && yi(O0(i, I, I, 0, 0, y, M, K, y, nt = [], U), N), y, N, U, M, r ? nt : N);
11152
11152
  break;
11153
11153
  default:
11154
- gi(Y, I, I, I, [""], N, 0, M, N);
11154
+ gi(G, I, I, I, [""], N, 0, M, N);
11155
11155
  }
11156
11156
  }
11157
- g = R = P = 0, H = X = 1, K = Y = "", U = _;
11157
+ g = R = P = 0, H = Y = 1, K = G = "", U = _;
11158
11158
  break;
11159
11159
  // :
11160
11160
  case 58:
11161
- U = 1 + we(Y), P = w;
11161
+ U = 1 + we(G), P = w;
11162
11162
  default:
11163
11163
  if (H < 1) {
11164
- if (F == 123)
11164
+ if (W == 123)
11165
11165
  --H;
11166
- else if (F == 125 && H++ == 0 && n1() == 125)
11166
+ else if (W == 125 && H++ == 0 && n1() == 125)
11167
11167
  continue;
11168
11168
  }
11169
- switch (Y += Si(F), F * H) {
11169
+ switch (G += Si(W), W * H) {
11170
11170
  // &
11171
11171
  case 38:
11172
- X = R > 0 ? 1 : (Y += "\f", -1);
11172
+ Y = R > 0 ? 1 : (G += "\f", -1);
11173
11173
  break;
11174
11174
  // ,
11175
11175
  case 44:
11176
- M[g++] = (we(Y) - 1) * X, X = 1;
11176
+ M[g++] = (we(G) - 1) * Y, Y = 1;
11177
11177
  break;
11178
11178
  // @
11179
11179
  case 64:
11180
- Ke() === 45 && (Y += vi(Ae())), B = Ke(), R = U = we(K = Y += f1(hi())), F++;
11180
+ Ke() === 45 && (G += vi(Ae())), B = Ke(), R = U = we(K = G += f1(hi())), W++;
11181
11181
  break;
11182
11182
  // -
11183
11183
  case 45:
11184
- w === 45 && we(Y) == 2 && (H = 0);
11184
+ w === 45 && we(G) == 2 && (H = 0);
11185
11185
  }
11186
11186
  }
11187
11187
  return p;
11188
11188
  }
11189
11189
  function O0(i, f, o, r, y, p, _, M, A, g, R) {
11190
11190
  for (var U = y - 1, B = y === 0 ? p : [""], P = fr(B), w = 0, H = 0, V = 0; w < r; ++w)
11191
- for (var X = 0, F = Zn(i, U + 1, U = Ih(H = _[w])), K = i; X < P; ++X)
11192
- (K = J0(H > 0 ? B[X] + " " + F : vt(F, /&\f/g, B[X]))) && (A[V++] = K);
11191
+ for (var Y = 0, W = Zn(i, U + 1, U = Ih(H = _[w])), K = i; Y < P; ++Y)
11192
+ (K = J0(H > 0 ? B[Y] + " " + W : gt(W, /&\f/g, B[Y]))) && (A[V++] = K);
11193
11193
  return zi(i, f, o, y === 0 ? ir : M, A, g, R);
11194
11194
  }
11195
11195
  function s1(i, f, o) {
@@ -11290,7 +11290,7 @@ function I0(i, f) {
11290
11290
  switch (t1(i, f)) {
11291
11291
  // color-adjust
11292
11292
  case 5103:
11293
- return ht + "print-" + i + i;
11293
+ return vt + "print-" + i + i;
11294
11294
  // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
11295
11295
  case 5737:
11296
11296
  case 4201:
@@ -11320,58 +11320,58 @@ function I0(i, f) {
11320
11320
  case 5365:
11321
11321
  case 5621:
11322
11322
  case 3829:
11323
- return ht + i + i;
11323
+ return vt + i + i;
11324
11324
  // appearance, user-select, transform, hyphens, text-size-adjust
11325
11325
  case 5349:
11326
11326
  case 4246:
11327
11327
  case 4810:
11328
11328
  case 6968:
11329
11329
  case 2756:
11330
- return ht + i + pi + i + le + i + i;
11330
+ return vt + i + pi + i + le + i + i;
11331
11331
  // flex, flex-direction
11332
11332
  case 6828:
11333
11333
  case 4268:
11334
- return ht + i + le + i + i;
11334
+ return vt + i + le + i + i;
11335
11335
  // order
11336
11336
  case 6165:
11337
- return ht + i + le + "flex-" + i + i;
11337
+ return vt + i + le + "flex-" + i + i;
11338
11338
  // align-items
11339
11339
  case 5187:
11340
- return ht + i + vt(i, /(\w+).+(:[^]+)/, ht + "box-$1$2" + le + "flex-$1$2") + i;
11340
+ return vt + i + gt(i, /(\w+).+(:[^]+)/, vt + "box-$1$2" + le + "flex-$1$2") + i;
11341
11341
  // align-self
11342
11342
  case 5443:
11343
- return ht + i + le + "flex-item-" + vt(i, /flex-|-self/, "") + i;
11343
+ return vt + i + le + "flex-item-" + gt(i, /flex-|-self/, "") + i;
11344
11344
  // align-content
11345
11345
  case 4675:
11346
- return ht + i + le + "flex-line-pack" + vt(i, /align-content|flex-|-self/, "") + i;
11346
+ return vt + i + le + "flex-line-pack" + gt(i, /align-content|flex-|-self/, "") + i;
11347
11347
  // flex-shrink
11348
11348
  case 5548:
11349
- return ht + i + le + vt(i, "shrink", "negative") + i;
11349
+ return vt + i + le + gt(i, "shrink", "negative") + i;
11350
11350
  // flex-basis
11351
11351
  case 5292:
11352
- return ht + i + le + vt(i, "basis", "preferred-size") + i;
11352
+ return vt + i + le + gt(i, "basis", "preferred-size") + i;
11353
11353
  // flex-grow
11354
11354
  case 6060:
11355
- return ht + "box-" + vt(i, "-grow", "") + ht + i + le + vt(i, "grow", "positive") + i;
11355
+ return vt + "box-" + gt(i, "-grow", "") + vt + i + le + gt(i, "grow", "positive") + i;
11356
11356
  // transition
11357
11357
  case 4554:
11358
- return ht + vt(i, /([^-])(transform)/g, "$1" + ht + "$2") + i;
11358
+ return vt + gt(i, /([^-])(transform)/g, "$1" + vt + "$2") + i;
11359
11359
  // cursor
11360
11360
  case 6187:
11361
- return vt(vt(vt(i, /(zoom-|grab)/, ht + "$1"), /(image-set)/, ht + "$1"), i, "") + i;
11361
+ return gt(gt(gt(i, /(zoom-|grab)/, vt + "$1"), /(image-set)/, vt + "$1"), i, "") + i;
11362
11362
  // background, background-image
11363
11363
  case 5495:
11364
11364
  case 3959:
11365
- return vt(i, /(image-set\([^]*)/, ht + "$1$`$1");
11365
+ return gt(i, /(image-set\([^]*)/, vt + "$1$`$1");
11366
11366
  // justify-content
11367
11367
  case 4968:
11368
- return vt(vt(i, /(.+:)(flex-)?(.*)/, ht + "box-pack:$3" + le + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + ht + i + i;
11368
+ return gt(gt(i, /(.+:)(flex-)?(.*)/, vt + "box-pack:$3" + le + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + vt + i + i;
11369
11369
  // (margin|padding)-inline-(start|end)
11370
11370
  case 4095:
11371
11371
  case 3583:
11372
11372
  case 4068:
11373
11373
  case 2532:
11374
- return vt(i, /(.+)-inline(.+)/, ht + "$1$2") + i;
11374
+ return gt(i, /(.+)-inline(.+)/, vt + "$1$2") + i;
11375
11375
  // (min|max)?(width|height|inline-size|block-size)
11376
11376
  case 8116:
11377
11377
  case 7059:
@@ -11391,10 +11391,10 @@ function I0(i, f) {
11391
11391
  if (te(i, f + 4) !== 45) break;
11392
11392
  // (f)ill-available, (f)it-content
11393
11393
  case 102:
11394
- return vt(i, /(.+:)(.+)-([^]+)/, "$1" + ht + "$2-$3$1" + pi + (te(i, f + 3) == 108 ? "$3" : "$2-$3")) + i;
11394
+ return gt(i, /(.+:)(.+)-([^]+)/, "$1" + vt + "$2-$3$1" + pi + (te(i, f + 3) == 108 ? "$3" : "$2-$3")) + i;
11395
11395
  // (s)tretch
11396
11396
  case 115:
11397
- return ~er(i, "stretch") ? I0(vt(i, "stretch", "fill-available"), f) + i : i;
11397
+ return ~er(i, "stretch") ? I0(gt(i, "stretch", "fill-available"), f) + i : i;
11398
11398
  }
11399
11399
  break;
11400
11400
  // position: sticky
@@ -11405,10 +11405,10 @@ function I0(i, f) {
11405
11405
  switch (te(i, we(i) - 3 - (~er(i, "!important") && 10))) {
11406
11406
  // stic(k)y
11407
11407
  case 107:
11408
- return vt(i, ":", ":" + ht) + i;
11408
+ return gt(i, ":", ":" + vt) + i;
11409
11409
  // (inline-)?fl(e)x
11410
11410
  case 101:
11411
- return vt(i, /(.+:)([^;!]+)(;|!.+)?/, "$1" + ht + (te(i, 14) === 45 ? "inline-" : "") + "box$3$1" + ht + "$2$3$1" + le + "$2box$3") + i;
11411
+ return gt(i, /(.+:)([^;!]+)(;|!.+)?/, "$1" + vt + (te(i, 14) === 45 ? "inline-" : "") + "box$3$1" + vt + "$2$3$1" + le + "$2box$3") + i;
11412
11412
  }
11413
11413
  break;
11414
11414
  // writing-mode
@@ -11416,15 +11416,15 @@ function I0(i, f) {
11416
11416
  switch (te(i, f + 11)) {
11417
11417
  // vertical-l(r)
11418
11418
  case 114:
11419
- return ht + i + le + vt(i, /[svh]\w+-[tblr]{2}/, "tb") + i;
11419
+ return vt + i + le + gt(i, /[svh]\w+-[tblr]{2}/, "tb") + i;
11420
11420
  // vertical-r(l)
11421
11421
  case 108:
11422
- return ht + i + le + vt(i, /[svh]\w+-[tblr]{2}/, "tb-rl") + i;
11422
+ return vt + i + le + gt(i, /[svh]\w+-[tblr]{2}/, "tb-rl") + i;
11423
11423
  // horizontal(-)tb
11424
11424
  case 45:
11425
- return ht + i + le + vt(i, /[svh]\w+-[tblr]{2}/, "lr") + i;
11425
+ return vt + i + le + gt(i, /[svh]\w+-[tblr]{2}/, "lr") + i;
11426
11426
  }
11427
- return ht + i + le + i + i;
11427
+ return vt + i + le + i + i;
11428
11428
  }
11429
11429
  return i;
11430
11430
  }
@@ -11435,7 +11435,7 @@ var b1 = function(f, o, r, y) {
11435
11435
  break;
11436
11436
  case K0:
11437
11437
  return La([Ln(f, {
11438
- value: vt(f.value, "@", "@" + ht)
11438
+ value: gt(f.value, "@", "@" + vt)
11439
11439
  })], y);
11440
11440
  case ir:
11441
11441
  if (f.length) return l1(f.props, function(p) {
@@ -11444,16 +11444,16 @@ var b1 = function(f, o, r, y) {
11444
11444
  case ":read-only":
11445
11445
  case ":read-write":
11446
11446
  return La([Ln(f, {
11447
- props: [vt(p, /:(read-\w+)/, ":" + pi + "$1")]
11447
+ props: [gt(p, /:(read-\w+)/, ":" + pi + "$1")]
11448
11448
  })], y);
11449
11449
  // :placeholder
11450
11450
  case "::placeholder":
11451
11451
  return La([Ln(f, {
11452
- props: [vt(p, /:(plac\w+)/, ":" + ht + "input-$1")]
11452
+ props: [gt(p, /:(plac\w+)/, ":" + vt + "input-$1")]
11453
11453
  }), Ln(f, {
11454
- props: [vt(p, /:(plac\w+)/, ":" + pi + "$1")]
11454
+ props: [gt(p, /:(plac\w+)/, ":" + pi + "$1")]
11455
11455
  }), Ln(f, {
11456
- props: [vt(p, /:(plac\w+)/, le + "input-$1")]
11456
+ props: [gt(p, /:(plac\w+)/, le + "input-$1")]
11457
11457
  })], y);
11458
11458
  }
11459
11459
  return "";
@@ -11474,8 +11474,8 @@ var b1 = function(f, o, r, y) {
11474
11474
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
11475
11475
  document.querySelectorAll('style[data-emotion^="' + o + ' "]'),
11476
11476
  function(H) {
11477
- for (var V = H.getAttribute("data-emotion").split(" "), X = 1; X < V.length; X++)
11478
- p[V[X]] = !0;
11477
+ for (var V = H.getAttribute("data-emotion").split(" "), Y = 1; Y < V.length; Y++)
11478
+ p[V[Y]] = !0;
11479
11479
  M.push(H);
11480
11480
  }
11481
11481
  );
@@ -11486,8 +11486,8 @@ var b1 = function(f, o, r, y) {
11486
11486
  })], B = d1(g.concat(y, U)), P = function(V) {
11487
11487
  return La(r1(V), B);
11488
11488
  };
11489
- A = function(V, X, F, K) {
11490
- R = F, P(V ? V + "{" + X.styles + "}" : X.styles), K && (w.inserted[X.name] = !0);
11489
+ A = function(V, Y, W, K) {
11490
+ R = W, P(V ? V + "{" + Y.styles + "}" : Y.styles), K && (w.inserted[Y.name] = !0);
11491
11491
  };
11492
11492
  }
11493
11493
  var w = {
@@ -11511,7 +11511,7 @@ var U0;
11511
11511
  function z1() {
11512
11512
  if (U0) return bt;
11513
11513
  U0 = 1;
11514
- var i = typeof Symbol == "function" && Symbol.for, f = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, y = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, p = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, _ = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, M = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, A = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, R = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, U = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, B = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, H = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, V = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, X = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, F = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
11514
+ var i = typeof Symbol == "function" && Symbol.for, f = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, y = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, p = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, _ = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, M = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, A = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, R = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, U = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, B = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, H = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, V = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, Y = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
11515
11515
  function K(N) {
11516
11516
  if (typeof N == "object" && N !== null) {
11517
11517
  var I = N.$$typeof;
@@ -11570,7 +11570,7 @@ function z1() {
11570
11570
  }, bt.isSuspense = function(N) {
11571
11571
  return K(N) === U;
11572
11572
  }, bt.isValidElementType = function(N) {
11573
- return typeof N == "string" || typeof N == "function" || N === r || N === g || N === p || N === y || N === U || N === B || typeof N == "object" && N !== null && (N.$$typeof === w || N.$$typeof === P || N.$$typeof === _ || N.$$typeof === M || N.$$typeof === R || N.$$typeof === V || N.$$typeof === X || N.$$typeof === F || N.$$typeof === H);
11573
+ return typeof N == "string" || typeof N == "function" || N === r || N === g || N === p || N === y || N === U || N === B || typeof N == "object" && N !== null && (N.$$typeof === w || N.$$typeof === P || N.$$typeof === _ || N.$$typeof === M || N.$$typeof === R || N.$$typeof === V || N.$$typeof === Y || N.$$typeof === W || N.$$typeof === H);
11574
11574
  }, bt.typeOf = K, bt;
11575
11575
  }
11576
11576
  var R0;
@@ -11623,17 +11623,17 @@ function A1() {
11623
11623
  function P(w, H, V) {
11624
11624
  if (typeof H != "string") {
11625
11625
  if (B) {
11626
- var X = U(H);
11627
- X && X !== B && P(w, X, V);
11626
+ var Y = U(H);
11627
+ Y && Y !== B && P(w, Y, V);
11628
11628
  }
11629
- var F = A(H);
11630
- g && (F = F.concat(g(H)));
11631
- for (var K = _(w), nt = _(H), N = 0; N < F.length; ++N) {
11632
- var I = F[N];
11629
+ var W = A(H);
11630
+ g && (W = W.concat(g(H)));
11631
+ for (var K = _(w), nt = _(H), N = 0; N < W.length; ++N) {
11632
+ var I = W[N];
11633
11633
  if (!o[I] && !(V && V[I]) && !(nt && nt[I]) && !(K && K[I])) {
11634
- var Y = R(H, I);
11634
+ var G = R(H, I);
11635
11635
  try {
11636
- M(w, I, Y);
11636
+ M(w, I, G);
11637
11637
  } catch {
11638
11638
  }
11639
11639
  }
@@ -11867,7 +11867,7 @@ function Ei(i, f, o) {
11867
11867
  }
11868
11868
  var U1 = function(f) {
11869
11869
  return f();
11870
- }, ey = _0.useInsertionEffect ? _0.useInsertionEffect : !1, ly = ey || U1, B0 = ey || G.useLayoutEffect, ay = /* @__PURE__ */ G.createContext(
11870
+ }, ey = _0.useInsertionEffect ? _0.useInsertionEffect : !1, ly = ey || U1, B0 = ey || X.useLayoutEffect, ay = /* @__PURE__ */ X.createContext(
11871
11871
  // we're doing this to avoid preconstruct's dead code elimination in this one case
11872
11872
  // because this module is primarily intended for the browser and node
11873
11873
  // but it's also required in react native and similar environments sometimes
@@ -11880,11 +11880,11 @@ var U1 = function(f) {
11880
11880
  );
11881
11881
  ay.Provider;
11882
11882
  var or = function(f) {
11883
- return /* @__PURE__ */ G.forwardRef(function(o, r) {
11884
- var y = G.useContext(ay);
11883
+ return /* @__PURE__ */ X.forwardRef(function(o, r) {
11884
+ var y = X.useContext(ay);
11885
11885
  return f(o, y, r);
11886
11886
  });
11887
- }, dr = /* @__PURE__ */ G.createContext({}), yr = {}.hasOwnProperty, ar = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", R1 = function(f, o) {
11887
+ }, dr = /* @__PURE__ */ X.createContext({}), yr = {}.hasOwnProperty, ar = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", R1 = function(f, o) {
11888
11888
  var r = {};
11889
11889
  for (var y in o)
11890
11890
  yr.call(o, y) && (r[y] = o[y]);
@@ -11899,32 +11899,32 @@ var or = function(f) {
11899
11899
  typeof r == "string" && f.registered[r] !== void 0 && (r = f.registered[r]);
11900
11900
  var y = i[ar], p = [r], _ = "";
11901
11901
  typeof i.className == "string" ? _ = P0(f.registered, p, i.className) : i.className != null && (_ = i.className + " ");
11902
- var M = Ei(p, void 0, G.useContext(dr));
11902
+ var M = Ei(p, void 0, X.useContext(dr));
11903
11903
  _ += f.key + "-" + M.name;
11904
11904
  var A = {};
11905
11905
  for (var g in i)
11906
11906
  yr.call(i, g) && g !== "css" && g !== ar && (A[g] = i[g]);
11907
- return A.className = _, o && (A.ref = o), /* @__PURE__ */ G.createElement(G.Fragment, null, /* @__PURE__ */ G.createElement(N1, {
11907
+ return A.className = _, o && (A.ref = o), /* @__PURE__ */ X.createElement(X.Fragment, null, /* @__PURE__ */ X.createElement(N1, {
11908
11908
  cache: f,
11909
11909
  serialized: M,
11910
11910
  isStringTag: typeof y == "string"
11911
- }), /* @__PURE__ */ G.createElement(y, A));
11911
+ }), /* @__PURE__ */ X.createElement(y, A));
11912
11912
  }), j1 = H1, Y0 = function(f, o) {
11913
11913
  var r = arguments;
11914
11914
  if (o == null || !yr.call(o, "css"))
11915
- return G.createElement.apply(void 0, r);
11915
+ return X.createElement.apply(void 0, r);
11916
11916
  var y = r.length, p = new Array(y);
11917
11917
  p[0] = j1, p[1] = R1(f, o);
11918
11918
  for (var _ = 2; _ < y; _++)
11919
11919
  p[_] = r[_];
11920
- return G.createElement.apply(null, p);
11920
+ return X.createElement.apply(null, p);
11921
11921
  };
11922
11922
  (function(i) {
11923
11923
  var f;
11924
11924
  f || (f = i.JSX || (i.JSX = {}));
11925
11925
  })(Y0 || (Y0 = {}));
11926
11926
  var q1 = /* @__PURE__ */ or(function(i, f) {
11927
- var o = i.styles, r = Ei([o], void 0, G.useContext(dr)), y = G.useRef();
11927
+ var o = i.styles, r = Ei([o], void 0, X.useContext(dr)), y = X.useRef();
11928
11928
  return B0(function() {
11929
11929
  var p = f.key + "-global", _ = new f.sheet.constructor({
11930
11930
  key: p,
@@ -12004,35 +12004,35 @@ var B1 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
12004
12004
  for (var P = R.length, w = 1; w < P; w++)
12005
12005
  U.push(R[w], B[w]);
12006
12006
  }
12007
- var H = or(function(V, X, F) {
12007
+ var H = or(function(V, Y, W) {
12008
12008
  var K = g && V.as || y, nt = "", N = [], I = V;
12009
12009
  if (V.theme == null) {
12010
12010
  I = {};
12011
- for (var Y in V)
12012
- I[Y] = V[Y];
12013
- I.theme = G.useContext(dr);
12011
+ for (var G in V)
12012
+ I[G] = V[G];
12013
+ I.theme = X.useContext(dr);
12014
12014
  }
12015
- typeof V.className == "string" ? nt = P0(X.registered, N, V.className) : V.className != null && (nt = V.className + " ");
12016
- var Gt = Ei(U.concat(N), X.registered, I);
12017
- nt += X.key + "-" + Gt.name, _ !== void 0 && (nt += " " + _);
12015
+ typeof V.className == "string" ? nt = P0(Y.registered, N, V.className) : V.className != null && (nt = V.className + " ");
12016
+ var Gt = Ei(U.concat(N), Y.registered, I);
12017
+ nt += Y.key + "-" + Gt.name, _ !== void 0 && (nt += " " + _);
12018
12018
  var ue = g && M === void 0 ? G0(K) : A, Vt = {};
12019
12019
  for (var zt in V)
12020
12020
  g && zt === "as" || ue(zt) && (Vt[zt] = V[zt]);
12021
- return Vt.className = nt, F && (Vt.ref = F), /* @__PURE__ */ G.createElement(G.Fragment, null, /* @__PURE__ */ G.createElement(Q1, {
12022
- cache: X,
12021
+ return Vt.className = nt, W && (Vt.ref = W), /* @__PURE__ */ X.createElement(X.Fragment, null, /* @__PURE__ */ X.createElement(Q1, {
12022
+ cache: Y,
12023
12023
  serialized: Gt,
12024
12024
  isStringTag: typeof K == "string"
12025
- }), /* @__PURE__ */ G.createElement(K, Vt));
12025
+ }), /* @__PURE__ */ X.createElement(K, Vt));
12026
12026
  });
12027
12027
  return H.displayName = p !== void 0 ? p : "Styled(" + (typeof y == "string" ? y : y.displayName || y.name || "Component") + ")", H.defaultProps = f.defaultProps, H.__emotion_real = H, H.__emotion_base = y, H.__emotion_styles = U, H.__emotion_forwardProp = M, Object.defineProperty(H, "toString", {
12028
12028
  value: function() {
12029
12029
  return "." + _;
12030
12030
  }
12031
- }), H.withComponent = function(V, X) {
12032
- var F = i(V, tr({}, o, X, {
12033
- shouldForwardProp: X0(H, X, !0)
12031
+ }), H.withComponent = function(V, Y) {
12032
+ var W = i(V, tr({}, o, Y, {
12033
+ shouldForwardProp: X0(H, Y, !0)
12034
12034
  }));
12035
- return F.apply(void 0, U);
12035
+ return W.apply(void 0, U);
12036
12036
  }, H;
12037
12037
  };
12038
12038
  }, Z1 = [
@@ -12202,7 +12202,7 @@ const J1 = (i) => {
12202
12202
  return !0;
12203
12203
  return !1;
12204
12204
  };
12205
- const $1 = G.forwardRef(
12205
+ const $1 = X.forwardRef(
12206
12206
  ({
12207
12207
  color: i = "currentColor",
12208
12208
  size: f = 24,
@@ -12212,7 +12212,7 @@ const $1 = G.forwardRef(
12212
12212
  children: p,
12213
12213
  iconNode: _,
12214
12214
  ...M
12215
- }, A) => G.createElement(
12215
+ }, A) => X.createElement(
12216
12216
  "svg",
12217
12217
  {
12218
12218
  ref: A,
@@ -12226,14 +12226,14 @@ const $1 = G.forwardRef(
12226
12226
  ...M
12227
12227
  },
12228
12228
  [
12229
- ..._.map(([g, R]) => G.createElement(g, R)),
12229
+ ..._.map(([g, R]) => X.createElement(g, R)),
12230
12230
  ...Array.isArray(p) ? p : [p]
12231
12231
  ]
12232
12232
  )
12233
12233
  );
12234
12234
  const Je = (i, f) => {
12235
- const o = G.forwardRef(
12236
- ({ className: r, ...y }, p) => G.createElement($1, {
12235
+ const o = X.forwardRef(
12236
+ ({ className: r, ...y }, p) => X.createElement($1, {
12237
12237
  ref: p,
12238
12238
  iconNode: f,
12239
12239
  className: ny(
@@ -12309,7 +12309,7 @@ const yv = [
12309
12309
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
12310
12310
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
12311
12311
  ], mv = Je("user", yv), Va = () => {
12312
- const i = G.useContext(w0);
12312
+ const i = X.useContext(w0);
12313
12313
  if (!i)
12314
12314
  throw new Error("useChat must be used within a ChatProvider");
12315
12315
  return i;
@@ -12637,10 +12637,10 @@ const yv = [
12637
12637
  return "Analyzing";
12638
12638
  }
12639
12639
  }, Lv = ({ theme: i, status: f }) => {
12640
- const o = Qv(f), [r, y] = G.useState(""), [p, _] = G.useState(!1), M = G.useRef(o), A = G.useRef(null);
12641
- return G.useEffect(() => {
12640
+ const o = Qv(f), [r, y] = X.useState(""), [p, _] = X.useState(!1), M = X.useRef(o), A = X.useRef(null);
12641
+ return X.useEffect(() => {
12642
12642
  A.current && clearTimeout(A.current), (o !== M.current || r === "") && (M.current = o, y(""), _(!0));
12643
- }, [o]), G.useEffect(() => {
12643
+ }, [o]), X.useEffect(() => {
12644
12644
  if (!p) return;
12645
12645
  const g = M.current;
12646
12646
  return r.length < g.length ? A.current = setTimeout(() => {
@@ -12691,32 +12691,32 @@ const yv = [
12691
12691
  text-align: center;
12692
12692
  padding: 20px;
12693
12693
  `, Vv = () => {
12694
- const { messages: i, isTyping: f, streamingStatus: o, theme: r } = Va(), y = G.useRef(null);
12695
- return G.useEffect(() => {
12694
+ const { messages: i, isTyping: f, streamingStatus: o, theme: r } = Va(), y = X.useRef(null);
12695
+ return X.useEffect(() => {
12696
12696
  y.current && (y.current.scrollTop = y.current.scrollHeight);
12697
12697
  }, [i, f]), /* @__PURE__ */ k.jsx(Zv, { ref: y, fontFamily: r.fontFamily, children: i.length === 0 && !f ? /* @__PURE__ */ k.jsx(wv, { color: r.colors.textLight, children: "Send a message to start the conversation" }) : /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
12698
12698
  i.map((p) => /* @__PURE__ */ k.jsx(jv, { message: p, theme: r }, p.id)),
12699
12699
  f && /* @__PURE__ */ k.jsx(Lv, { theme: r, status: o })
12700
12700
  ] }) });
12701
12701
  }, Kv = (i = {}) => {
12702
- const { onTranscript: f, onError: o, language: r = "en-US" } = i, [y, p] = G.useState(!1), [_, M] = G.useState(""), [A, g] = G.useState(!1), R = G.useRef(null);
12703
- G.useEffect(() => {
12702
+ const { onTranscript: f, onError: o, language: r = "en-US" } = i, [y, p] = X.useState(!1), [_, M] = X.useState(""), [A, g] = X.useState(!1), R = X.useRef(null);
12703
+ X.useEffect(() => {
12704
12704
  const H = window.SpeechRecognition || window.webkitSpeechRecognition;
12705
12705
  return H && (g(!0), R.current = new H(), R.current.continuous = !0, R.current.interimResults = !0, R.current.lang = r), () => {
12706
12706
  R.current && R.current.abort();
12707
12707
  };
12708
12708
  }, [r]);
12709
- const U = G.useCallback(() => {
12709
+ const U = X.useCallback(() => {
12710
12710
  if (!(!R.current || y)) {
12711
12711
  M(""), R.current.onstart = () => {
12712
12712
  p(!0);
12713
12713
  }, R.current.onresult = (H) => {
12714
- let V = "", X = "";
12714
+ let V = "", Y = "";
12715
12715
  for (let K = H.resultIndex; K < H.results.length; K++) {
12716
12716
  const nt = H.results[K];
12717
- nt.isFinal ? V += nt[0].transcript : X += nt[0].transcript;
12717
+ nt.isFinal ? V += nt[0].transcript : Y += nt[0].transcript;
12718
12718
  }
12719
- M(V || X), V && f && f(V);
12719
+ M(V || Y), V && f && f(V);
12720
12720
  }, R.current.onerror = (H) => {
12721
12721
  p(!1), o && o(H.error);
12722
12722
  }, R.current.onend = () => {
@@ -12728,11 +12728,11 @@ const yv = [
12728
12728
  o && o("Failed to start recording");
12729
12729
  }
12730
12730
  }
12731
- }, [y, f, o]), B = G.useCallback(() => {
12731
+ }, [y, f, o]), B = X.useCallback(() => {
12732
12732
  R.current && y && (R.current.stop(), p(!1));
12733
- }, [y]), P = G.useCallback(() => {
12733
+ }, [y]), P = X.useCallback(() => {
12734
12734
  y ? B() : U();
12735
- }, [y, U, B]), w = G.useCallback(() => {
12735
+ }, [y, U, B]), w = X.useCallback(() => {
12736
12736
  M("");
12737
12737
  }, []);
12738
12738
  return {
@@ -12829,22 +12829,22 @@ const yv = [
12829
12829
  transform: scale(0.95);
12830
12830
  }
12831
12831
  `, Iv = () => {
12832
- const { sendMessage: i, isTyping: f, config: o, theme: r } = Va(), [y, p] = G.useState(""), { isRecording: _, isSupported: M, transcript: A, toggleRecording: g, clearTranscript: R } = Kv({
12832
+ const { sendMessage: i, isTyping: f, config: o, theme: r } = Va(), [y, p] = X.useState(""), { isRecording: _, isSupported: M, transcript: A, toggleRecording: g, clearTranscript: R } = Kv({
12833
12833
  onError: (H) => {
12834
12834
  console.error("Voice recording error:", H);
12835
12835
  }
12836
12836
  });
12837
- G.useEffect(() => {
12837
+ X.useEffect(() => {
12838
12838
  A && p(A);
12839
12839
  }, [A]);
12840
- const U = G.useCallback(() => {
12840
+ const U = X.useCallback(() => {
12841
12841
  y.trim() && !f && (i(y), p(""), R());
12842
- }, [y, f, i, R]), B = G.useCallback(
12842
+ }, [y, f, i, R]), B = X.useCallback(
12843
12843
  (H) => {
12844
12844
  H.key === "Enter" && !H.shiftKey && (H.preventDefault(), U());
12845
12845
  },
12846
12846
  [U]
12847
- ), P = G.useCallback(() => {
12847
+ ), P = X.useCallback(() => {
12848
12848
  g();
12849
12849
  }, [g]), w = f || !y.trim();
12850
12850
  return /* @__PURE__ */ k.jsxs(Jv, { theme: r, children: [
@@ -13048,7 +13048,7 @@ const dl = {
13048
13048
  onMount: i
13049
13049
  }) => {
13050
13050
  const { open: f, close: o, toggle: r } = Va();
13051
- return G.useEffect(() => {
13051
+ return X.useEffect(() => {
13052
13052
  i({ open: f, close: o, toggle: r });
13053
13053
  }, [f, o, r, i]), /* @__PURE__ */ k.jsx(ig, {});
13054
13054
  }, sg = {