@talkjs/web-components 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/default.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- var Lu = (t) => {
2
+ var ku = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var Mu = (t, e, n) => e.has(t) || Lu("Cannot " + n);
6
- var _e = (t, e, n) => (Mu(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Cr = (t, e, n) => e.has(t) ? Lu("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Ro = (t, e, n, r) => (Mu(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
5
+ var Mu = (t, e, n) => e.has(t) || ku("Cannot " + n);
6
+ var _e = (t, e, n) => (Mu(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Cr = (t, e, n) => e.has(t) ? ku("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), Ro = (t, e, n, r) => (Mu(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
7
7
  import { getTalkSession as og } from "@talkjs/core";
8
8
  const Of = Object.freeze(Object.defineProperty({ __proto__: null, get AfterMessages() {
9
9
  return vI;
@@ -62,9 +62,9 @@ const Of = Object.freeze(Object.defineProperty({ __proto__: null, get AfterMessa
62
62
  }, get TimeAgo() {
63
63
  return UI;
64
64
  }, get VideoBlock() {
65
- return kI;
66
- }, get VoiceBlock() {
67
65
  return LI;
66
+ }, get VoiceBlock() {
67
+ return kI;
68
68
  }, get VoiceRecorder() {
69
69
  return GI;
70
70
  } }, Symbol.toStringTag, { value: "Module" }));
@@ -120,9 +120,9 @@ function ts() {
120
120
  function xu(t, e, n, r, i, o, s, a, l, u, c) {
121
121
  var d, h, p, m, _, E, A, g = r && r.__k || yf, S = e.length;
122
122
  for (l = (function(O, D, I, R, y) {
123
- var v, T, C, N, k, b = I.length, L = b, x = 0;
124
- for (O.__k = new Array(y), v = 0; v < y; v++) (T = D[v]) != null && typeof T != "boolean" && typeof T != "function" ? (typeof T == "string" || typeof T == "number" || typeof T == "bigint" || T.constructor == String ? T = O.__k[v] = Ii(null, T, null, null, null) : Fi(T) ? T = O.__k[v] = Ii(ie, { children: T }, null, null, null) : T.constructor == null && T.__b > 0 ? T = O.__k[v] = Ii(T.type, T.props, T.key, T.ref ? T.ref : null, T.__v) : O.__k[v] = T, N = v + x, T.__ = O, T.__b = O.__b + 1, C = null, (k = T.__i = ag(T, I, N, L)) != -1 && (L--, (C = I[k]) && (C.__u |= 2)), C == null || C.__v == null ? (k == -1 && (y > b ? x-- : y < b && x++), typeof T.type != "function" && (T.__u |= 4)) : k != N && (k == N - 1 ? x-- : k == N + 1 ? x++ : (k > N ? x-- : x++, T.__u |= 4))) : O.__k[v] = null;
125
- if (L) for (v = 0; v < b; v++) (C = I[v]) != null && !(2 & C.__u) && (C.__e == R && (R = Kr(C)), Lf(C, C));
123
+ var v, T, C, N, L, b = I.length, k = b, x = 0;
124
+ for (O.__k = new Array(y), v = 0; v < y; v++) (T = D[v]) != null && typeof T != "boolean" && typeof T != "function" ? (typeof T == "string" || typeof T == "number" || typeof T == "bigint" || T.constructor == String ? T = O.__k[v] = Ii(null, T, null, null, null) : Fi(T) ? T = O.__k[v] = Ii(ie, { children: T }, null, null, null) : T.constructor == null && T.__b > 0 ? T = O.__k[v] = Ii(T.type, T.props, T.key, T.ref ? T.ref : null, T.__v) : O.__k[v] = T, N = v + x, T.__ = O, T.__b = O.__b + 1, C = null, (L = T.__i = ag(T, I, N, k)) != -1 && (k--, (C = I[L]) && (C.__u |= 2)), C == null || C.__v == null ? (L == -1 && (y > b ? x-- : y < b && x++), typeof T.type != "function" && (T.__u |= 4)) : L != N && (L == N - 1 ? x-- : L == N + 1 ? x++ : (L > N ? x-- : x++, T.__u |= 4))) : O.__k[v] = null;
125
+ if (k) for (v = 0; v < b; v++) (C = I[v]) != null && !(2 & C.__u) && (C.__e == R && (R = Kr(C)), kf(C, C));
126
126
  return R;
127
127
  })(n, e, g, l, S), d = 0; d < S; d++) (p = n.__k[d]) != null && (h = p.__i == -1 ? xi : g[p.__i] || xi, p.__i = d, E = Ec(t, p, h, i, o, s, a, l, u, c), m = p.__e, p.ref && h.ref != p.ref && (h.ref && _c(h.ref, null, p), c.push(p.ref, p.__c || m, p)), _ == null && m != null && (_ = m), (A = !!(4 & p.__u)) || h.__k === p.__k ? l = bf(p, l, t, A) : typeof p.type == "function" && E !== void 0 ? l = E : m && (l = m.nextSibling), p.__u &= -7);
128
128
  return n.__e = _, l;
@@ -207,7 +207,7 @@ function Ec(t, e, n, r, i, o, s, a, l, u) {
207
207
  } else do
208
208
  d.__d = !1, I && I(e), c = d.render(d.props, d.state, d.context), d.state = d.__s;
209
209
  while (d.__d && ++R < 25);
210
- d.state = d.__s, d.getChildContext != null && (r = Yt(Yt({}, r), d.getChildContext())), g && !h && d.getSnapshotBeforeUpdate != null && (_ = d.getSnapshotBeforeUpdate(p, m)), v = c, c != null && c.type === ie && c.key == null && (v = kf(c.props.children)), a = xu(t, Fi(v) ? v : [v], e, n, r, i, o, s, a, l, u), d.base = e.__e, e.__u &= -161, d.__h.length && s.push(d), E && (d.__E = d.__ = null);
210
+ d.state = d.__s, d.getChildContext != null && (r = Yt(Yt({}, r), d.getChildContext())), g && !h && d.getSnapshotBeforeUpdate != null && (_ = d.getSnapshotBeforeUpdate(p, m)), v = c, c != null && c.type === ie && c.key == null && (v = Lf(c.props.children)), a = xu(t, Fi(v) ? v : [v], e, n, r, i, o, s, a, l, u), d.base = e.__e, e.__u &= -161, d.__h.length && s.push(d), E && (d.__E = d.__ = null);
211
211
  } catch (N) {
212
212
  if (e.__v = null, l || o != null) if (N.then) {
213
213
  for (e.__u |= l ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
@@ -219,19 +219,19 @@ function Ec(t, e, n, r, i, o, s, a, l, u) {
219
219
  else e.__e = n.__e, e.__k = n.__k, N.then || Ol(e);
220
220
  ne.__e(N, e, n);
221
221
  }
222
- else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = (function(N, k, b, L, x, M, U, V, $) {
223
- var Y, oe, le, ce, pe, tt, jt, nt = b.props || xi, ve = k.props, Te = k.type;
224
- if (Te == "svg" ? x = "http://www.w3.org/2000/svg" : Te == "math" ? x = "http://www.w3.org/1998/Math/MathML" : x || (x = "http://www.w3.org/1999/xhtml"), M != null) {
225
- for (Y = 0; Y < M.length; Y++) if ((pe = M[Y]) && "setAttribute" in pe == !!Te && (Te ? pe.localName == Te : pe.nodeType == 3)) {
222
+ else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = (function(N, L, b, k, x, M, U, V, $) {
223
+ var Y, oe, le, ce, pe, tt, jt, nt = b.props || xi, ve = L.props, Re = L.type;
224
+ if (Re == "svg" ? x = "http://www.w3.org/2000/svg" : Re == "math" ? x = "http://www.w3.org/1998/Math/MathML" : x || (x = "http://www.w3.org/1999/xhtml"), M != null) {
225
+ for (Y = 0; Y < M.length; Y++) if ((pe = M[Y]) && "setAttribute" in pe == !!Re && (Re ? pe.localName == Re : pe.nodeType == 3)) {
226
226
  N = pe, M[Y] = null;
227
227
  break;
228
228
  }
229
229
  }
230
230
  if (N == null) {
231
- if (Te == null) return document.createTextNode(ve);
232
- N = document.createElementNS(x, Te, ve.is && ve), V && (ne.__m && ne.__m(k, M), V = !1), M = null;
231
+ if (Re == null) return document.createTextNode(ve);
232
+ N = document.createElementNS(x, Re, ve.is && ve), V && (ne.__m && ne.__m(L, M), V = !1), M = null;
233
233
  }
234
- if (Te == null) nt === ve || V && N.data == ve || (N.data = ve);
234
+ if (Re == null) nt === ve || V && N.data == ve || (N.data = ve);
235
235
  else {
236
236
  if (M = M && so.call(N.childNodes), !V && M != null) for (nt = {}, Y = 0; Y < N.attributes.length; Y++) nt[(pe = N.attributes[Y]).name] = pe.value;
237
237
  for (Y in nt) if (pe = nt[Y], Y != "children") {
@@ -242,9 +242,9 @@ function Ec(t, e, n, r, i, o, s, a, l, u) {
242
242
  }
243
243
  }
244
244
  for (Y in ve) pe = ve[Y], Y == "children" ? ce = pe : Y == "dangerouslySetInnerHTML" ? oe = pe : Y == "value" ? tt = pe : Y == "checked" ? jt = pe : V && typeof pe != "function" || nt[Y] === pe || Io(N, Y, pe, nt[Y], x);
245
- if (oe) V || le && (oe.__html == le.__html || oe.__html == N.innerHTML) || (N.innerHTML = oe.__html), k.__k = [];
246
- else if (le && (N.innerHTML = ""), xu(k.type == "template" ? N.content : N, Fi(ce) ? ce : [ce], k, b, L, Te == "foreignObject" ? "http://www.w3.org/1999/xhtml" : x, M, U, M ? M[0] : b.__k && Kr(b, 0), V, $), M != null) for (Y = M.length; Y--; ) gl(M[Y]);
247
- V || (Y = "value", Te == "progress" && tt == null ? N.removeAttribute("value") : tt != null && (tt !== N[Y] || Te == "progress" && !tt || Te == "option" && tt != nt[Y]) && Io(N, Y, tt, nt[Y], x), Y = "checked", jt != null && jt != N[Y] && Io(N, Y, jt, nt[Y], x));
245
+ if (oe) V || le && (oe.__html == le.__html || oe.__html == N.innerHTML) || (N.innerHTML = oe.__html), L.__k = [];
246
+ else if (le && (N.innerHTML = ""), xu(L.type == "template" ? N.content : N, Fi(ce) ? ce : [ce], L, b, k, Re == "foreignObject" ? "http://www.w3.org/1999/xhtml" : x, M, U, M ? M[0] : b.__k && Kr(b, 0), V, $), M != null) for (Y = M.length; Y--; ) gl(M[Y]);
247
+ V || (Y = "value", Re == "progress" && tt == null ? N.removeAttribute("value") : tt != null && (tt !== N[Y] || Re == "progress" && !tt || Re == "option" && tt != nt[Y]) && Io(N, Y, tt, nt[Y], x), Y = "checked", jt != null && jt != N[Y] && Io(N, Y, jt, nt[Y], x));
248
248
  }
249
249
  return N;
250
250
  })(n.__e, e, n, r, i, o, s, l, u);
@@ -265,8 +265,8 @@ function wf(t, e, n) {
265
265
  }
266
266
  });
267
267
  }
268
- function kf(t) {
269
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Fi(t) ? t.map(kf) : Yt({}, t);
268
+ function Lf(t) {
269
+ return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Fi(t) ? t.map(Lf) : Yt({}, t);
270
270
  }
271
271
  function _c(t, e, n) {
272
272
  try {
@@ -278,7 +278,7 @@ function _c(t, e, n) {
278
278
  ne.__e(i, n);
279
279
  }
280
280
  }
281
- function Lf(t, e, n) {
281
+ function kf(t, e, n) {
282
282
  var r, i;
283
283
  if (ne.unmount && ne.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || _c(r, null, e)), (r = t.__c) != null) {
284
284
  if (r.componentWillUnmount) try {
@@ -288,7 +288,7 @@ function Lf(t, e, n) {
288
288
  }
289
289
  r.base = r.__P = null;
290
290
  }
291
- if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && Lf(r[i], e, n || typeof t.type != "function");
291
+ if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && kf(r[i], e, n || typeof t.type != "function");
292
292
  n || gl(t.__e), t.__c = t.__ = t.__e = void 0;
293
293
  }
294
294
  function lg(t, e, n) {
@@ -815,11 +815,11 @@ const em = Object.freeze(Object.defineProperty({ __proto__: null, Children: Hf,
815
815
  }];
816
816
  }, useId: Ps, useImperativeHandle: gn, useInsertionEffect: Tc, useLayoutEffect: We, useMemo: Z, useReducer: Ms, useRef: X, useState: ee, useSyncExternalStore: Sc, useTransition: Dc, version: "18.3.1" }, Symbol.toStringTag, { value: "Module" }));
817
817
  var Nc = Object.prototype.hasOwnProperty;
818
- function Le(t) {
818
+ function ke(t) {
819
819
  return Array.isArray(t);
820
820
  }
821
821
  function Kt(t) {
822
- return !(!t || typeof t != "object" || t instanceof Date || Le(t));
822
+ return !(!t || typeof t != "object" || t instanceof Date || ke(t));
823
823
  }
824
824
  function Ig(t) {
825
825
  return Kt(t) && t.constructor === Object;
@@ -848,7 +848,7 @@ function An(t) {
848
848
  }
849
849
  function rs(t) {
850
850
  if (!t) return !1;
851
- if (Le(t)) return t.length === 0;
851
+ if (ke(t)) return t.length === 0;
852
852
  if (Be(t) || An(t)) return t.size === 0;
853
853
  for (const e in t) if (Nc.call(t, e)) return !1;
854
854
  return !0;
@@ -865,13 +865,13 @@ function im(t) {
865
865
  return t && t[Ng];
866
866
  }
867
867
  function om(t) {
868
- return Le(t) ? "array" : Be(t) ? "map" : t instanceof Set ? "set" : "object";
868
+ return ke(t) ? "array" : Be(t) ? "map" : t instanceof Set ? "set" : "object";
869
869
  }
870
870
  function bg(t, e) {
871
871
  return Be(e) ? { __LSType: "Map", value: Array.from(e.entries()) } : e instanceof Set ? { __LSType: "Set", value: Array.from(e) } : (we.replacer && (e = we.replacer(t, e)), e);
872
872
  }
873
873
  var wg = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;
874
- function kg(t, e) {
874
+ function Lg(t, e) {
875
875
  if (e) {
876
876
  if (typeof e == "string" && wg.test(e)) return new Date(e);
877
877
  if (typeof e == "object") {
@@ -886,7 +886,7 @@ function sm(t) {
886
886
  return t && JSON.stringify(t, bg);
887
887
  }
888
888
  function am(t) {
889
- return t && JSON.parse(t, kg);
889
+ return t && JSON.parse(t, Lg);
890
890
  }
891
891
  function lm(t) {
892
892
  return am(sm(t));
@@ -955,11 +955,11 @@ function dm(t, e) {
955
955
  function Rl(t, e, n, r) {
956
956
  return e ? void 0 : t ? r ? Array.from(t) : n ? Array.from(t.keys()) : Object.keys(t) : [];
957
957
  }
958
- function Lg(t, e) {
958
+ function kg(t, e) {
959
959
  return t && Object.defineProperty(t, e, { value: !0, enumerable: !1, writable: !0, configurable: !0 }), t;
960
960
  }
961
961
  var rd = function(t) {
962
- return Lg(t, rm);
962
+ return kg(t, rm);
963
963
  };
964
964
  function hm(t, e) {
965
965
  var n;
@@ -981,7 +981,7 @@ function pm(t, e, n, r, i, o, s) {
981
981
  const p = u ? d ? u.get(a) : u[a] : void 0;
982
982
  if (h === Hs) return u && (d ? l.set(a, p) : l[a] = p, s == null || s(e.slice(0, c + 1), p)), t;
983
983
  if (h === void 0 && r === void 0 && c === e.length - 1) return t;
984
- c < e.length - 1 && h == null && (h = kc(n[c]), Be(l) ? l.set(a, h) : l[a] = h), c < e.length - 1 && (l = h, u && (u = p));
984
+ c < e.length - 1 && h == null && (h = Lc(n[c]), Be(l) ? l.set(a, h) : l[a] = h), c < e.length - 1 && (l = h, u && (u = p));
985
985
  }
986
986
  }
987
987
  return a === void 0 ? t = i === "merge" ? is(t, r) : r : i === "merge" ? l[a] = is(l[a], r) : Be(l) ? l.set(a, r) : l[a] = r, t;
@@ -990,14 +990,14 @@ function id(t, e, n) {
990
990
  let r = n;
991
991
  for (let i = 0; i < t.length; i++) {
992
992
  const o = t[i];
993
- r = r ? r[o] : kc(e[i]);
993
+ r = r ? r[o] : Lc(e[i]);
994
994
  }
995
995
  return r;
996
996
  }
997
997
  function Il(t) {
998
- return !(!t || (Kt(t) || Le(t)) && rs(t));
998
+ return !(!t || (Kt(t) || ke(t)) && rs(t));
999
999
  }
1000
- function kc(t) {
1000
+ function Lc(t) {
1001
1001
  switch (t) {
1002
1002
  case "array":
1003
1003
  return [];
@@ -1015,12 +1015,12 @@ function Pg(t, e, n) {
1015
1015
  }
1016
1016
  function is(t, ...e) {
1017
1017
  if (Ze(t)) return e[e.length - 1];
1018
- let n = Le(t) ? [...t] : { ...t };
1018
+ let n = ke(t) ? [...t] : { ...t };
1019
1019
  for (let r = 0; r < e.length; r++) {
1020
1020
  const i = e[r];
1021
- if (Ig(i) || Le(i)) {
1021
+ if (Ig(i) || ke(i)) {
1022
1022
  const o = i;
1023
- for (const s in o) Nc.call(o, s) && (o[s] instanceof Object && !Ne(o[s]) && Object.keys(o[s]).length > 0 ? n[s] = is(n[s] || (Le(o[s]) ? [] : {}), o[s]) : n[s] = o[s]);
1023
+ for (const s in o) Nc.call(o, s) && (o[s] instanceof Object && !Ne(o[s]) && Object.keys(o[s]).length > 0 ? n[s] = is(n[s] || (ke(o[s]) ? [] : {}), o[s]) : n[s] = o[s]);
1024
1024
  } else n = i;
1025
1025
  }
1026
1026
  return n;
@@ -1043,7 +1043,7 @@ function Fg(t, e) {
1043
1043
  return;
1044
1044
  }
1045
1045
  }
1046
- function Lc(t, e) {
1046
+ function kc(t, e) {
1047
1047
  return function() {
1048
1048
  return Fg(t, e);
1049
1049
  };
@@ -1079,7 +1079,7 @@ function mm(t, e) {
1079
1079
  const h = Array.from(c);
1080
1080
  for (let p = 0; p < h.length; p++) {
1081
1081
  const m = h[p], { track: _, noArgs: E, listener: A } = m;
1082
- n.has(A) || (_ === !0 ? i <= 0 : _ !== bc || l && i <= 0) && (E || d || (d = { value: o, isFromPersist: s, isFromSync: a, getPrevious: Lc(o, r), changes: r }), _ || n.add(A), A(d));
1082
+ n.has(A) || (_ === !0 ? i <= 0 : _ !== bc || l && i <= 0) && (E || d || (d = { value: o, isFromPersist: s, isFromSync: a, getPrevious: kc(o, r), changes: r }), _ || n.add(A), A(d));
1083
1083
  }
1084
1084
  }
1085
1085
  });
@@ -1266,14 +1266,14 @@ function Om(t, e) {
1266
1266
  }
1267
1267
  function vm(t, e, n) {
1268
1268
  if (Gt(t)) return e ? t.then(e) : t;
1269
- const r = Le(t);
1269
+ const r = ke(t);
1270
1270
  let i, o;
1271
1271
  return mt(function(s) {
1272
1272
  const a = r ? t.map((l) => qt(l)) : qt(t);
1273
1273
  if (!Gt(a)) {
1274
1274
  {
1275
1275
  let l = !0;
1276
- if (Le(a)) for (let u = 0; u < a.length; u++) {
1276
+ if (ke(a)) for (let u = 0; u < a.length; u++) {
1277
1277
  let c = a[u];
1278
1278
  Ne(c) ? c = qt(c) : te(c) && (c = c()), l = l && !!(n ? Il(c) : c);
1279
1279
  }
@@ -1334,11 +1334,11 @@ function Pc(t, e, n) {
1334
1334
  const D = e !== n;
1335
1335
  return D && (t.listeners || t.listenersImmediate) && ji(t, e, n, 0), D;
1336
1336
  }
1337
- const s = Le(e);
1337
+ const s = ke(e);
1338
1338
  let a, l;
1339
1339
  const u = Be(e), c = An(e), d = Be(n), h = An(n), p = Rl(e, s, u, c), m = Rl(n, s, d, h), _ = ((r = p || e) == null ? void 0 : r.length) || 0, E = ((i = m || n) == null ? void 0 : i.length) || 0;
1340
1340
  let A, g, S, O = !1;
1341
- if (s && Le(n)) {
1341
+ if (s && ke(n)) {
1342
1342
  if (n.length > 0) {
1343
1343
  const D = n[0];
1344
1344
  if (D !== void 0 && (A = um(D, t), A && (g = te(A), a = /* @__PURE__ */ new Map(), l = []), t.children)) for (let I = 0; I < n.length; I++) {
@@ -1373,11 +1373,11 @@ function Pc(t, e, n) {
1373
1373
  const T = d ? n == null ? void 0 : n.get(y) : n == null ? void 0 : n[y];
1374
1374
  let C = !dm(v, T);
1375
1375
  if (C) {
1376
- const N = A && v ? g ? A(v) : v[A] : void 0, k = (o = t.children) == null ? void 0 : o.get(y);
1376
+ const N = A && v ? g ? A(v) : v[A] : void 0, L = (o = t.children) == null ? void 0 : o.get(y);
1377
1377
  if (Ne(v)) {
1378
- const L = lo(v);
1379
- if ((k == null ? void 0 : k.linkedToNode) === L) {
1380
- const M = Ae(L);
1378
+ const k = lo(v);
1379
+ if ((L == null ? void 0 : L.linkedToNode) === k) {
1380
+ const M = Ae(k);
1381
1381
  u ? e.set(y, M) : e[y] = M;
1382
1382
  continue;
1383
1383
  }
@@ -1386,19 +1386,19 @@ function Pc(t, e, n) {
1386
1386
  }
1387
1387
  let b = Ut(t, y, v);
1388
1388
  if (b.lazy || !te(v) && !Ne(v) || (Cm(b, v), Mn(b)), s && N !== void 0) {
1389
- const L = N !== void 0 ? a == null ? void 0 : a.get(N) : void 0;
1390
- if (L) {
1391
- if (L !== void 0 && L.key !== y) {
1392
- const x = n[L.key];
1393
- D && (b = L, t.children.delete(b.key), b.key = y, l.push([y, b])), I = !0, C = x !== v;
1389
+ const k = N !== void 0 ? a == null ? void 0 : a.get(N) : void 0;
1390
+ if (k) {
1391
+ if (k !== void 0 && k.key !== y) {
1392
+ const x = n[k.key];
1393
+ D && (b = k, t.children.delete(b.key), b.key = y, l.push([y, b])), I = !0, C = x !== v;
1394
1394
  }
1395
1395
  } else O = !0;
1396
1396
  }
1397
1397
  if (C) if (te(v) || Ne(v)) ei(t, y, v);
1398
1398
  else if (Ze(v)) O = !0;
1399
1399
  else {
1400
- const L = Pc(b, v, T);
1401
- O = O || L, C = L;
1400
+ const k = Pc(b, v, T);
1401
+ O = O || k, C = k;
1402
1402
  }
1403
1403
  (C || s && !D) && (b.listeners || b.listenersImmediate) && ji(b, v, T, 0, !D);
1404
1404
  }
@@ -1515,7 +1515,7 @@ var Tm = { get(t, e, n) {
1515
1515
  })(s, e), (function(h) {
1516
1516
  return h == null;
1517
1517
  })(s) && c === void 0 && (Da.has(e) || ld.has(e)) && (s = [], Da.has(e) && mn(t, s), c = s[e]), te(c)) {
1518
- if (Le(s)) {
1518
+ if (ke(s)) {
1519
1519
  if (Da.has(e)) return (...p) => Dm(t, s, e, ...p);
1520
1520
  if (ld.has(e)) return $o(t, !0), function(p, m) {
1521
1521
  const _ = e === "reduce", E = _ ? (S, O, D, I) => p(S, ft(t, D + "", O), D, I) : (S, O, D) => p(ft(t, O + "", S), O, D);
@@ -1533,7 +1533,7 @@ var Tm = { get(t, e, n) {
1533
1533
  const h = (o = t.functions) == null ? void 0 : o.get(e);
1534
1534
  return h ? ft(t, e, h) : c.bind(s);
1535
1535
  }
1536
- return Ze(c) && e === "length" && Le(s) ? ($o(t, !0), c) : ft(t, e);
1536
+ return Ze(c) && e === "length" && ke(s) ? ($o(t, !0), c) : ft(t, e);
1537
1537
  }, getPrototypeOf(t) {
1538
1538
  const e = Ae(t);
1539
1539
  return e !== null && typeof e == "object" ? Reflect.getPrototypeOf(e) : null;
@@ -1542,7 +1542,7 @@ var Tm = { get(t, e, n) {
1542
1542
  const e = js(t, !0);
1543
1543
  if (Ze(e)) return [];
1544
1544
  const n = e ? Reflect.ownKeys(e) : [];
1545
- if (Le(e) && n[n.length - 1] === "length" && n.splice(n.length - 1, 1), te(t)) {
1545
+ if (ke(e) && n[n.length - 1] === "length" && n.splice(n.length - 1, 1), te(t)) {
1546
1546
  const r = Reflect.ownKeys(t);
1547
1547
  ["caller", "arguments", "prototype"].forEach((i) => r.includes(i) && n.push(i));
1548
1548
  }
@@ -1589,12 +1589,12 @@ function Zr(t, e, n, r) {
1589
1589
  function Rm(t, e) {
1590
1590
  e === void 0 && Fs(t) && (e = t.key, t = t.parent);
1591
1591
  const n = Ae(t);
1592
- Le(n) ? Dm(t, n, "splice", e, 1) : Zr(t, e != null ? e : "_", Hs, -1);
1592
+ ke(n) ? Dm(t, n, "splice", e, 1) : Zr(t, e != null ? e : "_", Hs, -1);
1593
1593
  }
1594
1594
  function Im(t, e, n, r, i, o, s, a, l) {
1595
1595
  r || (r = t), Us(), o === void 0 && (o = Ze(e));
1596
1596
  let u, c, d = l || o, h = !1;
1597
- (!o || n && !Ze(n)) && (d = d || Pc(r, e, n), Le(e) ? u = e : (Be(e) || An(e)) && (c = e)), Le(i) ? u = i : (Be(i) || An(i)) && (c = i), u ? h = (u == null ? void 0 : u.length) !== (n == null ? void 0 : n.length) : c && (h = (c == null ? void 0 : c.size) !== (n == null ? void 0 : n.size)), (o || !e || rs(e) && !rs(n) ? e !== n : d) && ji(o && s ? t : r, e, n, (a != null ? a : n === void 0) ? -1 : d ? 0 : 1, h), si();
1597
+ (!o || n && !Ze(n)) && (d = d || Pc(r, e, n), ke(e) ? u = e : (Be(e) || An(e)) && (c = e)), ke(i) ? u = i : (Be(i) || An(i)) && (c = i), u ? h = (u == null ? void 0 : u.length) !== (n == null ? void 0 : n.length) : c && (h = (c == null ? void 0 : c.size) !== (n == null ? void 0 : n.size)), (o || !e || rs(e) && !rs(n) ? e !== n : d) && ji(o && s ? t : r, e, n, (a != null ? a : n === void 0) ? -1 : d ? 0 : 1, h), si();
1598
1598
  }
1599
1599
  function Qr(t, e, n) {
1600
1600
  const r = t.numGets = (t.numGets || 0) + 1;
@@ -1656,14 +1656,14 @@ function Mn(t, e) {
1656
1656
  const D = mt(() => {
1657
1657
  var I, R, y, v;
1658
1658
  if (_) _ = !1, te(Ae(c)) && mn(c, void 0);
1659
- else if (!yo && g && (function(b, L) {
1659
+ else if (!yo && g && (function(b, k) {
1660
1660
  if (!yo && !(function(M) {
1661
1661
  var U, V;
1662
1662
  let $ = M, Y = M.numListenersRecursive > 0;
1663
1663
  for (; $ && !Y; ) ((U = $.listeners) != null && U.size || (V = $.listenersImmediate) != null && V.size) && (Y = !0), $ = $.parent;
1664
1664
  return Y;
1665
1665
  })(b)) {
1666
- L && (b.dirtyFn = L);
1666
+ k && (b.dirtyFn = k);
1667
1667
  let M = b;
1668
1668
  for (; M; ) M.dirtyChildren || (M.dirtyChildren = /* @__PURE__ */ new Set()), M.dirtyChildren.add(b), M = M.parent;
1669
1669
  return !0;
@@ -1672,8 +1672,8 @@ function Mn(t, e) {
1672
1672
  let T = E(), C = !1;
1673
1673
  const N = Ne(T);
1674
1674
  (N || c.linkedToNode) && (C = N, T = ls(c, T)), te(T) && T.length === 0 && (T = T());
1675
- const k = N || T == null ? void 0 : T[Ui];
1676
- if (k && (c.activationState = k, T = void 0), m = !1, p = Gt(T), c.activated) {
1675
+ const L = N || T == null ? void 0 : T[Ui];
1676
+ if (L && (c.activationState = L, T = void 0), m = !1, p = Gt(T), c.activated) {
1677
1677
  if (c.activationState) {
1678
1678
  const b = c.activationState;
1679
1679
  (R = (I = c.state) == null ? void 0 : I.peek()) != null && R.sync ? (c.state.sync(), m = !0) : T = (v = (y = b.get) == null ? void 0 : y.call(b)) != null ? v : b.initial;
@@ -1681,11 +1681,11 @@ function Mn(t, e) {
1681
1681
  } else {
1682
1682
  c.activated = !0;
1683
1683
  let b = Vg;
1684
- k != null && k.synced && (b = we.activateSyncedNode, m = !0);
1685
- const L = b(c, T);
1686
- h = L.update;
1687
- let x = L.value;
1688
- !C && Ne(x) && (x = ls(c, x)), T = x != null ? x : k == null ? void 0 : k.initial;
1684
+ L != null && L.synced && (b = we.activateSyncedNode, m = !0);
1685
+ const k = b(c, T);
1686
+ h = k.update;
1687
+ let x = k.value;
1688
+ !C && Ne(x) && (x = ls(c, x)), T = x != null ? x : L == null ? void 0 : L.initial;
1689
1689
  }
1690
1690
  return m && (A = T), p = p || Gt(T), T;
1691
1691
  }, (I) => {
@@ -1714,7 +1714,7 @@ function Mn(t, e) {
1714
1714
  else Ne(o) && (o = ei(i.parent, i.key, o));
1715
1715
  }
1716
1716
  return hm(i, o), !l && !i.needsExtract || i.isPlain || Ne(o) || Ze(o) || (s && (function(u, c) {
1717
- if (!c.recursivelyAutoActivated && (Kt(u) || Le(u)) && !Bi(u)) {
1717
+ if (!c.recursivelyAutoActivated && (Kt(u) || ke(u)) && !Bi(u)) {
1718
1718
  c.recursivelyAutoActivated = !0;
1719
1719
  const d = [];
1720
1720
  Nm(u, d, () => {
@@ -1745,7 +1745,7 @@ function Vg(t, e) {
1745
1745
  const l = (u) => {
1746
1746
  if (s.length > 0) {
1747
1747
  let c, d, h, p = !1, m = !1;
1748
- u ? (c = u.changes, d = u.value, p = u.isFromPersist, m = u.isFromSync, h = u.getPrevious) : (c = s, d = o, h = Lc(d, c)), s = [], o = void 0, we.pendingNodes.delete(t), a++;
1748
+ u ? (c = u.changes, d = u.value, p = u.isFromPersist, m = u.isFromSync, h = u.getPrevious) : (c = s, d = o, h = kc(d, c)), s = [], o = void 0, we.pendingNodes.delete(t), a++;
1749
1749
  const _ = a, E = () => {
1750
1750
  _ === a && (t.isComputing = !0, n({ value: d, changes: c, isFromPersist: p, isFromSync: m, getPrevious: h }), t.isComputing = !1);
1751
1751
  };
@@ -1770,7 +1770,7 @@ function ls(t, e) {
1770
1770
  }
1771
1771
  function Nm(t, e, n) {
1772
1772
  var r;
1773
- if ((Kt(t) || Le(t)) && !Bi(t) && !im(t)) {
1773
+ if ((Kt(t) || ke(t)) && !Bi(t) && !im(t)) {
1774
1774
  for (const i in t) if (Nc.call(t, i)) {
1775
1775
  const o = t[i];
1776
1776
  if (Ne(o)) {
@@ -1813,9 +1813,9 @@ Co("peek", (t) => (bl(), Or(t))), Co("get", (t, e) => (bl(), js(t, e))), Co("set
1813
1813
  }, Zn.prototype.delete = function() {
1814
1814
  return this.set(void 0), this;
1815
1815
  };
1816
- var Vs = { createPreviousHandler: Lc, clone: lm, deactivateNode: ym, deepMerge: is, ensureNodeValue: wc, findIDKey: um, get: js, getChildNode: Ut, getKeys: Rl, getNode: lo, getNodeValue: Ae, getPathType: om, getProxy: ft, getValueAtPath: function(t, e) {
1816
+ var Vs = { createPreviousHandler: kc, clone: lm, deactivateNode: ym, deepMerge: is, ensureNodeValue: wc, findIDKey: um, get: js, getChildNode: Ut, getKeys: Rl, getNode: lo, getNodeValue: Ae, getPathType: om, getProxy: ft, getValueAtPath: function(t, e) {
1817
1817
  return e.reduce(Mg, t);
1818
- }, globalState: we, initializePathType: kc, ObservablePrimitiveClass: Zn, observableProperties: Cl, observableFns: Nl, optimized: bc, peek: Or, reactivateNode: Cm, registerMiddleware: function(t, e, n) {
1818
+ }, globalState: we, initializePathType: Lc, ObservablePrimitiveClass: Zn, observableProperties: Cl, observableFns: Nl, optimized: bc, peek: Or, reactivateNode: Cm, registerMiddleware: function(t, e, n) {
1819
1819
  let r = xr.get(t);
1820
1820
  r || (r = /* @__PURE__ */ new Map(), xr.set(t, r));
1821
1821
  let i = r.get(e);
@@ -1855,10 +1855,10 @@ class zs {
1855
1855
  return this._handlers.add(e), () => this._handlers.delete(e);
1856
1856
  }
1857
1857
  }
1858
- const wl = new zs(), Ce = new zs();
1858
+ const wl = new zs(), Te = new zs();
1859
1859
  function xc(t, e, n) {
1860
1860
  return { ...(function(i, o) {
1861
- return i === void 0 || i === "default" ? "default" : i === "classic" ? "classic" : (Ce.warn(`Invalid \`baseTheme\` value '${i}' for ${o}; expected "classic" or "default", falling back to "default".`), "default");
1861
+ return i === void 0 || i === "default" ? "default" : i === "classic" ? "classic" : (Te.warn(`Invalid \`baseTheme\` value '${i}' for ${o}; expected "classic" or "default", falling back to "default".`), "default");
1862
1862
  })(t, n) === "classic" ? cI : lI, ...e != null ? e : {} };
1863
1863
  }
1864
1864
  function pd(t, e, n) {
@@ -1966,7 +1966,7 @@ var Ed, _d, Gg = (_d || (_d = 1, md.exports = (function() {
1966
1966
  }, [l]), o(c), c;
1967
1967
  };
1968
1968
  return Ra.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : a, Ra;
1969
- })()), md.exports), Ad = !1, kl = { inObserver: !1 }, gd = void 0, Wg = () => gd || (gd = oi(null));
1969
+ })()), md.exports), Ad = !1, Ll = { inObserver: !1 }, gd = void 0, Wg = () => gd || (gd = oi(null));
1970
1970
  function Sd(t) {
1971
1971
  const e = Bs(t);
1972
1972
  if (!F.use) throw e;
@@ -1974,7 +1974,7 @@ function Sd(t) {
1974
1974
  }
1975
1975
  function J(t, e) {
1976
1976
  let n;
1977
- if (kl.inObserver && Ne(t) && !(e != null && e.suspense)) return n = qt(t, e), e != null && e.suspense && n === void 0 && Sd(t), n;
1977
+ if (Ll.inObserver && Ne(t) && !(e != null && e.suspense)) return n = qt(t, e), e != null && e.suspense && n === void 0 && Sd(t), n;
1978
1978
  try {
1979
1979
  const r = Sr(Wg()), i = Z(() => /* @__PURE__ */ (function(l, u) {
1980
1980
  let c, d, h, p, m, _, E = 0;
@@ -2009,7 +2009,7 @@ function J(t, e) {
2009
2009
  return e != null && e.suspense && n === void 0 && Sd(t), n;
2010
2010
  }
2011
2011
  var Od = typeof Symbol == "function" && Symbol.for;
2012
- function km(t, e, n, r, i) {
2012
+ function Lm(t, e, n, r, i) {
2013
2013
  const o = Od ? Symbol.for("react.forward_ref") : _t((m) => null).$$typeof, s = Od ? Symbol.for("react.memo") : ur((m) => null).$$typeof;
2014
2014
  if (t.__legend_proxied) return t;
2015
2015
  let a = !1, l = !1, u = t;
@@ -2024,8 +2024,8 @@ function km(t, e, n, r, i) {
2024
2024
  const y = R ? D : D.endsWith("$") ? D.slice(0, -1) : D.slice(1), v = i == null ? void 0 : i[y], T = v && Ne(I);
2025
2025
  if (g[y] = T && (v != null && v.selector) ? v.selector(g, I) : J(I), T && (v.defaultValue !== void 0 && g[y] === void 0 && (g[y] = v.defaultValue), v.handler && v.getValue)) {
2026
2026
  const C = (N) => {
2027
- var k;
2028
- I.set(v.getValue(N)), (k = A[v.handler]) == null || k.call(A, N);
2027
+ var L;
2028
+ I.set(v.getValue(N)), (L = A[v.handler]) == null || L.call(A, N);
2029
2029
  };
2030
2030
  g[v.handler] = q(C, [A[v.handler], i]);
2031
2031
  }
@@ -2035,11 +2035,11 @@ function km(t, e, n, r, i) {
2035
2035
  E[0] = g;
2036
2036
  }
2037
2037
  return e ? J(() => {
2038
- kl.inObserver = !0;
2038
+ Ll.inObserver = !0;
2039
2039
  try {
2040
2040
  return Reflect.apply(m, _, E);
2041
2041
  } finally {
2042
- kl.inObserver = !1;
2042
+ Ll.inObserver = !1;
2043
2043
  }
2044
2044
  }, { skipCheck: !0 }) : Reflect.apply(m, _, E);
2045
2045
  } }, h = new Proxy(u, d);
@@ -2054,7 +2054,7 @@ function Vi({ each: t, optimized: e, item: n, itemProps: r, sortValues: i, child
2054
2054
  if (!n && o) {
2055
2055
  const u = X(void 0);
2056
2056
  u.current = o, n = Z(() => {
2057
- return c = ({ item$: d, id: h }) => u.current(d, h), km(c, !0);
2057
+ return c = ({ item$: d, id: h }) => u.current(d, h), Lm(c, !0);
2058
2058
  var c;
2059
2059
  }, []);
2060
2060
  } else if (n.$$typeof !== Symbol.for("react.memo")) {
@@ -2063,7 +2063,7 @@ function Vi({ each: t, optimized: e, item: n, itemProps: r, sortValues: i, child
2063
2063
  }
2064
2064
  if (!a) return null;
2065
2065
  const l = [];
2066
- if (Le(a)) {
2066
+ if (ke(a)) {
2067
2067
  const u = a[0], c = Kg(t), d = a.length, h = d > 0 ? c && Xg(u, c) || (u.id !== void 0 ? "id" : u.key !== void 0 ? "key" : void 0) : void 0, p = te(h);
2068
2068
  for (let m = 0; m < d; m++) if (a[m]) {
2069
2069
  const _ = a[m], E = (s = p ? h(_) : _[h]) != null ? s : m, A = t[m], g = { key: E, id: E, item$: A, item: A };
@@ -2097,7 +2097,7 @@ new Proxy({}, { get(t, e) {
2097
2097
  return !o || !te(o) && rs(o) || (s.ref = o), he(n, s);
2098
2098
  });
2099
2099
  t[e] = (function(i, o, s) {
2100
- return km(i, !1, !0, o, s);
2100
+ return Lm(i, !1, !0, o, s);
2101
2101
  })(r, [], Td.get(e));
2102
2102
  }
2103
2103
  return t[e];
@@ -2130,15 +2130,15 @@ var Jg = (t, e) => {
2130
2130
  }, e);
2131
2131
  }
2132
2132
  };
2133
- function Lm(t) {
2133
+ function km(t) {
2134
2134
  return Jg(() => {
2135
2135
  const e = t();
2136
2136
  if (!Gt(e)) return e;
2137
2137
  }, []);
2138
2138
  }
2139
- var Zg = Lm;
2139
+ var Zg = km;
2140
2140
  function Mm(t) {
2141
- return Lm(() => t);
2141
+ return km(() => t);
2142
2142
  }
2143
2143
  var Qg = Mm, { deactivateNode: eS } = Vs;
2144
2144
  function ct(t, e) {
@@ -2244,7 +2244,7 @@ class Xm {
2244
2244
  const i = r.replace(/_/g, "-").toLowerCase(), o = yd[i];
2245
2245
  if (o) return { strings: { ...o.translation, locale: i }, emojiPickerTranslationUrl: o.emojiPickerTranslationUrl, emojiDataUrl: o.emojiDataUrl };
2246
2246
  const s = i.slice(0, 2), a = yd[s];
2247
- return a ? { strings: { ...a.translation, locale: s }, emojiPickerTranslationUrl: a.emojiPickerTranslationUrl, emojiDataUrl: a.emojiDataUrl } : (Ce.warn(`User locale '${r}' not supported; falling back to English.`), { strings: { ...Vr.translation, locale: "en-US" }, emojiPickerTranslationUrl: Vr.emojiPickerTranslationUrl, emojiDataUrl: Vr.emojiDataUrl });
2247
+ return a ? { strings: { ...a.translation, locale: s }, emojiPickerTranslationUrl: a.emojiPickerTranslationUrl, emojiDataUrl: a.emojiDataUrl } : (Te.warn(`User locale '${r}' not supported; falling back to English.`), { strings: { ...Vr.translation, locale: "en-US" }, emojiPickerTranslationUrl: Vr.emojiPickerTranslationUrl, emojiDataUrl: Vr.emojiDataUrl });
2248
2248
  })(this.locale$.get())), this.t$ = se(() => this.translationData$.strings.get()), bt(() => {
2249
2249
  this.appId$.set(e), this.extUserId$.set(n);
2250
2250
  });
@@ -2802,7 +2802,7 @@ function Qm(t, e, n, r) {
2802
2802
  function eE(t, e) {
2803
2803
  if (!e.type.compatibleContent(t.type)) throw new us("Cannot join " + e.type.name + " onto " + t.type.name);
2804
2804
  }
2805
- function Ll(t, e, n) {
2805
+ function kl(t, e, n) {
2806
2806
  let r = t.node(n);
2807
2807
  return eE(r, e.node(n)), r;
2808
2808
  }
@@ -2820,12 +2820,12 @@ function rr(t, e) {
2820
2820
  return t.type.checkContent(e), t.copy(e);
2821
2821
  }
2822
2822
  function tE(t, e, n, r, i) {
2823
- let o = t.depth > i && Ll(t, e, i + 1), s = r.depth > i && Ll(n, r, i + 1), a = [];
2823
+ let o = t.depth > i && kl(t, e, i + 1), s = r.depth > i && kl(n, r, i + 1), a = [];
2824
2824
  return Ni(null, t, i, a), o && s && e.index(i) == n.index(i) ? (eE(o, s), nr(rr(o, tE(t, e, n, r, i + 1)), a)) : (o && nr(rr(o, ds(t, e, i + 1)), a), Ni(e, n, i, a), s && nr(rr(s, ds(n, r, i + 1)), a)), Ni(r, null, i, a), new j(a);
2825
2825
  }
2826
2826
  function ds(t, e, n) {
2827
2827
  let r = [];
2828
- return Ni(null, t, n, r), t.depth > n && nr(rr(Ll(t, e, n + 1), ds(t, e, n + 1)), r), Ni(e, null, n, r), new j(r);
2828
+ return Ni(null, t, n, r), t.depth > n && nr(rr(kl(t, e, n + 1), ds(t, e, n + 1)), r), Ni(e, null, n, r), new j(r);
2829
2829
  }
2830
2830
  W.empty = new W(j.empty, 0, 0);
2831
2831
  class $i {
@@ -3197,7 +3197,7 @@ class dr {
3197
3197
  r.next && r.err("Unexpected trailing text");
3198
3198
  let o = (function(s) {
3199
3199
  let a = /* @__PURE__ */ Object.create(null);
3200
- return l(kd(s, 0));
3200
+ return l(Ld(s, 0));
3201
3201
  function l(u) {
3202
3202
  let c = [];
3203
3203
  u.forEach((h) => {
@@ -3205,7 +3205,7 @@ class dr {
3205
3205
  if (!p) return;
3206
3206
  let _;
3207
3207
  for (let E = 0; E < c.length; E++) c[E][0] == p && (_ = c[E][1]);
3208
- kd(s, m).forEach((E) => {
3208
+ Ld(s, m).forEach((E) => {
3209
3209
  _ || c.push([p, _ = []]), _.indexOf(E) == -1 && _.push(E);
3210
3210
  });
3211
3211
  });
@@ -3427,7 +3427,7 @@ function SS(t, e) {
3427
3427
  function iE(t, e) {
3428
3428
  return e - t;
3429
3429
  }
3430
- function kd(t, e) {
3430
+ function Ld(t, e) {
3431
3431
  let n = [];
3432
3432
  return (function r(i) {
3433
3433
  let o = t[i];
@@ -3473,7 +3473,7 @@ function lE(t, e) {
3473
3473
  if (e) for (let r in e) n[r] = new OS(t, r, e[r]);
3474
3474
  return n;
3475
3475
  }
3476
- let Ld = class cE {
3476
+ let kd = class cE {
3477
3477
  constructor(e, n, r) {
3478
3478
  this.name = e, this.schema = n, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = lE(e, r.attrs), this.defaultAttrs = oE(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
3479
3479
  }
@@ -4253,21 +4253,21 @@ class et {
4253
4253
  return Na[e] = n, n.prototype.jsonID = e, n;
4254
4254
  }
4255
4255
  }
4256
- class ke {
4256
+ class Le {
4257
4257
  constructor(e, n) {
4258
4258
  this.doc = e, this.failed = n;
4259
4259
  }
4260
4260
  static ok(e) {
4261
- return new ke(e, null);
4261
+ return new Le(e, null);
4262
4262
  }
4263
4263
  static fail(e) {
4264
- return new ke(null, e);
4264
+ return new Le(null, e);
4265
4265
  }
4266
4266
  static fromReplace(e, n, r, i) {
4267
4267
  try {
4268
- return ke.ok(e.replace(n, r, i));
4268
+ return Le.ok(e.replace(n, r, i));
4269
4269
  } catch (o) {
4270
- if (o instanceof us) return ke.fail(o.message);
4270
+ if (o instanceof us) return Le.fail(o.message);
4271
4271
  throw o;
4272
4272
  }
4273
4273
  }
@@ -4286,7 +4286,7 @@ class Cn extends et {
4286
4286
  }
4287
4287
  apply(e) {
4288
4288
  let n = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), o = new W(Bc(n.content, (s, a) => s.isAtom && a.type.allowsMarkType(this.mark.type) ? s.mark(this.mark.addToSet(s.marks)) : s, i), n.openStart, n.openEnd);
4289
- return ke.fromReplace(e, this.from, this.to, o);
4289
+ return Le.fromReplace(e, this.from, this.to, o);
4290
4290
  }
4291
4291
  invert() {
4292
4292
  return new Wt(this.from, this.to, this.mark);
@@ -4313,7 +4313,7 @@ class Wt extends et {
4313
4313
  }
4314
4314
  apply(e) {
4315
4315
  let n = e.slice(this.from, this.to), r = new W(Bc(n.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), n.openStart, n.openEnd);
4316
- return ke.fromReplace(e, this.from, this.to, r);
4316
+ return Le.fromReplace(e, this.from, this.to, r);
4317
4317
  }
4318
4318
  invert() {
4319
4319
  return new Cn(this.from, this.to, this.mark);
@@ -4340,9 +4340,9 @@ class Nn extends et {
4340
4340
  }
4341
4341
  apply(e) {
4342
4342
  let n = e.nodeAt(this.pos);
4343
- if (!n) return ke.fail("No node at mark step's position");
4343
+ if (!n) return Le.fail("No node at mark step's position");
4344
4344
  let r = n.type.create(n.attrs, null, this.mark.addToSet(n.marks));
4345
- return ke.fromReplace(e, this.pos, this.pos + 1, new W(j.from(r), 0, n.isLeaf ? 0 : 1));
4345
+ return Le.fromReplace(e, this.pos, this.pos + 1, new W(j.from(r), 0, n.isLeaf ? 0 : 1));
4346
4346
  }
4347
4347
  invert(e) {
4348
4348
  let n = e.nodeAt(this.pos);
@@ -4374,9 +4374,9 @@ class hr extends et {
4374
4374
  }
4375
4375
  apply(e) {
4376
4376
  let n = e.nodeAt(this.pos);
4377
- if (!n) return ke.fail("No node at mark step's position");
4377
+ if (!n) return Le.fail("No node at mark step's position");
4378
4378
  let r = n.type.create(n.attrs, null, this.mark.removeFromSet(n.marks));
4379
- return ke.fromReplace(e, this.pos, this.pos + 1, new W(j.from(r), 0, n.isLeaf ? 0 : 1));
4379
+ return Le.fromReplace(e, this.pos, this.pos + 1, new W(j.from(r), 0, n.isLeaf ? 0 : 1));
4380
4380
  }
4381
4381
  invert(e) {
4382
4382
  let n = e.nodeAt(this.pos);
@@ -4400,7 +4400,7 @@ class $e extends et {
4400
4400
  super(), this.from = e, this.to = n, this.slice = r, this.structure = i;
4401
4401
  }
4402
4402
  apply(e) {
4403
- return this.structure && xl(e, this.from, this.to) ? ke.fail("Structure replace would overwrite content") : ke.fromReplace(e, this.from, this.to, this.slice);
4403
+ return this.structure && xl(e, this.from, this.to) ? Le.fail("Structure replace would overwrite content") : Le.fromReplace(e, this.from, this.to, this.slice);
4404
4404
  }
4405
4405
  getMap() {
4406
4406
  return new St([this.from, this.to - this.from, this.slice.size]);
@@ -4441,11 +4441,11 @@ class Ot extends et {
4441
4441
  super(), this.from = e, this.to = n, this.gapFrom = r, this.gapTo = i, this.slice = o, this.insert = s, this.structure = a;
4442
4442
  }
4443
4443
  apply(e) {
4444
- if (this.structure && (xl(e, this.from, this.gapFrom) || xl(e, this.gapTo, this.to))) return ke.fail("Structure gap-replace would overwrite content");
4444
+ if (this.structure && (xl(e, this.from, this.gapFrom) || xl(e, this.gapTo, this.to))) return Le.fail("Structure gap-replace would overwrite content");
4445
4445
  let n = e.slice(this.gapFrom, this.gapTo);
4446
- if (n.openStart || n.openEnd) return ke.fail("Gap is not a flat range");
4446
+ if (n.openStart || n.openEnd) return Le.fail("Gap is not a flat range");
4447
4447
  let r = this.slice.insertAt(this.insert, n.content);
4448
- return r ? ke.fromReplace(e, this.from, this.to, r) : ke.fail("Content does not fit in gap");
4448
+ return r ? Le.fromReplace(e, this.from, this.to, r) : Le.fail("Content does not fit in gap");
4449
4449
  }
4450
4450
  getMap() {
4451
4451
  return new St([this.from, this.gapFrom - this.from, this.insert, this.gapTo, this.to - this.gapTo, this.slice.size - this.insert]);
@@ -4651,17 +4651,17 @@ class yS {
4651
4651
  mustMoveInline() {
4652
4652
  if (!this.$to.parent.isTextblock) return -1;
4653
4653
  let e, n = this.frontier[this.depth];
4654
- if (!n.type.isTextblock || !ka(this.$to, this.$to.depth, n.type, n.match, !1) || this.$to.depth == this.depth && (e = this.findCloseLevel(this.$to)) && e.depth == this.depth) return -1;
4654
+ if (!n.type.isTextblock || !La(this.$to, this.$to.depth, n.type, n.match, !1) || this.$to.depth == this.depth && (e = this.findCloseLevel(this.$to)) && e.depth == this.depth) return -1;
4655
4655
  let { depth: r } = this.$to, i = this.$to.after(r);
4656
4656
  for (; r > 1 && i == this.$to.end(--r); ) ++i;
4657
4657
  return i;
4658
4658
  }
4659
4659
  findCloseLevel(e) {
4660
4660
  e: for (let n = Math.min(this.depth, e.depth); n >= 0; n--) {
4661
- let { match: r, type: i } = this.frontier[n], o = n < e.depth && e.end(n + 1) == e.pos + (e.depth - (n + 1)), s = ka(e, n, i, r, o);
4661
+ let { match: r, type: i } = this.frontier[n], o = n < e.depth && e.end(n + 1) == e.pos + (e.depth - (n + 1)), s = La(e, n, i, r, o);
4662
4662
  if (s) {
4663
4663
  for (let a = n - 1; a >= 0; a--) {
4664
- let { match: l, type: u } = this.frontier[a], c = ka(e, a, u, l, !0);
4664
+ let { match: l, type: u } = this.frontier[a], c = La(e, a, u, l, !0);
4665
4665
  if (!c || c.childCount) continue e;
4666
4666
  }
4667
4667
  return { depth: n, fit: s, move: o ? e.doc.resolve(e.after(n + 1)) : e };
@@ -4703,7 +4703,7 @@ function pE(t, e, n) {
4703
4703
  let r = t.content;
4704
4704
  return e > 1 && (r = r.replaceChild(0, pE(r.firstChild, e - 1, r.childCount == 1 ? n - 1 : 0))), e > 0 && (r = t.type.contentMatch.fillBefore(r).append(r), n <= 0 && (r = r.append(t.type.contentMatch.matchFragment(r).fillBefore(j.empty, !0)))), t.copy(r);
4705
4705
  }
4706
- function ka(t, e, n, r, i) {
4706
+ function La(t, e, n, r, i) {
4707
4707
  let o = t.node(e), s = i ? t.indexAfter(e) : t.index(e);
4708
4708
  if (s == o.childCount && !n.compatibleContent(o.type)) return null;
4709
4709
  let a = r.fillBefore(o.content, !0, s);
@@ -4741,12 +4741,12 @@ class zr extends et {
4741
4741
  }
4742
4742
  apply(e) {
4743
4743
  let n = e.nodeAt(this.pos);
4744
- if (!n) return ke.fail("No node at attribute step's position");
4744
+ if (!n) return Le.fail("No node at attribute step's position");
4745
4745
  let r = /* @__PURE__ */ Object.create(null);
4746
4746
  for (let o in n.attrs) r[o] = n.attrs[o];
4747
4747
  r[this.attr] = this.value;
4748
4748
  let i = n.type.create(r, null, n.marks);
4749
- return ke.fromReplace(e, this.pos, this.pos + 1, new W(j.from(i), 0, n.isLeaf ? 0 : 1));
4749
+ return Le.fromReplace(e, this.pos, this.pos + 1, new W(j.from(i), 0, n.isLeaf ? 0 : 1));
4750
4750
  }
4751
4751
  getMap() {
4752
4752
  return St.empty;
@@ -4776,7 +4776,7 @@ class Wi extends et {
4776
4776
  for (let i in e.attrs) n[i] = e.attrs[i];
4777
4777
  n[this.attr] = this.value;
4778
4778
  let r = e.type.create(n, e.content, e.marks);
4779
- return ke.ok(r);
4779
+ return Le.ok(r);
4780
4780
  }
4781
4781
  getMap() {
4782
4782
  return St.empty;
@@ -5063,7 +5063,7 @@ class NS {
5063
5063
  return ba(this, e, n, r), this;
5064
5064
  }
5065
5065
  }
5066
- const La = /* @__PURE__ */ Object.create(null);
5066
+ const ka = /* @__PURE__ */ Object.create(null);
5067
5067
  class fe {
5068
5068
  constructor(e, n, r) {
5069
5069
  this.$anchor = e, this.$head = n, this.ranges = r || [new bS(e.min(n), e.max(n))];
@@ -5111,10 +5111,10 @@ class fe {
5111
5111
  }
5112
5112
  }
5113
5113
  static findFrom(e, n, r = !1) {
5114
- let i = e.parent.inlineContent ? new de(e) : kr(e.node(0), e.parent, e.pos, e.index(), n, r);
5114
+ let i = e.parent.inlineContent ? new de(e) : Lr(e.node(0), e.parent, e.pos, e.index(), n, r);
5115
5115
  if (i) return i;
5116
5116
  for (let o = e.depth - 1; o >= 0; o--) {
5117
- let s = n < 0 ? kr(e.node(0), e.node(o), e.before(o + 1), e.index(o), n, r) : kr(e.node(0), e.node(o), e.after(o + 1), e.index(o) + 1, n, r);
5117
+ let s = n < 0 ? Lr(e.node(0), e.node(o), e.before(o + 1), e.index(o), n, r) : Lr(e.node(0), e.node(o), e.after(o + 1), e.index(o) + 1, n, r);
5118
5118
  if (s) return s;
5119
5119
  }
5120
5120
  return null;
@@ -5123,20 +5123,20 @@ class fe {
5123
5123
  return this.findFrom(e, n) || this.findFrom(e, -n) || new Tt(e.node(0));
5124
5124
  }
5125
5125
  static atStart(e) {
5126
- return kr(e, e, 0, 0, 1) || new Tt(e);
5126
+ return Lr(e, e, 0, 0, 1) || new Tt(e);
5127
5127
  }
5128
5128
  static atEnd(e) {
5129
- return kr(e, e, e.content.size, e.childCount, -1) || new Tt(e);
5129
+ return Lr(e, e, e.content.size, e.childCount, -1) || new Tt(e);
5130
5130
  }
5131
5131
  static fromJSON(e, n) {
5132
5132
  if (!n || !n.type) throw new RangeError("Invalid input for Selection.fromJSON");
5133
- let r = La[n.type];
5133
+ let r = ka[n.type];
5134
5134
  if (!r) throw new RangeError(`No selection type ${n.type} defined`);
5135
5135
  return r.fromJSON(e, n);
5136
5136
  }
5137
5137
  static jsonID(e, n) {
5138
- if (e in La) throw new RangeError("Duplicate use of selection JSON ID " + e);
5139
- return La[e] = n, n.prototype.jsonID = e, n;
5138
+ if (e in ka) throw new RangeError("Duplicate use of selection JSON ID " + e);
5139
+ return ka[e] = n, n.prototype.jsonID = e, n;
5140
5140
  }
5141
5141
  getBookmark() {
5142
5142
  return de.between(this.$anchor, this.$head).getBookmark();
@@ -5287,14 +5287,14 @@ fe.jsonID("all", Tt);
5287
5287
  const wS = { map() {
5288
5288
  return this;
5289
5289
  }, resolve: (t) => new Tt(t) };
5290
- function kr(t, e, n, r, i, o = !1) {
5290
+ function Lr(t, e, n, r, i, o = !1) {
5291
5291
  if (e.inlineContent) return de.create(t, n);
5292
5292
  for (let s = r - (i > 0 ? 0 : 1); i > 0 ? s < e.childCount : s >= 0; s += i) {
5293
5293
  let a = e.child(s);
5294
5294
  if (a.isAtom) {
5295
5295
  if (!o && Q.isSelectable(a)) return Q.create(t, n - (i < 0 ? a.nodeSize : 0));
5296
5296
  } else {
5297
- let l = kr(t, a, n + i, i < 0 ? a.childCount : 0, i, o);
5297
+ let l = Lr(t, a, n + i, i < 0 ? a.childCount : 0, i, o);
5298
5298
  if (l) return l;
5299
5299
  }
5300
5300
  n += a.nodeSize * i;
@@ -5309,7 +5309,7 @@ function Kd(t, e, n) {
5309
5309
  i == null && (i = u);
5310
5310
  }), t.setSelection(fe.near(t.doc.resolve(i), n)));
5311
5311
  }
5312
- class kS extends NS {
5312
+ class LS extends NS {
5313
5313
  constructor(e) {
5314
5314
  super(e.doc), this.curSelectionFor = 0, this.updated = 0, this.meta = /* @__PURE__ */ Object.create(null), this.time = Date.now(), this.curSelection = e.selection, this.storedMarks = e.storedMarks;
5315
5315
  }
@@ -5392,10 +5392,10 @@ class Di {
5392
5392
  this.name = e, this.init = qd(n.init, r), this.apply = qd(n.apply, r);
5393
5393
  }
5394
5394
  }
5395
- const LS = [new Di("doc", { init: (t) => t.doc || t.schema.topNodeType.createAndFill(), apply: (t) => t.doc }), new Di("selection", { init: (t, e) => t.selection || fe.atStart(e.doc), apply: (t) => t.selection }), new Di("storedMarks", { init: (t) => t.storedMarks || null, apply: (t, e, n, r) => r.selection.$cursor ? t.storedMarks : null }), new Di("scrollToSelection", { init: () => 0, apply: (t, e) => t.scrolledIntoView ? e + 1 : e })];
5395
+ const kS = [new Di("doc", { init: (t) => t.doc || t.schema.topNodeType.createAndFill(), apply: (t) => t.doc }), new Di("selection", { init: (t, e) => t.selection || fe.atStart(e.doc), apply: (t) => t.selection }), new Di("storedMarks", { init: (t) => t.storedMarks || null, apply: (t, e, n, r) => r.selection.$cursor ? t.storedMarks : null }), new Di("scrollToSelection", { init: () => 0, apply: (t, e) => t.scrolledIntoView ? e + 1 : e })];
5396
5396
  class Ma {
5397
5397
  constructor(e, n) {
5398
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = LS.slice(), n && n.forEach((r) => {
5398
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = kS.slice(), n && n.forEach((r) => {
5399
5399
  if (this.pluginsByKey[r.key]) throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
5400
5400
  this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Di(r.key, r.spec.state, r));
5401
5401
  });
@@ -5453,7 +5453,7 @@ class Ur {
5453
5453
  return n;
5454
5454
  }
5455
5455
  get tr() {
5456
- return new kS(this);
5456
+ return new LS(this);
5457
5457
  }
5458
5458
  static create(e) {
5459
5459
  let n = new Ma(e.doc ? e.doc.type.schema : e.schema, e.plugins), r = new Ur(n);
@@ -5572,8 +5572,8 @@ function qn(t, e) {
5572
5572
  let n = document.createEvent("Event");
5573
5573
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
5574
5574
  }
5575
- const en = typeof navigator != "undefined" ? navigator : null, Zd = typeof document != "undefined" ? document : null, Bn = en && en.userAgent || "", Hl = /Edge\/(\d+)/.exec(Bn), _E = /MSIE \d/.exec(Bn), Ul = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bn), Et = !!(_E || Ul || Hl), Pn = _E ? document.documentMode : Ul ? +Ul[1] : Hl ? +Hl[1] : 0, kt = !Et && /gecko\/(\d+)/i.test(Bn);
5576
- kt && (/Firefox\/(\d+)/.exec(Bn) || [0, 0])[1];
5575
+ const en = typeof navigator != "undefined" ? navigator : null, Zd = typeof document != "undefined" ? document : null, Bn = en && en.userAgent || "", Hl = /Edge\/(\d+)/.exec(Bn), _E = /MSIE \d/.exec(Bn), Ul = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bn), Et = !!(_E || Ul || Hl), Pn = _E ? document.documentMode : Ul ? +Ul[1] : Hl ? +Hl[1] : 0, Lt = !Et && /gecko\/(\d+)/i.test(Bn);
5576
+ Lt && (/Firefox\/(\d+)/.exec(Bn) || [0, 0])[1];
5577
5577
  const Bl = !Et && /Chrome\/(\d+)/.exec(Bn), Ue = !!Bl, AE = Bl ? +Bl[1] : 0, Ge = !Et && !!en && /Apple Computer/.test(en.vendor), ni = Ge && (/Mobile\/\w+/.test(Bn) || !!en && en.maxTouchPoints > 2), It = ni || !!en && /Mac/.test(en.platform), gE = !!en && /Win/.test(en.platform), pn = /Android \d/.test(Bn), ho = !!Zd && "webkitFontSmoothing" in Zd.documentElement.style, PS = ho ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5578
5578
  function xS(t) {
5579
5579
  let e = t.defaultView && t.defaultView.visualViewport;
@@ -5694,7 +5694,7 @@ function HS(t, e) {
5694
5694
  let d = u.parentNode;
5695
5695
  return d && /^li$/i.test(d.nodeName) && c.left < u.getBoundingClientRect().left ? d : u;
5696
5696
  })(a, e), n) {
5697
- if (kt && n.nodeType == 1 && (i = Math.min(i, n.childNodes.length), i < n.childNodes.length)) {
5697
+ if (Lt && n.nodeType == 1 && (i = Math.min(i, n.childNodes.length), i < n.childNodes.length)) {
5698
5698
  let c, d = n.childNodes[i];
5699
5699
  d.nodeName == "IMG" && (c = d.getBoundingClientRect()).right <= e.left && c.bottom > e.top && i++;
5700
5700
  }
@@ -5734,7 +5734,7 @@ function vn(t, e) {
5734
5734
  }
5735
5735
  const US = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
5736
5736
  function vE(t, e, n) {
5737
- let { node: r, offset: i, atom: o } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = ho || kt;
5737
+ let { node: r, offset: i, atom: o } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = ho || Lt;
5738
5738
  if (r.nodeType == 3) {
5739
5739
  if (!s || !US.test(r.nodeValue) && (n < 0 ? i : i != r.nodeValue.length)) {
5740
5740
  let a = i, l = i, u = n < 0 ? 1 : -1;
@@ -5742,7 +5742,7 @@ function vE(t, e, n) {
5742
5742
  }
5743
5743
  {
5744
5744
  let a = vn(un(r, i, i), n);
5745
- if (kt && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
5745
+ if (Lt && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
5746
5746
  let l = vn(un(r, i - 1, i - 1), -1);
5747
5747
  if (l.top == a.top) {
5748
5748
  let u = vn(un(r, i, i + 1), -1);
@@ -6053,7 +6053,7 @@ class po {
6053
6053
  m = E;
6054
6054
  }
6055
6055
  let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), u = r.root.getSelection(), c = r.domSelectionRange(), d = !1;
6056
- if ((kt || Ge) && e == n) {
6056
+ if ((Lt || Ge) && e == n) {
6057
6057
  let { node: p, offset: m } = a;
6058
6058
  if (p.nodeType == 3) {
6059
6059
  if (d = !(!m || p.nodeValue[m - 1] != `
@@ -6070,13 +6070,13 @@ class po {
6070
6070
  d = _ && (_.nodeName == "BR" || _.contentEditable == "false");
6071
6071
  }
6072
6072
  }
6073
- if (kt && c.focusNode && c.focusNode != l.node && c.focusNode.nodeType == 1) {
6073
+ if (Lt && c.focusNode && c.focusNode != l.node && c.focusNode.nodeType == 1) {
6074
6074
  let p = c.focusNode.childNodes[c.focusOffset];
6075
6075
  p && p.contentEditable == "false" && (i = !0);
6076
6076
  }
6077
6077
  if (!(i || d && Ge) && pr(a.node, a.offset, c.anchorNode, c.anchorOffset) && pr(l.node, l.offset, c.focusNode, c.focusOffset)) return;
6078
6078
  let h = !1;
6079
- if ((u.extend || e == n) && (!d || !kt)) {
6079
+ if ((u.extend || e == n) && (!d || !Lt)) {
6080
6080
  u.collapse(a.node, a.offset);
6081
6081
  try {
6082
6082
  e != n && u.extend(l.node, l.offset), h = !0;
@@ -6841,7 +6841,7 @@ function br(t, e) {
6841
6841
  let r = n.domSelectionRange(), i = r.focusNode, o = r.focusOffset;
6842
6842
  if (!i) return;
6843
6843
  let s, a, l = !1;
6844
- for (kt && i.nodeType == 1 && o < wo(i) && Ei(i.childNodes[o], -1) && (l = !0); ; ) if (o > 0) {
6844
+ for (Lt && i.nodeType == 1 && o < wo(i) && Ei(i.childNodes[o], -1) && (l = !0); ; ) if (o > 0) {
6845
6845
  if (i.nodeType != 1) break;
6846
6846
  {
6847
6847
  let u = i.childNodes[o - 1];
@@ -7090,9 +7090,9 @@ function bE(t, e, n, r, i) {
7090
7090
  if (!E) return;
7091
7091
  let g, S = _.findWrapping(A.type);
7092
7092
  if (!S) return E = null;
7093
- if (g = E.length && m.length && kE(S, m, A, E[E.length - 1], 0)) E[E.length - 1] = g;
7093
+ if (g = E.length && m.length && LE(S, m, A, E[E.length - 1], 0)) E[E.length - 1] = g;
7094
7094
  else {
7095
- E.length && (E[E.length - 1] = LE(E[E.length - 1], m.length));
7095
+ E.length && (E[E.length - 1] = kE(E[E.length - 1], m.length));
7096
7096
  let O = wE(A, S);
7097
7097
  E.push(O), _ = _.matchType(O.type), m = S;
7098
7098
  }
@@ -7114,16 +7114,16 @@ function wE(t, e, n = 0) {
7114
7114
  for (let r = e.length - 1; r >= n; r--) t = e[r].create(null, j.from(t));
7115
7115
  return t;
7116
7116
  }
7117
- function kE(t, e, n, r, i) {
7117
+ function LE(t, e, n, r, i) {
7118
7118
  if (i < t.length && i < e.length && t[i] == e[i]) {
7119
- let o = kE(t, e, n, r.lastChild, i + 1);
7119
+ let o = LE(t, e, n, r.lastChild, i + 1);
7120
7120
  if (o) return r.copy(r.content.replaceChild(r.childCount - 1, o));
7121
7121
  if (r.contentMatchAt(r.childCount).matchType(i == t.length - 1 ? n.type : t[i + 1])) return r.copy(r.content.append(j.from(wE(n, t, i + 1))));
7122
7122
  }
7123
7123
  }
7124
- function LE(t, e) {
7124
+ function kE(t, e) {
7125
7125
  if (e == 0) return t;
7126
- let n = t.content.replaceChild(t.childCount - 1, LE(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(j.empty, !0);
7126
+ let n = t.content.replaceChild(t.childCount - 1, kE(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(j.empty, !0);
7127
7127
  return t.copy(n.append(r));
7128
7128
  }
7129
7129
  function $l(t, e, n, r, i, o) {
@@ -7266,7 +7266,7 @@ class tO {
7266
7266
  const a = i ? null : r.target, l = a ? e.docView.nearestDesc(a, !0) : null;
7267
7267
  this.target = l && l.nodeDOM.nodeType == 1 ? l.nodeDOM : null;
7268
7268
  let { selection: u } = e.state;
7269
- (r.button == 0 && o.type.spec.draggable && o.type.spec.selectable !== !1 || u instanceof Q && u.from <= s && u.to > s) && (this.mightDrag = { node: o, pos: s, addAttr: !(!this.target || this.target.draggable), setUneditable: !(!this.target || !kt || this.target.hasAttribute("contentEditable")) }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
7269
+ (r.button == 0 && o.type.spec.draggable && o.type.spec.selectable !== !1 || u instanceof Q && u.from <= s && u.to > s) && (this.mightDrag = { node: o, pos: s, addAttr: !(!this.target || this.target.draggable), setUneditable: !(!this.target || !Lt || this.target.hasAttribute("contentEditable")) }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
7270
7270
  this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
7271
7271
  }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), bn(e, "pointer");
7272
7272
  }
@@ -7359,7 +7359,7 @@ ut.compositionstart = ut.compositionupdate = (t) => {
7359
7359
  let s = i.childNodes[o];
7360
7360
  return s.nodeType == 1 && s.contentEditable == "false";
7361
7361
  })(t))) t.markCursor = t.state.storedMarks || n.marks(), ms(t, !0), t.markCursor = null;
7362
- else if (ms(t, !e.selection.empty), kt && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
7362
+ else if (ms(t, !e.selection.empty), Lt && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
7363
7363
  let r = t.domSelectionRange();
7364
7364
  for (let i = r.focusNode, o = r.focusOffset; i && i.nodeType == 1 && o != 0; ) {
7365
7365
  let s = o < 0 ? i.lastChild : i.childNodes[o - 1];
@@ -7379,7 +7379,7 @@ ut.compositionstart = ut.compositionupdate = (t) => {
7379
7379
  t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Th(t, 20));
7380
7380
  };
7381
7381
  const wi = Et && Pn < 15 || ni && PS < 604;
7382
- function ki(t, e, n, r, i) {
7382
+ function Li(t, e, n, r, i) {
7383
7383
  let o = bE(t, e, n, r, t.state.selection.$from);
7384
7384
  if (t.someProp("handlePaste", (l) => l(t, i, o || W.empty))) return !0;
7385
7385
  if (!o) return !1;
@@ -7411,13 +7411,13 @@ lt.copy = ut.cut = (t, e) => {
7411
7411
  let n = e;
7412
7412
  if (t.composing && !pn) return;
7413
7413
  let r = wi ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
7414
- r && ki(t, HE(r), r.getData("text/html"), i, n) ? n.preventDefault() : (function(o, s) {
7414
+ r && Li(t, HE(r), r.getData("text/html"), i, n) ? n.preventDefault() : (function(o, s) {
7415
7415
  if (!o.dom.parentNode) return;
7416
7416
  let a = o.input.shiftKey || o.state.selection.$from.parent.type.spec.code, l = o.dom.parentNode.appendChild(document.createElement(a ? "textarea" : "div"));
7417
7417
  a || (l.contentEditable = "true"), l.style.cssText = "position: fixed; left: -10000px; top: 10px", l.focus();
7418
7418
  let u = o.input.shiftKey && o.input.lastKeyCode != 45;
7419
7419
  setTimeout(() => {
7420
- o.focus(), l.parentNode && l.parentNode.removeChild(l), a ? ki(o, l.value, null, u, s) : ki(o, l.textContent, l.innerHTML, u, s);
7420
+ o.focus(), l.parentNode && l.parentNode.removeChild(l), a ? Li(o, l.value, null, u, s) : Li(o, l.textContent, l.innerHTML, u, s);
7421
7421
  }, 50);
7422
7422
  })(t, n);
7423
7423
  };
@@ -7613,10 +7613,10 @@ class vt {
7613
7613
  return this.type instanceof Es;
7614
7614
  }
7615
7615
  }
7616
- const Lr = [], sr = {};
7616
+ const kr = [], sr = {};
7617
7617
  class be {
7618
7618
  constructor(e, n) {
7619
- this.local = e.length ? e : Lr, this.children = n.length ? n : Lr;
7619
+ this.local = e.length ? e : kr, this.children = n.length ? n : kr;
7620
7620
  }
7621
7621
  static create(e, n) {
7622
7622
  return n.length ? Wo(n, e, 0, sr) : qe;
@@ -7680,8 +7680,8 @@ class be {
7680
7680
  let E = (function(g, S, O, D, I, R, y) {
7681
7681
  function v(T, C) {
7682
7682
  for (let N = 0; N < T.local.length; N++) {
7683
- let k = T.local[N].map(D, I, C);
7684
- k ? O.push(k) : y.onRemove && y.onRemove(T.local[N].spec);
7683
+ let L = T.local[N].map(D, I, C);
7684
+ L ? O.push(L) : y.onRemove && y.onRemove(T.local[N].spec);
7685
7685
  }
7686
7686
  for (let N = 0; N < T.children.length; N += 3) v(T.children[N + 2], T.children[N] + C + 1);
7687
7687
  }
@@ -7697,7 +7697,7 @@ class be {
7697
7697
  }
7698
7698
  }
7699
7699
  return new be(l.sort(er), m);
7700
- })(this.children, s || [], e, n, r, i, o) : s ? new be(s.sort(er), Lr) : qe;
7700
+ })(this.children, s || [], e, n, r, i, o) : s ? new be(s.sort(er), kr) : qe;
7701
7701
  }
7702
7702
  add(e, n) {
7703
7703
  return n.length ? this == qe ? be.create(e, n) : this.addInner(e, n, 0) : this;
@@ -7750,7 +7750,7 @@ class be {
7750
7750
  }
7751
7751
  }
7752
7752
  if (i) {
7753
- let a = new be(i.sort(er), Lr);
7753
+ let a = new be(i.sort(er), kr);
7754
7754
  return r ? new In([a, r]) : a;
7755
7755
  }
7756
7756
  return r || qe;
@@ -7766,7 +7766,7 @@ class be {
7766
7766
  return qc(this.localsInner(e));
7767
7767
  }
7768
7768
  localsInner(e) {
7769
- if (this == qe) return Lr;
7769
+ if (this == qe) return kr;
7770
7770
  if (e.inlineContent || !this.local.some(Fn.is)) return this.local;
7771
7771
  let n = [];
7772
7772
  for (let r = 0; r < this.local.length; r++) this.local[r].type instanceof Fn || n.push(this.local[r]);
@@ -7809,7 +7809,7 @@ class In {
7809
7809
  for (let s = 0; s < o.length; s++) n.push(o[s]);
7810
7810
  } else n = o;
7811
7811
  }
7812
- return n ? qc(r ? n : n.sort(er)) : Lr;
7812
+ return n ? qc(r ? n : n.sort(er)) : kr;
7813
7813
  }
7814
7814
  static from(e) {
7815
7815
  switch (e.length) {
@@ -7981,7 +7981,7 @@ class lO {
7981
7981
  let d = this.registerMutation(n[c], l);
7982
7982
  d && (o = o < 0 ? d.from : Math.min(d.from, o), s = s < 0 ? d.to : Math.max(d.to, s), d.typeOver && (a = !0));
7983
7983
  }
7984
- if (kt && l.length) {
7984
+ if (Lt && l.length) {
7985
7985
  let c = l.filter((d) => d.nodeName == "BR");
7986
7986
  if (c.length == 2) {
7987
7987
  let [d, h] = c;
@@ -8002,7 +8002,7 @@ class lO {
8002
8002
  let u = null;
8003
8003
  o < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ks(r) && (u = Yc(e)) && u.eq(fe.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, En(e), this.currentSelection.set(r), e.scrollToSelection()) : (o > -1 || i) && (o > -1 && (e.docView.markDirty(o, s), (function(c) {
8004
8004
  if (!yh.has(c) && (yh.set(c, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(c.dom).whiteSpace) !== -1)) {
8005
- if (c.requiresGeckoHackNode = kt, Ch) return;
8005
+ if (c.requiresGeckoHackNode = Lt, Ch) return;
8006
8006
  console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Ch = !0;
8007
8007
  }
8008
8008
  })(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, (function(c, d) {
@@ -8083,35 +8083,35 @@ function hO(t, e, n, r, i) {
8083
8083
  let s = t.state.doc.resolve(e), a = s.sharedDepth(n);
8084
8084
  e = s.before(a + 1), n = t.state.doc.resolve(n).after(a + 1);
8085
8085
  let l, u, c = t.state.selection, d = (function(R, y, v) {
8086
- let T, { node: C, fromOffset: N, toOffset: k, from: b, to: L } = R.docView.parseRange(y, v), x = R.domSelectionRange(), M = x.anchorNode;
8087
- if (M && R.dom.contains(M.nodeType == 1 ? M : M.parentNode) && (T = [{ node: M, offset: x.anchorOffset }], Ks(x) || T.push({ node: x.focusNode, offset: x.focusOffset })), Ue && R.input.lastKeyCode === 8) for (let le = k; le > N; le--) {
8086
+ let T, { node: C, fromOffset: N, toOffset: L, from: b, to: k } = R.docView.parseRange(y, v), x = R.domSelectionRange(), M = x.anchorNode;
8087
+ if (M && R.dom.contains(M.nodeType == 1 ? M : M.parentNode) && (T = [{ node: M, offset: x.anchorOffset }], Ks(x) || T.push({ node: x.focusNode, offset: x.focusOffset })), Ue && R.input.lastKeyCode === 8) for (let le = L; le > N; le--) {
8088
8088
  let ce = C.childNodes[le - 1], pe = ce.pmViewDesc;
8089
8089
  if (ce.nodeName == "BR" && !pe) {
8090
- k = le;
8090
+ L = le;
8091
8091
  break;
8092
8092
  }
8093
8093
  if (!pe || pe.size) break;
8094
8094
  }
8095
- let U = R.state.doc, V = R.someProp("domParser") || Yi.fromSchema(R.state.schema), $ = U.resolve(b), Y = null, oe = V.parse(C, { topNode: $.parent, topMatch: $.parent.contentMatchAt($.index()), topOpen: !0, from: N, to: k, preserveWhitespace: $.parent.type.whitespace != "pre" || "full", findPositions: T, ruleFromNode: uO, context: $ });
8095
+ let U = R.state.doc, V = R.someProp("domParser") || Yi.fromSchema(R.state.schema), $ = U.resolve(b), Y = null, oe = V.parse(C, { topNode: $.parent, topMatch: $.parent.contentMatchAt($.index()), topOpen: !0, from: N, to: L, preserveWhitespace: $.parent.type.whitespace != "pre" || "full", findPositions: T, ruleFromNode: uO, context: $ });
8096
8096
  if (T && T[0].pos != null) {
8097
8097
  let le = T[0].pos, ce = T[1] && T[1].pos;
8098
8098
  ce == null && (ce = le), Y = { anchor: le + b, head: ce + b };
8099
8099
  }
8100
- return { doc: oe, sel: Y, from: b, to: L };
8100
+ return { doc: oe, sel: Y, from: b, to: k };
8101
8101
  })(t, e, n), h = t.state.doc, p = h.slice(d.from, d.to);
8102
8102
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (l = t.state.selection.to, u = "end") : (l = t.state.selection.from, u = "start"), t.input.lastKeyCode = null;
8103
8103
  let m = (function(R, y, v, T, C) {
8104
8104
  let N = R.findDiffStart(y, v);
8105
8105
  if (N == null) return null;
8106
- let { a: k, b } = R.findDiffEnd(y, v + R.size, v + y.size);
8107
- if (C == "end" && (T -= k + Math.max(0, N - Math.min(k, b)) - N), k < N && R.size < y.size) {
8108
- let L = T <= N && T >= k ? N - T : 0;
8109
- N -= L, N && N < y.size && wh(y.textBetween(N - 1, N + 1)) && (N += L ? 1 : -1), b = N + (b - k), k = N;
8106
+ let { a: L, b } = R.findDiffEnd(y, v + R.size, v + y.size);
8107
+ if (C == "end" && (T -= L + Math.max(0, N - Math.min(L, b)) - N), L < N && R.size < y.size) {
8108
+ let k = T <= N && T >= L ? N - T : 0;
8109
+ N -= k, N && N < y.size && wh(y.textBetween(N - 1, N + 1)) && (N += k ? 1 : -1), b = N + (b - L), L = N;
8110
8110
  } else if (b < N) {
8111
- let L = T <= N && T >= b ? N - T : 0;
8112
- N -= L, N && N < R.size && wh(R.textBetween(N - 1, N + 1)) && (N += L ? 1 : -1), k = N + (k - b), b = N;
8111
+ let k = T <= N && T >= b ? N - T : 0;
8112
+ N -= k, N && N < R.size && wh(R.textBetween(N - 1, N + 1)) && (N += k ? 1 : -1), L = N + (L - b), b = N;
8113
8113
  }
8114
- return { start: N, endA: k, endB: b };
8114
+ return { start: N, endA: L, endB: b };
8115
8115
  })(p.content, d.doc.content, d.from, l, u);
8116
8116
  if (m && t.input.domChangeCount++, (ni && t.input.lastIOSEnter > Date.now() - 225 || pn) && i.some((R) => R.nodeType == 1 && !dO.test(R.nodeName)) && (!m || m.endA >= m.endB) && t.someProp("handleKeyDown", (R) => R(t, qn(13, "Enter")))) return void (t.input.lastIOSEnter = 0);
8117
8117
  if (!m) {
@@ -8138,8 +8138,8 @@ function hO(t, e, n, r, i) {
8138
8138
  return b != null && v == y + b.nodeSize;
8139
8139
  }
8140
8140
  if (N.parentOffset < N.parent.content.size || !N.parent.isTextblock) return !1;
8141
- let k = R.resolve(Va(N, !0, !0));
8142
- return !(!k.parent.isTextblock || k.pos > v || Va(k, !0, !1) < v) && T.parent.content.cut(T.parentOffset).eq(k.parent.content);
8141
+ let L = R.resolve(Va(N, !0, !0));
8142
+ return !(!L.parent.isTextblock || L.pos > v || Va(L, !0, !1) < v) && T.parent.content.cut(T.parentOffset).eq(L.parent.content);
8143
8143
  })(h, m.start, m.endA, _, E) && t.someProp("handleKeyDown", (R) => R(t, qn(8, "Backspace")))) return void (pn && Ue && t.domObserver.suppressSelectionUpdates());
8144
8144
  Ue && m.endB == m.start && (t.input.lastChromeDelete = Date.now()), pn && !g && _.start() != E.start() && E.parentOffset == 0 && _.depth == E.depth && d.sel && d.sel.anchor == d.sel.head && d.sel.head == m.endA && (m.endB -= 2, E = d.doc.resolveNoCache(m.endB - d.from), setTimeout(() => {
8145
8145
  t.someProp("handleKeyDown", function(R) {
@@ -8159,13 +8159,13 @@ function hO(t, e, n, r, i) {
8159
8159
  let R = I(t.state.tr.delete(O, D)), y = h.resolve(m.start).marksAcross(h.resolve(m.endA));
8160
8160
  y && R.ensureMarks(y), t.dispatch(R);
8161
8161
  } else if (m.endA == m.endB && (S = (function(R, y) {
8162
- let v, T, C, N = R.firstChild.marks, k = y.firstChild.marks, b = N, L = k;
8163
- for (let M = 0; M < k.length; M++) b = k[M].removeFromSet(b);
8164
- for (let M = 0; M < N.length; M++) L = N[M].removeFromSet(L);
8165
- if (b.length == 1 && L.length == 0) T = b[0], v = "add", C = (M) => M.mark(T.addToSet(M.marks));
8162
+ let v, T, C, N = R.firstChild.marks, L = y.firstChild.marks, b = N, k = L;
8163
+ for (let M = 0; M < L.length; M++) b = L[M].removeFromSet(b);
8164
+ for (let M = 0; M < N.length; M++) k = N[M].removeFromSet(k);
8165
+ if (b.length == 1 && k.length == 0) T = b[0], v = "add", C = (M) => M.mark(T.addToSet(M.marks));
8166
8166
  else {
8167
- if (b.length != 0 || L.length != 1) return null;
8168
- T = L[0], v = "remove", C = (M) => M.mark(T.removeFromSet(M.marks));
8167
+ if (b.length != 0 || k.length != 1) return null;
8168
+ T = k[0], v = "remove", C = (M) => M.mark(T.removeFromSet(M.marks));
8169
8169
  }
8170
8170
  let x = [];
8171
8171
  for (let M = 0; M < y.childCount; M++) x.push(C(y.child(M)));
@@ -8198,7 +8198,7 @@ function wh(t) {
8198
8198
  }
8199
8199
  class zE {
8200
8200
  constructor(e, n) {
8201
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new qS(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(xh), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Mh(this), Lh(this), this.nodeViews = Ph(this), this.docView = ah(this.state.doc, kh(this), ja(this), this.dom, this), this.domObserver = new lO(this, (r, i, o, s) => hO(this, r, i, o, s)), this.domObserver.start(), (function(r) {
8201
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new qS(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(xh), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Mh(this), kh(this), this.nodeViews = Ph(this), this.docView = ah(this.state.doc, Lh(this), ja(this), this.dom, this), this.domObserver = new lO(this, (r, i, o, s) => hO(this, r, i, o, s)), this.domObserver.start(), (function(r) {
8202
8202
  for (let i in lt) {
8203
8203
  let o = lt[i];
8204
8204
  r.dom.addEventListener(i, r.input.eventHandlers[i] = (s) => {
@@ -8252,8 +8252,8 @@ class zE {
8252
8252
  return E != A;
8253
8253
  })(p, this.nodeViews) && (this.nodeViews = p, o = !0);
8254
8254
  }
8255
- (a || n.handleDOMEvents != this._props.handleDOMEvents) && Ba(this), this.editable = Mh(this), Lh(this);
8256
- let l = ja(this), u = kh(this), c = i.plugins == e.plugins || i.doc.eq(e.doc) ? e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve" : "reset", d = o || !this.docView.matchesNode(e.doc, u, l);
8255
+ (a || n.handleDOMEvents != this._props.handleDOMEvents) && Ba(this), this.editable = Mh(this), kh(this);
8256
+ let l = ja(this), u = Lh(this), c = i.plugins == e.plugins || i.doc.eq(e.doc) ? e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve" : "reset", d = o || !this.docView.matchesNode(e.doc, u, l);
8257
8257
  !d && e.selection.eq(i.selection) || (s = !0);
8258
8258
  let h = c == "preserve" && s && this.dom.style.overflowAnchor == null && (function(p) {
8259
8259
  let m, _, E = p.dom.getBoundingClientRect(), A = Math.max(0, E.top);
@@ -8393,10 +8393,10 @@ class zE {
8393
8393
  return jS(this, n || this.state, e);
8394
8394
  }
8395
8395
  pasteHTML(e, n) {
8396
- return ki(this, "", e, !1, n || new ClipboardEvent("paste"));
8396
+ return Li(this, "", e, !1, n || new ClipboardEvent("paste"));
8397
8397
  }
8398
8398
  pasteText(e, n) {
8399
- return ki(this, e, null, !0, n || new ClipboardEvent("paste"));
8399
+ return Li(this, e, null, !0, n || new ClipboardEvent("paste"));
8400
8400
  }
8401
8401
  serializeForClipboard(e) {
8402
8402
  return Wc(this, e);
@@ -8438,13 +8438,13 @@ class zE {
8438
8438
  return this.root.getSelection();
8439
8439
  }
8440
8440
  }
8441
- function kh(t) {
8441
+ function Lh(t) {
8442
8442
  let e = /* @__PURE__ */ Object.create(null);
8443
8443
  return e.class = "ProseMirror", e.contenteditable = String(t.editable), t.someProp("attributes", (n) => {
8444
8444
  if (typeof n == "function" && (n = n(t.state)), n) for (let r in n) r == "class" ? e.class += " " + n[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + n[r] : e[r] || r == "contenteditable" || r == "nodeName" || (e[r] = String(n[r]));
8445
8445
  }), e.translate || (e.translate = "no"), [vt.node(0, t.state.doc.content.size, e)];
8446
8446
  }
8447
- function Lh(t) {
8447
+ function kh(t) {
8448
8448
  if (t.markCursor) {
8449
8449
  let e = document.createElement("img");
8450
8450
  e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: vt.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
@@ -8472,7 +8472,7 @@ const xe = new class {
8472
8472
  this.linebreakReplacement = null, this.cached = /* @__PURE__ */ Object.create(null);
8473
8473
  let e = this.spec = {};
8474
8474
  for (let r in t) e[r] = t[r];
8475
- e.nodes = Ve.from(t.nodes), e.marks = Ve.from(t.marks || {}), this.nodes = Ld.compile(this.spec.nodes, this), this.marks = Ys.compile(this.spec.marks, this);
8475
+ e.nodes = Ve.from(t.nodes), e.marks = Ve.from(t.marks || {}), this.nodes = kd.compile(this.spec.nodes, this), this.marks = Ys.compile(this.spec.marks, this);
8476
8476
  let n = /* @__PURE__ */ Object.create(null);
8477
8477
  for (let r in this.nodes) {
8478
8478
  if (r in this.marks) throw new RangeError(r + " can not be both a node and a mark");
@@ -8493,7 +8493,7 @@ const xe = new class {
8493
8493
  node(t, e = null, n, r) {
8494
8494
  if (typeof t == "string") t = this.nodeType(t);
8495
8495
  else {
8496
- if (!(t instanceof Ld)) throw new RangeError("Invalid node type: " + t);
8496
+ if (!(t instanceof kd)) throw new RangeError("Invalid node type: " + t);
8497
8497
  if (t.schema != this) throw new RangeError("Node type from different schema used (" + t.name + ")");
8498
8498
  }
8499
8499
  return t.createChecked(e, n, r);
@@ -9030,7 +9030,7 @@ const dn = { Enter: Jc((t, e) => {
9030
9030
  return !0;
9031
9031
  }, Backspace: Xa, "Mod-Backspace": Xa, "Shift-Backspace": Xa, Delete: zh, "Mod-Delete": zh, "Mod-a": (t, e) => (e && e(t.tr.setSelection(new Tt(t.doc))), !0) }, JE = { "Ctrl-h": dn.Backspace, "Alt-Backspace": dn["Mod-Backspace"], "Ctrl-d": dn.Delete, "Ctrl-Alt-Backspace": dn["Mod-Delete"], "Alt-Delete": dn["Mod-Delete"], "Alt-d": dn["Mod-Delete"], "Ctrl-a": DO, "Ctrl-e": TO };
9032
9032
  for (let t in dn) JE[t] = dn[t];
9033
- const ko = (typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !(typeof os == "undefined" || !os.platform) && os.platform() == "darwin") ? JE : dn;
9033
+ const Lo = (typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !(typeof os == "undefined" || !os.platform) && os.platform() == "darwin") ? JE : dn;
9034
9034
  function Zc(t, e) {
9035
9035
  return t.reduce((n, r, i) => n.concat(e(r, i)), []);
9036
9036
  }
@@ -9088,7 +9088,7 @@ const CO = 13;
9088
9088
  function Yh(t) {
9089
9089
  return t.keyCode === CO && !t.shiftKey;
9090
9090
  }
9091
- function Lo(t) {
9091
+ function ko(t) {
9092
9092
  const e = t.replace(/%2F/g, "/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/, "$1"), n = decodeURIComponent(e);
9093
9093
  if (/%[0-9A-Fa-f]{2}/.test(n)) try {
9094
9094
  return decodeURIComponent(n.replace(/\+/g, "%20"));
@@ -9106,7 +9106,7 @@ function Gh(t, e) {
9106
9106
  function NO(t) {
9107
9107
  return [...t.matchAll(/^|\s+/g)].map((n) => n.index + n[0].length).map((n) => t.substring(n));
9108
9108
  }
9109
- const Wh = ["#996666", "#9A6E61", "#8D7662", "#8E775E", "#948771", "#8A8360", "#888D65", "#6F8E63", "#749378", "#678975", "#779E86", "#639A8F", "#6D92A1", "#65869F", "#697E9A", "#736C9F", "#8C6495", "#956387", "#B05D54", "#B16D52", "#AF8751", "#AC8A56", "#B7A458", "#B5B35C", "#83AA5D", "#4F9D5D", "#5FA777", "#66B58F", "#5FB3AC", "#589AAF", "#4E7F9E", "#456CAC", "#6456B7", "#714AB2", "#9771B5", "#C154C1", "#B05E81", "#B04C6A", "#B94E48", "#AF593E", "#C5994B", "#B8C25D", "#87AB39", "#4FA83D", "#40A860", "#41AA78", "#3AB09E", "#3FC1AA", "#56B4BE", "#3EABBF", "#4682B4", "#7A58C1", "#9966CC", "#C54B8C", "#B44668", "#AE4560", "#A3807B", "#AB917A", "#ACA586", "#A8AF8E", "#9EA587", "#8BA690", "#7DA98D", "#7CB0A1", "#8BA9A5", "#7CA1A6", "#859FAF", "#8D90A1", "#A397B4", "#AE809E", "#C08081", "#BB8983", "#B19461", "#B5A27F", "#B8B56A", "#9AB973", "#7AC488", "#7CB7BB", "#80B3C4", "#788BBA", "#7A89B8", "#9678B6", "#CB8FA9", "#B57281", "#C6726B", "#C88A65", "#C2955D", "#C8B568", "#B9C46A", "#74C365", "#6FD0C5", "#6093D1", "#7666C6", "#D06DA1"], Li = (t, e, n = void 0) => Zc(t, (r) => {
9109
+ const Wh = ["#996666", "#9A6E61", "#8D7662", "#8E775E", "#948771", "#8A8360", "#888D65", "#6F8E63", "#749378", "#678975", "#779E86", "#639A8F", "#6D92A1", "#65869F", "#697E9A", "#736C9F", "#8C6495", "#956387", "#B05D54", "#B16D52", "#AF8751", "#AC8A56", "#B7A458", "#B5B35C", "#83AA5D", "#4F9D5D", "#5FA777", "#66B58F", "#5FB3AC", "#589AAF", "#4E7F9E", "#456CAC", "#6456B7", "#714AB2", "#9771B5", "#C154C1", "#B05E81", "#B04C6A", "#B94E48", "#AF593E", "#C5994B", "#B8C25D", "#87AB39", "#4FA83D", "#40A860", "#41AA78", "#3AB09E", "#3FC1AA", "#56B4BE", "#3EABBF", "#4682B4", "#7A58C1", "#9966CC", "#C54B8C", "#B44668", "#AE4560", "#A3807B", "#AB917A", "#ACA586", "#A8AF8E", "#9EA587", "#8BA690", "#7DA98D", "#7CB0A1", "#8BA9A5", "#7CA1A6", "#859FAF", "#8D90A1", "#A397B4", "#AE809E", "#C08081", "#BB8983", "#B19461", "#B5A27F", "#B8B56A", "#9AB973", "#7AC488", "#7CB7BB", "#80B3C4", "#788BBA", "#7A89B8", "#9678B6", "#CB8FA9", "#B57281", "#C6726B", "#C88A65", "#C2955D", "#C8B568", "#B9C46A", "#74C365", "#6FD0C5", "#6093D1", "#7666C6", "#D06DA1"], ki = (t, e, n = void 0) => Zc(t, (r) => {
9110
9110
  if (typeof r == "string") return e(r, n);
9111
9111
  switch (r.type) {
9112
9112
  case "bold":
@@ -9117,14 +9117,14 @@ const Wh = ["#996666", "#9A6E61", "#8D7662", "#8E775E", "#948771", "#8A8360", "#
9117
9117
  case "bulletList":
9118
9118
  case "bulletpoint":
9119
9119
  case "bulletPoint":
9120
- return [{ type: r.type, children: Li(r.children, e, r.type) }];
9120
+ return [{ type: r.type, children: ki(r.children, e, r.type) }];
9121
9121
  case "link":
9122
- return [{ type: r.type, url: r.url, children: Li(r.children, e, r.type) }];
9122
+ return [{ type: r.type, url: r.url, children: ki(r.children, e, r.type) }];
9123
9123
  case "actionlink":
9124
9124
  case "actionLink":
9125
9125
  case "actionbutton":
9126
9126
  case "actionButton":
9127
- return [{ type: r.type, action: r.action, params: r.params, children: Li(r.children, e, r.type) }];
9127
+ return [{ type: r.type, action: r.action, params: r.params, children: ki(r.children, e, r.type) }];
9128
9128
  case "mention":
9129
9129
  case "autolink":
9130
9130
  case "autoLink":
@@ -9161,12 +9161,12 @@ const bO = [0, 1, 2, 3, 4, 5, 6].map((t) => {
9161
9161
  const e = [];
9162
9162
  return 1 & t || e.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/), 2 & t || e.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/), 4 & t || e.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/), new RegExp(e.map((n) => n.source).join("|"), "g");
9163
9163
  }), wO = { _: 1, "*": 4, "~": 2 };
9164
- function kO(t) {
9164
+ function LO(t) {
9165
9165
  return n_(t, 0);
9166
9166
  }
9167
9167
  function n_(t, e = 0) {
9168
9168
  const n = bO[e], r = n ? (function(i) {
9169
- const o = LO.getOrCompute(i, () => new RegExp(`(?:^|[\\s${Xh}])(?:${i.source})(?=[\\s${Xh}]|$)`, "g")), s = Sn(o, (a) => {
9169
+ const o = kO.getOrCompute(i, () => new RegExp(`(?:^|[\\s${Xh}])(?:${i.source})(?=[\\s${Xh}]|$)`, "g")), s = Sn(o, (a) => {
9170
9170
  const l = a[0][1], u = a[1] || a[2] || a[3] || a[4] || a[5] || a[6];
9171
9171
  return [" ", { type: Jl[wO[l]], children: [u] }];
9172
9172
  });
@@ -9175,9 +9175,9 @@ function n_(t, e = 0) {
9175
9175
  return l.length > 1 && u.unshift(l.substring(1)), u;
9176
9176
  };
9177
9177
  })(n) : () => [t];
9178
- return Li(r(t), (i, o) => o === "bold" || o === "italic" || o === "strikethrough" ? n_(i, e | Jl[o]) : [i]);
9178
+ return ki(r(t), (i, o) => o === "bold" || o === "italic" || o === "strikethrough" ? n_(i, e | Jl[o]) : [i]);
9179
9179
  }
9180
- const LO = (function() {
9180
+ const kO = (function() {
9181
9181
  const t = (function() {
9182
9182
  try {
9183
9183
  return /* @__PURE__ */ new WeakMap();
@@ -9683,10 +9683,10 @@ function bv(t, e, n) {
9683
9683
  function wv(t, e, n) {
9684
9684
  h_(n) ? (e.state = 31, e.acceptStateReached = !0) : t.removeMachine(e);
9685
9685
  }
9686
- function kv(t, e, n) {
9686
+ function Lv(t, e, n) {
9687
9687
  h_(n) || (Dr(n) ? t.removeMachine(e) : Oe(t, e));
9688
9688
  }
9689
- function Lv(t, e, n, r) {
9689
+ function kv(t, e, n, r) {
9690
9690
  Xe(r) ? e.state = 38 : (t.removeMachine(e), Zs(t, n, r));
9691
9691
  }
9692
9692
  function Mv(t, e, n, r) {
@@ -9827,24 +9827,24 @@ function Gv(t, e, n) {
9827
9827
  e === "!" ? t.state = 13 : e === "/" ? (t.state = 2, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { isClosing: !0 }))) : e === "<" ? nn(t) : ci(n) ? (t.state = 3, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { isOpening: !0 }))) : (t.state = 0, t.currentTag = iu);
9828
9828
  }
9829
9829
  function Wv(t, e, n) {
9830
- vr(n) ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), t.state = 4) : e === "<" ? nn(t) : e === "/" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), t.state = 12) : e === ">" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), rn(t)) : ci(n) || Xe(n) || e === ":" || Lt(t);
9830
+ vr(n) ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), t.state = 4) : e === "<" ? nn(t) : e === "/" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), t.state = 12) : e === ">" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { name: Ja(t) })), rn(t)) : ci(n) || Xe(n) || e === ":" || kt(t);
9831
9831
  }
9832
9832
  function Xv(t, e, n) {
9833
- e === ">" ? Lt(t) : ci(n) ? t.state = 3 : Lt(t);
9833
+ e === ">" ? kt(t) : ci(n) ? t.state = 3 : kt(t);
9834
9834
  }
9835
9835
  function Kv(t, e, n) {
9836
9836
  vr(n) || (e === "/" ? t.state = 12 : e === ">" ? rn(t) : e === "<" ? nn(t) : e === "=" || Qc(n) || (function(r) {
9837
9837
  return r >= 0 && r <= 31 || r == 127;
9838
- })(n) ? Lt(t) : t.state = 5);
9838
+ })(n) ? kt(t) : t.state = 5);
9839
9839
  }
9840
9840
  function qv(t, e, n) {
9841
- vr(n) ? t.state = 6 : e === "/" ? t.state = 12 : e === "=" ? t.state = 7 : e === ">" ? rn(t) : e === "<" ? nn(t) : Qc(n) && Lt(t);
9841
+ vr(n) ? t.state = 6 : e === "/" ? t.state = 12 : e === "=" ? t.state = 7 : e === ">" ? rn(t) : e === "<" ? nn(t) : Qc(n) && kt(t);
9842
9842
  }
9843
9843
  function Jv(t, e, n) {
9844
- vr(n) || (e === "/" ? t.state = 12 : e === "=" ? t.state = 7 : e === ">" ? rn(t) : e === "<" ? nn(t) : Qc(n) ? Lt(t) : t.state = 5);
9844
+ vr(n) || (e === "/" ? t.state = 12 : e === "=" ? t.state = 7 : e === ">" ? rn(t) : e === "<" ? nn(t) : Qc(n) ? kt(t) : t.state = 5);
9845
9845
  }
9846
9846
  function Zv(t, e, n) {
9847
- vr(n) || (e === '"' ? t.state = 8 : e === "'" ? t.state = 9 : /[>=`]/.test(e) ? Lt(t) : e === "<" ? nn(t) : t.state = 10);
9847
+ vr(n) || (e === '"' ? t.state = 8 : e === "'" ? t.state = 9 : /[>=`]/.test(e) ? kt(t) : e === "<" ? nn(t) : t.state = 10);
9848
9848
  }
9849
9849
  function Qv(t, e) {
9850
9850
  e === '"' && (t.state = 11);
@@ -9861,17 +9861,17 @@ function n0(t, e, n) {
9861
9861
  })(t));
9862
9862
  }
9863
9863
  function r0(t, e) {
9864
- e === ">" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { isClosing: !0 })), rn(t)) : Lt(t);
9864
+ e === ">" ? (t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { isClosing: !0 })), rn(t)) : kt(t);
9865
9865
  }
9866
9866
  function i0(t) {
9867
9867
  var e = t.html, n = t.charIdx;
9868
- e.slice(n, n + 2) === "--" ? (t.charIdx++, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { type: "comment" })), t.state = 14) : e.slice(n, n + 7).toUpperCase() === "DOCTYPE" ? (t.charIdx += 6, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { type: "doctype" })), t.state = 20) : Lt(t);
9868
+ e.slice(n, n + 2) === "--" ? (t.charIdx++, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { type: "comment" })), t.state = 14) : e.slice(n, n + 7).toUpperCase() === "DOCTYPE" ? (t.charIdx += 6, t.currentTag = new Jt(Pe(Pe({}, t.currentTag), { type: "doctype" })), t.state = 20) : kt(t);
9869
9869
  }
9870
9870
  function o0(t, e) {
9871
- e === "-" ? t.state = 15 : e === ">" ? Lt(t) : t.state = 16;
9871
+ e === "-" ? t.state = 15 : e === ">" ? kt(t) : t.state = 16;
9872
9872
  }
9873
9873
  function s0(t, e) {
9874
- e === "-" ? t.state = 18 : e === ">" ? Lt(t) : t.state = 16;
9874
+ e === "-" ? t.state = 18 : e === ">" ? kt(t) : t.state = 16;
9875
9875
  }
9876
9876
  function a0(t, e) {
9877
9877
  e === "-" && (t.state = 17);
@@ -9888,7 +9888,7 @@ function u0(t, e) {
9888
9888
  function d0(t, e) {
9889
9889
  e === ">" ? rn(t) : e === "<" && nn(t);
9890
9890
  }
9891
- function Lt(t) {
9891
+ function kt(t) {
9892
9892
  t.state = 0, t.currentTag = iu;
9893
9893
  }
9894
9894
  function nn(t) {
@@ -9898,7 +9898,7 @@ function rn(t) {
9898
9898
  var e = t.html.slice(t.currentDataIdx, t.currentTag.idx);
9899
9899
  e && t.callbacks.onText(e, t.currentDataIdx);
9900
9900
  var n = t.currentTag;
9901
- n.type === "comment" ? t.callbacks.onComment(n.idx) : n.type === "doctype" ? t.callbacks.onDoctype(n.idx) : (n.isOpening && t.callbacks.onOpenTag(n.name, n.idx), n.isClosing && t.callbacks.onCloseTag(n.name, n.idx)), Lt(t), t.currentDataIdx = t.charIdx + 1;
9901
+ n.type === "comment" ? t.callbacks.onComment(n.idx) : n.type === "doctype" ? t.callbacks.onDoctype(n.idx) : (n.isOpening && t.callbacks.onOpenTag(n.name, n.idx), n.isClosing && t.callbacks.onCloseTag(n.name, n.idx)), kt(t), t.currentDataIdx = t.charIdx + 1;
9902
9902
  }
9903
9903
  function Ja(t) {
9904
9904
  var e = t.currentTag.idx + (t.currentTag.isClosing ? 2 : 1);
@@ -10166,7 +10166,7 @@ var h0 = (function() {
10166
10166
  wv(l, h, c);
10167
10167
  break;
10168
10168
  case 31:
10169
- kv(l, h, c);
10169
+ Lv(l, h, c);
10170
10170
  break;
10171
10171
  case 32:
10172
10172
  Mv(l, h, u, c);
@@ -10184,7 +10184,7 @@ var h0 = (function() {
10184
10184
  Hv(l, h, 0, c);
10185
10185
  break;
10186
10186
  case 37:
10187
- Lv(l, h, u, c);
10187
+ kv(l, h, u, c);
10188
10188
  break;
10189
10189
  case 38:
10190
10190
  Uv(l, h, 0, c);
@@ -10297,7 +10297,7 @@ function g_(t, e = { except: [] }) {
10297
10297
  const n = (function(i = { except: [] }) {
10298
10298
  var a;
10299
10299
  const o = { multilineSteps: [], singlelineSteps: [] }, s = (a = i.except) != null ? a : O0.filter((l) => !i.only.includes(l));
10300
- return s.includes("BulletPoint") || o.multilineSteps.push(g0, S0), s.includes("Mention") || o.singlelineSteps.push(m0), s.includes("CustomEmoji") || o.singlelineSteps.push(E0), s.includes("Codespan") || o.multilineSteps.push(f0()), s.includes("FormattedLink") || o.singlelineSteps.push(m_), s.includes("Actions") || (o.singlelineSteps.push(_0), o.singlelineSteps.push(A0)), s.includes("Wikitext") || o.singlelineSteps.push(kO), s.includes("Autolink") || o.singlelineSteps.push(A_, __), o;
10300
+ return s.includes("BulletPoint") || o.multilineSteps.push(g0, S0), s.includes("Mention") || o.singlelineSteps.push(m0), s.includes("CustomEmoji") || o.singlelineSteps.push(E0), s.includes("Codespan") || o.multilineSteps.push(f0()), s.includes("FormattedLink") || o.singlelineSteps.push(m_), s.includes("Actions") || (o.singlelineSteps.push(_0), o.singlelineSteps.push(A0)), s.includes("Wikitext") || o.singlelineSteps.push(LO), s.includes("Autolink") || o.singlelineSteps.push(A_, __), o;
10301
10301
  })(e);
10302
10302
  let r = O_(t, n);
10303
10303
  return r = v_(r, !1), r;
@@ -10310,7 +10310,7 @@ function O_(t, e) {
10310
10310
  return n = Qa(n, e.multilineSteps), n = Qa(n, [v0]), n = Qa(n, e.singlelineSteps), n = ou(n), n;
10311
10311
  }
10312
10312
  function Qa(t, e) {
10313
- return e.reduce((n, r) => Li(n, r), t);
10313
+ return e.reduce((n, r) => ki(n, r), t);
10314
10314
  }
10315
10315
  function ou(t) {
10316
10316
  const e = [];
@@ -10432,7 +10432,7 @@ const np = (t, e) => (n) => {
10432
10432
  function T_({ placeholder: t, disabled: e, className: n = "", characterLimit: r, spellcheck: i }) {
10433
10433
  const o = co(), s = X(), a = X(null);
10434
10434
  return z(() => (s.current = (function(l, u, c, d, h) {
10435
- const p = Ur.create({ schema: xe, plugins: [...h.filter(y0), OO(), Hh({ ...ko, "Mod-z": WE, "Mod-y": Wl, "Mod-Shift-z": Wl, "Mod-b": ep("*"), "Mod-i": ep("_"), "Mod-Enter": ko.Enter, "Shift-Enter": ko.Enter, Enter: c }), Hh({ Enter: ko.Enter }), Fh] }), m = D0(), _ = new zE(l, { handlePaste: (E, A, g) => T0(E, A, d), clipboardTextSerializer(E) {
10435
+ const p = Ur.create({ schema: xe, plugins: [...h.filter(y0), OO(), Hh({ ...Lo, "Mod-z": WE, "Mod-y": Wl, "Mod-Shift-z": Wl, "Mod-b": ep("*"), "Mod-i": ep("_"), "Mod-Enter": Lo.Enter, "Shift-Enter": Lo.Enter, Enter: c }), Hh({ Enter: Lo.Enter }), Fh] }), m = D0(), _ = new zE(l, { handlePaste: (E, A, g) => T0(E, A, d), clipboardTextSerializer(E) {
10436
10436
  const A = [];
10437
10437
  return E.content.forEach((g) => {
10438
10438
  g && A.push(t_(g.textContent));
@@ -10471,7 +10471,7 @@ function ip(t, e) {
10471
10471
  const n = encodeURIComponent(t);
10472
10472
  return xe.nodes.mention.create({ id: t, name: e }, xe.text(`<!!mention:${n}|${e}>`));
10473
10473
  }
10474
- const ks = class ks {
10474
+ const Ls = class Ls {
10475
10475
  constructor(e) {
10476
10476
  this.doc = e, this.size = this.doc.content.size, this.hasContent = $E(this.doc);
10477
10477
  }
@@ -10485,8 +10485,8 @@ const ks = class ks {
10485
10485
  return this.doc.textContent.replace(/\xa0/g, " ");
10486
10486
  }
10487
10487
  };
10488
- ks.EMPTY = new ks(xe.topNodeType.create());
10489
- let gs = ks;
10488
+ Ls.EMPTY = new Ls(xe.topNodeType.create());
10489
+ let gs = Ls;
10490
10490
  function y0(t) {
10491
10491
  return t != null;
10492
10492
  }
@@ -10802,7 +10802,7 @@ function sp(t, e, n) {
10802
10802
  return n == null || n.appendChild(r), r;
10803
10803
  }
10804
10804
  var w0 = Object.freeze({ __proto__: null, createElement: sp, default: sp });
10805
- const k0 = { fetchBlob: function(t, e, n) {
10805
+ const L0 = { fetchBlob: function(t, e, n) {
10806
10806
  return at(this, void 0, void 0, function* () {
10807
10807
  const r = yield fetch(t, n);
10808
10808
  if (r.status >= 400) throw new Error(`Failed to fetch ${t}: ${r.status} (${r.statusText})`);
@@ -10829,7 +10829,7 @@ const k0 = { fetchBlob: function(t, e, n) {
10829
10829
  })(r.clone(), e), r.blob();
10830
10830
  });
10831
10831
  } };
10832
- function ye(t) {
10832
+ function Ce(t) {
10833
10833
  let e = t;
10834
10834
  const n = /* @__PURE__ */ new Set();
10835
10835
  return { get value() {
@@ -10841,7 +10841,7 @@ function ye(t) {
10841
10841
  }, subscribe: (r) => (n.add(r), () => n.delete(r)) };
10842
10842
  }
10843
10843
  function Jn(t, e) {
10844
- const n = ye(t());
10844
+ const n = Ce(t());
10845
10845
  return e.forEach((r) => r.subscribe(() => {
10846
10846
  const i = t();
10847
10847
  Object.is(n.value, i) || n.set(i);
@@ -10858,7 +10858,7 @@ function Rn(t, e) {
10858
10858
  n && (n(), n = void 0), i.forEach((o) => o());
10859
10859
  };
10860
10860
  }
10861
- class L0 extends Eo {
10861
+ class k0 extends Eo {
10862
10862
  get isPlayingSignal() {
10863
10863
  return this._isPlaying;
10864
10864
  }
@@ -10881,7 +10881,7 @@ class L0 extends Eo {
10881
10881
  return this._seeking;
10882
10882
  }
10883
10883
  constructor(e) {
10884
- super(), this.isExternalMedia = !1, this.reactiveMediaEventCleanups = [], e.media ? (this.media = e.media, this.isExternalMedia = !0) : this.media = document.createElement("audio"), this._isPlaying = ye(!1), this._currentTime = ye(0), this._duration = ye(0), this._volume = ye(this.media.volume), this._muted = ye(this.media.muted), this._playbackRate = ye(this.media.playbackRate || 1), this._seeking = ye(!1), this.setupReactiveMediaEvents(), e.mediaControls && (this.media.controls = !0), e.autoplay && (this.media.autoplay = !0), e.playbackRate != null && this.onMediaEvent("canplay", () => {
10884
+ super(), this.isExternalMedia = !1, this.reactiveMediaEventCleanups = [], e.media ? (this.media = e.media, this.isExternalMedia = !0) : this.media = document.createElement("audio"), this._isPlaying = Ce(!1), this._currentTime = Ce(0), this._duration = Ce(0), this._volume = Ce(this.media.volume), this._muted = Ce(this.media.muted), this._playbackRate = Ce(this.media.playbackRate || 1), this._seeking = Ce(!1), this.setupReactiveMediaEvents(), e.mediaControls && (this.media.controls = !0), e.autoplay && (this.media.autoplay = !0), e.playbackRate != null && this.onMediaEvent("canplay", () => {
10885
10885
  e.playbackRate != null && (this.media.playbackRate = e.playbackRate);
10886
10886
  }, { once: !0 });
10887
10887
  }
@@ -11040,7 +11040,7 @@ class x0 extends Eo {
11040
11040
  const r = this.wrapper.getBoundingClientRect(), [i, o] = ap(r, n.clientX, n.clientY);
11041
11041
  this.emit("dblclick", i, o);
11042
11042
  }), this.options.dragToSeek !== !0 && typeof this.options.dragToSeek != "object" || this.initDrag(), this.scrollStream = (function(n) {
11043
- const r = ye({ scrollLeft: n.scrollLeft, scrollWidth: n.scrollWidth, clientWidth: n.clientWidth }), i = Jn(() => (function(a) {
11043
+ const r = Ce({ scrollLeft: n.scrollLeft, scrollWidth: n.scrollWidth, clientWidth: n.clientWidth }), i = Jn(() => (function(a) {
11044
11044
  const { scrollLeft: l, scrollWidth: u, clientWidth: c } = a;
11045
11045
  if (u === 0) return { startX: 0, endX: 1 };
11046
11046
  const d = l / u, h = (l + c) / u;
@@ -11073,7 +11073,7 @@ class x0 extends Eo {
11073
11073
  initDrag() {
11074
11074
  if (this.dragStream) return;
11075
11075
  this.dragStream = (function(n, r = {}) {
11076
- const { threshold: i = 3, mouseButton: o = 0, touchDelay: s = 100 } = r, a = ye(null), l = /* @__PURE__ */ new Map(), u = matchMedia("(pointer: coarse)").matches;
11076
+ const { threshold: i = 3, mouseButton: o = 0, touchDelay: s = 100 } = r, a = Ce(null), l = /* @__PURE__ */ new Map(), u = matchMedia("(pointer: coarse)").matches;
11077
11077
  let c = () => {
11078
11078
  };
11079
11079
  const d = (h) => {
@@ -11081,8 +11081,8 @@ class x0 extends Eo {
11081
11081
  let p = h.clientX, m = h.clientY, _ = !1;
11082
11082
  const E = Date.now(), A = n.getBoundingClientRect(), { left: g, top: S } = A, O = (v) => {
11083
11083
  if (v.defaultPrevented || l.size > 1 || u && Date.now() - E < s) return;
11084
- const T = v.clientX, C = v.clientY, N = T - p, k = C - m;
11085
- (_ || Math.abs(N) > i || Math.abs(k) > i) && (v.preventDefault(), v.stopPropagation(), _ || (a.set({ type: "start", x: p - g, y: m - S }), _ = !0), a.set({ type: "move", x: T - g, y: C - S, deltaX: N, deltaY: k }), p = T, m = C);
11084
+ const T = v.clientX, C = v.clientY, N = T - p, L = C - m;
11085
+ (_ || Math.abs(N) > i || Math.abs(L) > i) && (v.preventDefault(), v.stopPropagation(), _ || (a.set({ type: "start", x: p - g, y: m - S }), _ = !0), a.set({ type: "move", x: T - g, y: C - S, deltaX: N, deltaY: L }), p = T, m = C);
11086
11086
  }, D = (v) => {
11087
11087
  if (l.delete(v.pointerId), _) {
11088
11088
  const T = v.clientX, C = v.clientY;
@@ -11265,15 +11265,15 @@ class x0 extends Eo {
11265
11265
  return { halfHeight: S, barWidth: O, barGap: D, barRadius: A.barRadius || 0, barMinHeight: A.barMinHeight ? A.barMinHeight * g : 0, barIndexScale: E > 0 ? m / I / E : 0, barSpacing: I };
11266
11266
  })({ width: o, height: s, length: (e[0] || []).length, options: n, pixelRatio: this.getPixelRatio() }), p = (function({ channelData: m, barIndexScale: _, barSpacing: E, barWidth: A, halfHeight: g, vScale: S, canvasHeight: O, barAlign: D, barMinHeight: I }) {
11267
11267
  const R = m[0] || [], y = m[1] || R, v = R.length, T = [];
11268
- let C = 0, N = 0, k = 0;
11268
+ let C = 0, N = 0, L = 0;
11269
11269
  for (let b = 0; b <= v; b++) {
11270
- const L = Math.round(b * _);
11271
- if (L > C) {
11272
- const { topHeight: U, totalHeight: V } = M0({ maxTop: N, maxBottom: k, halfHeight: g, vScale: S, barMinHeight: I, barAlign: D }), $ = P0({ barAlign: D, halfHeight: g, topHeight: U, totalHeight: V, canvasHeight: O });
11273
- T.push({ x: C * E, y: $, width: A, height: V }), C = L, N = 0, k = 0;
11270
+ const k = Math.round(b * _);
11271
+ if (k > C) {
11272
+ const { topHeight: U, totalHeight: V } = M0({ maxTop: N, maxBottom: L, halfHeight: g, vScale: S, barMinHeight: I, barAlign: D }), $ = P0({ barAlign: D, halfHeight: g, topHeight: U, totalHeight: V, canvasHeight: O });
11273
+ T.push({ x: C * E, y: $, width: A, height: V }), C = k, N = 0, L = 0;
11274
11274
  }
11275
11275
  const x = Math.abs(R[b] || 0), M = Math.abs(y[b] || 0);
11276
- x > N && (N = x), M > k && (k = M);
11276
+ x > N && (N = x), M > L && (L = M);
11277
11277
  }
11278
11278
  return T;
11279
11279
  })({ channelData: e, barIndexScale: c, barSpacing: d, barWidth: l, halfHeight: a, vScale: i, canvasHeight: s, barAlign: n.barAlign, barMinHeight: h });
@@ -11584,7 +11584,7 @@ class el extends Eo {
11584
11584
  }
11585
11585
  }
11586
11586
  const H0 = { waveColor: "#999", progressColor: "#555", cursorWidth: 1, minPxPerSec: 0, fillParent: !0, interact: !0, dragToSeek: !1, autoScroll: !0, autoCenter: !0, sampleRate: 8e3 };
11587
- class Ji extends L0 {
11587
+ class Ji extends k0 {
11588
11588
  static create(e) {
11589
11589
  return new Ji(e);
11590
11590
  }
@@ -11599,10 +11599,10 @@ class Ji extends L0 {
11599
11599
  super({ media: n, mediaControls: e.mediaControls, autoplay: e.autoplay, playbackRate: e.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this.reactiveCleanups = [], this.options = Object.assign({}, H0, e);
11600
11600
  const { state: r, actions: i } = (function(a) {
11601
11601
  var l, u, c, d, h, p;
11602
- const m = (l = a == null ? void 0 : a.currentTime) !== null && l !== void 0 ? l : ye(0), _ = (u = a == null ? void 0 : a.duration) !== null && u !== void 0 ? u : ye(0), E = (c = a == null ? void 0 : a.isPlaying) !== null && c !== void 0 ? c : ye(!1), A = (d = a == null ? void 0 : a.isSeeking) !== null && d !== void 0 ? d : ye(!1), g = (h = a == null ? void 0 : a.volume) !== null && h !== void 0 ? h : ye(1), S = (p = a == null ? void 0 : a.playbackRate) !== null && p !== void 0 ? p : ye(1), O = ye(null), D = ye(null), I = ye(""), R = ye(0), y = ye(0), v = Jn(() => !E.value, [E]), T = Jn(() => O.value !== null, [O]), C = Jn(() => T.value && _.value > 0, [T, _]), N = Jn(() => m.value, [m]), k = Jn(() => _.value > 0 ? m.value / _.value : 0, [m, _]);
11603
- return { state: { currentTime: m, duration: _, isPlaying: E, isPaused: v, isSeeking: A, volume: g, playbackRate: S, audioBuffer: O, peaks: D, url: I, zoom: R, scrollPosition: y, canPlay: T, isReady: C, progress: N, progressPercent: k }, actions: { setCurrentTime: (b) => {
11604
- const L = Math.max(0, Math.min(_.value || 1 / 0, b));
11605
- m.set(L);
11602
+ const m = (l = a == null ? void 0 : a.currentTime) !== null && l !== void 0 ? l : Ce(0), _ = (u = a == null ? void 0 : a.duration) !== null && u !== void 0 ? u : Ce(0), E = (c = a == null ? void 0 : a.isPlaying) !== null && c !== void 0 ? c : Ce(!1), A = (d = a == null ? void 0 : a.isSeeking) !== null && d !== void 0 ? d : Ce(!1), g = (h = a == null ? void 0 : a.volume) !== null && h !== void 0 ? h : Ce(1), S = (p = a == null ? void 0 : a.playbackRate) !== null && p !== void 0 ? p : Ce(1), O = Ce(null), D = Ce(null), I = Ce(""), R = Ce(0), y = Ce(0), v = Jn(() => !E.value, [E]), T = Jn(() => O.value !== null, [O]), C = Jn(() => T.value && _.value > 0, [T, _]), N = Jn(() => m.value, [m]), L = Jn(() => _.value > 0 ? m.value / _.value : 0, [m, _]);
11603
+ return { state: { currentTime: m, duration: _, isPlaying: E, isPaused: v, isSeeking: A, volume: g, playbackRate: S, audioBuffer: O, peaks: D, url: I, zoom: R, scrollPosition: y, canPlay: T, isReady: C, progress: N, progressPercent: L }, actions: { setCurrentTime: (b) => {
11604
+ const k = Math.max(0, Math.min(_.value || 1 / 0, b));
11605
+ m.set(k);
11606
11606
  }, setDuration: (b) => {
11607
11607
  _.set(Math.max(0, b));
11608
11608
  }, setPlaying: (b) => {
@@ -11610,11 +11610,11 @@ class Ji extends L0 {
11610
11610
  }, setSeeking: (b) => {
11611
11611
  A.set(b);
11612
11612
  }, setVolume: (b) => {
11613
- const L = Math.max(0, Math.min(1, b));
11614
- g.set(L);
11613
+ const k = Math.max(0, Math.min(1, b));
11614
+ g.set(k);
11615
11615
  }, setPlaybackRate: (b) => {
11616
- const L = Math.max(0.1, Math.min(16, b));
11617
- S.set(L);
11616
+ const k = Math.max(0.1, Math.min(16, b));
11617
+ S.set(k);
11618
11618
  }, setAudioBuffer: (b) => {
11619
11619
  O.set(b), b && _.set(b.duration);
11620
11620
  }, setPeaks: (b) => {
@@ -11782,7 +11782,7 @@ class Ji extends L0 {
11782
11782
  const a = this.options.fetchParams || {};
11783
11783
  window.AbortController && !a.signal && (this.abortController = new AbortController(), a.signal = this.abortController.signal);
11784
11784
  const l = (c) => this.emit("loading", c);
11785
- n = yield k0.fetchBlob(e, l, a);
11785
+ n = yield L0.fetchBlob(e, l, a);
11786
11786
  const u = this.options.blobMimeType;
11787
11787
  u && (n = new Blob([n], { type: u }));
11788
11788
  }
@@ -11967,7 +11967,7 @@ function V0(t, e) {
11967
11967
  return n !== void 0 && r.test(n);
11968
11968
  }
11969
11969
  const z0 = /^[]/g;
11970
- function k_(t) {
11970
+ function L_(t) {
11971
11971
  return t.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
11972
11972
  }
11973
11973
  function tc(t, e) {
@@ -12017,11 +12017,11 @@ function W0(t) {
12017
12017
  var n;
12018
12018
  return `https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${e}.svg`;
12019
12019
  }
12020
- class L_ {
12020
+ class k_ {
12021
12021
  constructor({ mode: e, allowedHostnames: n, allowedPhoneNrs: r, allowedMatches: i, forbiddenMatches: o, forbiddenWords: s, suppressLinks: a, suppressEmailAddresses: l, suppressPhoneNumbers: u, replacement: c }) {
12022
12022
  if (Yr.oneOf(e, ["all", "otherOnly", "off"]), this.mode = e, this.suppressLinks = a !== !1, this.suppressEmailAddresses = l !== !1, this.suppressPhoneNumbers = u !== !1, this.allowedHostnames = n || [], this.allowedPhoneNrs = (r || []).filter((d) => d).map((d) => d.replace(/[^0-9]/g, "")), this.allowedMatches = (i || []).filter(hp).map((d) => Ss(d)), this.forbiddenMatches = (o || []).filter(hp).map((d) => Ss(d)), s) {
12023
12023
  const d = s.split(`
12024
- `).map((h) => h.trim().toLowerCase()).filter((h) => h.length > 0 && !h.startsWith("#")).map((h) => k_(h));
12024
+ `).map((h) => h.trim().toLowerCase()).filter((h) => h.length > 0 && !h.startsWith("#")).map((h) => L_(h));
12025
12025
  d.length && this.forbiddenMatches.push(new RegExp(`\\b(${d.join("|")})\\b`, "gi"));
12026
12026
  }
12027
12027
  Yr(() => this.allowedMatches.every((d) => d.flags.includes("g")), "All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"), Yr(() => this.forbiddenMatches.every((d) => d.flags.includes("g")), "All regexes in `suppressContactInfo.forbiddenMatches` must be global. Check `forbiddenMatches`!"), c = c == null ? void 0 : c.trim(), this.replacement = c && c.length > 0 ? c : void 0;
@@ -12033,7 +12033,7 @@ class L_ {
12033
12033
  function lu(t) {
12034
12034
  var n, r, i, o, s, a, l, u, c, d, h, p, m, _;
12035
12035
  let e = "";
12036
- return t.t && (e = `(${t.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (n = t.formattedLinks) != null ? n : "plaintext", markup: (r = t.markup) != null ? r : !1, useFallbackMentions: (i = t.useFallbackMentions) != null ? i : !1, sameTabLinkRules: (o = t.sameTabLinkRules) != null ? o : [], enableEmojiImageFallback: (s = t.enableEmojiImageFallback) != null ? s : !1, highlight: (a = t.highlight) != null ? a : [], highlightFromWordBeginnings: (l = t.highlightFromWordBeginnings) != null ? l : !1, contactInfo: (u = t.contactInfo) != null ? u : !1, suppression: (c = t.suppression) != null ? c : new L_({ mode: "off" }), contactInfoHiddenText: (p = (h = t.contactInfoHiddenText) != null ? h : (d = t.suppression) == null ? void 0 : d.replacement) != null ? p : e, customEmojiUrls: (m = t.customEmojiUrls) != null ? m : {}, enableActions: (_ = t.enableActions) != null ? _ : !0 };
12036
+ return t.t && (e = `(${t.t("CONTACT_INFORMATION_HIDDEN")})`), { formattedLinks: (n = t.formattedLinks) != null ? n : "plaintext", markup: (r = t.markup) != null ? r : !1, useFallbackMentions: (i = t.useFallbackMentions) != null ? i : !1, sameTabLinkRules: (o = t.sameTabLinkRules) != null ? o : [], enableEmojiImageFallback: (s = t.enableEmojiImageFallback) != null ? s : !1, highlight: (a = t.highlight) != null ? a : [], highlightFromWordBeginnings: (l = t.highlightFromWordBeginnings) != null ? l : !1, contactInfo: (u = t.contactInfo) != null ? u : !1, suppression: (c = t.suppression) != null ? c : new k_({ mode: "off" }), contactInfoHiddenText: (p = (h = t.contactInfoHiddenText) != null ? h : (d = t.suppression) == null ? void 0 : d.replacement) != null ? p : e, customEmojiUrls: (m = t.customEmojiUrls) != null ? m : {}, enableActions: (_ = t.enableActions) != null ? _ : !0 };
12037
12037
  }
12038
12038
  function X0({ id: t, text: e }) {
12039
12039
  var i;
@@ -12107,7 +12107,7 @@ function tl(t, e, n = !1) {
12107
12107
  const r = xo(t), i = t.toLowerCase() !== r, o = e.map((l) => xo(l).trim()).filter((l) => l.length), s = (function(l) {
12108
12108
  const u = l.map((d) => d.trim()).filter((d) => d).sort((d, h) => h.length - d.length);
12109
12109
  if (u.length === 0) return z0;
12110
- const c = u.map(k_).join("|");
12110
+ const c = u.map(L_).join("|");
12111
12111
  return new RegExp(c, "gi");
12112
12112
  })(o), a = Js(r, n ? new RegExp(`(?<=^|\\s)(${s.source})`, s.flags) : s).map((l) => ({ offset: l.index, matchedText: l[0], index: l.index }));
12113
12113
  return Kl(t, a, ({ index: l, matchedText: u }) => [f("mark", { className: "t-highlighted-text", children: i ? (function(c, d, h) {
@@ -12381,9 +12381,9 @@ const lD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12381
12381
  return e === 16 || e === "16" || e === "16px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", ...n }, f("path", { d: "M6.7 12.3 2.9 8.5 15 8.5 15 7.5 2.9 7.5 6.7 3.7 6 3 1 8 6 13z" }), t) : F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M14 26 15.41 24.59 7.83 17 28 17 28 15 7.83 15 15.41 7.41 14 6 4 16 14 26z" }), t);
12382
12382
  }), wD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12383
12383
  return e === 16 || e === "16" || e === "16px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", ...n }, f("path", { d: "M9.3 3.7 13.1 7.5 1 7.5 1 8.5 13.1 8.5 9.3 12.3 10 13 15 8 10 3z" }), t) : e === 20 || e === "20" || e === "20px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", ...n }, f("path", { d: "M11.8 2.8 10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z" }), t) : e === 24 || e === "24" || e === "24px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", ...n }, f("path", { d: "M14 4 12.9 5.1 18.9 11.2 2 11.2 2 12.8 18.9 12.8 12.9 18.9 14 20 22 12z" }), t) : F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6z" }), t);
12384
- }), kD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12385
- return e === 16 || e === "16" || e === "16px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", ...n }, f("path", { d: "M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z" }), t) : F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z" }), t);
12386
12384
  }), LD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12385
+ return e === 16 || e === "16" || e === "16px" ? F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", ...n }, f("path", { d: "M12.3 9.3 8.5 13.1 8.5 1 7.5 1 7.5 13.1 3.7 9.3 3 10 8 15 13 10z" }), t) : F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M24.59 16.59 17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z" }), t);
12386
+ }), kD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12387
12387
  return F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M16,18a5,5,0,1,1,5-5A5.0057,5.0057,0,0,1,16,18Zm0-8a3,3,0,1,0,3,3A3.0033,3.0033,0,0,0,16,10Z" }), f("path", { d: "M16,30,7.5645,20.0513c-.0479-.0571-.3482-.4515-.3482-.4515A10.8888,10.8888,0,0,1,5,13a11,11,0,0,1,22,0,10.8844,10.8844,0,0,1-2.2148,6.5973l-.0015.0025s-.3.3944-.3447.4474ZM8.8125,18.395c.001.0007.2334.3082.2866.3744L16,26.9079l6.91-8.15c.0439-.0552.2783-.3649.2788-.3657A8.901,8.901,0,0,0,25,13,9,9,0,1,0,7,13a8.9054,8.9054,0,0,0,1.8125,5.395Z" }), t);
12388
12388
  }), MD = F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12389
12389
  return F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M23,14v3A7,7,0,0,1,9,17V14H7v3a9,9,0,0,0,8,8.94V28H11v2H21V28H17V25.94A9,9,0,0,0,25,17V14Z" }), f("path", { d: "M16,22a5,5,0,0,0,5-5V7A5,5,0,0,0,11,7V17A5,5,0,0,0,16,22ZM13,7a3,3,0,0,1,6,0V17a3,3,0,0,1-6,0Z" }), t);
@@ -12404,9 +12404,9 @@ const HD = { checkmark: lD, emoji: cD, addEmoji: uD, search: F.forwardRef(functi
12404
12404
  return F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M17 15 17 8 15 8 15 15 8 15 8 17 15 17 15 24 17 24 17 17 24 17 24 15z" }), t);
12405
12405
  }), email: F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12406
12406
  return F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M28,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V8A2,2,0,0,0,28,6ZM25.8,8,16,14.78,6.2,8ZM4,24V8.91l11.43,7.91a1,1,0,0,0,1.14,0L28,8.91V24Z" }), t);
12407
- }), horizontalDots: dD, verticalDots: hD, chevronLeft: pD, chevronRight: fD, chevronUp: mD, chevronDown: ED, arrowsVertical: OD, arrowUp: ND, arrowLeft: bD, arrowRight: wD, arrowDown: kD, close: _D, inProgress: AD, download: gD, attachment: SD, reply: vD, edit: DD, trash: TD, pin: RD, play: (t) => f(ID, { viewBox: "-1 0 31 32", ...t }), pause: yD, info: CD, send: F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12407
+ }), horizontalDots: dD, verticalDots: hD, chevronLeft: pD, chevronRight: fD, chevronUp: mD, chevronDown: ED, arrowsVertical: OD, arrowUp: ND, arrowLeft: bD, arrowRight: wD, arrowDown: LD, close: _D, inProgress: AD, download: gD, attachment: SD, reply: vD, edit: DD, trash: TD, pin: RD, play: (t) => f(ID, { viewBox: "-1 0 31 32", ...t }), pause: yD, info: CD, send: F.forwardRef(function({ children: t, size: e = 16, ...n }, r) {
12408
12408
  return F.createElement(K, { width: e, height: e, ref: r, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", fill: "currentColor", ...n }, f("path", { d: "M27.45,15.11l-22-11a1,1,0,0,0-1.08.12,1,1,0,0,0-.33,1L7,16,4,26.74A1,1,0,0,0,5,28a1,1,0,0,0,.45-.11l22-11a1,1,0,0,0,0-1.78Zm-20.9,10L8.76,17H18V15H8.76L6.55,6.89,24.76,16Z" }), t);
12409
- }), location: LD, microphone: MD, stop: PD, spinner: function(t) {
12409
+ }), location: kD, microphone: MD, stop: PD, spinner: function(t) {
12410
12410
  const e = `t-spin ${t.className || ""}`;
12411
12411
  return f("svg", { xmlns: "http://www.w3.org/2000/svg", id: "icon", width: t.size, height: t.size, viewBox: "0 0 32 32", preserveAspectRatio: "xMidYMid meet", fill: "currentColor", focusable: "false", ...t, className: e, children: f("path", { d: "M16,28c-6.6167,0-12-5.3832-12-12S9.3833,4,16,4c2.335,0,4.5986,.6714,6.5461,1.9414l-1.0923,1.6753c-1.6221-1.0576-3.5078-1.6167-5.4539-1.6167-5.5139,0-10,4.486-10,10s4.4861,10,10,10c1.946,0,3.8318-.5591,5.4539-1.6167l1.0923,1.6753c-1.9475,1.27-4.2112,1.9414-6.5461,1.9414Z" }) });
12412
12412
  }, image: xD, movie: FD };
@@ -12851,10 +12851,10 @@ async function Ts(t, e) {
12851
12851
  })(p), _ = a[h ? d === "floating" ? "reference" : "floating" : d], E = Ds(await o.getClippingRect({ element: (n = await (o.isElement == null ? void 0 : o.isElement(_))) == null || n ? _ : _.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)), boundary: u, rootBoundary: c, strategy: l })), A = d === "floating" ? { x: r, y: i, width: s.floating.width, height: s.floating.height } : s.reference, g = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(a.floating)), S = await (o.isElement == null ? void 0 : o.isElement(g)) && await (o.getScale == null ? void 0 : o.getScale(g)) || { x: 1, y: 1 }, O = Ds(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: a, rect: A, offsetParent: g, strategy: l }) : A);
12852
12852
  return { top: (E.top - O.top + m.top) / S.y, bottom: (O.bottom - E.bottom + m.bottom) / S.y, left: (E.left - O.left + m.left) / S.x, right: (O.right - E.right + m.right) / S.x };
12853
12853
  }
12854
- function kp(t, e) {
12854
+ function Lp(t, e) {
12855
12855
  return { top: t.top - e.height, right: t.right - e.width, bottom: t.bottom - e.height, left: t.left - e.width };
12856
12856
  }
12857
- function Lp(t) {
12857
+ function kp(t) {
12858
12858
  return $D.some((e) => t[e] >= 0);
12859
12859
  }
12860
12860
  const JD = /* @__PURE__ */ new Set(["left", "top"]);
@@ -12921,13 +12921,13 @@ function Ht(t) {
12921
12921
  function ra(t) {
12922
12922
  return Ft(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.scrollX, scrollTop: t.scrollY };
12923
12923
  }
12924
- function kn(t) {
12924
+ function Ln(t) {
12925
12925
  if (ii(t) === "html") return t;
12926
12926
  const e = t.assignedSlot || t.parentNode || lc(t) && t.host || Qt(t);
12927
12927
  return lc(e) ? e.host : e;
12928
12928
  }
12929
12929
  function X_(t) {
12930
- const e = kn(t);
12930
+ const e = Ln(t);
12931
12931
  return Gr(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : tn(e) && Zi(e) ? e : X_(e);
12932
12932
  }
12933
12933
  function Qi(t, e, n) {
@@ -13026,7 +13026,7 @@ function Mp(t, e, n) {
13026
13026
  return Ds(r);
13027
13027
  }
13028
13028
  function Z_(t, e) {
13029
- const n = kn(t);
13029
+ const n = Ln(t);
13030
13030
  return !(n === e || !Ft(n) || Gr(n)) && (Ht(n).position === "fixed" || Z_(n, e));
13031
13031
  }
13032
13032
  function lT(t, e, n) {
@@ -13057,21 +13057,21 @@ function xp(t, e) {
13057
13057
  const n = Dt(t);
13058
13058
  if (Rs(t)) return n;
13059
13059
  if (!tn(t)) {
13060
- let i = kn(t);
13060
+ let i = Ln(t);
13061
13061
  for (; i && !Gr(i); ) {
13062
13062
  if (Ft(i) && !al(i)) return i;
13063
- i = kn(i);
13063
+ i = Ln(i);
13064
13064
  }
13065
13065
  return n;
13066
13066
  }
13067
13067
  let r = Pp(t, e);
13068
13068
  for (; r && eT(r) && al(r); ) r = Pp(r, e);
13069
13069
  return r && Gr(r) && al(r) && !cc(r) ? n : r || (function(i) {
13070
- let o = kn(i);
13070
+ let o = Ln(i);
13071
13071
  for (; tn(o) && !Gr(o); ) {
13072
13072
  if (cc(o)) return o;
13073
13073
  if (Rs(o)) return null;
13074
- o = kn(o);
13074
+ o = Ln(o);
13075
13075
  }
13076
13076
  return null;
13077
13077
  })(t) || n;
@@ -13095,10 +13095,10 @@ const cT = { convertOffsetParentRelativeRectToViewportRelativeRect: function(t)
13095
13095
  if (d) return d;
13096
13096
  let h = Qi(u, [], !1).filter((E) => Ft(E) && ii(E) !== "body"), p = null;
13097
13097
  const m = Ht(u).position === "fixed";
13098
- let _ = m ? kn(u) : u;
13098
+ let _ = m ? Ln(u) : u;
13099
13099
  for (; Ft(_) && !Gr(_); ) {
13100
13100
  const E = Ht(_), A = cc(_);
13101
- A || E.position !== "fixed" || (p = null), (m ? !A && !p : !A && E.position === "static" && p && aT.has(p.position) || Zi(_) && !A && Z_(u, _)) ? h = h.filter((g) => g !== _) : p = E, _ = kn(_);
13101
+ A || E.position !== "fixed" || (p = null), (m ? !A && !p : !A && E.position === "static" && p && aT.has(p.position) || Zi(_) && !A && Z_(u, _)) ? h = h.filter((g) => g !== _) : p = E, _ = Ln(_);
13102
13102
  }
13103
13103
  return c.set(u, h), h;
13104
13104
  })(e, this._c) : [].concat(n), s = [...o, r], a = s[0], l = s.reduce((u, c) => {
@@ -13135,19 +13135,19 @@ function Q_(t, e, n, r) {
13135
13135
  }
13136
13136
  return (function I(R, y) {
13137
13137
  R === void 0 && (R = !1), y === void 0 && (y = 1), D();
13138
- const v = E.getBoundingClientRect(), { left: T, top: C, width: N, height: k } = v;
13139
- if (R || A(), !N || !k) return;
13140
- const b = { rootMargin: -Fo(C) + "px " + -Fo(O.clientWidth - (T + N)) + "px " + -Fo(O.clientHeight - (C + k)) + "px " + -Fo(T) + "px", threshold: ar(0, Os(1, y)) || 1 };
13141
- let L = !0;
13138
+ const v = E.getBoundingClientRect(), { left: T, top: C, width: N, height: L } = v;
13139
+ if (R || A(), !N || !L) return;
13140
+ const b = { rootMargin: -Fo(C) + "px " + -Fo(O.clientWidth - (T + N)) + "px " + -Fo(O.clientHeight - (C + L)) + "px " + -Fo(T) + "px", threshold: ar(0, Os(1, y)) || 1 };
13141
+ let k = !0;
13142
13142
  function x(M) {
13143
13143
  const U = M[0].intersectionRatio;
13144
13144
  if (U !== y) {
13145
- if (!L) return I();
13145
+ if (!k) return I();
13146
13146
  U ? I(!1, U) : g = setTimeout(() => {
13147
13147
  I(!1, 1e-7);
13148
13148
  }, 1e3);
13149
13149
  }
13150
- U !== 1 || Fp(v, E.getBoundingClientRect()) || I(), L = !1;
13150
+ U !== 1 || Fp(v, E.getBoundingClientRect()) || I(), k = !1;
13151
13151
  }
13152
13152
  try {
13153
13153
  S = new IntersectionObserver(x, { ...b, root: O.ownerDocument });
@@ -13210,16 +13210,16 @@ const uT = function(t) {
13210
13210
  const { placement: i, middlewareData: o, rects: s, initialPlacement: a, platform: l, elements: u } = e, { mainAxis: c = !0, crossAxis: d = !0, fallbackPlacements: h, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: _ = !0, ...E } = Ao(t, e);
13211
13211
  if ((n = o.arrow) != null && n.alignmentOffset) return {};
13212
13212
  const A = Er(i), g = wn(a), S = Er(a) === a, O = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), D = h || (S || !_ ? [Ho(a)] : (function(b) {
13213
- const L = Ho(b);
13214
- return [ac(b), L, ac(L)];
13213
+ const k = Ho(b);
13214
+ return [ac(b), k, ac(k)];
13215
13215
  })(a)), I = m !== "none";
13216
13216
  !h && I && D.push(...qD(a, _, m, O));
13217
13217
  const R = [a, ...D], y = await Ts(e, E), v = [];
13218
13218
  let T = ((r = o.flip) == null ? void 0 : r.overflows) || [];
13219
13219
  if (c && v.push(y[A]), d) {
13220
- const b = (function(L, x, M) {
13220
+ const b = (function(k, x, M) {
13221
13221
  M === void 0 && (M = !1);
13222
- const U = ta(L), V = W_(L), $ = G_(V);
13222
+ const U = ta(k), V = W_(k), $ = G_(V);
13223
13223
  let Y = V === "x" ? U === (M ? "end" : "start") ? "right" : "left" : U === "start" ? "bottom" : "top";
13224
13224
  return x.reference[$] > x.floating[$] && (Y = Ho(Y)), [Y, Ho(Y)];
13225
13225
  })(i, s, O);
@@ -13227,20 +13227,20 @@ const uT = function(t) {
13227
13227
  }
13228
13228
  if (T = [...T, { placement: i, overflows: v }], !v.every((b) => b <= 0)) {
13229
13229
  var C, N;
13230
- const b = (((C = o.flip) == null ? void 0 : C.index) || 0) + 1, L = R[b];
13231
- if (L && (!(d === "alignment" && g !== wn(L)) || T.every((M) => wn(M.placement) !== g || M.overflows[0] > 0)))
13232
- return { data: { index: b, overflows: T }, reset: { placement: L } };
13230
+ const b = (((C = o.flip) == null ? void 0 : C.index) || 0) + 1, k = R[b];
13231
+ if (k && (!(d === "alignment" && g !== wn(k)) || T.every((M) => wn(M.placement) !== g || M.overflows[0] > 0)))
13232
+ return { data: { index: b, overflows: T }, reset: { placement: k } };
13233
13233
  let x = (N = T.filter((M) => M.overflows[0] <= 0).sort((M, U) => M.overflows[1] - U.overflows[1])[0]) == null ? void 0 : N.placement;
13234
13234
  if (!x) switch (p) {
13235
13235
  case "bestFit": {
13236
- var k;
13237
- const M = (k = T.filter((U) => {
13236
+ var L;
13237
+ const M = (L = T.filter((U) => {
13238
13238
  if (I) {
13239
13239
  const V = wn(U.placement);
13240
13240
  return V === g || V === "y";
13241
13241
  }
13242
13242
  return !0;
13243
- }).map((U) => [U.placement, U.overflows.filter((V) => V > 0).reduce((V, $) => V + $, 0)]).sort((U, V) => U[1] - V[1])[0]) == null ? void 0 : k[0];
13243
+ }).map((U) => [U.placement, U.overflows.filter((V) => V > 0).reduce((V, $) => V + $, 0)]).sort((U, V) => U[1] - V[1])[0]) == null ? void 0 : L[0];
13244
13244
  M && (x = M);
13245
13245
  break;
13246
13246
  }
@@ -13256,12 +13256,12 @@ const uT = function(t) {
13256
13256
  const { rects: n } = e, { strategy: r = "referenceHidden", ...i } = Ao(t, e);
13257
13257
  switch (r) {
13258
13258
  case "referenceHidden": {
13259
- const o = kp(await Ts(e, { ...i, elementContext: "reference" }), n.reference);
13260
- return { data: { referenceHiddenOffsets: o, referenceHidden: Lp(o) } };
13259
+ const o = Lp(await Ts(e, { ...i, elementContext: "reference" }), n.reference);
13260
+ return { data: { referenceHiddenOffsets: o, referenceHidden: kp(o) } };
13261
13261
  }
13262
13262
  case "escaped": {
13263
- const o = kp(await Ts(e, { ...i, altBoundary: !0 }), n.floating);
13264
- return { data: { escapedOffsets: o, escaped: Lp(o) } };
13263
+ const o = Lp(await Ts(e, { ...i, altBoundary: !0 }), n.floating);
13264
+ return { data: { escapedOffsets: o, escaped: kp(o) } };
13265
13265
  }
13266
13266
  default:
13267
13267
  return {};
@@ -13323,7 +13323,7 @@ function tA(t) {
13323
13323
  U !== I.current && (I.current = U, _(U));
13324
13324
  }, []), S = q((U) => {
13325
13325
  U !== R.current && (R.current = U, A(U));
13326
- }, []), O = o || m, D = s || E, I = X(null), R = X(null), y = X(c), v = l != null, T = ll(l), C = ll(i), N = ll(u), k = q(() => {
13326
+ }, []), O = o || m, D = s || E, I = X(null), R = X(null), y = X(c), v = l != null, T = ll(l), C = ll(i), N = ll(u), L = q(() => {
13327
13327
  if (!I.current || !R.current) return;
13328
13328
  const U = { placement: e, strategy: n, middleware: h };
13329
13329
  C.current && (U.platform = C.current), fT(I.current, R.current, U).then((V) => {
@@ -13341,17 +13341,17 @@ function tA(t) {
13341
13341
  b.current = !1;
13342
13342
  }), []), qo(() => {
13343
13343
  if (O && (I.current = O), D && (R.current = D), O && D) {
13344
- if (T.current) return T.current(O, D, k);
13345
- k();
13344
+ if (T.current) return T.current(O, D, L);
13345
+ L();
13346
13346
  }
13347
- }, [O, D, k, T, v]);
13348
- const L = Z(() => ({ reference: I, floating: R, setReference: g, setFloating: S }), [g, S]), x = Z(() => ({ reference: O, floating: D }), [O, D]), M = Z(() => {
13347
+ }, [O, D, L, T, v]);
13348
+ const k = Z(() => ({ reference: I, floating: R, setReference: g, setFloating: S }), [g, S]), x = Z(() => ({ reference: O, floating: D }), [O, D]), M = Z(() => {
13349
13349
  const U = { position: n, left: 0, top: 0 };
13350
13350
  if (!x.floating) return U;
13351
13351
  const V = Hp(x.floating, c.x), $ = Hp(x.floating, c.y);
13352
13352
  return a ? { ...U, transform: "translate(" + V + "px, " + $ + "px)", ...eA(x.floating) >= 1.5 && { willChange: "transform" } } : { position: n, left: V, top: $ };
13353
13353
  }, [n, a, x.floating, c.x, c.y]);
13354
- return Z(() => ({ ...c, update: k, refs: L, elements: x, floatingStyles: M }), [c, k, L, x, M]);
13354
+ return Z(() => ({ ...c, update: L, refs: k, elements: x, floatingStyles: M }), [c, L, k, x, M]);
13355
13355
  }
13356
13356
  const mT = (t, e) => ({ ...dT(t), options: [t, e] }), nA = (t, e) => ({ ...hT(t), options: [t, e] }), ET = (t, e) => ({ ...pT(t), options: [t, e] });
13357
13357
  var rA = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], Cs = rA.join(","), iA = typeof Element == "undefined", Ar = iA ? function() {
@@ -13725,7 +13725,7 @@ var hn = { getActiveTrap: function(t) {
13725
13725
  return (t == null ? void 0 : t.key) === "Tab" || (t == null ? void 0 : t.keyCode) === 9;
13726
13726
  }, wT = function(t) {
13727
13727
  return Pi(t) && !t.shiftKey;
13728
- }, kT = function(t) {
13728
+ }, LT = function(t) {
13729
13729
  return Pi(t) && t.shiftKey;
13730
13730
  }, Kp = function(t) {
13731
13731
  return setTimeout(t, 0);
@@ -13734,28 +13734,28 @@ var hn = { getActiveTrap: function(t) {
13734
13734
  return typeof t == "function" ? t.apply(void 0, n) : t;
13735
13735
  }, Bo = function(t) {
13736
13736
  return t.target.shadowRoot && typeof t.composedPath == "function" ? t.composedPath()[0] : t.target;
13737
- }, LT = [];
13737
+ }, kT = [];
13738
13738
  const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTrap: function(t, e) {
13739
- var n, r = (e == null ? void 0 : e.document) || document, i = (e == null ? void 0 : e.trapStack) || LT, o = Xp({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isolateSubtrees: !1, isKeyForward: wT, isKeyBackward: kT }, e), s = { containers: [], containerGroups: [], tabbableGroups: [], adjacentElements: /* @__PURE__ */ new Set(), alreadyInert: /* @__PURE__ */ new Set(), nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, a = function(v, T, C) {
13739
+ var n, r = (e == null ? void 0 : e.document) || document, i = (e == null ? void 0 : e.trapStack) || kT, o = Xp({ returnFocusOnDeactivate: !0, escapeDeactivates: !0, delayInitialFocus: !0, isolateSubtrees: !1, isKeyForward: wT, isKeyBackward: LT }, e), s = { containers: [], containerGroups: [], tabbableGroups: [], adjacentElements: /* @__PURE__ */ new Set(), alreadyInert: /* @__PURE__ */ new Set(), nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1, manuallyPaused: !1, delayInitialFocusTimer: void 0, recentNavEvent: void 0 }, a = function(v, T, C) {
13740
13740
  return v && v[T] !== void 0 ? v[T] : o[C || T];
13741
13741
  }, l = function(v, T) {
13742
13742
  var C = typeof (T == null ? void 0 : T.composedPath) == "function" ? T.composedPath() : void 0;
13743
13743
  return s.containerGroups.findIndex(function(N) {
13744
- var k = N.container, b = N.tabbableNodes;
13745
- return k.contains(v) || (C == null ? void 0 : C.includes(k)) || b.find(function(L) {
13746
- return L === v;
13744
+ var L = N.container, b = N.tabbableNodes;
13745
+ return L.contains(v) || (C == null ? void 0 : C.includes(L)) || b.find(function(k) {
13746
+ return k === v;
13747
13747
  });
13748
13748
  });
13749
13749
  }, u = function(v) {
13750
- var T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, C = T.hasFallback, N = C !== void 0 && C, k = T.params, b = k === void 0 ? [] : k, L = o[v];
13751
- if (typeof L == "function" && (L = L.apply(void 0, bT(b))), L === !0 && (L = void 0), !L) {
13752
- if (L === void 0 || L === !1) return L;
13750
+ var T = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, C = T.hasFallback, N = C !== void 0 && C, L = T.params, b = L === void 0 ? [] : L, k = o[v];
13751
+ if (typeof k == "function" && (k = k.apply(void 0, bT(b))), k === !0 && (k = void 0), !k) {
13752
+ if (k === void 0 || k === !1) return k;
13753
13753
  throw new Error("`".concat(v, "` was specified but was not a node, or did not return a node"));
13754
13754
  }
13755
- var x = L;
13756
- if (typeof L == "string") {
13755
+ var x = k;
13756
+ if (typeof k == "string") {
13757
13757
  try {
13758
- x = r.querySelector(L);
13758
+ x = r.querySelector(k);
13759
13759
  } catch (M) {
13760
13760
  throw new Error("`".concat(v, '` appears to be an invalid selector; error="').concat(M.message, '"'));
13761
13761
  }
@@ -13775,14 +13775,14 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13775
13775
  return v;
13776
13776
  }, d = function() {
13777
13777
  if (s.containerGroups = s.containers.map(function(v) {
13778
- var T = ia(v, o.tabbableOptions), C = oa(v, o.tabbableOptions), N = T.length > 0 ? T[0] : void 0, k = T.length > 0 ? T[T.length - 1] : void 0, b = C.find(function(M) {
13778
+ var T = ia(v, o.tabbableOptions), C = oa(v, o.tabbableOptions), N = T.length > 0 ? T[0] : void 0, L = T.length > 0 ? T[T.length - 1] : void 0, b = C.find(function(M) {
13779
13779
  return Xn(M);
13780
- }), L = C.slice().reverse().find(function(M) {
13780
+ }), k = C.slice().reverse().find(function(M) {
13781
13781
  return Xn(M);
13782
13782
  }), x = !!T.find(function(M) {
13783
13783
  return yn(M) > 0;
13784
13784
  });
13785
- return { container: v, tabbableNodes: T, focusableNodes: C, posTabIndexesFound: x, firstTabbableNode: N, lastTabbableNode: k, firstDomTabbableNode: b, lastDomTabbableNode: L, nextTabbableNode: function(M) {
13785
+ return { container: v, tabbableNodes: T, focusableNodes: C, posTabIndexesFound: x, firstTabbableNode: N, lastTabbableNode: L, firstDomTabbableNode: b, lastDomTabbableNode: k, nextTabbableNode: function(M) {
13786
13786
  var U = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1], V = T.indexOf(M);
13787
13787
  return V < 0 ? U ? C.slice(C.indexOf(M) + 1).find(function($) {
13788
13788
  return Xn($);
@@ -13807,18 +13807,18 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13807
13807
  var T = u("setReturnFocus", { params: [v] });
13808
13808
  return T || T !== !1 && v;
13809
13809
  }, _ = function(v) {
13810
- var T = v.target, C = v.event, N = v.isBackward, k = N !== void 0 && N;
13810
+ var T = v.target, C = v.event, N = v.isBackward, L = N !== void 0 && N;
13811
13811
  T = T || Bo(C), d();
13812
13812
  var b = null;
13813
13813
  if (s.tabbableGroups.length > 0) {
13814
- var L = l(T, C), x = L >= 0 ? s.containerGroups[L] : void 0;
13815
- if (L < 0) b = k ? s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : s.tabbableGroups[0].firstTabbableNode;
13816
- else if (k) {
13814
+ var k = l(T, C), x = k >= 0 ? s.containerGroups[k] : void 0;
13815
+ if (k < 0) b = L ? s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : s.tabbableGroups[0].firstTabbableNode;
13816
+ else if (L) {
13817
13817
  var M = s.tabbableGroups.findIndex(function(le) {
13818
13818
  var ce = le.firstTabbableNode;
13819
13819
  return T === ce;
13820
13820
  });
13821
- if (M < 0 && (x.container === T || Zo(T, o.tabbableOptions) && !Xn(T, o.tabbableOptions) && !x.nextTabbableNode(T, !1)) && (M = L), M >= 0) {
13821
+ if (M < 0 && (x.container === T || Zo(T, o.tabbableOptions) && !Xn(T, o.tabbableOptions) && !x.nextTabbableNode(T, !1)) && (M = k), M >= 0) {
13822
13822
  var U = M === 0 ? s.tabbableGroups.length - 1 : M - 1, V = s.tabbableGroups[U];
13823
13823
  b = yn(T) >= 0 ? V.lastTabbableNode : V.lastDomTabbableNode;
13824
13824
  } else Pi(C) || (b = x.nextTabbableNode(T, !1));
@@ -13827,7 +13827,7 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13827
13827
  var ce = le.lastTabbableNode;
13828
13828
  return T === ce;
13829
13829
  });
13830
- if ($ < 0 && (x.container === T || Zo(T, o.tabbableOptions) && !Xn(T, o.tabbableOptions) && !x.nextTabbableNode(T)) && ($ = L), $ >= 0) {
13830
+ if ($ < 0 && (x.container === T || Zo(T, o.tabbableOptions) && !Xn(T, o.tabbableOptions) && !x.nextTabbableNode(T)) && ($ = k), $ >= 0) {
13831
13831
  var Y = $ === s.tabbableGroups.length - 1 ? 0 : $ + 1, oe = s.tabbableGroups[Y];
13832
13832
  b = yn(T) >= 0 ? oe.firstTabbableNode : oe.firstDomTabbableNode;
13833
13833
  } else Pi(C) || (b = x.nextTabbableNode(T));
@@ -13843,22 +13843,22 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13843
13843
  else {
13844
13844
  var N;
13845
13845
  v.stopImmediatePropagation();
13846
- var k = !0;
13846
+ var L = !0;
13847
13847
  if (s.mostRecentlyFocusedNode) if (yn(s.mostRecentlyFocusedNode) > 0) {
13848
- var b = l(s.mostRecentlyFocusedNode), L = s.containerGroups[b].tabbableNodes;
13849
- if (L.length > 0) {
13850
- var x = L.findIndex(function(M) {
13848
+ var b = l(s.mostRecentlyFocusedNode), k = s.containerGroups[b].tabbableNodes;
13849
+ if (k.length > 0) {
13850
+ var x = k.findIndex(function(M) {
13851
13851
  return M === s.mostRecentlyFocusedNode;
13852
13852
  });
13853
- x >= 0 && (o.isKeyForward(s.recentNavEvent) ? x + 1 < L.length && (N = L[x + 1], k = !1) : x - 1 >= 0 && (N = L[x - 1], k = !1));
13853
+ x >= 0 && (o.isKeyForward(s.recentNavEvent) ? x + 1 < k.length && (N = k[x + 1], L = !1) : x - 1 >= 0 && (N = k[x - 1], L = !1));
13854
13854
  }
13855
13855
  } else s.containerGroups.some(function(M) {
13856
13856
  return M.tabbableNodes.some(function(U) {
13857
13857
  return yn(U) > 0;
13858
13858
  });
13859
- }) || (k = !1);
13860
- else k = !1;
13861
- k && (N = _({ target: s.mostRecentlyFocusedNode, isBackward: o.isKeyBackward(s.recentNavEvent) })), p(N || s.mostRecentlyFocusedNode || c());
13859
+ }) || (L = !1);
13860
+ else L = !1;
13861
+ L && (N = _({ target: s.mostRecentlyFocusedNode, isBackward: o.isKeyBackward(s.recentNavEvent) })), p(N || s.mostRecentlyFocusedNode || c());
13862
13862
  }
13863
13863
  s.recentNavEvent = void 0;
13864
13864
  }, g = function(v) {
@@ -13898,31 +13898,31 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13898
13898
  return s.paused;
13899
13899
  }, activate: function(v) {
13900
13900
  if (s.active) return this;
13901
- var T = a(v, "onActivate"), C = a(v, "onPostActivate"), N = a(v, "checkCanFocusTrap"), k = hn.getActiveTrap(i), b = !1;
13902
- k && !k.paused && (k._setSubtreeIsolation(!1), b = !0);
13901
+ var T = a(v, "onActivate"), C = a(v, "onPostActivate"), N = a(v, "checkCanFocusTrap"), L = hn.getActiveTrap(i), b = !1;
13902
+ L && !L.paused && (L._setSubtreeIsolation(!1), b = !0);
13903
13903
  try {
13904
13904
  N || d(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = h(r), T == null || T();
13905
- var L = function() {
13905
+ var k = function() {
13906
13906
  N && d(), D(), y(), o.isolateSubtrees && n._setSubtreeIsolation(!0), C == null || C();
13907
13907
  };
13908
- if (N) return N(s.containers.concat()).then(L, L), this;
13909
- L();
13908
+ if (N) return N(s.containers.concat()).then(k, k), this;
13909
+ k();
13910
13910
  } catch (x) {
13911
- throw k === hn.getActiveTrap(i) && b && k._setSubtreeIsolation(!0), x;
13911
+ throw L === hn.getActiveTrap(i) && b && L._setSubtreeIsolation(!0), x;
13912
13912
  }
13913
13913
  return this;
13914
13914
  }, deactivate: function(v) {
13915
13915
  if (!s.active) return this;
13916
13916
  var T = Xp({ onDeactivate: o.onDeactivate, onPostDeactivate: o.onPostDeactivate, checkCanReturnFocus: o.checkCanReturnFocus }, v);
13917
13917
  clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, s.paused || n._setSubtreeIsolation(!1), s.alreadyInert.clear(), I(), s.active = !1, s.paused = !1, y(), hn.deactivateTrap(i, n);
13918
- var C = a(T, "onDeactivate"), N = a(T, "onPostDeactivate"), k = a(T, "checkCanReturnFocus"), b = a(T, "returnFocus", "returnFocusOnDeactivate");
13918
+ var C = a(T, "onDeactivate"), N = a(T, "onPostDeactivate"), L = a(T, "checkCanReturnFocus"), b = a(T, "returnFocus", "returnFocusOnDeactivate");
13919
13919
  C == null || C();
13920
- var L = function() {
13920
+ var k = function() {
13921
13921
  Kp(function() {
13922
13922
  b && p(m(s.nodeFocusedBeforeActivation)), N == null || N();
13923
13923
  });
13924
13924
  };
13925
- return b && k ? (k(m(s.nodeFocusedBeforeActivation)).then(L, L), this) : (L(), this);
13925
+ return b && L ? (L(m(s.nodeFocusedBeforeActivation)).then(k, k), this) : (k(), this);
13926
13926
  }, pause: function(v) {
13927
13927
  return s.active ? (s.manuallyPaused = !0, this._setPausedState(!0, v)) : this;
13928
13928
  }, unpause: function(v) {
@@ -13933,13 +13933,13 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13933
13933
  return typeof C == "string" ? r.querySelector(C) : C;
13934
13934
  }), o.isolateSubtrees && (function(C) {
13935
13935
  s.active && !s.paused && n._setSubtreeIsolation(!1), s.adjacentElements.clear(), s.alreadyInert.clear();
13936
- var N, k = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), L = Gp(C);
13936
+ var N, L = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set(), k = Gp(C);
13937
13937
  try {
13938
- for (L.s(); !(N = L.n()).done; ) {
13938
+ for (k.s(); !(N = k.n()).done; ) {
13939
13939
  var x = N.value;
13940
- k.add(x);
13940
+ L.add(x);
13941
13941
  for (var M = typeof ShadowRoot != "undefined" && x.getRootNode() instanceof ShadowRoot, U = x; U; ) {
13942
- k.add(U);
13942
+ L.add(U);
13943
13943
  var V = U.parentElement, $ = [];
13944
13944
  V ? $ = V.children : !V && M && ($ = U.getRootNode().children, V = U.getRootNode().host, M = typeof ShadowRoot != "undefined" && V.getRootNode() instanceof ShadowRoot);
13945
13945
  var Y, oe = Gp($);
@@ -13957,11 +13957,11 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13957
13957
  }
13958
13958
  }
13959
13959
  } catch (ce) {
13960
- L.e(ce);
13960
+ k.e(ce);
13961
13961
  } finally {
13962
- L.f();
13962
+ k.f();
13963
13963
  }
13964
- k.forEach(function(ce) {
13964
+ L.forEach(function(ce) {
13965
13965
  b.delete(ce);
13966
13966
  }), s.adjacentElements = b;
13967
13967
  })(s.containers), s.active && (d(), o.isolateSubtrees && !s.paused && n._setSubtreeIsolation(!0)), y(), this;
@@ -13973,8 +13973,8 @@ const MT = Object.freeze(Object.defineProperty({ __proto__: null, createFocusTra
13973
13973
  var C = a(T, "onPause"), N = a(T, "onPostPause");
13974
13974
  C == null || C(), I(), y(), n._setSubtreeIsolation(!1), N == null || N();
13975
13975
  } else {
13976
- var k = a(T, "onUnpause"), b = a(T, "onPostUnpause");
13977
- k == null || k(), n._setSubtreeIsolation(!0), d(), D(), y(), b == null || b();
13976
+ var L = a(T, "onUnpause"), b = a(T, "onPostUnpause");
13977
+ L == null || L(), n._setSubtreeIsolation(!0), d(), D(), y(), b == null || b();
13978
13978
  }
13979
13979
  return this;
13980
13980
  } }, _setSubtreeIsolation: { value: function(v) {
@@ -14300,7 +14300,7 @@ function ws(t) {
14300
14300
  const jT = { barHeight: 4, barRadius: 2, barGap: 2, barWidth: 2, height: 24 }, dl = { state: null, duration: 0, recordingUrl: void 0, uploadState: "done", fileToken: void 0 }, _A = /* @__PURE__ */ new WeakMap();
14301
14301
  function AA({ className: t, voiceRecorder: e }) {
14302
14302
  const n = _A.get(e);
14303
- return n ? f("div", { className: t, style: { shapeRendering: "crispEdges" }, ref: n }) : (Ce.warn("Can only use Waveform component if a voice recorder is active"), null);
14303
+ return n ? f("div", { className: t, style: { shapeRendering: "crispEdges" }, ref: n }) : (Te.warn("Can only use Waveform component if a voice recorder is active"), null);
14304
14304
  }
14305
14305
  function gA(t, e) {
14306
14306
  return t.map((r) => (function(i, o) {
@@ -14308,14 +14308,14 @@ function gA(t, e) {
14308
14308
  const l = lu(a);
14309
14309
  return Qo(s, l);
14310
14310
  })(i.children, o);
14311
- if (i.type === "file" && i.subtype === "video") return `🎥 ${Lo(i.url)}`;
14312
- if (i.type === "file" && i.subtype === "image") return `📷 ${Lo(i.url)}`;
14313
- if (i.type === "file" && i.subtype === "audio") return `🎧 ${Lo(i.url)}`;
14311
+ if (i.type === "file" && i.subtype === "video") return `🎥 ${ko(i.url)}`;
14312
+ if (i.type === "file" && i.subtype === "image") return `📷 ${ko(i.url)}`;
14313
+ if (i.type === "file" && i.subtype === "audio") return `🎧 ${ko(i.url)}`;
14314
14314
  if (i.type === "file" && i.subtype === "voice") {
14315
14315
  const s = i.duration;
14316
14316
  return s === void 0 ? "🎙️" : `🎙️ (${Math.floor(s / 60)}:${Math.floor(s % 60).toString().padStart(2, "0")})`;
14317
14317
  }
14318
- return i.type === "file" ? (i.subtype, `📎 ${Lo(i.url)}`) : i.type === "location" ? "📍" : "";
14318
+ return i.type === "file" ? (i.subtype, `📎 ${ko(i.url)}`) : i.type === "location" ? "📍" : "";
14319
14319
  })(r, e)).join(`
14320
14320
 
14321
14321
  `);
@@ -14384,7 +14384,7 @@ function Pt(t) {
14384
14384
  function VT(t, e) {
14385
14385
  return ZE(t, e);
14386
14386
  }
14387
- function Ln(t) {
14387
+ function kn(t) {
14388
14388
  return t < 1024 ? t + " B" : t < 1048576 ? Math.floor(t / 1024) + " KB" : t < 1073741824 ? Math.floor(t / 1048576) + " MB" : t < 1099511627776 ? Math.floor(t / 1073741824) + " GB" : Math.floor(t / 1099511627776) + " TB";
14389
14389
  }
14390
14390
  function mu({ latitude: t, longitude: e }) {
@@ -14503,28 +14503,28 @@ function cr({ src: t, onError: e, filename: n, className: r = "" }) {
14503
14503
  o.current = new Audio();
14504
14504
  const v = { normalize: !0, height: S, container: i.current };
14505
14505
  function T() {
14506
- const k = o.current;
14507
- if (!k) return;
14508
- const b = k.error;
14509
- (b.message !== "Media failed to load" || k.paused) && (b.message === "PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed" ? (k.load(), l(!1)) : (_(!0), l(!1), e == null || e()));
14506
+ const L = o.current;
14507
+ if (!L) return;
14508
+ const b = L.error;
14509
+ (b.message !== "Media failed to load" || L.paused) && (b.message === "PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed" ? (L.load(), l(!1)) : (_(!0), l(!1), e == null || e()));
14510
14510
  }
14511
14511
  const C = g.slice(g.lastIndexOf(".") + 1);
14512
- if ((function(k) {
14513
- return /(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(k);
14512
+ if ((function(L) {
14513
+ return /(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(L);
14514
14514
  })(g) && C === "webm" && !o.current.canPlayType("audio/webm;codecs=opus")) v.backend = "WebAudio", s.current = new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"), s.current.controls = !1;
14515
14515
  else {
14516
- const k = o.current;
14517
- k.addEventListener("error", T), k.preservesPitch = !0, v.url = A.toString(), v.media = k;
14516
+ const L = o.current;
14517
+ L.addEventListener("error", T), L.preservesPitch = !0, v.url = A.toString(), v.media = L;
14518
14518
  }
14519
14519
  p.current = RA(v);
14520
14520
  const N = p.current;
14521
14521
  return N.on("finish", () => {
14522
14522
  o.current.loop = !0, l(!1);
14523
- }), N.on("ready", (k) => c(Math.trunc(k))), N.on("timeupdate", (k) => c(Math.trunc(k))), v.backend === "WebAudio" && N.load(A.toString()).catch(() => {
14523
+ }), N.on("ready", (L) => c(Math.trunc(L))), N.on("timeupdate", (L) => c(Math.trunc(L))), v.backend === "WebAudio" && N.load(A.toString()).catch(() => {
14524
14524
  _(!0), l(!1), e == null || e();
14525
14525
  }), () => {
14526
- var k, b;
14527
- (k = o.current) == null || k.pause(), (b = o.current) == null || b.removeEventListener("error", T), o.current = void 0, N.destroy(), p.current = void 0;
14526
+ var L, b;
14527
+ (L = o.current) == null || L.pause(), (b = o.current) == null || b.removeEventListener("error", T), o.current = void 0, N.destroy(), p.current = void 0;
14528
14528
  };
14529
14529
  }, [A, g, e, D, S]);
14530
14530
  const R = q(() => {
@@ -14835,12 +14835,12 @@ var of, sf = { exports: {} }, ZT = (of || (of = 1, sf.exports = (function(t) {
14835
14835
  if (typeof Symbol != "undefined" && Symbol.iterator in Object(I)) {
14836
14836
  var y = [], v = !0, T = !1, C = void 0;
14837
14837
  try {
14838
- for (var N, k = I[Symbol.iterator](); !(v = (N = k.next()).done) && (y.push(N.value), !R || y.length !== R); v = !0) ;
14838
+ for (var N, L = I[Symbol.iterator](); !(v = (N = L.next()).done) && (y.push(N.value), !R || y.length !== R); v = !0) ;
14839
14839
  } catch (b) {
14840
14840
  T = !0, C = b;
14841
14841
  } finally {
14842
14842
  try {
14843
- v || k.return == null || k.return();
14843
+ v || L.return == null || L.return();
14844
14844
  } finally {
14845
14845
  if (T) throw C;
14846
14846
  }
@@ -14915,10 +14915,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
14915
14915
  })(v, O);
14916
14916
  var D, I, R, y = c(v);
14917
14917
  function v(T) {
14918
- var C, N = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
14918
+ var C, N = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, L = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
14919
14919
  a(this, v);
14920
- var b = N.mimeType, L = N.audioBitsPerSecond, x = (N.videoBitsPerSecond, N.bitsPerSecond), M = k.encoderWorkerFactory, U = k.OggOpusEncoderWasmPath, V = k.WebMOpusEncoderWasmPath;
14921
- if ((C = y.call(this))._stream = T, C._state = "inactive", C._mimeType = b || "", C._audioBitsPerSecond = L || x, C.workerState = "inactive", !v.isTypeSupported(C._mimeType)) throw new TypeError("invalid arguments, a MIME Type is not supported");
14920
+ var b = N.mimeType, k = N.audioBitsPerSecond, x = (N.videoBitsPerSecond, N.bitsPerSecond), M = L.encoderWorkerFactory, U = L.OggOpusEncoderWasmPath, V = L.WebMOpusEncoderWasmPath;
14921
+ if ((C = y.call(this))._stream = T, C._state = "inactive", C._mimeType = b || "", C._audioBitsPerSecond = k || x, C.workerState = "inactive", !v.isTypeSupported(C._mimeType)) throw new TypeError("invalid arguments, a MIME Type is not supported");
14922
14922
  switch (v._parseType(C._mimeType).subtype) {
14923
14923
  case "wave":
14924
14924
  case "wav":
@@ -14966,12 +14966,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
14966
14966
  return D = v, R = [{ key: "isTypeSupported", value: function(T) {
14967
14967
  if (typeof T == "string" && !T) return !0;
14968
14968
  try {
14969
- var C = v._parseType(T), N = C.type, k = C.subtype, b = C.codec;
14970
- } catch (L) {
14969
+ var C = v._parseType(T), N = C.type, L = C.subtype, b = C.codec;
14970
+ } catch (k) {
14971
14971
  return !1;
14972
14972
  }
14973
- if (N !== "audio" || k !== "ogg" && k !== "webm" && k !== "wave" && k !== "wav") return !1;
14974
- switch (k) {
14973
+ if (N !== "audio" || L !== "ogg" && L !== "webm" && L !== "wave" && L !== "wav") return !1;
14974
+ switch (L) {
14975
14975
  case "ogg":
14976
14976
  case "webm":
14977
14977
  if (b !== "opus" && b) return !1;
@@ -14983,11 +14983,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
14983
14983
  return !0;
14984
14984
  } }, { key: "_parseType", value: function(T) {
14985
14985
  try {
14986
- var C = o(T.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/), 5), N = C[1], k = C[2], b = C[4];
14987
- } catch (L) {
14986
+ var C = o(T.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/), 5), N = C[1], L = C[2], b = C[4];
14987
+ } catch (k) {
14988
14988
  return typeof T != "string" || T ? null : { type: "", subtype: "", codec: "" };
14989
14989
  }
14990
- return { type: N, subtype: k, codec: b };
14990
+ return { type: N, subtype: L, codec: b };
14991
14991
  } }], (I = [{ key: "_spawnWorker", value: function() {
14992
14992
  var T = this;
14993
14993
  this.worker = this._workerFactory(), this.worker.onmessage = function(C) {
@@ -14999,12 +14999,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
14999
14999
  var C = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
15000
15000
  switch (T) {
15001
15001
  case "loadEncoder":
15002
- var N = C.mimeType, k = C.wasmPath;
15003
- this.worker.postMessage({ command: T, mimeType: N, wasmPath: k });
15002
+ var N = C.mimeType, L = C.wasmPath;
15003
+ this.worker.postMessage({ command: T, mimeType: N, wasmPath: L });
15004
15004
  break;
15005
15005
  case "init":
15006
- var b = C.sampleRate, L = C.channelCount, x = C.bitsPerSecond;
15007
- this.worker.postMessage({ command: T, sampleRate: b, channelCount: L, bitsPerSecond: x }), this.workerState = "encoding", this.source.connect(this.processor), this.processor.connect(this.context.destination);
15006
+ var b = C.sampleRate, k = C.channelCount, x = C.bitsPerSecond;
15007
+ this.worker.postMessage({ command: T, sampleRate: b, channelCount: k, bitsPerSecond: x }), this.workerState = "encoding", this.source.connect(this.processor), this.processor.connect(this.context.destination);
15008
15008
  var M = new r.Event("start");
15009
15009
  this.dispatchEvent(M);
15010
15010
  break;
@@ -15020,16 +15020,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
15020
15020
  throw new Error("Internal Error: Incorrect postMessage requested.");
15021
15021
  }
15022
15022
  } }, { key: "_onmessageFromWorker", value: function(T) {
15023
- var C, N = T.data, k = N.command, b = N.buffers;
15024
- switch (k) {
15023
+ var C, N = T.data, L = N.command, b = N.buffers;
15024
+ switch (L) {
15025
15025
  case "readyToInit":
15026
- var L = this.sampleRate, x = this.channelCount;
15027
- this.workerState = "readyToInit", this.state === "recording" && this._postMessageToWorker("init", { sampleRate: L, channelCount: x, bitsPerSecond: this.audioBitsPerSecond });
15026
+ var k = this.sampleRate, x = this.channelCount;
15027
+ this.workerState = "readyToInit", this.state === "recording" && this._postMessageToWorker("init", { sampleRate: k, channelCount: x, bitsPerSecond: this.audioBitsPerSecond });
15028
15028
  break;
15029
15029
  case "encodedData":
15030
15030
  case "lastEncodedData":
15031
15031
  var M = new Blob(b, { type: this._mimeType });
15032
- (C = new r.Event("dataavailable")).data = M, this.dispatchEvent(C), k === "lastEncodedData" && (C = new r.Event("stop"), this.dispatchEvent(C), this.workerState = "closed");
15032
+ (C = new r.Event("dataavailable")).data = M, this.dispatchEvent(C), L === "lastEncodedData" && (C = new r.Event("stop"), this.dispatchEvent(C), this.workerState = "closed");
15033
15033
  }
15034
15034
  } }, { key: "_onerrorFromWorker", value: function(T) {
15035
15035
  this.source.disconnect(), this.processor.disconnect(), this.worker.terminate(), this.workerState = "closed";
@@ -15037,9 +15037,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
15037
15037
  N.name = "UnknownError", N.message = C, this.dispatchEvent(N);
15038
15038
  } }, { key: "_enableAudioProcessCallback", value: function(T) {
15039
15039
  var C = this, N = 0;
15040
- this.processor.onaudioprocess = function(k) {
15041
- for (var b = k.inputBuffer, L = (k.playbackTime, b.sampleRate, b.length), x = b.duration, M = b.numberOfChannels, U = new Array(M), V = 0; V < M; V++) U[V] = b.getChannelData(V);
15042
- var $ = { channelBuffers: U, length: L, duration: x };
15040
+ this.processor.onaudioprocess = function(L) {
15041
+ for (var b = L.inputBuffer, k = (L.playbackTime, b.sampleRate, b.length), x = b.duration, M = b.numberOfChannels, U = new Array(M), V = 0; V < M; V++) U[V] = b.getChannelData(V);
15042
+ var $ = { channelBuffers: U, length: k, duration: x };
15043
15043
  C._postMessageToWorker("pushInputData", $), (N += x) >= T && (C._postMessageToWorker("getEncodedData"), N = 0);
15044
15044
  };
15045
15045
  } }, { key: "start", value: function() {
@@ -15050,8 +15050,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
15050
15050
  var C = this.stream.getAudioTracks();
15051
15051
  if (!C[0]) throw new Error("DOMException: UnkownError, media track not found.");
15052
15052
  if (this.channelCount = C[0].getSettings().channelCount || 1, this.sampleRate = this.context.sampleRate, this.source = this.context.createMediaStreamSource(this.stream), this.processor = this.context.createScriptProcessor(4096, this.channelCount, this.channelCount), this._state = "recording", this._enableAudioProcessCallback(T), this.workerState === "readyToInit") {
15053
- var N = this.sampleRate, k = this.channelCount;
15054
- this._postMessageToWorker("init", { sampleRate: N, channelCount: k, bitsPerSecond: this.audioBitsPerSecond });
15053
+ var N = this.sampleRate, L = this.channelCount;
15054
+ this._postMessageToWorker("init", { sampleRate: N, channelCount: L, bitsPerSecond: this.audioBitsPerSecond });
15055
15055
  }
15056
15056
  } }, { key: "stop", value: function() {
15057
15057
  if (this.state === "inactive") throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");
@@ -16682,7 +16682,7 @@ function nR(t) {
16682
16682
  a.getAudioTracks().forEach((u) => {
16683
16683
  u.onmute = () => t.onStopRecording();
16684
16684
  }), tR && MediaRecorder.isTypeSupported(pl) ? o.current = new MediaRecorder(a, { mimeType: pl }) : o.current = new QT(a, { mimeType: pl }, { encoderWorkerFactory: () => new eR(), WebMOpusEncoderWasmPath: x_["opus-media-recorder-wasm"] }), o.current.onerror = (u) => {
16685
- Ce.error("[TalkJS] Unexpected error while recording audio: ", u);
16685
+ Te.error("[TalkJS] Unexpected error while recording audio: ", u);
16686
16686
  }, o.current.onstart = () => r.current = Date.now(), o.current.ondataavailable = (u) => {
16687
16687
  var c;
16688
16688
  if (!i.current) {
@@ -16697,8 +16697,8 @@ function nR(t) {
16697
16697
  function CA(t) {
16698
16698
  const e = Qe(), n = ae(), r = on(), i = J(n.referencedMessage$), o = J(n.state$.userPermissions), s = co(), { sendMessage: a } = iS(), { voiceRecorder: l, recordVoiceMessage: u, voiceRecorderControlsProps: c } = (function() {
16699
16699
  const p = ae(), m = ai(), _ = nS(), E = ct({ ...dl }), { state: A, duration: g, recordingUrl: S, uploadState: O, fileToken: D } = J(E), I = X(void 0), R = X(null), y = X(), v = q(() => _.runWithPermissionCheck("microphone", async (b) => {
16700
- const L = p.state$.currentConversation.peek();
16701
- if (L && L.access !== "Read") {
16700
+ const k = p.state$.currentConversation.peek();
16701
+ if (k && k.access !== "Read") {
16702
16702
  try {
16703
16703
  (await navigator.mediaDevices.getUserMedia({ audio: !0 })).getTracks().forEach((x) => x.stop()), b("granted");
16704
16704
  } catch (x) {
@@ -16713,21 +16713,21 @@ function CA(t) {
16713
16713
  y.current && (clearInterval(y.current), y.current = void 0), (b = I.current) == null || b.stop();
16714
16714
  }, []), C = q(() => {
16715
16715
  y.current && (clearInterval(y.current), y.current = void 0), E.assign(dl);
16716
- }, [E]), N = q((b, L) => {
16716
+ }, [E]), N = q((b, k) => {
16717
16717
  const x = URL.createObjectURL(new Blob([b])), M = b.size + "," + b.name;
16718
16718
  p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(M).set({ url: x, fetching: !1 });
16719
- const U = { duration: L, filename: b.name };
16719
+ const U = { duration: k, filename: b.name };
16720
16720
  E.assign({ state: "previewing", uploadState: "pending", recordingUrl: x + "?name=" + b.name }), m.uploadVoice(b, U).then((V) => {
16721
16721
  p.fileUploads[V] = { type: "voice", file: b, metadata: U, temporaryBlobUrl: x, state: "uploaded" }, E.assign({ uploadState: "done", fileToken: V });
16722
16722
  });
16723
- }, [m, E, p]), k = q(() => {
16723
+ }, [m, E, p]), L = q(() => {
16724
16724
  D && m.sendFileMessage({ fileToken: D }), E.assign(dl);
16725
16725
  }, [m, D, E]);
16726
16726
  return { voiceRecorder: Z(() => {
16727
16727
  if (!A) return;
16728
- const b = { state: A, duration: g, recordingUrl: S, uploadState: O, stop: T, cancel: C, send: k };
16728
+ const b = { state: A, duration: g, recordingUrl: S, uploadState: O, stop: T, cancel: C, send: L };
16729
16729
  return _A.set(b, R), b;
16730
- }, [A, g, S, O, T, C, k]), recordVoiceMessage: v, voiceRecorderControlsProps: Z(() => ({ onStopRecording: T, onSendRecording: N, recordingState: A, mediaRecorder: I, wavesurferOptions: jT, wavesurferContainer: R }), [T, N, A]) };
16730
+ }, [A, g, S, O, T, C, L]), recordVoiceMessage: v, voiceRecorderControlsProps: Z(() => ({ onStopRecording: T, onSendRecording: N, recordingState: A, mediaRecorder: I, wavesurferOptions: jT, wavesurferContainer: R }), [T, N, A]) };
16731
16731
  })(), d = J(ct(() => {
16732
16732
  const p = s.state$.get();
16733
16733
  return t.editMessageId === void 0 ? new Nd(p, a, t.attachFile, t.shareLocation, s.toggleEmojiPicker, u) : new Nd(p, t.onEditMessage, () => {
@@ -16855,16 +16855,16 @@ function sa({ appId: t, chatboxState: e }) {
16855
16855
  return z(() => {
16856
16856
  switch (e.type) {
16857
16857
  case "auth-failed":
16858
- Ce.error("Could not authenticate user. Check if you are authenticating correctly.");
16858
+ Te.error("Could not authenticate user. Check if you are authenticating correctly.");
16859
16859
  break;
16860
16860
  case "unknown-user":
16861
- Ce.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);
16861
+ Te.error(`User \`${e.userId}\` not found. Please verify that you synchronized this user's data with TalkJS, either using the JS SDK or through the REST API.`);
16862
16862
  break;
16863
16863
  case "unexpected-error":
16864
- Ce.error(e.error);
16864
+ Te.error(e.error);
16865
16865
  break;
16866
16866
  case "wrong-app-id":
16867
- Ce.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);
16867
+ Te.error(`Could not find given appId: "${e.appId}". You can find your appId on https://talkjs.com/dashboard.`);
16868
16868
  break;
16869
16869
  case "server-error":
16870
16870
  break;
@@ -16933,10 +16933,10 @@ function pR() {
16933
16933
  window.removeEventListener("keydown", p, !0);
16934
16934
  }), [p]);
16935
16935
  const m = e[o], _ = m.state === "error";
16936
- return f(wA, { className: "t-upload-preview", children: f("div", { className: "t-preview", children: [!_ && f(fR, { upload: m }, o), _ && f(ie, { children: [f("div", { className: "t-error-row", children: i.UPLOAD_ERROR }), m.type !== "location" && f(kA, { upload: m })] }), f("div", { className: "t-send-row", children: [e.length > 1 && f("div", { className: "t-thumbnails-wrap", "t-overflow-left": l.left ? "" : void 0, "t-overflow-right": l.right ? "" : void 0, children: f("div", { className: "t-thumbnails", ref: a, children: e.map((E, A) => f("button", { className: "t-thumbnail", "data-index": A, onClick: h, "t-selected": o === A ? "" : void 0, "t-error": E.state === "error" ? "" : void 0, children: f(gR, { upload: E }) }, A)) }) }), f("div", { className: "t-actions", children: [f("button", { className: "t-cancel", onClick: t.cancelUpload, children: i.CANCEL }), n && f("button", { className: "t-confirm-send", onClick: t.confirmUpload, ref: r, children: i.SEND_BUTTON_TEXT })] })] })] }) });
16936
+ return f(wA, { className: "t-upload-preview", children: f("div", { className: "t-preview", children: [!_ && f(fR, { upload: m }, o), _ && f(ie, { children: [f("div", { className: "t-error-row", children: i.UPLOAD_ERROR }), m.type !== "location" && f(LA, { upload: m })] }), f("div", { className: "t-send-row", children: [e.length > 1 && f("div", { className: "t-thumbnails-wrap", "t-overflow-left": l.left ? "" : void 0, "t-overflow-right": l.right ? "" : void 0, children: f("div", { className: "t-thumbnails", ref: a, children: e.map((E, A) => f("button", { className: "t-thumbnail", "data-index": A, onClick: h, "t-selected": o === A ? "" : void 0, "t-error": E.state === "error" ? "" : void 0, children: f(gR, { upload: E }) }, A)) }) }), f("div", { className: "t-actions", children: [f("button", { className: "t-cancel", onClick: t.cancelUpload, children: i.CANCEL }), n && f("button", { className: "t-confirm-send", onClick: t.confirmUpload, ref: r, children: i.SEND_BUTTON_TEXT })] })] })] }) });
16937
16937
  }
16938
16938
  function fR({ upload: t }) {
16939
- return t.type !== "location" ? f(ie, { children: [f(ER, { upload: t }), f(kA, { upload: t })] }) : t.state === "uploaded" ? f(mR, { location: t.location }) : f("div", { className: "t-loading", children: f(cu, {}) });
16939
+ return t.type !== "location" ? f(ie, { children: [f(ER, { upload: t }), f(LA, { upload: t })] }) : t.state === "uploaded" ? f(mR, { location: t.location }) : f("div", { className: "t-loading", children: f(cu, {}) });
16940
16940
  }
16941
16941
  function mR({ location: t }) {
16942
16942
  const { imageUrl: e, linkUrl: n } = mu(t);
@@ -16955,7 +16955,7 @@ function ER({ upload: t }) {
16955
16955
  case "audio":
16956
16956
  return [f(cr, { src: r.temporaryBlobUrl, filename: i.name })];
16957
16957
  case "file":
16958
- return [f("img", { src: LA(r.file.name, r.state === "error") })];
16958
+ return [f("img", { src: kA(r.file.name, r.state === "error") })];
16959
16959
  case "voice":
16960
16960
  re.unreachable();
16961
16961
  }
@@ -16965,7 +16965,7 @@ function ER({ upload: t }) {
16965
16965
  function lf(t) {
16966
16966
  return { "--img-w": t.width, "--img-h": t.height };
16967
16967
  }
16968
- function kA({ upload: t }) {
16968
+ function LA({ upload: t }) {
16969
16969
  const e = J(ae().t$), n = (() => {
16970
16970
  switch (t.state) {
16971
16971
  case "uploaded":
@@ -16987,7 +16987,7 @@ function _R(t) {
16987
16987
  const AR = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
16988
16988
  function gR({ upload: t }) {
16989
16989
  var o;
16990
- const e = t.state === "error", n = Z(() => t.type === "video" ? AR : t.type === "image" ? t.temporaryBlobUrl : LA(t.metadata.filename, e), [t, e]), [r, i] = ee(null);
16990
+ const e = t.state === "error", n = Z(() => t.type === "video" ? AR : t.type === "image" ? t.temporaryBlobUrl : kA(t.metadata.filename, e), [t, e]), [r, i] = ee(null);
16991
16991
  return z(() => {
16992
16992
  let s = !0;
16993
16993
  return t.type === "video" && (async function(a) {
@@ -17009,7 +17009,7 @@ function gR({ upload: t }) {
17009
17009
  };
17010
17010
  }, [t]), f("img", { src: (o = r != null ? r : n) != null ? o : void 0 });
17011
17011
  }
17012
- function LA(t, e) {
17012
+ function kA(t, e) {
17013
17013
  const n = t.match(/\.([-_a-zA-Z0-9]+)$/), r = (n ? n[1].toUpperCase() : "?").slice(0, 6), i = `
17014
17014
  <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
17015
17015
  <rect width="100%" height="100%" rx="10" fill="${e ? "#ffdbdb" : "#ececec"}"/>
@@ -17219,7 +17219,7 @@ class IR {
17219
17219
  const n = this.store.chatSearchState$.peek();
17220
17220
  this.store.chatSearchState$.set(n === "hidden" ? "visible" : "hidden");
17221
17221
  }
17222
- else Ce.error("In-conversation message search is only available to customers on Growth plan and above.");
17222
+ else Te.error("In-conversation message search is only available to customers on Growth plan and above.");
17223
17223
  }
17224
17224
  async deleteMessage(e) {
17225
17225
  const n = this.store.state$.currentConversation.peek();
@@ -17247,20 +17247,20 @@ class IR {
17247
17247
  async focusMessage(e, n = !0) {
17248
17248
  var a;
17249
17249
  if (e == null) return this.store.focusedMessage$.set(null), null;
17250
- if (await Bs(() => this.store.state$.loadingConversationId.get() === this.store.renderedConversationId$.get()), this.store.state$.currentConversationId.peek() === null) return Ce.error("Cannot focus message because current conversation is `null`."), null;
17250
+ if (await Bs(() => this.store.state$.loadingConversationId.get() === this.store.renderedConversationId$.get()), this.store.state$.currentConversationId.peek() === null) return Te.error("Cannot focus message because current conversation is `null`."), null;
17251
17251
  const r = () => {
17252
17252
  const l = this.store.state$.currentConversationId.peek();
17253
17253
  return this.store.state$.messages.child(l).lookup.child(e).peek() || null;
17254
17254
  };
17255
17255
  let i = r();
17256
- if (i || (i = await this.loadMoreUntil(r)), !i) return Ce.error(`Message with id: \`${e}\` could not be found in this conversation`), i;
17256
+ if (i || (i = await this.loadMoreUntil(r)), !i) return Te.error(`Message with id: \`${e}\` could not be found in this conversation`), i;
17257
17257
  const o = (a = this.scrollable) == null ? void 0 : a.current;
17258
17258
  re.defined(o);
17259
17259
  const s = o.querySelector(`[t-message-id="${e}"]`);
17260
- return s ? this.scrollToAndHighlight(s, i, n) : Ce.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`), i;
17260
+ return s ? this.scrollToAndHighlight(s, i, n) : Te.error(`Could not find HTMLElement with attribute: t-message-id="${e}"`), i;
17261
17261
  }
17262
17262
  async jumpToHighlight(e) {
17263
- if (!this.store.state$.userPermissions.canSearch.peek()) return Ce.error("In-conversation message search is only available to customers on Growth plan and above."), null;
17263
+ if (!this.store.state$.userPermissions.canSearch.peek()) return Te.error("In-conversation message search is only available to customers on Growth plan and above."), null;
17264
17264
  if (this.store.highlightedStrings$.peek().length === 0 || this.store.chatSearchState$.peek() === "searching") return null;
17265
17265
  let n = this.findHighlight(e);
17266
17266
  return n || e !== "up" || (this.store.chatSearchState$.set("searching"), n = await this.loadMoreUntil(() => this.findHighlight("up"))), n;
@@ -17270,7 +17270,7 @@ class IR {
17270
17270
  const n = (u = this.scrollable) == null ? void 0 : u.current;
17271
17271
  re.defined(n);
17272
17272
  const r = [], i = Array.from(n.querySelectorAll("[t-message-id]")), o = this.store.state$.currentConversationId.peek(), s = this.store.state$.messages.child(o).state.peek();
17273
- if (i.length === 0 && s.length !== 0) return Ce.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."), null;
17273
+ if (i.length === 0 && s.length !== 0) return Te.error("Could not find HTMLElements with the attribute: t-message-id. This attribute is required for In-Conversation search to work."), null;
17274
17274
  let a;
17275
17275
  if (Array.from(n.getElementsByClassName("t-highlighted-text")).forEach((c) => {
17276
17276
  const d = i.findIndex((m) => m.contains(c));
@@ -17303,7 +17303,7 @@ class IR {
17303
17303
  Math.sign(i.top - o.top) === -1 && o.height < i.height && (s = "end"), e instanceof HTMLElement && (e.style.scrollSnapAlign = s), e.scrollIntoView({ behavior: "instant" }), e instanceof HTMLElement && (e.style.scrollSnapAlign = "none"), this.store.focusedMessage$.set(n), r && this.onFocusMessage({ message: n });
17304
17304
  }
17305
17305
  setHighlightedStrings(e) {
17306
- this.store.state$.userPermissions.canSearch.peek() ? this.store.highlightedStrings$.set(e) : Ce.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.");
17306
+ this.store.state$.userPermissions.canSearch.peek() ? this.store.highlightedStrings$.set(e) : Te.error("In-conversation message search and by extension highlighting of strings are only available to customers on Growth plan and above.");
17307
17307
  }
17308
17308
  setSearchQuery(e) {
17309
17309
  this.store.setSearchQuery(e);
@@ -17491,17 +17491,17 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17491
17491
  return w || A && A.binding && A.binding("util");
17492
17492
  } catch (P) {
17493
17493
  }
17494
- })(), S = g && g.isTypedArray, O = Array.prototype, D = Function.prototype, I = Object.prototype, R = p["__core-js_shared__"], y = D.toString, v = I.hasOwnProperty, T = (c = /[^.]+$/.exec(R && R.keys && R.keys.IE_PROTO || "")) ? "Symbol(src)_1." + c : "", C = I.toString, N = y.call(Object), k = RegExp("^" + y.call(v).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), b = E ? p.Buffer : void 0, L = p.Symbol, x = p.Uint8Array;
17494
+ })(), S = g && g.isTypedArray, O = Array.prototype, D = Function.prototype, I = Object.prototype, R = p["__core-js_shared__"], y = D.toString, v = I.hasOwnProperty, T = (c = /[^.]+$/.exec(R && R.keys && R.keys.IE_PROTO || "")) ? "Symbol(src)_1." + c : "", C = I.toString, N = y.call(Object), L = RegExp("^" + y.call(v).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), b = E ? p.Buffer : void 0, k = p.Symbol, x = p.Uint8Array;
17495
17495
  b && b.allocUnsafe;
17496
17496
  var M, U, V = (M = Object.getPrototypeOf, U = Object, function(w) {
17497
17497
  return M(U(w));
17498
- }), $ = Object.create, Y = I.propertyIsEnumerable, oe = O.splice, le = L ? L.toStringTag : void 0, ce = (function() {
17498
+ }), $ = Object.create, Y = I.propertyIsEnumerable, oe = O.splice, le = k ? k.toStringTag : void 0, ce = (function() {
17499
17499
  try {
17500
17500
  var w = ca(Object, "defineProperty");
17501
17501
  return w({}, "", {}), w;
17502
17502
  } catch (P) {
17503
17503
  }
17504
- })(), pe = b ? b.isBuffer : void 0, tt = Math.max, jt = Date.now, nt = ca(p, "Map"), ve = ca(Object, "create"), Te = /* @__PURE__ */ (function() {
17504
+ })(), pe = b ? b.isBuffer : void 0, tt = Math.max, jt = Date.now, nt = ca(p, "Map"), ve = ca(Object, "create"), Re = /* @__PURE__ */ (function() {
17505
17505
  function w() {
17506
17506
  }
17507
17507
  return function(P) {
@@ -17538,11 +17538,11 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17538
17538
  this.size = P.size;
17539
17539
  }
17540
17540
  function XA(w, P) {
17541
- var H = ha(w), G = !H && da(w), ue = !H && !G && Tu(w), Re = !H && !G && !ue && Iu(w), ge = H || G || ue || Re, rt = ge ? (function(je, an) {
17541
+ var H = ha(w), G = !H && da(w), ue = !H && !G && Tu(w), Ie = !H && !G && !ue && Iu(w), ge = H || G || ue || Ie, rt = ge ? (function(je, an) {
17542
17542
  for (var ht = -1, yr = Array(je); ++ht < je; ) yr[ht] = an(ht);
17543
17543
  return yr;
17544
17544
  })(w.length, String) : [], dt = rt.length;
17545
- for (var Ie in w) ge && (Ie == "length" || ue && (Ie == "offset" || Ie == "parent") || Re && (Ie == "buffer" || Ie == "byteLength" || Ie == "byteOffset") || vu(Ie, dt)) || rt.push(Ie);
17545
+ for (var ye in w) ge && (ye == "length" || ue && (ye == "offset" || ye == "parent") || Ie && (ye == "buffer" || ye == "byteLength" || ye == "byteOffset") || vu(ye, dt)) || rt.push(ye);
17546
17546
  return rt;
17547
17547
  }
17548
17548
  function aa(w, P, H) {
@@ -17621,8 +17621,8 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17621
17621
  return H.set(w, P), this.size = H.size, this;
17622
17622
  };
17623
17623
  var qA = function(w, P, H) {
17624
- for (var G = -1, ue = Object(w), Re = H(w), ge = Re.length; ge--; ) {
17625
- var rt = Re[++G];
17624
+ for (var G = -1, ue = Object(w), Ie = H(w), ge = Ie.length; ge--; ) {
17625
+ var rt = Ie[++G];
17626
17626
  if (P(ue[rt], rt, ue) === !1) break;
17627
17627
  }
17628
17628
  return w;
@@ -17635,8 +17635,8 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17635
17635
  var ue = !0;
17636
17636
  } catch (ge) {
17637
17637
  }
17638
- var Re = C.call(P);
17639
- return ue && (H ? P[le] = G : delete P[le]), Re;
17638
+ var Ie = C.call(P);
17639
+ return ue && (H ? P[le] = G : delete P[le]), Ie;
17640
17640
  })(w) : (function(P) {
17641
17641
  return C.call(P);
17642
17642
  })(w);
@@ -17647,7 +17647,7 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17647
17647
  function JA(w) {
17648
17648
  return !(!zn(w) || (function(P) {
17649
17649
  return !!T && T in P;
17650
- })(w)) && (fa(w) ? k : a).test((function(P) {
17650
+ })(w)) && (fa(w) ? L : a).test((function(P) {
17651
17651
  if (P != null) {
17652
17652
  try {
17653
17653
  return y.call(P);
@@ -17663,21 +17663,21 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17663
17663
  }
17664
17664
  function ZA(w) {
17665
17665
  if (!zn(w)) return (function(ue) {
17666
- var Re = [];
17667
- if (ue != null) for (var ge in Object(ue)) Re.push(ge);
17668
- return Re;
17666
+ var Ie = [];
17667
+ if (ue != null) for (var ge in Object(ue)) Ie.push(ge);
17668
+ return Ie;
17669
17669
  })(w);
17670
17670
  var P = Du(w), H = [];
17671
17671
  for (var G in w) (G != "constructor" || !P && v.call(w, G)) && H.push(G);
17672
17672
  return H;
17673
17673
  }
17674
17674
  function Ou(w, P, H, G, ue) {
17675
- w !== P && qA(P, function(Re, ge) {
17676
- if (ue || (ue = new Ir()), zn(Re)) (function(dt, Ie, je, an, ht, yr, di) {
17677
- var Vt = ua(dt, je), pt = ua(Ie, je), Nu = di.get(pt);
17675
+ w !== P && qA(P, function(Ie, ge) {
17676
+ if (ue || (ue = new Ir()), zn(Ie)) (function(dt, ye, je, an, ht, yr, di) {
17677
+ var Vt = ua(dt, je), pt = ua(ye, je), Nu = di.get(pt);
17678
17678
  if (Nu) aa(dt, je, Nu);
17679
17679
  else {
17680
- var bu, At = yr ? yr(Vt, pt, je + "", dt, Ie, di) : void 0, hi = At === void 0;
17680
+ var bu, At = yr ? yr(Vt, pt, je + "", dt, ye, di) : void 0, hi = At === void 0;
17681
17681
  if (hi) {
17682
17682
  var Ea = ha(pt), _a = !Ea && Tu(pt), wu = !Ea && !_a && Iu(pt);
17683
17683
  At = pt, Ea || _a || wu ? ha(Vt) ? At = Vt : ui(bu = Vt) && pa(bu) ? At = (function(Fe, it) {
@@ -17697,32 +17697,32 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17697
17697
  return (function(it, ot, Mt) {
17698
17698
  var rg = !Mt;
17699
17699
  Mt || (Mt = {});
17700
- for (var ku = -1, ig = ot.length; ++ku < ig; ) {
17701
- var Aa = ot[ku], To = void 0;
17700
+ for (var Lu = -1, ig = ot.length; ++Lu < ig; ) {
17701
+ var Aa = ot[Lu], To = void 0;
17702
17702
  To === void 0 && (To = it[Aa]), rg ? la(Mt, Aa, To) : KA(Mt, Aa, To);
17703
17703
  }
17704
17704
  return Mt;
17705
17705
  })(Fe, yu(Fe));
17706
17706
  })(Vt) : zn(Vt) && !fa(Vt) || (At = (function(Fe) {
17707
- return typeof Fe.constructor != "function" || Du(Fe) ? {} : Te(V(Fe));
17707
+ return typeof Fe.constructor != "function" || Du(Fe) ? {} : Re(V(Fe));
17708
17708
  })(pt))) : hi = !1;
17709
17709
  }
17710
17710
  hi && (di.set(pt, At), ht(At, pt, an, yr, di), di.delete(pt)), aa(dt, je, At);
17711
17711
  }
17712
17712
  })(w, P, ge, H, Ou, G, ue);
17713
17713
  else {
17714
- var rt = G ? G(ua(w, ge), Re, ge + "", w, P, ue) : void 0;
17715
- rt === void 0 && (rt = Re), aa(w, ge, rt);
17714
+ var rt = G ? G(ua(w, ge), Ie, ge + "", w, P, ue) : void 0;
17715
+ rt === void 0 && (rt = Ie), aa(w, ge, rt);
17716
17716
  }
17717
17717
  }, yu);
17718
17718
  }
17719
17719
  function QA(w, P) {
17720
17720
  return tg((function(H, G, ue) {
17721
17721
  return G = tt(G === void 0 ? H.length - 1 : G, 0), function() {
17722
- for (var Re = arguments, ge = -1, rt = tt(Re.length - G, 0), dt = Array(rt); ++ge < rt; ) dt[ge] = Re[G + ge];
17722
+ for (var Ie = arguments, ge = -1, rt = tt(Ie.length - G, 0), dt = Array(rt); ++ge < rt; ) dt[ge] = Ie[G + ge];
17723
17723
  ge = -1;
17724
- for (var Ie = Array(G + 1); ++ge < G; ) Ie[ge] = Re[ge];
17725
- return Ie[G] = ue(dt), (function(je, an, ht) {
17724
+ for (var ye = Array(G + 1); ++ge < G; ) ye[ge] = Ie[ge];
17725
+ return ye[G] = ue(dt), (function(je, an, ht) {
17726
17726
  switch (ht.length) {
17727
17727
  case 0:
17728
17728
  return je.call(an);
@@ -17734,7 +17734,7 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17734
17734
  return je.call(an, ht[0], ht[1], ht[2]);
17735
17735
  }
17736
17736
  return je.apply(an, ht);
17737
- })(H, this, Ie);
17737
+ })(H, this, ye);
17738
17738
  };
17739
17739
  })(w, P, Cu), w + "");
17740
17740
  }
@@ -17817,12 +17817,12 @@ var hf, ml = { exports: {} }, NR = (hf || (hf = 1, (function(t, e) {
17817
17817
  var ma, ng = (ma = function(w, P, H) {
17818
17818
  Ou(w, P, H);
17819
17819
  }, QA(function(w, P) {
17820
- var H = -1, G = P.length, ue = G > 1 ? P[G - 1] : void 0, Re = G > 2 ? P[2] : void 0;
17821
- for (ue = ma.length > 3 && typeof ue == "function" ? (G--, ue) : void 0, Re && (function(rt, dt, Ie) {
17822
- if (!zn(Ie)) return !1;
17820
+ var H = -1, G = P.length, ue = G > 1 ? P[G - 1] : void 0, Ie = G > 2 ? P[2] : void 0;
17821
+ for (ue = ma.length > 3 && typeof ue == "function" ? (G--, ue) : void 0, Ie && (function(rt, dt, ye) {
17822
+ if (!zn(ye)) return !1;
17823
17823
  var je = typeof dt;
17824
- return !!(je == "number" ? pa(Ie) && vu(dt, Ie.length) : je == "string" && dt in Ie) && Do(Ie[dt], rt);
17825
- })(P[0], P[1], Re) && (ue = G < 3 ? void 0 : ue, G = 1), w = Object(w); ++H < G; ) {
17824
+ return !!(je == "number" ? pa(ye) && vu(dt, ye.length) : je == "string" && dt in ye) && Do(ye[dt], rt);
17825
+ })(P[0], P[1], Ie) && (ue = G < 3 ? void 0 : ue, G = 1), w = Object(w); ++H < G; ) {
17826
17826
  var ge = P[H];
17827
17827
  ge && ma(w, ge, H, ue);
17828
17828
  }
@@ -17866,10 +17866,10 @@ class wR {
17866
17866
 
17867
17867
  On behalf of {{sender.name}},
17868
17868
  The {{app.name}} team` }, smsSettings: { enabled: a.includes("sms_notifications"), smsTemplate: '({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}', maximumSegments: "1", enableAutoOptOutText: !1, optOutText: "To stop receiving these messages, reply STOP." }, suppressContactInfo: JSON.stringify({ mode: "off", suppressLinks: !0, suppressEmailAddresses: !0, suppressPhoneNumbers: !0 }), sameTabLinkRules: [] };
17869
- return bR(l, s);
17870
- })(n.configuration, n.features), i = JSON.parse(r.suppressContactInfo), o = { ...r, suppressContactInfo: new L_(i) };
17869
+ return bR(l, s != null ? s : {});
17870
+ })(n.configuration, n.features), i = JSON.parse(r.suppressContactInfo), o = { ...r, suppressContactInfo: new k_(i) };
17871
17871
  return { appMetadata: { ...n.appMetadata, id: n.appMetadata.id }, features: n.features, role: o };
17872
- })(await this.backendRestClient.get("/app", { role_name: e }));
17872
+ })(await this.backendRestClient.get("/app", e === null ? {} : { role_name: e }));
17873
17873
  }
17874
17874
  async checkIfAppExists() {
17875
17875
  return this.backendRestClient.get("/app").then(() => !0).catch((e) => {
@@ -17911,7 +17911,7 @@ class Br {
17911
17911
  function pf(t) {
17912
17912
  return Object.values(t);
17913
17913
  }
17914
- class kR {
17914
+ class LR {
17915
17915
  constructor(e, n, r) {
17916
17916
  this.subscribedConversations = {}, this.store = e, this.session = n, this.restApi = r;
17917
17917
  }
@@ -17943,7 +17943,7 @@ class kR {
17943
17943
  const { store: e, session: n } = this;
17944
17944
  e.errors$.assign({ unknownUser: !1, wrongAppId: !1, serverError: !1 });
17945
17945
  const r = n.onError((o) => {
17946
- Ce.error(o.message), e.errors$.serverError.set(!0);
17946
+ Te.error(o.message), e.errors$.serverError.set(!0);
17947
17947
  }), i = n.currentUser.subscribe((o) => {
17948
17948
  e.errors$.unknownUser.set(o === null);
17949
17949
  });
@@ -17970,17 +17970,29 @@ class kR {
17970
17970
  listenForUserAndApp() {
17971
17971
  const { store: e, session: n, restApi: r } = this;
17972
17972
  return mt((i) => {
17973
- let o = !0, s = null;
17974
- const a = n.currentUser.subscribe(async (l) => {
17975
- if (o && l && (e.currentUser$.set(l), l.role !== s)) {
17976
- s = l.role;
17977
- const u = await r.getApp(l.role);
17978
- if (!o) return;
17979
- e.app$.set(u);
17973
+ let o = !0;
17974
+ const s = Symbol("ROLE_NOT_LOADED");
17975
+ let a = s;
17976
+ const l = n.currentUser.subscribe(async (u) => {
17977
+ var c;
17978
+ if (o && u) {
17979
+ e.currentUser$.set(u);
17980
+ const d = (c = u.role) != null ? c : null;
17981
+ if (a === s || d !== a) {
17982
+ a = d;
17983
+ try {
17984
+ const h = await r.getApp(d);
17985
+ if (!o) return;
17986
+ e.app$.set(h);
17987
+ } catch (h) {
17988
+ if (!o) return;
17989
+ a = s, Te.error(`Failed to load app settings: ${h.message}`), e.errors$.serverError.set(!0);
17990
+ }
17991
+ }
17980
17992
  }
17981
17993
  });
17982
17994
  i.onCleanup = () => {
17983
- o = !1, a.unsubscribe();
17995
+ o = !1, l.unsubscribe();
17984
17996
  };
17985
17997
  });
17986
17998
  }
@@ -18114,10 +18126,10 @@ function FA(t, e) {
18114
18126
  const a = og({ host: e.host, appId: n, userId: r, token: e.token, tokenFetcher: o }), l = Z(() => {
18115
18127
  const c = Br.fromHost(e.host);
18116
18128
  return new wR(c, n, s, a._authProvider);
18117
- }, [n, s, a, e.host]), u = Z(() => new kR(t, a, l), [t, a, l]);
18129
+ }, [n, s, a, e.host]), u = Z(() => new LR(t, a, l), [t, a, l]);
18118
18130
  return { session: a, restApi: l, fetcher: u };
18119
18131
  }
18120
- class LR {
18132
+ class kR {
18121
18133
  constructor(e, n, r, i) {
18122
18134
  this.state = { type: "idle" }, this.latestTicketId = 0, this.uploads$ = se([]), this.onClose = null, this.startFileUpload = async (o) => {
18123
18135
  const s = this.latestTicketId;
@@ -18156,22 +18168,23 @@ class LR {
18156
18168
  })(c, this.session).then((h) => (this.isTicketValid(s) && this.uploads$.child(d).state.set("uploaded"), h)).catch(() => (this.isTicketValid(s) && this.uploads$.child(d).state.set("error"), null))));
18157
18169
  this.isTicketValid(s) && (this.state = { type: "waitingForConfirmation", ticketId: s, content: { kind: "file", uploads: l, fileTokens: u } });
18158
18170
  }, this.startLocationUpload = async () => {
18159
- const o = this.latestTicketId;
18160
- this.state = { type: "uploading", ticketId: o, content: { kind: "location", upload: { type: "location", state: "uploading", location: null } } };
18161
- const s = await this.browserPermissionController.runWithPermissionCheck("geolocation", async (u) => {
18162
- const { permissionResult: c, location: d } = await new Promise((h) => {
18163
- navigator.geolocation.getCurrentPosition((p) => {
18164
- const m = { latitude: p.coords.latitude, longitude: p.coords.longitude };
18165
- h({ permissionResult: "granted", location: m });
18166
- }, (p) => {
18167
- p.code === GeolocationPositionError.PERMISSION_DENIED ? h({ permissionResult: "denied", location: null }) : h({ permissionResult: "granted", location: null });
18171
+ const o = this.latestTicketId, s = { type: "location", state: "uploading", location: null };
18172
+ this.state = { type: "uploading", ticketId: o, content: { kind: "location", upload: s } }, this.uploads$.set([s]);
18173
+ const a = await this.browserPermissionController.runWithPermissionCheck("geolocation", async (d) => {
18174
+ const { permissionResult: h, location: p } = await new Promise((m) => {
18175
+ navigator.geolocation.getCurrentPosition((_) => {
18176
+ const E = { latitude: _.coords.latitude, longitude: _.coords.longitude };
18177
+ m({ permissionResult: "granted", location: E });
18178
+ }, (_) => {
18179
+ _.code === GeolocationPositionError.PERMISSION_DENIED ? m({ permissionResult: "denied", location: null }) : m({ permissionResult: "granted", location: null });
18168
18180
  });
18169
18181
  });
18170
- return u(c), { permissionResult: c, location: d };
18182
+ return d(h), { permissionResult: h, location: p };
18171
18183
  });
18172
- if (!s || !this.isTicketValid(o)) return;
18173
- const { permissionResult: a, location: l } = s;
18174
- this.state = { type: "waitingForConfirmation", ticketId: o, content: { kind: "location", upload: { type: "location", state: a === "granted" && l ? "uploaded" : "error", location: l } } };
18184
+ if (!this.isTicketValid(o)) return;
18185
+ if (!a) return void this.cancelUpload();
18186
+ const { permissionResult: l, location: u } = a, c = { type: "location", state: l === "granted" && u ? "uploaded" : "error", location: u };
18187
+ this.state = { type: "waitingForConfirmation", ticketId: o, content: { kind: "location", upload: c } }, this.uploads$.set([c]);
18175
18188
  }, this.confirmUpload = () => {
18176
18189
  if (this.state.type === "waitingForConfirmation" && this.isTicketValid(this.state.ticketId)) {
18177
18190
  if (this.state.content.kind === "file") {
@@ -18271,7 +18284,7 @@ class PR {
18271
18284
  try {
18272
18285
  r(l);
18273
18286
  } catch (c) {
18274
- Ce.error("Your beforeBrowserPermissionPrompt callback threw an error: ", c), a.resolve({ cancelled: !0 });
18287
+ Te.error("Your beforeBrowserPermissionPrompt callback threw an error: ", c), a.resolve({ cancelled: !0 });
18275
18288
  }
18276
18289
  const { cancelled: u } = await a.promise;
18277
18290
  return u ? null : n((c) => {
@@ -18313,63 +18326,63 @@ function UA() {
18313
18326
  }, []), t;
18314
18327
  }
18315
18328
  const xR = _t(function(t, e) {
18316
- var k, b;
18329
+ var L, b;
18317
18330
  const { onSendMessage: n, onDeleteMessage: r, onMessageAction: i, onFocusMessage: o, onBackButtonClick: s, onMissingBrowserPermission: a, messageFieldPlaceholder: l, messageFieldSpellcheck: u, __hostElement: c } = t;
18318
18331
  z(() => {
18319
- var L;
18320
- (L = t.__internalOnLoaded) == null || L.call(t);
18332
+ var k;
18333
+ (k = t.__internalOnLoaded) == null || k.call(t);
18321
18334
  }, []);
18322
18335
  const d = UA(), h = X(c != null ? c : null);
18323
18336
  HA(h);
18324
- const p = gt(r, c, ["deleteMessage", "delete-message", "deletemessage", "DeleteMessage"]), m = gt(n, c, ["sendMessage", "send-message", "sendmessage", "SendMessage"]), _ = gt(i, c, ["messageAction", "message-action", "messageaction", "MessageAction"]), E = gt(o, c, ["focusMessage", "focus-message", "focusmessage", "FocusMessage"]), A = gt(s, c, ["backButtonClick", "back-button-click", "backbuttonclick", "BackButtonClick"]), g = gt(a, c, ["browserPermissionDenied", "browser-permission-denied", "browserpermissiondenied", "BrowserPermissionDenied"]), { store: S, controller: O, browserPermissionController: D, uploadController: I, editorInternals: R, session: y } = (function(L, x, M, U, V, $, Y) {
18325
- const oe = Z(() => new dS(L.appId, L.userId), []), { session: le, fetcher: ce } = FA(oe, L);
18337
+ const p = gt(r, c, ["deleteMessage", "delete-message", "deletemessage", "DeleteMessage"]), m = gt(n, c, ["sendMessage", "send-message", "sendmessage", "SendMessage"]), _ = gt(i, c, ["messageAction", "message-action", "messageaction", "MessageAction"]), E = gt(o, c, ["focusMessage", "focus-message", "focusmessage", "FocusMessage"]), A = gt(s, c, ["backButtonClick", "back-button-click", "backbuttonclick", "BackButtonClick"]), g = gt(a, c, ["browserPermissionDenied", "browser-permission-denied", "browserpermissiondenied", "BrowserPermissionDenied"]), { store: S, controller: O, browserPermissionController: D, uploadController: I, editorInternals: R, session: y } = (function(k, x, M, U, V, $, Y) {
18338
+ const oe = Z(() => new dS(k.appId, k.userId), []), { session: le, fetcher: ce } = FA(oe, k);
18326
18339
  z(() => {
18327
18340
  const ve = ce.subscribeToChatboxData();
18328
18341
  return () => ve();
18329
18342
  }, [ce]);
18330
18343
  const pe = Z(() => new R_(oe.state$.editor, oe.device$, oe.state$.userPermissions), [oe]), tt = Z(() => new IR(oe, le, pe, x, M, U, V, $), [le, oe, pe, x, M, V, U, $]);
18331
18344
  pe.controller = tt;
18332
- const jt = Z(() => new PR({ beforeBrowserPermissionPrompt: L.beforeBrowserPermissionPrompt, onMissingBrowserPermission: Y }), [L.beforeBrowserPermissionPrompt, Y]), nt = Z(() => new LR(le, oe, tt, jt), [le, oe, tt, jt]);
18345
+ const jt = Z(() => new PR({ beforeBrowserPermissionPrompt: k.beforeBrowserPermissionPrompt, onMissingBrowserPermission: Y }), [k.beforeBrowserPermissionPrompt, Y]), nt = Z(() => new kR(le, oe, tt, jt), [le, oe, tt, jt]);
18333
18346
  return We(() => {
18334
18347
  let ve = !0;
18335
- const Te = L.conversationId || null;
18336
- return oe.state$.loadingConversationId.set(Te), Te && ce.subscribeConversation(Te), ce.subscribeTypingAndPresence(Te), Bs(() => oe.canRenderUi(Te)).then(() => {
18348
+ const Re = k.conversationId || null;
18349
+ return oe.state$.loadingConversationId.set(Re), Re && ce.subscribeConversation(Re), ce.subscribeTypingAndPresence(Re), Bs(() => oe.canRenderUi(Re)).then(() => {
18337
18350
  ve && bt(() => {
18338
- oe.state$.currentConversationId.set(Te), oe.state$.referencedMessageId.set(null), oe.chatSearchState$.set("hidden");
18351
+ oe.state$.currentConversationId.set(Re), oe.state$.referencedMessageId.set(null), oe.chatSearchState$.set("hidden");
18339
18352
  });
18340
18353
  }), () => {
18341
18354
  ve = !1;
18342
18355
  };
18343
- }, [oe, ce, L.conversationId]), { store: oe, controller: tt, browserPermissionController: jt, uploadController: nt, editorInternals: pe, session: le };
18356
+ }, [oe, ce, k.conversationId]), { store: oe, controller: tt, browserPermissionController: jt, uploadController: nt, editorInternals: pe, session: le };
18344
18357
  })(t, m, p, _, E, A, g), v = q(async () => {
18345
- const L = R.state$;
18346
- if (L.isEmpty.peek() || L.atTextLimit.peek()) return;
18358
+ const k = R.state$;
18359
+ if (k.isEmpty.peek() || k.atTextLimit.peek()) return;
18347
18360
  const x = R.getText(), M = S.state$.referencedMessageId.peek();
18348
18361
  M && O.setReferencedMessage(null), R.clearText(), S.state$.editor.showEmojiPicker.set(!1), await O.sendMessage({ text: x, referencedMessage: M != null ? M : void 0 });
18349
18362
  }, [O, R, S]);
18350
18363
  z(() => {
18351
18364
  var x;
18352
- const L = (x = t.enterSendsMessage) != null ? x : !0;
18353
- S.state$.enterSendsMessage.set(L), R.onEnter = L ? v : void 0;
18365
+ const k = (x = t.enterSendsMessage) != null ? x : !0;
18366
+ S.state$.enterSendsMessage.set(k), R.onEnter = k ? v : void 0;
18354
18367
  }, [R, t.enterSendsMessage, v, S]);
18355
18368
  const T = X(void 0);
18356
18369
  z(() => {
18357
18370
  var x;
18358
- const L = (x = S.focusedMessage$.peek()) == null ? void 0 : x.id;
18359
- t.focusedMessageId !== T.current && L !== t.focusedMessageId && (T.current = t.focusedMessageId, O.focusMessage(t.focusedMessageId || null, !1));
18371
+ const k = (x = S.focusedMessage$.peek()) == null ? void 0 : x.id;
18372
+ t.focusedMessageId !== T.current && k !== t.focusedMessageId && (T.current = t.focusedMessageId, O.focusMessage(t.focusedMessageId || null, !1));
18360
18373
  }, [S, O, t.focusedMessageId]), z(() => {
18361
- const L = t.__hostElement;
18362
- if (L)
18374
+ const k = t.__hostElement;
18375
+ if (k)
18363
18376
  return S.focusedMessage$.onChange(({ value: x }) => {
18364
18377
  var M;
18365
- L.focusedMessageId = (M = x == null ? void 0 : x.id) != null ? M : null;
18378
+ k.focusedMessageId = (M = x == null ? void 0 : x.id) != null ? M : null;
18366
18379
  });
18367
18380
  }, [S, t.__hostElement]), z(() => {
18368
18381
  R.spellcheck$.set(u);
18369
18382
  }, [R, u]), z(() => {
18370
18383
  R.placeholder$.set(l);
18371
18384
  }, [R, l]), gn(e, () => ({ controller: O, editorInternals: R }));
18372
- const C = q(({ error: L }) => f(sa, { appId: t.appId, chatboxState: { type: "unexpected-error", error: L } }), [t.appId]), N = d ? null : f(bm, { fallbackRender: C, children: f(Hm.Provider, { value: R, children: f(Um.Provider, { value: S, children: f(Fm.Provider, { value: t.theme, children: f(tS.Provider, { value: D, children: f(Bm.Provider, { value: O, children: f(oS.Provider, { value: I, children: f(Hc.Provider, { value: y, children: f(rS.Provider, { value: { sendMessage: v }, children: f(TR, { appId: t.appId, chatHeaderVisible: (k = t.chatHeaderVisible) != null ? k : !0, messageFieldVisible: (b = t.messageFieldVisible) != null ? b : !0 }) }) }) }) }) }) }) }) }) });
18385
+ const C = q(({ error: k }) => f(sa, { appId: t.appId, chatboxState: { type: "unexpected-error", error: k } }), [t.appId]), N = d ? null : f(bm, { fallbackRender: C, children: f(Hm.Provider, { value: R, children: f(Um.Provider, { value: S, children: f(Fm.Provider, { value: t.theme, children: f(tS.Provider, { value: D, children: f(Bm.Provider, { value: O, children: f(oS.Provider, { value: I, children: f(Hc.Provider, { value: y, children: f(rS.Provider, { value: { sendMessage: v }, children: f(TR, { appId: t.appId, chatHeaderVisible: (L = t.chatHeaderVisible) != null ? L : !0, messageFieldVisible: (b = t.messageFieldVisible) != null ? b : !0 }) }) }) }) }) }) }) }) }) });
18373
18386
  return c ? N : f("div", { className: "t-chatbox" + (t.className ? ` ${t.className}` : ""), style: t.style, ref: h, children: N });
18374
18387
  });
18375
18388
  (function(t = "Twemoji Country Flags", e = "https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2") {
@@ -18399,7 +18412,7 @@ const xR = _t(function(t, e) {
18399
18412
  } });
18400
18413
  }
18401
18414
  n && (dd.replacer = n), r && (dd.reviver = r);
18402
- })({ observableFunctions: { child: (t, e) => Vs.getProxy(t, e) } }), Ce.registerHandler(({ level: t, data: e }) => {
18415
+ })({ observableFunctions: { child: (t, e) => Vs.getProxy(t, e) } }), Te.registerHandler(({ level: t, data: e }) => {
18403
18416
  console[t]("[TalkJS]", ...e);
18404
18417
  });
18405
18418
  const BA = _t(function(t, e) {
@@ -18657,10 +18670,10 @@ class YR extends Xm {
18657
18670
  setGlobalSearchQuery(e) {
18658
18671
  this.globalSearchEnabled$.peek() ? bt(() => {
18659
18672
  this.globalSearchState$.query.set(e), this.globalSearchActive$.peek() || this.globalSearchState$.selectedResultId.set(null);
18660
- }) : Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.');
18673
+ }) : Te.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.');
18661
18674
  }
18662
18675
  cancelGlobalSearch() {
18663
- this.globalSearchEnabled$.peek() ? this.setGlobalSearchQuery("") : Ce.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.');
18676
+ this.globalSearchEnabled$.peek() ? this.setGlobalSearchQuery("") : Te.error('The "Search messages & conversations" feature is only available to customers on Growth plan and above.');
18664
18677
  }
18665
18678
  }
18666
18679
  class GR {
@@ -18748,18 +18761,18 @@ const qR = _t(function(t, e) {
18748
18761
  const h = q(({ error: m }) => f(sa, { appId: t.appId, chatboxState: { type: "unexpected-error", error: m } }), [t.appId]), p = i ? null : f(bm, { fallbackRender: h, children: f(Um.Provider, { value: a, children: f(Fm.Provider, { value: t.theme, children: f(Bm.Provider, { value: c, children: f(Hc.Provider, { value: l, children: f(zR, { appId: t.appId }) }) }) }) }) });
18749
18762
  return n ? p : f("div", { className: "t-conversation-list" + (t.className ? ` ${t.className}` : ""), style: t.style, ref: o, children: p });
18750
18763
  });
18751
- var io, Ls, YA;
18764
+ var io, ks, YA;
18752
18765
  class JR {
18753
18766
  constructor(e) {
18754
- Cr(this, Ls);
18767
+ Cr(this, ks);
18755
18768
  Cr(this, io);
18756
18769
  Ro(this, io, e);
18757
18770
  }
18758
18771
  selectConversation(e, n) {
18759
- return _e(this, Ls, YA).selectConversation(e, n);
18772
+ return _e(this, ks, YA).selectConversation(e, n);
18760
18773
  }
18761
18774
  }
18762
- io = new WeakMap(), Ls = new WeakSet(), YA = function() {
18775
+ io = new WeakMap(), ks = new WeakSet(), YA = function() {
18763
18776
  return _e(this, io).current.controller;
18764
18777
  };
18765
18778
  const GA = _t(function(t, e) {
@@ -18786,26 +18799,26 @@ function ZR(t) {
18786
18799
  var M;
18787
18800
  (M = t.__internalOnLoaded) == null || M.call(t);
18788
18801
  }, []);
18789
- const C = X(s != null ? s : null), [N, k] = ee(void 0);
18802
+ const C = X(s != null ? s : null), [N, L] = ee(void 0);
18790
18803
  We(() => {
18791
18804
  var V;
18792
18805
  const M = (V = t.mobileBreakPoint) != null ? V : 700, U = new ResizeObserver(($) => {
18793
18806
  const Y = $[0].contentRect.width;
18794
- k(Y >= M);
18807
+ L(Y >= M);
18795
18808
  });
18796
18809
  return U.observe(C.current), () => U.disconnect();
18797
18810
  }, [t.mobileBreakPoint]);
18798
18811
  const b = q((M) => {
18799
18812
  E(null), y({ conversation: null, currentUser: M.currentUser });
18800
- }, [y]), L = _ ? "chatbox" : "conversation-list";
18813
+ }, [y]), k = _ ? "chatbox" : "conversation-list";
18801
18814
  z(() => {
18802
- s && (N ? s.removeAttribute("t-mobile-inbox") : s.setAttribute("t-mobile-inbox", L));
18803
- }, [N, s, L]);
18815
+ s && (N ? s.removeAttribute("t-mobile-inbox") : s.setAttribute("t-mobile-inbox", k));
18816
+ }, [N, s, k]);
18804
18817
  const x = N === void 0 ? null : f(ie, { children: [f(GA, { ...m, onSelectConversation: v, selectedConversationId: _ != null ? _ : void 0 }), f(BA, { ...h, onDeleteMessage: S, onSendMessage: O, onMessageAction: D, onFocusMessage: T, onMissingBrowserPermission: R, onBackButtonClick: b, conversationId: _, focusedMessageId: A != null ? A : void 0 })] });
18805
18818
  if (s) return x;
18806
18819
  {
18807
18820
  const M = "t-inbox" + (t.className ? ` ${t.className}` : "");
18808
- return f("div", { ref: C, style: o, className: M, "t-mobile-inbox": N ? void 0 : L, children: x });
18821
+ return f("div", { ref: C, style: o, className: M, "t-mobile-inbox": N ? void 0 : k, children: x });
18809
18822
  }
18810
18823
  }
18811
18824
  var oo;
@@ -18822,8 +18835,8 @@ oo = new WeakMap();
18822
18835
  const eI = _t(function(t, e) {
18823
18836
  const n = X(null), r = X(null), i = Z(() => new QR(n), []);
18824
18837
  gn(e, () => i, [i]);
18825
- const { theme: o, baseTheme: s, appId: a, userId: l, __hostElement: u, __internalOnLoaded: c, beforeBrowserPermissionPrompt: d, chatHeaderVisible: h, className: p, style: m, enterSendsMessage: _, messageFieldVisible: E, messageFieldSpellcheck: A, messageFieldPlaceholder: g, onDeleteMessage: S, onSendMessage: O, onMessageAction: D, onFocusMessage: I, onMissingBrowserPermission: R, onSelectConversation: y, themeCustom: v, host: T, focusedMessageId: C, selectedConversationId: N, conversationFilter: k, mobileBreakPoint: b } = t, L = Z(() => xc(s, o, "Inbox"), [s, o]);
18826
- return f(ZR, { style: m, className: p, selectedConversationId: N, focusedMessageId: C, chatboxProps: { appId: a, userId: l, theme: L, host: T, focusedMessageId: C, enterSendsMessage: _, chatHeaderVisible: h, messageFieldVisible: E, messageFieldSpellcheck: A, messageFieldPlaceholder: g, beforeBrowserPermissionPrompt: d, onDeleteMessage: S, onSendMessage: O, onMessageAction: D, onFocusMessage: I, onMissingBrowserPermission: R, themeCustom: v, ref: n }, conversationListProps: { appId: a, userId: l, theme: L, host: T, onSelectConversation: y, conversationFilter: k, themeCustom: v, ref: r }, mobileBreakPoint: b, __hostElement: u, __internalOnLoaded: c }, `inbox|${t.userId}|${t.appId}`);
18838
+ const { theme: o, baseTheme: s, appId: a, userId: l, __hostElement: u, __internalOnLoaded: c, beforeBrowserPermissionPrompt: d, chatHeaderVisible: h, className: p, style: m, enterSendsMessage: _, messageFieldVisible: E, messageFieldSpellcheck: A, messageFieldPlaceholder: g, onDeleteMessage: S, onSendMessage: O, onMessageAction: D, onFocusMessage: I, onMissingBrowserPermission: R, onSelectConversation: y, themeCustom: v, host: T, focusedMessageId: C, selectedConversationId: N, conversationFilter: L, mobileBreakPoint: b } = t, k = Z(() => xc(s, o, "Inbox"), [s, o]);
18839
+ return f(ZR, { style: m, className: p, selectedConversationId: N, focusedMessageId: C, chatboxProps: { appId: a, userId: l, theme: k, host: T, focusedMessageId: C, enterSendsMessage: _, chatHeaderVisible: h, messageFieldVisible: E, messageFieldSpellcheck: A, messageFieldPlaceholder: g, beforeBrowserPermissionPrompt: d, onDeleteMessage: S, onSendMessage: O, onMessageAction: D, onFocusMessage: I, onMissingBrowserPermission: R, themeCustom: v, ref: n }, conversationListProps: { appId: a, userId: l, theme: k, host: T, onSelectConversation: y, conversationFilter: L, themeCustom: v, ref: r }, mobileBreakPoint: b, __hostElement: u, __internalOnLoaded: c }, `inbox|${t.userId}|${t.appId}`);
18827
18840
  });
18828
18841
  function tI(t) {
18829
18842
  const { common: e } = t;
@@ -18873,7 +18886,7 @@ const WA = Object.freeze(Object.defineProperty({ __proto__: null, AfterMessages:
18873
18886
  const i = e.many ? f("div", { className: "t-theme-avatar", children: "5+" }) : e.users.slice(0, 2).map((o) => f(r, { photoUrl: Pt(o), common: t }, o.id));
18874
18887
  return f("div", { className: "t-theme-after-messages", "t-many": String(e.many), "aria-label": iI(e), children: [f("div", { className: "t-typing-avatars", "aria-hidden": "true", children: [i, !e.many && e.users.length > 2 && f("div", { className: "t-theme-avatar", children: ["+", e.users.length - 2] })] }), f("div", { className: "t-typing-bubble", children: f("div", { className: "t-typing-animation", children: [f("span", {}), f("span", {}), f("span", {})] }) })] });
18875
18888
  }, AudioBlock: function({ block: t, downloadUrl: e }) {
18876
- return f("div", { className: "t-theme-audio-block", children: [f(cr, { src: t.url, filename: t.filename }), f("a", { className: "t-body-text", href: e, target: "_blank", rel: "noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
18889
+ return f("div", { className: "t-theme-audio-block", children: [f(cr, { src: t.url, filename: t.filename }), f("a", { className: "t-body-text", href: e, target: "_blank", rel: "noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
18877
18890
  }, Avatar: function({ photoUrl: t }) {
18878
18891
  return f("div", { className: "t-theme-avatar", style: { backgroundImage: `url("${t}")` } });
18879
18892
  }, BeforeMessages: function({ common: t }) {
@@ -18900,7 +18913,7 @@ const WA = Object.freeze(Object.defineProperty({ __proto__: null, AfterMessages:
18900
18913
  D.preventDefault(), s.selectConversation(n.id);
18901
18914
  }, children: f("h3", { className: "t-conversation-name", children: A }) }), m && f("span", { className: "t-timestamp", children: f(a, { timestamp: m, common: e }) })] }), f("div", { className: "t-body", children: [c && f("div", { className: "t-message", children: [h && p && f("span", { className: "t-message-sender", children: [p, ":"] }), f(u, { message: c, common: e })] }), f(aI, { ...t })] })] })] });
18902
18915
  }, FileBlock: function({ block: t, downloadUrl: e }) {
18903
- return f("div", { className: "t-theme-file-block", children: f("a", { className: "t-body-text", href: e, target: "_blank", rel: "noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { className: "t-filename", text: t.filename }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] }) });
18916
+ return f("div", { className: "t-theme-file-block", children: f("a", { className: "t-body-text", href: e, target: "_blank", rel: "noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { className: "t-filename", text: t.filename }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] }) });
18904
18917
  }, GlobalSearchBox: function(t) {
18905
18918
  const { common: e, query: n, cancel: r } = t, { t: i } = e;
18906
18919
  return f("div", { className: "t-theme-global-search-box", children: [f(ws, { className: "t-input", placeholder: i.SEARCH_PLACEHOLDER_TEXT }), n.length > 0 && f("button", { type: "button", onClick: r, "aria-label": i.ARIA_LEAVE_SEARCH_MODE, className: "t-clear", children: f(B, { type: "close", size: "20px" }) }), n.length === 0 && f(B, { className: "t-submit", type: "search", size: "20px" })] });
@@ -18917,7 +18930,7 @@ const WA = Object.freeze(Object.defineProperty({ __proto__: null, AfterMessages:
18917
18930
  return f("div", { className: "t-theme-group-chat-image", children: [f("div", { className: "t-mini-avatar", style: { backgroundImage: `url("${Pt(t[0].user)}")` } }), f("div", { className: "t-mini-avatar", style: { backgroundImage: `url("${Pt(t[1].user)}")` } }), t.length > 2 && f("svg", { className: "t-counter", viewBox: "0 0 22 22", xmlns: "http://www.w3.org/2000/svg", children: [f("g", { className: "t-group", children: f("rect", { x: "0", y: "0", width: 22, height: 22, fill: "currentColor" }) }), f("text", { textAnchor: "middle", x: 11, y: Math.round(0.666 * 22), width: 22, height: 22, fontSize: t.length > 9 ? 10 : 12, fill: "currentColor", children: t.length > 9 ? "9+" : t.length })] })] });
18918
18931
  }, ImageBlock: function({ block: t, downloadUrl: e }) {
18919
18932
  const n = { "--img-w": t.width || 1, "--img-h": t.height || 1 };
18920
- return f("div", { className: "t-theme-image-block", children: [f("a", { href: t.url, className: "t-image-wrapper", target: "_blank", rel: "noopener noreferrer", children: f("div", { className: "t-root", style: n, children: f("img", { src: t.url, className: "t-image" }) }) }), f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noreferrer", children: [f(B, { className: "download-icon", type: "download" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
18933
+ return f("div", { className: "t-theme-image-block", children: [f("a", { href: t.url, className: "t-image-wrapper", target: "_blank", rel: "noopener noreferrer", children: f("div", { className: "t-root", style: n, children: f("img", { src: t.url, className: "t-image" }) }) }), f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noreferrer", children: [f(B, { className: "download-icon", type: "download" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
18921
18934
  }, LocationBlock: function({ block: t }) {
18922
18935
  const { imageUrl: e, linkUrl: n } = mu(t);
18923
18936
  return f("div", { className: "t-theme-location-block", children: [f("a", { href: n, target: "_blank", rel: "noreferrer", className: "t-root", style: { background: `${`url(${JSON.stringify(e)})`} center center / cover no-repeat` } }), f("span", { className: "t-body-text", children: f("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: n }) })] });
@@ -18956,7 +18969,7 @@ const WA = Object.freeze(Object.defineProperty({ __proto__: null, AfterMessages:
18956
18969
  }, TimeAgo: function(t) {
18957
18970
  return t.timestamp === -1 ? null : f(sI, { ...t });
18958
18971
  }, VideoBlock: function({ block: t, downloadUrl: e }) {
18959
- return f("div", { className: "t-theme-video-block", children: [f("div", { className: "t-video-wrapper", children: f("div", { className: "t-root", style: { "--video-w": t.width || 1, "--video-h": t.height || 1 }, children: f("video", { className: "t-video", controls: !0, preload: "metadata", src: `${t.url}#t=0.1`, playsInline: !0 }) }) }), f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noreferrer", children: [f(B, { className: "download-icon", type: "download" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
18972
+ return f("div", { className: "t-theme-video-block", children: [f("div", { className: "t-video-wrapper", children: f("div", { className: "t-root", style: { "--video-w": t.width || 1, "--video-h": t.height || 1 }, children: f("video", { className: "t-video", controls: !0, preload: "metadata", src: `${t.url}#t=0.1`, playsInline: !0 }) }) }), f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noreferrer", children: [f(B, { className: "download-icon", type: "download" }), f(yt, { text: t.filename }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
18960
18973
  }, VoiceBlock: function({ block: t }) {
18961
18974
  return f(cr, { className: "t-theme-voice-block", src: t.url, filename: t.filename });
18962
18975
  }, VoiceRecorder: function(t) {
@@ -19057,14 +19070,14 @@ function II(t) {
19057
19070
  }, children: f(B, { type: "close", size: 20 }) })] }), f("button", { className: "t-button t-previous-button", "aria-label": e.ARIA_SEARCH_UP, disabled: r === "searching", onClick: () => n.jumpToPreviousHighlight(), children: f(B, { type: "chevronUp", size: 20 }) }), f("button", { className: "t-button t-next-button", "aria-label": e.ARIA_SEARCH_DOWN, disabled: r === "searching", onClick: () => n.jumpToNextHighlight(), children: f(B, { type: "chevronDown", size: 20 }) })] }), o && f("div", { className: "t-theme-chat-search-status", role: "status", "aria-live": "polite", children: f("span", { className: "t-text", children: o }) })] });
19058
19071
  }
19059
19072
  function yI({ block: t, downloadUrl: e }) {
19060
- return f("div", { className: "t-theme-audio-block", children: [f(cr, { src: t.url, filename: t.filename }), f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
19073
+ return f("div", { className: "t-theme-audio-block", children: [f(cr, { src: t.url, filename: t.filename }), f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
19061
19074
  }
19062
19075
  function CI({ block: t, downloadUrl: e }) {
19063
- return f("div", { className: "t-theme-file-block", children: f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] }) });
19076
+ return f("div", { className: "t-theme-file-block", children: f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { type: "attachment", className: "t-attachment-icon" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] }) });
19064
19077
  }
19065
19078
  function NI({ block: t, downloadUrl: e }) {
19066
19079
  const n = { "--img-w": t.width || 1, "--img-h": t.height || 1 };
19067
- return f("div", { className: "t-theme-image-block", children: [f("a", { href: t.url, className: "t-image-wrapper", target: "_blank", rel: "noopener noreferrer", children: f("div", { className: "t-root", style: n, children: f("img", { src: t.url, className: "t-image" }) }) }), f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
19080
+ return f("div", { className: "t-theme-image-block", children: [f("a", { href: t.url, className: "t-image-wrapper", target: "_blank", rel: "noopener noreferrer", children: f("div", { className: "t-root", style: n, children: f("img", { src: t.url, className: "t-image" }) }) }), f("div", { className: "t-metadata", children: [f("a", { href: e, target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
19068
19081
  }
19069
19082
  function bI({ block: t }) {
19070
19083
  const { imageUrl: e, linkUrl: n } = mu(t);
@@ -19073,10 +19086,10 @@ function bI({ block: t }) {
19073
19086
  function wI({ block: t, message: e }) {
19074
19087
  return f("div", { className: "t-theme-text-block", children: f(ea, { block: t, message: e }) });
19075
19088
  }
19076
- function kI({ block: t, downloadUrl: e }) {
19077
- return f("div", { className: "t-theme-video-block", children: [f("div", { className: "t-video-wrapper", children: f("div", { className: "t-root", style: { "--video-w": t.width || 1, "--video-h": t.height || 1 }, children: f("video", { className: "t-video", controls: !0, preload: "metadata", src: `${t.url}#t=0.1`, playsInline: !0 }) }) }), f("div", { className: "t-metadata", children: [f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", Ln(t.size), ")"] })] })] });
19089
+ function LI({ block: t, downloadUrl: e }) {
19090
+ return f("div", { className: "t-theme-video-block", children: [f("div", { className: "t-video-wrapper", children: f("div", { className: "t-root", style: { "--video-w": t.width || 1, "--video-h": t.height || 1 }, children: f("video", { className: "t-video", controls: !0, preload: "metadata", src: `${t.url}#t=0.1`, playsInline: !0 }) }) }), f("div", { className: "t-metadata", children: [f("a", { href: e, className: "t-body-text", target: "_blank", rel: "noopener noreferrer", children: [f(B, { className: "t-download-icon", type: "download" }), f(yt, { className: "t-filename", text: t.filename })] }), f("span", { className: "t-filesize", children: [" (", kn(t.size), ")"] })] })] });
19078
19091
  }
19079
- function LI({ block: t }) {
19092
+ function kI({ block: t }) {
19080
19093
  return f(cr, { className: "t-theme-voice-block", src: t.url, filename: t.filename });
19081
19094
  }
19082
19095
  function MI({ photoUrl: t }) {
@@ -19234,7 +19247,7 @@ function KI(t) {
19234
19247
  }
19235
19248
  function gu(t, e) {
19236
19249
  const n = JSON.stringify(e).replace(",", ", ");
19237
- Ce.error(`Could not initialize ${t} because the following required props are missing: ${n}.`);
19250
+ Te.error(`Could not initialize ${t} because the following required props are missing: ${n}.`);
19238
19251
  }
19239
19252
  const qI = Au(BA, "ChatboxElement", { __internalOnLoaded: { type: "function", required: !1 }, appId: { type: "string" }, userId: { type: "string" }, conversationId: { type: "string" }, baseTheme: { type: "string", required: !1 }, theme: { type: "object", required: !1 }, token: { type: "string", required: !1 }, tokenFetcher: { type: "function", required: !1 }, host: { type: "string", required: !1 }, focusedMessageId: { type: "string", required: !1 }, enterSendsMessage: { type: "boolean", required: !1 }, chatHeaderVisible: { type: "boolean", required: !1 }, messageFieldVisible: { type: "boolean", required: !1 }, messageFieldSpellcheck: { type: "boolean", required: !1 }, messageFieldPlaceholder: { type: "string", required: !1 }, onSendMessage: { type: "function", required: !1 }, onDeleteMessage: { type: "function", required: !1 }, onMessageAction: { type: "function", required: !1 }, onFocusMessage: { type: "function", required: !1 }, beforeBrowserPermissionPrompt: { type: "function", required: !1 }, onMissingBrowserPermission: { type: "function", required: !1 }, themeCustom: { type: "object", required: !1 } }, (t) => gu("<t-chatbox>", t)), JI = Au(GA, "ConversationListElement", { __internalOnLoaded: { type: "function", required: !1 }, appId: { type: "string" }, userId: { type: "string" }, selectedConversationId: { type: "string", required: !1 }, baseTheme: { type: "string", required: !1 }, theme: { type: "object", required: !1 }, token: { type: "string", required: !1 }, tokenFetcher: { type: "function", required: !1 }, host: { type: "string", required: !1 }, onSelectConversation: { type: "function", required: !1 }, conversationFilter: { type: "object", required: !1 }, themeCustom: { type: "object", required: !1 } }, (t) => gu("<t-conversation-list>", t)), ZI = Au(eI, "InboxElement", { __internalOnLoaded: { type: "function", required: !1 }, appId: { type: "string" }, userId: { type: "string" }, selectedConversationId: { type: "string", required: !1 }, focusedMessageId: { type: "string", required: !1 }, mobileBreakPoint: { type: "number", required: !1 }, baseTheme: { type: "string", required: !1 }, theme: { type: "object", required: !1 }, host: { type: "string", required: !1 }, enterSendsMessage: { type: "boolean", required: !1 }, chatHeaderVisible: { type: "boolean", required: !1 }, messageFieldVisible: { type: "boolean", required: !1 }, messageFieldSpellcheck: { type: "boolean", required: !1 }, messageFieldPlaceholder: { type: "string", required: !1 }, onSendMessage: { type: "function", required: !1 }, onDeleteMessage: { type: "function", required: !1 }, onMessageAction: { type: "function", required: !1 }, onFocusMessage: { type: "function", required: !1 }, beforeBrowserPermissionPrompt: { type: "function", required: !1 }, onMissingBrowserPermission: { type: "function", required: !1 }, onSelectConversation: { type: "function", required: !1 }, conversationFilter: { type: "object", required: !1 }, themeCustom: { type: "object", required: !1 } }, (t) => gu("<t-inbox>", t)), ny = Of, ry = WA;
19240
19253
  customElements.get("t-chatbox") || customElements.define("t-chatbox", qI), customElements.get("t-conversation-list") || customElements.define("t-conversation-list", JI), customElements.get("t-inbox") || customElements.define("t-inbox", ZI);
@@ -19262,7 +19275,7 @@ export {
19262
19275
  ry as classicTheme,
19263
19276
  ny as defaultTheme,
19264
19277
  go as formatDuration,
19265
- Ln as formatFilesize,
19278
+ kn as formatFilesize,
19266
19279
  mu as getGoogleMapsUrls,
19267
19280
  Pt as getPhotoUrlWithFallback,
19268
19281
  OA as getRandomColor,