@mobilon-dev/chotto 0.2.25 → 0.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { createElementBlock as u, openBlock as l, createStaticVNode as df, inject as se, computed as P, createCommentVNode as v, createElementVNode as o, createVNode as W, createTextVNode as Ff, toDisplayString as E, renderSlot as ie, unref as D, ref as b, customRef as mn, defineComponent as K, watch as ae, nextTick as _e, onMounted as me, withDirectives as ge, withKeys as Mt, vModelText as Cf, normalizeClass as S, createBlock as B, resolveDynamicComponent as Te, Fragment as Z, renderList as oe, Transition as ue, withCtx as J, useTemplateRef as pn, normalizeStyle as ce, Teleport as ye, onUnmounted as Af, vShow as ze, useId as P1, toRef as Pt, vModelRadio as wt, reactive as _n, provide as _f, getCurrentInstance as Jn, toRaw as hn, onBeforeUnmount as Gn, readonly as Xn, resolveComponent as d1, h as qt, defineAsyncComponent as ea, createApp as fa, withModifiers as Yf } from "vue";
1
+ import { createElementBlock as u, openBlock as l, createStaticVNode as df, inject as se, computed as Y, createCommentVNode as v, createElementVNode as o, createVNode as W, createTextVNode as Ff, toDisplayString as E, renderSlot as ie, unref as D, ref as b, customRef as mn, defineComponent as K, watch as ae, nextTick as _e, onMounted as me, withDirectives as ge, withKeys as Mt, vModelText as Cf, normalizeClass as S, createBlock as B, resolveDynamicComponent as Te, Fragment as Z, renderList as oe, Transition as ue, withCtx as J, useTemplateRef as pn, normalizeStyle as ce, Teleport as ye, onUnmounted as Af, vShow as ze, useId as P1, toRef as Pt, vModelRadio as wt, reactive as _n, provide as _f, getCurrentInstance as Jn, toRaw as hn, onBeforeUnmount as Gn, readonly as Xn, resolveComponent as d1, h as qt, defineAsyncComponent as ea, createApp as fa, withModifiers as Yf } from "vue";
2
2
  const ta = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", na = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", rt = "numeric", dt = "ascii", At = "alpha", Lf = "asciinumeric", Vf = "alphanumeric", gt = "domain", vn = "emoji", aa = "scheme", sa = "slashscheme", ft = "whitespace";
3
3
  function ia(e, f) {
4
4
  return e in f || (f[e] = []), f[e];
@@ -235,11 +235,11 @@ function ca(e = []) {
235
235
  [vn]: !0
236
236
  });
237
237
  V(g, "#"), de(g, tt, g), V(g, la, g);
238
- const _ = V(g, ua);
239
- V(_, "#"), de(_, tt, g);
240
- const C = [[Ke, s], [Je, a]], h = [[Ke, null], [Tf, c], [Je, i]];
238
+ const p = V(g, ua);
239
+ V(p, "#"), de(p, tt, g);
240
+ const w = [[Ke, s], [Je, a]], h = [[Ke, null], [Tf, c], [Je, i]];
241
241
  for (let y = 0; y < o1.length; y++)
242
- Xe(t, o1[y], pt, Ge, C);
242
+ Xe(t, o1[y], pt, Ge, w);
243
243
  for (let y = 0; y < l1.length; y++)
244
244
  Xe(t, l1[y], _t, mt, h);
245
245
  cf(pt, {
@@ -248,20 +248,20 @@ function ca(e = []) {
248
248
  }, f), cf(_t, {
249
249
  utld: !0,
250
250
  alpha: !0
251
- }, f), Xe(t, "file", A1, Ge, C), Xe(t, "mailto", A1, Ge, C), Xe(t, "http", pf, Ge, C), Xe(t, "https", pf, Ge, C), Xe(t, "ftp", pf, Ge, C), Xe(t, "ftps", pf, Ge, C), cf(A1, {
251
+ }, f), Xe(t, "file", A1, Ge, w), Xe(t, "mailto", A1, Ge, w), Xe(t, "http", pf, Ge, w), Xe(t, "https", pf, Ge, w), Xe(t, "ftp", pf, Ge, w), Xe(t, "ftps", pf, Ge, w), cf(A1, {
252
252
  scheme: !0,
253
253
  ascii: !0
254
254
  }, f), cf(pf, {
255
255
  slashscheme: !0,
256
256
  ascii: !0
257
- }, f), e = e.sort((y, w) => y[0] > w[0] ? 1 : -1);
257
+ }, f), e = e.sort((y, C) => y[0] > C[0] ? 1 : -1);
258
258
  for (let y = 0; y < e.length; y++) {
259
- const w = e[y][0], N = e[y][1] ? {
259
+ const C = e[y][0], N = e[y][1] ? {
260
260
  [aa]: !0
261
261
  } : {
262
262
  [sa]: !0
263
263
  };
264
- w.indexOf("-") >= 0 ? N[gt] = !0 : Ke.test(w) ? Je.test(w) ? N[Lf] = !0 : N[dt] = !0 : N[rt] = !0, Ht(t, w, w, N);
264
+ C.indexOf("-") >= 0 ? N[gt] = !0 : Ke.test(C) ? Je.test(C) ? N[Lf] = !0 : N[dt] = !0 : N[rt] = !0, Ht(t, C, C, N);
265
265
  }
266
266
  return Ht(t, "localhost", Pf, {
267
267
  ascii: !0
@@ -276,10 +276,10 @@ function In(e, f) {
276
276
  const t = ra(f.replace(/[A-Z]/g, (c) => c.toLowerCase())), n = t.length, a = [];
277
277
  let i = 0, s = 0;
278
278
  for (; s < n; ) {
279
- let c = e, r = null, d = 0, A = null, g = -1, _ = -1;
279
+ let c = e, r = null, d = 0, A = null, g = -1, p = -1;
280
280
  for (; s < n && (r = c.go(t[s])); )
281
- c = r, c.accepts() ? (g = 0, _ = 0, A = c) : g >= 0 && (g += t[s].length, _++), d += t[s].length, i += t[s].length, s++;
282
- i -= g, s -= _, d -= g, a.push({
281
+ c = r, c.accepts() ? (g = 0, p = 0, A = c) : g >= 0 && (g += t[s].length, p++), d += t[s].length, i += t[s].length, s++;
282
+ i -= g, s -= p, d -= g, a.push({
283
283
  t: A.t,
284
284
  // token type/name
285
285
  v: f.slice(i - d, i),
@@ -572,24 +572,24 @@ function Aa({
572
572
  X(A, n, i), X(A, e.domain, i);
573
573
  const g = xe();
574
574
  X(d, e.domain, g), X(g, e.domain, g);
575
- const _ = V(g, Pe);
576
- X(_, e.domain, g);
577
- const C = xe(Jt);
578
- X(_, e.tld, C), X(_, e.utld, C), V(d, Pf, C);
575
+ const p = V(g, Pe);
576
+ X(p, e.domain, g);
577
+ const w = xe(Jt);
578
+ X(p, e.tld, w), X(p, e.utld, w), V(d, Pf, w);
579
579
  const h = V(g, Ne);
580
- V(h, Ne, h), X(h, e.domain, g), X(C, e.domain, g), V(C, Pe, _), V(C, Ne, h);
581
- const y = V(C, ff);
580
+ V(h, Ne, h), X(h, e.domain, g), X(w, e.domain, g), V(w, Pe, p), V(w, Ne, h);
581
+ const y = V(w, ff);
582
582
  X(y, e.numeric, Jt);
583
- const w = V(s, Ne), T = V(s, Pe);
584
- V(w, Ne, w), X(w, e.domain, s), X(T, n, i), X(T, e.domain, s);
583
+ const C = V(s, Ne), T = V(s, Pe);
584
+ V(C, Ne, C), X(C, e.domain, s), X(T, n, i), X(T, e.domain, s);
585
585
  const N = xe(u1);
586
- X(T, e.tld, N), X(T, e.utld, N), X(N, e.domain, s), X(N, n, i), V(N, Pe, T), V(N, Ne, w), V(N, ef, d);
587
- const p = V(N, ff), k = xe(u1);
588
- X(p, e.numeric, k);
586
+ X(T, e.tld, N), X(T, e.utld, N), X(N, e.domain, s), X(N, n, i), V(N, Pe, T), V(N, Ne, C), V(N, ef, d);
587
+ const _ = V(N, ff), k = xe(u1);
588
+ X(_, e.numeric, k);
589
589
  const M = xe(u1), m = xe();
590
590
  X(M, f, M), X(M, t, m), X(m, f, M), X(m, t, m), V(N, qe, M), V(k, qe, M);
591
- const I = V(c, ff), x = V(r, ff), O = V(x, qe), F = V(O, qe);
592
- X(c, e.domain, s), V(c, Pe, T), V(c, Ne, w), X(r, e.domain, s), V(r, Pe, T), V(r, Ne, w), X(I, e.domain, M), V(I, qe, M), V(I, Bf, M), X(F, e.domain, M), X(F, f, M), V(F, qe, M);
591
+ const I = V(c, ff), x = V(r, ff), O = V(x, qe), Q = V(O, qe);
592
+ X(c, e.domain, s), V(c, Pe, T), V(c, Ne, C), X(r, e.domain, s), V(r, Pe, T), V(r, Ne, C), X(I, e.domain, M), V(I, qe, M), V(I, Bf, M), X(Q, e.domain, M), X(Q, f, M), V(Q, qe, M);
593
593
  const ee = [
594
594
  [Of, zf],
595
595
  // {}
@@ -624,17 +624,17 @@ function Aa({
624
624
  function ga(e, f, t) {
625
625
  let n = t.length, a = 0, i = [], s = [];
626
626
  for (; a < n; ) {
627
- let c = e, r = null, d = null, A = 0, g = null, _ = -1;
627
+ let c = e, r = null, d = null, A = 0, g = null, p = -1;
628
628
  for (; a < n && !(r = c.go(t[a].t)); )
629
629
  s.push(t[a++]);
630
630
  for (; a < n && (d = r || c.go(t[a].t)); )
631
- r = null, c = d, c.accepts() ? (_ = 0, g = c) : _ >= 0 && _++, a++, A++;
632
- if (_ < 0)
631
+ r = null, c = d, c.accepts() ? (p = 0, g = c) : p >= 0 && p++, a++, A++;
632
+ if (p < 0)
633
633
  a -= A, a < n && (s.push(t[a]), a++);
634
634
  else {
635
- s.length > 0 && (i.push(it(Gt, f, s)), s = []), a -= _, A -= _;
636
- const C = g.t, h = t.slice(a - A, a);
637
- i.push(it(C, f, h));
635
+ s.length > 0 && (i.push(it(Gt, f, s)), s = []), a -= p, A -= p;
636
+ const w = g.t, h = t.slice(a - A, a);
637
+ i.push(it(w, f, h));
638
638
  }
639
639
  }
640
640
  return s.length > 0 && i.push(it(Gt, f, s)), i;
@@ -789,7 +789,7 @@ const Nn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
789
789
  },
790
790
  emits: ["returnToChats"],
791
791
  setup(e, { emit: f }) {
792
- const t = e, n = f, a = se("chatAppId"), i = P(() => {
792
+ const t = e, n = f, a = se("chatAppId"), i = Y(() => {
793
793
  if (t.description) return t.description;
794
794
  if (!t.description && t.defaultLastActivityTime) return t.chat["lastActivity.time"];
795
795
  });
@@ -833,7 +833,7 @@ const Nn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
833
833
  ])) : v("", !0);
834
834
  }
835
835
  }, u6 = /* @__PURE__ */ L(Sa, [["__scopeId", "data-v-479e4d2a"]]), we = b([]), Le = (e) => {
836
- const f = b(0), t = we.value.find(({ id: _ }) => _ == e);
836
+ const f = b(0), t = we.value.find(({ id: p }) => p == e);
837
837
  t != null ? f.value = we.value.indexOf(t) : (we.value.push({
838
838
  id: e,
839
839
  text: "",
@@ -850,20 +850,20 @@ const Nn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
850
850
  forceSend: !1,
851
851
  isRecording: d().isRecording
852
852
  };
853
- }, a = (_) => {
853
+ }, a = (p) => {
854
854
  we.value[f.value] = {
855
855
  id: d().id,
856
- text: _,
856
+ text: p,
857
857
  file: d().file,
858
858
  reply: d().reply,
859
859
  forceSend: !1,
860
860
  isRecording: d().isRecording
861
861
  };
862
- }, i = (_) => {
862
+ }, i = (p) => {
863
863
  we.value[f.value] = {
864
864
  id: d().id,
865
865
  text: d().text,
866
- file: _,
866
+ file: p,
867
867
  reply: d().reply,
868
868
  forceSend: !1,
869
869
  isRecording: d().isRecording
@@ -877,12 +877,12 @@ const Nn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
877
877
  forceSend: !1,
878
878
  isRecording: d().isRecording
879
879
  };
880
- }, c = (_) => {
880
+ }, c = (p) => {
881
881
  we.value[f.value] = {
882
882
  id: d().id,
883
883
  text: d().text,
884
884
  file: d().file,
885
- reply: _,
885
+ reply: p,
886
886
  forceSend: !1,
887
887
  isRecording: d().isRecording
888
888
  };
@@ -907,11 +907,11 @@ const Nn = /* @__PURE__ */ L(va, [["render", ya]]), Ma = {
907
907
  setMessageText: a,
908
908
  setReply: c,
909
909
  resetReply: r,
910
- setForceSendMessage: (_) => {
911
- we.value[f.value].forceSend = _;
910
+ setForceSendMessage: (p) => {
911
+ we.value[f.value].forceSend = p;
912
912
  },
913
- setRecordingMessage: (_) => {
914
- we.value[f.value].isRecording = _;
913
+ setRecordingMessage: (p) => {
914
+ we.value[f.value].isRecording = p;
915
915
  }
916
916
  };
917
917
  }, Va = {
@@ -1351,14 +1351,14 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1351
1351
  },
1352
1352
  emits: ["send", "typing"],
1353
1353
  setup(e, { emit: f }) {
1354
- const t = f, n = se("chatAppId"), { resetMessage: a, getMessage: i, setMessageText: s, setForceSendMessage: c } = Le(n), r = b(), d = Ua("", 2e3), A = b(), g = e, _ = P(() => !!(g.state == "disabled" || i().text == "" && !i().file || i().isRecording)), C = P(() => Ys), h = P(() => {
1354
+ const t = f, n = se("chatAppId"), { resetMessage: a, getMessage: i, setMessageText: s, setForceSendMessage: c } = Le(n), r = b(), d = Ua("", 2e3), A = b(), g = e, p = Y(() => !!(g.state == "disabled" || i().text == "" && !i().file || i().isRecording)), w = Y(() => Ys), h = Y(() => {
1355
1355
  var k;
1356
1356
  if (g.inputButtonColor)
1357
1357
  return g.inputButtonColor;
1358
1358
  if (!((k = g.selectedChannel) != null && k.channelId))
1359
1359
  return "#25D366";
1360
- const p = g.selectedChannel.channelId.toLowerCase();
1361
- return p.includes("whatsapp") || p.includes("waba") ? "#25D366" : p.includes("telegram") ? "#37AFE2" : p.includes("sms") ? "#6C757D" : p.includes("max") ? "#4B0082" : "#25D366";
1360
+ const _ = g.selectedChannel.channelId.toLowerCase();
1361
+ return _.includes("whatsapp") || _.includes("waba") ? "#25D366" : _.includes("telegram") ? "#37AFE2" : _.includes("sms") ? "#6C757D" : _.includes("max") ? "#4B0082" : "#25D366";
1362
1362
  });
1363
1363
  ae(
1364
1364
  () => d.value,
@@ -1369,8 +1369,8 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1369
1369
  () => g.focusOnInputArea,
1370
1370
  () => {
1371
1371
  g.focusOnInputArea && _e(() => {
1372
- const p = D(r);
1373
- p == null || p.focus();
1372
+ const _ = D(r);
1373
+ _ == null || _.focus();
1374
1374
  });
1375
1375
  },
1376
1376
  { immediate: !0 }
@@ -1378,17 +1378,17 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1378
1378
  () => i().text,
1379
1379
  () => {
1380
1380
  _e(() => {
1381
- const p = r.value;
1382
- if (!p) return;
1383
- const k = p.scrollTop;
1384
- p.style.height = "auto";
1385
- const M = getComputedStyle(p), m = parseFloat(M.fontSize) || 16, I = parseFloat(M.lineHeight) || m * 1.4, x = 40, O = I * 11, F = p.scrollHeight, $ = i().text.split(`
1381
+ const _ = r.value;
1382
+ if (!_) return;
1383
+ const k = _.scrollTop;
1384
+ _.style.height = "auto";
1385
+ const M = getComputedStyle(_), m = parseFloat(M.fontSize) || 16, I = parseFloat(M.lineHeight) || m * 1.4, x = 40, O = I * 11, Q = _.scrollHeight, $ = i().text.split(`
1386
1386
  `).length > 1, z = document.createElement("div");
1387
1387
  z.style.position = "absolute", z.style.visibility = "hidden", z.style.whiteSpace = "nowrap", z.style.font = M.font, z.style.fontSize = M.fontSize, z.style.fontFamily = M.fontFamily, z.style.fontWeight = M.fontWeight, z.style.letterSpacing = M.letterSpacing, z.textContent = i().text, document.body.appendChild(z);
1388
1388
  const G = z.offsetWidth;
1389
1389
  document.body.removeChild(z);
1390
- const te = parseFloat(M.paddingLeft) || 0, fe = parseFloat(M.paddingRight) || 0, le = p.clientWidth - te - fe, Ie = G > le, pe = $ || Ie;
1391
- i().text.trim() && pe ? F <= O ? (p.style.height = F + "px", p.style.overflowY = "hidden") : (p.style.height = O + "px", p.style.overflowY = "auto", p.scrollTop = k) : (p.style.height = x + "px", p.style.overflowY = "hidden");
1390
+ const te = parseFloat(M.paddingLeft) || 0, fe = parseFloat(M.paddingRight) || 0, le = _.clientWidth - te - fe, Ie = G > le, pe = $ || Ie;
1391
+ i().text.trim() && pe ? Q <= O ? (_.style.height = Q + "px", _.style.overflowY = "hidden") : (_.style.height = O + "px", _.style.overflowY = "auto", _.scrollTop = k) : (_.style.height = x + "px", _.style.overflowY = "hidden");
1392
1392
  });
1393
1393
  },
1394
1394
  { immediate: !0 }
@@ -1398,38 +1398,38 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1398
1398
  i().forceSend && (N(), c(!1));
1399
1399
  }
1400
1400
  );
1401
- const y = (p) => {
1402
- t("typing", p.target.value);
1403
- }, w = () => {
1401
+ const y = (_) => {
1402
+ t("typing", _.target.value);
1403
+ }, C = () => {
1404
1404
  _e(() => {
1405
- const p = r.value;
1406
- p && (p.style.height = "40px", p.style.overflowY = "hidden");
1405
+ const _ = r.value;
1406
+ _ && (_.style.height = "40px", _.style.overflowY = "hidden");
1407
1407
  });
1408
1408
  };
1409
1409
  me(() => {
1410
- w();
1410
+ C();
1411
1411
  });
1412
- const T = (p) => {
1413
- if (p.shiftKey) {
1412
+ const T = (_) => {
1413
+ if (_.shiftKey) {
1414
1414
  if (r.value instanceof HTMLTextAreaElement) {
1415
1415
  let k = r.value.selectionStart;
1416
1416
  k && (r.value.setRangeText(`
1417
1417
  `, k, k, "end"), s(r.value.value));
1418
1418
  }
1419
- p.preventDefault();
1420
- } else if (p.ctrlKey) {
1419
+ _.preventDefault();
1420
+ } else if (_.ctrlKey) {
1421
1421
  if (r.value instanceof HTMLTextAreaElement) {
1422
1422
  let k = r.value.selectionStart;
1423
1423
  k && (r.value.setRangeText(`
1424
1424
  `, k, k, "end"), s(r.value.value));
1425
1425
  }
1426
- p.preventDefault();
1426
+ _.preventDefault();
1427
1427
  } else
1428
- p.preventDefault(), N();
1428
+ _.preventDefault(), N();
1429
1429
  }, N = () => {
1430
1430
  var k, M;
1431
- const p = b(i());
1432
- if (p.value.text != "" || p.value.file) {
1431
+ const _ = b(i());
1432
+ if (_.value.text != "" || _.value.file) {
1433
1433
  const m = {
1434
1434
  type: "",
1435
1435
  text: "",
@@ -1438,10 +1438,10 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1438
1438
  size: "",
1439
1439
  reply: void 0
1440
1440
  };
1441
- p.value.file ? (m.type = "message." + p.value.file.type, m.url = p.value.file.url, m.filename = p.value.file.name, m.size = (k = p.value.file.size) == null ? void 0 : k.toString(), m.text = (M = p == null ? void 0 : p.value) == null ? void 0 : M.text.trim()) : (m.type = "message.text", m.text = p.value.text.trim()), p.value.reply && (m.reply = p.value.reply), t("send", m), a(), A.value = void 0, r.value && r.value.focus();
1441
+ _.value.file ? (m.type = "message." + _.value.file.type, m.url = _.value.file.url, m.filename = _.value.file.name, m.size = (k = _.value.file.size) == null ? void 0 : k.toString(), m.text = (M = _ == null ? void 0 : _.value) == null ? void 0 : M.text.trim()) : (m.type = "message.text", m.text = _.value.text.trim()), _.value.reply && (m.reply = _.value.reply), t("send", m), a(), A.value = void 0, r.value && r.value.focus();
1442
1442
  }
1443
1443
  };
1444
- return (p, k) => (l(), u("div", Zs, [
1444
+ return (_, k) => (l(), u("div", Zs, [
1445
1445
  o("div", {
1446
1446
  id: "chat-input-reply-line-" + D(n),
1447
1447
  class: "chat-input__reply-line"
@@ -1451,7 +1451,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1451
1451
  class: "chat-input__file-line"
1452
1452
  }, null, 8, Js),
1453
1453
  o("div", Gs, [
1454
- ie(p.$slots, "inline-buttons", {}, void 0, !0)
1454
+ ie(_.$slots, "inline-buttons", {}, void 0, !0)
1455
1455
  ]),
1456
1456
  e.disabledPlaceholder && (e.state == "disabled" || D(i)().isRecording) ? (l(), u("div", Xs, E(e.disabledPlaceholder), 1)) : ge((l(), u("textarea", {
1457
1457
  key: 1,
@@ -1467,16 +1467,16 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1467
1467
  [Cf, D(i)().text]
1468
1468
  ]),
1469
1469
  o("button", {
1470
- class: S(["chat-input__button", { "chat-input__button-disabled": _.value }]),
1470
+ class: S(["chat-input__button", { "chat-input__button-disabled": p.value }]),
1471
1471
  disabled: D(i)().isRecording,
1472
1472
  onClick: N
1473
1473
  }, [
1474
1474
  o("span", ti, [
1475
- (l(), B(Te(C.value), { color: h.value }, null, 8, ["color"]))
1475
+ (l(), B(Te(w.value), { color: h.value }, null, 8, ["color"]))
1476
1476
  ])
1477
1477
  ], 10, fi),
1478
1478
  o("div", ni, [
1479
- ie(p.$slots, "buttons", {}, void 0, !0)
1479
+ ie(_.$slots, "buttons", {}, void 0, !0)
1480
1480
  ])
1481
1481
  ]));
1482
1482
  }
@@ -1553,7 +1553,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1553
1553
  const g = () => {
1554
1554
  const m = D(i);
1555
1555
  d.value = m.scrollHeight > m.clientHeight;
1556
- }, _ = () => {
1556
+ }, p = () => {
1557
1557
  const m = D(i), I = m.scrollHeight - m.scrollTop - m.clientHeight;
1558
1558
  g(), m.scrollTop > 500 && (c.value = !0), m.scrollTop <= 500 && (c.value = !1), r.value ? I < 300 && (s.value = !0) : (I < 300 && (s.value = !0), I >= 300 && (s.value = !1));
1559
1559
  };
@@ -1582,14 +1582,14 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1582
1582
  },
1583
1583
  { immediate: !0 }
1584
1584
  );
1585
- const C = (m) => {
1585
+ const w = (m) => {
1586
1586
  const I = D(i);
1587
1587
  (m.offsetX > I.clientWidth || m.offsetY > I.clientHeight) && (r.value = !0);
1588
1588
  }, h = () => {
1589
1589
  r.value = !1;
1590
1590
  }, y = (m) => {
1591
1591
  n("expand", m);
1592
- }, w = (m) => {
1592
+ }, C = (m) => {
1593
1593
  t.chats.forEach((x) => {
1594
1594
  x.isSelected = !1, x.dialogs && x.dialogs.forEach((O) => {
1595
1595
  O.isSelected = !1;
@@ -1611,7 +1611,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1611
1611
  if (m.countUnread > I.countUnread) return -1;
1612
1612
  if (m.countUnread < I.countUnread) return 1;
1613
1613
  if (m.countUnread == I.countUnread) return 0;
1614
- }).filter((m) => t.filterQuery ? m.name.includes(t.filterQuery) || m.metadata.includes(t.filterQuery) : m.name.includes(a.value) || m.metadata.includes(a.value)), p = (m) => {
1614
+ }).filter((m) => t.filterQuery ? m.name.includes(t.filterQuery) || m.metadata.includes(t.filterQuery) : m.name.includes(a.value) || m.metadata.includes(a.value)), _ = (m) => {
1615
1615
  a.value = m;
1616
1616
  }, k = (m) => n("action", m), M = (m) => {
1617
1617
  n("tab-click", m);
@@ -1625,7 +1625,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1625
1625
  e.filterEnabled ? (l(), B(D(Il), {
1626
1626
  key: 0,
1627
1627
  class: "chat-list__filter",
1628
- onUpdate: p
1628
+ onUpdate: _
1629
1629
  })) : v("", !0),
1630
1630
  e.dialogTabs && e.dialogTabs.length > 0 ? (l(), B(ui, {
1631
1631
  key: 1,
@@ -1636,8 +1636,8 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1636
1636
  ref_key: "refChatList",
1637
1637
  ref: i,
1638
1638
  class: "chat-list__items",
1639
- onScroll: _,
1640
- onMousedown: C,
1639
+ onScroll: p,
1640
+ onMousedown: w,
1641
1641
  onMouseup: h
1642
1642
  }, [
1643
1643
  o("div", Ai, [
@@ -1647,7 +1647,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1647
1647
  chat: x,
1648
1648
  "show-dialogs": t.showDialogs,
1649
1649
  "has-scroll": d.value,
1650
- onSelect: w,
1650
+ onSelect: C,
1651
1651
  onExpand: y,
1652
1652
  onAction: k
1653
1653
  }, null, 8, ["chat", "show-dialogs", "has-scroll"]))), 128))
@@ -1659,7 +1659,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1659
1659
  chat: x,
1660
1660
  "show-dialogs": t.showDialogs,
1661
1661
  "has-scroll": d.value,
1662
- onSelect: w,
1662
+ onSelect: C,
1663
1663
  onExpand: y,
1664
1664
  onAction: k
1665
1665
  }, null, 8, ["chat", "show-dialogs", "has-scroll"]))), 128))
@@ -1671,7 +1671,7 @@ const Ws = /* @__PURE__ */ L(Ps, [["render", Hs]]), Zs = { class: "chat-input__c
1671
1671
  chat: x,
1672
1672
  "show-dialogs": t.showDialogs,
1673
1673
  "has-scroll": d.value,
1674
- onSelect: w,
1674
+ onSelect: C,
1675
1675
  onExpand: y,
1676
1676
  onAction: k
1677
1677
  }, null, 8, ["chat", "show-dialogs", "has-scroll"]))), 128))
@@ -1728,7 +1728,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1728
1728
  key: g.text,
1729
1729
  class: "keyboard__key",
1730
1730
  style: ce({ "box-shadow": "0px 0px 10px 5px " + g.color }),
1731
- onClick: (_) => r(g)
1731
+ onClick: (p) => r(g)
1732
1732
  }, [
1733
1733
  o("p", null, E(g.text), 1)
1734
1734
  ], 12, hi))), 128))
@@ -1750,7 +1750,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1750
1750
  },
1751
1751
  emits: ["action"],
1752
1752
  setup(e, { emit: f }) {
1753
- const t = e, n = f, a = P(() => [...t.buttons].sort((s, c) => s.order - c.order)), i = (s) => {
1753
+ const t = e, n = f, a = Y(() => [...t.buttons].sort((s, c) => s.order - c.order)), i = (s) => {
1754
1754
  typeof s.action == "function" ? s.action() : s.action != null && n("action", s.action);
1755
1755
  };
1756
1756
  return (s, c) => (l(), u("div", {
@@ -1833,34 +1833,34 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1833
1833
  "feedAction"
1834
1834
  ],
1835
1835
  setup(e, { emit: f }) {
1836
- const t = b(), n = b(), a = b(), i = b(!1), s = b(!1), c = b(!1), r = b(!1), d = b(!1), A = b(!1), g = b(!1), _ = b("");
1837
- let C = null;
1838
- const h = e, y = se("chatAppId"), { setReply: w, getMessage: T, resetReply: N } = Le(y), p = f, k = P(() => !!(s.value && h.objects.length > 0 && h.objects[h.objects.length - 1].keyboard)), M = (Q) => {
1839
- p("keyboardAction", Q);
1840
- }, m = (Q) => {
1841
- p("feedAction", Q);
1836
+ const t = b(), n = b(), a = b(), i = b(!1), s = b(!1), c = b(!1), r = b(!1), d = b(!1), A = b(!1), g = b(!1), p = b("");
1837
+ let w = null;
1838
+ const h = e, y = se("chatAppId"), { setReply: C, getMessage: T, resetReply: N } = Le(y), _ = f, k = Y(() => !!(s.value && h.objects.length > 0 && h.objects[h.objects.length - 1].keyboard)), M = (P) => {
1839
+ _("keyboardAction", P);
1840
+ }, m = (P) => {
1841
+ _("feedAction", P);
1842
1842
  };
1843
- function I(Q = !0) {
1843
+ function I(P = !0) {
1844
1844
  const H = D(n);
1845
1845
  let j = 0;
1846
1846
  a.value && (j = a.value.refKeyboard.clientHeight);
1847
- const Y = 100, q = H.scrollHeight - H.scrollTop - H.clientHeight;
1848
- q < Y + j ? (i.value = !1, s.value = !0) : (i.value = !0, s.value = !1), A.value ? (H.scrollTop < 300 && (d.value = !1, c.value = !1), q < 300 && (r.value = !1, d.value = !0)) : Q && (H.scrollTop < 300 && (c.value = !1), q < 300 && (r.value = !1)), ke(), g.value = !0, C && window.clearTimeout(C), C = window.setTimeout(() => {
1847
+ const F = 100, q = H.scrollHeight - H.scrollTop - H.clientHeight;
1848
+ q < F + j ? (i.value = !1, s.value = !0) : (i.value = !0, s.value = !1), A.value ? (H.scrollTop < 300 && (d.value = !1, c.value = !1), q < 300 && (r.value = !1, d.value = !0)) : P && (H.scrollTop < 300 && (c.value = !1), q < 300 && (r.value = !1)), ke(), g.value = !0, w && window.clearTimeout(w), w = window.setTimeout(() => {
1849
1849
  g.value = !1;
1850
1850
  }, 500);
1851
1851
  }
1852
1852
  ae(
1853
1853
  () => [r.value, c.value],
1854
1854
  () => {
1855
- r.value || p("loadMoreDown"), c.value || p("loadMore");
1855
+ r.value || _("loadMoreDown"), c.value || _("loadMore");
1856
1856
  }
1857
1857
  );
1858
- const x = (Q) => {
1858
+ const x = (P) => {
1859
1859
  const H = D(n);
1860
- (Q.offsetX > H.clientWidth || Q.offsetY > H.clientHeight) && (A.value = !0);
1860
+ (P.offsetX > H.clientWidth || P.offsetY > H.clientHeight) && (A.value = !0);
1861
1861
  }, O = () => {
1862
1862
  A.value = !1;
1863
- }, F = _i(() => I(), 250), ee = (Q) => ({
1863
+ }, Q = _i(() => I(), 250), ee = (P) => ({
1864
1864
  "message.text": L3,
1865
1865
  "message.image": k3,
1866
1866
  "message.file": A3,
@@ -1871,17 +1871,15 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1871
1871
  "message.delimiter": NA,
1872
1872
  "system.date": o4,
1873
1873
  "message.typing": gn
1874
- })[Q];
1874
+ })[P];
1875
1875
  function $() {
1876
1876
  _e(function() {
1877
- const Q = D(n);
1878
- Q && (Q.scrollTop = Q.scrollHeight, setTimeout(() => {
1879
- Q.scrollTop = Q.scrollHeight;
1880
- }, 300));
1877
+ const P = D(n);
1878
+ P.scrollTop = P.scrollHeight;
1881
1879
  });
1882
1880
  }
1883
1881
  function z() {
1884
- p("forceScrollToBottom"), $();
1882
+ _("forceScrollToBottom"), $();
1885
1883
  }
1886
1884
  ae(
1887
1885
  () => h.scrollToBottom,
@@ -1890,14 +1888,14 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1890
1888
  },
1891
1889
  { immediate: !0 }
1892
1890
  );
1893
- const G = (Q) => {
1894
- p("messageAction", Q);
1895
- }, te = (Q) => {
1896
- p("clickRepliedMessage", Q);
1897
- }, fe = (Q, H) => {
1898
- if (h.enableDoubleClickReply && (Q == null || Q.preventDefault(), H.type.indexOf("system") == -1 && H.type.indexOf("typing") == -1)) {
1891
+ const G = (P) => {
1892
+ _("messageAction", P);
1893
+ }, te = (P) => {
1894
+ _("clickRepliedMessage", P);
1895
+ }, fe = (P, H) => {
1896
+ if (h.enableDoubleClickReply && (P == null || P.preventDefault(), H.type.indexOf("system") == -1 && H.type.indexOf("typing") == -1)) {
1899
1897
  const j = document.getElementById("chat-input-reply-line-" + y);
1900
- j && (j.style.display = "inherit"), w({
1898
+ j && (j.style.display = "inherit"), C({
1901
1899
  messageId: H.messageId,
1902
1900
  type: H.type,
1903
1901
  text: H.text,
@@ -1909,11 +1907,11 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1909
1907
  }
1910
1908
  }, le = () => {
1911
1909
  N();
1912
- const Q = document.getElementById("chat-input-reply-line-" + y);
1913
- Q && (Q.style.display = "none");
1914
- }, Ie = (Q) => {
1915
- Q.forEach((H) => {
1916
- H.isIntersecting && p("messageVisible", JSON.parse(H.target.id));
1910
+ const P = document.getElementById("chat-input-reply-line-" + y);
1911
+ P && (P.style.display = "none");
1912
+ }, Ie = (P) => {
1913
+ P.forEach((H) => {
1914
+ H.isIntersecting && _("messageVisible", JSON.parse(H.target.id));
1917
1915
  });
1918
1916
  }, pe = {
1919
1917
  root: document.getElementById("feed-container-" + y),
@@ -1925,14 +1923,14 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1925
1923
  () => {
1926
1924
  _e(() => {
1927
1925
  if (c.value = !0, r.value = !0, I(!1), A.value) {
1928
- const Q = D(n);
1929
- d.value && (Q.scrollTop = Q.scrollHeight - 400), d.value || (Q.scrollTop = 400);
1926
+ const P = D(n);
1927
+ d.value && (P.scrollTop = P.scrollHeight - 400), d.value || (P.scrollTop = 400);
1930
1928
  }
1931
- if (t.value = document.querySelectorAll(".tracking-message"), t.value.forEach((Q) => $e.observe(Q)), h.scrollToBottom) {
1932
- const Q = D(n);
1933
- Q && (Q.scrollTop = Q.scrollHeight, setTimeout(() => {
1934
- Q.scrollTop = Q.scrollHeight;
1935
- }, 100));
1929
+ if (t.value = document.querySelectorAll(".tracking-message"), t.value.forEach((P) => $e.observe(P)), h.scrollToBottom) {
1930
+ const P = D(n);
1931
+ P && (P.scrollTop = P.scrollHeight, setTimeout(() => {
1932
+ P.scrollTop = P.scrollHeight;
1933
+ }, 500));
1936
1934
  }
1937
1935
  });
1938
1936
  },
@@ -1940,60 +1938,60 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
1940
1938
  ), ae(
1941
1939
  () => h.scrollTo,
1942
1940
  () => {
1943
- var Q;
1941
+ var P;
1944
1942
  if (h.scrollTo) {
1945
1943
  const H = h.scrollTo;
1946
- let j = document.getElementById(H), Y = document.getElementById("feed-container-" + y);
1947
- j instanceof HTMLElement && Y instanceof HTMLElement && (Y.scrollTop = j.offsetTop + j.clientHeight / 2 - Y.clientHeight / 2), (Q = document.getElementById(H)) == null || Q.children[0].classList.add("focused-message"), setTimeout(() => {
1944
+ let j = document.getElementById(H), F = document.getElementById("feed-container-" + y);
1945
+ j instanceof HTMLElement && F instanceof HTMLElement && (F.scrollTop = j.offsetTop + j.clientHeight / 2 - F.clientHeight / 2), (P = document.getElementById(H)) == null || P.children[0].classList.add("focused-message"), setTimeout(() => {
1948
1946
  var q;
1949
1947
  (q = document.getElementById(H)) == null || q.children[0].classList.remove("focused-message");
1950
1948
  }, 2e3);
1951
1949
  }
1952
1950
  }
1953
1951
  );
1954
- const Re = P(() => !h.objects || h.objects.length === 0 ? [] : h.objects.map((Q, H, j) => {
1955
- const Y = H > 0 && j[H - 1].position === Q.position && j[H - 1].header === Q.header, q = H > 0 && !["message.system", "message.typing"].includes(j[H - 1].type);
1952
+ const Re = Y(() => !h.objects || h.objects.length === 0 ? [] : h.objects.map((P, H, j) => {
1953
+ const F = H > 0 && j[H - 1].position === P.position && j[H - 1].header === P.header, q = H > 0 && !["message.system", "message.typing"].includes(j[H - 1].type);
1956
1954
  return {
1957
- ...Q,
1958
- isFirstInSeries: !Y || !q
1955
+ ...P,
1956
+ isFirstInSeries: !F || !q
1959
1957
  };
1960
1958
  }));
1961
1959
  function ke() {
1962
- const Q = D(n);
1963
- if (!Q || !t.value) return;
1964
- const H = Q.getBoundingClientRect().top;
1960
+ const P = D(n);
1961
+ if (!P || !t.value) return;
1962
+ const H = P.getBoundingClientRect().top;
1965
1963
  let j = null;
1966
- for (const Y of t.value) {
1967
- const q = Y.getBoundingClientRect();
1964
+ for (const F of t.value) {
1965
+ const q = F.getBoundingClientRect();
1968
1966
  if (q.top <= H + 1 && q.bottom > H) {
1969
- j = Y;
1967
+ j = F;
1970
1968
  break;
1971
1969
  }
1972
1970
  }
1973
1971
  if (!j) {
1974
- for (const Y of t.value)
1975
- if (Y.getBoundingClientRect().top >= H) {
1976
- j = Y;
1972
+ for (const F of t.value)
1973
+ if (F.getBoundingClientRect().top >= H) {
1974
+ j = F;
1977
1975
  break;
1978
1976
  }
1979
1977
  }
1980
1978
  if (j)
1981
1979
  try {
1982
- const Y = JSON.parse(j.id);
1983
- if (!Y || !Y.timestamp) return;
1984
- const q = new Date(Number(Y.timestamp) * 1e3);
1985
- _.value = q.toLocaleDateString();
1980
+ const F = JSON.parse(j.id);
1981
+ if (!F || !F.timestamp) return;
1982
+ const q = new Date(Number(F.timestamp) * 1e3);
1983
+ p.value = q.toLocaleDateString();
1986
1984
  } catch {
1987
1985
  }
1988
1986
  }
1989
- return (Q, H) => (l(), u(Z, null, [
1987
+ return (P, H) => (l(), u(Z, null, [
1990
1988
  e.objects.length > 0 || e.typing ? (l(), u("div", {
1991
1989
  key: 0,
1992
1990
  id: "feed-container-" + D(y),
1993
1991
  ref_key: "refFeed",
1994
1992
  ref: n,
1995
1993
  class: "message-feed",
1996
- onScroll: H[0] || (H[0] = (j) => D(F)()),
1994
+ onScroll: H[0] || (H[0] = (j) => D(Q)()),
1997
1995
  onMousedown: x,
1998
1996
  onMouseup: O
1999
1997
  }, [
@@ -2002,19 +2000,19 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2002
2000
  g.value ? (l(), B(D(IA), {
2003
2001
  key: 0,
2004
2002
  class: "message-feed__sticky-date",
2005
- text: _.value
2003
+ text: p.value
2006
2004
  }, null, 8, ["text"])) : v("", !0)
2007
2005
  ]),
2008
2006
  _: 1
2009
2007
  }),
2010
- (l(!0), u(Z, null, oe(Re.value, (j, Y) => (l(), u("div", {
2008
+ (l(!0), u(Z, null, oe(Re.value, (j, F) => (l(), u("div", {
2011
2009
  id: JSON.stringify(j),
2012
- key: `${j.messageId ?? "mid"}-${Y}`,
2010
+ key: `${j.messageId ?? "mid"}-${F}`,
2013
2011
  class: "tracking-message",
2014
2012
  onDblclick: (q) => fe(q, j)
2015
2013
  }, [
2016
2014
  (l(), B(Te(ee(j.type)), {
2017
- key: `${j.messageId ?? "mid"}-${Y}`,
2015
+ key: `${j.messageId ?? "mid"}-${F}`,
2018
2016
  class: "message-feed__message",
2019
2017
  message: j,
2020
2018
  "apply-style": e.applyStyle,
@@ -2070,7 +2068,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2070
2068
  class: "message-feed"
2071
2069
  }, [
2072
2070
  o("div", Di, [
2073
- ie(Q.$slots, "empty-feed", {}, void 0, !0)
2071
+ ie(P.$slots, "empty-feed", {}, void 0, !0)
2074
2072
  ])
2075
2073
  ], 512)),
2076
2074
  D(T)().reply ? (l(), B(ye, {
@@ -2085,7 +2083,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2085
2083
  ], 8, ["to"])) : v("", !0)
2086
2084
  ], 64));
2087
2085
  }
2088
- }), p6 = /* @__PURE__ */ L(xi, [["__scopeId", "data-v-cf601027"]]), Ni = {
2086
+ }), p6 = /* @__PURE__ */ L(xi, [["__scopeId", "data-v-2cba246a"]]), Ni = {
2089
2087
  key: 0,
2090
2088
  class: "profile__container"
2091
2089
  }, Ti = {
@@ -2185,13 +2183,13 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2185
2183
  emits: ["reset"],
2186
2184
  setup(e, { emit: f }) {
2187
2185
  const t = se("chatAppId"), { getTheme: n } = Oe(t), a = f, i = b(), s = b(), c = b(!1), r = b(0), d = b(0), A = b(!1), g = () => A.value = !1;
2188
- function _() {
2186
+ function p() {
2189
2187
  i.value && (c.value ? i.value.pause() : i.value.play(), c.value = !c.value);
2190
2188
  }
2191
- const C = (w) => {
2192
- const T = Math.floor(w / 60), N = Math.floor(w % 60);
2189
+ const w = (C) => {
2190
+ const T = Math.floor(C / 60), N = Math.floor(C % 60);
2193
2191
  return `${T.toString().padStart(2, "0")}:${N.toString().padStart(2, "0")}`;
2194
- }, h = P(() => i.value ? C(d.value) : "0:00"), y = P(() => i.value || s.value ? C(r.value) : "0:00");
2192
+ }, h = Y(() => i.value ? w(d.value) : "0:00"), y = Y(() => i.value || s.value ? w(r.value) : "0:00");
2195
2193
  return me(() => {
2196
2194
  i.value != null && (i.value.addEventListener("loadedmetadata", () => {
2197
2195
  i.value != null && (i.value.duration == 1 / 0 || Number.isNaN(i.value.duration)) && (i.value.currentTime = 1e101, i.value.addEventListener("timeupdate", () => {
@@ -2204,7 +2202,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2204
2202
  s.value && (s.value.currentTime = 0, r.value = s.value.duration);
2205
2203
  }, { once: !0 })));
2206
2204
  });
2207
- }), (w, T) => (l(), u("div", Bi, [
2205
+ }), (C, T) => (l(), u("div", Bi, [
2208
2206
  o("div", $i, [
2209
2207
  e.fileInfo.isImage ? (l(), u("div", {
2210
2208
  key: 0,
@@ -2245,7 +2243,7 @@ const hi = ["onClick"], vi = /* @__PURE__ */ K({
2245
2243
  }, null, 8, Yi),
2246
2244
  o("button", {
2247
2245
  class: "preview__audio-control",
2248
- onClick: _
2246
+ onClick: p
2249
2247
  }, [
2250
2248
  ge(o("span", Pi, null, 512), [
2251
2249
  [ze, !c.value]
@@ -2373,21 +2371,21 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2373
2371
  },
2374
2372
  emits: ["fileUploaded"],
2375
2373
  setup(e, { emit: f }) {
2376
- const t = e, n = b(""), a = b(), i = b(), s = se("chatAppId"), { setMessageFile: c, resetMessageFile: r, getMessage: d, setRecordingMessage: A } = Le(s), g = P(() => !d().file), _ = () => {
2374
+ const t = e, n = b(""), a = b(), i = b(), s = se("chatAppId"), { setMessageFile: c, resetMessageFile: r, getMessage: d, setRecordingMessage: A } = Le(s), g = Y(() => !d().file), p = () => {
2377
2375
  const N = document.getElementById("chat-input-file-line-" + s);
2378
2376
  N && (N.style.display = "none"), r(), i.value = void 0, n.value = "";
2379
- }, C = async () => {
2380
- var N, p;
2381
- _(), (N = a.value) != null && N.files && T((p = a.value) == null ? void 0 : p.files[0]);
2377
+ }, w = async () => {
2378
+ var N, _;
2379
+ p(), (N = a.value) != null && N.files && T((_ = a.value) == null ? void 0 : _.files[0]);
2382
2380
  }, h = (N) => {
2383
2381
  a.value && g && (a.value.accept = N.action, a.value.click());
2384
2382
  }, y = () => {
2385
2383
  a.value && g && t.state == "active" && a.value.click();
2386
- }, w = async (N) => {
2384
+ }, C = async (N) => {
2387
2385
  var k;
2388
- const p = (k = N.clipboardData) == null ? void 0 : k.items;
2389
- if (p) {
2390
- for (let M of p)
2386
+ const _ = (k = N.clipboardData) == null ? void 0 : k.items;
2387
+ if (_) {
2388
+ for (let M of _)
2391
2389
  if (M.type.indexOf("image") !== -1) {
2392
2390
  N.preventDefault();
2393
2391
  const m = M.getAsFile();
@@ -2396,8 +2394,8 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2396
2394
  }
2397
2395
  }, T = async (N) => {
2398
2396
  n.value = "uploading", A(!0);
2399
- const p = typeof t.filebumpUrl == "string" ? t.filebumpUrl : null;
2400
- await W1(p, N).then((k) => {
2397
+ const _ = typeof t.filebumpUrl == "string" ? t.filebumpUrl : null;
2398
+ await W1(_, N).then((k) => {
2401
2399
  if (A(!1), n.value = k.status, k.status == "success") {
2402
2400
  c({
2403
2401
  url: k.url,
@@ -2418,11 +2416,11 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2418
2416
  });
2419
2417
  };
2420
2418
  return me(() => {
2421
- window.addEventListener("paste", w);
2422
- }), (N, p) => (l(), u(Z, null, [
2423
- n.value === "uploading" ? (l(), u("div", uo, p[0] || (p[0] = [
2419
+ window.addEventListener("paste", C);
2420
+ }), (N, _) => (l(), u(Z, null, [
2421
+ n.value === "uploading" ? (l(), u("div", uo, _[0] || (_[0] = [
2424
2422
  o("p", null, "Загрузка файла...", -1)
2425
- ]))) : n.value === "error" ? (l(), u("div", co, p[1] || (p[1] = [
2423
+ ]))) : n.value === "error" ? (l(), u("div", co, _[1] || (_[1] = [
2426
2424
  o("p", null, "Ошибка при загрузке файла.", -1)
2427
2425
  ]))) : v("", !0),
2428
2426
  o("span", {
@@ -2438,7 +2436,7 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2438
2436
  ref: a,
2439
2437
  style: { display: "none" },
2440
2438
  type: "file",
2441
- onChange: C
2439
+ onChange: w
2442
2440
  }, null, 544),
2443
2441
  D(d)().file ? (l(), B(ye, {
2444
2442
  key: 2,
@@ -2447,7 +2445,7 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2447
2445
  i.value ? (l(), B(H1, {
2448
2446
  key: 0,
2449
2447
  "file-info": i.value,
2450
- onReset: _
2448
+ onReset: p
2451
2449
  }, null, 8, ["file-info"])) : v("", !0)
2452
2450
  ], 8, ["to"])) : v("", !0)
2453
2451
  ], 64));
@@ -2479,8 +2477,8 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2479
2477
  o("select", {
2480
2478
  onChange: A[0] || (A[0] = (g) => c(g))
2481
2479
  }, [
2482
- (l(!0), u(Z, null, oe(t.themes, (g, _) => (l(), u("option", {
2483
- key: _,
2480
+ (l(!0), u(Z, null, oe(t.themes, (g, p) => (l(), u("option", {
2481
+ key: p,
2484
2482
  value: g.code,
2485
2483
  selected: g.default === !0
2486
2484
  }, E(g.name), 9, mo))), 128))
@@ -2512,18 +2510,18 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2512
2510
  },
2513
2511
  emits: ["click", "buttonClick", "menuMouseEnter", "menuMouseLeave"],
2514
2512
  setup(e, { expose: f, emit: t }) {
2515
- const n = se("chatAppId"), a = se("extChatAppId"), { getTheme: i } = Oe(n), s = e, c = P1(), r = t, d = b(), A = b(), g = b(!1), _ = (M) => {
2516
- p(), r("click", M);
2517
- }, C = () => {
2518
- s.disabled || (s.mode == "click" && !g.value ? N() : s.mode == "click" && g.value && p(), r("buttonClick"));
2513
+ const n = se("chatAppId"), a = se("extChatAppId"), { getTheme: i } = Oe(n), s = e, c = P1(), r = t, d = b(), A = b(), g = b(!1), p = (M) => {
2514
+ _(), r("click", M);
2515
+ }, w = () => {
2516
+ s.disabled || (s.mode == "click" && !g.value ? N() : s.mode == "click" && g.value && _(), r("buttonClick"));
2519
2517
  }, h = () => {
2520
2518
  s.disabled || s.mode == "hover" && N();
2521
2519
  }, y = () => {
2522
- s.disabled || s.mode == "hover" && p();
2523
- }, w = () => {
2520
+ s.disabled || s.mode == "hover" && _();
2521
+ }, C = () => {
2524
2522
  r("menuMouseEnter"), s.disabled || s.mode == "hover" && N();
2525
2523
  }, T = () => {
2526
- r("menuMouseLeave"), s.disabled || s.mode == "hover" && p();
2524
+ r("menuMouseLeave"), s.disabled || s.mode == "hover" && _();
2527
2525
  }, N = () => {
2528
2526
  if (A.value && d.value) {
2529
2527
  const M = d.value, m = A.value.getBoundingClientRect();
@@ -2540,23 +2538,23 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2540
2538
  M.style.top = x[s.menuSide].top + "px", M.style.left = x[s.menuSide].left + "px", M.style.opacity = "1", M.style.display = "inherit", g.value = !0;
2541
2539
  });
2542
2540
  }
2543
- }, p = () => {
2541
+ }, _ = () => {
2544
2542
  if (d.value) {
2545
2543
  const M = d.value;
2546
2544
  M && (M.style.top = "0", M.style.left = "0", M.style.opacity = "0", M.style.display = "none", g.value = !1);
2547
2545
  }
2548
2546
  }, k = (M) => {
2549
- s.mode == "click" && A.value && !A.value.contains(M.target) && p();
2547
+ s.mode == "click" && A.value && !A.value.contains(M.target) && _();
2550
2548
  };
2551
2549
  return me(() => {
2552
2550
  _e(() => {
2553
- d.value = document.getElementById("context-menu-" + c + a), d.value && (p(), document.addEventListener("click", k));
2551
+ d.value = document.getElementById("context-menu-" + c + a), d.value && (_(), document.addEventListener("click", k));
2554
2552
  });
2555
2553
  }), Af(() => {
2556
2554
  document.removeEventListener("click", k);
2557
2555
  }), f({
2558
2556
  updatePosition: N,
2559
- hideMenu: p
2557
+ hideMenu: _
2560
2558
  }), (M, m) => (l(), u("button", {
2561
2559
  id: "container-" + D(c) + D(a),
2562
2560
  ref_key: "actionScope",
@@ -2565,7 +2563,7 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2565
2563
  onMouseenter: h,
2566
2564
  onMouseleave: y
2567
2565
  }, [
2568
- o("div", { onClick: C }, [
2566
+ o("div", { onClick: w }, [
2569
2567
  ie(M.$slots, "default")
2570
2568
  ]),
2571
2569
  (l(), B(ye, { to: "body" }, [
@@ -2573,9 +2571,9 @@ const lo = /* @__PURE__ */ L(so, [["render", oo]]), uo = { key: 0 }, co = { key:
2573
2571
  id: "context-menu-" + D(c) + D(a),
2574
2572
  actions: e.actions,
2575
2573
  "data-theme": D(i)().theme ? D(i)().theme : "light",
2576
- onMouseenter: w,
2574
+ onMouseenter: C,
2577
2575
  onMouseleave: T,
2578
- onClick: _
2576
+ onClick: p
2579
2577
  }, null, 8, ["id", "actions", "data-theme"])
2580
2578
  ]))
2581
2579
  ], 40, _o));
@@ -2609,17 +2607,18 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2609
2607
  }
2610
2608
  },
2611
2609
  setup(e) {
2612
- const f = se("chatAppId"), { getTheme: t } = Oe(f), n = b(), a = b(), i = b(!1), s = e, c = P(() => ({
2610
+ const f = se("chatAppId"), { getTheme: t } = Oe(f), n = b(), a = b(), i = b(!1), s = e, c = Y(() => ({
2613
2611
  tooltip__text: !0,
2614
2612
  [`tooltip--${s.position}`]: !0
2615
2613
  })), r = () => {
2616
2614
  i.value = !0, _e(() => {
2617
2615
  if (n.value && a.value) {
2618
- const A = a.value, g = n.value.getBoundingClientRect(), _ = a.value.getBoundingClientRect(), C = _.left < 0 ? _.left : 0, h = _.top < 0 ? _.top : 0, y = {
2619
- left: { top: g.top - (_.height - g.height) / 2 - h, left: (g == null ? void 0 : g.left) - _.width - C - s.offset },
2620
- right: { top: g.top - (_.height - g.height) / 2 - h, left: (g == null ? void 0 : g.left) + g.width - C + s.offset },
2621
- bottom: { top: (g == null ? void 0 : g.bottom) - h + s.offset, left: (g == null ? void 0 : g.left) - C },
2622
- top: { top: g.top - _.height - s.offset - h, left: (g == null ? void 0 : g.left) - C }
2616
+ const A = a.value, g = n.value.getBoundingClientRect(), p = a.value.getBoundingClientRect(), w = p.left < 0 ? p.left : 0, h = p.top < 0 ? p.top : 0, y = {
2617
+ left: { top: g.top - (p.height - g.height) / 2 - h, left: (g == null ? void 0 : g.left) - p.width - w - s.offset },
2618
+ right: { top: g.top - (p.height - g.height) / 2 - h, left: (g == null ? void 0 : g.left) + g.width - w + s.offset },
2619
+ bottom: { top: (g == null ? void 0 : g.bottom) - h + s.offset, left: (g == null ? void 0 : g.left) - w },
2620
+ "bottom-left": { top: (g == null ? void 0 : g.bottom) - h + s.offset, left: (g == null ? void 0 : g.left) + g.width - p.width - w },
2621
+ top: { top: g.top - p.height - s.offset - h, left: (g == null ? void 0 : g.left) - w }
2623
2622
  };
2624
2623
  A.style.top = y[s.position].top + "px", A.style.left = y[s.position].left + "px";
2625
2624
  }
@@ -2656,7 +2655,7 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2656
2655
  ]))
2657
2656
  ], 64));
2658
2657
  }
2659
- }), tf = /* @__PURE__ */ L(wo, [["__scopeId", "data-v-8e26dccb"]]), Co = { class: "sidebar__scroll-container" }, Io = ["onClick"], ko = ["src", "alt"], Do = { key: 0 }, xo = ["onClick"], No = ["src", "alt"], To = ["src"], Eo = { key: 2 }, jo = { class: "sidebar__settings-container" }, So = { class: "sidebar__settings-btn" }, Vo = {
2658
+ }), tf = /* @__PURE__ */ L(wo, [["__scopeId", "data-v-71d6213d"]]), Co = { class: "sidebar__scroll-container" }, Io = ["onClick"], ko = ["src", "alt"], Do = { key: 0 }, xo = ["onClick"], No = ["src", "alt"], To = ["src"], Eo = { key: 2 }, jo = { class: "sidebar__settings-container" }, So = { class: "sidebar__settings-btn" }, Vo = {
2660
2659
  __name: "SideBar",
2661
2660
  props: {
2662
2661
  sidebarItems: {
@@ -2677,9 +2676,9 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2677
2676
  },
2678
2677
  emits: ["selectItem"],
2679
2678
  setup(e, { emit: f }) {
2680
- const t = e, n = Pt(t, "sidebarItems"), a = Pt(t, "menuActions"), i = f, s = P(
2679
+ const t = e, n = Pt(t, "sidebarItems"), a = Pt(t, "menuActions"), i = f, s = Y(
2681
2680
  () => n.value.filter((m) => m.isFixedBottom).sort((m, I) => I.notificationCount - m.notificationCount)
2682
- ), c = P(
2681
+ ), c = Y(
2683
2682
  () => n.value.filter((m) => !m.isFixedBottom).sort((m, I) => I.notificationCount - m.notificationCount)
2684
2683
  ), r = (m) => {
2685
2684
  const I = n.value.find((x) => x.itemId === m);
@@ -2691,52 +2690,52 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2691
2690
  return I.length > 2 ? I.slice(0, 2).join(" ") : m;
2692
2691
  }, g = (m) => {
2693
2692
  console.log("Выбрано действие:", m), typeof m.action == "function" && m.action();
2694
- }, _ = () => {
2693
+ }, p = () => {
2695
2694
  console.log("Кнопка меню была нажата");
2696
- }, C = b(null), h = b(!1), y = b(0), w = b(40), T = b(!1), N = (m) => {
2697
- const I = C.value;
2695
+ }, w = b(null), h = b(!1), y = b(0), C = b(40), T = b(!1), N = (m) => {
2696
+ const I = w.value;
2698
2697
  if (!I || !m) return 0;
2699
- const x = I.getBoundingClientRect(), O = m.getBoundingClientRect(), ee = O.top + O.height / 2 - x.top - w.value / 2;
2698
+ const x = I.getBoundingClientRect(), O = m.getBoundingClientRect(), ee = O.top + O.height / 2 - x.top - C.value / 2;
2700
2699
  return Math.max(0, ee);
2701
- }, p = () => {
2702
- if (!C.value) return;
2703
- const I = C.value.querySelector(".sidebar__image--active");
2700
+ }, _ = () => {
2701
+ if (!w.value) return;
2702
+ const I = w.value.querySelector(".sidebar__image--active");
2704
2703
  I ? (y.value = N(I), h.value = !0) : h.value = !1;
2705
2704
  }, k = (m) => {
2706
2705
  try {
2707
- if (!m || !C.value) return;
2706
+ if (!m || !w.value) return;
2708
2707
  const I = m.querySelector(".sidebar__image");
2709
2708
  if (!I) return;
2710
- const x = N(I), O = 12, F = 160;
2711
- T.value = !0, w.value = O, setTimeout(() => {
2709
+ const x = N(I), O = 12, Q = 160;
2710
+ T.value = !0, C.value = O, setTimeout(() => {
2712
2711
  y.value = x, requestAnimationFrame(() => {
2713
- w.value = 40, setTimeout(() => {
2712
+ C.value = 40, setTimeout(() => {
2714
2713
  T.value = !1;
2715
- }, F);
2714
+ }, Q);
2716
2715
  });
2717
- }, F);
2716
+ }, Q);
2718
2717
  } catch {
2719
2718
  }
2720
- }, M = () => p();
2719
+ }, M = () => _();
2721
2720
  return me(() => {
2722
2721
  var I;
2723
- _e(p), window.addEventListener("resize", M);
2724
- const m = (I = C.value) == null ? void 0 : I.querySelector(".sidebar__scroll-container");
2725
- m && m.addEventListener("scroll", p);
2722
+ _e(_), window.addEventListener("resize", M);
2723
+ const m = (I = w.value) == null ? void 0 : I.querySelector(".sidebar__scroll-container");
2724
+ m && m.addEventListener("scroll", _);
2726
2725
  }), Af(() => {
2727
2726
  var I;
2728
2727
  window.removeEventListener("resize", M);
2729
- const m = (I = C.value) == null ? void 0 : I.querySelector(".sidebar__scroll-container");
2730
- m && m.removeEventListener("scroll", p);
2731
- }), ae(() => n.value.map((m) => m.selected), () => _e(p)), (m, I) => (l(), u("div", {
2728
+ const m = (I = w.value) == null ? void 0 : I.querySelector(".sidebar__scroll-container");
2729
+ m && m.removeEventListener("scroll", _);
2730
+ }), ae(() => n.value.map((m) => m.selected), () => _e(_)), (m, I) => (l(), u("div", {
2732
2731
  ref_key: "containerRef",
2733
- ref: C,
2732
+ ref: w,
2734
2733
  class: S(["sidebar__container", { "sidebar-horizontal__container": e.horizontal }])
2735
2734
  }, [
2736
2735
  !e.horizontal && h.value ? (l(), u("span", {
2737
2736
  key: 0,
2738
2737
  class: S(["sidebar__selected-bar", { "is-animating": T.value }]),
2739
- style: ce({ top: y.value + "px", height: w.value + "px" })
2738
+ style: ce({ top: y.value + "px", height: C.value + "px" })
2740
2739
  }, null, 6)) : v("", !0),
2741
2740
  o("div", Co, [
2742
2741
  o("ul", {
@@ -2745,7 +2744,7 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2745
2744
  (l(!0), u(Z, null, oe(s.value, (x, O) => (l(), u("li", {
2746
2745
  key: O,
2747
2746
  class: S(["sidebar__item-fixed", { "sidebar-horizontal__item": e.horizontal }]),
2748
- onClick: (F) => d(F, x.itemId)
2747
+ onClick: (Q) => d(Q, x.itemId)
2749
2748
  }, [
2750
2749
  x.name ? (l(), B(tf, {
2751
2750
  key: 0,
@@ -2776,7 +2775,7 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2776
2775
  (l(!0), u(Z, null, oe(c.value, (x, O) => (l(), u("li", {
2777
2776
  key: O,
2778
2777
  class: S(["sidebar__item", { "sidebar-horizontal__item": e.horizontal }]),
2779
- onClick: (F) => d(F, x.itemId)
2778
+ onClick: (Q) => d(Q, x.itemId)
2780
2779
  }, [
2781
2780
  x.name ? (l(), B(tf, {
2782
2781
  key: 0,
@@ -2814,7 +2813,7 @@ const yo = /* @__PURE__ */ L(ho, [["render", bo]]), Mo = ["data-theme"], wo = /*
2814
2813
  mode: "click",
2815
2814
  "menu-side": "top-right",
2816
2815
  onClick: g,
2817
- onButtonClick: _
2816
+ onButtonClick: p
2818
2817
  }, {
2819
2818
  default: J(() => [
2820
2819
  o("button", So, [
@@ -2949,18 +2948,18 @@ const C6 = (e, f = null) => {
2949
2948
  const a = (A) => new Date(A.getFullYear(), A.getMonth(), A.getDate()).getTime(), i = /* @__PURE__ */ new Date(), s = a(i), c = new Date(i);
2950
2949
  c.setDate(c.getDate() - 1);
2951
2950
  const r = a(c), d = (A) => {
2952
- const g = new Date(A * 1e3), _ = a(g);
2953
- return _ === s ? "Сегодня" : _ === r ? "Вчера" : g.toLocaleDateString();
2951
+ const g = new Date(A * 1e3), p = a(g);
2952
+ return p === s ? "Сегодня" : p === r ? "Вчера" : g.toLocaleDateString();
2954
2953
  };
2955
2954
  f !== null && (n = d(f));
2956
2955
  for (let A = 0; A < e.length; A++) {
2957
- const g = e[A], _ = d(g.timestamp);
2958
- _ !== n && (t.push({
2956
+ const g = e[A], p = d(g.timestamp);
2957
+ p !== n && (t.push({
2959
2958
  isSeparator: !0,
2960
- day: _,
2961
- text: _,
2959
+ day: p,
2960
+ text: p,
2962
2961
  type: "system.date"
2963
- }), n = _), t.push(g);
2962
+ }), n = p), t.push(g);
2964
2963
  }
2965
2964
  return t;
2966
2965
  }, I6 = async () => {
@@ -3033,22 +3032,22 @@ const C6 = (e, f = null) => {
3033
3032
  setup(e, { emit: f }) {
3034
3033
  const t = e, n = f, a = b(!1), i = b(!1), s = () => {
3035
3034
  i.value = !0;
3036
- }, c = (p) => {
3037
- i.value || p.target instanceof HTMLElement && p.target.id != "noSelectButton" && n("select", { chat: t.chat, dialog: null }), i.value = !1;
3038
- }, r = (p) => {
3039
- n("select", { chat: t.chat, dialog: p });
3035
+ }, c = (_) => {
3036
+ i.value || _.target instanceof HTMLElement && _.target.id != "noSelectButton" && n("select", { chat: t.chat, dialog: null }), i.value = !1;
3037
+ }, r = (_) => {
3038
+ n("select", { chat: t.chat, dialog: _ });
3040
3039
  }, d = () => {
3041
- const p = [];
3042
- return t.chat.isSelected && p.push("chat-item__selected"), t.hasScroll && p.push("chat-item__with-scroll"), p.join(" ");
3043
- }, A = (p) => p.isSelected ? "dialog__selected" : "", g = (p) => {
3044
- n("action", { chat: t.chat, ...p });
3045
- }, _ = () => t.chat.dialogs.toSorted((p, k) => {
3046
- if (Number(p["lastActivity.timestamp"]) > Number(k["lastActivity.timestamp"])) return -1;
3047
- if (Number(p["lastActivity.timestamp"]) < Number(k["lastActivity.timestamp"])) return 1;
3048
- if (Number(p["lastActivity.timestamp"]) == Number(k["lastActivity.timestamp"])) return 0;
3049
- }), C = P(() => kf(t.chat["lastMessage.status"]));
3040
+ const _ = [];
3041
+ return t.chat.isSelected && _.push("chat-item__selected"), t.hasScroll && _.push("chat-item__with-scroll"), _.join(" ");
3042
+ }, A = (_) => _.isSelected ? "dialog__selected" : "", g = (_) => {
3043
+ n("action", { chat: t.chat, ..._ });
3044
+ }, p = () => t.chat.dialogs.toSorted((_, k) => {
3045
+ if (Number(_["lastActivity.timestamp"]) > Number(k["lastActivity.timestamp"])) return -1;
3046
+ if (Number(_["lastActivity.timestamp"]) < Number(k["lastActivity.timestamp"])) return 1;
3047
+ if (Number(_["lastActivity.timestamp"]) == Number(k["lastActivity.timestamp"])) return 0;
3048
+ }), w = Y(() => kf(t.chat["lastMessage.status"]));
3050
3049
  let h;
3051
- const y = b(0), w = [Ee("component.ChatItem.typing") + ".", Ee("component.ChatItem.typing") + "..", Ee("component.ChatItem.typing") + "..."], T = P(() => t.chat.typing ? w[y.value] : t.chat.lastMessage);
3050
+ const y = b(0), C = [Ee("component.ChatItem.typing") + ".", Ee("component.ChatItem.typing") + "..", Ee("component.ChatItem.typing") + "..."], T = Y(() => t.chat.typing ? C[y.value] : t.chat.lastMessage);
3052
3051
  ae(
3053
3052
  () => t.chat.typing,
3054
3053
  () => {
@@ -3058,11 +3057,11 @@ const C6 = (e, f = null) => {
3058
3057
  },
3059
3058
  { immediate: !0 }
3060
3059
  );
3061
- const N = (p) => {
3060
+ const N = (_) => {
3062
3061
  var k;
3063
- ((k = p.relatedTarget) == null ? void 0 : k.className) == "context-menu__list" ? a.value = !0 : a.value = !1;
3062
+ ((k = _.relatedTarget) == null ? void 0 : k.className) == "context-menu__list" ? a.value = !0 : a.value = !1;
3064
3063
  };
3065
- return (p, k) => (l(), u("div", null, [
3064
+ return (_, k) => (l(), u("div", null, [
3066
3065
  o("div", {
3067
3066
  class: S(["chat-item__container", d()]),
3068
3067
  onMouseenter: k[2] || (k[2] = (M) => a.value = !0),
@@ -3124,7 +3123,7 @@ const C6 = (e, f = null) => {
3124
3123
  e.chat.countUnread < 1 ? (l(), u("div", sl, [
3125
3124
  D(If).includes(e.chat["lastMessage.status"]) ? (l(), u("div", {
3126
3125
  key: 0,
3127
- class: S(["chat-item__status-message", C.value])
3126
+ class: S(["chat-item__status-message", w.value])
3128
3127
  }, [
3129
3128
  e.chat["lastMessage.status"] !== "sent" ? (l(), u("span", il)) : v("", !0),
3130
3129
  k[4] || (k[4] = o("span", { class: "pi pi-check" }, null, -1))
@@ -3155,7 +3154,7 @@ const C6 = (e, f = null) => {
3155
3154
  key: 0,
3156
3155
  class: S(["dialog__container", { "dialog__container--with-scroll": t.hasScroll }])
3157
3156
  }, [
3158
- (l(!0), u(Z, null, oe(_(), (M) => (l(), u("div", {
3157
+ (l(!0), u(Z, null, oe(p(), (M) => (l(), u("div", {
3159
3158
  key: M.dialogId,
3160
3159
  class: S(["dialog__item", A(M)]),
3161
3160
  onClick: (m) => r(M)
@@ -3335,20 +3334,20 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3335
3334
  attributeId: a.value,
3336
3335
  channelId: y.channelId
3337
3336
  });
3338
- }, r = (y) => (y == null ? void 0 : y.replace(/\D/g, "")) || "", d = P(() => {
3337
+ }, r = (y) => (y == null ? void 0 : y.replace(/\D/g, "")) || "", d = Y(() => {
3339
3338
  var y;
3340
- return (y = t.contact.attributes) == null ? void 0 : y.find((w) => w.id === a.value);
3341
- }), A = P(() => {
3339
+ return (y = t.contact.attributes) == null ? void 0 : y.find((C) => C.id === a.value);
3340
+ }), A = Y(() => {
3342
3341
  if (i.value)
3343
3342
  return i.value;
3344
3343
  if (!d.value) return t.channels[0] || null;
3345
3344
  const y = r(d.value.value);
3346
3345
  return y ? t.channels.find((T) => {
3347
3346
  var m, I;
3348
- const N = ((m = T.title) == null ? void 0 : m.toLowerCase()) || "", p = ((I = T.channelId) == null ? void 0 : I.toLowerCase()) || "", k = N.includes(y), M = ["whatsapp", "waba", "telegram"].some((x) => p.includes(x));
3347
+ const N = ((m = T.title) == null ? void 0 : m.toLowerCase()) || "", _ = ((I = T.channelId) == null ? void 0 : I.toLowerCase()) || "", k = N.includes(y), M = ["whatsapp", "waba", "telegram"].some((x) => _.includes(x));
3349
3348
  return k && M;
3350
3349
  }) || t.channels[0] || { title: "default", channelId: "fallback" } : t.channels[0] || null;
3351
- }), g = P(() => t.channels), _ = (y) => y ? y.includes("whatsapp") || y.includes("waba") ? El : y.includes("telegram") ? Ll : null : null, C = (y) => !t.currentDialog || !Object.keys(t.currentDialog) ? !1 : t.currentDialog.attributeId === y.id, h = (y) => {
3350
+ }), g = Y(() => t.channels), p = (y) => y ? y.includes("whatsapp") || y.includes("waba") ? El : y.includes("telegram") ? Ll : null : null, w = (y) => !t.currentDialog || !Object.keys(t.currentDialog) ? !1 : t.currentDialog.attributeId === y.id, h = (y) => {
3352
3351
  n("select-attribute-channel", {
3353
3352
  attributeId: y.id,
3354
3353
  channelId: i.value.channelId
@@ -3357,21 +3356,21 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3357
3356
  return ae(
3358
3357
  () => t.contact,
3359
3358
  () => {
3360
- var y, w;
3361
- (w = (y = t.contact) == null ? void 0 : y.attributes) != null && w.length && !a.value && (a.value = t.contact.attributes[0].id);
3359
+ var y, C;
3360
+ (C = (y = t.contact) == null ? void 0 : y.attributes) != null && C.length && !a.value && (a.value = t.contact.attributes[0].id);
3362
3361
  },
3363
3362
  { immediate: !0 }
3364
- ), (y, w) => {
3365
- var T, N, p, k;
3363
+ ), (y, C) => {
3364
+ var T, N, _, k;
3366
3365
  return l(), u("div", Ol, [
3367
3366
  o("div", zl, [
3368
3367
  (l(!0), u(Z, null, oe(((T = e.contact) == null ? void 0 : T.attributes) || [], (M, m) => (l(), u("div", {
3369
3368
  key: M.id,
3370
- class: S(["contact-info__attribute-item", { "contact-info__attribute-item--current-chat": C(M) }])
3369
+ class: S(["contact-info__attribute-item", { "contact-info__attribute-item--current-chat": w(M) }])
3371
3370
  }, [
3372
3371
  ge(o("input", {
3373
3372
  id: `attr-${m}`,
3374
- "onUpdate:modelValue": w[0] || (w[0] = (I) => a.value = I),
3373
+ "onUpdate:modelValue": C[0] || (C[0] = (I) => a.value = I),
3375
3374
  type: "radio",
3376
3375
  value: M.id,
3377
3376
  onChange: (I) => h(M)
@@ -3387,16 +3386,16 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3387
3386
  ])
3388
3387
  ]),
3389
3388
  Ff(" " + E(M.value) + " ", 1),
3390
- C(M) ? (l(), u("span", Ql, " Текущий чат ")) : v("", !0)
3389
+ w(M) ? (l(), u("span", Ql, " Текущий чат ")) : v("", !0)
3391
3390
  ], 8, Bl)
3392
3391
  ], 2))), 128))
3393
3392
  ]),
3394
3393
  o("div", Fl, [
3395
- w[3] || (w[3] = o("label", { class: "contact-info__channel-label" }, "Канал связи", -1)),
3394
+ C[3] || (C[3] = o("label", { class: "contact-info__channel-label" }, "Канал связи", -1)),
3396
3395
  o("div", Yl, [
3397
3396
  o("div", {
3398
3397
  class: "contact-info__select-trigger",
3399
- onClick: w[1] || (w[1] = (M) => s.value = !s.value)
3398
+ onClick: C[1] || (C[1] = (M) => s.value = !s.value)
3400
3399
  }, [
3401
3400
  o("div", Pl, [
3402
3401
  (N = A.value) != null && N.icon ? (l(), u("img", {
@@ -3405,7 +3404,7 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3405
3404
  alt: A.value.title,
3406
3405
  width: "22",
3407
3406
  height: "22"
3408
- }, null, 8, ql)) : (l(), B(Te(_((p = A.value) == null ? void 0 : p.channelId)), {
3407
+ }, null, 8, ql)) : (l(), B(Te(p((_ = A.value) == null ? void 0 : _.channelId)), {
3409
3408
  key: 1,
3410
3409
  class: "contact-info__icon-component"
3411
3410
  }))
@@ -3428,7 +3427,7 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3428
3427
  alt: M.title,
3429
3428
  width: "22",
3430
3429
  height: "22"
3431
- }, null, 8, Kl)) : (l(), B(Te(_(M.channelId)), {
3430
+ }, null, 8, Kl)) : (l(), B(Te(p(M.channelId)), {
3432
3431
  key: 1,
3433
3432
  class: "contact-info__icon-component"
3434
3433
  }))
@@ -3438,14 +3437,14 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3438
3437
  ])) : v("", !0)
3439
3438
  ])
3440
3439
  ]),
3441
- w[5] || (w[5] = o("div", { class: "contact-info__divider" }, null, -1)),
3440
+ C[5] || (C[5] = o("div", { class: "contact-info__divider" }, null, -1)),
3442
3441
  o("div", Jl, [
3443
3442
  o("button", {
3444
3443
  class: "contact-info__button",
3445
- onClick: w[2] || (w[2] = (M) => y.$emit("open-crm"))
3444
+ onClick: C[2] || (C[2] = (M) => y.$emit("open-crm"))
3446
3445
  }, [
3447
3446
  W(Ws),
3448
- w[4] || (w[4] = Ff(" Открыть контакт в CRM ", -1))
3447
+ C[4] || (C[4] = Ff(" Открыть контакт в CRM ", -1))
3449
3448
  ])
3450
3449
  ])
3451
3450
  ]);
@@ -3492,11 +3491,11 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3492
3491
  setup(e, { emit: f }) {
3493
3492
  const t = e, n = se("chatAppId"), { setMessageText: a } = Le(n), i = () => {
3494
3493
  s("closeTemplateWindow"), a(r.value.template);
3495
- }, s = f, c = b(null), r = b(null), d = b(""), A = b(), g = b(""), _ = b(""), C = b(""), h = b(!1), y = P(() => !!(h.value && (C.value == "grid" && _.value == "none" || _.value == "grid" && g.value == "none"))), w = P(() => !!(h.value && (g.value == "grid" && _.value == "none" || _.value == "grid" && C.value == "none"))), T = () => {
3496
- h.value && (_.value == "grid" ? p() : C.value == "grid" && M());
3494
+ }, s = f, c = b(null), r = b(null), d = b(""), A = b(), g = b(""), p = b(""), w = b(""), h = b(!1), y = Y(() => !!(h.value && (w.value == "grid" && p.value == "none" || p.value == "grid" && g.value == "none"))), C = Y(() => !!(h.value && (g.value == "grid" && p.value == "none" || p.value == "grid" && w.value == "none"))), T = () => {
3495
+ h.value && (p.value == "grid" ? _() : w.value == "grid" && M());
3497
3496
  }, N = () => {
3498
- h.value && (_.value == "grid" ? k() : g.value == "grid" && M());
3499
- }, p = () => {
3497
+ h.value && (p.value == "grid" ? k() : g.value == "grid" && M());
3498
+ }, _ = () => {
3500
3499
  const $ = document.getElementById("template-selector-container-" + n);
3501
3500
  $.style.setProperty("--chotto-template-first-col-display", "grid"), $.style.setProperty("--chotto-template-second-col-display", "none"), m();
3502
3501
  }, k = () => {
@@ -3507,12 +3506,12 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3507
3506
  $.style.setProperty("--chotto-template-second-col-display", "grid"), $.style.setProperty("--chotto-template-first-col-display", "none"), $.style.setProperty("--chotto-template-third-col-display", "none"), m();
3508
3507
  }, m = () => {
3509
3508
  const $ = document.getElementById("template-selector-container-" + n), z = window.getComputedStyle($);
3510
- g.value = z.getPropertyValue("--chotto-template-first-col-display"), _.value = z.getPropertyValue("--chotto-template-second-col-display"), C.value = z.getPropertyValue("--chotto-template-third-col-display");
3509
+ g.value = z.getPropertyValue("--chotto-template-first-col-display"), p.value = z.getPropertyValue("--chotto-template-second-col-display"), w.value = z.getPropertyValue("--chotto-template-third-col-display");
3511
3510
  }, I = ($) => {
3512
3511
  t.templates.forEach((z) => z.isSelected = !1), $.isSelected = !0, r.value = $, k();
3513
3512
  }, x = () => {
3514
3513
  M(), t.templates.forEach(($) => $.isSelected = !1);
3515
- }, O = P(() => c.value ? t.templates.filter(($) => $.groupId === c.value.groupId) : t.templates), F = P(() => {
3514
+ }, O = Y(() => c.value ? t.templates.filter(($) => $.groupId === c.value.groupId) : t.templates), Q = Y(() => {
3516
3515
  const $ = d.value.trim().toLowerCase();
3517
3516
  return O.value.filter((z) => z.title.toLowerCase().includes($) || z.template.toLowerCase().includes($));
3518
3517
  }), ee = new ResizeObserver(($) => {
@@ -3539,7 +3538,7 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3539
3538
  onClick: T
3540
3539
  })
3541
3540
  ])) : v("", !0),
3542
- w.value ? (l(), u("button", a0, [
3541
+ C.value ? (l(), u("button", a0, [
3543
3542
  o("span", {
3544
3543
  class: "pi pi-arrow-right",
3545
3544
  onClick: N
@@ -3600,8 +3599,8 @@ const Ll = /* @__PURE__ */ L(jl, [["render", Vl]]), Ol = { class: "contact-info"
3600
3599
  ])
3601
3600
  ]),
3602
3601
  o("div", g0, [
3603
- F.value.length !== 0 ? (l(), u("ul", m0, [
3604
- (l(!0), u(Z, null, oe(F.value, (G, te) => (l(), u("li", {
3602
+ Q.value.length !== 0 ? (l(), u("ul", m0, [
3603
+ (l(!0), u(Z, null, oe(Q.value, (G, te) => (l(), u("li", {
3605
3604
  key: te,
3606
3605
  class: S(["template-selector__item-template", { "template-selector__item-selected": G.isSelected }]),
3607
3606
  onClick: (fe) => I(G)
@@ -3766,8 +3765,8 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
3766
3765
  const c = (g) => {
3767
3766
  if (!n.isFilled) {
3768
3767
  i.value = "";
3769
- const _ = window.getSelection();
3770
- _.getRangeAt && _.rangeCount && _.getRangeAt(0).selectNodeContents(g.target);
3768
+ const p = window.getSelection();
3769
+ p.getRangeAt && p.rangeCount && p.getRangeAt(0).selectNodeContents(g.target);
3771
3770
  }
3772
3771
  };
3773
3772
  function r() {
@@ -3785,7 +3784,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
3785
3784
  window.addEventListener("keydown", A);
3786
3785
  }), Af(() => {
3787
3786
  window.removeEventListener("keydown", A);
3788
- }), (g, _) => (l(), u("span", {
3787
+ }), (g, p) => (l(), u("span", {
3789
3788
  id: "placeholder" + D(t) + e.index,
3790
3789
  ref_key: "refPlaceholder",
3791
3790
  ref: s,
@@ -3837,36 +3836,36 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
3837
3836
  error: "Некорректный тип файла, выберите MP4 или MOV",
3838
3837
  icon: "pi pi-video"
3839
3838
  }
3840
- }, _ = (h) => {
3839
+ }, p = (h) => {
3841
3840
  const y = h.target.files[0];
3842
3841
  if (y) {
3843
3842
  s.value = "";
3844
- const w = y.name.split(".");
3845
- if (g[t.type].accept.indexOf(w[w.length - 1]) == -1)
3843
+ const C = y.name.split(".");
3844
+ if (g[t.type].accept.indexOf(C[C.length - 1]) == -1)
3846
3845
  s.value = g[t.type].error;
3847
3846
  else if (y.size > g[t.type].maxSize)
3848
3847
  s.value = "Файл слишком большого размера";
3849
3848
  else if (!s.value) {
3850
3849
  a.value = y, c.value = "uploading";
3851
3850
  const N = D(n.value);
3852
- W1(typeof N == "string" ? N : null, y).then((p) => {
3853
- c.value = p.status, p.status == "success" && (d("fileSelected", {
3854
- url: p.url,
3855
- filename: p.name,
3856
- filesize: p.size,
3857
- filetype: p.type
3858
- }), p.preview && (r.value = {
3859
- previewUrl: p.preview.previewUrl,
3860
- isImage: p.preview.isImage,
3861
- isVideo: p.preview.isVideo,
3862
- isAudio: p.preview.isAudio,
3863
- fileName: p.name,
3864
- fileSize: p.preview.fileSize
3851
+ W1(typeof N == "string" ? N : null, y).then((_) => {
3852
+ c.value = _.status, _.status == "success" && (d("fileSelected", {
3853
+ url: _.url,
3854
+ filename: _.name,
3855
+ filesize: _.size,
3856
+ filetype: _.type
3857
+ }), _.preview && (r.value = {
3858
+ previewUrl: _.preview.previewUrl,
3859
+ isImage: _.preview.isImage,
3860
+ isVideo: _.preview.isVideo,
3861
+ isAudio: _.preview.isAudio,
3862
+ fileName: _.name,
3863
+ fileSize: _.preview.fileSize
3865
3864
  }));
3866
3865
  });
3867
3866
  }
3868
3867
  }
3869
- }, C = () => {
3868
+ }, w = () => {
3870
3869
  a.value && (a.value = null, c.value = "");
3871
3870
  };
3872
3871
  return ae(
@@ -3892,7 +3891,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
3892
3891
  type: "file",
3893
3892
  style: { display: "none" },
3894
3893
  accept: g[e.type].accept,
3895
- onChange: _
3894
+ onChange: p
3896
3895
  }, null, 40, U0),
3897
3896
  y[1] || (y[1] = o("span", { class: "pi pi-paperclip attachment-section__icon" }, null, -1)),
3898
3897
  o("div", null, [
@@ -3902,7 +3901,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
3902
3901
  ], 2)) : c.value === "success" && r.value ? (l(), B(H1, {
3903
3902
  key: 1,
3904
3903
  "file-info": r.value,
3905
- onReset: C
3904
+ onReset: w
3906
3905
  }, null, 8, ["file-info"])) : v("", !0),
3907
3906
  s.value ? (l(), u("div", $0, E(s.value), 1)) : v("", !0)
3908
3907
  ], 64));
@@ -4029,21 +4028,21 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4029
4028
  file: null,
4030
4029
  buttons: null
4031
4030
  };
4032
- g.value ? (j.text = ke.value, j.templateId = A.value.templateId, j.values = Q.value, j.file = g.value) : (j.text = ke.value, j.templateId = A.value.templateId, j.values = Q.value), A.value.buttons && (j.buttons = A.value.buttons), a("sendWabaValues", j), Re();
4031
+ g.value ? (j.text = ke.value, j.templateId = A.value.templateId, j.values = P.value, j.file = g.value) : (j.text = ke.value, j.templateId = A.value.templateId, j.values = P.value), A.value.buttons && (j.buttons = A.value.buttons), a("sendWabaValues", j), Re();
4033
4032
  }, c = (j) => {
4034
4033
  g.value = j;
4035
- }, r = b(null), d = b(null), A = b(null), g = b(null), _ = b(""), C = b(!1), h = () => {
4036
- C.value = !C.value, C.value ? (r.value.scrollTop = 0, r.value.style["overflow-y"] = "hidden") : r.value.style["overflow-y"] = "scroll";
4034
+ }, r = b(null), d = b(null), A = b(null), g = b(null), p = b(""), w = b(!1), h = () => {
4035
+ w.value = !w.value, w.value ? (r.value.scrollTop = 0, r.value.style["overflow-y"] = "hidden") : r.value.style["overflow-y"] = "scroll";
4037
4036
  }, y = (j) => {
4038
- Object.keys(p).forEach((Y) => {
4039
- p[Y] = "";
4040
- }), g.value = null, t.wabaTemplates.forEach((Y) => Y.isSelected = !1), j.isSelected = !0, A.value = j, C.value = !1, te();
4041
- }, w = () => {
4037
+ Object.keys(_).forEach((F) => {
4038
+ _[F] = "";
4039
+ }), g.value = null, t.wabaTemplates.forEach((F) => F.isSelected = !1), j.isSelected = !0, A.value = j, w.value = !1, te();
4040
+ }, C = () => {
4042
4041
  fe(), t.wabaTemplates.forEach((j) => j.isSelected = !1);
4043
- }, T = P(() => d.value ? t.wabaTemplates.filter((j) => j.groupId === d.value.groupId) : t.wabaTemplates), N = P(() => {
4044
- const j = _.value.trim().toLowerCase();
4045
- return T.value.filter((Y) => Y.title.toLowerCase().includes(j) || Y.template.toLowerCase().includes(j));
4046
- }), p = _n({}), k = b(null), M = b(), m = b(""), I = b(""), x = b(""), O = b(!1), F = P(() => !!(O.value && (x.value == "grid" && I.value == "none" || I.value == "grid" && m.value == "none"))), ee = P(() => !!(O.value && (m.value == "grid" && I.value == "none" || I.value == "grid" && x.value == "none"))), $ = () => {
4042
+ }, T = Y(() => d.value ? t.wabaTemplates.filter((j) => j.groupId === d.value.groupId) : t.wabaTemplates), N = Y(() => {
4043
+ const j = p.value.trim().toLowerCase();
4044
+ return T.value.filter((F) => F.title.toLowerCase().includes(j) || F.template.toLowerCase().includes(j));
4045
+ }), _ = _n({}), k = b(null), M = b(), m = b(""), I = b(""), x = b(""), O = b(!1), Q = Y(() => !!(O.value && (x.value == "grid" && I.value == "none" || I.value == "grid" && m.value == "none"))), ee = Y(() => !!(O.value && (m.value == "grid" && I.value == "none" || I.value == "grid" && x.value == "none"))), $ = () => {
4047
4046
  O.value && (I.value == "grid" ? G() : x.value == "grid" && fe());
4048
4047
  }, z = () => {
4049
4048
  O.value && (I.value == "grid" ? te() : m.value == "grid" && fe());
@@ -4057,48 +4056,48 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4057
4056
  const j = document.getElementById("waba-template-selector-container-" + n);
4058
4057
  j.style.setProperty("--chotto-waba-template-second-col-display", "grid"), j.style.setProperty("--chotto-waba-template-first-col-display", "none"), j.style.setProperty("--chotto-waba-template-third-col-display", "none"), le();
4059
4058
  }, le = () => {
4060
- const j = document.getElementById("waba-template-selector-container-" + n), Y = window.getComputedStyle(j);
4061
- m.value = Y.getPropertyValue("--chotto-waba-template-first-col-display"), I.value = Y.getPropertyValue("--chotto-waba-template-second-col-display"), x.value = Y.getPropertyValue("--chotto-waba-template-third-col-display");
4059
+ const j = document.getElementById("waba-template-selector-container-" + n), F = window.getComputedStyle(j);
4060
+ m.value = F.getPropertyValue("--chotto-waba-template-first-col-display"), I.value = F.getPropertyValue("--chotto-waba-template-second-col-display"), x.value = F.getPropertyValue("--chotto-waba-template-third-col-display");
4062
4061
  }, Ie = (j) => {
4063
- p[j[1]] = j[0];
4064
- }, pe = P(() => {
4062
+ _[j[1]] = j[0];
4063
+ }, pe = Y(() => {
4065
4064
  var Me;
4066
4065
  const j = (Me = A.value) == null ? void 0 : Me.template;
4067
4066
  if (!j) return [];
4068
- const Y = [...j.matchAll(/{{\d+}}/g)], q = [];
4067
+ const F = [...j.matchAll(/{{\d+}}/g)], q = [];
4069
4068
  let re = 0;
4070
- return Y.forEach((Qe) => {
4069
+ return F.forEach((Qe) => {
4071
4070
  Qe.index > re && q.push(j.substring(re, Qe.index)), q.push({ index: parseInt(Qe[0].slice(2, -2)) }), re = Qe.index + Qe[0].length;
4072
4071
  }), re < j.length && q.push(j.substring(re)), q;
4073
- }), $e = P(() => {
4074
- var Y, q;
4072
+ }), $e = Y(() => {
4073
+ var F, q;
4075
4074
  if (!A.value)
4076
4075
  return !0;
4077
- if (!((Y = A.value) != null && Y.template.match(/{{\d+}}/gi)))
4076
+ if (!((F = A.value) != null && F.template.match(/{{\d+}}/gi)))
4078
4077
  return !1;
4079
- const j = Object.keys(p).length !== ((q = A.value) == null ? void 0 : q.template.match(/{{\d+}}/gi).length);
4078
+ const j = Object.keys(_).length !== ((q = A.value) == null ? void 0 : q.template.match(/{{\d+}}/gi).length);
4080
4079
  return A.value.type === "TEXT" ? j : A.value.type !== "TEXT" ? j || !g.value : !1;
4081
4080
  }), Re = () => {
4082
- Object.keys(p).forEach((j) => {
4083
- p[j] = "";
4081
+ Object.keys(_).forEach((j) => {
4082
+ _[j] = "";
4084
4083
  }), g.value = null, A.value = null, t.wabaTemplates.forEach((j) => j.isSelected = !1);
4085
- }, ke = P(() => {
4084
+ }, ke = Y(() => {
4086
4085
  console.log(pe.value, A.value.buttons);
4087
- let j = pe.value.map((q) => typeof q == "string" ? q : p[q.index]).join(""), Y = "";
4088
- return A.value.buttons && (Y = A.value.buttons.map((q) => `
4089
- | [` + q.text + "]").join("")), j.concat(Y);
4090
- }), Q = P(() => {
4086
+ let j = pe.value.map((q) => typeof q == "string" ? q : _[q.index]).join(""), F = "";
4087
+ return A.value.buttons && (F = A.value.buttons.map((q) => `
4088
+ | [` + q.text + "]").join("")), j.concat(F);
4089
+ }), P = Y(() => {
4091
4090
  const j = [];
4092
- for (const Y in p)
4093
- p[Y] !== "" && p[Y] !== "Заполнить" && j.push(p[Y]);
4091
+ for (const F in _)
4092
+ _[F] !== "" && _[F] !== "Заполнить" && j.push(_[F]);
4094
4093
  return j;
4095
4094
  }), H = new ResizeObserver((j) => {
4096
- const Y = j[0].target.clientWidth;
4097
- Y > 700 && (O.value = !1), Y < 700 && (O.value = !0);
4095
+ const F = j[0].target.clientWidth;
4096
+ F > 700 && (O.value = !1), F < 700 && (O.value = !0);
4098
4097
  });
4099
4098
  return me(() => {
4100
4099
  le(), D(M) && H.observe(D(M));
4101
- }), (j, Y) => (l(), u("div", X0, [
4100
+ }), (j, F) => (l(), u("div", X0, [
4102
4101
  o("div", {
4103
4102
  id: "waba-template-selector-container-" + D(n),
4104
4103
  ref_key: "refContainer",
@@ -4110,7 +4109,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4110
4109
  }, [
4111
4110
  o("div", fu, [
4112
4111
  o("div", tu, [
4113
- F.value ? (l(), u("button", nu, [
4112
+ Q.value ? (l(), u("button", nu, [
4114
4113
  o("span", {
4115
4114
  class: "pi pi-arrow-left",
4116
4115
  onClick: $
@@ -4136,7 +4135,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4136
4135
  (l(!0), u(Z, null, oe(e.groupTemplates, (q, re) => (l(), u("li", {
4137
4136
  key: re,
4138
4137
  class: S(["template-selector__item-group", { "template-selector__item-selected": d.value === q }]),
4139
- onClick: w
4138
+ onClick: C
4140
4139
  }, [
4141
4140
  o("label", lu, [
4142
4141
  q.iconUrl ? (l(), u("img", {
@@ -4147,7 +4146,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4147
4146
  }, null, 8, uu)) : v("", !0),
4148
4147
  ge(o("input", {
4149
4148
  id: re,
4150
- "onUpdate:modelValue": Y[0] || (Y[0] = (Me) => d.value = Me),
4149
+ "onUpdate:modelValue": F[0] || (F[0] = (Me) => d.value = Me),
4151
4150
  value: q,
4152
4151
  class: "template-selector__input-group",
4153
4152
  type: "radio"
@@ -4162,12 +4161,12 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4162
4161
  o("div", ru, [
4163
4162
  o("div", du, [
4164
4163
  ge(o("input", {
4165
- "onUpdate:modelValue": Y[1] || (Y[1] = (q) => _.value = q),
4164
+ "onUpdate:modelValue": F[1] || (F[1] = (q) => p.value = q),
4166
4165
  class: "template-selector__searching-input",
4167
4166
  type: "text",
4168
4167
  placeholder: "Поиск шаблона"
4169
4168
  }, null, 512), [
4170
- [Cf, _.value]
4169
+ [Cf, p.value]
4171
4170
  ])
4172
4171
  ]),
4173
4172
  o("div", Au, [
@@ -4204,14 +4203,14 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4204
4203
  typeof q == "string" ? (l(), u("span", Cu, E(q), 1)) : typeof q == "object" ? (l(), B(z0, {
4205
4204
  key: 1,
4206
4205
  index: q.index,
4207
- value: p[q.index] || "Заполнить",
4208
- "is-filled": !!p[q.index],
4206
+ value: _[q.index] || "Заполнить",
4207
+ "is-filled": !!_[q.index],
4209
4208
  onClick: (Me) => k.value = q.index,
4210
4209
  onEdit: Ie
4211
4210
  }, null, 8, ["index", "value", "is-filled", "onClick"])) : v("", !0)
4212
4211
  ], 64))), 128))
4213
4212
  ]),
4214
- Y[2] || (Y[2] = o("p", { class: "template-selector__preview-time" }, " 22:22 ", -1)),
4213
+ F[2] || (F[2] = o("p", { class: "template-selector__preview-time" }, " 22:22 ", -1)),
4215
4214
  A.value.buttons ? (l(), B(H0, {
4216
4215
  key: 1,
4217
4216
  buttons: A.value.buttons,
@@ -4219,7 +4218,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4219
4218
  }, null, 8, ["buttons"])) : v("", !0)
4220
4219
  ])
4221
4220
  ])) : (l(), u("p", Iu, " Предпросмотр шаблона ")),
4222
- C.value ? (l(), u("div", ku, [
4221
+ w.value ? (l(), u("div", ku, [
4223
4222
  o("div", {
4224
4223
  class: "template-selector__semitransparent-overlay",
4225
4224
  onClick: h
@@ -4287,10 +4286,10 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4287
4286
  me(() => {
4288
4287
  s.value.style.display = "none";
4289
4288
  });
4290
- const _ = (C) => {
4291
- c("sendWabaValues", C);
4289
+ const p = (w) => {
4290
+ c("sendWabaValues", w);
4292
4291
  };
4293
- return (C, h) => (l(), u(Z, null, [
4292
+ return (w, h) => (l(), u(Z, null, [
4294
4293
  D(a)().isRecording ? v("", !0) : (l(), u("button", {
4295
4294
  key: 0,
4296
4295
  ref_key: "templateButton",
@@ -4313,7 +4312,7 @@ const j0 = /* @__PURE__ */ L(N0, [["render", E0]]), S0 = { class: "" }, V0 = {
4313
4312
  "group-templates": e.groupTemplates,
4314
4313
  "elevated-window": e.elevatedWindow,
4315
4314
  onCloseTemplateWindow: g,
4316
- onSendWabaValues: _
4315
+ onSendWabaValues: p
4317
4316
  }, null, 8, ["waba-templates", "group-templates", "elevated-window"])
4318
4317
  ], 544)
4319
4318
  ], 64));
@@ -16511,9 +16510,9 @@ function l2() {
16511
16510
  const g = [
16512
16511
  ...this.options.groupOrder,
16513
16512
  ...Object.keys(this.options.additionalGroups),
16514
- ...en.map((_) => _.key)
16513
+ ...en.map((p) => p.key)
16515
16514
  ];
16516
- return [...new Set(g)].filter((_) => !this.disabled.includes(_));
16515
+ return [...new Set(g)].filter((p) => !this.disabled.includes(p));
16517
16516
  }
16518
16517
  });
16519
16518
  function f() {
@@ -16521,8 +16520,8 @@ function l2() {
16521
16520
  }
16522
16521
  async function t() {
16523
16522
  var g;
16524
- let _ = await o2();
16525
- return Array.isArray(_) && _.length ? _ = JSON.parse(((g = _[0]) == null ? void 0 : g.value) || "") : _ = [], _;
16523
+ let p = await o2();
16524
+ return Array.isArray(p) && p.length ? p = JSON.parse(((g = p[0]) == null ? void 0 : g.value) || "") : p = [], p;
16526
16525
  }
16527
16526
  function n() {
16528
16527
  t().then((g) => {
@@ -16549,11 +16548,11 @@ function l2() {
16549
16548
  const A = (g) => {
16550
16549
  if (e.options.displayRecent !== !0)
16551
16550
  return;
16552
- const _ = e.recent.findIndex((h) => h.u === g.u);
16553
- if (_ > 0 && e.recent.splice(_, 1), _ === 0)
16551
+ const p = e.recent.findIndex((h) => h.u === g.u);
16552
+ if (p > 0 && e.recent.splice(p, 1), p === 0)
16554
16553
  return;
16555
- const C = { u: g.u, n: hn(g.n) };
16556
- e.recent = [C, ...e.recent], e.recent.length > 24 && (e.recent.length = 24), d();
16554
+ const w = { u: g.u, n: hn(g.n) };
16555
+ e.recent = [w, ...e.recent], e.recent.length > 24 && (e.recent.length = 24), d();
16557
16556
  };
16558
16557
  return {
16559
16558
  state: Xn(e),
@@ -16752,7 +16751,7 @@ var D2 = function(f, t) {
16752
16751
  function x2(e) {
16753
16752
  var f, t = e.state, n = e.name, a = e.options, i = t.elements.arrow, s = t.modifiersData.popperOffsets, c = He(t.placement), r = zt(c), d = [be, Ve].indexOf(c) >= 0, A = d ? "height" : "width";
16754
16753
  if (!(!i || !s)) {
16755
- var g = D2(a.padding, t), _ = Ot(i), C = r === "y" ? ve : be, h = r === "y" ? Se : Ve, y = t.rects.reference[A] + t.rects.reference[r] - s[r] - t.rects.popper[A], w = s[r] - t.rects.reference[r], T = Gf(i), N = T ? r === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, p = y / 2 - w / 2, k = g[C], M = N - _[A] - g[h], m = N / 2 - _[A] / 2 + p, I = Rf(k, m, M), x = r;
16754
+ var g = D2(a.padding, t), p = Ot(i), w = r === "y" ? ve : be, h = r === "y" ? Se : Ve, y = t.rects.reference[A] + t.rects.reference[r] - s[r] - t.rects.popper[A], C = s[r] - t.rects.reference[r], T = Gf(i), N = T ? r === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, _ = y / 2 - C / 2, k = g[w], M = N - p[A] - g[h], m = N / 2 - p[A] / 2 + _, I = Rf(k, m, M), x = r;
16756
16755
  t.modifiersData[n] = (f = {}, f[x] = I, f.centerOffset = I - m, f);
16757
16756
  }
16758
16757
  }
@@ -16786,18 +16785,18 @@ function j2(e) {
16786
16785
  };
16787
16786
  }
16788
16787
  function on(e) {
16789
- var f, t = e.popper, n = e.popperRect, a = e.placement, i = e.variation, s = e.offsets, c = e.position, r = e.gpuAcceleration, d = e.adaptive, A = e.roundOffsets, g = e.isFixed, _ = A === !0 ? j2(s) : typeof A == "function" ? A(s) : s, C = _.x, h = C === void 0 ? 0 : C, y = _.y, w = y === void 0 ? 0 : y, T = s.hasOwnProperty("x"), N = s.hasOwnProperty("y"), p = be, k = ve, M = window;
16788
+ var f, t = e.popper, n = e.popperRect, a = e.placement, i = e.variation, s = e.offsets, c = e.position, r = e.gpuAcceleration, d = e.adaptive, A = e.roundOffsets, g = e.isFixed, p = A === !0 ? j2(s) : typeof A == "function" ? A(s) : s, w = p.x, h = w === void 0 ? 0 : w, y = p.y, C = y === void 0 ? 0 : y, T = s.hasOwnProperty("x"), N = s.hasOwnProperty("y"), _ = be, k = ve, M = window;
16790
16789
  if (d) {
16791
16790
  var m = Gf(t), I = "clientHeight", x = "clientWidth";
16792
16791
  if (m === Be(t) && (m = af(t), Ze(m).position !== "static" && c === "absolute" && (I = "scrollHeight", x = "scrollWidth")), m = m, a === ve || (a === be || a === Ve) && i === Wf) {
16793
16792
  k = Se;
16794
16793
  var O = g && M.visualViewport ? M.visualViewport.height : m[I];
16795
- w -= O - n.height, w *= r ? 1 : -1;
16794
+ C -= O - n.height, C *= r ? 1 : -1;
16796
16795
  }
16797
16796
  if (a === be || (a === ve || a === Se) && i === Wf) {
16798
- p = Ve;
16799
- var F = g && M.visualViewport ? M.visualViewport.width : m[x];
16800
- h -= F - n.width, h *= r ? 1 : -1;
16797
+ _ = Ve;
16798
+ var Q = g && M.visualViewport ? M.visualViewport.width : m[x];
16799
+ h -= Q - n.width, h *= r ? 1 : -1;
16801
16800
  }
16802
16801
  }
16803
16802
  var ee = Object.assign({
@@ -16805,9 +16804,9 @@ function on(e) {
16805
16804
  }, d && E2);
16806
16805
  if (r) {
16807
16806
  var $;
16808
- return Object.assign({}, ee, ($ = {}, $[k] = N ? "0" : "", $[p] = T ? "0" : "", $.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + w + "px)" : "translate3d(" + h + "px, " + w + "px, 0)", $));
16807
+ return Object.assign({}, ee, ($ = {}, $[k] = N ? "0" : "", $[_] = T ? "0" : "", $.transform = (M.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + C + "px)" : "translate3d(" + h + "px, " + C + "px, 0)", $));
16809
16808
  }
16810
- return Object.assign({}, ee, (f = {}, f[k] = N ? w + "px" : "", f[p] = T ? h + "px" : "", f.transform = "", f));
16809
+ return Object.assign({}, ee, (f = {}, f[k] = N ? C + "px" : "", f[_] = T ? h + "px" : "", f.transform = "", f));
16811
16810
  }
16812
16811
  function S2(e) {
16813
16812
  var f = e.state, t = e.options, n = t.gpuAcceleration, a = n === void 0 ? !0 : n, i = t.adaptive, s = i === void 0 ? !0 : i, c = t.roundOffsets, r = c === void 0 ? !0 : c, d = {
@@ -16997,21 +16996,21 @@ function Pn(e) {
16997
16996
  }
16998
16997
  function Zf(e, f) {
16999
16998
  f === void 0 && (f = {});
17000
- var t = f, n = t.placement, a = n === void 0 ? e.placement : n, i = t.boundary, s = i === void 0 ? u2 : i, c = t.rootBoundary, r = c === void 0 ? zn : c, d = t.elementContext, A = d === void 0 ? jf : d, g = t.altBoundary, _ = g === void 0 ? !1 : g, C = t.padding, h = C === void 0 ? 0 : C, y = Qn(typeof h != "number" ? h : Fn(h, Jf)), w = A === jf ? c2 : jf, T = e.rects.popper, N = e.elements[_ ? w : A], p = F2(bf(N) ? N : N.contextElement || af(e.elements.popper), s, r), k = Mf(e.elements.reference), M = Pn({
16999
+ var t = f, n = t.placement, a = n === void 0 ? e.placement : n, i = t.boundary, s = i === void 0 ? u2 : i, c = t.rootBoundary, r = c === void 0 ? zn : c, d = t.elementContext, A = d === void 0 ? jf : d, g = t.altBoundary, p = g === void 0 ? !1 : g, w = t.padding, h = w === void 0 ? 0 : w, y = Qn(typeof h != "number" ? h : Fn(h, Jf)), C = A === jf ? c2 : jf, T = e.rects.popper, N = e.elements[p ? C : A], _ = F2(bf(N) ? N : N.contextElement || af(e.elements.popper), s, r), k = Mf(e.elements.reference), M = Pn({
17001
17000
  reference: k,
17002
17001
  element: T,
17003
17002
  placement: a
17004
17003
  }), m = yt(Object.assign({}, T, M)), I = A === jf ? m : k, x = {
17005
- top: p.top - I.top + y.top,
17006
- bottom: I.bottom - p.bottom + y.bottom,
17007
- left: p.left - I.left + y.left,
17008
- right: I.right - p.right + y.right
17004
+ top: _.top - I.top + y.top,
17005
+ bottom: I.bottom - _.bottom + y.bottom,
17006
+ left: _.left - I.left + y.left,
17007
+ right: I.right - _.right + y.right
17009
17008
  }, O = e.modifiersData.offset;
17010
17009
  if (A === jf && O) {
17011
- var F = O[a];
17010
+ var Q = O[a];
17012
17011
  Object.keys(x).forEach(function(ee) {
17013
17012
  var $ = [Ve, Se].indexOf(ee) >= 0 ? 1 : -1, z = [ve, Se].indexOf(ee) >= 0 ? "y" : "x";
17014
- x[ee] += F[z] * $;
17013
+ x[ee] += Q[z] * $;
17015
17014
  });
17016
17015
  }
17017
17016
  return x;
@@ -17020,11 +17019,11 @@ function Y2(e, f) {
17020
17019
  f === void 0 && (f = {});
17021
17020
  var t = f, n = t.placement, a = t.boundary, i = t.rootBoundary, s = t.padding, c = t.flipVariations, r = t.allowedAutoPlacements, d = r === void 0 ? Un : r, A = wf(n), g = A ? c ? an : an.filter(function(h) {
17022
17021
  return wf(h) === A;
17023
- }) : Jf, _ = g.filter(function(h) {
17022
+ }) : Jf, p = g.filter(function(h) {
17024
17023
  return d.indexOf(h) >= 0;
17025
17024
  });
17026
- _.length === 0 && (_ = g);
17027
- var C = _.reduce(function(h, y) {
17025
+ p.length === 0 && (p = g);
17026
+ var w = p.reduce(function(h, y) {
17028
17027
  return h[y] = Zf(e, {
17029
17028
  placement: y,
17030
17029
  boundary: a,
@@ -17032,8 +17031,8 @@ function Y2(e, f) {
17032
17031
  padding: s
17033
17032
  })[He(y)], h;
17034
17033
  }, {});
17035
- return Object.keys(C).sort(function(h, y) {
17036
- return C[h] - C[y];
17034
+ return Object.keys(w).sort(function(h, y) {
17035
+ return w[h] - w[y];
17037
17036
  });
17038
17037
  }
17039
17038
  function P2(e) {
@@ -17045,7 +17044,7 @@ function P2(e) {
17045
17044
  function q2(e) {
17046
17045
  var f = e.state, t = e.options, n = e.name;
17047
17046
  if (!f.modifiersData[n]._skip) {
17048
- for (var a = t.mainAxis, i = a === void 0 ? !0 : a, s = t.altAxis, c = s === void 0 ? !0 : s, r = t.fallbackPlacements, d = t.padding, A = t.boundary, g = t.rootBoundary, _ = t.altBoundary, C = t.flipVariations, h = C === void 0 ? !0 : C, y = t.allowedAutoPlacements, w = f.options.placement, T = He(w), N = T === w, p = r || (N || !h ? [g1(w)] : P2(w)), k = [w].concat(p).reduce(function(H, j) {
17047
+ for (var a = t.mainAxis, i = a === void 0 ? !0 : a, s = t.altAxis, c = s === void 0 ? !0 : s, r = t.fallbackPlacements, d = t.padding, A = t.boundary, g = t.rootBoundary, p = t.altBoundary, w = t.flipVariations, h = w === void 0 ? !0 : w, y = t.allowedAutoPlacements, C = f.options.placement, T = He(C), N = T === C, _ = r || (N || !h ? [g1(C)] : P2(C)), k = [C].concat(_).reduce(function(H, j) {
17049
17048
  return H.concat(He(j) === Lt ? Y2(f, {
17050
17049
  placement: j,
17051
17050
  boundary: A,
@@ -17054,12 +17053,12 @@ function q2(e) {
17054
17053
  flipVariations: h,
17055
17054
  allowedAutoPlacements: y
17056
17055
  }) : j);
17057
- }, []), M = f.rects.reference, m = f.rects.popper, I = /* @__PURE__ */ new Map(), x = !0, O = k[0], F = 0; F < k.length; F++) {
17058
- var ee = k[F], $ = He(ee), z = wf(ee) === vf, G = [ve, Se].indexOf($) >= 0, te = G ? "width" : "height", fe = Zf(f, {
17056
+ }, []), M = f.rects.reference, m = f.rects.popper, I = /* @__PURE__ */ new Map(), x = !0, O = k[0], Q = 0; Q < k.length; Q++) {
17057
+ var ee = k[Q], $ = He(ee), z = wf(ee) === vf, G = [ve, Se].indexOf($) >= 0, te = G ? "width" : "height", fe = Zf(f, {
17059
17058
  placement: ee,
17060
17059
  boundary: A,
17061
17060
  rootBoundary: g,
17062
- altBoundary: _,
17061
+ altBoundary: p,
17063
17062
  padding: d
17064
17063
  }), le = G ? z ? Ve : be : z ? Se : ve;
17065
17064
  M[te] > m[te] && (le = g1(le));
@@ -17074,18 +17073,18 @@ function q2(e) {
17074
17073
  }
17075
17074
  if (x)
17076
17075
  for (var $e = h ? 3 : 1, Re = function(j) {
17077
- var Y = k.find(function(q) {
17076
+ var F = k.find(function(q) {
17078
17077
  var re = I.get(q);
17079
17078
  if (re)
17080
17079
  return re.slice(0, j).every(function(Me) {
17081
17080
  return Me;
17082
17081
  });
17083
17082
  });
17084
- if (Y)
17085
- return O = Y, "break";
17083
+ if (F)
17084
+ return O = F, "break";
17086
17085
  }, ke = $e; ke > 0; ke--) {
17087
- var Q = Re(ke);
17088
- if (Q === "break")
17086
+ var P = Re(ke);
17087
+ if (P === "break")
17089
17088
  break;
17090
17089
  }
17091
17090
  f.placement !== O && (f.modifiersData[n]._skip = !0, f.placement = O, f.reset = !0);
@@ -17184,14 +17183,14 @@ function fc(e) {
17184
17183
  return e === "x" ? "y" : "x";
17185
17184
  }
17186
17185
  function tc(e) {
17187
- var f = e.state, t = e.options, n = e.name, a = t.mainAxis, i = a === void 0 ? !0 : a, s = t.altAxis, c = s === void 0 ? !1 : s, r = t.boundary, d = t.rootBoundary, A = t.altBoundary, g = t.padding, _ = t.tether, C = _ === void 0 ? !0 : _, h = t.tetherOffset, y = h === void 0 ? 0 : h, w = Zf(f, {
17186
+ var f = e.state, t = e.options, n = e.name, a = t.mainAxis, i = a === void 0 ? !0 : a, s = t.altAxis, c = s === void 0 ? !1 : s, r = t.boundary, d = t.rootBoundary, A = t.altBoundary, g = t.padding, p = t.tether, w = p === void 0 ? !0 : p, h = t.tetherOffset, y = h === void 0 ? 0 : h, C = Zf(f, {
17188
17187
  boundary: r,
17189
17188
  rootBoundary: d,
17190
17189
  padding: g,
17191
17190
  altBoundary: A
17192
- }), T = He(f.placement), N = wf(f.placement), p = !N, k = zt(T), M = fc(k), m = f.modifiersData.popperOffsets, I = f.rects.reference, x = f.rects.popper, O = typeof y == "function" ? y(Object.assign({}, f.rects, {
17191
+ }), T = He(f.placement), N = wf(f.placement), _ = !N, k = zt(T), M = fc(k), m = f.modifiersData.popperOffsets, I = f.rects.reference, x = f.rects.popper, O = typeof y == "function" ? y(Object.assign({}, f.rects, {
17193
17192
  placement: f.placement
17194
- })) : y, F = typeof O == "number" ? {
17193
+ })) : y, Q = typeof O == "number" ? {
17195
17194
  mainAxis: O,
17196
17195
  altAxis: O
17197
17196
  } : Object.assign({
@@ -17203,14 +17202,14 @@ function tc(e) {
17203
17202
  };
17204
17203
  if (m) {
17205
17204
  if (i) {
17206
- var z, G = k === "y" ? ve : be, te = k === "y" ? Se : Ve, fe = k === "y" ? "height" : "width", le = m[k], Ie = le + w[G], pe = le - w[te], $e = C ? -x[fe] / 2 : 0, Re = N === vf ? I[fe] : x[fe], ke = N === vf ? -x[fe] : -I[fe], Q = f.elements.arrow, H = C && Q ? Ot(Q) : {
17205
+ var z, G = k === "y" ? ve : be, te = k === "y" ? Se : Ve, fe = k === "y" ? "height" : "width", le = m[k], Ie = le + C[G], pe = le - C[te], $e = w ? -x[fe] / 2 : 0, Re = N === vf ? I[fe] : x[fe], ke = N === vf ? -x[fe] : -I[fe], P = f.elements.arrow, H = w && P ? Ot(P) : {
17207
17206
  width: 0,
17208
17207
  height: 0
17209
- }, j = f.modifiersData["arrow#persistent"] ? f.modifiersData["arrow#persistent"].padding : Rn(), Y = j[G], q = j[te], re = Rf(0, I[fe], H[fe]), Me = p ? I[fe] / 2 - $e - re - Y - F.mainAxis : Re - re - Y - F.mainAxis, Qe = p ? -I[fe] / 2 + $e + re + q + F.mainAxis : ke + re + q + F.mainAxis, mf = f.elements.arrow && Gf(f.elements.arrow), G1 = mf ? k === "y" ? mf.clientTop || 0 : mf.clientLeft || 0 : 0, n1 = (z = ee == null ? void 0 : ee[k]) != null ? z : 0, xf = le + Me - n1 - G1, X1 = le + Qe - n1, a1 = Rf(C ? Y1(Ie, xf) : Ie, le, C ? rf(pe, X1) : pe);
17208
+ }, j = f.modifiersData["arrow#persistent"] ? f.modifiersData["arrow#persistent"].padding : Rn(), F = j[G], q = j[te], re = Rf(0, I[fe], H[fe]), Me = _ ? I[fe] / 2 - $e - re - F - Q.mainAxis : Re - re - F - Q.mainAxis, Qe = _ ? -I[fe] / 2 + $e + re + q + Q.mainAxis : ke + re + q + Q.mainAxis, mf = f.elements.arrow && Gf(f.elements.arrow), G1 = mf ? k === "y" ? mf.clientTop || 0 : mf.clientLeft || 0 : 0, n1 = (z = ee == null ? void 0 : ee[k]) != null ? z : 0, xf = le + Me - n1 - G1, X1 = le + Qe - n1, a1 = Rf(w ? Y1(Ie, xf) : Ie, le, w ? rf(pe, X1) : pe);
17210
17209
  m[k] = a1, $[k] = a1 - le;
17211
17210
  }
17212
17211
  if (c) {
17213
- var s1, sf = k === "x" ? ve : be, i1 = k === "x" ? Se : Ve, Fe = m[M], of = M === "y" ? "height" : "width", U = Fe + w[sf], R = Fe - w[i1], Ae = [ve, be].indexOf(T) !== -1, Ye = (s1 = ee == null ? void 0 : ee[M]) != null ? s1 : 0, lf = Ae ? U : Fe - I[of] - x[of] - Ye + F.altAxis, uf = Ae ? Fe + I[of] + x[of] - Ye - F.altAxis : R, ne = C && Ae ? k2(lf, Fe, uf) : Rf(C ? lf : U, Fe, C ? uf : R);
17212
+ var s1, sf = k === "x" ? ve : be, i1 = k === "x" ? Se : Ve, Fe = m[M], of = M === "y" ? "height" : "width", U = Fe + C[sf], R = Fe - C[i1], Ae = [ve, be].indexOf(T) !== -1, Ye = (s1 = ee == null ? void 0 : ee[M]) != null ? s1 : 0, lf = Ae ? U : Fe - I[of] - x[of] - Ye + Q.altAxis, uf = Ae ? Fe + I[of] + x[of] - Ye - Q.altAxis : R, ne = w && Ae ? k2(lf, Fe, uf) : Rf(w ? lf : U, Fe, w ? uf : R);
17214
17213
  m[M] = ne, $[M] = ne - Fe;
17215
17214
  }
17216
17215
  f.modifiersData[n] = $;
@@ -17329,7 +17328,7 @@ function dc(e) {
17329
17328
  },
17330
17329
  attributes: {},
17331
17330
  styles: {}
17332
- }, g = [], _ = !1, C = {
17331
+ }, g = [], p = !1, w = {
17333
17332
  state: A,
17334
17333
  setOptions: function(T) {
17335
17334
  var N = typeof T == "function" ? T(A.options) : T;
@@ -17337,20 +17336,20 @@ function dc(e) {
17337
17336
  reference: bf(c) ? Qf(c) : c.contextElement ? Qf(c.contextElement) : [],
17338
17337
  popper: Qf(r)
17339
17338
  };
17340
- var p = uc(rc([].concat(n, A.options.modifiers)));
17341
- return A.orderedModifiers = p.filter(function(k) {
17339
+ var _ = uc(rc([].concat(n, A.options.modifiers)));
17340
+ return A.orderedModifiers = _.filter(function(k) {
17342
17341
  return k.enabled;
17343
- }), h(), C.update();
17342
+ }), h(), w.update();
17344
17343
  },
17345
17344
  forceUpdate: function() {
17346
- if (!_) {
17347
- var T = A.elements, N = T.reference, p = T.popper;
17348
- if (An(N, p)) {
17345
+ if (!p) {
17346
+ var T = A.elements, N = T.reference, _ = T.popper;
17347
+ if (An(N, _)) {
17349
17348
  A.rects = {
17350
- reference: oc(N, Gf(p), A.options.strategy === "fixed"),
17351
- popper: Ot(p)
17352
- }, A.reset = !1, A.placement = A.options.placement, A.orderedModifiers.forEach(function(F) {
17353
- return A.modifiersData[F.name] = Object.assign({}, F.data);
17349
+ reference: oc(N, Gf(_), A.options.strategy === "fixed"),
17350
+ popper: Ot(_)
17351
+ }, A.reset = !1, A.placement = A.options.placement, A.orderedModifiers.forEach(function(Q) {
17352
+ return A.modifiersData[Q.name] = Object.assign({}, Q.data);
17354
17353
  });
17355
17354
  for (var k = 0; k < A.orderedModifiers.length; k++) {
17356
17355
  if (A.reset === !0) {
@@ -17362,35 +17361,35 @@ function dc(e) {
17362
17361
  state: A,
17363
17362
  options: x,
17364
17363
  name: O,
17365
- instance: C
17364
+ instance: w
17366
17365
  }) || A);
17367
17366
  }
17368
17367
  }
17369
17368
  }
17370
17369
  },
17371
17370
  update: cc(function() {
17372
- return new Promise(function(w) {
17373
- C.forceUpdate(), w(A);
17371
+ return new Promise(function(C) {
17372
+ w.forceUpdate(), C(A);
17374
17373
  });
17375
17374
  }),
17376
17375
  destroy: function() {
17377
- y(), _ = !0;
17376
+ y(), p = !0;
17378
17377
  }
17379
17378
  };
17380
17379
  if (!An(c, r))
17381
- return C;
17382
- C.setOptions(d).then(function(w) {
17383
- !_ && d.onFirstUpdate && d.onFirstUpdate(w);
17380
+ return w;
17381
+ w.setOptions(d).then(function(C) {
17382
+ !p && d.onFirstUpdate && d.onFirstUpdate(C);
17384
17383
  });
17385
17384
  function h() {
17386
- A.orderedModifiers.forEach(function(w) {
17387
- var T = w.name, N = w.options, p = N === void 0 ? {} : N, k = w.effect;
17385
+ A.orderedModifiers.forEach(function(C) {
17386
+ var T = C.name, N = C.options, _ = N === void 0 ? {} : N, k = C.effect;
17388
17387
  if (typeof k == "function") {
17389
17388
  var M = k({
17390
17389
  state: A,
17391
17390
  name: T,
17392
- instance: C,
17393
- options: p
17391
+ instance: w,
17392
+ options: _
17394
17393
  }), m = function() {
17395
17394
  };
17396
17395
  g.push(M || m);
@@ -17398,11 +17397,11 @@ function dc(e) {
17398
17397
  });
17399
17398
  }
17400
17399
  function y() {
17401
- g.forEach(function(w) {
17402
- return w();
17400
+ g.forEach(function(C) {
17401
+ return C();
17403
17402
  }), g = [];
17404
17403
  }
17405
- return C;
17404
+ return w;
17406
17405
  };
17407
17406
  }
17408
17407
  var Ac = [O2, ec, V2, w2, G2, H2, nc, T2, Z2], gc = /* @__PURE__ */ dc({
@@ -17457,12 +17456,12 @@ const pc = K({
17457
17456
  select: (e) => !0
17458
17457
  },
17459
17458
  setup() {
17460
- const { state: e, updateEmoji: f, updateSelect: t } = se("store"), n = b(null), a = P(() => mc(
17459
+ const { state: e, updateEmoji: f, updateSelect: t } = se("store"), n = b(null), a = Y(() => mc(
17461
17460
  e.emojis,
17462
17461
  e.search,
17463
17462
  e.skinTone,
17464
17463
  e.options.disabledGroups
17465
- )), i = Jn(), s = P(() => !e.options.hideGroupNames), c = P(() => !e.options.disableStickyGroupNames), r = hn(e.options.groupNames), d = e.orderedGroupKeys;
17464
+ )), i = Jn(), s = Y(() => !e.options.hideGroupNames), c = Y(() => !e.options.disableStickyGroupNames), r = hn(e.options.groupNames), d = e.orderedGroupKeys;
17466
17465
  e.options.additionalGroups && Object.keys(e.options.additionalGroups).map((h) => {
17467
17466
  e.options.groupNames[h] ? r[h] = e.options.groupNames[h] : r[h] = Wn(h);
17468
17467
  });
@@ -17470,16 +17469,16 @@ const pc = K({
17470
17469
  function g(h) {
17471
17470
  f(h);
17472
17471
  }
17473
- function _(h) {
17472
+ function p(h) {
17474
17473
  t(h), i == null || i.emit("select", {
17475
17474
  ...h,
17476
17475
  t: e.skinTone,
17477
17476
  i: m1(h.r)
17478
17477
  });
17479
17478
  }
17480
- function C(h, y) {
17481
- var w;
17482
- const T = (w = h == null ? void 0 : h.target) == null ? void 0 : w.closest("button");
17479
+ function w(h, y) {
17480
+ var C;
17481
+ const T = (C = h == null ? void 0 : h.target) == null ? void 0 : C.closest("button");
17483
17482
  T && (T.innerHTML = `<span>${m1(y)}</span>`);
17484
17483
  }
17485
17484
  return ae(
@@ -17494,8 +17493,8 @@ const pc = K({
17494
17493
  bodyInner: n,
17495
17494
  EMOJI_REMOTE_SRC: jn,
17496
17495
  GROUP_NAMES: Sn,
17497
- handleClick: _,
17498
- handleError: C,
17496
+ handleClick: p,
17497
+ handleError: w,
17499
17498
  handleMouseEnter: g,
17500
17499
  native: e.options.native,
17501
17500
  unicodeToEmoji: m1,
@@ -17554,9 +17553,9 @@ var Ic = /* @__PURE__ */ Xf(pc, [["render", Cc]]), kc = "data:image/svg+xml;base
17554
17553
  const Vc = K({
17555
17554
  name: "Header",
17556
17555
  setup(e) {
17557
- const { state: f, updateSearch: t, updateActiveGroup: n } = se("store"), a = P(() => !f.options.hideSearch), i = P(() => !f.options.hideGroupIcons), s = JSON.parse(JSON.stringify(f.orderedGroupKeys)), c = P(
17556
+ const { state: f, updateSearch: t, updateActiveGroup: n } = se("store"), a = Y(() => !f.options.hideSearch), i = Y(() => !f.options.hideGroupIcons), s = JSON.parse(JSON.stringify(f.orderedGroupKeys)), c = Y(
17558
17557
  () => f.options.staticTexts.placeholder || ""
17559
- ), r = P({
17558
+ ), r = Y({
17560
17559
  get: () => f.search,
17561
17560
  set: (g) => t(g)
17562
17561
  }), d = [
@@ -17567,8 +17566,8 @@ const Vc = K({
17567
17566
  }))
17568
17567
  ], A = [];
17569
17568
  return s.forEach((g) => {
17570
- const _ = d.findIndex((C) => C.key === g);
17571
- _ !== -1 && (A.push(d[_]), d.splice(_, 1));
17569
+ const p = d.findIndex((w) => w.key === g);
17570
+ p !== -1 && (A.push(d[p]), d.splice(p, 1));
17572
17571
  }), {
17573
17572
  orderedGroups: A,
17574
17573
  orderedKeys: s,
@@ -17642,20 +17641,20 @@ var Yc = /* @__PURE__ */ Xf(Vc, [["render", Fc]]);
17642
17641
  const Pc = K({
17643
17642
  name: "Header",
17644
17643
  setup() {
17645
- const { state: e, updateSkinTone: f } = se("store"), t = b(!1), n = b(!1), a = P(() => e.skinTone), i = P(
17644
+ const { state: e, updateSkinTone: f } = se("store"), t = b(!1), n = b(!1), a = Y(() => e.skinTone), i = Y(
17646
17645
  () => e.options.staticTexts.skinTone || "Skin tone"
17647
- ), s = P(() => !e.options.disableSkinTones), c = Hn() ? "is-mac" : "", r = P(() => ({
17646
+ ), s = Y(() => !e.options.disableSkinTones), c = Hn() ? "is-mac" : "", r = Y(() => ({
17648
17647
  ...e.emoji,
17649
17648
  src: jn + "/" + e.emoji[Hf] + ".png"
17650
17649
  }));
17651
- function d(_ = !0) {
17652
- t.value = _;
17650
+ function d(p = !0) {
17651
+ t.value = p;
17653
17652
  }
17654
17653
  function A() {
17655
17654
  t.value = !t.value;
17656
17655
  }
17657
- function g(_) {
17658
- f(_), d(!1);
17656
+ function g(p) {
17657
+ f(p), d(!1);
17659
17658
  }
17660
17659
  return ae(
17661
17660
  () => e.emoji,
@@ -17764,54 +17763,54 @@ const er = K({
17764
17763
  setup(e, { emit: f }) {
17765
17764
  const t = b(), n = b(), a = b(), i = b(!1), s = b(e.text), c = e.type === "input" || e.type === "textarea";
17766
17765
  let r = -1;
17767
- const { state: d } = se("store"), A = P(() => d.options.colorTheme);
17768
- function g(w) {
17766
+ const { state: d } = se("store"), A = Y(() => d.options.colorTheme);
17767
+ function g(C) {
17769
17768
  if (c) {
17770
17769
  const T = d.options.mode;
17771
- T === "prepend" ? s.value = w.i + s.value : T === "insert" && r !== -1 ? (s.value = `${s.value.slice(0, r)}${w.i}${s.value.slice(r)}`, r += w.i.length) : s.value += w.i, f("update:text", s.value);
17770
+ T === "prepend" ? s.value = C.i + s.value : T === "insert" && r !== -1 ? (s.value = `${s.value.slice(0, r)}${C.i}${s.value.slice(r)}`, r += C.i.length) : s.value += C.i, f("update:text", s.value);
17772
17771
  }
17773
- f("select", w);
17772
+ f("select", C);
17774
17773
  }
17775
- function _() {
17776
- var w;
17777
- t.value && (r = ((w = t.value) == null ? void 0 : w.selectionEnd) || -1);
17774
+ function p() {
17775
+ var C;
17776
+ t.value && (r = ((C = t.value) == null ? void 0 : C.selectionEnd) || -1);
17778
17777
  }
17779
- function C(w) {
17778
+ function w(C) {
17780
17779
  var T;
17781
- !((T = w.target) != null && T.closest(
17780
+ !((T = C.target) != null && T.closest(
17782
17781
  ".v3-input-picker-wrap"
17783
17782
  )) && i.value && (i.value = !1);
17784
17783
  }
17785
17784
  function h() {
17786
17785
  if (n.value && a.value && c) {
17787
- let w = d.options.offset;
17788
- typeof w != "number" && (w = 6), gc(n.value, a.value, {
17786
+ let C = d.options.offset;
17787
+ typeof C != "number" && (C = 6), gc(n.value, a.value, {
17789
17788
  placement: "bottom-end",
17790
17789
  modifiers: [
17791
17790
  {
17792
17791
  name: "offset",
17793
17792
  options: {
17794
- offset: [0, w]
17793
+ offset: [0, C]
17795
17794
  }
17796
17795
  }
17797
17796
  ]
17798
- }), document.body.addEventListener("click", C);
17797
+ }), document.body.addEventListener("click", w);
17799
17798
  }
17800
17799
  }
17801
- function y(w) {
17802
- s.value = w.target.value || "", f("update:text", s.value);
17800
+ function y(C) {
17801
+ s.value = C.target.value || "", f("update:text", s.value);
17803
17802
  }
17804
17803
  return me(() => {
17805
17804
  h();
17806
17805
  }), Gn(() => {
17807
- document.body.removeEventListener("click", C);
17806
+ document.body.removeEventListener("click", w);
17808
17807
  }), {
17809
17808
  face: qn,
17810
17809
  open: i,
17811
17810
  onSelect: g,
17812
17811
  input: s,
17813
17812
  elem: t,
17814
- updateCursor: _,
17813
+ updateCursor: p,
17815
17814
  button: n,
17816
17815
  picker: a,
17817
17816
  isInputType: c,
@@ -26673,15 +26672,15 @@ const gr = /* @__PURE__ */ L(rr, [["render", Ar]]), mr = {
26673
26672
  c(r().text + h.i);
26674
26673
  }, g = () => {
26675
26674
  f.state === "active" && (i.value = !i.value, i.value && (n.value = d()));
26676
- }, _ = () => {
26675
+ }, p = () => {
26677
26676
  i.value = !1;
26678
- }, C = (h) => {
26679
- i.value && !a.value.contains(h.target) && !t.value.contains(h.target) && _();
26677
+ }, w = (h) => {
26678
+ i.value && !a.value.contains(h.target) && !t.value.contains(h.target) && p();
26680
26679
  };
26681
26680
  return me(() => {
26682
- t.value.style.display = "none", document.addEventListener("click", C);
26681
+ t.value.style.display = "none", document.addEventListener("click", w);
26683
26682
  }), Af(() => {
26684
- document.removeEventListener("click", C);
26683
+ document.removeEventListener("click", w);
26685
26684
  }), (h, y) => (l(), u(Z, null, [
26686
26685
  D(r)().isRecording ? v("", !0) : (l(), u("button", {
26687
26686
  key: 0,
@@ -26791,7 +26790,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26791
26790
  },
26792
26791
  emits: ["search", "cancel", "switch"],
26793
26792
  setup(e, { emit: f }) {
26794
- const t = se("chatAppId"), { getModel: n } = Dr(t), a = f, i = e, s = b(), c = xr("", 500), r = P(() => i.isFeedLocation ? "40px" : (i.isFeedLocation, "20px"));
26793
+ const t = se("chatAppId"), { getModel: n } = Dr(t), a = f, i = e, s = b(), c = xr("", 500), r = Y(() => i.isFeedLocation ? "40px" : (i.isFeedLocation, "20px"));
26795
26794
  ae(
26796
26795
  () => [n().text, c.value],
26797
26796
  () => {
@@ -26812,7 +26811,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26812
26811
  ge(o("input", {
26813
26812
  ref_key: "refInput",
26814
26813
  ref: s,
26815
- "onUpdate:modelValue": g[0] || (g[0] = (_) => D(n)().text = _),
26814
+ "onUpdate:modelValue": g[0] || (g[0] = (p) => D(n)().text = p),
26816
26815
  class: "feed-search__input",
26817
26816
  type: "text",
26818
26817
  placeholder: D(Ee)("component.FeedSearch.SearchPlaceholder")
@@ -26828,7 +26827,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26828
26827
  key: 0,
26829
26828
  class: "pi pi-refresh",
26830
26829
  style: { "margin-left": "5px", "margin-top": "10px", cursor: "pointer" },
26831
- onClick: g[1] || (g[1] = (_) => a("switch"))
26830
+ onClick: g[1] || (g[1] = (p) => a("switch"))
26832
26831
  })) : v("", !0)
26833
26832
  ])
26834
26833
  ]),
@@ -26851,7 +26850,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26851
26850
  }
26852
26851
  },
26853
26852
  setup(e) {
26854
- const f = e, t = P(() => {
26853
+ const f = e, t = Y(() => {
26855
26854
  const n = {
26856
26855
  "message.file": "pi pi-file",
26857
26856
  "message.audio": "pi pi-volume-up",
@@ -26916,7 +26915,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26916
26915
  },
26917
26916
  emits: ["clickedSearch", "loadMore"],
26918
26917
  setup(e, { emit: f }) {
26919
- const t = f, n = e, a = b(), i = b(null), s = P(() => n.notFound ? Ee("component.FeedFoundObjects.notFound") : n.notFound ? "" : Ee("component.FeedFoundObjects.notSearched")), c = (d) => {
26918
+ const t = f, n = e, a = b(), i = b(null), s = Y(() => n.notFound ? Ee("component.FeedFoundObjects.notFound") : n.notFound ? "" : Ee("component.FeedFoundObjects.notSearched")), c = (d) => {
26920
26919
  d.messageId && (t("clickedSearch", d.messageId), i.value = d);
26921
26920
  }, r = () => {
26922
26921
  const d = D(a);
@@ -26933,7 +26932,7 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26933
26932
  }, [
26934
26933
  (l(!0), u(Z, null, oe(e.objects, (g) => (l(), u("div", {
26935
26934
  key: g.messageId,
26936
- onClick: (_) => c(g)
26935
+ onClick: (p) => c(g)
26937
26936
  }, [
26938
26937
  W(Fr, {
26939
26938
  object: g,
@@ -26961,44 +26960,44 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
26961
26960
  }
26962
26961
  },
26963
26962
  setup(e) {
26964
- const f = se("chatAppId"), { getMessage: t, setMessageFile: n, resetMessageFile: a, setRecordingMessage: i } = Le(f), s = b(), c = b(0), r = b(0), d = b(0), A = b(0), g = P(() => {
26965
- let x = A.value < 10 ? "0" + A.value : A.value, O = d.value < 10 ? "0" + d.value : d.value, F = r.value < 10 ? "0" + r.value : r.value, ee = c.value < 10 ? "00" + c.value : c.value < 100 ? "0" + c.value : c.value;
26966
- return x + ":" + O + ":" + F + ":" + ee;
26967
- }), _ = b(""), C = b(!1), h = b(), y = b([]), w = b(), T = b(), N = e, p = async () => {
26963
+ const f = se("chatAppId"), { getMessage: t, setMessageFile: n, resetMessageFile: a, setRecordingMessage: i } = Le(f), s = b(), c = b(0), r = b(0), d = b(0), A = b(0), g = Y(() => {
26964
+ let x = A.value < 10 ? "0" + A.value : A.value, O = d.value < 10 ? "0" + d.value : d.value, Q = r.value < 10 ? "0" + r.value : r.value, ee = c.value < 10 ? "00" + c.value : c.value < 100 ? "0" + c.value : c.value;
26965
+ return x + ":" + O + ":" + Q + ":" + ee;
26966
+ }), p = b(""), w = b(!1), h = b(), y = b([]), C = b(), T = b(), N = e, _ = async () => {
26968
26967
  if (!t().file && N.state == "active") {
26969
26968
  const x = await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 });
26970
26969
  s.value = setInterval(() => {
26971
26970
  c.value += 10, c.value == 1e3 && (c.value = 0, r.value++, r.value == 60 && (r.value = 0, d.value++, d.value == 60 && (d.value = 0, A.value++)));
26972
- }, 10), i(!0), C.value = !0, h.value = new MediaRecorder(x), h.value.start(), h.value.ondataavailable = (O) => {
26971
+ }, 10), i(!0), w.value = !0, h.value = new MediaRecorder(x), h.value.start(), h.value.ondataavailable = (O) => {
26973
26972
  y.value.push(O.data);
26974
26973
  };
26975
26974
  }
26976
26975
  }, k = () => {
26977
- m(), w.value = void 0;
26976
+ m(), C.value = void 0;
26978
26977
  }, M = () => {
26979
26978
  h.value && (h.value.stop(), h.value.onstop = async () => {
26980
26979
  const x = new File(y.value, "voicemessage.mp3", { type: "audio/*" }), O = URL.createObjectURL(x);
26981
- w.value = O, _.value = "uploading", await W1(N.filebumpUrl, x).then((F) => {
26982
- if (_.value = F.status, F.status == "success") {
26980
+ C.value = O, p.value = "uploading", await W1(N.filebumpUrl, x).then((Q) => {
26981
+ if (p.value = Q.status, Q.status == "success") {
26983
26982
  const ee = document.getElementById("chat-input-file-line-" + f);
26984
26983
  ee && (ee.style.display = "inherit"), n({
26985
- url: F.url,
26986
- name: F.name,
26987
- size: F.size,
26988
- type: F.type
26989
- }), F.preview && (T.value = {
26990
- previewUrl: F.preview.previewUrl,
26991
- isImage: F.preview.isImage,
26992
- isVideo: F.preview.isVideo,
26993
- isAudio: F.preview.isAudio,
26994
- fileName: F.name,
26995
- fileSize: F.preview.fileSize
26984
+ url: Q.url,
26985
+ name: Q.name,
26986
+ size: Q.size,
26987
+ type: Q.type
26988
+ }), Q.preview && (T.value = {
26989
+ previewUrl: Q.preview.previewUrl,
26990
+ isImage: Q.preview.isImage,
26991
+ isVideo: Q.preview.isVideo,
26992
+ isAudio: Q.preview.isAudio,
26993
+ fileName: Q.name,
26994
+ fileSize: Q.preview.fileSize
26996
26995
  });
26997
26996
  }
26998
26997
  });
26999
26998
  }), m();
27000
26999
  }, m = () => {
27001
- clearInterval(s.value), c.value = 0, r.value = 0, d.value = 0, A.value = 0, i(!1), C.value = !1, h.value = void 0, y.value = [];
27000
+ clearInterval(s.value), c.value = 0, r.value = 0, d.value = 0, A.value = 0, i(!1), w.value = !1, h.value = void 0, y.value = [];
27002
27001
  }, I = () => {
27003
27002
  const x = document.getElementById("chat-input-file-line-" + f);
27004
27003
  x && (x.style.display = "none"), a(), T.value = void 0;
@@ -27009,10 +27008,10 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
27009
27008
  t().file || (T.value = void 0);
27010
27009
  }
27011
27010
  ), (x, O) => (l(), u("div", Wr, [
27012
- _.value === "uploading" ? (l(), u("div", Zr, O[0] || (O[0] = [
27011
+ p.value === "uploading" ? (l(), u("div", Zr, O[0] || (O[0] = [
27013
27012
  o("p", null, "Загрузка файла...", -1)
27014
27013
  ]))) : v("", !0),
27015
- C.value && _.value != "uploading" ? (l(), u("div", Kr, [
27014
+ w.value && p.value != "uploading" ? (l(), u("div", Kr, [
27016
27015
  O[3] || (O[3] = o("span", { class: "audio-recorder__recording-icon pi pi-circle-fill" }, null, -1)),
27017
27016
  o("button", {
27018
27017
  class: "audio-recorder__button audio-recorder__button-record",
@@ -27028,10 +27027,10 @@ const Nr = { class: "feed-search__container" }, Tr = { style: { "line-height": "
27028
27027
  ])),
27029
27028
  o("span", Jr, E(g.value), 1)
27030
27029
  ])) : v("", !0),
27031
- !C.value && _.value != "uploading" && !D(t)().isRecording ? (l(), u("button", {
27030
+ !w.value && p.value != "uploading" && !D(t)().isRecording ? (l(), u("button", {
27032
27031
  key: 2,
27033
27032
  class: S(["audio-recorder__button", { "audio-recorder__button-disabled": e.state == "disabled" || D(t)().file }]),
27034
- onClick: p
27033
+ onClick: _
27035
27034
  }, O[4] || (O[4] = [
27036
27035
  o("span", { class: "pi pi-microphone" }, null, -1)
27037
27036
  ]), 2)) : v("", !0),
@@ -27056,9 +27055,9 @@ function e1({ component: e, attrs: f, Modal: t, modalAttrs: n }) {
27056
27055
  g.unmount(), document.body.removeChild(i);
27057
27056
  }, r = () => {
27058
27057
  c(), a(s.value);
27059
- }, d = (_) => {
27060
- Object.keys(_).forEach((C) => {
27061
- s.value[C] = _[C];
27058
+ }, d = (p) => {
27059
+ Object.keys(p).forEach((w) => {
27060
+ s.value[w] = p[w];
27062
27061
  });
27063
27062
  }, A = K({
27064
27063
  render() {
@@ -27144,7 +27143,7 @@ const Xr = ["data-theme"], ed = {
27144
27143
  }, Rt = /* @__PURE__ */ L(nd, [["__scopeId", "data-v-4a9f3ae8"]]), V6 = async (e, f, t) => {
27145
27144
  const n = await e1({
27146
27145
  //в component должен быть встроен emit change(key: value)
27147
- component: import("./SelectUser2-DF4XQSJw.js"),
27146
+ component: import("./SelectUser2-BjnqKhpl.js"),
27148
27147
  attrs: {
27149
27148
  title: e,
27150
27149
  users: f
@@ -27216,7 +27215,7 @@ const Xr = ["data-theme"], ed = {
27216
27215
  }
27217
27216
  }, Zn = /* @__PURE__ */ L(id, [["__scopeId", "data-v-fcb0f158"]]), z6 = async (e, f, t, n, a, i) => await e1({
27218
27217
  //в component должен быть встроен emit change(key: value)
27219
- component: import("./CreateDialog-B6g-ij6E.js"),
27218
+ component: import("./CreateDialog-uAWBhX5m.js"),
27220
27219
  attrs: {
27221
27220
  title: e,
27222
27221
  name: f,
@@ -27230,7 +27229,7 @@ const Xr = ["data-theme"], ed = {
27230
27229
  }
27231
27230
  }), od = async (e) => await e1({
27232
27231
  //в component должен быть встроен emit change(key: value)
27233
- component: import("./ModalVideoRecorder-K2AOjOdR.js"),
27232
+ component: import("./ModalVideoRecorder-BPWCojHz.js"),
27234
27233
  attrs: {},
27235
27234
  Modal: Zn,
27236
27235
  modalAttrs: {
@@ -27257,9 +27256,9 @@ const Xr = ["data-theme"], ed = {
27257
27256
  setup(e) {
27258
27257
  const f = se("chatAppId"), { getMessage: t, setMessageFile: n, setRecordingMessage: a, resetMessageFile: i } = Le(f), { getTheme: s } = Oe(f), c = b(""), r = b(), d = e, A = async () => {
27259
27258
  if (!t().file && d.state == "active") {
27260
- const _ = s().theme ? s().theme : "";
27261
- await od(_).then(async (C) => {
27262
- C.videoFile && (c.value = "uploading", a(!0), await W1(d.filebumpUrl, C.videoFile).then((h) => {
27259
+ const p = s().theme ? s().theme : "";
27260
+ await od(p).then(async (w) => {
27261
+ w.videoFile && (c.value = "uploading", a(!0), await W1(d.filebumpUrl, w.videoFile).then((h) => {
27263
27262
  if (a(!1), c.value = h.status, h.status == "success") {
27264
27263
  n({
27265
27264
  url: h.url,
@@ -27282,25 +27281,25 @@ const Xr = ["data-theme"], ed = {
27282
27281
  }
27283
27282
  }, g = () => {
27284
27283
  i();
27285
- const _ = document.getElementById("chat-input-file-line-" + f);
27286
- _ && (_.style.display = "none"), r.value = void 0;
27284
+ const p = document.getElementById("chat-input-file-line-" + f);
27285
+ p && (p.style.display = "none"), r.value = void 0;
27287
27286
  };
27288
27287
  return ae(
27289
27288
  () => t().file,
27290
27289
  () => {
27291
27290
  t().file || (r.value = void 0);
27292
27291
  }
27293
- ), (_, C) => (l(), u(Z, null, [
27292
+ ), (p, w) => (l(), u(Z, null, [
27294
27293
  D(t)().isRecording ? v("", !0) : (l(), u("div", ld, [
27295
27294
  c.value != "uploading" ? (l(), u("button", {
27296
27295
  key: 0,
27297
27296
  class: S(["video-recorder__button", { "video-recorder__button-disabled": e.state == "disabled" || D(t)().file }]),
27298
27297
  onClick: A
27299
- }, C[0] || (C[0] = [
27298
+ }, w[0] || (w[0] = [
27300
27299
  o("span", { class: "pi pi-video" }, null, -1)
27301
27300
  ]), 2)) : v("", !0)
27302
27301
  ])),
27303
- c.value === "uploading" ? (l(), u("div", ud, C[1] || (C[1] = [
27302
+ c.value === "uploading" ? (l(), u("div", ud, w[1] || (w[1] = [
27304
27303
  o("p", null, "Загрузка файла...", -1)
27305
27304
  ]))) : v("", !0),
27306
27305
  D(t)().file ? (l(), B(ye, {
@@ -27430,37 +27429,37 @@ const Xr = ["data-theme"], ed = {
27430
27429
  },
27431
27430
  emits: ["select-attribute-channel", "phone-call"],
27432
27431
  setup(e, { emit: f }) {
27433
- const t = e, n = f, a = b(null), i = b(null), s = b(null), c = b(null), r = b(!1), d = b(!1), A = b(null), g = b("0px"), _ = b(null), C = b(!1), h = b(null), y = b({}), w = b(0), T = ["phone", "whatsapp", "telegram", "max", "sms"], N = {
27432
+ const t = e, n = f, a = b(null), i = b(null), s = b(null), c = b(null), r = b(!1), d = b(!1), A = b(null), g = b("0px"), p = b(null), w = b(!1), h = b(null), y = b({}), C = b(0), T = ["phone", "whatsapp", "telegram", "max", "sms"], N = {
27434
27433
  phone: qa,
27435
27434
  whatsapp: Ka,
27436
27435
  telegram: es,
27437
27436
  max: as,
27438
27437
  sms: ls
27439
- }, p = {
27438
+ }, _ = {
27440
27439
  phone: ds,
27441
27440
  whatsapp: ps,
27442
27441
  telegram: bs,
27443
27442
  max: Cs,
27444
27443
  sms: xs
27445
- }, k = P(
27444
+ }, k = Y(
27446
27445
  () => T.map((U) => ({
27447
27446
  type: U,
27448
27447
  component: N[U]
27449
27448
  }))
27450
27449
  ), M = b(
27451
27450
  Object.fromEntries(T.map((U) => [U, []]))
27452
- ), m = P(
27451
+ ), m = Y(
27453
27452
  () => s.value ? Re(s.value) : null
27454
- ), I = P(
27453
+ ), I = Y(
27455
27454
  () => {
27456
27455
  var U;
27457
27456
  return s.value !== "phone" && m.value && ((U = t.recentAttributeChannels[s.value]) == null ? void 0 : U.channelId);
27458
27457
  }
27459
- ), x = P(
27458
+ ), x = Y(
27460
27459
  () => s.value ? $e(s.value) : []
27461
- ), O = P(
27460
+ ), O = Y(
27462
27461
  () => d.value && A.value && x.value.length > 0 && s.value !== "phone" && z(s.value)
27463
- ), F = {
27462
+ ), Q = {
27464
27463
  phone: "Позвонить",
27465
27464
  whatsapp: "Выберите контакт и канал для отправки сообщения",
27466
27465
  telegram: "Выберите контакт и канал для отправки сообщения",
@@ -27468,7 +27467,7 @@ const Xr = ["data-theme"], ed = {
27468
27467
  sms: "Выберите контакт и канал для отправки сообщения"
27469
27468
  }, ee = (U) => {
27470
27469
  var R;
27471
- return ((R = t.channelTooltips) == null ? void 0 : R[U]) ?? F[U] ?? "";
27470
+ return ((R = t.channelTooltips) == null ? void 0 : R[U]) ?? Q[U] ?? "";
27472
27471
  }, $ = (U) => {
27473
27472
  if (!U) return null;
27474
27473
  const [R] = U.split(".");
@@ -27480,7 +27479,7 @@ const Xr = ["data-theme"], ed = {
27480
27479
  (Ae) => $(Ae.channelId) === U
27481
27480
  );
27482
27481
  return R.length === 1 ? R[0] : null;
27483
- }, fe = (U) => p[U] || null, le = (U) => {
27482
+ }, fe = (U) => _[U] || null, le = (U) => {
27484
27483
  const R = $(U);
27485
27484
  return fe(R);
27486
27485
  }, Ie = (U) => {
@@ -27501,11 +27500,11 @@ const Xr = ["data-theme"], ed = {
27501
27500
  return t.contactAttributes.find((Ye) => Ye.id === R);
27502
27501
  }, ke = (U) => {
27503
27502
  var R;
27504
- return ((R = _.value) == null ? void 0 : R.id) === U.id;
27505
- }, Q = (U) => {
27506
- h.value === U && s.value === U ? H() : (s.value = U, r.value = !0, d.value = !1, _.value = null, C.value = !1, sf());
27503
+ return ((R = p.value) == null ? void 0 : R.id) === U.id;
27504
+ }, P = (U) => {
27505
+ h.value === U && s.value === U ? H() : (s.value = U, r.value = !0, d.value = !1, p.value = null, w.value = !1, sf());
27507
27506
  }, H = () => {
27508
- r.value = !1, s.value = null, _.value = null, C.value = !1, d.value = !1;
27507
+ r.value = !1, s.value = null, p.value = null, w.value = !1, d.value = !1;
27509
27508
  }, j = () => {
27510
27509
  var U;
27511
27510
  if (s.value === "phone")
@@ -27517,7 +27516,7 @@ const Xr = ["data-theme"], ed = {
27517
27516
  const R = te(s.value);
27518
27517
  m.value && R && re(m.value, R.channelId);
27519
27518
  }
27520
- }, Y = (U) => {
27519
+ }, F = (U) => {
27521
27520
  if (s.value === "phone")
27522
27521
  q(U);
27523
27522
  else if (!z(s.value)) {
@@ -27540,21 +27539,21 @@ const Xr = ["data-theme"], ed = {
27540
27539
  channelId: U
27541
27540
  }), h.value = s.value, y.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", y.value), H();
27542
27541
  }, Qe = (U) => {
27543
- z(s.value) && (xf(), C.value = !0, d.value = !0, i1(U.currentTarget));
27542
+ z(s.value) && (xf(), w.value = !0, d.value = !0, i1(U.currentTarget));
27544
27543
  }, mf = () => {
27545
- d.value || (C.value = !1);
27544
+ d.value || (w.value = !1);
27546
27545
  }, G1 = (U, R) => {
27547
- z(s.value) && (C.value = !1, A.value = U, d.value = !0, _.value = U, i1(R.currentTarget));
27546
+ z(s.value) && (w.value = !1, A.value = U, d.value = !0, p.value = U, i1(R.currentTarget));
27548
27547
  }, n1 = () => {
27549
- d.value || (_.value = null);
27548
+ d.value || (p.value = null);
27550
27549
  }, xf = () => {
27551
- d.value = !1, _.value = null, A.value = null;
27550
+ d.value = !1, p.value = null, A.value = null;
27552
27551
  }, X1 = () => {
27553
27552
  d.value = !0;
27554
27553
  }, a1 = () => {
27555
- d.value = !1, _.value = null, C.value = !1;
27554
+ d.value = !1, p.value = null, w.value = !1;
27556
27555
  }, s1 = (U) => {
27557
- C.value ? Me(U) : A.value && (n("select-attribute-channel", {
27556
+ w.value ? Me(U) : A.value && (n("select-attribute-channel", {
27558
27557
  attributeId: A.value.id,
27559
27558
  channelId: U
27560
27559
  }), h.value = s.value, y.value = t.channels.find((R) => R.channelId === U), console.log("TEST selectedChannel.value", y.value)), H();
@@ -27566,7 +27565,7 @@ const Xr = ["data-theme"], ed = {
27566
27565
  var Nf, Qt, Ft;
27567
27566
  const R = (Nf = a.value) == null ? void 0 : Nf.querySelector(".attributes-menu"), Ae = (Qt = a.value) == null ? void 0 : Qt.querySelector(".sub-menu-header"), Ye = (Ft = a.value) == null ? void 0 : Ft.querySelector(".sub-menu");
27568
27567
  if (!R || !U) {
27569
- w.value = 0;
27568
+ C.value = 0;
27570
27569
  return;
27571
27570
  }
27572
27571
  const lf = R.getBoundingClientRect(), uf = U.getBoundingClientRect();
@@ -27580,10 +27579,10 @@ const Xr = ["data-theme"], ed = {
27580
27579
  const et = getComputedStyle(Ye);
27581
27580
  De = parseFloat(et.paddingTop || "0") || 0;
27582
27581
  }
27583
- w.value = uf.top - lf.top - ne - De - 2;
27582
+ C.value = uf.top - lf.top - ne - De - 2;
27584
27583
  });
27585
27584
  } catch {
27586
- w.value = 0;
27585
+ C.value = 0;
27587
27586
  }
27588
27587
  }, Fe = (U) => {
27589
27588
  a.value && !a.value.contains(U.target) && H();
@@ -27623,14 +27622,14 @@ const Xr = ["data-theme"], ed = {
27623
27622
  active: G(ne.type),
27624
27623
  hover: c.value === ne.type && !G(ne.type) || c.value === ne.type && G(ne.type)
27625
27624
  }]),
27626
- onClick: (Nf) => Q(ne.type),
27625
+ onClick: (Nf) => P(ne.type),
27627
27626
  onMouseenter: (Nf) => c.value = ne.type,
27628
27627
  onMouseleave: R[0] || (R[0] = (Nf) => c.value = null)
27629
27628
  }, [
27630
27629
  G(ne.type) ? (l(), u(Z, { key: 0 }, [
27631
27630
  W(tf, {
27632
27631
  text: (De = y.value) == null ? void 0 : De.title,
27633
- position: "bottom",
27632
+ position: "bottom-left",
27634
27633
  offset: 8
27635
27634
  }, {
27636
27635
  default: J(() => [
@@ -27644,7 +27643,7 @@ const Xr = ["data-theme"], ed = {
27644
27643
  ], 64)) : (l(), B(tf, {
27645
27644
  key: 1,
27646
27645
  text: ee(ne.type),
27647
- position: "bottom",
27646
+ position: "bottom-left",
27648
27647
  offset: 8
27649
27648
  }, {
27650
27649
  default: J(() => [
@@ -27674,7 +27673,7 @@ const Xr = ["data-theme"], ed = {
27674
27673
  return [
27675
27674
  o("div", {
27676
27675
  class: S(["recent-attribute", {
27677
- "frozen-hover": C.value
27676
+ "frozen-hover": w.value
27678
27677
  }]),
27679
27678
  onMouseenter: R[1] || (R[1] = (De) => Qe(De)),
27680
27679
  onMouseleave: mf,
@@ -27696,7 +27695,7 @@ const Xr = ["data-theme"], ed = {
27696
27695
  }, 8, ["text"])) : I.value ? (l(), u("div", {
27697
27696
  key: 2,
27698
27697
  class: S(["recent-attribute", {
27699
- "frozen-hover": C.value
27698
+ "frozen-hover": w.value
27700
27699
  }]),
27701
27700
  onMouseenter: R[3] || (R[3] = (ne) => Qe(ne)),
27702
27701
  onMouseleave: mf,
@@ -27720,7 +27719,7 @@ const Xr = ["data-theme"], ed = {
27720
27719
  }]),
27721
27720
  onMouseenter: (De) => G1(ne, De),
27722
27721
  onMouseleave: n1,
27723
- onClick: (De) => Y(ne)
27722
+ onClick: (De) => F(ne)
27724
27723
  }, [
27725
27724
  o("div", Cd, [
27726
27725
  o("span", Id, E(ne.value), 1)
@@ -27737,7 +27736,7 @@ const Xr = ["data-theme"], ed = {
27737
27736
  d.value && O.value ? (l(), u("div", {
27738
27737
  key: 4,
27739
27738
  class: "sub-menu left",
27740
- style: ce({ top: w.value + "px" }),
27739
+ style: ce({ top: C.value + "px" }),
27741
27740
  onMouseenter: X1,
27742
27741
  onMouseleave: a1
27743
27742
  }, [
@@ -27759,7 +27758,7 @@ const Xr = ["data-theme"], ed = {
27759
27758
  ], 512);
27760
27759
  };
27761
27760
  }
27762
- }, R6 = /* @__PURE__ */ L(Td, [["__scopeId", "data-v-6f643771"]]), Ed = { class: "contact-context-menu__wrapper" }, jd = ["id"], Sd = { class: "contact-context-menu__icon" }, Vd = /* @__PURE__ */ K({
27761
+ }, R6 = /* @__PURE__ */ L(Td, [["__scopeId", "data-v-98fecf3b"]]), Ed = { class: "contact-context-menu__wrapper" }, jd = ["id"], Sd = { class: "contact-context-menu__icon" }, Vd = /* @__PURE__ */ K({
27763
27762
  __name: "ContactContextMenu",
27764
27763
  props: {
27765
27764
  actions: {
@@ -27784,18 +27783,18 @@ const Xr = ["data-theme"], ed = {
27784
27783
  },
27785
27784
  emits: ["click", "buttonClick", "menuMouseEnter", "menuMouseLeave"],
27786
27785
  setup(e, { expose: f, emit: t }) {
27787
- const n = se("chatAppId"), a = se("extChatAppId"), { getTheme: i } = Oe(n), s = e, c = P1(), r = t, d = b(), A = b(), g = b(!1), _ = (M) => {
27788
- p(), r("click", M);
27789
- }, C = () => {
27790
- s.disabled || (s.mode == "click" && !g.value ? N() : s.mode == "click" && g.value && p(), r("buttonClick"));
27786
+ const n = se("chatAppId"), a = se("extChatAppId"), { getTheme: i } = Oe(n), s = e, c = P1(), r = t, d = b(), A = b(), g = b(!1), p = (M) => {
27787
+ _(), r("click", M);
27788
+ }, w = () => {
27789
+ s.disabled || (s.mode == "click" && !g.value ? N() : s.mode == "click" && g.value && _(), r("buttonClick"));
27791
27790
  }, h = () => {
27792
27791
  s.disabled || s.mode == "hover" && N();
27793
27792
  }, y = () => {
27794
- s.disabled || s.mode == "hover" && p();
27795
- }, w = () => {
27793
+ s.disabled || s.mode == "hover" && _();
27794
+ }, C = () => {
27796
27795
  r("menuMouseEnter"), s.disabled || s.mode == "hover" && N();
27797
27796
  }, T = () => {
27798
- r("menuMouseLeave"), s.disabled || s.mode == "hover" && p();
27797
+ r("menuMouseLeave"), s.disabled || s.mode == "hover" && _();
27799
27798
  }, N = () => {
27800
27799
  if (A.value && d.value) {
27801
27800
  const M = d.value, m = A.value.getBoundingClientRect();
@@ -27813,23 +27812,23 @@ const Xr = ["data-theme"], ed = {
27813
27812
  M.style.top = x[s.menuSide].top + "px", M.style.left = x[s.menuSide].left + "px", M.style.opacity = "1", M.style.display = "inherit", g.value = !0;
27814
27813
  });
27815
27814
  }
27816
- }, p = () => {
27815
+ }, _ = () => {
27817
27816
  if (d.value) {
27818
27817
  const M = d.value;
27819
27818
  M && (M.style.top = "0", M.style.left = "0", M.style.opacity = "0", M.style.display = "none", g.value = !1);
27820
27819
  }
27821
27820
  }, k = (M) => {
27822
- s.mode == "click" && A.value && !A.value.contains(M.target) && p();
27821
+ s.mode == "click" && A.value && !A.value.contains(M.target) && _();
27823
27822
  };
27824
27823
  return me(() => {
27825
27824
  _e(() => {
27826
- d.value = document.getElementById("context-menu-" + c + a), d.value && (p(), document.addEventListener("click", k));
27825
+ d.value = document.getElementById("context-menu-" + c + a), d.value && (_(), document.addEventListener("click", k));
27827
27826
  });
27828
27827
  }), Af(() => {
27829
27828
  document.removeEventListener("click", k);
27830
27829
  }), f({
27831
27830
  updatePosition: N,
27832
- hideMenu: p
27831
+ hideMenu: _
27833
27832
  }), (M, m) => (l(), u("div", Ed, [
27834
27833
  o("button", {
27835
27834
  id: "container-" + D(c) + D(a),
@@ -27838,7 +27837,7 @@ const Xr = ["data-theme"], ed = {
27838
27837
  class: "contact-context-menu__button",
27839
27838
  onMouseenter: h,
27840
27839
  onMouseleave: y,
27841
- onClick: C
27840
+ onClick: w
27842
27841
  }, [
27843
27842
  o("span", Sd, [
27844
27843
  W(Qa)
@@ -27848,9 +27847,9 @@ const Xr = ["data-theme"], ed = {
27848
27847
  id: "context-menu-" + D(c) + D(a),
27849
27848
  actions: e.actions,
27850
27849
  "data-theme": D(i)().theme ? D(i)().theme : "light",
27851
- onMouseenter: w,
27850
+ onMouseenter: C,
27852
27851
  onMouseleave: T,
27853
- onClick: _
27852
+ onClick: p
27854
27853
  }, null, 8, ["id", "actions", "data-theme"])
27855
27854
  ]))
27856
27855
  ], 40, jd)
@@ -28035,20 +28034,20 @@ const Xr = ["data-theme"], ed = {
28035
28034
  }, A = () => {
28036
28035
  }, g = () => {
28037
28036
  i.value = !0;
28038
- }, _ = () => {
28037
+ }, p = () => {
28039
28038
  i.value = !1, a.value = !1;
28040
- }, C = P(() => kf(t.message.status));
28039
+ }, w = Y(() => kf(t.message.status));
28041
28040
  function h(y) {
28042
28041
  return y.position === "left" ? "file-message__left" : "file-message__right";
28043
28042
  }
28044
- return (y, w) => (l(), u("div", {
28043
+ return (y, C) => (l(), u("div", {
28045
28044
  class: S(["file-message", [
28046
28045
  h(e.message),
28047
28046
  e.applyStyle(e.message)
28048
28047
  ]]),
28049
28048
  messageId: e.message.messageId,
28050
28049
  style: ce(e.message.position === "right" && e.message.backgroundColor ? { "--chotto-message-right-bg": e.message.backgroundColor } : null),
28051
- onMouseleave: _
28050
+ onMouseleave: p
28052
28051
  }, [
28053
28052
  e.message.avatar && e.isFirstInSeries ? (l(), u("img", {
28054
28053
  key: 0,
@@ -28076,9 +28075,9 @@ const Xr = ["data-theme"], ed = {
28076
28075
  download: "",
28077
28076
  target: "_blank"
28078
28077
  }, [
28079
- w[1] || (w[1] = o("span", { class: "pi pi-file" }, null, -1)),
28078
+ C[1] || (C[1] = o("span", { class: "pi pi-file" }, null, -1)),
28080
28079
  o("p", i3, E(e.message.filename), 1),
28081
- w[2] || (w[2] = o("div", { class: "file-message__download-button" }, [
28080
+ C[2] || (C[2] = o("div", { class: "file-message__download-button" }, [
28082
28081
  o("span", { class: "pi pi-download" })
28083
28082
  ], -1))
28084
28083
  ], 8, s3),
@@ -28104,23 +28103,23 @@ const Xr = ["data-theme"], ed = {
28104
28103
  class: "file-message__views",
28105
28104
  onClick: d
28106
28105
  }, [
28107
- w[3] || (w[3] = o("span", { class: "pi pi-eye" }, null, -1)),
28106
+ C[3] || (C[3] = o("span", { class: "pi pi-eye" }, null, -1)),
28108
28107
  o("p", null, E(e.message.views), 1)
28109
28108
  ])) : v("", !0),
28110
28109
  o("span", c3, E(e.message.time), 1),
28111
28110
  h(e.message) === "file-message__right" && D(If).includes(e.message.status) ? (l(), u("div", {
28112
28111
  key: 1,
28113
- class: S(["file-message__status", C.value])
28112
+ class: S(["file-message__status", w.value])
28114
28113
  }, [
28115
28114
  e.message.status !== "sent" ? (l(), u("span", r3)) : v("", !0),
28116
- w[4] || (w[4] = o("span", { class: "pi pi-check" }, null, -1))
28115
+ C[4] || (C[4] = o("span", { class: "pi pi-check" }, null, -1))
28117
28116
  ], 2)) : v("", !0)
28118
28117
  ]),
28119
28118
  i.value && e.message.actions ? (l(), u("button", {
28120
28119
  key: 4,
28121
28120
  class: "file-message__menu-button",
28122
- onClick: w[0] || (w[0] = (T) => a.value = !a.value)
28123
- }, w[5] || (w[5] = [
28121
+ onClick: C[0] || (C[0] = (T) => a.value = !a.value)
28122
+ }, C[5] || (C[5] = [
28124
28123
  o("span", { class: "pi pi-ellipsis-h" }, null, -1)
28125
28124
  ]))) : v("", !0),
28126
28125
  W(ue, null, {
@@ -28178,29 +28177,29 @@ const Xr = ["data-theme"], ed = {
28178
28177
  const g = (M) => {
28179
28178
  i("reply", M);
28180
28179
  };
28181
- function _(M) {
28180
+ function p(M) {
28182
28181
  M.preventDefault(), M.target.href && window.open(M.target.href, "_blank");
28183
28182
  }
28184
- const C = () => {
28183
+ const w = () => {
28185
28184
  i("action", { messageId: a.message.messageId, type: "views" });
28186
28185
  }, h = () => {
28187
28186
  }, y = () => {
28188
28187
  r.value = !0, d.value = !0;
28189
- }, w = () => {
28188
+ }, C = () => {
28190
28189
  r.value = !1, c.value = !1;
28191
- }, T = P(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), N = P(() => kf(a.message.status));
28192
- function p(M) {
28190
+ }, T = Y(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), N = Y(() => kf(a.message.status));
28191
+ function _(M) {
28193
28192
  return M.position === "left" ? "image-message__left" : "image-message__right";
28194
28193
  }
28195
28194
  const k = () => s.value = !1;
28196
28195
  return (M, m) => (l(), u("div", {
28197
28196
  class: S(["image-message", [
28198
- p(e.message),
28197
+ _(e.message),
28199
28198
  e.applyStyle(e.message)
28200
28199
  ]]),
28201
28200
  messageId: e.message.messageId,
28202
28201
  style: ce(e.message.position === "right" && e.message.backgroundColor ? { "--chotto-message-right-bg": e.message.backgroundColor } : null),
28203
- onMouseleave: w
28202
+ onMouseleave: C
28204
28203
  }, [
28205
28204
  e.message.avatar && e.isFirstInSeries ? (l(), u("img", {
28206
28205
  key: 0,
@@ -28238,13 +28237,13 @@ const Xr = ["data-theme"], ed = {
28238
28237
  e.message.views ? (l(), u("div", {
28239
28238
  key: 0,
28240
28239
  class: "image-message__views",
28241
- onClick: Yf(C, ["stop"])
28240
+ onClick: Yf(w, ["stop"])
28242
28241
  }, [
28243
28242
  m[3] || (m[3] = o("span", { class: "pi pi-eye" }, null, -1)),
28244
28243
  o("p", null, E(e.message.views), 1)
28245
28244
  ])) : v("", !0),
28246
28245
  o("span", v3, E(e.message.time), 1),
28247
- p(e.message) === "image-message__right" && D(If).includes(e.message.status) ? (l(), u("div", {
28246
+ _(e.message) === "image-message__right" && D(If).includes(e.message.status) ? (l(), u("div", {
28248
28247
  key: 1,
28249
28248
  class: S(["image-message__status", N.value])
28250
28249
  }, [
@@ -28296,7 +28295,7 @@ const Xr = ["data-theme"], ed = {
28296
28295
  }),
28297
28296
  e.message.text ? (l(), u("div", M3, [
28298
28297
  o("p", {
28299
- onClick: _,
28298
+ onClick: p,
28300
28299
  innerHTML: A.value
28301
28300
  }, null, 8, w3)
28302
28301
  ])) : v("", !0),
@@ -28379,15 +28378,15 @@ const Xr = ["data-theme"], ed = {
28379
28378
  i.value = !0;
28380
28379
  }, A = () => {
28381
28380
  i.value = !1, a.value = !1;
28382
- }, g = P(() => kf(t.message.status)), _ = (y) => {
28381
+ }, g = Y(() => kf(t.message.status)), p = (y) => {
28383
28382
  A(), n("action", { messageId: t.message.messageId, type: "menu", ...y });
28384
- }, C = () => {
28383
+ }, w = () => {
28385
28384
  A(), n("action", { messageId: t.message.messageId, type: "views" });
28386
28385
  };
28387
28386
  function h(y) {
28388
28387
  return y.position === "left" ? "text-message__left" : "text-message__right";
28389
28388
  }
28390
- return (y, w) => (l(), u("div", {
28389
+ return (y, C) => (l(), u("div", {
28391
28390
  class: S(["text-message", [
28392
28391
  h(e.message),
28393
28392
  e.applyStyle(e.message)
@@ -28434,9 +28433,9 @@ const Xr = ["data-theme"], ed = {
28434
28433
  e.message.views ? (l(), u("div", {
28435
28434
  key: 0,
28436
28435
  class: "text-message__views",
28437
- onClick: C
28436
+ onClick: w
28438
28437
  }, [
28439
- w[1] || (w[1] = o("span", { class: "pi pi-eye" }, null, -1)),
28438
+ C[1] || (C[1] = o("span", { class: "pi pi-eye" }, null, -1)),
28440
28439
  o("p", null, E(e.message.views), 1)
28441
28440
  ])) : v("", !0),
28442
28441
  e.message.time ? (l(), u("span", j3, E(e.message.time), 1)) : v("", !0),
@@ -28445,14 +28444,14 @@ const Xr = ["data-theme"], ed = {
28445
28444
  class: S(["text-message__status", g.value])
28446
28445
  }, [
28447
28446
  e.message.status !== "sent" ? (l(), u("span", S3)) : v("", !0),
28448
- w[2] || (w[2] = o("span", { class: "pi pi-check" }, null, -1))
28447
+ C[2] || (C[2] = o("span", { class: "pi pi-check" }, null, -1))
28449
28448
  ], 2)) : v("", !0)
28450
28449
  ]),
28451
28450
  i.value && e.message.actions ? (l(), u("button", {
28452
28451
  key: 3,
28453
28452
  class: "text-message__menu-button",
28454
- onClick: w[0] || (w[0] = (T) => a.value = !a.value)
28455
- }, w[3] || (w[3] = [
28453
+ onClick: C[0] || (C[0] = (T) => a.value = !a.value)
28454
+ }, C[3] || (C[3] = [
28456
28455
  o("span", { class: "pi pi-ellipsis-h" }, null, -1)
28457
28456
  ]))) : v("", !0),
28458
28457
  W(ue, null, {
@@ -28461,7 +28460,7 @@ const Xr = ["data-theme"], ed = {
28461
28460
  key: 0,
28462
28461
  class: "text-message__context-menu",
28463
28462
  actions: e.message.actions,
28464
- onClick: _
28463
+ onClick: p
28465
28464
  }, null, 8, ["actions"])) : v("", !0)
28466
28465
  ]),
28467
28466
  _: 1
@@ -28524,34 +28523,34 @@ const Xr = ["data-theme"], ed = {
28524
28523
  for (let z of i.value)
28525
28524
  z.selected = !1;
28526
28525
  i.value[$].selected = !0, r.value && (r.value.playbackRate = i.value[$].speed);
28527
- }, c = f, r = b(), d = b(!1), A = b(0), g = b(0), _ = b(!1), C = b(!1), h = b(!1), y = P(() => a.message.text ? Ue(a.message.text) : ""), w = ($) => {
28526
+ }, c = f, r = b(), d = b(!1), A = b(0), g = b(0), p = b(!1), w = b(!1), h = b(!1), y = Y(() => a.message.text ? Ue(a.message.text) : ""), C = ($) => {
28528
28527
  c("reply", $);
28529
28528
  };
28530
28529
  function T($) {
28531
28530
  $.preventDefault(), $.target.href && window.open($.target.href, "_blank");
28532
28531
  }
28533
28532
  const N = () => {
28534
- C.value = !0;
28535
- }, p = () => {
28536
- C.value = !1, _.value = !1;
28533
+ w.value = !0;
28534
+ }, _ = () => {
28535
+ w.value = !1, p.value = !1;
28537
28536
  }, k = () => {
28538
28537
  c("action", { messageId: a.message.messageId, type: "views" });
28539
28538
  }, M = () => {
28540
- }, m = P(() => kf(a.message.status));
28539
+ }, m = Y(() => kf(a.message.status));
28541
28540
  function I() {
28542
28541
  r.value && (d.value ? r.value.pause() : r.value.play(), d.value = !d.value);
28543
28542
  }
28544
28543
  const x = ($) => {
28545
28544
  const z = Math.floor($ / 60), G = Math.floor($ % 60);
28546
28545
  return `${z.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
28547
- }, O = P(() => r.value ? x(g.value) : "0:00");
28546
+ }, O = Y(() => r.value ? x(g.value) : "0:00");
28548
28547
  ae(
28549
28548
  () => g.value,
28550
28549
  () => {
28551
28550
  r.value && (r.value.duration != 1 / 0 && !Number.isNaN(r.value.duration) && (r.value.currentTime = g.value), g.value == A.value && (d.value = !1));
28552
28551
  }
28553
28552
  );
28554
- const F = P(() => r.value ? x(A.value) : "0:00");
28553
+ const Q = Y(() => r.value ? x(A.value) : "0:00");
28555
28554
  function ee($) {
28556
28555
  return $.position === "left" ? "audio-message__left" : "audio-message__right";
28557
28556
  }
@@ -28572,7 +28571,7 @@ const Xr = ["data-theme"], ed = {
28572
28571
  ]]),
28573
28572
  messageId: e.message.messageId,
28574
28573
  style: ce(e.message.position === "right" && e.message.backgroundColor ? { "--chotto-message-right-bg": e.message.backgroundColor } : null),
28575
- onMouseleave: p
28574
+ onMouseleave: _
28576
28575
  }, [
28577
28576
  e.message.avatar && e.isFirstInSeries ? (l(), u("img", {
28578
28577
  key: 0,
@@ -28592,7 +28591,7 @@ const Xr = ["data-theme"], ed = {
28592
28591
  style: { "grid-column": "1/3" },
28593
28592
  message: e.message.reply,
28594
28593
  class: S(e.message.position),
28595
- onReply: w
28594
+ onReply: C
28596
28595
  }, null, 8, ["message", "class"])) : v("", !0),
28597
28596
  o("div", B3, [
28598
28597
  o("audio", {
@@ -28628,7 +28627,7 @@ const Xr = ["data-theme"], ed = {
28628
28627
  [Cf, g.value]
28629
28628
  ]),
28630
28629
  o("div", Q3, [
28631
- o("p", F3, E(`${O.value} / ${F.value}`), 1),
28630
+ o("p", F3, E(`${O.value} / ${Q.value}`), 1),
28632
28631
  o("div", Y3, [
28633
28632
  (l(!0), u(Z, null, oe(i.value, (te, fe) => (l(), u("p", {
28634
28633
  key: te.text,
@@ -28686,16 +28685,16 @@ const Xr = ["data-theme"], ed = {
28686
28685
  z[8] || (z[8] = o("span", { class: "pi pi-check" }, null, -1))
28687
28686
  ], 2)) : v("", !0)
28688
28687
  ]),
28689
- C.value && e.message.actions ? (l(), u("button", {
28688
+ w.value && e.message.actions ? (l(), u("button", {
28690
28689
  key: 5,
28691
28690
  class: "audio-message__menu-button",
28692
- onClick: z[2] || (z[2] = (te) => _.value = !_.value)
28691
+ onClick: z[2] || (z[2] = (te) => p.value = !p.value)
28693
28692
  }, z[9] || (z[9] = [
28694
28693
  o("span", { class: "pi pi-ellipsis-h" }, null, -1)
28695
28694
  ]))) : v("", !0),
28696
28695
  W(ue, null, {
28697
28696
  default: J(() => [
28698
- _.value && e.message.actions ? (l(), B(D(gf), {
28697
+ p.value && e.message.actions ? (l(), B(D(gf), {
28699
28698
  key: 0,
28700
28699
  class: "audio-message__context-menu",
28701
28700
  actions: e.message.actions,
@@ -28787,7 +28786,7 @@ const Xr = ["data-theme"], ed = {
28787
28786
  function c(x) {
28788
28787
  return x.position === "left" ? "video-message__left" : "video-message__right";
28789
28788
  }
28790
- const r = b(), d = b(), A = b(!1), g = b(!1), _ = b(!1), C = b(!1), h = b("");
28789
+ const r = b(), d = b(), A = b(!1), g = b(!1), p = b(!1), w = b(!1), h = b("");
28791
28790
  ae(
28792
28791
  () => a.message.text,
28793
28792
  () => {
@@ -28798,20 +28797,20 @@ const Xr = ["data-theme"], ed = {
28798
28797
  function y(x) {
28799
28798
  x.preventDefault(), x.target.href && window.open(x.target.href, "_blank");
28800
28799
  }
28801
- const w = () => {
28800
+ const C = () => {
28802
28801
  i("action", { messageId: a.message.messageId, type: "views" });
28803
28802
  }, T = () => {
28804
28803
  }, N = () => {
28805
- _.value = !0, C.value = !0;
28806
- }, p = () => {
28807
- _.value = !1, g.value = !1;
28808
- }, k = P(() => kf(a.message.status)), M = () => {
28804
+ p.value = !0, w.value = !0;
28805
+ }, _ = () => {
28806
+ p.value = !1, g.value = !1;
28807
+ }, k = Y(() => kf(a.message.status)), M = () => {
28809
28808
  d.value && (d.value.currentTime = 0, d.value.play());
28810
28809
  };
28811
28810
  ae([r, d], ([x, O]) => {
28812
28811
  x ? O && (O.pause(), O.currentTime = 0) : O && (O.play(), O.currentTime = 0);
28813
28812
  });
28814
- const m = P(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), I = () => A.value = !1;
28813
+ const m = Y(() => a.message.reply && a.message.text ? "0" : a.message.text ? "8px 8px 0 0" : a.message.reply ? "0 0 8px 8px" : "8px"), I = () => A.value = !1;
28815
28814
  return (x, O) => (l(), u(Z, null, [
28816
28815
  o("div", {
28817
28816
  class: S(["video-message", [
@@ -28820,7 +28819,7 @@ const Xr = ["data-theme"], ed = {
28820
28819
  ]]),
28821
28820
  messageId: e.message.messageId,
28822
28821
  style: ce(e.message.position === "right" && e.message.backgroundColor ? { "--chotto-message-right-bg": e.message.backgroundColor } : null),
28823
- onMouseleave: p
28822
+ onMouseleave: _
28824
28823
  }, [
28825
28824
  e.message.avatar && e.isFirstInSeries ? (l(), u("img", {
28826
28825
  key: 0,
@@ -28842,9 +28841,9 @@ const Xr = ["data-theme"], ed = {
28842
28841
  }, null, 8, ["class", "message"])) : v("", !0),
28843
28842
  o("div", {
28844
28843
  class: "video-message__preview-button",
28845
- onClick: O[0] || (O[0] = (F) => A.value = !0),
28844
+ onClick: O[0] || (O[0] = (Q) => A.value = !0),
28846
28845
  onMouseenter: N,
28847
- onMouseleave: O[1] || (O[1] = (F) => C.value = !C.value)
28846
+ onMouseleave: O[1] || (O[1] = (Q) => w.value = !w.value)
28848
28847
  }, [
28849
28848
  o("video", {
28850
28849
  ref_key: "previewPlayer",
@@ -28858,11 +28857,11 @@ const Xr = ["data-theme"], ed = {
28858
28857
  }, null, 44, r4),
28859
28858
  W(ue, { name: "modal-fade" }, {
28860
28859
  default: J(() => [
28861
- C.value ? (l(), u("div", d4, [
28860
+ w.value ? (l(), u("div", d4, [
28862
28861
  e.message.views ? (l(), u("div", {
28863
28862
  key: 0,
28864
28863
  class: "video-message__views",
28865
- onClick: Yf(w, ["stop"])
28864
+ onClick: Yf(C, ["stop"])
28866
28865
  }, [
28867
28866
  O[3] || (O[3] = o("span", { class: "pi pi-eye" }, null, -1)),
28868
28867
  o("p", null, E(e.message.views), 1)
@@ -28881,7 +28880,7 @@ const Xr = ["data-theme"], ed = {
28881
28880
  }),
28882
28881
  W(ue, { name: "modal-fade" }, {
28883
28882
  default: J(() => [
28884
- C.value ? (l(), u("a", {
28883
+ w.value ? (l(), u("a", {
28885
28884
  key: 0,
28886
28885
  class: "video-message__download-button",
28887
28886
  href: e.message.url,
@@ -28897,10 +28896,10 @@ const Xr = ["data-theme"], ed = {
28897
28896
  ], 32),
28898
28897
  W(ue, { name: "modal-fade" }, {
28899
28898
  default: J(() => [
28900
- _.value && e.message.actions ? (l(), u("button", {
28899
+ p.value && e.message.actions ? (l(), u("button", {
28901
28900
  key: 0,
28902
28901
  class: "video-message__menu-button",
28903
- onClick: O[2] || (O[2] = (F) => g.value = !g.value)
28902
+ onClick: O[2] || (O[2] = (Q) => g.value = !g.value)
28904
28903
  }, O[6] || (O[6] = [
28905
28904
  o("span", { class: "pi pi-ellipsis-h" }, null, -1)
28906
28905
  ]))) : v("", !0)
@@ -29465,14 +29464,14 @@ const Xr = ["data-theme"], ed = {
29465
29464
  _f("chatAppId", A), _f("extChatAppId", t.extChatAppId ? t.extChatAppId : "");
29466
29465
  const g = (h) => {
29467
29466
  s.value = !0, c.value = h.clientX - a.value.offsetLeft, r.value = h.clientY - a.value.offsetTop;
29468
- }, _ = () => s.value = !1, C = (h) => {
29467
+ }, p = () => s.value = !1, w = (h) => {
29469
29468
  if (s.value) {
29470
- const y = h.clientX - c.value, w = h.clientY - r.value;
29471
- n.value.x = y, n.value.y = w;
29469
+ const y = h.clientX - c.value, C = h.clientY - r.value;
29470
+ n.value.x = y, n.value.y = C;
29472
29471
  }
29473
29472
  };
29474
29473
  return me(() => {
29475
- document.addEventListener("mousemove", C), window.addEventListener("resize", () => {
29474
+ document.addEventListener("mousemove", w), window.addEventListener("resize", () => {
29476
29475
  a.value && (n.value.x = Math.max(
29477
29476
  0,
29478
29477
  Math.min(
@@ -29507,8 +29506,8 @@ const Xr = ["data-theme"], ed = {
29507
29506
  ref: i,
29508
29507
  class: "float-window__controls",
29509
29508
  onMousedown: g,
29510
- onMouseup: _,
29511
- onMouseleave: _
29509
+ onMouseup: p,
29510
+ onMouseleave: p
29512
29511
  }, [
29513
29512
  t.avatar ? (l(), u("img", {
29514
29513
  key: 0,
@@ -29521,7 +29520,7 @@ const Xr = ["data-theme"], ed = {
29521
29520
  ie(h.$slots, "controls"),
29522
29521
  o("button", {
29523
29522
  class: "float-window__close-button",
29524
- onClick: y[0] || (y[0] = (w) => h.$emit("close-window"))
29523
+ onClick: y[0] || (y[0] = (C) => h.$emit("close-window"))
29525
29524
  }, y[1] || (y[1] = [
29526
29525
  o("span", { class: "pi pi-times" }, null, -1)
29527
29526
  ]))