react-pro-messenger 1.1.0 → 1.1.2

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
@@ -1,8 +1,8 @@
1
1
  var ka = Object.defineProperty;
2
2
  var _a = (e, t, n) => t in e ? ka(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var be = (e, t, n) => (_a(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var ye = (e, t, n) => (_a(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import * as sr from "react";
5
- import Re, { useCallback as on, createContext as mt, useRef as Se, useId as or, useContext as Ce, useInsertionEffect as ks, useMemo as tt, useEffect as He, Children as Ia, isValidElement as Na, useLayoutEffect as Fa, useState as ye, forwardRef as Nt, Fragment as _s, createElement as Ba, Component as $a } from "react";
5
+ import Re, { useCallback as on, createContext as mt, useRef as Se, useId as or, useContext as Ce, useInsertionEffect as ks, useMemo as tt, useEffect as He, Children as Ia, isValidElement as Na, useLayoutEffect as Fa, useState as ve, forwardRef as Nt, Fragment as _s, createElement as Ba, Component as $a } from "react";
6
6
  import Ua from "react-dom";
7
7
  var p = { exports: {} }, bt = {};
8
8
  var oi;
@@ -64,7 +64,7 @@ function za() {
64
64
  var X = S.displayName || S.name || "";
65
65
  return X !== "" ? A + "(" + X + ")" : A;
66
66
  }
67
- function le(d) {
67
+ function ie(d) {
68
68
  return d.displayName || "Context";
69
69
  }
70
70
  function U(d) {
@@ -92,10 +92,10 @@ function za() {
92
92
  switch (d.$$typeof) {
93
93
  case a:
94
94
  var S = d;
95
- return le(S) + ".Consumer";
95
+ return ie(S) + ".Consumer";
96
96
  case o:
97
97
  var A = d;
98
- return le(A._context) + ".Provider";
98
+ return ie(A._context) + ".Provider";
99
99
  case l:
100
100
  return H(d, d.render, "ForwardRef");
101
101
  case f:
@@ -112,14 +112,14 @@ function za() {
112
112
  }
113
113
  return null;
114
114
  }
115
- var ie = Object.assign, pe = 0, he, q, se, me, b, w, F;
115
+ var se = Object.assign, pe = 0, he, q, oe, me, b, w, F;
116
116
  function B() {
117
117
  }
118
118
  B.__reactDisabledLog = !0;
119
119
  function _() {
120
120
  {
121
121
  if (pe === 0) {
122
- he = console.log, q = console.info, se = console.warn, me = console.error, b = console.group, w = console.groupCollapsed, F = console.groupEnd;
122
+ he = console.log, q = console.info, oe = console.warn, me = console.error, b = console.group, w = console.groupCollapsed, F = console.groupEnd;
123
123
  var d = {
124
124
  configurable: !0,
125
125
  enumerable: !0,
@@ -148,25 +148,25 @@ function za() {
148
148
  writable: !0
149
149
  };
150
150
  Object.defineProperties(console, {
151
- log: ie({}, d, {
151
+ log: se({}, d, {
152
152
  value: he
153
153
  }),
154
- info: ie({}, d, {
154
+ info: se({}, d, {
155
155
  value: q
156
156
  }),
157
- warn: ie({}, d, {
158
- value: se
157
+ warn: se({}, d, {
158
+ value: oe
159
159
  }),
160
- error: ie({}, d, {
160
+ error: se({}, d, {
161
161
  value: me
162
162
  }),
163
- group: ie({}, d, {
163
+ group: se({}, d, {
164
164
  value: b
165
165
  }),
166
- groupCollapsed: ie({}, d, {
166
+ groupCollapsed: se({}, d, {
167
167
  value: w
168
168
  }),
169
- groupEnd: ie({}, d, {
169
+ groupEnd: se({}, d, {
170
170
  value: F
171
171
  })
172
172
  });
@@ -300,7 +300,7 @@ function za() {
300
300
  }
301
301
  return "";
302
302
  }
303
- var xe = Object.prototype.hasOwnProperty, rt = {}, Wt = x.ReactDebugCurrentFrame;
303
+ var be = Object.prototype.hasOwnProperty, rt = {}, Wt = x.ReactDebugCurrentFrame;
304
304
  function qe(d) {
305
305
  if (d) {
306
306
  var S = d._owner, A = ge(d.type, d._source, S ? S.type : null);
@@ -310,7 +310,7 @@ function za() {
310
310
  }
311
311
  function $e(d, S, A, N, X) {
312
312
  {
313
- var ne = Function.call.bind(xe);
313
+ var ne = Function.call.bind(be);
314
314
  for (var G in d)
315
315
  if (ne(d, G)) {
316
316
  var K = void 0;
@@ -359,7 +359,7 @@ function za() {
359
359
  }, Zr, Jr, pn;
360
360
  pn = {};
361
361
  function ba(d) {
362
- if (xe.call(d, "ref")) {
362
+ if (be.call(d, "ref")) {
363
363
  var S = Object.getOwnPropertyDescriptor(d, "ref").get;
364
364
  if (S && S.isReactWarning)
365
365
  return !1;
@@ -367,7 +367,7 @@ function za() {
367
367
  return d.ref !== void 0;
368
368
  }
369
369
  function wa(d) {
370
- if (xe.call(d, "key")) {
370
+ if (be.call(d, "key")) {
371
371
  var S = Object.getOwnPropertyDescriptor(d, "key").get;
372
372
  if (S && S.isReactWarning)
373
373
  return !1;
@@ -433,7 +433,7 @@ function za() {
433
433
  var ne, G = {}, K = null, Ee = null;
434
434
  A !== void 0 && (Xr(A), K = "" + A), wa(S) && (Xr(S.key), K = "" + S.key), ba(S) && (Ee = S.ref, Ta(S, X));
435
435
  for (ne in S)
436
- xe.call(S, ne) && !xa.hasOwnProperty(ne) && (G[ne] = S[ne]);
436
+ be.call(S, ne) && !xa.hasOwnProperty(ne) && (G[ne] = S[ne]);
437
437
  if (d && d.defaultProps) {
438
438
  var ue = d.defaultProps;
439
439
  for (ne in ue)
@@ -638,40 +638,42 @@ class Gt {
638
638
  constructor({
639
639
  id: t,
640
640
  text: n,
641
- createdDate: r,
642
- attachmentUrl: i,
643
- attachmentType: s,
644
- attachmentFormat: o,
645
- attachmentBlob: a,
646
- attachmentName: l,
647
- attachmentSize: c,
648
- user: u,
649
- isRightSided: f,
650
- symbols: h,
651
- isSending: m,
652
- isEdited: y
641
+ htmlContent: r,
642
+ createdDate: i,
643
+ attachmentUrl: s,
644
+ attachmentType: o,
645
+ attachmentFormat: a,
646
+ attachmentBlob: l,
647
+ attachmentName: c,
648
+ attachmentSize: u,
649
+ user: f,
650
+ isRightSided: h,
651
+ symbols: m,
652
+ isSending: y,
653
+ isEdited: v
653
654
  }) {
654
- be(this, "id", "0");
655
- be(this, "text", "");
656
- be(this, "createdDate", "");
657
- be(this, "attachmentUrl", "");
658
- be(this, "attachmentBlob");
659
- be(this, "attachmentType");
660
- be(this, "attachmentFormat", "");
661
- be(this, "attachmentName", "");
662
- be(this, "attachmentSize", 0);
663
- be(this, "user", { id: "" });
664
- be(this, "isRightSided", !1);
665
- be(this, "symbols");
666
- be(this, "isSending");
667
- be(this, "isEdited");
668
- be(this, "updateId", (t) => {
655
+ ye(this, "id", "0");
656
+ ye(this, "text", "");
657
+ ye(this, "htmlContent", "");
658
+ ye(this, "createdDate", "");
659
+ ye(this, "attachmentUrl", "");
660
+ ye(this, "attachmentBlob");
661
+ ye(this, "attachmentType");
662
+ ye(this, "attachmentFormat", "");
663
+ ye(this, "attachmentName", "");
664
+ ye(this, "attachmentSize", 0);
665
+ ye(this, "user", { id: "" });
666
+ ye(this, "isRightSided", !1);
667
+ ye(this, "symbols");
668
+ ye(this, "isSending");
669
+ ye(this, "isEdited");
670
+ ye(this, "updateId", (t) => {
669
671
  this.id = t;
670
672
  });
671
- be(this, "updateIsSending", (t) => {
673
+ ye(this, "updateIsSending", (t) => {
672
674
  this.isSending = t;
673
675
  });
674
- this.id = t, this.text = n, this.createdDate = r, this.attachmentUrl = i, this.attachmentType = s, this.attachmentFormat = o, this.attachmentBlob = a, this.attachmentName = l, this.attachmentSize = c, this.user = u, this.isRightSided = f, this.symbols = h, this.isSending = m, this.isEdited = y;
676
+ this.id = t, this.text = n, this.htmlContent = r, this.createdDate = i, this.attachmentUrl = s, this.attachmentType = o, this.attachmentFormat = a, this.attachmentBlob = l, this.attachmentName = c, this.attachmentSize = u, this.user = f, this.isRightSided = h, this.symbols = m, this.isSending = y, this.isEdited = v;
675
677
  }
676
678
  }
677
679
  const ar = mt({});
@@ -774,7 +776,7 @@ function li(e) {
774
776
  }), t;
775
777
  }
776
778
  const ur = typeof window < "u", Ns = ur ? Fa : He, Fs = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: s = "sync", propagate: o = !1, anchorX: a = "left" }) => {
777
- const [l, c] = Is(o), u = tt(() => li(e), [e]), f = o && !l ? [] : u.map(zt), h = Se(!0), m = Se(u), y = lr(() => /* @__PURE__ */ new Map()), [v, T] = ye(u), [x, C] = ye(u);
779
+ const [l, c] = Is(o), u = tt(() => li(e), [e]), f = o && !l ? [] : u.map(zt), h = Se(!0), m = Se(u), y = lr(() => /* @__PURE__ */ new Map()), [v, T] = ve(u), [x, C] = ve(u);
778
780
  Ns(() => {
779
781
  h.current = !1, m.current = u;
780
782
  for (let g = 0; g < x.length; g++) {
@@ -2399,7 +2401,7 @@ const jt = {
2399
2401
  layout: 0,
2400
2402
  mainThread: 0,
2401
2403
  waapi: 0
2402
- }, ae = (e, t, n) => e + (t - e) * n;
2404
+ }, le = (e, t, n) => e + (t - e) * n;
2403
2405
  function wn(e, t, n) {
2404
2406
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
2405
2407
  }
@@ -2438,13 +2440,13 @@ const Ai = (e, t) => {
2438
2440
  if (!n || !r)
2439
2441
  return tn(e, t);
2440
2442
  const i = { ...n };
2441
- return (s) => (i.red = Tn(n.red, r.red, s), i.green = Tn(n.green, r.green, s), i.blue = Tn(n.blue, r.blue, s), i.alpha = ae(n.alpha, r.alpha, s), Qe.transform(i));
2443
+ return (s) => (i.red = Tn(n.red, r.red, s), i.green = Tn(n.green, r.green, s), i.blue = Tn(n.blue, r.blue, s), i.alpha = le(n.alpha, r.alpha, s), Qe.transform(i));
2442
2444
  }, Uc = (e, t) => (n) => t(e(n)), $t = (...e) => e.reduce(Uc), Hn = /* @__PURE__ */ new Set(["none", "hidden"]);
2443
2445
  function Wc(e, t) {
2444
2446
  return Hn.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
2445
2447
  }
2446
2448
  function zc(e, t) {
2447
- return (n) => ae(e, t, n);
2449
+ return (n) => le(e, t, n);
2448
2450
  }
2449
2451
  function Fr(e) {
2450
2452
  return typeof e == "number" ? zc : typeof e == "string" ? yr(e) ? tn : Te.test(e) ? Ai : Hc : Array.isArray(e) ? Fo : typeof e == "object" ? Te.test(e) ? Ai : Yc : tn;
@@ -2481,14 +2483,14 @@ const Hc = (e, t) => {
2481
2483
  return r.indexes.var.length === i.indexes.var.length && r.indexes.color.length === i.indexes.color.length && r.indexes.number.length >= i.indexes.number.length ? Hn.has(e) && !i.values.length || Hn.has(t) && !r.values.length ? Wc(e, t) : $t(Fo(Kc(r, i), i.values), n) : (gt(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), tn(e, t));
2482
2484
  };
2483
2485
  function Bo(e, t, n) {
2484
- return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ae(e, t, n) : Fr(e)(e, t);
2486
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? le(e, t, n) : Fr(e)(e, t);
2485
2487
  }
2486
2488
  const Gc = 5;
2487
2489
  function $o(e, t, n) {
2488
2490
  const r = Math.max(t - Gc, 0);
2489
2491
  return po(n - e(r), t - r);
2490
2492
  }
2491
- const oe = {
2493
+ const ae = {
2492
2494
  stiffness: 100,
2493
2495
  damping: 10,
2494
2496
  mass: 1,
@@ -2509,11 +2511,11 @@ const oe = {
2509
2511
  minDamping: 0.05,
2510
2512
  maxDamping: 1
2511
2513
  }, Sn = 1e-3;
2512
- function qc({ duration: e = oe.duration, bounce: t = oe.bounce, velocity: n = oe.velocity, mass: r = oe.mass }) {
2514
+ function qc({ duration: e = ae.duration, bounce: t = ae.bounce, velocity: n = ae.velocity, mass: r = ae.mass }) {
2513
2515
  let i, s;
2514
- gt(e <= Oe(oe.maxDuration), "Spring duration must be 10 seconds or less");
2516
+ gt(e <= Oe(ae.maxDuration), "Spring duration must be 10 seconds or less");
2515
2517
  let o = 1 - t;
2516
- o = Be(oe.minDamping, oe.maxDamping, o), e = Be(oe.minDuration, oe.maxDuration, Fe(e)), o < 1 ? (i = (c) => {
2518
+ o = Be(ae.minDamping, ae.maxDamping, o), e = Be(ae.minDuration, ae.maxDuration, Fe(e)), o < 1 ? (i = (c) => {
2517
2519
  const u = c * o, f = u * e, h = u - n, m = Gn(c, o), y = Math.exp(-f);
2518
2520
  return Sn - h / m * y;
2519
2521
  }, s = (c) => {
@@ -2529,8 +2531,8 @@ function qc({ duration: e = oe.duration, bounce: t = oe.bounce, velocity: n = oe
2529
2531
  const a = 5 / e, l = Zc(i, s, a);
2530
2532
  if (e = Oe(e), isNaN(l))
2531
2533
  return {
2532
- stiffness: oe.stiffness,
2533
- damping: oe.damping,
2534
+ stiffness: ae.stiffness,
2535
+ damping: ae.damping,
2534
2536
  duration: e
2535
2537
  };
2536
2538
  {
@@ -2558,10 +2560,10 @@ function Mi(e, t) {
2558
2560
  }
2559
2561
  function eu(e) {
2560
2562
  let t = {
2561
- velocity: oe.velocity,
2562
- stiffness: oe.stiffness,
2563
- damping: oe.damping,
2564
- mass: oe.mass,
2563
+ velocity: ae.velocity,
2564
+ stiffness: ae.stiffness,
2565
+ damping: ae.damping,
2566
+ mass: ae.mass,
2565
2567
  isResolvedFromDuration: !1,
2566
2568
  ...e
2567
2569
  };
@@ -2570,7 +2572,7 @@ function eu(e) {
2570
2572
  const n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), i = r * r, s = 2 * Be(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
2571
2573
  t = {
2572
2574
  ...t,
2573
- mass: oe.mass,
2575
+ mass: ae.mass,
2574
2576
  stiffness: i,
2575
2577
  damping: s
2576
2578
  };
@@ -2579,12 +2581,12 @@ function eu(e) {
2579
2581
  t = {
2580
2582
  ...t,
2581
2583
  ...n,
2582
- mass: oe.mass
2584
+ mass: ae.mass
2583
2585
  }, t.isResolvedFromDuration = !0;
2584
2586
  }
2585
2587
  return t;
2586
2588
  }
2587
- function Uo(e = oe.visualDuration, t = oe.bounce) {
2589
+ function Uo(e = ae.visualDuration, t = ae.bounce) {
2588
2590
  const n = typeof e != "object" ? {
2589
2591
  visualDuration: e,
2590
2592
  keyframes: [0, 1],
@@ -2595,7 +2597,7 @@ function Uo(e = oe.visualDuration, t = oe.bounce) {
2595
2597
  ...n,
2596
2598
  velocity: -Fe(n.velocity || 0)
2597
2599
  }), y = h || 0, v = c / (2 * Math.sqrt(l * u)), T = o - s, x = Fe(Math.sqrt(l / u)), C = Math.abs(T) < 5;
2598
- r || (r = C ? oe.restSpeed.granular : oe.restSpeed.default), i || (i = C ? oe.restDelta.granular : oe.restDelta.default);
2600
+ r || (r = C ? ae.restSpeed.granular : ae.restSpeed.default), i || (i = C ? ae.restDelta.granular : ae.restDelta.default);
2599
2601
  let E;
2600
2602
  if (v < 1) {
2601
2603
  const g = Gn(x, v);
@@ -2721,7 +2723,7 @@ function ou(e, t) {
2721
2723
  const n = e[e.length - 1];
2722
2724
  for (let r = 1; r <= t; r++) {
2723
2725
  const i = dt(0, t, r);
2724
- e.push(ae(n, 1, i));
2726
+ e.push(le(n, 1, i));
2725
2727
  }
2726
2728
  }
2727
2729
  function au(e) {
@@ -3273,20 +3275,20 @@ function Ou(e) {
3273
3275
  const R = Array.isArray(E) ? E : [E];
3274
3276
  let H = R.reduce(i(x), {});
3275
3277
  g === !1 && (H = {});
3276
- const { prevResolvedValues: le = {} } = C, U = {
3277
- ...le,
3278
+ const { prevResolvedValues: ie = {} } = C, U = {
3279
+ ...ie,
3278
3280
  ...H
3279
- }, ie = (q) => {
3281
+ }, se = (q) => {
3280
3282
  O = !0, h.has(q) && (Z = !0, h.delete(q)), C.needsAnimating[q] = !0;
3281
- const se = e.getValue(q);
3282
- se && (se.liveStyle = !1);
3283
+ const oe = e.getValue(q);
3284
+ oe && (oe.liveStyle = !1);
3283
3285
  };
3284
3286
  for (const q in U) {
3285
- const se = H[q], me = le[q];
3287
+ const oe = H[q], me = ie[q];
3286
3288
  if (m.hasOwnProperty(q))
3287
3289
  continue;
3288
3290
  let b = !1;
3289
- Fn(se) && Fn(me) ? b = !Ko(se, me) : b = se !== me, b ? se != null ? ie(q) : h.add(q) : se !== void 0 && h.has(q) ? ie(q) : C.protectedKeys[q] = !0;
3291
+ Fn(oe) && Fn(me) ? b = !Ko(oe, me) : b = oe !== me, b ? oe != null ? se(q) : h.add(q) : oe !== void 0 && h.has(q) ? se(q) : C.protectedKeys[q] = !0;
3290
3292
  }
3291
3293
  C.prevProp = E, C.prevResolvedValues = H, C.isActive && (m = { ...m, ...H }), r && e.blockInitialAnimation && (O = !1), O && (!(D && z) || Z) && f.push(...R.map((q) => ({
3292
3294
  animation: q,
@@ -3453,7 +3455,7 @@ function Hu(e, t, n) {
3453
3455
  return Math.abs(e - t) <= n;
3454
3456
  }
3455
3457
  function _i(e, t, n, r = 0.5) {
3456
- e.origin = r, e.originPoint = ae(t.min, t.max, e.origin), e.scale = je(n) / je(t), e.translate = ae(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Wu && e.scale <= zu || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Yu && e.translate <= Ku || isNaN(e.translate)) && (e.translate = 0);
3458
+ e.origin = r, e.originPoint = le(t.min, t.max, e.origin), e.scale = je(n) / je(t), e.translate = le(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Wu && e.scale <= zu || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Yu && e.translate <= Ku || isNaN(e.translate)) && (e.translate = 0);
3457
3459
  }
3458
3460
  function At(e, t, n, r) {
3459
3461
  _i(e.x, t.x, n.x, r ? r.originX : void 0), _i(e.y, t.y, n.y, r ? r.originY : void 0);
@@ -3534,7 +3536,7 @@ function ut(e, t) {
3534
3536
  e.min = e.min + t, e.max = e.max + t;
3535
3537
  }
3536
3538
  function Yi(e, t, n, r, i = 0.5) {
3537
- const s = ae(e.min, e.max, i);
3539
+ const s = le(e.min, e.max, i);
3538
3540
  Zn(e, t, n, s, r);
3539
3541
  }
3540
3542
  function ft(e, t) {
@@ -3633,7 +3635,7 @@ function Qu(e, t) {
3633
3635
  return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
3634
3636
  }
3635
3637
  function ef(e, { min: t, max: n }, r) {
3636
- return t !== void 0 && e < t ? e = r ? ae(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? ae(n, e, r.max) : Math.min(e, n)), e;
3638
+ return t !== void 0 && e < t ? e = r ? le(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? le(n, e, r.max) : Math.min(e, n)), e;
3637
3639
  }
3638
3640
  function Gi(e, t, n) {
3639
3641
  return {
@@ -3834,7 +3836,7 @@ class lf {
3834
3836
  const { projection: i } = this.visualElement, s = this.getAxisMotionValue(n);
3835
3837
  if (i && i.layout) {
3836
3838
  const { min: o, max: a } = i.layout.layoutBox[n];
3837
- s.set(t[n] - ae(o, a, 0.5));
3839
+ s.set(t[n] - le(o, a, 0.5));
3838
3840
  }
3839
3841
  });
3840
3842
  }
@@ -3858,7 +3860,7 @@ class lf {
3858
3860
  if (!Ht(o, t, null))
3859
3861
  return;
3860
3862
  const a = this.getAxisMotionValue(o), { min: l, max: c } = this.constraints[o];
3861
- a.set(ae(l, c, i[o]));
3863
+ a.set(le(l, c, i[o]));
3862
3864
  });
3863
3865
  }
3864
3866
  addListeners() {
@@ -3974,7 +3976,7 @@ const Tt = {
3974
3976
  return r;
3975
3977
  const s = Ke.createTransformer(e), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * t.x, l = n.y.scale * t.y;
3976
3978
  i[0 + o] /= a, i[1 + o] /= l;
3977
- const c = ae(a, l, 0.5);
3979
+ const c = le(a, l, 0.5);
3978
3980
  return typeof i[2 + o] == "number" && (i[2 + o] /= c), typeof i[3 + o] == "number" && (i[3 + o] /= c), s(i);
3979
3981
  }
3980
3982
  };
@@ -4064,19 +4066,19 @@ function xf(e, t) {
4064
4066
  }
4065
4067
  const ra = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], bf = ra.length, es = (e) => typeof e == "string" ? parseFloat(e) : e, ts = (e) => typeof e == "number" || k.test(e);
4066
4068
  function wf(e, t, n, r, i, s) {
4067
- i ? (e.opacity = ae(
4069
+ i ? (e.opacity = le(
4068
4070
  0,
4069
4071
  n.opacity !== void 0 ? n.opacity : 1,
4070
4072
  Tf(r)
4071
- ), e.opacityExit = ae(t.opacity !== void 0 ? t.opacity : 1, 0, Sf(r))) : s && (e.opacity = ae(t.opacity !== void 0 ? t.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, r));
4073
+ ), e.opacityExit = le(t.opacity !== void 0 ? t.opacity : 1, 0, Sf(r))) : s && (e.opacity = le(t.opacity !== void 0 ? t.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, r));
4072
4074
  for (let o = 0; o < bf; o++) {
4073
4075
  const a = `border${ra[o]}Radius`;
4074
4076
  let l = ns(t, a), c = ns(n, a);
4075
4077
  if (l === void 0 && c === void 0)
4076
4078
  continue;
4077
- l || (l = 0), c || (c = 0), l === 0 || c === 0 || ts(l) === ts(c) ? (e[a] = Math.max(ae(es(l), es(c), r), 0), (ke.test(c) || ke.test(l)) && (e[a] += "%")) : e[a] = c;
4079
+ l || (l = 0), c || (c = 0), l === 0 || c === 0 || ts(l) === ts(c) ? (e[a] = Math.max(le(es(l), es(c), r), 0), (ke.test(c) || ke.test(l)) && (e[a] += "%")) : e[a] = c;
4078
4080
  }
4079
- (t.rotate || n.rotate) && (e.rotate = ae(t.rotate || 0, n.rotate || 0, r));
4081
+ (t.rotate || n.rotate) && (e.rotate = le(t.rotate || 0, n.rotate || 0, r));
4080
4082
  }
4081
4083
  function ns(e, t) {
4082
4084
  return e[t] !== void 0 ? e[t] : e.borderRadius;
@@ -4098,9 +4100,9 @@ function ss(e, t, n, r, i) {
4098
4100
  return e -= t, e = rn(e, 1 / n, r), i !== void 0 && (e = rn(e, 1 / i, r)), e;
4099
4101
  }
4100
4102
  function Cf(e, t = 0, n = 1, r = 0.5, i, s = e, o = e) {
4101
- if (ke.test(t) && (t = parseFloat(t), t = ae(o.min, o.max, t / 100) - o.min), typeof t != "number")
4103
+ if (ke.test(t) && (t = parseFloat(t), t = le(o.min, o.max, t / 100) - o.min), typeof t != "number")
4102
4104
  return;
4103
- let a = ae(s.min, s.max, r);
4105
+ let a = le(s.min, s.max, r);
4104
4106
  e === s && (a -= t), e.min = ss(e.min, t, n, a, i), e.max = ss(e.max, t, n, a, i);
4105
4107
  }
4106
4108
  function os(e, t, [n, r, i], s, o) {
@@ -4737,10 +4739,10 @@ function Uf(e) {
4737
4739
  e.removeLeadSnapshot();
4738
4740
  }
4739
4741
  function gs(e, t, n) {
4740
- e.translate = ae(t.translate, 0, n), e.scale = ae(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
4742
+ e.translate = le(t.translate, 0, n), e.scale = le(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
4741
4743
  }
4742
4744
  function ys(e, t, n, r) {
4743
- e.min = ae(t.min, n.min, r), e.max = ae(t.max, n.max, r);
4745
+ e.min = le(t.min, n.min, r), e.max = le(t.max, n.max, r);
4744
4746
  }
4745
4747
  function Wf(e, t, n, r) {
4746
4748
  ys(e.x, t.x, n.x, r), ys(e.y, t.y, n.y, r);
@@ -5286,7 +5288,7 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5286
5288
  messageId: r,
5287
5289
  isCurrentUserMessage: i
5288
5290
  }) => {
5289
- const s = Se(null), [o, a] = ye(!1);
5291
+ const s = Se(null), [o, a] = ve(!1);
5290
5292
  return He(() => (s.current || (s.current = document.createElement("div"), s.current.style.zIndex = "1500", s.current.style.position = "fixed", s.current.style.top = "0", s.current.style.left = "0", s.current.style.width = "100%", s.current.style.height = "100%", s.current.style.pointerEvents = "none", document.body.appendChild(s.current)), a(!0), () => {
5291
5293
  s.current && !t && (document.body.removeChild(s.current), s.current = null);
5292
5294
  }), [t]), !s.current || !o ? null : Ua.createPortal(
@@ -5327,9 +5329,10 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5327
5329
  return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
5328
5330
  }, Cs = (e) => {
5329
5331
  const t = document.createElement("div");
5330
- return t.innerHTML = e, t.querySelectorAll("span").forEach((n) => {
5331
- const r = (n == null ? void 0 : n.textContent) && "".replace(/\u00A0/g, " ").trim().replace(/\s+/g, "-");
5332
- r && n.replaceWith(r);
5332
+ return t.innerHTML = e, t.querySelectorAll("span").forEach((r) => {
5333
+ var s;
5334
+ const i = ((s = r.textContent) == null ? void 0 : s.replace(/\u00A0/g, " ").trim().replace(/\s+/g, "-")) ?? "";
5335
+ r.replaceWith(i);
5333
5336
  }), t.innerHTML.replace(/&nbsp;/g, " ");
5334
5337
  }, Td = () => /* @__PURE__ */ p.exports.jsx(
5335
5338
  "svg",
@@ -5422,27 +5425,27 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5422
5425
  messageToEdit: c,
5423
5426
  setMessageToEdit: u
5424
5427
  }) => {
5425
- const [f, h] = ye(""), [m, y] = ye(!1), [v, T] = ye(0), [x, C] = ye(null), [E, V] = ye(null), [g, D] = ye(0), z = Se(null), O = Se([]), Z = Se(null), R = Se(null), H = Se(null), [le, U] = ye(!1), [ie, pe] = ye([]), he = 150, q = 41.6;
5428
+ const [f, h] = ve(""), [m, y] = ve(!1), [v, T] = ve(0), [x, C] = ve(null), [E, V] = ve(null), [g, D] = ve(0), z = Se(null), O = Se([]), Z = Se(null), R = Se(null), H = Se(null), [ie, U] = ve(!1), [se, pe] = ve([]), he = 150, q = 41.6;
5426
5429
  He(() => {
5427
5430
  const j = document.getElementById("static-display");
5428
5431
  j && !j.textContent && (c != null && c.text) && (j.textContent = c == null ? void 0 : c.text);
5429
5432
  }, [c == null ? void 0 : c.text]);
5430
- const se = (j) => {
5433
+ const oe = (j) => {
5431
5434
  c ? u((L) => L ? new Gt({
5432
5435
  ...L,
5433
5436
  text: j,
5434
5437
  isEdited: !0
5435
5438
  }) : void 0) : h(j);
5436
5439
  const M = j.match(/(\S+)$/);
5437
- if (F(M), ie.length > 0) {
5440
+ if (F(M), se.length > 0) {
5438
5441
  const L = Array.from(
5439
5442
  j.matchAll(/<span[^>]*id=["']([^"']+)["'][^>]*>/g)
5440
5443
  ).map((P) => P[1]);
5441
5444
  pe((P) => (P.filter(
5442
5445
  (ee) => !L.includes(ee)
5443
5446
  ).forEach((ee) => {
5444
- const ge = ee.charAt(0), xe = ee.slice(1);
5445
- l == null || l(xe, ge);
5447
+ const ge = ee.charAt(0), be = ee.slice(1);
5448
+ l == null || l(be, ge);
5446
5449
  }), L));
5447
5450
  }
5448
5451
  if (R.current) {
@@ -5456,14 +5459,14 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5456
5459
  return;
5457
5460
  t({
5458
5461
  ...c,
5462
+ htmlContent: c.text,
5459
5463
  text: j
5460
5464
  }), u(void 0);
5461
- } else {
5462
- const j = Cs(f);
5463
- if (j.trim() === "")
5464
- return;
5465
- e(j), h("");
5466
- }
5465
+ } else
5466
+ h((j) => {
5467
+ const M = Cs(j);
5468
+ return M.trim() === "" ? j : (console.log("htmlcontnent before", j), e(M, j), "");
5469
+ });
5467
5470
  C(null), V(null), R.current && (R.current.style.height = `${q}px`, R.current.innerHTML = "");
5468
5471
  }, b = async () => {
5469
5472
  y(!0), T(0), O.current = [], Z.current = setInterval(() => {
@@ -5507,10 +5510,10 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5507
5510
  R.current.innerHTML = P + ee;
5508
5511
  const ge = document.createTextNode("");
5509
5512
  R.current.appendChild(ge);
5510
- const xe = window.getSelection(), rt = document.createRange();
5511
- rt.setStart(ge, 0), rt.collapse(!0), xe == null || xe.removeAllRanges(), xe == null || xe.addRange(rt);
5513
+ const be = window.getSelection(), rt = document.createRange();
5514
+ rt.setStart(ge, 0), rt.collapse(!0), be == null || be.removeAllRanges(), be == null || be.addRange(rt);
5512
5515
  const Wt = R.current.innerHTML;
5513
- se(Wt), a && a(M, j, L), C(null), V(null), setTimeout(() => {
5516
+ oe(Wt), a && a(M, j, L), C(null), V(null), setTimeout(() => {
5514
5517
  var $e;
5515
5518
  ($e = R.current) == null || $e.focus();
5516
5519
  }, 0);
@@ -5597,7 +5600,7 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5597
5600
  className: "w-full resize-none h-[41.6px] absolute bottom-0 bg-white flex-1 p-2 pl-4 border border-gray-300 outline-none rounded-bl-3xl ",
5598
5601
  placeholder: "Type a message...",
5599
5602
  value: c.text,
5600
- onChange: (j) => se(j.target.value),
5603
+ onChange: (j) => oe(j.target.value),
5601
5604
  onKeyDown: (j) => {
5602
5605
  j.key === "Enter" && !j.shiftKey && (j.preventDefault(), me());
5603
5606
  }
@@ -5640,7 +5643,7 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5640
5643
  suppressContentEditableWarning: !0,
5641
5644
  className: "w-full absolute bottom-0 resize-none bg-white flex-1 p-2 pr-10 pl-4 border border-gray-300 outline-none rounded-tl-3xl rounded-tr-2xl rounded-bl-3xl overflow-hidden",
5642
5645
  style: { height: q },
5643
- onInput: (j) => se(j.currentTarget.innerHTML),
5646
+ onInput: (j) => oe(j.currentTarget.innerHTML),
5644
5647
  onKeyDown: (j) => {
5645
5648
  j.key === "Enter" && !j.shiftKey && (j.preventDefault(), me());
5646
5649
  }
@@ -5690,7 +5693,7 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5690
5693
  M,
5691
5694
  {
5692
5695
  listsProps: te,
5693
- onClick: (ge, xe) => B(ge, xe, x)
5696
+ onClick: (ge, be) => B(ge, be, x)
5694
5697
  }
5695
5698
  )
5696
5699
  },
@@ -5703,14 +5706,14 @@ const yd = (e, t) => wr(e) ? new gd(t) : new md(t, {
5703
5706
  M,
5704
5707
  {
5705
5708
  listsProps: te,
5706
- onClick: (ge, xe) => B(ge, xe, x)
5709
+ onClick: (ge, be) => B(ge, be, x)
5707
5710
  }
5708
5711
  )
5709
5712
  },
5710
5713
  ee
5711
5714
  )) : null;
5712
5715
  }) : null,
5713
- /* @__PURE__ */ p.exports.jsx("div", { className: "h-8", children: le && "Loading more items..." })
5716
+ /* @__PURE__ */ p.exports.jsx("div", { className: "h-8", children: ie && "Loading more items..." })
5714
5717
  ] })
5715
5718
  ]
5716
5719
  }
@@ -5729,7 +5732,7 @@ const Wr = ({
5729
5732
  onCancelClick: a,
5730
5733
  className: l
5731
5734
  }) => {
5732
- const [c, u] = ye(0), f = (t - n) / 2, h = 2 * Math.PI * f, m = h - c / 100 * h;
5735
+ const [c, u] = ve(0), f = (t - n) / 2, h = 2 * Math.PI * f, m = h - c / 100 * h;
5733
5736
  return He(() => {
5734
5737
  const y = Date.now(), v = y + s, T = () => {
5735
5738
  const x = Date.now(), E = Math.min(1, (x - y) / s) * e;
@@ -5952,7 +5955,7 @@ const jd = ({
5952
5955
  uploadProgres: n,
5953
5956
  onCancelClick: r
5954
5957
  }) => {
5955
- const [i, s] = ye(!1), [o, a] = ye(0), l = Se(null);
5958
+ const [i, s] = ve(!1), [o, a] = ve(0), l = Se(null);
5956
5959
  He(() => {
5957
5960
  const u = l.current;
5958
5961
  if (!u)
@@ -6265,7 +6268,7 @@ const jd = ({
6265
6268
  ]
6266
6269
  }
6267
6270
  );
6268
- var ve = { exports: {} }, Dn = { exports: {} }, J = {};
6271
+ var xe = { exports: {} }, Dn = { exports: {} }, J = {};
6269
6272
  var Es;
6270
6273
  function Dd() {
6271
6274
  if (Es)
@@ -6373,9 +6376,9 @@ function Ld() {
6373
6376
  }
6374
6377
  }
6375
6378
  }
6376
- var g = l, D = c, z = a, O = o, Z = t, R = u, H = r, le = y, U = m, ie = n, pe = s, he = i, q = f, se = !1;
6379
+ var g = l, D = c, z = a, O = o, Z = t, R = u, H = r, ie = y, U = m, se = n, pe = s, he = i, q = f, oe = !1;
6377
6380
  function me(P) {
6378
- return se || (se = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), b(P) || V(P) === l;
6381
+ return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), b(P) || V(P) === l;
6379
6382
  }
6380
6383
  function b(P) {
6381
6384
  return V(P) === c;
@@ -6413,7 +6416,7 @@ function Ld() {
6413
6416
  function L(P) {
6414
6417
  return V(P) === f;
6415
6418
  }
6416
- Q.AsyncMode = g, Q.ConcurrentMode = D, Q.ContextConsumer = z, Q.ContextProvider = O, Q.Element = Z, Q.ForwardRef = R, Q.Fragment = H, Q.Lazy = le, Q.Memo = U, Q.Portal = ie, Q.Profiler = pe, Q.StrictMode = he, Q.Suspense = q, Q.isAsyncMode = me, Q.isConcurrentMode = b, Q.isContextConsumer = w, Q.isContextProvider = F, Q.isElement = B, Q.isForwardRef = _, Q.isFragment = Y, Q.isLazy = I, Q.isMemo = $, Q.isPortal = W, Q.isProfiler = j, Q.isStrictMode = M, Q.isSuspense = L, Q.isValidElementType = E, Q.typeOf = V;
6419
+ Q.AsyncMode = g, Q.ConcurrentMode = D, Q.ContextConsumer = z, Q.ContextProvider = O, Q.Element = Z, Q.ForwardRef = R, Q.Fragment = H, Q.Lazy = ie, Q.Memo = U, Q.Portal = se, Q.Profiler = pe, Q.StrictMode = he, Q.Suspense = q, Q.isAsyncMode = me, Q.isConcurrentMode = b, Q.isContextConsumer = w, Q.isContextProvider = F, Q.isElement = B, Q.isForwardRef = _, Q.isFragment = Y, Q.isLazy = I, Q.isMemo = $, Q.isPortal = W, Q.isProfiler = j, Q.isStrictMode = M, Q.isSuspense = L, Q.isValidElementType = E, Q.typeOf = V;
6417
6420
  }()), Q;
6418
6421
  }
6419
6422
  var Rs;
@@ -6574,7 +6577,7 @@ function _d() {
6574
6577
  objectOf: O,
6575
6578
  oneOf: z,
6576
6579
  oneOfType: Z,
6577
- shape: le,
6580
+ shape: ie,
6578
6581
  exact: U
6579
6582
  };
6580
6583
  function y(b, w) {
@@ -6714,7 +6717,7 @@ function _d() {
6714
6717
  var F = b[w];
6715
6718
  if (typeof F != "function")
6716
6719
  return s(
6717
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(F) + " at index " + w + "."
6720
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(F) + " at index " + w + "."
6718
6721
  ), o;
6719
6722
  }
6720
6723
  function B(_, Y, I, $, W) {
@@ -6731,7 +6734,7 @@ function _d() {
6731
6734
  }
6732
6735
  function R() {
6733
6736
  function b(w, F, B, _, Y) {
6734
- return ie(w[F]) ? null : new v("Invalid " + _ + " `" + Y + "` supplied to " + ("`" + B + "`, expected a ReactNode."));
6737
+ return se(w[F]) ? null : new v("Invalid " + _ + " `" + Y + "` supplied to " + ("`" + B + "`, expected a ReactNode."));
6735
6738
  }
6736
6739
  return T(b);
6737
6740
  }
@@ -6740,7 +6743,7 @@ function _d() {
6740
6743
  (b || "React class") + ": " + w + " type `" + F + "." + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
6741
6744
  );
6742
6745
  }
6743
- function le(b) {
6746
+ function ie(b) {
6744
6747
  function w(F, B, _, Y, I) {
6745
6748
  var $ = F[B], W = he($);
6746
6749
  if (W !== "object")
@@ -6780,7 +6783,7 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
6780
6783
  }
6781
6784
  return T(w);
6782
6785
  }
6783
- function ie(b) {
6786
+ function se(b) {
6784
6787
  switch (typeof b) {
6785
6788
  case "number":
6786
6789
  case "string":
@@ -6790,7 +6793,7 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
6790
6793
  return !b;
6791
6794
  case "object":
6792
6795
  if (Array.isArray(b))
6793
- return b.every(ie);
6796
+ return b.every(se);
6794
6797
  if (b === null || a(b))
6795
6798
  return !0;
6796
6799
  var w = f(b);
@@ -6798,12 +6801,12 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
6798
6801
  var F = w.call(b), B;
6799
6802
  if (w !== b.entries) {
6800
6803
  for (; !(B = F.next()).done; )
6801
- if (!ie(B.value))
6804
+ if (!se(B.value))
6802
6805
  return !1;
6803
6806
  } else
6804
6807
  for (; !(B = F.next()).done; ) {
6805
6808
  var _ = B.value;
6806
- if (_ && !ie(_[1]))
6809
+ if (_ && !se(_[1]))
6807
6810
  return !1;
6808
6811
  }
6809
6812
  } else
@@ -6832,7 +6835,7 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
6832
6835
  }
6833
6836
  return w;
6834
6837
  }
6835
- function se(b) {
6838
+ function oe(b) {
6836
6839
  var w = q(b);
6837
6840
  switch (w) {
6838
6841
  case "array":
@@ -6903,9 +6906,9 @@ function Id() {
6903
6906
  }
6904
6907
  if (process.env.NODE_ENV !== "production") {
6905
6908
  var Nd = pa(), Fd = !0;
6906
- ve.exports = _d()(Nd.isElement, Fd);
6909
+ xe.exports = _d()(Nd.isElement, Fd);
6907
6910
  } else
6908
- ve.exports = Id()();
6911
+ xe.exports = Id()();
6909
6912
  function tr() {
6910
6913
  return tr = Object.assign || function(e) {
6911
6914
  for (var t = 1; t < arguments.length; t++) {
@@ -6953,8 +6956,8 @@ var Yr = Nt(function(e, t) {
6953
6956
  }));
6954
6957
  });
6955
6958
  Yr.propTypes = {
6956
- color: ve.exports.string,
6957
- size: ve.exports.oneOfType([ve.exports.string, ve.exports.number])
6959
+ color: xe.exports.string,
6960
+ size: xe.exports.oneOfType([xe.exports.string, xe.exports.number])
6958
6961
  };
6959
6962
  Yr.displayName = "Check";
6960
6963
  const Ud = Yr;
@@ -7012,8 +7015,8 @@ var Kr = Nt(function(e, t) {
7012
7015
  }));
7013
7016
  });
7014
7017
  Kr.propTypes = {
7015
- color: ve.exports.string,
7016
- size: ve.exports.oneOfType([ve.exports.string, ve.exports.number])
7018
+ color: xe.exports.string,
7019
+ size: xe.exports.oneOfType([xe.exports.string, xe.exports.number])
7017
7020
  };
7018
7021
  Kr.displayName = "Copy";
7019
7022
  const Yd = Kr;
@@ -7066,8 +7069,8 @@ var Hr = Nt(function(e, t) {
7066
7069
  }));
7067
7070
  });
7068
7071
  Hr.propTypes = {
7069
- color: ve.exports.string,
7070
- size: ve.exports.oneOfType([ve.exports.string, ve.exports.number])
7072
+ color: xe.exports.string,
7073
+ size: xe.exports.oneOfType([xe.exports.string, xe.exports.number])
7071
7074
  };
7072
7075
  Hr.displayName = "Edit";
7073
7076
  const Gd = Hr;
@@ -7120,8 +7123,8 @@ var Gr = Nt(function(e, t) {
7120
7123
  }));
7121
7124
  });
7122
7125
  Gr.propTypes = {
7123
- color: ve.exports.string,
7124
- size: ve.exports.oneOfType([ve.exports.string, ve.exports.number])
7126
+ color: xe.exports.string,
7127
+ size: xe.exports.oneOfType([xe.exports.string, xe.exports.number])
7125
7128
  };
7126
7129
  Gr.displayName = "Trash";
7127
7130
  const Zd = Gr, Jd = ({
@@ -7134,7 +7137,7 @@ const Zd = Gr, Jd = ({
7134
7137
  isSendingDefultForEdited: o,
7135
7138
  onDeleteMessage: a
7136
7139
  }) => {
7137
- const l = Se(null), [c, u] = ye(!1), [f, h] = ye(null), [m, y] = ye(), [v, T] = ye(null), x = () => {
7140
+ const l = Se(null), [c, u] = ve(!1), [f, h] = ve(null), [m, y] = ve(), [v, T] = ve(null), x = () => {
7138
7141
  setTimeout(() => {
7139
7142
  l.current && (l.current.scrollTop = l.current.scrollHeight);
7140
7143
  }, 100);
@@ -7149,30 +7152,31 @@ const Zd = Gr, Jd = ({
7149
7152
  }, [T]);
7150
7153
  const C = (R, H) => {
7151
7154
  R.preventDefault();
7152
- const le = window.scrollX, U = window.scrollY;
7155
+ const ie = window.scrollX, U = window.scrollY;
7153
7156
  T({
7154
- x: R.clientX + le,
7157
+ x: R.clientX + ie,
7155
7158
  y: R.clientY + U,
7156
7159
  message: H
7157
7160
  });
7158
7161
  }, E = () => {
7159
7162
  T(null);
7160
- }, V = (R) => {
7161
- const H = new Gt({
7163
+ }, V = (R, H) => {
7164
+ const ie = new Gt({
7162
7165
  id: new Date().toString(),
7163
7166
  text: R,
7167
+ htmlContent: H,
7164
7168
  user: e,
7165
7169
  isRightSided: !0,
7166
7170
  isSending: s,
7167
7171
  createdDate: new Date().toString()
7168
7172
  });
7169
- n([...t, H]), r(H), x();
7173
+ n([...t, ie]), r(ie), x();
7170
7174
  }, g = (R) => {
7171
7175
  n(
7172
7176
  t.map((H) => H.id === R.id ? (R.updateIsSending(Boolean(o)), R) : H)
7173
7177
  ), i(R);
7174
7178
  }, D = (R) => {
7175
- const H = URL.createObjectURL(R), le = new Gt({
7179
+ const H = URL.createObjectURL(R), ie = new Gt({
7176
7180
  id: new Date().toString(),
7177
7181
  text: "",
7178
7182
  attachmentUrl: H,
@@ -7182,15 +7186,15 @@ const Zd = Gr, Jd = ({
7182
7186
  isRightSided: !0,
7183
7187
  createdDate: new Date().toString()
7184
7188
  });
7185
- n([...t, le]), r(le), x();
7189
+ n([...t, ie]), r(ie), x();
7186
7190
  }, z = (R, H) => {
7187
- const le = URL.createObjectURL(R), U = R instanceof File ? R.name : "", ie = R instanceof File ? R.name.split(".").pop() : "", pe = new Gt({
7191
+ const ie = URL.createObjectURL(R), U = R instanceof File ? R.name : "", se = R instanceof File ? R.name.split(".").pop() : "", pe = new Gt({
7188
7192
  id: new Date().toString(),
7189
7193
  text: "",
7190
- attachmentUrl: le,
7194
+ attachmentUrl: ie,
7191
7195
  attachmentBlob: R,
7192
7196
  attachmentType: H,
7193
- attachmentFormat: ie,
7197
+ attachmentFormat: se,
7194
7198
  attachmentName: U,
7195
7199
  user: e,
7196
7200
  isRightSided: !0,
@@ -7232,7 +7236,7 @@ const Zd = Gr, Jd = ({
7232
7236
  name: "Copy",
7233
7237
  icon: /* @__PURE__ */ p.exports.jsx(Yd, { className: "text-blue-600" }),
7234
7238
  onClick: (R) => {
7235
- const H = t.find((le) => le.id === R);
7239
+ const H = t.find((ie) => ie.id === R);
7236
7240
  H && navigator.clipboard.writeText(H.text), E();
7237
7241
  }
7238
7242
  }
@@ -7281,13 +7285,13 @@ const Zd = Gr, Jd = ({
7281
7285
  handleSendMessage: Z,
7282
7286
  handleContextMenu: R,
7283
7287
  contextMenuItems: H,
7284
- isModalOpen: le,
7288
+ isModalOpen: ie,
7285
7289
  contextMenu: U,
7286
- chatRef: ie,
7290
+ chatRef: se,
7287
7291
  setIsModalOpen: pe,
7288
7292
  messageToEdit: he,
7289
7293
  setMessageToEdit: q,
7290
- handleEditMessage: se
7294
+ handleEditMessage: oe
7291
7295
  } = Jd({
7292
7296
  user: o,
7293
7297
  messages: s,
@@ -7313,7 +7317,7 @@ const Zd = Gr, Jd = ({
7313
7317
  /* @__PURE__ */ p.exports.jsx(
7314
7318
  "div",
7315
7319
  {
7316
- ref: ie,
7320
+ ref: se,
7317
7321
  className: `flex flex-col gap-2 flex-1 p-3 pb-16 ${U ? "overflow-hidden pr-[22px]" : "overflow-y-scroll"}`,
7318
7322
  children: n ? /* @__PURE__ */ p.exports.jsx(ha, { className: "mt-3", size: 27, color: "text-gray-800" }) : /* @__PURE__ */ p.exports.jsx(Fs, { children: s.length > 0 ? s.map((w, F) => {
7319
7323
  var Y, I, $;
@@ -7363,7 +7367,7 @@ const Zd = Gr, Jd = ({
7363
7367
  /* @__PURE__ */ p.exports.jsx(
7364
7368
  xd,
7365
7369
  {
7366
- isOpen: le,
7370
+ isOpen: ie,
7367
7371
  onClose: () => pe(!1),
7368
7372
  onConfirm: g,
7369
7373
  header: "Confirm Delete",
@@ -7396,7 +7400,7 @@ const Zd = Gr, Jd = ({
7396
7400
  onDynamicSymbolListDelete: m,
7397
7401
  messageToEdit: he,
7398
7402
  setMessageToEdit: q,
7399
- onEditMessage: se
7403
+ onEditMessage: oe
7400
7404
  }
7401
7405
  )
7402
7406
  ]