@evelan/jexity-widget 0.4.0 → 0.4.2-canary.8
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/README.md +1 -0
- package/dist/index.mjs +567 -539
- package/dist/index.mjs.map +1 -1
- package/dist/types/module/shell/hooks/useRemoteConfig.d.ts +1 -1
- package/dist/types/module/shell/hooks/useRemoteConfig.d.ts.map +1 -1
- package/dist/types/module/shell/mount.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/widget.js +2 -2
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var Ee, _,
|
|
1
|
+
var Ee, _, Sn, Cn, X, Ut, jn, Tn, Rn, Ct, dt, ft, An, je = {}, $n = [], qr = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, qe = Array.isArray;
|
|
2
2
|
function N(t, e) {
|
|
3
3
|
for (var n in e) t[n] = e[n];
|
|
4
4
|
return t;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function jt(t) {
|
|
7
7
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
8
8
|
}
|
|
9
9
|
function z(t, e, n) {
|
|
@@ -13,10 +13,10 @@ function z(t, e, n) {
|
|
|
13
13
|
return xe(t, s, r, i, null);
|
|
14
14
|
}
|
|
15
15
|
function xe(t, e, n, r, i) {
|
|
16
|
-
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++
|
|
16
|
+
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Sn, __i: -1, __u: 0 };
|
|
17
17
|
return i == null && _.vnode != null && _.vnode(o), o;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Ir() {
|
|
20
20
|
return { current: null };
|
|
21
21
|
}
|
|
22
22
|
function M(t) {
|
|
@@ -30,38 +30,38 @@ function ce(t, e) {
|
|
|
30
30
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
31
31
|
return typeof t.type == "function" ? ce(t) : null;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function En(t) {
|
|
34
34
|
var e, n;
|
|
35
35
|
if ((t = t.__) != null && t.__c != null) {
|
|
36
36
|
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
|
|
37
37
|
t.__e = t.__c.base = n.__e;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return En(t);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
(!t.__d && (t.__d = !0) && X.push(t) && !De.__r++ ||
|
|
43
|
+
function pt(t) {
|
|
44
|
+
(!t.__d && (t.__d = !0) && X.push(t) && !De.__r++ || Ut != _.debounceRendering) && ((Ut = _.debounceRendering) || jn)(De);
|
|
45
45
|
}
|
|
46
46
|
function De() {
|
|
47
|
-
for (var t, e, n, r, i, o, s, a = 1; X.length; ) X.length > a && X.sort(
|
|
47
|
+
for (var t, e, n, r, i, o, s, a = 1; X.length; ) X.length > a && X.sort(Tn), t = X.shift(), a = X.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, o = [], s = [], e.__P && ((n = N({}, r)).__v = r.__v + 1, _.vnode && _.vnode(n), Tt(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, o, i ?? ce(r), !!(32 & r.__u), s), n.__v = r.__v, n.__.__k[n.__i] = n, Mn(o, n, s), r.__e = r.__ = null, n.__e != i && En(n)));
|
|
48
48
|
De.__r = 0;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
var l, g, d, p, C, w, m, v = r && r.__k ||
|
|
52
|
-
for (c =
|
|
50
|
+
function qn(t, e, n, r, i, o, s, a, c, u, f) {
|
|
51
|
+
var l, g, d, p, C, w, m, v = r && r.__k || $n, H = e.length;
|
|
52
|
+
for (c = Mr(n, e, v, c, H), l = 0; l < H; l++) (d = n.__k[l]) != null && (g = d.__i == -1 ? je : v[d.__i] || je, d.__i = l, w = Tt(t, d, g, i, o, s, a, c, u, f), p = d.__e, d.ref && g.ref != d.ref && (g.ref && Rt(g.ref, null, d), f.push(d.ref, d.__c || p, d)), C == null && p != null && (C = p), (m = !!(4 & d.__u)) || g.__k === d.__k ? c = In(d, c, t, m) : typeof d.type == "function" && w !== void 0 ? c = w : p && (c = p.nextSibling), d.__u &= -7);
|
|
53
53
|
return n.__e = C, c;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Mr(t, e, n, r, i) {
|
|
56
56
|
var o, s, a, c, u, f = n.length, l = f, g = 0;
|
|
57
|
-
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (c = o + g, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? xe(null, s, null, null, null) : qe(s) ? xe(M, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? xe(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, a = null, (u = s.__i =
|
|
58
|
-
if (l) for (o = 0; o < f; o++) (a = n[o]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = ce(a)),
|
|
57
|
+
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (c = o + g, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? xe(null, s, null, null, null) : qe(s) ? xe(M, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? xe(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, a = null, (u = s.__i = Pr(s, n, c, l)) != -1 && (l--, (a = n[u]) && (a.__u |= 2)), a == null || a.__v == null ? (u == -1 && (i > f ? g-- : i < f && g++), typeof s.type != "function" && (s.__u |= 4)) : u != c && (u == c - 1 ? g-- : u == c + 1 ? g++ : (u > c ? g-- : g++, s.__u |= 4))) : t.__k[o] = null;
|
|
58
|
+
if (l) for (o = 0; o < f; o++) (a = n[o]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = ce(a)), On(a, a));
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function In(t, e, n, r) {
|
|
62
62
|
var i, o;
|
|
63
63
|
if (typeof t.type == "function") {
|
|
64
|
-
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e =
|
|
64
|
+
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e = In(i[o], e, n, r));
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
67
|
t.__e != e && (r && (e && t.type && !e.parentNode && (e = ce(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
@@ -75,7 +75,7 @@ function D(t, e) {
|
|
|
75
75
|
D(n, e);
|
|
76
76
|
}) : e.push(t)), e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Pr(t, e, n, r) {
|
|
79
79
|
var i, o, s, a = t.key, c = t.type, u = e[n], f = u != null && (2 & u.__u) == 0;
|
|
80
80
|
if (u === null && t.key == null || f && a == u.key && c == u.type) return n;
|
|
81
81
|
if (r > (f ? 1 : 0)) {
|
|
@@ -84,7 +84,7 @@ function Mr(t, e, n, r) {
|
|
|
84
84
|
return -1;
|
|
85
85
|
}
|
|
86
86
|
function Bt(t, e, n) {
|
|
87
|
-
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" ||
|
|
87
|
+
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || qr.test(e) ? n : n + "px";
|
|
88
88
|
}
|
|
89
89
|
function Le(t, e, n, r, i) {
|
|
90
90
|
var o, s;
|
|
@@ -93,7 +93,7 @@ function Le(t, e, n, r, i) {
|
|
|
93
93
|
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Bt(t.style, e, "");
|
|
94
94
|
if (n) for (e in n) r && n[e] == r[e] || Bt(t.style, e, n[e]);
|
|
95
95
|
}
|
|
96
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(
|
|
96
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Rn, "$1")), s = e.toLowerCase(), e = s in t || e == "onFocusOut" || e == "onFocusIn" ? s.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? r ? n.u = r.u : (n.u = Ct, t.addEventListener(e, o ? ft : dt, o)) : t.removeEventListener(e, o ? ft : dt, o);
|
|
97
97
|
else {
|
|
98
98
|
if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
99
99
|
else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
|
|
@@ -104,22 +104,22 @@ function Le(t, e, n, r, i) {
|
|
|
104
104
|
typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Dt(t) {
|
|
108
108
|
return function(e) {
|
|
109
109
|
if (this.l) {
|
|
110
110
|
var n = this.l[e.type + t];
|
|
111
|
-
if (e.t == null) e.t =
|
|
111
|
+
if (e.t == null) e.t = Ct++;
|
|
112
112
|
else if (e.t < n.u) return;
|
|
113
113
|
return n(_.event ? _.event(e) : e);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
var f, l, g, d, p, C, w, m, v, H, J, Pe, _e,
|
|
117
|
+
function Tt(t, e, n, r, i, o, s, a, c, u) {
|
|
118
|
+
var f, l, g, d, p, C, w, m, v, H, J, Pe, _e, Vt, Oe, me, et, P = e.type;
|
|
119
119
|
if (e.constructor != null) return null;
|
|
120
120
|
128 & n.__u && (c = !!(32 & n.__u), o = [a = e.__e = n.__e]), (f = _.__b) && f(e);
|
|
121
121
|
e: if (typeof P == "function") try {
|
|
122
|
-
if (m = e.props, v = "prototype" in P && P.prototype.render, H = (f = P.contextType) && r[f.__c], J = f ? H ? H.props.value : f.__ : r, n.__c ? w = (l = e.__c = n.__c).__ = l.__E : (v ? e.__c = l = new P(m, J) : (e.__c = l = new q(m, J), l.constructor = P, l.render =
|
|
122
|
+
if (m = e.props, v = "prototype" in P && P.prototype.render, H = (f = P.contextType) && r[f.__c], J = f ? H ? H.props.value : f.__ : r, n.__c ? w = (l = e.__c = n.__c).__ = l.__E : (v ? e.__c = l = new P(m, J) : (e.__c = l = new q(m, J), l.constructor = P, l.render = Lr), H && H.sub(l), l.props = m, l.state || (l.state = {}), l.context = J, l.__n = r, g = l.__d = !0, l.__h = [], l._sb = []), v && l.__s == null && (l.__s = l.state), v && P.getDerivedStateFromProps != null && (l.__s == l.state && (l.__s = N({}, l.__s)), N(l.__s, P.getDerivedStateFromProps(m, l.__s))), d = l.props, p = l.state, l.__v = e, g) v && P.getDerivedStateFromProps == null && l.componentWillMount != null && l.componentWillMount(), v && l.componentDidMount != null && l.__h.push(l.componentDidMount);
|
|
123
123
|
else {
|
|
124
124
|
if (v && P.getDerivedStateFromProps == null && m !== d && l.componentWillReceiveProps != null && l.componentWillReceiveProps(m, J), !l.__e && l.shouldComponentUpdate != null && l.shouldComponentUpdate(m, l.__s, J) === !1 || e.__v == n.__v) {
|
|
125
125
|
for (e.__v != n.__v && (l.props = m, l.state = l.__s, l.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(ie) {
|
|
@@ -132,32 +132,32 @@ function jt(t, e, n, r, i, o, s, a, c, u) {
|
|
|
132
132
|
l.componentDidUpdate(d, p, C);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
if (l.context = J, l.props = m, l.__P = t, l.__e = !1, _e = _.__r,
|
|
135
|
+
if (l.context = J, l.props = m, l.__P = t, l.__e = !1, _e = _.__r, Vt = 0, v) {
|
|
136
136
|
for (l.state = l.__s, l.__d = !1, _e && _e(e), f = l.render(l.props, l.state, l.context), Oe = 0; Oe < l._sb.length; Oe++) l.__h.push(l._sb[Oe]);
|
|
137
137
|
l._sb = [];
|
|
138
138
|
} else do
|
|
139
139
|
l.__d = !1, _e && _e(e), f = l.render(l.props, l.state, l.context), l.state = l.__s;
|
|
140
|
-
while (l.__d && ++
|
|
141
|
-
l.state = l.__s, l.getChildContext != null && (r = N(N({}, r), l.getChildContext())), v && !g && l.getSnapshotBeforeUpdate != null && (C = l.getSnapshotBeforeUpdate(d, p)), me = f, f != null && f.type === M && f.key == null && (me =
|
|
140
|
+
while (l.__d && ++Vt < 25);
|
|
141
|
+
l.state = l.__s, l.getChildContext != null && (r = N(N({}, r), l.getChildContext())), v && !g && l.getSnapshotBeforeUpdate != null && (C = l.getSnapshotBeforeUpdate(d, p)), me = f, f != null && f.type === M && f.key == null && (me = Pn(f.props.children)), a = qn(t, qe(me) ? me : [me], e, n, r, i, o, s, a, c, u), l.base = e.__e, e.__u &= -161, l.__h.length && s.push(l), w && (l.__E = l.__ = null);
|
|
142
142
|
} catch (ie) {
|
|
143
143
|
if (e.__v = null, c || o != null) if (ie.then) {
|
|
144
144
|
for (e.__u |= c ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling;
|
|
145
145
|
o[o.indexOf(a)] = null, e.__e = a;
|
|
146
146
|
} else {
|
|
147
|
-
for (et = o.length; et--; )
|
|
148
|
-
|
|
147
|
+
for (et = o.length; et--; ) jt(o[et]);
|
|
148
|
+
gt(e);
|
|
149
149
|
}
|
|
150
|
-
else e.__e = n.__e, e.__k = n.__k, ie.then ||
|
|
150
|
+
else e.__e = n.__e, e.__k = n.__k, ie.then || gt(e);
|
|
151
151
|
_.__e(ie, e, n);
|
|
152
152
|
}
|
|
153
|
-
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e =
|
|
153
|
+
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : a = e.__e = Or(n.__e, e, n, r, i, o, s, c, u);
|
|
154
154
|
return (f = _.diffed) && f(e), 128 & e.__u ? void 0 : a;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(
|
|
156
|
+
function gt(t) {
|
|
157
|
+
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(gt);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
for (var r = 0; r < n.length; r++)
|
|
159
|
+
function Mn(t, e, n) {
|
|
160
|
+
for (var r = 0; r < n.length; r++) Rt(n[r], n[++r], n[++r]);
|
|
161
161
|
_.__c && _.__c(e, t), t.some(function(i) {
|
|
162
162
|
try {
|
|
163
163
|
t = i.__h, i.__h = [], t.some(function(o) {
|
|
@@ -168,10 +168,10 @@ function In(t, e, n) {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : qe(t) ? t.map(
|
|
171
|
+
function Pn(t) {
|
|
172
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : qe(t) ? t.map(Pn) : N({}, t);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Or(t, e, n, r, i, o, s, a, c) {
|
|
175
175
|
var u, f, l, g, d, p, C, w = n.props, m = e.props, v = e.type;
|
|
176
176
|
if (v == "svg" ? i = "http://www.w3.org/2000/svg" : v == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
177
177
|
for (u = 0; u < o.length; u++) if ((d = o[u]) && "setAttribute" in d == !!v && (v ? d.localName == v : d.nodeType == 3)) {
|
|
@@ -195,12 +195,12 @@ function Pr(t, e, n, r, i, o, s, a, c) {
|
|
|
195
195
|
}
|
|
196
196
|
for (u in m) d = m[u], u == "children" ? g = d : u == "dangerouslySetInnerHTML" ? f = d : u == "value" ? p = d : u == "checked" ? C = d : a && typeof d != "function" || w[u] === d || Le(t, u, d, w[u], i);
|
|
197
197
|
if (f) a || l && (f.__html == l.__html || f.__html == t.innerHTML) || (t.innerHTML = f.__html), e.__k = [];
|
|
198
|
-
else if (l && (t.innerHTML = ""),
|
|
198
|
+
else if (l && (t.innerHTML = ""), qn(e.type == "template" ? t.content : t, qe(g) ? g : [g], e, n, r, v == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, s, o ? o[0] : n.__k && ce(n, 0), a, c), o != null) for (u = o.length; u--; ) jt(o[u]);
|
|
199
199
|
a || (u = "value", v == "progress" && p == null ? t.removeAttribute("value") : p != null && (p !== t[u] || v == "progress" && !p || v == "option" && p != w[u]) && Le(t, u, p, w[u], i), u = "checked", C != null && C != t[u] && Le(t, u, C, w[u], i));
|
|
200
200
|
}
|
|
201
201
|
return t;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Rt(t, e, n) {
|
|
204
204
|
try {
|
|
205
205
|
if (typeof t == "function") {
|
|
206
206
|
var r = typeof t.__u == "function";
|
|
@@ -210,9 +210,9 @@ function Tt(t, e, n) {
|
|
|
210
210
|
_.__e(i, n);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function On(t, e, n) {
|
|
214
214
|
var r, i;
|
|
215
|
-
if (_.unmount && _.unmount(t), (r = t.ref) && (r.current && r.current != t.__e ||
|
|
215
|
+
if (_.unmount && _.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || Rt(r, null, e)), (r = t.__c) != null) {
|
|
216
216
|
if (r.componentWillUnmount) try {
|
|
217
217
|
r.componentWillUnmount();
|
|
218
218
|
} catch (o) {
|
|
@@ -220,25 +220,25 @@ function Pn(t, e, n) {
|
|
|
220
220
|
}
|
|
221
221
|
r.base = r.__P = null;
|
|
222
222
|
}
|
|
223
|
-
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] &&
|
|
224
|
-
n ||
|
|
223
|
+
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && On(r[i], e, n || typeof t.type != "function");
|
|
224
|
+
n || jt(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Lr(t, e, n) {
|
|
227
227
|
return this.constructor(t, n);
|
|
228
228
|
}
|
|
229
229
|
function Z(t, e, n) {
|
|
230
230
|
var r, i, o, s;
|
|
231
|
-
e == document && (e = document.documentElement), _.__ && _.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [],
|
|
231
|
+
e == document && (e = document.documentElement), _.__ && _.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [], Tt(e, t = (!r && n || e).__k = z(M, null, [t]), i || je, je, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? Ee.call(e.childNodes) : null, o, !r && n ? n : i ? i.__e : e.firstChild, r, s), Mn(o, t, s);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
Z(t, e,
|
|
233
|
+
function Ln(t, e) {
|
|
234
|
+
Z(t, e, Ln);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function Nr(t, e, n) {
|
|
237
237
|
var r, i, o, s, a = N({}, t.props);
|
|
238
238
|
for (o in t.type && t.type.defaultProps && (s = t.type.defaultProps), e) o == "key" ? r = e[o] : o == "ref" ? i = e[o] : a[o] = e[o] === void 0 && s != null ? s[o] : e[o];
|
|
239
239
|
return arguments.length > 2 && (a.children = arguments.length > 3 ? Ee.call(arguments, 2) : n), xe(t.type, a, r || t.key, i || t.ref, null);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Qr(t) {
|
|
242
242
|
function e(n) {
|
|
243
243
|
var r, i;
|
|
244
244
|
return this.getChildContext || (r = /* @__PURE__ */ new Set(), (i = {})[e.__c] = this, this.getChildContext = function() {
|
|
@@ -247,7 +247,7 @@ function Nr(t) {
|
|
|
247
247
|
r = null;
|
|
248
248
|
}, this.shouldComponentUpdate = function(o) {
|
|
249
249
|
this.props.value != o.value && r.forEach(function(s) {
|
|
250
|
-
s.__e = !0,
|
|
250
|
+
s.__e = !0, pt(s);
|
|
251
251
|
});
|
|
252
252
|
}, this.sub = function(o) {
|
|
253
253
|
r.add(o);
|
|
@@ -257,48 +257,48 @@ function Nr(t) {
|
|
|
257
257
|
};
|
|
258
258
|
}), n.children;
|
|
259
259
|
}
|
|
260
|
-
return e.__c = "__cC" +
|
|
260
|
+
return e.__c = "__cC" + An++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
|
|
261
261
|
return n.children(r);
|
|
262
262
|
}).contextType = e, e;
|
|
263
263
|
}
|
|
264
|
-
Ee =
|
|
264
|
+
Ee = $n.slice, _ = { __e: function(t, e, n, r) {
|
|
265
265
|
for (var i, o, s; e = e.__; ) if ((i = e.__c) && !i.__) try {
|
|
266
266
|
if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(t)), s = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), s = i.__d), s) return i.__E = i;
|
|
267
267
|
} catch (a) {
|
|
268
268
|
t = a;
|
|
269
269
|
}
|
|
270
270
|
throw t;
|
|
271
|
-
} },
|
|
271
|
+
} }, Sn = 0, Cn = function(t) {
|
|
272
272
|
return t != null && t.constructor == null;
|
|
273
273
|
}, q.prototype.setState = function(t, e) {
|
|
274
274
|
var n;
|
|
275
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = N({}, this.state), typeof t == "function" && (t = t(N({}, n), this.props)), t && N(n, t), t != null && this.__v && (e && this._sb.push(e),
|
|
275
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = N({}, this.state), typeof t == "function" && (t = t(N({}, n), this.props)), t && N(n, t), t != null && this.__v && (e && this._sb.push(e), pt(this));
|
|
276
276
|
}, q.prototype.forceUpdate = function(t) {
|
|
277
|
-
this.__v && (this.__e = !0, t && this.__h.push(t),
|
|
278
|
-
}, q.prototype.render = M, X = [],
|
|
277
|
+
this.__v && (this.__e = !0, t && this.__h.push(t), pt(this));
|
|
278
|
+
}, q.prototype.render = M, X = [], jn = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Tn = function(t, e) {
|
|
279
279
|
return t.__v.__b - e.__v.__b;
|
|
280
|
-
}, De.__r = 0,
|
|
281
|
-
var
|
|
280
|
+
}, De.__r = 0, Rn = /(PointerCapture)$|Capture$/i, Ct = 0, dt = Dt(!1), ft = Dt(!0), An = 0;
|
|
281
|
+
var Fr = 0;
|
|
282
282
|
function h(t, e, n, r, i, o) {
|
|
283
283
|
e || (e = {});
|
|
284
284
|
var s, a, c = e;
|
|
285
285
|
if ("ref" in c) for (a in c = {}, e) a == "ref" ? s = e[a] : c[a] = e[a];
|
|
286
|
-
var u = { type: t, props: c, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
286
|
+
var u = { type: t, props: c, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --Fr, __i: -1, __u: 0, __source: i, __self: o };
|
|
287
287
|
if (typeof t == "function" && (s = t.defaultProps)) for (a in s) c[a] === void 0 && (c[a] = s[a]);
|
|
288
288
|
return _.vnode && _.vnode(u), u;
|
|
289
289
|
}
|
|
290
|
-
var G, b, tt,
|
|
290
|
+
var G, b, tt, Wt, ue = 0, Nn = [], x = _, zt = x.__b, Ht = x.__r, Jt = x.diffed, Kt = x.__c, Gt = x.unmount, Xt = x.__;
|
|
291
291
|
function fe(t, e) {
|
|
292
292
|
x.__h && x.__h(b, t, ue || e), ue = 0;
|
|
293
293
|
var n = b.__H || (b.__H = { __: [], __h: [] });
|
|
294
294
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
295
295
|
}
|
|
296
296
|
function I(t) {
|
|
297
|
-
return ue = 1,
|
|
297
|
+
return ue = 1, At(Un, t);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function At(t, e, n) {
|
|
300
300
|
var r = fe(G++, 2);
|
|
301
|
-
if (r.t = t, !r.__c && (r.__ = [n ? n(e) :
|
|
301
|
+
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : Un(void 0, e), function(a) {
|
|
302
302
|
var c = r.__N ? r.__N[0] : r.__[0], u = r.t(c, a);
|
|
303
303
|
c !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
304
304
|
}], r.__c = b, !b.__f)) {
|
|
@@ -332,18 +332,18 @@ function Rt(t, e, n) {
|
|
|
332
332
|
}
|
|
333
333
|
function Q(t, e) {
|
|
334
334
|
var n = fe(G++, 3);
|
|
335
|
-
!x.__s &&
|
|
335
|
+
!x.__s && Et(n.__H, e) && (n.__ = t, n.u = e, b.__H.__h.push(n));
|
|
336
336
|
}
|
|
337
337
|
function Ie(t, e) {
|
|
338
338
|
var n = fe(G++, 4);
|
|
339
|
-
!x.__s &&
|
|
339
|
+
!x.__s && Et(n.__H, e) && (n.__ = t, n.u = e, b.__h.push(n));
|
|
340
340
|
}
|
|
341
341
|
function Ge(t) {
|
|
342
342
|
return ue = 5, V(function() {
|
|
343
343
|
return { current: t };
|
|
344
344
|
}, []);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Qn(t, e, n) {
|
|
347
347
|
ue = 6, Ie(function() {
|
|
348
348
|
if (typeof t == "function") {
|
|
349
349
|
var r = t(e());
|
|
@@ -358,9 +358,9 @@ function Nn(t, e, n) {
|
|
|
358
358
|
}
|
|
359
359
|
function V(t, e) {
|
|
360
360
|
var n = fe(G++, 7);
|
|
361
|
-
return
|
|
361
|
+
return Et(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function $t(t, e) {
|
|
364
364
|
return ue = 8, V(function() {
|
|
365
365
|
return t;
|
|
366
366
|
}, e);
|
|
@@ -369,10 +369,10 @@ function Xe(t) {
|
|
|
369
369
|
var e = b.context[t.__c], n = fe(G++, 9);
|
|
370
370
|
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(b)), e.props.value) : t.__;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function Fn(t, e) {
|
|
373
373
|
x.useDebugValue && x.useDebugValue(e ? e(t) : t);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Vn() {
|
|
376
376
|
var t = fe(G++, 11);
|
|
377
377
|
if (!t.__) {
|
|
378
378
|
for (var e = b.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
|
|
@@ -381,43 +381,43 @@ function Fn() {
|
|
|
381
381
|
}
|
|
382
382
|
return t.__;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
for (var t; t =
|
|
386
|
-
t.__H.__h.forEach(Ve), t.__H.__h.forEach(
|
|
384
|
+
function Vr() {
|
|
385
|
+
for (var t; t = Nn.shift(); ) if (t.__P && t.__H) try {
|
|
386
|
+
t.__H.__h.forEach(Ve), t.__H.__h.forEach(_t), t.__H.__h = [];
|
|
387
387
|
} catch (e) {
|
|
388
388
|
t.__H.__h = [], x.__e(e, t.__v);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
x.__b = function(t) {
|
|
392
|
-
b = null,
|
|
392
|
+
b = null, zt && zt(t);
|
|
393
393
|
}, x.__ = function(t, e) {
|
|
394
|
-
t && e.__k && e.__k.__m && (t.__m = e.__k.__m),
|
|
394
|
+
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Xt && Xt(t, e);
|
|
395
395
|
}, x.__r = function(t) {
|
|
396
|
-
|
|
396
|
+
Ht && Ht(t), G = 0;
|
|
397
397
|
var e = (b = t.__c).__H;
|
|
398
398
|
e && (tt === b ? (e.__h = [], b.__h = [], e.__.forEach(function(n) {
|
|
399
399
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
400
|
-
})) : (e.__h.forEach(Ve), e.__h.forEach(
|
|
400
|
+
})) : (e.__h.forEach(Ve), e.__h.forEach(_t), e.__h = [], G = 0)), tt = b;
|
|
401
401
|
}, x.diffed = function(t) {
|
|
402
|
-
|
|
402
|
+
Jt && Jt(t);
|
|
403
403
|
var e = t.__c;
|
|
404
|
-
e && e.__H && (e.__H.__h.length && (
|
|
404
|
+
e && e.__H && (e.__H.__h.length && (Nn.push(e) !== 1 && Wt === x.requestAnimationFrame || ((Wt = x.requestAnimationFrame) || Ur)(Vr)), e.__H.__.forEach(function(n) {
|
|
405
405
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
406
406
|
})), tt = b = null;
|
|
407
407
|
}, x.__c = function(t, e) {
|
|
408
408
|
e.some(function(n) {
|
|
409
409
|
try {
|
|
410
410
|
n.__h.forEach(Ve), n.__h = n.__h.filter(function(r) {
|
|
411
|
-
return !r.__ ||
|
|
411
|
+
return !r.__ || _t(r);
|
|
412
412
|
});
|
|
413
413
|
} catch (r) {
|
|
414
414
|
e.some(function(i) {
|
|
415
415
|
i.__h && (i.__h = []);
|
|
416
416
|
}), e = [], x.__e(r, n.__v);
|
|
417
417
|
}
|
|
418
|
-
}),
|
|
418
|
+
}), Kt && Kt(t, e);
|
|
419
419
|
}, x.unmount = function(t) {
|
|
420
|
-
|
|
420
|
+
Gt && Gt(t);
|
|
421
421
|
var e, n = t.__c;
|
|
422
422
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
423
423
|
try {
|
|
@@ -427,39 +427,39 @@ x.__b = function(t) {
|
|
|
427
427
|
}
|
|
428
428
|
}), n.__H = void 0, e && x.__e(e, n.__v));
|
|
429
429
|
};
|
|
430
|
-
var
|
|
431
|
-
function
|
|
430
|
+
var Yt = typeof requestAnimationFrame == "function";
|
|
431
|
+
function Ur(t) {
|
|
432
432
|
var e, n = function() {
|
|
433
|
-
clearTimeout(r),
|
|
433
|
+
clearTimeout(r), Yt && cancelAnimationFrame(e), setTimeout(t);
|
|
434
434
|
}, r = setTimeout(n, 35);
|
|
435
|
-
|
|
435
|
+
Yt && (e = requestAnimationFrame(n));
|
|
436
436
|
}
|
|
437
437
|
function Ve(t) {
|
|
438
438
|
var e = b, n = t.__c;
|
|
439
439
|
typeof n == "function" && (t.__c = void 0, n()), b = e;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function _t(t) {
|
|
442
442
|
var e = b;
|
|
443
443
|
t.__c = t.__(), b = e;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Et(t, e) {
|
|
446
446
|
return !t || t.length !== e.length || e.some(function(n, r) {
|
|
447
447
|
return n !== t[r];
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Un(t, e) {
|
|
451
451
|
return typeof e == "function" ? e(t) : e;
|
|
452
452
|
}
|
|
453
453
|
function Bn(t, e) {
|
|
454
454
|
for (var n in e) t[n] = e[n];
|
|
455
455
|
return t;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function mt(t, e) {
|
|
458
458
|
for (var n in t) if (n !== "__source" && !(n in e)) return !0;
|
|
459
459
|
for (var r in e) if (r !== "__source" && t[r] !== e[r]) return !0;
|
|
460
460
|
return !1;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Dn(t, e) {
|
|
463
463
|
var n = e(), r = I({ t: { __: n, u: e } }), i = r[0].t, o = r[1];
|
|
464
464
|
return Ie(function() {
|
|
465
465
|
i.__ = n, i.u = e, nt(i) && o({ t: i });
|
|
@@ -478,80 +478,80 @@ function nt(t) {
|
|
|
478
478
|
return !0;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Wn(t) {
|
|
482
482
|
t();
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function zn(t) {
|
|
485
485
|
return t;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return [!1,
|
|
487
|
+
function Hn() {
|
|
488
|
+
return [!1, Wn];
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var Jn = Ie;
|
|
491
|
+
function yt(t, e) {
|
|
492
492
|
this.props = t, this.context = e;
|
|
493
493
|
}
|
|
494
494
|
function Br(t, e) {
|
|
495
495
|
function n(i) {
|
|
496
496
|
var o = this.props.ref, s = o == i.ref;
|
|
497
|
-
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s :
|
|
497
|
+
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s : mt(this.props, i);
|
|
498
498
|
}
|
|
499
499
|
function r(i) {
|
|
500
500
|
return this.shouldComponentUpdate = n, z(t, i);
|
|
501
501
|
}
|
|
502
502
|
return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r.type = t, r;
|
|
503
503
|
}
|
|
504
|
-
(
|
|
505
|
-
return
|
|
504
|
+
(yt.prototype = new q()).isPureReactComponent = !0, yt.prototype.shouldComponentUpdate = function(t, e) {
|
|
505
|
+
return mt(this.props, t) || mt(this.state, e);
|
|
506
506
|
};
|
|
507
|
-
var
|
|
507
|
+
var Zt = _.__b;
|
|
508
508
|
_.__b = function(t) {
|
|
509
|
-
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null),
|
|
509
|
+
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Zt && Zt(t);
|
|
510
510
|
};
|
|
511
|
-
var
|
|
512
|
-
function
|
|
511
|
+
var Dr = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
512
|
+
function Wr(t) {
|
|
513
513
|
function e(n) {
|
|
514
514
|
var r = Bn({}, n);
|
|
515
515
|
return delete r.ref, t(r, n.ref || null);
|
|
516
516
|
}
|
|
517
|
-
return e.$$typeof =
|
|
517
|
+
return e.$$typeof = Dr, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
|
|
518
518
|
}
|
|
519
|
-
var
|
|
519
|
+
var en = function(t, e) {
|
|
520
520
|
return t == null ? null : D(D(t).map(e));
|
|
521
|
-
},
|
|
521
|
+
}, zr = { map: en, forEach: en, count: function(t) {
|
|
522
522
|
return t ? D(t).length : 0;
|
|
523
523
|
}, only: function(t) {
|
|
524
524
|
var e = D(t);
|
|
525
525
|
if (e.length !== 1) throw "Children.only";
|
|
526
526
|
return e[0];
|
|
527
|
-
}, toArray: D },
|
|
527
|
+
}, toArray: D }, Hr = _.__e;
|
|
528
528
|
_.__e = function(t, e, n, r) {
|
|
529
529
|
if (t.then) {
|
|
530
530
|
for (var i, o = e; o = o.__; ) if ((i = o.__c) && i.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
Hr(t, e, n, r);
|
|
533
533
|
};
|
|
534
|
-
var
|
|
535
|
-
function
|
|
534
|
+
var tn = _.unmount;
|
|
535
|
+
function Kn(t, e, n) {
|
|
536
536
|
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
|
|
537
537
|
typeof r.__c == "function" && r.__c();
|
|
538
538
|
}), t.__c.__H = null), (t = Bn({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c.__e = !0, t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
|
|
539
|
-
return
|
|
539
|
+
return Kn(r, e, n);
|
|
540
540
|
})), t;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Gn(t, e, n) {
|
|
543
543
|
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
|
|
544
|
-
return
|
|
544
|
+
return Gn(r, e, n);
|
|
545
545
|
}), t.__c && t.__c.__P === e && (t.__e && n.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = n)), t;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function Ue() {
|
|
548
548
|
this.__u = 0, this.o = null, this.__b = null;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Xn(t) {
|
|
551
551
|
var e = t.__.__c;
|
|
552
552
|
return e && e.__a && e.__a(t);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Jr(t) {
|
|
555
555
|
var e, n, r;
|
|
556
556
|
function i(o) {
|
|
557
557
|
if (e || (e = t()).then(function(s) {
|
|
@@ -569,11 +569,11 @@ function ve() {
|
|
|
569
569
|
}
|
|
570
570
|
_.unmount = function(t) {
|
|
571
571
|
var e = t.__c;
|
|
572
|
-
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null),
|
|
573
|
-
}, (
|
|
572
|
+
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), tn && tn(t);
|
|
573
|
+
}, (Ue.prototype = new q()).__c = function(t, e) {
|
|
574
574
|
var n = e.__c, r = this;
|
|
575
575
|
r.o == null && (r.o = []), r.o.push(n);
|
|
576
|
-
var i =
|
|
576
|
+
var i = Xn(r.__v), o = !1, s = function() {
|
|
577
577
|
o || (o = !0, n.__R = null, i ? i(a) : a());
|
|
578
578
|
};
|
|
579
579
|
n.__R = s;
|
|
@@ -581,39 +581,39 @@ _.unmount = function(t) {
|
|
|
581
581
|
if (!--r.__u) {
|
|
582
582
|
if (r.state.__a) {
|
|
583
583
|
var c = r.state.__a;
|
|
584
|
-
r.__v.__k[0] =
|
|
584
|
+
r.__v.__k[0] = Gn(c, c.__c.__P, c.__c.__O);
|
|
585
585
|
}
|
|
586
586
|
var u;
|
|
587
587
|
for (r.setState({ __a: r.__b = null }); u = r.o.pop(); ) u.forceUpdate();
|
|
588
588
|
}
|
|
589
589
|
};
|
|
590
590
|
r.__u++ || 32 & e.__u || r.setState({ __a: r.__b = r.__v.__k[0] }), t.then(s, s);
|
|
591
|
-
},
|
|
591
|
+
}, Ue.prototype.componentWillUnmount = function() {
|
|
592
592
|
this.o = [];
|
|
593
|
-
},
|
|
593
|
+
}, Ue.prototype.render = function(t, e) {
|
|
594
594
|
if (this.__b) {
|
|
595
595
|
if (this.__v.__k) {
|
|
596
596
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
597
|
-
this.__v.__k[0] =
|
|
597
|
+
this.__v.__k[0] = Kn(this.__b, n, r.__O = r.__P);
|
|
598
598
|
}
|
|
599
599
|
this.__b = null;
|
|
600
600
|
}
|
|
601
601
|
var i = e.__a && z(M, null, t.fallback);
|
|
602
602
|
return i && (i.__u &= -33), [z(M, null, e.__a ? null : t.children), i];
|
|
603
603
|
};
|
|
604
|
-
var
|
|
604
|
+
var nn = function(t, e, n) {
|
|
605
605
|
if (++n[1] === n[0] && t.l.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.l.size)) for (n = t.i; n; ) {
|
|
606
606
|
for (; n.length > 3; ) n.pop()();
|
|
607
607
|
if (n[1] < n[0]) break;
|
|
608
608
|
t.i = n = n[2];
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
|
-
function
|
|
611
|
+
function Kr(t) {
|
|
612
612
|
return this.getChildContext = function() {
|
|
613
613
|
return t.context;
|
|
614
614
|
}, t.children;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Gr(t) {
|
|
617
617
|
var e = this, n = t.h;
|
|
618
618
|
if (e.componentWillUnmount = function() {
|
|
619
619
|
Z(null, e.v), e.v = null, e.h = null;
|
|
@@ -627,17 +627,17 @@ function Kr(t) {
|
|
|
627
627
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
|
|
628
628
|
} };
|
|
629
629
|
}
|
|
630
|
-
Z(z(
|
|
630
|
+
Z(z(Kr, { context: e.context }, t.__v), e.v);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
var n = z(
|
|
632
|
+
function Xr(t, e) {
|
|
633
|
+
var n = z(Gr, { __v: t, h: e });
|
|
634
634
|
return n.containerInfo = e, n;
|
|
635
635
|
}
|
|
636
636
|
(ve.prototype = new q()).__a = function(t) {
|
|
637
|
-
var e = this, n =
|
|
637
|
+
var e = this, n = Xn(e.__v), r = e.l.get(t);
|
|
638
638
|
return r[0]++, function(i) {
|
|
639
639
|
var o = function() {
|
|
640
|
-
e.props.revealOrder ? (r.push(i),
|
|
640
|
+
e.props.revealOrder ? (r.push(i), nn(e, t, r)) : i();
|
|
641
641
|
};
|
|
642
642
|
n ? n(o) : o();
|
|
643
643
|
};
|
|
@@ -650,17 +650,17 @@ function Gr(t, e) {
|
|
|
650
650
|
}, ve.prototype.componentDidUpdate = ve.prototype.componentDidMount = function() {
|
|
651
651
|
var t = this;
|
|
652
652
|
this.l.forEach(function(e, n) {
|
|
653
|
-
|
|
653
|
+
nn(t, n, e);
|
|
654
654
|
});
|
|
655
655
|
};
|
|
656
|
-
var
|
|
656
|
+
var Yn = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Yr = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Zr = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, ei = /[A-Z0-9]/g, ti = typeof document < "u", ni = function(t) {
|
|
657
657
|
return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
|
|
658
658
|
};
|
|
659
|
-
function
|
|
659
|
+
function ri(t, e, n) {
|
|
660
660
|
return e.__k == null && (e.textContent = ""), Z(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return
|
|
662
|
+
function ii(t, e, n) {
|
|
663
|
+
return Ln(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
664
664
|
}
|
|
665
665
|
q.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
666
666
|
Object.defineProperty(q.prototype, t, { configurable: !0, get: function() {
|
|
@@ -669,82 +669,82 @@ q.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
|
|
|
669
669
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
670
670
|
} });
|
|
671
671
|
});
|
|
672
|
-
var
|
|
673
|
-
function ii() {
|
|
674
|
-
}
|
|
672
|
+
var rn = _.event;
|
|
675
673
|
function oi() {
|
|
676
|
-
return this.cancelBubble;
|
|
677
674
|
}
|
|
678
675
|
function si() {
|
|
676
|
+
return this.cancelBubble;
|
|
677
|
+
}
|
|
678
|
+
function ai() {
|
|
679
679
|
return this.defaultPrevented;
|
|
680
680
|
}
|
|
681
681
|
_.event = function(t) {
|
|
682
|
-
return
|
|
682
|
+
return rn && (t = rn(t)), t.persist = oi, t.isPropagationStopped = si, t.isDefaultPrevented = ai, t.nativeEvent = t;
|
|
683
683
|
};
|
|
684
|
-
var
|
|
684
|
+
var qt, ci = { enumerable: !1, configurable: !0, get: function() {
|
|
685
685
|
return this.class;
|
|
686
|
-
} },
|
|
686
|
+
} }, on = _.vnode;
|
|
687
687
|
_.vnode = function(t) {
|
|
688
688
|
typeof t.type == "string" && (function(e) {
|
|
689
689
|
var n = e.props, r = e.type, i = {}, o = r.indexOf("-") === -1;
|
|
690
690
|
for (var s in n) {
|
|
691
691
|
var a = n[s];
|
|
692
|
-
if (!(s === "value" && "defaultValue" in n && a == null ||
|
|
692
|
+
if (!(s === "value" && "defaultValue" in n && a == null || ti && s === "children" && r === "noscript" || s === "class" || s === "className")) {
|
|
693
693
|
var c = s.toLowerCase();
|
|
694
|
-
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : c === "translate" && a === "no" ? a = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? s = "ondblclick" : c !== "onchange" || r !== "input" && r !== "textarea" ||
|
|
694
|
+
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && a === !0 ? a = "" : c === "translate" && a === "no" ? a = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? s = "ondblclick" : c !== "onchange" || r !== "input" && r !== "textarea" || ni(n.type) ? c === "onfocus" ? s = "onfocusin" : c === "onblur" ? s = "onfocusout" : Zr.test(s) && (s = c) : c = s = "oninput" : o && Yr.test(s) ? s = s.replace(ei, "-$&").toLowerCase() : a === null && (a = void 0), c === "oninput" && i[s = c] && (s = "oninputCapture"), i[s] = a;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
r == "select" && i.multiple && Array.isArray(i.value) && (i.value = D(n.children).forEach(function(u) {
|
|
698
698
|
u.props.selected = i.value.indexOf(u.props.value) != -1;
|
|
699
699
|
})), r == "select" && i.defaultValue != null && (i.value = D(n.children).forEach(function(u) {
|
|
700
700
|
u.props.selected = i.multiple ? i.defaultValue.indexOf(u.props.value) != -1 : i.defaultValue == u.props.value;
|
|
701
|
-
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className",
|
|
702
|
-
})(t), t.$$typeof =
|
|
701
|
+
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", ci)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
|
|
702
|
+
})(t), t.$$typeof = Yn, on && on(t);
|
|
703
703
|
};
|
|
704
|
-
var
|
|
704
|
+
var sn = _.__r;
|
|
705
705
|
_.__r = function(t) {
|
|
706
|
-
|
|
706
|
+
sn && sn(t), qt = t.__c;
|
|
707
707
|
};
|
|
708
|
-
var
|
|
708
|
+
var an = _.diffed;
|
|
709
709
|
_.diffed = function(t) {
|
|
710
|
-
|
|
710
|
+
an && an(t);
|
|
711
711
|
var e = t.props, n = t.__e;
|
|
712
|
-
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value),
|
|
712
|
+
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), qt = null;
|
|
713
713
|
};
|
|
714
|
-
var
|
|
715
|
-
return
|
|
716
|
-
}, useCallback:
|
|
717
|
-
function
|
|
714
|
+
var ui = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
715
|
+
return qt.__n[t.__c].props.value;
|
|
716
|
+
}, useCallback: $t, useContext: Xe, useDebugValue: Fn, useDeferredValue: zn, useEffect: Q, useId: Vn, useImperativeHandle: Qn, useInsertionEffect: Jn, useLayoutEffect: Ie, useMemo: V, useReducer: At, useRef: Ge, useState: I, useSyncExternalStore: Dn, useTransition: Hn } } };
|
|
717
|
+
function li(t) {
|
|
718
718
|
return z.bind(null, t);
|
|
719
719
|
}
|
|
720
720
|
function Ye(t) {
|
|
721
|
-
return !!t && t.$$typeof ===
|
|
722
|
-
}
|
|
723
|
-
function li(t) {
|
|
724
|
-
return Ye(t) && t.type === M;
|
|
721
|
+
return !!t && t.$$typeof === Yn;
|
|
725
722
|
}
|
|
726
723
|
function hi(t) {
|
|
727
|
-
return
|
|
724
|
+
return Ye(t) && t.type === M;
|
|
728
725
|
}
|
|
729
726
|
function di(t) {
|
|
730
|
-
return
|
|
727
|
+
return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
|
|
731
728
|
}
|
|
732
729
|
function fi(t) {
|
|
733
|
-
return
|
|
730
|
+
return Ye(t) ? Nr.apply(null, arguments) : t;
|
|
734
731
|
}
|
|
735
732
|
function pi(t) {
|
|
733
|
+
return !!t.__k && (Z(null, t), !0);
|
|
734
|
+
}
|
|
735
|
+
function gi(t) {
|
|
736
736
|
return t && (t.base || t.nodeType === 1 && t) || null;
|
|
737
737
|
}
|
|
738
|
-
var
|
|
738
|
+
var _i = function(t, e) {
|
|
739
739
|
return t(e);
|
|
740
|
-
},
|
|
740
|
+
}, mi = function(t, e) {
|
|
741
741
|
return t(e);
|
|
742
|
-
},
|
|
743
|
-
for (var oe = 0,
|
|
742
|
+
}, yi = M, vi = Ye, It = { useState: I, useId: Vn, useReducer: At, useEffect: Q, useLayoutEffect: Ie, useInsertionEffect: Jn, useTransition: Hn, useDeferredValue: zn, useSyncExternalStore: Dn, startTransition: Wn, useRef: Ge, useImperativeHandle: Qn, useMemo: V, useCallback: $t, useContext: Xe, useDebugValue: Fn, version: "18.3.1", Children: zr, render: ri, hydrate: ii, unmountComponentAtNode: pi, createPortal: Xr, createElement: z, createContext: Qr, createFactory: li, cloneElement: fi, createRef: Ir, Fragment: M, isValidElement: Ye, isElement: vi, isFragment: hi, isMemo: di, findDOMNode: gi, Component: q, PureComponent: yt, memo: Br, forwardRef: Wr, flushSync: mi, unstable_batchedUpdates: _i, StrictMode: yi, Suspense: Ue, SuspenseList: ve, lazy: Jr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ui }, L = [], E = [], bi = Uint8Array, rt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
743
|
+
for (var oe = 0, xi = rt.length; oe < xi; ++oe)
|
|
744
744
|
L[oe] = rt[oe], E[rt.charCodeAt(oe)] = oe;
|
|
745
745
|
E[45] = 62;
|
|
746
746
|
E[95] = 63;
|
|
747
|
-
function
|
|
747
|
+
function wi(t) {
|
|
748
748
|
var e = t.length;
|
|
749
749
|
if (e % 4 > 0)
|
|
750
750
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -753,27 +753,27 @@ function xi(t) {
|
|
|
753
753
|
var r = n === e ? 0 : 4 - n % 4;
|
|
754
754
|
return [n, r];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function ki(t, e, n) {
|
|
757
757
|
return (e + n) * 3 / 4 - n;
|
|
758
758
|
}
|
|
759
759
|
function Te(t) {
|
|
760
|
-
var e, n =
|
|
760
|
+
var e, n = wi(t), r = n[0], i = n[1], o = new bi(ki(t, r, i)), s = 0, a = i > 0 ? r - 4 : r, c;
|
|
761
761
|
for (c = 0; c < a; c += 4)
|
|
762
762
|
e = E[t.charCodeAt(c)] << 18 | E[t.charCodeAt(c + 1)] << 12 | E[t.charCodeAt(c + 2)] << 6 | E[t.charCodeAt(c + 3)], o[s++] = e >> 16 & 255, o[s++] = e >> 8 & 255, o[s++] = e & 255;
|
|
763
763
|
return i === 2 && (e = E[t.charCodeAt(c)] << 2 | E[t.charCodeAt(c + 1)] >> 4, o[s++] = e & 255), i === 1 && (e = E[t.charCodeAt(c)] << 10 | E[t.charCodeAt(c + 1)] << 4 | E[t.charCodeAt(c + 2)] >> 2, o[s++] = e >> 8 & 255, o[s++] = e & 255), o;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Si(t) {
|
|
766
766
|
return L[t >> 18 & 63] + L[t >> 12 & 63] + L[t >> 6 & 63] + L[t & 63];
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function Ci(t, e, n) {
|
|
769
769
|
for (var r, i = [], o = e; o < n; o += 3)
|
|
770
|
-
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(
|
|
770
|
+
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(Si(r));
|
|
771
771
|
return i.join("");
|
|
772
772
|
}
|
|
773
773
|
function Re(t) {
|
|
774
774
|
for (var e, n = t.length, r = n % 3, i = [], o = 16383, s = 0, a = n - r; s < a; s += o)
|
|
775
775
|
i.push(
|
|
776
|
-
|
|
776
|
+
Ci(
|
|
777
777
|
t,
|
|
778
778
|
s,
|
|
779
779
|
s + o > a ? a : s + o
|
|
@@ -783,16 +783,16 @@ function Re(t) {
|
|
|
783
783
|
L[e >> 10] + L[e >> 4 & 63] + L[e << 2 & 63] + "="
|
|
784
784
|
)), i.join("");
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function B(t) {
|
|
787
787
|
if (t === void 0)
|
|
788
788
|
return {};
|
|
789
|
-
if (!
|
|
789
|
+
if (!Zn(t))
|
|
790
790
|
throw new Error(
|
|
791
791
|
`The arguments to a Convex function must be an object. Received: ${t}`
|
|
792
792
|
);
|
|
793
793
|
return t;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function ji(t) {
|
|
796
796
|
if (typeof t > "u")
|
|
797
797
|
throw new Error(
|
|
798
798
|
"Client created with undefined deployment address. If you used an environment variable, check that it's set."
|
|
@@ -817,46 +817,46 @@ function Ci(t) {
|
|
|
817
817
|
`Invalid deployment address: "${t}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Zn(t) {
|
|
821
821
|
const e = typeof t == "object", n = Object.getPrototypeOf(t), r = n === null || n === Object.prototype || // Objects generated from other contexts (e.g. across Node.js `vm` modules) will not satisfy the previous
|
|
822
822
|
// conditions but are still simple objects.
|
|
823
823
|
n?.constructor?.name === "Object";
|
|
824
824
|
return e && r;
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
function
|
|
826
|
+
const er = !0, le = BigInt("-9223372036854775808"), Mt = BigInt("9223372036854775807"), vt = BigInt("0"), Ti = BigInt("8"), Ri = BigInt("256");
|
|
827
|
+
function tr(t) {
|
|
828
828
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
t <
|
|
830
|
+
function Ai(t) {
|
|
831
|
+
t < vt && (t -= le + le);
|
|
832
832
|
let e = t.toString(16);
|
|
833
833
|
e.length % 2 === 1 && (e = "0" + e);
|
|
834
834
|
const n = new Uint8Array(new ArrayBuffer(8));
|
|
835
835
|
let r = 0;
|
|
836
836
|
for (const i of e.match(/.{2}/g).reverse())
|
|
837
|
-
n.set([parseInt(i, 16)], r++), t >>=
|
|
837
|
+
n.set([parseInt(i, 16)], r++), t >>= Ti;
|
|
838
838
|
return Re(n);
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function $i(t) {
|
|
841
841
|
const e = Te(t);
|
|
842
842
|
if (e.byteLength !== 8)
|
|
843
843
|
throw new Error(
|
|
844
844
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
845
845
|
);
|
|
846
|
-
let n =
|
|
846
|
+
let n = vt, r = vt;
|
|
847
847
|
for (const i of e)
|
|
848
|
-
n += BigInt(i) *
|
|
849
|
-
return n >
|
|
848
|
+
n += BigInt(i) * Ri ** r, r++;
|
|
849
|
+
return n > Mt && (n += le + le), n;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
if (t < le ||
|
|
851
|
+
function Ei(t) {
|
|
852
|
+
if (t < le || Mt < t)
|
|
853
853
|
throw new Error(
|
|
854
854
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
855
855
|
);
|
|
856
856
|
const e = new ArrayBuffer(8);
|
|
857
857
|
return new DataView(e).setBigInt64(0, t, !0), Re(new Uint8Array(e));
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function qi(t) {
|
|
860
860
|
const e = Te(t);
|
|
861
861
|
if (e.byteLength !== 8)
|
|
862
862
|
throw new Error(
|
|
@@ -864,11 +864,11 @@ function Ei(t) {
|
|
|
864
864
|
);
|
|
865
865
|
return new DataView(e.buffer).getBigInt64(0, !0);
|
|
866
866
|
}
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
if (t.length >
|
|
867
|
+
const Ii = DataView.prototype.setBigInt64 ? Ei : Ai, Mi = DataView.prototype.getBigInt64 ? qi : $i, cn = 1024;
|
|
868
|
+
function nr(t) {
|
|
869
|
+
if (t.length > cn)
|
|
870
870
|
throw new Error(
|
|
871
|
-
`Field name ${t} exceeds maximum field name length ${
|
|
871
|
+
`Field name ${t} exceeds maximum field name length ${cn}.`
|
|
872
872
|
);
|
|
873
873
|
if (t.startsWith("$"))
|
|
874
874
|
throw new Error(`Field name ${t} starts with a '$', which is reserved.`);
|
|
@@ -898,7 +898,7 @@ function he(t) {
|
|
|
898
898
|
if (r === "$integer") {
|
|
899
899
|
if (typeof t.$integer != "string")
|
|
900
900
|
throw new Error(`Malformed $integer field on ${t}`);
|
|
901
|
-
return
|
|
901
|
+
return Mi(t.$integer);
|
|
902
902
|
}
|
|
903
903
|
if (r === "$float") {
|
|
904
904
|
if (typeof t.$float != "string")
|
|
@@ -908,8 +908,8 @@ function he(t) {
|
|
|
908
908
|
throw new Error(
|
|
909
909
|
`Received ${i.byteLength} bytes, expected 8 for $float`
|
|
910
910
|
);
|
|
911
|
-
const s = new DataView(i.buffer).getFloat64(0,
|
|
912
|
-
if (!
|
|
911
|
+
const s = new DataView(i.buffer).getFloat64(0, er);
|
|
912
|
+
if (!tr(s))
|
|
913
913
|
throw new Error(`Float ${s} should be encoded as a number`);
|
|
914
914
|
return s;
|
|
915
915
|
}
|
|
@@ -924,21 +924,21 @@ function he(t) {
|
|
|
924
924
|
}
|
|
925
925
|
const n = {};
|
|
926
926
|
for (const [r, i] of Object.entries(t))
|
|
927
|
-
|
|
927
|
+
nr(r), n[r] = he(i);
|
|
928
928
|
return n;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const un = 16384;
|
|
931
931
|
function we(t) {
|
|
932
932
|
const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
|
|
933
|
-
if (e.length >
|
|
933
|
+
if (e.length > un) {
|
|
934
934
|
const n = "[...truncated]";
|
|
935
|
-
let r =
|
|
935
|
+
let r = un - n.length;
|
|
936
936
|
const i = e.codePointAt(r - 1);
|
|
937
937
|
return i !== void 0 && i > 65535 && (r -= 1), e.substring(0, r) + n;
|
|
938
938
|
}
|
|
939
939
|
return e;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function bt(t, e, n, r) {
|
|
942
942
|
if (t === void 0) {
|
|
943
943
|
const s = n && ` (present at path ${n} in original object ${we(
|
|
944
944
|
e
|
|
@@ -950,16 +950,16 @@ function vt(t, e, n, r) {
|
|
|
950
950
|
if (t === null)
|
|
951
951
|
return t;
|
|
952
952
|
if (typeof t == "bigint") {
|
|
953
|
-
if (t < le ||
|
|
953
|
+
if (t < le || Mt < t)
|
|
954
954
|
throw new Error(
|
|
955
955
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
956
956
|
);
|
|
957
|
-
return { $integer:
|
|
957
|
+
return { $integer: Ii(t) };
|
|
958
958
|
}
|
|
959
959
|
if (typeof t == "number")
|
|
960
|
-
if (
|
|
960
|
+
if (tr(t)) {
|
|
961
961
|
const s = new ArrayBuffer(8);
|
|
962
|
-
return new DataView(s).setFloat64(0, t,
|
|
962
|
+
return new DataView(s).setFloat64(0, t, er), { $float: Re(new Uint8Array(s)) };
|
|
963
963
|
} else
|
|
964
964
|
return t;
|
|
965
965
|
if (typeof t == "boolean" || typeof t == "string")
|
|
@@ -968,7 +968,7 @@ function vt(t, e, n, r) {
|
|
|
968
968
|
return { $bytes: Re(new Uint8Array(t)) };
|
|
969
969
|
if (Array.isArray(t))
|
|
970
970
|
return t.map(
|
|
971
|
-
(s, a) =>
|
|
971
|
+
(s, a) => bt(s, e, n + `[${a}]`)
|
|
972
972
|
);
|
|
973
973
|
if (t instanceof Set)
|
|
974
974
|
throw new Error(
|
|
@@ -978,7 +978,7 @@ function vt(t, e, n, r) {
|
|
|
978
978
|
throw new Error(
|
|
979
979
|
it(n, "Map", [...t], e)
|
|
980
980
|
);
|
|
981
|
-
if (!
|
|
981
|
+
if (!Zn(t)) {
|
|
982
982
|
const s = t?.constructor?.name, a = s ? `${s} ` : "";
|
|
983
983
|
throw new Error(
|
|
984
984
|
it(n, a, t, e)
|
|
@@ -987,7 +987,7 @@ function vt(t, e, n, r) {
|
|
|
987
987
|
const i = {}, o = Object.entries(t);
|
|
988
988
|
o.sort(([s, a], [c, u]) => s === c ? 0 : s < c ? -1 : 1);
|
|
989
989
|
for (const [s, a] of o)
|
|
990
|
-
a !== void 0 && (
|
|
990
|
+
a !== void 0 && (nr(s), i[s] = bt(a, e, n + `.${s}`));
|
|
991
991
|
return i;
|
|
992
992
|
}
|
|
993
993
|
function it(t, e, n, r) {
|
|
@@ -1000,22 +1000,22 @@ function it(t, e, n, r) {
|
|
|
1000
1000
|
)} is not a supported Convex type.`;
|
|
1001
1001
|
}
|
|
1002
1002
|
function F(t) {
|
|
1003
|
-
return
|
|
1003
|
+
return bt(t, t, "");
|
|
1004
1004
|
}
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
1007
|
-
class
|
|
1005
|
+
var Pi = Object.defineProperty, Oi = (t, e, n) => e in t ? Pi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ot = (t, e, n) => Oi(t, typeof e != "symbol" ? e + "" : e, n), ln, hn;
|
|
1006
|
+
const Li = /* @__PURE__ */ Symbol.for("ConvexError");
|
|
1007
|
+
class xt extends (hn = Error, ln = Li, hn) {
|
|
1008
1008
|
constructor(e) {
|
|
1009
|
-
super(typeof e == "string" ? e : we(e)), ot(this, "name", "ConvexError"), ot(this, "data"), ot(this,
|
|
1009
|
+
super(typeof e == "string" ? e : we(e)), ot(this, "name", "ConvexError"), ot(this, "data"), ot(this, ln, !0), this.data = e;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
var
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1012
|
+
const rr = () => Array.from({ length: 4 }, () => 0);
|
|
1013
|
+
rr();
|
|
1014
|
+
rr();
|
|
1015
|
+
const dn = "1.33.0";
|
|
1016
|
+
var Ni = Object.defineProperty, Qi = (t, e, n) => e in t ? Ni(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, fn = (t, e, n) => Qi(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1017
|
+
const Fi = "color:rgb(0, 145, 255)";
|
|
1018
|
+
function ir(t) {
|
|
1019
1019
|
switch (t) {
|
|
1020
1020
|
case "query":
|
|
1021
1021
|
return "Q";
|
|
@@ -1027,9 +1027,9 @@ function rr(t) {
|
|
|
1027
1027
|
return "?";
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
class
|
|
1030
|
+
class or {
|
|
1031
1031
|
constructor(e) {
|
|
1032
|
-
|
|
1032
|
+
fn(this, "_onLogLineFuncs"), fn(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
1033
1033
|
}
|
|
1034
1034
|
addLogLineListener(e) {
|
|
1035
1035
|
let n = Math.random().toString(36).substring(2, 15);
|
|
@@ -1057,8 +1057,8 @@ class ir {
|
|
|
1057
1057
|
n("error", ...e);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const e = new
|
|
1060
|
+
function sr(t) {
|
|
1061
|
+
const e = new or(t);
|
|
1062
1062
|
return e.addLogLineListener((n, ...r) => {
|
|
1063
1063
|
switch (n) {
|
|
1064
1064
|
case "debug":
|
|
@@ -1078,11 +1078,11 @@ function or(t) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}), e;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return new
|
|
1081
|
+
function ar(t) {
|
|
1082
|
+
return new or(t);
|
|
1083
1083
|
}
|
|
1084
1084
|
function We(t, e, n, r, i) {
|
|
1085
|
-
const o =
|
|
1085
|
+
const o = ir(n);
|
|
1086
1086
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), e === "info") {
|
|
1087
1087
|
const s = i.match(/^\[.*?\] /);
|
|
1088
1088
|
if (s === null) {
|
|
@@ -1092,19 +1092,19 @@ function We(t, e, n, r, i) {
|
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
1094
|
const a = i.slice(1, s[0].length - 2), c = i.slice(s[0].length);
|
|
1095
|
-
t.log(`%c[CONVEX ${o}(${r})] [${a}]`,
|
|
1095
|
+
t.log(`%c[CONVEX ${o}(${r})] [${a}]`, Fi, c);
|
|
1096
1096
|
} else
|
|
1097
1097
|
t.error(`[CONVEX ${o}(${r})] ${i}`);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function Vi(t, e) {
|
|
1100
1100
|
const n = `[CONVEX FATAL ERROR] ${e}`;
|
|
1101
1101
|
return t.error(n), new Error(n);
|
|
1102
1102
|
}
|
|
1103
1103
|
function ae(t, e, n) {
|
|
1104
|
-
return `[CONVEX ${
|
|
1104
|
+
return `[CONVEX ${ir(t)}(${e})] ${n.errorMessage}
|
|
1105
1105
|
Called by client`;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function wt(t, e) {
|
|
1108
1108
|
return e.data = t.errorData, e;
|
|
1109
1109
|
}
|
|
1110
1110
|
function ee(t) {
|
|
@@ -1118,7 +1118,7 @@ function Y(t, e) {
|
|
|
1118
1118
|
args: F(e)
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function pn(t, e, n) {
|
|
1122
1122
|
const { initialNumItems: r, id: i } = n;
|
|
1123
1123
|
return JSON.stringify({
|
|
1124
1124
|
type: "paginated",
|
|
@@ -1127,8 +1127,8 @@ function fn(t, e, n) {
|
|
|
1127
1127
|
options: F({ initialNumItems: r, id: i })
|
|
1128
1128
|
});
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1131
|
-
class
|
|
1130
|
+
var Ui = Object.defineProperty, Bi = (t, e, n) => e in t ? Ui(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, O = (t, e, n) => Bi(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1131
|
+
class Di {
|
|
1132
1132
|
constructor() {
|
|
1133
1133
|
O(this, "nextQueryId"), O(this, "querySetVersion"), O(this, "querySet"), O(this, "queryIdToToken"), O(this, "identityVersion"), O(this, "auth"), O(this, "outstandingQueriesOlderThanRestart"), O(this, "outstandingAuthOlderThanRestart"), O(this, "paused"), O(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
1134
1134
|
}
|
|
@@ -1333,8 +1333,8 @@ class Ui {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1337
|
-
class
|
|
1336
|
+
var Wi = Object.defineProperty, zi = (t, e, n) => e in t ? Wi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ne = (t, e, n) => zi(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1337
|
+
class Hi {
|
|
1338
1338
|
constructor(e, n) {
|
|
1339
1339
|
this.logger = e, this.markConnectionStateDirty = n, Ne(this, "inflightRequests"), Ne(this, "requestsOlderThanRestart"), Ne(this, "inflightMutationsCount", 0), Ne(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
1340
1340
|
}
|
|
@@ -1470,21 +1470,21 @@ class zi {
|
|
|
1470
1470
|
return this.inflightActionsCount;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
const Ae = /* @__PURE__ */ Symbol.for("functionName"),
|
|
1474
|
-
function Hi(t) {
|
|
1475
|
-
return t[ar] ?? null;
|
|
1476
|
-
}
|
|
1473
|
+
const Ae = /* @__PURE__ */ Symbol.for("functionName"), cr = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
1477
1474
|
function Ji(t) {
|
|
1478
|
-
return t
|
|
1475
|
+
return t[cr] ?? null;
|
|
1479
1476
|
}
|
|
1480
1477
|
function Ki(t) {
|
|
1478
|
+
return t.startsWith("function://");
|
|
1479
|
+
}
|
|
1480
|
+
function Gi(t) {
|
|
1481
1481
|
let e;
|
|
1482
1482
|
if (typeof t == "string")
|
|
1483
|
-
|
|
1483
|
+
Ki(t) ? e = { functionHandle: t } : e = { name: t };
|
|
1484
1484
|
else if (t[Ae])
|
|
1485
1485
|
e = { name: t[Ae] };
|
|
1486
1486
|
else {
|
|
1487
|
-
const n =
|
|
1487
|
+
const n = Ji(t);
|
|
1488
1488
|
if (!n)
|
|
1489
1489
|
throw new Error(`${t} is not a functionReference`);
|
|
1490
1490
|
e = { reference: n };
|
|
@@ -1492,7 +1492,7 @@ function Ki(t) {
|
|
|
1492
1492
|
return e;
|
|
1493
1493
|
}
|
|
1494
1494
|
function A(t) {
|
|
1495
|
-
const e =
|
|
1495
|
+
const e = Gi(t);
|
|
1496
1496
|
if (e.name === void 0)
|
|
1497
1497
|
throw e.functionHandle !== void 0 ? new Error(
|
|
1498
1498
|
`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
|
|
@@ -1507,15 +1507,15 @@ function A(t) {
|
|
|
1507
1507
|
throw new Error(`${t} is not a functionReference`);
|
|
1508
1508
|
return n;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function ur(t) {
|
|
1511
1511
|
return { [Ae]: t };
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function lr(t = []) {
|
|
1514
1514
|
const e = {
|
|
1515
1515
|
get(n, r) {
|
|
1516
1516
|
if (typeof r == "string") {
|
|
1517
1517
|
const i = [...t, r];
|
|
1518
|
-
return
|
|
1518
|
+
return lr(i);
|
|
1519
1519
|
} else if (r === Ae) {
|
|
1520
1520
|
if (t.length < 2) {
|
|
1521
1521
|
const s = ["api", ...t].join(".");
|
|
@@ -1530,14 +1530,14 @@ function ur(t = []) {
|
|
|
1530
1530
|
};
|
|
1531
1531
|
return new Proxy({}, e);
|
|
1532
1532
|
}
|
|
1533
|
-
const
|
|
1534
|
-
var
|
|
1533
|
+
const Xi = lr();
|
|
1534
|
+
var Yi = Object.defineProperty, Zi = (t, e, n) => e in t ? Yi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ze = (t, e, n) => Zi(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1535
1535
|
class $e {
|
|
1536
1536
|
constructor(e) {
|
|
1537
1537
|
ze(this, "queryResults"), ze(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
1538
1538
|
}
|
|
1539
1539
|
getQuery(e, ...n) {
|
|
1540
|
-
const r =
|
|
1540
|
+
const r = B(n[0]), i = A(e), o = this.queryResults.get(
|
|
1541
1541
|
Y(i, r)
|
|
1542
1542
|
);
|
|
1543
1543
|
if (o !== void 0)
|
|
@@ -1553,7 +1553,7 @@ class $e {
|
|
|
1553
1553
|
return n;
|
|
1554
1554
|
}
|
|
1555
1555
|
setQuery(e, n, r) {
|
|
1556
|
-
const i =
|
|
1556
|
+
const i = B(n), o = A(e), s = Y(o, i);
|
|
1557
1557
|
let a;
|
|
1558
1558
|
r === void 0 ? a = void 0 : a = {
|
|
1559
1559
|
success: !0,
|
|
@@ -1573,7 +1573,7 @@ class $e {
|
|
|
1573
1573
|
return e.success ? e.value : void 0;
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
|
-
class
|
|
1576
|
+
class eo {
|
|
1577
1577
|
constructor() {
|
|
1578
1578
|
ze(this, "queryResults"), ze(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1579
1579
|
}
|
|
@@ -1621,9 +1621,9 @@ class Zi {
|
|
|
1621
1621
|
if (r !== void 0) {
|
|
1622
1622
|
if (r.success)
|
|
1623
1623
|
return r.value;
|
|
1624
|
-
throw r.errorData !== void 0 ?
|
|
1624
|
+
throw r.errorData !== void 0 ? wt(
|
|
1625
1625
|
r,
|
|
1626
|
-
new
|
|
1626
|
+
new xt(
|
|
1627
1627
|
ae("query", n.udfPath, r)
|
|
1628
1628
|
)
|
|
1629
1629
|
) : new Error(
|
|
@@ -1641,7 +1641,7 @@ class Zi {
|
|
|
1641
1641
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1644
|
+
var to = Object.defineProperty, no = (t, e, n) => e in t ? to(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, st = (t, e, n) => no(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1645
1645
|
class T {
|
|
1646
1646
|
constructor(e, n) {
|
|
1647
1647
|
st(this, "low"), st(this, "high"), st(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
|
|
@@ -1671,7 +1671,7 @@ class T {
|
|
|
1671
1671
|
];
|
|
1672
1672
|
}
|
|
1673
1673
|
static fromNumber(e) {
|
|
1674
|
-
return isNaN(e) || e < 0 ?
|
|
1674
|
+
return isNaN(e) || e < 0 ? gn : e >= ro ? io : new T(e % ke | 0, e / ke | 0);
|
|
1675
1675
|
}
|
|
1676
1676
|
toString() {
|
|
1677
1677
|
return (BigInt(this.high) * BigInt(ke) + BigInt(this.low)).toString();
|
|
@@ -1695,9 +1695,9 @@ class T {
|
|
|
1695
1695
|
return typeof e == "number" ? T.fromNumber(e) : new T(e.low, e.high);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
const
|
|
1699
|
-
var
|
|
1700
|
-
class
|
|
1698
|
+
const gn = new T(0, 0), _n = 65536, ke = _n * _n, ro = ke * ke, io = new T(-1, -1);
|
|
1699
|
+
var oo = Object.defineProperty, so = (t, e, n) => e in t ? oo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Qe = (t, e, n) => so(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1700
|
+
class mn {
|
|
1701
1701
|
constructor(e, n) {
|
|
1702
1702
|
Qe(this, "version"), Qe(this, "remoteQuerySet"), Qe(this, "queryPath"), Qe(this, "logger"), this.version = { querySet: 0, ts: T.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
|
|
1703
1703
|
}
|
|
@@ -1756,11 +1756,11 @@ function at(t) {
|
|
|
1756
1756
|
const e = Te(t);
|
|
1757
1757
|
return T.fromBytesLE(Array.from(e));
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function ao(t) {
|
|
1760
1760
|
const e = new Uint8Array(t.toBytesLE());
|
|
1761
1761
|
return Re(e);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function yn(t) {
|
|
1764
1764
|
switch (t.type) {
|
|
1765
1765
|
case "FatalError":
|
|
1766
1766
|
case "AuthError":
|
|
@@ -1784,7 +1784,7 @@ function mn(t) {
|
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function co(t) {
|
|
1788
1788
|
switch (t.type) {
|
|
1789
1789
|
case "Authenticate":
|
|
1790
1790
|
case "ModifyQuerySet":
|
|
@@ -1795,20 +1795,20 @@ function ao(t) {
|
|
|
1795
1795
|
case "Connect":
|
|
1796
1796
|
return t.maxObservedTimestamp !== void 0 ? {
|
|
1797
1797
|
...t,
|
|
1798
|
-
maxObservedTimestamp:
|
|
1798
|
+
maxObservedTimestamp: ao(t.maxObservedTimestamp)
|
|
1799
1799
|
} : { ...t, maxObservedTimestamp: void 0 };
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1803
|
-
const
|
|
1804
|
-
let
|
|
1802
|
+
var uo = Object.defineProperty, lo = (t, e, n) => e in t ? uo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, k = (t, e, n) => lo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1803
|
+
const ho = 1e3, fo = 1001, po = 1005, go = 4040;
|
|
1804
|
+
let Be;
|
|
1805
1805
|
function se() {
|
|
1806
|
-
return
|
|
1806
|
+
return Be === void 0 && (Be = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(Be + performance.now());
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1809
|
-
return `t=${Math.round((se() -
|
|
1808
|
+
function vn() {
|
|
1809
|
+
return `t=${Math.round((se() - Be) / 100) / 10}s`;
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1811
|
+
const hr = {
|
|
1812
1812
|
// A known error, e.g. during a restart or push
|
|
1813
1813
|
InternalServerError: { timeout: 1e3 },
|
|
1814
1814
|
// ErrorMetadata::overloaded() messages that we realy should back off
|
|
@@ -1828,16 +1828,16 @@ const lr = {
|
|
|
1828
1828
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1829
1829
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1830
1830
|
};
|
|
1831
|
-
function
|
|
1831
|
+
function _o(t) {
|
|
1832
1832
|
if (t === void 0) return "Unknown";
|
|
1833
1833
|
for (const e of Object.keys(
|
|
1834
|
-
|
|
1834
|
+
hr
|
|
1835
1835
|
))
|
|
1836
1836
|
if (t.startsWith(e))
|
|
1837
1837
|
return e;
|
|
1838
1838
|
return "Unknown";
|
|
1839
1839
|
}
|
|
1840
|
-
class
|
|
1840
|
+
class mo {
|
|
1841
1841
|
constructor(e, n, r, i, o, s) {
|
|
1842
1842
|
this.markConnectionStateDirty = o, this.debug = s, k(this, "socket"), k(this, "connectionCount"), k(this, "_hasEverConnected", !1), k(this, "lastCloseReason"), k(this, "transitionChunkBuffer", null), k(this, "defaultInitialBackoff"), k(this, "maxBackoff"), k(this, "retries"), k(this, "serverInactivityThreshold"), k(this, "reconnectDueToServerInactivityTimeout"), k(this, "scheduledReconnect", null), k(this, "networkOnlineHandler", null), k(this, "pendingNetworkRecoveryInfo", null), k(this, "uri"), k(this, "onOpen"), k(this, "onResume"), k(this, "onMessage"), k(this, "webSocketConstructor"), k(this, "logger"), k(this, "onServerDisconnectError"), this.webSocketConstructor = r, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = n.onOpen, this.onResume = n.onResume, this.onMessage = n.onMessage, this.onServerDisconnectError = n.onServerDisconnectError, this.logger = i, this.setupNetworkListener(), this.connect();
|
|
1843
1843
|
}
|
|
@@ -1870,7 +1870,7 @@ class _o {
|
|
|
1870
1870
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1871
1871
|
const n = this.transitionChunkBuffer.chunks.join("");
|
|
1872
1872
|
this.transitionChunkBuffer = null;
|
|
1873
|
-
const r =
|
|
1873
|
+
const r = yn(JSON.parse(n));
|
|
1874
1874
|
if (r.type !== "Transition")
|
|
1875
1875
|
throw new Error(
|
|
1876
1876
|
`Expected Transition, got ${r.type} after assembling chunks`
|
|
@@ -1904,10 +1904,10 @@ class _o {
|
|
|
1904
1904
|
clientTs: se()
|
|
1905
1905
|
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
|
|
1906
1906
|
"WebSocket reconnected at",
|
|
1907
|
-
|
|
1907
|
+
vn(),
|
|
1908
1908
|
"after disconnect due to",
|
|
1909
1909
|
this.lastCloseReason
|
|
1910
|
-
) : this.logger.log("WebSocket reconnected at",
|
|
1910
|
+
) : this.logger.log("WebSocket reconnected at", vn())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1911
1911
|
const { timeSavedMs: n } = this.pendingNetworkRecoveryInfo;
|
|
1912
1912
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1913
1913
|
type: "Event",
|
|
@@ -1924,7 +1924,7 @@ class _o {
|
|
|
1924
1924
|
}, e.onmessage = (n) => {
|
|
1925
1925
|
this.resetServerInactivityTimeout();
|
|
1926
1926
|
const r = n.data.length;
|
|
1927
|
-
let i =
|
|
1927
|
+
let i = yn(JSON.parse(n.data));
|
|
1928
1928
|
if (this._logVerbose(`received ws message with type ${i.type}`), i.type === "Ping")
|
|
1929
1929
|
return;
|
|
1930
1930
|
if (i.type === "TransitionChunk") {
|
|
@@ -1942,12 +1942,12 @@ class _o {
|
|
|
1942
1942
|
transition: i
|
|
1943
1943
|
}), this.onMessage(i).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1944
1944
|
}, e.onclose = (n) => {
|
|
1945
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !==
|
|
1946
|
-
n.code !==
|
|
1945
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== ho && n.code !== fo && // This commonly gets fired on mobile apps when the app is backgrounded
|
|
1946
|
+
n.code !== po && n.code !== go) {
|
|
1947
1947
|
let i = `WebSocket closed with code ${n.code}`;
|
|
1948
1948
|
n.reason && (i += `: ${n.reason}`), this.logger.log(i), this.onServerDisconnectError && n.reason && this.onServerDisconnectError(i);
|
|
1949
1949
|
}
|
|
1950
|
-
const r =
|
|
1950
|
+
const r = _o(n.reason);
|
|
1951
1951
|
this.scheduleReconnect(r);
|
|
1952
1952
|
};
|
|
1953
1953
|
}
|
|
@@ -1969,7 +1969,7 @@ class _o {
|
|
|
1969
1969
|
} : {}
|
|
1970
1970
|
};
|
|
1971
1971
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1972
|
-
const r =
|
|
1972
|
+
const r = co(e), i = JSON.stringify(r);
|
|
1973
1973
|
let o = !1;
|
|
1974
1974
|
try {
|
|
1975
1975
|
this.socket.ws.send(i), o = !0;
|
|
@@ -2199,7 +2199,7 @@ class _o {
|
|
|
2199
2199
|
this.logger.logVerbose(e);
|
|
2200
2200
|
}
|
|
2201
2201
|
nextBackoff(e) {
|
|
2202
|
-
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
2202
|
+
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : hr[e].timeout) * Math.pow(2, this.retries);
|
|
2203
2203
|
this.retries += 1;
|
|
2204
2204
|
const i = Math.min(r, this.maxBackoff), o = i * (Math.random() - 0.5);
|
|
2205
2205
|
return i + o;
|
|
@@ -2228,10 +2228,10 @@ class _o {
|
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
function mo() {
|
|
2232
|
-
return yo();
|
|
2233
|
-
}
|
|
2234
2231
|
function yo() {
|
|
2232
|
+
return vo();
|
|
2233
|
+
}
|
|
2234
|
+
function vo() {
|
|
2235
2235
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
2236
2236
|
const e = Math.random() * 16 | 0;
|
|
2237
2237
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
@@ -2240,7 +2240,7 @@ function yo() {
|
|
|
2240
2240
|
class be extends Error {
|
|
2241
2241
|
}
|
|
2242
2242
|
be.prototype.name = "InvalidTokenError";
|
|
2243
|
-
function
|
|
2243
|
+
function bo(t) {
|
|
2244
2244
|
return decodeURIComponent(
|
|
2245
2245
|
atob(t).replace(/(.)/g, (e, n) => {
|
|
2246
2246
|
let r = n.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -2248,7 +2248,7 @@ function vo(t) {
|
|
|
2248
2248
|
})
|
|
2249
2249
|
);
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function xo(t) {
|
|
2252
2252
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2253
2253
|
switch (e.length % 4) {
|
|
2254
2254
|
case 0:
|
|
@@ -2263,12 +2263,12 @@ function bo(t) {
|
|
|
2263
2263
|
throw new Error("base64 string is not of the correct length");
|
|
2264
2264
|
}
|
|
2265
2265
|
try {
|
|
2266
|
-
return
|
|
2266
|
+
return bo(e);
|
|
2267
2267
|
} catch {
|
|
2268
2268
|
return atob(e);
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function dr(t, e) {
|
|
2272
2272
|
if (typeof t != "string")
|
|
2273
2273
|
throw new be("Invalid token specified: must be a string");
|
|
2274
2274
|
e || (e = {});
|
|
@@ -2279,7 +2279,7 @@ function hr(t, e) {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
let i;
|
|
2281
2281
|
try {
|
|
2282
|
-
i =
|
|
2282
|
+
i = xo(r);
|
|
2283
2283
|
} catch (o) {
|
|
2284
2284
|
throw new be(
|
|
2285
2285
|
`Invalid token specified: invalid base64 for part #${n + 1} (${o.message})`
|
|
@@ -2293,9 +2293,9 @@ function hr(t, e) {
|
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
|
-
var
|
|
2297
|
-
const
|
|
2298
|
-
class
|
|
2296
|
+
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, $ = (t, e, n) => ko(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2297
|
+
const So = 480 * 60 * 60 * 1e3, bn = 2;
|
|
2298
|
+
class Co {
|
|
2299
2299
|
constructor(e, n, r) {
|
|
2300
2300
|
$(this, "authState", { state: "noAuth" }), $(this, "configVersion", 0), $(this, "syncState"), $(this, "authenticate"), $(this, "stopSocket"), $(this, "tryRestartSocket"), $(this, "pauseSocket"), $(this, "resumeSocket"), $(this, "clearAuth"), $(this, "logger"), $(this, "refreshTokenLeewaySeconds"), $(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = n.authenticate, this.stopSocket = n.stopSocket, this.tryRestartSocket = n.tryRestartSocket, this.pauseSocket = n.pauseSocket, this.resumeSocket = n.resumeSocket, this.clearAuth = n.clearAuth, this.logger = r.logger, this.refreshTokenLeewaySeconds = r.refreshTokenLeewaySeconds;
|
|
2301
2301
|
}
|
|
@@ -2344,14 +2344,14 @@ class So {
|
|
|
2344
2344
|
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), // No way to fetch another token, kaboom
|
|
2345
2345
|
this.authState.state === "noAuth" || // We failed on a fresh token. After a small number of retries, we give up
|
|
2346
2346
|
// and clear the auth state to avoid infinite retries.
|
|
2347
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
2347
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= bn) {
|
|
2348
2348
|
this.logger.error(
|
|
2349
2349
|
`Failed to authenticate: "${e.error}", check your server auth config`
|
|
2350
2350
|
), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
2351
2351
|
return;
|
|
2352
2352
|
}
|
|
2353
2353
|
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(
|
|
2354
|
-
`retrying reauthentication, ${
|
|
2354
|
+
`retrying reauthentication, ${bn - this.tokenConfirmationAttempts} attempts remaining`
|
|
2355
2355
|
)), await this.stopSocket();
|
|
2356
2356
|
const n = await this.fetchTokenAndGuardAgainstRace(
|
|
2357
2357
|
this.authState.config.fetchToken,
|
|
@@ -2416,7 +2416,7 @@ class So {
|
|
|
2416
2416
|
return;
|
|
2417
2417
|
}
|
|
2418
2418
|
let s = Math.min(
|
|
2419
|
-
|
|
2419
|
+
So,
|
|
2420
2420
|
(o - this.refreshTokenLeewaySeconds) * 1e3
|
|
2421
2421
|
);
|
|
2422
2422
|
s <= 0 && (this.logger.warn(
|
|
@@ -2473,7 +2473,7 @@ class So {
|
|
|
2473
2473
|
}
|
|
2474
2474
|
decodeToken(e) {
|
|
2475
2475
|
try {
|
|
2476
|
-
return
|
|
2476
|
+
return dr(e);
|
|
2477
2477
|
} catch (n) {
|
|
2478
2478
|
return this._logVerbose(
|
|
2479
2479
|
`Error decoding token: ${n instanceof Error ? n.message : "Unknown error"}`
|
|
@@ -2484,34 +2484,34 @@ class So {
|
|
|
2484
2484
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
2485
2485
|
}
|
|
2486
2486
|
}
|
|
2487
|
-
const
|
|
2487
|
+
const jo = [
|
|
2488
2488
|
"convexClientConstructed",
|
|
2489
2489
|
"convexWebSocketOpen",
|
|
2490
2490
|
"convexFirstMessageReceived"
|
|
2491
2491
|
];
|
|
2492
|
-
function
|
|
2492
|
+
function To(t, e) {
|
|
2493
2493
|
const n = { sessionId: e };
|
|
2494
2494
|
typeof performance > "u" || !performance.mark || performance.mark(t, { detail: n });
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2496
|
+
function Ro(t) {
|
|
2497
2497
|
let e = t.name.slice(6);
|
|
2498
2498
|
return e = e.charAt(0).toLowerCase() + e.slice(1), {
|
|
2499
2499
|
name: e,
|
|
2500
2500
|
startTime: t.startTime
|
|
2501
2501
|
};
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function Ao(t) {
|
|
2504
2504
|
if (typeof performance > "u" || !performance.getEntriesByName)
|
|
2505
2505
|
return [];
|
|
2506
2506
|
const e = [];
|
|
2507
|
-
for (const n of
|
|
2507
|
+
for (const n of jo) {
|
|
2508
2508
|
const r = performance.getEntriesByName(n).filter((i) => i.entryType === "mark").filter((i) => i.detail.sessionId === t);
|
|
2509
2509
|
e.push(...r);
|
|
2510
2510
|
}
|
|
2511
|
-
return e.map(
|
|
2511
|
+
return e.map(Ro);
|
|
2512
2512
|
}
|
|
2513
|
-
var
|
|
2514
|
-
class
|
|
2513
|
+
var $o = Object.defineProperty, Eo = (t, e, n) => e in t ? $o(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, S = (t, e, n) => Eo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2514
|
+
class qo {
|
|
2515
2515
|
/**
|
|
2516
2516
|
* @param address - The url of your Convex deployment, often provided
|
|
2517
2517
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -2531,19 +2531,19 @@ class Eo {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
});
|
|
2533
2533
|
}), S(this, "mark", (d) => {
|
|
2534
|
-
this.debug &&
|
|
2534
|
+
this.debug && To(d, this.sessionId);
|
|
2535
2535
|
}), typeof e == "object")
|
|
2536
2536
|
throw new Error(
|
|
2537
2537
|
"Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly."
|
|
2538
2538
|
);
|
|
2539
|
-
r?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2539
|
+
r?.skipConvexDeploymentUrlCheck !== !0 && ji(e), r = { ...r };
|
|
2540
2540
|
const i = r.authRefreshTokenLeewaySeconds ?? 10;
|
|
2541
2541
|
let o = r.webSocketConstructor;
|
|
2542
2542
|
if (!o && typeof WebSocket > "u")
|
|
2543
2543
|
throw new Error(
|
|
2544
2544
|
"No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient"
|
|
2545
2545
|
);
|
|
2546
|
-
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ?
|
|
2546
|
+
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? ar({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : sr({ verbose: r.verbose ?? !1 });
|
|
2547
2547
|
const s = e.search("://");
|
|
2548
2548
|
if (s === -1)
|
|
2549
2549
|
throw new Error("Provided address was not an absolute URL.");
|
|
@@ -2555,18 +2555,18 @@ class Eo {
|
|
|
2555
2555
|
u = "wss";
|
|
2556
2556
|
else
|
|
2557
2557
|
throw new Error(`Unknown parent protocol ${c}`);
|
|
2558
|
-
const f = `${u}://${a}/api/${
|
|
2559
|
-
this.state = new
|
|
2558
|
+
const f = `${u}://${a}/api/${dn}/sync`;
|
|
2559
|
+
this.state = new Di(), this.remoteQuerySet = new mn(
|
|
2560
2560
|
(d) => this.state.queryPath(d),
|
|
2561
2561
|
this.logger
|
|
2562
|
-
), this.requestManager = new
|
|
2562
|
+
), this.requestManager = new Hi(
|
|
2563
2563
|
this.logger,
|
|
2564
2564
|
this.markConnectionStateDirty
|
|
2565
2565
|
);
|
|
2566
2566
|
const l = () => {
|
|
2567
2567
|
this.webSocketManager.pause(), this.state.pause();
|
|
2568
2568
|
};
|
|
2569
|
-
this.authenticationManager = new
|
|
2569
|
+
this.authenticationManager = new Co(
|
|
2570
2570
|
this.state,
|
|
2571
2571
|
{
|
|
2572
2572
|
authenticate: (d) => {
|
|
@@ -2585,9 +2585,9 @@ class Eo {
|
|
|
2585
2585
|
logger: this.logger,
|
|
2586
2586
|
refreshTokenLeewaySeconds: i
|
|
2587
2587
|
}
|
|
2588
|
-
), this.optimisticQueryResults = new
|
|
2588
|
+
), this.optimisticQueryResults = new eo(), this.addOnTransitionHandler((d) => {
|
|
2589
2589
|
n(d.queries.map((p) => p.token));
|
|
2590
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2590
|
+
}), this._nextRequestId = 0, this._sessionId = yo();
|
|
2591
2591
|
const { unsavedChangesWarning: g } = r;
|
|
2592
2592
|
if (typeof window > "u" || typeof window.addEventListener > "u") {
|
|
2593
2593
|
if (g === !0)
|
|
@@ -2601,7 +2601,7 @@ class Eo {
|
|
|
2601
2601
|
return (d || window.event).returnValue = p, p;
|
|
2602
2602
|
}
|
|
2603
2603
|
});
|
|
2604
|
-
this.webSocketManager = new
|
|
2604
|
+
this.webSocketManager = new mo(
|
|
2605
2605
|
f,
|
|
2606
2606
|
{
|
|
2607
2607
|
onOpen: (d) => {
|
|
@@ -2614,7 +2614,7 @@ class Eo {
|
|
|
2614
2614
|
const p = new Set(
|
|
2615
2615
|
this.remoteQuerySet.remoteQueryResults().keys()
|
|
2616
2616
|
);
|
|
2617
|
-
this.remoteQuerySet = new
|
|
2617
|
+
this.remoteQuerySet = new mn(
|
|
2618
2618
|
(m) => this.state.queryPath(m),
|
|
2619
2619
|
this.logger
|
|
2620
2620
|
);
|
|
@@ -2663,7 +2663,7 @@ class Eo {
|
|
|
2663
2663
|
break;
|
|
2664
2664
|
}
|
|
2665
2665
|
case "FatalError": {
|
|
2666
|
-
const p =
|
|
2666
|
+
const p = Vi(this.logger, d.error);
|
|
2667
2667
|
throw this.webSocketManager.terminate(), p;
|
|
2668
2668
|
}
|
|
2669
2669
|
}
|
|
@@ -2763,7 +2763,7 @@ class Eo {
|
|
|
2763
2763
|
let n = {};
|
|
2764
2764
|
if (e && e.tokenType === "User")
|
|
2765
2765
|
try {
|
|
2766
|
-
n = e ?
|
|
2766
|
+
n = e ? dr(e.value) : {};
|
|
2767
2767
|
} catch {
|
|
2768
2768
|
n = {};
|
|
2769
2769
|
}
|
|
@@ -2809,7 +2809,7 @@ class Eo {
|
|
|
2809
2809
|
* query and an `unsubscribe` callback.
|
|
2810
2810
|
*/
|
|
2811
2811
|
subscribe(e, n, r) {
|
|
2812
|
-
const i =
|
|
2812
|
+
const i = B(n), { modification: o, queryToken: s, unsubscribe: a } = this.state.subscribe(
|
|
2813
2813
|
e,
|
|
2814
2814
|
i,
|
|
2815
2815
|
r?.journal,
|
|
@@ -2830,7 +2830,7 @@ class Eo {
|
|
|
2830
2830
|
* query or its value has been set optimistically.
|
|
2831
2831
|
*/
|
|
2832
2832
|
localQueryResult(e, n) {
|
|
2833
|
-
const r =
|
|
2833
|
+
const r = B(n), i = Y(e, r);
|
|
2834
2834
|
return this.optimisticQueryResults.queryResult(i);
|
|
2835
2835
|
}
|
|
2836
2836
|
/**
|
|
@@ -2858,7 +2858,7 @@ class Eo {
|
|
|
2858
2858
|
* @internal
|
|
2859
2859
|
*/
|
|
2860
2860
|
localQueryLogs(e, n) {
|
|
2861
|
-
const r =
|
|
2861
|
+
const r = B(n), i = Y(e, r);
|
|
2862
2862
|
return this.optimisticQueryResults.queryLogs(i);
|
|
2863
2863
|
}
|
|
2864
2864
|
/**
|
|
@@ -2871,7 +2871,7 @@ class Eo {
|
|
|
2871
2871
|
* @returns The query's {@link QueryJournal} or `undefined`.
|
|
2872
2872
|
*/
|
|
2873
2873
|
queryJournal(e, n) {
|
|
2874
|
-
const r =
|
|
2874
|
+
const r = B(n), i = Y(e, r);
|
|
2875
2875
|
return this.state.queryJournal(i);
|
|
2876
2876
|
}
|
|
2877
2877
|
/**
|
|
@@ -2922,9 +2922,9 @@ class Eo {
|
|
|
2922
2922
|
async mutation(e, n, r) {
|
|
2923
2923
|
const i = await this.mutationInternal(e, n, r);
|
|
2924
2924
|
if (!i.success)
|
|
2925
|
-
throw i.errorData !== void 0 ?
|
|
2925
|
+
throw i.errorData !== void 0 ? wt(
|
|
2926
2926
|
i,
|
|
2927
|
-
new
|
|
2927
|
+
new xt(
|
|
2928
2928
|
ae("mutation", e, i)
|
|
2929
2929
|
)
|
|
2930
2930
|
) : new Error(ae("mutation", e, i));
|
|
@@ -2946,7 +2946,7 @@ class Eo {
|
|
|
2946
2946
|
* @internal
|
|
2947
2947
|
*/
|
|
2948
2948
|
enqueueMutation(e, n, r, i) {
|
|
2949
|
-
const o =
|
|
2949
|
+
const o = B(n);
|
|
2950
2950
|
this.tryReportLongDisconnect();
|
|
2951
2951
|
const s = this.nextRequestId;
|
|
2952
2952
|
if (this._nextRequestId++, r !== void 0) {
|
|
@@ -3006,9 +3006,9 @@ class Eo {
|
|
|
3006
3006
|
async action(e, n) {
|
|
3007
3007
|
const r = await this.actionInternal(e, n);
|
|
3008
3008
|
if (!r.success)
|
|
3009
|
-
throw r.errorData !== void 0 ?
|
|
3009
|
+
throw r.errorData !== void 0 ? wt(
|
|
3010
3010
|
r,
|
|
3011
|
-
new
|
|
3011
|
+
new xt(ae("action", e, r))
|
|
3012
3012
|
) : new Error(ae("action", e, r));
|
|
3013
3013
|
return r.value;
|
|
3014
3014
|
}
|
|
@@ -3016,7 +3016,7 @@ class Eo {
|
|
|
3016
3016
|
* @internal
|
|
3017
3017
|
*/
|
|
3018
3018
|
async actionInternal(e, n, r) {
|
|
3019
|
-
const i =
|
|
3019
|
+
const i = B(n), o = this.nextRequestId;
|
|
3020
3020
|
this._nextRequestId++, this.tryReportLongDisconnect();
|
|
3021
3021
|
const s = {
|
|
3022
3022
|
type: "Action",
|
|
@@ -3065,7 +3065,7 @@ class Eo {
|
|
|
3065
3065
|
*/
|
|
3066
3066
|
reportMarks() {
|
|
3067
3067
|
if (this.debug) {
|
|
3068
|
-
const e =
|
|
3068
|
+
const e = Ao(this.sessionId);
|
|
3069
3069
|
this.webSocketManager.sendMessage({
|
|
3070
3070
|
type: "Event",
|
|
3071
3071
|
eventType: "ClientConnect",
|
|
@@ -3084,7 +3084,7 @@ class Eo {
|
|
|
3084
3084
|
method: "POST",
|
|
3085
3085
|
headers: {
|
|
3086
3086
|
"Content-Type": "application/json",
|
|
3087
|
-
"Convex-Client": `npm-${
|
|
3087
|
+
"Convex-Client": `npm-${dn}`
|
|
3088
3088
|
},
|
|
3089
3089
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
3090
3090
|
}).then((r) => {
|
|
@@ -3102,10 +3102,10 @@ function ct(t) {
|
|
|
3102
3102
|
throw new Error(`Not a valid paginated query result: ${t?.toString()}`);
|
|
3103
3103
|
return t;
|
|
3104
3104
|
}
|
|
3105
|
-
var
|
|
3106
|
-
class
|
|
3105
|
+
var Io = Object.defineProperty, Mo = (t, e, n) => e in t ? Io(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, xn = (t, e, n) => Mo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3106
|
+
class Po {
|
|
3107
3107
|
constructor(e, n) {
|
|
3108
|
-
this.client = e, this.onTransition = n,
|
|
3108
|
+
this.client = e, this.onTransition = n, xn(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), xn(this, "lastTransitionTs"), this.lastTransitionTs = T.fromNumber(0), this.client.addOnTransitionHandler(
|
|
3109
3109
|
(r) => this.onBaseTransition(r)
|
|
3110
3110
|
);
|
|
3111
3111
|
}
|
|
@@ -3118,7 +3118,7 @@ class Mo {
|
|
|
3118
3118
|
* @returns Object with paginatedQueryToken and unsubscribe function
|
|
3119
3119
|
*/
|
|
3120
3120
|
subscribe(e, n, r) {
|
|
3121
|
-
const i = ee(e), o =
|
|
3121
|
+
const i = ee(e), o = pn(
|
|
3122
3122
|
i,
|
|
3123
3123
|
n,
|
|
3124
3124
|
r
|
|
@@ -3149,7 +3149,7 @@ class Mo {
|
|
|
3149
3149
|
* Throws an error when one of the pages has errored.
|
|
3150
3150
|
*/
|
|
3151
3151
|
localQueryResult(e, n, r) {
|
|
3152
|
-
const i = ee(e), o =
|
|
3152
|
+
const i = ee(e), o = pn(
|
|
3153
3153
|
i,
|
|
3154
3154
|
n,
|
|
3155
3155
|
r
|
|
@@ -3378,7 +3378,7 @@ class Mo {
|
|
|
3378
3378
|
return n;
|
|
3379
3379
|
}
|
|
3380
3380
|
}
|
|
3381
|
-
function
|
|
3381
|
+
function Oo({
|
|
3382
3382
|
// (Synchronously) returns the current value of our subscription.
|
|
3383
3383
|
getCurrentValue: t,
|
|
3384
3384
|
// This function is passed an event handler to attach to the subscription.
|
|
@@ -3410,13 +3410,13 @@ function Po({
|
|
|
3410
3410
|
};
|
|
3411
3411
|
}, [t, e]), i;
|
|
3412
3412
|
}
|
|
3413
|
-
var
|
|
3414
|
-
const
|
|
3415
|
-
if (typeof
|
|
3413
|
+
var Lo = Object.defineProperty, No = (t, e, n) => e in t ? Lo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, U = (t, e, n) => No(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3414
|
+
const Qo = 5e3;
|
|
3415
|
+
if (typeof It > "u")
|
|
3416
3416
|
throw new Error("Required dependency 'react' not found");
|
|
3417
|
-
function
|
|
3417
|
+
function fr(t, e, n) {
|
|
3418
3418
|
function r(i) {
|
|
3419
|
-
return
|
|
3419
|
+
return Do(i), e.mutation(t, i, {
|
|
3420
3420
|
optimisticUpdate: n
|
|
3421
3421
|
});
|
|
3422
3422
|
}
|
|
@@ -3427,17 +3427,17 @@ function dr(t, e, n) {
|
|
|
3427
3427
|
t
|
|
3428
3428
|
)}`
|
|
3429
3429
|
);
|
|
3430
|
-
return
|
|
3430
|
+
return fr(t, e, o);
|
|
3431
3431
|
}, r;
|
|
3432
3432
|
}
|
|
3433
|
-
class
|
|
3433
|
+
class Fo {
|
|
3434
3434
|
/**
|
|
3435
3435
|
* @param address - The url of your Convex deployment, often provided
|
|
3436
3436
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
3437
3437
|
* @param options - See {@link ConvexReactClientOptions} for a full description.
|
|
3438
3438
|
*/
|
|
3439
3439
|
constructor(e, n) {
|
|
3440
|
-
if (
|
|
3440
|
+
if (U(this, "address"), U(this, "cachedSync"), U(this, "cachedPaginatedQueryClient"), U(this, "listeners"), U(this, "options"), U(this, "closed", !1), U(this, "_logger"), U(this, "adminAuth"), U(this, "fakeUserIdentity"), e === void 0)
|
|
3441
3441
|
throw new Error(
|
|
3442
3442
|
"No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated."
|
|
3443
3443
|
);
|
|
@@ -3447,7 +3447,7 @@ class Qo {
|
|
|
3447
3447
|
);
|
|
3448
3448
|
if (!e.includes("://"))
|
|
3449
3449
|
throw new Error("Provided address was not an absolute URL.");
|
|
3450
|
-
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ?
|
|
3450
|
+
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? ar({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : sr({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
|
|
3451
3451
|
}
|
|
3452
3452
|
/**
|
|
3453
3453
|
* Return the address for this client, useful for creating a new client.
|
|
@@ -3467,13 +3467,13 @@ class Qo {
|
|
|
3467
3467
|
get sync() {
|
|
3468
3468
|
if (this.closed)
|
|
3469
3469
|
throw new Error("ConvexReactClient has already been closed.");
|
|
3470
|
-
return this.cachedSync ? this.cachedSync : (this.cachedSync = new
|
|
3470
|
+
return this.cachedSync ? this.cachedSync : (this.cachedSync = new qo(
|
|
3471
3471
|
this.address,
|
|
3472
3472
|
() => {
|
|
3473
3473
|
},
|
|
3474
3474
|
// Use the PaginatedQueryClient's transition instead.
|
|
3475
3475
|
this.options
|
|
3476
|
-
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new
|
|
3476
|
+
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new Po(
|
|
3477
3477
|
this.cachedSync,
|
|
3478
3478
|
(e) => this.handleTransition(e)
|
|
3479
3479
|
), this.cachedSync);
|
|
@@ -3583,7 +3583,7 @@ class Qo {
|
|
|
3583
3583
|
* an optional extendSubscriptionFor for how long to subscribe to the query.
|
|
3584
3584
|
*/
|
|
3585
3585
|
prewarmQuery(e) {
|
|
3586
|
-
const n = e.extendSubscriptionFor ??
|
|
3586
|
+
const n = e.extendSubscriptionFor ?? Qo, i = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
|
|
3587
3587
|
});
|
|
3588
3588
|
setTimeout(i, n);
|
|
3589
3589
|
}
|
|
@@ -3734,50 +3734,50 @@ class Qo {
|
|
|
3734
3734
|
}
|
|
3735
3735
|
}
|
|
3736
3736
|
}
|
|
3737
|
-
const
|
|
3737
|
+
const Pt = It.createContext(
|
|
3738
3738
|
void 0
|
|
3739
3739
|
// in the future this will be a mocked client for testing
|
|
3740
3740
|
);
|
|
3741
|
-
function
|
|
3742
|
-
return Xe(
|
|
3741
|
+
function Vo() {
|
|
3742
|
+
return Xe(Pt);
|
|
3743
3743
|
}
|
|
3744
|
-
const
|
|
3745
|
-
|
|
3744
|
+
const Uo = ({ client: t, children: e }) => It.createElement(
|
|
3745
|
+
Pt.Provider,
|
|
3746
3746
|
{ value: t },
|
|
3747
3747
|
e
|
|
3748
3748
|
);
|
|
3749
3749
|
function Bo(t, ...e) {
|
|
3750
|
-
const n = e[0] === "skip", r = e[0] === "skip" ? {} :
|
|
3750
|
+
const n = e[0] === "skip", r = e[0] === "skip" ? {} : B(e[0]), i = typeof t == "string" ? ur(t) : t, o = A(i), s = V(
|
|
3751
3751
|
() => n ? {} : { query: { query: i, args: r } },
|
|
3752
3752
|
// Stringify args so args that are semantically the same don't trigger a
|
|
3753
3753
|
// rerender. Saves developers from adding `useMemo` on every args usage.
|
|
3754
3754
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3755
3755
|
[JSON.stringify(F(r)), o, n]
|
|
3756
|
-
), c =
|
|
3756
|
+
), c = Jo(s).query;
|
|
3757
3757
|
if (c instanceof Error)
|
|
3758
3758
|
throw c;
|
|
3759
3759
|
return c;
|
|
3760
3760
|
}
|
|
3761
|
-
function
|
|
3762
|
-
const e = typeof t == "string" ?
|
|
3761
|
+
function pr(t) {
|
|
3762
|
+
const e = typeof t == "string" ? ur(t) : t, n = Xe(Pt);
|
|
3763
3763
|
if (n === void 0)
|
|
3764
3764
|
throw new Error(
|
|
3765
3765
|
"Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
3766
3766
|
);
|
|
3767
3767
|
return V(
|
|
3768
|
-
() =>
|
|
3768
|
+
() => fr(e, n),
|
|
3769
3769
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3770
3770
|
[n, A(e)]
|
|
3771
3771
|
);
|
|
3772
3772
|
}
|
|
3773
|
-
function
|
|
3773
|
+
function Do(t) {
|
|
3774
3774
|
if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
|
|
3775
3775
|
throw new Error(
|
|
3776
3776
|
"Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
|
|
3777
3777
|
);
|
|
3778
3778
|
}
|
|
3779
|
-
var
|
|
3780
|
-
class
|
|
3779
|
+
var Wo = Object.defineProperty, zo = (t, e, n) => e in t ? Wo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ut = (t, e, n) => zo(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3780
|
+
class Ho {
|
|
3781
3781
|
constructor(e) {
|
|
3782
3782
|
ut(this, "createWatch"), ut(this, "queries"), ut(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
|
|
3783
3783
|
}
|
|
@@ -3878,8 +3878,8 @@ class zo {
|
|
|
3878
3878
|
e();
|
|
3879
3879
|
}
|
|
3880
3880
|
}
|
|
3881
|
-
function
|
|
3882
|
-
const e =
|
|
3881
|
+
function Jo(t) {
|
|
3882
|
+
const e = Vo();
|
|
3883
3883
|
if (e === void 0)
|
|
3884
3884
|
throw new Error(
|
|
3885
3885
|
"Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
@@ -3888,10 +3888,10 @@ function Ho(t) {
|
|
|
3888
3888
|
journal: o,
|
|
3889
3889
|
paginationOptions: s
|
|
3890
3890
|
}) => s ? e.watchPaginatedQuery(r, i, s) : e.watchQuery(r, i, o ? { journal: o } : {}), [e]);
|
|
3891
|
-
return
|
|
3891
|
+
return Ko(t, n);
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3894
|
-
const [n] = I(() => new
|
|
3893
|
+
function Ko(t, e) {
|
|
3894
|
+
const [n] = I(() => new Ho(e));
|
|
3895
3895
|
n.createWatch !== e && n.setCreateWatch(e), Q(() => () => n.destroy(), [n]);
|
|
3896
3896
|
const r = V(
|
|
3897
3897
|
() => ({
|
|
@@ -3900,18 +3900,18 @@ function Jo(t, e) {
|
|
|
3900
3900
|
}),
|
|
3901
3901
|
[n, t]
|
|
3902
3902
|
);
|
|
3903
|
-
return
|
|
3903
|
+
return Oo(r);
|
|
3904
3904
|
}
|
|
3905
|
-
var
|
|
3905
|
+
var Go = /* @__PURE__ */ Symbol.for("preact-signals");
|
|
3906
3906
|
function Ze() {
|
|
3907
3907
|
if (K > 1)
|
|
3908
3908
|
K--;
|
|
3909
3909
|
else {
|
|
3910
3910
|
for (var t, e = !1; Se !== void 0; ) {
|
|
3911
3911
|
var n = Se;
|
|
3912
|
-
for (Se = void 0,
|
|
3912
|
+
for (Se = void 0, kt++; n !== void 0; ) {
|
|
3913
3913
|
var r = n.o;
|
|
3914
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
3914
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && mr(n)) try {
|
|
3915
3915
|
n.c();
|
|
3916
3916
|
} catch (i) {
|
|
3917
3917
|
e || (t = i, e = !0);
|
|
@@ -3919,10 +3919,10 @@ function Ze() {
|
|
|
3919
3919
|
n = r;
|
|
3920
3920
|
}
|
|
3921
3921
|
}
|
|
3922
|
-
if (
|
|
3922
|
+
if (kt = 0, K--, e) throw t;
|
|
3923
3923
|
}
|
|
3924
3924
|
}
|
|
3925
|
-
function
|
|
3925
|
+
function Xo(t) {
|
|
3926
3926
|
if (K > 0) return t();
|
|
3927
3927
|
K++;
|
|
3928
3928
|
try {
|
|
@@ -3932,7 +3932,7 @@ function Go(t) {
|
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
3934
|
var y = void 0;
|
|
3935
|
-
function
|
|
3935
|
+
function gr(t) {
|
|
3936
3936
|
var e = y;
|
|
3937
3937
|
y = void 0;
|
|
3938
3938
|
try {
|
|
@@ -3941,8 +3941,8 @@ function pr(t) {
|
|
|
3941
3941
|
y = e;
|
|
3942
3942
|
}
|
|
3943
3943
|
}
|
|
3944
|
-
var Se = void 0, K = 0,
|
|
3945
|
-
function
|
|
3944
|
+
var Se = void 0, K = 0, kt = 0, He = 0;
|
|
3945
|
+
function _r(t) {
|
|
3946
3946
|
if (y !== void 0) {
|
|
3947
3947
|
var e = t.n;
|
|
3948
3948
|
if (e === void 0 || e.t !== y)
|
|
@@ -3954,13 +3954,13 @@ function gr(t) {
|
|
|
3954
3954
|
function j(t, e) {
|
|
3955
3955
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
3956
3956
|
}
|
|
3957
|
-
j.prototype.brand =
|
|
3957
|
+
j.prototype.brand = Go;
|
|
3958
3958
|
j.prototype.h = function() {
|
|
3959
3959
|
return !0;
|
|
3960
3960
|
};
|
|
3961
3961
|
j.prototype.S = function(t) {
|
|
3962
3962
|
var e = this, n = this.t;
|
|
3963
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t :
|
|
3963
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : gr(function() {
|
|
3964
3964
|
var r;
|
|
3965
3965
|
(r = e.W) == null || r.call(e);
|
|
3966
3966
|
}));
|
|
@@ -3969,7 +3969,7 @@ j.prototype.U = function(t) {
|
|
|
3969
3969
|
var e = this;
|
|
3970
3970
|
if (this.t !== void 0) {
|
|
3971
3971
|
var n = t.e, r = t.x;
|
|
3972
|
-
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 &&
|
|
3972
|
+
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 && gr(function() {
|
|
3973
3973
|
var i;
|
|
3974
3974
|
(i = e.Z) == null || i.call(e);
|
|
3975
3975
|
}));
|
|
@@ -4006,11 +4006,11 @@ j.prototype.peek = function() {
|
|
|
4006
4006
|
}
|
|
4007
4007
|
};
|
|
4008
4008
|
Object.defineProperty(j.prototype, "value", { get: function() {
|
|
4009
|
-
var t =
|
|
4009
|
+
var t = _r(this);
|
|
4010
4010
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
4011
4011
|
}, set: function(t) {
|
|
4012
4012
|
if (t !== this.v) {
|
|
4013
|
-
if (
|
|
4013
|
+
if (kt > 100) throw new Error("Cycle detected");
|
|
4014
4014
|
this.v = t, this.i++, He++, K++;
|
|
4015
4015
|
try {
|
|
4016
4016
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
|
@@ -4022,11 +4022,11 @@ Object.defineProperty(j.prototype, "value", { get: function() {
|
|
|
4022
4022
|
function te(t, e) {
|
|
4023
4023
|
return new j(t, e);
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function mr(t) {
|
|
4026
4026
|
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;
|
|
4027
4027
|
return !1;
|
|
4028
4028
|
}
|
|
4029
|
-
function
|
|
4029
|
+
function yr(t) {
|
|
4030
4030
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
4031
4031
|
var n = e.S.n;
|
|
4032
4032
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -4035,7 +4035,7 @@ function mr(t) {
|
|
|
4035
4035
|
}
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
|
-
function
|
|
4038
|
+
function vr(t) {
|
|
4039
4039
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
|
4040
4040
|
var r = e.p;
|
|
4041
4041
|
e.i === -1 ? (e.S.U(e), r !== void 0 && (r.n = e.n), e.n !== void 0 && (e.n.p = r)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = r;
|
|
@@ -4049,17 +4049,17 @@ ne.prototype = new j();
|
|
|
4049
4049
|
ne.prototype.h = function() {
|
|
4050
4050
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
4051
4051
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === He)) return !0;
|
|
4052
|
-
if (this.g = He, this.f |= 1, this.i > 0 && !
|
|
4052
|
+
if (this.g = He, this.f |= 1, this.i > 0 && !mr(this))
|
|
4053
4053
|
return this.f &= -2, !0;
|
|
4054
4054
|
var t = y;
|
|
4055
4055
|
try {
|
|
4056
|
-
|
|
4056
|
+
yr(this), y = this;
|
|
4057
4057
|
var e = this.x();
|
|
4058
4058
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
4059
4059
|
} catch (n) {
|
|
4060
4060
|
this.v = n, this.f |= 16, this.i++;
|
|
4061
4061
|
}
|
|
4062
|
-
return y = t,
|
|
4062
|
+
return y = t, vr(this), this.f &= -2, !0;
|
|
4063
4063
|
};
|
|
4064
4064
|
ne.prototype.S = function(t) {
|
|
4065
4065
|
if (this.t === void 0) {
|
|
@@ -4082,14 +4082,14 @@ ne.prototype.N = function() {
|
|
|
4082
4082
|
};
|
|
4083
4083
|
Object.defineProperty(ne.prototype, "value", { get: function() {
|
|
4084
4084
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4085
|
-
var t =
|
|
4085
|
+
var t = _r(this);
|
|
4086
4086
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
4087
4087
|
return this.v;
|
|
4088
4088
|
} });
|
|
4089
|
-
function
|
|
4089
|
+
function wn(t, e) {
|
|
4090
4090
|
return new ne(t, e);
|
|
4091
4091
|
}
|
|
4092
|
-
function
|
|
4092
|
+
function br(t) {
|
|
4093
4093
|
var e = t.u;
|
|
4094
4094
|
if (t.u = void 0, typeof e == "function") {
|
|
4095
4095
|
K++;
|
|
@@ -4098,19 +4098,19 @@ function vr(t) {
|
|
|
4098
4098
|
try {
|
|
4099
4099
|
e();
|
|
4100
4100
|
} catch (r) {
|
|
4101
|
-
throw t.f &= -2, t.f |= 8,
|
|
4101
|
+
throw t.f &= -2, t.f |= 8, Ot(t), r;
|
|
4102
4102
|
} finally {
|
|
4103
4103
|
y = n, Ze();
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
4106
|
}
|
|
4107
|
-
function
|
|
4107
|
+
function Ot(t) {
|
|
4108
4108
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4109
|
-
t.x = void 0, t.s = void 0,
|
|
4109
|
+
t.x = void 0, t.s = void 0, br(t);
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function Yo(t) {
|
|
4112
4112
|
if (y !== this) throw new Error("Out-of-order effect");
|
|
4113
|
-
|
|
4113
|
+
vr(this), y = t, this.f &= -2, 8 & this.f && Ot(this), Ze();
|
|
4114
4114
|
}
|
|
4115
4115
|
function pe(t, e) {
|
|
4116
4116
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
@@ -4127,15 +4127,15 @@ pe.prototype.c = function() {
|
|
|
4127
4127
|
};
|
|
4128
4128
|
pe.prototype.S = function() {
|
|
4129
4129
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4130
|
-
this.f |= 1, this.f &= -9,
|
|
4130
|
+
this.f |= 1, this.f &= -9, br(this), yr(this), K++;
|
|
4131
4131
|
var t = y;
|
|
4132
|
-
return y = this,
|
|
4132
|
+
return y = this, Yo.bind(this, t);
|
|
4133
4133
|
};
|
|
4134
4134
|
pe.prototype.N = function() {
|
|
4135
4135
|
2 & this.f || (this.f |= 2, this.o = Se, Se = this);
|
|
4136
4136
|
};
|
|
4137
4137
|
pe.prototype.d = function() {
|
|
4138
|
-
this.f |= 8, 1 & this.f ||
|
|
4138
|
+
this.f |= 8, 1 & this.f || Ot(this);
|
|
4139
4139
|
};
|
|
4140
4140
|
pe.prototype.dispose = function() {
|
|
4141
4141
|
this.d();
|
|
@@ -4150,9 +4150,9 @@ function Me(t, e) {
|
|
|
4150
4150
|
var r = n.d.bind(n);
|
|
4151
4151
|
return r[Symbol.dispose] = r, r;
|
|
4152
4152
|
}
|
|
4153
|
-
var
|
|
4153
|
+
var xr, Fe, Zo = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, wr = [];
|
|
4154
4154
|
Me(function() {
|
|
4155
|
-
|
|
4155
|
+
xr = this.N;
|
|
4156
4156
|
})();
|
|
4157
4157
|
function ge(t, e) {
|
|
4158
4158
|
_[t] = e.bind(null, _[t] || function() {
|
|
@@ -4165,21 +4165,21 @@ function Je(t) {
|
|
|
4165
4165
|
}
|
|
4166
4166
|
Fe = t && t.S();
|
|
4167
4167
|
}
|
|
4168
|
-
function
|
|
4169
|
-
var e = this, n = t.data, r =
|
|
4168
|
+
function kr(t) {
|
|
4169
|
+
var e = this, n = t.data, r = Lt(n);
|
|
4170
4170
|
r.value = n;
|
|
4171
4171
|
var i = V(function() {
|
|
4172
4172
|
for (var a = e, c = e.__v; c = c.__; ) if (c.__c) {
|
|
4173
4173
|
c.__c.__$f |= 4;
|
|
4174
4174
|
break;
|
|
4175
4175
|
}
|
|
4176
|
-
var u =
|
|
4176
|
+
var u = wn(function() {
|
|
4177
4177
|
var d = r.value.value;
|
|
4178
4178
|
return d === 0 ? 0 : d === !0 ? "" : d || "";
|
|
4179
|
-
}), f =
|
|
4180
|
-
return !Array.isArray(u.value) && !
|
|
4179
|
+
}), f = wn(function() {
|
|
4180
|
+
return !Array.isArray(u.value) && !Cn(u.value);
|
|
4181
4181
|
}), l = Me(function() {
|
|
4182
|
-
if (this.N =
|
|
4182
|
+
if (this.N = Sr, f.value) {
|
|
4183
4183
|
var d = u.value;
|
|
4184
4184
|
a.__v && a.__v.__e && a.__v.__e.nodeType === 3 && (a.__v.__e.data = d);
|
|
4185
4185
|
}
|
|
@@ -4190,8 +4190,8 @@ function wr(t) {
|
|
|
4190
4190
|
}, []), o = i[0], s = i[1];
|
|
4191
4191
|
return o.value ? s.peek() : s.value;
|
|
4192
4192
|
}
|
|
4193
|
-
|
|
4194
|
-
Object.defineProperties(j.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value:
|
|
4193
|
+
kr.displayName = "ReactiveTextNode";
|
|
4194
|
+
Object.defineProperties(j.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: kr }, props: { configurable: !0, get: function() {
|
|
4195
4195
|
return { data: this };
|
|
4196
4196
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4197
4197
|
ge("__b", function(t, e) {
|
|
@@ -4215,7 +4215,7 @@ ge("__r", function(t, e) {
|
|
|
4215
4215
|
}, { name: o }), s.c = i, s;
|
|
4216
4216
|
})(function() {
|
|
4217
4217
|
var i;
|
|
4218
|
-
|
|
4218
|
+
Zo && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
|
|
4219
4219
|
}, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), Je(n);
|
|
4220
4220
|
}
|
|
4221
4221
|
});
|
|
@@ -4237,18 +4237,18 @@ ge("diffed", function(t, e) {
|
|
|
4237
4237
|
o = {}, n.U = o;
|
|
4238
4238
|
for (var c in r) {
|
|
4239
4239
|
var u = o[c], f = r[c];
|
|
4240
|
-
u === void 0 ? (u =
|
|
4240
|
+
u === void 0 ? (u = es(n, c, f, i), o[c] = u) : u.o(f, i);
|
|
4241
4241
|
}
|
|
4242
4242
|
}
|
|
4243
4243
|
}
|
|
4244
4244
|
t(e);
|
|
4245
4245
|
});
|
|
4246
|
-
function
|
|
4246
|
+
function es(t, e, n, r) {
|
|
4247
4247
|
var i = e in t && t.ownerSVGElement === void 0, o = te(n);
|
|
4248
4248
|
return { o: function(s, a) {
|
|
4249
4249
|
o.value = s, r = a;
|
|
4250
4250
|
}, d: Me(function() {
|
|
4251
|
-
this.N =
|
|
4251
|
+
this.N = Sr;
|
|
4252
4252
|
var s = o.value.value;
|
|
4253
4253
|
r[e] !== s && (r[e] = s, i ? t[e] = s : s != null && (s !== !1 || e[4] === "-") ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
4254
4254
|
}) };
|
|
@@ -4290,29 +4290,32 @@ q.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4290
4290
|
for (var a in this.props) if (!(a in t)) return !0;
|
|
4291
4291
|
return !1;
|
|
4292
4292
|
};
|
|
4293
|
-
function
|
|
4293
|
+
function Lt(t, e) {
|
|
4294
4294
|
return V(function() {
|
|
4295
4295
|
return te(t, e);
|
|
4296
4296
|
}, []);
|
|
4297
4297
|
}
|
|
4298
|
-
var
|
|
4298
|
+
var ts = function(t) {
|
|
4299
4299
|
queueMicrotask(function() {
|
|
4300
4300
|
queueMicrotask(t);
|
|
4301
4301
|
});
|
|
4302
4302
|
};
|
|
4303
|
-
function
|
|
4304
|
-
|
|
4305
|
-
for (var t; t =
|
|
4303
|
+
function ns() {
|
|
4304
|
+
Xo(function() {
|
|
4305
|
+
for (var t; t = wr.shift(); ) xr.call(t);
|
|
4306
4306
|
});
|
|
4307
4307
|
}
|
|
4308
|
-
function
|
|
4309
|
-
|
|
4308
|
+
function Sr() {
|
|
4309
|
+
wr.push(this) === 1 && (_.requestAnimationFrame || ts)(ns);
|
|
4310
4310
|
}
|
|
4311
4311
|
const R = te(!1);
|
|
4312
|
-
function
|
|
4312
|
+
function rs(t) {
|
|
4313
4313
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4314
4314
|
}
|
|
4315
|
-
function
|
|
4315
|
+
function is(t) {
|
|
4316
|
+
return t.replace(/\.convex\.cloud\b/, ".convex.site");
|
|
4317
|
+
}
|
|
4318
|
+
function os(t, e) {
|
|
4316
4319
|
const n = t.title ?? e?.title ?? "Assistant";
|
|
4317
4320
|
return {
|
|
4318
4321
|
title: n,
|
|
@@ -4333,13 +4336,33 @@ function rs(t, e) {
|
|
|
4333
4336
|
windowHeight: t.windowHeight ?? e?.windowHeight
|
|
4334
4337
|
};
|
|
4335
4338
|
}
|
|
4336
|
-
function
|
|
4337
|
-
const
|
|
4339
|
+
async function ss(t, e, n) {
|
|
4340
|
+
const r = `${t}/widget/config?orgSlug=${encodeURIComponent(e)}`, i = await fetch(r, { signal: n });
|
|
4341
|
+
return i.ok ? i.json() : null;
|
|
4342
|
+
}
|
|
4343
|
+
function as(t, e) {
|
|
4344
|
+
const [n, r] = I(null);
|
|
4338
4345
|
return Q(() => {
|
|
4339
|
-
|
|
4340
|
-
|
|
4346
|
+
r(null);
|
|
4347
|
+
const i = e ?? "https://striped-woodpecker-382.convex.cloud", o = i ? is(i) : void 0;
|
|
4348
|
+
if (!o || !t)
|
|
4349
|
+
return;
|
|
4350
|
+
const s = new AbortController();
|
|
4351
|
+
async function a(c) {
|
|
4352
|
+
try {
|
|
4353
|
+
const u = await ss(c, t, s.signal);
|
|
4354
|
+
u && r(u);
|
|
4355
|
+
} catch (u) {
|
|
4356
|
+
if (u instanceof Error && u.name === "AbortError")
|
|
4357
|
+
return;
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
return a(o), () => {
|
|
4361
|
+
s.abort();
|
|
4362
|
+
};
|
|
4363
|
+
}, [t, e]), n;
|
|
4341
4364
|
}
|
|
4342
|
-
const
|
|
4365
|
+
const Cr = {
|
|
4343
4366
|
title: "Assistant",
|
|
4344
4367
|
statusOnline: "Online · Responds in seconds",
|
|
4345
4368
|
inputPlaceholder: "Type a message…",
|
|
@@ -4369,7 +4392,7 @@ const Sr = {
|
|
|
4369
4392
|
yourEmail: "Your email",
|
|
4370
4393
|
submit: "Submit",
|
|
4371
4394
|
back: "Go back"
|
|
4372
|
-
},
|
|
4395
|
+
}, cs = {
|
|
4373
4396
|
title: "Assistent",
|
|
4374
4397
|
statusOnline: "Online · Antwortet in Sekunden",
|
|
4375
4398
|
inputPlaceholder: "Nachricht eingeben…",
|
|
@@ -4399,25 +4422,25 @@ const Sr = {
|
|
|
4399
4422
|
yourEmail: "Deine E-Mail",
|
|
4400
4423
|
submit: "Absenden",
|
|
4401
4424
|
back: "Zurück"
|
|
4402
|
-
},
|
|
4425
|
+
}, us = [
|
|
4403
4426
|
{ value: "de", label: "Deutsch", flag: "🇩🇪" },
|
|
4404
4427
|
{ value: "en", label: "English", flag: "🇬🇧" }
|
|
4405
|
-
],
|
|
4428
|
+
], ls = "de", hs = "jex-locale", Nt = te("de"), ds = { en: Cr, de: cs };
|
|
4406
4429
|
function re() {
|
|
4407
|
-
return
|
|
4430
|
+
return ds[Nt.value] ?? Cr;
|
|
4408
4431
|
}
|
|
4409
4432
|
function lt(t) {
|
|
4410
4433
|
if (!t)
|
|
4411
4434
|
return null;
|
|
4412
4435
|
const e = (t.split("-")[0] ?? "").toLowerCase();
|
|
4413
|
-
return
|
|
4436
|
+
return us.some((r) => r.value === e) ? e : null;
|
|
4414
4437
|
}
|
|
4415
|
-
function
|
|
4438
|
+
function jr(t) {
|
|
4416
4439
|
const e = lt(t);
|
|
4417
4440
|
if (e)
|
|
4418
4441
|
return e;
|
|
4419
4442
|
try {
|
|
4420
|
-
const n = lt(localStorage.getItem(
|
|
4443
|
+
const n = lt(localStorage.getItem(hs));
|
|
4421
4444
|
if (n)
|
|
4422
4445
|
return n;
|
|
4423
4446
|
} catch {
|
|
@@ -4427,53 +4450,53 @@ function Cr(t) {
|
|
|
4427
4450
|
if (n)
|
|
4428
4451
|
return n;
|
|
4429
4452
|
}
|
|
4430
|
-
return
|
|
4453
|
+
return ls;
|
|
4431
4454
|
}
|
|
4432
|
-
function
|
|
4455
|
+
function fs(t) {
|
|
4433
4456
|
Q(() => {
|
|
4434
4457
|
function e(n) {
|
|
4435
4458
|
const r = t ?? window.location.origin;
|
|
4436
4459
|
if (n.origin !== r || n.data?.type !== "jexity:config")
|
|
4437
4460
|
return;
|
|
4438
4461
|
const { locale: i } = n.data.payload;
|
|
4439
|
-
i && (
|
|
4462
|
+
i && (Nt.value = jr(i));
|
|
4440
4463
|
}
|
|
4441
4464
|
return window.addEventListener("message", e), () => {
|
|
4442
4465
|
window.removeEventListener("message", e);
|
|
4443
4466
|
};
|
|
4444
4467
|
}, [t]);
|
|
4445
4468
|
}
|
|
4446
|
-
const
|
|
4447
|
-
function
|
|
4469
|
+
const Tr = "jex-session-ref", Qt = "jex-session-active", de = te(null), Ke = te(!1);
|
|
4470
|
+
function ps() {
|
|
4448
4471
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4449
4472
|
}
|
|
4450
|
-
function
|
|
4473
|
+
function gs() {
|
|
4451
4474
|
try {
|
|
4452
|
-
const t = sessionStorage.getItem(
|
|
4475
|
+
const t = sessionStorage.getItem(Tr), e = sessionStorage.getItem(Qt);
|
|
4453
4476
|
de.value = t ?? null, Ke.value = t !== null && e === "true";
|
|
4454
4477
|
} catch {
|
|
4455
4478
|
de.value = null, Ke.value = !1;
|
|
4456
4479
|
}
|
|
4457
4480
|
}
|
|
4458
|
-
function
|
|
4459
|
-
const t =
|
|
4481
|
+
function Rr() {
|
|
4482
|
+
const t = ps();
|
|
4460
4483
|
de.value = t, Ke.value = !1;
|
|
4461
4484
|
try {
|
|
4462
|
-
sessionStorage.setItem(
|
|
4485
|
+
sessionStorage.setItem(Tr, t), sessionStorage.removeItem(Qt);
|
|
4463
4486
|
} catch {
|
|
4464
4487
|
}
|
|
4465
4488
|
return t;
|
|
4466
4489
|
}
|
|
4467
|
-
function
|
|
4490
|
+
function _s() {
|
|
4468
4491
|
if (de.value) {
|
|
4469
4492
|
Ke.value = !0;
|
|
4470
4493
|
try {
|
|
4471
|
-
sessionStorage.setItem(
|
|
4494
|
+
sessionStorage.setItem(Qt, "true");
|
|
4472
4495
|
} catch {
|
|
4473
4496
|
}
|
|
4474
4497
|
}
|
|
4475
4498
|
}
|
|
4476
|
-
function
|
|
4499
|
+
function ms(t) {
|
|
4477
4500
|
const e = {}, { primaryColor: n, theme: r } = t;
|
|
4478
4501
|
if (n && (e["--jex-primary"] = n, e["--jex-bg-trigger"] = n, e["--jex-bg-header"] = n, e["--jex-bg-msg-user"] = n, e["--jex-bg-send-btn"] = n), t.accentColor && (e["--jex-accent"] = t.accentColor), r?.bg) {
|
|
4479
4502
|
const i = r.bg;
|
|
@@ -4493,13 +4516,13 @@ const W = te([{ id: "chat" }]);
|
|
|
4493
4516
|
function Ce(t) {
|
|
4494
4517
|
W.value = [...W.value, t];
|
|
4495
4518
|
}
|
|
4496
|
-
function
|
|
4519
|
+
function Ar() {
|
|
4497
4520
|
W.value.length > 1 && (W.value = W.value.slice(0, -1));
|
|
4498
4521
|
}
|
|
4499
|
-
function
|
|
4522
|
+
function St(t) {
|
|
4500
4523
|
W.value = [...W.value.slice(0, -1), t];
|
|
4501
4524
|
}
|
|
4502
|
-
function
|
|
4525
|
+
function $r({ size: t = 24 }) {
|
|
4503
4526
|
return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4504
4527
|
/* @__PURE__ */ h("path", { d: "M12 8V4H8" }),
|
|
4505
4528
|
/* @__PURE__ */ h("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -4509,29 +4532,29 @@ function Ar({ size: t = 24 }) {
|
|
|
4509
4532
|
/* @__PURE__ */ h("path", { d: "M9 13v2" })
|
|
4510
4533
|
] });
|
|
4511
4534
|
}
|
|
4512
|
-
function
|
|
4535
|
+
function ys({ title: t }) {
|
|
4513
4536
|
const e = re(), n = W.value.length > 1;
|
|
4514
4537
|
return /* @__PURE__ */ h("header", { class: "jex-chat-header", children: [
|
|
4515
4538
|
n && /* @__PURE__ */ h(
|
|
4516
4539
|
"button",
|
|
4517
4540
|
{
|
|
4518
4541
|
class: "jex-header-back",
|
|
4519
|
-
onClick:
|
|
4542
|
+
onClick: Ar,
|
|
4520
4543
|
"aria-label": e.back || "Go back",
|
|
4521
4544
|
children: /* @__PURE__ */ h("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "m15 18-6-6 6-6" }) })
|
|
4522
4545
|
}
|
|
4523
4546
|
),
|
|
4524
|
-
!n && /* @__PURE__ */ h(
|
|
4547
|
+
!n && /* @__PURE__ */ h($r, { size: 24 }),
|
|
4525
4548
|
/* @__PURE__ */ h("div", { class: "jex-header-info", children: [
|
|
4526
4549
|
/* @__PURE__ */ h("h3", { children: t }),
|
|
4527
4550
|
/* @__PURE__ */ h("p", { children: e.statusOnline })
|
|
4528
4551
|
] })
|
|
4529
4552
|
] });
|
|
4530
4553
|
}
|
|
4531
|
-
function
|
|
4554
|
+
function vs({ size: t = 14 }) {
|
|
4532
4555
|
return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }) });
|
|
4533
4556
|
}
|
|
4534
|
-
function
|
|
4557
|
+
function bs() {
|
|
4535
4558
|
return /* @__PURE__ */ h("div", { class: "jex-widget-footer", children: /* @__PURE__ */ h(
|
|
4536
4559
|
"a",
|
|
4537
4560
|
{
|
|
@@ -4540,7 +4563,7 @@ function ms() {
|
|
|
4540
4563
|
rel: "noopener noreferrer",
|
|
4541
4564
|
class: "jex-branding",
|
|
4542
4565
|
children: [
|
|
4543
|
-
/* @__PURE__ */ h(
|
|
4566
|
+
/* @__PURE__ */ h(vs, { size: 14 }),
|
|
4544
4567
|
/* @__PURE__ */ h("span", { children: [
|
|
4545
4568
|
"Powered by ",
|
|
4546
4569
|
/* @__PURE__ */ h("strong", { children: "Jexity" })
|
|
@@ -4549,16 +4572,16 @@ function ms() {
|
|
|
4549
4572
|
}
|
|
4550
4573
|
) });
|
|
4551
4574
|
}
|
|
4552
|
-
function
|
|
4575
|
+
function xs({ size: t = 28 }) {
|
|
4553
4576
|
return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ h("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
4554
4577
|
}
|
|
4555
|
-
function
|
|
4578
|
+
function ws({ size: t = 28 }) {
|
|
4556
4579
|
return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4557
4580
|
/* @__PURE__ */ h("path", { d: "M18 6 6 18" }),
|
|
4558
4581
|
/* @__PURE__ */ h("path", { d: "m6 6 12 12" })
|
|
4559
4582
|
] });
|
|
4560
4583
|
}
|
|
4561
|
-
function
|
|
4584
|
+
function ks({ size: t = 24, ...e }) {
|
|
4562
4585
|
return /* @__PURE__ */ h(
|
|
4563
4586
|
"svg",
|
|
4564
4587
|
{
|
|
@@ -4575,39 +4598,39 @@ function bs({ size: t = 24, ...e }) {
|
|
|
4575
4598
|
}
|
|
4576
4599
|
);
|
|
4577
4600
|
}
|
|
4578
|
-
const
|
|
4579
|
-
chat: /* @__PURE__ */ h(
|
|
4580
|
-
bot: /* @__PURE__ */ h(
|
|
4581
|
-
sparkles: /* @__PURE__ */ h(
|
|
4582
|
-
},
|
|
4601
|
+
const Ss = {
|
|
4602
|
+
chat: /* @__PURE__ */ h(xs, { size: 28 }),
|
|
4603
|
+
bot: /* @__PURE__ */ h($r, { size: 28 }),
|
|
4604
|
+
sparkles: /* @__PURE__ */ h(ks, { size: 28 })
|
|
4605
|
+
}, Cs = {
|
|
4583
4606
|
none: "0px",
|
|
4584
4607
|
sm: "0.5rem",
|
|
4585
4608
|
md: "0.75rem",
|
|
4586
4609
|
lg: "1.25rem",
|
|
4587
4610
|
full: "9999px"
|
|
4588
4611
|
};
|
|
4589
|
-
function
|
|
4612
|
+
function js({ radius: t = "full", iconOption: e = "chat", label: n = "Chatte mit uns" }) {
|
|
4590
4613
|
const r = re(), i = n !== "";
|
|
4591
4614
|
return /* @__PURE__ */ h(
|
|
4592
4615
|
"button",
|
|
4593
4616
|
{
|
|
4594
4617
|
class: `jex-floating-button ${!R.value && i ? "jex-has-label" : ""}`,
|
|
4595
|
-
style: { borderRadius:
|
|
4618
|
+
style: { borderRadius: Cs[t] ?? "9999px" },
|
|
4596
4619
|
onClick: () => {
|
|
4597
4620
|
R.value = !R.value;
|
|
4598
4621
|
},
|
|
4599
4622
|
"aria-label": R.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
|
|
4600
|
-
children: R.value ? /* @__PURE__ */ h(
|
|
4601
|
-
|
|
4623
|
+
children: R.value ? /* @__PURE__ */ h(ws, { size: 28 }) : /* @__PURE__ */ h("div", { class: "jex-fab-inner", children: [
|
|
4624
|
+
Ss[e],
|
|
4602
4625
|
i && /* @__PURE__ */ h("span", { class: "jex-fab-label", children: n })
|
|
4603
4626
|
] })
|
|
4604
4627
|
}
|
|
4605
4628
|
);
|
|
4606
4629
|
}
|
|
4607
|
-
function
|
|
4630
|
+
function Ts({ greeting: t, title: e }) {
|
|
4608
4631
|
const n = re(), r = de.value, [i, o] = I(!1), [s, a] = I("");
|
|
4609
4632
|
function c() {
|
|
4610
|
-
|
|
4633
|
+
Rr(), Ce({ id: "chat" });
|
|
4611
4634
|
}
|
|
4612
4635
|
function u() {
|
|
4613
4636
|
Ce({ id: "chat" });
|
|
@@ -4657,7 +4680,7 @@ function Ss({ greeting: t, title: e }) {
|
|
|
4657
4680
|
)
|
|
4658
4681
|
] });
|
|
4659
4682
|
}
|
|
4660
|
-
function
|
|
4683
|
+
function Rs({ title: t }) {
|
|
4661
4684
|
const e = re();
|
|
4662
4685
|
return /* @__PURE__ */ h("div", { class: "jex-selection", children: [
|
|
4663
4686
|
/* @__PURE__ */ h("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
@@ -4689,13 +4712,13 @@ function Cs({ title: t }) {
|
|
|
4689
4712
|
] })
|
|
4690
4713
|
] });
|
|
4691
4714
|
}
|
|
4692
|
-
function
|
|
4715
|
+
function Er(t, e) {
|
|
4693
4716
|
const n = {
|
|
4694
4717
|
get(r, i) {
|
|
4695
4718
|
if (typeof i == "string") {
|
|
4696
4719
|
const o = [...e, i];
|
|
4697
|
-
return
|
|
4698
|
-
} else if (i ===
|
|
4720
|
+
return Er(t, o);
|
|
4721
|
+
} else if (i === cr) {
|
|
4699
4722
|
if (e.length < 1) {
|
|
4700
4723
|
const o = [t, ...e].join(".");
|
|
4701
4724
|
throw new Error(
|
|
@@ -4709,14 +4732,14 @@ function $r(t, e) {
|
|
|
4709
4732
|
};
|
|
4710
4733
|
return new Proxy({}, n);
|
|
4711
4734
|
}
|
|
4712
|
-
const
|
|
4713
|
-
|
|
4714
|
-
function
|
|
4715
|
-
const e = Ge(null), n =
|
|
4735
|
+
const As = () => Er("components", []), Ft = Xi;
|
|
4736
|
+
As();
|
|
4737
|
+
function $s(t) {
|
|
4738
|
+
const e = Ge(null), n = Lt(!1), r = pr(Ft.functions.chat.public.sessions.createOrResume), i = $t(async () => {
|
|
4716
4739
|
if (e.current)
|
|
4717
4740
|
return e.current;
|
|
4718
4741
|
n.value = !0;
|
|
4719
|
-
const s = de.value ??
|
|
4742
|
+
const s = de.value ?? Rr();
|
|
4720
4743
|
try {
|
|
4721
4744
|
const c = { sessionId: (await r({ orgSlug: t, visitorId: s })).sessionId, visitorId: s };
|
|
4722
4745
|
return e.current = c, c;
|
|
@@ -4733,49 +4756,49 @@ function Ts(t) {
|
|
|
4733
4756
|
ensureSession: i
|
|
4734
4757
|
};
|
|
4735
4758
|
}
|
|
4736
|
-
function
|
|
4759
|
+
function kn({ text: t }) {
|
|
4737
4760
|
return /* @__PURE__ */ h("div", { class: "jex-message bot", children: t });
|
|
4738
4761
|
}
|
|
4739
|
-
function
|
|
4762
|
+
function Es({ text: t }) {
|
|
4740
4763
|
return /* @__PURE__ */ h("div", { class: "jex-message user", children: t });
|
|
4741
4764
|
}
|
|
4742
|
-
function
|
|
4765
|
+
function qs() {
|
|
4743
4766
|
return /* @__PURE__ */ h("div", { class: "jex-typing", children: [
|
|
4744
4767
|
/* @__PURE__ */ h("span", {}),
|
|
4745
4768
|
/* @__PURE__ */ h("span", {}),
|
|
4746
4769
|
/* @__PURE__ */ h("span", {})
|
|
4747
4770
|
] });
|
|
4748
4771
|
}
|
|
4749
|
-
function
|
|
4772
|
+
function Is({ sessionId: t, visitorId: e, greeting: n }) {
|
|
4750
4773
|
const r = Ge(null), i = Bo(
|
|
4751
|
-
|
|
4774
|
+
Ft.functions.chat.public.conversations.listBySession,
|
|
4752
4775
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
4753
4776
|
), o = t !== null && i === void 0;
|
|
4754
4777
|
return Q(() => {
|
|
4755
4778
|
r.current?.scrollIntoView({ behavior: "smooth" });
|
|
4756
4779
|
}, [i?.length]), /* @__PURE__ */ h("div", { class: "jex-chat-messages", children: [
|
|
4757
|
-
/* @__PURE__ */ h(
|
|
4758
|
-
o && /* @__PURE__ */ h(
|
|
4780
|
+
/* @__PURE__ */ h(kn, { text: n }),
|
|
4781
|
+
o && /* @__PURE__ */ h(qs, {}),
|
|
4759
4782
|
i?.map(
|
|
4760
|
-
(s) => s.role === "user" ? /* @__PURE__ */ h(
|
|
4783
|
+
(s) => s.role === "user" ? /* @__PURE__ */ h(Es, { text: s.content }, s._id) : /* @__PURE__ */ h(kn, { text: s.content }, s._id)
|
|
4761
4784
|
),
|
|
4762
4785
|
/* @__PURE__ */ h("div", { ref: r })
|
|
4763
4786
|
] });
|
|
4764
4787
|
}
|
|
4765
|
-
function
|
|
4788
|
+
function Ms({ size: t = 18 }) {
|
|
4766
4789
|
return /* @__PURE__ */ h("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4767
4790
|
/* @__PURE__ */ h("path", { d: "M22 2 11 13" }),
|
|
4768
4791
|
/* @__PURE__ */ h("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
4769
4792
|
] });
|
|
4770
4793
|
}
|
|
4771
|
-
function
|
|
4772
|
-
const i = re(), o =
|
|
4794
|
+
function Ps({ sessionId: t, visitorId: e, isLoading: n, ensureSession: r }) {
|
|
4795
|
+
const i = re(), o = Lt(""), s = pr(Ft.functions.chat.public.conversations.send);
|
|
4773
4796
|
async function a() {
|
|
4774
4797
|
const c = o.value.trim();
|
|
4775
4798
|
if (!c || n)
|
|
4776
4799
|
return;
|
|
4777
4800
|
const u = t && e ? { sessionId: t, visitorId: e } : await r();
|
|
4778
|
-
u && (
|
|
4801
|
+
u && (_s(), o.value = "", s({
|
|
4779
4802
|
sessionId: u.sessionId,
|
|
4780
4803
|
visitorId: u.visitorId,
|
|
4781
4804
|
content: c
|
|
@@ -4806,16 +4829,16 @@ function qs({ sessionId: t, visitorId: e, isLoading: n, ensureSession: r }) {
|
|
|
4806
4829
|
onClick: a,
|
|
4807
4830
|
"aria-label": i.sendAriaLabel,
|
|
4808
4831
|
disabled: n,
|
|
4809
|
-
children: /* @__PURE__ */ h(
|
|
4832
|
+
children: /* @__PURE__ */ h(Ms, { size: 18 })
|
|
4810
4833
|
}
|
|
4811
4834
|
)
|
|
4812
4835
|
] });
|
|
4813
4836
|
}
|
|
4814
|
-
function
|
|
4815
|
-
const { sessionId: n, visitorId: r, isLoading: i, ensureSession: o } =
|
|
4837
|
+
function Os({ greeting: t, orgSlug: e }) {
|
|
4838
|
+
const { sessionId: n, visitorId: r, isLoading: i, ensureSession: o } = $s(e);
|
|
4816
4839
|
return /* @__PURE__ */ h(M, { children: [
|
|
4817
4840
|
/* @__PURE__ */ h(
|
|
4818
|
-
|
|
4841
|
+
Is,
|
|
4819
4842
|
{
|
|
4820
4843
|
sessionId: n,
|
|
4821
4844
|
visitorId: r,
|
|
@@ -4823,7 +4846,7 @@ function Is({ greeting: t, orgSlug: e }) {
|
|
|
4823
4846
|
}
|
|
4824
4847
|
),
|
|
4825
4848
|
/* @__PURE__ */ h(
|
|
4826
|
-
|
|
4849
|
+
Ps,
|
|
4827
4850
|
{
|
|
4828
4851
|
sessionId: n,
|
|
4829
4852
|
visitorId: r,
|
|
@@ -4833,14 +4856,14 @@ function Is({ greeting: t, orgSlug: e }) {
|
|
|
4833
4856
|
)
|
|
4834
4857
|
] });
|
|
4835
4858
|
}
|
|
4836
|
-
function
|
|
4859
|
+
function Ls() {
|
|
4837
4860
|
const t = re(), [e, n] = I(""), [r, i] = I(""), [o, s] = I("");
|
|
4838
4861
|
async function a(c) {
|
|
4839
|
-
c.preventDefault(),
|
|
4862
|
+
c.preventDefault(), St({ id: "loading", message: t.submittingTicket }), await new Promise((f) => {
|
|
4840
4863
|
setTimeout(f, 1200);
|
|
4841
4864
|
});
|
|
4842
4865
|
const u = "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4843
|
-
|
|
4866
|
+
St({ id: "confirmation", ref: u });
|
|
4844
4867
|
}
|
|
4845
4868
|
return /* @__PURE__ */ h("div", { class: "jex-form-screen", children: [
|
|
4846
4869
|
/* @__PURE__ */ h("h2", { class: "jex-form-title", children: t.submitTicket }),
|
|
@@ -4889,7 +4912,7 @@ function Ms() {
|
|
|
4889
4912
|
] })
|
|
4890
4913
|
] });
|
|
4891
4914
|
}
|
|
4892
|
-
function
|
|
4915
|
+
function Ns({ ticketRef: t }) {
|
|
4893
4916
|
const e = re();
|
|
4894
4917
|
return /* @__PURE__ */ h("div", { class: "jex-confirmation", children: [
|
|
4895
4918
|
/* @__PURE__ */ h("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
@@ -4909,13 +4932,13 @@ function Ps({ ticketRef: t }) {
|
|
|
4909
4932
|
)
|
|
4910
4933
|
] });
|
|
4911
4934
|
}
|
|
4912
|
-
function
|
|
4935
|
+
function Qs({ message: t }) {
|
|
4913
4936
|
return /* @__PURE__ */ h("div", { class: "jex-overlay jex-loading", children: [
|
|
4914
4937
|
/* @__PURE__ */ h("div", { class: "jex-loading-spinner", "aria-hidden": "true" }),
|
|
4915
4938
|
t && /* @__PURE__ */ h("p", { class: "jex-loading-message", children: t })
|
|
4916
4939
|
] });
|
|
4917
4940
|
}
|
|
4918
|
-
function
|
|
4941
|
+
function Fs({ message: t, onRetry: e, onBack: n }) {
|
|
4919
4942
|
return /* @__PURE__ */ h("div", { class: "jex-overlay jex-error", children: [
|
|
4920
4943
|
/* @__PURE__ */ h("p", { class: "jex-error-message", children: t }),
|
|
4921
4944
|
/* @__PURE__ */ h("div", { class: "jex-error-actions", children: [
|
|
@@ -4924,37 +4947,37 @@ function Ls({ message: t, onRetry: e, onBack: n }) {
|
|
|
4924
4947
|
] })
|
|
4925
4948
|
] });
|
|
4926
4949
|
}
|
|
4927
|
-
function
|
|
4950
|
+
function Vs({ greeting: t, title: e, orgSlug: n }) {
|
|
4928
4951
|
const r = W.value, i = r[r.length - 1], o = r.findLast(
|
|
4929
4952
|
(s) => s.id === "confirmation"
|
|
4930
4953
|
);
|
|
4931
4954
|
return /* @__PURE__ */ h("div", { class: "jex-screen-container", children: [
|
|
4932
|
-
i.id === "home" && /* @__PURE__ */ h(
|
|
4933
|
-
i.id === "selection" && /* @__PURE__ */ h(
|
|
4934
|
-
i.id === "form" && /* @__PURE__ */ h(
|
|
4935
|
-
i.id === "confirmation" && o && /* @__PURE__ */ h(
|
|
4936
|
-
i.id === "chat" && /* @__PURE__ */ h(
|
|
4937
|
-
i.id === "loading" && /* @__PURE__ */ h(
|
|
4955
|
+
i.id === "home" && /* @__PURE__ */ h(Ts, { greeting: t, title: e }),
|
|
4956
|
+
i.id === "selection" && /* @__PURE__ */ h(Rs, { title: e }),
|
|
4957
|
+
i.id === "form" && /* @__PURE__ */ h(Ls, {}),
|
|
4958
|
+
i.id === "confirmation" && o && /* @__PURE__ */ h(Ns, { ticketRef: o.ref }),
|
|
4959
|
+
i.id === "chat" && /* @__PURE__ */ h(Os, { greeting: t, orgSlug: n }),
|
|
4960
|
+
i.id === "loading" && /* @__PURE__ */ h(Qs, { message: i.message }),
|
|
4938
4961
|
i.id === "error" && /* @__PURE__ */ h(
|
|
4939
|
-
|
|
4962
|
+
Fs,
|
|
4940
4963
|
{
|
|
4941
4964
|
message: i.message,
|
|
4942
|
-
onRetry: () =>
|
|
4943
|
-
onBack:
|
|
4965
|
+
onRetry: () => St({ id: "loading" }),
|
|
4966
|
+
onBack: Ar
|
|
4944
4967
|
}
|
|
4945
4968
|
)
|
|
4946
4969
|
] });
|
|
4947
4970
|
}
|
|
4948
|
-
function
|
|
4949
|
-
const e =
|
|
4950
|
-
|
|
4951
|
-
|
|
4971
|
+
function Us({ options: t }) {
|
|
4972
|
+
const e = as(t.orgSlug, t.convexUrl);
|
|
4973
|
+
fs(t.parentOrigin), Q(() => {
|
|
4974
|
+
gs();
|
|
4952
4975
|
}, []);
|
|
4953
|
-
const n =
|
|
4976
|
+
const n = os(t, e);
|
|
4954
4977
|
Q(() => {
|
|
4955
|
-
|
|
4978
|
+
Nt.value = jr(n.locale);
|
|
4956
4979
|
}, [n.locale]);
|
|
4957
|
-
const r = n.position === "bottom-left", i = n.colorScheme === "dark" || n.colorScheme === "light" ? n.colorScheme : "", o =
|
|
4980
|
+
const r = n.position === "bottom-left", i = n.colorScheme === "dark" || n.colorScheme === "light" ? n.colorScheme : "", o = ms({
|
|
4958
4981
|
...t,
|
|
4959
4982
|
primaryColor: n.primaryColor,
|
|
4960
4983
|
accentColor: n.accentColor,
|
|
@@ -4971,12 +4994,12 @@ function Qs({ options: t }) {
|
|
|
4971
4994
|
style: o,
|
|
4972
4995
|
children: /* @__PURE__ */ h("div", { class: `jex-container${r ? " jex-pos-left" : ""}`, children: [
|
|
4973
4996
|
R.value && /* @__PURE__ */ h("div", { class: "jex-chat-window", children: [
|
|
4974
|
-
/* @__PURE__ */ h(
|
|
4975
|
-
/* @__PURE__ */ h(
|
|
4976
|
-
!n.hideBranding && /* @__PURE__ */ h(
|
|
4997
|
+
/* @__PURE__ */ h(ys, { title: n.title }),
|
|
4998
|
+
/* @__PURE__ */ h(Vs, { greeting: n.greeting, title: n.title, orgSlug: t.orgSlug }),
|
|
4999
|
+
!n.hideBranding && /* @__PURE__ */ h(bs, {})
|
|
4977
5000
|
] }),
|
|
4978
5001
|
/* @__PURE__ */ h(
|
|
4979
|
-
|
|
5002
|
+
js,
|
|
4980
5003
|
{
|
|
4981
5004
|
iconOption: n.triggerIcon,
|
|
4982
5005
|
radius: n.triggerRadius,
|
|
@@ -4987,29 +5010,34 @@ function Qs({ options: t }) {
|
|
|
4987
5010
|
}
|
|
4988
5011
|
);
|
|
4989
5012
|
}
|
|
4990
|
-
const Fs = '.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-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)}@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-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}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:16px;padding:20px;font-size:15px;line-height:1.5;color:var(--jex-text-main)}.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;width:100%}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px)}.jex-home-start-btn:active{transform:translateY(0)}.jex-home-actions{display:flex;flex-direction:column;gap:8px}.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;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted)}.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{max-width:80%;padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{align-self:flex-start;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;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-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px;flex-shrink:0}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275);flex-shrink:0}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-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:6px;width:100%}.jex-home-lookup-input{flex:1;padding:8px 10px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:13px;outline:none}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:8px 14px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer}';
|
|
4991
|
-
function
|
|
5013
|
+
const Bs = '.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-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)}@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-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}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:16px;padding:20px;font-size:15px;line-height:1.5;color:var(--jex-text-main)}.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;width:100%}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px)}.jex-home-start-btn:active{transform:translateY(0)}.jex-home-actions{display:flex;flex-direction:column;gap:8px}.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;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted)}.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{max-width:80%;padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{align-self:flex-start;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;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-chat-input{padding:16px;border-top:1px solid var(--jex-border-window);display:flex;gap:8px;flex-shrink:0}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s cubic-bezier(.175,.885,.32,1.275);flex-shrink:0}.jex-send-btn:hover{transform:scale(1.05);background:var(--jex-primary-hover)}.jex-send-btn:active{transform:scale(.95)}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-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:6px;width:100%}.jex-home-lookup-input{flex:1;padding:8px 10px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:13px;outline:none}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:8px 14px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer}';
|
|
5014
|
+
function Ds(t) {
|
|
4992
5015
|
const e = document.createElement("style");
|
|
4993
|
-
e.textContent =
|
|
5016
|
+
e.textContent = Bs, t.appendChild(e);
|
|
4994
5017
|
}
|
|
4995
|
-
const
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
5018
|
+
const Ws = "https://striped-woodpecker-382.convex.cloud";
|
|
5019
|
+
let ht = null;
|
|
5020
|
+
function zs(t) {
|
|
5021
|
+
const e = t ?? Ws;
|
|
5022
|
+
if (!e)
|
|
5023
|
+
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
5024
|
+
return ht || (ht = new Fo(rs(e))), ht;
|
|
5025
|
+
}
|
|
5026
|
+
function Hs(t, e) {
|
|
4999
5027
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
5000
5028
|
for (; n.firstChild; )
|
|
5001
5029
|
n.removeChild(n.firstChild);
|
|
5002
|
-
|
|
5030
|
+
Ds(n);
|
|
5003
5031
|
const r = document.createElement("div");
|
|
5004
5032
|
return n.appendChild(r), Z(
|
|
5005
|
-
/* @__PURE__ */ h(
|
|
5033
|
+
/* @__PURE__ */ h(Uo, { client: zs(e.convexUrl), children: /* @__PURE__ */ h(Us, { options: e }) }),
|
|
5006
5034
|
r
|
|
5007
5035
|
), function() {
|
|
5008
5036
|
Z(null, r), R.value = !1;
|
|
5009
5037
|
};
|
|
5010
5038
|
}
|
|
5011
|
-
function
|
|
5012
|
-
const r =
|
|
5039
|
+
function Js(t, e, n) {
|
|
5040
|
+
const r = Hs(t, e), i = /* @__PURE__ */ new Set(), o = R.subscribe((a) => {
|
|
5013
5041
|
for (const c of i)
|
|
5014
5042
|
c(a);
|
|
5015
5043
|
});
|
|
@@ -5037,16 +5065,16 @@ function Ws(t, e, n) {
|
|
|
5037
5065
|
};
|
|
5038
5066
|
}
|
|
5039
5067
|
let ye = null;
|
|
5040
|
-
function
|
|
5068
|
+
function Ks(t) {
|
|
5041
5069
|
ye && ye.shutdown();
|
|
5042
5070
|
let e;
|
|
5043
5071
|
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));
|
|
5044
|
-
const n =
|
|
5072
|
+
const n = Js(e, t, () => {
|
|
5045
5073
|
t.container || e.remove(), ye === n && (ye = null);
|
|
5046
5074
|
});
|
|
5047
5075
|
return ye = n, n;
|
|
5048
5076
|
}
|
|
5049
5077
|
export {
|
|
5050
|
-
|
|
5078
|
+
Ks as JexityChat
|
|
5051
5079
|
};
|
|
5052
5080
|
//# sourceMappingURL=index.mjs.map
|