@evelan/jexity-widget 0.11.0 → 0.11.1
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 +325 -313
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +306 -294
- package/dist/react.mjs.map +1 -1
- package/dist/types/features/chat/hooks/useConvexSession.d.ts +1 -0
- package/dist/types/features/chat/hooks/useConvexSession.d.ts.map +1 -1
- package/dist/widget.js +9 -9
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var et, x, Ar, Er, ce, qn, Ir, Pr, qr, un, Vt, Wt, Mr,
|
|
1
|
+
var et, x, Ar, Er, ce, qn, Ir, Pr, qr, un, Vt, Wt, Mr, Je = {}, Lr = [], Ji = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, tt = Array.isArray;
|
|
2
2
|
function ee(t, e) {
|
|
3
3
|
for (var n in e) t[n] = e[n];
|
|
4
4
|
return t;
|
|
@@ -10,9 +10,9 @@ function D(t, e, n) {
|
|
|
10
10
|
var r, i, s, o = {};
|
|
11
11
|
for (s in e) s == "key" ? r = e[s] : s == "ref" ? i = e[s] : o[s] = e[s];
|
|
12
12
|
if (arguments.length > 2 && (o.children = arguments.length > 3 ? et.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (s in t.defaultProps) o[s] === void 0 && (o[s] = t.defaultProps[s]);
|
|
13
|
-
return
|
|
13
|
+
return De(t, o, r, i, null);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function De(t, e, n, r, i) {
|
|
16
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 ?? ++Ar, __i: -1, __u: 0 };
|
|
17
17
|
return i == null && x.vnode != null && x.vnode(s), s;
|
|
18
18
|
}
|
|
@@ -25,10 +25,10 @@ function z(t) {
|
|
|
25
25
|
function J(t, e) {
|
|
26
26
|
this.props = t, this.context = e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (e == null) return t.__ ?
|
|
28
|
+
function Te(t, e) {
|
|
29
|
+
if (e == null) return t.__ ? Te(t.__, t.__i + 1) : null;
|
|
30
30
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
31
|
-
return typeof t.type == "function" ?
|
|
31
|
+
return typeof t.type == "function" ? Te(t) : null;
|
|
32
32
|
}
|
|
33
33
|
function Or(t) {
|
|
34
34
|
var e, n;
|
|
@@ -44,18 +44,18 @@ function Ht(t) {
|
|
|
44
44
|
(!t.__d && (t.__d = !0) && ce.push(t) && !gt.__r++ || qn != x.debounceRendering) && ((qn = x.debounceRendering) || Ir)(gt);
|
|
45
45
|
}
|
|
46
46
|
function gt() {
|
|
47
|
-
for (var t, e, n, r, i, s, o, l = 1; ce.length; ) ce.length > l && ce.sort(Pr), t = ce.shift(), l = ce.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, s = [], o = [], e.__P && ((n = ee({}, r)).__v = r.__v + 1, x.vnode && x.vnode(n), dn(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, s, i ??
|
|
47
|
+
for (var t, e, n, r, i, s, o, l = 1; ce.length; ) ce.length > l && ce.sort(Pr), t = ce.shift(), l = ce.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, s = [], o = [], e.__P && ((n = ee({}, r)).__v = r.__v + 1, x.vnode && x.vnode(n), dn(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, s, i ?? Te(r), !!(32 & r.__u), o), n.__v = r.__v, n.__.__k[n.__i] = n, Br(s, n, o), r.__e = r.__ = null, n.__e != i && Or(n)));
|
|
48
48
|
gt.__r = 0;
|
|
49
49
|
}
|
|
50
50
|
function Nr(t, e, n, r, i, s, o, l, a, c, d) {
|
|
51
51
|
var h, f, p, g, m, b, _, y = r && r.__k || Lr, E = e.length;
|
|
52
|
-
for (a = Ki(n, e, y, a, E), h = 0; h < E; h++) (p = n.__k[h]) != null && (f = p.__i == -1 ?
|
|
52
|
+
for (a = Ki(n, e, y, a, E), h = 0; h < E; h++) (p = n.__k[h]) != null && (f = p.__i == -1 ? Je : y[p.__i] || Je, p.__i = h, b = dn(t, p, f, i, s, o, l, a, c, d), g = p.__e, p.ref && f.ref != p.ref && (f.ref && fn(f.ref, null, p), d.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), (_ = !!(4 & p.__u)) || f.__k === p.__k ? a = zr(p, a, t, _) : typeof p.type == "function" && b !== void 0 ? a = b : g && (a = g.nextSibling), p.__u &= -7);
|
|
53
53
|
return n.__e = m, a;
|
|
54
54
|
}
|
|
55
55
|
function Ki(t, e, n, r, i) {
|
|
56
56
|
var s, o, l, a, c, d = n.length, h = d, f = 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 + f, (o = t.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ?
|
|
58
|
-
if (h) for (s = 0; s < d; s++) (l = n[s]) != null && (2 & l.__u) == 0 && (l.__e == r && (r =
|
|
57
|
+
for (t.__k = new Array(i), s = 0; s < i; s++) (o = e[s]) != null && typeof o != "boolean" && typeof o != "function" ? (a = s + f, (o = t.__k[s] = typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? De(null, o, null, null, null) : tt(o) ? De(z, { children: o }, null, null, null) : o.constructor == null && o.__b > 0 ? De(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o).__ = t, o.__b = t.__b + 1, l = null, (c = o.__i = Zi(o, n, a, h)) != -1 && (h--, (l = n[c]) && (l.__u |= 2)), l == null || l.__v == null ? (c == -1 && (i > d ? f-- : i < d && f++), typeof o.type != "function" && (o.__u |= 4)) : c != a && (c == a - 1 ? f-- : c == a + 1 ? f++ : (c > a ? f-- : f++, o.__u |= 4))) : t.__k[s] = null;
|
|
58
|
+
if (h) for (s = 0; s < d; s++) (l = n[s]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Te(l)), Fr(l, l));
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
61
|
function zr(t, e, n, r) {
|
|
@@ -64,7 +64,7 @@ function zr(t, e, n, r) {
|
|
|
64
64
|
for (i = t.__k, s = 0; i && s < i.length; s++) i[s] && (i[s].__ = t, e = zr(i[s], e, n, r));
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
|
-
t.__e != e && (r && (e && t.type && !e.parentNode && (e =
|
|
67
|
+
t.__e != e && (r && (e && t.type && !e.parentNode && (e = Te(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
68
68
|
do
|
|
69
69
|
e = e && e.nextSibling;
|
|
70
70
|
while (e != null && e.nodeType == 8);
|
|
@@ -115,15 +115,15 @@ function Ln(t) {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
function dn(t, e, n, r, i, s, o, l, a, c) {
|
|
118
|
-
var d, h, f, p, g, m, b, _, y, E, B, se, V, Pn, ot,
|
|
118
|
+
var d, h, f, p, g, m, b, _, y, E, B, se, V, Pn, ot, Me, Pt, K = 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 = x.__b) && d(e);
|
|
121
121
|
e: if (typeof K == "function") try {
|
|
122
122
|
if (_ = e.props, y = "prototype" in K && K.prototype.render, E = (d = K.contextType) && r[d.__c], B = d ? E ? E.props.value : d.__ : r, n.__c ? b = (h = e.__c = n.__c).__ = h.__E : (y ? e.__c = h = new K(_, B) : (e.__c = h = new J(_, B), h.constructor = K, h.render = Xi), E && E.sub(h), h.props = _, h.state || (h.state = {}), h.context = B, h.__n = r, f = h.__d = !0, h.__h = [], h._sb = []), y && h.__s == null && (h.__s = h.state), y && K.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = ee({}, h.__s)), ee(h.__s, K.getDerivedStateFromProps(_, h.__s))), p = h.props, g = h.state, h.__v = e, f) y && K.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), y && h.componentDidMount != null && h.__h.push(h.componentDidMount);
|
|
123
123
|
else {
|
|
124
124
|
if (y && K.getDerivedStateFromProps == null && _ !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(_, B), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(_, h.__s, B) === !1 || e.__v == n.__v) {
|
|
125
|
-
for (e.__v != n.__v && (h.props = _, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(
|
|
126
|
-
|
|
125
|
+
for (e.__v != n.__v && (h.props = _, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(_e) {
|
|
126
|
+
_e && (_e.__ = e);
|
|
127
127
|
}), se = 0; se < h._sb.length; se++) h.__h.push(h._sb[se]);
|
|
128
128
|
h._sb = [], h.__h.length && o.push(h);
|
|
129
129
|
break e;
|
|
@@ -138,17 +138,17 @@ function dn(t, e, n, r, i, s, o, l, a, c) {
|
|
|
138
138
|
} else do
|
|
139
139
|
h.__d = !1, V && V(e), d = h.render(h.props, h.state, h.context), h.state = h.__s;
|
|
140
140
|
while (h.__d && ++Pn < 25);
|
|
141
|
-
h.state = h.__s, h.getChildContext != null && (r = ee(ee({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)),
|
|
142
|
-
} catch (
|
|
143
|
-
if (e.__v = null, a || s != null) if (
|
|
141
|
+
h.state = h.__s, h.getChildContext != null && (r = ee(ee({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)), Me = d, d != null && d.type === z && d.key == null && (Me = Qr(d.props.children)), l = Nr(t, tt(Me) ? Me : [Me], e, n, r, i, s, o, l, a, c), h.base = e.__e, e.__u &= -161, h.__h.length && o.push(h), b && (h.__E = h.__ = null);
|
|
142
|
+
} catch (_e) {
|
|
143
|
+
if (e.__v = null, a || s != null) if (_e.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
147
|
for (Pt = s.length; Pt--; ) hn(s[Pt]);
|
|
148
148
|
Jt(e);
|
|
149
149
|
}
|
|
150
|
-
else e.__e = n.__e, e.__k = n.__k,
|
|
151
|
-
x.__e(
|
|
150
|
+
else e.__e = n.__e, e.__k = n.__k, _e.then || Jt(e);
|
|
151
|
+
x.__e(_e, e, n);
|
|
152
152
|
}
|
|
153
153
|
else s == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = Yi(n.__e, e, n, r, i, s, o, a, c);
|
|
154
154
|
return (d = x.diffed) && d(e), 128 & e.__u ? void 0 : l;
|
|
@@ -185,7 +185,7 @@ function Yi(t, e, n, r, i, s, o, l, a) {
|
|
|
185
185
|
}
|
|
186
186
|
if (y == null) b === _ || l && t.data == _ || (t.data = _);
|
|
187
187
|
else {
|
|
188
|
-
if (s = s && et.call(t.childNodes), b = n.props ||
|
|
188
|
+
if (s = s && et.call(t.childNodes), b = n.props || Je, !l && s != null) for (b = {}, c = 0; c < t.attributes.length; c++) b[(p = t.attributes[c]).name] = p.value;
|
|
189
189
|
for (c in b) if (p = b[c], c != "children") {
|
|
190
190
|
if (c == "dangerouslySetInnerHTML") h = p;
|
|
191
191
|
else if (!(c in _)) {
|
|
@@ -195,7 +195,7 @@ function Yi(t, e, n, r, i, s, o, l, a) {
|
|
|
195
195
|
}
|
|
196
196
|
for (c in _) p = _[c], c == "children" ? f = p : c == "dangerouslySetInnerHTML" ? d = p : c == "value" ? g = p : c == "checked" ? m = p : l && typeof p != "function" || b[c] === p || at(t, c, p, b[c], i);
|
|
197
197
|
if (d) l || h && (d.__html == h.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
198
|
-
else if (h && (t.innerHTML = ""), Nr(e.type == "template" ? t.content : t, tt(f) ? f : [f], e, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, s, o, s ? s[0] : n.__k &&
|
|
198
|
+
else if (h && (t.innerHTML = ""), Nr(e.type == "template" ? t.content : t, tt(f) ? f : [f], e, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, s, o, s ? s[0] : n.__k && Te(n, 0), l, a), s != null) for (c = s.length; c--; ) hn(s[c]);
|
|
199
199
|
l || (c = "value", y == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[c] || y == "progress" && !g || y == "option" && g != b[c]) && at(t, c, g, b[c], i), c = "checked", m != null && m != t[c] && at(t, c, m, b[c], i));
|
|
200
200
|
}
|
|
201
201
|
return t;
|
|
@@ -226,17 +226,17 @@ function Fr(t, e, n) {
|
|
|
226
226
|
function Xi(t, e, n) {
|
|
227
227
|
return this.constructor(t, n);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
229
|
+
function pe(t, e, n) {
|
|
230
230
|
var r, i, s, o;
|
|
231
|
-
e == document && (e = document.documentElement), x.__ && x.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, s = [], o = [], dn(e, t = (!r && n || e).__k = D(z, null, [t]), i ||
|
|
231
|
+
e == document && (e = document.documentElement), x.__ && x.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, s = [], o = [], dn(e, t = (!r && n || e).__k = D(z, null, [t]), i || Je, Je, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? et.call(e.childNodes) : null, s, !r && n ? n : i ? i.__e : e.firstChild, r, o), Br(s, t, o);
|
|
232
232
|
}
|
|
233
233
|
function Dr(t, e) {
|
|
234
|
-
|
|
234
|
+
pe(t, e, Dr);
|
|
235
235
|
}
|
|
236
236
|
function es(t, e, n) {
|
|
237
237
|
var r, i, s, o, l = ee({}, 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
|
-
return arguments.length > 2 && (l.children = arguments.length > 3 ? et.call(arguments, 2) : n),
|
|
239
|
+
return arguments.length > 2 && (l.children = arguments.length > 3 ? et.call(arguments, 2) : n), De(t.type, l, r || t.key, i || t.ref, null);
|
|
240
240
|
}
|
|
241
241
|
function ts(t) {
|
|
242
242
|
function e(n) {
|
|
@@ -287,17 +287,17 @@ function u(t, e, n, r, i, 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 x.vnode && x.vnode(c), c;
|
|
289
289
|
}
|
|
290
|
-
var le, S, qt, On,
|
|
291
|
-
function
|
|
292
|
-
j.__h && j.__h(S, t,
|
|
290
|
+
var le, S, qt, On, Re = 0, Ur = [], j = x, Nn = j.__b, zn = j.__r, Bn = j.diffed, Qn = j.__c, Fn = j.unmount, Dn = j.__;
|
|
291
|
+
function Ee(t, e) {
|
|
292
|
+
j.__h && j.__h(S, t, Re || e), Re = 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 C(t) {
|
|
297
|
-
return
|
|
297
|
+
return Re = 1, pn(Jr, t);
|
|
298
298
|
}
|
|
299
299
|
function pn(t, e, n) {
|
|
300
|
-
var r =
|
|
300
|
+
var r = Ee(le++, 2);
|
|
301
301
|
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : Jr(void 0, e), function(l) {
|
|
302
302
|
var a = r.__N ? r.__N[0] : r.__[0], c = r.t(a, l);
|
|
303
303
|
a !== c && (r.__N = [c, r.__[1]], r.__c.setState({}));
|
|
@@ -331,20 +331,20 @@ function pn(t, e, n) {
|
|
|
331
331
|
return r.__N || r.__;
|
|
332
332
|
}
|
|
333
333
|
function $(t, e) {
|
|
334
|
-
var n =
|
|
334
|
+
var n = Ee(le++, 3);
|
|
335
335
|
!j.__s && gn(n.__H, e) && (n.__ = t, n.u = e, S.__H.__h.push(n));
|
|
336
336
|
}
|
|
337
337
|
function nt(t, e) {
|
|
338
|
-
var n =
|
|
338
|
+
var n = Ee(le++, 4);
|
|
339
339
|
!j.__s && gn(n.__H, e) && (n.__ = t, n.u = e, S.__h.push(n));
|
|
340
340
|
}
|
|
341
|
-
function
|
|
342
|
-
return
|
|
341
|
+
function ge(t) {
|
|
342
|
+
return Re = 5, U(function() {
|
|
343
343
|
return { current: t };
|
|
344
344
|
}, []);
|
|
345
345
|
}
|
|
346
346
|
function Vr(t, e, n) {
|
|
347
|
-
|
|
347
|
+
Re = 6, nt(function() {
|
|
348
348
|
if (typeof t == "function") {
|
|
349
349
|
var r = t(e());
|
|
350
350
|
return function() {
|
|
@@ -357,23 +357,23 @@ function Vr(t, e, n) {
|
|
|
357
357
|
}, n == null ? n : n.concat(t));
|
|
358
358
|
}
|
|
359
359
|
function U(t, e) {
|
|
360
|
-
var n =
|
|
360
|
+
var n = Ee(le++, 7);
|
|
361
361
|
return gn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
363
|
+
function Ce(t, e) {
|
|
364
|
+
return Re = 8, U(function() {
|
|
365
365
|
return t;
|
|
366
366
|
}, e);
|
|
367
367
|
}
|
|
368
368
|
function Ct(t) {
|
|
369
|
-
var e = S.context[t.__c], n =
|
|
369
|
+
var e = S.context[t.__c], n = Ee(le++, 9);
|
|
370
370
|
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(S)), e.props.value) : t.__;
|
|
371
371
|
}
|
|
372
372
|
function Wr(t, e) {
|
|
373
373
|
j.useDebugValue && j.useDebugValue(e ? e(t) : t);
|
|
374
374
|
}
|
|
375
375
|
function Hr() {
|
|
376
|
-
var t =
|
|
376
|
+
var t = Ee(le++, 11);
|
|
377
377
|
if (!t.__) {
|
|
378
378
|
for (var e = S.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
|
|
379
379
|
var n = e.__m || (e.__m = [0, 0]);
|
|
@@ -564,7 +564,7 @@ function us(t) {
|
|
|
564
564
|
}
|
|
565
565
|
return i.displayName = "Lazy", i.__f = !0, i;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ze() {
|
|
568
568
|
this.i = null, this.l = null;
|
|
569
569
|
}
|
|
570
570
|
x.unmount = function(t) {
|
|
@@ -616,7 +616,7 @@ function hs(t) {
|
|
|
616
616
|
function ds(t) {
|
|
617
617
|
var e = this, n = t.h;
|
|
618
618
|
if (e.componentWillUnmount = function() {
|
|
619
|
-
|
|
619
|
+
pe(null, e.v), e.v = null, e.h = null;
|
|
620
620
|
}, e.h && e.h !== n && e.componentWillUnmount(), !e.v) {
|
|
621
621
|
for (var r = e.__v; r !== null && !r.__m && r.__ !== null; ) r = r.__;
|
|
622
622
|
e.h = n, e.v = { nodeType: 1, parentNode: n, childNodes: [], __k: { __m: r.__m }, contains: function() {
|
|
@@ -627,13 +627,13 @@ function ds(t) {
|
|
|
627
627
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
|
|
628
628
|
} };
|
|
629
629
|
}
|
|
630
|
-
|
|
630
|
+
pe(D(hs, { context: e.context }, t.__v), e.v);
|
|
631
631
|
}
|
|
632
632
|
function fs(t, e) {
|
|
633
633
|
var n = D(ds, { __v: t, h: e });
|
|
634
634
|
return n.containerInfo = e, n;
|
|
635
635
|
}
|
|
636
|
-
(
|
|
636
|
+
(ze.prototype = new J()).__a = function(t) {
|
|
637
637
|
var e = this, n = ri(e.__v), r = e.l.get(t);
|
|
638
638
|
return r[0]++, function(i) {
|
|
639
639
|
var s = function() {
|
|
@@ -641,13 +641,13 @@ function fs(t, e) {
|
|
|
641
641
|
};
|
|
642
642
|
n ? n(s) : s();
|
|
643
643
|
};
|
|
644
|
-
},
|
|
644
|
+
}, ze.prototype.render = function(t) {
|
|
645
645
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
646
646
|
var e = te(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
|
-
},
|
|
650
|
+
}, ze.prototype.componentDidUpdate = ze.prototype.componentDidMount = function() {
|
|
651
651
|
var t = this;
|
|
652
652
|
this.l.forEach(function(e, n) {
|
|
653
653
|
Jn(t, n, e);
|
|
@@ -657,7 +657,7 @@ var ii = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.
|
|
|
657
657
|
return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
|
|
658
658
|
};
|
|
659
659
|
function ys(t, e, n) {
|
|
660
|
-
return e.__k == null && (e.textContent = ""),
|
|
660
|
+
return e.__k == null && (e.textContent = ""), pe(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
661
661
|
}
|
|
662
662
|
function vs(t, e, n) {
|
|
663
663
|
return Dr(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
@@ -672,14 +672,14 @@ J.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
672
672
|
var Gn = x.event;
|
|
673
673
|
function _s() {
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function ws() {
|
|
676
676
|
return this.cancelBubble;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function ks() {
|
|
679
679
|
return this.defaultPrevented;
|
|
680
680
|
}
|
|
681
681
|
x.event = function(t) {
|
|
682
|
-
return Gn && (t = Gn(t)), t.persist = _s, t.isPropagationStopped =
|
|
682
|
+
return Gn && (t = Gn(t)), t.persist = _s, t.isPropagationStopped = ws, t.isDefaultPrevented = ks, t.nativeEvent = t;
|
|
683
683
|
};
|
|
684
684
|
var mn, Ss = { enumerable: !1, configurable: !0, get: function() {
|
|
685
685
|
return this.class;
|
|
@@ -713,7 +713,7 @@ x.diffed = function(t) {
|
|
|
713
713
|
};
|
|
714
714
|
var js = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
715
715
|
return mn.__n[t.__c].props.value;
|
|
716
|
-
}, useCallback:
|
|
716
|
+
}, useCallback: Ce, useContext: Ct, useDebugValue: Wr, useDeferredValue: Yr, useEffect: $, useId: Hr, useImperativeHandle: Vr, useInsertionEffect: ei, useLayoutEffect: nt, useMemo: U, useReducer: pn, useRef: ge, useState: C, useSyncExternalStore: Kr, useTransition: Xr } } };
|
|
717
717
|
function Cs(t) {
|
|
718
718
|
return D.bind(null, t);
|
|
719
719
|
}
|
|
@@ -730,7 +730,7 @@ function $s(t) {
|
|
|
730
730
|
return Tt(t) ? es.apply(null, arguments) : t;
|
|
731
731
|
}
|
|
732
732
|
function As(t) {
|
|
733
|
-
return !!t.__k && (
|
|
733
|
+
return !!t.__k && (pe(null, t), !0);
|
|
734
734
|
}
|
|
735
735
|
function Es(t) {
|
|
736
736
|
return t && (t.base || t.nodeType === 1 && t) || null;
|
|
@@ -739,9 +739,9 @@ var Is = function(t, e) {
|
|
|
739
739
|
return t(e);
|
|
740
740
|
}, Ps = function(t, e) {
|
|
741
741
|
return t(e);
|
|
742
|
-
}, qs = z, Ms = Tt, xn = { useState: C, useId: Hr, useReducer: pn, useEffect: $, useLayoutEffect: nt, useInsertionEffect: ei, useTransition: Xr, useDeferredValue: Yr, useSyncExternalStore: Kr, startTransition: Zr, useRef:
|
|
743
|
-
for (var
|
|
744
|
-
X[
|
|
742
|
+
}, qs = z, Ms = Tt, xn = { useState: C, useId: Hr, useReducer: pn, useEffect: $, useLayoutEffect: nt, useInsertionEffect: ei, useTransition: Xr, useDeferredValue: Yr, useSyncExternalStore: Kr, startTransition: Zr, useRef: ge, useImperativeHandle: Vr, useMemo: U, useCallback: Ce, useContext: Ct, useDebugValue: Wr, version: "18.3.1", Children: ls, render: ys, hydrate: vs, unmountComponentAtNode: As, createPortal: fs, createElement: D, createContext: ts, createFactory: Cs, cloneElement: $s, createRef: Gi, Fragment: z, isValidElement: Tt, isElement: Ms, isFragment: Ts, isMemo: Rs, findDOMNode: Es, Component: J, PureComponent: Zt, memo: ss, forwardRef: as, flushSync: Ps, unstable_batchedUpdates: Is, StrictMode: qs, Suspense: ft, SuspenseList: ze, lazy: us, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: js }, X = [], F = [], Ls = Uint8Array, Lt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
743
|
+
for (var we = 0, Os = Lt.length; we < Os; ++we)
|
|
744
|
+
X[we] = Lt[we], F[Lt.charCodeAt(we)] = we;
|
|
745
745
|
F[45] = 62;
|
|
746
746
|
F[95] = 63;
|
|
747
747
|
function Ns(t) {
|
|
@@ -756,7 +756,7 @@ function Ns(t) {
|
|
|
756
756
|
function zs(t, e, n) {
|
|
757
757
|
return (e + n) * 3 / 4 - n;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function Ge(t) {
|
|
760
760
|
var e, n = Ns(t), r = n[0], i = n[1], s = new Ls(zs(t, r, i)), o = 0, l = i > 0 ? r - 4 : r, a;
|
|
761
761
|
for (a = 0; a < l; a += 4)
|
|
762
762
|
e = F[t.charCodeAt(a)] << 18 | F[t.charCodeAt(a + 1)] << 12 | F[t.charCodeAt(a + 2)] << 6 | F[t.charCodeAt(a + 3)], s[o++] = e >> 16 & 255, s[o++] = e >> 8 & 255, s[o++] = e & 255;
|
|
@@ -770,7 +770,7 @@ function Qs(t, e, n) {
|
|
|
770
770
|
r = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (t[s + 2] & 255), i.push(Bs(r));
|
|
771
771
|
return i.join("");
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function Ke(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
776
|
Qs(
|
|
@@ -823,22 +823,22 @@ function si(t) {
|
|
|
823
823
|
n?.constructor?.name === "Object";
|
|
824
824
|
return e && r;
|
|
825
825
|
}
|
|
826
|
-
const oi = !0,
|
|
826
|
+
const oi = !0, $e = BigInt("-9223372036854775808"), bn = BigInt("9223372036854775807"), Yt = BigInt("0"), Ds = BigInt("8"), Us = BigInt("256");
|
|
827
827
|
function ai(t) {
|
|
828
828
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
829
829
|
}
|
|
830
830
|
function Vs(t) {
|
|
831
|
-
t < Yt && (t -=
|
|
831
|
+
t < Yt && (t -= $e + $e);
|
|
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
837
|
n.set([parseInt(i, 16)], r++), t >>= Ds;
|
|
838
|
-
return
|
|
838
|
+
return Ke(n);
|
|
839
839
|
}
|
|
840
840
|
function Ws(t) {
|
|
841
|
-
const e =
|
|
841
|
+
const e = Ge(t);
|
|
842
842
|
if (e.byteLength !== 8)
|
|
843
843
|
throw new Error(
|
|
844
844
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
@@ -846,18 +846,18 @@ function Ws(t) {
|
|
|
846
846
|
let n = Yt, r = Yt;
|
|
847
847
|
for (const i of e)
|
|
848
848
|
n += BigInt(i) * Us ** r, r++;
|
|
849
|
-
return n > bn && (n +=
|
|
849
|
+
return n > bn && (n += $e + $e), n;
|
|
850
850
|
}
|
|
851
851
|
function Hs(t) {
|
|
852
|
-
if (t <
|
|
852
|
+
if (t < $e || bn < 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
|
-
return new DataView(e).setBigInt64(0, t, !0),
|
|
857
|
+
return new DataView(e).setBigInt64(0, t, !0), Ke(new Uint8Array(e));
|
|
858
858
|
}
|
|
859
859
|
function Js(t) {
|
|
860
|
-
const e =
|
|
860
|
+
const e = Ge(t);
|
|
861
861
|
if (e.byteLength !== 8)
|
|
862
862
|
throw new Error(
|
|
863
863
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
@@ -880,11 +880,11 @@ function li(t) {
|
|
|
880
880
|
);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Ae(t) {
|
|
884
884
|
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string")
|
|
885
885
|
return t;
|
|
886
886
|
if (Array.isArray(t))
|
|
887
|
-
return t.map((r) =>
|
|
887
|
+
return t.map((r) => Ae(r));
|
|
888
888
|
if (typeof t != "object")
|
|
889
889
|
throw new Error(`Unexpected type of ${t}`);
|
|
890
890
|
const e = Object.entries(t);
|
|
@@ -893,7 +893,7 @@ function $e(t) {
|
|
|
893
893
|
if (r === "$bytes") {
|
|
894
894
|
if (typeof t.$bytes != "string")
|
|
895
895
|
throw new Error(`Malformed $bytes field on ${t}`);
|
|
896
|
-
return
|
|
896
|
+
return Ge(t.$bytes).buffer;
|
|
897
897
|
}
|
|
898
898
|
if (r === "$integer") {
|
|
899
899
|
if (typeof t.$integer != "string")
|
|
@@ -903,7 +903,7 @@ function $e(t) {
|
|
|
903
903
|
if (r === "$float") {
|
|
904
904
|
if (typeof t.$float != "string")
|
|
905
905
|
throw new Error(`Malformed $float field on ${t}`);
|
|
906
|
-
const i =
|
|
906
|
+
const i = Ge(t.$float);
|
|
907
907
|
if (i.byteLength !== 8)
|
|
908
908
|
throw new Error(
|
|
909
909
|
`Received ${i.byteLength} bytes, expected 8 for $float`
|
|
@@ -924,11 +924,11 @@ function $e(t) {
|
|
|
924
924
|
}
|
|
925
925
|
const n = {};
|
|
926
926
|
for (const [r, i] of Object.entries(t))
|
|
927
|
-
li(r), n[r] =
|
|
927
|
+
li(r), n[r] = Ae(i);
|
|
928
928
|
return n;
|
|
929
929
|
}
|
|
930
930
|
const er = 16384;
|
|
931
|
-
function
|
|
931
|
+
function Ue(t) {
|
|
932
932
|
const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
|
|
933
933
|
if (e.length > er) {
|
|
934
934
|
const n = "[...truncated]";
|
|
@@ -940,7 +940,7 @@ function De(t) {
|
|
|
940
940
|
}
|
|
941
941
|
function Xt(t, e, n, r) {
|
|
942
942
|
if (t === void 0) {
|
|
943
|
-
const o = n && ` (present at path ${n} in original object ${
|
|
943
|
+
const o = n && ` (present at path ${n} in original object ${Ue(
|
|
944
944
|
e
|
|
945
945
|
)})`;
|
|
946
946
|
throw new Error(
|
|
@@ -950,7 +950,7 @@ function Xt(t, e, n, r) {
|
|
|
950
950
|
if (t === null)
|
|
951
951
|
return t;
|
|
952
952
|
if (typeof t == "bigint") {
|
|
953
|
-
if (t <
|
|
953
|
+
if (t < $e || bn < t)
|
|
954
954
|
throw new Error(
|
|
955
955
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
956
956
|
);
|
|
@@ -959,13 +959,13 @@ function Xt(t, e, n, r) {
|
|
|
959
959
|
if (typeof t == "number")
|
|
960
960
|
if (ai(t)) {
|
|
961
961
|
const o = new ArrayBuffer(8);
|
|
962
|
-
return new DataView(o).setFloat64(0, t, oi), { $float:
|
|
962
|
+
return new DataView(o).setFloat64(0, t, oi), { $float: Ke(new Uint8Array(o)) };
|
|
963
963
|
} else
|
|
964
964
|
return t;
|
|
965
965
|
if (typeof t == "boolean" || typeof t == "string")
|
|
966
966
|
return t;
|
|
967
967
|
if (t instanceof ArrayBuffer)
|
|
968
|
-
return { $bytes:
|
|
968
|
+
return { $bytes: Ke(new Uint8Array(t)) };
|
|
969
969
|
if (Array.isArray(t))
|
|
970
970
|
return t.map(
|
|
971
971
|
(o, l) => Xt(o, e, n + `[${l}]`)
|
|
@@ -991,11 +991,11 @@ function Xt(t, e, n, r) {
|
|
|
991
991
|
return i;
|
|
992
992
|
}
|
|
993
993
|
function Ot(t, e, n, r) {
|
|
994
|
-
return t ? `${e}${
|
|
994
|
+
return t ? `${e}${Ue(
|
|
995
995
|
n
|
|
996
|
-
)} is not a supported Convex type (present at path ${t} in original object ${
|
|
996
|
+
)} is not a supported Convex type (present at path ${t} in original object ${Ue(
|
|
997
997
|
r
|
|
998
|
-
)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${e}${
|
|
998
|
+
)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.` : `${e}${Ue(
|
|
999
999
|
n
|
|
1000
1000
|
)} is not a supported Convex type.`;
|
|
1001
1001
|
}
|
|
@@ -1006,13 +1006,13 @@ var Zs = Object.defineProperty, Ys = (t, e, n) => e in t ? Zs(t, e, { enumerable
|
|
|
1006
1006
|
const Xs = /* @__PURE__ */ Symbol.for("ConvexError");
|
|
1007
1007
|
class en extends (nr = Error, tr = Xs, nr) {
|
|
1008
1008
|
constructor(e) {
|
|
1009
|
-
super(typeof e == "string" ? e :
|
|
1009
|
+
super(typeof e == "string" ? e : Ue(e)), Nt(this, "name", "ConvexError"), Nt(this, "data"), Nt(this, tr, !0), this.data = e;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
const ci = () => Array.from({ length: 4 }, () => 0);
|
|
1013
1013
|
ci();
|
|
1014
1014
|
ci();
|
|
1015
|
-
const rr = "1.
|
|
1015
|
+
const rr = "1.39.1";
|
|
1016
1016
|
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, ir = (t, e, n) => to(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1017
1017
|
const no = "color:rgb(0, 145, 255)";
|
|
1018
1018
|
function ui(t) {
|
|
@@ -1100,21 +1100,21 @@ function ro(t, e) {
|
|
|
1100
1100
|
const n = `[CONVEX FATAL ERROR] ${e}`;
|
|
1101
1101
|
return t.error(n), new Error(n);
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function je(t, e, n) {
|
|
1104
1104
|
return `[CONVEX ${ui(t)}(${e})] ${n.errorMessage}
|
|
1105
1105
|
Called by client`;
|
|
1106
1106
|
}
|
|
1107
1107
|
function tn(t, e) {
|
|
1108
1108
|
return e.data = t.errorData, e;
|
|
1109
1109
|
}
|
|
1110
|
-
function
|
|
1110
|
+
function me(t) {
|
|
1111
1111
|
const e = t.split(":");
|
|
1112
1112
|
let n, r;
|
|
1113
1113
|
return e.length === 1 ? (n = e[0], r = "default") : (n = e.slice(0, e.length - 1).join(":"), r = e[e.length - 1]), n.endsWith(".js") && (n = n.slice(0, -3)), `${n}:${r}`;
|
|
1114
1114
|
}
|
|
1115
1115
|
function he(t, e) {
|
|
1116
1116
|
return JSON.stringify({
|
|
1117
|
-
udfPath:
|
|
1117
|
+
udfPath: me(t),
|
|
1118
1118
|
args: ne(e)
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
@@ -1122,7 +1122,7 @@ function sr(t, e, n) {
|
|
|
1122
1122
|
const { initialNumItems: r, id: i } = n;
|
|
1123
1123
|
return JSON.stringify({
|
|
1124
1124
|
type: "paginated",
|
|
1125
|
-
udfPath:
|
|
1125
|
+
udfPath: me(t),
|
|
1126
1126
|
args: ne(e),
|
|
1127
1127
|
options: ne({ initialNumItems: r, id: i })
|
|
1128
1128
|
});
|
|
@@ -1139,7 +1139,7 @@ class oo {
|
|
|
1139
1139
|
this.outstandingAuthOlderThanRestart = !1;
|
|
1140
1140
|
}
|
|
1141
1141
|
subscribe(e, n, r, i) {
|
|
1142
|
-
const s =
|
|
1142
|
+
const s = me(e), o = he(s, n), l = this.querySet.get(o);
|
|
1143
1143
|
if (l !== void 0)
|
|
1144
1144
|
return l.numSubscribers += 1, {
|
|
1145
1145
|
queryToken: o,
|
|
@@ -1198,7 +1198,7 @@ class oo {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
}
|
|
1200
1200
|
queryId(e, n) {
|
|
1201
|
-
const r =
|
|
1201
|
+
const r = me(e), i = he(r, n), s = this.querySet.get(i);
|
|
1202
1202
|
return s !== void 0 ? s.id : null;
|
|
1203
1203
|
}
|
|
1204
1204
|
isCurrentOrNewerAuthVersion(e) {
|
|
@@ -1367,14 +1367,14 @@ class co {
|
|
|
1367
1367
|
o = {
|
|
1368
1368
|
success: !0,
|
|
1369
1369
|
logLines: e.logLines,
|
|
1370
|
-
value:
|
|
1370
|
+
value: Ae(e.result)
|
|
1371
1371
|
}, l = () => s.onResult(o);
|
|
1372
1372
|
else {
|
|
1373
1373
|
const a = e.result, { errorData: c } = e;
|
|
1374
1374
|
mt(this.logger, "error", r, i, a), o = {
|
|
1375
1375
|
success: !1,
|
|
1376
1376
|
errorMessage: a,
|
|
1377
|
-
errorData: c !== void 0 ?
|
|
1377
|
+
errorData: c !== void 0 ? Ae(c) : void 0,
|
|
1378
1378
|
logLines: e.logLines
|
|
1379
1379
|
}, l = () => s.onResult(o);
|
|
1380
1380
|
}
|
|
@@ -1470,7 +1470,7 @@ class co {
|
|
|
1470
1470
|
return this.inflightActionsCount;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
const
|
|
1473
|
+
const Ze = /* @__PURE__ */ Symbol.for("functionName"), pi = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
1474
1474
|
function uo(t) {
|
|
1475
1475
|
return t[pi] ?? null;
|
|
1476
1476
|
}
|
|
@@ -1481,8 +1481,8 @@ function fo(t) {
|
|
|
1481
1481
|
let e;
|
|
1482
1482
|
if (typeof t == "string")
|
|
1483
1483
|
ho(t) ? e = { functionHandle: t } : e = { name: t };
|
|
1484
|
-
else if (t[
|
|
1485
|
-
e = { name: t[
|
|
1484
|
+
else if (t[Ze])
|
|
1485
|
+
e = { name: t[Ze] };
|
|
1486
1486
|
else {
|
|
1487
1487
|
const n = uo(t);
|
|
1488
1488
|
if (!n)
|
|
@@ -1502,13 +1502,13 @@ function L(t) {
|
|
|
1502
1502
|
`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(e)}`
|
|
1503
1503
|
);
|
|
1504
1504
|
if (typeof t == "string") return t;
|
|
1505
|
-
const n = t[
|
|
1505
|
+
const n = t[Ze];
|
|
1506
1506
|
if (!n)
|
|
1507
1507
|
throw new Error(`${t} is not a functionReference`);
|
|
1508
1508
|
return n;
|
|
1509
1509
|
}
|
|
1510
1510
|
function gi(t) {
|
|
1511
|
-
return { [
|
|
1511
|
+
return { [Ze]: t };
|
|
1512
1512
|
}
|
|
1513
1513
|
function mi(t = []) {
|
|
1514
1514
|
const e = {
|
|
@@ -1516,7 +1516,7 @@ function mi(t = []) {
|
|
|
1516
1516
|
if (typeof r == "string") {
|
|
1517
1517
|
const i = [...t, r];
|
|
1518
1518
|
return mi(i);
|
|
1519
|
-
} else if (r ===
|
|
1519
|
+
} else if (r === Ze) {
|
|
1520
1520
|
if (t.length < 2) {
|
|
1521
1521
|
const o = ["api", ...t].join(".");
|
|
1522
1522
|
throw new Error(
|
|
@@ -1532,7 +1532,7 @@ function mi(t = []) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
const po = mi();
|
|
1534
1534
|
var go = Object.defineProperty, mo = (t, e, n) => e in t ? go(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, xt = (t, e, n) => mo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1535
|
-
class
|
|
1535
|
+
class Ye {
|
|
1536
1536
|
constructor(e) {
|
|
1537
1537
|
xt(this, "queryResults"), xt(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1538
1538
|
}
|
|
@@ -1541,14 +1541,14 @@ class Ze {
|
|
|
1541
1541
|
he(i, r)
|
|
1542
1542
|
);
|
|
1543
1543
|
if (s !== void 0)
|
|
1544
|
-
return
|
|
1544
|
+
return Ye.queryValue(s.result);
|
|
1545
1545
|
}
|
|
1546
1546
|
getAllQueries(e) {
|
|
1547
1547
|
const n = [], r = L(e);
|
|
1548
1548
|
for (const i of this.queryResults.values())
|
|
1549
|
-
i.udfPath ===
|
|
1549
|
+
i.udfPath === me(r) && n.push({
|
|
1550
1550
|
args: i.args,
|
|
1551
|
-
value:
|
|
1551
|
+
value: Ye.queryValue(i.result)
|
|
1552
1552
|
});
|
|
1553
1553
|
return n;
|
|
1554
1554
|
}
|
|
@@ -1584,7 +1584,7 @@ class xo {
|
|
|
1584
1584
|
this.optimisticUpdates = this.optimisticUpdates.filter((o) => !n.has(o.mutationId));
|
|
1585
1585
|
const r = this.queryResults;
|
|
1586
1586
|
this.queryResults = new Map(e);
|
|
1587
|
-
const i = new
|
|
1587
|
+
const i = new Ye(this.queryResults);
|
|
1588
1588
|
for (const o of this.optimisticUpdates)
|
|
1589
1589
|
o.update(i);
|
|
1590
1590
|
const s = [];
|
|
@@ -1599,7 +1599,7 @@ class xo {
|
|
|
1599
1599
|
update: e,
|
|
1600
1600
|
mutationId: n
|
|
1601
1601
|
});
|
|
1602
|
-
const r = new
|
|
1602
|
+
const r = new Ye(this.queryResults);
|
|
1603
1603
|
return e(r), r.modifiedQueries;
|
|
1604
1604
|
}
|
|
1605
1605
|
/**
|
|
@@ -1624,10 +1624,10 @@ class xo {
|
|
|
1624
1624
|
throw r.errorData !== void 0 ? tn(
|
|
1625
1625
|
r,
|
|
1626
1626
|
new en(
|
|
1627
|
-
|
|
1627
|
+
je("query", n.udfPath, r)
|
|
1628
1628
|
)
|
|
1629
1629
|
) : new Error(
|
|
1630
|
-
|
|
1630
|
+
je("query", n.udfPath, r)
|
|
1631
1631
|
);
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
@@ -1671,10 +1671,10 @@ class M {
|
|
|
1671
1671
|
];
|
|
1672
1672
|
}
|
|
1673
1673
|
static fromNumber(e) {
|
|
1674
|
-
return isNaN(e) || e < 0 ? or : e >= vo ? _o : new M(e %
|
|
1674
|
+
return isNaN(e) || e < 0 ? or : e >= vo ? _o : new M(e % Ve | 0, e / Ve | 0);
|
|
1675
1675
|
}
|
|
1676
1676
|
toString() {
|
|
1677
|
-
return (BigInt(this.high) * BigInt(
|
|
1677
|
+
return (BigInt(this.high) * BigInt(Ve) + BigInt(this.low)).toString();
|
|
1678
1678
|
}
|
|
1679
1679
|
equals(e) {
|
|
1680
1680
|
return M.isLong(e) || (e = M.fromValue(e)), this.high >>> 31 === 1 && e.high >>> 31 === 1 ? !1 : this.high === e.high && this.low === e.low;
|
|
@@ -1695,8 +1695,8 @@ class M {
|
|
|
1695
1695
|
return typeof e == "number" ? M.fromNumber(e) : new M(e.low, e.high);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
const or = new M(0, 0), ar = 65536,
|
|
1699
|
-
var
|
|
1698
|
+
const or = new M(0, 0), ar = 65536, Ve = ar * ar, vo = Ve * Ve, _o = new M(-1, -1);
|
|
1699
|
+
var wo = Object.defineProperty, ko = (t, e, n) => e in t ? wo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ct = (t, e, n) => ko(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1700
1700
|
class lr {
|
|
1701
1701
|
constructor(e, n) {
|
|
1702
1702
|
ct(this, "version"), ct(this, "remoteQuerySet"), ct(this, "queryPath"), ct(this, "logger"), this.version = { querySet: 0, ts: M.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
|
|
@@ -1714,7 +1714,7 @@ class lr {
|
|
|
1714
1714
|
if (i)
|
|
1715
1715
|
for (const o of r.logLines)
|
|
1716
1716
|
mt(this.logger, "info", "query", i, o);
|
|
1717
|
-
const s =
|
|
1717
|
+
const s = Ae(r.value ?? null);
|
|
1718
1718
|
this.remoteQuerySet.set(r.queryId, {
|
|
1719
1719
|
success: !0,
|
|
1720
1720
|
value: s,
|
|
@@ -1731,7 +1731,7 @@ class lr {
|
|
|
1731
1731
|
this.remoteQuerySet.set(r.queryId, {
|
|
1732
1732
|
success: !1,
|
|
1733
1733
|
errorMessage: r.errorMessage,
|
|
1734
|
-
errorData: s !== void 0 ?
|
|
1734
|
+
errorData: s !== void 0 ? Ae(s) : void 0,
|
|
1735
1735
|
logLines: r.logLines
|
|
1736
1736
|
});
|
|
1737
1737
|
break;
|
|
@@ -1753,12 +1753,12 @@ class lr {
|
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
function Bt(t) {
|
|
1756
|
-
const e =
|
|
1756
|
+
const e = Ge(t);
|
|
1757
1757
|
return M.fromBytesLE(Array.from(e));
|
|
1758
1758
|
}
|
|
1759
1759
|
function So(t) {
|
|
1760
1760
|
const e = new Uint8Array(t.toBytesLE());
|
|
1761
|
-
return
|
|
1761
|
+
return Ke(e);
|
|
1762
1762
|
}
|
|
1763
1763
|
function cr(t) {
|
|
1764
1764
|
switch (t.type) {
|
|
@@ -1802,11 +1802,11 @@ function jo(t) {
|
|
|
1802
1802
|
var Co = Object.defineProperty, To = (t, e, n) => e in t ? Co(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, T = (t, e, n) => To(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1803
1803
|
const Ro = 1e3, $o = 1001, Ao = 1005, Eo = 4040;
|
|
1804
1804
|
let pt;
|
|
1805
|
-
function
|
|
1805
|
+
function Se() {
|
|
1806
1806
|
return pt === void 0 && (pt = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(pt + performance.now());
|
|
1807
1807
|
}
|
|
1808
1808
|
function ur() {
|
|
1809
|
-
return `t=${Math.round((
|
|
1809
|
+
return `t=${Math.round((Se() - pt) / 100) / 10}s`;
|
|
1810
1810
|
}
|
|
1811
1811
|
const xi = {
|
|
1812
1812
|
// A known error, e.g. during a restart or push
|
|
@@ -1901,7 +1901,7 @@ class Po {
|
|
|
1901
1901
|
}), this.resetServerInactivityTimeout(), this.socket.paused === "no" && (this._hasEverConnected = !0, this.onOpen({
|
|
1902
1902
|
connectionCount: this.connectionCount,
|
|
1903
1903
|
lastCloseReason: this.lastCloseReason,
|
|
1904
|
-
clientTs:
|
|
1904
|
+
clientTs: Se()
|
|
1905
1905
|
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
|
|
1906
1906
|
"WebSocket reconnected at",
|
|
1907
1907
|
ur(),
|
|
@@ -1999,7 +1999,7 @@ class Po {
|
|
|
1999
1999
|
this.scheduledReconnect && (clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null), this.socket = { state: "disconnected" };
|
|
2000
2000
|
const n = this.nextBackoff(e);
|
|
2001
2001
|
this.markConnectionStateDirty(), this.logger.log(`Attempting reconnect in ${Math.round(n)}ms`);
|
|
2002
|
-
const r =
|
|
2002
|
+
const r = Se(), i = setTimeout(() => {
|
|
2003
2003
|
this.scheduledReconnect?.timeout === i && (this.scheduledReconnect = null, this.connect());
|
|
2004
2004
|
}, n);
|
|
2005
2005
|
this.scheduledReconnect = {
|
|
@@ -2156,7 +2156,7 @@ class Po {
|
|
|
2156
2156
|
}
|
|
2157
2157
|
let e = null;
|
|
2158
2158
|
if (this.scheduledReconnect) {
|
|
2159
|
-
const n =
|
|
2159
|
+
const n = Se() - this.scheduledReconnect.scheduledAt;
|
|
2160
2160
|
e = Math.max(0, this.scheduledReconnect.backoffMs - n), this._logVerbose(
|
|
2161
2161
|
`would have waited ${Math.round(e)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(n)}ms)`
|
|
2162
2162
|
), clearTimeout(this.scheduledReconnect.timeout), this.scheduledReconnect = null, this._logVerbose("canceled scheduled reconnect");
|
|
@@ -2175,7 +2175,7 @@ class Po {
|
|
|
2175
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
|
-
clientTs:
|
|
2178
|
+
clientTs: Se()
|
|
2179
2179
|
})) : this.socket.paused === "yes" && (this.socket = { ...this.socket, paused: "no" }, this.onResume());
|
|
2180
2180
|
return;
|
|
2181
2181
|
case "terminated":
|
|
@@ -2210,7 +2210,7 @@ class Po {
|
|
|
2210
2210
|
}) {
|
|
2211
2211
|
if (e.clientClockSkew === void 0 || e.serverTs === void 0)
|
|
2212
2212
|
return;
|
|
2213
|
-
const r =
|
|
2213
|
+
const r = Se() - // client time now
|
|
2214
2214
|
// clientClockSkew = (server time + upstream latency) - client time
|
|
2215
2215
|
// clientClockSkew is "how many milliseconds behind (slow) is the client clock"
|
|
2216
2216
|
// but the latency of the Connect message inflates this, making it appear further behind
|
|
@@ -2237,9 +2237,9 @@ function Mo() {
|
|
|
2237
2237
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
2238
2238
|
});
|
|
2239
2239
|
}
|
|
2240
|
-
class
|
|
2240
|
+
class Be extends Error {
|
|
2241
2241
|
}
|
|
2242
|
-
|
|
2242
|
+
Be.prototype.name = "InvalidTokenError";
|
|
2243
2243
|
function Lo(t) {
|
|
2244
2244
|
return decodeURIComponent(
|
|
2245
2245
|
atob(t).replace(/(.)/g, (e, n) => {
|
|
@@ -2270,25 +2270,25 @@ function Oo(t) {
|
|
|
2270
2270
|
}
|
|
2271
2271
|
function bi(t, e) {
|
|
2272
2272
|
if (typeof t != "string")
|
|
2273
|
-
throw new
|
|
2273
|
+
throw new Be("Invalid token specified: must be a string");
|
|
2274
2274
|
e || (e = {});
|
|
2275
2275
|
const n = e.header === !0 ? 0 : 1, r = t.split(".")[n];
|
|
2276
2276
|
if (typeof r != "string")
|
|
2277
|
-
throw new
|
|
2277
|
+
throw new Be(
|
|
2278
2278
|
`Invalid token specified: missing part #${n + 1}`
|
|
2279
2279
|
);
|
|
2280
2280
|
let i;
|
|
2281
2281
|
try {
|
|
2282
2282
|
i = Oo(r);
|
|
2283
2283
|
} catch (s) {
|
|
2284
|
-
throw new
|
|
2284
|
+
throw new Be(
|
|
2285
2285
|
`Invalid token specified: invalid base64 for part #${n + 1} (${s.message})`
|
|
2286
2286
|
);
|
|
2287
2287
|
}
|
|
2288
2288
|
try {
|
|
2289
2289
|
return JSON.parse(i);
|
|
2290
2290
|
} catch (s) {
|
|
2291
|
-
throw new
|
|
2291
|
+
throw new Be(
|
|
2292
2292
|
`Invalid token specified: invalid json for part #${n + 1} (${s.message})`
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
@@ -2921,9 +2921,9 @@ class Jo {
|
|
|
2921
2921
|
throw i.errorData !== void 0 ? tn(
|
|
2922
2922
|
i,
|
|
2923
2923
|
new en(
|
|
2924
|
-
|
|
2924
|
+
je("mutation", e, i)
|
|
2925
2925
|
)
|
|
2926
|
-
) : new Error(
|
|
2926
|
+
) : new Error(je("mutation", e, i));
|
|
2927
2927
|
return i.value;
|
|
2928
2928
|
}
|
|
2929
2929
|
/**
|
|
@@ -3004,8 +3004,8 @@ class Jo {
|
|
|
3004
3004
|
if (!r.success)
|
|
3005
3005
|
throw r.errorData !== void 0 ? tn(
|
|
3006
3006
|
r,
|
|
3007
|
-
new en(
|
|
3008
|
-
) : new Error(
|
|
3007
|
+
new en(je("action", e, r))
|
|
3008
|
+
) : new Error(je("action", e, r));
|
|
3009
3009
|
return r.value;
|
|
3010
3010
|
}
|
|
3011
3011
|
/**
|
|
@@ -3114,7 +3114,7 @@ class Zo {
|
|
|
3114
3114
|
* @returns Object with paginatedQueryToken and unsubscribe function
|
|
3115
3115
|
*/
|
|
3116
3116
|
subscribe(e, n, r) {
|
|
3117
|
-
const i =
|
|
3117
|
+
const i = me(e), s = sr(
|
|
3118
3118
|
i,
|
|
3119
3119
|
n,
|
|
3120
3120
|
r
|
|
@@ -3145,7 +3145,7 @@ class Zo {
|
|
|
3145
3145
|
* Throws an error when one of the pages has errored.
|
|
3146
3146
|
*/
|
|
3147
3147
|
localQueryResult(e, n, r) {
|
|
3148
|
-
const i =
|
|
3148
|
+
const i = me(e), s = sr(
|
|
3149
3149
|
i,
|
|
3150
3150
|
n,
|
|
3151
3151
|
r
|
|
@@ -3903,11 +3903,11 @@ function Rt() {
|
|
|
3903
3903
|
if (ae > 1)
|
|
3904
3904
|
ae--;
|
|
3905
3905
|
else {
|
|
3906
|
-
for (var t, e = !1;
|
|
3907
|
-
var n =
|
|
3908
|
-
for (
|
|
3906
|
+
for (var t, e = !1; We !== void 0; ) {
|
|
3907
|
+
var n = We;
|
|
3908
|
+
for (We = void 0, nn++; n !== void 0; ) {
|
|
3909
3909
|
var r = n.o;
|
|
3910
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
3910
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && wi(n)) try {
|
|
3911
3911
|
n.c();
|
|
3912
3912
|
} catch (i) {
|
|
3913
3913
|
e || (t = i, e = !0);
|
|
@@ -3927,24 +3927,24 @@ function da(t) {
|
|
|
3927
3927
|
Rt();
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
|
-
var
|
|
3930
|
+
var w = void 0;
|
|
3931
3931
|
function vi(t) {
|
|
3932
|
-
var e =
|
|
3933
|
-
|
|
3932
|
+
var e = w;
|
|
3933
|
+
w = void 0;
|
|
3934
3934
|
try {
|
|
3935
3935
|
return t();
|
|
3936
3936
|
} finally {
|
|
3937
|
-
|
|
3937
|
+
w = e;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
|
-
var
|
|
3940
|
+
var We = void 0, ae = 0, nn = 0, bt = 0;
|
|
3941
3941
|
function _i(t) {
|
|
3942
|
-
if (
|
|
3942
|
+
if (w !== void 0) {
|
|
3943
3943
|
var e = t.n;
|
|
3944
|
-
if (e === void 0 || e.t !==
|
|
3945
|
-
return e = { i: 0, S: t, p:
|
|
3944
|
+
if (e === void 0 || e.t !== w)
|
|
3945
|
+
return e = { i: 0, S: t, p: w.s, n: void 0, t: w, e: void 0, x: void 0, r: e }, w.s !== void 0 && (w.s.n = e), w.s = e, t.n = e, 32 & w.f && t.S(e), e;
|
|
3946
3946
|
if (e.i === -1)
|
|
3947
|
-
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p =
|
|
3947
|
+
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = w.s, e.n = void 0, w.s.n = e, w.s = e), e;
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
3950
|
function A(t, e) {
|
|
@@ -3974,12 +3974,12 @@ A.prototype.U = function(t) {
|
|
|
3974
3974
|
A.prototype.subscribe = function(t) {
|
|
3975
3975
|
var e = this;
|
|
3976
3976
|
return it(function() {
|
|
3977
|
-
var n = e.value, r =
|
|
3978
|
-
|
|
3977
|
+
var n = e.value, r = w;
|
|
3978
|
+
w = void 0;
|
|
3979
3979
|
try {
|
|
3980
3980
|
t(n);
|
|
3981
3981
|
} finally {
|
|
3982
|
-
|
|
3982
|
+
w = r;
|
|
3983
3983
|
}
|
|
3984
3984
|
}, { name: "sub" });
|
|
3985
3985
|
};
|
|
@@ -3993,12 +3993,12 @@ A.prototype.toJSON = function() {
|
|
|
3993
3993
|
return this.value;
|
|
3994
3994
|
};
|
|
3995
3995
|
A.prototype.peek = function() {
|
|
3996
|
-
var t =
|
|
3997
|
-
|
|
3996
|
+
var t = w;
|
|
3997
|
+
w = void 0;
|
|
3998
3998
|
try {
|
|
3999
3999
|
return this.value;
|
|
4000
4000
|
} finally {
|
|
4001
|
-
|
|
4001
|
+
w = t;
|
|
4002
4002
|
}
|
|
4003
4003
|
};
|
|
4004
4004
|
Object.defineProperty(A.prototype, "value", { get: function() {
|
|
@@ -4018,11 +4018,11 @@ Object.defineProperty(A.prototype, "value", { get: function() {
|
|
|
4018
4018
|
function O(t, e) {
|
|
4019
4019
|
return new A(t, e);
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function wi(t) {
|
|
4022
4022
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
|
4023
4023
|
return !1;
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function ki(t) {
|
|
4026
4026
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
4027
4027
|
var n = e.S.n;
|
|
4028
4028
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -4038,65 +4038,65 @@ function Si(t) {
|
|
|
4038
4038
|
}
|
|
4039
4039
|
t.s = n;
|
|
4040
4040
|
}
|
|
4041
|
-
function
|
|
4041
|
+
function ye(t, e) {
|
|
4042
4042
|
A.call(this, void 0), this.x = t, this.s = void 0, this.g = bt - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
4043
4043
|
}
|
|
4044
|
-
|
|
4045
|
-
|
|
4044
|
+
ye.prototype = new A();
|
|
4045
|
+
ye.prototype.h = function() {
|
|
4046
4046
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
4047
4047
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === bt)) return !0;
|
|
4048
|
-
if (this.g = bt, this.f |= 1, this.i > 0 && !
|
|
4048
|
+
if (this.g = bt, this.f |= 1, this.i > 0 && !wi(this))
|
|
4049
4049
|
return this.f &= -2, !0;
|
|
4050
|
-
var t =
|
|
4050
|
+
var t = w;
|
|
4051
4051
|
try {
|
|
4052
|
-
|
|
4052
|
+
ki(this), w = this;
|
|
4053
4053
|
var e = this.x();
|
|
4054
4054
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
4055
4055
|
} catch (n) {
|
|
4056
4056
|
this.v = n, this.f |= 16, this.i++;
|
|
4057
4057
|
}
|
|
4058
|
-
return
|
|
4058
|
+
return w = t, Si(this), this.f &= -2, !0;
|
|
4059
4059
|
};
|
|
4060
|
-
|
|
4060
|
+
ye.prototype.S = function(t) {
|
|
4061
4061
|
if (this.t === void 0) {
|
|
4062
4062
|
this.f |= 36;
|
|
4063
4063
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
|
4064
4064
|
}
|
|
4065
4065
|
A.prototype.S.call(this, t);
|
|
4066
4066
|
};
|
|
4067
|
-
|
|
4067
|
+
ye.prototype.U = function(t) {
|
|
4068
4068
|
if (this.t !== void 0 && (A.prototype.U.call(this, t), this.t === void 0)) {
|
|
4069
4069
|
this.f &= -33;
|
|
4070
4070
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4071
4071
|
}
|
|
4072
4072
|
};
|
|
4073
|
-
|
|
4073
|
+
ye.prototype.N = function() {
|
|
4074
4074
|
if (!(2 & this.f)) {
|
|
4075
4075
|
this.f |= 6;
|
|
4076
4076
|
for (var t = this.t; t !== void 0; t = t.x) t.t.N();
|
|
4077
4077
|
}
|
|
4078
4078
|
};
|
|
4079
|
-
Object.defineProperty(
|
|
4079
|
+
Object.defineProperty(ye.prototype, "value", { get: function() {
|
|
4080
4080
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4081
4081
|
var t = _i(this);
|
|
4082
4082
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
4083
4083
|
return this.v;
|
|
4084
4084
|
} });
|
|
4085
4085
|
function yt(t, e) {
|
|
4086
|
-
return new
|
|
4086
|
+
return new ye(t, e);
|
|
4087
4087
|
}
|
|
4088
4088
|
function ji(t) {
|
|
4089
4089
|
var e = t.u;
|
|
4090
4090
|
if (t.u = void 0, typeof e == "function") {
|
|
4091
4091
|
ae++;
|
|
4092
|
-
var n =
|
|
4093
|
-
|
|
4092
|
+
var n = w;
|
|
4093
|
+
w = void 0;
|
|
4094
4094
|
try {
|
|
4095
4095
|
e();
|
|
4096
4096
|
} catch (r) {
|
|
4097
4097
|
throw t.f &= -2, t.f |= 8, vn(t), r;
|
|
4098
4098
|
} finally {
|
|
4099
|
-
|
|
4099
|
+
w = n, Rt();
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
@@ -4105,13 +4105,13 @@ function vn(t) {
|
|
|
4105
4105
|
t.x = void 0, t.s = void 0, ji(t);
|
|
4106
4106
|
}
|
|
4107
4107
|
function fa(t) {
|
|
4108
|
-
if (
|
|
4109
|
-
Si(this),
|
|
4108
|
+
if (w !== this) throw new Error("Out-of-order effect");
|
|
4109
|
+
Si(this), w = t, this.f &= -2, 8 & this.f && vn(this), Rt();
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function Ie(t, e) {
|
|
4112
4112
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
4113
4113
|
}
|
|
4114
|
-
|
|
4114
|
+
Ie.prototype.c = function() {
|
|
4115
4115
|
var t = this.S();
|
|
4116
4116
|
try {
|
|
4117
4117
|
if (8 & this.f || this.x === void 0) return;
|
|
@@ -4121,23 +4121,23 @@ Ee.prototype.c = function() {
|
|
|
4121
4121
|
t();
|
|
4122
4122
|
}
|
|
4123
4123
|
};
|
|
4124
|
-
|
|
4124
|
+
Ie.prototype.S = function() {
|
|
4125
4125
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4126
|
-
this.f |= 1, this.f &= -9, ji(this),
|
|
4127
|
-
var t =
|
|
4128
|
-
return
|
|
4126
|
+
this.f |= 1, this.f &= -9, ji(this), ki(this), ae++;
|
|
4127
|
+
var t = w;
|
|
4128
|
+
return w = this, fa.bind(this, t);
|
|
4129
4129
|
};
|
|
4130
|
-
|
|
4131
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
4130
|
+
Ie.prototype.N = function() {
|
|
4131
|
+
2 & this.f || (this.f |= 2, this.o = We, We = this);
|
|
4132
4132
|
};
|
|
4133
|
-
|
|
4133
|
+
Ie.prototype.d = function() {
|
|
4134
4134
|
this.f |= 8, 1 & this.f || vn(this);
|
|
4135
4135
|
};
|
|
4136
|
-
|
|
4136
|
+
Ie.prototype.dispose = function() {
|
|
4137
4137
|
this.d();
|
|
4138
4138
|
};
|
|
4139
4139
|
function it(t, e) {
|
|
4140
|
-
var n = new
|
|
4140
|
+
var n = new Ie(t, e);
|
|
4141
4141
|
try {
|
|
4142
4142
|
n.c();
|
|
4143
4143
|
} catch (i) {
|
|
@@ -4150,7 +4150,7 @@ var Ci, $t, ut, pa = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__
|
|
|
4150
4150
|
it(function() {
|
|
4151
4151
|
Ci = this.N;
|
|
4152
4152
|
})();
|
|
4153
|
-
function
|
|
4153
|
+
function Pe(t, e) {
|
|
4154
4154
|
x[t] = e.bind(null, x[t] || function() {
|
|
4155
4155
|
});
|
|
4156
4156
|
}
|
|
@@ -4162,7 +4162,7 @@ function vt(t) {
|
|
|
4162
4162
|
ut = t && t.S();
|
|
4163
4163
|
}
|
|
4164
4164
|
function Ri(t) {
|
|
4165
|
-
var e = this, n = t.data, r =
|
|
4165
|
+
var e = this, n = t.data, r = Qe(n);
|
|
4166
4166
|
r.value = n;
|
|
4167
4167
|
var i = U(function() {
|
|
4168
4168
|
for (var l = e, a = e.__v; a = a.__; ) if (a.__c) {
|
|
@@ -4190,7 +4190,7 @@ Ri.displayName = "ReactiveTextNode";
|
|
|
4190
4190
|
Object.defineProperties(A.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Ri }, props: { configurable: !0, get: function() {
|
|
4191
4191
|
return { data: this };
|
|
4192
4192
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4193
|
-
|
|
4193
|
+
Pe("__b", function(t, e) {
|
|
4194
4194
|
if (typeof e.type == "string") {
|
|
4195
4195
|
var n, r = e.props;
|
|
4196
4196
|
for (var i in r) if (i !== "children") {
|
|
@@ -4200,7 +4200,7 @@ Ie("__b", function(t, e) {
|
|
|
4200
4200
|
}
|
|
4201
4201
|
t(e);
|
|
4202
4202
|
});
|
|
4203
|
-
|
|
4203
|
+
Pe("__r", function(t, e) {
|
|
4204
4204
|
if (t(e), e.type !== z) {
|
|
4205
4205
|
vt();
|
|
4206
4206
|
var n, r = e.__c;
|
|
@@ -4215,10 +4215,10 @@ Ie("__r", function(t, e) {
|
|
|
4215
4215
|
}, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), $t = r, vt(n);
|
|
4216
4216
|
}
|
|
4217
4217
|
});
|
|
4218
|
-
|
|
4218
|
+
Pe("__e", function(t, e, n, r) {
|
|
4219
4219
|
vt(), $t = void 0, t(e, n, r);
|
|
4220
4220
|
});
|
|
4221
|
-
|
|
4221
|
+
Pe("diffed", function(t, e) {
|
|
4222
4222
|
vt(), $t = void 0;
|
|
4223
4223
|
var n;
|
|
4224
4224
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
@@ -4249,7 +4249,7 @@ function ga(t, e, n, r) {
|
|
|
4249
4249
|
r[e] !== o && (r[e] = o, i ? t[e] = o : o != null && (o !== !1 || e[4] === "-") ? t.setAttribute(e, o) : t.removeAttribute(e));
|
|
4250
4250
|
}) };
|
|
4251
4251
|
}
|
|
4252
|
-
|
|
4252
|
+
Pe("unmount", function(t, e) {
|
|
4253
4253
|
if (typeof e.type == "string") {
|
|
4254
4254
|
var n = e.__e;
|
|
4255
4255
|
if (n) {
|
|
@@ -4271,7 +4271,7 @@ Ie("unmount", function(t, e) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
t(e);
|
|
4273
4273
|
});
|
|
4274
|
-
|
|
4274
|
+
Pe("__h", function(t, e, n, r) {
|
|
4275
4275
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
|
|
4276
4276
|
});
|
|
4277
4277
|
J.prototype.shouldComponentUpdate = function(t, e) {
|
|
@@ -4286,13 +4286,13 @@ J.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4286
4286
|
for (var l in this.props) if (!(l in t)) return !0;
|
|
4287
4287
|
return !1;
|
|
4288
4288
|
};
|
|
4289
|
-
function
|
|
4289
|
+
function Qe(t, e) {
|
|
4290
4290
|
return U(function() {
|
|
4291
4291
|
return O(t, e);
|
|
4292
4292
|
}, []);
|
|
4293
4293
|
}
|
|
4294
4294
|
function ma(t, e) {
|
|
4295
|
-
var n =
|
|
4295
|
+
var n = ge(t);
|
|
4296
4296
|
return n.current = t, $t.__$f |= 4, U(function() {
|
|
4297
4297
|
return yt(function() {
|
|
4298
4298
|
return n.current();
|
|
@@ -4312,7 +4312,7 @@ function ba() {
|
|
|
4312
4312
|
function $i() {
|
|
4313
4313
|
Ti.push(this) === 1 && (x.requestAnimationFrame || xa)(ba);
|
|
4314
4314
|
}
|
|
4315
|
-
const I = O(!1), _t = O(void 0),
|
|
4315
|
+
const I = O(!1), _t = O(void 0), de = O(void 0);
|
|
4316
4316
|
function ya(t) {
|
|
4317
4317
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4318
4318
|
}
|
|
@@ -4347,7 +4347,7 @@ async function _a(t, e, n, r) {
|
|
|
4347
4347
|
const s = await fetch(i.toString(), { signal: n });
|
|
4348
4348
|
return s.ok ? s.json() : null;
|
|
4349
4349
|
}
|
|
4350
|
-
function
|
|
4350
|
+
function wa(t, e, n) {
|
|
4351
4351
|
const [r, i] = C(null);
|
|
4352
4352
|
return $(() => {
|
|
4353
4353
|
i(null);
|
|
@@ -4369,7 +4369,7 @@ function ka(t, e, n) {
|
|
|
4369
4369
|
};
|
|
4370
4370
|
}, [t, e, n]), r;
|
|
4371
4371
|
}
|
|
4372
|
-
async function
|
|
4372
|
+
async function ka(t, e, n) {
|
|
4373
4373
|
try {
|
|
4374
4374
|
const r = await fetch(`${e}/widget/bootstrap`, {
|
|
4375
4375
|
method: "POST",
|
|
@@ -4395,10 +4395,10 @@ function Sa(t, e, n, r) {
|
|
|
4395
4395
|
return;
|
|
4396
4396
|
let o = !1;
|
|
4397
4397
|
return (async () => {
|
|
4398
|
-
const l = await
|
|
4398
|
+
const l = await ka(t, s, e);
|
|
4399
4399
|
if (!o)
|
|
4400
4400
|
if (l.ok)
|
|
4401
|
-
|
|
4401
|
+
de.value = l.token;
|
|
4402
4402
|
else {
|
|
4403
4403
|
const a = e ? `project '${t}/${e}'` : `org '${t}'`;
|
|
4404
4404
|
l.error === "unauthorized" ? console.error(
|
|
@@ -4586,7 +4586,7 @@ function Aa(t) {
|
|
|
4586
4586
|
};
|
|
4587
4587
|
}, [t]);
|
|
4588
4588
|
}
|
|
4589
|
-
const Pi = "jex-session-history", Ea = 900 * 1e3, G = O([]), Xe = O(null), qi = yt(() => G.value.length > 0),
|
|
4589
|
+
const Pi = "jex-session-history", Ea = 900 * 1e3, G = O([]), Xe = O(null), qi = yt(() => G.value.length > 0), He = O(null);
|
|
4590
4590
|
function Ia() {
|
|
4591
4591
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4592
4592
|
}
|
|
@@ -4622,7 +4622,7 @@ function gr(t) {
|
|
|
4622
4622
|
);
|
|
4623
4623
|
G.value = n, Xe.value = t, At(n);
|
|
4624
4624
|
}
|
|
4625
|
-
function
|
|
4625
|
+
function wn(t) {
|
|
4626
4626
|
if (!t)
|
|
4627
4627
|
return;
|
|
4628
4628
|
const e = Date.now(), n = G.value.map(
|
|
@@ -4638,10 +4638,10 @@ function Ma() {
|
|
|
4638
4638
|
N.value = Mi();
|
|
4639
4639
|
}
|
|
4640
4640
|
const La = O("screen");
|
|
4641
|
-
function
|
|
4641
|
+
function fe(t) {
|
|
4642
4642
|
N.value = [...N.value, t];
|
|
4643
4643
|
}
|
|
4644
|
-
function
|
|
4644
|
+
function wt() {
|
|
4645
4645
|
N.value.length > 1 && (N.value = N.value.slice(0, -1));
|
|
4646
4646
|
}
|
|
4647
4647
|
function rn(t) {
|
|
@@ -4663,7 +4663,7 @@ function Oa(t) {
|
|
|
4663
4663
|
}
|
|
4664
4664
|
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;
|
|
4665
4665
|
}
|
|
4666
|
-
function
|
|
4666
|
+
function kn({ size: t = 24 }) {
|
|
4667
4667
|
return /* @__PURE__ */ u("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: [
|
|
4668
4668
|
/* @__PURE__ */ u("path", { d: "M12 8V4H8" }),
|
|
4669
4669
|
/* @__PURE__ */ u("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -4680,12 +4680,12 @@ function mr({ title: t, rightAction: e }) {
|
|
|
4680
4680
|
"button",
|
|
4681
4681
|
{
|
|
4682
4682
|
class: "jex-header-back",
|
|
4683
|
-
onClick:
|
|
4683
|
+
onClick: wt,
|
|
4684
4684
|
"aria-label": n.back || "Go back",
|
|
4685
4685
|
children: /* @__PURE__ */ u("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__ */ u("path", { d: "m15 18-6-6 6-6" }) })
|
|
4686
4686
|
}
|
|
4687
4687
|
),
|
|
4688
|
-
!r && /* @__PURE__ */ u(
|
|
4688
|
+
!r && /* @__PURE__ */ u(kn, { size: 24 }),
|
|
4689
4689
|
/* @__PURE__ */ u("div", { class: "jex-header-info", children: [
|
|
4690
4690
|
/* @__PURE__ */ u("h3", { children: t }),
|
|
4691
4691
|
/* @__PURE__ */ u("p", { children: n.statusOnline })
|
|
@@ -4742,7 +4742,7 @@ function Ba({ size: t = 24, ...e }) {
|
|
|
4742
4742
|
}
|
|
4743
4743
|
const Qa = {
|
|
4744
4744
|
chat: /* @__PURE__ */ u(Li, { size: 28 }),
|
|
4745
|
-
bot: /* @__PURE__ */ u(
|
|
4745
|
+
bot: /* @__PURE__ */ u(kn, { size: 28 }),
|
|
4746
4746
|
sparkles: /* @__PURE__ */ u(Ba, { size: 28 })
|
|
4747
4747
|
}, Fa = {
|
|
4748
4748
|
none: "0px",
|
|
@@ -4772,15 +4772,15 @@ function Da({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
|
4772
4772
|
function Ua({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
4773
4773
|
const r = q(), [i, s] = C("");
|
|
4774
4774
|
function o() {
|
|
4775
|
-
|
|
4775
|
+
He.value = "fresh", e(), fe({ id: "chat" });
|
|
4776
4776
|
}
|
|
4777
4777
|
function l(c) {
|
|
4778
|
-
|
|
4778
|
+
He.value = "resume", n(), gr(c), fe({ id: "chat" });
|
|
4779
4779
|
}
|
|
4780
4780
|
function a(c) {
|
|
4781
4781
|
c.preventDefault();
|
|
4782
4782
|
const d = i.trim().toUpperCase();
|
|
4783
|
-
d && (
|
|
4783
|
+
d && (He.value = "resume", n(), gr(d), fe({ id: "chat" }));
|
|
4784
4784
|
}
|
|
4785
4785
|
return /* @__PURE__ */ u("div", { class: "jex-home", children: [
|
|
4786
4786
|
/* @__PURE__ */ u("div", { class: "jex-home-hero", children: [
|
|
@@ -4848,7 +4848,7 @@ function Va({ title: t }) {
|
|
|
4848
4848
|
"button",
|
|
4849
4849
|
{
|
|
4850
4850
|
class: "jex-selection-option",
|
|
4851
|
-
onClick: () =>
|
|
4851
|
+
onClick: () => fe({ id: "chat" }),
|
|
4852
4852
|
children: [
|
|
4853
4853
|
/* @__PURE__ */ u("span", { class: "jex-selection-icon", children: "💬" }),
|
|
4854
4854
|
/* @__PURE__ */ u("span", { class: "jex-selection-label", children: e.chatWith.replace("{title}", t) }),
|
|
@@ -4860,7 +4860,7 @@ function Va({ title: t }) {
|
|
|
4860
4860
|
"button",
|
|
4861
4861
|
{
|
|
4862
4862
|
class: "jex-selection-option",
|
|
4863
|
-
onClick: () =>
|
|
4863
|
+
onClick: () => fe({ id: "form" }),
|
|
4864
4864
|
children: [
|
|
4865
4865
|
/* @__PURE__ */ u("span", { class: "jex-selection-icon", children: "📝" }),
|
|
4866
4866
|
/* @__PURE__ */ u("span", { class: "jex-selection-label", children: e.submitTicket }),
|
|
@@ -4891,7 +4891,7 @@ function Oi(t, e) {
|
|
|
4891
4891
|
};
|
|
4892
4892
|
return new Proxy({}, n);
|
|
4893
4893
|
}
|
|
4894
|
-
const Wa = () => Oi("components", []),
|
|
4894
|
+
const Wa = () => Oi("components", []), xe = po;
|
|
4895
4895
|
Wa();
|
|
4896
4896
|
const Ha = (...t) => t.filter((e, n, r) => !!e && e.trim() !== "" && r.indexOf(e) === n).join(" ").trim();
|
|
4897
4897
|
const br = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -4967,9 +4967,9 @@ const Xa = Ya("corner-up-left", [
|
|
|
4967
4967
|
function Sn() {
|
|
4968
4968
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
4969
4969
|
}
|
|
4970
|
-
var
|
|
4970
|
+
var ve = Sn();
|
|
4971
4971
|
function Ni(t) {
|
|
4972
|
-
|
|
4972
|
+
ve = t;
|
|
4973
4973
|
}
|
|
4974
4974
|
var ue = { exec: () => null };
|
|
4975
4975
|
function v(t, e = "") {
|
|
@@ -4986,14 +4986,14 @@ var el = (() => {
|
|
|
4986
4986
|
return !1;
|
|
4987
4987
|
}
|
|
4988
4988
|
})(), P = { 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)}}>`) }, tl = /^(?:[ \t]*(?:\n|$))+/, nl = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, rl = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, st = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, jn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, zi = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Bi = v(zi).replace(/bull/g, jn).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(), sl = v(zi).replace(/bull/g, jn).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(), Cn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ol = /^[^\n]+/, Tn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, al = v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Tn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ll = v(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, jn).getRegex(), Et = "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", Rn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, cl = v("^ {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", Rn).replace("tag", Et).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Qi = v(Cn).replace("hr", st).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", Et).getRegex(), ul = v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qi).getRegex(), $n = { blockquote: ul, code: nl, def: al, fences: rl, heading: il, hr: st, html: cl, lheading: Bi, list: ll, newline: tl, paragraph: Qi, table: ue, text: ol }, vr = v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", st).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", Et).getRegex(), hl = { ...$n, lheading: sl, table: vr, paragraph: v(Cn).replace("hr", st).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", vr).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", Et).getRegex() }, dl = { ...$n, html: v(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Rn).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: ue, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: v(Cn).replace("hr", st).replace("heading", ` *#{1,6} *[^
|
|
4989
|
-
]`).replace("lheading", Bi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, pl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fi = /^( {2,}|\\)\n(?!\s*$)/, gl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
4989
|
+
]`).replace("lheading", Bi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, pl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fi = /^( {2,}|\\)\n(?!\s*$)/, gl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, qe = /[\p{P}\p{S}]/u, It = /[\s\p{P}\p{S}]/u, An = /[^\s\p{P}\p{S}]/u, ml = v(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, It).getRegex(), Di = /(?!~)[\p{P}\p{S}]/u, xl = /(?!~)[\s\p{P}\p{S}]/u, bl = /(?:[^\s\p{P}\p{S}]|~)/u, yl = v(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", el ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ui = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, vl = v(Ui, "u").replace(/punct/g, qe).getRegex(), _l = v(Ui, "u").replace(/punct/g, Di).getRegex(), Vi = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", wl = v(Vi, "gu").replace(/notPunctSpace/g, An).replace(/punctSpace/g, It).replace(/punct/g, qe).getRegex(), kl = v(Vi, "gu").replace(/notPunctSpace/g, bl).replace(/punctSpace/g, xl).replace(/punct/g, Di).getRegex(), Sl = v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, An).replace(/punctSpace/g, It).replace(/punct/g, qe).getRegex(), jl = v(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, qe).getRegex(), Cl = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Tl = v(Cl, "gu").replace(/notPunctSpace/g, An).replace(/punctSpace/g, It).replace(/punct/g, qe).getRegex(), Rl = v(/\\(punct)/, "gu").replace(/punct/g, qe).getRegex(), $l = v(/^<(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 = v(Rn).replace("(?:-->|$)", "-->").getRegex(), El = v("^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(), kt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Il = v(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", kt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Wi = v(/^!?\[(label)\]\[(ref)\]/).replace("label", kt).replace("ref", Tn).getRegex(), Hi = v(/^!?\[(ref)\](?:\[\])?/).replace("ref", Tn).getRegex(), Pl = v("reflink|nolink(?!\\()", "g").replace("reflink", Wi).replace("nolink", Hi).getRegex(), _r = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, En = { _backpedal: ue, anyPunctuation: Rl, autolink: $l, blockSkip: yl, br: Fi, code: pl, del: ue, delLDelim: ue, delRDelim: ue, emStrongLDelim: vl, emStrongRDelimAst: wl, emStrongRDelimUnd: Sl, escape: fl, link: Il, nolink: Hi, punctuation: ml, reflink: Wi, reflinkSearch: Pl, tag: El, text: gl, url: ue }, ql = { ...En, link: v(/^!?\[(label)\]\((.*?)\)/).replace("label", kt).getRegex(), reflink: v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kt).getRegex() }, sn = { ...En, emStrongRDelimAst: kl, emStrongLDelim: _l, delLDelim: jl, delRDelim: Tl, url: v(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", _r).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: v(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", _r).getRegex() }, Ml = { ...sn, br: v(Fi).replace("{2,}", "*").getRegex(), text: v(sn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: $n, gfm: hl, pedantic: dl }, Le = { normal: En, gfm: sn, breaks: Ml, pedantic: ql }, Ll = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, wr = (t) => Ll[t];
|
|
4990
4990
|
function Y(t, e) {
|
|
4991
4991
|
if (e) {
|
|
4992
|
-
if (P.escapeTest.test(t)) return t.replace(P.escapeReplace,
|
|
4993
|
-
} else if (P.escapeTestNoEncode.test(t)) return t.replace(P.escapeReplaceNoEncode,
|
|
4992
|
+
if (P.escapeTest.test(t)) return t.replace(P.escapeReplace, wr);
|
|
4993
|
+
} else if (P.escapeTestNoEncode.test(t)) return t.replace(P.escapeReplaceNoEncode, wr);
|
|
4994
4994
|
return t;
|
|
4995
4995
|
}
|
|
4996
|
-
function
|
|
4996
|
+
function kr(t) {
|
|
4997
4997
|
try {
|
|
4998
4998
|
t = encodeURI(t).replace(P.percentDecode, "%");
|
|
4999
4999
|
} catch {
|
|
@@ -5012,7 +5012,7 @@ function Sr(t, e) {
|
|
|
5012
5012
|
for (; i < r.length; i++) r[i] = r[i].trim().replace(P.slashPipe, "|");
|
|
5013
5013
|
return r;
|
|
5014
5014
|
}
|
|
5015
|
-
function
|
|
5015
|
+
function Oe(t, e, n) {
|
|
5016
5016
|
let r = t.length;
|
|
5017
5017
|
if (r === 0) return "";
|
|
5018
5018
|
let i = 0;
|
|
@@ -5060,7 +5060,7 @@ var St = class {
|
|
|
5060
5060
|
rules;
|
|
5061
5061
|
lexer;
|
|
5062
5062
|
constructor(t) {
|
|
5063
|
-
this.options = t ||
|
|
5063
|
+
this.options = t || ve;
|
|
5064
5064
|
}
|
|
5065
5065
|
space(t) {
|
|
5066
5066
|
let e = this.rules.block.newline.exec(t);
|
|
@@ -5070,7 +5070,7 @@ var St = class {
|
|
|
5070
5070
|
let e = this.rules.block.code.exec(t);
|
|
5071
5071
|
if (e) {
|
|
5072
5072
|
let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
5073
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
5073
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Oe(n, `
|
|
5074
5074
|
`) };
|
|
5075
5075
|
}
|
|
5076
5076
|
}
|
|
@@ -5086,7 +5086,7 @@ var St = class {
|
|
|
5086
5086
|
if (e) {
|
|
5087
5087
|
let n = e[2].trim();
|
|
5088
5088
|
if (this.rules.other.endingHash.test(n)) {
|
|
5089
|
-
let r =
|
|
5089
|
+
let r = Oe(n, "#");
|
|
5090
5090
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
5091
5091
|
}
|
|
5092
5092
|
return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -5094,13 +5094,13 @@ var St = class {
|
|
|
5094
5094
|
}
|
|
5095
5095
|
hr(t) {
|
|
5096
5096
|
let e = this.rules.block.hr.exec(t);
|
|
5097
|
-
if (e) return { type: "hr", raw:
|
|
5097
|
+
if (e) return { type: "hr", raw: Oe(e[0], `
|
|
5098
5098
|
`) };
|
|
5099
5099
|
}
|
|
5100
5100
|
blockquote(t) {
|
|
5101
5101
|
let e = this.rules.block.blockquote.exec(t);
|
|
5102
5102
|
if (e) {
|
|
5103
|
-
let n =
|
|
5103
|
+
let n = Oe(e[0], `
|
|
5104
5104
|
`).split(`
|
|
5105
5105
|
`), r = "", i = "", s = [];
|
|
5106
5106
|
for (; n.length > 0; ) {
|
|
@@ -5257,7 +5257,7 @@ ${d}` : d;
|
|
|
5257
5257
|
let n = e[2].trim();
|
|
5258
5258
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5259
5259
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5260
|
-
let s =
|
|
5260
|
+
let s = Oe(n.slice(0, -1), "\\");
|
|
5261
5261
|
if ((n.length - s.length) % 2 === 0) return;
|
|
5262
5262
|
} else {
|
|
5263
5263
|
let s = Ol(e[2], "()");
|
|
@@ -5375,12 +5375,12 @@ ${d}` : d;
|
|
|
5375
5375
|
inlineQueue;
|
|
5376
5376
|
tokenizer;
|
|
5377
5377
|
constructor(e) {
|
|
5378
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
5379
|
-
let n = { other: P, block: ht.normal, inline:
|
|
5380
|
-
this.options.pedantic ? (n.block = ht.pedantic, n.inline =
|
|
5378
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new St(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5379
|
+
let n = { other: P, block: ht.normal, inline: Le.normal };
|
|
5380
|
+
this.options.pedantic ? (n.block = ht.pedantic, n.inline = Le.pedantic) : this.options.gfm && (n.block = ht.gfm, this.options.breaks ? n.inline = Le.breaks : n.inline = Le.gfm), this.tokenizer.rules = n;
|
|
5381
5381
|
}
|
|
5382
5382
|
static get rules() {
|
|
5383
|
-
return { block: ht, inline:
|
|
5383
|
+
return { block: ht, inline: Le };
|
|
5384
5384
|
}
|
|
5385
5385
|
static lex(e, n) {
|
|
5386
5386
|
return new on(n).lex(e);
|
|
@@ -5580,7 +5580,7 @@ ${d}` : d;
|
|
|
5580
5580
|
options;
|
|
5581
5581
|
parser;
|
|
5582
5582
|
constructor(t) {
|
|
5583
|
-
this.options = t ||
|
|
5583
|
+
this.options = t || ve;
|
|
5584
5584
|
}
|
|
5585
5585
|
space(t) {
|
|
5586
5586
|
return "";
|
|
@@ -5676,7 +5676,7 @@ ${t}</tr>
|
|
|
5676
5676
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5677
5677
|
}
|
|
5678
5678
|
link({ href: t, title: e, tokens: n }) {
|
|
5679
|
-
let r = this.parser.parseInline(n), i =
|
|
5679
|
+
let r = this.parser.parseInline(n), i = kr(t);
|
|
5680
5680
|
if (i === null) return r;
|
|
5681
5681
|
t = i;
|
|
5682
5682
|
let s = '<a href="' + t + '"';
|
|
@@ -5684,7 +5684,7 @@ ${t}</tr>
|
|
|
5684
5684
|
}
|
|
5685
5685
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
5686
5686
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5687
|
-
let i =
|
|
5687
|
+
let i = kr(t);
|
|
5688
5688
|
if (i === null) return Y(n);
|
|
5689
5689
|
t = i;
|
|
5690
5690
|
let s = `<img src="${t}" alt="${Y(n)}"`;
|
|
@@ -5729,7 +5729,7 @@ ${t}</tr>
|
|
|
5729
5729
|
renderer;
|
|
5730
5730
|
textRenderer;
|
|
5731
5731
|
constructor(e) {
|
|
5732
|
-
this.options = e ||
|
|
5732
|
+
this.options = e || ve, this.options.renderer = this.options.renderer || new jt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new In();
|
|
5733
5733
|
}
|
|
5734
5734
|
static parse(e, n) {
|
|
5735
5735
|
return new an(n).parse(e);
|
|
@@ -5875,11 +5875,11 @@ ${t}</tr>
|
|
|
5875
5875
|
}
|
|
5876
5876
|
return r;
|
|
5877
5877
|
}
|
|
5878
|
-
},
|
|
5878
|
+
}, Fe = class {
|
|
5879
5879
|
options;
|
|
5880
5880
|
block;
|
|
5881
5881
|
constructor(t) {
|
|
5882
|
-
this.options = t ||
|
|
5882
|
+
this.options = t || ve;
|
|
5883
5883
|
}
|
|
5884
5884
|
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
5885
5885
|
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
@@ -5911,7 +5911,7 @@ ${t}</tr>
|
|
|
5911
5911
|
TextRenderer = In;
|
|
5912
5912
|
Lexer = W;
|
|
5913
5913
|
Tokenizer = St;
|
|
5914
|
-
Hooks =
|
|
5914
|
+
Hooks = Fe;
|
|
5915
5915
|
constructor(...t) {
|
|
5916
5916
|
this.use(...t);
|
|
5917
5917
|
}
|
|
@@ -5985,13 +5985,13 @@ ${t}</tr>
|
|
|
5985
5985
|
r.tokenizer = i;
|
|
5986
5986
|
}
|
|
5987
5987
|
if (n.hooks) {
|
|
5988
|
-
let i = this.defaults.hooks || new
|
|
5988
|
+
let i = this.defaults.hooks || new Fe();
|
|
5989
5989
|
for (let s in n.hooks) {
|
|
5990
5990
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
5991
5991
|
if (["options", "block"].includes(s)) continue;
|
|
5992
5992
|
let o = s, l = n.hooks[o], a = i[o];
|
|
5993
|
-
|
|
5994
|
-
if (this.defaults.async &&
|
|
5993
|
+
Fe.passThroughHooks.has(s) ? i[o] = (c) => {
|
|
5994
|
+
if (this.defaults.async && Fe.passThroughHooksRespectAsync.has(s)) return (async () => {
|
|
5995
5995
|
let h = await l.call(i, c);
|
|
5996
5996
|
return a.call(i, h);
|
|
5997
5997
|
})();
|
|
@@ -6061,39 +6061,39 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
6061
6061
|
throw n;
|
|
6062
6062
|
};
|
|
6063
6063
|
}
|
|
6064
|
-
},
|
|
6065
|
-
function
|
|
6066
|
-
return
|
|
6064
|
+
}, be = new Bl();
|
|
6065
|
+
function k(t, e) {
|
|
6066
|
+
return be.parse(t, e);
|
|
6067
6067
|
}
|
|
6068
|
-
|
|
6069
|
-
return
|
|
6068
|
+
k.options = k.setOptions = function(t) {
|
|
6069
|
+
return be.setOptions(t), k.defaults = be.defaults, Ni(k.defaults), k;
|
|
6070
6070
|
};
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
return
|
|
6071
|
+
k.getDefaults = Sn;
|
|
6072
|
+
k.defaults = ve;
|
|
6073
|
+
k.use = function(...t) {
|
|
6074
|
+
return be.use(...t), k.defaults = be.defaults, Ni(k.defaults), k;
|
|
6075
6075
|
};
|
|
6076
|
-
|
|
6077
|
-
return
|
|
6076
|
+
k.walkTokens = function(t, e) {
|
|
6077
|
+
return be.walkTokens(t, e);
|
|
6078
6078
|
};
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6079
|
+
k.parseInline = be.parseInline;
|
|
6080
|
+
k.Parser = H;
|
|
6081
|
+
k.parser = H.parse;
|
|
6082
|
+
k.Renderer = jt;
|
|
6083
|
+
k.TextRenderer = In;
|
|
6084
|
+
k.Lexer = W;
|
|
6085
|
+
k.lexer = W.lex;
|
|
6086
|
+
k.Tokenizer = St;
|
|
6087
|
+
k.Hooks = Fe;
|
|
6088
|
+
k.parse = k;
|
|
6089
|
+
k.options;
|
|
6090
|
+
k.setOptions;
|
|
6091
|
+
k.use;
|
|
6092
|
+
k.walkTokens;
|
|
6093
|
+
k.parseInline;
|
|
6094
6094
|
H.parse;
|
|
6095
6095
|
W.lex;
|
|
6096
|
-
|
|
6096
|
+
k.setOptions({
|
|
6097
6097
|
breaks: !0,
|
|
6098
6098
|
gfm: !0
|
|
6099
6099
|
});
|
|
@@ -6101,7 +6101,7 @@ function Ql({ text: t }) {
|
|
|
6101
6101
|
const e = U(() => {
|
|
6102
6102
|
if (!t)
|
|
6103
6103
|
return "";
|
|
6104
|
-
const n =
|
|
6104
|
+
const n = k.parse(t);
|
|
6105
6105
|
return typeof n == "string" ? n : "";
|
|
6106
6106
|
}, [t]);
|
|
6107
6107
|
return /* @__PURE__ */ u("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
@@ -6121,12 +6121,12 @@ function Dl(t) {
|
|
|
6121
6121
|
return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
6122
6122
|
}
|
|
6123
6123
|
function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: s, botAvatarUrl: o }) {
|
|
6124
|
-
const l = !!r, [a, c] = C(!1), d =
|
|
6124
|
+
const l = !!r, [a, c] = C(!1), d = Ce(() => c(!0), []), h = [
|
|
6125
6125
|
"jex-message bot",
|
|
6126
6126
|
n ? "jex-message-error" : ""
|
|
6127
6127
|
].filter(Boolean).join(" ");
|
|
6128
6128
|
return /* @__PURE__ */ u("div", { class: "jex-message-row bot", children: [
|
|
6129
|
-
/* @__PURE__ */ u("div", { class: `jex-avatar ${l ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: l && s && !a ? /* @__PURE__ */ u("img", { src: s, alt: i ?? "", class: "jex-avatar-img", onError: d }) : l ? /* @__PURE__ */ u("span", { class: "jex-avatar-initials", children: Dl(i ?? "") }) : o && !a ? /* @__PURE__ */ u("img", { src: o, alt: "", class: "jex-avatar-img", onError: d }) : /* @__PURE__ */ u(
|
|
6129
|
+
/* @__PURE__ */ u("div", { class: `jex-avatar ${l ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: l && s && !a ? /* @__PURE__ */ u("img", { src: s, alt: i ?? "", class: "jex-avatar-img", onError: d }) : l ? /* @__PURE__ */ u("span", { class: "jex-avatar-initials", children: Dl(i ?? "") }) : o && !a ? /* @__PURE__ */ u("img", { src: o, alt: "", class: "jex-avatar-img", onError: d }) : /* @__PURE__ */ u(kn, { size: 14 }) }),
|
|
6130
6130
|
/* @__PURE__ */ u("div", { class: "jex-message-content", children: [
|
|
6131
6131
|
/* @__PURE__ */ u("div", { class: h, children: [
|
|
6132
6132
|
/* @__PURE__ */ u(Ql, { text: t }),
|
|
@@ -6176,7 +6176,7 @@ function Vl({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6176
6176
|
) });
|
|
6177
6177
|
}
|
|
6178
6178
|
function Wl({ messageId: t, sessionId: e, visitorId: n }) {
|
|
6179
|
-
const r = q(), [i, s] = C(""), [o, l] = C(""), [a, c] = C(!1), d = rt(
|
|
6179
|
+
const r = q(), [i, s] = C(""), [o, l] = C(""), [a, c] = C(!1), d = rt(xe.functions.chat.public.helpdesk.submitEscalation);
|
|
6180
6180
|
async function h(f) {
|
|
6181
6181
|
if (f.preventDefault(), !a) {
|
|
6182
6182
|
c(!0);
|
|
@@ -6307,12 +6307,12 @@ function Tr(t) {
|
|
|
6307
6307
|
return t.replace(Zl, "");
|
|
6308
6308
|
}
|
|
6309
6309
|
function Yl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: s, visitorId: o }) {
|
|
6310
|
-
const l = q(), a =
|
|
6310
|
+
const l = q(), a = ge(null), [c, d] = C(null), h = ge(null);
|
|
6311
6311
|
return $(() => {
|
|
6312
6312
|
if (!o || !t || t.length === 0)
|
|
6313
6313
|
return;
|
|
6314
6314
|
const f = t[t.length - 1];
|
|
6315
|
-
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id,
|
|
6315
|
+
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id, wn(o));
|
|
6316
6316
|
}, [t, o]), $(() => {
|
|
6317
6317
|
a.current?.scrollIntoView({ behavior: "smooth" });
|
|
6318
6318
|
}, [t?.length, t?.at(-1)?.content]), /* @__PURE__ */ u("div", { class: "jex-chat-messages", children: [
|
|
@@ -6344,7 +6344,7 @@ function Yl({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6344
6344
|
class: "jex-form-submit",
|
|
6345
6345
|
type: "button",
|
|
6346
6346
|
onClick: () => {
|
|
6347
|
-
|
|
6347
|
+
fe({ id: "escalation-form", formMessageId: f._id, sessionId: s, visitorId: o });
|
|
6348
6348
|
},
|
|
6349
6349
|
children: l.escalationPromptSubmit
|
|
6350
6350
|
}
|
|
@@ -6412,7 +6412,7 @@ function ec() {
|
|
|
6412
6412
|
}, [oe.value]), oe.value === null ? null : /* @__PURE__ */ u("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(e.value)) });
|
|
6413
6413
|
}
|
|
6414
6414
|
function tc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: s, onStartFresh: o }) {
|
|
6415
|
-
const l = q(), a = ln, c = rt(
|
|
6415
|
+
const l = q(), a = ln, c = rt(xe.functions.chat.public.conversations.send), d = oe.value !== null && oe.value > Date.now(), h = n || r || d;
|
|
6416
6416
|
if (i === "resolved")
|
|
6417
6417
|
return /* @__PURE__ */ u("div", { class: "jex-chat-input-resolved", children: [
|
|
6418
6418
|
/* @__PURE__ */ u("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
|
|
@@ -6441,7 +6441,7 @@ function tc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
|
|
|
6441
6441
|
visitorId: g.visitorId,
|
|
6442
6442
|
content: p
|
|
6443
6443
|
});
|
|
6444
|
-
!m.ok && m.reason === "rate_limited" ? oe.value = Date.now() + m.retryAfterMs :
|
|
6444
|
+
!m.ok && m.reason === "rate_limited" ? oe.value = Date.now() + m.retryAfterMs : wn(g.visitorId);
|
|
6445
6445
|
} catch (m) {
|
|
6446
6446
|
console.error("[jexity] Failed to send message:", m);
|
|
6447
6447
|
}
|
|
@@ -6493,23 +6493,23 @@ function cn({ message: t }) {
|
|
|
6493
6493
|
}
|
|
6494
6494
|
function nc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: s, sessionNotFound: o, resumeFailed: l, isOrgDeleted: a, ensureSession: c, startFresh: d }) {
|
|
6495
6495
|
const h = q(), f = fr(
|
|
6496
|
-
|
|
6496
|
+
xe.functions.chat.public.conversations.listBySession,
|
|
6497
6497
|
r && i ? { sessionId: r, visitorId: i } : "skip"
|
|
6498
6498
|
), p = fr(
|
|
6499
|
-
|
|
6499
|
+
xe.functions.chat.public.sessions.getSessionStatus,
|
|
6500
6500
|
r && i ? { sessionId: r, visitorId: i } : "skip"
|
|
6501
|
-
), g = r !== null && f === void 0, m = f?.some((E) => E.status === "streaming") ?? !1, b =
|
|
6501
|
+
), g = r !== null && f === void 0, m = f?.some((E) => E.status === "streaming") ?? !1, b = ge(
|
|
6502
6502
|
(() => {
|
|
6503
|
-
const E =
|
|
6503
|
+
const E = He.peek();
|
|
6504
6504
|
return E !== null ? E : qi.peek() ? "resume" : "fresh";
|
|
6505
6505
|
})()
|
|
6506
6506
|
).current;
|
|
6507
6507
|
if ($(() => {
|
|
6508
|
-
|
|
6508
|
+
He.value = null;
|
|
6509
6509
|
}, []), $(() => {
|
|
6510
6510
|
c();
|
|
6511
6511
|
}, [c]), $(() => {
|
|
6512
|
-
i &&
|
|
6512
|
+
i && wn(i);
|
|
6513
6513
|
}, [i]), a)
|
|
6514
6514
|
return /* @__PURE__ */ u("div", { class: "jex-chat-messages", children: /* @__PURE__ */ u("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) });
|
|
6515
6515
|
const _ = b === "fresh" && !r, y = b === "resume" && (!r || g);
|
|
@@ -6541,7 +6541,7 @@ function nc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6541
6541
|
] });
|
|
6542
6542
|
}
|
|
6543
6543
|
function rc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
6544
|
-
const r = q(), [i, s] = C(""), [o, l] = C(""), a = rt(
|
|
6544
|
+
const r = q(), [i, s] = C(""), [o, l] = C(""), a = rt(xe.functions.chat.public.helpdesk.submitEscalation), [c, d] = C(!1), [h, f] = C(null);
|
|
6545
6545
|
async function p(g) {
|
|
6546
6546
|
g.preventDefault(), d(!0), f(null);
|
|
6547
6547
|
try {
|
|
@@ -6551,7 +6551,7 @@ function rc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6551
6551
|
formMessageId: t,
|
|
6552
6552
|
visitorName: i.trim(),
|
|
6553
6553
|
visitorEmail: o.trim()
|
|
6554
|
-
}),
|
|
6554
|
+
}), wt();
|
|
6555
6555
|
} catch (m) {
|
|
6556
6556
|
console.error("[EscalationFormScreen] Submit failed:", m), f(r.escalationSubmitFailed);
|
|
6557
6557
|
} finally {
|
|
@@ -6595,7 +6595,7 @@ function rc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6595
6595
|
] }),
|
|
6596
6596
|
/* @__PURE__ */ u("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: r.escalationConsent }),
|
|
6597
6597
|
/* @__PURE__ */ u("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
|
|
6598
|
-
|
|
6598
|
+
wt();
|
|
6599
6599
|
}, children: r.escalationSkip })
|
|
6600
6600
|
] });
|
|
6601
6601
|
}
|
|
@@ -6724,16 +6724,28 @@ function Rr({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
6724
6724
|
{
|
|
6725
6725
|
message: g.message,
|
|
6726
6726
|
onRetry: () => rn({ id: "loading" }),
|
|
6727
|
-
onBack:
|
|
6727
|
+
onBack: wt
|
|
6728
6728
|
}
|
|
6729
6729
|
)
|
|
6730
6730
|
] });
|
|
6731
6731
|
}
|
|
6732
|
-
function ac(t
|
|
6733
|
-
|
|
6734
|
-
|
|
6732
|
+
function ac(t = 1e4) {
|
|
6733
|
+
return de.value ? Promise.resolve(de.value) : new Promise((e) => {
|
|
6734
|
+
let n = !1;
|
|
6735
|
+
const r = (o) => {
|
|
6736
|
+
n || (n = !0, clearTimeout(i), s(), e(o));
|
|
6737
|
+
}, i = setTimeout(() => {
|
|
6738
|
+
r(null);
|
|
6739
|
+
}, t), s = de.subscribe((o) => {
|
|
6740
|
+
o && r(o);
|
|
6741
|
+
});
|
|
6742
|
+
});
|
|
6743
|
+
}
|
|
6744
|
+
function lc(t, e) {
|
|
6745
|
+
const n = ge(null), r = Qe(!1), i = Qe(!1), s = Qe(!1), o = Qe(null), l = rt(xe.functions.chat.public.sessions.createOrResume), a = async (p) => {
|
|
6746
|
+
const g = await ac();
|
|
6735
6747
|
if (!g)
|
|
6736
|
-
return console.warn("[JexityChat] No bootstrap token — session creation blocked."), null;
|
|
6748
|
+
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), null;
|
|
6737
6749
|
const m = await l({
|
|
6738
6750
|
orgSlug: t,
|
|
6739
6751
|
...e ? { projSlug: e } : {},
|
|
@@ -6744,7 +6756,7 @@ function ac(t, e) {
|
|
|
6744
6756
|
o.value = m.status;
|
|
6745
6757
|
const b = { sessionId: m.sessionId, visitorId: p };
|
|
6746
6758
|
return n.current = b, { session: b, result: m };
|
|
6747
|
-
}, c =
|
|
6759
|
+
}, c = Ce(async () => {
|
|
6748
6760
|
if (n.current)
|
|
6749
6761
|
return n.current;
|
|
6750
6762
|
if (s.value)
|
|
@@ -6759,9 +6771,9 @@ function ac(t, e) {
|
|
|
6759
6771
|
} finally {
|
|
6760
6772
|
r.value = !1;
|
|
6761
6773
|
}
|
|
6762
|
-
}, [t, e, l, r, i, s]), d =
|
|
6774
|
+
}, [t, e, l, r, i, s]), d = Ce(() => {
|
|
6763
6775
|
n.current = null, i.value = !1, s.value = !1;
|
|
6764
|
-
}, [i, s]), h =
|
|
6776
|
+
}, [i, s]), h = Ce(async () => {
|
|
6765
6777
|
n.current = null, s.value = !1, i.value = !1;
|
|
6766
6778
|
const p = pr();
|
|
6767
6779
|
r.value = !0;
|
|
@@ -6787,18 +6799,18 @@ function ac(t, e) {
|
|
|
6787
6799
|
};
|
|
6788
6800
|
}
|
|
6789
6801
|
function $r({ sessionId: t, visitorId: e }) {
|
|
6790
|
-
const n = q(), [r, i] = C(!1), [s, o] = C(null), l = rt(
|
|
6802
|
+
const n = q(), [r, i] = C(!1), [s, o] = C(null), l = rt(xe.functions.chat.public.helpdesk.createEscalationRequest);
|
|
6791
6803
|
async function a() {
|
|
6792
6804
|
if (!t || !e)
|
|
6793
6805
|
return;
|
|
6794
|
-
const c =
|
|
6806
|
+
const c = de.value;
|
|
6795
6807
|
if (c) {
|
|
6796
6808
|
i(!0), o(null);
|
|
6797
6809
|
try {
|
|
6798
6810
|
const d = await l({ sessionId: t, visitorId: e, bootstrapToken: c });
|
|
6799
6811
|
if (d.skipForm)
|
|
6800
6812
|
return;
|
|
6801
|
-
|
|
6813
|
+
fe({ id: "escalation-form", formMessageId: d.formMessageId, sessionId: t, visitorId: e });
|
|
6802
6814
|
} catch (d) {
|
|
6803
6815
|
const h = d instanceof Error ? d.message : String(d);
|
|
6804
6816
|
o(/RATE_LIMITED|Too many/.test(h) ? n.handoffRateLimited : n.handoffFailed);
|
|
@@ -6825,13 +6837,13 @@ function $r({ sessionId: t, visitorId: e }) {
|
|
|
6825
6837
|
s && /* @__PURE__ */ u("div", { class: "jex-handoff-error", role: "alert", children: s })
|
|
6826
6838
|
] });
|
|
6827
6839
|
}
|
|
6828
|
-
function
|
|
6840
|
+
function cc({ options: t }) {
|
|
6829
6841
|
Sa(t.orgSlug, t.projSlug, t.bootstrapToken, t.convexUrl);
|
|
6830
|
-
const e =
|
|
6842
|
+
const e = wa(t.orgSlug, t.projSlug, t.convexUrl);
|
|
6831
6843
|
Aa(t.parentOrigin), $(() => {
|
|
6832
6844
|
qa(), Ma();
|
|
6833
6845
|
}, []);
|
|
6834
|
-
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: s, resumeFailed: o, isOrgDeleted: l, ensureSession: a, startFresh: c, resetSession: d } =
|
|
6846
|
+
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: s, resumeFailed: o, isOrgDeleted: l, ensureSession: a, startFresh: c, resetSession: d } = lc(t.orgSlug, t.projSlug), h = va(t, e);
|
|
6835
6847
|
$(() => {
|
|
6836
6848
|
_n.value = Ii(h.locale);
|
|
6837
6849
|
}, [h.locale]);
|
|
@@ -6918,34 +6930,34 @@ function lc({ options: t }) {
|
|
|
6918
6930
|
}
|
|
6919
6931
|
);
|
|
6920
6932
|
}
|
|
6921
|
-
const cc = '.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-right{margin-left:auto;display:flex;align-items:center}.jex-header-handoff{background:transparent;border:1px solid currentColor;border-radius:999px;padding:4px 10px;font-size:12px;color:inherit;cursor:pointer}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.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-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.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-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.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;flex-wrap:wrap}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.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}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
6922
|
-
function
|
|
6933
|
+
const uc = '.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-right{margin-left:auto;display:flex;align-items:center}.jex-header-handoff{background:transparent;border:1px solid currentColor;border-radius:999px;padding:4px 10px;font-size:12px;color:inherit;cursor:pointer}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.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-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.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-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.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;flex-wrap:wrap}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.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}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
6934
|
+
function hc(t) {
|
|
6923
6935
|
const e = document.createElement("style");
|
|
6924
|
-
e.textContent =
|
|
6936
|
+
e.textContent = uc, t.appendChild(e);
|
|
6925
6937
|
}
|
|
6926
|
-
const
|
|
6938
|
+
const dc = "https://festive-mouse-978.eu-west-1.convex.cloud";
|
|
6927
6939
|
let Ut = null;
|
|
6928
|
-
function
|
|
6929
|
-
const e = t ??
|
|
6940
|
+
function fc(t) {
|
|
6941
|
+
const e = t ?? dc;
|
|
6930
6942
|
if (!e)
|
|
6931
6943
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
6932
6944
|
return Ut || (Ut = new na(ya(e))), Ut;
|
|
6933
6945
|
}
|
|
6934
|
-
function
|
|
6946
|
+
function pc(t, e) {
|
|
6935
6947
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
6936
6948
|
for (; n.firstChild; )
|
|
6937
6949
|
n.removeChild(n.firstChild);
|
|
6938
|
-
|
|
6950
|
+
hc(n), _t.value = e.source, de.value = e.bootstrapToken, N.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), I.value = !0);
|
|
6939
6951
|
const r = document.createElement("div");
|
|
6940
|
-
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r),
|
|
6941
|
-
/* @__PURE__ */ u(ia, { client:
|
|
6952
|
+
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), pe(
|
|
6953
|
+
/* @__PURE__ */ u(ia, { client: fc(e.convexUrl), children: /* @__PURE__ */ u(cc, { options: e }) }),
|
|
6942
6954
|
r
|
|
6943
6955
|
), function() {
|
|
6944
|
-
|
|
6956
|
+
pe(null, r), I.value = !1, _t.value = void 0, de.value = void 0, N.value = [{ id: "home" }];
|
|
6945
6957
|
};
|
|
6946
6958
|
}
|
|
6947
|
-
function
|
|
6948
|
-
const r =
|
|
6959
|
+
function gc(t, e, n) {
|
|
6960
|
+
const r = pc(t, e), i = /* @__PURE__ */ new Set(), s = I.subscribe((l) => {
|
|
6949
6961
|
for (const a of i)
|
|
6950
6962
|
a(l);
|
|
6951
6963
|
});
|
|
@@ -6972,17 +6984,17 @@ function pc(t, e, n) {
|
|
|
6972
6984
|
}
|
|
6973
6985
|
};
|
|
6974
6986
|
}
|
|
6975
|
-
let
|
|
6976
|
-
function
|
|
6977
|
-
|
|
6987
|
+
let Ne = null;
|
|
6988
|
+
function mc(t) {
|
|
6989
|
+
Ne && Ne.shutdown();
|
|
6978
6990
|
let e;
|
|
6979
6991
|
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));
|
|
6980
|
-
const n =
|
|
6981
|
-
t.container || e.remove(),
|
|
6992
|
+
const n = gc(e, t, () => {
|
|
6993
|
+
t.container || e.remove(), Ne === n && (Ne = null);
|
|
6982
6994
|
});
|
|
6983
|
-
return
|
|
6995
|
+
return Ne = n, n;
|
|
6984
6996
|
}
|
|
6985
6997
|
export {
|
|
6986
|
-
|
|
6998
|
+
mc as JexityChat
|
|
6987
6999
|
};
|
|
6988
7000
|
//# sourceMappingURL=index.mjs.map
|