@evelan/jexity-widget 0.0.1 → 0.1.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,99 +1,99 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.jex-widget{--jex-primary: #0070f3;--jex-primary-hover: #0060df;--jex-bg-glass: rgba(255, 255, 255, .7);--jex-border-glass: rgba(255, 255, 255, .3);--jex-text-main: #171717;--jex-text-muted: #666;--jex-shadow: 0 8px 32px 0 rgba(31, 38, 135, .15);--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}@media(prefers-color-scheme:dark){.jex-widget{--jex-bg-glass: rgba(20, 20, 20, .8);--jex-border-glass: rgba(255, 255, 255, .1);--jex-text-main: #ededed;--jex-text-muted: #a1a1a1}}.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{width:56px;height:56px;border-radius:28px;background:var(--jex-primary);color:#fff;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}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:380px;height:600px;max-height:calc(100vh - 120px);background:var(--jex-bg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--jex-border-glass);border-radius:24px;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-primary);color:#fff;display:flex;align-items:center;gap:12px}.jex-header-info h3{font-size:16px;font-weight:600;color:#fff;margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:#fff;margin:0}.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:#ffffff1a;border:1px solid var(--jex-border-glass);color:var(--jex-text-main);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;background:var(--jex-primary);color:#fff;border-bottom-right-radius:4px}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-glass);display:flex;gap:8px}.jex-chat-input input{flex:1;background:#ffffff0d;border:1px solid var(--jex-border-glass);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-primary);color:#fff;border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .2s}.jex-send-btn:hover{opacity:.9}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- var ie, v, Oe, Fe, P, we, Ie, We, qe, de, ue, le, q = {}, Re = [], at = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, z = Array.isArray;
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.jex-widget{--jex-primary: #0070f3;--jex-primary-hover: #0060df;--jex-bg-glass: rgba(255, 255, 255, .7);--jex-border-glass: rgba(255, 255, 255, .3);--jex-text-main: #171717;--jex-text-muted: #666;--jex-shadow: 0 8px 32px 0 rgba(31, 38, 135, .15);--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}@media(prefers-color-scheme:dark){.jex-widget{--jex-bg-glass: rgba(20, 20, 20, .8);--jex-border-glass: rgba(255, 255, 255, .1);--jex-text-main: #ededed;--jex-text-muted: #a1a1a1}}.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{width:56px;height:56px;border-radius:28px;background:var(--jex-primary);color:#fff;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}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:380px;height:600px;max-height:calc(100vh - 120px);background:var(--jex-bg-glass);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--jex-border-glass);border-radius:24px;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-primary);color:#fff;display:flex;align-items:center;gap:12px}.jex-header-info h3{font-size:16px;font-weight:600;color:#fff;margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:#fff;margin:0}.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:#ffffff1a;border:1px solid var(--jex-border-glass);color:var(--jex-text-main);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;background:var(--jex-primary);color:#fff;border-bottom-right-radius:4px}.jex-chat-input{padding:16px;border-top:1px solid var(--jex-border-glass);display:flex;gap:8px}.jex-chat-input input{flex:1;background:#ffffff0d;border:1px solid var(--jex-border-glass);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:var(--jex-primary);color:#fff;border:none;border-radius:12px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .2s}.jex-send-btn:hover{opacity:.9}.jex-locale-footer{display:flex;align-items:center;justify-content:center;gap:4px;padding:6px 0 4px;border-top:1px solid var(--jex-border-glass)}.jex-locale-btn{background:none;border:none;cursor:pointer;font-size:11px;font-weight:500;color:var(--jex-text-muted);padding:2px 4px;border-radius:3px;transition:color .15s}.jex-locale-btn:hover{color:var(--jex-text-main)}.jex-locale-btn.jex-locale-active{color:var(--jex-primary);font-weight:700;text-decoration:underline;text-underline-offset:2px}.jex-locale-sep{color:var(--jex-text-muted);font-size:11px;-webkit-user-select:none;user-select:none}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
+ var re, v, qe, Be, P, xe, ze, Ge, Ve, ye, ce, fe, q = {}, Ze = [], yt = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, G = Array.isArray;
3
3
  function N(t, e) {
4
4
  for (var n in e) t[n] = e[n];
5
5
  return t;
6
6
  }
7
- function ve(t) {
7
+ function me(t) {
8
8
  t && t.parentNode && t.parentNode.removeChild(t);
9
9
  }
10
- function R(t, e, n) {
11
- var i, _, r, s = {};
12
- for (r in e) r == "key" ? i = e[r] : r == "ref" ? _ = e[r] : s[r] = e[r];
13
- if (arguments.length > 2 && (s.children = arguments.length > 3 ? ie.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (r in t.defaultProps) s[r] === void 0 && (s[r] = t.defaultProps[r]);
14
- return X(t, s, i, _, null);
10
+ function B(t, e, n) {
11
+ var i, o, r, a = {};
12
+ for (r in e) r == "key" ? i = e[r] : r == "ref" ? o = e[r] : a[r] = e[r];
13
+ if (arguments.length > 2 && (a.children = arguments.length > 3 ? re.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (r in t.defaultProps) a[r] === void 0 && (a[r] = t.defaultProps[r]);
14
+ return X(t, a, i, o, null);
15
15
  }
16
- function X(t, e, n, i, _) {
17
- var r = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: _ ?? ++Oe, __i: -1, __u: 0 };
18
- return _ == null && v.vnode != null && v.vnode(r), r;
16
+ function X(t, e, n, i, o) {
17
+ var r = { type: t, props: e, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++qe, __i: -1, __u: 0 };
18
+ return o == null && v.vnode != null && v.vnode(r), r;
19
19
  }
20
- function B(t) {
20
+ function V(t) {
21
21
  return t.children;
22
22
  }
23
- function I(t, e) {
23
+ function W(t, e) {
24
24
  this.props = t, this.context = e;
25
25
  }
26
- function M(t, e) {
27
- if (e == null) return t.__ ? M(t.__, t.__i + 1) : null;
26
+ function U(t, e) {
27
+ if (e == null) return t.__ ? U(t.__, t.__i + 1) : null;
28
28
  for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
29
- return typeof t.type == "function" ? M(t) : null;
29
+ return typeof t.type == "function" ? U(t) : null;
30
30
  }
31
- function ze(t) {
31
+ function Je(t) {
32
32
  var e, n;
33
33
  if ((t = t.__) != null && t.__c != null) {
34
34
  for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
35
35
  t.__e = t.__c.base = n.__e;
36
36
  break;
37
37
  }
38
- return ze(t);
38
+ return Je(t);
39
39
  }
40
40
  }
41
- function $e(t) {
42
- (!t.__d && (t.__d = !0) && P.push(t) && !Q.__r++ || we != v.debounceRendering) && ((we = v.debounceRendering) || Ie)(Q);
41
+ function Se(t) {
42
+ (!t.__d && (t.__d = !0) && P.push(t) && !te.__r++ || xe != v.debounceRendering) && ((xe = v.debounceRendering) || ze)(te);
43
43
  }
44
- function Q() {
45
- for (var t, e, n, i, _, r, s, l = 1; P.length; ) P.length > l && P.sort(We), t = P.shift(), l = P.length, t.__d && (n = void 0, i = void 0, _ = (i = (e = t).__v).__e, r = [], s = [], e.__P && ((n = N({}, i)).__v = i.__v + 1, v.vnode && v.vnode(n), pe(e.__P, n, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [_] : null, r, _ ?? M(i), !!(32 & i.__u), s), n.__v = i.__v, n.__.__k[n.__i] = n, Je(r, n, s), i.__e = i.__ = null, n.__e != _ && ze(n)));
46
- Q.__r = 0;
44
+ function te() {
45
+ for (var t, e, n, i, o, r, a, s = 1; P.length; ) P.length > s && P.sort(Ge), t = P.shift(), s = P.length, t.__d && (n = void 0, i = void 0, o = (i = (e = t).__v).__e, r = [], a = [], e.__P && ((n = N({}, i)).__v = i.__v + 1, v.vnode && v.vnode(n), ge(e.__P, n, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [o] : null, r, o ?? U(i), !!(32 & i.__u), a), n.__v = i.__v, n.__.__k[n.__i] = n, Xe(r, n, a), i.__e = i.__ = null, n.__e != o && Je(n)));
46
+ te.__r = 0;
47
47
  }
48
- function Be(t, e, n, i, _, r, s, l, f, u, c) {
49
- var o, h, a, b, x, w, p, y = i && i.__k || Re, E = e.length;
50
- for (f = ct(n, e, y, f, E), o = 0; o < E; o++) (a = n.__k[o]) != null && (h = a.__i == -1 ? q : y[a.__i] || q, a.__i = o, w = pe(t, a, h, _, r, s, l, f, u, c), b = a.__e, a.ref && h.ref != a.ref && (h.ref && ye(h.ref, null, a), c.push(a.ref, a.__c || b, a)), x == null && b != null && (x = b), (p = !!(4 & a.__u)) || h.__k === a.__k ? f = Ve(a, f, t, p) : typeof a.type == "function" && w !== void 0 ? f = w : b && (f = b.nextSibling), a.__u &= -7);
51
- return n.__e = x, f;
48
+ function Ke(t, e, n, i, o, r, a, s, u, l, f) {
49
+ var _, h, c, w, x, $, p, y = i && i.__k || Ze, E = e.length;
50
+ for (u = mt(n, e, y, u, E), _ = 0; _ < E; _++) (c = n.__k[_]) != null && (h = c.__i == -1 ? q : y[c.__i] || q, c.__i = _, $ = ge(t, c, h, o, r, a, s, u, l, f), w = c.__e, c.ref && h.ref != c.ref && (h.ref && be(h.ref, null, c), f.push(c.ref, c.__c || w, c)), x == null && w != null && (x = w), (p = !!(4 & c.__u)) || h.__k === c.__k ? u = Qe(c, u, t, p) : typeof c.type == "function" && $ !== void 0 ? u = $ : w && (u = w.nextSibling), c.__u &= -7);
51
+ return n.__e = x, u;
52
52
  }
53
- function ct(t, e, n, i, _) {
54
- var r, s, l, f, u, c = n.length, o = c, h = 0;
55
- for (t.__k = new Array(_), r = 0; r < _; r++) (s = e[r]) != null && typeof s != "boolean" && typeof s != "function" ? (f = r + h, (s = t.__k[r] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? X(null, s, null, null, null) : z(s) ? X(B, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? X(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, l = null, (u = s.__i = ht(s, n, f, o)) != -1 && (o--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (_ > c ? h-- : _ < c && h++), typeof s.type != "function" && (s.__u |= 4)) : u != f && (u == f - 1 ? h-- : u == f + 1 ? h++ : (u > f ? h-- : h++, s.__u |= 4))) : t.__k[r] = null;
56
- if (o) for (r = 0; r < c; r++) (l = n[r]) != null && (2 & l.__u) == 0 && (l.__e == i && (i = M(l)), Ke(l, l));
53
+ function mt(t, e, n, i, o) {
54
+ var r, a, s, u, l, f = n.length, _ = f, h = 0;
55
+ for (t.__k = new Array(o), r = 0; r < o; r++) (a = e[r]) != null && typeof a != "boolean" && typeof a != "function" ? (u = r + h, (a = t.__k[r] = typeof a == "string" || typeof a == "number" || typeof a == "bigint" || a.constructor == String ? X(null, a, null, null, null) : G(a) ? X(V, { children: a }, null, null, null) : a.constructor == null && a.__b > 0 ? X(a.type, a.props, a.key, a.ref ? a.ref : null, a.__v) : a).__ = t, a.__b = t.__b + 1, s = null, (l = a.__i = gt(a, n, u, _)) != -1 && (_--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (o > f ? h-- : o < f && h++), typeof a.type != "function" && (a.__u |= 4)) : l != u && (l == u - 1 ? h-- : l == u + 1 ? h++ : (l > u ? h-- : h++, a.__u |= 4))) : t.__k[r] = null;
56
+ if (_) for (r = 0; r < f; r++) (s = n[r]) != null && (2 & s.__u) == 0 && (s.__e == i && (i = U(s)), tt(s, s));
57
57
  return i;
58
58
  }
59
- function Ve(t, e, n, i) {
60
- var _, r;
59
+ function Qe(t, e, n, i) {
60
+ var o, r;
61
61
  if (typeof t.type == "function") {
62
- for (_ = t.__k, r = 0; _ && r < _.length; r++) _[r] && (_[r].__ = t, e = Ve(_[r], e, n, i));
62
+ for (o = t.__k, r = 0; o && r < o.length; r++) o[r] && (o[r].__ = t, e = Qe(o[r], e, n, i));
63
63
  return e;
64
64
  }
65
- t.__e != e && (i && (e && t.type && !e.parentNode && (e = M(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
65
+ t.__e != e && (i && (e && t.type && !e.parentNode && (e = U(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
66
66
  do
67
67
  e = e && e.nextSibling;
68
68
  while (e != null && e.nodeType == 8);
69
69
  return e;
70
70
  }
71
- function Ze(t, e) {
72
- return e = e || [], t == null || typeof t == "boolean" || (z(t) ? t.some(function(n) {
73
- Ze(n, e);
71
+ function Ye(t, e) {
72
+ return e = e || [], t == null || typeof t == "boolean" || (G(t) ? t.some(function(n) {
73
+ Ye(n, e);
74
74
  }) : e.push(t)), e;
75
75
  }
76
- function ht(t, e, n, i) {
77
- var _, r, s, l = t.key, f = t.type, u = e[n], c = u != null && (2 & u.__u) == 0;
78
- if (u === null && t.key == null || c && l == u.key && f == u.type) return n;
79
- if (i > (c ? 1 : 0)) {
80
- for (_ = n - 1, r = n + 1; _ >= 0 || r < e.length; ) if ((u = e[s = _ >= 0 ? _-- : r++]) != null && (2 & u.__u) == 0 && l == u.key && f == u.type) return s;
76
+ function gt(t, e, n, i) {
77
+ var o, r, a, s = t.key, u = t.type, l = e[n], f = l != null && (2 & l.__u) == 0;
78
+ if (l === null && t.key == null || f && s == l.key && u == l.type) return n;
79
+ if (i > (f ? 1 : 0)) {
80
+ for (o = n - 1, r = n + 1; o >= 0 || r < e.length; ) if ((l = e[a = o >= 0 ? o-- : r++]) != null && (2 & l.__u) == 0 && s == l.key && u == l.type) return a;
81
81
  }
82
82
  return -1;
83
83
  }
84
- function ke(t, e, n) {
85
- e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || at.test(e) ? n : n + "px";
84
+ function Ce(t, e, n) {
85
+ e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || yt.test(e) ? n : n + "px";
86
86
  }
87
- function G(t, e, n, i, _) {
88
- var r, s;
87
+ function Q(t, e, n, i, o) {
88
+ var r, a;
89
89
  e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
90
90
  else {
91
- if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || ke(t.style, e, "");
92
- if (n) for (e in n) i && n[e] == i[e] || ke(t.style, e, n[e]);
91
+ if (typeof i == "string" && (t.style.cssText = i = ""), i) for (e in i) n && e in n || Ce(t.style, e, "");
92
+ if (n) for (e in n) i && n[e] == i[e] || Ce(t.style, e, n[e]);
93
93
  }
94
- else if (e[0] == "o" && e[1] == "n") r = e != (e = e.replace(qe, "$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 + r] = n, n ? i ? n.u = i.u : (n.u = de, t.addEventListener(e, r ? le : ue, r)) : t.removeEventListener(e, r ? le : ue, r);
94
+ else if (e[0] == "o" && e[1] == "n") r = e != (e = e.replace(Ve, "$1")), a = e.toLowerCase(), e = a in t || e == "onFocusOut" || e == "onFocusIn" ? a.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + r] = n, n ? i ? n.u = i.u : (n.u = ye, t.addEventListener(e, r ? fe : ce, r)) : t.removeEventListener(e, r ? fe : ce, r);
95
95
  else {
96
- if (_ == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
96
+ if (o == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
97
97
  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 {
98
98
  t[e] = n ?? "";
99
99
  break e;
@@ -102,115 +102,115 @@ function G(t, e, n, i, _) {
102
102
  typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
103
103
  }
104
104
  }
105
- function xe(t) {
105
+ function Ne(t) {
106
106
  return function(e) {
107
107
  if (this.l) {
108
108
  var n = this.l[e.type + t];
109
- if (e.t == null) e.t = de++;
109
+ if (e.t == null) e.t = ye++;
110
110
  else if (e.t < n.u) return;
111
111
  return n(v.event ? v.event(e) : e);
112
112
  }
113
113
  };
114
114
  }
115
- function pe(t, e, n, i, _, r, s, l, f, u) {
116
- var c, o, h, a, b, x, w, p, y, E, H, Z, L, be, J, O, oe, C = e.type;
115
+ function ge(t, e, n, i, o, r, a, s, u, l) {
116
+ var f, _, h, c, w, x, $, p, y, E, L, J, O, ke, K, I, le, C = e.type;
117
117
  if (e.constructor != null) return null;
118
- 128 & n.__u && (f = !!(32 & n.__u), r = [l = e.__e = n.__e]), (c = v.__b) && c(e);
118
+ 128 & n.__u && (u = !!(32 & n.__u), r = [s = e.__e = n.__e]), (f = v.__b) && f(e);
119
119
  e: if (typeof C == "function") try {
120
- if (p = e.props, y = "prototype" in C && C.prototype.render, E = (c = C.contextType) && i[c.__c], H = c ? E ? E.props.value : c.__ : i, n.__c ? w = (o = e.__c = n.__c).__ = o.__E : (y ? e.__c = o = new C(p, H) : (e.__c = o = new I(p, H), o.constructor = C, o.render = vt), E && E.sub(o), o.props = p, o.state || (o.state = {}), o.context = H, o.__n = i, h = o.__d = !0, o.__h = [], o._sb = []), y && o.__s == null && (o.__s = o.state), y && C.getDerivedStateFromProps != null && (o.__s == o.state && (o.__s = N({}, o.__s)), N(o.__s, C.getDerivedStateFromProps(p, o.__s))), a = o.props, b = o.state, o.__v = e, h) y && C.getDerivedStateFromProps == null && o.componentWillMount != null && o.componentWillMount(), y && o.componentDidMount != null && o.__h.push(o.componentDidMount);
120
+ if (p = e.props, y = "prototype" in C && C.prototype.render, E = (f = C.contextType) && i[f.__c], L = f ? E ? E.props.value : f.__ : i, n.__c ? $ = (_ = e.__c = n.__c).__ = _.__E : (y ? e.__c = _ = new C(p, L) : (e.__c = _ = new W(p, L), _.constructor = C, _.render = wt), E && E.sub(_), _.props = p, _.state || (_.state = {}), _.context = L, _.__n = i, h = _.__d = !0, _.__h = [], _._sb = []), y && _.__s == null && (_.__s = _.state), y && C.getDerivedStateFromProps != null && (_.__s == _.state && (_.__s = N({}, _.__s)), N(_.__s, C.getDerivedStateFromProps(p, _.__s))), c = _.props, w = _.state, _.__v = e, h) y && C.getDerivedStateFromProps == null && _.componentWillMount != null && _.componentWillMount(), y && _.componentDidMount != null && _.__h.push(_.componentDidMount);
121
121
  else {
122
- if (y && C.getDerivedStateFromProps == null && p !== a && o.componentWillReceiveProps != null && o.componentWillReceiveProps(p, H), !o.__e && o.shouldComponentUpdate != null && o.shouldComponentUpdate(p, o.__s, H) === !1 || e.__v == n.__v) {
123
- for (e.__v != n.__v && (o.props = p, o.state = o.__s, o.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(A) {
124
- A && (A.__ = e);
125
- }), Z = 0; Z < o._sb.length; Z++) o.__h.push(o._sb[Z]);
126
- o._sb = [], o.__h.length && s.push(o);
122
+ if (y && C.getDerivedStateFromProps == null && p !== c && _.componentWillReceiveProps != null && _.componentWillReceiveProps(p, L), !_.__e && _.shouldComponentUpdate != null && _.shouldComponentUpdate(p, _.__s, L) === !1 || e.__v == n.__v) {
123
+ for (e.__v != n.__v && (_.props = p, _.state = _.__s, _.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(H) {
124
+ H && (H.__ = e);
125
+ }), J = 0; J < _._sb.length; J++) _.__h.push(_._sb[J]);
126
+ _._sb = [], _.__h.length && a.push(_);
127
127
  break e;
128
128
  }
129
- o.componentWillUpdate != null && o.componentWillUpdate(p, o.__s, H), y && o.componentDidUpdate != null && o.__h.push(function() {
130
- o.componentDidUpdate(a, b, x);
129
+ _.componentWillUpdate != null && _.componentWillUpdate(p, _.__s, L), y && _.componentDidUpdate != null && _.__h.push(function() {
130
+ _.componentDidUpdate(c, w, x);
131
131
  });
132
132
  }
133
- if (o.context = H, o.props = p, o.__P = t, o.__e = !1, L = v.__r, be = 0, y) {
134
- for (o.state = o.__s, o.__d = !1, L && L(e), c = o.render(o.props, o.state, o.context), J = 0; J < o._sb.length; J++) o.__h.push(o._sb[J]);
135
- o._sb = [];
133
+ if (_.context = L, _.props = p, _.__P = t, _.__e = !1, O = v.__r, ke = 0, y) {
134
+ for (_.state = _.__s, _.__d = !1, O && O(e), f = _.render(_.props, _.state, _.context), K = 0; K < _._sb.length; K++) _.__h.push(_._sb[K]);
135
+ _._sb = [];
136
136
  } else do
137
- o.__d = !1, L && L(e), c = o.render(o.props, o.state, o.context), o.state = o.__s;
138
- while (o.__d && ++be < 25);
139
- o.state = o.__s, o.getChildContext != null && (i = N(N({}, i), o.getChildContext())), y && !h && o.getSnapshotBeforeUpdate != null && (x = o.getSnapshotBeforeUpdate(a, b)), O = c, c != null && c.type === B && c.key == null && (O = Ge(c.props.children)), l = Be(t, z(O) ? O : [O], e, n, i, _, r, s, l, f, u), o.base = e.__e, e.__u &= -161, o.__h.length && s.push(o), w && (o.__E = o.__ = null);
140
- } catch (A) {
141
- if (e.__v = null, f || r != null) if (A.then) {
142
- for (e.__u |= f ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
143
- r[r.indexOf(l)] = null, e.__e = l;
137
+ _.__d = !1, O && O(e), f = _.render(_.props, _.state, _.context), _.state = _.__s;
138
+ while (_.__d && ++ke < 25);
139
+ _.state = _.__s, _.getChildContext != null && (i = N(N({}, i), _.getChildContext())), y && !h && _.getSnapshotBeforeUpdate != null && (x = _.getSnapshotBeforeUpdate(c, w)), I = f, f != null && f.type === V && f.key == null && (I = et(f.props.children)), s = Ke(t, G(I) ? I : [I], e, n, i, o, r, a, s, u, l), _.base = e.__e, e.__u &= -161, _.__h.length && a.push(_), $ && (_.__E = _.__ = null);
140
+ } catch (H) {
141
+ if (e.__v = null, u || r != null) if (H.then) {
142
+ for (e.__u |= u ? 160 : 128; s && s.nodeType == 8 && s.nextSibling; ) s = s.nextSibling;
143
+ r[r.indexOf(s)] = null, e.__e = s;
144
144
  } else {
145
- for (oe = r.length; oe--; ) ve(r[oe]);
146
- fe(e);
145
+ for (le = r.length; le--; ) me(r[le]);
146
+ he(e);
147
147
  }
148
- else e.__e = n.__e, e.__k = n.__k, A.then || fe(e);
149
- v.__e(A, e, n);
148
+ else e.__e = n.__e, e.__k = n.__k, H.then || he(e);
149
+ v.__e(H, e, n);
150
150
  }
151
- else r == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = dt(n.__e, e, n, i, _, r, s, f, u);
152
- return (c = v.diffed) && c(e), 128 & e.__u ? void 0 : l;
151
+ else r == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : s = e.__e = bt(n.__e, e, n, i, o, r, a, u, l);
152
+ return (f = v.diffed) && f(e), 128 & e.__u ? void 0 : s;
153
153
  }
154
- function fe(t) {
155
- t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(fe);
154
+ function he(t) {
155
+ t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(he);
156
156
  }
157
- function Je(t, e, n) {
158
- for (var i = 0; i < n.length; i++) ye(n[i], n[++i], n[++i]);
159
- v.__c && v.__c(e, t), t.some(function(_) {
157
+ function Xe(t, e, n) {
158
+ for (var i = 0; i < n.length; i++) be(n[i], n[++i], n[++i]);
159
+ v.__c && v.__c(e, t), t.some(function(o) {
160
160
  try {
161
- t = _.__h, _.__h = [], t.some(function(r) {
162
- r.call(_);
161
+ t = o.__h, o.__h = [], t.some(function(r) {
162
+ r.call(o);
163
163
  });
164
164
  } catch (r) {
165
- v.__e(r, _.__v);
165
+ v.__e(r, o.__v);
166
166
  }
167
167
  });
168
168
  }
169
- function Ge(t) {
170
- return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : z(t) ? t.map(Ge) : N({}, t);
169
+ function et(t) {
170
+ return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : G(t) ? t.map(et) : N({}, t);
171
171
  }
172
- function dt(t, e, n, i, _, r, s, l, f) {
173
- var u, c, o, h, a, b, x, w = n.props, p = e.props, y = e.type;
174
- if (y == "svg" ? _ = "http://www.w3.org/2000/svg" : y == "math" ? _ = "http://www.w3.org/1998/Math/MathML" : _ || (_ = "http://www.w3.org/1999/xhtml"), r != null) {
175
- for (u = 0; u < r.length; u++) if ((a = r[u]) && "setAttribute" in a == !!y && (y ? a.localName == y : a.nodeType == 3)) {
176
- t = a, r[u] = null;
172
+ function bt(t, e, n, i, o, r, a, s, u) {
173
+ var l, f, _, h, c, w, x, $ = n.props, p = e.props, y = e.type;
174
+ if (y == "svg" ? o = "http://www.w3.org/2000/svg" : y == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), r != null) {
175
+ for (l = 0; l < r.length; l++) if ((c = r[l]) && "setAttribute" in c == !!y && (y ? c.localName == y : c.nodeType == 3)) {
176
+ t = c, r[l] = null;
177
177
  break;
178
178
  }
179
179
  }
180
180
  if (t == null) {
181
181
  if (y == null) return document.createTextNode(p);
182
- t = document.createElementNS(_, y, p.is && p), l && (v.__m && v.__m(e, r), l = !1), r = null;
182
+ t = document.createElementNS(o, y, p.is && p), s && (v.__m && v.__m(e, r), s = !1), r = null;
183
183
  }
184
- if (y == null) w === p || l && t.data == p || (t.data = p);
184
+ if (y == null) $ === p || s && t.data == p || (t.data = p);
185
185
  else {
186
- if (r = r && ie.call(t.childNodes), w = n.props || q, !l && r != null) for (w = {}, u = 0; u < t.attributes.length; u++) w[(a = t.attributes[u]).name] = a.value;
187
- for (u in w) if (a = w[u], u != "children") {
188
- if (u == "dangerouslySetInnerHTML") o = a;
189
- else if (!(u in p)) {
190
- if (u == "value" && "defaultValue" in p || u == "checked" && "defaultChecked" in p) continue;
191
- G(t, u, null, a, _);
186
+ if (r = r && re.call(t.childNodes), $ = n.props || q, !s && r != null) for ($ = {}, l = 0; l < t.attributes.length; l++) $[(c = t.attributes[l]).name] = c.value;
187
+ for (l in $) if (c = $[l], l != "children") {
188
+ if (l == "dangerouslySetInnerHTML") _ = c;
189
+ else if (!(l in p)) {
190
+ if (l == "value" && "defaultValue" in p || l == "checked" && "defaultChecked" in p) continue;
191
+ Q(t, l, null, c, o);
192
192
  }
193
193
  }
194
- for (u in p) a = p[u], u == "children" ? h = a : u == "dangerouslySetInnerHTML" ? c = a : u == "value" ? b = a : u == "checked" ? x = a : l && typeof a != "function" || w[u] === a || G(t, u, a, w[u], _);
195
- if (c) l || o && (c.__html == o.__html || c.__html == t.innerHTML) || (t.innerHTML = c.__html), e.__k = [];
196
- else if (o && (t.innerHTML = ""), Be(e.type == "template" ? t.content : t, z(h) ? h : [h], e, n, i, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : _, r, s, r ? r[0] : n.__k && M(n, 0), l, f), r != null) for (u = r.length; u--; ) ve(r[u]);
197
- l || (u = "value", y == "progress" && b == null ? t.removeAttribute("value") : b != null && (b !== t[u] || y == "progress" && !b || y == "option" && b != w[u]) && G(t, u, b, w[u], _), u = "checked", x != null && x != t[u] && G(t, u, x, w[u], _));
194
+ for (l in p) c = p[l], l == "children" ? h = c : l == "dangerouslySetInnerHTML" ? f = c : l == "value" ? w = c : l == "checked" ? x = c : s && typeof c != "function" || $[l] === c || Q(t, l, c, $[l], o);
195
+ if (f) s || _ && (f.__html == _.__html || f.__html == t.innerHTML) || (t.innerHTML = f.__html), e.__k = [];
196
+ else if (_ && (t.innerHTML = ""), Ke(e.type == "template" ? t.content : t, G(h) ? h : [h], e, n, i, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, r, a, r ? r[0] : n.__k && U(n, 0), s, u), r != null) for (l = r.length; l--; ) me(r[l]);
197
+ s || (l = "value", y == "progress" && w == null ? t.removeAttribute("value") : w != null && (w !== t[l] || y == "progress" && !w || y == "option" && w != $[l]) && Q(t, l, w, $[l], o), l = "checked", x != null && x != t[l] && Q(t, l, x, $[l], o));
198
198
  }
199
199
  return t;
200
200
  }
201
- function ye(t, e, n) {
201
+ function be(t, e, n) {
202
202
  try {
203
203
  if (typeof t == "function") {
204
204
  var i = typeof t.__u == "function";
205
205
  i && t.__u(), i && e == null || (t.__u = t(e));
206
206
  } else t.current = e;
207
- } catch (_) {
208
- v.__e(_, n);
207
+ } catch (o) {
208
+ v.__e(o, n);
209
209
  }
210
210
  }
211
- function Ke(t, e, n) {
212
- var i, _;
213
- if (v.unmount && v.unmount(t), (i = t.ref) && (i.current && i.current != t.__e || ye(i, null, e)), (i = t.__c) != null) {
211
+ function tt(t, e, n) {
212
+ var i, o;
213
+ if (v.unmount && v.unmount(t), (i = t.ref) && (i.current && i.current != t.__e || be(i, null, e)), (i = t.__c) != null) {
214
214
  if (i.componentWillUnmount) try {
215
215
  i.componentWillUnmount();
216
216
  } catch (r) {
@@ -218,169 +218,173 @@ function Ke(t, e, n) {
218
218
  }
219
219
  i.base = i.__P = null;
220
220
  }
221
- if (i = t.__k) for (_ = 0; _ < i.length; _++) i[_] && Ke(i[_], e, n || typeof t.type != "function");
222
- n || ve(t.__e), t.__c = t.__ = t.__e = void 0;
221
+ if (i = t.__k) for (o = 0; o < i.length; o++) i[o] && tt(i[o], e, n || typeof t.type != "function");
222
+ n || me(t.__e), t.__c = t.__ = t.__e = void 0;
223
223
  }
224
- function vt(t, e, n) {
224
+ function wt(t, e, n) {
225
225
  return this.constructor(t, n);
226
226
  }
227
- function Se(t, e, n) {
228
- var i, _, r, s;
229
- e == document && (e = document.documentElement), v.__ && v.__(t, e), _ = (i = !1) ? null : e.__k, r = [], s = [], pe(e, t = e.__k = R(B, null, [t]), _ || q, q, e.namespaceURI, _ ? null : e.firstChild ? ie.call(e.childNodes) : null, r, _ ? _.__e : e.firstChild, i, s), Je(r, t, s);
227
+ function Ee(t, e, n) {
228
+ var i, o, r, a;
229
+ e == document && (e = document.documentElement), v.__ && v.__(t, e), o = (i = !1) ? null : e.__k, r = [], a = [], ge(e, t = e.__k = B(V, null, [t]), o || q, q, e.namespaceURI, o ? null : e.firstChild ? re.call(e.childNodes) : null, r, o ? o.__e : e.firstChild, i, a), Xe(r, t, a);
230
230
  }
231
- ie = Re.slice, v = { __e: function(t, e, n, i) {
232
- for (var _, r, s; e = e.__; ) if ((_ = e.__c) && !_.__) try {
233
- if ((r = _.constructor) && r.getDerivedStateFromError != null && (_.setState(r.getDerivedStateFromError(t)), s = _.__d), _.componentDidCatch != null && (_.componentDidCatch(t, i || {}), s = _.__d), s) return _.__E = _;
234
- } catch (l) {
235
- t = l;
231
+ re = Ze.slice, v = { __e: function(t, e, n, i) {
232
+ for (var o, r, a; e = e.__; ) if ((o = e.__c) && !o.__) try {
233
+ if ((r = o.constructor) && r.getDerivedStateFromError != null && (o.setState(r.getDerivedStateFromError(t)), a = o.__d), o.componentDidCatch != null && (o.componentDidCatch(t, i || {}), a = o.__d), a) return o.__E = o;
234
+ } catch (s) {
235
+ t = s;
236
236
  }
237
237
  throw t;
238
- } }, Oe = 0, Fe = function(t) {
238
+ } }, qe = 0, Be = function(t) {
239
239
  return t != null && t.constructor == null;
240
- }, I.prototype.setState = function(t, e) {
240
+ }, W.prototype.setState = function(t, e) {
241
241
  var n;
242
- 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), $e(this));
243
- }, I.prototype.forceUpdate = function(t) {
244
- this.__v && (this.__e = !0, t && this.__h.push(t), $e(this));
245
- }, I.prototype.render = B, P = [], Ie = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, We = function(t, e) {
242
+ 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), Se(this));
243
+ }, W.prototype.forceUpdate = function(t) {
244
+ this.__v && (this.__e = !0, t && this.__h.push(t), Se(this));
245
+ }, W.prototype.render = V, P = [], ze = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ge = function(t, e) {
246
246
  return t.__v.__b - e.__v.__b;
247
- }, Q.__r = 0, qe = /(PointerCapture)$|Capture$/i, de = 0, ue = xe(!1), le = xe(!0);
248
- var pt = 0;
249
- function $(t, e, n, i, _, r) {
247
+ }, te.__r = 0, Ve = /(PointerCapture)$|Capture$/i, ye = 0, ce = Ne(!1), fe = Ne(!0);
248
+ var $t = 0;
249
+ function m(t, e, n, i, o, r) {
250
250
  e || (e = {});
251
- var s, l, f = e;
252
- if ("ref" in f) for (l in f = {}, e) l == "ref" ? s = e[l] : f[l] = e[l];
253
- var u = { type: t, props: f, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --pt, __i: -1, __u: 0, __source: _, __self: r };
254
- if (typeof t == "function" && (s = t.defaultProps)) for (l in s) f[l] === void 0 && (f[l] = s[l]);
255
- return v.vnode && v.vnode(u), u;
251
+ var a, s, u = e;
252
+ if ("ref" in u) for (s in u = {}, e) s == "ref" ? a = e[s] : u[s] = e[s];
253
+ var l = { type: t, props: u, key: n, ref: a, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --$t, __i: -1, __u: 0, __source: o, __self: r };
254
+ if (typeof t == "function" && (a = t.defaultProps)) for (s in a) u[s] === void 0 && (u[s] = a[s]);
255
+ return v.vnode && v.vnode(l), l;
256
256
  }
257
- var ee, m, se, Ce, ae = 0, Xe = [], g = v, Ne = g.__b, Ee = g.__r, He = g.diffed, Ue = g.__c, Pe = g.unmount, Te = g.__;
258
- function Ye(t, e) {
259
- g.__h && g.__h(m, t, ae || e), ae = 0;
260
- var n = m.__H || (m.__H = { __: [], __h: [] });
257
+ var z, g, se, Le, de = 0, nt = [], b = v, Ae = b.__b, je = b.__r, Pe = b.diffed, Te = b.__c, He = b.unmount, Ue = b.__;
258
+ function we(t, e) {
259
+ b.__h && b.__h(g, t, de || e), de = 0;
260
+ var n = g.__H || (g.__H = { __: [], __h: [] });
261
261
  return t >= n.__.length && n.__.push({}), n.__[t];
262
262
  }
263
- function Ae(t) {
264
- return ae = 1, yt(et, t);
263
+ function Me(t) {
264
+ return de = 1, kt(ot, t);
265
265
  }
266
- function yt(t, e, n) {
267
- var i = Ye(ee++, 2);
268
- if (i.t = t, !i.__c && (i.__ = [et(void 0, e), function(l) {
269
- var f = i.__N ? i.__N[0] : i.__[0], u = i.t(f, l);
270
- f !== u && (i.__N = [u, i.__[1]], i.__c.setState({}));
271
- }], i.__c = m, !m.__f)) {
272
- var _ = function(l, f, u) {
266
+ function kt(t, e, n) {
267
+ var i = we(z++, 2);
268
+ if (i.t = t, !i.__c && (i.__ = [ot(void 0, e), function(s) {
269
+ var u = i.__N ? i.__N[0] : i.__[0], l = i.t(u, s);
270
+ u !== l && (i.__N = [l, i.__[1]], i.__c.setState({}));
271
+ }], i.__c = g, !g.__f)) {
272
+ var o = function(s, u, l) {
273
273
  if (!i.__c.__H) return !0;
274
- var c = i.__c.__H.__.filter(function(h) {
274
+ var f = i.__c.__H.__.filter(function(h) {
275
275
  return !!h.__c;
276
276
  });
277
- if (c.every(function(h) {
277
+ if (f.every(function(h) {
278
278
  return !h.__N;
279
- })) return !r || r.call(this, l, f, u);
280
- var o = i.__c.props !== l;
281
- return c.forEach(function(h) {
279
+ })) return !r || r.call(this, s, u, l);
280
+ var _ = i.__c.props !== s;
281
+ return f.forEach(function(h) {
282
282
  if (h.__N) {
283
- var a = h.__[0];
284
- h.__ = h.__N, h.__N = void 0, a !== h.__[0] && (o = !0);
283
+ var c = h.__[0];
284
+ h.__ = h.__N, h.__N = void 0, c !== h.__[0] && (_ = !0);
285
285
  }
286
- }), r && r.call(this, l, f, u) || o;
286
+ }), r && r.call(this, s, u, l) || _;
287
287
  };
288
- m.__f = !0;
289
- var r = m.shouldComponentUpdate, s = m.componentWillUpdate;
290
- m.componentWillUpdate = function(l, f, u) {
288
+ g.__f = !0;
289
+ var r = g.shouldComponentUpdate, a = g.componentWillUpdate;
290
+ g.componentWillUpdate = function(s, u, l) {
291
291
  if (this.__e) {
292
- var c = r;
293
- r = void 0, _(l, f, u), r = c;
292
+ var f = r;
293
+ r = void 0, o(s, u, l), r = f;
294
294
  }
295
- s && s.call(this, l, f, u);
296
- }, m.shouldComponentUpdate = _;
295
+ a && a.call(this, s, u, l);
296
+ }, g.shouldComponentUpdate = o;
297
297
  }
298
298
  return i.__N || i.__;
299
299
  }
300
- function Qe(t, e) {
301
- var n = Ye(ee++, 7);
302
- return bt(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
300
+ function De(t, e) {
301
+ var n = we(z++, 3);
302
+ !b.__s && rt(n.__H, e) && (n.__ = t, n.u = e, g.__H.__h.push(n));
303
303
  }
304
- function mt() {
305
- for (var t; t = Xe.shift(); ) if (t.__P && t.__H) try {
306
- t.__H.__h.forEach(Y), t.__H.__h.forEach(ce), t.__H.__h = [];
304
+ function it(t, e) {
305
+ var n = we(z++, 7);
306
+ return rt(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
307
+ }
308
+ function xt() {
309
+ for (var t; t = nt.shift(); ) if (t.__P && t.__H) try {
310
+ t.__H.__h.forEach(ee), t.__H.__h.forEach(ve), t.__H.__h = [];
307
311
  } catch (e) {
308
- t.__H.__h = [], g.__e(e, t.__v);
312
+ t.__H.__h = [], b.__e(e, t.__v);
309
313
  }
310
314
  }
311
- g.__b = function(t) {
312
- m = null, Ne && Ne(t);
313
- }, g.__ = function(t, e) {
314
- t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Te && Te(t, e);
315
- }, g.__r = function(t) {
316
- Ee && Ee(t), ee = 0;
317
- var e = (m = t.__c).__H;
318
- e && (se === m ? (e.__h = [], m.__h = [], e.__.forEach(function(n) {
315
+ b.__b = function(t) {
316
+ g = null, Ae && Ae(t);
317
+ }, b.__ = function(t, e) {
318
+ t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Ue && Ue(t, e);
319
+ }, b.__r = function(t) {
320
+ je && je(t), z = 0;
321
+ var e = (g = t.__c).__H;
322
+ e && (se === g ? (e.__h = [], g.__h = [], e.__.forEach(function(n) {
319
323
  n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
320
- })) : (e.__h.forEach(Y), e.__h.forEach(ce), e.__h = [], ee = 0)), se = m;
321
- }, g.diffed = function(t) {
322
- He && He(t);
324
+ })) : (e.__h.forEach(ee), e.__h.forEach(ve), e.__h = [], z = 0)), se = g;
325
+ }, b.diffed = function(t) {
326
+ Pe && Pe(t);
323
327
  var e = t.__c;
324
- e && e.__H && (e.__H.__h.length && (Xe.push(e) !== 1 && Ce === g.requestAnimationFrame || ((Ce = g.requestAnimationFrame) || gt)(mt)), e.__H.__.forEach(function(n) {
328
+ e && e.__H && (e.__H.__h.length && (nt.push(e) !== 1 && Le === b.requestAnimationFrame || ((Le = b.requestAnimationFrame) || St)(xt)), e.__H.__.forEach(function(n) {
325
329
  n.u && (n.__H = n.u), n.u = void 0;
326
- })), se = m = null;
327
- }, g.__c = function(t, e) {
330
+ })), se = g = null;
331
+ }, b.__c = function(t, e) {
328
332
  e.some(function(n) {
329
333
  try {
330
- n.__h.forEach(Y), n.__h = n.__h.filter(function(i) {
331
- return !i.__ || ce(i);
334
+ n.__h.forEach(ee), n.__h = n.__h.filter(function(i) {
335
+ return !i.__ || ve(i);
332
336
  });
333
337
  } catch (i) {
334
- e.some(function(_) {
335
- _.__h && (_.__h = []);
336
- }), e = [], g.__e(i, n.__v);
338
+ e.some(function(o) {
339
+ o.__h && (o.__h = []);
340
+ }), e = [], b.__e(i, n.__v);
337
341
  }
338
- }), Ue && Ue(t, e);
339
- }, g.unmount = function(t) {
340
- Pe && Pe(t);
342
+ }), Te && Te(t, e);
343
+ }, b.unmount = function(t) {
344
+ He && He(t);
341
345
  var e, n = t.__c;
342
346
  n && n.__H && (n.__H.__.forEach(function(i) {
343
347
  try {
344
- Y(i);
345
- } catch (_) {
346
- e = _;
348
+ ee(i);
349
+ } catch (o) {
350
+ e = o;
347
351
  }
348
- }), n.__H = void 0, e && g.__e(e, n.__v));
352
+ }), n.__H = void 0, e && b.__e(e, n.__v));
349
353
  };
350
- var Me = typeof requestAnimationFrame == "function";
351
- function gt(t) {
354
+ var Oe = typeof requestAnimationFrame == "function";
355
+ function St(t) {
352
356
  var e, n = function() {
353
- clearTimeout(i), Me && cancelAnimationFrame(e), setTimeout(t);
357
+ clearTimeout(i), Oe && cancelAnimationFrame(e), setTimeout(t);
354
358
  }, i = setTimeout(n, 35);
355
- Me && (e = requestAnimationFrame(n));
359
+ Oe && (e = requestAnimationFrame(n));
356
360
  }
357
- function Y(t) {
358
- var e = m, n = t.__c;
359
- typeof n == "function" && (t.__c = void 0, n()), m = e;
361
+ function ee(t) {
362
+ var e = g, n = t.__c;
363
+ typeof n == "function" && (t.__c = void 0, n()), g = e;
360
364
  }
361
- function ce(t) {
362
- var e = m;
363
- t.__c = t.__(), m = e;
365
+ function ve(t) {
366
+ var e = g;
367
+ t.__c = t.__(), g = e;
364
368
  }
365
- function bt(t, e) {
369
+ function rt(t, e) {
366
370
  return !t || t.length !== e.length || e.some(function(n, i) {
367
371
  return n !== t[i];
368
372
  });
369
373
  }
370
- function et(t, e) {
374
+ function ot(t, e) {
371
375
  return typeof e == "function" ? e(t) : e;
372
376
  }
373
- const wt = (...t) => t.filter((e, n, i) => !!e && e.trim() !== "" && i.indexOf(e) === n).join(" ").trim();
374
- const je = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
375
- const $t = (t) => t.replace(
377
+ const Ct = (...t) => t.filter((e, n, i) => !!e && e.trim() !== "" && i.indexOf(e) === n).join(" ").trim();
378
+ const Ie = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
379
+ const Nt = (t) => t.replace(
376
380
  /^([A-Z])|[\s-_]+(\w)/g,
377
381
  (e, n, i) => i ? i.toUpperCase() : n.toLowerCase()
378
382
  );
379
- const De = (t) => {
380
- const e = $t(t);
383
+ const Fe = (t) => {
384
+ const e = Nt(t);
381
385
  return e.charAt(0).toUpperCase() + e.slice(1);
382
386
  };
383
- var kt = {
387
+ var Et = {
384
388
  xmlns: "http://www.w3.org/2000/svg",
385
389
  width: 24,
386
390
  height: 24,
@@ -391,53 +395,53 @@ var kt = {
391
395
  "stroke-linecap": "round",
392
396
  "stroke-linejoin": "round"
393
397
  };
394
- const xt = (t) => {
398
+ const Lt = (t) => {
395
399
  for (const e in t)
396
400
  if (e.startsWith("aria-") || e === "role" || e === "title")
397
401
  return !0;
398
402
  return !1;
399
403
  };
400
- const St = ({
404
+ const At = ({
401
405
  color: t = "currentColor",
402
406
  size: e = 24,
403
407
  strokeWidth: n = 2,
404
408
  absoluteStrokeWidth: i,
405
- children: _,
409
+ children: o,
406
410
  iconNode: r,
407
- class: s = "",
408
- ...l
409
- }) => R(
411
+ class: a = "",
412
+ ...s
413
+ }) => B(
410
414
  "svg",
411
415
  {
412
- ...kt,
416
+ ...Et,
413
417
  width: String(e),
414
418
  height: e,
415
419
  stroke: t,
416
420
  "stroke-width": i ? Number(n) * 24 / Number(e) : n,
417
- class: ["lucide", s].join(" "),
418
- ...!_ && !xt(l) && { "aria-hidden": "true" },
419
- ...l
421
+ class: ["lucide", a].join(" "),
422
+ ...!o && !Lt(s) && { "aria-hidden": "true" },
423
+ ...s
420
424
  },
421
- [...r.map(([f, u]) => R(f, u)), ...Ze(_)]
425
+ [...r.map(([u, l]) => B(u, l)), ...Ye(o)]
422
426
  );
423
- const re = (t, e) => {
424
- const n = ({ class: i = "", className: _ = "", children: r, ...s }) => R(
425
- St,
427
+ const oe = (t, e) => {
428
+ const n = ({ class: i = "", className: o = "", children: r, ...a }) => B(
429
+ At,
426
430
  {
427
- ...s,
431
+ ...a,
428
432
  iconNode: e,
429
- class: wt(
430
- `lucide-${je(De(t))}`,
431
- `lucide-${je(t)}`,
433
+ class: Ct(
434
+ `lucide-${Ie(Fe(t))}`,
435
+ `lucide-${Ie(t)}`,
432
436
  i,
433
- _
437
+ o
434
438
  )
435
439
  },
436
440
  r
437
441
  );
438
- return n.displayName = De(t), n;
442
+ return n.displayName = Fe(t), n;
439
443
  };
440
- const Ct = re("bot", [
444
+ const jt = oe("bot", [
441
445
  ["path", { d: "M12 8V4H8", key: "hb8ula" }],
442
446
  ["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
443
447
  ["path", { d: "M2 14h2", key: "vft8re" }],
@@ -445,7 +449,7 @@ const Ct = re("bot", [
445
449
  ["path", { d: "M15 13v2", key: "1xurst" }],
446
450
  ["path", { d: "M9 13v2", key: "rq6x2g" }]
447
451
  ]);
448
- const Nt = re("message-circle", [
452
+ const Pt = oe("message-circle", [
449
453
  [
450
454
  "path",
451
455
  {
@@ -454,7 +458,7 @@ const Nt = re("message-circle", [
454
458
  }
455
459
  ]
456
460
  ]);
457
- const Et = re("send", [
461
+ const Tt = oe("send", [
458
462
  [
459
463
  "path",
460
464
  {
@@ -464,33 +468,33 @@ const Et = re("send", [
464
468
  ],
465
469
  ["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
466
470
  ]);
467
- const Ht = re("x", [
471
+ const Ht = oe("x", [
468
472
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
469
473
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
470
474
  ]);
471
475
  var Ut = /* @__PURE__ */ Symbol.for("preact-signals");
472
476
  function _e() {
473
- if (U > 1)
474
- U--;
477
+ if (j > 1)
478
+ j--;
475
479
  else {
476
- for (var t, e = !1; W !== void 0; ) {
477
- var n = W;
478
- for (W = void 0, he++; n !== void 0; ) {
480
+ for (var t, e = !1; R !== void 0; ) {
481
+ var n = R;
482
+ for (R = void 0, pe++; n !== void 0; ) {
479
483
  var i = n.o;
480
- if (n.o = void 0, n.f &= -3, !(8 & n.f) && it(n)) try {
484
+ if (n.o = void 0, n.f &= -3, !(8 & n.f) && lt(n)) try {
481
485
  n.c();
482
- } catch (_) {
483
- e || (t = _, e = !0);
486
+ } catch (o) {
487
+ e || (t = o, e = !0);
484
488
  }
485
489
  n = i;
486
490
  }
487
491
  }
488
- if (he = 0, U--, e) throw t;
492
+ if (pe = 0, j--, e) throw t;
489
493
  }
490
494
  }
491
- function Pt(t) {
492
- if (U > 0) return t();
493
- U++;
495
+ function Mt(t) {
496
+ if (j > 0) return t();
497
+ j++;
494
498
  try {
495
499
  return t();
496
500
  } finally {
@@ -498,7 +502,7 @@ function Pt(t) {
498
502
  }
499
503
  }
500
504
  var d = void 0;
501
- function tt(t) {
505
+ function _t(t) {
502
506
  var e = d;
503
507
  d = void 0;
504
508
  try {
@@ -507,8 +511,8 @@ function tt(t) {
507
511
  d = e;
508
512
  }
509
513
  }
510
- var W = void 0, U = 0, he = 0, te = 0;
511
- function nt(t) {
514
+ var R = void 0, j = 0, pe = 0, ne = 0;
515
+ function at(t) {
512
516
  if (d !== void 0) {
513
517
  var e = t.n;
514
518
  if (e === void 0 || e.t !== d)
@@ -526,7 +530,7 @@ k.prototype.h = function() {
526
530
  };
527
531
  k.prototype.S = function(t) {
528
532
  var e = this, n = this.t;
529
- n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : tt(function() {
533
+ n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : _t(function() {
530
534
  var i;
531
535
  (i = e.W) == null || i.call(e);
532
536
  }));
@@ -535,15 +539,15 @@ k.prototype.U = function(t) {
535
539
  var e = this;
536
540
  if (this.t !== void 0) {
537
541
  var n = t.e, i = t.x;
538
- n !== void 0 && (n.x = i, t.e = void 0), i !== void 0 && (i.e = n, t.x = void 0), t === this.t && (this.t = i, i === void 0 && tt(function() {
539
- var _;
540
- (_ = e.Z) == null || _.call(e);
542
+ n !== void 0 && (n.x = i, t.e = void 0), i !== void 0 && (i.e = n, t.x = void 0), t === this.t && (this.t = i, i === void 0 && _t(function() {
543
+ var o;
544
+ (o = e.Z) == null || o.call(e);
541
545
  }));
542
546
  }
543
547
  };
544
548
  k.prototype.subscribe = function(t) {
545
549
  var e = this;
546
- return V(function() {
550
+ return Z(function() {
547
551
  var n = e.value, i = d;
548
552
  d = void 0;
549
553
  try {
@@ -572,12 +576,12 @@ k.prototype.peek = function() {
572
576
  }
573
577
  };
574
578
  Object.defineProperty(k.prototype, "value", { get: function() {
575
- var t = nt(this);
579
+ var t = at(this);
576
580
  return t !== void 0 && (t.i = this.i), this.v;
577
581
  }, set: function(t) {
578
582
  if (t !== this.v) {
579
- if (he > 100) throw new Error("Cycle detected");
580
- this.v = t, this.i++, te++, U++;
583
+ if (pe > 100) throw new Error("Cycle detected");
584
+ this.v = t, this.i++, ne++, j++;
581
585
  try {
582
586
  for (var e = this.t; e !== void 0; e = e.x) e.t.N();
583
587
  } finally {
@@ -585,14 +589,14 @@ Object.defineProperty(k.prototype, "value", { get: function() {
585
589
  }
586
590
  }
587
591
  } });
588
- function me(t, e) {
592
+ function ae(t, e) {
589
593
  return new k(t, e);
590
594
  }
591
- function it(t) {
595
+ function lt(t) {
592
596
  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;
593
597
  return !1;
594
598
  }
595
- function rt(t) {
599
+ function st(t) {
596
600
  for (var e = t.s; e !== void 0; e = e.n) {
597
601
  var n = e.S.n;
598
602
  if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
@@ -601,7 +605,7 @@ function rt(t) {
601
605
  }
602
606
  }
603
607
  }
604
- function _t(t) {
608
+ function ut(t) {
605
609
  for (var e = t.s, n = void 0; e !== void 0; ) {
606
610
  var i = e.p;
607
611
  e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
@@ -609,23 +613,23 @@ function _t(t) {
609
613
  t.s = n;
610
614
  }
611
615
  function T(t, e) {
612
- k.call(this, void 0), this.x = t, this.s = void 0, this.g = te - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
616
+ k.call(this, void 0), this.x = t, this.s = void 0, this.g = ne - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
613
617
  }
614
618
  T.prototype = new k();
615
619
  T.prototype.h = function() {
616
620
  if (this.f &= -3, 1 & this.f) return !1;
617
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === te)) return !0;
618
- if (this.g = te, this.f |= 1, this.i > 0 && !it(this))
621
+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === ne)) return !0;
622
+ if (this.g = ne, this.f |= 1, this.i > 0 && !lt(this))
619
623
  return this.f &= -2, !0;
620
624
  var t = d;
621
625
  try {
622
- rt(this), d = this;
626
+ st(this), d = this;
623
627
  var e = this.x();
624
628
  (16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
625
629
  } catch (n) {
626
630
  this.v = n, this.f |= 16, this.i++;
627
631
  }
628
- return d = t, _t(this), this.f &= -2, !0;
632
+ return d = t, ut(this), this.f &= -2, !0;
629
633
  };
630
634
  T.prototype.S = function(t) {
631
635
  if (this.t === void 0) {
@@ -648,40 +652,40 @@ T.prototype.N = function() {
648
652
  };
649
653
  Object.defineProperty(T.prototype, "value", { get: function() {
650
654
  if (1 & this.f) throw new Error("Cycle detected");
651
- var t = nt(this);
655
+ var t = at(this);
652
656
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
653
657
  return this.v;
654
658
  } });
655
- function Le(t, e) {
659
+ function We(t, e) {
656
660
  return new T(t, e);
657
661
  }
658
- function ot(t) {
662
+ function ct(t) {
659
663
  var e = t.u;
660
664
  if (t.u = void 0, typeof e == "function") {
661
- U++;
665
+ j++;
662
666
  var n = d;
663
667
  d = void 0;
664
668
  try {
665
669
  e();
666
670
  } catch (i) {
667
- throw t.f &= -2, t.f |= 8, ge(t), i;
671
+ throw t.f &= -2, t.f |= 8, $e(t), i;
668
672
  } finally {
669
673
  d = n, _e();
670
674
  }
671
675
  }
672
676
  }
673
- function ge(t) {
677
+ function $e(t) {
674
678
  for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
675
- t.x = void 0, t.s = void 0, ot(t);
679
+ t.x = void 0, t.s = void 0, ct(t);
676
680
  }
677
- function Tt(t) {
681
+ function Dt(t) {
678
682
  if (d !== this) throw new Error("Out-of-order effect");
679
- _t(this), d = t, this.f &= -2, 8 & this.f && ge(this), _e();
683
+ ut(this), d = t, this.f &= -2, 8 & this.f && $e(this), _e();
680
684
  }
681
- function j(t, e) {
685
+ function M(t, e) {
682
686
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
683
687
  }
684
- j.prototype.c = function() {
688
+ M.prototype.c = function() {
685
689
  var t = this.S();
686
690
  try {
687
691
  if (8 & this.f || this.x === void 0) return;
@@ -691,132 +695,132 @@ j.prototype.c = function() {
691
695
  t();
692
696
  }
693
697
  };
694
- j.prototype.S = function() {
698
+ M.prototype.S = function() {
695
699
  if (1 & this.f) throw new Error("Cycle detected");
696
- this.f |= 1, this.f &= -9, ot(this), rt(this), U++;
700
+ this.f |= 1, this.f &= -9, ct(this), st(this), j++;
697
701
  var t = d;
698
- return d = this, Tt.bind(this, t);
702
+ return d = this, Dt.bind(this, t);
699
703
  };
700
- j.prototype.N = function() {
701
- 2 & this.f || (this.f |= 2, this.o = W, W = this);
704
+ M.prototype.N = function() {
705
+ 2 & this.f || (this.f |= 2, this.o = R, R = this);
702
706
  };
703
- j.prototype.d = function() {
704
- this.f |= 8, 1 & this.f || ge(this);
707
+ M.prototype.d = function() {
708
+ this.f |= 8, 1 & this.f || $e(this);
705
709
  };
706
- j.prototype.dispose = function() {
710
+ M.prototype.dispose = function() {
707
711
  this.d();
708
712
  };
709
- function V(t, e) {
710
- var n = new j(t, e);
713
+ function Z(t, e) {
714
+ var n = new M(t, e);
711
715
  try {
712
716
  n.c();
713
- } catch (_) {
714
- throw n.d(), _;
717
+ } catch (o) {
718
+ throw n.d(), o;
715
719
  }
716
720
  var i = n.d.bind(n);
717
721
  return i[Symbol.dispose] = i, i;
718
722
  }
719
- var st, K, At = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, ut = [];
720
- V(function() {
721
- st = this.N;
723
+ var ft, Y, Ot = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, ht = [];
724
+ Z(function() {
725
+ ft = this.N;
722
726
  })();
723
727
  function D(t, e) {
724
728
  v[t] = e.bind(null, v[t] || function() {
725
729
  });
726
730
  }
727
- function ne(t) {
728
- if (K) {
729
- var e = K;
730
- K = void 0, e();
731
+ function ie(t) {
732
+ if (Y) {
733
+ var e = Y;
734
+ Y = void 0, e();
731
735
  }
732
- K = t && t.S();
736
+ Y = t && t.S();
733
737
  }
734
- function lt(t) {
735
- var e = this, n = t.data, i = jt(n);
738
+ function dt(t) {
739
+ var e = this, n = t.data, i = Ft(n);
736
740
  i.value = n;
737
- var _ = Qe(function() {
738
- for (var l = e, f = e.__v; f = f.__; ) if (f.__c) {
739
- f.__c.__$f |= 4;
741
+ var o = it(function() {
742
+ for (var s = e, u = e.__v; u = u.__; ) if (u.__c) {
743
+ u.__c.__$f |= 4;
740
744
  break;
741
745
  }
742
- var u = Le(function() {
743
- var a = i.value.value;
744
- return a === 0 ? 0 : a === !0 ? "" : a || "";
745
- }), c = Le(function() {
746
- return !Array.isArray(u.value) && !Fe(u.value);
747
- }), o = V(function() {
748
- if (this.N = ft, c.value) {
749
- var a = u.value;
750
- l.__v && l.__v.__e && l.__v.__e.nodeType === 3 && (l.__v.__e.data = a);
746
+ var l = We(function() {
747
+ var c = i.value.value;
748
+ return c === 0 ? 0 : c === !0 ? "" : c || "";
749
+ }), f = We(function() {
750
+ return !Array.isArray(l.value) && !Be(l.value);
751
+ }), _ = Z(function() {
752
+ if (this.N = vt, f.value) {
753
+ var c = l.value;
754
+ s.__v && s.__v.__e && s.__v.__e.nodeType === 3 && (s.__v.__e.data = c);
751
755
  }
752
756
  }), h = e.__$u.d;
753
757
  return e.__$u.d = function() {
754
- o(), h.call(this);
755
- }, [c, u];
756
- }, []), r = _[0], s = _[1];
757
- return r.value ? s.peek() : s.value;
758
+ _(), h.call(this);
759
+ }, [f, l];
760
+ }, []), r = o[0], a = o[1];
761
+ return r.value ? a.peek() : a.value;
758
762
  }
759
- lt.displayName = "ReactiveTextNode";
760
- Object.defineProperties(k.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: lt }, props: { configurable: !0, get: function() {
763
+ dt.displayName = "ReactiveTextNode";
764
+ Object.defineProperties(k.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: dt }, props: { configurable: !0, get: function() {
761
765
  return { data: this };
762
766
  } }, __b: { configurable: !0, value: 1 } });
763
767
  D("__b", function(t, e) {
764
768
  if (typeof e.type == "string") {
765
769
  var n, i = e.props;
766
- for (var _ in i) if (_ !== "children") {
767
- var r = i[_];
768
- r instanceof k && (n || (e.__np = n = {}), n[_] = r, i[_] = r.peek());
770
+ for (var o in i) if (o !== "children") {
771
+ var r = i[o];
772
+ r instanceof k && (n || (e.__np = n = {}), n[o] = r, i[o] = r.peek());
769
773
  }
770
774
  }
771
775
  t(e);
772
776
  });
773
777
  D("__r", function(t, e) {
774
- if (t(e), e.type !== B) {
775
- ne();
778
+ if (t(e), e.type !== V) {
779
+ ie();
776
780
  var n, i = e.__c;
777
- i && (i.__$f &= -2, (n = i.__$u) === void 0 && (i.__$u = n = (function(_, r) {
778
- var s;
779
- return V(function() {
780
- s = this;
781
- }, { name: r }), s.c = _, s;
781
+ i && (i.__$f &= -2, (n = i.__$u) === void 0 && (i.__$u = n = (function(o, r) {
782
+ var a;
783
+ return Z(function() {
784
+ a = this;
785
+ }, { name: r }), a.c = o, a;
782
786
  })(function() {
783
- var _;
784
- At && ((_ = n.y) == null || _.call(n)), i.__$f |= 1, i.setState({});
785
- }, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), ne(n);
787
+ var o;
788
+ Ot && ((o = n.y) == null || o.call(n)), i.__$f |= 1, i.setState({});
789
+ }, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), ie(n);
786
790
  }
787
791
  });
788
792
  D("__e", function(t, e, n, i) {
789
- ne(), t(e, n, i);
793
+ ie(), t(e, n, i);
790
794
  });
791
795
  D("diffed", function(t, e) {
792
- ne();
796
+ ie();
793
797
  var n;
794
798
  if (typeof e.type == "string" && (n = e.__e)) {
795
- var i = e.__np, _ = e.props;
799
+ var i = e.__np, o = e.props;
796
800
  if (i) {
797
801
  var r = n.U;
798
- if (r) for (var s in r) {
799
- var l = r[s];
800
- l !== void 0 && !(s in i) && (l.d(), r[s] = void 0);
802
+ if (r) for (var a in r) {
803
+ var s = r[a];
804
+ s !== void 0 && !(a in i) && (s.d(), r[a] = void 0);
801
805
  }
802
806
  else
803
807
  r = {}, n.U = r;
804
- for (var f in i) {
805
- var u = r[f], c = i[f];
806
- u === void 0 ? (u = Mt(n, f, c, _), r[f] = u) : u.o(c, _);
808
+ for (var u in i) {
809
+ var l = r[u], f = i[u];
810
+ l === void 0 ? (l = It(n, u, f, o), r[u] = l) : l.o(f, o);
807
811
  }
808
812
  }
809
813
  }
810
814
  t(e);
811
815
  });
812
- function Mt(t, e, n, i) {
813
- var _ = e in t && t.ownerSVGElement === void 0, r = me(n);
814
- return { o: function(s, l) {
815
- r.value = s, i = l;
816
- }, d: V(function() {
817
- this.N = ft;
818
- var s = r.value.value;
819
- i[e] !== s && (i[e] = s, _ ? t[e] = s : s != null && (s !== !1 || e[4] === "-") ? t.setAttribute(e, s) : t.removeAttribute(e));
816
+ function It(t, e, n, i) {
817
+ var o = e in t && t.ownerSVGElement === void 0, r = ae(n);
818
+ return { o: function(a, s) {
819
+ r.value = a, i = s;
820
+ }, d: Z(function() {
821
+ this.N = vt;
822
+ var a = r.value.value;
823
+ i[e] !== a && (i[e] = a, o ? t[e] = a : a != null && (a !== !1 || e[4] === "-") ? t.setAttribute(e, a) : t.removeAttribute(e));
820
824
  }) };
821
825
  }
822
826
  D("unmount", function(t, e) {
@@ -826,17 +830,17 @@ D("unmount", function(t, e) {
826
830
  var i = n.U;
827
831
  if (i) {
828
832
  n.U = void 0;
829
- for (var _ in i) {
830
- var r = i[_];
833
+ for (var o in i) {
834
+ var r = i[o];
831
835
  r && r.d();
832
836
  }
833
837
  }
834
838
  }
835
839
  } else {
836
- var s = e.__c;
837
- if (s) {
838
- var l = s.__$u;
839
- l && (s.__$u = void 0, l.d());
840
+ var a = e.__c;
841
+ if (a) {
842
+ var s = a.__$u;
843
+ s && (a.__$u = void 0, s.d());
840
844
  }
841
845
  }
842
846
  t(e);
@@ -844,103 +848,204 @@ D("unmount", function(t, e) {
844
848
  D("__h", function(t, e, n, i) {
845
849
  (i < 3 || i === 9) && (e.__$f |= 2), t(e, n, i);
846
850
  });
847
- I.prototype.shouldComponentUpdate = function(t, e) {
851
+ W.prototype.shouldComponentUpdate = function(t, e) {
848
852
  if (this.__R) return !0;
849
853
  var n = this.__$u, i = n && n.s !== void 0;
850
- for (var _ in e) return !0;
854
+ for (var o in e) return !0;
851
855
  if (this.__f || typeof this.u == "boolean" && this.u === !0) {
852
856
  var r = 2 & this.__$f;
853
857
  if (!(i || r || 4 & this.__$f) || 1 & this.__$f) return !0;
854
858
  } else if (!(i || 4 & this.__$f) || 3 & this.__$f) return !0;
855
- for (var s in t) if (s !== "__source" && t[s] !== this.props[s]) return !0;
856
- for (var l in this.props) if (!(l in t)) return !0;
859
+ for (var a in t) if (a !== "__source" && t[a] !== this.props[a]) return !0;
860
+ for (var s in this.props) if (!(s in t)) return !0;
857
861
  return !1;
858
862
  };
859
- function jt(t, e) {
860
- return Qe(function() {
861
- return me(t, e);
863
+ function Ft(t, e) {
864
+ return it(function() {
865
+ return ae(t, e);
862
866
  }, []);
863
867
  }
864
- var Dt = function(t) {
868
+ var Wt = function(t) {
865
869
  queueMicrotask(function() {
866
870
  queueMicrotask(t);
867
871
  });
868
872
  };
869
- function Lt() {
870
- Pt(function() {
871
- for (var t; t = ut.shift(); ) st.call(t);
873
+ function Rt() {
874
+ Mt(function() {
875
+ for (var t; t = ht.shift(); ) ft.call(t);
872
876
  });
873
877
  }
874
- function ft() {
875
- ut.push(this) === 1 && (v.requestAnimationFrame || Dt)(Lt);
878
+ function vt() {
879
+ ht.push(this) === 1 && (v.requestAnimationFrame || Wt)(Rt);
880
+ }
881
+ const S = ae(!1), A = ae("de"), qt = ["en", "de"], Bt = "de", zt = "jex-locale";
882
+ function ue(t) {
883
+ if (!t)
884
+ return null;
885
+ const e = (t.split("-")[0] ?? "").toLowerCase();
886
+ return qt.includes(e) ? e : null;
876
887
  }
877
- const S = me(!1);
878
- function Ot({ options: t }) {
879
- const [e, n] = Ae(""), [i, _] = Ae([
888
+ function Gt(t) {
889
+ try {
890
+ const n = ue(localStorage.getItem(zt));
891
+ if (n)
892
+ return n;
893
+ } catch {
894
+ }
895
+ if (typeof navigator < "u") {
896
+ const n = ue(navigator.language);
897
+ if (n)
898
+ return n;
899
+ }
900
+ const e = ue(t);
901
+ return e || Bt;
902
+ }
903
+ const pt = {
904
+ title: "Assistant",
905
+ statusOnline: "Online · Responds in seconds",
906
+ inputPlaceholder: "Type a message…",
907
+ sendAriaLabel: "Send message",
908
+ openChatAriaLabel: "Open chat",
909
+ closeChatAriaLabel: "Close chat",
910
+ errorNetwork: "Network error. Please try again.",
911
+ errorQuota: "Message limit reached. Please try again later.",
912
+ localeLabelDe: "DE",
913
+ localeLabelEn: "EN"
914
+ }, Vt = {
915
+ title: "Assistent",
916
+ statusOnline: "Online · Antwortet in Sekunden",
917
+ inputPlaceholder: "Nachricht eingeben…",
918
+ sendAriaLabel: "Nachricht senden",
919
+ openChatAriaLabel: "Chat öffnen",
920
+ closeChatAriaLabel: "Chat schließen",
921
+ errorNetwork: "Netzwerkfehler. Bitte versuche es erneut.",
922
+ errorQuota: "Nachrichtenlimit erreicht. Bitte versuche es später erneut.",
923
+ localeLabelDe: "DE",
924
+ localeLabelEn: "EN"
925
+ }, Zt = { en: pt, de: Vt };
926
+ function Jt() {
927
+ return Zt[A.value] ?? pt;
928
+ }
929
+ function Re(t) {
930
+ A.value = t;
931
+ try {
932
+ localStorage.setItem("jex-locale", t);
933
+ } catch {
934
+ }
935
+ }
936
+ function Kt() {
937
+ return /* @__PURE__ */ m("div", { className: "jex-locale-footer", children: [
938
+ /* @__PURE__ */ m(
939
+ "button",
940
+ {
941
+ className: `jex-locale-btn${A.value === "de" ? " jex-locale-active" : ""}`,
942
+ onClick: () => Re("de"),
943
+ "aria-label": "Auf Deutsch wechseln",
944
+ "aria-pressed": A.value === "de",
945
+ children: "DE"
946
+ }
947
+ ),
948
+ /* @__PURE__ */ m("span", { className: "jex-locale-sep", "aria-hidden": "true", children: "·" }),
949
+ /* @__PURE__ */ m(
950
+ "button",
951
+ {
952
+ className: `jex-locale-btn${A.value === "en" ? " jex-locale-active" : ""}`,
953
+ onClick: () => Re("en"),
954
+ "aria-label": "Switch to English",
955
+ "aria-pressed": A.value === "en",
956
+ children: "EN"
957
+ }
958
+ )
959
+ ] });
960
+ }
961
+ function Qt({ options: t }) {
962
+ const e = Jt(), [n, i] = Me(""), [o, r] = Me([
880
963
  {
881
964
  id: 1,
882
965
  text: t.greeting ?? `Hi there! This is ${t.orgId} assistant. How can I help you today?`,
883
966
  sender: "bot"
884
967
  }
885
- ]), r = t.title ?? "Jexity Assistant", s = t.position === "bottom-left", l = () => {
886
- if (!e.trim()) return;
887
- const u = { id: Date.now(), text: e, sender: "user" };
888
- _([...i, u]), n(""), setTimeout(() => {
889
- _((c) => [
890
- ...c,
968
+ ]), a = t.position === "bottom-left";
969
+ De(() => {
970
+ A.value = Gt(t.locale);
971
+ }, []), De(() => {
972
+ function l(f) {
973
+ if (f.data?.type !== "jexity:config")
974
+ return;
975
+ const { primaryColor: _, locale: h } = f.data.payload;
976
+ (h === "en" || h === "de") && (A.value = h);
977
+ }
978
+ return window.addEventListener("message", l), () => window.removeEventListener("message", l);
979
+ }, []);
980
+ const s = () => {
981
+ if (!n.trim())
982
+ return;
983
+ const l = { id: Date.now(), text: n, sender: "user" };
984
+ r([...o, l]), i(""), setTimeout(() => {
985
+ r((f) => [
986
+ ...f,
891
987
  {
892
988
  id: Date.now() + 1,
893
- text: `You said: "${e}". This is a demo of the Jexity Chat Widget!`,
989
+ text: `You said: "${n}". This is a demo of the Jexity Chat Widget!`,
894
990
  sender: "bot"
895
991
  }
896
992
  ]);
897
993
  }, 1e3);
898
- }, f = t.primaryColor ? { "--jex-primary": t.primaryColor } : void 0;
899
- return /* @__PURE__ */ $("div", { className: "jex-widget", style: f, children: /* @__PURE__ */ $("div", { className: `jex-container${s ? " jex-pos-left" : ""}`, children: [
900
- S.value && /* @__PURE__ */ $("div", { className: "jex-chat-window", children: [
901
- /* @__PURE__ */ $("header", { className: "jex-chat-header", children: [
902
- /* @__PURE__ */ $(Ct, { size: 24 }),
903
- /* @__PURE__ */ $("div", { className: "jex-header-info", children: [
904
- /* @__PURE__ */ $("h3", { children: r }),
905
- /* @__PURE__ */ $("p", { children: "Online | Typically replies in seconds" })
994
+ }, u = t.primaryColor ? { "--jex-primary": t.primaryColor } : void 0;
995
+ return /* @__PURE__ */ m("div", { className: "jex-widget", style: u, children: /* @__PURE__ */ m("div", { className: `jex-container${a ? " jex-pos-left" : ""}`, children: [
996
+ S.value && /* @__PURE__ */ m("div", { className: "jex-chat-window", children: [
997
+ /* @__PURE__ */ m("header", { className: "jex-chat-header", children: [
998
+ /* @__PURE__ */ m(jt, { size: 24 }),
999
+ /* @__PURE__ */ m("div", { className: "jex-header-info", children: [
1000
+ /* @__PURE__ */ m("h3", { children: t.title ?? e.title }),
1001
+ /* @__PURE__ */ m("p", { children: e.statusOnline })
906
1002
  ] })
907
1003
  ] }),
908
- /* @__PURE__ */ $("div", { className: "jex-chat-messages", children: i.map((u) => /* @__PURE__ */ $("div", { className: `jex-message ${u.sender}`, children: u.text }, u.id)) }),
909
- /* @__PURE__ */ $("div", { className: "jex-chat-input", children: [
910
- /* @__PURE__ */ $(
1004
+ /* @__PURE__ */ m("div", { className: "jex-chat-messages", children: o.map((l) => /* @__PURE__ */ m("div", { className: `jex-message ${l.sender}`, children: l.text }, l.id)) }),
1005
+ /* @__PURE__ */ m("div", { className: "jex-chat-input", children: [
1006
+ /* @__PURE__ */ m(
911
1007
  "input",
912
1008
  {
913
1009
  type: "text",
914
- placeholder: "Type a message...",
915
- value: e,
916
- onInput: (u) => n(u.currentTarget.value),
917
- onKeyDown: (u) => u.key === "Enter" && l()
1010
+ placeholder: e.inputPlaceholder,
1011
+ value: n,
1012
+ onInput: (l) => i(l.currentTarget.value),
1013
+ onKeyDown: (l) => l.key === "Enter" && s()
918
1014
  }
919
1015
  ),
920
- /* @__PURE__ */ $("button", { className: "jex-send-btn", onClick: l, children: /* @__PURE__ */ $(Et, { size: 18 }) })
921
- ] })
1016
+ /* @__PURE__ */ m(
1017
+ "button",
1018
+ {
1019
+ className: "jex-send-btn",
1020
+ onClick: s,
1021
+ "aria-label": e.sendAriaLabel,
1022
+ children: /* @__PURE__ */ m(Tt, { size: 18 })
1023
+ }
1024
+ )
1025
+ ] }),
1026
+ /* @__PURE__ */ m(Kt, {})
922
1027
  ] }),
923
- /* @__PURE__ */ $(
1028
+ /* @__PURE__ */ m(
924
1029
  "button",
925
1030
  {
926
1031
  className: "jex-floating-button",
927
1032
  onClick: () => S.value = !S.value,
928
- "aria-label": S.value ? "Close chat" : "Open chat",
929
- children: S.value ? /* @__PURE__ */ $(Ht, { size: 28 }) : /* @__PURE__ */ $(Nt, { size: 28 })
1033
+ "aria-label": S.value ? e.closeChatAriaLabel : e.openChatAriaLabel,
1034
+ children: S.value ? /* @__PURE__ */ m(Ht, { size: 28 }) : /* @__PURE__ */ m(Pt, { size: 28 })
930
1035
  }
931
1036
  )
932
1037
  ] }) });
933
1038
  }
934
1039
  let F = null;
935
- function Ft(t) {
1040
+ function Yt(t) {
936
1041
  F && F.shutdown();
937
1042
  let e;
938
- 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)), Se(R(Ot, { options: t }), e);
1043
+ 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)), Ee(B(Qt, { options: t }), e);
939
1044
  const n = /* @__PURE__ */ new Set(), i = S.subscribe((r) => {
940
- for (const s of n) s(r);
941
- }), _ = {
1045
+ for (const a of n) a(r);
1046
+ }), o = {
942
1047
  shutdown() {
943
- i(), n.clear(), Se(null, e), t.container || e.remove(), F === _ && (F = null);
1048
+ i(), n.clear(), Ee(null, e), t.container || e.remove(), F === o && (F = null);
944
1049
  },
945
1050
  open() {
946
1051
  S.value = !0;
@@ -958,9 +1063,9 @@ function Ft(t) {
958
1063
  return n.add(r), () => n.delete(r);
959
1064
  }
960
1065
  };
961
- return F = _, _;
1066
+ return F = o, o;
962
1067
  }
963
1068
  export {
964
- Ft as JexityChat
1069
+ Yt as JexityChat
965
1070
  };
966
1071
  //# sourceMappingURL=index.mjs.map