@evelan/jexity-widget 0.9.0 → 0.10.1-canary.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var Ze, m, yr, vr, le, $n, _r, kr, wr, rn, zt, Bt, Sr, Ve = {}, jr = [], Pi = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Xe = Array.isArray;
2
- function Z(t, e) {
1
+ var Ze, m, vr, _r, le, An, kr, wr, Sr, sn, Bt, Ft, jr, Ve = {}, Cr = [], Mi = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Xe = Array.isArray;
2
+ function X(t, e) {
3
3
  for (var n in e) t[n] = e[n];
4
4
  return t;
5
5
  }
6
- function sn(t) {
6
+ function on(t) {
7
7
  t && t.parentNode && t.parentNode.removeChild(t);
8
8
  }
9
9
  function re(t, e, n) {
@@ -13,16 +13,16 @@ function re(t, e, n) {
13
13
  return Be(t, o, r, i, null);
14
14
  }
15
15
  function Be(t, e, n, r, i) {
16
- var s = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++yr, __i: -1, __u: 0 };
16
+ var s = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++vr, __i: -1, __u: 0 };
17
17
  return i == null && m.vnode != null && m.vnode(s), s;
18
18
  }
19
- function Mi() {
19
+ function Li() {
20
20
  return { current: null };
21
21
  }
22
- function F(t) {
22
+ function D(t) {
23
23
  return t.children;
24
24
  }
25
- function z(t, e) {
25
+ function B(t, e) {
26
26
  this.props = t, this.context = e;
27
27
  }
28
28
  function je(t, e) {
@@ -30,38 +30,38 @@ function je(t, e) {
30
30
  for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
31
31
  return typeof t.type == "function" ? je(t) : null;
32
32
  }
33
- function Cr(t) {
33
+ function Tr(t) {
34
34
  var e, n;
35
35
  if ((t = t.__) != null && t.__c != null) {
36
36
  for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
37
37
  t.__e = t.__c.base = n.__e;
38
38
  break;
39
39
  }
40
- return Cr(t);
40
+ return Tr(t);
41
41
  }
42
42
  }
43
- function Ft(t) {
44
- (!t.__d && (t.__d = !0) && le.push(t) && !ht.__r++ || $n != m.debounceRendering) && (($n = m.debounceRendering) || _r)(ht);
43
+ function Dt(t) {
44
+ (!t.__d && (t.__d = !0) && le.push(t) && !ht.__r++ || An != m.debounceRendering) && ((An = m.debounceRendering) || kr)(ht);
45
45
  }
46
46
  function ht() {
47
- for (var t, e, n, r, i, s, o, l = 1; le.length; ) le.length > l && le.sort(kr), t = le.shift(), l = le.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, s = [], o = [], e.__P && ((n = Z({}, r)).__v = r.__v + 1, m.vnode && m.vnode(n), on(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, s, i ?? je(r), !!(32 & r.__u), o), n.__v = r.__v, n.__.__k[n.__i] = n, $r(s, n, o), r.__e = r.__ = null, n.__e != i && Cr(n)));
47
+ for (var t, e, n, r, i, s, o, l = 1; le.length; ) le.length > l && le.sort(wr), t = le.shift(), l = le.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, s = [], o = [], e.__P && ((n = X({}, r)).__v = r.__v + 1, m.vnode && m.vnode(n), an(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, s, i ?? je(r), !!(32 & r.__u), o), n.__v = r.__v, n.__.__k[n.__i] = n, Ar(s, n, o), r.__e = r.__ = null, n.__e != i && Tr(n)));
48
48
  ht.__r = 0;
49
49
  }
50
- function Tr(t, e, n, r, i, s, o, l, a, u, d) {
51
- var c, p, f, g, b, w, _, k = r && r.__k || jr, V = e.length;
52
- for (a = Li(n, e, k, a, V), c = 0; c < V; c++) (f = n.__k[c]) != null && (p = f.__i == -1 ? Ve : k[f.__i] || Ve, f.__i = c, w = on(t, f, p, i, s, o, l, a, u, d), g = f.__e, f.ref && p.ref != f.ref && (p.ref && an(p.ref, null, f), d.push(f.ref, f.__c || g, f)), b == null && g != null && (b = g), (_ = !!(4 & f.__u)) || p.__k === f.__k ? a = Rr(f, a, t, _) : typeof f.type == "function" && w !== void 0 ? a = w : g && (a = g.nextSibling), f.__u &= -7);
53
- return n.__e = b, a;
50
+ function Rr(t, e, n, r, i, s, o, l, a, u, d) {
51
+ var c, p, f, g, x, w, _, k = r && r.__k || Cr, V = e.length;
52
+ for (a = Ni(n, e, k, a, V), c = 0; c < V; c++) (f = n.__k[c]) != null && (p = f.__i == -1 ? Ve : k[f.__i] || Ve, f.__i = c, w = an(t, f, p, i, s, o, l, a, u, d), g = f.__e, f.ref && p.ref != f.ref && (p.ref && ln(p.ref, null, f), d.push(f.ref, f.__c || g, f)), x == null && g != null && (x = g), (_ = !!(4 & f.__u)) || p.__k === f.__k ? a = $r(f, a, t, _) : typeof f.type == "function" && w !== void 0 ? a = w : g && (a = g.nextSibling), f.__u &= -7);
53
+ return n.__e = x, a;
54
54
  }
55
- function Li(t, e, n, r, i) {
55
+ function Ni(t, e, n, r, i) {
56
56
  var s, o, l, a, u, d = n.length, c = d, p = 0;
57
- for (t.__k = new Array(i), s = 0; s < i; s++) (o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (a = s + p, (o = t.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Be(null, o, null, null, null) : Xe(o) ? Be(F, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Be(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = t, o.__b = t.__b + 1, l = null, (u = o.__i = Oi(o, n, a, c)) != -1 && (c--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (i > d ? p-- : i < d && p++), typeof o.type != "function" && (o.__u |= 4)) : u != a && (u == a - 1 ? p-- : u == a + 1 ? p++ : (u > a ? p-- : p++, o.__u |= 4))) : t.__k[s] = null;
58
- if (c) for (s = 0; s < d; s++) (l = n[s]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = je(l)), Ir(l, l));
57
+ for (t.__k = new Array(i), s = 0; s < i; s++) (o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (a = s + p, (o = t.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Be(null, o, null, null, null) : Xe(o) ? Be(D, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? Be(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = t, o.__b = t.__b + 1, l = null, (u = o.__i = Oi(o, n, a, c)) != -1 && (c--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (i > d ? p-- : i < d && p++), typeof o.type != "function" && (o.__u |= 4)) : u != a && (u == a - 1 ? p-- : u == a + 1 ? p++ : (u > a ? p-- : p++, o.__u |= 4))) : t.__k[s] = null;
58
+ if (c) for (s = 0; s < d; s++) (l = n[s]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = je(l)), Er(l, l));
59
59
  return r;
60
60
  }
61
- function Rr(t, e, n, r) {
61
+ function $r(t, e, n, r) {
62
62
  var i, s;
63
63
  if (typeof t.type == "function") {
64
- for (i = t.__k, s = 0; i && s < i.length; s++) i[s] && (i[s].__ = t, e = Rr(i[s], e, n, r));
64
+ for (i = t.__k, s = 0; i && s < i.length; s++) i[s] && (i[s].__ = t, e = $r(i[s], e, n, r));
65
65
  return e;
66
66
  }
67
67
  t.__e != e && (r && (e && t.type && !e.parentNode && (e = je(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
@@ -83,17 +83,17 @@ function Oi(t, e, n, r) {
83
83
  }
84
84
  return -1;
85
85
  }
86
- function An(t, e, n) {
87
- e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || Pi.test(e) ? n : n + "px";
86
+ function In(t, e, n) {
87
+ e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || Mi.test(e) ? n : n + "px";
88
88
  }
89
89
  function rt(t, e, n, r, i) {
90
90
  var s, o;
91
91
  e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
92
92
  else {
93
- if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || An(t.style, e, "");
94
- if (n) for (e in n) r && n[e] == r[e] || An(t.style, e, n[e]);
93
+ if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || In(t.style, e, "");
94
+ if (n) for (e in n) r && n[e] == r[e] || In(t.style, e, n[e]);
95
95
  }
96
- else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(wr, "$1")), o = e.toLowerCase(), e = o in t || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? r ? n.u = r.u : (n.u = rn, t.addEventListener(e, s ? Bt : zt, s)) : t.removeEventListener(e, s ? Bt : zt, s);
96
+ else if (e[0] == "o" && e[1] == "n") s = e != (e = e.replace(Sr, "$1")), o = e.toLowerCase(), e = o in t || e == "onFocusOut" || e == "onFocusIn" ? o.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + s] = n, n ? r ? n.u = r.u : (n.u = sn, t.addEventListener(e, s ? Ft : Bt, s)) : t.removeEventListener(e, s ? Ft : Bt, s);
97
97
  else {
98
98
  if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
99
99
  else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
@@ -104,22 +104,22 @@ function rt(t, e, n, r, i) {
104
104
  typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
105
105
  }
106
106
  }
107
- function In(t) {
107
+ function En(t) {
108
108
  return function(e) {
109
109
  if (this.l) {
110
110
  var n = this.l[e.type + t];
111
- if (e.t == null) e.t = rn++;
111
+ if (e.t == null) e.t = sn++;
112
112
  else if (e.t < n.u) return;
113
113
  return n(m.event ? m.event(e) : e);
114
114
  }
115
115
  };
116
116
  }
117
- function on(t, e, n, r, i, s, o, l, a, u) {
118
- var d, c, p, f, g, b, w, _, k, V, W, ie, O, Rn, nt, Pe, Rt, H = e.type;
117
+ function an(t, e, n, r, i, s, o, l, a, u) {
118
+ var d, c, p, f, g, x, w, _, k, V, W, ie, O, $n, nt, qe, $t, H = e.type;
119
119
  if (e.constructor != null) return null;
120
120
  128 & n.__u && (a = !!(32 & n.__u), s = [l = e.__e = n.__e]), (d = m.__b) && d(e);
121
121
  e: if (typeof H == "function") try {
122
- if (_ = e.props, k = "prototype" in H && H.prototype.render, V = (d = H.contextType) && r[d.__c], W = d ? V ? V.props.value : d.__ : r, n.__c ? w = (c = e.__c = n.__c).__ = c.__E : (k ? e.__c = c = new H(_, W) : (e.__c = c = new z(_, W), c.constructor = H, c.render = Qi), V && V.sub(c), c.props = _, c.state || (c.state = {}), c.context = W, c.__n = r, p = c.__d = !0, c.__h = [], c._sb = []), k && c.__s == null && (c.__s = c.state), k && H.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = Z({}, c.__s)), Z(c.__s, H.getDerivedStateFromProps(_, c.__s))), f = c.props, g = c.state, c.__v = e, p) k && H.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), k && c.componentDidMount != null && c.__h.push(c.componentDidMount);
122
+ if (_ = e.props, k = "prototype" in H && H.prototype.render, V = (d = H.contextType) && r[d.__c], W = d ? V ? V.props.value : d.__ : r, n.__c ? w = (c = e.__c = n.__c).__ = c.__E : (k ? e.__c = c = new H(_, W) : (e.__c = c = new B(_, W), c.constructor = H, c.render = zi), V && V.sub(c), c.props = _, c.state || (c.state = {}), c.context = W, c.__n = r, p = c.__d = !0, c.__h = [], c._sb = []), k && c.__s == null && (c.__s = c.state), k && H.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = X({}, c.__s)), X(c.__s, H.getDerivedStateFromProps(_, c.__s))), f = c.props, g = c.state, c.__v = e, p) k && H.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), k && c.componentDidMount != null && c.__h.push(c.componentDidMount);
123
123
  else {
124
124
  if (k && H.getDerivedStateFromProps == null && _ !== f && c.componentWillReceiveProps != null && c.componentWillReceiveProps(_, W), !c.__e && c.shouldComponentUpdate != null && c.shouldComponentUpdate(_, c.__s, W) === !1 || e.__v == n.__v) {
125
125
  for (e.__v != n.__v && (c.props = _, c.state = c.__s, c.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(xe) {
@@ -129,35 +129,35 @@ function on(t, e, n, r, i, s, o, l, a, u) {
129
129
  break e;
130
130
  }
131
131
  c.componentWillUpdate != null && c.componentWillUpdate(_, c.__s, W), k && c.componentDidUpdate != null && c.__h.push(function() {
132
- c.componentDidUpdate(f, g, b);
132
+ c.componentDidUpdate(f, g, x);
133
133
  });
134
134
  }
135
- if (c.context = W, c.props = _, c.__P = t, c.__e = !1, O = m.__r, Rn = 0, k) {
135
+ if (c.context = W, c.props = _, c.__P = t, c.__e = !1, O = m.__r, $n = 0, k) {
136
136
  for (c.state = c.__s, c.__d = !1, O && O(e), d = c.render(c.props, c.state, c.context), nt = 0; nt < c._sb.length; nt++) c.__h.push(c._sb[nt]);
137
137
  c._sb = [];
138
138
  } else do
139
139
  c.__d = !1, O && O(e), d = c.render(c.props, c.state, c.context), c.state = c.__s;
140
- while (c.__d && ++Rn < 25);
141
- c.state = c.__s, c.getChildContext != null && (r = Z(Z({}, r), c.getChildContext())), k && !p && c.getSnapshotBeforeUpdate != null && (b = c.getSnapshotBeforeUpdate(f, g)), Pe = d, d != null && d.type === F && d.key == null && (Pe = Ar(d.props.children)), l = Tr(t, Xe(Pe) ? Pe : [Pe], e, n, r, i, s, o, l, a, u), c.base = e.__e, e.__u &= -161, c.__h.length && o.push(c), w && (c.__E = c.__ = null);
140
+ while (c.__d && ++$n < 25);
141
+ c.state = c.__s, c.getChildContext != null && (r = X(X({}, r), c.getChildContext())), k && !p && c.getSnapshotBeforeUpdate != null && (x = c.getSnapshotBeforeUpdate(f, g)), qe = d, d != null && d.type === D && d.key == null && (qe = Ir(d.props.children)), l = Rr(t, Xe(qe) ? qe : [qe], e, n, r, i, s, o, l, a, u), c.base = e.__e, e.__u &= -161, c.__h.length && o.push(c), w && (c.__E = c.__ = null);
142
142
  } catch (xe) {
143
143
  if (e.__v = null, a || s != null) if (xe.then) {
144
144
  for (e.__u |= a ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
145
145
  s[s.indexOf(l)] = null, e.__e = l;
146
146
  } else {
147
- for (Rt = s.length; Rt--; ) sn(s[Rt]);
148
- Dt(e);
147
+ for ($t = s.length; $t--; ) on(s[$t]);
148
+ Ut(e);
149
149
  }
150
- else e.__e = n.__e, e.__k = n.__k, xe.then || Dt(e);
150
+ else e.__e = n.__e, e.__k = n.__k, xe.then || Ut(e);
151
151
  m.__e(xe, e, n);
152
152
  }
153
- else s == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = Ni(n.__e, e, n, r, i, s, o, a, u);
153
+ else s == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = Qi(n.__e, e, n, r, i, s, o, a, u);
154
154
  return (d = m.diffed) && d(e), 128 & e.__u ? void 0 : l;
155
155
  }
156
- function Dt(t) {
157
- t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(Dt);
156
+ function Ut(t) {
157
+ t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(Ut);
158
158
  }
159
- function $r(t, e, n) {
160
- for (var r = 0; r < n.length; r++) an(n[r], n[++r], n[++r]);
159
+ function Ar(t, e, n) {
160
+ for (var r = 0; r < n.length; r++) ln(n[r], n[++r], n[++r]);
161
161
  m.__c && m.__c(e, t), t.some(function(i) {
162
162
  try {
163
163
  t = i.__h, i.__h = [], t.some(function(s) {
@@ -168,11 +168,11 @@ function $r(t, e, n) {
168
168
  }
169
169
  });
170
170
  }
171
- function Ar(t) {
172
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Xe(t) ? t.map(Ar) : Z({}, t);
171
+ function Ir(t) {
172
+ return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Xe(t) ? t.map(Ir) : X({}, t);
173
173
  }
174
- function Ni(t, e, n, r, i, s, o, l, a) {
175
- var u, d, c, p, f, g, b, w = n.props, _ = e.props, k = e.type;
174
+ function Qi(t, e, n, r, i, s, o, l, a) {
175
+ var u, d, c, p, f, g, x, w = n.props, _ = e.props, k = e.type;
176
176
  if (k == "svg" ? i = "http://www.w3.org/2000/svg" : k == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), s != null) {
177
177
  for (u = 0; u < s.length; u++) if ((f = s[u]) && "setAttribute" in f == !!k && (k ? f.localName == k : f.nodeType == 3)) {
178
178
  t = f, s[u] = null;
@@ -193,14 +193,14 @@ function Ni(t, e, n, r, i, s, o, l, a) {
193
193
  rt(t, u, null, f, i);
194
194
  }
195
195
  }
196
- for (u in _) f = _[u], u == "children" ? p = f : u == "dangerouslySetInnerHTML" ? d = f : u == "value" ? g = f : u == "checked" ? b = f : l && typeof f != "function" || w[u] === f || rt(t, u, f, w[u], i);
196
+ for (u in _) f = _[u], u == "children" ? p = f : u == "dangerouslySetInnerHTML" ? d = f : u == "value" ? g = f : u == "checked" ? x = f : l && typeof f != "function" || w[u] === f || rt(t, u, f, w[u], i);
197
197
  if (d) l || c && (d.__html == c.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
198
- else if (c && (t.innerHTML = ""), Tr(e.type == "template" ? t.content : t, Xe(p) ? p : [p], e, n, r, k == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, s, o, s ? s[0] : n.__k && je(n, 0), l, a), s != null) for (u = s.length; u--; ) sn(s[u]);
199
- l || (u = "value", k == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[u] || k == "progress" && !g || k == "option" && g != w[u]) && rt(t, u, g, w[u], i), u = "checked", b != null && b != t[u] && rt(t, u, b, w[u], i));
198
+ else if (c && (t.innerHTML = ""), Rr(e.type == "template" ? t.content : t, Xe(p) ? p : [p], e, n, r, k == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, s, o, s ? s[0] : n.__k && je(n, 0), l, a), s != null) for (u = s.length; u--; ) on(s[u]);
199
+ l || (u = "value", k == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[u] || k == "progress" && !g || k == "option" && g != w[u]) && rt(t, u, g, w[u], i), u = "checked", x != null && x != t[u] && rt(t, u, x, w[u], i));
200
200
  }
201
201
  return t;
202
202
  }
203
- function an(t, e, n) {
203
+ function ln(t, e, n) {
204
204
  try {
205
205
  if (typeof t == "function") {
206
206
  var r = typeof t.__u == "function";
@@ -210,9 +210,9 @@ function an(t, e, n) {
210
210
  m.__e(i, n);
211
211
  }
212
212
  }
213
- function Ir(t, e, n) {
213
+ function Er(t, e, n) {
214
214
  var r, i;
215
- if (m.unmount && m.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || an(r, null, e)), (r = t.__c) != null) {
215
+ if (m.unmount && m.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || ln(r, null, e)), (r = t.__c) != null) {
216
216
  if (r.componentWillUnmount) try {
217
217
  r.componentWillUnmount();
218
218
  } catch (s) {
@@ -220,25 +220,25 @@ function Ir(t, e, n) {
220
220
  }
221
221
  r.base = r.__P = null;
222
222
  }
223
- if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && Ir(r[i], e, n || typeof t.type != "function");
224
- n || sn(t.__e), t.__c = t.__ = t.__e = void 0;
223
+ if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && Er(r[i], e, n || typeof t.type != "function");
224
+ n || on(t.__e), t.__c = t.__ = t.__e = void 0;
225
225
  }
226
- function Qi(t, e, n) {
226
+ function zi(t, e, n) {
227
227
  return this.constructor(t, n);
228
228
  }
229
229
  function he(t, e, n) {
230
230
  var r, i, s, o;
231
- e == document && (e = document.documentElement), m.__ && m.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, s = [], o = [], on(e, t = (!r && n || e).__k = re(F, null, [t]), i || Ve, Ve, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? Ze.call(e.childNodes) : null, s, !r && n ? n : i ? i.__e : e.firstChild, r, o), $r(s, t, o);
231
+ e == document && (e = document.documentElement), m.__ && m.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, s = [], o = [], an(e, t = (!r && n || e).__k = re(D, null, [t]), i || Ve, Ve, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? Ze.call(e.childNodes) : null, s, !r && n ? n : i ? i.__e : e.firstChild, r, o), Ar(s, t, o);
232
232
  }
233
- function Er(t, e) {
234
- he(t, e, Er);
233
+ function Pr(t, e) {
234
+ he(t, e, Pr);
235
235
  }
236
- function zi(t, e, n) {
237
- var r, i, s, o, l = Z({}, t.props);
236
+ function Bi(t, e, n) {
237
+ var r, i, s, o, l = X({}, t.props);
238
238
  for (s in t.type && t.type.defaultProps && (o = t.type.defaultProps), e) s == "key" ? r = e[s] : s == "ref" ? i = e[s] : l[s] = e[s] === void 0 && o != null ? o[s] : e[s];
239
239
  return arguments.length > 2 && (l.children = arguments.length > 3 ? Ze.call(arguments, 2) : n), Be(t.type, l, r || t.key, i || t.ref, null);
240
240
  }
241
- function Bi(t) {
241
+ function Fi(t) {
242
242
  function e(n) {
243
243
  var r, i;
244
244
  return this.getChildContext || (r = /* @__PURE__ */ new Set(), (i = {})[e.__c] = this, this.getChildContext = function() {
@@ -247,7 +247,7 @@ function Bi(t) {
247
247
  r = null;
248
248
  }, this.shouldComponentUpdate = function(s) {
249
249
  this.props.value != s.value && r.forEach(function(o) {
250
- o.__e = !0, Ft(o);
250
+ o.__e = !0, Dt(o);
251
251
  });
252
252
  }, this.sub = function(s) {
253
253
  r.add(s);
@@ -257,46 +257,46 @@ function Bi(t) {
257
257
  };
258
258
  }), n.children;
259
259
  }
260
- return e.__c = "__cC" + Sr++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
260
+ return e.__c = "__cC" + jr++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
261
261
  return n.children(r);
262
262
  }).contextType = e, e;
263
263
  }
264
- Ze = jr.slice, m = { __e: function(t, e, n, r) {
264
+ Ze = Cr.slice, m = { __e: function(t, e, n, r) {
265
265
  for (var i, s, o; e = e.__; ) if ((i = e.__c) && !i.__) try {
266
266
  if ((s = i.constructor) && s.getDerivedStateFromError != null && (i.setState(s.getDerivedStateFromError(t)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), o = i.__d), o) return i.__E = i;
267
267
  } catch (l) {
268
268
  t = l;
269
269
  }
270
270
  throw t;
271
- } }, yr = 0, vr = function(t) {
271
+ } }, vr = 0, _r = function(t) {
272
272
  return t != null && t.constructor == null;
273
- }, z.prototype.setState = function(t, e) {
273
+ }, B.prototype.setState = function(t, e) {
274
274
  var n;
275
- n = this.__s != null && this.__s != this.state ? this.__s : this.__s = Z({}, this.state), typeof t == "function" && (t = t(Z({}, n), this.props)), t && Z(n, t), t != null && this.__v && (e && this._sb.push(e), Ft(this));
276
- }, z.prototype.forceUpdate = function(t) {
277
- this.__v && (this.__e = !0, t && this.__h.push(t), Ft(this));
278
- }, z.prototype.render = F, le = [], _r = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, kr = function(t, e) {
275
+ n = this.__s != null && this.__s != this.state ? this.__s : this.__s = X({}, this.state), typeof t == "function" && (t = t(X({}, n), this.props)), t && X(n, t), t != null && this.__v && (e && this._sb.push(e), Dt(this));
276
+ }, B.prototype.forceUpdate = function(t) {
277
+ this.__v && (this.__e = !0, t && this.__h.push(t), Dt(this));
278
+ }, B.prototype.render = D, le = [], kr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, wr = function(t, e) {
279
279
  return t.__v.__b - e.__v.__b;
280
- }, ht.__r = 0, wr = /(PointerCapture)$|Capture$/i, rn = 0, zt = In(!1), Bt = In(!0), Sr = 0;
281
- var Fi = 0;
280
+ }, ht.__r = 0, Sr = /(PointerCapture)$|Capture$/i, sn = 0, Bt = En(!1), Ft = En(!0), jr = 0;
281
+ var Di = 0;
282
282
  function h(t, e, n, r, i, s) {
283
283
  e || (e = {});
284
284
  var o, l, a = e;
285
285
  if ("ref" in a) for (l in a = {}, e) l == "ref" ? o = e[l] : a[l] = e[l];
286
- var u = { type: t, props: a, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Fi, __i: -1, __u: 0, __source: i, __self: s };
286
+ var u = { type: t, props: a, key: n, ref: o, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Di, __i: -1, __u: 0, __source: i, __self: s };
287
287
  if (typeof t == "function" && (o = t.defaultProps)) for (l in o) a[l] === void 0 && (a[l] = o[l]);
288
288
  return m.vnode && m.vnode(u), u;
289
289
  }
290
- var oe, S, $t, En, Ce = 0, qr = [], j = m, qn = j.__b, Pn = j.__r, Mn = j.diffed, Ln = j.__c, On = j.unmount, Nn = j.__;
290
+ var oe, S, At, Pn, Ce = 0, qr = [], j = m, qn = j.__b, Mn = j.__r, Ln = j.diffed, Nn = j.__c, On = j.unmount, Qn = j.__;
291
291
  function Ae(t, e) {
292
292
  j.__h && j.__h(S, t, Ce || e), Ce = 0;
293
293
  var n = S.__H || (S.__H = { __: [], __h: [] });
294
294
  return t >= n.__.length && n.__.push({}), n.__[t];
295
295
  }
296
296
  function R(t) {
297
- return Ce = 1, ln(Or, t);
297
+ return Ce = 1, cn(Or, t);
298
298
  }
299
- function ln(t, e, n) {
299
+ function cn(t, e, n) {
300
300
  var r = Ae(oe++, 2);
301
301
  if (r.t = t, !r.__c && (r.__ = [n ? n(e) : Or(void 0, e), function(l) {
302
302
  var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
@@ -330,20 +330,20 @@ function ln(t, e, n) {
330
330
  }
331
331
  return r.__N || r.__;
332
332
  }
333
- function D(t, e) {
333
+ function N(t, e) {
334
334
  var n = Ae(oe++, 3);
335
- !j.__s && cn(n.__H, e) && (n.__ = t, n.u = e, S.__H.__h.push(n));
335
+ !j.__s && un(n.__H, e) && (n.__ = t, n.u = e, S.__H.__h.push(n));
336
336
  }
337
337
  function Ye(t, e) {
338
338
  var n = Ae(oe++, 4);
339
- !j.__s && cn(n.__H, e) && (n.__ = t, n.u = e, S.__h.push(n));
339
+ !j.__s && un(n.__H, e) && (n.__ = t, n.u = e, S.__h.push(n));
340
340
  }
341
- function vt(t) {
341
+ function _t(t) {
342
342
  return Ce = 5, U(function() {
343
343
  return { current: t };
344
344
  }, []);
345
345
  }
346
- function Pr(t, e, n) {
346
+ function Mr(t, e, n) {
347
347
  Ce = 6, Ye(function() {
348
348
  if (typeof t == "function") {
349
349
  var r = t(e());
@@ -358,21 +358,21 @@ function Pr(t, e, n) {
358
358
  }
359
359
  function U(t, e) {
360
360
  var n = Ae(oe++, 7);
361
- return cn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
361
+ return un(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
362
362
  }
363
363
  function We(t, e) {
364
364
  return Ce = 8, U(function() {
365
365
  return t;
366
366
  }, e);
367
367
  }
368
- function _t(t) {
368
+ function kt(t) {
369
369
  var e = S.context[t.__c], n = Ae(oe++, 9);
370
370
  return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(S)), e.props.value) : t.__;
371
371
  }
372
- function Mr(t, e) {
372
+ function Lr(t, e) {
373
373
  j.useDebugValue && j.useDebugValue(e ? e(t) : t);
374
374
  }
375
- function Lr() {
375
+ function Nr() {
376
376
  var t = Ae(oe++, 11);
377
377
  if (!t.__) {
378
378
  for (var e = S.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
@@ -381,9 +381,9 @@ function Lr() {
381
381
  }
382
382
  return t.__;
383
383
  }
384
- function Di() {
384
+ function Ui() {
385
385
  for (var t; t = qr.shift(); ) if (t.__P && t.__H) try {
386
- t.__H.__h.forEach(lt), t.__H.__h.forEach(Ut), t.__H.__h = [];
386
+ t.__H.__h.forEach(lt), t.__H.__h.forEach(Vt), t.__H.__h = [];
387
387
  } catch (e) {
388
388
  t.__H.__h = [], j.__e(e, t.__v);
389
389
  }
@@ -391,31 +391,31 @@ function Di() {
391
391
  j.__b = function(t) {
392
392
  S = null, qn && qn(t);
393
393
  }, j.__ = function(t, e) {
394
- t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Nn && Nn(t, e);
394
+ t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Qn && Qn(t, e);
395
395
  }, j.__r = function(t) {
396
- Pn && Pn(t), oe = 0;
396
+ Mn && Mn(t), oe = 0;
397
397
  var e = (S = t.__c).__H;
398
- e && ($t === S ? (e.__h = [], S.__h = [], e.__.forEach(function(n) {
398
+ e && (At === S ? (e.__h = [], S.__h = [], e.__.forEach(function(n) {
399
399
  n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
400
- })) : (e.__h.forEach(lt), e.__h.forEach(Ut), e.__h = [], oe = 0)), $t = S;
400
+ })) : (e.__h.forEach(lt), e.__h.forEach(Vt), e.__h = [], oe = 0)), At = S;
401
401
  }, j.diffed = function(t) {
402
- Mn && Mn(t);
402
+ Ln && Ln(t);
403
403
  var e = t.__c;
404
- e && e.__H && (e.__H.__h.length && (qr.push(e) !== 1 && En === j.requestAnimationFrame || ((En = j.requestAnimationFrame) || Ui)(Di)), e.__H.__.forEach(function(n) {
404
+ e && e.__H && (e.__H.__h.length && (qr.push(e) !== 1 && Pn === j.requestAnimationFrame || ((Pn = j.requestAnimationFrame) || Vi)(Ui)), e.__H.__.forEach(function(n) {
405
405
  n.u && (n.__H = n.u), n.u = void 0;
406
- })), $t = S = null;
406
+ })), At = S = null;
407
407
  }, j.__c = function(t, e) {
408
408
  e.some(function(n) {
409
409
  try {
410
410
  n.__h.forEach(lt), n.__h = n.__h.filter(function(r) {
411
- return !r.__ || Ut(r);
411
+ return !r.__ || Vt(r);
412
412
  });
413
413
  } catch (r) {
414
414
  e.some(function(i) {
415
415
  i.__h && (i.__h = []);
416
416
  }), e = [], j.__e(r, n.__v);
417
417
  }
418
- }), Ln && Ln(t, e);
418
+ }), Nn && Nn(t, e);
419
419
  }, j.unmount = function(t) {
420
420
  On && On(t);
421
421
  var e, n = t.__c;
@@ -427,22 +427,22 @@ j.__b = function(t) {
427
427
  }
428
428
  }), n.__H = void 0, e && j.__e(e, n.__v));
429
429
  };
430
- var Qn = typeof requestAnimationFrame == "function";
431
- function Ui(t) {
430
+ var zn = typeof requestAnimationFrame == "function";
431
+ function Vi(t) {
432
432
  var e, n = function() {
433
- clearTimeout(r), Qn && cancelAnimationFrame(e), setTimeout(t);
433
+ clearTimeout(r), zn && cancelAnimationFrame(e), setTimeout(t);
434
434
  }, r = setTimeout(n, 35);
435
- Qn && (e = requestAnimationFrame(n));
435
+ zn && (e = requestAnimationFrame(n));
436
436
  }
437
437
  function lt(t) {
438
438
  var e = S, n = t.__c;
439
439
  typeof n == "function" && (t.__c = void 0, n()), S = e;
440
440
  }
441
- function Ut(t) {
441
+ function Vt(t) {
442
442
  var e = S;
443
443
  t.__c = t.__(), S = e;
444
444
  }
445
- function cn(t, e) {
445
+ function un(t, e) {
446
446
  return !t || t.length !== e.length || e.some(function(n, r) {
447
447
  return n !== t[r];
448
448
  });
@@ -450,26 +450,26 @@ function cn(t, e) {
450
450
  function Or(t, e) {
451
451
  return typeof e == "function" ? e(t) : e;
452
452
  }
453
- function Nr(t, e) {
453
+ function Qr(t, e) {
454
454
  for (var n in e) t[n] = e[n];
455
455
  return t;
456
456
  }
457
- function Vt(t, e) {
457
+ function Wt(t, e) {
458
458
  for (var n in t) if (n !== "__source" && !(n in e)) return !0;
459
459
  for (var r in e) if (r !== "__source" && t[r] !== e[r]) return !0;
460
460
  return !1;
461
461
  }
462
- function Qr(t, e) {
462
+ function zr(t, e) {
463
463
  var n = e(), r = R({ t: { __: n, u: e } }), i = r[0].t, s = r[1];
464
464
  return Ye(function() {
465
- i.__ = n, i.u = e, At(i) && s({ t: i });
466
- }, [t, n, e]), D(function() {
467
- return At(i) && s({ t: i }), t(function() {
468
- At(i) && s({ t: i });
465
+ i.__ = n, i.u = e, It(i) && s({ t: i });
466
+ }, [t, n, e]), N(function() {
467
+ return It(i) && s({ t: i }), t(function() {
468
+ It(i) && s({ t: i });
469
469
  });
470
470
  }, [t]), n;
471
471
  }
472
- function At(t) {
472
+ function It(t) {
473
473
  var e, n, r = t.u, i = t.__;
474
474
  try {
475
475
  var s = r();
@@ -478,80 +478,80 @@ function At(t) {
478
478
  return !0;
479
479
  }
480
480
  }
481
- function zr(t) {
481
+ function Br(t) {
482
482
  t();
483
483
  }
484
- function Br(t) {
484
+ function Fr(t) {
485
485
  return t;
486
486
  }
487
- function Fr() {
488
- return [!1, zr];
487
+ function Dr() {
488
+ return [!1, Br];
489
489
  }
490
- var Dr = Ye;
491
- function Wt(t, e) {
490
+ var Ur = Ye;
491
+ function Ht(t, e) {
492
492
  this.props = t, this.context = e;
493
493
  }
494
- function Vi(t, e) {
494
+ function Wi(t, e) {
495
495
  function n(i) {
496
496
  var s = this.props.ref, o = s == i.ref;
497
- return !o && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !o : Vt(this.props, i);
497
+ return !o && s && (s.call ? s(null) : s.current = null), e ? !e(this.props, i) || !o : Wt(this.props, i);
498
498
  }
499
499
  function r(i) {
500
500
  return this.shouldComponentUpdate = n, re(t, i);
501
501
  }
502
502
  return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r.type = t, r;
503
503
  }
504
- (Wt.prototype = new z()).isPureReactComponent = !0, Wt.prototype.shouldComponentUpdate = function(t, e) {
505
- return Vt(this.props, t) || Vt(this.state, e);
504
+ (Ht.prototype = new B()).isPureReactComponent = !0, Ht.prototype.shouldComponentUpdate = function(t, e) {
505
+ return Wt(this.props, t) || Wt(this.state, e);
506
506
  };
507
- var zn = m.__b;
507
+ var Bn = m.__b;
508
508
  m.__b = function(t) {
509
- t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), zn && zn(t);
509
+ t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Bn && Bn(t);
510
510
  };
511
- var Wi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
512
- function Hi(t) {
511
+ var Hi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
512
+ function Ji(t) {
513
513
  function e(n) {
514
- var r = Nr({}, n);
514
+ var r = Qr({}, n);
515
515
  return delete r.ref, t(r, n.ref || null);
516
516
  }
517
- return e.$$typeof = Wi, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
517
+ return e.$$typeof = Hi, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
518
518
  }
519
- var Bn = function(t, e) {
519
+ var Fn = function(t, e) {
520
520
  return t == null ? null : ne(ne(t).map(e));
521
- }, Ji = { map: Bn, forEach: Bn, count: function(t) {
521
+ }, Gi = { map: Fn, forEach: Fn, count: function(t) {
522
522
  return t ? ne(t).length : 0;
523
523
  }, only: function(t) {
524
524
  var e = ne(t);
525
525
  if (e.length !== 1) throw "Children.only";
526
526
  return e[0];
527
- }, toArray: ne }, Gi = m.__e;
527
+ }, toArray: ne }, Ki = m.__e;
528
528
  m.__e = function(t, e, n, r) {
529
529
  if (t.then) {
530
530
  for (var i, s = e; s = s.__; ) if ((i = s.__c) && i.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
531
531
  }
532
- Gi(t, e, n, r);
532
+ Ki(t, e, n, r);
533
533
  };
534
- var Fn = m.unmount;
535
- function Ur(t, e, n) {
534
+ var Dn = m.unmount;
535
+ function Vr(t, e, n) {
536
536
  return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
537
537
  typeof r.__c == "function" && r.__c();
538
- }), t.__c.__H = null), (t = Nr({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c.__e = !0, t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
539
- return Ur(r, e, n);
538
+ }), t.__c.__H = null), (t = Qr({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c.__e = !0, t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
539
+ return Vr(r, e, n);
540
540
  })), t;
541
541
  }
542
- function Vr(t, e, n) {
542
+ function Wr(t, e, n) {
543
543
  return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
544
- return Vr(r, e, n);
544
+ return Wr(r, e, n);
545
545
  }), t.__c && t.__c.__P === e && (t.__e && n.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = n)), t;
546
546
  }
547
547
  function ct() {
548
548
  this.__u = 0, this.o = null, this.__b = null;
549
549
  }
550
- function Wr(t) {
550
+ function Hr(t) {
551
551
  var e = t.__.__c;
552
552
  return e && e.__a && e.__a(t);
553
553
  }
554
- function Ki(t) {
554
+ function Zi(t) {
555
555
  var e, n, r;
556
556
  function i(s) {
557
557
  if (e || (e = t()).then(function(o) {
@@ -564,16 +564,16 @@ function Ki(t) {
564
564
  }
565
565
  return i.displayName = "Lazy", i.__f = !0, i;
566
566
  }
567
- function Ne() {
567
+ function Oe() {
568
568
  this.i = null, this.l = null;
569
569
  }
570
570
  m.unmount = function(t) {
571
571
  var e = t.__c;
572
- e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), Fn && Fn(t);
573
- }, (ct.prototype = new z()).__c = function(t, e) {
572
+ e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), Dn && Dn(t);
573
+ }, (ct.prototype = new B()).__c = function(t, e) {
574
574
  var n = e.__c, r = this;
575
575
  r.o == null && (r.o = []), r.o.push(n);
576
- var i = Wr(r.__v), s = !1, o = function() {
576
+ var i = Hr(r.__v), s = !1, o = function() {
577
577
  s || (s = !0, n.__R = null, i ? i(l) : l());
578
578
  };
579
579
  n.__R = o;
@@ -581,7 +581,7 @@ m.unmount = function(t) {
581
581
  if (!--r.__u) {
582
582
  if (r.state.__a) {
583
583
  var a = r.state.__a;
584
- r.__v.__k[0] = Vr(a, a.__c.__P, a.__c.__O);
584
+ r.__v.__k[0] = Wr(a, a.__c.__P, a.__c.__O);
585
585
  }
586
586
  var u;
587
587
  for (r.setState({ __a: r.__b = null }); u = r.o.pop(); ) u.forceUpdate();
@@ -594,26 +594,26 @@ m.unmount = function(t) {
594
594
  if (this.__b) {
595
595
  if (this.__v.__k) {
596
596
  var n = document.createElement("div"), r = this.__v.__k[0].__c;
597
- this.__v.__k[0] = Ur(this.__b, n, r.__O = r.__P);
597
+ this.__v.__k[0] = Vr(this.__b, n, r.__O = r.__P);
598
598
  }
599
599
  this.__b = null;
600
600
  }
601
- var i = e.__a && re(F, null, t.fallback);
602
- return i && (i.__u &= -33), [re(F, null, e.__a ? null : t.children), i];
601
+ var i = e.__a && re(D, null, t.fallback);
602
+ return i && (i.__u &= -33), [re(D, null, e.__a ? null : t.children), i];
603
603
  };
604
- var Dn = function(t, e, n) {
604
+ var Un = function(t, e, n) {
605
605
  if (++n[1] === n[0] && t.l.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.l.size)) for (n = t.i; n; ) {
606
606
  for (; n.length > 3; ) n.pop()();
607
607
  if (n[1] < n[0]) break;
608
608
  t.i = n = n[2];
609
609
  }
610
610
  };
611
- function Zi(t) {
611
+ function Xi(t) {
612
612
  return this.getChildContext = function() {
613
613
  return t.context;
614
614
  }, t.children;
615
615
  }
616
- function Xi(t) {
616
+ function Yi(t) {
617
617
  var e = this, n = t.h;
618
618
  if (e.componentWillUnmount = function() {
619
619
  he(null, e.v), e.v = null, e.h = null;
@@ -627,124 +627,124 @@ function Xi(t) {
627
627
  this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
628
628
  } };
629
629
  }
630
- he(re(Zi, { context: e.context }, t.__v), e.v);
630
+ he(re(Xi, { context: e.context }, t.__v), e.v);
631
631
  }
632
- function Yi(t, e) {
633
- var n = re(Xi, { __v: t, h: e });
632
+ function es(t, e) {
633
+ var n = re(Yi, { __v: t, h: e });
634
634
  return n.containerInfo = e, n;
635
635
  }
636
- (Ne.prototype = new z()).__a = function(t) {
637
- var e = this, n = Wr(e.__v), r = e.l.get(t);
636
+ (Oe.prototype = new B()).__a = function(t) {
637
+ var e = this, n = Hr(e.__v), r = e.l.get(t);
638
638
  return r[0]++, function(i) {
639
639
  var s = function() {
640
- e.props.revealOrder ? (r.push(i), Dn(e, t, r)) : i();
640
+ e.props.revealOrder ? (r.push(i), Un(e, t, r)) : i();
641
641
  };
642
642
  n ? n(s) : s();
643
643
  };
644
- }, Ne.prototype.render = function(t) {
644
+ }, Oe.prototype.render = function(t) {
645
645
  this.i = null, this.l = /* @__PURE__ */ new Map();
646
646
  var e = ne(t.children);
647
647
  t.revealOrder && t.revealOrder[0] === "b" && e.reverse();
648
648
  for (var n = e.length; n--; ) this.l.set(e[n], this.i = [1, 0, this.i]);
649
649
  return t.children;
650
- }, Ne.prototype.componentDidUpdate = Ne.prototype.componentDidMount = function() {
650
+ }, Oe.prototype.componentDidUpdate = Oe.prototype.componentDidMount = function() {
651
651
  var t = this;
652
652
  this.l.forEach(function(e, n) {
653
- Dn(t, n, e);
653
+ Un(t, n, e);
654
654
  });
655
655
  };
656
- var Hr = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, es = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ts = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ns = /[A-Z0-9]/g, rs = typeof document < "u", is = function(t) {
656
+ var Jr = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, ts = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, ns = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, rs = /[A-Z0-9]/g, is = typeof document < "u", ss = function(t) {
657
657
  return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
658
658
  };
659
- function ss(t, e, n) {
659
+ function os(t, e, n) {
660
660
  return e.__k == null && (e.textContent = ""), he(t, e), typeof n == "function" && n(), t ? t.__c : null;
661
661
  }
662
- function os(t, e, n) {
663
- return Er(t, e), typeof n == "function" && n(), t ? t.__c : null;
662
+ function as(t, e, n) {
663
+ return Pr(t, e), typeof n == "function" && n(), t ? t.__c : null;
664
664
  }
665
- z.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
666
- Object.defineProperty(z.prototype, t, { configurable: !0, get: function() {
665
+ B.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
666
+ Object.defineProperty(B.prototype, t, { configurable: !0, get: function() {
667
667
  return this["UNSAFE_" + t];
668
668
  }, set: function(e) {
669
669
  Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
670
670
  } });
671
671
  });
672
- var Un = m.event;
673
- function as() {
674
- }
672
+ var Vn = m.event;
675
673
  function ls() {
676
- return this.cancelBubble;
677
674
  }
678
675
  function cs() {
676
+ return this.cancelBubble;
677
+ }
678
+ function us() {
679
679
  return this.defaultPrevented;
680
680
  }
681
681
  m.event = function(t) {
682
- return Un && (t = Un(t)), t.persist = as, t.isPropagationStopped = ls, t.isDefaultPrevented = cs, t.nativeEvent = t;
682
+ return Vn && (t = Vn(t)), t.persist = ls, t.isPropagationStopped = cs, t.isDefaultPrevented = us, t.nativeEvent = t;
683
683
  };
684
- var un, us = { enumerable: !1, configurable: !0, get: function() {
684
+ var hn, hs = { enumerable: !1, configurable: !0, get: function() {
685
685
  return this.class;
686
- } }, Vn = m.vnode;
686
+ } }, Wn = m.vnode;
687
687
  m.vnode = function(t) {
688
688
  typeof t.type == "string" && (function(e) {
689
689
  var n = e.props, r = e.type, i = {}, s = r.indexOf("-") === -1;
690
690
  for (var o in n) {
691
691
  var l = n[o];
692
- if (!(o === "value" && "defaultValue" in n && l == null || rs && o === "children" && r === "noscript" || o === "class" || o === "className")) {
692
+ if (!(o === "value" && "defaultValue" in n && l == null || is && o === "children" && r === "noscript" || o === "class" || o === "className")) {
693
693
  var a = o.toLowerCase();
694
- o === "defaultValue" && "value" in n && n.value == null ? o = "value" : o === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? o = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || is(n.type) ? a === "onfocus" ? o = "onfocusin" : a === "onblur" ? o = "onfocusout" : ts.test(o) && (o = a) : a = o = "oninput" : s && es.test(o) ? o = o.replace(ns, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[o = a] && (o = "oninputCapture"), i[o] = l;
694
+ o === "defaultValue" && "value" in n && n.value == null ? o = "value" : o === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? o = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || ss(n.type) ? a === "onfocus" ? o = "onfocusin" : a === "onblur" ? o = "onfocusout" : ns.test(o) && (o = a) : a = o = "oninput" : s && ts.test(o) ? o = o.replace(rs, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[o = a] && (o = "oninputCapture"), i[o] = l;
695
695
  }
696
696
  }
697
697
  r == "select" && i.multiple && Array.isArray(i.value) && (i.value = ne(n.children).forEach(function(u) {
698
698
  u.props.selected = i.value.indexOf(u.props.value) != -1;
699
699
  })), r == "select" && i.defaultValue != null && (i.value = ne(n.children).forEach(function(u) {
700
700
  u.props.selected = i.multiple ? i.defaultValue.indexOf(u.props.value) != -1 : i.defaultValue == u.props.value;
701
- })), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", us)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
702
- })(t), t.$$typeof = Hr, Vn && Vn(t);
701
+ })), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", hs)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
702
+ })(t), t.$$typeof = Jr, Wn && Wn(t);
703
703
  };
704
- var Wn = m.__r;
704
+ var Hn = m.__r;
705
705
  m.__r = function(t) {
706
- Wn && Wn(t), un = t.__c;
706
+ Hn && Hn(t), hn = t.__c;
707
707
  };
708
- var Hn = m.diffed;
708
+ var Jn = m.diffed;
709
709
  m.diffed = function(t) {
710
- Hn && Hn(t);
710
+ Jn && Jn(t);
711
711
  var e = t.props, n = t.__e;
712
- n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), un = null;
712
+ n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), hn = null;
713
713
  };
714
- var hs = { ReactCurrentDispatcher: { current: { readContext: function(t) {
715
- return un.__n[t.__c].props.value;
716
- }, useCallback: We, useContext: _t, useDebugValue: Mr, useDeferredValue: Br, useEffect: D, useId: Lr, useImperativeHandle: Pr, useInsertionEffect: Dr, useLayoutEffect: Ye, useMemo: U, useReducer: ln, useRef: vt, useState: R, useSyncExternalStore: Qr, useTransition: Fr } } };
717
- function ds(t) {
714
+ var ds = { ReactCurrentDispatcher: { current: { readContext: function(t) {
715
+ return hn.__n[t.__c].props.value;
716
+ }, useCallback: We, useContext: kt, useDebugValue: Lr, useDeferredValue: Fr, useEffect: N, useId: Nr, useImperativeHandle: Mr, useInsertionEffect: Ur, useLayoutEffect: Ye, useMemo: U, useReducer: cn, useRef: _t, useState: R, useSyncExternalStore: zr, useTransition: Dr } } };
717
+ function fs(t) {
718
718
  return re.bind(null, t);
719
719
  }
720
- function kt(t) {
721
- return !!t && t.$$typeof === Hr;
722
- }
723
- function fs(t) {
724
- return kt(t) && t.type === F;
720
+ function wt(t) {
721
+ return !!t && t.$$typeof === Jr;
725
722
  }
726
723
  function ps(t) {
727
- return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
724
+ return wt(t) && t.type === D;
728
725
  }
729
726
  function gs(t) {
730
- return kt(t) ? zi.apply(null, arguments) : t;
727
+ return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
731
728
  }
732
729
  function ms(t) {
733
- return !!t.__k && (he(null, t), !0);
730
+ return wt(t) ? Bi.apply(null, arguments) : t;
734
731
  }
735
732
  function xs(t) {
733
+ return !!t.__k && (he(null, t), !0);
734
+ }
735
+ function bs(t) {
736
736
  return t && (t.base || t.nodeType === 1 && t) || null;
737
737
  }
738
- var bs = function(t, e) {
738
+ var ys = function(t, e) {
739
739
  return t(e);
740
- }, ys = function(t, e) {
740
+ }, vs = function(t, e) {
741
741
  return t(e);
742
- }, vs = F, _s = kt, hn = { useState: R, useId: Lr, useReducer: ln, useEffect: D, useLayoutEffect: Ye, useInsertionEffect: Dr, useTransition: Fr, useDeferredValue: Br, useSyncExternalStore: Qr, startTransition: zr, useRef: vt, useImperativeHandle: Pr, useMemo: U, useCallback: We, useContext: _t, useDebugValue: Mr, version: "18.3.1", Children: Ji, render: ss, hydrate: os, unmountComponentAtNode: ms, createPortal: Yi, createElement: re, createContext: Bi, createFactory: ds, cloneElement: gs, createRef: Mi, Fragment: F, isValidElement: kt, isElement: _s, isFragment: fs, isMemo: ps, findDOMNode: xs, Component: z, PureComponent: Wt, memo: Vi, forwardRef: Hi, flushSync: ys, unstable_batchedUpdates: bs, StrictMode: vs, Suspense: ct, SuspenseList: Ne, lazy: Ki, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: hs }, K = [], L = [], ks = Uint8Array, It = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
743
- for (var be = 0, ws = It.length; be < ws; ++be)
744
- K[be] = It[be], L[It.charCodeAt(be)] = be;
742
+ }, _s = D, ks = wt, dn = { useState: R, useId: Nr, useReducer: cn, useEffect: N, useLayoutEffect: Ye, useInsertionEffect: Ur, useTransition: Dr, useDeferredValue: Fr, useSyncExternalStore: zr, startTransition: Br, useRef: _t, useImperativeHandle: Mr, useMemo: U, useCallback: We, useContext: kt, useDebugValue: Lr, version: "18.3.1", Children: Gi, render: os, hydrate: as, unmountComponentAtNode: xs, createPortal: es, createElement: re, createContext: Fi, createFactory: fs, cloneElement: ms, createRef: Li, Fragment: D, isValidElement: wt, isElement: ks, isFragment: ps, isMemo: gs, findDOMNode: bs, Component: B, PureComponent: Ht, memo: Wi, forwardRef: Ji, flushSync: vs, unstable_batchedUpdates: ys, StrictMode: _s, Suspense: ct, SuspenseList: Oe, lazy: Zi, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ds }, Z = [], L = [], ws = Uint8Array, Et = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
743
+ for (var be = 0, Ss = Et.length; be < Ss; ++be)
744
+ Z[be] = Et[be], L[Et.charCodeAt(be)] = be;
745
745
  L[45] = 62;
746
746
  L[95] = 63;
747
- function Ss(t) {
747
+ function js(t) {
748
748
  var e = t.length;
749
749
  if (e % 4 > 0)
750
750
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -753,46 +753,46 @@ function Ss(t) {
753
753
  var r = n === e ? 0 : 4 - n % 4;
754
754
  return [n, r];
755
755
  }
756
- function js(t, e, n) {
756
+ function Cs(t, e, n) {
757
757
  return (e + n) * 3 / 4 - n;
758
758
  }
759
759
  function He(t) {
760
- var e, n = Ss(t), r = n[0], i = n[1], s = new ks(js(t, r, i)), o = 0, l = i > 0 ? r - 4 : r, a;
760
+ var e, n = js(t), r = n[0], i = n[1], s = new ws(Cs(t, r, i)), o = 0, l = i > 0 ? r - 4 : r, a;
761
761
  for (a = 0; a < l; a += 4)
762
762
  e = L[t.charCodeAt(a)] << 18 | L[t.charCodeAt(a + 1)] << 12 | L[t.charCodeAt(a + 2)] << 6 | L[t.charCodeAt(a + 3)], s[o++] = e >> 16 & 255, s[o++] = e >> 8 & 255, s[o++] = e & 255;
763
763
  return i === 2 && (e = L[t.charCodeAt(a)] << 2 | L[t.charCodeAt(a + 1)] >> 4, s[o++] = e & 255), i === 1 && (e = L[t.charCodeAt(a)] << 10 | L[t.charCodeAt(a + 1)] << 4 | L[t.charCodeAt(a + 2)] >> 2, s[o++] = e >> 8 & 255, s[o++] = e & 255), s;
764
764
  }
765
- function Cs(t) {
766
- return K[t >> 18 & 63] + K[t >> 12 & 63] + K[t >> 6 & 63] + K[t & 63];
765
+ function Ts(t) {
766
+ return Z[t >> 18 & 63] + Z[t >> 12 & 63] + Z[t >> 6 & 63] + Z[t & 63];
767
767
  }
768
- function Ts(t, e, n) {
768
+ function Rs(t, e, n) {
769
769
  for (var r, i = [], s = e; s < n; s += 3)
770
- r = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (t[s + 2] & 255), i.push(Cs(r));
770
+ r = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (t[s + 2] & 255), i.push(Ts(r));
771
771
  return i.join("");
772
772
  }
773
773
  function Je(t) {
774
774
  for (var e, n = t.length, r = n % 3, i = [], s = 16383, o = 0, l = n - r; o < l; o += s)
775
775
  i.push(
776
- Ts(
776
+ Rs(
777
777
  t,
778
778
  o,
779
779
  o + s > l ? l : o + s
780
780
  )
781
781
  );
782
- return r === 1 ? (e = t[n - 1], i.push(K[e >> 2] + K[e << 4 & 63] + "==")) : r === 2 && (e = (t[n - 2] << 8) + t[n - 1], i.push(
783
- K[e >> 10] + K[e >> 4 & 63] + K[e << 2 & 63] + "="
782
+ return r === 1 ? (e = t[n - 1], i.push(Z[e >> 2] + Z[e << 4 & 63] + "==")) : r === 2 && (e = (t[n - 2] << 8) + t[n - 1], i.push(
783
+ Z[e >> 10] + Z[e >> 4 & 63] + Z[e << 2 & 63] + "="
784
784
  )), i.join("");
785
785
  }
786
- function te(t) {
786
+ function K(t) {
787
787
  if (t === void 0)
788
788
  return {};
789
- if (!Jr(t))
789
+ if (!Gr(t))
790
790
  throw new Error(
791
791
  `The arguments to a Convex function must be an object. Received: ${t}`
792
792
  );
793
793
  return t;
794
794
  }
795
- function Rs(t) {
795
+ function $s(t) {
796
796
  if (typeof t > "u")
797
797
  throw new Error(
798
798
  "Client created with undefined deployment address. If you used an environment variable, check that it's set."
@@ -817,46 +817,46 @@ function Rs(t) {
817
817
  `Invalid deployment address: "${t}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`
818
818
  );
819
819
  }
820
- function Jr(t) {
820
+ function Gr(t) {
821
821
  const e = typeof t == "object", n = Object.getPrototypeOf(t), r = n === null || n === Object.prototype || // Objects generated from other contexts (e.g. across Node.js `vm` modules) will not satisfy the previous
822
822
  // conditions but are still simple objects.
823
823
  n?.constructor?.name === "Object";
824
824
  return e && r;
825
825
  }
826
- const Gr = !0, Te = BigInt("-9223372036854775808"), dn = BigInt("9223372036854775807"), Ht = BigInt("0"), $s = BigInt("8"), As = BigInt("256");
827
- function Kr(t) {
826
+ const Kr = !0, Te = BigInt("-9223372036854775808"), fn = BigInt("9223372036854775807"), Jt = BigInt("0"), As = BigInt("8"), Is = BigInt("256");
827
+ function Zr(t) {
828
828
  return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
829
829
  }
830
- function Is(t) {
831
- t < Ht && (t -= Te + Te);
830
+ function Es(t) {
831
+ t < Jt && (t -= Te + Te);
832
832
  let e = t.toString(16);
833
833
  e.length % 2 === 1 && (e = "0" + e);
834
834
  const n = new Uint8Array(new ArrayBuffer(8));
835
835
  let r = 0;
836
836
  for (const i of e.match(/.{2}/g).reverse())
837
- n.set([parseInt(i, 16)], r++), t >>= $s;
837
+ n.set([parseInt(i, 16)], r++), t >>= As;
838
838
  return Je(n);
839
839
  }
840
- function Es(t) {
840
+ function Ps(t) {
841
841
  const e = He(t);
842
842
  if (e.byteLength !== 8)
843
843
  throw new Error(
844
844
  `Received ${e.byteLength} bytes, expected 8 for $integer`
845
845
  );
846
- let n = Ht, r = Ht;
846
+ let n = Jt, r = Jt;
847
847
  for (const i of e)
848
- n += BigInt(i) * As ** r, r++;
849
- return n > dn && (n += Te + Te), n;
848
+ n += BigInt(i) * Is ** r, r++;
849
+ return n > fn && (n += Te + Te), n;
850
850
  }
851
851
  function qs(t) {
852
- if (t < Te || dn < t)
852
+ if (t < Te || fn < t)
853
853
  throw new Error(
854
854
  `BigInt ${t} does not fit into a 64-bit signed integer.`
855
855
  );
856
856
  const e = new ArrayBuffer(8);
857
857
  return new DataView(e).setBigInt64(0, t, !0), Je(new Uint8Array(e));
858
858
  }
859
- function Ps(t) {
859
+ function Ms(t) {
860
860
  const e = He(t);
861
861
  if (e.byteLength !== 8)
862
862
  throw new Error(
@@ -864,11 +864,11 @@ function Ps(t) {
864
864
  );
865
865
  return new DataView(e.buffer).getBigInt64(0, !0);
866
866
  }
867
- const Ms = DataView.prototype.setBigInt64 ? qs : Is, Ls = DataView.prototype.getBigInt64 ? Ps : Es, Jn = 1024;
868
- function Zr(t) {
869
- if (t.length > Jn)
867
+ const Ls = DataView.prototype.setBigInt64 ? qs : Es, Ns = DataView.prototype.getBigInt64 ? Ms : Ps, Gn = 1024;
868
+ function Xr(t) {
869
+ if (t.length > Gn)
870
870
  throw new Error(
871
- `Field name ${t} exceeds maximum field name length ${Jn}.`
871
+ `Field name ${t} exceeds maximum field name length ${Gn}.`
872
872
  );
873
873
  if (t.startsWith("$"))
874
874
  throw new Error(`Field name ${t} starts with a '$', which is reserved.`);
@@ -898,7 +898,7 @@ function Re(t) {
898
898
  if (r === "$integer") {
899
899
  if (typeof t.$integer != "string")
900
900
  throw new Error(`Malformed $integer field on ${t}`);
901
- return Ls(t.$integer);
901
+ return Ns(t.$integer);
902
902
  }
903
903
  if (r === "$float") {
904
904
  if (typeof t.$float != "string")
@@ -908,8 +908,8 @@ function Re(t) {
908
908
  throw new Error(
909
909
  `Received ${i.byteLength} bytes, expected 8 for $float`
910
910
  );
911
- const o = new DataView(i.buffer).getFloat64(0, Gr);
912
- if (!Kr(o))
911
+ const o = new DataView(i.buffer).getFloat64(0, Kr);
912
+ if (!Zr(o))
913
913
  throw new Error(`Float ${o} should be encoded as a number`);
914
914
  return o;
915
915
  }
@@ -924,21 +924,21 @@ function Re(t) {
924
924
  }
925
925
  const n = {};
926
926
  for (const [r, i] of Object.entries(t))
927
- Zr(r), n[r] = Re(i);
927
+ Xr(r), n[r] = Re(i);
928
928
  return n;
929
929
  }
930
- const Gn = 16384;
930
+ const Kn = 16384;
931
931
  function Fe(t) {
932
932
  const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
933
- if (e.length > Gn) {
933
+ if (e.length > Kn) {
934
934
  const n = "[...truncated]";
935
- let r = Gn - n.length;
935
+ let r = Kn - n.length;
936
936
  const i = e.codePointAt(r - 1);
937
937
  return i !== void 0 && i > 65535 && (r -= 1), e.substring(0, r) + n;
938
938
  }
939
939
  return e;
940
940
  }
941
- function Jt(t, e, n, r) {
941
+ function Gt(t, e, n, r) {
942
942
  if (t === void 0) {
943
943
  const o = n && ` (present at path ${n} in original object ${Fe(
944
944
  e
@@ -950,16 +950,16 @@ function Jt(t, e, n, r) {
950
950
  if (t === null)
951
951
  return t;
952
952
  if (typeof t == "bigint") {
953
- if (t < Te || dn < t)
953
+ if (t < Te || fn < t)
954
954
  throw new Error(
955
955
  `BigInt ${t} does not fit into a 64-bit signed integer.`
956
956
  );
957
- return { $integer: Ms(t) };
957
+ return { $integer: Ls(t) };
958
958
  }
959
959
  if (typeof t == "number")
960
- if (Kr(t)) {
960
+ if (Zr(t)) {
961
961
  const o = new ArrayBuffer(8);
962
- return new DataView(o).setFloat64(0, t, Gr), { $float: Je(new Uint8Array(o)) };
962
+ return new DataView(o).setFloat64(0, t, Kr), { $float: Je(new Uint8Array(o)) };
963
963
  } else
964
964
  return t;
965
965
  if (typeof t == "boolean" || typeof t == "string")
@@ -968,29 +968,29 @@ function Jt(t, e, n, r) {
968
968
  return { $bytes: Je(new Uint8Array(t)) };
969
969
  if (Array.isArray(t))
970
970
  return t.map(
971
- (o, l) => Jt(o, e, n + `[${l}]`)
971
+ (o, l) => Gt(o, e, n + `[${l}]`)
972
972
  );
973
973
  if (t instanceof Set)
974
974
  throw new Error(
975
- Et(n, "Set", [...t], e)
975
+ Pt(n, "Set", [...t], e)
976
976
  );
977
977
  if (t instanceof Map)
978
978
  throw new Error(
979
- Et(n, "Map", [...t], e)
979
+ Pt(n, "Map", [...t], e)
980
980
  );
981
- if (!Jr(t)) {
981
+ if (!Gr(t)) {
982
982
  const o = t?.constructor?.name, l = o ? `${o} ` : "";
983
983
  throw new Error(
984
- Et(n, l, t, e)
984
+ Pt(n, l, t, e)
985
985
  );
986
986
  }
987
987
  const i = {}, s = Object.entries(t);
988
988
  s.sort(([o, l], [a, u]) => o === a ? 0 : o < a ? -1 : 1);
989
989
  for (const [o, l] of s)
990
- l !== void 0 && (Zr(o), i[o] = Jt(l, e, n + `.${o}`));
990
+ l !== void 0 && (Xr(o), i[o] = Gt(l, e, n + `.${o}`));
991
991
  return i;
992
992
  }
993
- function Et(t, e, n, r) {
993
+ function Pt(t, e, n, r) {
994
994
  return t ? `${e}${Fe(
995
995
  n
996
996
  )} is not a supported Convex type (present at path ${t} in original object ${Fe(
@@ -999,23 +999,23 @@ function Et(t, e, n, r) {
999
999
  n
1000
1000
  )} is not a supported Convex type.`;
1001
1001
  }
1002
- function X(t) {
1003
- return Jt(t, t, "");
1002
+ function Y(t) {
1003
+ return Gt(t, t, "");
1004
1004
  }
1005
- var Os = Object.defineProperty, Ns = (t, e, n) => e in t ? Os(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, qt = (t, e, n) => Ns(t, typeof e != "symbol" ? e + "" : e, n), Kn, Zn;
1006
- const Qs = /* @__PURE__ */ Symbol.for("ConvexError");
1007
- class Gt extends (Zn = Error, Kn = Qs, Zn) {
1005
+ var Os = Object.defineProperty, Qs = (t, e, n) => e in t ? Os(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, qt = (t, e, n) => Qs(t, typeof e != "symbol" ? e + "" : e, n), Zn, Xn;
1006
+ const zs = /* @__PURE__ */ Symbol.for("ConvexError");
1007
+ class Kt extends (Xn = Error, Zn = zs, Xn) {
1008
1008
  constructor(e) {
1009
- super(typeof e == "string" ? e : Fe(e)), qt(this, "name", "ConvexError"), qt(this, "data"), qt(this, Kn, !0), this.data = e;
1009
+ super(typeof e == "string" ? e : Fe(e)), qt(this, "name", "ConvexError"), qt(this, "data"), qt(this, Zn, !0), this.data = e;
1010
1010
  }
1011
1011
  }
1012
- const Xr = () => Array.from({ length: 4 }, () => 0);
1013
- Xr();
1014
- Xr();
1015
- const Xn = "1.35.1";
1016
- var zs = Object.defineProperty, Bs = (t, e, n) => e in t ? zs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Yn = (t, e, n) => Bs(t, typeof e != "symbol" ? e + "" : e, n);
1017
- const Fs = "color:rgb(0, 145, 255)";
1018
- function Yr(t) {
1012
+ const Yr = () => Array.from({ length: 4 }, () => 0);
1013
+ Yr();
1014
+ Yr();
1015
+ const Yn = "1.36.0";
1016
+ var Bs = Object.defineProperty, Fs = (t, e, n) => e in t ? Bs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, er = (t, e, n) => Fs(t, typeof e != "symbol" ? e + "" : e, n);
1017
+ const Ds = "color:rgb(0, 145, 255)";
1018
+ function ei(t) {
1019
1019
  switch (t) {
1020
1020
  case "query":
1021
1021
  return "Q";
@@ -1027,9 +1027,9 @@ function Yr(t) {
1027
1027
  return "?";
1028
1028
  }
1029
1029
  }
1030
- class ei {
1030
+ class ti {
1031
1031
  constructor(e) {
1032
- Yn(this, "_onLogLineFuncs"), Yn(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
1032
+ er(this, "_onLogLineFuncs"), er(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
1033
1033
  }
1034
1034
  addLogLineListener(e) {
1035
1035
  let n = Math.random().toString(36).substring(2, 15);
@@ -1057,8 +1057,8 @@ class ei {
1057
1057
  n("error", ...e);
1058
1058
  }
1059
1059
  }
1060
- function ti(t) {
1061
- const e = new ei(t);
1060
+ function ni(t) {
1061
+ const e = new ti(t);
1062
1062
  return e.addLogLineListener((n, ...r) => {
1063
1063
  switch (n) {
1064
1064
  case "debug":
@@ -1078,11 +1078,11 @@ function ti(t) {
1078
1078
  }
1079
1079
  }), e;
1080
1080
  }
1081
- function ni(t) {
1082
- return new ei(t);
1081
+ function ri(t) {
1082
+ return new ti(t);
1083
1083
  }
1084
1084
  function dt(t, e, n, r, i) {
1085
- const s = Yr(n);
1085
+ const s = ei(n);
1086
1086
  if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), e === "info") {
1087
1087
  const o = i.match(/^\[.*?\] /);
1088
1088
  if (o === null) {
@@ -1092,19 +1092,19 @@ function dt(t, e, n, r, i) {
1092
1092
  return;
1093
1093
  }
1094
1094
  const l = i.slice(1, o[0].length - 2), a = i.slice(o[0].length);
1095
- t.log(`%c[CONVEX ${s}(${r})] [${l}]`, Fs, a);
1095
+ t.log(`%c[CONVEX ${s}(${r})] [${l}]`, Ds, a);
1096
1096
  } else
1097
1097
  t.error(`[CONVEX ${s}(${r})] ${i}`);
1098
1098
  }
1099
- function Ds(t, e) {
1099
+ function Us(t, e) {
1100
1100
  const n = `[CONVEX FATAL ERROR] ${e}`;
1101
1101
  return t.error(n), new Error(n);
1102
1102
  }
1103
1103
  function _e(t, e, n) {
1104
- return `[CONVEX ${Yr(t)}(${e})] ${n.errorMessage}
1104
+ return `[CONVEX ${ei(t)}(${e})] ${n.errorMessage}
1105
1105
  Called by client`;
1106
1106
  }
1107
- function Kt(t, e) {
1107
+ function Zt(t, e) {
1108
1108
  return e.data = t.errorData, e;
1109
1109
  }
1110
1110
  function de(t) {
@@ -1115,20 +1115,20 @@ function de(t) {
1115
1115
  function ue(t, e) {
1116
1116
  return JSON.stringify({
1117
1117
  udfPath: de(t),
1118
- args: X(e)
1118
+ args: Y(e)
1119
1119
  });
1120
1120
  }
1121
- function er(t, e, n) {
1121
+ function tr(t, e, n) {
1122
1122
  const { initialNumItems: r, id: i } = n;
1123
1123
  return JSON.stringify({
1124
1124
  type: "paginated",
1125
1125
  udfPath: de(t),
1126
- args: X(e),
1127
- options: X({ initialNumItems: r, id: i })
1126
+ args: Y(e),
1127
+ options: Y({ initialNumItems: r, id: i })
1128
1128
  });
1129
1129
  }
1130
- var Us = Object.defineProperty, Vs = (t, e, n) => e in t ? Us(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, J = (t, e, n) => Vs(t, typeof e != "symbol" ? e + "" : e, n);
1131
- class Ws {
1130
+ var Vs = Object.defineProperty, Ws = (t, e, n) => e in t ? Vs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, J = (t, e, n) => Ws(t, typeof e != "symbol" ? e + "" : e, n);
1131
+ class Hs {
1132
1132
  constructor() {
1133
1133
  J(this, "nextQueryId"), J(this, "querySetVersion"), J(this, "querySet"), J(this, "queryIdToToken"), J(this, "identityVersion"), J(this, "auth"), J(this, "outstandingQueriesOlderThanRestart"), J(this, "outstandingAuthOlderThanRestart"), J(this, "paused"), J(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
1134
1134
  }
@@ -1160,7 +1160,7 @@ class Ws {
1160
1160
  type: "Add",
1161
1161
  queryId: a,
1162
1162
  udfPath: s,
1163
- args: [X(n)],
1163
+ args: [Y(n)],
1164
1164
  journal: r,
1165
1165
  componentPath: i
1166
1166
  };
@@ -1270,7 +1270,7 @@ class Ws {
1270
1270
  type: "Add",
1271
1271
  queryId: i.id,
1272
1272
  udfPath: i.canonicalizedUdfPath,
1273
- args: [X(i.args)],
1273
+ args: [Y(i.args)],
1274
1274
  journal: i.journal,
1275
1275
  componentPath: i.componentPath
1276
1276
  };
@@ -1333,8 +1333,8 @@ class Ws {
1333
1333
  }
1334
1334
  }
1335
1335
  }
1336
- var Hs = Object.defineProperty, Js = (t, e, n) => e in t ? Hs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, it = (t, e, n) => Js(t, typeof e != "symbol" ? e + "" : e, n);
1337
- class Gs {
1336
+ var Js = Object.defineProperty, Gs = (t, e, n) => e in t ? Js(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, it = (t, e, n) => Gs(t, typeof e != "symbol" ? e + "" : e, n);
1337
+ class Ks {
1338
1338
  constructor(e, n) {
1339
1339
  this.logger = e, this.markConnectionStateDirty = n, it(this, "inflightRequests"), it(this, "requestsOlderThanRestart"), it(this, "inflightMutationsCount", 0), it(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
1340
1340
  }
@@ -1470,29 +1470,29 @@ class Gs {
1470
1470
  return this.inflightActionsCount;
1471
1471
  }
1472
1472
  }
1473
- const Ge = /* @__PURE__ */ Symbol.for("functionName"), ri = /* @__PURE__ */ Symbol.for("toReferencePath");
1474
- function Ks(t) {
1475
- return t[ri] ?? null;
1476
- }
1473
+ const Ge = /* @__PURE__ */ Symbol.for("functionName"), ii = /* @__PURE__ */ Symbol.for("toReferencePath");
1477
1474
  function Zs(t) {
1478
- return t.startsWith("function://");
1475
+ return t[ii] ?? null;
1479
1476
  }
1480
1477
  function Xs(t) {
1478
+ return t.startsWith("function://");
1479
+ }
1480
+ function Ys(t) {
1481
1481
  let e;
1482
1482
  if (typeof t == "string")
1483
- Zs(t) ? e = { functionHandle: t } : e = { name: t };
1483
+ Xs(t) ? e = { functionHandle: t } : e = { name: t };
1484
1484
  else if (t[Ge])
1485
1485
  e = { name: t[Ge] };
1486
1486
  else {
1487
- const n = Ks(t);
1487
+ const n = Zs(t);
1488
1488
  if (!n)
1489
1489
  throw new Error(`${t} is not a functionReference`);
1490
1490
  e = { reference: n };
1491
1491
  }
1492
1492
  return e;
1493
1493
  }
1494
- function q(t) {
1495
- const e = Xs(t);
1494
+ function P(t) {
1495
+ const e = Ys(t);
1496
1496
  if (e.name === void 0)
1497
1497
  throw e.functionHandle !== void 0 ? new Error(
1498
1498
  `Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
@@ -1507,7 +1507,7 @@ function q(t) {
1507
1507
  throw new Error(`${t} is not a functionReference`);
1508
1508
  return n;
1509
1509
  }
1510
- function ii(t) {
1510
+ function Xt(t) {
1511
1511
  return { [Ge]: t };
1512
1512
  }
1513
1513
  function si(t = []) {
@@ -1530,21 +1530,21 @@ function si(t = []) {
1530
1530
  };
1531
1531
  return new Proxy({}, e);
1532
1532
  }
1533
- const Ys = si();
1534
- var eo = Object.defineProperty, to = (t, e, n) => e in t ? eo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ft = (t, e, n) => to(t, typeof e != "symbol" ? e + "" : e, n);
1533
+ const eo = si();
1534
+ var to = Object.defineProperty, no = (t, e, n) => e in t ? to(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ft = (t, e, n) => no(t, typeof e != "symbol" ? e + "" : e, n);
1535
1535
  class Ke {
1536
1536
  constructor(e) {
1537
1537
  ft(this, "queryResults"), ft(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
1538
1538
  }
1539
1539
  getQuery(e, ...n) {
1540
- const r = te(n[0]), i = q(e), s = this.queryResults.get(
1540
+ const r = K(n[0]), i = P(e), s = this.queryResults.get(
1541
1541
  ue(i, r)
1542
1542
  );
1543
1543
  if (s !== void 0)
1544
1544
  return Ke.queryValue(s.result);
1545
1545
  }
1546
1546
  getAllQueries(e) {
1547
- const n = [], r = q(e);
1547
+ const n = [], r = P(e);
1548
1548
  for (const i of this.queryResults.values())
1549
1549
  i.udfPath === de(r) && n.push({
1550
1550
  args: i.args,
@@ -1553,7 +1553,7 @@ class Ke {
1553
1553
  return n;
1554
1554
  }
1555
1555
  setQuery(e, n, r) {
1556
- const i = te(n), s = q(e), o = ue(s, i);
1556
+ const i = K(n), s = P(e), o = ue(s, i);
1557
1557
  let l;
1558
1558
  r === void 0 ? l = void 0 : l = {
1559
1559
  success: !0,
@@ -1573,7 +1573,7 @@ class Ke {
1573
1573
  return e.success ? e.value : void 0;
1574
1574
  }
1575
1575
  }
1576
- class no {
1576
+ class ro {
1577
1577
  constructor() {
1578
1578
  ft(this, "queryResults"), ft(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
1579
1579
  }
@@ -1621,9 +1621,9 @@ class no {
1621
1621
  if (r !== void 0) {
1622
1622
  if (r.success)
1623
1623
  return r.value;
1624
- throw r.errorData !== void 0 ? Kt(
1624
+ throw r.errorData !== void 0 ? Zt(
1625
1625
  r,
1626
- new Gt(
1626
+ new Kt(
1627
1627
  _e("query", n.udfPath, r)
1628
1628
  )
1629
1629
  ) : new Error(
@@ -1641,10 +1641,10 @@ class no {
1641
1641
  return this.queryResults.get(e)?.result?.logLines;
1642
1642
  }
1643
1643
  }
1644
- var ro = Object.defineProperty, io = (t, e, n) => e in t ? ro(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Pt = (t, e, n) => io(t, typeof e != "symbol" ? e + "" : e, n);
1644
+ var io = Object.defineProperty, so = (t, e, n) => e in t ? io(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Mt = (t, e, n) => so(t, typeof e != "symbol" ? e + "" : e, n);
1645
1645
  class E {
1646
1646
  constructor(e, n) {
1647
- Pt(this, "low"), Pt(this, "high"), Pt(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
1647
+ Mt(this, "low"), Mt(this, "high"), Mt(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
1648
1648
  }
1649
1649
  static isLong(e) {
1650
1650
  return (e && e.__isUnsignedLong__) === !0;
@@ -1671,7 +1671,7 @@ class E {
1671
1671
  ];
1672
1672
  }
1673
1673
  static fromNumber(e) {
1674
- return isNaN(e) || e < 0 ? tr : e >= so ? oo : new E(e % De | 0, e / De | 0);
1674
+ return isNaN(e) || e < 0 ? nr : e >= oo ? ao : new E(e % De | 0, e / De | 0);
1675
1675
  }
1676
1676
  toString() {
1677
1677
  return (BigInt(this.high) * BigInt(De) + BigInt(this.low)).toString();
@@ -1695,9 +1695,9 @@ class E {
1695
1695
  return typeof e == "number" ? E.fromNumber(e) : new E(e.low, e.high);
1696
1696
  }
1697
1697
  }
1698
- const tr = new E(0, 0), nr = 65536, De = nr * nr, so = De * De, oo = new E(-1, -1);
1699
- var ao = Object.defineProperty, lo = (t, e, n) => e in t ? ao(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, st = (t, e, n) => lo(t, typeof e != "symbol" ? e + "" : e, n);
1700
- class rr {
1698
+ const nr = new E(0, 0), rr = 65536, De = rr * rr, oo = De * De, ao = new E(-1, -1);
1699
+ var lo = Object.defineProperty, co = (t, e, n) => e in t ? lo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, st = (t, e, n) => co(t, typeof e != "symbol" ? e + "" : e, n);
1700
+ class ir {
1701
1701
  constructor(e, n) {
1702
1702
  st(this, "version"), st(this, "remoteQuerySet"), st(this, "queryPath"), st(this, "logger"), this.version = { querySet: 0, ts: E.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
1703
1703
  }
@@ -1752,15 +1752,15 @@ class rr {
1752
1752
  return this.version.ts;
1753
1753
  }
1754
1754
  }
1755
- function Mt(t) {
1755
+ function Lt(t) {
1756
1756
  const e = He(t);
1757
1757
  return E.fromBytesLE(Array.from(e));
1758
1758
  }
1759
- function co(t) {
1759
+ function uo(t) {
1760
1760
  const e = new Uint8Array(t.toBytesLE());
1761
1761
  return Je(e);
1762
1762
  }
1763
- function ir(t) {
1763
+ function sr(t) {
1764
1764
  switch (t.type) {
1765
1765
  case "FatalError":
1766
1766
  case "AuthError":
@@ -1769,22 +1769,22 @@ function ir(t) {
1769
1769
  case "Ping":
1770
1770
  return { ...t };
1771
1771
  case "MutationResponse":
1772
- return t.success ? { ...t, ts: Mt(t.ts) } : { ...t };
1772
+ return t.success ? { ...t, ts: Lt(t.ts) } : { ...t };
1773
1773
  case "Transition":
1774
1774
  return {
1775
1775
  ...t,
1776
1776
  startVersion: {
1777
1777
  ...t.startVersion,
1778
- ts: Mt(t.startVersion.ts)
1778
+ ts: Lt(t.startVersion.ts)
1779
1779
  },
1780
1780
  endVersion: {
1781
1781
  ...t.endVersion,
1782
- ts: Mt(t.endVersion.ts)
1782
+ ts: Lt(t.endVersion.ts)
1783
1783
  }
1784
1784
  };
1785
1785
  }
1786
1786
  }
1787
- function uo(t) {
1787
+ function ho(t) {
1788
1788
  switch (t.type) {
1789
1789
  case "Authenticate":
1790
1790
  case "ModifyQuerySet":
@@ -1795,17 +1795,17 @@ function uo(t) {
1795
1795
  case "Connect":
1796
1796
  return t.maxObservedTimestamp !== void 0 ? {
1797
1797
  ...t,
1798
- maxObservedTimestamp: co(t.maxObservedTimestamp)
1798
+ maxObservedTimestamp: uo(t.maxObservedTimestamp)
1799
1799
  } : { ...t, maxObservedTimestamp: void 0 };
1800
1800
  }
1801
1801
  }
1802
- var ho = Object.defineProperty, fo = (t, e, n) => e in t ? ho(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, C = (t, e, n) => fo(t, typeof e != "symbol" ? e + "" : e, n);
1803
- const po = 1e3, go = 1001, mo = 1005, xo = 4040;
1802
+ var fo = Object.defineProperty, po = (t, e, n) => e in t ? fo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, C = (t, e, n) => po(t, typeof e != "symbol" ? e + "" : e, n);
1803
+ const go = 1e3, mo = 1001, xo = 1005, bo = 4040;
1804
1804
  let ut;
1805
1805
  function ve() {
1806
1806
  return ut === void 0 && (ut = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(ut + performance.now());
1807
1807
  }
1808
- function sr() {
1808
+ function or() {
1809
1809
  return `t=${Math.round((ve() - ut) / 100) / 10}s`;
1810
1810
  }
1811
1811
  const oi = {
@@ -1828,7 +1828,7 @@ const oi = {
1828
1828
  SearchIndexTooLarge: { timeout: 3e3 },
1829
1829
  TooManyWritesInTimePeriod: { timeout: 3e3 }
1830
1830
  };
1831
- function bo(t) {
1831
+ function yo(t) {
1832
1832
  if (t === void 0) return "Unknown";
1833
1833
  for (const e of Object.keys(
1834
1834
  oi
@@ -1837,7 +1837,7 @@ function bo(t) {
1837
1837
  return e;
1838
1838
  return "Unknown";
1839
1839
  }
1840
- class yo {
1840
+ class vo {
1841
1841
  constructor(e, n, r, i, s, o) {
1842
1842
  this.markConnectionStateDirty = s, this.debug = o, C(this, "socket"), C(this, "connectionCount"), C(this, "_hasEverConnected", !1), C(this, "lastCloseReason"), C(this, "transitionChunkBuffer", null), C(this, "defaultInitialBackoff"), C(this, "maxBackoff"), C(this, "retries"), C(this, "serverInactivityThreshold"), C(this, "reconnectDueToServerInactivityTimeout"), C(this, "scheduledReconnect", null), C(this, "networkOnlineHandler", null), C(this, "pendingNetworkRecoveryInfo", null), C(this, "uri"), C(this, "onOpen"), C(this, "onResume"), C(this, "onMessage"), C(this, "webSocketConstructor"), C(this, "logger"), C(this, "onServerDisconnectError"), this.webSocketConstructor = r, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = n.onOpen, this.onResume = n.onResume, this.onMessage = n.onMessage, this.onServerDisconnectError = n.onServerDisconnectError, this.logger = i, this.setupNetworkListener(), this.connect();
1843
1843
  }
@@ -1870,7 +1870,7 @@ class yo {
1870
1870
  if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
1871
1871
  const n = this.transitionChunkBuffer.chunks.join("");
1872
1872
  this.transitionChunkBuffer = null;
1873
- const r = ir(JSON.parse(n));
1873
+ const r = sr(JSON.parse(n));
1874
1874
  if (r.type !== "Transition")
1875
1875
  throw new Error(
1876
1876
  `Expected Transition, got ${r.type} after assembling chunks`
@@ -1904,10 +1904,10 @@ class yo {
1904
1904
  clientTs: ve()
1905
1905
  })), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
1906
1906
  "WebSocket reconnected at",
1907
- sr(),
1907
+ or(),
1908
1908
  "after disconnect due to",
1909
1909
  this.lastCloseReason
1910
- ) : this.logger.log("WebSocket reconnected at", sr())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1910
+ ) : this.logger.log("WebSocket reconnected at", or())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
1911
1911
  const { timeSavedMs: n } = this.pendingNetworkRecoveryInfo;
1912
1912
  this.pendingNetworkRecoveryInfo = null, this.sendMessage({
1913
1913
  type: "Event",
@@ -1924,7 +1924,7 @@ class yo {
1924
1924
  }, e.onmessage = (n) => {
1925
1925
  this.resetServerInactivityTimeout();
1926
1926
  const r = n.data.length;
1927
- let i = ir(JSON.parse(n.data));
1927
+ let i = sr(JSON.parse(n.data));
1928
1928
  if (this._logVerbose(`received ws message with type ${i.type}`), i.type === "Ping")
1929
1929
  return;
1930
1930
  if (i.type === "TransitionChunk") {
@@ -1942,12 +1942,12 @@ class yo {
1942
1942
  transition: i
1943
1943
  }), this.onMessage(i).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
1944
1944
  }, e.onclose = (n) => {
1945
- if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== po && n.code !== go && // This commonly gets fired on mobile apps when the app is backgrounded
1946
- n.code !== mo && n.code !== xo) {
1945
+ if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== go && n.code !== mo && // This commonly gets fired on mobile apps when the app is backgrounded
1946
+ n.code !== xo && n.code !== bo) {
1947
1947
  let i = `WebSocket closed with code ${n.code}`;
1948
1948
  n.reason && (i += `: ${n.reason}`), this.logger.log(i), this.onServerDisconnectError && n.reason && this.onServerDisconnectError(i);
1949
1949
  }
1950
- const r = bo(n.reason);
1950
+ const r = yo(n.reason);
1951
1951
  this.scheduleReconnect(r);
1952
1952
  };
1953
1953
  }
@@ -1969,7 +1969,7 @@ class yo {
1969
1969
  } : {}
1970
1970
  };
1971
1971
  if (this.socket.state === "ready" && this.socket.paused === "no") {
1972
- const r = uo(e), i = JSON.stringify(r);
1972
+ const r = ho(e), i = JSON.stringify(r);
1973
1973
  let s = !1;
1974
1974
  try {
1975
1975
  this.socket.ws.send(i), s = !0;
@@ -2172,7 +2172,7 @@ class yo {
2172
2172
  this.socket = { ...this.socket, paused: "no" };
2173
2173
  return;
2174
2174
  case "ready":
2175
- this.socket.paused === "uninitialized" ? (this.socket = { ...this.socket, paused: "no" }, this.onOpen({
2175
+ this.socket.paused === "uninitialized" ? (this.socket = { ...this.socket, paused: "no" }, this._hasEverConnected = !0, this.onOpen({
2176
2176
  connectionCount: this.connectionCount,
2177
2177
  lastCloseReason: this.lastCloseReason,
2178
2178
  clientTs: ve()
@@ -2228,10 +2228,10 @@ class yo {
2228
2228
  });
2229
2229
  }
2230
2230
  }
2231
- function vo() {
2232
- return _o();
2233
- }
2234
2231
  function _o() {
2232
+ return ko();
2233
+ }
2234
+ function ko() {
2235
2235
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
2236
2236
  const e = Math.random() * 16 | 0;
2237
2237
  return (t === "x" ? e : e & 3 | 8).toString(16);
@@ -2240,7 +2240,7 @@ function _o() {
2240
2240
  class Qe extends Error {
2241
2241
  }
2242
2242
  Qe.prototype.name = "InvalidTokenError";
2243
- function ko(t) {
2243
+ function wo(t) {
2244
2244
  return decodeURIComponent(
2245
2245
  atob(t).replace(/(.)/g, (e, n) => {
2246
2246
  let r = n.charCodeAt(0).toString(16).toUpperCase();
@@ -2248,7 +2248,7 @@ function ko(t) {
2248
2248
  })
2249
2249
  );
2250
2250
  }
2251
- function wo(t) {
2251
+ function So(t) {
2252
2252
  let e = t.replace(/-/g, "+").replace(/_/g, "/");
2253
2253
  switch (e.length % 4) {
2254
2254
  case 0:
@@ -2263,7 +2263,7 @@ function wo(t) {
2263
2263
  throw new Error("base64 string is not of the correct length");
2264
2264
  }
2265
2265
  try {
2266
- return ko(e);
2266
+ return wo(e);
2267
2267
  } catch {
2268
2268
  return atob(e);
2269
2269
  }
@@ -2279,7 +2279,7 @@ function ai(t, e) {
2279
2279
  );
2280
2280
  let i;
2281
2281
  try {
2282
- i = wo(r);
2282
+ i = So(r);
2283
2283
  } catch (s) {
2284
2284
  throw new Qe(
2285
2285
  `Invalid token specified: invalid base64 for part #${n + 1} (${s.message})`
@@ -2293,9 +2293,9 @@ function ai(t, e) {
2293
2293
  );
2294
2294
  }
2295
2295
  }
2296
- var So = Object.defineProperty, jo = (t, e, n) => e in t ? So(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e, n) => jo(t, typeof e != "symbol" ? e + "" : e, n);
2297
- const Co = 480 * 60 * 60 * 1e3, or = 2;
2298
- class To {
2296
+ var jo = Object.defineProperty, Co = (t, e, n) => e in t ? jo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, M = (t, e, n) => Co(t, typeof e != "symbol" ? e + "" : e, n);
2297
+ const To = 480 * 60 * 60 * 1e3, ar = 2;
2298
+ class Ro {
2299
2299
  constructor(e, n, r) {
2300
2300
  M(this, "authState", { state: "noAuth" }), M(this, "configVersion", 0), M(this, "syncState"), M(this, "authenticate"), M(this, "stopSocket"), M(this, "tryRestartSocket"), M(this, "pauseSocket"), M(this, "resumeSocket"), M(this, "clearAuth"), M(this, "logger"), M(this, "refreshTokenLeewaySeconds"), M(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = n.authenticate, this.stopSocket = n.stopSocket, this.tryRestartSocket = n.tryRestartSocket, this.pauseSocket = n.pauseSocket, this.resumeSocket = n.resumeSocket, this.clearAuth = n.clearAuth, this.logger = r.logger, this.refreshTokenLeewaySeconds = r.refreshTokenLeewaySeconds;
2301
2301
  }
@@ -2346,14 +2346,14 @@ class To {
2346
2346
  if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), // No way to fetch another token, kaboom
2347
2347
  this.authState.state === "noAuth" || // We failed on a fresh token. After a small number of retries, we give up
2348
2348
  // and clear the auth state to avoid infinite retries.
2349
- this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= or) {
2349
+ this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= ar) {
2350
2350
  this.logger.error(
2351
2351
  `Failed to authenticate: "${e.error}", check your server auth config`
2352
2352
  ), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
2353
2353
  return;
2354
2354
  }
2355
2355
  this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(
2356
- `retrying reauthentication, ${or - this.tokenConfirmationAttempts} attempts remaining`
2356
+ `retrying reauthentication, ${ar - this.tokenConfirmationAttempts} attempts remaining`
2357
2357
  )), await this.stopSocket();
2358
2358
  const n = await this.fetchTokenAndGuardAgainstRace(
2359
2359
  this.authState.config.fetchToken,
@@ -2418,7 +2418,7 @@ class To {
2418
2418
  return;
2419
2419
  }
2420
2420
  let o = Math.min(
2421
- Co,
2421
+ To,
2422
2422
  (s - this.refreshTokenLeewaySeconds) * 1e3
2423
2423
  );
2424
2424
  o <= 0 && (this.logger.warn(
@@ -2486,34 +2486,34 @@ class To {
2486
2486
  this.logger.logVerbose(`${e} [v${this.configVersion}]`);
2487
2487
  }
2488
2488
  }
2489
- const Ro = [
2489
+ const $o = [
2490
2490
  "convexClientConstructed",
2491
2491
  "convexWebSocketOpen",
2492
2492
  "convexFirstMessageReceived"
2493
2493
  ];
2494
- function $o(t, e) {
2494
+ function Ao(t, e) {
2495
2495
  const n = { sessionId: e };
2496
2496
  typeof performance > "u" || !performance.mark || performance.mark(t, { detail: n });
2497
2497
  }
2498
- function Ao(t) {
2498
+ function Io(t) {
2499
2499
  let e = t.name.slice(6);
2500
2500
  return e = e.charAt(0).toLowerCase() + e.slice(1), {
2501
2501
  name: e,
2502
2502
  startTime: t.startTime
2503
2503
  };
2504
2504
  }
2505
- function Io(t) {
2505
+ function Eo(t) {
2506
2506
  if (typeof performance > "u" || !performance.getEntriesByName)
2507
2507
  return [];
2508
2508
  const e = [];
2509
- for (const n of Ro) {
2509
+ for (const n of $o) {
2510
2510
  const r = performance.getEntriesByName(n).filter((i) => i.entryType === "mark").filter((i) => i.detail.sessionId === t);
2511
2511
  e.push(...r);
2512
2512
  }
2513
- return e.map(Ao);
2513
+ return e.map(Io);
2514
2514
  }
2515
- var Eo = Object.defineProperty, qo = (t, e, n) => e in t ? Eo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, T = (t, e, n) => qo(t, typeof e != "symbol" ? e + "" : e, n);
2516
- class Po {
2515
+ var Po = Object.defineProperty, qo = (t, e, n) => e in t ? Po(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, T = (t, e, n) => qo(t, typeof e != "symbol" ? e + "" : e, n);
2516
+ class Mo {
2517
2517
  /**
2518
2518
  * @param address - The url of your Convex deployment, often provided
2519
2519
  * by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
@@ -2533,19 +2533,19 @@ class Po {
2533
2533
  }
2534
2534
  });
2535
2535
  }), T(this, "mark", (f) => {
2536
- this.debug && $o(f, this.sessionId);
2536
+ this.debug && Ao(f, this.sessionId);
2537
2537
  }), typeof e == "object")
2538
2538
  throw new Error(
2539
2539
  "Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly."
2540
2540
  );
2541
- r?.skipConvexDeploymentUrlCheck !== !0 && Rs(e), r = { ...r };
2541
+ r?.skipConvexDeploymentUrlCheck !== !0 && $s(e), r = { ...r };
2542
2542
  const i = r.authRefreshTokenLeewaySeconds ?? 10;
2543
2543
  let s = r.webSocketConstructor;
2544
2544
  if (!s && typeof WebSocket > "u")
2545
2545
  throw new Error(
2546
2546
  "No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient"
2547
2547
  );
2548
- s = s || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? ni({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : ti({ verbose: r.verbose ?? !1 });
2548
+ s = s || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? ri({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : ni({ verbose: r.verbose ?? !1 });
2549
2549
  const o = e.search("://");
2550
2550
  if (o === -1)
2551
2551
  throw new Error("Provided address was not an absolute URL.");
@@ -2557,18 +2557,18 @@ class Po {
2557
2557
  u = "wss";
2558
2558
  else
2559
2559
  throw new Error(`Unknown parent protocol ${a}`);
2560
- const d = `${u}://${l}/api/${Xn}/sync`;
2561
- this.state = new Ws(), this.remoteQuerySet = new rr(
2560
+ const d = `${u}://${l}/api/${Yn}/sync`;
2561
+ this.state = new Hs(), this.remoteQuerySet = new ir(
2562
2562
  (f) => this.state.queryPath(f),
2563
2563
  this.logger
2564
- ), this.requestManager = new Gs(
2564
+ ), this.requestManager = new Ks(
2565
2565
  this.logger,
2566
2566
  this.markConnectionStateDirty
2567
2567
  );
2568
2568
  const c = () => {
2569
2569
  this.webSocketManager.pause(), this.state.pause();
2570
2570
  };
2571
- this.authenticationManager = new To(
2571
+ this.authenticationManager = new Ro(
2572
2572
  this.state,
2573
2573
  {
2574
2574
  authenticate: (f) => {
@@ -2587,9 +2587,9 @@ class Po {
2587
2587
  logger: this.logger,
2588
2588
  refreshTokenLeewaySeconds: i
2589
2589
  }
2590
- ), this.optimisticQueryResults = new no(), this.addOnTransitionHandler((f) => {
2590
+ ), this.optimisticQueryResults = new ro(), this.addOnTransitionHandler((f) => {
2591
2591
  n(f.queries.map((g) => g.token));
2592
- }), this._nextRequestId = 0, this._sessionId = vo();
2592
+ }), this._nextRequestId = 0, this._sessionId = _o();
2593
2593
  const { unsavedChangesWarning: p } = r;
2594
2594
  if (typeof window > "u" || typeof window.addEventListener > "u") {
2595
2595
  if (p === !0)
@@ -2603,7 +2603,7 @@ class Po {
2603
2603
  return (f || window.event).returnValue = g, g;
2604
2604
  }
2605
2605
  });
2606
- this.webSocketManager = new yo(
2606
+ this.webSocketManager = new vo(
2607
2607
  d,
2608
2608
  {
2609
2609
  onOpen: (f) => {
@@ -2612,20 +2612,20 @@ class Po {
2612
2612
  type: "Connect",
2613
2613
  sessionId: this._sessionId,
2614
2614
  maxObservedTimestamp: this.maxObservedTimestamp
2615
- }), this.remoteQuerySet = new rr(
2615
+ }), this.remoteQuerySet = new ir(
2616
2616
  (w) => this.state.queryPath(w),
2617
2617
  this.logger
2618
2618
  );
2619
- const [g, b] = this.state.restart();
2620
- b && this.webSocketManager.sendMessage(b), this.webSocketManager.sendMessage(g);
2619
+ const [g, x] = this.state.restart();
2620
+ x && this.webSocketManager.sendMessage(x), this.webSocketManager.sendMessage(g);
2621
2621
  for (const w of this.requestManager.restart())
2622
2622
  this.webSocketManager.sendMessage(w);
2623
2623
  },
2624
2624
  onResume: () => {
2625
2625
  const [f, g] = this.state.resume();
2626
2626
  g && this.webSocketManager.sendMessage(g), f && this.webSocketManager.sendMessage(f);
2627
- for (const b of this.requestManager.resume())
2628
- this.webSocketManager.sendMessage(b);
2627
+ for (const x of this.requestManager.resume())
2628
+ this.webSocketManager.sendMessage(x);
2629
2629
  },
2630
2630
  onMessage: (f) => {
2631
2631
  switch (this.firstMessageReceived || (this.firstMessageReceived = !0, this.mark("convexFirstMessageReceived"), this.reportMarks()), f.type) {
@@ -2659,7 +2659,7 @@ class Po {
2659
2659
  break;
2660
2660
  }
2661
2661
  case "FatalError": {
2662
- const g = Ds(this.logger, f.error);
2662
+ const g = Us(this.logger, f.error);
2663
2663
  throw this.webSocketManager.terminate(), g;
2664
2664
  }
2665
2665
  }
@@ -2805,7 +2805,7 @@ class Po {
2805
2805
  * query and an `unsubscribe` callback.
2806
2806
  */
2807
2807
  subscribe(e, n, r) {
2808
- const i = te(n), { modification: s, queryToken: o, unsubscribe: l } = this.state.subscribe(
2808
+ const i = K(n), { modification: s, queryToken: o, unsubscribe: l } = this.state.subscribe(
2809
2809
  e,
2810
2810
  i,
2811
2811
  r?.journal,
@@ -2826,7 +2826,7 @@ class Po {
2826
2826
  * query or its value has been set optimistically.
2827
2827
  */
2828
2828
  localQueryResult(e, n) {
2829
- const r = te(n), i = ue(e, r);
2829
+ const r = K(n), i = ue(e, r);
2830
2830
  return this.optimisticQueryResults.queryResult(i);
2831
2831
  }
2832
2832
  /**
@@ -2854,7 +2854,7 @@ class Po {
2854
2854
  * @internal
2855
2855
  */
2856
2856
  localQueryLogs(e, n) {
2857
- const r = te(n), i = ue(e, r);
2857
+ const r = K(n), i = ue(e, r);
2858
2858
  return this.optimisticQueryResults.queryLogs(i);
2859
2859
  }
2860
2860
  /**
@@ -2867,7 +2867,7 @@ class Po {
2867
2867
  * @returns The query's {@link QueryJournal} or `undefined`.
2868
2868
  */
2869
2869
  queryJournal(e, n) {
2870
- const r = te(n), i = ue(e, r);
2870
+ const r = K(n), i = ue(e, r);
2871
2871
  return this.state.queryJournal(i);
2872
2872
  }
2873
2873
  /**
@@ -2918,9 +2918,9 @@ class Po {
2918
2918
  async mutation(e, n, r) {
2919
2919
  const i = await this.mutationInternal(e, n, r);
2920
2920
  if (!i.success)
2921
- throw i.errorData !== void 0 ? Kt(
2921
+ throw i.errorData !== void 0 ? Zt(
2922
2922
  i,
2923
- new Gt(
2923
+ new Kt(
2924
2924
  _e("mutation", e, i)
2925
2925
  )
2926
2926
  ) : new Error(_e("mutation", e, i));
@@ -2942,7 +2942,7 @@ class Po {
2942
2942
  * @internal
2943
2943
  */
2944
2944
  enqueueMutation(e, n, r, i) {
2945
- const s = te(n);
2945
+ const s = K(n);
2946
2946
  this.tryReportLongDisconnect();
2947
2947
  const o = this.nextRequestId;
2948
2948
  if (this._nextRequestId++, r !== void 0) {
@@ -2959,14 +2959,14 @@ class Po {
2959
2959
  c,
2960
2960
  o
2961
2961
  ).map((g) => {
2962
- const b = this.localQueryResultByToken(g);
2962
+ const x = this.localQueryResultByToken(g);
2963
2963
  return {
2964
2964
  token: g,
2965
2965
  modification: {
2966
2966
  kind: "Updated",
2967
- result: b === void 0 ? void 0 : {
2967
+ result: x === void 0 ? void 0 : {
2968
2968
  success: !0,
2969
- value: b,
2969
+ value: x,
2970
2970
  logLines: []
2971
2971
  }
2972
2972
  }
@@ -2984,7 +2984,7 @@ class Po {
2984
2984
  requestId: o,
2985
2985
  udfPath: e,
2986
2986
  componentPath: i,
2987
- args: [X(s)]
2987
+ args: [Y(s)]
2988
2988
  }, a = this.webSocketManager.sendMessage(l), u = this.requestManager.request(l, a);
2989
2989
  return {
2990
2990
  requestId: o,
@@ -3002,9 +3002,9 @@ class Po {
3002
3002
  async action(e, n) {
3003
3003
  const r = await this.actionInternal(e, n);
3004
3004
  if (!r.success)
3005
- throw r.errorData !== void 0 ? Kt(
3005
+ throw r.errorData !== void 0 ? Zt(
3006
3006
  r,
3007
- new Gt(_e("action", e, r))
3007
+ new Kt(_e("action", e, r))
3008
3008
  ) : new Error(_e("action", e, r));
3009
3009
  return r.value;
3010
3010
  }
@@ -3012,14 +3012,14 @@ class Po {
3012
3012
  * @internal
3013
3013
  */
3014
3014
  async actionInternal(e, n, r) {
3015
- const i = te(n), s = this.nextRequestId;
3015
+ const i = K(n), s = this.nextRequestId;
3016
3016
  this._nextRequestId++, this.tryReportLongDisconnect();
3017
3017
  const o = {
3018
3018
  type: "Action",
3019
3019
  requestId: s,
3020
3020
  udfPath: e,
3021
3021
  componentPath: r,
3022
- args: [X(i)]
3022
+ args: [Y(i)]
3023
3023
  }, l = this.webSocketManager.sendMessage(o);
3024
3024
  return this.requestManager.request(o, l);
3025
3025
  }
@@ -3061,7 +3061,7 @@ class Po {
3061
3061
  */
3062
3062
  reportMarks() {
3063
3063
  if (this.debug) {
3064
- const e = Io(this.sessionId);
3064
+ const e = Eo(this.sessionId);
3065
3065
  this.webSocketManager.sendMessage({
3066
3066
  type: "Event",
3067
3067
  eventType: "ClientConnect",
@@ -3080,7 +3080,7 @@ class Po {
3080
3080
  method: "POST",
3081
3081
  headers: {
3082
3082
  "Content-Type": "application/json",
3083
- "Convex-Client": `npm-${Xn}`
3083
+ "Convex-Client": `npm-${Yn}`
3084
3084
  },
3085
3085
  body: JSON.stringify({ event: "LongWebsocketDisconnect" })
3086
3086
  }).then((r) => {
@@ -3093,15 +3093,15 @@ class Po {
3093
3093
  });
3094
3094
  }
3095
3095
  }
3096
- function Lt(t) {
3096
+ function Nt(t) {
3097
3097
  if (typeof t != "object" || t === null || !Array.isArray(t.page) || typeof t.isDone != "boolean" || typeof t.continueCursor != "string")
3098
3098
  throw new Error(`Not a valid paginated query result: ${t?.toString()}`);
3099
3099
  return t;
3100
3100
  }
3101
- var Mo = Object.defineProperty, Lo = (t, e, n) => e in t ? Mo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ar = (t, e, n) => Lo(t, typeof e != "symbol" ? e + "" : e, n);
3101
+ var Lo = Object.defineProperty, No = (t, e, n) => e in t ? Lo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, lr = (t, e, n) => No(t, typeof e != "symbol" ? e + "" : e, n);
3102
3102
  class Oo {
3103
3103
  constructor(e, n) {
3104
- this.client = e, this.onTransition = n, ar(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), ar(this, "lastTransitionTs"), this.lastTransitionTs = E.fromNumber(0), this.client.addOnTransitionHandler(
3104
+ this.client = e, this.onTransition = n, lr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), lr(this, "lastTransitionTs"), this.lastTransitionTs = E.fromNumber(0), this.client.addOnTransitionHandler(
3105
3105
  (r) => this.onBaseTransition(r)
3106
3106
  );
3107
3107
  }
@@ -3114,7 +3114,7 @@ class Oo {
3114
3114
  * @returns Object with paginatedQueryToken and unsubscribe function
3115
3115
  */
3116
3116
  subscribe(e, n, r) {
3117
- const i = de(e), s = er(
3117
+ const i = de(e), s = tr(
3118
3118
  i,
3119
3119
  n,
3120
3120
  r
@@ -3145,7 +3145,7 @@ class Oo {
3145
3145
  * Throws an error when one of the pages has errored.
3146
3146
  */
3147
3147
  localQueryResult(e, n, r) {
3148
- const i = de(e), s = er(
3148
+ const i = de(e), s = tr(
3149
3149
  i,
3150
3150
  n,
3151
3151
  r
@@ -3173,7 +3173,7 @@ class Oo {
3173
3173
  s = !0, o = !1;
3174
3174
  continue;
3175
3175
  }
3176
- const d = Lt(u);
3176
+ const d = Nt(u);
3177
3177
  i = i.concat(d.page), o = !!d.isDone;
3178
3178
  }
3179
3179
  let l;
@@ -3218,7 +3218,7 @@ class Oo {
3218
3218
  const r = this.queryTokenForLastPageOfPaginatedQuery(e), i = this.client.localQueryResultByToken(r);
3219
3219
  if (!i)
3220
3220
  return !1;
3221
- const s = Lt(i);
3221
+ const s = Nt(i);
3222
3222
  if (s.isDone)
3223
3223
  return !1;
3224
3224
  this.addPageToPaginatedQuery(
@@ -3276,7 +3276,7 @@ class Oo {
3276
3276
  const u = o.get(a).queryToken, d = n(u);
3277
3277
  if (!d)
3278
3278
  continue;
3279
- const c = Lt(d);
3279
+ const c = Nt(d);
3280
3280
  c.splitCursor && (c.pageStatus === "SplitRecommended" || c.pageStatus === "SplitRequired" || // This client-driven page splitting condition will change in the future.
3281
3281
  c.page.length > i.options.initialNumItems * 2) && this.splitPaginatedQueryPage(
3282
3282
  i,
@@ -3374,7 +3374,7 @@ class Oo {
3374
3374
  return n;
3375
3375
  }
3376
3376
  }
3377
- function No({
3377
+ function Qo({
3378
3378
  // (Synchronously) returns the current value of our subscription.
3379
3379
  getCurrentValue: t,
3380
3380
  // This function is passed an event handler to attach to the subscription.
@@ -3391,7 +3391,7 @@ function No({
3391
3391
  getCurrentValue: t,
3392
3392
  subscribe: e,
3393
3393
  value: i
3394
- })), D(() => {
3394
+ })), N(() => {
3395
3395
  let s = !1;
3396
3396
  const o = () => {
3397
3397
  s || r((a) => {
@@ -3406,34 +3406,34 @@ function No({
3406
3406
  };
3407
3407
  }, [t, e]), i;
3408
3408
  }
3409
- var Qo = Object.defineProperty, zo = (t, e, n) => e in t ? Qo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ee = (t, e, n) => zo(t, typeof e != "symbol" ? e + "" : e, n);
3410
- const Bo = 5e3;
3411
- if (typeof hn > "u")
3409
+ var zo = Object.defineProperty, Bo = (t, e, n) => e in t ? zo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, te = (t, e, n) => Bo(t, typeof e != "symbol" ? e + "" : e, n);
3410
+ const Fo = 5e3;
3411
+ if (typeof dn > "u")
3412
3412
  throw new Error("Required dependency 'react' not found");
3413
3413
  function li(t, e, n) {
3414
3414
  function r(i) {
3415
- return Vo(i), e.mutation(t, i, {
3415
+ return Wo(i), e.mutation(t, i, {
3416
3416
  optimisticUpdate: n
3417
3417
  });
3418
3418
  }
3419
3419
  return r.withOptimisticUpdate = function(s) {
3420
3420
  if (n !== void 0)
3421
3421
  throw new Error(
3422
- `Already specified optimistic update for mutation ${q(
3422
+ `Already specified optimistic update for mutation ${P(
3423
3423
  t
3424
3424
  )}`
3425
3425
  );
3426
3426
  return li(t, e, s);
3427
3427
  }, r;
3428
3428
  }
3429
- class Fo {
3429
+ class Do {
3430
3430
  /**
3431
3431
  * @param address - The url of your Convex deployment, often provided
3432
3432
  * by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
3433
3433
  * @param options - See {@link ConvexReactClientOptions} for a full description.
3434
3434
  */
3435
3435
  constructor(e, n) {
3436
- if (ee(this, "address"), ee(this, "cachedSync"), ee(this, "cachedPaginatedQueryClient"), ee(this, "listeners"), ee(this, "options"), ee(this, "closed", !1), ee(this, "_logger"), ee(this, "adminAuth"), ee(this, "fakeUserIdentity"), e === void 0)
3436
+ if (te(this, "address"), te(this, "cachedSync"), te(this, "cachedPaginatedQueryClient"), te(this, "listeners"), te(this, "options"), te(this, "closed", !1), te(this, "_logger"), te(this, "adminAuth"), te(this, "fakeUserIdentity"), e === void 0)
3437
3437
  throw new Error(
3438
3438
  "No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated."
3439
3439
  );
@@ -3443,7 +3443,7 @@ class Fo {
3443
3443
  );
3444
3444
  if (!e.includes("://"))
3445
3445
  throw new Error("Provided address was not an absolute URL.");
3446
- this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? ni({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : ti({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
3446
+ this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? ri({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : ni({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
3447
3447
  }
3448
3448
  /**
3449
3449
  * Return the address for this client, useful for creating a new client.
@@ -3463,7 +3463,7 @@ class Fo {
3463
3463
  get sync() {
3464
3464
  if (this.closed)
3465
3465
  throw new Error("ConvexReactClient has already been closed.");
3466
- return this.cachedSync ? this.cachedSync : (this.cachedSync = new Po(
3466
+ return this.cachedSync ? this.cachedSync : (this.cachedSync = new Mo(
3467
3467
  this.address,
3468
3468
  () => {
3469
3469
  },
@@ -3534,7 +3534,7 @@ class Fo {
3534
3534
  * @returns The {@link Watch} object.
3535
3535
  */
3536
3536
  watchQuery(e, ...n) {
3537
- const [r, i] = n, s = q(e);
3537
+ const [r, i] = n, s = P(e);
3538
3538
  return {
3539
3539
  onUpdate: (o) => {
3540
3540
  const { queryToken: l, unsubscribe: a } = this.sync.subscribe(
@@ -3579,7 +3579,7 @@ class Fo {
3579
3579
  * an optional extendSubscriptionFor for how long to subscribe to the query.
3580
3580
  */
3581
3581
  prewarmQuery(e) {
3582
- const n = e.extendSubscriptionFor ?? Bo, i = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
3582
+ const n = e.extendSubscriptionFor ?? Fo, i = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
3583
3583
  });
3584
3584
  setTimeout(i, n);
3585
3585
  }
@@ -3601,7 +3601,7 @@ class Fo {
3601
3601
  * @internal
3602
3602
  */
3603
3603
  watchPaginatedQuery(e, n, r) {
3604
- const i = q(e);
3604
+ const i = P(e);
3605
3605
  return {
3606
3606
  onUpdate: (s) => {
3607
3607
  const { paginatedQueryToken: o, unsubscribe: l } = this.paginatedQueryClient.subscribe(i, n || {}, r), a = this.listeners.get(o);
@@ -3626,7 +3626,7 @@ class Fo {
3626
3626
  * @returns A promise of the mutation's result.
3627
3627
  */
3628
3628
  mutation(e, ...n) {
3629
- const [r, i] = n, s = q(e);
3629
+ const [r, i] = n, s = P(e);
3630
3630
  return this.sync.mutation(s, r, i);
3631
3631
  }
3632
3632
  /**
@@ -3639,7 +3639,7 @@ class Fo {
3639
3639
  * @returns A promise of the action's result.
3640
3640
  */
3641
3641
  action(e, ...n) {
3642
- const r = q(e);
3642
+ const r = P(e);
3643
3643
  return this.sync.action(r, ...n);
3644
3644
  }
3645
3645
  /**
@@ -3730,32 +3730,61 @@ class Fo {
3730
3730
  }
3731
3731
  }
3732
3732
  }
3733
- const fn = hn.createContext(
3733
+ const pn = dn.createContext(
3734
3734
  void 0
3735
3735
  // in the future this will be a mocked client for testing
3736
3736
  );
3737
- function Do() {
3738
- return _t(fn);
3737
+ function Uo() {
3738
+ return kt(pn);
3739
3739
  }
3740
- const Uo = ({ client: t, children: e }) => hn.createElement(
3741
- fn.Provider,
3740
+ const Vo = ({ client: t, children: e }) => dn.createElement(
3741
+ pn.Provider,
3742
3742
  { value: t },
3743
3743
  e
3744
3744
  );
3745
- function lr(t, ...e) {
3746
- const n = e[0] === "skip", r = e[0] === "skip" ? {} : te(e[0]), i = typeof t == "string" ? ii(t) : t, s = q(i), o = U(
3747
- () => n ? {} : { query: { query: i, args: r } },
3745
+ function cr(t, ...e) {
3746
+ const n = typeof t == "object" && t !== null && "query" in t, r = n ? t.throwOnError ?? !1 : !0;
3747
+ let i, s = {};
3748
+ if (n) {
3749
+ const c = t.query;
3750
+ i = typeof c == "string" ? Xt(c) : c, t.args !== "skip" && (s = K(t.args));
3751
+ } else {
3752
+ const c = t;
3753
+ i = typeof c == "string" ? Xt(c) : c, s = e[0] === "skip" ? {} : K(e[0]);
3754
+ }
3755
+ const o = i ? P(i) : void 0, l = n && t.args === "skip" || !n && e[0] === "skip", a = U(
3756
+ () => l || !i ? {} : { query: { query: i, args: s } },
3748
3757
  // Stringify args so args that are semantically the same don't trigger a
3749
3758
  // rerender. Saves developers from adding `useMemo` on every args usage.
3750
3759
  // eslint-disable-next-line react-hooks/exhaustive-deps
3751
- [JSON.stringify(X(r)), s, n]
3752
- ), a = Go(o).query;
3753
- if (a instanceof Error)
3754
- throw a;
3755
- return a;
3760
+ [JSON.stringify(Y(s)), o, l]
3761
+ ), d = Ko(a).query;
3762
+ if (n) {
3763
+ if (d instanceof Error) {
3764
+ if (r)
3765
+ throw d;
3766
+ return {
3767
+ data: void 0,
3768
+ error: d,
3769
+ status: "error"
3770
+ };
3771
+ }
3772
+ return d === void 0 ? {
3773
+ data: void 0,
3774
+ error: void 0,
3775
+ status: "pending"
3776
+ } : {
3777
+ data: d,
3778
+ error: void 0,
3779
+ status: "success"
3780
+ };
3781
+ }
3782
+ if (d instanceof Error)
3783
+ throw d;
3784
+ return d;
3756
3785
  }
3757
- function wt(t) {
3758
- const e = typeof t == "string" ? ii(t) : t, n = _t(fn);
3786
+ function St(t) {
3787
+ const e = typeof t == "string" ? Xt(t) : t, n = kt(pn);
3759
3788
  if (n === void 0)
3760
3789
  throw new Error(
3761
3790
  "Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
@@ -3763,24 +3792,24 @@ function wt(t) {
3763
3792
  return U(
3764
3793
  () => li(e, n),
3765
3794
  // eslint-disable-next-line react-hooks/exhaustive-deps
3766
- [n, q(e)]
3795
+ [n, P(e)]
3767
3796
  );
3768
3797
  }
3769
- function Vo(t) {
3798
+ function Wo(t) {
3770
3799
  if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
3771
3800
  throw new Error(
3772
3801
  "Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
3773
3802
  );
3774
3803
  }
3775
- var Wo = Object.defineProperty, Ho = (t, e, n) => e in t ? Wo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ot = (t, e, n) => Ho(t, typeof e != "symbol" ? e + "" : e, n);
3776
- class Jo {
3804
+ var Ho = Object.defineProperty, Jo = (t, e, n) => e in t ? Ho(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ot = (t, e, n) => Jo(t, typeof e != "symbol" ? e + "" : e, n);
3805
+ class Go {
3777
3806
  constructor(e) {
3778
3807
  Ot(this, "createWatch"), Ot(this, "queries"), Ot(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
3779
3808
  }
3780
3809
  setQueries(e) {
3781
3810
  for (const n of Object.keys(e)) {
3782
3811
  const { query: r, args: i, paginationOptions: s } = e[n];
3783
- if (q(r), this.queries[n] === void 0)
3812
+ if (P(r), this.queries[n] === void 0)
3784
3813
  this.addQuery(
3785
3814
  n,
3786
3815
  r,
@@ -3789,7 +3818,7 @@ class Jo {
3789
3818
  );
3790
3819
  else {
3791
3820
  const o = this.queries[n];
3792
- (q(r) !== q(o.query) || JSON.stringify(X(i)) !== JSON.stringify(X(o.args)) || JSON.stringify(s) !== JSON.stringify(o.paginationOptions)) && (this.removeQuery(n), this.addQuery(
3821
+ (P(r) !== P(o.query) || JSON.stringify(Y(i)) !== JSON.stringify(Y(o.args)) || JSON.stringify(s) !== JSON.stringify(o.paginationOptions)) && (this.removeQuery(n), this.addQuery(
3793
3822
  n,
3794
3823
  r,
3795
3824
  i,
@@ -3809,7 +3838,7 @@ class Jo {
3809
3838
  const n = {};
3810
3839
  for (const r of Object.keys(e)) {
3811
3840
  const { query: i, args: s } = e[r], o = e[r].paginationOptions;
3812
- q(i);
3841
+ P(i);
3813
3842
  const l = this.createWatch(
3814
3843
  i,
3815
3844
  s,
@@ -3874,8 +3903,8 @@ class Jo {
3874
3903
  e();
3875
3904
  }
3876
3905
  }
3877
- function Go(t) {
3878
- const e = Do();
3906
+ function Ko(t) {
3907
+ const e = Uo();
3879
3908
  if (e === void 0)
3880
3909
  throw new Error(
3881
3910
  "Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
@@ -3884,11 +3913,11 @@ function Go(t) {
3884
3913
  journal: s,
3885
3914
  paginationOptions: o
3886
3915
  }) => o ? e.watchPaginatedQuery(r, i, o) : e.watchQuery(r, i, s ? { journal: s } : {}), [e]);
3887
- return Ko(t, n);
3916
+ return Zo(t, n);
3888
3917
  }
3889
- function Ko(t, e) {
3890
- const [n] = R(() => new Jo(e));
3891
- n.createWatch !== e && n.setCreateWatch(e), D(() => () => n.destroy(), [n]);
3918
+ function Zo(t, e) {
3919
+ const [n] = R(() => new Go(e));
3920
+ n.createWatch !== e && n.setCreateWatch(e), N(() => () => n.destroy(), [n]);
3892
3921
  const r = U(
3893
3922
  () => ({
3894
3923
  getCurrentValue: () => n.getLocalResults(t),
@@ -3896,16 +3925,16 @@ function Ko(t, e) {
3896
3925
  }),
3897
3926
  [n, t]
3898
3927
  );
3899
- return No(r);
3928
+ return Qo(r);
3900
3929
  }
3901
- var Zo = /* @__PURE__ */ Symbol.for("preact-signals");
3902
- function St() {
3930
+ var Xo = /* @__PURE__ */ Symbol.for("preact-signals");
3931
+ function jt() {
3903
3932
  if (se > 1)
3904
3933
  se--;
3905
3934
  else {
3906
3935
  for (var t, e = !1; Ue !== void 0; ) {
3907
3936
  var n = Ue;
3908
- for (Ue = void 0, Zt++; n !== void 0; ) {
3937
+ for (Ue = void 0, Yt++; n !== void 0; ) {
3909
3938
  var r = n.o;
3910
3939
  if (n.o = void 0, n.f &= -3, !(8 & n.f) && hi(n)) try {
3911
3940
  n.c();
@@ -3915,16 +3944,16 @@ function St() {
3915
3944
  n = r;
3916
3945
  }
3917
3946
  }
3918
- if (Zt = 0, se--, e) throw t;
3947
+ if (Yt = 0, se--, e) throw t;
3919
3948
  }
3920
3949
  }
3921
- function Xo(t) {
3950
+ function Yo(t) {
3922
3951
  if (se > 0) return t();
3923
3952
  se++;
3924
3953
  try {
3925
3954
  return t();
3926
3955
  } finally {
3927
- St();
3956
+ jt();
3928
3957
  }
3929
3958
  }
3930
3959
  var y = void 0;
@@ -3937,7 +3966,7 @@ function ci(t) {
3937
3966
  y = e;
3938
3967
  }
3939
3968
  }
3940
- var Ue = void 0, se = 0, Zt = 0, pt = 0;
3969
+ var Ue = void 0, se = 0, Yt = 0, pt = 0;
3941
3970
  function ui(t) {
3942
3971
  if (y !== void 0) {
3943
3972
  var e = t.n;
@@ -3950,7 +3979,7 @@ function ui(t) {
3950
3979
  function $(t, e) {
3951
3980
  this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
3952
3981
  }
3953
- $.prototype.brand = Zo;
3982
+ $.prototype.brand = Xo;
3954
3983
  $.prototype.h = function() {
3955
3984
  return !0;
3956
3985
  };
@@ -4006,16 +4035,16 @@ Object.defineProperty($.prototype, "value", { get: function() {
4006
4035
  return t !== void 0 && (t.i = this.i), this.v;
4007
4036
  }, set: function(t) {
4008
4037
  if (t !== this.v) {
4009
- if (Zt > 100) throw new Error("Cycle detected");
4038
+ if (Yt > 100) throw new Error("Cycle detected");
4010
4039
  this.v = t, this.i++, pt++, se++;
4011
4040
  try {
4012
4041
  for (var e = this.t; e !== void 0; e = e.x) e.t.N();
4013
4042
  } finally {
4014
- St();
4043
+ jt();
4015
4044
  }
4016
4045
  }
4017
4046
  } });
4018
- function Y(t, e) {
4047
+ function ee(t, e) {
4019
4048
  return new $(t, e);
4020
4049
  }
4021
4050
  function hi(t) {
@@ -4082,7 +4111,7 @@ Object.defineProperty(ge.prototype, "value", { get: function() {
4082
4111
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
4083
4112
  return this.v;
4084
4113
  } });
4085
- function cr(t, e) {
4114
+ function ur(t, e) {
4086
4115
  return new ge(t, e);
4087
4116
  }
4088
4117
  function pi(t) {
@@ -4094,19 +4123,19 @@ function pi(t) {
4094
4123
  try {
4095
4124
  e();
4096
4125
  } catch (r) {
4097
- throw t.f &= -2, t.f |= 8, pn(t), r;
4126
+ throw t.f &= -2, t.f |= 8, gn(t), r;
4098
4127
  } finally {
4099
- y = n, St();
4128
+ y = n, jt();
4100
4129
  }
4101
4130
  }
4102
4131
  }
4103
- function pn(t) {
4132
+ function gn(t) {
4104
4133
  for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
4105
4134
  t.x = void 0, t.s = void 0, pi(t);
4106
4135
  }
4107
- function Yo(t) {
4136
+ function ea(t) {
4108
4137
  if (y !== this) throw new Error("Out-of-order effect");
4109
- fi(this), y = t, this.f &= -2, 8 & this.f && pn(this), St();
4138
+ fi(this), y = t, this.f &= -2, 8 & this.f && gn(this), jt();
4110
4139
  }
4111
4140
  function Ie(t, e) {
4112
4141
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
@@ -4125,13 +4154,13 @@ Ie.prototype.S = function() {
4125
4154
  if (1 & this.f) throw new Error("Cycle detected");
4126
4155
  this.f |= 1, this.f &= -9, pi(this), di(this), se++;
4127
4156
  var t = y;
4128
- return y = this, Yo.bind(this, t);
4157
+ return y = this, ea.bind(this, t);
4129
4158
  };
4130
4159
  Ie.prototype.N = function() {
4131
4160
  2 & this.f || (this.f |= 2, this.o = Ue, Ue = this);
4132
4161
  };
4133
4162
  Ie.prototype.d = function() {
4134
- this.f |= 8, 1 & this.f || pn(this);
4163
+ this.f |= 8, 1 & this.f || gn(this);
4135
4164
  };
4136
4165
  Ie.prototype.dispose = function() {
4137
4166
  this.d();
@@ -4146,7 +4175,7 @@ function et(t, e) {
4146
4175
  var r = n.d.bind(n);
4147
4176
  return r[Symbol.dispose] = r, r;
4148
4177
  }
4149
- var gi, ot, ea = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, mi = [];
4178
+ var gi, ot, ta = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, mi = [];
4150
4179
  et(function() {
4151
4180
  gi = this.N;
4152
4181
  })();
@@ -4169,11 +4198,11 @@ function xi(t) {
4169
4198
  a.__c.__$f |= 4;
4170
4199
  break;
4171
4200
  }
4172
- var u = cr(function() {
4201
+ var u = ur(function() {
4173
4202
  var f = r.value.value;
4174
4203
  return f === 0 ? 0 : f === !0 ? "" : f || "";
4175
- }), d = cr(function() {
4176
- return !Array.isArray(u.value) && !vr(u.value);
4204
+ }), d = ur(function() {
4205
+ return !Array.isArray(u.value) && !_r(u.value);
4177
4206
  }), c = et(function() {
4178
4207
  if (this.N = bi, d.value) {
4179
4208
  var f = u.value;
@@ -4201,7 +4230,7 @@ Ee("__b", function(t, e) {
4201
4230
  t(e);
4202
4231
  });
4203
4232
  Ee("__r", function(t, e) {
4204
- if (t(e), e.type !== F) {
4233
+ if (t(e), e.type !== D) {
4205
4234
  gt();
4206
4235
  var n, r = e.__c;
4207
4236
  r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = (function(i, s) {
@@ -4211,7 +4240,7 @@ Ee("__r", function(t, e) {
4211
4240
  }, { name: s }), o.c = i, o;
4212
4241
  })(function() {
4213
4242
  var i;
4214
- ea && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
4243
+ ta && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
4215
4244
  }, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), gt(n);
4216
4245
  }
4217
4246
  });
@@ -4233,14 +4262,14 @@ Ee("diffed", function(t, e) {
4233
4262
  s = {}, n.U = s;
4234
4263
  for (var a in r) {
4235
4264
  var u = s[a], d = r[a];
4236
- u === void 0 ? (u = ta(n, a, d, i), s[a] = u) : u.o(d, i);
4265
+ u === void 0 ? (u = na(n, a, d, i), s[a] = u) : u.o(d, i);
4237
4266
  }
4238
4267
  }
4239
4268
  }
4240
4269
  t(e);
4241
4270
  });
4242
- function ta(t, e, n, r) {
4243
- var i = e in t && t.ownerSVGElement === void 0, s = Y(n);
4271
+ function na(t, e, n, r) {
4272
+ var i = e in t && t.ownerSVGElement === void 0, s = ee(n);
4244
4273
  return { o: function(o, l) {
4245
4274
  s.value = o, r = l;
4246
4275
  }, d: et(function() {
@@ -4274,7 +4303,7 @@ Ee("unmount", function(t, e) {
4274
4303
  Ee("__h", function(t, e, n, r) {
4275
4304
  (r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
4276
4305
  });
4277
- z.prototype.shouldComponentUpdate = function(t, e) {
4306
+ B.prototype.shouldComponentUpdate = function(t, e) {
4278
4307
  if (this.__R) return !0;
4279
4308
  var n = this.__$u, r = n && n.s !== void 0;
4280
4309
  for (var i in e) return !0;
@@ -4288,27 +4317,27 @@ z.prototype.shouldComponentUpdate = function(t, e) {
4288
4317
  };
4289
4318
  function ke(t, e) {
4290
4319
  return U(function() {
4291
- return Y(t, e);
4320
+ return ee(t, e);
4292
4321
  }, []);
4293
4322
  }
4294
- var na = function(t) {
4323
+ var ra = function(t) {
4295
4324
  queueMicrotask(function() {
4296
4325
  queueMicrotask(t);
4297
4326
  });
4298
4327
  };
4299
- function ra() {
4300
- Xo(function() {
4328
+ function ia() {
4329
+ Yo(function() {
4301
4330
  for (var t; t = mi.shift(); ) gi.call(t);
4302
4331
  });
4303
4332
  }
4304
4333
  function bi() {
4305
- mi.push(this) === 1 && (m.requestAnimationFrame || na)(ra);
4334
+ mi.push(this) === 1 && (m.requestAnimationFrame || ra)(ia);
4306
4335
  }
4307
- const A = Y(!1), mt = Y(void 0), Xt = Y(void 0);
4308
- function ia(t) {
4336
+ const A = ee(!1), mt = ee(void 0), xt = ee(void 0);
4337
+ function sa(t) {
4309
4338
  return t.replace(/\.convex\.site\b/, ".convex.cloud");
4310
4339
  }
4311
- function sa(t) {
4340
+ function yi(t) {
4312
4341
  return t.replace(/\.convex\.cloud\b/, ".convex.site");
4313
4342
  }
4314
4343
  function oa(t, e) {
@@ -4333,33 +4362,76 @@ function oa(t, e) {
4333
4362
  windowHeight: t.windowHeight ?? e?.windowHeight
4334
4363
  };
4335
4364
  }
4336
- async function aa(t, e, n) {
4337
- const r = `${t}/widget/config?orgSlug=${encodeURIComponent(e)}`, i = await fetch(r, { signal: n });
4338
- return i.ok ? i.json() : null;
4339
- }
4340
- function la(t, e) {
4341
- const [n, r] = R(null);
4342
- return D(() => {
4343
- r(null);
4344
- const i = e ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = i ? sa(i) : void 0;
4345
- if (!s || !t)
4365
+ async function aa(t, e, n, r) {
4366
+ const i = new URL(`${t}/widget/config`);
4367
+ i.searchParams.set("orgSlug", e), r && i.searchParams.set("projSlug", r);
4368
+ const s = await fetch(i.toString(), { signal: n });
4369
+ return s.ok ? s.json() : null;
4370
+ }
4371
+ function la(t, e, n) {
4372
+ const [r, i] = R(null);
4373
+ return N(() => {
4374
+ i(null);
4375
+ const s = n ?? "https://tame-spider-109.eu-west-1.convex.cloud", o = s ? yi(s) : void 0;
4376
+ if (!o || !t)
4346
4377
  return;
4347
- const o = new AbortController();
4348
- async function l(a) {
4378
+ const l = new AbortController();
4379
+ async function a(u) {
4349
4380
  try {
4350
- const u = await aa(a, t, o.signal);
4351
- u && r(u);
4352
- } catch (u) {
4353
- if (u instanceof Error && u.name === "AbortError")
4381
+ const d = await aa(u, t, l.signal, e);
4382
+ d && i(d);
4383
+ } catch (d) {
4384
+ if (d instanceof Error && d.name === "AbortError")
4354
4385
  return;
4355
4386
  }
4356
4387
  }
4357
- return l(s), () => {
4358
- o.abort();
4388
+ return a(o), () => {
4389
+ l.abort();
4359
4390
  };
4360
- }, [t, e]), n;
4391
+ }, [t, e, n]), r;
4361
4392
  }
4362
- const yi = {
4393
+ async function ca(t, e, n) {
4394
+ try {
4395
+ const r = await fetch(`${e}/widget/bootstrap`, {
4396
+ method: "POST",
4397
+ headers: { "Content-Type": "application/json" },
4398
+ body: JSON.stringify(n ? { orgSlug: t, projSlug: n } : { orgSlug: t }),
4399
+ credentials: "omit"
4400
+ });
4401
+ if (r.ok) {
4402
+ const i = await r.json();
4403
+ return { ok: !0, token: i.token, excludePaths: i.excludePaths };
4404
+ }
4405
+ return r.status === 403 ? { ok: !1, error: "unauthorized" } : r.status === 404 ? { ok: !1, error: "not_found" } : { ok: !1, error: "network" };
4406
+ } catch {
4407
+ return { ok: !1, error: "network" };
4408
+ }
4409
+ }
4410
+ function ua(t, e, n, r) {
4411
+ N(() => {
4412
+ if (n)
4413
+ return;
4414
+ const i = r ?? "https://tame-spider-109.eu-west-1.convex.cloud", s = i ? yi(i) : void 0;
4415
+ if (!s || !t)
4416
+ return;
4417
+ let o = !1;
4418
+ return (async () => {
4419
+ const l = await ca(t, s, e);
4420
+ if (!o)
4421
+ if (l.ok)
4422
+ xt.value = l.token;
4423
+ else {
4424
+ const a = e ? `project '${t}/${e}'` : `org '${t}'`;
4425
+ l.error === "unauthorized" ? console.error(
4426
+ `[JexityChat] This domain is not authorized for ${a}. Check the widget's domain rules.`
4427
+ ) : l.error === "not_found" ? console.error(`[JexityChat] No active widget config found for ${a}.`) : console.error(`[JexityChat] Bootstrap failed: ${l.error}`);
4428
+ }
4429
+ })(), () => {
4430
+ o = !0;
4431
+ };
4432
+ }, [t, e, n, r]);
4433
+ }
4434
+ const vi = {
4363
4435
  title: "Assistant",
4364
4436
  statusOnline: "Online · Responds in seconds",
4365
4437
  inputPlaceholder: "Type a message…",
@@ -4414,7 +4486,7 @@ const yi = {
4414
4486
  somethingWentWrong: "Something went wrong",
4415
4487
  fabLabel: "Chat with us",
4416
4488
  chatNoLongerAvailable: "This chat is no longer available."
4417
- }, ca = {
4489
+ }, ha = {
4418
4490
  title: "Assistent",
4419
4491
  statusOnline: "Online · Antwortet in Sekunden",
4420
4492
  inputPlaceholder: "Nachricht eingeben…",
@@ -4469,88 +4541,88 @@ const yi = {
4469
4541
  somethingWentWrong: "Etwas ist schiefgelaufen",
4470
4542
  fabLabel: "Chatte mit uns",
4471
4543
  chatNoLongerAvailable: "Dieser Chat ist nicht mehr verfügbar."
4472
- }, ua = [
4544
+ }, da = [
4473
4545
  { value: "de", label: "Deutsch", flag: "🇩🇪" },
4474
4546
  { value: "en", label: "English", flag: "🇬🇧" }
4475
- ], ha = "de", da = "jex-locale", gn = Y("de"), fa = { en: yi, de: ca };
4476
- function P() {
4477
- return fa[gn.value] ?? yi;
4547
+ ], fa = "de", pa = "jex-locale", mn = ee("de"), ga = { en: vi, de: ha };
4548
+ function q() {
4549
+ return ga[mn.value] ?? vi;
4478
4550
  }
4479
- function Nt(t) {
4551
+ function Qt(t) {
4480
4552
  if (!t)
4481
4553
  return null;
4482
4554
  const e = (t.split("-")[0] ?? "").toLowerCase();
4483
- return ua.some((r) => r.value === e) ? e : null;
4555
+ return da.some((r) => r.value === e) ? e : null;
4484
4556
  }
4485
- function vi(t) {
4486
- const e = Nt(t);
4557
+ function _i(t) {
4558
+ const e = Qt(t);
4487
4559
  if (e)
4488
4560
  return e;
4489
4561
  try {
4490
- const n = Nt(localStorage.getItem(da));
4562
+ const n = Qt(localStorage.getItem(pa));
4491
4563
  if (n)
4492
4564
  return n;
4493
4565
  } catch {
4494
4566
  }
4495
4567
  if (typeof navigator < "u") {
4496
- const n = Nt(navigator.language);
4568
+ const n = Qt(navigator.language);
4497
4569
  if (n)
4498
4570
  return n;
4499
4571
  }
4500
- return ha;
4572
+ return fa;
4501
4573
  }
4502
- function pa(t) {
4503
- D(() => {
4574
+ function ma(t) {
4575
+ N(() => {
4504
4576
  function e(n) {
4505
4577
  const r = t ?? window.location.origin;
4506
4578
  if (n.origin !== r || n.data?.type !== "jexity:config")
4507
4579
  return;
4508
4580
  const { locale: i } = n.data.payload;
4509
- i && (gn.value = vi(i));
4581
+ i && (mn.value = _i(i));
4510
4582
  }
4511
4583
  return window.addEventListener("message", e), () => {
4512
4584
  window.removeEventListener("message", e);
4513
4585
  };
4514
4586
  }, [t]);
4515
4587
  }
4516
- const mn = "jex-session-ref", jt = "jex-session-active", ae = Y(null), fe = Y(!1);
4517
- function ga() {
4588
+ const xn = "jex-session-ref", Ct = "jex-session-active", ae = ee(null), fe = ee(!1);
4589
+ function xa() {
4518
4590
  return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
4519
4591
  }
4520
- function ma() {
4592
+ function ba() {
4521
4593
  try {
4522
- const t = sessionStorage.getItem(mn), e = sessionStorage.getItem(jt);
4594
+ const t = sessionStorage.getItem(xn), e = sessionStorage.getItem(Ct);
4523
4595
  ae.value = t ?? null, fe.value = t !== null && e === "true";
4524
4596
  } catch {
4525
4597
  ae.value = null, fe.value = !1;
4526
4598
  }
4527
4599
  }
4528
- function Yt() {
4529
- const t = ga();
4600
+ function en() {
4601
+ const t = xa();
4530
4602
  ae.value = t, fe.value = !1;
4531
4603
  try {
4532
- sessionStorage.setItem(mn, t), sessionStorage.removeItem(jt);
4604
+ sessionStorage.setItem(xn, t), sessionStorage.removeItem(Ct);
4533
4605
  } catch {
4534
4606
  }
4535
4607
  return t;
4536
4608
  }
4537
- function xa(t) {
4609
+ function ya(t) {
4538
4610
  ae.value = t, fe.value = !0;
4539
4611
  try {
4540
- sessionStorage.setItem(mn, t), sessionStorage.setItem(jt, "true");
4612
+ sessionStorage.setItem(xn, t), sessionStorage.setItem(Ct, "true");
4541
4613
  } catch {
4542
4614
  }
4543
4615
  }
4544
- function ba() {
4616
+ function va() {
4545
4617
  if (ae.value) {
4546
4618
  fe.value = !0;
4547
4619
  try {
4548
- sessionStorage.setItem(jt, "true");
4620
+ sessionStorage.setItem(Ct, "true");
4549
4621
  } catch {
4550
4622
  }
4551
4623
  }
4552
4624
  }
4553
- function ya(t) {
4625
+ function _a(t) {
4554
4626
  const e = {}, { primaryColor: n, theme: r } = t;
4555
4627
  if (n && (e["--jex-primary"] = n, e["--jex-bg-trigger"] = n, e["--jex-bg-header"] = n, e["--jex-bg-msg-user"] = n, e["--jex-bg-send-btn"] = n), t.accentColor && (e["--jex-accent"] = t.accentColor), r?.bg) {
4556
4628
  const i = r.bg;
@@ -4566,17 +4638,17 @@ function ya(t) {
4566
4638
  }
4567
4639
  return t.fontFamily && (e["--jex-font-family"] = t.fontFamily), t.fontSize && (e["--jex-font-size"] = `${t.fontSize}px`), t.borderRadius && (e["--jex-radius"] = t.borderRadius), t.windowWidth && (e["--jex-window-width"] = `${t.windowWidth}px`), t.windowHeight && (e["--jex-window-height"] = `${t.windowHeight}px`), Object.keys(e).length > 0 ? e : void 0;
4568
4640
  }
4569
- const B = Y([{ id: "home" }]), va = Y("screen");
4641
+ const F = ee([{ id: "home" }]), ka = ee("screen");
4570
4642
  function we(t) {
4571
- B.value = [...B.value, t];
4643
+ F.value = [...F.value, t];
4572
4644
  }
4573
- function xn() {
4574
- B.value.length > 1 && (B.value = B.value.slice(0, -1));
4645
+ function bn() {
4646
+ F.value.length > 1 && (F.value = F.value.slice(0, -1));
4575
4647
  }
4576
4648
  function Se(t) {
4577
- B.value = [...B.value.slice(0, -1), t];
4649
+ F.value = [...F.value.slice(0, -1), t];
4578
4650
  }
4579
- function bn({ size: t = 24 }) {
4651
+ function yn({ size: t = 24 }) {
4580
4652
  return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
4581
4653
  /* @__PURE__ */ h("path", { d: "M12 8V4H8" }),
4582
4654
  /* @__PURE__ */ h("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
@@ -4586,29 +4658,29 @@ function bn({ size: t = 24 }) {
4586
4658
  /* @__PURE__ */ h("path", { d: "M9 13v2" })
4587
4659
  ] });
4588
4660
  }
4589
- function ur({ title: t }) {
4590
- const e = P(), n = B.value.length > 1;
4661
+ function hr({ title: t }) {
4662
+ const e = q(), n = F.value.length > 1;
4591
4663
  return /* @__PURE__ */ h("header", { class: "jex-chat-header", children: [
4592
4664
  n && /* @__PURE__ */ h(
4593
4665
  "button",
4594
4666
  {
4595
4667
  class: "jex-header-back",
4596
- onClick: xn,
4668
+ onClick: bn,
4597
4669
  "aria-label": e.back || "Go back",
4598
4670
  children: /* @__PURE__ */ h("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "m15 18-6-6 6-6" }) })
4599
4671
  }
4600
4672
  ),
4601
- !n && /* @__PURE__ */ h(bn, { size: 24 }),
4673
+ !n && /* @__PURE__ */ h(yn, { size: 24 }),
4602
4674
  /* @__PURE__ */ h("div", { class: "jex-header-info", children: [
4603
4675
  /* @__PURE__ */ h("h3", { children: t }),
4604
4676
  /* @__PURE__ */ h("p", { children: e.statusOnline })
4605
4677
  ] })
4606
4678
  ] });
4607
4679
  }
4608
- function _a({ size: t = 14 }) {
4680
+ function wa({ size: t = 14 }) {
4609
4681
  return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }) });
4610
4682
  }
4611
- function hr() {
4683
+ function dr() {
4612
4684
  return /* @__PURE__ */ h("div", { class: "jex-widget-footer", children: /* @__PURE__ */ h(
4613
4685
  "a",
4614
4686
  {
@@ -4617,7 +4689,7 @@ function hr() {
4617
4689
  rel: "noopener noreferrer",
4618
4690
  class: "jex-branding",
4619
4691
  children: [
4620
- /* @__PURE__ */ h(_a, { size: 14 }),
4692
+ /* @__PURE__ */ h(wa, { size: 14 }),
4621
4693
  /* @__PURE__ */ h("span", { children: [
4622
4694
  "Powered by ",
4623
4695
  /* @__PURE__ */ h("strong", { children: "Jexity" })
@@ -4626,16 +4698,16 @@ function hr() {
4626
4698
  }
4627
4699
  ) });
4628
4700
  }
4629
- function _i({ size: t = 28 }) {
4701
+ function ki({ size: t = 28 }) {
4630
4702
  return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
4631
4703
  }
4632
- function ka({ size: t = 28 }) {
4704
+ function Sa({ size: t = 28 }) {
4633
4705
  return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
4634
4706
  /* @__PURE__ */ h("path", { d: "M18 6 6 18" }),
4635
4707
  /* @__PURE__ */ h("path", { d: "m6 6 12 12" })
4636
4708
  ] });
4637
4709
  }
4638
- function wa({ size: t = 24, ...e }) {
4710
+ function ja({ size: t = 24, ...e }) {
4639
4711
  return /* @__PURE__ */ h(
4640
4712
  "svg",
4641
4713
  {
@@ -4652,39 +4724,39 @@ function wa({ size: t = 24, ...e }) {
4652
4724
  }
4653
4725
  );
4654
4726
  }
4655
- const Sa = {
4656
- chat: /* @__PURE__ */ h(_i, { size: 28 }),
4657
- bot: /* @__PURE__ */ h(bn, { size: 28 }),
4658
- sparkles: /* @__PURE__ */ h(wa, { size: 28 })
4659
- }, ja = {
4727
+ const Ca = {
4728
+ chat: /* @__PURE__ */ h(ki, { size: 28 }),
4729
+ bot: /* @__PURE__ */ h(yn, { size: 28 }),
4730
+ sparkles: /* @__PURE__ */ h(ja, { size: 28 })
4731
+ }, Ta = {
4660
4732
  none: "0px",
4661
4733
  sm: "0.5rem",
4662
4734
  md: "0.75rem",
4663
4735
  lg: "1.25rem",
4664
4736
  full: "9999px"
4665
4737
  };
4666
- function Ca({ radius: t = "full", iconOption: e = "chat", label: n }) {
4667
- const r = P(), i = n ?? r.fabLabel, s = i !== "";
4738
+ function Ra({ radius: t = "full", iconOption: e = "chat", label: n }) {
4739
+ const r = q(), i = n ?? r.fabLabel, s = i !== "";
4668
4740
  return /* @__PURE__ */ h(
4669
4741
  "button",
4670
4742
  {
4671
4743
  class: `jex-floating-button ${!A.value && s ? "jex-has-label" : ""}`,
4672
- style: { borderRadius: ja[t] ?? "9999px" },
4744
+ style: { borderRadius: Ta[t] ?? "9999px" },
4673
4745
  onClick: () => {
4674
4746
  A.value = !A.value;
4675
4747
  },
4676
4748
  "aria-label": A.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
4677
- children: A.value ? /* @__PURE__ */ h(ka, { size: 28 }) : /* @__PURE__ */ h("div", { class: "jex-fab-inner", children: [
4678
- Sa[e],
4749
+ children: A.value ? /* @__PURE__ */ h(Sa, { size: 28 }) : /* @__PURE__ */ h("div", { class: "jex-fab-inner", children: [
4750
+ Ca[e],
4679
4751
  s && /* @__PURE__ */ h("span", { class: "jex-fab-label", children: i })
4680
4752
  ] })
4681
4753
  }
4682
4754
  );
4683
4755
  }
4684
- function Ta({ title: t }) {
4685
- const e = P(), n = ae.value, [r, i] = R("");
4756
+ function $a({ title: t }) {
4757
+ const e = q(), n = ae.value, [r, i] = R("");
4686
4758
  function s() {
4687
- Yt(), we({ id: "chat" });
4759
+ en(), we({ id: "chat" });
4688
4760
  }
4689
4761
  function o() {
4690
4762
  we({ id: "chat" });
@@ -4692,12 +4764,12 @@ function Ta({ title: t }) {
4692
4764
  function l(a) {
4693
4765
  a.preventDefault();
4694
4766
  const u = r.trim().toUpperCase();
4695
- u && (xa(u), we({ id: "chat" }));
4767
+ u && (ya(u), we({ id: "chat" }));
4696
4768
  }
4697
4769
  return /* @__PURE__ */ h("div", { class: "jex-home", children: [
4698
4770
  /* @__PURE__ */ h("div", { class: "jex-home-hero", children: [
4699
4771
  /* @__PURE__ */ h("div", { class: "jex-home-avatar", children: [
4700
- /* @__PURE__ */ h(_i, { size: 24 }),
4772
+ /* @__PURE__ */ h(ki, { size: 24 }),
4701
4773
  /* @__PURE__ */ h("span", { class: "jex-home-status-dot" })
4702
4774
  ] }),
4703
4775
  /* @__PURE__ */ h("div", { class: "jex-home-hero-text", children: [
@@ -4740,8 +4812,8 @@ function Ta({ title: t }) {
4740
4812
  ] })
4741
4813
  ] });
4742
4814
  }
4743
- function Ra({ title: t }) {
4744
- const e = P();
4815
+ function Aa({ title: t }) {
4816
+ const e = q();
4745
4817
  return /* @__PURE__ */ h("div", { class: "jex-selection", children: [
4746
4818
  /* @__PURE__ */ h("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
4747
4819
  /* @__PURE__ */ h("div", { class: "jex-selection-options", children: [
@@ -4772,13 +4844,13 @@ function Ra({ title: t }) {
4772
4844
  ] })
4773
4845
  ] });
4774
4846
  }
4775
- function ki(t, e) {
4847
+ function wi(t, e) {
4776
4848
  const n = {
4777
4849
  get(r, i) {
4778
4850
  if (typeof i == "string") {
4779
4851
  const s = [...e, i];
4780
- return ki(t, s);
4781
- } else if (i === ri) {
4852
+ return wi(t, s);
4853
+ } else if (i === ii) {
4782
4854
  if (e.length < 1) {
4783
4855
  const s = [t, ...e].join(".");
4784
4856
  throw new Error(
@@ -4792,91 +4864,92 @@ function ki(t, e) {
4792
4864
  };
4793
4865
  return new Proxy({}, n);
4794
4866
  }
4795
- const $a = () => ki("components", []), $e = Ys;
4796
- $a();
4797
- function Aa(t) {
4798
- const e = vt(null), n = ke(!1), r = ke(!1), i = ke(!1), s = ke(null), o = wt($e.functions.chat.public.sessions.createOrResume), l = async (c) => {
4799
- const p = Xt.value;
4800
- if (!p)
4867
+ const Ia = () => wi("components", []), $e = eo;
4868
+ Ia();
4869
+ function Ea(t, e) {
4870
+ const n = _t(null), r = ke(!1), i = ke(!1), s = ke(!1), o = ke(null), l = St($e.functions.chat.public.sessions.createOrResume), a = async (p) => {
4871
+ const f = xt.value;
4872
+ if (!f)
4801
4873
  return console.warn("[JexityChat] No bootstrap token — session creation blocked."), null;
4802
- const f = await o({
4874
+ const g = await l({
4803
4875
  orgSlug: t,
4804
- visitorId: c,
4805
- bootstrapToken: p,
4876
+ ...e ? { projSlug: e } : {},
4877
+ visitorId: p,
4878
+ bootstrapToken: f,
4806
4879
  ...mt.value ? { source: mt.value } : {}
4807
4880
  });
4808
- s.value = f.status;
4809
- const g = { sessionId: f.sessionId, visitorId: c };
4810
- return e.current = g, { session: g, result: f };
4811
- }, a = We(async () => {
4812
- if (e.current)
4813
- return e.current;
4814
- if (i.value)
4881
+ o.value = g.status;
4882
+ const x = { sessionId: g.sessionId, visitorId: p };
4883
+ return n.current = x, { session: x, result: g };
4884
+ }, u = We(async () => {
4885
+ if (n.current)
4886
+ return n.current;
4887
+ if (s.value)
4815
4888
  return null;
4816
- n.value = !0;
4817
- const c = ae.value !== null, p = ae.value ?? Yt();
4889
+ r.value = !0;
4890
+ const p = ae.value !== null, f = ae.value ?? en();
4818
4891
  try {
4819
- const f = await l(p);
4820
- return f ? (c && f.result.isNew && (r.value = !0, i.value = !0), f.session) : null;
4821
- } catch (f) {
4822
- return console.error("[JexityChat] Failed to create session:", f), null;
4892
+ const g = await a(f);
4893
+ return g ? (p && g.result.isNew && (i.value = !0, s.value = !0), g.session) : null;
4894
+ } catch (g) {
4895
+ return console.error("[JexityChat] Failed to create session:", g), null;
4823
4896
  } finally {
4824
- n.value = !1;
4897
+ r.value = !1;
4825
4898
  }
4826
- }, [t, o, n, r, i]), u = We(async () => {
4827
- e.current = null, i.value = !1, r.value = !1;
4828
- const c = Yt();
4829
- n.value = !0;
4899
+ }, [t, e, l, r, i, s]), d = We(async () => {
4900
+ n.current = null, s.value = !1, i.value = !1;
4901
+ const p = en();
4902
+ r.value = !0;
4830
4903
  try {
4831
- return (await l(c))?.session ?? null;
4832
- } catch (p) {
4833
- return console.error("[JexityChat] Failed to create fresh session:", p), null;
4904
+ return (await a(p))?.session ?? null;
4905
+ } catch (f) {
4906
+ return console.error("[JexityChat] Failed to create fresh session:", f), null;
4834
4907
  } finally {
4835
- n.value = !1;
4908
+ r.value = !1;
4836
4909
  }
4837
- }, [t, o, n, r, i, s]), d = e.current;
4910
+ }, [t, e, l, r, i, s, o]), c = n.current;
4838
4911
  return {
4839
- sessionId: d?.sessionId ?? null,
4840
- visitorId: d?.visitorId ?? null,
4841
- isLoading: n.value,
4842
- sessionNotFound: r.value,
4843
- resumeFailed: i.value,
4844
- sessionStatus: s.value,
4845
- isOrgDeleted: s.value === "org_deleted",
4846
- ensureSession: a,
4847
- startFresh: u
4912
+ sessionId: c?.sessionId ?? null,
4913
+ visitorId: c?.visitorId ?? null,
4914
+ isLoading: r.value,
4915
+ sessionNotFound: i.value,
4916
+ resumeFailed: s.value,
4917
+ sessionStatus: o.value,
4918
+ isOrgDeleted: o.value === "org_deleted",
4919
+ ensureSession: u,
4920
+ startFresh: d
4848
4921
  };
4849
4922
  }
4850
- function yn() {
4923
+ function vn() {
4851
4924
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
4852
4925
  }
4853
- var me = yn();
4854
- function wi(t) {
4926
+ var me = vn();
4927
+ function Si(t) {
4855
4928
  me = t;
4856
4929
  }
4857
4930
  var ce = { exec: () => null };
4858
- function x(t, e = "") {
4931
+ function b(t, e = "") {
4859
4932
  let n = typeof t == "string" ? t : t.source, r = { replace: (i, s) => {
4860
4933
  let o = typeof s == "string" ? s : s.source;
4861
4934
  return o = o.replace(I.caret, "$1"), n = n.replace(i, o), r;
4862
4935
  }, getRegex: () => new RegExp(n, e) };
4863
4936
  return r;
4864
4937
  }
4865
- var Ia = (() => {
4938
+ var Pa = (() => {
4866
4939
  try {
4867
4940
  return !!new RegExp("(?<=1)(?<!1)");
4868
4941
  } catch {
4869
4942
  return !1;
4870
4943
  }
4871
- })(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Ea = /^(?:[ \t]*(?:\n|$))+/, qa = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Pa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, tt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ma = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, vn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Si = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ji = x(Si).replace(/bull/g, vn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), La = x(Si).replace(/bull/g, vn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), _n = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Oa = /^[^\n]+/, kn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Na = x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", kn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Qa = x(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, vn).getRegex(), Ct = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", wn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, za = x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", wn).replace("tag", Ct).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ci = x(_n).replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ct).getRegex(), Ba = x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ci).getRegex(), Sn = { blockquote: Ba, code: qa, def: Na, fences: Pa, heading: Ma, hr: tt, html: za, lheading: ji, list: Qa, newline: Ea, paragraph: Ci, table: ce, text: Oa }, dr = x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ct).getRegex(), Fa = { ...Sn, lheading: La, table: dr, paragraph: x(_n).replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", dr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ct).getRegex() }, Da = { ...Sn, html: x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", wn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: ce, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: x(_n).replace("hr", tt).replace("heading", ` *#{1,6} *[^
4872
- ]`).replace("lheading", ji).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ua = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Va = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ti = /^( {2,}|\\)\n(?!\s*$)/, Wa = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qe = /[\p{P}\p{S}]/u, Tt = /[\s\p{P}\p{S}]/u, jn = /[^\s\p{P}\p{S}]/u, Ha = x(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Tt).getRegex(), Ri = /(?!~)[\p{P}\p{S}]/u, Ja = /(?!~)[\s\p{P}\p{S}]/u, Ga = /(?:[^\s\p{P}\p{S}]|~)/u, Ka = x(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ia ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), $i = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Za = x($i, "u").replace(/punct/g, qe).getRegex(), Xa = x($i, "u").replace(/punct/g, Ri).getRegex(), Ai = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ya = x(Ai, "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, Tt).replace(/punct/g, qe).getRegex(), el = x(Ai, "gu").replace(/notPunctSpace/g, Ga).replace(/punctSpace/g, Ja).replace(/punct/g, Ri).getRegex(), tl = x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, Tt).replace(/punct/g, qe).getRegex(), nl = x(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, qe).getRegex(), rl = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", il = x(rl, "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, Tt).replace(/punct/g, qe).getRegex(), sl = x(/\\(punct)/, "gu").replace(/punct/g, qe).getRegex(), ol = x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), al = x(wn).replace("(?:-->|$)", "-->").getRegex(), ll = x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", al).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, cl = x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", xt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ii = x(/^!?\[(label)\]\[(ref)\]/).replace("label", xt).replace("ref", kn).getRegex(), Ei = x(/^!?\[(ref)\](?:\[\])?/).replace("ref", kn).getRegex(), ul = x("reflink|nolink(?!\\()", "g").replace("reflink", Ii).replace("nolink", Ei).getRegex(), fr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Cn = { _backpedal: ce, anyPunctuation: sl, autolink: ol, blockSkip: Ka, br: Ti, code: Va, del: ce, delLDelim: ce, delRDelim: ce, emStrongLDelim: Za, emStrongRDelimAst: Ya, emStrongRDelimUnd: tl, escape: Ua, link: cl, nolink: Ei, punctuation: Ha, reflink: Ii, reflinkSearch: ul, tag: ll, text: Wa, url: ce }, hl = { ...Cn, link: x(/^!?\[(label)\]\((.*?)\)/).replace("label", xt).getRegex(), reflink: x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", xt).getRegex() }, en = { ...Cn, emStrongRDelimAst: el, emStrongLDelim: Xa, delLDelim: nl, delRDelim: il, url: x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", fr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: x(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", fr).getRegex() }, dl = { ...en, br: x(Ti).replace("{2,}", "*").getRegex(), text: x(en.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, at = { normal: Sn, gfm: Fa, pedantic: Da }, Me = { normal: Cn, gfm: en, breaks: dl, pedantic: hl }, fl = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, pr = (t) => fl[t];
4944
+ })(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, qa = /^(?:[ \t]*(?:\n|$))+/, Ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, La = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, tt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Na = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, _n = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ji = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ci = b(ji).replace(/bull/g, _n).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Oa = b(ji).replace(/bull/g, _n).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), kn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Qa = /^[^\n]+/, wn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, za = b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", wn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ba = b(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, _n).getRegex(), Tt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Sn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Fa = b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Sn).replace("tag", Tt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ti = b(kn).replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tt).getRegex(), Da = b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ti).getRegex(), jn = { blockquote: Da, code: Ma, def: za, fences: La, heading: Na, hr: tt, html: Fa, lheading: Ci, list: Ba, newline: qa, paragraph: Ti, table: ce, text: Qa }, fr = b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tt).getRegex(), Ua = { ...jn, lheading: Oa, table: fr, paragraph: b(kn).replace("hr", tt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Tt).getRegex() }, Va = { ...jn, html: b(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Sn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: ce, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: b(kn).replace("hr", tt).replace("heading", ` *#{1,6} *[^
4945
+ ]`).replace("lheading", Ci).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Wa = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ha = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ri = /^( {2,}|\\)\n(?!\s*$)/, Ja = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Pe = /[\p{P}\p{S}]/u, Rt = /[\s\p{P}\p{S}]/u, Cn = /[^\s\p{P}\p{S}]/u, Ga = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Rt).getRegex(), $i = /(?!~)[\p{P}\p{S}]/u, Ka = /(?!~)[\s\p{P}\p{S}]/u, Za = /(?:[^\s\p{P}\p{S}]|~)/u, Xa = b(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pa ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ai = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ya = b(Ai, "u").replace(/punct/g, Pe).getRegex(), el = b(Ai, "u").replace(/punct/g, $i).getRegex(), Ii = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", tl = b(Ii, "gu").replace(/notPunctSpace/g, Cn).replace(/punctSpace/g, Rt).replace(/punct/g, Pe).getRegex(), nl = b(Ii, "gu").replace(/notPunctSpace/g, Za).replace(/punctSpace/g, Ka).replace(/punct/g, $i).getRegex(), rl = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Cn).replace(/punctSpace/g, Rt).replace(/punct/g, Pe).getRegex(), il = b(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Pe).getRegex(), sl = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ol = b(sl, "gu").replace(/notPunctSpace/g, Cn).replace(/punctSpace/g, Rt).replace(/punct/g, Pe).getRegex(), al = b(/\\(punct)/, "gu").replace(/punct/g, Pe).getRegex(), ll = b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), cl = b(Sn).replace("(?:-->|$)", "-->").getRegex(), ul = b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", cl).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), bt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, hl = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", bt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ei = b(/^!?\[(label)\]\[(ref)\]/).replace("label", bt).replace("ref", wn).getRegex(), Pi = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", wn).getRegex(), dl = b("reflink|nolink(?!\\()", "g").replace("reflink", Ei).replace("nolink", Pi).getRegex(), pr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Tn = { _backpedal: ce, anyPunctuation: al, autolink: ll, blockSkip: Xa, br: Ri, code: Ha, del: ce, delLDelim: ce, delRDelim: ce, emStrongLDelim: Ya, emStrongRDelimAst: tl, emStrongRDelimUnd: rl, escape: Wa, link: hl, nolink: Pi, punctuation: Ga, reflink: Ei, reflinkSearch: dl, tag: ul, text: Ja, url: ce }, fl = { ...Tn, link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", bt).getRegex(), reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", bt).getRegex() }, tn = { ...Tn, emStrongRDelimAst: nl, emStrongLDelim: el, delLDelim: il, delRDelim: ol, url: b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", pr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", pr).getRegex() }, pl = { ...tn, br: b(Ri).replace("{2,}", "*").getRegex(), text: b(tn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, at = { normal: jn, gfm: Ua, pedantic: Va }, Me = { normal: Tn, gfm: tn, breaks: pl, pedantic: fl }, gl = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, gr = (t) => gl[t];
4873
4946
  function G(t, e) {
4874
4947
  if (e) {
4875
- if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, pr);
4876
- } else if (I.escapeTestNoEncode.test(t)) return t.replace(I.escapeReplaceNoEncode, pr);
4948
+ if (I.escapeTest.test(t)) return t.replace(I.escapeReplace, gr);
4949
+ } else if (I.escapeTestNoEncode.test(t)) return t.replace(I.escapeReplaceNoEncode, gr);
4877
4950
  return t;
4878
4951
  }
4879
- function gr(t) {
4952
+ function mr(t) {
4880
4953
  try {
4881
4954
  t = encodeURI(t).replace(I.percentDecode, "%");
4882
4955
  } catch {
@@ -4884,7 +4957,7 @@ function gr(t) {
4884
4957
  }
4885
4958
  return t;
4886
4959
  }
4887
- function mr(t, e) {
4960
+ function xr(t, e) {
4888
4961
  let n = t.replace(I.findPipe, (s, o, l) => {
4889
4962
  let a = !1, u = o;
4890
4963
  for (; --u >= 0 && l[u] === "\\"; ) a = !a;
@@ -4903,7 +4976,7 @@ function Le(t, e, n) {
4903
4976
  i++;
4904
4977
  return t.slice(0, r - i);
4905
4978
  }
4906
- function pl(t, e) {
4979
+ function ml(t, e) {
4907
4980
  if (t.indexOf(e[1]) === -1) return -1;
4908
4981
  let n = 0;
4909
4982
  for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
@@ -4911,7 +4984,7 @@ function pl(t, e) {
4911
4984
  else if (t[r] === e[1] && (n--, n < 0)) return r;
4912
4985
  return n > 0 ? -2 : -1;
4913
4986
  }
4914
- function gl(t, e = 0) {
4987
+ function xl(t, e = 0) {
4915
4988
  let n = e, r = "";
4916
4989
  for (let i of t) if (i === " ") {
4917
4990
  let s = 4 - n % 4;
@@ -4919,13 +4992,13 @@ function gl(t, e = 0) {
4919
4992
  } else r += i, n++;
4920
4993
  return r;
4921
4994
  }
4922
- function xr(t, e, n, r, i) {
4995
+ function br(t, e, n, r, i) {
4923
4996
  let s = e.href, o = e.title || null, l = t[1].replace(i.other.outputLinkReplace, "$1");
4924
4997
  r.state.inLink = !0;
4925
4998
  let a = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: s, title: o, text: l, tokens: r.inlineTokens(l) };
4926
4999
  return r.state.inLink = !1, a;
4927
5000
  }
4928
- function ml(t, e, n) {
5001
+ function bl(t, e, n) {
4929
5002
  let r = t.match(n.other.indentCodeCompensation);
4930
5003
  if (r === null) return e;
4931
5004
  let i = r[1];
@@ -4938,7 +5011,7 @@ function ml(t, e, n) {
4938
5011
  }).join(`
4939
5012
  `);
4940
5013
  }
4941
- var bt = class {
5014
+ var yt = class {
4942
5015
  options;
4943
5016
  rules;
4944
5017
  lexer;
@@ -4960,7 +5033,7 @@ var bt = class {
4960
5033
  fences(t) {
4961
5034
  let e = this.rules.block.fences.exec(t);
4962
5035
  if (e) {
4963
- let n = e[0], r = ml(n, e[3] || "", this.rules);
5036
+ let n = e[0], r = bl(n, e[3] || "", this.rules);
4964
5037
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
4965
5038
  }
4966
5039
  }
@@ -5005,14 +5078,14 @@ ${d}` : d;
5005
5078
  if (p?.type === "blockquote") {
5006
5079
  let f = p, g = f.raw + `
5007
5080
  ` + n.join(`
5008
- `), b = this.blockquote(g);
5009
- s[s.length - 1] = b, r = r.substring(0, r.length - f.raw.length) + b.raw, i = i.substring(0, i.length - f.text.length) + b.text;
5081
+ `), x = this.blockquote(g);
5082
+ s[s.length - 1] = x, r = r.substring(0, r.length - f.raw.length) + x.raw, i = i.substring(0, i.length - f.text.length) + x.text;
5010
5083
  break;
5011
5084
  } else if (p?.type === "list") {
5012
5085
  let f = p, g = f.raw + `
5013
5086
  ` + n.join(`
5014
- `), b = this.list(g);
5015
- s[s.length - 1] = b, r = r.substring(0, r.length - p.raw.length) + b.raw, i = i.substring(0, i.length - f.raw.length) + b.raw, n = g.substring(s.at(-1).raw.length).split(`
5087
+ `), x = this.list(g);
5088
+ s[s.length - 1] = x, r = r.substring(0, r.length - p.raw.length) + x.raw, i = i.substring(0, i.length - f.raw.length) + x.raw, n = g.substring(s.at(-1).raw.length).split(`
5016
5089
  `);
5017
5090
  continue;
5018
5091
  }
@@ -5030,16 +5103,16 @@ ${d}` : d;
5030
5103
  let a = !1, u = "", d = "";
5031
5104
  if (!(e = s.exec(t)) || this.rules.block.hr.test(t)) break;
5032
5105
  u = e[0], t = t.substring(u.length);
5033
- let c = gl(e[2].split(`
5106
+ let c = xl(e[2].split(`
5034
5107
  `, 1)[0], e[1].length), p = t.split(`
5035
5108
  `, 1)[0], f = !c.trim(), g = 0;
5036
5109
  if (this.options.pedantic ? (g = 2, d = c.trimStart()) : f ? g = e[1].length + 1 : (g = c.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, d = c.slice(g), g += e[1].length), f && this.rules.other.blankLine.test(p) && (u += p + `
5037
5110
  `, t = t.substring(p.length + 1), a = !0), !a) {
5038
- let b = this.rules.other.nextBulletRegex(g), w = this.rules.other.hrRegex(g), _ = this.rules.other.fencesBeginRegex(g), k = this.rules.other.headingBeginRegex(g), V = this.rules.other.htmlBeginRegex(g), W = this.rules.other.blockquoteBeginRegex(g);
5111
+ let x = this.rules.other.nextBulletRegex(g), w = this.rules.other.hrRegex(g), _ = this.rules.other.fencesBeginRegex(g), k = this.rules.other.headingBeginRegex(g), V = this.rules.other.htmlBeginRegex(g), W = this.rules.other.blockquoteBeginRegex(g);
5039
5112
  for (; t; ) {
5040
5113
  let ie = t.split(`
5041
5114
  `, 1)[0], O;
5042
- if (p = ie, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), O = p) : O = p.replace(this.rules.other.tabCharGlobal, " "), _.test(p) || k.test(p) || V.test(p) || W.test(p) || b.test(p) || w.test(p)) break;
5115
+ if (p = ie, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), O = p) : O = p.replace(this.rules.other.tabCharGlobal, " "), _.test(p) || k.test(p) || V.test(p) || W.test(p) || x.test(p) || w.test(p)) break;
5043
5116
  if (O.search(this.rules.other.nonSpaceChar) >= g || !p.trim()) d += `
5044
5117
  ` + O.slice(g);
5045
5118
  else {
@@ -5098,12 +5171,12 @@ ${d}` : d;
5098
5171
  table(t) {
5099
5172
  let e = this.rules.block.table.exec(t);
5100
5173
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
5101
- let n = mr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
5174
+ let n = xr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
5102
5175
  `) : [], s = { type: "table", raw: e[0], header: [], align: [], rows: [] };
5103
5176
  if (n.length === r.length) {
5104
5177
  for (let o of r) this.rules.other.tableAlignRight.test(o) ? s.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? s.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? s.align.push("left") : s.align.push(null);
5105
5178
  for (let o = 0; o < n.length; o++) s.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: !0, align: s.align[o] });
5106
- for (let o of i) s.rows.push(mr(o, s.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: s.align[a] })));
5179
+ for (let o of i) s.rows.push(xr(o, s.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: s.align[a] })));
5107
5180
  return s;
5108
5181
  }
5109
5182
  }
@@ -5143,7 +5216,7 @@ ${d}` : d;
5143
5216
  let s = Le(n.slice(0, -1), "\\");
5144
5217
  if ((n.length - s.length) % 2 === 0) return;
5145
5218
  } else {
5146
- let s = pl(e[2], "()");
5219
+ let s = ml(e[2], "()");
5147
5220
  if (s === -2) return;
5148
5221
  if (s > -1) {
5149
5222
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + s;
@@ -5155,7 +5228,7 @@ ${d}` : d;
5155
5228
  let s = this.rules.other.pedanticHrefTitle.exec(r);
5156
5229
  s && (r = s[1], i = s[3]);
5157
5230
  } else i = e[3] ? e[3].slice(1, -1) : "";
5158
- return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), xr(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
5231
+ return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), br(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
5159
5232
  }
5160
5233
  }
5161
5234
  reflink(t, e) {
@@ -5166,7 +5239,7 @@ ${d}` : d;
5166
5239
  let s = n[0].charAt(0);
5167
5240
  return { type: "text", raw: s, text: s };
5168
5241
  }
5169
- return xr(n, i, n[0], this.lexer, this.rules);
5242
+ return br(n, i, n[0], this.lexer, this.rules);
5170
5243
  }
5171
5244
  }
5172
5245
  emStrong(t, e, n = "") {
@@ -5251,14 +5324,14 @@ ${d}` : d;
5251
5324
  return { type: "text", raw: e[0], text: e[0], escaped: n };
5252
5325
  }
5253
5326
  }
5254
- }, N = class tn {
5327
+ }, Q = class nn {
5255
5328
  tokens;
5256
5329
  options;
5257
5330
  state;
5258
5331
  inlineQueue;
5259
5332
  tokenizer;
5260
5333
  constructor(e) {
5261
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || me, this.options.tokenizer = this.options.tokenizer || new bt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
5334
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || me, this.options.tokenizer = this.options.tokenizer || new yt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
5262
5335
  let n = { other: I, block: at.normal, inline: Me.normal };
5263
5336
  this.options.pedantic ? (n.block = at.pedantic, n.inline = Me.pedantic) : this.options.gfm && (n.block = at.gfm, this.options.breaks ? n.inline = Me.breaks : n.inline = Me.gfm), this.tokenizer.rules = n;
5264
5337
  }
@@ -5266,10 +5339,10 @@ ${d}` : d;
5266
5339
  return { block: at, inline: Me };
5267
5340
  }
5268
5341
  static lex(e, n) {
5269
- return new tn(n).lex(e);
5342
+ return new nn(n).lex(e);
5270
5343
  }
5271
5344
  static lexInline(e, n) {
5272
- return new tn(n).inlineTokens(e);
5345
+ return new nn(n).inlineTokens(e);
5273
5346
  }
5274
5347
  lex(e) {
5275
5348
  e = e.replace(I.carriageReturn, `
@@ -5459,7 +5532,7 @@ ${d}` : d;
5459
5532
  }
5460
5533
  return n;
5461
5534
  }
5462
- }, yt = class {
5535
+ }, vt = class {
5463
5536
  options;
5464
5537
  parser;
5465
5538
  constructor(t) {
@@ -5559,7 +5632,7 @@ ${t}</tr>
5559
5632
  return `<del>${this.parser.parseInline(t)}</del>`;
5560
5633
  }
5561
5634
  link({ href: t, title: e, tokens: n }) {
5562
- let r = this.parser.parseInline(n), i = gr(t);
5635
+ let r = this.parser.parseInline(n), i = mr(t);
5563
5636
  if (i === null) return r;
5564
5637
  t = i;
5565
5638
  let s = '<a href="' + t + '"';
@@ -5567,7 +5640,7 @@ ${t}</tr>
5567
5640
  }
5568
5641
  image({ href: t, title: e, text: n, tokens: r }) {
5569
5642
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
5570
- let i = gr(t);
5643
+ let i = mr(t);
5571
5644
  if (i === null) return G(n);
5572
5645
  t = i;
5573
5646
  let s = `<img src="${t}" alt="${G(n)}"`;
@@ -5576,7 +5649,7 @@ ${t}</tr>
5576
5649
  text(t) {
5577
5650
  return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : G(t.text);
5578
5651
  }
5579
- }, Tn = class {
5652
+ }, Rn = class {
5580
5653
  strong({ text: t }) {
5581
5654
  return t;
5582
5655
  }
@@ -5607,18 +5680,18 @@ ${t}</tr>
5607
5680
  checkbox({ raw: t }) {
5608
5681
  return t;
5609
5682
  }
5610
- }, Q = class nn {
5683
+ }, z = class rn {
5611
5684
  options;
5612
5685
  renderer;
5613
5686
  textRenderer;
5614
5687
  constructor(e) {
5615
- this.options = e || me, this.options.renderer = this.options.renderer || new yt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Tn();
5688
+ this.options = e || me, this.options.renderer = this.options.renderer || new vt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Rn();
5616
5689
  }
5617
5690
  static parse(e, n) {
5618
- return new nn(n).parse(e);
5691
+ return new rn(n).parse(e);
5619
5692
  }
5620
5693
  static parseInline(e, n) {
5621
- return new nn(n).parseInline(e);
5694
+ return new rn(n).parseInline(e);
5622
5695
  }
5623
5696
  parse(e) {
5624
5697
  this.renderer.parser = this;
@@ -5779,21 +5852,21 @@ ${t}</tr>
5779
5852
  return t;
5780
5853
  }
5781
5854
  provideLexer() {
5782
- return this.block ? N.lex : N.lexInline;
5855
+ return this.block ? Q.lex : Q.lexInline;
5783
5856
  }
5784
5857
  provideParser() {
5785
- return this.block ? Q.parse : Q.parseInline;
5858
+ return this.block ? z.parse : z.parseInline;
5786
5859
  }
5787
- }, xl = class {
5788
- defaults = yn();
5860
+ }, yl = class {
5861
+ defaults = vn();
5789
5862
  options = this.setOptions;
5790
5863
  parse = this.parseMarkdown(!0);
5791
5864
  parseInline = this.parseMarkdown(!1);
5792
- Parser = Q;
5793
- Renderer = yt;
5794
- TextRenderer = Tn;
5795
- Lexer = N;
5796
- Tokenizer = bt;
5865
+ Parser = z;
5866
+ Renderer = vt;
5867
+ TextRenderer = Rn;
5868
+ Lexer = Q;
5869
+ Tokenizer = yt;
5797
5870
  Hooks = ze;
5798
5871
  constructor(...t) {
5799
5872
  this.use(...t);
@@ -5842,7 +5915,7 @@ ${t}</tr>
5842
5915
  }
5843
5916
  "childTokens" in i && i.childTokens && (e.childTokens[i.name] = i.childTokens);
5844
5917
  }), r.extensions = e), n.renderer) {
5845
- let i = this.defaults.renderer || new yt(this.defaults);
5918
+ let i = this.defaults.renderer || new vt(this.defaults);
5846
5919
  for (let s in n.renderer) {
5847
5920
  if (!(s in i)) throw new Error(`renderer '${s}' does not exist`);
5848
5921
  if (["options", "parser"].includes(s)) continue;
@@ -5855,7 +5928,7 @@ ${t}</tr>
5855
5928
  r.renderer = i;
5856
5929
  }
5857
5930
  if (n.tokenizer) {
5858
- let i = this.defaults.tokenizer || new bt(this.defaults);
5931
+ let i = this.defaults.tokenizer || new yt(this.defaults);
5859
5932
  for (let s in n.tokenizer) {
5860
5933
  if (!(s in i)) throw new Error(`tokenizer '${s}' does not exist`);
5861
5934
  if (["options", "rules", "lexer"].includes(s)) continue;
@@ -5905,10 +5978,10 @@ ${t}</tr>
5905
5978
  return this.defaults = { ...this.defaults, ...t }, this;
5906
5979
  }
5907
5980
  lexer(t, e) {
5908
- return N.lex(t, e ?? this.defaults);
5981
+ return Q.lex(t, e ?? this.defaults);
5909
5982
  }
5910
5983
  parser(t, e) {
5911
- return Q.parse(t, e ?? this.defaults);
5984
+ return z.parse(t, e ?? this.defaults);
5912
5985
  }
5913
5986
  parseMarkdown(t) {
5914
5987
  return (e, n) => {
@@ -5917,16 +5990,16 @@ ${t}</tr>
5917
5990
  if (typeof e > "u" || e === null) return s(new Error("marked(): input parameter is undefined or null"));
5918
5991
  if (typeof e != "string") return s(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
5919
5992
  if (i.hooks && (i.hooks.options = i, i.hooks.block = t), i.async) return (async () => {
5920
- let o = i.hooks ? await i.hooks.preprocess(e) : e, l = await (i.hooks ? await i.hooks.provideLexer() : t ? N.lex : N.lexInline)(o, i), a = i.hooks ? await i.hooks.processAllTokens(l) : l;
5993
+ let o = i.hooks ? await i.hooks.preprocess(e) : e, l = await (i.hooks ? await i.hooks.provideLexer() : t ? Q.lex : Q.lexInline)(o, i), a = i.hooks ? await i.hooks.processAllTokens(l) : l;
5921
5994
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
5922
- let u = await (i.hooks ? await i.hooks.provideParser() : t ? Q.parse : Q.parseInline)(a, i);
5995
+ let u = await (i.hooks ? await i.hooks.provideParser() : t ? z.parse : z.parseInline)(a, i);
5923
5996
  return i.hooks ? await i.hooks.postprocess(u) : u;
5924
5997
  })().catch(s);
5925
5998
  try {
5926
5999
  i.hooks && (e = i.hooks.preprocess(e));
5927
- let o = (i.hooks ? i.hooks.provideLexer() : t ? N.lex : N.lexInline)(e, i);
6000
+ let o = (i.hooks ? i.hooks.provideLexer() : t ? Q.lex : Q.lexInline)(e, i);
5928
6001
  i.hooks && (o = i.hooks.processAllTokens(o)), i.walkTokens && this.walkTokens(o, i.walkTokens);
5929
- let l = (i.hooks ? i.hooks.provideParser() : t ? Q.parse : Q.parseInline)(o, i);
6002
+ let l = (i.hooks ? i.hooks.provideParser() : t ? z.parse : z.parseInline)(o, i);
5930
6003
  return i.hooks && (l = i.hooks.postprocess(l)), l;
5931
6004
  } catch (o) {
5932
6005
  return s(o);
@@ -5944,29 +6017,29 @@ Please report this to https://github.com/markedjs/marked.`, t) {
5944
6017
  throw n;
5945
6018
  };
5946
6019
  }
5947
- }, pe = new xl();
6020
+ }, pe = new yl();
5948
6021
  function v(t, e) {
5949
6022
  return pe.parse(t, e);
5950
6023
  }
5951
6024
  v.options = v.setOptions = function(t) {
5952
- return pe.setOptions(t), v.defaults = pe.defaults, wi(v.defaults), v;
6025
+ return pe.setOptions(t), v.defaults = pe.defaults, Si(v.defaults), v;
5953
6026
  };
5954
- v.getDefaults = yn;
6027
+ v.getDefaults = vn;
5955
6028
  v.defaults = me;
5956
6029
  v.use = function(...t) {
5957
- return pe.use(...t), v.defaults = pe.defaults, wi(v.defaults), v;
6030
+ return pe.use(...t), v.defaults = pe.defaults, Si(v.defaults), v;
5958
6031
  };
5959
6032
  v.walkTokens = function(t, e) {
5960
6033
  return pe.walkTokens(t, e);
5961
6034
  };
5962
6035
  v.parseInline = pe.parseInline;
5963
- v.Parser = Q;
5964
- v.parser = Q.parse;
5965
- v.Renderer = yt;
5966
- v.TextRenderer = Tn;
5967
- v.Lexer = N;
5968
- v.lexer = N.lex;
5969
- v.Tokenizer = bt;
6036
+ v.Parser = z;
6037
+ v.parser = z.parse;
6038
+ v.Renderer = vt;
6039
+ v.TextRenderer = Rn;
6040
+ v.Lexer = Q;
6041
+ v.lexer = Q.lex;
6042
+ v.Tokenizer = yt;
5970
6043
  v.Hooks = ze;
5971
6044
  v.parse = v;
5972
6045
  v.options;
@@ -5974,13 +6047,13 @@ v.setOptions;
5974
6047
  v.use;
5975
6048
  v.walkTokens;
5976
6049
  v.parseInline;
5977
- Q.parse;
5978
- N.lex;
6050
+ z.parse;
6051
+ Q.lex;
5979
6052
  v.setOptions({
5980
6053
  breaks: !0,
5981
6054
  gfm: !0
5982
6055
  });
5983
- function bl({ text: t }) {
6056
+ function vl({ text: t }) {
5984
6057
  const e = U(() => {
5985
6058
  if (!t)
5986
6059
  return "";
@@ -5989,7 +6062,7 @@ function bl({ text: t }) {
5989
6062
  }, [t]);
5990
6063
  return /* @__PURE__ */ h("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
5991
6064
  }
5992
- function yl(t) {
6065
+ function _l(t) {
5993
6066
  const e = t.trim().split(/\s+/).filter(Boolean);
5994
6067
  return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
5995
6068
  }
@@ -5999,21 +6072,21 @@ function ye({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
5999
6072
  n ? "jex-message-error" : ""
6000
6073
  ].filter(Boolean).join(" ");
6001
6074
  return /* @__PURE__ */ h("div", { class: "jex-message-row bot", children: [
6002
- /* @__PURE__ */ h("div", { class: `jex-avatar ${l ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: l && s && !a ? /* @__PURE__ */ h("img", { src: s, alt: i ?? "", class: "jex-avatar-img", onError: d }) : l ? /* @__PURE__ */ h("span", { class: "jex-avatar-initials", children: yl(i ?? "") }) : o && !a ? /* @__PURE__ */ h("img", { src: o, alt: "", class: "jex-avatar-img", onError: d }) : /* @__PURE__ */ h(bn, { size: 14 }) }),
6075
+ /* @__PURE__ */ h("div", { class: `jex-avatar ${l ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: l && s && !a ? /* @__PURE__ */ h("img", { src: s, alt: i ?? "", class: "jex-avatar-img", onError: d }) : l ? /* @__PURE__ */ h("span", { class: "jex-avatar-initials", children: _l(i ?? "") }) : o && !a ? /* @__PURE__ */ h("img", { src: o, alt: "", class: "jex-avatar-img", onError: d }) : /* @__PURE__ */ h(yn, { size: 14 }) }),
6003
6076
  /* @__PURE__ */ h("div", { class: "jex-message-content", children: [
6004
6077
  /* @__PURE__ */ h("div", { class: c, children: [
6005
- /* @__PURE__ */ h(bl, { text: t }),
6078
+ /* @__PURE__ */ h(vl, { text: t }),
6006
6079
  e && /* @__PURE__ */ h("span", { class: "jex-streaming-cursor" })
6007
6080
  ] }),
6008
6081
  l && i && /* @__PURE__ */ h("span", { class: "jex-message-author", children: i })
6009
6082
  ] })
6010
6083
  ] });
6011
6084
  }
6012
- function vl({ text: t }) {
6085
+ function kl({ text: t }) {
6013
6086
  return /* @__PURE__ */ h("div", { class: "jex-message user", children: t });
6014
6087
  }
6015
- function _l({ message: t, sessionId: e, visitorId: n }) {
6016
- const r = P();
6088
+ function wl({ message: t, sessionId: e, visitorId: n }) {
6089
+ const r = q();
6017
6090
  return t.formData ? /* @__PURE__ */ h("div", { class: "jex-inline-form-submitted", children: [
6018
6091
  /* @__PURE__ */ h("span", { class: "jex-inline-form-check", children: "✓" }),
6019
6092
  /* @__PURE__ */ h("div", { children: [
@@ -6025,7 +6098,7 @@ function _l({ message: t, sessionId: e, visitorId: n }) {
6025
6098
  ] })
6026
6099
  ] })
6027
6100
  ] }) : /* @__PURE__ */ h("div", { class: "jex-message-row bot", children: /* @__PURE__ */ h(
6028
- kl,
6101
+ Sl,
6029
6102
  {
6030
6103
  messageId: t._id,
6031
6104
  sessionId: e,
@@ -6033,8 +6106,8 @@ function _l({ message: t, sessionId: e, visitorId: n }) {
6033
6106
  }
6034
6107
  ) });
6035
6108
  }
6036
- function kl({ messageId: t, sessionId: e, visitorId: n }) {
6037
- const r = P(), [i, s] = R(""), [o, l] = R(""), [a, u] = R(!1), d = wt($e.functions.chat.public.helpdesk.submitEscalation);
6109
+ function Sl({ messageId: t, sessionId: e, visitorId: n }) {
6110
+ const r = q(), [i, s] = R(""), [o, l] = R(""), [a, u] = R(!1), d = St($e.functions.chat.public.helpdesk.submitEscalation);
6038
6111
  async function c(p) {
6039
6112
  if (p.preventDefault(), !a) {
6040
6113
  u(!0);
@@ -6089,16 +6162,16 @@ function kl({ messageId: t, sessionId: e, visitorId: n }) {
6089
6162
  /* @__PURE__ */ h("div", { class: "jex-inline-form-consent", children: r.escalationConsent })
6090
6163
  ] });
6091
6164
  }
6092
- function wl() {
6165
+ function jl() {
6093
6166
  return /* @__PURE__ */ h("div", { class: "jex-typing", children: [
6094
6167
  /* @__PURE__ */ h("span", {}),
6095
6168
  /* @__PURE__ */ h("span", {}),
6096
6169
  /* @__PURE__ */ h("span", {})
6097
6170
  ] });
6098
6171
  }
6099
- function Sl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: s, visitorId: o }) {
6100
- const l = P(), a = vt(null), [u, d] = R(null);
6101
- return D(() => {
6172
+ function Cl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: s, visitorId: o }) {
6173
+ const l = q(), a = _t(null), [u, d] = R(null);
6174
+ return N(() => {
6102
6175
  a.current?.scrollIntoView({ behavior: "smooth" });
6103
6176
  }, [t?.length, t?.at(-1)?.content]), /* @__PURE__ */ h("div", { class: "jex-chat-messages", children: [
6104
6177
  /* @__PURE__ */ h(ye, { text: e }),
@@ -6120,7 +6193,7 @@ function Sl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6120
6193
  if (c.contentType === "human-notice")
6121
6194
  return /* @__PURE__ */ h(ye, { text: c.content }, c._id);
6122
6195
  if (c.contentType === "escalation-form" && s && o)
6123
- return va.value === "screen" && !c.formData ? u === c._id ? null : /* @__PURE__ */ h("div", { class: "jex-inline-form jex-inline-form-card", children: [
6196
+ return ka.value === "screen" && !c.formData ? u === c._id ? null : /* @__PURE__ */ h("div", { class: "jex-inline-form jex-inline-form-card", children: [
6124
6197
  /* @__PURE__ */ h("div", { class: "jex-inline-form-title", children: l.escalationPromptTitle }),
6125
6198
  /* @__PURE__ */ h("div", { class: "jex-inline-form-subtitle", children: l.escalationPromptSubtitle }),
6126
6199
  /* @__PURE__ */ h(
@@ -6145,17 +6218,17 @@ function Sl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6145
6218
  children: l.escalationSkip
6146
6219
  }
6147
6220
  )
6148
- ] }, c._id) : /* @__PURE__ */ h(_l, { message: c, sessionId: s, visitorId: o }, c._id);
6221
+ ] }, c._id) : /* @__PURE__ */ h(wl, { message: c, sessionId: s, visitorId: o }, c._id);
6149
6222
  if (c.contentType === "escalation-confirm")
6150
6223
  return /* @__PURE__ */ h(ye, { text: c.content }, c._id);
6151
6224
  if (c.role === "user")
6152
- return /* @__PURE__ */ h(vl, { text: c.content }, c._id);
6225
+ return /* @__PURE__ */ h(kl, { text: c.content }, c._id);
6153
6226
  const p = {
6154
6227
  authorId: c.authorId,
6155
6228
  authorName: c.authorName,
6156
6229
  authorImage: c.authorImage
6157
6230
  };
6158
- return c.status === "streaming" && c.content === "" ? /* @__PURE__ */ h(wl, {}, c._id) : c.status === "streaming" ? /* @__PURE__ */ h(ye, { text: c.content, streaming: !0, ...p }, c._id) : c.status === "error" ? /* @__PURE__ */ h(
6231
+ return c.status === "streaming" && c.content === "" ? /* @__PURE__ */ h(jl, {}, c._id) : c.status === "streaming" ? /* @__PURE__ */ h(ye, { text: c.content, streaming: !0, ...p }, c._id) : c.status === "error" ? /* @__PURE__ */ h(
6159
6232
  ye,
6160
6233
  {
6161
6234
  text: c.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
@@ -6168,14 +6241,14 @@ function Sl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6168
6241
  /* @__PURE__ */ h("div", { ref: a })
6169
6242
  ] });
6170
6243
  }
6171
- function jl({ size: t = 18 }) {
6244
+ function Tl({ size: t = 18 }) {
6172
6245
  return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
6173
6246
  /* @__PURE__ */ h("path", { d: "M22 2 11 13" }),
6174
6247
  /* @__PURE__ */ h("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
6175
6248
  ] });
6176
6249
  }
6177
- function Cl({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: s, onStartFresh: o }) {
6178
- const l = P(), a = ke(""), u = wt($e.functions.chat.public.conversations.send), d = n || r;
6250
+ function Rl({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: s, onStartFresh: o }) {
6251
+ const l = q(), a = ke(""), u = St($e.functions.chat.public.conversations.send), d = n || r;
6179
6252
  if (i === "resolved")
6180
6253
  return /* @__PURE__ */ h("div", { class: "jex-chat-input-resolved", children: [
6181
6254
  /* @__PURE__ */ h("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
@@ -6196,7 +6269,7 @@ function Cl({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
6196
6269
  if (!p || d)
6197
6270
  return;
6198
6271
  const f = t && e ? { sessionId: t, visitorId: e } : await s();
6199
- f && (ba(), a.value = "", u({
6272
+ f && (va(), a.value = "", u({
6200
6273
  sessionId: f.sessionId,
6201
6274
  visitorId: f.visitorId,
6202
6275
  content: p
@@ -6228,7 +6301,7 @@ function Cl({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
6228
6301
  onClick: c,
6229
6302
  "aria-label": l.sendAriaLabel,
6230
6303
  disabled: d,
6231
- children: /* @__PURE__ */ h(jl, { size: 18 })
6304
+ children: /* @__PURE__ */ h(Tl, { size: 18 })
6232
6305
  }
6233
6306
  )
6234
6307
  ] });
@@ -6239,45 +6312,45 @@ function qi({ message: t }) {
6239
6312
  t && /* @__PURE__ */ h("p", { class: "jex-loading-message", children: t })
6240
6313
  ] });
6241
6314
  }
6242
- function Tl({ greeting: t, orgSlug: e }) {
6243
- const n = P(), { sessionId: r, visitorId: i, isLoading: s, sessionNotFound: o, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d } = Aa(e), c = lr(
6315
+ function $l({ greeting: t, orgSlug: e, projSlug: n }) {
6316
+ const r = q(), { sessionId: i, visitorId: s, isLoading: o, sessionNotFound: l, resumeFailed: a, isOrgDeleted: u, ensureSession: d, startFresh: c } = Ea(e, n), p = cr(
6244
6317
  $e.functions.chat.public.conversations.listBySession,
6245
- r && i ? { sessionId: r, visitorId: i } : "skip"
6246
- ), p = lr(
6318
+ i && s ? { sessionId: i, visitorId: s } : "skip"
6319
+ ), f = cr(
6247
6320
  $e.functions.chat.public.sessions.getSessionStatus,
6248
- r && i ? { sessionId: r, visitorId: i } : "skip"
6249
- ), f = r !== null && c === void 0, g = c?.some((b) => b.status === "streaming") ?? !1;
6250
- return D(() => {
6251
- fe.value && !r && u();
6252
- }, [u, r]), a ? /* @__PURE__ */ h("div", { class: "jex-chat-messages", children: /* @__PURE__ */ h("div", { class: "jex-session-notice", children: n.chatNoLongerAvailable }) }) : s || f && fe.value ? /* @__PURE__ */ h(qi, { message: n.resumeConversation }) : /* @__PURE__ */ h(F, { children: [
6321
+ i && s ? { sessionId: i, visitorId: s } : "skip"
6322
+ ), g = i !== null && p === void 0, x = p?.some((w) => w.status === "streaming") ?? !1;
6323
+ return N(() => {
6324
+ fe.value && !i && d();
6325
+ }, [d, i]), u ? /* @__PURE__ */ h("div", { class: "jex-chat-messages", children: /* @__PURE__ */ h("div", { class: "jex-session-notice", children: r.chatNoLongerAvailable }) }) : o || g && fe.value ? /* @__PURE__ */ h(qi, { message: r.resumeConversation }) : /* @__PURE__ */ h(D, { children: [
6253
6326
  /* @__PURE__ */ h(
6254
- Sl,
6327
+ Cl,
6255
6328
  {
6256
- conversations: c,
6329
+ conversations: p,
6257
6330
  greeting: t,
6258
- sessionNotFound: o,
6259
- resumeFailed: l,
6260
- onStartFresh: d,
6261
- sessionId: r,
6262
- visitorId: i
6331
+ sessionNotFound: l,
6332
+ resumeFailed: a,
6333
+ onStartFresh: c,
6334
+ sessionId: i,
6335
+ visitorId: s
6263
6336
  }
6264
6337
  ),
6265
6338
  /* @__PURE__ */ h(
6266
- Cl,
6339
+ Rl,
6267
6340
  {
6268
- sessionId: r,
6269
- visitorId: i,
6270
- isLoading: s,
6271
- isStreaming: g,
6272
- sessionStatus: p ?? null,
6273
- ensureSession: u,
6274
- onStartFresh: d
6341
+ sessionId: i,
6342
+ visitorId: s,
6343
+ isLoading: o,
6344
+ isStreaming: x,
6345
+ sessionStatus: f ?? null,
6346
+ ensureSession: d,
6347
+ onStartFresh: c
6275
6348
  }
6276
6349
  )
6277
6350
  ] });
6278
6351
  }
6279
- function Rl({ formMessageId: t, sessionId: e, visitorId: n }) {
6280
- const r = P(), [i, s] = R(""), [o, l] = R(""), a = wt($e.functions.chat.public.helpdesk.submitEscalation);
6352
+ function Al({ formMessageId: t, sessionId: e, visitorId: n }) {
6353
+ const r = q(), [i, s] = R(""), [o, l] = R(""), a = St($e.functions.chat.public.helpdesk.submitEscalation);
6281
6354
  async function u(d) {
6282
6355
  d.preventDefault(), Se({ id: "loading", message: r.escalationSubmitting });
6283
6356
  try {
@@ -6329,12 +6402,12 @@ function Rl({ formMessageId: t, sessionId: e, visitorId: n }) {
6329
6402
  ] }),
6330
6403
  /* @__PURE__ */ h("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: r.escalationConsent }),
6331
6404
  /* @__PURE__ */ h("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
6332
- xn();
6405
+ bn();
6333
6406
  }, children: r.escalationSkip })
6334
6407
  ] });
6335
6408
  }
6336
- function $l() {
6337
- const t = P(), [e, n] = R(""), [r, i] = R(""), [s, o] = R("");
6409
+ function Il() {
6410
+ const t = q(), [e, n] = R(""), [r, i] = R(""), [s, o] = R("");
6338
6411
  async function l(a) {
6339
6412
  a.preventDefault(), Se({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
6340
6413
  setTimeout(d, 1200);
@@ -6389,8 +6462,8 @@ function $l() {
6389
6462
  ] })
6390
6463
  ] });
6391
6464
  }
6392
- function Al({ ticketRef: t }) {
6393
- const e = P();
6465
+ function El({ ticketRef: t }) {
6466
+ const e = q();
6394
6467
  return /* @__PURE__ */ h("div", { class: "jex-confirmation", children: [
6395
6468
  /* @__PURE__ */ h("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
6396
6469
  /* @__PURE__ */ h("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
@@ -6409,8 +6482,8 @@ function Al({ ticketRef: t }) {
6409
6482
  )
6410
6483
  ] });
6411
6484
  }
6412
- function Il({ message: t, onRetry: e, onBack: n }) {
6413
- const r = P();
6485
+ function Pl({ message: t, onRetry: e, onBack: n }) {
6486
+ const r = q();
6414
6487
  return /* @__PURE__ */ h("div", { class: "jex-overlay jex-error", children: [
6415
6488
  /* @__PURE__ */ h("p", { class: "jex-error-message", children: t }),
6416
6489
  /* @__PURE__ */ h("div", { class: "jex-error-actions", children: [
@@ -6419,45 +6492,46 @@ function Il({ message: t, onRetry: e, onBack: n }) {
6419
6492
  ] })
6420
6493
  ] });
6421
6494
  }
6422
- function br({ greeting: t, title: e, orgSlug: n }) {
6423
- const r = B.value, i = r[r.length - 1], s = r.findLast(
6424
- (o) => o.id === "confirmation"
6495
+ function yr({ greeting: t, title: e, orgSlug: n, projSlug: r }) {
6496
+ const i = F.value, s = i[i.length - 1], o = i.findLast(
6497
+ (l) => l.id === "confirmation"
6425
6498
  );
6426
6499
  return /* @__PURE__ */ h("div", { class: "jex-screen-container", children: [
6427
- i.id === "home" && /* @__PURE__ */ h(Ta, { greeting: t, title: e }),
6428
- i.id === "selection" && /* @__PURE__ */ h(Ra, { title: e }),
6429
- i.id === "form" && /* @__PURE__ */ h($l, {}),
6430
- i.id === "escalation-form" && /* @__PURE__ */ h(
6431
- Rl,
6500
+ s.id === "home" && /* @__PURE__ */ h($a, { greeting: t, title: e }),
6501
+ s.id === "selection" && /* @__PURE__ */ h(Aa, { title: e }),
6502
+ s.id === "form" && /* @__PURE__ */ h(Il, {}),
6503
+ s.id === "escalation-form" && /* @__PURE__ */ h(
6504
+ Al,
6432
6505
  {
6433
- formMessageId: i.formMessageId,
6434
- sessionId: i.sessionId,
6435
- visitorId: i.visitorId
6506
+ formMessageId: s.formMessageId,
6507
+ sessionId: s.sessionId,
6508
+ visitorId: s.visitorId
6436
6509
  }
6437
6510
  ),
6438
- i.id === "confirmation" && s && /* @__PURE__ */ h(Al, { ticketRef: s.ref }),
6439
- i.id === "chat" && /* @__PURE__ */ h(Tl, { greeting: t, orgSlug: n }),
6440
- i.id === "loading" && /* @__PURE__ */ h(qi, { message: i.message }),
6441
- i.id === "error" && /* @__PURE__ */ h(
6442
- Il,
6511
+ s.id === "confirmation" && o && /* @__PURE__ */ h(El, { ticketRef: o.ref }),
6512
+ s.id === "chat" && /* @__PURE__ */ h($l, { greeting: t, orgSlug: n, projSlug: r }),
6513
+ s.id === "loading" && /* @__PURE__ */ h(qi, { message: s.message }),
6514
+ s.id === "error" && /* @__PURE__ */ h(
6515
+ Pl,
6443
6516
  {
6444
- message: i.message,
6517
+ message: s.message,
6445
6518
  onRetry: () => Se({ id: "loading" }),
6446
- onBack: xn
6519
+ onBack: bn
6447
6520
  }
6448
6521
  )
6449
6522
  ] });
6450
6523
  }
6451
- function El({ options: t }) {
6452
- const e = la(t.orgSlug, t.convexUrl);
6453
- pa(t.parentOrigin), D(() => {
6454
- ma();
6524
+ function ql({ options: t }) {
6525
+ ua(t.orgSlug, t.projSlug, t.bootstrapToken, t.convexUrl);
6526
+ const e = la(t.orgSlug, t.projSlug, t.convexUrl);
6527
+ ma(t.parentOrigin), N(() => {
6528
+ ba();
6455
6529
  }, []);
6456
6530
  const n = oa(t, e);
6457
- D(() => {
6458
- gn.value = vi(n.locale);
6531
+ N(() => {
6532
+ mn.value = _i(n.locale);
6459
6533
  }, [n.locale]);
6460
- const r = n.position === "bottom-left", i = n.colorScheme === "dark" || n.colorScheme === "light" ? n.colorScheme : "", s = ya({
6534
+ const r = n.position === "bottom-left", i = n.colorScheme === "dark" || n.colorScheme === "light" ? n.colorScheme : "", s = _a({
6461
6535
  ...t,
6462
6536
  primaryColor: n.primaryColor,
6463
6537
  accentColor: n.accentColor,
@@ -6473,17 +6547,17 @@ function El({ options: t }) {
6473
6547
  class: `jex-widget ${i}`.trim(),
6474
6548
  style: a,
6475
6549
  children: o ? /* @__PURE__ */ h("div", { class: "jex-embedded", children: [
6476
- /* @__PURE__ */ h(ur, { title: n.title }),
6477
- /* @__PURE__ */ h(br, { greeting: n.greeting, title: n.title, orgSlug: t.orgSlug }),
6478
- !n.hideBranding && /* @__PURE__ */ h(hr, {})
6550
+ /* @__PURE__ */ h(hr, { title: n.title }),
6551
+ /* @__PURE__ */ h(yr, { greeting: n.greeting, title: n.title, orgSlug: t.orgSlug, projSlug: t.projSlug }),
6552
+ !n.hideBranding && /* @__PURE__ */ h(dr, {})
6479
6553
  ] }) : /* @__PURE__ */ h("div", { class: `jex-container${r ? " jex-pos-left" : ""}`, children: [
6480
6554
  A.value && /* @__PURE__ */ h("div", { class: "jex-chat-window", children: [
6481
- /* @__PURE__ */ h(ur, { title: n.title }),
6482
- /* @__PURE__ */ h(br, { greeting: n.greeting, title: n.title, orgSlug: t.orgSlug }),
6483
- !n.hideBranding && /* @__PURE__ */ h(hr, {})
6555
+ /* @__PURE__ */ h(hr, { title: n.title }),
6556
+ /* @__PURE__ */ h(yr, { greeting: n.greeting, title: n.title, orgSlug: t.orgSlug, projSlug: t.projSlug }),
6557
+ !n.hideBranding && /* @__PURE__ */ h(dr, {})
6484
6558
  ] }),
6485
6559
  /* @__PURE__ */ h(
6486
- Ca,
6560
+ Ra,
6487
6561
  {
6488
6562
  iconOption: n.triggerIcon,
6489
6563
  radius: n.triggerRadius,
@@ -6494,34 +6568,34 @@ function El({ options: t }) {
6494
6568
  }
6495
6569
  );
6496
6570
  }
6497
- const ql = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author{display:block;font-size:10px;color:var(--jex-text-muted);margin-top:2px;padding-left:4px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px;flex-shrink:0}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275);flex-shrink:0}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:13px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}';
6498
- function Pl(t) {
6571
+ const Ml = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author{display:block;font-size:10px;color:var(--jex-text-muted);margin-top:2px;padding-left:4px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px;flex-shrink:0}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275);flex-shrink:0}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:13px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}';
6572
+ function Ll(t) {
6499
6573
  const e = document.createElement("style");
6500
- e.textContent = ql, t.appendChild(e);
6574
+ e.textContent = Ml, t.appendChild(e);
6501
6575
  }
6502
- const Ml = "https://festive-mouse-978.eu-west-1.convex.cloud";
6503
- let Qt = null;
6504
- function Ll(t) {
6505
- const e = t ?? Ml;
6576
+ const Nl = "https://tame-spider-109.eu-west-1.convex.cloud";
6577
+ let zt = null;
6578
+ function Ol(t) {
6579
+ const e = t ?? Nl;
6506
6580
  if (!e)
6507
6581
  throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
6508
- return Qt || (Qt = new Fo(ia(e))), Qt;
6582
+ return zt || (zt = new Do(sa(e))), zt;
6509
6583
  }
6510
- function Ol(t, e) {
6584
+ function Ql(t, e) {
6511
6585
  const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
6512
6586
  for (; n.firstChild; )
6513
6587
  n.removeChild(n.firstChild);
6514
- Pl(n), mt.value = e.source, Xt.value = e.bootstrapToken, B.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), A.value = !0);
6588
+ Ll(n), mt.value = e.source, xt.value = e.bootstrapToken, F.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), A.value = !0);
6515
6589
  const r = document.createElement("div");
6516
6590
  return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), he(
6517
- /* @__PURE__ */ h(Uo, { client: Ll(e.convexUrl), children: /* @__PURE__ */ h(El, { options: e }) }),
6591
+ /* @__PURE__ */ h(Vo, { client: Ol(e.convexUrl), children: /* @__PURE__ */ h(ql, { options: e }) }),
6518
6592
  r
6519
6593
  ), function() {
6520
- he(null, r), A.value = !1, mt.value = void 0, Xt.value = void 0, B.value = [{ id: "home" }];
6594
+ he(null, r), A.value = !1, mt.value = void 0, xt.value = void 0, F.value = [{ id: "home" }];
6521
6595
  };
6522
6596
  }
6523
- function Nl(t, e, n) {
6524
- const r = Ol(t, e), i = /* @__PURE__ */ new Set(), s = A.subscribe((l) => {
6597
+ function zl(t, e, n) {
6598
+ const r = Ql(t, e), i = /* @__PURE__ */ new Set(), s = A.subscribe((l) => {
6525
6599
  for (const a of i)
6526
6600
  a(l);
6527
6601
  });
@@ -6548,17 +6622,17 @@ function Nl(t, e, n) {
6548
6622
  }
6549
6623
  };
6550
6624
  }
6551
- let Oe = null;
6552
- function Ql(t) {
6553
- Oe && Oe.shutdown();
6625
+ let Ne = null;
6626
+ function Bl(t) {
6627
+ Ne && Ne.shutdown();
6554
6628
  let e;
6555
6629
  t.container ? e = typeof t.container == "string" ? document.querySelector(t.container) : t.container : (e = document.createElement("div"), e.id = "jexity-chat-widget", document.body.appendChild(e));
6556
- const n = Nl(e, t, () => {
6557
- t.container || e.remove(), Oe === n && (Oe = null);
6630
+ const n = zl(e, t, () => {
6631
+ t.container || e.remove(), Ne === n && (Ne = null);
6558
6632
  });
6559
- return Oe = n, n;
6633
+ return Ne = n, n;
6560
6634
  }
6561
6635
  export {
6562
- Ql as JexityChat
6636
+ Bl as JexityChat
6563
6637
  };
6564
6638
  //# sourceMappingURL=index.mjs.map