kenobi-js 0.1.43 → 0.1.45
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/browser/dist.js +175 -129
- package/browser/dist.js.map +4 -4
- package/browser/dist.min.js +16 -19
- package/package.json +9 -9
package/browser/dist.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Kenobi SDK v0.1.
|
|
2
|
+
* Kenobi SDK v0.1.44
|
|
3
3
|
* (c) 2026 Kenobi.ai
|
|
4
4
|
*/
|
|
5
5
|
"use strict";
|
|
@@ -563,14 +563,14 @@ var KenobiLib = (() => {
|
|
|
563
563
|
var morphdom = morphdomFactory(morphAttrs);
|
|
564
564
|
var morphdom_esm_default = morphdom;
|
|
565
565
|
|
|
566
|
-
// ../../node_modules/.pnpm/preact@10.
|
|
566
|
+
// ../../node_modules/.pnpm/preact@10.28.2/node_modules/preact/dist/preact.module.js
|
|
567
567
|
var n;
|
|
568
568
|
var l;
|
|
569
569
|
var u;
|
|
570
570
|
var t;
|
|
571
571
|
var i;
|
|
572
|
-
var r;
|
|
573
572
|
var o;
|
|
573
|
+
var r;
|
|
574
574
|
var e;
|
|
575
575
|
var f;
|
|
576
576
|
var c;
|
|
@@ -580,26 +580,26 @@ var KenobiLib = (() => {
|
|
|
580
580
|
var p = {};
|
|
581
581
|
var v = [];
|
|
582
582
|
var y = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
583
|
-
var
|
|
584
|
-
function
|
|
583
|
+
var d = Array.isArray;
|
|
584
|
+
function w(n2, l3) {
|
|
585
585
|
for (var u4 in l3) n2[u4] = l3[u4];
|
|
586
586
|
return n2;
|
|
587
587
|
}
|
|
588
|
-
__name(
|
|
588
|
+
__name(w, "w");
|
|
589
589
|
function g(n2) {
|
|
590
590
|
n2 && n2.parentNode && n2.parentNode.removeChild(n2);
|
|
591
591
|
}
|
|
592
592
|
__name(g, "g");
|
|
593
593
|
function _(l3, u4, t3) {
|
|
594
|
-
var i3,
|
|
595
|
-
for (
|
|
596
|
-
if (arguments.length > 2 && (e3.children = arguments.length > 3 ? n.call(arguments, 2) : t3), "function" == typeof l3 && null != l3.defaultProps) for (
|
|
597
|
-
return m(l3, e3, i3,
|
|
594
|
+
var i3, o3, r3, e3 = {};
|
|
595
|
+
for (r3 in u4) "key" == r3 ? i3 = u4[r3] : "ref" == r3 ? o3 = u4[r3] : e3[r3] = u4[r3];
|
|
596
|
+
if (arguments.length > 2 && (e3.children = arguments.length > 3 ? n.call(arguments, 2) : t3), "function" == typeof l3 && null != l3.defaultProps) for (r3 in l3.defaultProps) void 0 === e3[r3] && (e3[r3] = l3.defaultProps[r3]);
|
|
597
|
+
return m(l3, e3, i3, o3, null);
|
|
598
598
|
}
|
|
599
599
|
__name(_, "_");
|
|
600
|
-
function m(n2, t3, i3,
|
|
601
|
-
var e3 = { type: n2, props: t3, key: i3, ref:
|
|
602
|
-
return null ==
|
|
600
|
+
function m(n2, t3, i3, o3, r3) {
|
|
601
|
+
var e3 = { type: n2, props: t3, key: i3, ref: o3, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == r3 ? ++u : r3, __i: -1, __u: 0 };
|
|
602
|
+
return null == r3 && null != l.vnode && l.vnode(e3), e3;
|
|
603
603
|
}
|
|
604
604
|
__name(m, "m");
|
|
605
605
|
function k(n2) {
|
|
@@ -628,31 +628,31 @@ var KenobiLib = (() => {
|
|
|
628
628
|
}
|
|
629
629
|
__name(C, "C");
|
|
630
630
|
function M(n2) {
|
|
631
|
-
(!n2.__d && (n2.__d = true) && i.push(n2) && !$.__r++ ||
|
|
631
|
+
(!n2.__d && (n2.__d = true) && i.push(n2) && !$.__r++ || o != l.debounceRendering) && ((o = l.debounceRendering) || r)($);
|
|
632
632
|
}
|
|
633
633
|
__name(M, "M");
|
|
634
634
|
function $() {
|
|
635
|
-
for (var n2, u4, t3,
|
|
635
|
+
for (var n2, u4, t3, o3, r3, f4, c3, s3 = 1; i.length; ) i.length > s3 && i.sort(e), n2 = i.shift(), s3 = i.length, n2.__d && (t3 = void 0, o3 = void 0, r3 = (o3 = (u4 = n2).__v).__e, f4 = [], c3 = [], u4.__P && ((t3 = w({}, o3)).__v = o3.__v + 1, l.vnode && l.vnode(t3), O(u4.__P, t3, o3, u4.__n, u4.__P.namespaceURI, 32 & o3.__u ? [r3] : null, f4, null == r3 ? S(o3) : r3, !!(32 & o3.__u), c3), t3.__v = o3.__v, t3.__.__k[t3.__i] = t3, N(f4, t3, c3), o3.__e = o3.__ = null, t3.__e != r3 && C(t3)));
|
|
636
636
|
$.__r = 0;
|
|
637
637
|
}
|
|
638
638
|
__name($, "$");
|
|
639
|
-
function I(n2, l3, u4, t3, i3,
|
|
640
|
-
var a3, h3, y3,
|
|
641
|
-
for (f4 = P(u4, l3, m3, f4, b), a3 = 0; a3 < b; a3++) null != (y3 = u4.__k[a3]) && (h3 = -1 == y3.__i ? p : m3[y3.__i] || p, y3.__i = a3, g2 = O(n2, y3, h3, i3,
|
|
642
|
-
return u4.__e =
|
|
639
|
+
function I(n2, l3, u4, t3, i3, o3, r3, e3, f4, c3, s3) {
|
|
640
|
+
var a3, h3, y3, d3, w3, g2, _2, m3 = t3 && t3.__k || v, b = l3.length;
|
|
641
|
+
for (f4 = P(u4, l3, m3, f4, b), a3 = 0; a3 < b; a3++) null != (y3 = u4.__k[a3]) && (h3 = -1 == y3.__i ? p : m3[y3.__i] || p, y3.__i = a3, g2 = O(n2, y3, h3, i3, o3, r3, e3, f4, c3, s3), d3 = y3.__e, y3.ref && h3.ref != y3.ref && (h3.ref && B(h3.ref, null, y3), s3.push(y3.ref, y3.__c || d3, y3)), null == w3 && null != d3 && (w3 = d3), (_2 = !!(4 & y3.__u)) || h3.__k === y3.__k ? f4 = A(y3, f4, n2, _2) : "function" == typeof y3.type && void 0 !== g2 ? f4 = g2 : d3 && (f4 = d3.nextSibling), y3.__u &= -7);
|
|
642
|
+
return u4.__e = w3, f4;
|
|
643
643
|
}
|
|
644
644
|
__name(I, "I");
|
|
645
645
|
function P(n2, l3, u4, t3, i3) {
|
|
646
|
-
var
|
|
647
|
-
for (n2.__k = new Array(i3),
|
|
648
|
-
if (a3) for (
|
|
646
|
+
var o3, r3, e3, f4, c3, s3 = u4.length, a3 = s3, h3 = 0;
|
|
647
|
+
for (n2.__k = new Array(i3), o3 = 0; o3 < i3; o3++) null != (r3 = l3[o3]) && "boolean" != typeof r3 && "function" != typeof r3 ? ("string" == typeof r3 || "number" == typeof r3 || "bigint" == typeof r3 || r3.constructor == String ? r3 = n2.__k[o3] = m(null, r3, null, null, null) : d(r3) ? r3 = n2.__k[o3] = m(k, { children: r3 }, null, null, null) : void 0 === r3.constructor && r3.__b > 0 ? r3 = n2.__k[o3] = m(r3.type, r3.props, r3.key, r3.ref ? r3.ref : null, r3.__v) : n2.__k[o3] = r3, f4 = o3 + h3, r3.__ = n2, r3.__b = n2.__b + 1, e3 = null, -1 != (c3 = r3.__i = L(r3, u4, f4, a3)) && (a3--, (e3 = u4[c3]) && (e3.__u |= 2)), null == e3 || null == e3.__v ? (-1 == c3 && (i3 > s3 ? h3-- : i3 < s3 && h3++), "function" != typeof r3.type && (r3.__u |= 4)) : c3 != f4 && (c3 == f4 - 1 ? h3-- : c3 == f4 + 1 ? h3++ : (c3 > f4 ? h3-- : h3++, r3.__u |= 4))) : n2.__k[o3] = null;
|
|
648
|
+
if (a3) for (o3 = 0; o3 < s3; o3++) null != (e3 = u4[o3]) && 0 == (2 & e3.__u) && (e3.__e == t3 && (t3 = S(e3)), D(e3, e3));
|
|
649
649
|
return t3;
|
|
650
650
|
}
|
|
651
651
|
__name(P, "P");
|
|
652
652
|
function A(n2, l3, u4, t3) {
|
|
653
|
-
var i3,
|
|
653
|
+
var i3, o3;
|
|
654
654
|
if ("function" == typeof n2.type) {
|
|
655
|
-
for (i3 = n2.__k,
|
|
655
|
+
for (i3 = n2.__k, o3 = 0; i3 && o3 < i3.length; o3++) i3[o3] && (i3[o3].__ = n2, l3 = A(i3[o3], l3, u4, t3));
|
|
656
656
|
return l3;
|
|
657
657
|
}
|
|
658
658
|
n2.__e != l3 && (t3 && (l3 && n2.type && !l3.parentNode && (l3 = S(n2)), u4.insertBefore(n2.__e, l3 || null)), l3 = n2.__e);
|
|
@@ -663,10 +663,10 @@ var KenobiLib = (() => {
|
|
|
663
663
|
}
|
|
664
664
|
__name(A, "A");
|
|
665
665
|
function L(n2, l3, u4, t3) {
|
|
666
|
-
var i3,
|
|
667
|
-
if (null === c3 && null ==
|
|
666
|
+
var i3, o3, r3, e3 = n2.key, f4 = n2.type, c3 = l3[u4], s3 = null != c3 && 0 == (2 & c3.__u);
|
|
667
|
+
if (null === c3 && null == e3 || s3 && e3 == c3.key && f4 == c3.type) return u4;
|
|
668
668
|
if (t3 > (s3 ? 1 : 0)) {
|
|
669
|
-
for (i3 = u4 - 1,
|
|
669
|
+
for (i3 = u4 - 1, o3 = u4 + 1; i3 >= 0 || o3 < l3.length; ) if (null != (c3 = l3[r3 = i3 >= 0 ? i3-- : o3++]) && 0 == (2 & c3.__u) && e3 == c3.key && f4 == c3.type) return r3;
|
|
670
670
|
}
|
|
671
671
|
return -1;
|
|
672
672
|
}
|
|
@@ -676,13 +676,13 @@ var KenobiLib = (() => {
|
|
|
676
676
|
}
|
|
677
677
|
__name(T, "T");
|
|
678
678
|
function j(n2, l3, u4, t3, i3) {
|
|
679
|
-
var
|
|
679
|
+
var o3, r3;
|
|
680
680
|
n: if ("style" == l3) if ("string" == typeof u4) n2.style.cssText = u4;
|
|
681
681
|
else {
|
|
682
682
|
if ("string" == typeof t3 && (n2.style.cssText = t3 = ""), t3) for (l3 in t3) u4 && l3 in u4 || T(n2.style, l3, "");
|
|
683
683
|
if (u4) for (l3 in u4) t3 && u4[l3] == t3[l3] || T(n2.style, l3, u4[l3]);
|
|
684
684
|
}
|
|
685
|
-
else if ("o" == l3[0] && "n" == l3[1])
|
|
685
|
+
else if ("o" == l3[0] && "n" == l3[1]) o3 = l3 != (l3 = l3.replace(f, "$1")), r3 = l3.toLowerCase(), l3 = r3 in n2 || "onFocusOut" == l3 || "onFocusIn" == l3 ? r3.slice(2) : l3.slice(2), n2.l || (n2.l = {}), n2.l[l3 + o3] = u4, u4 ? t3 ? u4.u = t3.u : (u4.u = c, n2.addEventListener(l3, o3 ? a : s, o3)) : n2.removeEventListener(l3, o3 ? a : s, o3);
|
|
686
686
|
else {
|
|
687
687
|
if ("http://www.w3.org/2000/svg" == i3) l3 = l3.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
688
688
|
else if ("width" != l3 && "height" != l3 && "href" != l3 && "list" != l3 && "form" != l3 && "tabIndex" != l3 && "download" != l3 && "rowSpan" != l3 && "colSpan" != l3 && "role" != l3 && "popover" != l3 && l3 in n2) try {
|
|
@@ -705,14 +705,14 @@ var KenobiLib = (() => {
|
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
707
|
__name(F, "F");
|
|
708
|
-
function O(n2, u4, t3, i3,
|
|
708
|
+
function O(n2, u4, t3, i3, o3, r3, e3, f4, c3, s3) {
|
|
709
709
|
var a3, h3, p3, v3, y3, _2, m3, b, S2, C3, M2, $2, P2, A3, H, L2, T3, j3 = u4.type;
|
|
710
|
-
if (
|
|
711
|
-
128 & t3.__u && (c3 = !!(32 & t3.__u),
|
|
710
|
+
if (void 0 !== u4.constructor) return null;
|
|
711
|
+
128 & t3.__u && (c3 = !!(32 & t3.__u), r3 = [f4 = u4.__e = t3.__e]), (a3 = l.__b) && a3(u4);
|
|
712
712
|
n: if ("function" == typeof j3) try {
|
|
713
|
-
if (b = u4.props, S2 = "prototype" in j3 && j3.prototype.render, C3 = (a3 = j3.contextType) && i3[a3.__c], M2 = a3 ? C3 ? C3.props.value : a3.__ : i3, t3.__c ? m3 = (h3 = u4.__c = t3.__c).__ = h3.__E : (S2 ? u4.__c = h3 = new j3(b, M2) : (u4.__c = h3 = new x(b, M2), h3.constructor = j3, h3.render = E), C3 && C3.sub(h3), h3.
|
|
713
|
+
if (b = u4.props, S2 = "prototype" in j3 && j3.prototype.render, C3 = (a3 = j3.contextType) && i3[a3.__c], M2 = a3 ? C3 ? C3.props.value : a3.__ : i3, t3.__c ? m3 = (h3 = u4.__c = t3.__c).__ = h3.__E : (S2 ? u4.__c = h3 = new j3(b, M2) : (u4.__c = h3 = new x(b, M2), h3.constructor = j3, h3.render = E), C3 && C3.sub(h3), h3.state || (h3.state = {}), h3.__n = i3, p3 = h3.__d = true, h3.__h = [], h3._sb = []), S2 && null == h3.__s && (h3.__s = h3.state), S2 && null != j3.getDerivedStateFromProps && (h3.__s == h3.state && (h3.__s = w({}, h3.__s)), w(h3.__s, j3.getDerivedStateFromProps(b, h3.__s))), v3 = h3.props, y3 = h3.state, h3.__v = u4, p3) S2 && null == j3.getDerivedStateFromProps && null != h3.componentWillMount && h3.componentWillMount(), S2 && null != h3.componentDidMount && h3.__h.push(h3.componentDidMount);
|
|
714
714
|
else {
|
|
715
|
-
if (S2 && null == j3.getDerivedStateFromProps && b !== v3 && null != h3.componentWillReceiveProps && h3.componentWillReceiveProps(b, M2), !h3.__e && null != h3.shouldComponentUpdate && false === h3.shouldComponentUpdate(b, h3.__s, M2)
|
|
715
|
+
if (S2 && null == j3.getDerivedStateFromProps && b !== v3 && null != h3.componentWillReceiveProps && h3.componentWillReceiveProps(b, M2), u4.__v == t3.__v || !h3.__e && null != h3.shouldComponentUpdate && false === h3.shouldComponentUpdate(b, h3.__s, M2)) {
|
|
716
716
|
for (u4.__v != t3.__v && (h3.props = b, h3.state = h3.__s, h3.__d = false), u4.__e = t3.__e, u4.__k = t3.__k, u4.__k.some(function(n3) {
|
|
717
717
|
n3 && (n3.__ = u4);
|
|
718
718
|
}), $2 = 0; $2 < h3._sb.length; $2++) h3.__h.push(h3._sb[$2]);
|
|
@@ -729,19 +729,19 @@ var KenobiLib = (() => {
|
|
|
729
729
|
} else do {
|
|
730
730
|
h3.__d = false, P2 && P2(u4), a3 = h3.render(h3.props, h3.state, h3.context), h3.state = h3.__s;
|
|
731
731
|
} while (h3.__d && ++A3 < 25);
|
|
732
|
-
h3.state = h3.__s, null != h3.getChildContext && (i3 =
|
|
732
|
+
h3.state = h3.__s, null != h3.getChildContext && (i3 = w(w({}, i3), h3.getChildContext())), S2 && !p3 && null != h3.getSnapshotBeforeUpdate && (_2 = h3.getSnapshotBeforeUpdate(v3, y3)), L2 = a3, null != a3 && a3.type === k && null == a3.key && (L2 = V(a3.props.children)), f4 = I(n2, d(L2) ? L2 : [L2], u4, t3, i3, o3, r3, e3, f4, c3, s3), h3.base = u4.__e, u4.__u &= -161, h3.__h.length && e3.push(h3), m3 && (h3.__E = h3.__ = null);
|
|
733
733
|
} catch (n3) {
|
|
734
|
-
if (u4.__v = null, c3 || null !=
|
|
734
|
+
if (u4.__v = null, c3 || null != r3) if (n3.then) {
|
|
735
735
|
for (u4.__u |= c3 ? 160 : 128; f4 && 8 == f4.nodeType && f4.nextSibling; ) f4 = f4.nextSibling;
|
|
736
|
-
|
|
736
|
+
r3[r3.indexOf(f4)] = null, u4.__e = f4;
|
|
737
737
|
} else {
|
|
738
|
-
for (T3 =
|
|
738
|
+
for (T3 = r3.length; T3--; ) g(r3[T3]);
|
|
739
739
|
z(u4);
|
|
740
740
|
}
|
|
741
741
|
else u4.__e = t3.__e, u4.__k = t3.__k, n3.then || z(u4);
|
|
742
742
|
l.__e(n3, u4, t3);
|
|
743
743
|
}
|
|
744
|
-
else null ==
|
|
744
|
+
else null == r3 && u4.__v == t3.__v ? (u4.__k = t3.__k, u4.__e = t3.__e) : f4 = u4.__e = q(t3.__e, u4, t3, i3, o3, r3, e3, c3, s3);
|
|
745
745
|
return (a3 = l.diffed) && a3(u4), 128 & u4.__u ? void 0 : f4;
|
|
746
746
|
}
|
|
747
747
|
__name(O, "O");
|
|
@@ -763,34 +763,34 @@ var KenobiLib = (() => {
|
|
|
763
763
|
}
|
|
764
764
|
__name(N, "N");
|
|
765
765
|
function V(n2) {
|
|
766
|
-
return "object" != typeof n2 || null == n2 || n2.__b && n2.__b > 0 ? n2 :
|
|
766
|
+
return "object" != typeof n2 || null == n2 || n2.__b && n2.__b > 0 ? n2 : d(n2) ? n2.map(V) : w({}, n2);
|
|
767
767
|
}
|
|
768
768
|
__name(V, "V");
|
|
769
|
-
function q(u4, t3, i3,
|
|
770
|
-
var a3, h3, v3, y3,
|
|
771
|
-
if ("svg" == x2 ?
|
|
772
|
-
for (a3 = 0; a3 < e3.length; a3++) if ((
|
|
773
|
-
u4 =
|
|
769
|
+
function q(u4, t3, i3, o3, r3, e3, f4, c3, s3) {
|
|
770
|
+
var a3, h3, v3, y3, w3, _2, m3, b = i3.props || p, k3 = t3.props, x2 = t3.type;
|
|
771
|
+
if ("svg" == x2 ? r3 = "http://www.w3.org/2000/svg" : "math" == x2 ? r3 = "http://www.w3.org/1998/Math/MathML" : r3 || (r3 = "http://www.w3.org/1999/xhtml"), null != e3) {
|
|
772
|
+
for (a3 = 0; a3 < e3.length; a3++) if ((w3 = e3[a3]) && "setAttribute" in w3 == !!x2 && (x2 ? w3.localName == x2 : 3 == w3.nodeType)) {
|
|
773
|
+
u4 = w3, e3[a3] = null;
|
|
774
774
|
break;
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
if (null == u4) {
|
|
778
778
|
if (null == x2) return document.createTextNode(k3);
|
|
779
|
-
u4 = document.createElementNS(
|
|
779
|
+
u4 = document.createElementNS(r3, x2, k3.is && k3), c3 && (l.__m && l.__m(t3, e3), c3 = false), e3 = null;
|
|
780
780
|
}
|
|
781
781
|
if (null == x2) b === k3 || c3 && u4.data == k3 || (u4.data = k3);
|
|
782
782
|
else {
|
|
783
|
-
if (e3 = e3 && n.call(u4.childNodes),
|
|
784
|
-
for (a3 in b) if (
|
|
785
|
-
else if ("dangerouslySetInnerHTML" == a3) v3 =
|
|
783
|
+
if (e3 = e3 && n.call(u4.childNodes), !c3 && null != e3) for (b = {}, a3 = 0; a3 < u4.attributes.length; a3++) b[(w3 = u4.attributes[a3]).name] = w3.value;
|
|
784
|
+
for (a3 in b) if (w3 = b[a3], "children" == a3) ;
|
|
785
|
+
else if ("dangerouslySetInnerHTML" == a3) v3 = w3;
|
|
786
786
|
else if (!(a3 in k3)) {
|
|
787
787
|
if ("value" == a3 && "defaultValue" in k3 || "checked" == a3 && "defaultChecked" in k3) continue;
|
|
788
|
-
j(u4, a3, null,
|
|
788
|
+
j(u4, a3, null, w3, r3);
|
|
789
789
|
}
|
|
790
|
-
for (a3 in k3)
|
|
790
|
+
for (a3 in k3) w3 = k3[a3], "children" == a3 ? y3 = w3 : "dangerouslySetInnerHTML" == a3 ? h3 = w3 : "value" == a3 ? _2 = w3 : "checked" == a3 ? m3 = w3 : c3 && "function" != typeof w3 || b[a3] === w3 || j(u4, a3, w3, b[a3], r3);
|
|
791
791
|
if (h3) c3 || v3 && (h3.__html == v3.__html || h3.__html == u4.innerHTML) || (u4.innerHTML = h3.__html), t3.__k = [];
|
|
792
|
-
else if (v3 && (u4.innerHTML = ""), I("template" == t3.type ? u4.content : u4,
|
|
793
|
-
c3 || (a3 = "value", "progress" == x2 && null == _2 ? u4.removeAttribute("value") : null != _2 && (_2 !== u4[a3] || "progress" == x2 && !_2 || "option" == x2 && _2 != b[a3]) && j(u4, a3, _2, b[a3],
|
|
792
|
+
else if (v3 && (u4.innerHTML = ""), I("template" == t3.type ? u4.content : u4, d(y3) ? y3 : [y3], t3, i3, o3, "foreignObject" == x2 ? "http://www.w3.org/1999/xhtml" : r3, e3, f4, e3 ? e3[0] : i3.__k && S(i3, 0), c3, s3), null != e3) for (a3 = e3.length; a3--; ) g(e3[a3]);
|
|
793
|
+
c3 || (a3 = "value", "progress" == x2 && null == _2 ? u4.removeAttribute("value") : null != _2 && (_2 !== u4[a3] || "progress" == x2 && !_2 || "option" == x2 && _2 != b[a3]) && j(u4, a3, _2, b[a3], r3), a3 = "checked", null != m3 && m3 != u4[a3] && j(u4, a3, m3, b[a3], r3));
|
|
794
794
|
}
|
|
795
795
|
return u4;
|
|
796
796
|
}
|
|
@@ -807,7 +807,7 @@ var KenobiLib = (() => {
|
|
|
807
807
|
}
|
|
808
808
|
__name(B, "B");
|
|
809
809
|
function D(n2, u4, t3) {
|
|
810
|
-
var i3,
|
|
810
|
+
var i3, o3;
|
|
811
811
|
if (l.unmount && l.unmount(n2), (i3 = n2.ref) && (i3.current && i3.current != n2.__e || B(i3, null, u4)), null != (i3 = n2.__c)) {
|
|
812
812
|
if (i3.componentWillUnmount) try {
|
|
813
813
|
i3.componentWillUnmount();
|
|
@@ -816,7 +816,7 @@ var KenobiLib = (() => {
|
|
|
816
816
|
}
|
|
817
817
|
i3.base = i3.__P = null;
|
|
818
818
|
}
|
|
819
|
-
if (i3 = n2.__k) for (
|
|
819
|
+
if (i3 = n2.__k) for (o3 = 0; o3 < i3.length; o3++) i3[o3] && D(i3[o3], u4, t3 || "function" != typeof n2.type);
|
|
820
820
|
t3 || g(n2.__e), n2.__c = n2.__ = n2.__e = void 0;
|
|
821
821
|
}
|
|
822
822
|
__name(D, "D");
|
|
@@ -825,29 +825,29 @@ var KenobiLib = (() => {
|
|
|
825
825
|
}
|
|
826
826
|
__name(E, "E");
|
|
827
827
|
function G(u4, t3, i3) {
|
|
828
|
-
var
|
|
829
|
-
t3 == document && (t3 = document.documentElement), l.__ && l.__(u4, t3),
|
|
828
|
+
var o3, r3, e3, f4;
|
|
829
|
+
t3 == document && (t3 = document.documentElement), l.__ && l.__(u4, t3), r3 = (o3 = "function" == typeof i3) ? null : i3 && i3.__k || t3.__k, e3 = [], f4 = [], O(t3, u4 = (!o3 && i3 || t3).__k = _(k, null, [u4]), r3 || p, p, t3.namespaceURI, !o3 && i3 ? [i3] : r3 ? null : t3.firstChild ? n.call(t3.childNodes) : null, e3, !o3 && i3 ? i3 : r3 ? r3.__e : t3.firstChild, o3, f4), N(e3, u4, f4);
|
|
830
830
|
}
|
|
831
831
|
__name(G, "G");
|
|
832
832
|
n = v.slice, l = { __e: /* @__PURE__ */ __name(function(n2, l3, u4, t3) {
|
|
833
|
-
for (var i3,
|
|
834
|
-
if ((
|
|
833
|
+
for (var i3, o3, r3; l3 = l3.__; ) if ((i3 = l3.__c) && !i3.__) try {
|
|
834
|
+
if ((o3 = i3.constructor) && null != o3.getDerivedStateFromError && (i3.setState(o3.getDerivedStateFromError(n2)), r3 = i3.__d), null != i3.componentDidCatch && (i3.componentDidCatch(n2, t3 || {}), r3 = i3.__d), r3) return i3.__E = i3;
|
|
835
835
|
} catch (l4) {
|
|
836
836
|
n2 = l4;
|
|
837
837
|
}
|
|
838
838
|
throw n2;
|
|
839
839
|
}, "__e") }, u = 0, t = /* @__PURE__ */ __name(function(n2) {
|
|
840
|
-
return null != n2 &&
|
|
840
|
+
return null != n2 && void 0 === n2.constructor;
|
|
841
841
|
}, "t"), x.prototype.setState = function(n2, l3) {
|
|
842
842
|
var u4;
|
|
843
|
-
u4 = null != this.__s && this.__s != this.state ? this.__s : this.__s =
|
|
843
|
+
u4 = null != this.__s && this.__s != this.state ? this.__s : this.__s = w({}, this.state), "function" == typeof n2 && (n2 = n2(w({}, u4), this.props)), n2 && w(u4, n2), null != n2 && this.__v && (l3 && this._sb.push(l3), M(this));
|
|
844
844
|
}, x.prototype.forceUpdate = function(n2) {
|
|
845
845
|
this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this));
|
|
846
|
-
}, x.prototype.render = k, i = [],
|
|
846
|
+
}, x.prototype.render = k, i = [], r = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e = /* @__PURE__ */ __name(function(n2, l3) {
|
|
847
847
|
return n2.__v.__b - l3.__v.__b;
|
|
848
848
|
}, "e"), $.__r = 0, f = /(PointerCapture)$|Capture$/i, c = 0, s = F(false), a = F(true), h = 0;
|
|
849
849
|
|
|
850
|
-
// ../../node_modules/.pnpm/preact@10.
|
|
850
|
+
// ../../node_modules/.pnpm/preact@10.28.2/node_modules/preact/hooks/dist/hooks.module.js
|
|
851
851
|
var t2;
|
|
852
852
|
var r2;
|
|
853
853
|
var u2;
|
|
@@ -1004,7 +1004,7 @@ var KenobiLib = (() => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
__name(D2, "D");
|
|
1006
1006
|
|
|
1007
|
-
// ../../node_modules/.pnpm/preact@10.
|
|
1007
|
+
// ../../node_modules/.pnpm/preact@10.28.2/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
1008
1008
|
var f3 = 0;
|
|
1009
1009
|
function u3(e3, t3, n2, o3, i3, u4) {
|
|
1010
1010
|
t3 || (t3 = {});
|
|
@@ -1333,8 +1333,6 @@ var KenobiLib = (() => {
|
|
|
1333
1333
|
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); transition: all 0.5s ease; z-index: 0; pointer-events: none; }
|
|
1334
1334
|
.backdrop.active { background: rgba(0,0,0,0.1); backdrop-filter: blur(var(--kb-focus-blur)); -webkit-backdrop-filter: blur(var(--kb-focus-blur)); }
|
|
1335
1335
|
.launcher { position: absolute; pointer-events: auto; background-color: var(--kb-bg-container); border: 1px solid var(--kb-border-container); box-shadow: var(--kb-shadow-container); backdrop-filter: blur(var(--kb-backdrop-blur)); -webkit-backdrop-filter: blur(var(--kb-backdrop-blur)); border-radius: 9999px; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.75rem; cursor: pointer; transition: transform 0.2s, opacity 0.3s; opacity: 0; z-index: 1; color: var(--kb-text-title); font-weight: 500; font-size: 0.875rem; font-family: var(--kb-font-family); }
|
|
1336
|
-
.launcher .kbd-hint .kbd { background: var(--kb-kbd-bg); border: 1px solid var(--kb-kbd-border); color: var(--kb-kbd-text); }
|
|
1337
|
-
.launcher .kbd-hint .kbd-text { color: var(--kb-kbd-text); }
|
|
1338
1336
|
.launcher:hover { transform: scale(1.02); background-color: var(--kb-bg-container); }
|
|
1339
1337
|
.kb-chip-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
|
|
1340
1338
|
.kb-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.8rem; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.85); background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08)); color: var(--kb-text-title); font-size: 0.8rem; font-weight: 600; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 8px 18px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.45); }
|
|
@@ -1380,13 +1378,9 @@ var KenobiLib = (() => {
|
|
|
1380
1378
|
.launcher-shine-border { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background-size: 300% 300%; animation: shine var(--shine-duration, 14s) linear infinite; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; -webkit-mask-composite: xor; padding: var(--shine-border-width, 1px); }
|
|
1381
1379
|
.btn-dismiss { position: absolute; top: -0.5rem; left: -0.5rem; width: 1.5rem; height: 1.5rem; padding: 0; border-radius: 9999px; display: flex; align-items: center; justify-content: center; background-color: var(--kb-btn-dismiss-bg); border: 1px solid var(--kb-btn-dismiss-border); color: var(--kb-btn-dismiss-text); cursor: pointer; transition: all 0.3s ease-out; z-index: 10; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
|
|
1382
1380
|
.btn-dismiss:hover { background-color: var(--kb-btn-dismiss-hover-bg); color: var(--kb-btn-dismiss-hover-text); }
|
|
1383
|
-
.progress-clip { position: absolute; inset: 0; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; overflow: hidden; pointer-events: none; }
|
|
1384
|
-
.progress-container { position: absolute; bottom: 0; left: 0; right: 0; height: 0.25rem; background-color: var(--kb-progress-track); overflow: hidden; pointer-events: none; border-radius: 0; }
|
|
1385
|
-
.progress-bar { height: 100%; background-color: var(--kb-progress-indicator); width: 0%; transition: width 0.3s ease; }
|
|
1386
1381
|
.popover { position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.375rem; background-color: var(--kb-popover-bg); border: 1px solid var(--kb-popover-border); border-radius: 0.25rem; border-top-left-radius: 0; border-top-right-radius: 0; padding: 1rem 1.5rem; color: var(--kb-popover-text); box-shadow: var(--kb-shadow-container); backdrop-filter: blur(var(--kb-backdrop-blur)); -webkit-backdrop-filter: blur(var(--kb-backdrop-blur)); opacity: 0; transform: translateY(-10px); pointer-events: none; visibility: hidden; transition: all 0.2s ease-out; }
|
|
1387
1382
|
.popover.open { opacity: 1; transform: translateY(0); pointer-events: auto; visibility: visible; }
|
|
1388
1383
|
.container.popover-open { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
|
1389
|
-
.container.popover-open .progress-clip { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
|
|
1390
1384
|
.form-group { margin-bottom: 0; }
|
|
1391
1385
|
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--kb-form-label); font-weight: 500; }
|
|
1392
1386
|
.input-row { display: flex; gap: 0.5rem; }
|
|
@@ -1409,19 +1403,17 @@ var KenobiLib = (() => {
|
|
|
1409
1403
|
.popover-watermark { position: absolute; top: 100%; left: 0; right: 0; text-align: center; font-size: 0.625rem; color: var(--kb-watermark-text); opacity: 0.6; font-weight: 500; letter-spacing: 0.025em; padding-top: 0.5rem; }
|
|
1410
1404
|
.popover-watermark a { color: inherit; text-decoration: none; cursor: pointer; }
|
|
1411
1405
|
.popover-watermark a:hover { text-decoration: underline; opacity: 1; }
|
|
1412
|
-
/* Launcher hint
|
|
1413
|
-
.launcher
|
|
1414
|
-
.launcher
|
|
1415
|
-
.pos-top-right.launcher .kbd-hint { left: auto; right: auto; }
|
|
1406
|
+
/* Launcher helper hint (below launcher) */
|
|
1407
|
+
.launcher-hint { position: absolute; top: calc(100% + 0.4rem); left: 50%; transform: translateX(-50%); pointer-events: none; white-space: nowrap; }
|
|
1408
|
+
.launcher-hint.visible { opacity: 0.65; }
|
|
1416
1409
|
/* Launcher dismiss button */
|
|
1417
1410
|
.launcher .btn-dismiss.launcher-dismiss { top: -0.375rem; left: -0.375rem; width: 1.25rem; height: 1.25rem; opacity: 0; transition: opacity 0.2s ease-out, background-color 0.3s ease-out, color 0.3s ease-out; }
|
|
1418
1411
|
.launcher:hover .btn-dismiss.launcher-dismiss { opacity: 1; }
|
|
1419
1412
|
/* Launcher logo */
|
|
1420
1413
|
.launcher-logo { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
|
|
1421
1414
|
.launcher-logo svg { width: 20px; height: 20px; }
|
|
1422
|
-
/* Mobile:
|
|
1415
|
+
/* Mobile: show dismiss button */
|
|
1423
1416
|
@media (max-width: 768px) {
|
|
1424
|
-
.launcher .kbd-hint { display: none; }
|
|
1425
1417
|
.launcher .btn-dismiss.launcher-dismiss { opacity: 1; }
|
|
1426
1418
|
}
|
|
1427
1419
|
/* Toggle personalization button */
|
|
@@ -1431,6 +1423,11 @@ var KenobiLib = (() => {
|
|
|
1431
1423
|
/* Custom tooltip for toggle button */
|
|
1432
1424
|
.btn-toggle-personalization .toggle-tooltip { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background-color: var(--kb-bg-container); border: 1px solid var(--kb-border-container); color: var(--kb-text-title); font-size: 0.7rem; font-weight: 500; padding: 0.25rem 0.5rem; border-radius: 4px; opacity: 0; visibility: hidden; transition: opacity 0.15s ease-out, visibility 0.15s ease-out; pointer-events: none; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
|
|
1433
1425
|
.btn-toggle-personalization:hover .toggle-tooltip { opacity: 1; visibility: visible; }
|
|
1426
|
+
.btn-toggle-personalization.loading { cursor: default; opacity: 0.7; }
|
|
1427
|
+
.btn-toggle-personalization.loading:hover { transform: none; }
|
|
1428
|
+
.btn-toggle-personalization:disabled { cursor: default; }
|
|
1429
|
+
.launcher-domain { text-decoration: underline; text-underline-offset: 2px; }
|
|
1430
|
+
.launcher-actions { display: flex; align-items: center; gap: 0.25rem; }
|
|
1434
1431
|
`;
|
|
1435
1432
|
var useEnterExitAnimation = /* @__PURE__ */ __name((ref, isVisible, config) => {
|
|
1436
1433
|
const hasEnteredRef = A2(false);
|
|
@@ -1769,19 +1766,35 @@ var KenobiLib = (() => {
|
|
|
1769
1766
|
config.onDismiss,
|
|
1770
1767
|
isPopoverEnabled
|
|
1771
1768
|
]);
|
|
1769
|
+
const [isMobile, setIsMobile] = d2(false);
|
|
1772
1770
|
const isMac = typeof navigator !== "undefined" && /Mac/.test(navigator.userAgent);
|
|
1773
|
-
|
|
1771
|
+
y2(() => {
|
|
1772
|
+
if (typeof window === "undefined") return;
|
|
1773
|
+
const media = window.matchMedia("(max-width: 768px)");
|
|
1774
|
+
const update = /* @__PURE__ */ __name(() => setIsMobile(media.matches), "update");
|
|
1775
|
+
update();
|
|
1776
|
+
if ("addEventListener" in media) {
|
|
1777
|
+
media.addEventListener("change", update);
|
|
1778
|
+
return () => media.removeEventListener("change", update);
|
|
1779
|
+
}
|
|
1780
|
+
window.addEventListener("resize", update);
|
|
1781
|
+
return () => window.removeEventListener("resize", update);
|
|
1782
|
+
}, []);
|
|
1783
|
+
const launcherHint = (() => {
|
|
1784
|
+
if (isMobile) {
|
|
1785
|
+
return { keys: [], label: "tap to launch" };
|
|
1786
|
+
}
|
|
1774
1787
|
if (config.keyboardShortcut) {
|
|
1775
1788
|
const mods = config.keyboardShortcut.modifiers || [];
|
|
1776
1789
|
const keys = [];
|
|
1777
|
-
if (mods.includes("meta")) keys.push(isMac ? "\u2318" : "
|
|
1790
|
+
if (mods.includes("meta")) keys.push(isMac ? "\u2318" : "Ctrl");
|
|
1778
1791
|
if (mods.includes("ctrl")) keys.push("Ctrl");
|
|
1779
1792
|
if (mods.includes("alt")) keys.push(isMac ? "Opt" : "Alt");
|
|
1780
1793
|
if (mods.includes("shift")) keys.push("Shift");
|
|
1781
1794
|
keys.push(config.keyboardShortcut.key.toUpperCase());
|
|
1782
|
-
return keys;
|
|
1795
|
+
return { keys, label: "to launch" };
|
|
1783
1796
|
}
|
|
1784
|
-
return [isMac ? "\u2318" : "Ctrl", "P"];
|
|
1797
|
+
return { keys: [isMac ? "\u2318" : "Ctrl", "P"], label: "to launch" };
|
|
1785
1798
|
})();
|
|
1786
1799
|
const [logoFailed, setLogoFailed] = d2(false);
|
|
1787
1800
|
const [logoAttempt, setLogoAttempt] = d2(
|
|
@@ -2057,6 +2070,7 @@ var KenobiLib = (() => {
|
|
|
2057
2070
|
const isContainerVisible = !!config.isVisible && mode === "card" && !isDismissed;
|
|
2058
2071
|
const isLauncherVisible = !!config.isVisible && mode === "launcher" && !isDismissed;
|
|
2059
2072
|
const isAnythingVisible = isContainerVisible || isLauncherVisible;
|
|
2073
|
+
const showLauncherHint = !!config.showKeyboardHints && isLauncherVisible;
|
|
2060
2074
|
return /* @__PURE__ */ u3(k, { children: [
|
|
2061
2075
|
/* @__PURE__ */ u3(
|
|
2062
2076
|
"div",
|
|
@@ -2120,15 +2134,6 @@ var KenobiLib = (() => {
|
|
|
2120
2134
|
}
|
|
2121
2135
|
)
|
|
2122
2136
|
] }) }) }),
|
|
2123
|
-
/* @__PURE__ */ u3("div", { class: "progress-clip", children: /* @__PURE__ */ u3("div", { class: "progress-container", children: /* @__PURE__ */ u3(
|
|
2124
|
-
"div",
|
|
2125
|
-
{
|
|
2126
|
-
class: "progress-bar",
|
|
2127
|
-
style: {
|
|
2128
|
-
width: `${displayedProgress}%`
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
) }) }),
|
|
2132
2137
|
!isDeanonymized && /* @__PURE__ */ u3(
|
|
2133
2138
|
"div",
|
|
2134
2139
|
{
|
|
@@ -2254,25 +2259,55 @@ var KenobiLib = (() => {
|
|
|
2254
2259
|
),
|
|
2255
2260
|
config.showLauncherLogo !== false && /* @__PURE__ */ u3("div", { class: "launcher-logo", children: /* @__PURE__ */ u3(LogoIcon, {}) }),
|
|
2256
2261
|
/* @__PURE__ */ u3("div", { class: "launcher-label", children: [
|
|
2257
|
-
/* @__PURE__ */ u3("span", { children:
|
|
2262
|
+
/* @__PURE__ */ u3("span", { children: (() => {
|
|
2263
|
+
const forMatch = launcherLabelText.match(/^(For\s+)(.+)$/i);
|
|
2264
|
+
if (forMatch) {
|
|
2265
|
+
return /* @__PURE__ */ u3(k, { children: [
|
|
2266
|
+
forMatch[1],
|
|
2267
|
+
/* @__PURE__ */ u3("span", { class: "launcher-domain", children: forMatch[2] })
|
|
2268
|
+
] });
|
|
2269
|
+
}
|
|
2270
|
+
return launcherLabelText;
|
|
2271
|
+
})() }),
|
|
2258
2272
|
isDeanonymized && renderDeanonymizedChip("launcher")
|
|
2259
2273
|
] }),
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
e3
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2274
|
+
/* @__PURE__ */ u3("div", { class: "launcher-actions", children: [
|
|
2275
|
+
config.enableUndoToggle && hasHadSuccess && /* @__PURE__ */ u3(
|
|
2276
|
+
"button",
|
|
2277
|
+
{
|
|
2278
|
+
class: "btn-toggle-personalization",
|
|
2279
|
+
"aria-label": config.isPersonalized ? "Show original" : "Show personalized",
|
|
2280
|
+
onClick: (e3) => {
|
|
2281
|
+
e3.stopPropagation();
|
|
2282
|
+
config.onTogglePersonalization?.();
|
|
2283
|
+
},
|
|
2284
|
+
children: [
|
|
2285
|
+
/* @__PURE__ */ u3(ArrowPathIcon, {}),
|
|
2286
|
+
/* @__PURE__ */ u3("span", { class: "toggle-tooltip", children: config.isPersonalized ? "Show original" : "Show personalized" })
|
|
2287
|
+
]
|
|
2288
|
+
}
|
|
2289
|
+
),
|
|
2290
|
+
config.launcherAction && config.launcherAction.status !== "idle" && hasHadSuccess && /* @__PURE__ */ u3(
|
|
2291
|
+
"button",
|
|
2292
|
+
{
|
|
2293
|
+
class: `btn-toggle-personalization${config.launcherAction.status === "loading" ? " loading" : ""}`,
|
|
2294
|
+
"aria-label": config.launcherAction.tooltip || "Action",
|
|
2295
|
+
onClick: (e3) => {
|
|
2296
|
+
e3.stopPropagation();
|
|
2297
|
+
config.launcherAction?.onClick?.();
|
|
2298
|
+
},
|
|
2299
|
+
disabled: config.launcherAction.status === "loading",
|
|
2300
|
+
children: [
|
|
2301
|
+
config.launcherAction.status === "loading" ? /* @__PURE__ */ u3(LoaderIcon, {}) : /* @__PURE__ */ u3(ArrowRightIcon, {}),
|
|
2302
|
+
config.launcherAction.tooltip && /* @__PURE__ */ u3("span", { class: "toggle-tooltip", children: config.launcherAction.tooltip })
|
|
2303
|
+
]
|
|
2304
|
+
}
|
|
2305
|
+
)
|
|
2306
|
+
] }),
|
|
2307
|
+
showLauncherHint && /* @__PURE__ */ u3("div", { class: "kbd-hint visible launcher-hint", "aria-hidden": "true", children: [
|
|
2308
|
+
launcherHint.keys.length > 0 && /* @__PURE__ */ u3("div", { class: "kbd-group", children: launcherHint.keys.map((key, index) => /* @__PURE__ */ u3("div", { class: "kbd", children: key }, index)) }),
|
|
2309
|
+
/* @__PURE__ */ u3("span", { class: "kbd-text", children: launcherHint.label })
|
|
2310
|
+
] })
|
|
2276
2311
|
]
|
|
2277
2312
|
}
|
|
2278
2313
|
)
|
|
@@ -2833,16 +2868,17 @@ var KenobiLib = (() => {
|
|
|
2833
2868
|
const keyframes = this.resolveKeyframes(config.keyframes);
|
|
2834
2869
|
const duration = config.durationMs ?? transitionConfig.durationMs ?? 300;
|
|
2835
2870
|
const easing = transitionConfig.easing ?? "ease";
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2871
|
+
setTimeout(() => {
|
|
2872
|
+
const animation = span.animate(keyframes, {
|
|
2873
|
+
duration,
|
|
2874
|
+
easing,
|
|
2875
|
+
fill: "forwards"
|
|
2876
|
+
});
|
|
2877
|
+
animation.addEventListener("finish", () => {
|
|
2878
|
+
animation.commitStyles();
|
|
2879
|
+
animation.cancel();
|
|
2880
|
+
});
|
|
2881
|
+
}, delay2);
|
|
2846
2882
|
wordWrapper.appendChild(span);
|
|
2847
2883
|
delay2 += config.staggerMs ?? 50;
|
|
2848
2884
|
});
|
|
@@ -2885,16 +2921,17 @@ var KenobiLib = (() => {
|
|
|
2885
2921
|
const keyframes = this.resolveKeyframes(config.keyframes);
|
|
2886
2922
|
const duration = config.durationMs ?? transitionConfig.durationMs ?? 300;
|
|
2887
2923
|
const easing = transitionConfig.easing ?? "ease";
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2924
|
+
setTimeout(() => {
|
|
2925
|
+
const animation = span.animate(keyframes, {
|
|
2926
|
+
duration,
|
|
2927
|
+
easing,
|
|
2928
|
+
fill: "forwards"
|
|
2929
|
+
});
|
|
2930
|
+
animation.addEventListener("finish", () => {
|
|
2931
|
+
animation.commitStyles();
|
|
2932
|
+
animation.cancel();
|
|
2933
|
+
});
|
|
2934
|
+
}, delay);
|
|
2898
2935
|
fragment.appendChild(span);
|
|
2899
2936
|
delay += config.staggerMs ?? 50;
|
|
2900
2937
|
});
|
|
@@ -3799,7 +3836,10 @@ var KenobiLib = (() => {
|
|
|
3799
3836
|
}, "requestPersonalization"));
|
|
3800
3837
|
__publicField(this, "preparePersonalization", /* @__PURE__ */ __name(async (input, options) => {
|
|
3801
3838
|
if (!this.config.publicKey) {
|
|
3802
|
-
this.log(
|
|
3839
|
+
this.log(
|
|
3840
|
+
"error",
|
|
3841
|
+
"Cannot prepare personalization: publicKey not configured"
|
|
3842
|
+
);
|
|
3803
3843
|
return null;
|
|
3804
3844
|
}
|
|
3805
3845
|
if (this.preparedPersonalization?.input && this.isSameInput(this.preparedPersonalization.input, input)) {
|
|
@@ -3821,7 +3861,11 @@ var KenobiLib = (() => {
|
|
|
3821
3861
|
notifySlack: false,
|
|
3822
3862
|
predictionSource: options?.source
|
|
3823
3863
|
});
|
|
3824
|
-
this.preparedPersonalization = {
|
|
3864
|
+
this.preparedPersonalization = {
|
|
3865
|
+
input,
|
|
3866
|
+
result,
|
|
3867
|
+
source: options?.source
|
|
3868
|
+
};
|
|
3825
3869
|
this.dispatchKenobiEvent("personalization:ready", {
|
|
3826
3870
|
input,
|
|
3827
3871
|
pagePath: this.currentPath,
|
|
@@ -3965,7 +4009,7 @@ var KenobiLib = (() => {
|
|
|
3965
4009
|
__publicField(this, "personalize", /* @__PURE__ */ __name(async (input) => {
|
|
3966
4010
|
if (!this.config.publicKey) {
|
|
3967
4011
|
this.log("error", "Cannot personalize: publicKey not configured");
|
|
3968
|
-
return;
|
|
4012
|
+
return null;
|
|
3969
4013
|
}
|
|
3970
4014
|
const startTime = /* @__PURE__ */ new Date();
|
|
3971
4015
|
this.log("debug", "Starting personalization with input:", input);
|
|
@@ -4013,6 +4057,7 @@ var KenobiLib = (() => {
|
|
|
4013
4057
|
source: prepared ? "prefetch" : "api",
|
|
4014
4058
|
deanonymized: isDeanonymizedInput
|
|
4015
4059
|
});
|
|
4060
|
+
return result;
|
|
4016
4061
|
} catch (error) {
|
|
4017
4062
|
this.log("error", "Personalization failed:", error);
|
|
4018
4063
|
if (this.cueCardInstance) {
|
|
@@ -4025,6 +4070,7 @@ var KenobiLib = (() => {
|
|
|
4025
4070
|
deanonymized: isDeanonymizedInput
|
|
4026
4071
|
});
|
|
4027
4072
|
}
|
|
4073
|
+
return null;
|
|
4028
4074
|
}, "personalize"));
|
|
4029
4075
|
/**
|
|
4030
4076
|
* Returns the CueCard instance if one was auto-mounted.
|