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